« first day (2919 days earlier)      last day (1394 days later) » 

00:01
RELOAD! There are 7537 unanswered questions (89.4657% answered)
 
1 hour later…
01:16
0
Q: Does this class creator for a simple text game seem convoluted?

Zain Wilson - WCH StudentI would prefer something that would be along my lines for the simplification, area of introduction to Jquery and arrow functions, though I want to get better, and this is the best way I know how. I want it to be also a bit more efficent. function GeneratePersonWithList(amountOfItems) { var item...

 
3 hours later…
04:26
0
Q: Is this a good handy util for converting hex to binary in the form of string?

JJJohnThis code returns a string of binary in 4-digit forms for a given hex in the form of string def str_bin_in_4digits(aString): retStr = '' for i in aString: retStr = retStr+"{0:04b}".format(int(i, 16))+" " return retStr.strip() for example, >>> str_bin_in_4digits("20AC") 0010 0...

04:50
0
Q: How to replace the giveen email address with a value in a given input?

vivek nunaI have written the below method to replace some of the email domains like @gmail.com and @yahoo.com with a given text. public static string RemovePersonalInfo(string input) { string[] tokens = input.Split(new char[] { ' ', '\t', '\r', '\n' }); string output = string.Empty; foreach (st...

 
1 hour later…
05:55
Are you looking for a code review? If so, I think it's not the right place to ask but a code review. — M.Innat 38 secs ago
06:06
it is not place for promoting code. On Stackoverflow you show code AND error mesage and we try to resovle this problem. If you want to advide for your code then go to similar portal Code Reviewfuras 36 secs ago
I’m voting to close this question because it better belongs on (Code Review](codereview.stackexchange.com) — furas 9 secs ago
06:41
Monking
06:52
0
Q: BoltDB Lookup and Add methods and advice on unit testing

Przemyslaw WilkI am writing a Go package that handles communication with BoltDB as a part of some larger project. I have 2 methods for interacting with DB. func Lookup(path string) (string, bool) {} func RegisterUrl(path, url string) error {} Lookup makes a request to database to retrieve corresponding url, wh...

0
Q: Python Prime Search Slower Optimization

Desmond RhodesI have these 2 version of code. Both are looking for all primes under a certain ceiling value. The first is testing against the set of all odd numbers. The second in testing against the set of all 6k-1 and 6k+1. In theory, the second version should be faster than the first. However the result sta...

if code works without error then it rather fit to Code Review. But maybe someone will review your code here - I thing more people visit Stackoverflow then Code Review. Good Luck. — furas 26 secs ago
07:16
0
Q: Using external conditions with functions in bash

Hot JAMSAs a part of my bash script, I am dealing with the optimization of some function, which take input csv file(s) and process it via some AWK script. This is the function, which operates on input file(s): rescore_data () { # accepting $str file(s) given outside the function in bash echo "DEBUG info:...

07:40
0
Q: I'm passing a lot of &mut ctx around, is there a better way to do this?

Donald Hosek(Full code at https://github.com/dahosek/gftopdf2). I've written a first pass of a small library for reading the GF files output by Metafont. What I'm not too crazy about is that for the 11 distinct opcode types that I interpret, each of them is passed &mut ctx for the context struct that keeps t...

 
2 hours later…
09:42
Monking
10:29
You should ask this question on codereview.stackexchange.comThomas Sablik 25 secs ago
 
1 hour later…
11:42
0
Q: File uploads with image previews using Array and readAsDataURL

OldCastleI got my code working with vanilla JavaScript, however I'm new to JS, so I don't know if the code is robust or not. Any advice to improve the code is welcome. let count = 0 function previewFiles(input) { const preview = document.getElementById('preview') const { files } = inp...

Highly related: Bytes to binary conversion function except you want to print ' ' or '$' instead of 0' or '1' to draw the font instead of dumping the bit-pattern. You can compile that C into asm and have a look (and look for optimizations, like the fact that shr reg,1 sets CF = the bit shifted out) — Peter Cordes 1 min ago
12:02
This is most likely a question for codereview.stackexchange.com but you can replace your operator conditionals with a dictionary lookup. — Joshua Nixon 56 secs ago
12:14
Seems like a question for codereview.stackexchange.comT J 6 secs ago
@Duga @Mast I rolled it back, it definitely changes the semantics of the code.
12:49
@pacmaninbw Thanks.
Anyway, if you're feeling better, I'd like you to read this thread. Once you're done, please tell me if you'd be interested in getting promoted to room owner in The 2nd Monitor.
13:22
@Mast Reading it now.
@Mast If I had won the election I would have expected to be promoted automatically. Yes I will be a room owner. Has anyone ever had to give the 2nd Monitor a room time out?
@DerKommissar Feeling good enough to move a motorcycle?
@pacmaninbw Not AFAIK. User time out yes. We've moved stuff to the nth a couple of times. But the nth isn't needed any more
@Peilonrayz 2015 IIRC
Not since.
@Mast Before I joined then ;)
A room owner is necessary about once a year on average, I guess.
Nice to be useless.
13:33
I've been doing it for years, most of the time it's not exactly hard.
See it as a bit of ambassadorship going on the rest of the time.
As the fact says, "Lead by Example"
@pacmaninbw You don't need to be promoted if elected. Moderators can do everything that room owners can and more.
Vogel was RO before he got elected and still is.
13:49
There was a timeout waybackwhen
I think it was 200 that put the room in timeout. A large number of people were room owners and didn't even notice
Aug 23 '15 at 23:14, by 200_success
This room was placed in timeout for 10 minutes; the topic of this room is "General discussion about Code Review http://codereview.stackexchange.com/ - Site Business always comes first" - conversation should be limited to that topic.
@Vogel612 No timeout happened?
it did, though
it's just not very effective on room owners
or mods
@Peilonrayz @pacmaninbw Moving messages can be useful. Sometimes, 2 discussions take place at the same time and one of them is better continued elsewhere.
@Vogel612 I've seen mods getting into a fight with each other, the system is clearly not built to handle that. Should be avoided at all times.
Monking
13:57
And no, that's not privileged information. Although I'm not going to say much more about it.
Monking @skiwi
@Mast yea, guess why the TL was closed multiple times
Similar trouble.
Likely.
14:20
@AntonioMolinaro That is why I am trying to explain it. Using tkinter without .bind can be very very difficult. If you want to know how it works look at this as well — TheLizzard 45 secs ago
14:37
Are moderators notified automatically when users have a discussion going on questions or answers (take this to chat)?
@Vogel612 @Mast @Peilonrayz ^^
there is an automatic flag for 20 comments in three days
there also is an automatic flag for a large number of edits
Both valuable. I would have expected less elapsed time.
it will be raised as soon as the threshold is reached
@pacmaninbw 10k tools also show excessive comments. However all the ones I saw were long but not really "take to chat" material
What tool, I've had 10K for a while.
14:42
codereview.stackexchange.com/tools
Then the "stats" page has "Posts with notable activity" and "Most commented"
I see it thanks!
15:17
@pacmaninbw He cancelled today so we're doing that next weekend
@Catija Good news is I feel decent today
I started feeling good yesterday around 4 pm or so, went to my piano lesson, then crashed overnight, woke up sweating a ton, but that might have been my fault because I had a ton of blankets on
So today I'm going to rest (which is unusual), and watch the Alien series today
@DerKommissar That should get the heart pounding. Are you attracted to Sigourney Weaver?
Nah, I don’t remember why but earlier this week I felt like watching them for some reason. Today with me being as out of it as I have been seems like a good opportunity
15:36
@DerKommissar glad to hear it!
 
1 hour later…
16:56
Monking
Oh, I missed the election results. Congratulations, @SᴀᴍOnᴇᴌᴀ, @Peilonrayz and @Mast!
Thanks @Zeta
17:23
My previous is true if you notice the duplicate commits before you complete your PR into a protected branch. If you and all code reviewers somehow didn't notice the mistake until after the PR is completed, you may just have to live with it and move on, since rewriting a protected branch (like master) is usually more trouble than it's worth. :) — TTT 25 secs ago
17:52
@StevenPenny Is that an automated reply? My current approach is explained in its entirety, it works, and I also explained what the issue was and what I'm looking for (a better algorithm). This question is easily answerable by suggesting a more efficient approach, if there is one. If not, fair enough, I'm happy to delete it. I would post to Code Review but there's too little activity. — Harold Cavendish 48 secs ago
What is your question? Note that if you have working code and are looking for general improvements, this would be more appropriate for CodeReview – be sure to check their question guide first, though. — MisterMiyagi 49 secs ago
0
Q: Correct use of Serializable with lambda functions

Miguel MurciaI'm practicing saving and reading serializable objects when a friend told me serializable objects have no use in real life, that I'd better focus on JSON or XML to serialize my objects when I came across this situation: I want to preload some FileFilters to use them in a JFileChooser dialog and I...

18:46
possible answer invalidation by andrewlundy on question by andrewlundy: codereview.stackexchange.com/posts/260057/revisions
possible answer invalidation by andrewlundy on question by andrewlundy: codereview.stackexchange.com/posts/260057/revisions
0
Q: Making 100 different named variables(but same class type)

sherloockI have a class named 'Movies' and I have hundred different movie name(in array) I want to make these Movies into 'Movies' type. How can I do that? I don't want to declare 100 times by typing in expression. I tried to Make Movie name as 'Movies' type variable by using 'for statement' but it doesn...

 
2 hours later…
20:29
0
Q: Why does this give me an "object NoneType" in Python?

TuoTuoIf I set x=["a","b"] and then run x.remove(x[0]), then my new x is equal to ["b"]. Then if I calculate len(x), then I get 1 (as makes sense because x=["b"] now. However, if I set x=["a","b"] again and do len(x.remove(x[0])), I get the following error: Traceback (most recent call last): File "<pys...

0
Q: Todo application implementation

VoprositelI am new to c# and decided to write a classic todo app. The implementation of my application now is like this: there is a Task class that describes the task. The List class acts simultaneously as a storage and has methods for creating, deleting, and displaying tasks. How good is this approach, ho...

20:53
0
Q: ZX80 game in C++

samfrancesIn order to help with learning C++, I have been re-implementing games from old ZX80 books in C++. Here' the description of one I'm currently working on: You are a starship captain. You have crashed your ship on a strange planet and must take off again quickly in the alien ship you have captured....

0
Q: Reduce repetition of code for drawing on a canvas in JavaFx

FinshoIs there a way to simplify my code underneath? Basically I'm drawing a series of rectangles against each other on a mouse dragged event. The negative numbers are read from a 2D array in an other class (Board). I'm using positive numbers for dots (you need to connect dots with beams/blocks) also i...

@CaptainObvious CNI, Write my code.
21:18
0
Q: PyQt load images in background process

SpencerI am building an application that needs to load 100-200 images (really only limited by performance) and display them to the user in a sort of gallery. A good analogy would simply be Google Images. In a linear implementation loading 100 images takes roughly 3-6 seconds, during which the GUI is fro...

 
2 hours later…
22:55
0
Q: Retrieving restaurant orders from SQL Server

SolentCISpublic (List<Order>, Dictionary<int, string>, Dictionary<int, string>) GetOrders(int RestaurantID, int StartID) { List<Order> Orders = null; Dictionary<int, string> MenuItemsXml = null; Dictionary<int, string> OrderHistoryXml = null; string sql = "SELECT ev.ID,...

23:44
0
Q: Confused in choosing constant reference or constant value to avoid post modification on variables in C++

Kim Jong UnI am relatively new to C++. When learning OpenCV I need to name a window. The title should not be changed afterwards, so I should make it constant. There are two options: const std::string title = "testing..."; or const std::string& title = "testing..."; Both do not allow us to modify the decla...

23:57
Might be time to protect this question? It's been receiving a number of alternative-implementations by new users:
9
Q: Highest pit - only climbing through the pit once

Simon ForsbergProblem description: A non-empty zero-indexed array A consisting of N integers is given. A pit in this array is any triplet of integers (P, Q, R) such that: 0 ≤ P < Q < R < N; sequence [A[P], A[P+1], ..., A[Q]] is strictly decreasing, i.e. A[P] > A[P+1] > ... > A[Q]; sequence A...

As it's my question, I'm not gonna protect it myself

« first day (2919 days earlier)      last day (1394 days later) »