« first day (2333 days earlier)      last day (1669 days later) » 

12:00 AM
RELOAD! There are 6165 unanswered questions (90.0715% answered)
 
 
1 hour later…
1:16 AM
0
Q: Android: Fill a spinner data from the server dynamically

user209795I'm new to android. How do you fill a spinner from the server's data dynamically. This is my Spinner layout: <com.jaredrummler.materialspinner.MaterialSpinner android:id="@+id/spinner" android:layout_width="150dp" android:layout_height="20dp" android:layout_alignLeft="@+id/cate...

 
1:36 AM
0
Q: Maximum Subarray sum and those index-Divide and Conquer

KanMy code above about find maximum subarray sum and finding start index,end index of that subarray. int Max(int a,int b){return (a>b)?a:b;} int Max(int a,int b,int c){return Max(Max(a,b),c);} int MaxAcrossSubArray(int arr[],int l,int m,int r,int &Start,int &End) { Start=m;//initialize start i...

 
 
3 hours later…
4:14 AM
@pacmaninbw I (r|b)arely breakfast at all. Dinner was good btw.
 
4:46 AM
This will be more suitable platform for your question: codereview.stackexchange.comParthS007 just now
 
4:56 AM
Monking
 
5:38 AM
1
Q: The program returns and prints the bank account balance. But can this be better and more efficient

Samuel LeeWould my code be considered fairly optimal and efficient? If not, where can I look to improve the code? The program works just fine. Would this method scale well if the dictionary containing the number of bank account increases? Design: I have designed and kept only one object in the main(); i....

 
5:58 AM
0
Q: Pearson Correlation for Dictionary in Python

Cloe LorenzPython beginner here and I have a hw assignment that I need help with. I know I won't be given the answer, and I don't want it either, but I need help working through it, so I'll share a simplified version here in the hopes that I'll understand what you all share and I'll apply it to the version ...

 
6:38 AM
0
Q: Minimal Python logging

zrdI tend to include something like the following in small and medium-sized Python projects, either at the top of the executable or as logger.py: import logging import sys logger = logging.getLogger(__name__) stoh = logging.StreamHandler(sys.stderr) fmth = logging.Formatter("[%(levelname)s] %(asct...

 
7:00 AM
This sounds like something that is more suitable for codereview.stackexchange.com, also: please don't ask multiple questions in a single question. — Mark Rotteveel 30 secs ago
 
7:18 AM
Monking
@SimonForsberg We absolutely need better tagging on meta, I agree with you on that.
@pacmaninbw @VisualMelon @dfhwze It's not something new. It happens when you link to the specific review of a post in the queue and the review has been completed. How many reviews it takes to complete an item depends a bit (on time passed and the votes cast), but everything is working as intended and it's nothing new.
 
Monking
 
7:38 AM
0
Q: How can i avoid "nested" loops?

Flying ThunderI wrote a Python Bot that fetches Reddit-Image posts and crossposts them to my twitter bot. It is supposed to do so once every hour, however, im seeing weird behaviour: First of all, my "check if a post has already been posted" doesnt seem to work. Second, at random points (happened twice), the b...

0
Q: C++ tic tac toe minimax bot making wrong turns

krocotavusI was trying to make simple tic tac toe with bot but it seems that bot making wrong decisions. Can someone help me out? Any tips to improve my code will be appreciated. Thanks for the help. #ifndef BOT_CLASS_H #define BOT_CLASS_H #include<QObject> #include<QString> #include<QVariant> #include<ve...

 
7:58 AM
0
Q: How to make below code more readable and efficient?

nehaCode below reads static variables from ProductConfiguration class. Functions setAccess and setMarketAccess in two classes ProductInitialization and ProductMarketInitialization reads variables from ProductConfiguration. Can this reading be done in a better way? I still want to have file ProductCon...

 
8:38 AM
0
Q: handle null in compareTo method

Cristian IacobI have a class that contains an attribute ID and I want to implement Comparable interface for this class. The code look like this: public class A implements Comparable<A> { private String id; @Override public int compareTo(A o) { if (this.id == null){ if (o.id ...

 
8:53 AM
@Mast An idea popped into my head about something similar to @DerKommissar's Vinder, but for tags instead. To have a "tag-review" system, where a question is shown and a question asked: "Should this post have tag XYZ?"
(I will not be doing any work on this, but I would happily use it if someone else implements it)
3
 
I'm voting to close this question as off-topic because this is probably a better fit for codereview.stackexchange.comDaveyDaveDave just now
 
9:42 AM
@SimonForsberg Perhaps we should fix all current tags in use first, so they have a proper usage guide. But it could help in the clean-up after that, sure.
 
for reviews of working code there is codereview.stackexchange.com. It is not clear what you are asking here — formerlyknownas_463035818 8 secs ago
 
10:39 AM
0
Q: Adding items from different objects

E235I have two objects: DeploymentList and DaemonSetList but I am planning to add more. They are stored inside a map: map[string]interface{}. I have function (getWorkloads()) to do it. I have a function named foo and it receives the map and passes over the objects. My code runs OK and it add the i...

 
10:59 AM
0
Q: How do I efficiently create a dataframe from a list of dictionaries?

political scientistI used this API to download some data. The code is supposed to create a dataframe table using specific fields of an object, and it seems to work, but running slow. I think it would run faster if I used something instead of json_nomarlize. def create_table(data: List[dict]) -> pd.DataFrame: ...

0
Q: Solving the knapsack problem with user provided input

Kushagra GuptaThis question was given in my college assignment to be done in C. After doing that, I rewrote the program again in rust. I come from a C/Python background and this is my first rust program. Please critique it. The Program is given inputs in the following format {num_items} {max_weight} {item_wei...

 
11:11 AM
@MarkRotteveel i didnt know that, but yeah thats true, how can i move my questions to that codereview section?.... But if you have a answer to my question(s), then it would be nice too^^ — Robin Kreuzer 24 secs ago
@thewoz as I alread mentioned, if you want a review and/or suggestions for working code, you better post at codereview.stackexchange.comformerlyknownas_463035818 28 secs ago
 
11:40 AM
0
Q: How to structure tkinter with classes?

98EdI had a read about classes, def, self, master, *args, **kwargs, init and roots. Still trying to get my head around the whole thing I am struggling to structure my current code into classes and defs. Here is my current code (below), it works perfectly fine, but need to re-code it, re-structure i...

 
12:00 PM
0
Q: 3D Proper Orthogonal Decomposition: C++ implementation

DreoastehI'm very new to C++ and made this code using the Eigen library to port an old and slow python code which computes the three-dimensional proper orthogonal decomposition (POD) from a set of temporal point cloud data. In this case the data is a obtained from a CFD (computational fluid dynamics) sim...

0
Q: Java: Store temperature values in just one byte

CyborgBetaI have got the following code to pack and unpack temperature values into one byte and from one byte: public static int packFromFloat(float t) { return (int) Math.round(((t - 16.0f) * 255.0f) / 16.0f); } public static float unpackToFloat(int a) { return (Math.round(((float) a * 16....

 
Y'all I'm using PHP again
 
12:36 PM
@Someprogrammerdude This may seem basic, however this question came up during a code review and I thought it appropriate enough to get some trackion in here. It may not seem clear for beginners what the consequences is. — darune 51 secs ago
 
1:05 PM
If your code works and you seek improvements or constructive criticism, Code Review might be a better fit for your question. — Amy 36 secs ago
 
@DerKommissar My concolences.
 
1:22 PM
@DerKommissar I thought you were a dot net expert?
At least it's not VB
Does JetBrains have an app for PHP?
 
I think this is more suitable for code review? — Paolo 16 secs ago
 
@pacmaninbw I am, but I also know over a dozen other languages. ;)
@pacmaninbw Yepo
 
This is probably a better place for questions that have no real problem, but are looking for "improvement": codereview.stackexchange.comYannick K 11 secs ago
 
@DerKommissar I've professionally worked in C, C++, C#, PHP 5, JavaScript, HTML, CSS, Perl, C shell, Bash, VBA (excel), and once VB. I prefer to stay away from Web Development prefer internals.
Coming out of school I knew Fortran 66, Pascal, COBOL and at least one other language I can't remember any more.
Also 2 assemblers.
PDP-11 and Sparc
Oh, forgot SQL
 
Yep...very familiar. We did COBOL, Pascal and Fortran in school, as well as C/C++ and some other ones.
I have one client doing AT&T ASM right now...
 
1:37 PM
@DerKommissar I thought they stopped teaching COBOL, it's almost a dead language.
 
If anyone likes Manning books, they are $25 for a pBook today.
 
0
Q: VBA code to account for multiple users too heavy on save actions

PlutianI have a worksheet I use with a small handful of colleagues on a daily basis to share information with about orders we place. To make sure we always have the same up to date info we use a shared excel workbook I created. I know this is not preferred, but this is all that is available in my compan...

 
1:51 PM
@pacmaninbw Good choice. I love how easy it is to bring new features to users with web, but otherwise, it's more of a pain than desktop/backend.
 
@pacmaninbw I've been doing Web for 10 years, Desktop about 5 longer (yes, that means I've been doing this since I was 10). I don't mind either.
 
@Hosch250 I do a great job of making things work I'm not good at making things look good and the only thing I care to make look good is code.
 
Yeah.
I can usually make things look reasonably good, but it's harder than just code.
I usually do a couple mockups and ask for feedback.
 
@Hosch250 When a designer starts arguing about pixels it's too much for me.
4
 
Same.
I hate it when a ticket comes in because a button doesn't line up pixel-perfect in IE...
But does in the rest of the browsers.
I'm like "It works, and it's basically in the right place, and doesn't screw any other layout thing up. What's the problem?"
"Besides, IE is dead. Switch browsers."
4
 
2:00 PM
This question seems to be more suited to codereview.stackexchange.com, since it seems that this question is primarily-opinion based, since it is based on preferences. — Algirdas Preidžius 38 secs ago
 
@Hosch250 And there are just so many browsers to test Chrome, FireFox, Edge, IE, Opera, etc.
And mobile adds another level of complexity.
 
Yep.
 
2:29 PM
Thank you, there is no error, I have posted on CodeReview codereview.stackexchange.com/questions/229508/…James 39 secs ago
 
2:41 PM
0
Q: In Sweigart's memory puzzle game,I have made it so all shapes are shown in the beginning, how would I do this with less code?

JamesI'm working on a game that displays all shapes by calling startGamesAnimation(board). Then, I can change x (the first parameter) in splitIntoGroupsOf(70, boxes). This works, but I have to write a lot of extra code to handle this (it was originally designed for RNG, which is no longer required). ...

0
Q: Selection Sort Algorithm (Python)

EmmaSelection Sort The selection sort algorithm sorts a list by finding the minimum element from the right unsorted part of the list and putting it at the left sorted part of the list. The algorithm maintains two sub-lists in a given input list. 1) The sub-list which is already sorted....

 
2:52 PM
If your code works correctly, you may want to submit it to Code Review. — Thomas Matthews 11 secs ago
thank you, i'll go there in future as i have a lot of code review questions! thanks for all your answers! — user521344 17 secs ago
 
3:58 PM
This is not how StackOverflow works. See CodeReview. — tkausl 35 secs ago
 
-1
Q: TypeScript client library wrapper

GidsI have made a class which wraps the JSForce Salesforce API Client: import jsforce = require('jsforce'); export class SalesforcePortalClient { salesforceConsumerKey: string; salesforceConsumerSecret: string; salesforceUsername: string; salesforcePassword: string; constructor(salesforc...

 
Monking
 
4:31 PM
There are a lot of ways this could be improved, but this is off-topic for StackOverflow. There is another site specifically geared towards code reviews: codereview.stackexchange.comChristopher Schneider 24 secs ago
 
@DerKommissar I've been using PHPStorm for the last ~5 years... I've grown accustomed to finding files quickly by tapping a shift key twice
 
1
Q: Codility's Permutation Check in C#

newbieI've made a few things in Java, and now I'm learning C#. The code passes the tests with 100% final score. I want to know what things can be improved in my code. Task description A non-empty array A consisting of N integers is given. A permutation is a sequence containing each e...

 
@SᴀᴍOnᴇᴌᴀ Yeah, I use Rider and IntelliJ a lot more and more frequently, still getting the hang of the double-shift.
 
5:03 PM
1
Q: Battleships OOP python

J AdamsonThis is my first attempt at some basic OOP programming. A version of battleships played within the terminal. Any feedback would be great; especially in regards to readability and proper naming conventions. I would really like to improve the strike function of the computer class to make it play ...

-1
Q: Creating a .py file to run a on Python program

Alex PhamI have a folder called AMASTER, which contains a file names search.py with different classes in it, one of which, is called the EightPuzzle(Problem). There are also different search algorithms in the search.py file, one of which is breadth_first_tree_search() algorithm. My question is, if I want ...

 
5:42 PM
Another thing for improvement would be to use standard library more extensively. For instance, there is no need for you to define int Max(int, int), since there is std::max for you already defined in header <algorithm>: en.cppreference.com/w/cpp/algorithm/max . Then, naming could be better. 'arr', 'l', 'mid', 'r' do not sound very clear from code review point of view. And finally, as it was mentioned by @Fureeish , this should belong to CodeReview, not StackOverflow if there is no problem with your code. — Vaidotas Strazdas 19 secs ago
 
6:33 PM
@CaptainObvious Answer seems to be a review of some other code... not sure what to make of it.
 
-1
Q: Improving clarity and style of a parser

realtimeI wrote a parser to extract data from a log file. The file format is a bit irregular, and so is also the parser code, as it turned out. It is a clutter of different loop types, different ways to iterate, and different ways of treating strings: import re import pandas as pd import os import sys ...

 
To whoever is voting to close this question: don't forget to leave a comment. — Mast 8 secs ago
 
6:52 PM
.
.
T̡̧̘̠͙͈͔̔̋́̇͌͒o̷̦̭͓͓͎̻̯͌̇́͐̀͜͡ į̸̼̥̙̼͚̐͒̄͊́̈́̂̂͝͡n͍̭͔͍͂͛̽̎̿͊̈͊̀͆͢͟v͇̦̭̯̮̤͆̂̓́̄o̷̝̯̻̗͕͈̾̀͑̐́͘ḵ̻̼͖̱̑̆̄̓̑̏͟͞e̴̳̤̞̪̯͌̀͑͑̍̈̚ ț̷̨̢͙̹̥̮̋͌̂̍͜͝ḥ̵̛̦̺̰̬̼̖̀͂͒͆́̚̚͟͠e̘̼̦̺̙̥͈̯̩͆͒̆̊̔ ḩ̵̳̫͍͍̑̇̌̍̓̿̈́͗ḭ̹̳̺̯̈́̔̈̑͌̔̍͛ͅv̵̙̲͚͙̫̲̭̋͒̓̎́̾̕͟e̵̡͎͉̰͍̝̯͚̎̓͋̔̒̋͐͜-͙̩͍̩͉̽̏̿̽̏͆̃͝ͅm̶̮̝̻̠̼̹̘̙̂̃͂͗̕į͙͍̖̣̣̲̑̆͌̎̅̅̌̚ṇ̸̨̢̨̧̗̩̏̀̂̿̏͘d̷̗̱̞̭͖̹̖̀̅̏̊̾̆͛̅͜͟ ŗ̶͇̖͚͎̻̾̓̏͐͆̕͢͢ë̡̠̠̬̞̱͕̻͑̊̿̀̓̄̕͢ͅp̧̡̛̻̞͚̲̝̖͑̑̃̅r̸̢̳͚̩̩͕͚̓̄͋͂̚͡ͅe̖͙͓͍͕̺̋̏̿̊͑̅͞͞ş̛̳̟̘̳͓̝̦̤̔̋̐́̐͆͌͊͐ê̼̼̲̫͔͔̋̓̓͡͠ņ̸̤̬̼̤̙͕͇̝̰̓͑̅̏̑͋̕͞ṱ̷̦̺͇̺̙̻̠͒͑͐̾̔̊̉̏ȉ̡̲̝̜͖͇̗͙͖̹̀̽͐̃̓͆̌͘n̸̢͖̼͈̱̝̯͓͑̽̓͋̈́̕ͅḡ͉͍̳̣̮͇̜̥̩̳̒͆́̂͆͒͛̕͘ c̷̡̠̜̻̳̹͊̃̿́̎͆̕͡h̹̫̮͙͔̥̅̄́̒̀͢͟a̡͉̙̞͙̼͉̩̿͋̐͢͡͠ȏ̸̢̦͇̟̙̳̪̑͘͢͠͡͠ͅs̀͒̀
 
 
1 hour later…
8:05 PM
-2
Q: Setting a value asynchronously and fetching it at a later stage

karvaiI wish to set the value of a variable asynchronously. Following that I want to get that value at a later stage. How can I do that? This is what I am doing currently to achieve this. Is this a proper implementation or should I have gone for CompletableFuture or some other cleaner way? Thanks. W...

 
8:22 PM
2
Q: Reviewing Programming Challenge Requirements and Givens

dfhwzeAs I came across this answer Codility's Permutation Check in C# [answer #200620], I noticed the user reviewed quite a few requirements of the challenge, before reviewing the OP's code. My questions concern general on-topicness of such reviews. This answer serves as a mere example. Questions: I...

 
This question would fit better on Code Review. — mkrieger1 22 secs ago
 
 
1 hour later…
9:26 PM
0
Q: Sorting Algorithms (Python)

EmmaSelection Sort The selection sort algorithm sorts a list (array) by finding the minimum element from the right (unsorted part of the list) and putting it at the left (sorted part of the list). The algorithm maintains two sub-lists in a given input list. The sub-list which is already sorted. ...

 
9:40 PM
A great site for help with improving working code is the Code Review stack site. Not that you won't get helpful answers here too, but this is the reason they exist — G. Anderson 17 secs ago
 
10:23 PM
I'm voting to close this question as off-topic because it asking for an opinion on working code so it belongs on codereview.stackexchange.comSimply Ged 58 secs ago
 
10:33 PM
Sounds like a question for Code Review. You'll need a more complete example though. — shmosel 1 min ago
Ooo I didn't know about the Code Review website... Thanks a lot — Matley 20 secs ago
 
11:07 PM
-1
Q: Learning Simple Injector

HayenI'm learning DI and wrote a practice application to solidify the concepts. the code works, I just want to make sure my use of DI and Simple-Injector is proper. All comments welcome. using SimpleInjector; namespace simpleInjector_practice { static class Program { private static...

1
Q: Wu-Manber algorithm for multiple pattern matching in C++

Nguyen NguyenI'm trying to implement the Wu-Manber algorithm (http://webglimpse.net/pubs/TR94-17.pdf). From my understanding, the algorithm basically does string matching using a hash table-based approach with chaining to resolve collision. I have not used C++ for quite a while. I'm looking for help with cod...

 
11:27 PM
0
Q: Ring buffer with random access

Harry BravinerI had an application where I really wanted a double-ended queue that supports random access. Java's ArrayDeque would have been perfect, except that it doesn't expose random access into its backing array. So I went and implemented my own, which I named RingBuffer. I'm looking for any constructive...

 

« first day (2333 days earlier)      last day (1669 days later) »