Data dodania Pytanie
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
2016-12-02 21:12 When do you check input type when writing class method »
How would you proceed writing the code when you have multiple inputs like in this example: public function addNameAndAge($name, $age) { if (false...
(2) odpowiedzi
2016-11-26 21:11 Style guide for R - how can I write a good code in R? What I should avoid »
Hope this is a legitimate question. I am relatively new to R, I am looking for an equivalent of python's PEP 20 or python's PEP 8 style guide. I can n...
(0) odpowiedzi
2016-11-26 07:11 Matlab Coding: Live Video Webcam using Kalman Filter »
im new to matlab... there is a project that i currently working on it but cant seem to work... so far i try this code but only appear the webcam outpu...
(0) odpowiedzi
2016-11-25 19:11 When a variable should be set as a private class variable (e.g. _var) vs a class constant (e.g. VAR) vs a private class constant (e.g. _VAR)? »
I'm finding myself unsure as to whether I should set certain variables that I use in my class as being private class variables (e.g. _var) vs class co...
(2) odpowiedzi
2016-11-25 15:11 What does prefix "On" implement in event cases in C# coding? »
I think there is quite a confusion over the usage of "On" as prefix of a C# method. In MSDN article "Handling and Raising Event" https://msdn.microso...
(1) odpowiedzi
2016-11-25 01:11 Maintain naming standard for variables with Lombok @Getter AND @Setter »
The code base I work with uses the naming standard for every local variable to start with an 's' or and 'f' e.g. fName or sName. When I use Lombok @Ge...
(1) odpowiedzi
2016-11-24 06:11 Best way / practice to organize code for validation method C# »
I'm wondering what would be the best way or organize code when you doing the validation? Nested if or return at the first place your validation faile...
(1) odpowiedzi
2016-11-22 15:11 Enforcing Coding standards for Github repositories across team »
We are using Github as VCS for our Java project. I am figuring out ways to enforce coding standards before pushing to remote repositories for members ...
(1) odpowiedzi
2016-11-22 14:11 PHP Code Style Fixer: put space between colon and method's return type »
Is there a PHP CS Fixer fixer available that will put space between colon and return type? Fixer should correct this signature: public function modif...
(1) odpowiedzi
2016-11-22 13:11 Python: magic methods that shouldn't be used »
I've created a class that is a tuple wrapper and tuples doesn't support item mutations. Should I leave __setitem__ and __delitem__ implementation or i...
(3) odpowiedzi
2016-11-21 11:11 Lambdas and code readability »
I found a piece of code in my project where lambdas were used and I totally didn't like it. I tried to google opinions about using lambdas and I've no...
(0) odpowiedzi
2016-11-19 07:11 How to write effective code implementing YouAren'tGonnaNeedIt? »
I have been following a strict coding culture , but I am confused about how to design a coding style that doesn't cause the codebase to change from a ...
(0) odpowiedzi
2016-11-18 21:11 C++ exception handling confusion »
So, basically I have this simple wrapper code for an external C library and I'm a newbie in terms of proper exception handling. In advance: The code ...
(2) odpowiedzi