« first day (1008 days earlier)      last day (3023 days later) » 

12:00 AM
RELOAD! There are 1791 unanswered questions (94.2462% answered)
 
 
1 hour later…
1:02 AM
0
Q: Heaping up with the inqueries

LegatoChallenge: Given three query types simulate heap operations. Specifications: 1. "1 v" - Add an element v to the heap. 2. "2 v" - Delete the element v from the heap. 3. Print the minimum of all the elements in the heap. It is guaranteed that the element to be delete...

0
Q: USACO TRAINING - Section 1.2 - PROB Transformations

Emanuele NataleI'm trying to improve my coding skills by going through the USACO TRAINING PROGRAM. I would like a review of my code for solving the transform problem. Here is the problem statement: A square pattern of size N x N (1 <= N <= 10) black and white square tiles is transformed into another squa...

 
1:23 AM
4
A: Difference between C# and Java's ternary operator (? :)

Eric LippertThe given answers are good; I would add to them that this rule of C# is a consequence of a more general design guideline. When asked to infer the type of an expression from one of several choices, C# chooses the unique best of them. That is, if you give C# some choices like "Giraffe, Mammal, Ani...

We have Lippert confirmation people
 
This would make a good question for codereview.stackexchange.com — ChrisWue 11 secs ago
" i wasn't accepted so i was trying to figure out why " - Probably not just based on your answer to that question. But you failed to talk about >>other<< problems ... like the complete lack of any javadocs. And the fact that you can only code review if you know the requirements for the code. — Stephen C 11 secs ago
 
interesting answer
 
2:02 AM
I'm voting to close this question as off-topic because it belongs on CodeReview.StackExchange.com — Prune 36 secs ago
 
2:23 AM
Stack Overflow is for concrete problems, not for generic code review / improvements. — Felix Kling 30 secs ago
I'm voting to close this question as off-topic because it is asking for code review (or something like that). — Felix Kling 59 secs ago
 
0
Q: Python Bowling Issues

RsherrillI'm trying to write a program that pulls bowling scores from a text file, calculates the scores and displays everything in a nice frame format. I've gotten strikes, gutterballs, and spares all worked out ( I think), but regular number scores are alluding me. If one of yall could take a look at my...

 
2:43 AM
 
2:58 AM
I'm voting to close this question as off-topic because it belongs to codereview.stackexchange.comYu Hao 49 secs ago
 
-2
Q: Can anyone help to generate price of bus ticket online?

Dines <script type="text/javascript"> function myFunction() { var price = document.getElementById("price").id; var value1, value2; var from = document.getElementById("from").id; var to = document.getElementById("to").id; var noofadult = Number(document.getElementById("noofadult").va...

 
No it doesn't. The OP is really asking us to find (possible) bugs. The codereview site is for >>working<< code only. — Stephen C 39 secs ago
 
3:28 AM
+1 for designing the next generation of aircraft carriers with MS Paint. — David Grinberg 5 hours ago
 
3:50 AM
This is a better question for codereview.stackexchange.com. Also, you should probably ask your teacher for some suggestions on how to clean it up. — forgivenson 53 secs ago
 
4:05 AM
possible answer invalidation by flodel on question by Nick: codereview.stackexchange.com/posts/119021/revisions
 
4:19 AM
Please tell me this site isn't becoming SO.
 
In what way?
 
0
Q: Refactored version of Okasaki's skew-binomial heaps in Standard ML

Eduardo LeónIn his book, Purely Functional Data Structures, Chris Okasaki provides an implementation of skew-binomial heaps (p. 137). Unfortunately, the book isn't (legally) freely available anywhere, but his thesis contains another implementation of skew-binomial heaps (p. 83) that only differs in minor ine...

 
4:36 AM
USERS: you're alienating the people who actually use your product TWITTER: likes are now florps USERS: what TWITTER: timeline goes sideways
2
lmao
 
lol
@Legato wat
 
5:29 AM
0
Q: Vector Sort Function

Archie GertsmanI had heard about sorting for a while, but never actually gave it a try. So I decided to make an algorithm that would sort the members of a vector from least to greatest. Though this may seem pretty simple and/or silly, I actually put a lot of thought into it and wrote out tables/diagrams. #incl...

0
Q: Parsing from 2gis and store to Postgre missing ORM

kAldownMy boss told me that it's a very bad code, and don't want to apply as job done. But this code works. He told me that I must use Django-ORM, but I don't know any, an job should be done quickly. P.S. first time working as a programmer. Have at least 3 month of experience. # -*- coding: utf-8 -*- ...

 
6:29 AM
I would think this perhaps belongs at codereview? — mplungjan 58 secs ago
 
0
Q: New to jquery, would appreciate someone to look at my code

user72718271I'm new to using Jquery. I'd like someone to review my code for syntax errors and such. Also, I noticed when selecting a new limit, it would add elements into the body. Any idea why this is happening? http://104.236.173.175/assets/

 
6:52 AM
@Ehryk Regarding your GetOctalBytes function: thats a tad bit offtopic, so you may want to start a question on CodeReview, if you want feedback. I can give you one pointer though: If you use the .SelectMany((element, index) => { ... }) overload, you should be able to compute your byte-array location in one pass instead of going through the bool-array. — grek40 31 secs ago
 
7:05 AM
possible answer invalidation by ChrisWue on question by ChrisWue: codereview.stackexchange.com/posts/118941/revisions
 
7:37 AM
0
Q: Queue Implementation - Scala

Prabhat Kashyapclass Queue[+A](list:List[A]) { def enqueue[B>:A](x:B):Queue[B]= new Queue[B](list :+ x) def dequeue[B>:A]:Queue[B] = new Queue[B](list.tail) def head = list.head def tail = list.tail } I created a queue in which we can perform Enqueue,Dequeue and Travesing in Scala. Please review this...

 
7:55 AM
@mplungjan This is a question seeking understanding of principles, not open-ended critique. The code presented here is of a generic / hypothetical nature, and this question would be off-topic on Code Review. — 200_success 49 secs ago
 
0
Q: I created a small script to migrate event, artist, and venue information from MongoDB to Drupal

Adam SAt first I brute forced the migration to just get it finished. However, the procedural program mixed the events with the venues so I rewrote it, this time using classes which I'm just beginning to use. function liveimport_import() { $resource = 'http://localhost:3000/api/events'; $data ...

 
@charlietfl This question has been cross-posted to Code Review and closed as off-topic there because the code doesn't work. Please read A guide to Code Review for Stack Overflow users before recommending Code Review to other users. — 200_success 18 secs ago
 
8:24 AM
0
Q: Difference in numbering a matrix and a left boundary of for-loop

NickI have an igraph object g1. I need to count the number of graph vertices in the neighborhoods of different orders. The function neighborhood.size() was used and the argument order was varied: set.seed(42) g1 <- erdos.renyi.game(10, 1/2) neighborhood.size(g1, order=0, V(g1)) neighborhood.size...

 
I'm voting to close this question as off-topic because it is a request for a code review. Please check codereview.stackexchange.comMark Rotteveel 23 secs ago
 
9:00 AM
Naruto answer; accepted non-selfie answer with 0 score: Queuing web service calls
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: Minimalist Tree
 
9:13 AM
0
Q: I'm trying to make a function that sorts a list using bubble sorting and returns the number of swaps

R.Idef improve_bubble_sort(list_of_values): count = 0 for i in range(len(list_of_values)): for j in range(len(list_of_values)-1,i,-1): if list_of_values[j]<list_of_values[j-1]: count += 1 bubble(values) count += 1 return count I want to know whats wrong with th...

 
Zak
Monking @all
 
9:34 AM
I'm voting to close this question as off-topic because "it works" and belongs on codereview.stackexchange.comcricket_007 11 secs ago
 
0
Q: properly remove fragments from FragmentStatePagerAdapter

rely boyshey guys i implemented a tab layout(an action bar with tabs) , basically it is made of using pagerAdapter and FragmentStatePagerAdapter below is my code : public class PagerAdapter extends FragmentStatePagerAdapter { int mNumOfTabs; public PagerAdapter(FragmentManager fm, int NumOfTabs) { ...

 
10:02 AM
0
Q: Password Trainer v1.0 - Helping you learn a new password

angussidneyThere are two reasons why many people choose weak passwords over stronger, more complicated ones: They don't know that their passwords are insecure They don't want to change to a better password because they are generally more complicated and harder to remember So, I came up with this program...

 
 
1 hour later…
11:25 AM
0
Q: linear shooting method to solve a B.V.P , calling subroutine as an argument

AbolfazlI have wrote a code to approximate the solution of a boundary value problem x'' = p(t)x'(t)+q(t)x(t)+r(t) x(b) = beta in [a,b] by using Runge-Kutta method of order N = 4. Do you have any idea to make it short. I don't know how to call a subroutine as an argument in another subroutine. I...

 
11:42 AM
0
Q: Generate price of online bus ticket system

Dinesi don't know how to build javascript coding to generate price. anyone help me to build javascript coding? <script type="text/javascript"> function myFunction() { var price = document.getElementById("price").id; var value1, value2; var from = document.getElementById("from").id; v...

 
It's a shame one-liners don't make for good Code Reviews. Disqualifies half my Python code.
5
 
@Legato This site is not becoming SO.
 
12:01 PM
0
Q: I'm trying to make a good naming for class family

frank.steinI want to extend idiom of NonCopyable class for cases where object cannot be copied or moved via copy/move constructor or assignment operators. So i divide idiom into 4 main and 3 helper classes. 4 main classes looks like that: class NonCopyConstructable { public: NonCopyConstructable() = d...

 
Finally hit 1k on SO
 
grats @Quinn
 
Thanks @Dal
It's quarter past midnight there. Go to bed
 
12:41 PM
This really should be on code review. But searching should also produce many variations, some of which are sure to be improvements by one criterion or another. — RobG 51 secs ago
 
Monking
 
1
Q: Piano Tiles-like-Game: Mouse LorMorR

SkrelpI'm currently trying to get somewhat familiar with swing and so I made a little Game called Mouse LorMorR (Mouse Left or Middle or Right). The Game consists of a timer, a score display and three JPanels that display which mousebutton you should click. By clicking the wrong mouse button or letting...

 
1:33 PM
@Quill Quarter past noon, almost correct.
 
0
Q: getting run time error

TirupathiRao podugu #include<stdio.h> struct student { char name[10]; int score; }; void swap(struct student *studen1, struct student *student2){ struct student temp = *studen1; *studen1 = *student2; *student2 = temp; } void quicksort(struct student *students, int low, int high) { int pivot...

 
@CaptainObvious Hmm... Let me think, "error" in title? Burn it!
 
1
Q: Is it bad to initialize a class multiple times?

JonathanI'm using my crawler class in the following manner and I'm beginning to think it's bad practice: crawler.py import requests class Crawler(): def __init__(self, url): self.url = url def web_crawler(self): requests.get(self.url) return requests.text main.py fo...

0
Q: C Stack Data Structure

BrokenProgrammeri Have implemented a Stack data structure in C and i would like to know if there is something that could be improved. Stack using linked list: #include "Stack.h" #include "stdlib.h" //Linked List based data structure. typedef struct Stack { int data; int size; struct Stack *next; }...

 
You should ask at CodeReview. There, the format will be particularly well suited for your kind of question and you will most probably get better help. — Cilyan 21 secs ago
 
2:07 PM
@CaptainObvious RBA
 
2:31 PM
0
Q: csview: A tiny utility to view csv files

CaridorcSeeing a csv in table form is nicer then viewing it as row text, for example the csv from Calculate food company sales for the year (with headers added by me) looks much nicer in this table form than in plain-text: <table border="1"> <tr> <th> Kind</th> <th> Brand</th> <th> Sales in 2014<...

 
2:50 PM
0
Q: Excel vba: Function to return a string legal for a range name

Jeremy CaronI wrote an Excel vba function that will take a string argument and return a string that is legal for naming a range. Upon looking through this, if you're wondering what I've been smoking, I should add a disclaimer that I'm new to vba and I have not yet come across a less restrictive way to obtai...

 
> if you're wondering what I've been smoking
I like this guy
3
 
Zak
I feel like there should be a way to use regex here, but I can't think what it might be.
 
VBA supports regex?
2
I always assumed VBA was way too restrictive for such a feature.
 
of course it does!
10
Q: A CSharpish String.Format formatting helper

Mat's MugA while ago I implemented .net's string.Format() method in VB6; it works amazingly well, but I'm sure there has to be a way to make it more efficient. I'll start by listing a simple class called EscapeSequence: Private Type tEscapeSequence EscapeString As String ReplacementString As Str...

I use regex here ^^ to make VBA support things like StringFormat("Amount: {0:D4}", foo)
 
3:07 PM
Yeah @Zak I'm thinking regex too.
 
Zak
@Mast It's even got a LIKE operator
 
I feel like I should abuse this new found knowledge somehow.
6
 
I'm gonna leave this link to the doc describing named range syntax rules here for the convenience of reviewers. — RubberDuck 46 secs ago
 
@RubberDuck awesome! here I was googling "range name limitations" and browsing all kinds of useless junk
the google-fu is strong with this one
 
3:13 PM
Lol
 
0
Q: Can a list of meetings all be scheduled in a conference room

EdmundI was given this question at an interview for a position I just got rejected by, so looking to improve and see what better answers there are! Input: List of meetings Output: Can conference room fit all the meetings It was an open ended problem so I was kinda flustered. My first stab at it was...

0
Q: Find related groups among list of users

MattI have one of my first PowerShell scripts that will query a list of users in Active Directory. While doing so it will keep a tally in a hashtable that will update for every group increasing it count so that a final total can then be displayed. This is used so that given a group of users that are...

 
3:31 PM
@CaptainObvious don't give up! selfie :)
> Nice code, I like what you've been smoking. An alternative (better?) name for the function could have been Legalize, too.
woot, 46K!
wow, check out the new users - the top one on that page scored 905 in 18 days, with 18 answers contributed so far.
@RubberDuck you knew I was going to leave room for other answers! :)
 
@Mat'sMug Seems like we got ourselves a new monkey.
 
0
Q: C# Parallel Task Queue that runs in sequence

VengariothI'm in need of a solution that runs constantly incoming requests in a per-resource sequence, but parallel in general. The use-case: Many clients connect to a server and start issuing work. The work of a single client needs to run in sequential order, so the downward code doesn't need to cope wi...

0
Q: Break an array into n equal or almost-equal sized sublists

Christopher BottomsI want to break a larger list into $num-lists smaller lists. I thought that there might be an option for rotor that would already do it, but I haven't found one. #!/bin/env perl6 my @a = 1 .. 13; my @lists = fair-lists(@a, 3); say @$_ for @lists; sub fair-lists ( @array, $num-lists ) { m...

0
Q: Javascript coding did not function as well

Dines < script type = "text/javascript" > function myFunction() { var noofadult = Number(document.getElementById("noofadult").value) var noofchildren = Number(document.getElementById("noofchildren").value) var from = document.getElementById("from") var to = document.getElementById...

 
3:46 PM
Wow. Thank you. I was not expecting to get a good thorough answer THAT quickly. Clearly I should be smoking your stuff. I'll implement whichever changes I can handle and post the updated code with a description of the changes as an answer. — Jeremy Caron 1 min ago
I love this site
 
What!? @Mat'sMug managed to write a answer without mentioning Rubberduck-vba?
3
 
I did :) ...er, didn't indeed
 
@Mat'sMug Tell him that he should smoke documentation.
I hear documentation's good this time of year.
4
 
did didn't.. whatever.
 
4:03 PM
in Cardshifter TCG, Aug 23 '15 at 19:52, by Simon André Forsberg
@jacwah erhm... docu... docume... do-cu-ment-a-tion... that's a hard word for me.
 
> Clearly I should be smoking your stuff.
 
BTW.Monking
 
0
Q: Would someone please see if I did Jquery right?

user72718271Something in my script is causing to reload the page and inserting all my <head></head> contents below my <body> tag. I would like someone to review my code and see if it's written well or if I made any errors. The script limits the amount of results from a mysql query. During the query, it show...

 
Hahahah
 
I need to write some dough-cue-ment-ation for RD
 
4:26 PM
0
Q: Simple text boxes xamarin app

EminemI've just started learning Xamarin. I've create an app that has 4 text boxes. When the app starts, the first text box starts looping from min range to max range until the user presses a button. Than the first text box stops, the second one starts etc. My main issue is the threading part. I'm pr...

 
4:59 PM
0
Q: My first Meteor autocomplete

StilltorikI am trying to learn Meteor, so I tried to write a basic location autocomplete. Currently, given a string, it will request suggestions from https://photon.komoot.de/ (amazing free location autocomplete btw) and display them in an ul-li. What is not done yet is keyboard navigation. autocomplete....

 
5:09 PM
0
Q: Shell agnostic startup flow - env, profile, rc, login

Captain ManSorry about the title, I really have no idea what to call this. The goal of these files is to have some common behavior between Bash and Zsh when starting them. As is known, when Bash starts as a login shell it will source the first found of the following in your home director: .bash_profile, .b...

0
Q: How can I make my generator faster?

TinfoilboyFor my chunk generator for my game, it currently uses a triple nested loop, which seems very inefficient. It also seems like I could cut down a lot of code in the function somehow. Does anyone have any ideas? void Chunk::Generate() { const int octaves = 6; const float heightMod = 4.0f; ...

 
A year ago you would have said "there's a tag for Rubberduck on SO", I'd have said "yeah, right" ...well, it's here: http://stackoverflow.com/tags/rubberduck/info
Mark the date folks, the date that a Code Review project got its own tag on StackOverflow. Congratulations @RubberDuck @Mat'sMug!
9
 
CRonicles?
 
@SimonForsberg thanks! ...now I need to document everything so that people can answer RD questions on SO
 
5:34 PM
Haha so many questions! I think if you're unsure about your database structure or operations you should ask a different question (or even submit them for a code review). You also don't need to delete and re-create a table to add INDEX-es or FOREIGN KEY constraints to them. — Tersosauros 18 secs ago
 
@Mat'sMug have you ever posted could that you knew could be improved and were capable of doing yourself? I answered my own question as it feels stupid to put code I know that sucks here without defending myself.
 
lol
@Matt actually what I did was post the best possible code, and later I'd come back and review it and see things differently - code you wrote a few months ago should be "bad code" today ;-)
 
@Mat'sMug s/should be/is likely to be/
 
@Mat'sMug That's good. That code I wrote was from over 2 years ago.
 
If it should be bad code today, then the whole point of writing good code would be depressing.
 
5:41 PM
@SimonForsberg I should hope that code a wrote just a little while ago isnt that bad.
 
exactly ^^
 
@SimonForsberg what I meant was, if you don't grow/evolve/learn as a programmer, old code will look just as good as it did a while back
 
Like that settings API I put together over a year ago. I hate it.
 
0
Q: Average function in C++ without stating the number of variable as initial input

SeFThe following code was inspired from a tutorial I found online: #include <cstdio> #include <cstdarg> double average_function(const int num_elements, ...) { va_list elements; double sum = 0.0; va_start(elements, num_elements); for(int i = 0; i < num_elements; ++i) { sum ...

 
@RubberDuck haha was going to say "ask @RubberDuck how he feels about RD's settings API" ;-)
 
5:44 PM
I definitely feel embarrassed by my old code as I know I could make it better. Just don't always have the time or need. It does work just could be better.
 
That's good CR material to populate a young tag :-)
 
@Matt Now when I am writing a whole lot of Machine Learning code, I honestly don't care that much about code quality at the moment. There are way too many things I want to implement or just want to see working before I start improving this code.
 
@Mat'sMug Well then prepare for a small collection of embarrising code bits
 
@Matt Most code on CR is embarrassing, or should be after a few months.
 
Is ~180 lines of code pushing it for a review?
 
5:54 PM
@Matt Pffft!
 
Nope
 
I eat 180 lines of code for breakfast.
9
 
I only use scripting languages. Havent had a chance to code a real program since college. I regret my career path and wish I had gone into programming.
Stupid Nortel crash here in Ottawa screwed me
 
@Matt Are scripting languages not "real programs"?
@Matt Go ahead, count the lines:
 
5:56 PM
@SimonForsberg Some people think so.
 
38
Q: SudokuSharp Solver with advanced features

Simon ForsbergEven though it's the first time I'm writing something this "big", it feels like I know C# quite good. It's been nice to learn LINQ also and I am very impressed by the features, and perhaps I have overused it here (if it's possible to do that). SudokuFactory: Contains static methods to create so...

 
@Matt Come join us on Rubberduck!
 
In fact... why hasn't anyone made a tool to count the number of lines of code in CR questions?
 
@SimonForsberg Would that not be a simple SEDE query. Im sure those are automated with web requests
 
I'm not so sure if it would be so simple... it would involve parsing the actual question content, to determine what is code and what is not. That doesn't sound simple to do in SQL.
 
5:59 PM
regex
 
^^ I knew someone would say that.
 
Is a regex suggestion a faux pas?
 
Hehe, do you know about the famous SO question about parsing HTML with regex?
It doesn't work because there are too many edge cases.
 
that question... yeah. I see that as a dup target all the time.
 
1
Q: Abstract Factory Pattern for Implementing AdNetworks on Multiple Platforms

SamBhHere's the link to the github project. I want to implement Abstract Factory instead of adding platform dependent compilation flags in just one file and make it ugly. Hence decoupled code. Moreover, I have to implement different AdNetworks on different platforms. This is the interface public i...

 
6:02 PM
There are better ways to parse HTML for sure. I forgot about what the question displays in the editor and what is really there.
 
@SimonForsberg It's not at all, probably would have to loop over each post's Text field until no more newlines are found. Definitively not what SQL is intended for :)
 
Well I feel the need to make a small script that would try and count the code lines in one specific question now just for fun.
 
@Matt Thanks, then I don't have to do it :)
 
@SimonForsberg That would depend what language you would like it in.
Perhaps you are more of a COBOL fan
 
If I would do it, I probably would have either made it in Groovy or JavaScript
From a user-perspective, it would be easiest to use it as a Userscript with Tampermonkey for example, and then it has to be Java.
If you use JavaScript, Stack Exchange will take care of the question parsing for you :)
 
Zak
6:18 PM
@Matt Put it this way, the maximum characters per post is 30,000 everywhere else on the SE network, here on CR we have our own enhanced limit of 65,575 characters. And one of my recent questions went over *that* limit anyway ^^
 
Otherwise, I would see if it was possible to re-use some of @Duga's code for answer invalidation check
@Zak Personally I didn't like that increase. 30k should be enough for everybody.
 
6:32 PM
Any news on the swag? I'm expecting it any day now.
 
The code below works fine - Then, consider posting this at Code ReviewWiktor Stribiżew 54 secs ago
 
Not sure whether to try to salvage this question or migrate it to Stack Overflow:
0
Q: Average function in C++ without stating the number of variable as initial input

SeFThe following code was inspired from a tutorial I found online: #include <cstdio> #include <cstdarg> double average_function(const int num_elements, ...) { va_list elements; double sum = 0.0; va_start(elements, num_elements); for(int i = 0; i < num_elements; ++i) { sum ...

 
0
Q: Non-install based customization for creating windows 7 images

MattBefore I had access to VM's, money or had any PowerShell knowledge I made this script that would do some image customizations for me. I used physical computers and would be reinstalling the OS while I was testing my image creation process. The process was long and tedious but I used this to save ...

 
@200_success What is your issue with that question. The last paragraph could use some massaging as the wording is less than perfect. But it does seem like viable question.
 
 
6:44 PM
Noticed something familiar in the Hot network posts
 
@200_success I don't think it would do well at SO, there is not really a specific problem, but I also don't think it's good for CR, really smells of
 
0
Q: Is this the way to highlight syntax?

Anish SilwalI've created a javascript application to highlight the syntax of html and php. I know a lot of syntax highlighter are available nowadays, I just created to extend my knowledge in js and regular-expression. I only wanted to know if its the right way to do this. (The code below works fine.) js/cod...

0
Q: Calculating Garland Degree of String

Jae BradleyPurpose A garland word is a word formed by chopping off the last few letters and “wrapping around” to the start. For example: You can chop off the the trailing “on” from “onion” and still form the word by wrapping around to the starting “on”. In other words, you can write the letters “o...

 
@Matt The code doesn't do the task stated in the title.
Therefore it is a "how do I?" question, not a critique.
 
@200_success Seems to be asking for a specific refactoring. Not the first time I've seen such a question... I wonder if there is any clear meta on the subject...
 
0
Q: Bash “Rotating” Mysql backup

JazzCatI'm quite a novice in shellscripting so far, but i'm learning and getting quite comfortable in writing shellscripts, but i have alot to learn. The snippet at the bottom of the page creates backups of a certain users databases. The script checks first if there is more than 7 compressed .gz files...

 
6:59 PM
I think this question belongs to Code Review, not SO — Alexander M. 32 secs ago
 
Oh. Some poor soul is trying to use regex to do syntax highlighting.
5
 
Before possibly posting this code on Code Review, please read two things: 1. A Guide to Code Review for Stack Overflow users to be aware of the differences between CR and SO and 2. Guide for posting a good Code Review questionSimon Forsberg 13 secs ago
 
Lol. Lurkers!
 
Who's lurking?
 
I am
 
7:08 PM
</lurks>
3
Or maybe I should do it C# style:
public class Lurk : IDisposable { /* ... */ }
And call lurkInstance.Dispose().
 
I don't really like the thought of being IDisposable....
 
7:23 PM
0
Q: My Googl URL shortener PHP library

JustLloydI'm a 16 year old PHP developer and was wondering how my code could be improved, I knocked this together in a few hours as I was just simply bored. All feedback is appreciated! I was going to add a namespace to this but decided there was no point. GitHub Link: https://github.com/Lloydaaa/Googl-L...

 
<blink>test</blink>
<b>test</b>
:(
 
not sure what you're trying there....
but HTML isn't supported in chat, because abuse.
 
I'm messing around with HTML.
Obviously :(
 
and even on page only a severely limited subset of html is allowed
 
7:43 PM
Does the code work as intended? If so, it looks like Code Review is what you're looking for =) — Mat's Mug 21 secs ago
 
flagged for migration
 
0
Q: Name a number that a user inputs between 1-99

Jerod Burnett#include <iostream> using std::cin; using std::cout; using std::endl; int main() { cout << "Input number from 01 to 99: "; int number; cin >> number; int singles = number % 10; int tens = number / 10; char *singleName; char *tensName; if (number >= 11 && number < 20) //This way if the num...

 
Cool. I've flagged your post to be migrated over to Code Review, where questions like this are pretty much exactly what the site is about (code that works, asking for ways to improve). — Mat's Mug 23 secs ago
 
@CaptainObvious I really wish he didn't ask about an error...
 
@SimonForsberg s/would love to fix your code/would love to help you improve this code
"fix" == ambiguous ;-)
 
7:54 PM
thanks ^^
fixed improved
I am at a very exciting point in my code writing right now. Either this will work or it will fail completely and either leave me with some hope for it to be fixable, or completely hopeless.
 
Sidequestion.... where did that user come from? And why is that performance review on Legato's Matrix question still so undervoted?
 
@Vogel612 From Germany, I'd say.
No previous usernames known.
 
lol
 
@SimonForsberg Would it be OK to put a comment on his question helping him fix it?
> I was able to get this to work by importing #include<string> and using std::string;. Then, I had to correct your formatting to find a missing brace that makes it fail.
 
@Hosch250 Why are you asking me!?
 
8:03 PM
I already told him where he can see the error list in VS (he apparently didn't know about it).
 
(In my personal non-mod opinion: Yes)
 
@SimonForsberg Because you're a mod.
 
I'll not answer you as a mod.
 
I wasn't sure if site policy didn't like us to fix broken posts in the comments.
 
But I recall there might have been a meta post about helping fix broken posts in comments in the past.
 
8:05 PM
I guess I just won't post it to be on the safe side.
 
Post it.
 
IMO that's fine, especially if OP is interested in a code review. if all they want is the fix, it's not worth it
 
No one is going to kill you.
 
Are you sure someone won't kill me?
 
They seriously need a Code Review, so do what must be done to make their question on-topic :)
 
8:05 PM
Posted.
 
@Hosch250 Well... possibly @Jamal maybe...
 
meh, worst he'll kill is the comment ;-)
 
and all edits.
 
After that, there is another bug, but I'll leave him to find that when he tests it.
It doesn't return after he handles the teens, but prints "ElevenYour number is TenOne".
Or something like that.
 
lol.. you should tell them...
people like me might think it's fixed :D
 
8:08 PM
I didn't edit the post, he has to get it working himself before it is on topic.
 
@Hosch250 agreed
a missing brace is one thing, a bug is another
 
He should also do basic testing to find this bug. I understand that a beginner might not catch it, but ...
 
and.. 2K edit privs is one thing, <2K suggested edits is another, too
 
@Mat'sMug Missing brace == bug. He didn't ever close the teens block, so it only worked for teens.
Or rather, he did at the end of the program.
 
lol. @Mat'sMug just had to eat his words :)
 
8:10 PM
sure, but a bug that's fixed by adding 1 character to a post is a fine edit by a >2K user
@SimonForsberg huh?
 
a missing brace is one thing, a bug is another
but the missing brace is the bug
In this case I'd say it's a serious bug. A do-not-edit bug.
 
meh, you know what I mean ;-)
 
@SimonForsberg DNE-Order
 
> A software bug is an error, flaw, failure or fault in a computer program or system that causes it to produce an incorrect or unexpected result, or to behave in unintended ways
If it never runs, does it adhere to this definition?
If not, it's not a bug
#lawyerjeroen
 
right. bug != compiler error. #JeroenIsRight
 
8:12 PM
sticks and stones, Jeroen, sticks and stones
 
The brace isn't the compile error.
 
whatever
 
The compile error is the two potentially unassigned pointers.
 
We have a Code Review site for these kinds of questions. — Andrew Williamson 1 min ago
 
@Duga could use some minor editing into shape and an explanation wtf it's doing, but aside from that....
 
8:35 PM
0
Q: Java Swing Pong game

EamesI recently created pong game using Java. This is my first time not copying any code from the internet or using any help. While it does work, my code feels well written but no streamlined or smooth (other than the fact that I made additional classes that would help create further code in this proj...

0
Q: Alpha Beta Pruning Optimization

CcyanI made a class that would do alpha beta pruning on a binary tree of 40 degree. However there is a time limit on a single move of 30 seconds. I am to play against my professor and his opponent class. I tried going down 6 levels but I would lose. I tried going down 7 levels and I was taking too lon...

 
Boston is getting sacked by the Mayans
Thankfully the Canadians have come to my aid
 
-1
Q: How to make it possible for creating dropdown menus with this dynamic PHP script

CDWI'm a beginner, so my knowledge of PHP is very basic I just combined some and write my own code, but i can't figure it out, how to it possible for dropdown menus. First of all, i will tell you what this script exactly do: A file called functions.php has got the following code: function default...

 
@Mast my timezone skills are getting progressively worse
Also monking
 
8:52 PM
@CaptainObvious Swing Pong: a ping pong variant
My dad jokes are getting progressively worse
 
Naruto answer; accepted non-selfie answer with 0 score: Reading input from stdin
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: 12-week staffing forecast LINQ query
 
9:10 PM
0
Q: Make C# Unity Script more Re-Usable

RicardoI have a C# Unity Script file, that make some modifications on screen (change text on User interface) nut I have some doubts: 1st: How I can Re-Use the below methods (4 Methods) ? to be more concise and reusable. 2st: How I can separete the database methods in another File/Class (separate conce...

 
9:38 PM
I really wish people wouldn't go all serious "I need to talk to you. Can we skype tomorrow?" and then postpone that conversation for 24h
I was preparing myself to be a father
 
Maybe you should practice a little self control. Anyway, turns out to be completely unrelated?
 
Self control isn't the problem
But yeah, totally unrelated
You basically start expecting the worst the longer the conversation is postponed
 
@JeroenVannevel eloquent trolls
 
@JeroenVannevel On the other hand, that may have been the entire point.
 
so my Chrome has a bug at the moment that I call the skiwi bug
If I have too many tabs open, they all go white and I can't see the page
when I close the tabs, they come back
 
9:44 PM
Maybe you should use FF.
 
@Hosch250 Nah, just typical relationship stuff where her ex suddenly pops up. Which isn't all too much of a bother to me since we were more like fooling around anyway
@Quill drag the tab
the resizing will make the contents pop up again
I have it too sometimes
 
I have that one all the time, but I think this one is different
 
Try IceDragon. It is the best browser I've found. Or, if you insist on a Chrome-based browser, try Dragon. I never have that problem.
They are both maintained by Comodo, the security company famous for their firewalls, and have many additional security features built in.
 
-1
A: "Partial solution" on Code Eval for Clojure FizzBuzz

birqI had the same memory consumption issue when submitting CORRECT solutions written in Clojure on CodeEval. Turns out CodeEval.com doesn't work with clojure, see: http://stackoverflow.com/questions/24268111/reducing-memory-usage-in-a-simple-clojure-program I switched to submitting solutions in Ha...

This isn't SO pls
 
@Quill It actually appears to be the correct answer.
 
9:50 PM
It's a fix answer, not a review
it should be a comment
 
That is what the user is asking for, pretty much.
 
It doesn't review the code at all
 
No, it is not a good answer, but it is the answer to the specific question.
 
so we migrate it too old
Sorry, but I am not very good with clojure. Please wait patiently for someone better with clojure to answer your question. — TheCoffeeCup Oct 24 '15 at 22:33
> Please wait patiently for someone
 
@Quill Looks like that question is about a bug with the environment he's using. Should be on SO.
 
@Mat'sMug is still awake.
TTGTB for me, you guys have fun with that question.
You can do it.
 
10 mins ago, by Quill
so we migrate it too old
 
For migration by users, not sure that rule applies for moderator migrations.
Take it to meta, I know you like free badges.
 
@Mast it does
 
@Mast ? free badges?
 
10:04 PM
that aside the question is also ill-fitting for SO, so there's that
 
yeah, it reads like a time/resource limit exceeded question, but the actual answer is a system fault of the challenge provider
weird edge case
 
Sidenote @Quill ... 50 repz needed for comments
 
I know, I know
On a side note, the auto comments script for that is a moderator style comment
> I've made it into a comment for you
 
Lucky you can edit those :D
 
chrome is borked
-4
Q: Is there any open source script for building your own feet website like wikiFeet >> The collaborative celebrity feet website?

Luixy CooperIs there any open source script for building your own feet website like wikiFeet >> The collaborative celebrity feet website? i am looking for a way to create a website in which people can upload male celebrities feets plzz let me know.. if there is a way i can open up a site like wikifeet but op...

 
10:10 PM
^^ wrong room?
 
it's just lol
 
For code reviews you should probably use codereview.stackexchange.com — Anedar 45 secs ago
Can you explain more "looks very slow"? What kind of answer do you expect? If you are sure that your code works but you hope to see any improvements (not necessary performance but also in terms of coding style) you probably should move this question to codereview.stackexchange.com. — Pshemo 47 secs ago
If you're looking for any improvement, you should post this in codereview.stackexchange.com , this is offtopic on SO. And there isn't any faster solution than this only using sets. — Paul 29 secs ago
 
the last two are the same and post is RBA
 
0
Q: How do i make sure that the user inputs the right character type in C#?

SinghNatureThe task is to create a segment of code where the user has to put his postal code. It has to be "letter + number+ letter + space+ number + letter + number". It needs to have 7 characters max and use a "if" statement to verify and post an error if the user doesn't input the right type characters.F...

 
Before considering posting this to Code Review, I recommend that you check how to post a good Code Review question. I would recommend that you especially focus on the bits about not writing code in a hurry. — Simon Forsberg 59 secs ago
Yeah I mean we're not here to make up for your "hurry". On CodeReview.SE we will review your carefully-written, working code. But if you're just looking for someone else to finish it for you because you're in a "hurry", you're not going to have much luck. — PreferenceBean 15 secs ago
 
11:05 PM
If anyone wants some interesting reading material: github.com/dotnet/coreclr/tree/master/Documentation/botr
 
11:16 PM
0
Q: Generating the largest decent number of given number of digits

csodiumThe problem says to generate the following number with n number of digits and T test cases: A Decent Number has the following properties: its digits can only be 3's and/or 5's. The number of 3's it contains is divisible by 5. The number of 5's it contains is divisible by 3. If there are more tha...

0
Q: Image gallery with pagination using CSS, $_GET, and Bootstrap

JaredI am relatively new to web development and I created an image gallery with pagination using the Twitter Bootstrap framework. Basically, I want to know if I approached creating an image gallery correctly and what I could do to improve. The basic idea was that each pagination element linked with a...

 

« first day (1008 days earlier)      last day (3023 days later) »