« first day (1183 days earlier)      last day (3130 days later) » 

00:00
RELOAD! There are 2608 unanswered questions (92.8119% answered)
00:11
0
Q: PHP: Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) or variable:::

GeorGiosWhile I was attempting to create a simple CMS, I fell to an unexpected error (for no reason): Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in /Applications/XAMPP/xamppfiles/htdocs/content_...

My reputation is a perfect 1024 :-)
2
Finally, dark-mode across Windows: winbeta.org/news/…
I hope it can change the white background of my browser to black for night usage.
Zak
Zak
@Hosch250 f.lux
Flux is great, and they just added a native version to iOS
Oh well.
Anyway, never heard of that.
Darkroom mode is nice and black.
00:32
Aww not perfect anymore
For those like me who wondered how to use __has_include for the purpose of experimental to std transitions, see [ this code review question](codereview.stackexchange.com/q/136350/49895) (disclaimer: I posted that code review question) — Justin 52 secs ago
01:29
-2
Q: How do you compute the size of the tree at any given depth?

yummyyenniIt should be the case that for any given k. The number of nodes in the tree, at exactly depth k include node n if depth(n) == k. This is what I have so far but its not passing my tests: public static int sizeAtDepth (Node t, int k) { if(t == null) return 0; if(k == 0) return 0; retu...

01:46
Are you having any actual problem with the code? If not this may be a better fit for codereviewJGreenwell just now
02:10
possible answer invalidation by Mantracker on question by Mantracker: codereview.stackexchange.com/posts/136276/revisions
02:43
0
Q: Cleaner way to implement stable matching implementation?

SamI'm trying to implement the following pseudocode to check if a matching is stable and return 'Yes' is stable and 'No' if unstable: Pseudocode The parameters of the function are: numbers = This is the amount of couples. For e.g. 3 menPreferences = This is a dictionary containing each man's(key...

02:54
0
Q: Add numbers in array without adding adjacent number

user1771137this is first time I code reviewing and would like feedback on coding in industry standards as well review to optimum code. This program adds number in array in two format: first it does by adding adjacent numbers in serial manner as proof for the actual sum to refer with required output. Secon...

03:11
0
Q: a todo-list practice code accepts title and list

FATZOMBIi am new to OOP principles and best practices, people often say i write "upythonic code", give me your perspective on how to do things or code better? class TodoList(object): def __init__(self, title=None): self.title = title self.items = list() # depend on _list, accep...

03:59
For those like me who wondered how to use __has_include for the purpose of experimental to std transitions, see [this code review question](codereview.stackexchange.com/q/136350/49895) (disclaimer: I posted that code review question) — Justin 1 min ago
For those like me who wondered how to use __has_include for the purpose of experimental to std transitions, see this code review question (disclaimer: I posted that code review question) — Justin 38 secs ago
04:35
Zombie rate goes up.
04:48
I really should go get my silver C# badge.
It would be a good thing to mention for interviews.
BTW, the starwall looks absolutely idiotic.
0
Q: Follow up: Implementation of a generic Stack in C++

MantrackerThis question is a follow up to the question posted here. From the answer in that question, I've improved my implementation and would like another code review. I've made a myriad changes including but not limited to the use of unique pointers, adding constructors for Node and fixing the destruc...

We aren't the only ones to use the s// shortcut: github.com/dotnet/roslyn/pull/12644#discussion_r71999024
And, for anyone interested in Jon Skeet, here is an issue on Roslyn created by him: github.com/dotnet/roslyn/issues/12680
05:04
0
Q: Check if a string is palindrome using stack and queue methods

Malek Duramanwhen i try to run..it's ok..but i used the predefine stack and queue and now i had to use methods instead of predefine int main(int argc, char *argv[]) { stack<char> *st; queue<char> *qu; string enter; string::iterator i; cout << "Please enter a word: ";...

0
Q: Wilson Primes Calculator

James.BI've been trying to get my c code to calculate all wilson primes which are all numbers that answer the equation ((p-1)! + 1)/(p^2) with a whole number. I didn't think that there was a preexisting math function to calculate factorials so I wrote my own at the top of the code below and did the rest...

05:36
0
Q: Extract specified field value from filename using positional indexing

HatshepsutI have some filenames, and they each have data contained in them at specific locations in the string. I want a function that returns the value of the data specified by field. The docstring illustrates. I just don't find this very elegant, so I'd like a nicer way to do it. Also, I'd like to be a...

06:01
0
Q: A copy function in Python to optionally copy-and-replace

mattkaeoI'm writing a function to report file and folder copy errors. For now exceptions are being printed but they will be eventually sent to a database. I tried to refactor the error checking code with recursion, but this feels over engineered. Would someone else reading this code wish it wasn't recu...

06:21
I'm voting to close this question as off-topic because it belongs on codereview.stackexchange.com. — Frank van Puffelen 55 secs ago
 
1 hour later…
07:49
@Hosch250 Yesterday was a Friday.
0
Q: RAILS: preventing the duplicate submission of an object.

GhostRiderI have a rails app where doctors score patients on diagnosis - their score is the model Baseline. Each Baseline has a user id and a patient id and there should only be one baseline for each patient by a user. Very occasionally I have noticed that a user may create a new baseline (at which point h...

Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: jQuery toggle buttons to show matching content in sliding panel
08:34
GREETINGS, MINIONS
Oh wait it's not friday anymore
0
Q: how to redirect page to main

RobertI'm using framework7 with Android studio. I would like to understand how to create a new HTML page and auto direct it from intro screen to index page within 3 seconds thankyou in advance. ... ... setTimeout("window.location='#index'",3000); <div class="page navbar-fixed" data-p...

0
Q: How to merge some fields of second array into first array after comparing the values of keys common in both arrays?

MirsaidMy question sounds bit confusing but actually it's simple. Let me describe you the scenario first. I've two arrays viz. $al and $count. Both the arrays generate dynamically depending on the user input. So for instance I'm printing below the contents of both of these arrays: while ($i<=10) { ...

08:52
@CaptainObvious Nope.
09:03
Monking
09:15
> Never let a software engineer name something that will end up lasting.
... okay so no hotlinking, but the first picture in the article pretty much told me what level of expertise it was written for
0
Q: Is it ok to ask for code review of a git repository that I have developed?

NgmI was wondering if it is ok to ask for code review of a git repository that I have developed? I have developed a library for circuit breaker pattern for async functions in C# and I wanted to submit it for code review. Is it ok to post it?

@StackExchange Dupe.
I still need 23 answers for silver Discussion...
09:32
OK @Peter Lawrey that's a fair point but is kind of irrelevant to the question I'm asking. I "love it" when people on stackoverflow nit pick over minor details. I wasn't looking for a code review....just some help :) — kellzerIrl 56 secs ago
10:05
0
Q: Trouble in modifying last element of a std::list

Aditya pratap singhI am trying to modify the last element of a list of integers (mylist) as //0 1 2 3 4 5 list initially list<int>::reference p=mylist.back(); p=p+10; //Now iterating over the list gives //0 1 2 3 4 15 Using the above code I get the job done but when I use auto it doesn't change the...

10:31
Free flags:
-3
A: Binary Multiplication in C

dranrebCan someone change it to java language i need it badly, thanks in advance sir~

10:56
fun with flaaags
0
Q: Trailing zero's in factorial: SPOJ FCTRL: Python

Jubin ChhedaIn trying to answer SPOJ Question FCTRL, which effectively asks that given a number, find the number of trailing zero's. I tried several test cases and the code seems fine to me but the online judge seems to be rejecting my submission as wrong answer. Any suggestions on a fix are much appreciated...

@CaptainObvious Nope.
11:20
@Pimgd Did someone say flags?
11:32
I'm voting to close this question as off-topic because Stack Overflow is not intended for full code review. (See the other Stack Exchange sites to find channels where code review is on topic.) — Bobulous 14 secs ago
Monking
11:47
Monking
0
Q: Implemeting strategy pattern with multiple variables?

Siddharth TrikhaI am trying to implement Strategy Pattern for handling my content serialization and deserialization. So I have four kind of requests namely CREATE, RETRIEVE, UPDATE, DELETE and for each request I want to serialize/deserialize the request and response content. public interface ContentHandler{ ...

1
Q: Check if an Array of Arrays contains a value in node js

Tolani Jaiye-TikoloIn C#, I could check if any of the nested List collection has a value. Example of such structure Check a List[]> contains a value using Linq List<int> a= new List<int>(){ 2, 2, 3, 4, 5}; List<int> b= new List<int>() { 2, 2, 2, 6 }; List<List<int>[]> c = new List<List<int>[]>(); c.Add(new[]{a,b})...

12:24
1
Q: Stack overflow index page point to Videos

utilityIt was obvious to see error page when index.html was appended with http://stackoverflow.com/ But when i navigate the url to http://stackoverflow.com/index.php , it is redirecting to YouTube Why is that redirecting to youtube page rather a error page ? Browser : Google Chrome Edit 1 : A...

Ahahaha
12:47
1
Q: Steganography with AES encryption

nukeopI created a small program that hides arbitrary files in png images using steganography - it encodes the files in the two least significant bits of every channel, so using a 4-channel png we can encode one byte per pixel. I also wanted to hide the presence of secret data by encrypting it, and, in...

12:59
0
Q: Move a malformed page-break div to the body element

NishantI get malformed HTML input page-break divs inside other HTML Elements like the html_string variable in the below code. As this is not valid HTML, HTML Parsers gives me unexpected results. Hence I am trying to re-position the page-break div to the body element by reading it as an XML initially us...

13:45
0
Q: Asynchronous DB data retrieval and asynchronously posting it to Queue using RxJava

ViChUI am testing an operation where I read data from DB and sent it asynchronously while I also post the received data to a Queue asynchronously using RxJava. I have somewhat ( dunno if this will work ) accomplished this using mock techniques but I just want to know if this will actually work in a re...

13:58
I used BeautifulSoup and wrote a code to achieve my goal codereview.stackexchange.com/questions/136402/…Nishant 36 secs ago
14:46
0
Q: Emulating super() in Python 3.x using Python 2.7

sun qingyaoDepending on the name of the first argument, self.__sup or cls.__sup behaves like super() in Python 3, while this code is written in Python 2.7. It works for both ordinary methods and class methods(static methods don't use super()). See my code for detailed examples: class mySuper(object): d...

Monking...
or so
0
Q: A very basic inventory app with search in Angular2

Hassan AlthafSo, I have been learning TypeScript and Angular2 and I came up with this: import { Component, EventEmitter } from '@angular/core'; import { bootstrap } from '@angular/platform-browser-dynamic'; class Product { title: string; imageUrl: string; price: number; constructor(title: ...

15:19
0
Q: Tetris in C, in 200 lines

Najib GhadriI aimed at making a fully functional (real) tetris, in the shortest way possible in C. Result is a terminal game for linux, that uses ncurses. I made it for my friend, who wanted to play it on his arduino with led matrix. Before doing it I browsed for the sortest tetris codes so far. Found the 14...

15:29
> void Halleluyah_Baby(){ //checks lines
4
15:42
@200_success The naming is odd with this one.
@200_success TS
@zyabin101 RSA.
@Hosch250 Thanks :3
I have a hard disk in my PC (not a physical one) and I've never added it and cannot get access to it
wat
It's a whopping 96,0 MB big
@skiwi Every hard disk is physical.
Got a picture with that?
15:57
@Mast This one is probably a partition of something, but it's not mine
If it's your computer, it's your partition.
The G drive is not mine, I don't know where it comes from :D
That's an odd place for a local drive.
^that ...
What does Disk Management say?
15:59
Did you install Windows recently?
monking
That looks like it might be a partition with the ISO or something for if you ever want to reinstalled.
@Hosch250 Hah, yes, he recently upgraded to Win 10.
I don't know exactly how they work, but mine looks similar.
That's an awfully small ISO though.
16:00
Huh, yeah. My backup partition is 3.33 GB.
That's mine. All those unnamed are ext and swaps.
Let's see, I've seen that too.
@Hosch250 I upgraded to W10 a few days ago
@skiwi What's the name of your < 100 MB partition in Disk Management?
Something about when you reinstall Windows, it leaves a ghost partition like that from the old installation, or something.
16:01
Or the type, or whatever, show the entire row.
However, it is always cleared from the File Explorer, so that doesn't make sense.
That's probably what those unnamed drives are, though.
Try ejecting the G: drive and see what happens.
every win OS comes with a 100mb partition
stop trying to mess with it
Trying to find Disk Management in W10 on Dutch version :D
dskmgmt.exe
16:02
But mine doesn't.
@skiwi Why did you get the Dutch version :P
Mine has a 668GB partition and a 28.5GB partition.
Schijf onderhoud?
@Mast Because I made a mistake
4
diskmgmt.msc
16:03
@skiwi I do that all the time.
@Hosch250 It doesn't exist in there :D
Only one 300 MB, one 100 MB and my C and D drives exist
@skiwi What does the row say?
Status will tell the partition type for example.
@Mast It doesn't exist in that overview
Whether it's boot, EFI, back-up, etc.
@skiwi In that case you should probably reboot your computer and pray the ghosts go away.
16:07
:D I'll check tomorrow
I probably summoned Chulthu yesterday :/
4
Maybe it's a partition that stores all my open tabs in Firefox
@skiwi Nah, it would be bigger if it was.
16:40
@Mast Nah, it would be smaller.
It would just store the URL's in string format with a linebreak between them.
Even 1k URL's wouldn't be that big.
16:54
0
Q: jQuery Plugin Modal, help understand Object Oriented Javascript

DasBeastoI'm working on creating a new jQuery modal plugin. I'm pretty good at jQuery but still pretty new to the whole object oriented plug-and-play style of plugins so I used a different plugin I found online and ripped it apart using it as a foundation to build mine. However I don't feel like I'm takin...

@Hosch250 If only the urls are stored, yes. If the full pages are stored, no.
0
Q: Morse Code Translator in a GUI

Dylan BlackI made a morse code translator with a GUI which I made in eclipse's WindowBuilder. It works, but I feel like things are very wrong, because things don't show up until I click in it or hover over where it should be. Please tell me if my code does anything wrong! import java.awt.event.ActionEven...

18:04
Stack Overflow is for specific programming questions. If you'd like advice on how you've written your code, you might try Code Review. — Polyov 32 secs ago
Hi Josh. This question as-is is off-topic here. SO is for getting help with specific code-related questions (eg: "this is my snippet of code, but on line X, I can't figure out why Y isn't doing Z. I've tried this, that and the other"). It's not meant as a code writing service, code review service or overall "why doesn't this program work". Please see SO rulesstevieb 47 secs ago
This may be on-topic for Code Review, assuming A) the code works and B) the code isn't hypothetical or incomplete in any way. If you decide to post on Code Review, please read the on-topic guide before posting. — Quill 42 secs ago
imma not wait on captain O
0
Q: Fighting f̶i̶r̶e̶ regex with f̶i̶r̶e̶ regex

Vogel612So someone requested a Regex Builder / Assistant for Rubberduck and since my CS class had been covering the topic only recently I was thinking to myself: "This sounds interesting, you should do this". Long story short, a day of designing and a weekend of implementation (and some more polishing) ...

@Vogel612 converted from Java to C#.... the transition is nearly complete
You do know that I'm back to Java currently? (Though I try to get away from that abusive relationship)
oh..... ;-;
18:19
also it's near-impossible to develop C# without ReSharper
VS only supports the most basic of refactorings
and I really hate the notion of a language-supported IDE collapsing mechanism that is the abomination of #region
2
Q: Fighting f̶i̶r̶e̶ regex with f̶i̶r̶e̶ regex

Vogel612So someone requested a Regex Builder / Assistant for Rubberduck and since my CS class had been covering the topic only recently I was thinking to myself: "This sounds interesting, you should do this". Long story short, a day of designing and a weekend of implementation (and some more polishing) ...

18:43
10
A: 2016 Moderator Election Q&A - Questionnaire

CodeNewbieDISCLAIMER: This is simply a set of mock funny answers to the questionnaire. I am NOT contesting the moderator elections and I urge you to read the answers posted by the serious contenders before reading this answer for a few laughs. Any light jibes or attacks at moderators or SE staff are simp...

@CaptainObvious I should've waited to post this on a monday or so.
near guaranteed HNQ
@Hosch250 For a second I thought this was posted by CaptainObvious, I was very puzzled.
19:11
thanks for the edits @forsvarir :)
0
Q: Can I simplify this code further?

adele dazimI am trying to get all the master nodes in an elasticsearch cluster using this code. Can I reduce/simply this or optimize further? #!/usr/bin/env ruby require 'elasticsearch' client_node = ARGV[0] client = Elasticsearch::Client.new host: client_node clients = client.nodes.info process: true ...

19:35
@Vogel612 the sad thing is, I searched twice before I was sure it was a typo and not me just missing a class name...
19:49
Welcome to Stack Overflow! It seems that your code currently works, and you are looking to improve it. Generally these questions are too opinionated for this site, but you might find better luck at CodeReview.SE. Remember to read their requirements as they are a bit more strict than this site. — FrankerZ 8 secs ago
@skiwi this looks like the 100 MB drive windows creates for system purposes (the system volume information partition)
0
Q: My first ruby code - using BBC iPlayer API

WelshGandalfI have been learning Ruby by reading books & tutorials, and practising some problems on codewars to level-up my new skills, when I had an idea for a little Ruby code project. It will store programmes you like watching on the BBC iPlayer website, and list upcoming episodes, using an API (link is i...

0
Q: Javascript OOP design

LeonIn the process of teaching myself javascript. Starting to branch off into oop designs and did not want to continue until I knew I was doing it correctly. Correctly meaning, is this a common or accepted way of declaring an object in javascript, along with it's constructor and methods. Also any oth...

@CaptainObvious
auto completion is hard
@Pimgd begginer to english or that language?
It doesn't matter, it's a fail when it comes to thinking
20:00
possible answer invalidation by Najib Ghadri on question by Najib Ghadri: codereview.stackexchange.com/posts/136406/revisions
0
Q: Replace EOL in stream

DoomStoneI have replace the windows EOL "\r\n" with just "\n", and i want to this in the fastest way possible, as the software will have a lot of files to upload, and many of them with a few thousands lines. UnicodeEncoding uniEncoding = new UnicodeEncoding(); using (MemoryStream newStream = new MemorySt...

20:19
"Please show better version of this method?", try codereview.stackexchange.com — Peter Rader 36 secs ago
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: XML/HTML batch generator
Shouldn't this question be moved to SE:Programmers or SE:Code review ? — LosManos 1 min ago
Opinions?
Since it's not clear whether the code present does solve the actual problem and it's acutely robbed of actual implementation because everything is a stub, I've voted to close this question as "hypothetical". After all the code will hopefully not just grab Strings from the database. Nothing in the code suggests that it could easily connect to a database and perform it's actual task. As such reviewing the current code is basically meaningless :/ — Vogel612 1 min ago
20:47
0
Q: 9x9 sudoku solver

MarsI wrote this in C++ in february and am planning on adding a generator to it, but before I do that I'd like to get input on how to improve what I've done thus far. It's 423 lines, so I'm just going to post a link to bitbucket for the sake of this post not being enormous. https://bitbucket.org/oak...

20:59
@CaptainObvious Can Be Reopened.
@Mast halp
> 3,527 points (90% upvoted)
I can think of one reason why this was upvoted so high, and it's not because of the beauty of the data. never change reddit.
0
Q: Google Foobar Challenge: Spy Snippets in Python

Animesh PandeyI am getting all the answers correct. But still the solution is not accepted as only 4/5 tests cases are passed. I have not posted the whole problem statement but the problem is similar to this. I want to know if there are any more optimizations possible. import sys class Queue(object): ...

21:25
@DanPantry Æ?
@N3buchadnezzar ae?
@DanPantry eh?
Requesting CVs:
See, actually I am going to implement this with actual calls to the DB and a Queue. Since, I am learning RxJava and wanted to implement that, I did a mock up of the whole process. I just wanted to know if how I am doing this is right or wrong. If this solution will work , I will be implementing the same with actual calls to the DB and Queue. Also the Strings that I used are just for brevity. In real, I will be reading the ResultSet and would be making an XmlDocument which I will be posting to the queue which is going to return a Boolean on successful push. — ViChU 13 mins ago
Do any of y'all know regex?
I can't into regex
21:39
One does not simply regex
hmm???
3 hours ago, by Captain Obvious
2
Q: Fighting f̶i̶r̶e̶ regex with f̶i̶r̶e̶ regex

Vogel612So someone requested a Regex Builder / Assistant for Rubberduck and since my CS class had been covering the topic only recently I was thinking to myself: "This sounds interesting, you should do this". Long story short, a day of designing and a weekend of implementation (and some more polishing) ...

@BernardMeurer how can I help you?
Lol wut
@Vogel612 24.302.036/0001-98
How'd I match these
the format is standard, the numbers change
24.302.036/0001-98
00.717.540/0001-90
35.441.476/0001-42
63.025.530/0029-05
@LosManos neither is right fit, see Why are implementation and debugging questions unwelcome on Programmers.SE? and CR.SE help center requirement for working code. Please abstain of recommending sites you're not familiar with — gnat 57 secs ago
@BernardMeurer With Regex, or?
@BernardMeurer Have you tried finding your own pattern using a site such as regex101.com?
21:50
([0-9]{2})\.([0-9]{3})\.([0-9]{3})\/([0-9]{4})-([0-9]{2})
@BernardMeurer ^^^
That Regex will match all of those.
@EBrown Testing
I'm out, later all.
@EBrown You could actually use \\d{2} instead of [0-9]{2}
Maybe a single back-slash is okay too, but double is if the back-slash itself needs to be escaped in a programming language
Oh, activity?
22:30
possible answer invalidation by Leon on question by Leon: codereview.stackexchange.com/posts/136418/revisions
@BernardMeurer ?
@BernardMeurer Just state what you wanted to ask or I won't be able to halp you :-)
I'll be off for now, but I'll be back.
As usual.
@Mast I need you to help me by loving me
@BernardMeurer That's not a software problem.
On an unrelated note:
Please include the problem statement in the question. Are you sure your code is working correct? If the judge says it isn't, I tend to believe the judge. Broken code is off-topic for Code Review, please take a look at the help center. — Mast 34 secs ago
@Mast :(
22:51
Wow, though, that's a lot of unnecessary whitespace... (I know; you didn't come here for code review. Sorry ... sorta.) — Jefré N. 40 secs ago
23:11
@Mast How would I do print(sorted(cnpjs.items(), key = lambda (k,v): v))in Python 3?
@BernardMeurer You wouldnt
23:31
@N3buchadnezzar Yeah, I used a workaround
But it's not as elegant

« first day (1183 days earlier)      last day (3130 days later) »