« first day (1123 days earlier)      last day (3193 days later) » 
00:00 - 18:0018:00 - 00:00

00:00
RELOAD! There are 2380 unanswered questions (93.1158% answered)
00:50
possible answer invalidation by Clockwork on question by Clockwork: codereview.stackexchange.com/posts/129711/revisions
01:03
0
Q: I'm new smart pointer in C++, and I reimplement my Double Linked List with smart pointer

Joob LeeI need some suggestions on my reimplementation Double Linked List with smart pointers since I'm new to smart pointer in C++. I read some Doc. on smart pointers and found out there are shared_ptr, unique_ptr and weak_ptr. I only use shared_ptr on my current code, I'm not sure how to use unique_pt...

01:14
0
Q: Dynamic Django class based views for forms - Valid?

PythonistaI'm still fairly new to Django, so I feel that I may have approached this problem the wrong way. I more or less just brute forced the problem of being able to dynamically handle my form types. Additionally, I feel like some of my lines in the code to follow are a little questionable. Specifically...

01:29
0
Q: Shortest bitonic tour

MAGThis a solution to the shortest bitonic tour using dynamic programming. Bitonic tour starts at the leftmost point then goes strictly rightward to the rightmost point and finally strictly leftward to the starting point. The complexity of this algorithm is . I also use sfml to draw it (Just started...

01:50
0
Q: JavaScript: Memory Game

ZaneI'm trying to replace the A,B,C, etc. with math sums and answers. I would like to know how to make say "2+3" be a match with "5" This is my current code. Need ASAP. Thanks in advance :D Explanations would be awesome too <!DOCTYPE html> <html> <head> <style> div#memory_board{ background:rgba(24,...

02:31
0
Q: Java Snake game

tanu1215I am a self - taught coder, and have been learning Java / C# for the last 2 1/2 years (inconsistently). I have recently created a snake game in Java with the help of an online tutorial. I have rearranged the program into separate classes & methods. I am skeptical on how good of a programmer I am...

 
1 hour later…
03:46
0
Q: Converting app structure to ES6, am I missing something?

DominikBefore ES2015 we used to structure our applications roughly like this gist. It relies on factories and is a very modular way of building an app plus we got private and public methods and a basic debugger abstraction to work with. The files are concatenated together in a build step but are interch...

04:34
0
Q: String Reversal

funwithlinxWrote a practice code for reversing a string say. Input = "This is funny" Expected output = "ynnuf si siht" This code works for me. Want to know your comments and a better optimised way to perform this. void reverse_string(std::string input) { int N = input.length(); char buffer[100]...

 
1 hour later…
05:38
I'm voting to close this question as off-topic because this is basically a code-rview and should be posted on codereview.stackexchange.com — Scary Wombat just now
06:11
0
Q: using classes in ecmascript to remove switch/if-else ladder

Anubhav SainiHow do I use classes so that I can use polymorphism to avoid switch/if-else-if ladder? How can I make this code beautiful as per ES2015? Is the following code clean? Can it be cleaner? What other OO principle's I am violating? class ServicingVersions { toString() { return 'V'; ...

06:21
0
Q: Constructor which should assign and return parameters of a particular fish it creates. Does not complile

Alanpublic class Guppy { int YOUNG_FISH = 10; int MATURE_FISH = 30; int MAXIMUM_AGE_IN_WEEKS = 50; double MINIMUM_WATER_VOLUME_ML = 0.25; String DEFAULT_GENUS = "Poecilia"; String DEFAULT_SPECIES = "reticulata"; double DEFAULT_HEALTH_COEFFICIENT = 0.5; double MINIMUM_H...

0
Q: Choosing technology stack for a medium scale web portal based in Java EE

Mr. FlintI would like to work on a medium scale Java EE based web application for a web portal. What are the technology stack I should choose based on the following scenario: Limited data (25 tables, few of them contains around 10K rows) Max 1000 users will be using this application at a time Should be ...

06:39
0
Q: Tic Tac Toe Algorithm revisited

leoOrionI had previously submitted a tic tac toe code. I followed some of the changes suggested. This is my new code. var playerSym; var computerSym; var turnCount = 0; var playerWin = 0; var compWin = 0; var whoseTurn; var grid = []; var winFlag = false; var playerScore = 0; var compScore = 0; var win...

06:54
Also this #include "terminal_user_input.c" is not nice. Although not wrong, including .c from .c is a no-no by convention. There are rare cases where doing so would pass a code review. — alk 5 secs ago
0
Q: Excel sheet OOP task

nn4n4sI'm currently working on http://xp123.com/xplor/xp0201/ challange on creating spreadsheet like functionality. Currently my code is at the end of part 1, all tests of part 1 are green. What cant be improved in this code: <?php namespace Excel; class Sheet { private $cells; public fun...

0
Q: Making your own python file as a daemon process

Shilpi KayalI have my own python library which gets installed wide when I do this python setup.py install inside python project directory, it copies the executable file in bin also, but basically I am doing all this so that it can be run as a service and I should be able to include it in upstart or monit...

07:12
0
Q: Longest Increasing Sub-Sequence using Dynamic Programming in Python

DhruvI wrote the following function to find the longest increasing sub-sequence in an array (tuple, it doesn't work for a list since a list is mutable and it stores the results in a dictionary.). It uses Top Down dynamic programming approach. def LIS(seq, memo={}): if len(seq) == 1: r...

Monking all
@Quill Only in Australia.
@CaptainObvious Either close it or migrate it to SU, but it's not even remotely on-topic here.
07:30
In all fairness it should be in code review — Adam Copley 59 secs ago
07:44
Good to be back in the office
Monking
So that hard drive that I have that failed S.M.A.R.T. testing last night is passing it now.
Monking
@Quill Not sure what I am more impressed by, the attack or you reading the daily mail
07:59
@EBrown Magic
Or you know, you switched it off and on again. Which solves half the problems in the world.
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: SessionHandlerInterface Class
@Mast The other half can be solved by petting a dog or a cat
TIL: IPv6 does not support packet fragmentation
Spoiler alert.
08:25
0
Q: Generate meta tags for paging on views, refactoring needed for 'if else'

Hajrudin HajrulahovićI know this is a long code and hard to read but when i started working on this it was just a few if-s, and as time passed i added more and more and came to this. Tried refactoring it by my self and anything i tried to do had no effect on code. Switch statements don't work here( doesn't lower amou...

Zak
Zak
Monking @all
Sorry StackOverflow virgin...Will post in the codereview forum with the code inline — Harshal 31 secs ago
0
Q: My take on implementing the Repository Design Pattern in PHP

BeeelzeThe past few weeks I've been trying to grasp on nearly any Design Pattern ever invented, but the repository pattern is one I could understand and implement it myself in my project. My application uses the MVC pattern where I've got the "V" and the "C" part covered in a very basic way, and I want ...

Zak
Zak
@DanPantry Yep. This is pretty much my situation. Except (for historic reasons that may or may not continue much longer), I'm on, like, £10k less than you are.
08:43
@Zak how on earth can you survive in london on £18k lol
£18k was my entry level wage as a junior in the valleys
Salary negotiations always make me dizzy.
I've not actually negotiated salary before
Headhunters have done most of the work, when I've had raises they've just been given to me without me being given the opportunity (or need) to dispute
This Thursday will be an interesting interview because that's when I may have to negotiate for the first time
You're looking for a new job or for a raise?
I'm not looking for a new job in particular, or a raise
I was approached by Riot Games to work as a Security Engineer due to some of my comments on Reddit about the new alpha client
I have an interview on Skype on Thursday
I'm not sure I want to work as a security engineer but I'm going to entertain the possibility. They have a software engineer position in NodeJS in the same office, so..
Zak
Zak
@DanPantry A) Not in London. Close, but it makes a difference. B) With great difficulty and more than a little magic.
Plus, within a year, that should be very different (and if it's not, then all the goodwill in the world isn't going to stop me entertaining the option of going somewhere else)
08:52
@DanPantry Doesn't sound bad. A bit of diversity can do wonders for your career.
0
Q: Populate List View - Android Studio

Eugenio Finch PiccirilloI've a little problem with my code. I have a simple application that should collect data from SQLite database and print on a Listview, I'm currently use the way who implements a DataProvider, an Adapter and two layout, a listview and a layout for the elements of the list view, here the code Log...

0
Q: Java 8 code quality

HarshalRecently I did an exercise for a interview pre screening , but was not selected saying the code was not up to "what they wanted". Not much detailed feedback apart from this. Pl see the code below It would be really helpful to understand as to whether the code written is up to production standar...

@Mast Yes, but the job desc on their website (assuming that is the job they are hiring me for) shows a lot of tools that I've never used before, in a field I've never worked in or wanted to work in :p
I got into IT for code
Investigative coding is usually a requirement for Sec jobs.
Welcome unfamiliar faces :-)
Zak
Zak
@DanPantry Well, just make sure they know that, and let them decide if they want to offer you the job anyway.
Zak
Zak
08:59
@OlzhasZhumabek Welcome
I think your question better fits to Code Review Stack Exchange. Here (and on Code Review) you should at least include a complete example. This would help people to profile your application. — havogt 25 secs ago
Is coding challenge for summer out now?
If you're looking for loop unrolling, try a Duff's device. However, those have fallen out of favour at many places. If you decide to post it on Code Review, make sure you add a proper language tag. — Mast 14 secs ago
@OlzhasZhumabek Are you referring to ?
yep, I just lost the meta post
09:02
We don't have one for the summer yet, but feel free to solve an old one.
24
Q: June 2016 Community Challenge

EBrownI don't see one of these yet, so here's the question for the proposals for the June 2016 Community Challenge! (I skipped May, as there wasn't enough time to get a good pool of suggestions.) It's time to choose a community-challenge for June 2016. Post your challenge as an answer to this ques...

@EBrown Tomorrow is the first of June. Don't forget to accept an answer today/tomorrow.
It's unlikely the top answer will be surpassed.
@Mast thanks. btw I have an expiring bounty. Question got starred by 3 people, I believe I'm next or soon, but there are only 2 days left, so I'm worrying a bit.
@OlzhasZhumabek There aren't that many people up for reviewing C++ templates. The fact that it doesn't compile on one of the platforms you tried doesn't help either.
But there isn't anything wrong with our question AFAIK, so hopefully you'll get an answer soon.
Got it, thanks! btw should I submit it as a bug to microsoft connect if it turns out that the code is standard conformant? I'm not sure how to extract mcve for now, but will try to.
@Edward You know a thing or two about if I remember correctly. Got time to answer a bountied question?
@OlzhasZhumabek I'd try Stack Overflow for verification of the bug first, with MCVE of-course. A couple of Microsoft developers are active there as well.
Make sure you make it a nice question or it will be sifted with the crap too easily.
Would be a shame.
09:28
Thanks, I will transfer it to Code Review. Will delete it from here. Cheers. — Daniel just now
@Mast hang on, why did nobody tell me that meta doesn't have mathjax? or is that MJax for chrome that interferes here?
@Vogel612 Looks fine here.
hmm.. must be my mathjax then
@Vogel612 See?
phew.
09:34
So, to answer your question why nobody told you, it's because it's working for the rest of us :P
Slap your browser with a trout.
It's being silly.
soemthing like that..
Sidenote: I kinda dislike the Delimiters that CodeReview uses...
We're one of two sites that use \$
Math uses just $ (which is TeX)
possibly better would be \(\) like LaTeX
@DanPantry where did your pic go?
it didn't. it's still there
it's hosted on FB so maybe you're having issues connecting to that
@Vogel612 What other site uses \$?
@Mast EE
32
A: Which Stack Exchange sites use MathJax?

Ilmari KaronenThese sites support MathJax: Amateur Radio Astronomy Aviation Biology (with mhchem extension) Chemistry (with mhchem extension) Code Review (activated 2014-04-07, with \$ delimiters) Cognitive Sciences Computational Science Computer Graphics Computer Science Cross Validated Cryptography Data Sc...

Ah.
Zak
Zak
09:43
@DanPantry And, occasionally, MEta-MEta-MEta
No reason given for why we use this?
perl, probably
MathJax is currently enabled with $ … $ as delimiters. However, that breaks existing posts that contain two dollar signs within the same paragraph, but where the code is not formatted using backticks or a code block. We would like to change it to use \$ … \$ as delimiters, as on Electrical Engineering. Please refrain from using MathJax while we wait for the change. — 200_success ♦ Apr 7 '14 at 19:27
also of note:
18
Q: MathJax breaks my indentation

JaDoggSeems like there is a bug, that breaks my indentation. See In third code section of Create New C++ Class In first code section of Code Generator Generator multiple times in the code section of http://codereview.stackexchange.com/a/84104/ (Perl syntax naturally includes both \$ and $$). Thi...

Zak
Zak
Damned Context-Switching.
@Vogel612 I guess we'll just make the best of it. Some form of MathJax is better than no MathJax at all.
yeap
10:00
0
Q: create new array by filter origin array

Jenny MI use the following code which is working var aDuplicateId = []; //get the duplicated configuration indexs for (var i = 0; i < aConfigurations.length; i++) { //in case the index is the duplicate array skip if (aDuplicateId.indexOf(i) >= 0) ...

0
Q: NodeJS: Allowing Users to make changes to HTML page loaded on a Web-Server

DavideI created a program in JavaScript that loads on a web-server (NODEJS) an HTML page, now I want to make sure that users who access can make changes (write on the page). How can i do? Thank You.

possible answer invalidation by phos456 on question by phos456: codereview.stackexchange.com/posts/129702/revisions
@Duga gotcha
Ever so slowly, because my connection to SE is really slow today..
Seems that it'st he conection to the stackoverflow cdn that is so slow
Chrome is taking 5 seconds to load anything from cdn.sstatic.net
Don't use Chrome. Problem solved.
and yes, I'm perfectly aware that's not an option in your case
(curl is also taking 5 seconds to do so)
0
Q: Choosing Colors based on int - Java

AzazelIs it possible to make this cleaner/efficient? I know that this is probably not the best way to do this and probably could be made better but i cannot figure out how i do that. Thanks for the help. private Color chooseColor(int i){ Color Emerald = new Color(231, 223, 134); Color ...

10:11
Ahh, that's why
It's because I wasn't visiting SO/SE over HTTPS
no HTTPS = no HTTP/2 = chrome will only allow 6 consecutive requests
i mean, it's still taking ages, but at least now it doesn't choke as much
Also HTTPS means the firewall can't sniff the response whcih I presume is also eating up time :-)
@Duga dat repeat rollback
If he rolls back again, put a mod flag on it.
He didn't rollback.
They added the "fixed code" in a separate block
Technically he didn't, but it's the same effect.
Hmmm, no.
Never mind me.
It's still illegal though.
10:19
You wouldn't download a Code Review
Optimizing working code (which this isn't, see above) is for Code ReviewArc676 27 secs ago
I'm voting to close this question as off-topic because it is a question about how to make working code better (and not about solving a specific problem). It would probably be a better fit on code review. — Quentin 32 secs ago
@Arc676 Code has to be working also, and all the code must be given. This is off-topic for code review. — Tunaki 52 secs ago
I had 25 hours worth of tasks assigned to me on Thursday
@DanPantry I would and I actually did a couple of times.
0
Q: Unwrapping multiple inner loops in CUDA for 4D nonlocal filter

DanielI'm working on some sort of non-local means filtering in 4D space (x,y,z + time). The idea is to pass to GPU a chunk of large 4D array in order to process it and return a filtered 3D slice (then iteratively repeat the process for all 3D slices in 4D array). I wrote CPU and CUDA codes, however the...

@Arc676 I agree with you but there's no chance this question won't be downvoted to oblivion in Code Review as well. — Mena 54 secs ago
10:22
I've just gone through the feedback from the business and added those tasks to the sprint
THAR SHE BLOWS
@DanPantry Just send that to your manager and ask him what's wrong with the picture.
to be fair, if I still had 6 hours of dev every day it still would be 4 hours over (as that image doesn't include a 4 hour task I removed)
@DanPantry it was on my Twitter feed
@AdamCopley OP has asked about performance differences between Haskell and F#. Sample snippets of code in each language, proposed to be more or less equivalent, were provided. In benchmarking the sample code is critical, so obviously the samples will need to be discussed, tweaked, or replaced. But the question is not about the code and is not a request for code review. It would be totally off topic there. — Yitz 29 secs ago
Zak
Zak
@DanPantry I wouldn't steal a car, but I'd absolutely download a Bugatti Chiron if I could (and maybe a tank while I'm at it).
10:41
Monking
@DanPantry 56.25 of 32h??
@skiwi yep
@DanPantry [0; 1] overflow
dw, I'll be moving stuff out of the sprint and some of the tasks are conservative estimates
0
Q: Constructing XML classes

Danny GoodallBasically, all I have to do is read some xml from a file. And I have a working solution, although I am not sure that it is the best way of going about doing things, as I have only recently started working with xml. Any advice on how I could improve the following? [XmlRoot("iosLayout")] public cl...

11:10
@Zak There's probably CAD files available for both. Would that fit your specification? :P
You wouldn't 3d print a car? :p
5
> main.rs:79:3: 79:94 error: mismatched types:
expected `std::iter::Iterator<Item=(usize, usize)> + 'static`,
found `std::iter::Zip<std::iter::Map<std::ops::Range<usize>, [[email protected]:79:24: 79:44 self:_]>, std::iter::Map<std::ops::Range<usize>, [[email protected]:79:71: 79:92 self:_]>>`
And you thought that Java generics was difficult?
@skiwi is it rust alternative of templates?
@OlzhasZhumabek They call it generic type parameters, I'm not familiar enough with C++ to compare it, but something got out of hand in my case
you can pass closures (lambdas?) as arguments o_O cool
11:18
You can do anything you want as long as the compiler lets you :)
2
Sounds obvious, but you can for example only pass types between threads that are explicitly marked as safe to do that
it is really alien for me (I know only c++ and basic concurrency), though compiler level checking on safe structures seems to be cool
is there a way to exploit gpu in c++ other than cuda? Generating Mandelbrot set using cpu, even with multithreading, is going to be too slow. I want to write 2015 October community challenge
CUDA does seem the best way to me
Though directly going for OpenGL would also be valid perhaps? not sure though
cuda doesn't support vc++14 :( Will need to read openGL docs then, thanks. Time to write some shaders :P
why bad code is called spaghetti code? Never could understand the concept behind it
Shady business...
11:31
when you try and pick up spaghetti using a fork, you can never just pick up the lump you wanted to pick up
you always get extra bits coming with it and sometimes you get the whole pile
that's how I interpret it
Not all bad code is spaghetti code though.
also spaghetti is a tangled mess that is all over the place
yes, spaghetti code is just a type of bad code
other bad code includes untested code, heisenbug code, and morse code
I hate the markdown in this chat
@DanPantry I hadn't idea that it exists
I mean markdown
Heisenbug code looks really interesting, have anyone encountered that yet?
@DanPantry pull on one end and good luck trying to lift the whole plate on one Spaghetti
also, spaghetti code puts vomit on your sweater already.
mom's spaghetti code, mainly
11:34
@OlzhasZhumabek yep. Login stealing sessions from other users
it might make you nervous and your palms sweaty.
Behaviour never occured when trying to observe it
4
o_O it sounds sort of quantum tunnel
A heisenbug is a bug that you know is there and you can observe its effects, but you can't replicate it
3
and, I should have said higgsbugson, not heisenbug
thanks, got a bit programming terminology :P
11:38
0
Q: Project Euler #549

lucThis is the problem: https://projecteuler.net/problem=549. Quite mathematical, I've found a better way than brute force by using largest prime factor and greatest common divisor. It works fine when n = 100 but still very slow when n gets larger and far too slow to solve the problem. So of course ...

gonna write some openGL shaders, see you. @DanPantry good luck :)
11:58
Monking!
hey @syb0rg
	fn local_index_number_iter<'a>(&'a self) -> Box<Iterator<Item=(usize,usize)> + 'a> {
		let index_iter = (self.start_index..self.end_index).map(move |i| self.to_local_index(i));
		let number_iter = (self.start_index..self.end_index).map(move |i| self.to_number(i));
		Box::new(index_iter.zip(number_iter))
	}
This method really looks crazy lol
@Vogel612 Weeping angels
@skiwi Box<Iterator<Item=(usize,usize)> Why are you passing the same argument twice and why is there no space between , and usize?
@Mast It's a tuple (usize,usize)
@skiwi Oh, you're defining a function there.
fn local_index_number_iter<'a>(&'a self) -> Box<Iterator<Item=(usize,usize)> + 'a>
So let's deconstruct this
you're passing an iterator with the lifetime of the self arg..?
You mentioned in cardshifter that it was a iterator with a longer lifetime otherwise it gets collected cus it's on the stack
that function will return a boxed version of an iterator that yields a tuple of usize,usize that lasts for the lifetime as self
12:12
I'm returning an iterator with the same lifetime as self (self is a struct in this case)
That <'a> syntax is strange
I'm trying to figure out why I have to Box<> it, but it seems like otherwise the compiler cannot figure out the size of the iterator
I wonder if that's because of usize perhaps
hm
would it be because if you didn't box it you would be passing the value instead of a reference (for some reason)?
and that has some kind of limitation?
I have no idea what I am talking about BTW
Not exactly sure
@DanPantry It's okay, neither do I
@Mast I only got that, because I used to waste hours ovee hours on tvtropes. But yeah that might be a more appropriate name
Lucky one can sometimes automate the watching :)
12:16
@skiwi Reading why boxes are used, maybe it's to force you to use a box to prevent yo ureturning a (potentially large) data structure
If everything is a value type by default then your sequence could be huge, boxing it up would prevent copying it
So the error message would be obtuse but it would be a "don't do that" slap on the wrist sort of thing
Damn, @Skiwi has cost me my evening now I'm going to go down a rabbit hole learning Rust.
3
It looks really cool, though..
And unlike some other languages (*cough* Haskell) it looks like it might have some practical applications
It gave an error earlier that Iterator is not Sized (Box is), but I don't know why the for in loop wants Sized
@skiwi you'd need to know the size of something to iterate it, I guess?
@skiwi Box puts things on the heap.
Stack would be collected after the scope ended.
Not sure if that has anything to do with it
back to work ^^"
I think I don't know :)
After my code works I should really refactor it though to use additional methods
12:46
monking
@Malachi Monking!
aight there we go. ScriptSafe antisocial feature is kinda awesome
Really? :) :(
> Compiling sieve_multithreaded v0.1.0 (file:///C:/Users/Frank/Dropbox/workspace/sieve_multithreaded)
error: An unknown error occurred
but if it blocks profile pictures from facebook, I'll have no choice but to remove it
@skiwi TIL your IRL name :p
12:57
Hmm, actually I'm unsure if the compiler had an unknown error now or my program
@DanPantry just check github next time :D
@Vogel612 ¯\_(ツ)_/¯
> error: Access is denied. (os error 5)
chmod time
unless you're on windows, then its crying time as you have to close every window to work out which has the lock
(it's probably sublimetext)
I'm not even sure what could be having the lock on what :/
13:00
First-class testing support? awesome
@skiwi it might be SublimeText if you're using that. It happens to me occasionally
pub fn add_two(a: i32) -> i32 {
  a + 2
}

#[test]
fn it_adds_correctly() {
  assert_eq!(4, add_two(2));
}
There was a cargo.exe (Rust package manager) still running in the process, killed it and it solved it
omg rust is awesome
x)
it providing testing out of the box (without being coupled to an IDE.. cough, VS) is great
i mean, node has an assertion library but no test runner
It's probably because I don't actually ever close my program :)
Not too long ago I was working on code, upon second look I'm working on spaghetti
2
13:24
Optimisation questions are more suitable for CodeReview website... — Alex 44 secs ago
0
Q: How to copy data from excel files stored in folder to Word, by only specifying the folder location?

user106780Hi I'm using the following code to copy data from Excel to Word (found online): Sub CreateRapport() Dim wdApp As Object Dim wd As Object On Error Resume Next Set wdApp = GetObject(, "Word.Application") If Err.Number <> 0 Then Set wdApp = CreateObject("Word.Application") End If On Error GoTo 0 ...

Zak
Zak
13:39
Pro: After an hour of performance-profiling, I've managed to reduce runtime by ~70%.
Con: All my outputs are empty.
3
0
Q: Monopoly Simulator (Python)

ohjunyI was advised by a Reddit user to get my code reviewed on this forum. This is my very first post, so I don't really know what to expect! Anyway, here's the code: https://github.com/ohjuny/monopoly_simulator # Monopoly Simulator # http://img.thesun.co.uk/aidemitlum/archive/01771/Monopoly2_177174...

0
Q: Iterate through a collection of JavaScript Objects using for

brunoddI have a function that iterate through a collection of JavaScript objects in order to get each object in the array. However if I want to iterate through each object in the array do I always need to have a "test" function inside the for loop like I am doing on my code? If so, why do we always need...

@Zak aka:
Zak
Zak
@CaptainObvious VTC. Wants us to extend somebody else's code.
Pro: my code runs faster.
Con: it doesn't work.
5
There is a seperate stack exchange site for such questions : http://codereview.stackexchange.com/tafa 38 secs ago
I'm voting to close this question as off-topic because it belongs to code review site — tafa 51 secs ago
13:47
Does anyone else ever just look at some code and wonder "...why"?
@syb0rg Every time I see @DanPantry attempt to code
@Zak lol :/
@JeroenVannevel =.=
I don't attempt. I succeed with brilliance.
hohoho banter banter
@syb0rg I have that at every line of Rust I look at right now
Zak
Zak
13:48
@syb0rg It's all my own code, so all the time ^^.
Find the error: pastebin.com/dsN9P1T2
Is there any problem you are having? If your code works and you want suggestions on how to improve it, go to CodeReviewVince Emigh 37 secs ago
Or should I name it "Find the errors"?
pastebin is blocked at work
This library I'm using for work makes you include about 5 different headers (all of them dependent on one another), instead of defining one that the end developer using the library would just include
(Don't mind all the panics for now)
your code needs to chill
Netflix and chill, in fact.
@syb0rg So make a new header which includes the relevant headers. Problem solved ^^
13:55
@Mast Yep, I did
But the point is I shouldn't have to
@CaptainObvious One more VTC.
@skiwi Helpful...
I expected more from Rust.
@syb0rg When life gives you lemons, make lemonade.
@Mast Actually the Cargo tool is to blame, seems like you cannot execute Cargo twice concurrently
@Mast Or squirt it in my eyes cause this code sucks
@CaptainObvious Holy mother of global variables.
Probably the Cargo.lock file gets locked during use
14:00
Oh my, you really need help. This is awful. Welcome to Code Review! — Mast 6 secs ago
@skiwi Who's Cargo and what's he doing with your Rust?
This is odd... 51 + (2 - (51 % 2)) returns 102 instead of 52 in Rust
@Mast Cargo is the build tool
I shouldn't blame Rust, I should blame myself for not writing unit tests
2
14:20
0
Q: c# UWP scan for music files

DarksodyI am implementing a music player for windows 10, and i am in a bit of a pickle at the library phase. I am scanning for all the files in music library (plus optional folders the user selects) and i need to also get their tags (only need the title and artist, don't need complex details). The prob...

0
Q: Skip channels in haskell

nicolasIn the Concurrent Haskell Mvar documentation there is an exemple with the implementation of Skip channels A skip channel is a pair of MVars. The first MVar contains the current value, and a list of semaphores that need to be notified when it changes. The second MVar is a semaphore for thi...

14:51
wtf
my vs is just broken and won't start FML
36
A: Problems occurred when loading the Microsoft Visual menu

Chris HawkesSOLUTION The way to resolve this issue is by editing your System Environment Variables. In my case my System Path Variable had a string which was over 2048 characters, which apparently causes random path haywire at unpredictable times. By making sure this is below 2048 characters, it will sol...

LOL
ARE YOU KIDDING ME WINDOWS?
3
That's why, it stopped working after I installed Rust, which must have kicked it over the 2048 limit.
oh, also, rundll32 no longer works either.
Ah, the 2048 limit... That's a fun one
I have a %PATH2% environment variable and %PATH% includes that one
just wtf?
why is that limitation even in there?
Windows
Maybe CodeReview instead of StackOverflow then — FirstStep 41 secs ago
jesus
so stupid
15:00
0
Q: C# Linq and foreach performance

EmaborsaI wrote the following code: var xmlArray = from m in (from row in data select row.Mitarbeiter).Distinct() select "<Value Type='Text'>" + m + "</Value>"; var xml = string.Join("",xmlArray); Then I noticed there are two iteration (two from) and also the Distinct() and I rewrote it...

@DanPantry So, nothing out of the ordinary?
@skiwi 2048 what?
characters
Zak
Zak
@skiwi 2048 characters doesn't seem so unreasonable for a path limit.
@Zak It isn't, I had lots of duplicates
However the reason it's annoying is that nothing was telling me what wasn't working
and I mean rundll32 literally refused to work
which is ac ore process
I will consider CodeReview , and possibly do the opposite. — Pingpong 31 secs ago
15:10
0
Q: Time conversion program optimization

HikariI have just finished working on a problem on hackerrank dealing with time conversion in C++. I'm still fairly new to programming as I only have a few semesters of programming classes under my belt and had a pretty challenging time with this program. Below is a link to the problem itself and m...

15:20
0
Q: Find common items between two collections, and set values in one collection when matched

PingpongI want to find common items between two collection, and set values from one collection to another collection. I am aware of similar posts on the web, but they are different from this post. I want to know if there is a better algorithm or method than my current code below class Job { public J...

15:41
@DanPantry Got it sorted out now? How many relevant numbers characters remain?
@skiwi Neat hack.
0
Q: Rails validating enum

Chris CireficeThe Ruby on Rails framework doesn't allow you to validate enums submitted through a form in any sane manner. Evidently, enums are meant to be used to maintain internal application state, and are not supposed to be user-facing. Well, in my case it doesn't matter too much, but I still want validati...

The site to get your code reviewed is: codereview.stackexchange.comLoki Astari 35 secs ago
16:04
Greetings, Programs.
Zak
Zak
Latest Commit Message: "It Works!" ^^
0
Q: The Dick and Jane Problem from Kattis

GiggsThe problem is as follows: Dick is d=12 years old. When we say this, we mean that it is at least twelve and not yet thirteen years since Dick was born. Dick and Jane have three pets: Spot the dog, Puff the Cat, and Yertle the Turtle. Spot was s years old when Puff was born; Puff was p ...

16:27
0
Q: A tag for "Universal Windows Platform" that doesn't exceed the 25 character limit?

BCdotWEBI noticed that this question's title started out with "UWP", which stands for "Universal Windows Platform". Chances are such questions will become more frequent, and thus it could be useful to have a specific tag for it (like WCF and WPF etc.). Unfortunately, "universal-windows-platform" exceeds...

You might get better responses by posting this question to the Code Review site. codereview.stackexchange.comBradley Uffner 21 secs ago
0
Q: Balanced Bracket Algorithm (Recursion) -New Method

SARTHAK MEHRAS, I have tried out my own new balancing algorithm using recursion. The function parses through a string and when a new opening bracket is encountered,it calls itself using the latest encountered bracket as the new comparing bracket (hence fulfills the property of stack LIFO).Now if a closing br...

16:48
0
Q: Not able to Quit the GUI

Pranavfrom tkinter import * class Any: def __init__(self, master): frame = Frame(master) frame.pack() self.b1 = Button(frame, text = "any", command= self.printSomething) self.b1.pack(side = LEFT) self.b2 = Button(frame, text =...

0
Q: PHP store data from form into MySql DB

RobinThis is the first time I've tried this. I'd like some feedback on how I did, including any bad practice warnings. For example is it a really bad idea to allow the code to recreate the table if it doesn't "think" it exists? Would it be better to simply create the table once in a different file? <...

17:05
possible answer invalidation by 200_success on question by Harshal: codereview.stackexchange.com/posts/129744/revisions
17:25
0
Q: dice roller in python

chicksI'm trying to get better at python and so I decided to rewrite my dice roller in Perl into Python. #!/usr/bin/env python """roll D&D dice""" from sys import argv from random import randrange import re if len(argv) < 2: raise ValueError("args are dice in D&D format like 2d6") for roll in a...

@Mast Done.
I guess it'll be pretty hard to get more than 20 votes before the end of 31 May
Yep.
Else I could add Parallel Sieve of Eratosthenes :P
Wait until next month.
Tomorrow I'll put of a CC request for next month.
17:33
Single-threaded calculating the first million primes take 0.4 seconds and multi-threaded over 8 threads it takes 0.6 seconds
For 10 million it takes 2.8s single-threaded and 4.4s multi-threaded over 8 threads
0
Q: To solve a problem using stack

JuttaI meet a question : Description In this station, A is the entrance for each train and B is the exit. S is the transfer end. All single tracks are one-way, which means that the train can enter the station from A to S, and pull out from S to B. Note that the overtaking is not allowed. Because the...

@CaptainObvious What's that language, Stack?
100 million primes take 28.7s single-threaded and 41.5s multi-threaded over 8 threads
wat
It's not compiled with release though I just remember
Maybe threads in a debug build cause it to be even slower
0
Q: Sanitized input for subprocess with shell=True in python

LafadaI have python script, which has code. ... ... p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) output, error = p.communicate() ... ... When I run bandit it gives error. >> Issue: [B602:subproce...

17:48
@skiwi any idea why installing cargo on windows might not work?
Dan@dan-gaming MINGW64 /d/home/dan/projects/danpantry/rust-playground (master)
$ cargo search mio --verbose
    Updating registry `github.com/rust-lang/crates.io-index`
error: failed to update registry github.com/rust-lang/crates.io-index

Caused by:
  [2/-3] Could not find 'C:/Users/Dan/;C:/Users/Dan/;C:/Users/Dan//.gittemplate/' to stat: The filename, directory name, or volume label syntax is incorrect.
this is in mingw. I know why the directory find is failing, but, I have no idea what that path is in the first place
With optimizations it's 0.9s on single-threaded and 2.5s for multi-threaded using 8 threads
Let's change to Cardshifter for that @DanPantry
00:00 - 18:0018:00 - 00:00

« first day (1123 days earlier)      last day (3193 days later) »