Data dodania Pytanie
2017-05-10 09:05 Setting different code styles for separate projects in Pycharm »
I'm using Pycharm, and it's a great editor, but I have this issue while working on a number of projects at the same time. Unfortunately, the different...
(2) odpowiedzi
2017-05-09 23:05 Ruin theory in R but i keep facing an error. Why? »
I'm applying theory to a scenario for a compound stochastic process. This is my code: lab <- 0.027 u <- 10400 sims <- 3000 i <- 37...
(1) odpowiedzi
2017-05-08 11:05 how to insert newline between two if conditions »
I am using clang-format to prettify some existing code. I want to insert a newline between two if conditions, like below code : int main() ...
(1) odpowiedzi
2017-05-07 18:05 How to apply combine technique with if condition »
C# code syntax is bellow public void Cancel() { // If reservation already started throw exception if (DateT...
(1) odpowiedzi
2017-05-05 03:05 How to enable CAxxxx warnings? »
How can I enable code style warnings like CA1002: Do not expose generic lists (or any other "Code Analysis for Managed Code Warnings")? Part of the l...
(1) odpowiedzi
2017-05-04 19:05 Why my external css is not being applied? »
I am trying and example of w3school with tabs, my problem is that when I move the css part to another file (with extention .ccs) this doesn't work. H...
(1) odpowiedzi
2017-05-04 17:05 Workflow: Keeping it clean »
So I'm relatively new to coding overall. I therefore generate a lot of code drafts and notes, from which I keep using snippets for the finalized solut...
(0) odpowiedzi
2017-05-03 02:05 Big O Notation of a module nested in a built-in method in Python »
I'm wondering about a rationale for determining the big O values behind built-in methods in Python. Given the following operation: i_arr = ['1','2','...
(3) odpowiedzi
2017-04-26 13:04 Difference manager and tool class »
What are difference between manager and tool class in project? We are using some manager and tools class so want to understand the significance of th...
(1) odpowiedzi
2017-04-23 18:04 the pros and cons of using three dots ellipsis in R when writing function »
Would like to discuss the pros and cons of using the three dots ellipsis in the function argument when writing a good and maintainable R function, whi...
(0) odpowiedzi
2017-04-23 06:04 How to display code in certain format but commit in another? »
Me and a friend of mine are working on a codebase and a problem has arisen. So, I gladly adhere to any common style standard which has some tooling su...
(1) odpowiedzi
2017-04-22 00:04 Coming from C, I need some help figuring out, how to best generate Chess-Bitmaps from an input-string »
I'm attempting to generate some Bitmaps from an input-string for the chess-variant "Anti-King Chess". Unfortunately I have to do it in Java, which I'm...
(3) odpowiedzi
2017-04-21 08:04 Cleaner way around repeated if statements / null checks in Java »
I've got piece of code where fk variable is setting. There is view way to set value for this variable, but i've to check everytime if fk variable is ...
(0) odpowiedzi
2017-04-21 03:04 Java Convention to Return List of Own Instances? »
I have a question about Java Coding Style. I coded: public class Pattern { public Pattern(...) { ... } public static List<Pattern> ge...
(1) odpowiedzi
2017-04-21 00:04 How to write this code in a idiomatic/functional way? »
I'm trying to write this piece of python code in a more modular/reusable fashion and I'm having trouble writing it Consider this: lst = get_list_of_...
(1) odpowiedzi
2017-04-20 23:04 Storing sql queries in enum. Is it good practice ? »
Is is a good practice to use an enum to store sql queries as constants ? I already have more than 20 private static final queries in my class, so I...
(0) odpowiedzi
2017-04-19 21:04 How to change action bar button in android »
I want to make the back button in the action bar to look like this "<" and not arrow like "<-". Please let me know how to do it. ...
(2) odpowiedzi
2017-04-19 12:04 Creating Constant for section is good Idea? »
I have a tableview which have number of section. lets say first section is for UserProfile. In numberOfRows in section I want to use like if section...
(0) odpowiedzi
2017-04-13 18:04 Border multiple lines of text as a block within more text »
I'm trying to set a border around multiple lines of text within a paragraph. I basically don't want the border to appear on each line, but around all ...
(2) odpowiedzi
2017-04-13 07:04 CSS LIst Style Font Awesome not working »
anyone can help , font awesome why I do not appear, where the problem where, ...
(1) odpowiedzi
2017-04-12 22:04 Exception handling practices of multiple exception throwing functions »
If I have multiple functions in a function which are throwing exceptions what's the best way of handling them if they depend on each other? With depe...
(2) odpowiedzi
2017-04-11 16:04 How to make very lengthy confusing statements to more readable simple statements »
Dear Python Veteran, I am refactoring a traditional code (from GitHub), however the statements are of length ( minimum 100 characters). For eg:...
(0) odpowiedzi
2017-04-10 14:04 Boolean return of set.add() in if conditional? »
The add operator of the set class returns a boolean which indicates whether the added element already existed in the set. Is writing if (set.add(entr...
(1) odpowiedzi
2017-04-10 00:04 Long pandas logic operation »
Is there a better way to write this long pandas logic operation? I only listed a few examples below but actually have a lot more checks. This does the...
(2) odpowiedzi
2017-04-07 14:04 SQL - Select null as FIELDNAME? »
I have come across some code that says select null as UnitCost, null as MarkUp What exactly is this doing? Is it getting the field names unitcost a...
(2) odpowiedzi
2017-04-07 12:04 Good practices creating ViewModels »
I'm looking for some guide how to create view models properly. Mostly, my view models where pretty similar to model entities. Loads of properties, som...
(2) odpowiedzi
2017-04-06 17:04 What do -- classes mean in SASS / CSS? »
I have seen people use -- signs quite a bit, if I remember correctly in use cases like these: .myclass { //some stuff .--large { //other stu...
(1) odpowiedzi
2017-04-06 17:04 Is it a good practice to return HTML from Php/Mysql function? »
For example have a look at the below code, It return links based on status it get from database. function favourite_store_link ($store_id, $user_id)...
(1) odpowiedzi
2017-04-06 15:04 Refactoring code to be Generics and functional interface »
I have two interfaces one can be used to find some statistics by Key and Value and the other is used to visit an object and iterate over it, the first...
(1) odpowiedzi
2017-04-05 06:04 What are hourglass imports and why would they be avoided in a codebase? »
I saw some commits in a Python code base removing "hourglass imports." I've never seen this term before and I can't find anything about it via the Pyt...
(0) odpowiedzi
2017-04-05 05:04 How to correctly implement a game manager in Python »
I'm confused as to how to correctly implement a game manager-type class (that controls most aspects of the program, such as the main loop) with the va...
(1) odpowiedzi
2017-04-05 04:04 Multi-tier namespace specification in C++ »
A client of mine has coding standards that call for namespaces need to be defined with all individual names and braces on separate lines. This leads t...
(1) odpowiedzi
2017-04-04 15:04 Choosing the proper type name »
Let's say I have the vector of strings, is there any preferable way of naming this type? Are there any cons or pros on choosing names like: using s...
(1) odpowiedzi
2017-04-04 13:04 Is it good coding style to set variables from within function calls? »
Consider these two examples: // explicitly setting the variable $file = '/example.php'; if (file_exists($file)) { include($file); } // setting the...
(1) odpowiedzi
2017-04-04 06:04 How to prevent clang-format from adding a single semicolon to a new line? »
I have this line of code in C++ while (fread(pixel_array++, sizeof(byte), 3, fp)); but when I use clang-format, it splits the semicolon and add it ...
(1) odpowiedzi