« first day (2169 days earlier)      last day (1830 days later) » 

12:00 AM
If you have working code that you're looking to have peer-reviewed for improvement, your post belongs on Code Review, which was established just for that purpose. If that's not what you're asking, then please edit your post to clearly explain the problem you're having with the code you've posted and ask a specific question related to that code. — Ken White 49 secs ago
RELOAD! There are 5975 unanswered questions (89.8519% answered)
Migrating to Code Review, will close as a solution — QandA J 39 secs ago
 
0
Q: Basic Calculator in MySQL

Frank DoeFor a homework assignment, we were tasked to create a basic calculator in MySQL and store it in a procedure. I believe I did a solid job but am looking to see where I can improve. DELIMITER $$ CREATE PROCEDURE Calculate(IN Num1 INT, IN Num2 INT, IN operation VARCHAR(100)) BEGIN IF operation = "...

 
12:16 AM
@SᴀᴍOnᴇᴌᴀ Possibly related to this bug: Feeds are no longer posted in chat Adam Lear wrote not too long ago that it should be fixed now - but if you notice that something is still not working as expected, please leave a comment there.
In the bug report, I have used Captain Obvious as an example of a feed which was not posting messages into chat for some time. I hope that's ok.
 
0
Q: Python: Combining Two Rows with Pandas read_excel

VirgilioMy first post at code review, hope this goes well. I am reading an Excel file using Pandas and I feel like there has to be a better way to handle the way I create column names. This is something like the excel file I'm reading: 1 2 # '1' is merged in the two cells ab...

 
1:05 AM
1
Q: Extracting attribute value from multiple XML nodes in golang?

Abe MiesslerI'm attempting to parse an SVG file to get all of the colors that are present in the file. SVGs are XML based and their structure can vary a bit. For example: <svg viewBox="-80 -80 160 160"> <g stroke="black" fill="none"> <path d='...' fill='#0FF'/> <path d='...' fill='#F0F'/> .....

0
Q: Over-spinning Flickity JS slider

JulixI got a bit of a strange JS issue that I could use help on if anyone has time… Basically if you flick the slider just the wrong way then it'll spin infinitely rather than just settle on a slide and stop. It's a bit hard to get it to do that. I think it has something to do with spinning past the ...

 
 
2 hours later…
2:43 AM
0
Q: Decorate a python function to work as a Google Cloud Function

Julian ZuckerI wrote this for a class project, the backend for this dog voting website. I noticed duplicate code among multiple functions I was writing to be deployed as a cloud function: they all were wrapped in try/except blocks that returned either 200 and JSON or 500 and a traceback. (I understand that it...

 
3:03 AM
0
Q: “First Python program: Tic-Tac-Toe (Followup)

andrewtwThis is the new code, I am unsure if I made the suggestions the the suggestion intended on my previous post First Python program: Tic-Tac-Toe. I have only been working on programming for about 3 weeks so anymore suggestions or insight on the original post of the suggestions would be more than w...

 
4:02 AM
Monking
 
 
1 hour later…
5:25 AM
More suitable for codereview.stackexchange.com — CinCout 57 secs ago
 
 
2 hours later…
7:39 AM
-1
Q: Database record ask or make a statement

user3755946I have a method that creates a database record... the data to be added is in the constructor. DataBaseRecordCreator DataBaseRecordCreator = new DataBaseRecordCreator("Bob", 35); there is only one method currently called with to following code... if(CreateDatabaseRecord() == "sucess") { Cons...

 
7:50 AM
I wanted to know (1) and thanks for (5). If someone would show me such code in codereview/interview earlier I wouldn't guess the answer myself. So probably I'll stick to (5) too. — Sinatr 39 secs ago
 
8:03 AM
Also, how about posting your code on codereview.stackexchange.com? Make sure it works as intended, provide some background and examples of usage, and you should get some valuable advice specific to your case there. — Georgy 57 secs ago
 
8:37 AM
0
Q: Simple File Manager with recursion in C#

EricSimple class to simpify runtime file loading of ressources. The class reads all files from a given directory including all subdirectories and stores the name together with the path in a simple struct. If a file needs to be used by the program just pass the name to GetPath() and the class returns ...

 
Do you have any problem with your code? If not then this is off-topic and should be posted over on codereviewMindSwipe 41 secs ago
 
8:57 AM
0
Q: Unable to receive SOAP POST request at client side. Getting error Request method 'GET' not supported

RahulGo8uI am creating a Client to consume the SOAP request. The Client is sending request using HTTP POST. Below are two requests that I need to consume: Request 1: <?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:abc="http://pay_t...

 
9:29 AM
this sounds more like a code review question. — Stack Danny 49 secs ago
 
 
1 hour later…
10:55 AM
0
Q: for each vs for

RotaryPhoneWithWildIceCreamBest way to loop through cells : for or for each cls in rng ? Sub for() For i = a To b For j = c To d 'things to cells(i,j) Next j Next i End Sub or sub ForEach() dim cls as variant dim rng as range set rng = myrange for each cls in rng 'Things to cls next cls e...

 
11:13 AM
@CaptainObvious Hypothetical question.
@CaptainObvious Broken Code
 
-1
Q: How to adding login type script

amitI am using PHP 7.2 and MySQLi. I have the login script. I want to improve the code add login type like 'Admin,' super', 'user' and make a type best session in an index page. I have to get two error first session only working index page. no work any other page and last I want to log in by type. pl...

 
11:24 AM
VTC on the first 3 questions I look at is not a great way to start the day.
 
11:53 AM
0
Q: One Dimensional Japanese Puzzle

dhruvkapur_170 So I have been practicing competitive coding for a while now and am using codeforces.com for the same. I recently encountered a problem called "One Dimensional Japanese Crossward" on that site ( https://codeforces.com/problemset/problem/721/A ). After lots of tries and lots of fails, I was fin...

 
 
1 hour later…
1:12 PM
0
Q: Leftmost bisect search to find valid perfect square

JawSawI am working on Valid Perfect Square - LeetCode and wrote a standard leftmost bisect search to solve the problem class Solution: def isPerfectSquare(self, num: int) -> bool: #base case 1 if num == 1: return True lo = 1 hi = num #recur case w...

 
1:39 PM
Thanks for the effort but I don't think this is going to pass the code review :D. — Shababb Karim 44 secs ago
 
1:51 PM
0
Q: Remove nested for loops in python

Confusion MatrixI have the following working code, but it is too slow because I have to run the same code for several files inside a folder. Please help me avoid the nested for loop or make it more efficient. def create_nodes(self): for child in self.tree.getroot(): columnNames = child.attrib ...

 
If the code is working then is more suitable for codereview.stackexchange.comNetwave 45 secs ago
I'm voting to close this question as off-topic because questions about working code belong on the CodeReview Stack Exchange. — ShadowRanger 39 secs ago
If this is functional code, and you just want to improve it, you'll probably have better luck on Code ReviewMistella 51 secs ago
 
2:30 PM
0
Q: Faster way to 3 nested for loop python

A14How can i make this function faster? I am calculating parameters for timeseries & the data size is very big def param(data_param): w = [] x = [] y = [] z = [] p = d = q = range(0, 2) # Define the p, d and q parameters to take any value between 0 and 2 pdq = list(itertools...

 
2:45 PM
possible answer invalidation by Julix on question by Julix: codereview.stackexchange.com/posts/217298/revisions
 
0
Q: Requests / Facebook API - Dealing with Errors

Matt MI work in marketing and I am currently trying to aggregate data for 50 facebook pages on the same Business Page. I have a loop that tries a series of requests to grab all data. I am not sure I am handling exceptions in the best way possible, so I was wondering if somebody had any idea on how to ...

 
3:09 PM
@Duga The edit made it on-topic, answer should have been a comment anyway
 
3:20 PM
possible answer invalidation by Graipher on question by Julix: codereview.stackexchange.com/posts/217298/revisions
 
@Duga I think its fine (but then again, I would say that, I guess) I added the HTML/CSS from the posted codepen link and made it into a snippet.
 
3:39 PM
If the code works then suggestions for improvement belong on CodeReview.SE — Paulie_D 35 secs ago
I'm voting to close this question as off-topic because if the code works then suggestions for improvement belong on CodeReview.SE — Paulie_D 50 secs ago
 
What happened to the 1st monitor?
 
posted on April 12, 2019 by CommitStrip

 
We want justice?
 
3:54 PM
@J.Doe reserved for moderators, sorry :)
 
@Paulie_D 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ᴇᴌᴀ 21 secs ago
BTW this post would not really be on-topic for CR because it looks like a snippet and it would really help reviewers to see the entirety of the code — Sᴀᴍ Onᴇᴌᴀ 9 secs ago
I'm sorry, I wasn't aware that there was a Code Review site. — Alberto Burrito 52 secs ago
 
4:11 PM
@CommitStrip I'm reminded of something I read a few years ago...nonetheless while looking at funny stuff on my phone
> Q: If someone from the 1950s suddenly appeared today, what would be the most difficult thing to explain to them about life today?
> A: I possess a device, in my pocket, that is capable of accessing the entirety of information known to man.

I use it to look at pictures of cats and get in arguments with strangers.
 
This seems more suited for: codereview.stackexchange.comDroidX86 5 secs ago
@DroidX86 this doesn't seem on-topic for CR, because it doesn't look like there is code working as expected... See "Which Site?" and "Code Review or not?"Sᴀᴍ Onᴇᴌᴀ 15 secs ago
 
@Duga (-‸ლ)
@SimonForsberg - is there a typo in your meta answer here - in the last paragraph: "A hit, description, alternative algorithm can be suggested" - was the intention: "A hint, description..."?
 
4:32 PM
aight.. done torturing my laptop for today
 
Monkng
 
yay - today is Friday!
 
Friday is the best working day!
 
possible answer invalidation by Mattthecommie on question by Mattthecommie: codereview.stackexchange.com/posts/217164/revisions
 
4:48 PM
0
Q: Parsing whitespace, trailing and leading, from a string in C

Server FaultI'm trying to extract the key value in C from a string in a config file which may have arbitrary whitespace leading and trailing the string. This is what I've come up with so far. It's not quite right yet. It's been quite some time since I've picked up C and have been spoiled by baked-in string ...

 
@Duga uhh... rolling back... OP removed code...
 
5:14 PM
This question should be posted in codereview.stackexchange.com since is about organization more than a technical problem — rekiem87 23 secs ago
 
5:27 PM
@rekiem87 this post would currently not be on-topic for CR in its current form, because it doesn't contain any code. I'm not sure where exactly is the best place for a question like this but perhaps one could discern after reading "Which Site?"... — Sᴀᴍ Onᴇᴌᴀ just now
 
2
Q: Generic Macro Generated Hashset in C

LeoVenThe Hashset uses open addressing, linear probing and Robin Hood hashing for handling collisions. It comes with insert and remove operations, iteration (back and forward using a single iterator), min and max keys (this is to interface with a treeset that I've made, but not very useful) and set ope...

0
Q: Count the number of words in a list of titles, and working with data-types

Jesper MølgaardI have a list of article titles, where i wish to count the number of occurrences for each word. (and remove some words and characters) The input is in a .csv file where the titles are in column 'Titles' I already have a code that does the job(pasted below), but maybe someone could help me do it ...

 
6:04 PM
 
@RMunroe lol
 
possible answer invalidation by 200_success on question by dhruvkapur_17: codereview.stackexchange.com/posts/217318/revisions
possible answer invalidation by Julix on question by Julix: codereview.stackexchange.com/posts/217298/revisions
 
6:22 PM
@Duga its okay - just sample input/output formatted
 
-1
Q: Saving username and password into sqldb from button click

BradleighJLdoes anybody know how I would set click listener for button 5 to save username and password into my SQL DB so it can be retrieved in another activity? public class Registering extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedIn...

0
Q: Reduction of time to exceute code

John PattrickI have created the code below that compare two spreadsheets . It initially compares the range of value from sheet1 ("Status") to sheet2 ("Interface") . Whenever a range matches with the ranges present in other sheet , it does nothing .When the range does not any matches in the other sheet , then ...

 
6:46 PM
0
Q: Polymorphic DBConnector class exercise

WebbarrI'm in the process of doing a training course in C#. I've just gone over covering Polymorphic OOP / composition over inheritance etc... The latest exercise I completed in the course was to create two base classes, DBConnector & DBCommand that can be used for any database. The verbatim requiremen...

0
Q: Extract Common Data From List of Objects

JamesI have a list of orders and for some order fields I need get the data that is common among the orders. If the data is not in common, I should indicate null. I collect the common data in a CommonData object. In addition, I also store the order codes and order ids associated with the CommonData. ...

 
7:05 PM
0
Q: Trying to speed up doing a regex_search function with X strings on Y files

ace1ericThe point of this project is to be able to create an excel configuration file where the user can input search strings and search files, both potentially having wildcards, and search those files for those strings. The problem is that while I have working code, it just simply takes the program to...

0
Q: Implement integer exponentiation faster than repeated multiplication

thadeuszlayThe task: Implement integer exponentiation. That is, implement the pow(x, y) function, where x and y are integers and returns x^y. Do this faster than the naive method of repeated multiplication. For example, pow(2, 10) should return 1024. Solution 1 function pow(x, y) { if (...

 
7:25 PM
1
Q: Sliding marker on link hover with jQuery

Alberto BurritoThe following code is for a vertical menu, where I needed a marker to slide down next to a link upon hovering over said link. Therefore I needed to change css properties of a html element (the top-margin in this case). What I've done in jQuery is add a class ('.movedown1' or '.movedown2') to the...

 
7:44 PM
0
Q: Analyzing patient treatment data using Pandas

KubiK888I work in the population health industry and get contracts from commercial companies to conduct research on their products. This is the general code to identify target patient groups from a provincial datasets, including DAD (hospital discharge), PC (physician claims), NACRS (emergency room visit...

 
8:24 PM
0
Q: ASP.Identity - Use As-Is or Reorganize the code?

IndyCodeNoobI am still fairly new to coding and learned about the basics of ASP.NET Identity. I have used ASP.NET Identity in past personal projects for User Authentication (Individual User Accounts) and Login. As I learn more about how an application should be structured and other coding guidelines, I que...

0
Q: Probability based logic writing

Ashok DamaniIn a bucket, there are total 100 balls, in which 10 are red, 40 are green and remaining 50 are black. Every ball has a numeric unique tag starting from 1 to 100, like red balls have tag 1 to 10 than green balls have their tags from 11 to 50 and rest black tags are from 51 to 100. Now If I take a...

 
8:43 PM
Consider checking Code Review for optimized palindrome algorithms and asking there if you can't find one. — user4581301 54 secs ago
 
-2
Q: "Import org.apache.oro cannot be resolved" when trying to list files via FTP

JeremiahDixonJava noob trying my hand at basic FTP. Trying to turn an Apache Commons Net FTP tutorial into a functioning program where users enter server, user, pass and can modify/add/view/delete files. However, whenever I get to the "list files" command I receive an unusual error. The error is: Exception ...

 
9:20 PM
If this code is working and you are looking for suggestions to improve it. Please post it on Code Review. SO is more for helping you troubleshoot errors in your code. — Zack E 17 secs ago
 
9:50 PM
I'm voting to close this question as Too broad for this site. It has been posted on Code review already. — Sᴀᴍ Onᴇᴌᴀ 47 secs ago
 
10:03 PM
Also if you have a working solution, and you are asking how to make it better, this is off topic for StackOverflow, and would be on topic for CodeReview as you are not asking about an error, but asking about refactoring. — Taplar 34 secs ago
 
10:22 PM
0
Q: Sort list of Array Linked Object by keys and values

Shivam BhallaLets say I have this data: let trips = [ { from: "DEN", to: "JFK" }, { from: "SEA", to: "DEN" }, { from: 'JFK', to: 'SEA' }, ]; and my origin is 'JFK', I want to sort the list by how I have traveled. So for instance, this should be the end result: let trips...

0
Q: How can this code which turns hourly data for columns of data into daily be improved?

Josh AltonIve got some code which converts data from hours to days. I am wondering if there are any improvements which could be made to make it more efficient or any other improvements in general that could be made? other information:for t = Int((n - 1) / 24) + 1, the n is the amount of rows of data. u is ...

 
11:22 PM
It was worth a try. You might want to dig through Code Review to see if anyone's asked about and gotten a more elegant solution that'll compile for C++11. — user4581301 1 min ago
 
11:42 PM
0
Q: Python - Fishing Simulator

MattthecommieI'm new to Python, for a school project I created a "fishing simulator". Basically, use of random. I know that my code is repetitive towards the end but I don't know how to simplify it. import time import random fishing = True a = b = c = d = e = 0 #define multiple variables as same thing print ...

 
11:55 PM
Automation is king. We do code reviews, and they do creep in depending on who signs off on the approvals - I've never been on a team were it's 100% of all reviewers required to merge, so it's usually "2 accepts / no declines". Automating the check will also help flush out the ones that slipped though and are already in the codebase too. — antonyh 42 secs ago
 

« first day (2169 days earlier)      last day (1830 days later) »