« first day (2025 days earlier)      last day (2287 days later) » 

00:00
RELOAD! There are 5838 unanswered questions (89.6729% answered)
Well that sucks, How do i need to rephrase my question to not belong to CodeReview??? — Ineffable 58 secs ago
0
Q: Qsort in C++ using vector

Meme myself and a very creepyI tried to make a simple qsort() function in a functional way, it takes a vector and a bool pred() Suggestions as to make it more functional, optimize it, and/or remove extra steps and intermediate variables are appreciated template <typename T> void operator+=(std::vector<T> &v1, const std::ve...

@Ineffable If you're asking for a code review, post on codereview.stackexchange.com. Don't "rephrase". — melpomene 54 secs ago
00:53
Since you have working code and are just trying to improve it, this might be better suited for: codereview.stackexchange.comMark Meyer 10 secs ago
01:08
0
Q: "Pivoting" data with VBA

Michal RosaI've attempted to erite some VBA for this this question. The output is OK but the code is not very elegant. I'm happy-ish with creating unique list of names and certificates, but the rest seems rather ugly. I'd love to learn how to make it more elegant and programmer-like (and less amateur-...

01:48
Welcome to Stack Overflow :) If you already have a working code and you are looking to improve its performance, your question might be better suited for Code Review stackexchange. Take a look at their help pages for more info. Stack Overflow is more for codes that are not yet working, and you'll have provide a specific problem that needs to be solved. — Gino Mempin 14 secs ago
02:01
norm is from from scipy.stats library. aitem is an object of my class. I'll check out the Code Review site if that is the better place for this. thanks — Mow 56 secs ago
0
Q: Remove Value From Linked List if it is equal to a parameter (C++)

Bo WorkProblem: Given a singly linked list of integers l and an integer k, remove all elements from list l that have a value equal to k. My solution works, but I suspect it's not smart and optimized because I have many extra variables to solve this question. I appreciate all help! In Node.h I have: ...

 
1 hour later…
03:09
0
Q: GetProcAddress by Hash Implementation MASM 64bit

WillI have been working on a function called "funcCallFunctionByHash", which accepts a 64bit DJB2 hash of the function name and either the base address or name of the DLL that exports it. A third parameter is used to define which mode the function operates in. The function preserves the four register...

03:40
-1
Q: CodeChef Practice Problem - TRUEDARE

codehackerQn - Why am i getting yes for all the test cases given in the problem? One more thing if t=1 and if I check the test cases it gives the correct answer, why? Please I am not that much efficient in programming. Any help would be appreciated. Link to the problem - https://www.codechef.com/problems/...

 
1 hour later…
05:08
Monking
0
Q: Data scraper Python3

CambrianCatalystThis was my first attempt at scraping approximately 1800 open datasets from the web. On the first go-around it takes approximately 1 hour to complete. Subsequent iterations only take 4 seconds. I'm guessing there are much better ways to implement the logic that I did with regard to filename struc...

05:43
0
Q: Select data between leading and trailing NA values

ricardoI receive data with NA values. I would like to trim off the leading and trailing NA values, but to leave the interior NA values in place. I've written the below in Rcpp, but it is very much a hand rolled solution -- and i'm alive to the fact that i'm going to make mistakes doing things this way...

 
2 hours later…
07:23
possible answer invalidation by Thewizy on question by Thewizy: codereview.stackexchange.com/posts/207569/revisions
08:00
0
Q: Design a Parking Lot

Ejaz AhmedHere is my code for the design of a parking lot in C++. The following assumptions are made. Referred from Geeks for Geeks The parking lot has multiple levels. Each level has multiple rows of spots. The parking lot can park motorcycles, cars, and buses. The parking lot has motorcycle spots, com...

08:45
0
Q: Functional (javascript) way to run a block of code if any of the list conditions are true

Neil SSo say we have a list of strings that are keys of an object, and we want to see if any of these object properties are true, and if so, then execute a block of code. I think it's obvious to use Array.some here, but should we filter the list first? That seems more explicit, but also wasteful. O...

0
Q: Back end validation as front end validation

lewis4uI am trying to use the back end validation for front end validation and this is what I got. Maybe there is a better way to do this? If someone knows please share the knowledge. HTML: <form id="post-store-form" action="posts/store" method="POST"> <div class="form"> <input id="post-ti...

09:00
0
Q: Bulls and Cows C++ beginner project

user185067I'm not a beginner programmer as I have experience in Node and Ruby, but I'm a beginner when it comes to C++. And as C++ is quite different from these two, I figured I could use any tips, tricks, hints and pointers (hah!) to learn how to actually write C++ and to get the most out of the language....

09:23
If your code runs without errors, Code Review may be a better place to ask on. — usr2564301 43 secs ago
Monking
09:52
I think this is more appropriate for codereview.stackexchange.comhellow 38 secs ago
0
Q: Foreach over three or more than in a collection of list

helpcalleri know that i can do two list collection like this foreach(var pair in collection1.Zip(collection2, Tuple.Create)) { Console.WriteLine("{0}, {1}", pair.Item1, pair.Item2); } but How can i do with three or more in c# ?

-1
Q: validate a string if it has degree minute second format

user3736148I would like to have a way to validate a Stirng if it has the format of Degree minut second with a regex any helps

Code Review is the appropriate place to ask for advice on improving the style of a particular program. Software Engineering is a more appropriate place to discuss general design and implementation practices. — Barmar 18 secs ago
bleh
10:16
1
Q: WordPress plugin for listing users

Colin WisemanI was given an opportunity to join a WordPress contractor/freelancer website and was asked to build a plugin that would list the wordpress users in the database, allow you to filter them based on their role, allow you sort them based on the display_name and the username, and have pagination. But...

10:46
0
Q: Vectorize this process to increase performances?

markzzzI've an Audio Host application that sends block of samples to a DLL I'm building. It sends 44100 samples per seconds (i.e. Sample Rate 44100hz), per block, processing 16 distinct Voices. It process an Oscillator, which play a basic sine wave, modulated at Audio Rate by Gain, Pitch and Offset. ...

0
Q: Stack Array implementation of Java

Carchplease review my code about array implementation on stack in Java. It involves push, pop, get and growth when limit of array size is reached. I am a self-taught programmer starting to learn DS and algo. I am looking for 1. any recommendation on conventions 2. an honest opinion on how bad this pie...

10:58
"Is there a besser way to do this?" — Questions about improving working code belong on codereview.stackexchange.com (make sure you take their tour and learn how to write questions in the right format for that site). — Quentin 20 secs ago
11:25
-3
A: Shift elements left by n indices in a list

Ashish Kosarex=int(input("enter size of list")) lst=[] for c in range(x): e=int(input("enter element")) lst.append(e) sw=int(input("enter no. of rotations")) nw=[] while(sw!=0): for no in range(sw): temp=lst.pop() nw.append(temp) nw.reverse() lst=nw+lst nw.clear() pr...

one more Delete-Vote...3 days waiting should be enough
deleted
thanks
11:47
0
Q: Refactoring dumb switch-case statements

vatevrI am struggling to invent a better way of eliminating stupid switch-case statements by adding more knowledge to the code. switch (shapeType) { case "circle": shape = new Circle(colour, Double.valueOf(req.getParameter("radius")), Double...

12:24
well.. a sieve up to 65536 (2^16) should help tremendously (65536^2 = 32b overflow, so you will never need larger dividend to verify prime-ness of 32 bit value). You can also check this codereview question for further tips in x86 assembly: codereview.stackexchange.com/q/148315/110284Ped7g 46 secs ago
This question might better fit to Code Review Stack Exchange. — Pᴇʜ 13 secs ago
13:03
0
Q: Transform a javascript object to an array based on value of each key in the original object

dinika saxenaI have an object of ingredients to be added to a burger. It's structure is as follows: Input ingredients: { salad: 1, cheese: 2, meat: 2, } I want to transform it to an array of JSX elements. Each key in the original object has to be mapped to the number of JSX...

13:45
for comment on how improve your code you should post it on codereview.stackexchange.com. stackoverflow topic is about bug or problems (like yours) — RomainL. 24 secs ago
14:19
-1
Q: PDO prepared statement

515948453225Can i use both bindValue and bindParam on a single query? $nome = 'nome'; $stmt = $db->prepare("SELECT `nome`, `mov`, `gen` FROM table WHERE gen LIKE :gen AND nome = :nome"); $stmt->bindValue(':gen', '%'.$gen.'%', PDO::PARAM_STR); $stmt->bindParam(':nome', $nome, PDO::PARAM_STR); $stmt->ex...

Generally questions like this would probably be better suited for codereview.stackexchange.com but I'll give you a hint: your code passes the views to the controller - the "model" part seems to be missing entirely. — Thomas 7 secs ago
I'm voting to close this question as off-topic because questions asking to review larger parts of "working" code might rather belong to codereview.stackexchange.comGhostCat 58 secs ago
thank you I will move to code review — Stephen Collins 42 secs ago
15:04
0
Q: fetch() with status code checking and re-routing

M3RSIn examples for fetch() I don't see many example for status code checking. (1) I'm expecting to catch 403 unauthorised responses and push the login path to React router to render the login page. Haven't seen this elsewhere, but seems to work alright. (2) Is it alright to nest the second .then t...

0
Q: Java Desktop Application MVC

Stephen CollinsFor my internship I have been developing a desktop app for an engineering team. I believe this is following the model view controller pattern where I keep my UI code dumb and pass all the UI elements from that class to another class which takes care of error handling and UI view changes. Logicall...

If this is working code, and you're just looking to make more efficient, I suggest instead posting over at CodeReviewBruceWayne 16 secs ago
15:25
"or a review of my solution" then this belongs on Code ReviewMichael 5 secs ago
I'm voting to close this question as off-topic because it belongs on Code Review — Michael 44 secs ago
Hello! Can anyone suggest me books on Java which is easier and simpler for beginners as Complete Reference by Herbert Schildt on C? Anyone...
15:57
You can post real code on codereview and ask to improve it — Sinatr 29 secs ago
16:20
0
Q: Using 'else' strategically when not needed

Mike QIs it a bad idea to include else's when not needed to make the logic more clear ? I've done this more with PHP with longer drawn out if/else's but if you look at the following code (bash) you can get the gist of what I'm saying. Again it's not the most useful example since we are really comparin...

16:35
0
Q: Connecting to DB2 using Ruby on Rails

user3437721I need to connect to a IBM db2 table using jruby and ruby on rails. I have managed to do it, but I haven't seen this solution anywhere and I am hoping i can get some feedback on it, or if there is a better approach. I am using the gem: activerecord-jdbc-adapter (1.3.16) I added a jar file to my...

16:50
possible answer invalidation by Mike Q on question by Mike Q: codereview.stackexchange.com/posts/207983/revisions
0
Q: Interval scheduling wrapper for mongoose-os C timers

WooWapDaBugI've written a library for mongoose-os C mgos_timers: https://github.com/cesanta/mongoose-os/blob/master/fw/include/mgos_timers.h I wanted to write a wrapper to take advantage of the full potential of C++ lambdas. The original C timers allow to pass a callback function pointer. /* Timer callb...

0
Q: I am try to use a react component with an class model, is my approach corret?

heapOverflowI'm trying to learn React and, as most other people, I decided to start from the React tutorial where a TicTacToe game is built . I tried to rewrite the example by myself and one thing that I did differently was to separate the model of the Tic-tac-toe game from the React component, a style that...

I'm voting to close this question as off-topic because it looks to belong on CodeReview. — C-Pound Guru 11 secs ago
Monning
@C-PoundGuru Feel free to recommend the OP post on CR but in the future, please don't use the existence of the Code Review site as a reason to close a question. Evaluate the request and use a reason like too broad, primarily opinion-based, etc. Then you can mention to the OP that it can be posted on Code Review if it is on-topic. Please see the section What you should not do in this answer to A guide to Code Review for Stack Overflow usersSᴀᴍ Onᴇᴌᴀ 35 secs ago
 
1 hour later…
18:22
0
Q: How can I make my map-generator more efficient?

Axel SorensenI am semi new to coding and have been following a tutorial on making a "text based RPG" on CodeClub. Here is the full code: #!/bin/python3 # Replace RPG starter project with this code when new instructions are live def showInstructions(): #print a main menu and the commands print(''' RPG ...

18:38
@skiwi hello!
Looks like Nth monitor froze up:

 The Nth Monitor

Conversations that don't quite fit in The 2nd Monitor
yea, that kinda happened...
If you have working code that needs some optimization, it might be better to ask on codereview.stackexchange.com, though be sure to read their topics. — KevinO 5 secs ago
0
Q: Creating a python dataframe by parsing JSON API response

QHarrIn this SO question the OP is unable to scrape a table from a dynamically loaded website. In monitoring the web traffic, via Chrome dev tools, I found that there is an API request made that returns a JSON string with the required info. The following is the answer I wrote to extract the columns ...

-1
Q: SQL Zoo Guest House Gross income by week. How can i show zero values when they are omitted?

Midnight SELECT DATE_ADD(MAKEDATE(2016, 7), INTERVAL WEEK(DATE_ADD(booking.booking_date, INTERVAL booking.nights - 5 DAY), 0) WEEK) AS Thursday, SUM(booking.nights * rate.amount) + SUM(e.amount) as weekly_income FROM booking JOIN rate ON (booking.occupants = rate.occupancy...

19:00
It's 2018. delete[] does not pass code review. We have containers and smart pointers these days. Manual memory management "C++98 style" is not OK these days. — Jesper Juhl 12 secs ago
@Feeds Buggy Rock reminded me of a video of spiders covering signs and other parts of a roadway: softrock989.iheart.com/content/…
0
Q: Trie (dictionary tree) data structure implementation: insertWord, printAllWords, searchPrefix, deleteWord, deleteTrie

TanjaThis Trie implementation works, however, I would like to get an advice on how to improve this code. Any advice is appreciated: functions implementation, memory management, modern C++ usage, const-correctness, code readability, anything else I am missing? Any additional functions that would be u...

@Feeds skeezus use more tags, why don't you...
@Vogel612 hey, do you do haskell?
already on it :)
19:10
@Vogel612 :D
I actually replied in VBA Rubberducking, but didn't ping you :)
@Vogel612 you can totally ping me any time.
nah, I was going finish my private ledger first :)
lol
> There's the "RCU guy" who writes the RCU helper functions, and
hides the proper serializing code into those helpers, so that normal
mortal kernel people don't have to care, and don't even have to *know*
how ignorant they are about the things.
I don't know what it means, but I like the term mortal kernel people
@skiwi RCU = Read Copy Update?
19:22
-1
Q: Implement a system suitable for use in a doctors' surgery in javafx

RiyaI need a code for doctors' surgery which keep record of doctors, patients and appointment in javafx. Below is the link to show which kind of code i need for this program. https://www.youtube.com/watch?v=QmP_XRxXXgM

@skiwi why are you digging through a lkml thread from 2012??
@Vogel612 It was linked from SO question
that makes sense
(I'm not totally crazy yet)
yet being the operative word lol
@Vogel612 any chance you can bring a nuke on that last oneboxed one and force-close?
since it's nothing to do with CR
19:26
This is probably more suited for: codereview.stackexchange.comMark Meyer 50 secs ago
I'm voting to close this question because questions asking for Code Review are off-topic for SO. You might try codereview.stackexchange.com but read their help first to make sure you post an appropriate question. — T.J. Crowder 32 secs ago
~whistles
19:47
Shouldn't this be posted on codereview.stackexchange.com? — ymz 21 secs ago
@Vogel612 Do you think it's possible for someone who doesn't know the language to offer a strong an upvotable code review?
yes, definitely
@Vogel612 thank you for posting a review!!!
that's how I started reviewing haskell, you know?
I may have gone a tiny bit overboard with the "getting fancy" section
obtw: haskell is very type-centric. Make use of that and :t in ghci
20:08
0
Q: python3 user input, one number divisble by another

AlphaCoding2018trying to learn python and practice what i am learning. this is a solution practice i found online: Ask the user for two numbers: one number to check (call it num) and one number to divide by (check). If check divides evenly into num, tell that to the user. If not, print a different appropriate m...

@Feeds I think that's close-vote material since they indicate their code doesn't work as they intend.
@Vogel612 Did you have any thoughts about my IO monad stuff?
nothing much to say about it, but I haven't really written a lot of IO stuff in haskell
@Vogel612 How did you compile/test your code?
20:23
0
Q: Sort ascending/descending functionally

As above so belowI've been trying to get into functional programming with javascript and have tried to make some experiments with currying and function composition. What I've played with so far is a sorter function that sorts object keys either ascending or descending: const data = [ { grade: 4, name: 'Zo...

ghci
do you use stack and/or nix or some other system?
I'm on linux, soo ...
yes
If this is code that works already, you should post on Code Review. — maccettura 44 secs ago
@AaronHall I once wrote a review for code in a language that I had never heard of before.
4
A: Initializing an array of relative coordinates of all adjacent 2D matrix cells

200_success Your solution relies excessively on magic numbers, such as 9 and 3. It also obscures the Cartesian-product aspect of the problem. Therefore, I think it could be better written as: (< (< (< 4))) { ,/ > { ;~i:1 Derivation (i:1) produces the list _1 0 1. { (i:1) ; (i:1) produces the Cartesia...

Received a few suggestions for further improvements in the comments.
20:38
@AaronHall So I took and adapted your main code and the stuff you use to read the data, and ran it through ghc
 ./function < input
YES
NO
20:53
0
Q: Return the first word with the greatest number of repeated letters

user8758206I'm learning javascript and have written a function that accepts a string and returns the first word with the greatest number of repeated letters. For example: Input:"Hello apple pie" - Output:"Hello" Input:"Hello apple pie yelllow" - Output:"yelllow" I've tried to keep it as concise as possibl...

21:09
I'm voting to close this question as off-topic because it belongs on Software Engineering or Code Review. — NetMage 17 secs ago
This sounds more like theoretical stub code than actual code, which means it might not have a place on Code Review. — Thomas Ward 18 secs ago
you probably want to post to codereview. well, if it works... doesn't seem so from comments. — Jean-François Fabre 26 secs ago
21:41
You're of course welcome to do whatever you like, but FWIW whatever your solution ends up being probably wouldn't pass code review by me — Lightness Races in Orbit 24 secs ago
22:24
0
Q: Using a wrapper and a recursive function

Mister TuskI was asked to define a recursive function that takes in a string and returns True if the string is a palindrome, False if not I thought since I must check string for whitespaces that could be the perfect opportunity to use a wrapper to include in my isPalindrome() function. My code: def r...

22:51
was this edit to add and really justified?
its not like the OP is re-implementing a linked-list...
23:04
This question is better asked on codereview.stackexchange.comAndreas 37 secs ago
Your post could get a better reception at Code Review site. — PM 77-1 20 secs ago
0
Q: Graphing using index in python

fr14In the following code I am trying to add an index to my graph so I can label the different two lines, However I am running into the following error, how can I fix it? --------------------------------------------------------------------------- TypeError Traceback (...

0
Q: How to speed up first unique character lookup

Karol DowbeckiI'm solving 387. First Unique Character in a String LeetCode problem defined as: Given a string, find the first non-repeating character in it and return it's index. If it doesn't exist, return -1. Examples: s = "leetcode" return 0. s = "loveleetcode", return 2. Note: You may assu...

23:20
possible answer invalidation by CodeMonkey on question by CodeMonkey: codereview.stackexchange.com/posts/207685/revisions
@Duga rolled back
0
Q: Snake game javascript

Joyal MathewThis is my 3rd javascript canvas game. It's basically just snake right now but I am planning on adding some more aspects to it soon. I was wondering if I could get some feedback especially on how i'm checking if the snake crosses itself in the game function. class Block { constructor(x, y,...


« first day (2025 days earlier)      last day (2287 days later) »