« first day (1848 days earlier)      last day (2177 days later) » 

12:00 AM
RELOAD! There are 5322 unanswered questions (89.9927% answered)
 
0
Q: Change Foreach into java 8 stream

RafalskyI have this method, It takes a list of my individuals (class has public field fitnessValue). I sum all fitnessValue and then draw a random value between 0 and sum of fintessValue. In the end, I check for each individual where cumulative sum of fintessValue passes the point I counted before and re...

 
If your code works and you wonder how you could improve it, CodeReview is the place you are looking for, not StackOverflow — Fureeish 36 secs ago
 
12:24 AM
If you are reposting your question in CodeReview, please delete this copy immediately. Posting the same question in multiple sites is discouraged. — Stephen C 31 secs ago
 
12:54 AM
This question is more suited to be posted in the stacked change site: CodeReview — AndrewL 41 secs ago
 
0
Q: Maximum number of unique integers - fails due to timeout

MariaI'm given N integers. I need to find the maximum number of unique integers among all the possible contiguous subarrays of size M. My code is this: Scanner in = new Scanner(System.in); Deque deque = new ArrayDeque<Integer>(); int n = in.nextInt(); int m = in.nextInt(); in.nextLine(); String s = i...

 
1:16 AM
I think this might be more related to for the Exchange Code Review. Or perhaps just ethereum? — PGCodeRider 41 secs ago
 
2:04 AM
0
Q: Printing Permutation of True and False - Better Coding Practices

Aniket ChowdhuryMy coding practices aren't very good. I am trying to work on it, but I'm not sure what to work on. This is one of my recent codes, could you tell me the areas to work on. The complexity for every query is log2n, or so I think. It creates binary integer of n. Then uses a multiplicative method to...

 
2:37 AM
0
Q: Node, es6 -- Feels like there's one more level of refactoring

kmonsoorAfter cleaning up & some refactoring, one module of my code became like below. However, I'm feeling like there's still some unnecessary duplicacy, and it can be improved further and can be neat. But, can't come up with exactly how to do it. 'use strict'; // === showing the execution context ...

 
3:03 AM
This may be a better question to ask on code review: codereview.stackexchange.comMistella 11 secs ago
 
3:21 AM
0
Q: Regex search to Excel

Michael KhorI made this to track my variable changes while I experiment in IPython. I tend to use the same variable names and fit different values to them so it's nice to be able to see what I've tried, especially if I'm constructing a huge code block. I copy text onto my clipboard before starting this code...

 
3:54 AM
0
Q: Pythonic way to write scripts - Vim + Zsh + OhMyZsh + Tmux Bootstrap

KleinBottleI am writing a script to automate the install and configuration of vim, zsh, ohmyzsh and tmux, on a linux/mac. I'd like to perform all operations in python, rather than using subprocess to streamline some of the operations (e.g. git clone). I would also like to use this script as an example to ...

 
4:11 AM
-1
Q: Speed up script

Mike F.I have the following script which works great. The only thing is it takes a lot of time to run on a worksheet with 2000+ rows. Anyone know of a way to speed it up? The code runs through the workbook and ignores the pages I do not want it to touch. Then, it runs through any pages that I want it t...

0
Q: A vim plugin to manage and view tag files

MichailI'm writing a Vim plugin to manage and view tag files. There are two primary goals: making Easytags plugin a bit more powerful by instructing it where to search and place tag files, and viewing a tree of tags that exist in a project. The entire code can be seen here, in a frozen branch review-26...

 
 
1 hour later…
5:25 AM
This is definitely a question for Code Review. Stack Overflow is a place for Q&A's about specific problems. (More information here: help centerashleedawg 27 secs ago
 
5:42 AM
-1
Q: How to set an auto increment value in SQLAlchemy whiile creating a table?

Farhaan Patel class csvimport(Base): __tablename__ = 'csvimport' id = Column(INTEGER,primary_key=True) I want to set an autoincrement value for the above code. Please Help

 
6:23 AM
monking
I've got some close votes on this post, but I don't see what is abstract about it. Could you please provide your opinion guys? May be the title is a bit off, but I believe the content is solid.
I'll try to add some more context by describing the operations I implemented
 
6:50 AM
@Incomputable The close reason picked is 'lacks concrete context'. So I guess they think it could use more explanation.
It's currently not an outstanding question, but quite decent enough to be on-topic. I've seen much worse.
Track it's progress here.
 
@Mast thanks
 
Hello! I wanted to quickly ask about responding to an answer - I wanted to somehow update the user who took his time to respond on what I have done to address his points, but I want to address al his points in particular. Given that some of this is changes to code and others are feedback and clarifications, what is the best way to go about it? comments seems limited so I am unsure on how to proceed.
 
@user166286 write comments until you get everything clarified. After that post a follow up question if you want to get more review, otherwise I believe posting a self-answer with what's changed is the way to go
 
@Mast Thanks!
 
7:17 AM
@Incomputable Only if followed by an explanation. All answers should be reviews, even self-answers.
 
7:28 AM
@user166286 Comments are fine, if you run out of comments the site will suggest you take it to a dedicated chatroom instead.
With a link allowing you to generate such a room.
 
@Mast Thanks for letting me know!
 
8:03 AM
@Mast do you have a good example handy of a self answer that is also a good review? And can self answers simply be adjustments based on the answers given so far?
 
0
Q: C ++ Calculate the continued fraction using the function indicators

Евгений ГусевSorry for my English. I'm developing programs on Golang. But now you have to study at the university and have the following task. Calculate the continued fraction using the function indicators. The number of fractional elements must be specified from the keyboard. 1 + 1 / (1 + 1 / (1 + 1 / (1...

 
 
1 hour later…
9:23 AM
If you have working code that you think could be improved, see Code Review. I would say there are certainly neater ways to write that. — jonrsharpe 9 secs ago
 
9:37 AM
Monking
 
 
1 hour later…
10:44 AM
 
11:35 AM
0
Q: Laying out long lines of code

flywireThis must be about the ugliest python code ever written. I'd appreciate some advice how to tidy it up with better indenting to improve readability and make it easier to maintain. def do_widgets(ws, col0, col1): """ Process each widget. """ NO_WDGTS = 5 ENABLE_START_ROW = 6 ENABLE...

 
11:55 AM
Monking.
 
12:22 PM
@user166286 If you go by score, this query might help you: data.stackexchange.com/codereview/query/856143/…
Either way, I'm off again. Have a nice weekend all, gniknoM!
 
12:36 PM
dammit, now I need to start again ...
 
12:57 PM
0
Q: Is this implementation of a linear congruential generator correct?

João PiresHere's a simple LCG that I've made to learn a bit more about pseudo random number generation. Like the title says, is this implementation correct, if so, how can I improve it further? The following code is self contained and it should run without problems. #include <chrono> #include <iostream>...

 
 
1 hour later…
2:21 PM
You are for a solution or a code review? — AliN11 57 secs ago
 
2:40 PM
-1
Q: How can reduce complexity for this code?

user8586348/*This Code finds the sum of all multiples of 3 or 5 for a given range of numbers. For example for n=10, no. of the multiple of 3 or 5 below 10 are 3,5,6,9 & their sum is 23.*/ int main(){ int t; //Number of test cases cin >> t; for(int a0 = 0; a0 < t; a0++){ int sum=0; ...

 
Monking
 
2:56 PM
0
Q: Parallel processing in python

Ayodhyankit PaulI have a huge dataset file and I am thinking to use parallel processing on that file, currently, I have a sample of that file which has many columns, I have written this script to do preprocessing on data like removing the punctuation and tokenise the data, Please review my script and let me know...

 
3:29 PM
0
Q: Single method string formatter

MidnightasBecause I don't want to download an entire library for a single function (which I do understand, was made better than I made mine), I decided to implement my own string formatting function. I am not very proud of it, as I find it pretty ugly and unreadable. This is only a string formatter with...

 
Also, I'd recommend also going to codereview with that code, there's a lot that can be improved, e.g. adding some empty lines and comments, helper functions for common label formatting and placement, avoiding if x: return True else return False, mixed return types in getTime, etc. — tobias_k 45 secs ago
 
@Vogel612 What did you do...
 
Didn't visit my rep tab. But a user was removed and I clicked the message and now that nice large number is gone ...
 
Ah, like that.
 
are you interesting in having this question migrated from SO
0
Q: I'm falling in overtesting feature

karimI'm fresh in the world of unit testing / integration testing. And I have read that, to write good unit tests for methods and classes, you must put yourself in the context that you don't know much about the method implementation, and focus on the method interface and logic for example methode ...

@Vogel612
 
3:48 PM
@YvetteColomb seems a bit sparse on context.
 
-1
Q: reading integers from a file (in C) which including data of a directed graph

NOASuppose I create a file named graph-file.txt, which including data of a directed graph as the following: 7 {5, 2, 3}, {1,5}, {}, { }, {3}, { }, { } The first line of the file shows the number of vertices (7 in that case). The second line describes the neighbours N+(v) for each vertex. For exam...

0
Q: Code not designed according to KISS and DRY principles

gungorI had an interview with a global company yesterday. They had given me a programming assignment. I shared my screen and I must have finished the task in 1.5 hours. Task was programming Reverse Polish Notation calculator in Java. I had developed as I shared my code below. I was rejected by not bei...

 
If you don't want it, I think we could take it, but I'd prefer to not migrate a question as grey as that one
 
@Vogel612 thanks. No need for us to migrate our rubbish. I was responding to a flag.
 
 
1 hour later…
5:01 PM
I think you want to post this at codereview.stackexchange.com. — M. le Rutte just now
 
5:17 PM
-2
Q: necesito ayuda con el juego dots de android

Juan Diego Acevedohola era para ver si me podías ayudar con el juego dots la verdad no tengo idea de como hacerlo y lo necesito con urgencia, si me puedes ayudar muchas gracias. lo necesito para mañana y nada de lo que he intentado hasta hora a funcionado así que al que me pueda ayudar se lo agradezco. el juego...

0
Q: Client wont connect to server

A.BarriosI have a running server but the User/client wont connect even though they are on the same port. Below I have posted my code and can't find whats wrong and not allowing the User/Client to connect. I'm completely and can't find what the issues can be when i have followed the book and videos online ...

 
5:49 PM
there is a stackexchange site for code review — soulshined 25 secs ago
I'm voting to close this question as off-topic because it belongs to codereview.stackexchange.comsoulshined 12 secs ago
 
6:24 PM
0
Q: print concentric rectangular pattern

Latika AgarwalI am solving interview questions from here. Problem : Print concentric rectangular pattern in a 2d matrix. The outermost rectangle is formed by A, then the next outermost is formed by A-1 and so on. You will be given number as an argument to the function you need to implement, and you need to...

 
But it does work without problems, yes? Sounds rather like a question for Code Review. — Mr. T 45 secs ago
 
6:44 PM
I've used this one in codereview with no issues - the only modification I made was to handle going backwards with FileSeek - that's in the last post of the thread. codereview.stackexchange.com/q/102209/106658dbmitch 24 secs ago
 
 
1 hour later…
7:51 PM
0
Q: Wrote a noob core java program to practice OOP concepts

Chiranjeev ThomasA Student Database Program I've used Abstract classes and static methods wherever they seemed to be convenient. I've serialized the hashmap entry and Read/Write it from/to a file . Please review my code and point me to the mistakes I made .. How far away am I from writing production quality co...

 
 
1 hour later…
9:10 PM
0
Q: Is there a way to efficiently write this conditional statement?

yoriI want to distinguish between people who have likes to posts and those who have dislike And I wrote the following code I want to find a way to improve my code without thinking it is efficient <% if current_user.voted_up_on? @post %> <%= link_to "LIKE #{@post.get_upvotes.size}", like_post_pat...

 
9:33 PM
0
Q: Logistic Regression using Pytorch. Is it good enough?

False PromiseI want to get familiar with PyTorch and decided to implement a simple neural network that is essentially a logistic regression classifier to solve the Dogs vs. Cats problem. I move 5000 random examples out of the 25000 in total to the test set, so the train/test split is 80/20. I was able to ac...

 
 
2 hours later…
11:07 PM
If this code works it's off-topic here. You might have better luck on Code Review. — Chris 51 secs ago
 
-1
Q: Big Integer Number Storage (B.I.N.S.) program does not like to multiply Fixed

Caleb EvansI am currently writing a python file for BigIntegers, and I am having a problem: from math import * from numpy import * def new_big_int (inp): slots = int(log10(inp)) slots += 10 - slots%10 big_int = [] for n in range(slots+1): big_int.append(0) i = slots j = 0 ...

0
Q: How could I refactor this python code, and why?

JohnThis is the adder method of my binary calculator. I did not cover for the case that someone passes a non binary number into the calculator yet. I am pretty sure I have covered every other edge case for the calculator. I am trying to learn refactoring and how to look for simpler ways to do thing...

 
TTGTB
 

« first day (1848 days earlier)      last day (2177 days later) »