« first day (1173 days earlier)      last day (3138 days later) » 

00:00
RELOAD! There are 2536 unanswered questions (92.9407% answered)
One more issue closed, and we'll be 94% done with 2.0.
congrats
00:23
0
Q: Generic Roulette class

KrythicI'm looking for some improvements for my generic Roulette class. public class Roulette<T> { public string Name; private Dictionary<T, double> _items; /// <summary> /// Calculates the total remaining probability-space within this Roulette. /// </summary> public double Fr...

00:35
If it's working the question might be more appropriate codereview.stackexchange.comSven B 22 secs ago
0
Q: Getting Access Denied after receiving valid session id

Jason TemplemanI have a working python/tk program that runs a cgi script based on user selection. I'm working to cut this down to a small script that just focuses on one particular cgi script. It is getting the session id correctly but when I launch the browser I keep getting "access denied". As the other pr...

00:47
0
Q: Largest palindrome in the string

Em Aethere are lot similar questions out there. However, I wanted to ask to comment on my code. My implementation (as i believe) is fairly simple than the other complex ones. It has O(2) complexity. My approach is simple Start with the biggest size of string check that string if its palindrome red...

Post it in Code Review please. — gsamaras 55 secs ago
01:08
1
Q: Core Location Background Update and Upload to Server

JordanWxI want to upload a user's location to a server to send them a location-sensitive alert, so the location needs to be fairly accurate. Here is the code I currently have: import Foundation import CoreLocation protocol LocationServiceDelegate { func tracingLocation(currentLocation: CLLocation) ...

01:31
0
Q: Hackerrank - Quicksort 2 in Swift

ClefairyI'm stuck on this problem. The whole code got ugly quickly, and the solution below did not work. Here is how I tried to solve quick sort: In the previous challenge, you wrote a partition method to split an array into two sub-arrays, one containing smaller elements and one containing large...

TTGTB. Niters
night
ni- *falls asleep on keyboard*
*wakes up* *keyboard broken*
01:50
0
Q: Create a Tree like Topology from a given file in Python

Sebastian Y.I tried to created a Tree like Network that take info from a text file and create a Tree like Network topology. However, I am still a beginner, so I just can't exactly tell what I could have done better to implement the log and getters function. I really hope you guys can enlighten me on the prob...

02:00
0
Q: Passing data back through a promise chain

dwjohnstonThis here is some fairly simple functionality The user has a list of objects, which they modify, or may create a new object. When the user presses 'Save/Update' the 'saveClick()' function is called. This will submit the object to the backend. If it's a new object, the backend will generate a u...

 
1 hour later…
03:10
possible answer invalidation by Jamal on question by Em Ae: codereview.stackexchange.com/posts/135347/revisions
 
2 hours later…
05:03
0
Q: Unifying trait for tabular data in Scala

cheezsteakThis trait is meant to be a simple interface for tabular data from different file types, such as csv, excel, open office etc. Right now I'm only asking about some of the top level code for now and not the implementations. I'm worried that I might have made some poor design choices. But first l...

05:13
0
Q: HTML5 Parallax Scrolling utility using canvas

Krishnakumar_MuraleedharanI have created a utility to create scrolling parallax backgrounds. // Backgrounds as array of objects. canvas id, speed, image url var bgs = [{ id: 'sky', speed: 1, src: 'https://upload.wikimedia.org/wikipedia/commons/9/9f/Sky_back_layer.png' }, { id: 'middle', speed: 3, src: 'https:...

05:24
0
Q: Unit testing for concatenating two int arrays

socal_javaguyUsing Java 1.8, I created the following implementation to concat two int arrays: public static int[] concat(int[] array1, int[] array2) { return IntStream.concat(Arrays.stream(array1), Arrays.stream(array2)).toArray(); } The unit test I created to test this looks like this: int[] numbers1...

06:08
0
Q: Finding a max element in an array - How to optimize in Java

socal_javaguyCreated the following method: public static int max(int[] array) { int max = Integer.MIN_VALUE; for (int value : array) { if (value > max) { max = value; } } return max; } Question(s): (1) I believe the Big O Notation for this implementation is O(n...

06:21
wow captain obvious what's with the spam?
did everyone die or something?
06:48
0
Q: I was asked bubble sort, which I solved. But examiner was not satisfied. why?

Rahul ShivsharanI solved the bubble sort in exam. the code is below, function bubbleSort(myArray){ var temp = undefined,isSwap = false; for(var x = 0; x < myArray.length; x++){ if(((x+1) <= (myArray.length - 1)) && myArray[x] > myArray[x+1]){ temp = myArray[x]; myArray[x] = myArray[x+1]; ...

0
Q: Filtering undefined elements out of an array

DrewI have some code that filters an array with type (Suggestion|undefined)[] into an array with typ Suggestion[], but I feel it does so very inelegantly: https://github.com/shockone/black-screen/pull/623/files In straight JS, this would just be array.filter(element => element !== undefined) but th...

@CaptainObvious code behind link
07:10
@Mast There were no clouds.
And there was no breeze.
It was just dry air at 30c here. Nearer @Zak it was 35c.
To give you an idea of just how hot that is for the UK, today it is 21c and this would be considered a "nice" day.
07:34
0
Q: Please give some suggestions for my codding

Sambhu<?php class Connection { private $host = "localhost"; private $user = "root"; private $dbname = "mobiles_sadi"; private $pass = ""; private $conn; protected $db; public function Connection() { $conn = NULL; try { $this->conn =...

I've done lots of refactoring and writing docs so far. That's my good deed done for the day.
It turned into more of a code review. I had an error in QuoTxtBoxEvt class. When working with events be careful not to re-trigger the event. — Thomas Inzina 54 secs ago
07:52
0
Q: Python IBAN validation

Dex' terI wrote a simple Python IBAN validator, which I'd like some reviews on. INTRO Quoting from wikipedia, we know that: The International Bank Account Number (IBAN) is an internationally agreed system of identifying bank accounts across national borders to facilitate the communication and p...

And that's why you don't send warning/verbose emails to your developers every day from a single e-mail address.
Because when you get an actual error it will get lost in the flood of crap
Monking
Zak
Zak
08:07
@DanPantry I'd say today would be considered "pretty hot" under normal circumstances.
I'm voting to close this question as off-topic because it belongs to codereview.stackexchange.comMartin Thoma 12 secs ago
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: TabLayout inside fragment fetch data from web
08:29
0
Q: What is wrong with this PHP code?

Neil MeyerI'm trying to get the basics of PHP down. I have the following code. <html> <head> <title>0303 HTML Forms</title> <link rel="stylesheet" type="text/css" href="css/basic.css"/> </head> <body> <h3>What is your name?</h3> <form method="post" action ="0303_HTML_Forms.php"> <p> First Name:<br /> <

08:41
The compiler supports much more than any sane code reviewer. — Denys Séguret just now
IntelliJ can't stop lying to me
10:41:29 All files are up-to-date
10:41:32 All files are up-to-date
10:41:34 All files are up-to-date
10:41:36 All files are up-to-date
10:41:38 All files are up-to-date
10:41:40 All files are up-to-date
10:41:42 All files are up-to-date
10:41:46 All files are up-to-date
10:41:49 All files are up-to-date
10:41:52 All files are up-to-date
10:42:02 Compilation completed successfully in 4s 906ms
Zak
Zak
Also, Monking @all
08:57
Monking @Zak
English is not my native tongue either. If you have a working code, but you want to enhance it, post at Code ReviewWiktor Stribiżew 24 secs ago
1
Q: code that looks for a pattern

Andy KI've created this function. It looks for sequences, in a list. If [1,2,3] exist, it will print True I've tested the code and it works fine def looking_patt(pattern,cursor,found): big_s = [] for i in range(1,101): if i % 10 == 0: big_s.extend([1,2,3]) else:...

09:13
0
Q: AVL tree insertion and deletion of nodes in C

BalrajThis is my implementation of AVL tree, it works fine. is there any thing that can be improved about addition and deletion procedures specifically when deleting the root, #include<stdio.h> #include<stdlib.h> #include<stdbool.h> typedef struct treenode node; struct treenode { int value; ...

Is the biography necessary ? Also, Does this accomplish what you expected without failing ? Wouldn't this question more a codereview matter? — pwnsauce 18 secs ago
If this is working code see Code Review. If it's not working code, edit to provide a Minimal, Complete, and Verifiable example demonstrating the specific issue. If you don't know, start by writing proper tests for it. See How to Ask. — jonrsharpe 56 secs ago
09:38
0
Q: Comparaison between my function and the results with the library Seaborn

CassI have a function which 'normaly' give me the number of bins when i plot an histogram, here : def diaco(listt): ###lower quartile####IQ1### listt.sort() low_mid = int( round( ( len(listt) + 1 ) / 4.0 )-1) lq = listt[low_mid] ####upper quartile####IQ3### listt.sort() ...

10:06
But why does it not display ">>" .. debug it ... bochs. If you want code review from somebody else for free, at least put there some comments, part by part, what was your intention (not what the instructions are doing, that's easy to see, but WHY you chose those instructions, and what do you expect as outcome of that group of instructions). — Ped7g 51 secs ago
10:16
This API would be so much easier to consume if it were separated from my client app.
The lesson I've learned from thsi project is most definitely: use tools to generate api libraries. consume the libraries, don't use fetch manually to do that.
fetch is love
fetch is great, but I'm finding myself writing a lot of boilerplate with it
The main issue is that I have a REST resource, Appointments, that points to a Contact and a Company. and I need to retrieve the Contact and the Company in a clean way
and Ij ust can't think about how to do it
because the Contact field in Appointments may be number | 'primary', and if it is 'primary' then the contact info is actually stored on the Company resource
documenting the API ahead of time would have solved this because we could have hidden that implementation detail behind the scenes instead of it filtering through the entire client app
:\
wait, what?
input[type="radio"] {
    display:none;
}
3
Why is this rule in the app? wtf?
@Quill What problem does fetch solve?
@Mast XMLHttpRequest
@DanPantry top kek
10:27
Zmonking
Oh, that.
@Mast it's a nicer alternative to XMLHttpRequest
no radio buttons for you!
Also has a few extra things built in
it's a pain in the ass to use, so fetch + promises makes life a billion times easier
10:27
Although fetch is quite verbose as well - every request with fetch needs to look like this
I prefer JSON over XML any day.
fetch(url, { credentials: 'same-origin' })
  .then((response) =>{
    if (response.ok) {
      return response.json()
    }
    return Promise.reject()
 })
@DanPantry It's a debug radio button :-)
0
Q: Get co ordinates from user using typed or cursor

Ajay [CommandMethod("ha")] public static void FindAllHatches() { float x = 25, y = 15, z; Editor ed = Application.DocumentManager.MdiActiveDocument.Editor; Document acDoc = Application.DocumentManager.MdiActiveDocument; var db = acDoc.Database; using (Tra...

@Mast it supports JSON, it was just named back when JSON wasn't really a thing
function getNew(){
    fetch(`/data/${currentPage++}`)
    .then(response => response.json().then(addPosts))
}
10:28
Yea, I understand that. JSON is relatively new.
@Quill yeah, but that only works if you a) don't have credentials of any kind and b) don't want to check for fail cases
Who needs credentials anyway? ^^
@Mast any authenticated API ^^
yeah, I know. this is for a SPA that doesn't have logins
I don't know why they needed a double promise, but hey, it's still pretty nice
Just log in over a portal and let the portal handle the authentication. Assume everything after that is trusted.
10:30
we usually handle the auth stuff in the API level
@Quill I think it's because it supports streamed responses.
@DanPantry Looks cool
@DanPantry ah, okay, that makes sense
My brain can't work at the moment due to the heat though
@Quill That's probably the wiser method, but it also gives you a lot of boilerplate.
10:31
We handle auth at the API level too, but our authentication is tied to a cookie, so we have to explicitily tell fetch to send credentials over same-origin.
Seperating the two is perhaps extreme SRP.
I totally understand not sending credentials over CORS by default, but I really don't know why fetch isn't credentials: same-origin by default
@Mast Actually no! :D we have a C# MethodAttribute for auth stuff that takes up one line per method
You still need an authentication token to talk to the server, @Quill @Mast
That's what credentials: same-origin is for
And what I am complaining about :P
You can handle all of your auth in the API layer, but you still need to tell teh API layer who you are
I have an upate on the radio button. You guys are gonna lol
input[type="radio"] {
    display:none;
}

input[type="radio"] + label span.radio-button {
    display:inline-block;
    width:19px;
    height:19px;
    background:url(../images/Sprite_Transparent.png) -130px -390px no-repeat;
    margin:-1px 4px 0 0;
    vertical-align:middle;
    cursor:pointer;
}

input[type="radio"]:checked + label span.radio-button {
    background:url(../images/Sprite_Transparent.png) -164px -390px no-repeat;
}
"hide all radio buttons, then absolutely position a new one on top of the hidden ones by targetting the label"
mother of CSS hacks
oh my god
send this to codecrap
10:35
input[type='radio'].dont-actually-hide-this-because-of-stupid-css-rules {
  display: initial;
}
lol
@Quill I have.
YES. YOU WIN AT INTERNETS TODAY
but only today.
the true winner is my code base
because it will still be here tomorrow
waiting to break my spirit
 <input class='dont-actually-hide-this-because-of-stupid-css-rules' name='outcome' value='true' type='radio' />
I did actually make that CSS class, BTW.
but I did leave a justification as to why I was making it. which is more than can be said of the person who wrote the initial rule
also featured on codecrap:
<a href="#" onclick="location.href='Account/ForgotPassword.aspx'"></a>
BWAHAHA
10:43
why is it that I cant get a job but these people have jobs
@Quill because there is more politics in hiring for programming than there is programming questions in many places
^ 3 seconds left to fix grammar. nice.
Zak
Zak
Apparently, that's a standard (if rare) weather phenomenon. Not an atom bomb going off.
called a "micro"burst.
I feel that meteorologists experience sizes in a much more intense way than I do.
@Zak Are you sure about that?
Wow, the pogo servers are pretty stable today @Zak
10:56
@Zak Yea, you'd know it if it was an atomic bomb.
But that's a fascinating phenomenon. Looks awesome.
@DanPantry Ain't that the truth.
Getting a job has nothing to do with skill and everything with politics.
Keeping a job involves some skill.
Welcome @Cass
@Mast and some politics (@keeping)
welcome @Cass
@Cass You don't have enough reputation to talk yet. This is the Code Review general chat. Did you have a question about our site? We also have a Code Review Meta.
@DanPantry Definitely.
So don't worry @Quill, you'll get better at 'the game' eventually.
well I just lost it
and so did you
left the room, perfect
11:01
@Quill ಠ_ಠ
Aaaand another downvote.
0
Q: Very basic React toDo-List

mizechAfter learning a bit React in the last weeks I've decided to make a toDo-list. I've got the basic-functionalities (create, update, delete entries) finished. I'm going to enhance the app with a feature for to define priorities. Moreover should it be possible to change the order of entries. For...

0
Q: Request Queue for League of Legends API

user2415266I am working on some website for League of Legends statistics, which uses the RiotGames API. The API allows you to do a maximum amount of requests per 10 seconds, and another maximum amount of requests per 10 minutes. I made several functions to realize a queue concept, where I pass the API req...

11:19
Monking @all ^^
Zak
Zak
11:34
@Mast The best way I've ever heard it put: "Job Success comes from successfully taking credit for increasing revenue or decreasing costs. Note that this does not necessarily require actually doing those things."
2
Google Chrome profiles are awesome
@Dex'ter Monking!
Darn it. Did someone already win internet today? I will be back in the Morrow.
Your escape function is pointless and destructive. Get rid of it. You might also actually be looking for codereview.stackexchange.com. — deceze 35 secs ago
11:51
My dad plays ridiculously loud ridiculous music from his newly bought loudspeakers...
I really need to get some headphones with active noise cancelling
C# summit is going really well, but we're not entirely sure how == should work. Do you think anyone would mind if we removed it?
@Zak Yup, and not getting blamed for the opposite.
@skiwi In C# it's quite possible == isn't required anymore.
@N3buchadnezzar No, you need to buy your dad some hi-quality headphones so he doesn't use his loudspeakers anymore.
Much more effective.
@Mast He has a pair. He is just an ass
It's warm
I don't want to wear headphones
@Pimgd Aircondition
11:58
-1 for preventing Bulbasaur from identifying as an Apache helicopter. Check you privilege. — ncalmbeblpaicr0011 15 hours ago
lol
@skiwi nah mate @jonskeet just do a javascript and invent ===.
:^)
@N3buchadnezzar Not everyone has AC :P
@DanPantry :==: to avoid confusion
@Mast +1. In the UK we don't have air conditioning to cool things down. We only have heating
Naruto t-shirt on the right. On one hand, it's cool. On the other, do I want to wear a t-shirt with Naruto on it in public?
@DanPantry Wear it inside out
RIP my time
@DroidRosewater
Magic cards generated by a Recurrent Neural Network. Tweet to generate cards. Not @RoboRosewater, or Mark Rosewater
2.6k tweets, 141 followers, following 3 users
It's a neural network bot!
(For Magic the Gathering cards)
12:16
@skiwi it plays MTG?
Greetings, Programs.
@DanPantry No, it generates cards for it ;)
@skiwi This is significantly less awesome (but still awesome)
@DanPantry twitter.com/DroidRosewater/with_replies was just playing around with it :p
@skiwi fun twitter is blocked in work
12:21
monking!
C# summit is going really well, but we're not entirely sure how == should work. Do you think anyone would mind if we removed it?
@Phrancis Monking!
when do you people sleep?
justice never sleeps
12:33
@Malachi Sleep?
@Malachi Do you need to use the sleep?
47 mins ago, by N3buchadnezzar
Darn it. Did someone already win internet today? I will be back in the Morrow.
@Malachi At night
Monking!
@skiwi oh yeah, you are like in a different timezone
The twilight timezone.
12:35
This should be moved in CodeReview — Mario Alexandro Santini 28 secs ago
@Malachi Are you sure, I think you're in the different timezone
runs
@Duga Doesn't feel quite right, but I don't really know why
@Duga Oh, yeah, stub code, that's why
jrh
jrh
Just wanted to ask something real quick, do you guys think a question like "why doesn't UriBuilder check for invalid characters in the "host" property?" would be a good fit for SO? I'm really kind of curious as to why this is, compare referencesource.microsoft.com/#System/net/System/… to stackoverflow.com/questions/1133424/…
Sorry, I know that's kind of a question for SO chat but I haven't got enough rep on SO to enter their rooms
12:41
@MarioAlexandroSantini this would be off-topic on Code Review unless the OP posted their real actual working code, and not a method skeleton with code replaced by comments. See A guide to Code Review for Stack Overflow users prior to referring posts to that site. — Phrancis 36 secs ago
@jrh I've seen worse questions on SO, but it might get flagged with too broad/opinion based
@jrh It sounds like it would be OK, it's a specific programming question, and as long as you can word it as such (and you have of course already done your research) it could be fine
@skiwi Actually last year about this time I was in a different timezone
Configuring webpack like https://t.co/RxyYt5UBj3
@Quill What's the image?
12:48
Justin Timberlake gif <_<
@MarioAlexandroSantini it sounds like it may be "too broad" for Stack Overflow. However, that does not necessarily make it on-topic for Code Review. Hypothetical/stub/pseudo code is always off-topic on Code Review, only real, working code is allowed. — Phrancis 42 secs ago
1
Q: Site Registration Code causing multiple accounts to be registered

Lorenzo von MatterhornI have an app that uses the MEAN stack, recently I have seen a little strange behaviour. Now this doesn't happen every time a user registers, so far it has happened 3 times. When a user registers the app creates 2 accounts for that user with all the same details. Now I have already added function...

0
Q: Convert multiple for loops in r into dplyr and/or apply functions

EnthusiastI have 2 nested for loops which i want to get rid of. Any thoughts? I am calculating distance between cities based on their longitude and latitude. There is a custom function earth.dist() that i am using in the loop. for (i in 1:nrow(dat)) { #for each other airport for (j in 1:nrow(dat)) { ...

Monking
Monking
12:55
Monking
Monking
jrh
jrh
@DanPantry good point, it reads more like a bug report than a question; it's kind of inconsistent design since Uri's constructor rejects that but UriBuilder does not, though probably only Microsoft would know / be able to do anything about it other than say "backwards compatibility (?)" / "laziness" / "whoops"
It would be interesting to see what would come up in a .NET framework source codereview
Now my dad in addition ot listen to LOUD music is also drumming with the music. Or rather he is trying
0
Q: Prevent Malicious Data and Attacks in Form Input

BRGI am building a form in which user's will be able to put sensitive data like IBAN, BIC and personal data and also passport numbers, etc. Users will be able to edit those information and then update their data which are being saved in the database. So far i have done: Prevent SQL Injection by u...

@N3buchadnezzar Drumming is pretty hard, and the bad thing about drumming is whether or not you play good, everyone hears you
13:06
@Phrancis I read that as everyone hates you lol
@Phrancis Finger drumming mind you. Not very good and still hear him loud and clear even when I have bumped up my own music.
@N3buchadnezzar Headphones FTW
@Phrancis I have. Just need a pair with active noise canceling.
@CaptainObvious Anyone else thinks that the OP is not necessarily asking for a code review?
Reading a very complicated proposal on Github only to come across this phrase made me laugh for some reason:
> This is a footgun.
@Phrancis I don't think OP has all of his code included at best
13:08
A what?
@DanPantry No, THIS is a footgun.
@Phrancis A podiatric penetration purposed pistol
( A gun which is apparently designed for shooting yourself in the foot)
(Thanks Urban Dictionary)
Strange
C++, for example, is a footgun.
Is it time for that list again?
13:09
aka:
> What you're doing is analogous to using a loaded shotgun as a golf club,
> and what you're suggesting is that we take the safety off, because it
> interferes with your golf game.
3
What is Rust then? :D
@skiwi Weathered.
@skiwi C++ with a rusty bullet.
5
@Mast Here, take my upvote star
> C++

You accidentally create a dozen instances of yourself and shoot them all in the foot. Providing emergency medical assistance is impossible since you can't tell which are bitwise copies and which are just pointing at others and saying, "That's me, over there."
4
13:10
Welcome to Code Review. Could you post all the code related to this form rather than just a few small snippets? It's difficult to properly review tiny snippets without context. — Phrancis 15 secs ago
Of-course, knowing Rust, you could get lucky and the bullet expires before hitting you.
(let ((shoot-foot (lambda (gun target)
			  (if (loaded? gun)
			      (fire-at gun (extract-foot target))
			      (shoot-foot (insert bullet gun) target)))))
  (shoot-foot gun self))
Zak
Zak
13:12
> brainfuck
Just looking at the gun gives you a migrane, so forget about actually shooting it.
Visual BASIC
You'll shoot yourself in the foot, but you'll have so much fun doing it that you won't care.
C:
You try to shoot yourself in the foot, but find out the the gun is actually a howitzer cannon.
6
@Mat'sMug @Zak
(sorry for ping @Matix)
> Using only 7 bytes of code, you blow off your entire leg in only 2 CPU clock ticks.
Assembly.
Zak
Zak
@DanPantry missing a space there
13:13
Python

You shoot yourself in the foot and then brag for hours about how much more elegantly you did it than if you had been using C or (God forbid) Perl.
You create a gun module, a gun class, a foot module, and a foot class. After realizing you can't point the gun at the foot, you pass a reference to the gun to a foot object. After the foot is blown up, the gun object remains alive for eternity, ready to shoot all future feet that may happen to appear.
@Zak'sMug
@syb0rg And nobody can figure out how you did it.
@Mast LOL
@N3buchadnezzar Once the foot is destroyed, the gun should be GC'd since it has no targets.
Zak
Zak
> Paradox
Not only can you shoot yourself in the foot, your users can too.
13:14
Tuesday is poor man's Friday, Wednesday is a poor man's Friday, Every day is a poor man's Friday!
5
It's National Footgun day
@Mast Except Friday.
@N3buchadnezzar Of-course.
That's every man's Friday.
Friday is gotta get down day
Zak
Zak
> Assembly:

Any program you write will come back and shoot you in the foot eventually anyway, so why bother?
13:15
gotta get down on friday, you say?
0
Q: What would be the complexity and time taken by this hackerrank program

A.GautamProblem Statement Watson gives Sherlock an array A1,A2...AN. He asks him to find an integer M between P and Q(both inclusive), such that, min {|Ai-M|, 1 ≤ i ≤ N} is maximised. If there are multiple solutions, print the smallest one. Input Format The first line contains N. The next line contain...

0
Q: Java Cash Register adding methods

cresjoyJust started learning java three days ago and am currently doing a problem in my textbook where I do some basic cash register functionality. So far my code can factor in taxes, let the user get change, and tell them the amount the actual tax is public class Register { private double purchase...

@Zak And don't forget to invent the gun, the bullet, the trigger and your foot before shooting.
Because libraries? What's a library?
@Mast Unless you're American you won't find a gun in a library
@DanPantry Swiss library perhaps.
> CSS:
You shoot your right foot with one hand, then switch hands to shoot your left foot but you realize that the gun has turned into a banana.
5
13:19
@Phrancis HAHAHAH
Sounds about right
> JavaScript

You find that Microsoft and Sun have released incompatible class libraries both implementing Gun objects. You then find that although there are plenty of Foot objects implemented in the past in many other languages, you cannot get access to one. But, seeing as JavaScript is so cool, you don't care and go around shooting anything else you can find.
4
> Ruby

A beautiful foot-gun without a trigger.
In Ruby, you don't need a gun. You can shoot your foot with half the functions you can find in the library.
Zak
Zak
Nope. Still Wednesday. Must be an alternative Universe.
13:23
5.times(|| @shoot_in_foot)
Python says there should only be one obvious way to do it. Ruby says you should have plenty of ways.
C++ has many ways do to things, but all but one of them will end up with you dying a painful death.
> UML
You write out all the specification of your foot, the bullet, the gun, and the relevant laws of physics, but all you can do is prove that you can shoot yourself in the foot.
That used to be a Z joke, but nobody uses Z anymore.
@Mast :( Z was... odd
0
Q: python - make two sum problem on range in python faster

David Michael GangI want to make the following program faster. I have a list of million of integers L I want to find the count of all numbers between - 10000 and 10000 which are the sum of two distinct numbers in L. I wrote the following python program. It runs already 25 minutes and just calculated 6200 of 20000...

13:37
Question has been posted (in better form) on Code Review. — Mast 40 secs ago
> I wrote the following Python program. It runs already 25 minutes and just calculated 6200 of 20000 numbers. This is too slow.
Wow.
@Phrancis I happen to agree. That's too slow indeed.
I think I can write a faster implementation in .
2
def has_two_sum(n,num_set,nums):
  res = any(((n-x) in num_set) and 2*x !=n for x in nums)
  return res
wtf Python
Those comprehensions certainly don't make the code easier to comprehend
13:43
they require higher reading comprehension
monking!
If I have a working DB, but need to add additional features, could that be a good question for code review?
@JHache No, not as such
It would be considered "changing what the code does"
On the other hand, you're welcome to hop into this chat room and we can discuss there in detail

 SQL Helpline

SQL is Weird sometimes.... bit.ly/F5-Now
@Phrancis thanks. Trying to get my thoughts together so I don't waste any one's time
I have that bookmarked
ok great
0
Q: C++ unique_ptr with custom deleter

ashwinajI'm trying to learn C++11 unique_ptr usage by doing a simple linked list program. For the life of me I can't figure out why I'm getting a compile error when using a custom deleter. #include <cstdio> #include <limits> #include <memory> #include <cstdlib> #include <iostream> using namespace std; ...

13:50
Hello @Gemtastic
Hello :)
14:05
0
Q: "RESTful" node.js server using express

finesse.pngI have attempted to construct a simple RESTful node server that allows for user authentication using passport and jwt: var express = require('express'); var app = express(); var bodyParser = require('body-parser'); var morgan = require('morgan'); var mongoose = require(...

@CaptainObvious And this is why you should use promises or async
Does anyone here have experience using ChatExchange on Windows? github.com/Manishearth/ChatExchange
Some thoughts: a) SO is not a codereview site (codereview.stackexchange.com is one) B) you are talking about interfaces, but all I see is classes. The core thing here is: an interface should not be a concrete class, it should be an interface. C) beyond that: you do not new for business logic objects, you absolutely have to use dependency injection to get such objects into your classes, or you making testing almost impossible. Long story short: watch youtube.com/playlist?list=PLD0011D00849E1B79 ... all of them. — GhostCat 50 secs ago
This is Off-Topic for StackOverflow and On-Topic for Code ReviewcFrozenDeath 49 secs ago
I'm voting to close this question as off-topic because questioner asks for code review-like feedback. — GhostCat 43 secs ago
A language agnostic algorithm that I'm trying to get feedback on it's logical flow and possible efficiency would probably be best on programmers SE right?
user image
2
@Trojan404 I'd say so
Zak
Zak
14:14
@DanPantry lol.
@cFrozenDeath Incorrect, this is hypothetical code which is off-topic for Code Review. Please recognize what is on-topic for a site before you recommend migration. — syb0rg 46 secs ago
hi frnds
@microbuster Hello
@Duga Could use some help here
@syb0rg how are you
@DanPantry I C.
@cFrozenDeath See this Code Review Meta post for more information. — syb0rg 50 secs ago
@Zak They are probably cryptic for the Chinese.
@cFrozenDeath The typename A is a strong indicator. Also the fact that the code is very trimmed down to only the problem at hand implies that this is not the actual code (especially in a larger context) which would be required for Code ReviewVogel612 47 secs ago
@microbuster Doing well, very busy
Yourself?
thanks for the feedback on this @GhostCat. I agree I should post this in codereview then.. sorry about that! — Felipe S. 24 secs ago
14:25
@syb0rg well till death
Bad way to start the day, vote down 3 questions in a row.
Why three downvotes? TLE are on topic: codereview.stackexchange.com/q/135390/27623
14:43
Have you looked at this piece of #*! codereview.stackexchange.com/questions/135390/…
He did change the title, but it wasn't any better.
Lol, now @Syb0rg and @pacmaninbw has to duel. Somebody will die, lol.
meh.
@N3buchadnezzar Odds are it's an "innocent" bystander.
@pacmaninbw no need to start yelling insults just yet :) relax
@pacmaninbw Left a comment, let's see if the OP responds
14:46
@Trojan404 Bystander? More like warmonger.
1
Q: Java Design: How to expose and encapsulate a vendor API?

Felipe S.I know basic Java, but I struggle sometimes with object orientation design. There is a vendor api I use, and I wanted to wrap it te be reusable as a lib in other projects. All the services from the vendor are different classes and have no hierarchy and so on, but I have no option to change it. S...

@N3buchadnezzar SHUDDUP
Kidding ;)
Sorry guys.
@Trojan404 Too true, I'm lucky when I hit the target, although the side of the barn is easy.
I think I can shoot one of my feet.
How aggressive is Gandhi on a scale from 0 to 10? Asnwer: 255.
@pacmaninbw You're good :-)
@syb0rg did you solve the CMake problem? I'm curious did you get it all to build before trying to make it portable?
@pacmaninbw I got distracted with making a coffee table... long story...
@syb0rg Coding a coffee table?
@N3buchadnezzar Now you got me thinking I should integrate technology into this table
14:56
Just do not make it too intelligent, We want to avoid another accident.
@N3buchadnezzar I always wondered why he did that.
@syb0rg Honey Do project?
@syb0rg DIY Surface.
@pacmaninbw Nah, my future roommate dragged me along
Tea parties ahoy
14:58
@syb0rg Probably? Because the original was looking for verification of time complexity instead of review.
@Mast Ah, makes sense
@Trojan404 Thanks, I needed that!
Question for high-rep users here... Can someone tell me why this answer is deleted?

« first day (1173 days earlier)      last day (3138 days later) »