Data dodania Pytanie
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
2017-04-03 22:04 Closing brace on new line brackets.io »
When I write JavaScript i like to have the opening brace on a new line. When I create a for loop or if statement for example, I press the return key a...
(1) odpowiedzi
2017-04-03 13:04 How could I pass enum object with nested enum in it to a method as parameter? »
Suppose we have an enum object like this: public enum Action { FOO, BAR; public enum Move { UP, DOWN, LEFT...
(1) odpowiedzi
2017-04-03 00:04 Clean code - Where should @Autowired be applied? »
I'll start with a simple example. You have a Spring boot application that runs a CommandLineRunner class on initialization. // MyCommandLineRunner.ja...
(2) odpowiedzi
2017-04-02 19:04 Which is better Scala style? »
Although I know this might be purely preference based, I have a question about style. Given the code below: map { updateWriteResult => logg...
(1) odpowiedzi
2017-03-31 06:03 Ruby loops style/convention »
I'm wondering how I would create the following psuedo-esque code's conventional equivalent in Ruby. I've read quite a bit regarding standard practices...
(4) odpowiedzi
2017-03-28 22:03 If versus '?'. Which one is cleaner »
Person person = Person.getRandomPerson(); if (person.getSex().equals(PersonSex.MAN))) { person.setName("John"); person.setSurname("Wick"); ...
(1) odpowiedzi
2017-03-24 16:03 What's the pythonic way to pass arguments between functions? »
I have some arguments taken from the user and passed along function to function (some functions in different classes), until it eventually gets to a f...
(0) odpowiedzi
2017-03-23 21:03 Conventions and good practices in handling exceptions with spring-boot »
I have always some doubts - should I catch exceptions in case I can't deal with error ? After all, in my case of web app spring-boot automatically se...
(1) odpowiedzi
2017-03-22 05:03 Using try/catch for preventing app from crashes »
I have been working on an Android app which uses try/catch frequently to prevent it from crashing even on places where there is no need. For example, ...
(13) odpowiedzi
2017-03-21 17:03 Is encapsulate a private field into a variable a good practice? C# »
For example: public class Test { private string _s; public Test() { var s = "hello"; _s = s; } public void Foo(...
(2) odpowiedzi
2017-03-17 17:03 Objective C : Clean code Ternary operator creating NSDictionary »
I would like to know the general opinion about a situation that I have had several times during my development experience. The question itself is abou...
(2) odpowiedzi