Data dodania Pytanie
2017-01-11 19:01 How to stop bool change value once its true? »
i am working with realm data saving. i have create a local bool to see if the value has modify for several textfield . i made something like this. but...
(0) odpowiedzi
2017-01-11 15:01 C - How client can use/access more than one implementation? »
Below(image) is the imitation approach from Linux/net/socket.c source. Background: Reason to implement List abstraction with this approach,...
(1) odpowiedzi
2017-01-11 10:01 Update parameters of a list in a method: return list or not »
I have a list of objects like the next class: class A { private String property1; private String property2; //Setters && Getters ...
(3) odpowiedzi
2017-01-10 12:01 I'm creating a poker client, how can I make the exception handling more clean? »
I'm checking if the values are valid. The if parts looks still messy for me, checking a lot of || operator, and there is multiple InvalidArgumentExcep...
(3) odpowiedzi
2017-01-09 22:01 Should I restrict the width of all of my programs for consistency? And how wide; the conventional 80? »
I have to write a lot of programs for my work. Do you guys restrict the width of your programs for legibility in small terminal windows; and if so, ho...
(1) odpowiedzi
2017-01-09 19:01 Nested if statements vs function exits »
I have been writing if statements for as long as I took my first software class in College, recently my co-workers have introduced a slightly differen...
(4) odpowiedzi
2017-01-09 17:01 Mixing fmap and bind (>>=) »
In Haskell, when I have to mix calls to fmap/<$> and >>=/=<<, I invariably end up with lots of parenthesis. For example, here I'm c...
(1) odpowiedzi
2017-01-08 15:01 Cleancode: try/catch in Promise »
I am working on redux-form atm and found the piece of code. Its working for me but is there any cleaner way to write this in ES6 style? const asyncVa...
(2) odpowiedzi
2017-01-08 12:01 Is it good practice to use traits only to reduce class complexity? »
My base controller class has 2000+ lines. I know it's bad. I'd like to split the class into small chunks to make it simpler. May I use traits as "incl...
(0) odpowiedzi
2017-01-06 06:01 checkpatch.pl flags an error for octal permissions »
I am trying to resolve some coding style issues in a device driver. When I run checkpatch.pl script to run it, it flags the following error. ERROR: U...
(1) odpowiedzi
2017-01-05 11:01 Swift: where to place IBAction functions for clean class code »
What is your best practice with IBActions? Where do u place them? I cannnot decide. 1) If I place them with regular functions, it can be messy but ev...
(1) odpowiedzi
2017-01-05 08:01 Correct way to use mws api with laravel »
Can any body help me out, to understand the correct and standard way to use mws order api library with laravel 5.3 Actually I'm confused in that beca...
(0) odpowiedzi
2017-01-04 08:01 How to check php code for psr 2 validation in Netbeans »
Is there any Plugin in Netbeans for checking PSR2 Violation and fix the same. I tried adding php-cs-fixer.phar in Netbeans > Options > php >...
(0) odpowiedzi
2017-01-02 06:01 How to let android studio align assignment when reformating the code? »
Let's assume we have this code: int x; double yyyy; float zzzzzzzz; x = 1; yyyy = 24.5d; zzzzzzzz = 1.3f; after I enabled: Settings -> Code Style-...
(0) odpowiedzi
2016-12-29 05:12 Download for the Heros example app in the Angular Style Guide »
On the Angular Style Guide, all of the examples are using a Hero application. I would love to download a working version of the application because I'...
(0) odpowiedzi
2016-12-24 18:12 Angular good design pattern for implementing utility functions »
I searched for a lot of design patterns, but found nothing on how to implement functions that are going to be used both in some controllers and in htm...
(1) odpowiedzi
2016-12-22 14:12 Python modularity best practices »
I've been struggling conceptually with the design of my large program. The general layout is something like this: def mainFunc(parm_1, parm_2, ..., p...
(1) odpowiedzi
2016-12-20 14:12 Documenting first-class-assigned functions »
I have a function defined by making use of the first-class nature of Python functions, as follows: add_relative = np.frompyfunc(lambda a, b: (1 + a) ...
(1) odpowiedzi
2016-12-19 02:12 When to use multiple CPP files (Good Coding Practice) »
When writing a C++ program what is considered to be good practice in regards to using multiple cpp files? IE If you are writing a rather large (lines...
(2) odpowiedzi
2016-12-18 21:12 TensorFlow: Is there a way to initialize variables in variable scope if they're not initialized, and reuse them if they are? »
I'm trying to write "clean" code. What I want to do is if(var exists) var = tf.get_variable(...) else var = init_var I tried doing this wit...
(0) odpowiedzi
2016-12-18 07:12 What if I know the answer to something interviewer has asked me? »
I am appearing for an Amazon interview next week. Now what if I already know the answer to certain coding question the interviewer has asked me. Shoul...
(1) odpowiedzi
2016-12-16 10:12 assigning to a function that returns a reference »
I am currently refactoring some code and wondering whether the following (i.e. assigning to a function that returns a reference) is actually bad style...
(1) odpowiedzi
2016-12-14 15:12 Equals sign (and others) in constant »
I am currently refactoring a codebase inherited from another developer. In several classes, i found constants that contained the symbols =, ? and &amp...
(2) odpowiedzi
2016-12-13 21:12 Is there an elegant way to chain join() after a foreach()? »
I am trying to write something like this: DOMElement .innerHTML .toLowerCase() .split(' ') .forEach(function(word) { return word.charAt(0).toU...
(1) odpowiedzi
2016-12-13 11:12 Code style for a PHP project with HTML/CSS/JavaScript »
I need to decide on a code style for a PHP project. The project consists mainly of PHP code, but it also includes its fair share of HTML, CSS and Jav...
(0) odpowiedzi
2016-12-13 09:12 MCQ Page refresh »
I am finishing up with an MCQ based exam website which contains a database as under: Qnum Ques Op1 Op2 Op3 Op4 Correct_answer ...
(0) odpowiedzi
2016-12-11 15:12 Learning Julia (Strings, For Loops, etc)? »
Learning a programming language is always a challenge, because you are not familiar with the syntax or what functions are available. I decided to lear...
(2) odpowiedzi
2016-12-10 16:12 How should I organize implementations and declarations in C? »
FIRST PROBLEM: I am trying writing my first little project and I don't know the best way to organize all of my head files and source files. Is every...
(0) odpowiedzi
2016-12-10 15:12 How to make Xcode put starting brace on new line in Swift? »
I have noticed that the coding style in Swift appears to be to put braces on the same line as a method signature or if statement etc. Without getting ...
(1) odpowiedzi
2016-12-09 07:12 Python coding-style, Imports »
i have seep programmers using isort to sort imports, often use from django.http import ( Http404, HttpResponse, HttpResponseBadRequest, HttpResp...
(0) odpowiedzi
2016-12-08 02:12 Duplicating a variable to give it a better name »
Something that has been on my mind for a while now and I can't seem to find what I am looking for online to answer my question because as you can prob...
(1) odpowiedzi
2016-12-07 20:12 How to build a good template-based C++ library? »
I'm designing a high-performance c++ math library that (ideally) should work with any field (in a math context, so real or complex numbers) and vector...
(1) odpowiedzi
2016-12-06 13:12 Is it better to use getters or to access private members directly? »
Which of the following is better? Is it even opinion-based or are there any relevant differences? Can one or the other be favored in some scenarios? ...
(6) odpowiedzi
2016-12-04 08:12 Inline Standard Xml Documention in Visual Studio C# »
When its expanded... When its collapsed... When i tried with same approach it did not work.. Please guide me how to write this kind of standa...
(1) odpowiedzi
2016-12-04 07:12 Flake 8's equivalence to ESLint max-statements »
max-statements in Javascript ESLint offers a really good enforcement for small, modualized and readable functions. I was hoping to find something simi...
(1) odpowiedzi