« first day (1590 days earlier)      last day (2413 days later) » 

12:00 AM
RELOAD! There are 4314 unanswered questions (90.8619% answered)
 
12:35 AM
"This works very well and I am happy with it" I honestly think this is probably a better fit for codereview.stackexchange.com. — Claies 19 secs ago
 
12:46 AM
Claires, thank you very much also letting me know about the "codereview" site, I didn't know it before, I will take a look at that site closely. — omt66 39 secs ago
 
1:24 AM
0
Q: Merge K Sorted List

Stack crashed Merge k sorted linked lists and return it as one sorted list. The definition of the ListNode class and the signature of the MergeKLists method can't be modified. Below is my submission to LeetCode which has been accepted and run time is not that bad (better than 55% of the submissions). But ...

 
1:58 AM
0
Q: Lex simple line-counting grammar

Gregory NisbetI'm trying to make a lex (flex) grammar that kicks out tokens while always being aware of the current line number. As an exercise, I made a simple grammar that accepts raw strings '...' with no escape sequences and prints out the line range after a string is completed. Here's the grammar %{ #...

 
2:14 AM
I would recommend to have a look into this other SE site : Code Review, where your question might be more suited (though I am not sure, and I am not saying this question is bad to ask here) — Pac0 46 secs ago
@snewz Yes, I saw that you accepted it and I also voted his answer up. His is the most correct way to do it, IMHO. But feel free to post your working code on [Code Review] (codereview.stackexchange.com) to get a lot of complementary recommendations, if you want to dig further. — Pac0 9 secs ago
 
 
1 hour later…
3:33 AM
-1
Q: Finding the minimum digit of a number using for loop in Python

user40I am trying to display the minimum and maximum digits of a number entered by a user. If input is '123456', the minimum would be equal to '5' and I can't figure out why. def minmax(M): x=[M[0],M[0]] for i in range(0,len(M)): for j in range(0,len(M)): if int(M[i])<int(M[j]) and int(x[1])>...

0
Q: unable to undersatnd this problem statement

vivekChef likes to play with big numbers. Today, he has a big positive integer N. He can select any two digits from this number (the digits can be same but their positions should be different) and orders them in any one of the two possible ways. For each of these ways, he creates a two digit number fr...

 
4:25 AM
1
Q: Exposing .NET's internal StorageRoot via Reflection for accessing file/stream-based Structured Storage

ThunderFrame.NET tantalizingly exposes StorageInfo and StreamInfo as public classes, but hides the seminal StorageRoot as an internal class, leaving the user no way of creating or opening a Structured Storage from a file or stream. Microsoft's Reference Source details the source behind StorageRoot which inh...

 
4:39 AM
I'm voting to close this question as off-topic because it is asking for peer review of working code, and not a code problem question. Code review questions should be asked at Code Review instead. — Ken White 40 secs ago
 
5:26 AM
Alright, I kind of understand it now. However, to me it made more sense if this sequence starts with your second sentence: "The controller chooses the model instance, ..." Is this correct? I have used your answer to finish this project, which is posted here.Rick 26 secs ago
 
5:45 AM
0
Q: Analyzing an arithmetic expression using stacks

MichelleI'm looking for some constructive (harsh) criticism of a homework I've done (the code works fine). Also Is there a better/another way to solve the exercise? Exercise: Read an arithmetic expression grouped by parentheses and verify if syntactically it is well formed (Using stacks). To consider...

 
This question should be in Code Review. — MasterMastic 30 secs ago
 
6:04 AM
0
Q: Is my code Declarative (RxSwift) ? Please help me to explain why not?

Hien NguyenI'm newbie in Swift and Rx programming. Is my below code is declarative ? If not, please rewrite it and explain to help me more understanding about declarative :( (my English is so bad) // MARK: RxSwift func processPhotoApiService(target: PhotoService) -> Observable<[String: Any]> { return R...

 
If your query is working fine, and if you are just looking for advice on how to improve it, you could post it on codereview.stackexchange.com. But do visit their help center to understand what is acceptable for them. — Nisarg Shah 33 secs ago
 
0
Q: Write Independent output for nested loops

Video retrievalI want to write the output of an efeatch function for each tuple( year, term) in an xml format. This is what I have done: years = range(2017, 2016, -1) : list of years termList=["image","video"] : list of keywords for year in years: for query in termList: xml_data=fetchByQuery(qu...

 
6:38 AM
0
Q: Simple number guessing game in Python 2

PalmerI've just started to learn Python as my first language. I have written a simple number guessing game and have a quick question. Here is the script: import random correct = False cn = (random.randint(1,10)) username = raw_input("Hello, what is your name? ") s = "Well done. Now return to your m...

 
6:52 AM
0
Q: A C#-code to compute MD5-hash

guestI tried to write a C# program to compute MD5-hashes. //Title of this code //Rextester.Program.Main is the entry point for your code. Don't change it. using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; using System.Text; using System.Securit...

 
 
1 hour later…
7:57 AM
0
Q: How can I get rid of this horrible looking optimization in Python?

Mateusz KoniecznyI noticed that my code frequently contains following structure wikidata_link_issues = get_wikidata_link_problems(wikidata_id) if wikidata_link_issues != None: return wikidata_link_issues wikipedia_link_issues = get_wikipedia_link_problems(wikipedia_link) if wikipedia_link_issues != None: ...

 
8:29 AM
@Cyka Then maybe you should look for a different way to solve your problem, which does not involve this search. What is your larger goal here? It's also possible that your implementation is particularly inefficient or that the bottleneck is actually in a different area of your code, in which case codereview.stackexchange.com could help. — Allen Z. 51 secs ago
 
8:52 AM
0
Q: remove un necessary spaces after removing stop words with regex

Isak La FleurI'm removing stop words from a string. As you see it works, but can be improved. the result from this console.log is I hellewe test dsdsdsdsds, work? I would like to remove the extra spaces and only generate with one space between the words. How do I do that? const stopwordsLongList = [ "...

 
Monking.
I think it's time for a new laptop. Mine does not recognize (left-)control-{x,v,l} anymore :/. Any recommendations for a portable laptop?
 
@Zeta You could go the cheap route and get a new keyboard instead, but usually, by the time your keyboard dies, you need a faster one anyway.
 
We're talking about a Core2Duo notebook with a GT220M. There's one upside of that thing, though.
 
@CaptainObvious Feature request.
 
It slightly overheats, which makes your hands warm in winter.
 
9:04 AM
lmao
Heat is the exact reason I never modify a laptop. They get way too hot by default already.
@Zeta You could look around here:
 
According to the S.M.A.R.T. values, this little machine has been running for 18k hours. Which reminds me that I should back-up the data from the 8 year old hard drive...
@Mast Uuuuh, shiny, thanks.
 
@Zeta You should've been doing that anyway.
Anyway, it all boils down to what you're going to do with it, how long it will have to last and how much budget you got.
 
@Mast I had weekly backups to external hard drives when I used it actively. Nowadays I use a desktop PC, and either have (private) git repositories for code, external hard drives, or encrypted cloud storage.
Oh, and I probably have a full-disk image before I tried to install Win10, which failed horribly. The installation, not the disk-image.
@Mast I've been looking on and off for some time now. Maybe I just take a refurbished X240 or similar.
Chromebook would be neat, but the keyboard looks like a pain (and I would replace the ChromeOS by some Linux variant either way). And the nice ones are hard to get here :/
But before I ditch this one I'll check with some live-stick whether it's a driver or hardware problem. Maybe this one may live for another 3 years, especially if I replace the HDD by a SSD.
 
If a laptop is already your secondary device and the keyboard is a pain, you won't be using it as often as when it had a decent keyboard.
 
Yeah, that's true.
 
10:00 AM
possible answer invalidation by Graipher on question by Isak La Fleur: codereview.stackexchange.com/posts/175277/revisions
 
@Duga It's fine. Now the question even makes some sense.
 
What went wrong with codereview.stackexchange.com/questions/175273/… ? Are closers convinced that I am pretending to be the same person as on github (in that case I may create special repo on github confirming that I am the same person).
 
@MateuszKonieczny It's the first part of the close reason. The code snippet is too short, and can be interpreted as hypothetical code.
2
 
@Zeta - Thanks, can you check is it now OK?
 
I think you should post this question in CodeReview not in SO. — Fady Saad 38 secs ago
 
10:23 AM
0
Q: query delete double descr

gerard lacombehi i have a table (table1) like this one ID|Shop|number1 |number2|Date|Description 1100 s null x null null 3400 s null d c "_____" 3500 s null d s """...;!! 1120 x null x 06/07/2017 pen 1123 x s x 06/07/2017 p.en 1124 x c x 07/07/2017 pe-n 1138 s v e 06/05/2005 pencil 1140 f v e 06/05/2005 p,en-...

 
@MateuszKonieczny I'm not sure. It still fits the hypothetical code portion. Feel free to ask on meta if your question does not get reopened. (By the way, I'd get rid of the "to off-topic closers" part, it has nothing to do with your code)
 
10:56 AM
0
Q: JS Tic Tac Toe using Minimax algorithm; beginner

Mart-Aleksander LepanenTo challenge myself I set out to create a tic-tac-toe game, complete with a Minimax-driven AI. I had already attempted this challenge once when I was following the FreeCodeCamp curriculum. For this review I would kindly ask everyone who is nice enough to give it a moment of their time to please...

 
11:19 AM
0
Q: My post is still on old, why?

GordonFreemanFollowing the procedure states here : https://codereview.stackexchange.com/help/reopen-questions I'm creating this post to bring your attention on my post that is still on hold since two days without any further information despite my severals edit. Div with text height animation from bottom ...

 
0
Q: exponentiation in python. result not right

joey langi wrote the following code in python a= 24*pow(10,-4) print(a*pow(10,4)) the result came out to be 24.000000000000004. But it should have been 24. What is the problem ?

 
11:42 AM
1
Q: Converting jquery code to javascript

Boom ClickI'm trying to learn pure javascript right now. I just want to know what is the equivalent javascript code for this jquery below: $(function() { $('#next').on('click', function() { if (animation) { $('#imageList').stop().animate({ ...

 
12:25 PM
possible answer invalidation by Isak La Fleur on question by Isak La Fleur: codereview.stackexchange.com/posts/175277/revisions
 
0
Q: prime function in a for loop using Math operations

Franck Belemkoabgaguys I saw a function(the function is just below) that check wether a number is prime and return a value but I don't understand the operations made in the code. Can someone explain me mathematically? Also is there better algorithms for prime checker function? bool IS_prime(int number) { for ...

0
Q: Implementing a copy on write String class using reference counting in C++

sunil paiI have tried to implement a copy on write string class with value semantics and reference counting. I wanted to support indexing so I have overloaded the operator[] and to differentiate between the l-value and r-value usage and it is returning a proxy object. class proxy; //Reference counting ...

 
1:05 PM
If the code is correct, this might be a better fit for code review, not stack overflow. — Olaf 15 secs ago
 
0
Q: Stop Watch with time-records

mizechExercise Description Create a stop watch which has the following features: "Start-/Stop" button "Start-/Stop" button can be triggered by pressing the "s"-key. "Record current time" button. Display the recorded times since start. "Record current time" button can be triggered by pressing the "t...

 
1:21 PM
0
Q: Event handling attempt using some of the c++ 17 features

Catalin ManoleI am messing around with the idea of event handling. What I tried here is to make an event handler that offers: type safety no need for a paired call to unregister() because it can easily be forgotten and introduce bugs (I already achived this by using weak_ptr) simple usage flexible (or at lea...

 
possible answer invalidation by cpp11dev on question by cpp11dev: codereview.stackexchange.com/posts/175225/revisions
 
Monking
hi @Zeta. Could I ask you to take a look at my latest haskell answer?
 
The Brain-Flak one?
Seriously, every second Haskell question is "I've implemented an interpreter for <insert-esoteric-brain-*-language>".
6
 
yup, the brainflak one
 
1:38 PM
The eso-lang site does not load for me :/
> There are two types of functions: Nilads and Monads. A nilad is a function that takes 0 arguments.
 
apparently esolangs is down right now
 
This is going to be a wild ride.
 
then again iidrn says it's been down for more than a week ...
 
Seems fine, but why don't you call ParenNilad One (or OneNilad), EvalNilad Height (or HeightNilad)?
 
hmm ... those are definitely better names
 
 
at that point one could drop the Monad vs Nilad distinction.
 
Hard to judge from the example snippet, but scenarios where you have truly heterogeneous lists should be rare enough in practice for this sort of thing to not be a bother. Might be worth bringing up in CodeReview, you might be modelling your domain in a too low level way. — scrwtp 46 secs ago
 
Hello
 
2:31 PM
0
Q: Internet Service Provider Database architecture

Vyacheslav LogvinovI'm new in database study. Please look and tell your criticism, recommendations, advice on the architecture of this database, devoted to a simple Internet Service Provider System. A small description: "Counter" - visitors counter statistics for a website. "Services_tariffs" is a necessary ta...

 
@Zeta If by "every second" you mean 12 of 752, then yes.
 
Huh.
 
2:49 PM
lol
 
3:02 PM
0
Q: Minimum Priority Queue implementation in Kotlin

gil.fernandesBelow you can find a generic implementation and some unit tests of a minimum priority queue in Kotlin. What could be improved in this implementation, so that it complies to best coding practices in Kotlin? import java.util.* class MinHeapPQ<Key> : Iterable<Key> { private var pq: Array<Key?>

 
 
1 hour later…
4:20 PM
On Error Resume Next ==> bad idea (when used like that). Errors should be handled, not suppressed. In any event, if your code is working but only too slow, perhaps it would be better to post it on Code ReviewJohn Coleman 28 secs ago
 
4:56 PM
0
Q: Find the kth element which is either divisible by l or r or both

Vikram OjhaThis was asked to me in one of interview, so can someone please have a look is my code efficient or we can further improve it, here I am assuming l is less than r Assumption: L < R Code int main() { long long int l, r, k; cin>>l>>r>>k; int lValue=l*k; int numberofElemtsin_l_Ran...

 
5:12 PM
0
Q: Resume code of a sql selecting function in java (cleaner way)

adel adeeli am new in java so i started to learn by doing , and right now i am developoing a store management software , and i'm trying to do it in the right & the cleaner way,so i'm looking for some reviews to my codes,the code is trying to resume the connection and the selecting from a database,so you wi...

 
wow ... ~70 slides "Appendix"
 
possible answer invalidation by Mox on question by Mox: codereview.stackexchange.com/posts/175154/revisions
 
0
Q: Solution to N-queens problem in Racket

rnsoI am using following method to solve N-queens problem for all possible solutions for a board. It seems to be smaller as well as faster than many commonly mentioned method but are there any bugs here? The method is as follows: Put a queen on first column (from below to up) of first index (f...

 
5:29 PM
@Vogel612 I have books where double that is the usual.
 
well the slideshow "only" has 300 slides
so a 70 slide-appendix seems slightly heavy
 
Yea, it is.
The books I'm talking about have at least double that in pages, before appendix.
 
also note that this means the professor probably went through more than 2.5 slides a minute, with each slide being quite packed with information
 
Yikes.
 
can't give any of the slides as example though... there was an actual copyright disclaimer there..
 
5:31 PM
What's the topic?
 
BPMN
 
UML for business?
Are those 70 pages filled with examples by chance?
 
yes and no... it's significantly more complex than most UML, also depending on vendors you can even compile it to an XML-based scripting language ~shivers
@Mast nope... best practices and rules for different abstraction levels of modelling.
 
Oh, that's not bad.
Guess the prof just liked to be thorough.
 
makes sense, given he's one of the specificators of the "language"
basically invented part of the thing AFAICT
 
5:39 PM
If this works, without errors, and you're looking to make it more efficient, please check out CodeReview. — BruceWayne 17 secs ago
 
0
Q: Binary protocol print utility in C++

arcomberPlease review this protocol printer/decoder in C++. I also attached a sample binary file to use to test. Main program: /* program to parse a binary protocol layer with following form: header: x bytes - example uses DEVx: of 5 bytes timestamp: uses excel format timestamp of 8 bytes (double) pay...

 
5:58 PM
@Phrancis Is there a moment when unbuffered queries become a necessity?
 
-1
Q: Local variable not assigned

James maynardI know my code is horrible and messy but i just want to make it work win_combo = ((0, 1, 2), (3, 4, 5), (6, 7, 8), (0, 3, 6), (1, 4, 7), (2, 5, 8), (0, 4, 8), (2, 4, 6)) board=[1, 2, 3, 4, 5, 6, 7, 8, 9] end = False import random print(" Welcome to TIC TAC TOE! ") def men...

-1
Q: java split iterator functional interface inside stream function

Saurabh KumarIs there is a way i can merge the below code into 1 single code line Iterable<String> iterable = () -> config.getKeys(); final Set<String> existingKeys = StreamSupport.stream(iterable.spliterator(), false).collect(Collectors.toSet());

 
@CaptainObvious That's broken.
@CaptainObvious That's just rubbish.
 
6:14 PM
@CaptainObvious that looks like it was copy-pasted from a tutorial written in 1997#
 
im just mad ive been stuck on this "local variable refrenced before assignement" for 2 hours and i just want some help — James maynard 8 mins ago
Only 2 hours, what's he complaining about...
 
0
Q: Is this a neural network

TobiI've spent the last 2 days watching youtube videos on neural networks. In particular, I've been trying to implement a genetic algorithm that will evolve over time, however, most videos seem to be focused on neural networks that are trained, and then used for classification. Being confused, I dec...

 
@CaptainObvious "I wrote code, does it work?"
 
6:33 PM
0
Q: Multiple MVVM components that interact with each other

Pavel_KI am trying to implement architecture with multiple MVVM components. In every component I need to use MVVM pattern because it best suits me. Every component must have abilities to use another component. Component contains only View and ViewModel, because models are added to component when it is n...

 
@CaptainObvious Fling it. OP is unresponsive.
 
6:45 PM
OP flung it
I really like how in one slideshow of 80 slides, this other prof was able to introduce four different notions of Petri-Nets, confusingly all named Petri net.
and then proceeded to "mathematically define" them, in unclear and inconsistently used terms, introducing redundant names for three separate concepts..
which makes the whole slideshow essentially useless, if you're not willing to invest enough time to basically do the whole research all over yourself
 
@Vogel612 Stick to the practical stuff and ignore the math thought up later?
 
hmm ..
I could probably develop a consistent mathematical model on these during the exam
it's not like petri-nets are complex
the problem is whether that model will be accepted...
 
7:08 PM
0
Q: Personal project for managing photos

AdamI have wrote a small project for Android. It's app which let's you to take a photo (or find one with Flickr) and save it in the cloud (Cloudinary). I not sure, that I properly use MVP (layers separation), maybe EventBus could be used better? Unfortunately I can't paste entire code here, so here...

0
Q: Microsoft.Extensions.Logging - Dependency injection

Azerty123I use Microsoft.Extensions.Logging with .NET Framework 4.6.1 (compatible with .NET Standard 2.0) I use NLog provider and Unity for the dependency injection My first problem is that I have to install the Microsoft.Extensions.Logging package in all projects that need to write logs Also I would l...

 
0
Q: Can I legally post my solution to a company's coding test?

clkI had to do a coding test as part of the interview process for a job. The company didn't give me any feedback, though, and just told me they wouldn't be proceeding with my application. Can I legally post the test's requirements and my solution here to seek advice?

 
7:37 PM
I also have another question on a separate forum: codereview.stackexchange.com/questions/175297/…rnso just now
 
0
Q: Chaining promises into a callback

lexicoreI wrote a AWS lambda function which buys €X worth of some currency on an exchange. For this I first have to find out the current price (getAskPrice), then calculate the amount to buy and post the order (buyLimitOrder). I've implemented both operations as promises, buyLimitOrder gets the result of...

 
8:11 PM
0
Q: find if a number divisible by the input numbers

codaholic Given two numbers a and b, we have to find the nth number which is divisible by a or b. The format looks like below: Input: First line consists of an integer T, denoting the number of test cases. Second line contains three integers a, b and N Output: For each test case, print ...

 
8:29 PM
0
Q: Copy / paste special excel row

programer AnelAny way to speed up this code For j = 1 To clItems.Count - 1 For i = 1 To nNumberOfRowsPerItem xlSheet.Rows(nLastItemRow).Insert() xlSheet.Rows(nFirstItemRow + i).Copy() xlSheet.Rows(nFirstItemRow + (j * nNumberOfRowsPerItem) + i).PasteSpecial() ...

 
9:01 PM
If your code works but you just want to see how it can be improved, I recommend posting it on Code Review. Also, you're super close with your coordinate system, but you need to use delayed expansion. — SomethingDark 35 secs ago
 
 
1 hour later…
10:06 PM
Remove the contentType option (your not stringifying your data so it need to be the default 'application/x-www-form-urlencoded; charset=UTF-8'. But there are numerous other issues with your code including the name of the property you binding to and the SelectList cannot be the same (refer this answer) and the fact that this all fails if your need to return the view and you code will not work for editing existing items - refer this answerStephen Muecke 44 secs ago
 
 
1 hour later…
11:18 PM
0
Q: C# Web Forms navigation through pages error

srv8Hello i have tried almost everything i found on the internet about "Cross Page Postback".i succesfully transfer to WebForm2 but the previous page is always null so i can not receive any data from the WebForm1. Here is what i added to my WebForm1.aspx: <div> <asp:TextBox runat="serv...

 

« first day (1590 days earlier)      last day (2413 days later) »