« first day (1921 days earlier)      last day (2097 days later) » 

12:00 AM
RELOAD! There are 5477 unanswered questions (89.9545% answered)
 
0
Q: Register inputs (click) - write the inputs

DiDiThis app register where you click on the screen, then it writes the inputs on the page. The text is responsive, you can change the dimension or orientation of the webpage and it still will be in the middle with the right size to fill the entire page. With a double click the program will restart. ...

 
12:40 AM
0
Q: How to refactor identical callback function inside promisify function

Xinyang LiI have two almost identical callback functions confirmRegistrationCallbackFunc and getSessionCallbackFunc inside two promisify functions what is the best way to refactor them? const confirmRegistration = (username, code) => { userInstance = new CognitoUser({ Username: username, Pool: u...

 
12:55 AM
0
Q: Signal output on Raspberry Pi that acts as input for FPGA

heatherProblem I'm writing a verilog program that does the trapezoidal integration method (where a review is also welcome, wink wink). But turns out you need input for these kind of things, so in the overly complicated setup I'm doing, I'm writing a python program on a Raspberry Pi to output inputs for...

 
1:11 AM
0
Q: Suggestions on further optimizing this Python code?

CrypticlightNeed help with optimizing my Python code. I've a bunch of orders and each order has several SKUs. This is what my data looks like: ORD_KEY ORD_DT_KEY ORD_TM_KEY QTY SKU_KEY 10001 1 0 1 1 10001 1 0 1 2 10001 1 0 1 3...

 
1:42 AM
If your code is already working, and you just want some pointers on how you might refactor it, then consider migrating your question to our sister site, Code Review Stack Exchange. — Tim Biegeleisen 11 secs ago
I'm voting to close this question as off-topic because it's about general optimization of working code rather than specific issue. Try Code Review. — ivan_pozdeev 23 secs ago
 
 
1 hour later…
2:44 AM
0
Q: How to add 14 based numbers in instance method?

Quinup vote 0 down vote favorite So I'm having trouble with creating an instance method to add two 14-based number and I was wondering if anyone could help? I'm a bit new to java and still sort of confused on the whole thing. So far I have the code to convert the 14-based numbers to base 10 then I ne...

 
 
2 hours later…
4:18 AM
Monking
 
Monking
 
5:13 AM
Monking
 
Tim Post on August 07, 2018

Thanks to some amazing efforts and collaboration between our veteran users and quite a few new faces that jumped in to help us with our inclusion efforts, our brand new Code of Conduct (CoC) is rolling off the press and going into effect across the network today. For those of you that haven’t been following along with announcements we’ve been making on our Meta site, we’re replacing our current ‘Be nice’ policy with a formal, far less ambiguous and way more informative Code of Conduct.

As far as our rules go, nothing really changes: we’re just clarifying that we don’t have space for belittling  …

 
Is this just a request for code review or is the meaning of "... to make the code work." that there is something not working as expected and/or you are getting an error? — U880D 1 min ago
 
@Feeds The link to the conduct is broken.
:D
 
5:31 AM
Seriously...
There's multiple links to it even and they're all broken.
That's a serious screw up and they weren't doing so great to begin with...
 
0
Q: Spearman correlations between Numpy array and every Pandas DataFrame row

r.prilepskiyI want to efficiently calculate Spearman correlations between a Numpy array and every Pandas DataFrame row. Here is my implementation: import pandas as pd import numpy as np from scipy.stats import spearmanr n_rows = 2500 cols = ['a', 'b', 'c', 'd', 'e', 'f', 'g'] df = pd.DataFrame(np.random.r...

 
@Mast Well, now they have a bug report. Funny enough, if that question does not follow the CoC, how would I know? Nothing to read, nothing to break, aye?
Nah, I'm kidding.
 
Now they have 2.
One on MSE and one on MSO.
This is going to get them a lot of bug reports.
 
Two on MSE.
Magisch posted just 30 seconds after I did.
 
@Zeta Left a comment to yours, at least now all MSO posts can be closed as dupe on mine and all MSE posts as closed as dupe to yours. With mine linking to yours, yours should result to be the main thread.
But, you know, odd things happen all the time.
Looks like the rest of the network hasn't woken up yet.
 
5:54 AM
Well, it's between 22:54 and 01:54 in the US.
Oh, there's also Alaska and Hawaii, so I have no idea on that lower bound, to be honest.
 
6:13 AM
@ruakh You're right :-) ... but maybe this belongs on Code Review since it's already running... — Tim Biegeleisen 14 secs ago
@TimBiegeleisen With a correctness of 20%, it absolutely does not belong on Code Review. The speed is irrelevant as long as it simply doesn't work. — Mast 49 secs ago
 
6:37 AM
0
Q: TypeError: 'int' object is not callable

reegoI have number triangle number = '''3 7 4 2 4 6 8 5 9 3''' I have to find the maximum total from top to bottom. pyramidlist = [[int(x) for x in y.split(' ')] for y in number.split('\n')] for i in range(len(pyramidlist) - 2, -1, -1): for j in range(i+1): pyramidlist[i][j] += max(p...

 
7:05 AM
I can't VLQ an answer that's at -7, NAA is the only somewhat plausible alternative.
That's nuts.
 
0
Q: Find number of output of (s[i] * s[i+1]) is less than or equals a

Gokul Nath KPI've to compute below equation and check if (s[i] * s[i+1]) is less than or equals to a. Equation: s[i] = (k * s[i - 1] + b) % m + 1 + s[i - 1]; Inputs (all values must be greater than 1): n = 6400; s0 = 144004; k = 734447009; b = 641444128; m = 156250; a = 133569786650168926; My Function:...

 
7:23 AM
Hm. Apparently, my top tag on MSE is . I still have to wait ~240 days to improve it :(
Speaking of…
Meh, that CoC is just a late April 1 joke. — Patrick Hofman 1 min ago
 
0
Q: Semaphore skipping additional threads

Christof AenderlIn this example I've a refresh method that might be called by multiple threads. Requirements are: refresh() method must be processed by only one thread at a time (blocking) If already a thread is waiting, skip any new thread tries to acquire the lock to avoid processing multiple times The re...

 
I completely missed the CoC discussion, but apparently it was mostly "meh"?
 
@Zeta It's a whole dump of miscommunication squared.
And a whole lot of people disagreeing for a whole range of (not necessarily relevant but nevertheless solid) reasons.
At the end, we simply don't know.
They write one thing in the CoC and explain it differently on meta. So nobody really knows whether the CoC will have any effect at all, for better or worse.
Basically SO has been having some issues lately and they try to fix it. Try to prevent it getting worse. But the CoC is probably not even going to make a dent in it. Perhaps it's simply going to be a staging platform for their next step(s), I don't know.
Long story short: "Be Nice" doesn't cut it anymore and they're trying to figure out what will. But the result is a whole lot of "meh", yes.
 
"Issues lately"? Depending on the language community, SO was always in a semi-dumpster fire state.
2
 
It's been getting worse.
 
7:30 AM
Like nuclear dumpster fire?
 
Nuclear cluster bomb fire.
 
Ah. Big bada boom.
Ouch.
 
They're worried the toxicity spreads to sister sites, effectively killing the network.
Which is a proper concern.
But the CoC in current form won't fix that.
Just the language alone of the CoC, it's too much proza.
Trying to be diplomatic.
The strength of 'Be Nice' is it's simplicity.
Phrases like "We don’t tolerate any language likely to offend or alienate" might kill the network faster than toxicity kills SO.
It's too broad and too easy to abuse.
 
@Mast How dare you! The word "abuse" triggers me. Mods? MODS?!
 
Exactly.
We used to have a problem about Brainfuck questions. With the new CoC, I imagine such discussions getting more frequent and less constructive.
Now everyone can have a problem with anything.
 
7:37 AM
Because the language contains a bad word? *sigh*
 
@Zeta Crap hit the fan when one of my Brainfuck questions hit HNQ.
CMs got involved and all.
And that was what, 2 years ago? Imagine the same problem now. People get livid about nothing at all nowadays...
 
I guess sponsors don't want to be affiliated with the word "fuck". Sponsors bring money. Money drives StackExchange.
 
Perhaps. There'll always be a money vs community problem.
 
Every programmer in their life will—at some point–come across code that's absolute gibberish. And they will have to debug it. But it doesn't contain a small chain of bugs, no, sir. An avalanche, a force of dark bytes, unleashing their data races and undefined behaviors, resource contentions and NullPointerExceptions.

At that point, every programmer learns that an expletive phrase is part of debugging.
(Also, that gibberish is often old code the poor fellow wrote two months earlier)
Either way, how's the financial situation of SE?
 
I'm voting to close this question as off-topic because it is more suitable for codereview.stackexchange.comReniuz 20 secs ago
 
7:46 AM
@Zeta Last I heard they didn't have a stable commercial model. But stable models are conventional and SE is hardly conventional. So it might not matter.
 
@Reniuz Unfortunately not. According to OP, the PHP side of the deal doesn't work: "When cyphered textsize growth C# side can decrypt data but PHP side not". Broken code is off-topic on Code Review. For more information, see codereview.meta.stackexchange.com/questions/5777/…Zeta 59 secs ago
 
As long as Ads, Teams and Jobs produce enough money, there won't be much of a problem I guess.
They still give away money each year to charity, a hundred bucks per mod IIRC.
 
 
2 hours later…
9:50 AM
possible answer invalidation by Mat on question by Ramakrishna: codereview.stackexchange.com/posts/201064/revisions
 
-1
Q: Match finger print with MS access database

Anurag Mitra I am using MFS100 for fingerscan with MANTRA.MFS100.dll file. I can scan the the finger and save it to the database as byte code but while i want to match the fingure it could not match. Please help me to work with this. The code for Upload id- ` MFS100 mfs100 = null; int ...

 
You should always work with secured queries, this can't be ignored as you could just forget to prepare before sending to production server. Apart from this, your code is okay but should be posted on Code Review I think — AymDev 11 secs ago
 
10:32 AM
@Duga Nah.
 
Monking
 
@CaptainObvious Closed.
Monking @Vogel
 
I see you have already seen the CoC blog post.
I've seen a few thousands of messages about it now and the end result is pretty okay I think
the first public version was a bit of a dumpster-fire
 
This would be better suited on codereview.stackexchange.comArcher 33 secs ago
 
@Zeta I'm sooo tempted to just flag that
 
10:37 AM
What's it with Germans and dumpster fires today?
3 hours ago, by Zeta
"Issues lately"? Depending on the language community, SO was always in a semi-dumpster fire state.
 
@Mast I took a leaf out of zeta's book
 
@Vogel612 I hope so, us mere mortals can't read it ^^
 
I'm referring to the latest public version (R7-2)
 
Ah
That one.
 
0
Q: Poor performance of this combination algorithm?

ischnmnI'm working on this kata from Codewars. The task is: Given a certain number, how many multiples of three could you obtain with its digits? Supose that you have the number 362. The numbers that can be generated from it are: 362 ----> 3, 6, 2, 36, 63, 62, 26, 32, 23, 236, 263, 326, 36...

 
10:58 AM
Monking
 
11:18 AM
0
Q: Enforcing numeric inputs and sanitizing different formats for IE11 input fields

HamattiI'm working on a web form that functions with numeric inputs. I have <input type="number"> input fields and with Chrome and Firefox things work nicely since they only allow numeric data to be filled in. However, I need to support IE11 and it does not enforce the number type when inputting data (...

0
Q: Encoding normailization of emails

dimidI'm a reading a text file which contains lots of emails (in the mbox format). Each email has a charset defined in the header by the mail client. However, there is a large variation in the names of the charsets. E.g. while most mail clients use the standard "UTF-8" or "Windows-1252", some use "UTF...

 
11:52 AM
@baptistemm thanks for your feedback - posted my question there. — r.prilepskiy 32 secs ago
how web interface is possible for window application? we have a .exe file to run the program and C# files where code review is require. — Arjun 13 secs ago
 
0
Q: Executing arbitrary SQL statements using VBA in Excel

neelsgI built a workbook to help me extract data from a MSSQL database into Excel. I realize that this is fairly easy to do with Microsoft SQL Server Management Studio, but I can't easily get that installed on my machine at work, so I first have to remote to the server every time to get any data, which...

 
12:12 PM
Welcome to Stack Overflow! If you believe that the code works correctly, consider presenting your work (with its unit tests) in a more-complete fashion over at Code Review. You'll likely get some suggestions on making it more efficient, easier to read, and better tested. Before you do that, make sure to read A guide to Code Review for Stack Overflow users first, as some things are done differently over there - e.g. question titles should simply say what the code does, as the question is always, "How can I improve this?". — Toby Speight 45 secs ago
 
0
Q: Augmented training batch generation using `tensorflow.data`

geometrikalThis is my code for generating augmented training batches in Tensorflow # x_image is the input image tensor # y_true is the input onehot tensor # The input tensors to the batch generator. # These will be fed with the entire training set images_tensor = tf.placeholder(tf.float32, shape=self.x_i...

 
1:08 PM
-1
Q: Ladder Problem using Dynamic Programming (Bottom-up Approach) in O(n)

vibhanshu kumar In the given problem we have to find the no. of ways in which we can reach the top of ladder from the bottom, where n = total number of steps in ladder. k = maximum numbers of steps that can be taken at a time. I tried solving it in O(n) using bottom up approach ,but recurrence relation...

0
Q: PHP OOP registration with User class and singleton Database class

biciI created registration system with PHP. I have User class that will handle all the input and insert the user input into database, and i created Database class with Singleton pattern that will connect to database. After user submited his data, new User object is created. This is my Database clas...

0
Q: performance test the code for finding time taken to fill the disk space

Ciasto piekarzI have written this module that takes input of configuration of multiple lines with first item as available storage and remaining are the process at different rate using sys.stdin . #! /usr/bin/python """ this script calculates the time remaining for available storage to get filled up. """ imp...

 
"readable" is a somewhat subject term. Questions about improving working code generally belong on codereview.stackexchange.com and not here. — Quentin 42 secs ago
@Eran Additionally OP have a lot of CONSTANTS MainPage, SelectListField which may be adding significant delay. Perhaps this question doesn't fits into stackoverflow but in Code ReviewDebanjanB 22 secs ago
 
1:23 PM
0
Q: isValid Function to check some conditions

eramit2010This is what my isValid function does. condition1 and condition2 are false i need to return true condition1 is true then value1 should have value "a" condition2 is true then value1 should have value "b" Please review and suggest any improvement for making it more readable. const isValid = ...

 
@Vogel612 The blog post is gone.
That's definitely one way to get rid of the broken link :D
 
yeap
 
Any word on the other side of the fence? Premature blog post publish date?
TTQW. gniknoM!
 
1:54 PM
0
Q: Is this boolean combinator the most readable representation of this code?

danbroooksIs there a nicer way to write the maybeWhen portion of displayConnectionAction ? I want to conditionally display an Action depending on whether or not the player is connected. This bit of code is lifted from a wider system where there are multiple calls like displayConnectionAction (conditional...

0
Q: AWS Cognito Passwordless Authentication Flow

Xinyang LiHere is my own implementation of passwordless authentication flow using AWS Cognito. I think the part can be improved is the nested try-catch statement, but I am not sure where to start at the moment. export const doInitAuth = async email => { window.localStorage.clear(); window.localStorage...

 
Hmm, I have a recruiter that is recruiting for a company that is working on virtual, augmented and mixed reality, as well as deep learning, internet of things and blockchain
Seems a bit much to me haha
 
MOAR BUZZWORDS
 
2:10 PM
@skiwi Virtual deep learning IoT blockchain? Sheez.
That's the stuff of nightmares.
@Zeta Well, that's interesting.
The comment threads are getting interesting too.
> There was an error scheduling the blog post. Somehow (we're looking into it), the time zone that the post scheduler used was flipped, so what was supposed to go out at 1PM EDT actually went out much sooner.
Would you look at that, it's a timezone problem.
 
2:29 PM
Very hard to tell without knowing what your real function's purpose, and likely opinion-based on this site. However, if you can share the real code, Code Review can probably help. — Mathieu Guindon 37 secs ago
That works for most cases where the UDF does its own thing, but falls apart when the optional parameters are then passed as optional arguments to another function, as seems to be the case for the OP. IMO that question would be a better fit on Code Review... if it included the real, actual, complete code. — Mathieu Guindon 39 secs ago
 
3:07 PM
Greetings, Programs.
 
@202_accepted I have corrected the overflow detection. In the majority case (less than 11/10 characters) there are no additional ops. Otherwise, for a number close to the limit, it takes 2 additional ops, plus 2 ops per significant digit that matches the limit. (worst case 20 additional ops to parse max/min value) — Alain 52 secs ago
Can someone roll that back? ^^^
@Heslacher has an answer that mentions it.
 
possible answer invalidation by Alain on question by Alain: codereview.stackexchange.com/posts/200935/revisions
 
@202_accepted I wouldn't mind let it stay because thats the c++ part of it.
 
3:25 PM
> Vendor: "The value for that field should be '1.0'."
> Me: "Ok, here's a test file."
> Vendor: "It's wrong, and I can't see why."
> Me: "Do you have a sample file I can use?"
> Vendor: "Yeah, right here."
> Me: "The value here is '1', not '1.0', is that important?"
> Vendor: "Yeah."
 
-2
Q: Using Macro Recorder to Generate VBA Code

Englishman BobMost Microsoft office tools come with a macro recorder (the function records several operations -- you can play it back and avoid repetitious tasks). The Visual Basic Suite can convert this code. Unfortunately I have forgotten how to do this. Does anyone remember how this is done?

 
3:44 PM
0
Q: Divide set into two subsets of equal sum and maximum this sum

RimliOriginal question: https://math.stackexchange.com/questions/2625527/divide-set-into-two-subsets-of-equal-sum-and-maximum-this-sum?newreg=0b1a85f8c6fe422e8c8e7b8c51f27e65 You are given a list S of positive integers. You are to create two sub-lists S1 and S2 taking elements from S, such that sum ...

 
4:31 PM
0
Q: How to get the user Input in Pandas for a particular column from the dataframe python3

newTOcodeI'm using PANDAS Dataframe to get the data from CSV file and opting to choose the desired column data which is working fine. However, in the hostData Dataframe i'm looking specially for (data['Safe']=='KDS-PDC-DEFAULT-UNIX-ROOT') portion so, as i have multiple safes as i mentioned below the Cyber...

 
5:04 PM
@CaptainObvious That code is missing imports.
 
5:18 PM
CoC is now live
network-wide, that is. so codereview.stackexchange.com/conduct also works
 
5:29 PM
> Avoid sarcasm
 
oh crap did you see my latest twitter message or why does that come up?
 
Yes, because I follow each and everyone of you in your social media life. /s
2
Wait. I should avoid sarcasm.
No, I just thought "that's going to be tough".
 
I shouldn't say what I wanna say about that, so I won't, but...
 
Would what you wanna say that you shouldn't say include sarcasm?
 
I don't intend to change how I moderate in light of the new CoC
 
5:42 PM
> Be kind and friendly.
> Avoid sarcasm and be careful with jokes — tone is hard to decipher online. If a situation makes it hard to be friendly, stop participating and move on.
I'm about as friendly as a porcupine.
3
 
@202_accepted Cute.
 
This new CoC is going to be hard...
 
I'm not sure about that.
 
> No name-calling or personal attacks.
> Focus on the content, not the person. This includes terms that feel personal even when they're applied to content (e.g. “lazy”).
I don't know that "lazy" was a good example there, because there are a lot of constructs that are literally called "Lazy", such as "lazy loading."
 
"Non eager loading".
"Non strict value evaluation".
But I get what you mean.
 
5:47 PM
@202_accepted this is about stuff like "Your question is lazy, google this"
it's not anything that happens on CR, because we serve a different audience, but on SO that's a common-place low-key insult
 
It's still a big difference if I call Haskell a lazy language (it is), or if I call user "I NEEDZ THE CODEZ" lazy, because they didn't bother to Google and couldn't tell the programming language or the animal apart.
 
ya, that's exactly what it boils down to
 
@Vogel612 I've literally never seen lazy used in that context on SO. Doesn't mean it isn't, I just didn't think that one was a big deal.
The LMGTFY stuff though...
 
SO also has a huge problem with askers not actually being able to do basic debugging
so there's that
 
What. Is. That. Flag.
 
5:51 PM
Bizarre.
@Vogel612 Dunno, I don't really read a lot of the trash on SO, I ignore it. Maybe I'm nose-deaf?
 
When I do go into the close queues on SO, I see stuff like that a lot
especially on "too broad" questions
 
Well, SO occasionally contains questions that are not only utterly broken, but also immediately tell any advanced or intermediate programmer that the questioner should either read a proper book and learn the language or get a mentor.
 
@Zeta Some of that stems from a huge cultural shift, especially in the U.S., over the last 40 years.
We've become a population with access to this "wonderful" resource called "The Internet", which allows us to instantly gain knowledge or satisfaction for what we are doing. I.e., "Instant Gratification."
Which means, we have become a society where "learning" is less important, and we can just ask someone for the answer.
 
Wait a second... I've got something for that...
 
Basically.
 
6:05 PM
0
Q: Minimum Steps to One to find minimum operations to transform n to 1 in python

NinjaGI was solving this dynamic programming problem, and I was wondering if I can get any code review and feedback. You can find this problem online; # Coding Problem: Minimum Steps to One # # Prompt: Given a positive integer, you can perform any combination of these 3 steps: # 1.) ...

 
6:52 PM
0
Q: Drawing an ASCII grid in Ruby based on a 2D array

Mikey T.K.I'm writing a function that renders a grid using ASCII line-drawing characters, based on a provided 2D array (or array of arrays), with each top-level array representing a row, and the items inside those arrays as columns. The function works, but it is absurdly ugly and hard to read. I want to r...

 
take a look at this solution for some nice replace code using a dictionary codereview.stackexchange.com/a/120209/155816Marcucciboy2 17 secs ago
 
@202_accepted Imagine what that would be like with implant technology.
 
@Zeta It's real..
 
7:20 PM
is your loop slow? We don't really do code review here, not that you've posted any. There is another StackExchange site for that and you could check there to see if your question is suitable for it. If you have an actual real-life performance issue you'd like help with, then please provide code and details so we can look into it. In general terms, a loop sounds reasonable to work on an array. Maybe there's some PHP array functions you could potentially make use of to shorten your code, but chances are they probably just use loops internally anyway. — ADyson 46 secs ago
If your code is working and you just need to improve it, your question might be better of over at Code Review. — uom-pgregorio 33 secs ago
 
7:41 PM
 
lol
 
Sorry, but StackOverflow is only for specific programming questions. We do not do code review or testing. You should test your program yourself, spend some time researching any bugs you find, and then come back with specific questions that you were unable to solve on your own. Please read How to Ask to learn how to ask an effective question. Good Luck! — divibisan 39 secs ago
Welcome to SO. This type of question might be a better fit for codereview.stackexchange.com. — LarsH 18 secs ago
 
8:11 PM
0
Q: Sudoku-lite Problem - Looking for feedback re functions / naming / etc

learnAsWeGoYou can find the problem here: https://stackoverflow.com/questions/51716129/excel-formula-vba-to-keep-a-value-and-edit-cells-to-maintain-that-value/51717706#51717706 The example: Column A, B, and C are each 3 and together equal 9: | A | B | C |...| Total | +----+-----+----+...+-------+ | ...

 
8:48 PM
@Donald.McLean That's my least-favourite post-apocalypse scenario.
 
9:15 PM
I'm voting to close this question as off-topic because I feel that it would be better suited for the Code Review site. — stdunbar 10 secs ago
 
0
Q: Google Foobar level 3

Moe007So over the past few weeks, I've been doing the Google foobar challenges and I've been progressing quite well. I'm currently 1/3 of the way through the third level. However, there were plenty of times over the past few weeks where I felt that my code could have been a lot better. So today I stumb...

 
Consider taking this code to Code Review for optimization tips. — Drew Dormann 21 secs ago
 
 
2 hours later…
11:05 PM
0
Q: Damage or Heal based on the buttons you press

austingae If you press the damage button, it will damage armor before health. If you press the heal button, it will heal armor before health. The project is here. https://github.com/austingaee/DamageHealth-Armor Is there any improvements I can make? import UIKit class ViewController: UIViewCon...

 
Your approach is right. But please post such questions here. — Lev Zakharov 33 secs ago
 

« first day (1921 days earlier)      last day (2097 days later) »