« first day (2394 days earlier)      last day (1608 days later) » 

12:00 AM
RELOAD! There are 6286 unanswered questions (90.0443% answered)
 
12:20 AM
0
Q: Using Java 8 streams to consume from one map and produce to another

user0000001For no reason other than to play with Java streams, I am wondering how I could simplify the following code any further. It was using an iterator previously and figured I would migrate it to using Java streams. Am I doing this right? I am sure there are a vast number of ways to rewrite this code b...

 
 
2 hours later…
2:00 AM
possible answer invalidation by Thiago Luiz on question by Thiago Luiz: codereview.stackexchange.com/posts/232772/revisions
 
0
Q: How to get my Ruby project to decide if user input is string or integer and respond differently based on that

Nanopixel24I'm very new to Ruby and having a bit of difficulty with this project where I wish to create a journal a user can input into, have the input stored in an array, and allow the user to recall the entries by number or searching a certain term. Here is my current code: puts 'Type in as many words as...

 
2:25 AM
1
Q: How can I improvise and optimize code below which converts data in HashMap to a custom object?

NishantI have a HashMap as below. I want to convert data in HashMap below to Response object as defined below. I have written the code below to convert to Response object. But I do not find it clean and optimized. Is there a better way to achieve this ? class Converter{ public static void main(Stri...

0
Q: Implementation of container searchable by any element

Joongho LeeWriting game engine as a hobby, I've come across many situations where I need a container like a map, but searchable by different keys: a block allocator where a block needs to be searched by either offset or size, or resources searchable by either name or file. Having multiple maps for each of ...

 
2:51 AM
Questions about working code may be a better suited to codereview.stackexchange.com . Including the data structure of rows in the question would also be of assistance. — traktor53 31 secs ago
 
Monking!
 
3:53 AM
This would be more suited to codereview.stackexchange.comNick 45 secs ago
 
4:12 AM
Welcome to Stack Overflow! To get useful help, take a look at the asking guide. In particular, please try to make your question as specific as possible. Also, if there are specific critiques you would like, Code Review might be a better place to ask. (As a first suggestion for how to improve it, you could format it to be easier to read. Indent in multiples of 4 spaces and don't add blank lines except in between functions and to make the code easier to read.) — jirassimok 57 secs ago
 
5:05 AM
Your question appears to be off-topic as it 1) is much too broad for this site, 2) is about working code, not about an error in your code. It might be a better fit for the Code Review Stack Exchange site, but before posting there, you'd best check their own CodeReview help site. — Hovercraft Full Of Eels 25 secs ago
I'm voting to close this question as off-topic because it is about improving working code and therefore belongs on Code Review instead, which was created specifically for that purpose. — Ken White 52 secs ago
 
0
Q: Proper Case Conversion (Performance)

ZOulhadjI wrote a simple function that converts an array of words into proper case (using bit shifting) and returns the array. I performed a simple test using std::chrono to check how fast it was able to perform the conversion. Using a vector of 1000 words the function was able to do it in an average of ...

 
5:50 AM
(If you wanted to know if there was something to improve in your code, consider posting to Code Review@SE - invest diligence to get the best value out of Code Review. — greybeard 6 secs ago
possible answer invalidation by Srivaths on question by Srivaths: codereview.stackexchange.com/posts/232795/revisions
 
6:40 AM
There are more appropriate resources for bug-fixing your code — Pynchia 25 secs ago
 
7:04 AM
A question for code-reviewPynchia 1 min ago
 
7:18 AM
0
Q: Is there any way to generalize the code futher

4shwin_26instructions = ''' Welcome to Py Quiz\n 1. Each Question Carries 25k Rupees.Totally 11 questions\n 2. One lifeline is allotted for the entire quiz.Lifelines and be used by entering 'help'\n a) Double Dip [ Player will be given a second chance for answerin...

 
8:00 AM
-1
Q: Re-fetching revoked OAuth token

pumucklI am trying to handle the case if a OAuth V1 token is expired or revoked and has to be re-fetched and wonder if I'm doing it right. //Invoking method public CollectDataFromEtsy() { try { GetInvoices(); } catch (TokenRevokedException) { try { ...

 
8:21 AM
-1
Q: MPI Dynamic allocation of row-stored matrices raises Segmentation Fault

Ayman MakkiGood morning everyone, I am doing some MPI training this morning and I am having trouble on one of those (stupid) bug which doesn't make any sense to me. I have defined the following function for allocation of my double 2D arrays in a contiguous memory storage : double ** lf2d_init(int n, i...

 
8:41 AM
-2
Q: Duplicates generated in output while using for loops with break statement and count, Python

techsmartI have a function which searches for relationships inside each paragraph of a text file. A sample of the metadata.csv file which searches for relationship in paragraphs is as follows: Blister Base Web PVC/PVDC Blister Foil Aluminium Blister Base Web PVC/PVDC Blister ...

 
9:02 AM
0
Q: Nineagram puzzle aid in Elm

Jeremy HuntMy first Elm program. Nineagram is a puzzle that appears in the local newspaper. Given the nine letters for the day, the task is to come up with two five-letter words that share the same middle letter. Example: efiimlrtu has at least one solution of... f e l i m i t u r This ...

 
9:23 AM
-1
Q: Banking system in C++

SrivathsI've created a program for Banking System in C++14. #include <string> #include <vector> #include <fstream> #include <iostream> using namespace std; int MAX = 9999999999; class Account { private: static int CurAccNo; bool open = true; int AccNo = ++CurAccNo; double balance = 0...

 
10:06 AM
FYI, Code Review is a more appropriate site if you want your code to be reviewed. Stackoverflow is for specific coding problems. — kaylum 28 secs ago
 
10:45 AM
possible answer invalidation by ZOulhadj on question by ZOulhadj: codereview.stackexchange.com/posts/232843/revisions
 
 
1 hour later…
12:06 PM
@Duga That's fine.
 
12:32 PM
I'm voting to close this question as off-topic because this question belongs on CodeReview SEoguz ismail 24 secs ago
 
0
Q: n-queens problems and permutation strategy

J. D.I would like to write a C++ code for the n-queens problem using the permutation approach. This means I index the queens from 1 to n, and the state of the checkerboard will be defined by an array where the i-th entry stores the row of the queen at the i-th column. Clearly, such array will contain ...

 
@Socowi Added it. Oguz Ismail: Ah, didn't know CodeReview SE existed... — user3616457 29 secs ago
 
1:39 PM
0
Q: Hourglass figure in java

Denzel mcgorvenI have recently been asked to change my code from one hourglass to another using different characters in the middle but i have no idea where to begin. Here is the code i currently have: public class sonnd1{ public static void main( String[] args ) { show( 4 ); } public static void show( i...

 
1:56 PM
You have to set ENV["RAILS_ROOT"] so that it points to the dummy application. Also nesting all your code inside a GEM_CODE directory is really questionable if you want to pass a code review. — max 59 secs ago
 
 
1 hour later…
3:09 PM
Monking
 
3:23 PM
-1
Q: Main Activity error pointer null

Francisco Núñezi have and source code APP that run in Android 7.1.1 and provider say that this is compatible with android 4.0 up to 10 but when y try to run it on a device or Virtual device with Android 8.0 API 26 i get this error: AndroidRuntime: FATAL EXCEPTION: main Process: com.icarosnet.android.xhero1...

 
@CaptainObvious Hammered by @MathieuGuindon.
 
Ya sorry.. there was an auto-flag (excessively long) on it =)
 
No problem
 
@MaeveMaeveov Without knowing what you are going to do with those radio buttons it's hard to share some useful idea. However in general I think the question belongs to codereview.stackexchange.comReza Aghaei 8 secs ago
 
That means it won't get answered on SO either.
@MathieuGuindon ^^
 
3:34 PM
"Here's my entire code and a 2km stack trace" isn't much of a MCVE
3
 
They really should try to debug their code before they post it. A 2km stack trace?
 
That would be 1.25 miles =)
 
-1
Q: Why doesn't this Longest Increasing subsequence problem work correctly?

Chirag MI have defined in recursively to work one case at a time.I am getting wrong answers using test data which is sufficiently large , but it works fine for smaller cases. #include <iostream> #include <algorithm> #include <vector> int LIS[100000]; void LS (int *arr , int n) { if (n ...

 
@CaptainObvious Title says it all.
 
4:10 PM
Monking!
 
Monking!
 
Monking!
 
4:46 PM
-1
Q: Changing inside character with class constant

tracy lanxI have recently been asked to change my code from one hourglass to another using different characters but im stuck. I would like to change the output to the more detailed hourglass. Here is the code i currently have with the output i have and the one im trying to get: public class sonnd1{ ...

 
 
1 hour later…
-1
Q: Business logic refactoring of code needed

Kulwant SinghI am trying to refactor PlaylistBusinessBean class. The objective of this class is to add a song/tracks at an index in an existing playlist. As per my understanding the method validateIndexes in the class PlaylistBusinessBean holds no significance because validateIndexes will never return false,...

 
6:30 PM
-2
Q: java programming

jason ohCode a Java program to calculate the value of a word based on the letters and double or triple bonuses. Letter Values: Letter Value E, A, I, O, N, R, T, L, S, U 1 D, G 2 B, C, M, P 3 F, H, V, W, Y ...

1
Q: Gem Puzzle game

YTTYI started to learn JavaFX a few days ago and I have just created as an exercise a simple Gem Puzzle game. The puzzle pieces can be moved if we click on them. The visual aspect of the game is very basic. The code is based on a MVC architecture. It's not totally finished. Still, before I get any f...

 
 
1 hour later…
7:53 PM
-1
Q: Project Euler problem 26 in Python

SrivathsQuestion statement: A unit fraction contains 1 in the numerator. The decimal representation of the unit fractions with denominators 2 to 10 are given: 1/2 = 0.5 1/3 = 0.(3) 1/4 = 0.25 1/5 = 0.2 1/6 = 0.1(6) 1/7 = 0.(142857) 1/8 = 0.125 1/9 = 0.(1) 1/10 = 0....

 
possible answer invalidation by markspace on question by Alexander Babichuk: codereview.stackexchange.com/posts/222949/revisions
 
8:14 PM
0
Q: Depth first maze generating algorithm c++ implementation

Ducak NikolaI implemented a simple maze generator as a practice and i wonder what can i do to improve my c++ skills. I saw this implementation and used it as an ispiration for some parts of my code link. I am a little bit confused about usage of 'inline' keyword, should definition of inline declared method b...

 
8:35 PM
0
Q: I am designing a Music application with Playlists and Songs. Am I designing models correctly

Kulwant SinghI am developing a Music application having Playlist and Song. I want feedback on my class model design. My question is, what is the best way to store Playlist information in a Song class. Currently, I am adding the whole Playlist in Song class. Should I add Playlist instance in Song or just the n...

 
 
1 hour later…
9:37 PM
0
Q: Processes Files Using Subprocess and Os

TrevorPaulMartinThis program I have written automates some of the more manual work in getting the results from my experiments. The idea is that I have files and subdirectories in my main directory. Some of these subdirectories contain the data I need process. Inside each of these subdirectories that contain dat...

 
 
1 hour later…
10:40 PM
0
Q: Scrabble score calculator java

jason ohI am trying to put Randomly generate one of the following possibilities. You must use these probabilities. No bonus (136/196) Double word (16/196) Double letter (24/196) – apply this to a random letter in the user’s word. Triple word (8/196) Triple letter (12/196) – apply this to a random letter ...

 
10:53 PM
IMO a song has no business knowing about any playlists, but that isn't something that can be objectively settled without knowing what your specific requirements are. Does your model work for your requirements? Looks like it's too early to ask for a peer review, since there's no code doing anything with any of these classes... I'd recommend getting your code to solve the problems it needs to solve, and presenting that code for review - the code is the design, and if it's wrong, reviewers will point it out - but we can't review a design. — Mathieu Guindon ♦ 1 hour ago
Well said @MathieuGuindon
@Duga Fine
 
0
Q: Barebones but Sequence compliant Singly Linked List

CarcigenicateI haven't written a linked list from scratch in a couple years, so I decided to take a stab at it again. After working on it on and off for a little over a week, I'm finally happy with it. It implements Sequence. Since it overrides each method, having it extend an ABC wasn't really necessary, bu...

 
11:21 PM
0
Q: Fortran 90 / openmp heat transfer simulation optimization

HotDogCannonI'm a newbie playing around with Fortran 90 and openmp and wrote the code below (a simple 2D heat transfer simulation) for testing purposes. So far I don't see any speedup by using openmp / parallel processing. In fact, it gets slower when I use more procs. I understand that the parallelization ...

 

« first day (2394 days earlier)      last day (1608 days later) »