« first day (1693 days earlier)      last day (2318 days later) » 

12:00 AM
RELOAD! There are 4850 unanswered questions (90.2587% answered)
 
0
Q: Two almost identical methods for output but only one working

Melissa LoosI found something very funny today. I have two methods: public static void gebeArrayAus(long[] array) { for (int i = 0; i < array.length; i++) { System.out.print(array[i] + " | "); } System.out.println(""); } public static void gebeArrayAusH(long[] array) { for (int i =...

 
12:40 AM
This is a question for codereview. Not SO as the goal is to increase performance . — coatless 38 secs ago
 
1:14 AM
In case anyone wonders what rooms @Duga posts to most often...
 
0
Q: is_subset Python implementation

NinjaGI wanted to ask for a code review for my implementation of Set: #!python from linkedlist import Node, LinkedList from hashtable import HashTable class Set(object): def __init__(self, elements=None): # intilaize the size of the set, starts with intial size of 10 if elemen...

 
@SimonForsberg how far back does it go?
 
@Mat'sMug Only since Monday unfortunately.
 
1:30 AM
we could scrape Duga's "recent" tab to retroactively fill the data
 
For some reason I thought it was a good idea to delete some old logs.
Blergh, writing a regex to extract info from this isn't that easy...
Posted: [ChatMessage{room='14929', message='**\[[rubberduck-vba/Rubberduck](github.com/rubberduck-vba/Rubberduck)\]** [**parrt**](github.com/parrt) [commented](github.com/rubberduck-vba/Rubberduck/issues/…) on issue [**#3634: The parser does not like long boolean expressions**](github.com/rubberduck-vba/Rubberduck/issues/3634)';, params=Room 14929}, ChatMessage{room='14929', message='> There have been important optimizations in later version so definitely upgrade
 
@SimonForsberg You don't escape 's, I don't envy you...
 
^
actually you should be able to match ', params=Room 0+}] and assume everything between it and , message=' is the message text.
 
1:48 AM
This question (with code itself inlined) really belongs to codereview.stackexchange.comIgor Soloydenko 6 secs ago
 
@Mat'sMug I'm having trouble already with the first parts, I wanted to extract the github repo, the user, and the action name ("commented")
 
aye, you gotta reverse-engineer that wicked awesome markdown there :)
 
2:08 AM
@SimonForsberg Rubberduck, figures.
@Mat'sMug Indeed, throw everything you're certain you won't need away first, saves you half the trouble on the regex.
 
2:27 AM
0
Q: Bootstrap pagination

SunHere is my bootstrap pagination code. Maybe it can be simplified. const pagination = { pre: 0, curr: 1, max: 6, list: null, cn: '', swap() { pagination.list.children[pagination.pre].classList.remove(pagination.cn); pagination.list.children[pagination.curr].classList.add(p...

 
2:42 AM
How do you start creating a class diagram ? What I do is do noun-verb analysis. Then, CRC. Then class diagram.
 
Codereview exchange would be more suitable for your question. — 蕭為元 just now
 
3:28 AM
0
Q: Pass Async function to new Promise constructor

TJBlackmanI'm having a hard time wrapping my head around whether or not this works or how I can even test it but.... I want to use Async/Await inside a Promise, which means, when I create a new Promise, I have to pass it an async function... something like this: const getData = function(){ return new ...

 
3:42 AM
0
Q: Retrieve player rating based on defined criteria

Walid MujahidUsing the chess.com API, I take in a list of players and return their ratings based on a certain criteria -for instance, they have to be a member of a certain club, they have to had played a number of certain games, and they should have played a certain number of games within a certain number of ...

 
4:41 AM
@Ludisposed Before you ask: my Chess account got suspended. Long story short: I asked a question on Chess SE about playing a current match I was winning more defensive (playing the game worse than I could have, so I didn't think it would violate Fair Play). Guess they disagreed. Oh well.
And honestly, that's all I want to say about it.
 
5:20 AM
0
Q: C# Hash Code for triangle class

S. BudaI have a custom class to handle some triangle calculations that I am doing. For the most part I am happy with it, however, there is one aspect that I don't really trust. That is my implementation of HashCode. Some quick information about my triangle- it has 3 Vector2 structs that represent point...

 
 
1 hour later…
6:30 AM
If you have working code that you want peer review to improve, you should post to Code Review instead. This site is for questions about problems with programming or a programmers tool, not for improving working code. — Ken White 13 secs ago
 
Kaz
6:48 AM
Monking @all
 
0
Q: Finds a pattern in a string by returning index of where the pattern starts in the string in Java

SanjivThis is the challenge I tried in Codefights: Avoid using built-in functions to solve this challenge. Implement them yourself, since this is what you would be asked to do during a real interview. Implement a function that takes two strings, s and x, as arguments and finds the first occurrence of t...

 
7:24 AM
0
Q: Send records using aysnc or sync way

davidI am using below class to send data to our messaging queue by using socket either in a synchronous way or asynchronous way as shown below. As of now I am duplicating lot of code in my below class. I have 5 method below which is use to send data either synchronously or asynchronously and I believ...

 
7:42 AM
@Mast What, what what? I couldn't find the post you posted on chess.se, curiosity sorry. Don't have to say another word about it. ;)
 
8:11 AM
Nevermind I found it, what bullshit. Although there would not have been an issue if you had waited after the game to ask the question.
 
8:34 AM
0
Q: Calling Service and Initiate under ngOnOnit (not in Constructor) Hook in Angular4

Kushal JayswalI am using WP REST API V2 with Angular v5. I am display all items available from API for /do route inside WeDoComponent component. Now I want to use same component - <app-wedo> inside another component with restricted numbers of items. To do so, I have added one attribute loadOnly inside HTML...

 
8:46 AM
I'm voting to close this question as off-topic because requests to review working code belong to codereview.stackexchange.com — GhostCat 1 min ago
 
9:00 AM
possible answer invalidation by self_learner on question by self_learner: codereview.stackexchange.com/posts/183351/revisions
 
9:13 AM
Is anything not working here? If not it might be a better fit for code review (codereview.stackexchange.com). There isn't really any problem with the code that you've already written. — Liam 18 secs ago
 
0
Q: C++: Dynamic programming, given 3 possible operations

XcoderXSo the question goes like this: I have N numbers. For each number X, I can perform 3 operations: 1. If X is a multiple of 2, divide X by 2. 2. If X is a multiple of 3, divide it by 3. 3. Subtract 1 from X. Find the minimum number of operations to make X = 0. This code is meant to be done using ...

 
10:16 AM
Maybe you are looking for: codereview.stackexchange.comTroyer 13 secs ago
possible answer invalidation by Patrick85 on question by Patrick85: codereview.stackexchange.com/posts/163619/revisions
 
@Duga That is something I haven't seen before :)
 
10:32 AM
0
Q: TaskQueue implementation

NtFreXTo overview async tasks as "Loading configuration", "Saving configuration" and "Discarding configuration" I created a TaskQueue type. I want to be able to schedule tasks which can be canceled an such which can't. The "Saving configuration" and "Discarding configuration" for example cannot be can...

 
This might not be off topic at codereview.stackexchange.com. — Dawood ibn Kareem 1 min ago
 
0
Q: Laravel 5.5 check if user is active on login

SheperdOfFireI want to check if a user is active during the login process. I've created 2 fields (type date) in my database since an account should be active between those 2 dates. At the moment I have this code which is working fine: <?php namespace App\Http\Controllers\Auth; use App\Http\Controllers\Cont...

 
11:04 AM
0
Q: Pagination algorithm in JS

RobertI needed a relatively simple pagination, as currently implemented on GoogleSearch (sans prev & next buttons). Most code I've seen was overly complicated so I came up with something that's simpler. Any suggestions on how to further optimise this? function doPaging(currentPageInput) { let ...

 
11:31 AM
This is off topic for SO. Please post on Code Review SEDetonar 40 secs ago
This question belongs to codereview.stackexchange.comarrowd 1 min ago
 
1
Q: On the huge amount of work needed for a CR answer

Gerardo FurtadoI'm a regular at Stack Overflow, and I just recently discovered Code Review, where I answered some questions with the d3.js tag. We all know that CR is quite different from SO: by it's very nature, both the questions and answers at CR are huge, full of code and explanations. I can't imagine an on...

 
11:48 AM
@Ludisposed Yes, and had I not been sleep deprived for the past week or so, it may never have happened. Water under the bridge though, best of luck against your next opponents.
 
@Detonar: I don't agree. Code Review is good for improving working code. The question here is is this valid or UB which is more on topic on SO. — Serge Ballesta 29 secs ago
 
@Mast Thank you... I did like our matches, so a bit sad this happened
 
0
Q: Bubble sort with counting swaps and comparsions

ShadasviarI have bubble sort code below, whitch has to counts swaps and comparsions of elements. How can it be made more elegant and clear if it possible? I think lots of tuples is not best way to do this. bsort' x = bsort (x,0,0) bsort :: (Ord a) => ([a], Int,Int) -> ([a], Int, Int) -- (table, nswaps, ...

 
@Ludisposed Agreed on both.
 
 
1 hour later…
1:20 PM
0
Q: CodeReview of recruitment task

SerSergiousI wrote a simple application. It's a solution for recruitment task. I will be grateful for any advice https://github.com/SergiuszKotecki/recruitment-task

 
That's why people usually practice code reviews. — yegodm 5 secs ago
 
0
Q: Find combinations of items in a nested collection

Rishat MuhametshinIt's a very typical problem that I come across here and there. Imagine that you have a collection of items of any type, and sometimes items are collections themselves; you then need to "expand" them and thus multiply the number of items in the result by number of items in that collection. An exam...

 
2:05 PM
-1
Q: I'm trying to make a quiz using tkinter

Thomas GascoigneIn python im trying to make a quiz, i've already made it without using tkinter. But i cannot make a function to check if an answer on a button is correct. Has anyone got any ideas?

 
BTW, this site does not use the MIT license. As noted in the Stack Exchange Terms of Service and in the footer of every page, all user contributions are licensed under Creative Commons Attribution-Share Alike. If you don't like this you should delete your post. — Snowbody 9 hours ago
Now I thought "code" contributions were covered under the MIT and CC-BY-SA for non-code contributions. Now, has this changed? If not, does "contributions" cover questions?
 
490
Q: The MIT License – Clarity on Using Code on Stack Overflow and Stack Exchange

samthebrand Update (Dec. 22): Thanks, everyone, for your feedback to this proposal. We're going to digest this one over the holidays and should have a follow-up announcement answering your questions and addressing your concerns after the new year. We won't be making any hurried decisions on this topic, an...

 
2:21 PM
@Ludisposed That is what I thought.
 
possible answer invalidation by springathing on question by springathing: codereview.stackexchange.com/posts/183233/revisions
 
2:37 PM
Monking everyone :)
 
3:04 PM
0
Q: Break from iteration in functional programming

thadeuszlayI wanted to practice functional programming (fp) without using any library. So I took the 1st problem from project euler: If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the multiples of...

 
Monking :D
@Marc-Andre How do you start creating a class diagram ? What I do is do noun-verb analysis. Then, CRC. Then class diagram.
 
@BhathiyaPerera Stop repeating the same question.
 
@Mast Sorry about that :D
 
That's the case in (probably) most projects. But there isn't a one size fits all, and preference will vary from developer to developer / company to company etc. Hell, even what MVC looks like can vary form person to person. Anyway, best to just do it the way you think is right and reasonable, then if you're bothered about some bits, ask for feedback from e.g. codereview or similar. That's my suggestion. — Jon Stirling 36 secs ago
 
@BhathiyaPerera In my day to day job it's rare that I have to do class diagrams so I can't really answer.
 
3:18 PM
Either your class diagram is part of your design and you create it before the code, or it's part of the docs and you write it afterwards. Write it as-is.
No classes, no diagram.
 
3:34 PM
Working code that needs to be optimized, belongs on codereview.stackexchange.com . It is too broad for this forum that deals with specific problems with the code, not optimization and performance. — Scott Craner 3 mins ago
And now that you have put this on Codereview, please remove it from here. — Scott Craner 30 secs ago
 
0
Q: Populate array with random numbers efficiently - for loop takes too long

AnsI have an initial excel workbook with about 100 000 rows. I put those rows into array and then use that array to create Client class objects, which I add into a final array resultColl. Function getClients(dataWorkbook As Workbook) ... With dataWorkbook.Worksheets(globals("DATA_SHE...

0
Q: Optimizing Conditional T-SQL in VBA

Jonathan PorterI've created a report in Excel which connects to SQL Server via ODBC and I wrote some VBA to allow parameters to be passed in optionally. At this point everything works as expected but I'm curious to see if there is anything I can do to further improve it. I've brought the execution time for the ...

 
4:06 PM
0
Q: Unit-Test of Repository Layer that returns live data where data is subject to change over time

DennisHow do you write a unit test for a repository pattern class that reads and returns data from a database, where data returned can change over time? What I start with I have some code that reads some data from a database that is later fed into a graph service: class Repository extends DatabaseR...

 
Questions asking for help improving working code are usually more appropriate on the CodeReview stack exchange. — azurefrog 43 secs ago
If your code works fine (that is mandatory condition) and you are looking for ways to improve it you should post this question at codereview.stackexchange.com instead of Stack Overflow. — Pshemo 51 secs ago
 
0
Q: Solving Chain Reaction on Small Boards: Verifying Correctness

Aadit M ShahI'm writing a program that finds the minimax value of Chain Reaction on various small boards (à la Solving Go on Small Boards). Here's a brief description of the game of Chain Reaction: Chain Reaction is a two player combinatorial game played on an n×m game board (where n,m ≥ 2) in which play...

 
4:33 PM
Anyways, if you want a codereview, check out codereview.stackexchange.com, but read their rules before posting. Stack Overflow is for specific programming questions. — Baum mit Augen 53 secs ago
possible answer invalidation by thadeuszlay on question by thadeuszlay: codereview.stackexchange.com/posts/183427/revisions
 
5:01 PM
IT'S HAPPENING!
Holidays!
 
Is it a little late for secret santa this year?
 
5:53 PM
Your indentation is very odd and makes the code hard to read. If you ever get this code working the way you want it to I highly recommend making your way over to CodeReview.SE to have this code evaluated. I see ... issues — Matt 48 secs ago
 
6:26 PM
0
Q: Algorithm that finds an int couple within limit

Melissa LoosJava V8 Hey there, I have a problem with response time. The algorithm finds a number pair that is as close to budget as possible, and if there are more pairs with same value, the pair with the least difference shall be given out. My algorithm works correct, but far to slow. Do you have ideas to i...

 
TFL.
 
6:47 PM
I think it's because it's a question of whether to do one thing or the other, not how to do it. It is opinion-based, because that's all anyone can give you. I don't know if there's a specific forum for opinion-based questions. If there is, I'd go there all the time. I like to ask and answer opinion-based questions. Code review isn't a good fit because it has to be real code. — Scott Hannen 41 secs ago
 
6:59 PM
0
Q: Populating a container with dynamic pairs of connected sortable lists

PooshI am working on an application which is used to assign work to Operators based on the Category of the work. Each Operator has several Categories of work they are qualified to work on. They have a list of Categories they are assigned to work on, and this is a subset of the Categories they are qua...

0
Q: How to divide this sequential code into separate functions to make it clearer

OzzyWI have this code below that has 6 distinct parts: Necessary imports Get the top artists from a specific country using last fm api Get some info about this returned artists Get top albums from that returned artists Get some info about these returned albums Get tracks of each returned album Is...

 
Kaz
7:14 PM
Guys! We're less than a month from Jon Skeet @ 1M rep.
3
 
Will they nuke his rep?
 
Kaz
@Hosch250 Who knows. They got him a unicorn for 200k, I have no idea how they're planning to top that :)
 
Uh, OK.
Also, are they planning to top it?
 
Kaz
I would hope so. Feels like a pretty momentous occasion.
That was 200k:
 
7:40 PM
possible answer invalidation by self_learner on question by self_learner: codereview.stackexchange.com/posts/183351/revisions
 
0
Q: Return true from enumerable that calls function unless that function ever returns false?

user875234Is there a tighter way to write this code? foreach(var processName in processNames) { bool launched = launch(processName); if (!launched) { return false; } } return true; I'm not sure what this kind of approach is called. But basically if any false the whole thing is fa...

1
Q: Function for approximating a sine signal

Peter123I want to approximate a sine signal with a parabola, which is given by the function \$f(x) = 0.4053*x*(3.1415 - x)\$ for \$ 0 \le x \le 3.1415 \$ . In a first approach, I wrote the following code which works fine: float sin1(int phase) { if(phase % 1000 <= 500) { return(0.4053*2*3.1...

0
Q: LINQ median extension method for each type of numeric primitive or... just one for double with selector / converter or t4...?

EhouarnAll started with a dummy implementation of the Median operator with extension methods: public static partial class EnumerableExtensions { public static IEnumerable<TSource> AllValues<TSource> (this IEnumerable<TSource?> source) where TSource : struct { return source ...

 
8:18 PM
0
Q: At least 2 paths down the binary tree have the same sum

Jianmin ChenProblem statement Write a function that given a binary tree, returns true if at least 2 paths down the tree have the same sum. A path is a series of nodes from the root to the leaf. Examples: Example 1:   2  / \ 4 5 / 1 return true // 2 + 4 + 1 = 2 + 5 Exampl...

 
Please see Minimal Complete and Verifiable Example and include the *smallest possible code to reproduce your problem. Also, if you are just asking for your code to be reviewed then that belongs on Code ReviewJake Symons 25 secs ago
possible answer invalidation by 200_success on question by OzzyW: codereview.stackexchange.com/posts/183445/revisions
 
8:40 PM
0
Q: Link List Spit into Odd and Even

DexoboxProblem statement : Implement the following void split_odd_and_even(LL_LinkedList_t * pList, //![IN] : This is the input Linked List given to you. LL_Node_t ** pOddList, //![OUT]: This is the Head node of the Odd List to be returned ...

 
If you want the code and made efficient then this belongs on Code ReviewJake Symons 46 secs ago
I've posted an answer but I think this belongs on the code review section of this site — PillHead 8 secs ago
 
9:17 PM
If you have a working code then please consider Code Review SE. Avoid cross-posting. It would also help if you applied Capitalization rules where appropriate. — Ron 10 secs ago
 
9:50 PM
For efficiency improvements, I suggest posting a working program to Code Review. — Thomas Matthews 27 secs ago
 
10:00 PM
possible answer invalidation by self_learner on question by self_learner: codereview.stackexchange.com/posts/183351/revisions
 
0
Q: Create Immutable document property Mongoose & MongoDB

TJBlackmanI just want a property than can't be changed. If that's not possible without a library or some dependancy, than I guess I'd like a property that is only set once. Example: The date a user joined, or the date a blog post was first created. Both great examples of a data-attribute that probably sh...

 
10:17 PM
The same question was asked yesterday on Code Review: codereview.stackexchange.com/questions/183351 - It even has the same variable and function names. Are you two somehow the same user? — mkrieger1 55 secs ago
 
Questions on codereview are supposed to have working code, right?
 
10:52 PM
@Mat'sMug inspired by your answer, I decided to write on too! codereview.meta.stackexchange.com/a/8551/10983
@thesecretmaster yes!
 
Code that works but needs optimization should be posted on codereview.stackexchange.com If there is a specific problem with the code please indicate the line that is throwing the error. Otherwise it is too broad for this forum. — Scott Craner 20 secs ago
 
0
Q: Using a multidimensional array to create input elements

The CodeseeI have a list of <input> elements and I am trying to simplify it so the code is tidier and cleaner. Here is what I have at the moment: if($row['replies'] == '1') { echo'<input type="submit" value="English">'; }else{ echo'<input type="submit" value="England">'; } if($row['flagged'] == '1') ...

 
Factorio has been nominated for one of the Steam awards, 'Haunts My Dreams'. (...) The voting for this category opens on the 29th of December, at 10 AM PST, for 24 hours only. So if you are interested in voting for one of the entrants, be sure you can get to a PC on that day.
@rolfl @Mast @Vogel612 @Kaz @other-factorio-players ^^
 
Looking ..... just now starting up a 0.16 game for the first time.
 
Kaz
11:21 PM
I wish I still had the time to play factorio :(
 
@Kaz You always have time. It's about priority ;)
@rolfl I've been following the FFF's and I think there's still some planned features for 0.16 that they haven't released yet.
 
I wish I knew what that game is, but I am too lazy to search. :)
 
Yeah, I am somewhat disappointed by the fluid wagon re-do they just hefted out there. It likely won't affect me much, but.... still.
It's not so much about the change, but the way it was delivered.
The incomming features, especially related to logistics network, are things I am looking forward to. I just wish beacons could be circuit-network controlled.
@IgorSoloydenko - it's the sort of game where $20 buys you 4000 hours of entertainment,
(that's just my personal game counter.... I did leave the game running overnight a few times with automated defenses in position).
 
0
Q: Leetcode 10: Regular Expression Matching

Jianmin ChenProblem statement Implement regular expression matching with support for '.' and ''. '.' Matches any single character. '' Matches zero or more of the preceding element. The matching should cover the entire input string (not partial). The function prototype should be: bool isMa...

 
possible answer invalidation by Dexobox on question by Dexobox: codereview.stackexchange.com/posts/183458/revisions
 

« first day (1693 days earlier)      last day (2318 days later) »