« first day (1017 days earlier)      last day (3004 days later) » 

12:00 AM
RELOAD! There are 1836 unanswered questions (94.1622% answered)
 
My laptop was overheating because of a torrent running
That should be an indication I need a new laptop
 
or you need to take it apart and clean the gunk out of the fan and add scrap the bad thermal paste from between the processor and the heat sink to add new paste
 
12:15 AM
yeah I suppose
I don't like messing with laptop's their internals though
 
lol. you probably need a new laptop.
I like taking things apart, reminds me I was going to take apart one of my keyfabs to see if I could somehow boost the signal
when I took it to a dealership they told me the batteries were fine...
 
12:39 AM
I wanted to tag my recent question (codereview.stackexchange.com/questions/119995/…) with static code analysis, or synonym, but was surprised that no such tag(s) exist. Having insufficient rep to create a new tag, can I suggest here that such be created, I am interested in any (useful) additional Requires or Enforces constraints that could be statically tested.
 
@kamilk I guess you are right. This piece of code got criticized at code review and I wanted to better understand the reasoning. Maybe I should just say "leave me alone, it's good enough" — chrumck 21 secs ago
 
@PieterGeerkens kind of slow in here on Sunday - Monday. not sure that it would make a good tag though.
let me take a look at the question
 
Could be more at home on Code Review (though I could be wrong). — Marty 20 secs ago
Thanks! I wasn't aware of codereview, I'll post my question there. — Max 20 secs ago
 
12:57 AM
0
Q: Restify: Is this approach to keeping error details out of responses reasonable?

MaxI'd like to make sure error details are never sent out in responses from my restify-powered API. The best way to achieve that seemed to be via wrapping server.formatters in another function which filtered-out Errors before passing the transformed body on to the relevant formatter. I've probably m...

 
1:11 AM
This isnt a code review site — redFIVE 46 secs ago
 
 
1 hour later…
2:17 AM
1
Q: Computing the double Integral using MonteCarlo techniques using Julia

David CardozoSo I decided to give a try and learn Julia for doing scientific computing, and I decided to tackle the problem of finding $$ \int_{D_{\frac{1}{4}}} x^4 + y^2 dA $$ where \$ D_{\frac{1}{4}} \$ is the part of the unit circle in the first cuadrant. My code in Julia is the following: using Distr...

0
Q: AVERAGES OF STUDENTS IN A CLASS

VENKATA SIVA KRISHNA. THANIKONWrite a program that prompts the user to enter the number of students, the students’ IDs, first names, and their scores. Then print the average score, the 2 students with the highest scores, the 2 students with the lowest scores, and all the students that have scores above the average score. ...

 
I wrote that last night for the Code Review site. It tackles making the formula/conditional formatting process acceptably efficient. I was reluctant to throw that much effort away so I posted it here. — Jeeped 17 secs ago
 
2:40 AM
I'm voting to close this question as off-topic because it should be on CodeReview — Keith Nicholas 31 secs ago
I'm new here; where is code review? @KeithNicholas — Will Njundong 50 secs ago
Please migrate this question to: codereview.stackexchange.comDaniel Cheung 56 secs ago
This would be a better fit for Code Review if only the improved code was up for review; also they'll need a more descriptive title that summarizes what problem the code is solving. Other than that, yeah, it could be CR material. — Mat's Mug 35 secs ago
 
-1
Q: Is there a shorter way I could have written this code while keeping it readable?

Will NjundongAn exercise from my computer programming class, this program reads in student scores and displays the total points earned along with a grade. I am tasked with modifying it to ask the user for confirmation when a score higher than 100 is entered. Plainly, it should not add a score greater than 100...

 
3:13 AM
1
Q: Windows filepath and filename validation

PoplopI have a Windows program that prompts the user to input a file path, and file name. I then check that the file exists with Directory.Exists. Then the user inputs a filename. I check it using this answer to check whether the filename is valid or not(it may or may not yet exist). Here is my code...

 
@roullie this has nothing to do with meta.stackoverflow ... i think you meant codereview.stackexchange.comcharlietfl 39 secs ago
 
3:42 AM
0
Q: C - Simple ArrayList that implements ArrayList.h error

KrakenJawsI am trying to write a simplified ArrayList of integers in C code. With implementation of functions in ArrayList.h. Doubling the size of the array whenever you try to add to a full array. And being able to set size of starting Array from user input. Code that I have now which throws error : in...

 
3:52 AM
0
Q: Best Practice in a Standard PHP/HTML/JavaScript Web Page Stack

user3935156I am wondering what a good way to refactor this php page would be. Are there any website "code smells" in this code? Is having a big php block to access the database, inside the html considered clean? It seems kind of like I am mixing logic with presentation. Can my php database query be shifted ...

 
This is off-topic for S/O. Have a look at the Code Review Stack Exchange site. — Aaron Gillion 1 min ago
 
 
2 hours later…
5:51 AM
Monking
 
6:41 AM
0
Q: I'm not sure if my query is safe or I need an extra step to sanitize data?

Louis Tran1/ I'm not sure if my query below need an extra steps to sanitize data to prevent SQL injection. 2/ And if I use $wpdb->get_results($query), do I need to prepare($query) first? Thank you. if($_POST['cp_class'] != ''){ $cp_class = array( 'key' => 'cp_class',...

0
Q: Find the largest continuous descending sum in a 2d matrix

stephensGiven a 2d array, the problem is to find the largest sum, where each subsequent is >= the previous digit but < all of the 'neighbour' digits. You can only move up, down, left and right. My solution will run in O(NM) time with O(NM) space (please correct me if I'm wrong). The solution is as foll...

 
TTGTB
 
7:18 AM
@JakeMeyer We can't help you because we don't know how you want to modify the output. If you want general advice on your code, consider codereview.stackexchange.com instead of Stack Overflow. — Quentin Pradet 55 secs ago
 
MOnking...
 
hey @Vogel612
 
aaand I just made my PC BSOD on my by pressing "save"
gotta love playing ~5 hours and probably losing the save-file in a Bluescreen
not that it looked uphill from where I was.
 
BSOD is evil
 
the game itself was running fine though... I don't understand how you can have a game run fine, but presumably run out of RAM on saving the current state.
 
7:29 AM
0
Q: Implementing a templated Array class

In78I have implemented an Array class using templates. I have used a std::allocator object for memory allocation. Will it be better to use operator new along with placement new for memory allocation? array.h #ifndef ARRAY_H #define ARRAY_H #include <memory> #include <cstddef> template <typename T>...

 
7:47 AM
@enderland I was asleep. A bit late to have @Duga say anything fun now.
 
0
Q: Recursive call to get trajectory points C++

EmmanuelI have a code that gets the closest pickup longitude and latitude from a file and given a dropoff longitude and latitude. Say I want to get the next pickup longitude and latitude from the dropoff longitude and latitude of the result obtained, how can I do this and I will like to do this for about...

 
I'm not sure if this is offtopic and better on codereview. Anyway, its beacuse you'll call the function at every iteration of the loop, with the additional overhead it brings — Damien Pirsy 8 secs ago
 
8:03 AM
@CaptainObvious sounds broken...
 
@DamienPirsy This question is miles off-topic on Code Review. Please review A Guide to Code Review for Stack Overflow Users. Thanks — Vogel612 35 secs ago
This belongs on code review. — Jan Greve 55 secs ago
@JanGreve no not really... In this form it's off-topic for Code Review, because the code presented is hypothetical. For more info, please read A Guide to Code Review for Stack Overflow usersVogel612 32 secs ago
 
8:23 AM
0
Q: Basic ToDo App In Objective-C

Shrijit SinghThis is my first app i have made after learning programming on iOS. Most of the app is complete just the UI and some features are left to be added. Any optimizations and coding practices would be very helpful. The code can be found here:   https://github.com/shrijitsingh99/accomplish.git

 
8:57 AM
Argh, arrow functions...
 
Greetings, wonderful people.
What's up? @Mast
 
Monking @Dan
 
Naruto answer; accepted non-selfie answer with 0 score: Animated SVG pie chart with custom properties
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: Function to combine arrays of associative arrays
 
So I was the on-call engineer this last weekend
And one of our servers died on me on Friday evening
Turns out it's still down, as I saw on our dashboard this morning
So this image is particularly relevant at the moment:
 
That can't be good, why didn't you get called?
 
9:02 AM
@Mast I did get called. After about an hour of humming and harring because the infrastructure team wouldn't give me access to the US servers to be able to verify that the US services were working again, there was nothing to do and my boss told me to wait until Monday.
 
lol
 
Now two of our services that are used in telesales are down and have been since Saturday, but some people have been in the office since half 7 our time - So the business has lost 1 and a half hours of work so far
It is, as you would say, Not Good™
 
so you're telling me the On-Call engineer is not allowed access to the servers that are down?
 
@Vogel612 The US servers weren't down
It's just the US were the only branch in the office at the time
So the only ones we could reliably test to say "yes, this is working"
I could test the services from my local machine and everything appeared to be in running order
But it was the US office that was having issues, so I needed to test from there
Frankly, it is exceedingly rare that the on call phone ever rings in my company
This is the second time since I've started working here 13 months ago
So a bit of fumbling is to be expected
 
Sounds like there's room for improvement.
 
9:07 AM
0
Q: Check if path exists directed graph, without using collection

Mosbius8I have written a code to find whether the path exists between source and destination in a directed graph. I have used BFS and instead of ArrayList or queue, I have written my own helper class. public class Graph { private int numVertex; // Helper class, which can act like Adjacency List...

 
I'm voting to close this question as off-topic because it belong on code review. — 2501 8 secs ago
 
@Duga Must be flag day today.
var my_function = some_array.map( value => ( value % 2 === 0 ) ? value += 1 : value -= 1 );
Not sure whether I like them yet.
 
Arrow functions?
They're quite nice, especially for the usage you've just listed
They're mainly to solve another problem, though
Closures within classes
 
0
Q: Auto move files to a sub folder with Ruby

Chris V.I started writing a script to handle my file downloads in osx because they quickly pile up and it gets time consuming to do this manually by drag and drop. I am looking forward to get some feedback. require 'filewatcher' require 'pathname' require 'fileutils' class FileAction def initialize(...

 
@DanPantry Closures within classes?
 
9:20 AM
Consider something like this:
Yeah, or closures that use this.
class MyClass {
  doSomething() {
    return fetch('/api/auth/tokens').then(function(token) {
      this.token = token
    })
  }
}
That won't work. this in this.token will be the this of the function passed to .then - not the this of the class instance.
There's a good reason for that if not convoluted but long story short is: It doesn't work.
You can solve that by using arrow functions.
class MyClass {
  doSomething() {
    return fetch('/api/auth/tokens').then(token => {
      this.token = token
    })
  }
}
 
Zak
Monking @all
 
I encountered that problem for my FormExtender...
 
The arrow function binds to the enclosing this context rather than creating a new one
 
but I didn't actually use classes there
 
TLDR in that second example, this in this.token refers to the class instance - and not the this of the arrow function.
 
9:22 AM
@DanPantry which just makes the boggart named this more complicated in js.
 
@Vogel612 It's the simplest example I could think of.
 
@DanPantry Good to know.
 
@Vogel612 Yeah, this is pretty complicated but it is complicated for a good reason
Well, for some values of good and reason
 
lol
yea I avoided that with self.
 
Basically with functions and classes in javascript they are never assigned a this (because functions are just objects on other objects), it has to be done at runtime, so the value of this can be altered at runtime
so every function gets its own undefined this, unless otherwise specified
 
9:24 AM
so basically what you have explicitly in python happens implicitly in JS
and you have no control over the this that's assigned
 
Yes (maybe, I dont' do Python).
No, not true.. you can control this in JavaScript.
var fn = function() { console.log(this); }
Consider the above function.
fn() will print undefined
fn.bind(3)() will print 3
fn.bind(3) will return a new function that has this set to 3
I should become a teacher
 
^^ that
but it's rather similar to how classes work in python.
 
Monking @Zak, btw.
 
every function that operates on the instance will have self as the first parameter
 
Ah, right, yes
I remember now
in Python, self is treated like an actual argument rather than magic
 
9:27 AM
that self takes the place of this, and when invoking the function you usually don't specify it
exactly
 
0
Q: Getting the next focusable element

Puddingboyfunction getNext( elm ){ var child = elm.children; var len = child.length; for(var i = 0; i < len; i += 1){ if(child[i].tagname.match(/a|button|input|select|textarea/i)) return child[i]; if(child[i].children.length) getNext(child[i]); } } function stepBack(elm){ ...

 
That is one facet about Python I like
 
soo... this is just another regular JS object?
 
Everything in JavaScript is an object.
Everything.
I don't know the specifics of exactly how this is assigned by heart
But, yes, it is an object. It can be any value any object can be.
undefined, null, through to another function or {}.. etc
 
@DanPantry You should try it sometime, it's really powerful stuff.
 
9:28 AM
@Mast The module system always annoyed me.
and __init__
 
@Mast every programming language ever is really powerful stuff... if you use it right
except windows CLI, but hey
 
lol
 
Also chat is now limiting me to 1 message every 10 seconds, which I think is a sign to do some work. So brb in an hour.
 
Zak
@DanPantry Speaking as someone with family in the education sector. You would *enjoy* teaching, you would *hate* being a teacher.
You would assume the latter mostly involves the former, but alas no.
 
Yea, I come from a family of teachers as well and @Zak is probably right.
 
9:33 AM
wow... VS doesn't support git ssh URLs?
that's... sad
 
@Vogel612 Let's hope they do it better in the next version.
 
It's still bad
To be fair , 2015 is a lot better than 2012 (at least for nodeJS and whatnot)
And I'll still use SublimeText over VS for any JavaScript
And yes I said I'd AFK but I can never miss a chance to rag on VS
 
^^
I need a database for the code snippets I've written for challenges...
 
Woops.
I broke functionality of the code a week ago and just noticed
 
@DanPantry Nah, something bigger.
@DanPantry Should've used tests.
 
9:46 AM
Woops. I broke a lot of functionality a week ago.
Crap.
Two parts of the website use System.Web.HttpContext.Current.Session
I switched the website to use Web API the other week (from MVC).
Web API is stateless and does not have System.Web.HttpContext.Current.Session.
woops
 
and here I am getting compiler errors for Rubberduck :/
 
10:07 AM
Questions seeking a code review belong on the code review stackexchange. — Quentin 49 secs ago
 
0
Q: Chess countdown timer for Arduino LCD Keypad in C++

Jamie BullI'm very new to C++ and Arduino, with a background in Python. I've written this code for a countdown timer and a simple menu to set the time available to each player, using button handling code from here. It works as expected, but I don't know whether this is good idiomatic C++/Arduino code or i...

 
I don't understand. There is a bug in the app about a null reference exception, but there's no null reference because I can step through it. And then when I try again it works fine.
And the code looks fine
Higgs Bugson
 
Schrödingers Code
2
 
It is bizarre.. doesn't help that one of the lines is optimised away by the compiler
But from my perspective it looks like a setter with side effects (that should ,nonetheless, work) is bugging out
 
@Quentin It should also be noted that in its' current form, the question might get closed on Code Review as "Example/Hypothetical" Code. — Zak 46 secs ago
 
10:22 AM
Even MORE weirdly, another section of the app that uses the exact same code works fine. Wat
Side effects are awful
 
0
Q: Extracting articles mentioned in comments in three GET requests

FrozenHeartI need to make several HTTP GET requests and do the following stuff: When all of them will be completed, I need to parse each HTML After HTML parsing or in case of any error I need to set flag responsesAddingInProcess to false Is it a right way to do it? let otherPagesRequests = []; otherPag...

 
@CaptainObvious For fk sake @Zak
Yet another incorrect recommendation from SO :\
Alright, so I fixed my bug
Issue was that pressing Debug in VS was launching the solution in Release configuration (? why?) which would optimise some lines away, misleading me as to where the real issue was
 
MOnking
 
hello @skiwi
 
How's everyone doing?
 
10:35 AM
Frustrating day so far
you?
 
Good day so far, just ready to start doing stuff play games
 
lol
 
Zak
@DanPantry For a second I thought you were annoyed at me ^^
 
You should ask such questions at SO's sister site, Code Review. There you will get good advice on how to improve working code. — Cary Swoveland 45 secs ago
 
@Zak I could never be annoyed at you, friend
2
 
11:30 AM
possible answer invalidation by stephens on question by stephens: codereview.stackexchange.com/posts/120010/revisions
 
@DJanssens I just discovered this old chat message:
Mar 21 '15 at 15:14, by DJanssens
I'm currently following the course 'Machine Learning' at Coursera, offered by Andrew Ng
Just wanted to say that I am also taking that course now :)
@Duga Can someone please rollback that one and add a comment? I don't have my auto-comments at work.
@Donald.McLean I believe you mentioned at some point that there was a good functional programming course on Coursera, in Scala. You got a link or something to that?
 
Zak
@SimonForsberg Handled.
On a scale of one to even, I can't. — VoteToClose 2 days ago
 
66
A: How even is a number?

Digital Traumax86_64 machine code, 4 bytes The BSF (bit scan forward) instruction does exactly this! 0x0f 0xbc 0xc7 0xc3 In gcc-style assembly, this is: .globl f f: bsfl %edi, %eax ret The input is given in the EDI register and returned in the EAX register as per standard 64-b...

Taking bytes to a whole new level
 
Don't let people who bypass gitignore commit directly to master, have them make pull requests (which are a good idea because you do code reviews anyway (right? right?)). Reject those if they submit node_modules. — Benjamin Gruenbaum 36 secs ago
 
Can't view the documentation of a component we use due to the firewall. derp
Maybe it is better called a failwall
2
 
11:52 AM
1) Where's while loop over here ? 2)Might be your question doesn't support SO specifications but can be placed over codereview.stackexchange.comUchiha 52 secs ago
 
12:18 PM
0
Q: Optimizing success page + data entry

LearnerngI have been learning how to code from the internet and tried to put together my knowledge in a project. The code is working, but I would like to adopt elegance and good coding practices. The purpose of this code is to log the inputs of a form (which is a menu for a shop) to the database to be k...

0
Q: Command pattern for non related recievers in Java with command execute and undo operations

Krishna KumarBelow is the code I have written to enhance my understanding of Command Pattern in Java. As per my study and understanding, when we have some entities [ which we call as receivers ] 1. AirConditioner.java package learn.java.commandpattern.recievers; /** * @author krishna.k * */ public cl...

 
This doesn't answer the problem, just provides very opinionated advice more suited to a site like codereview — TheLethalCoder 38 secs ago
 
12:37 PM
0
Q: Nullable boolean value with property

sevevesOur Sonar code analysis server tells me "Boolean literals should not be redundant. Redundant Boolean literals should be removed from expressions to improve readability. Tag: Clumsy" and categorizes it as a minor bug. Is this an error in the associated Sonar/FXCop C# rule (maybe it cannot handle n...

 
1:10 PM
@SimonForsberg Yes, let me look that up for you.
No idea when they're going to run it again though.
 
@Donald.McLean yeah that sounds like it's been a while...
 
I got the impression that it was going to run again soon.
But my sense of time isn't always firmly grounded.
 
1:28 PM
0
Q: BackgroundWorker in WPF executing multiple methods

FangI've implemented a BackgroundWorker in my WPF app. My code is pretty ugly though. I've been told to write as little as redundant code as possible. IS there some generic Method I could employ to reduce the amount of code? //BackgroundWorker Databases private void worker_updateDatabases(ob...

0
Q: You hate <s>hats</s> reputation? Klick here to get rid of it

Vogel612Soo... I recently read a meta-post about the inherent problems of reputation. It listed some things like: Confirmation bias. Demotivating for low-rep users. Hubris and elitism of high-rep users over low-rep users. Incorrect representation of competence. ... So I thought to myself: "How would ...

 
1:50 PM
 
2:14 PM
0
Q: Generic Timeout Handler

w0lfIn a frontend Javascript project I have to implement a generic timeout mechanism for a set of asynchronous tasks that the program needs to perform. These are the conditions: The tasks are functions that have a variable number of arguments, the last of which is the callback to be called in case...

 
2:26 PM
please refer codereview.stackexchange.com/questions/120029/… I have implemented the Command pattern as per my understanding after studying Command pattern and the comments here. — nits.kk 52 secs ago
 
I just had to agree on a stringly typed database schema, I've never felt so ashamed
 
0
Q: Ruby service object improvements?

eport03I have written a Ruby class as practice and would really appreciate some feedback on how I could improve it. The idea being, it is a stand-alone service object that can be run to determine if a job meets a suitable level as determined by my criteria. Suggestions on design, improvements, best prac...

 
2:47 PM
0
Q: Nullable boolean value with property

sevevesOur Sonar code analysis server tells me "Boolean literals should not be redundant. Redundant Boolean literals should be removed from expressions to improve readability. Tag: Clumsy" and categorizes it as a minor bug. Is this an error in the associated Sonar/FXCop C# rule (maybe it cannot handle n...

^^ Kind of weird question?
 
@DanPantry Why is that?
 
@Donald.McLean String-typing is baaaaaaad.
At least in this sense
We're using a relational database, but we have to stuff different types of the same thing in a database with different types of other things and the only thing that groups them together is a column that says what type it is
Think something like { id: 0, value: 'Appointment', type: 'workflow' } and {id: 0, value: 'Cancellation', type: 'workflow' } stored with {id: 0, value: 'Pounds', type: 'currency'}
That might work in some circumstances but IMO in this circumstance those things shoudl be separate entities
(and separate tables)
 
Does it work?
 
Yes, but it sucks.
I can understand making something to work, but this is a new system and we're not exactly hard pressed for time
> Warning: Fatal error 9001 occurred at Feb 15 2016 3:01PM. Note the error and time, and contact your system administrator
Uh-oh. That doesn't sound good.
 
3:05 PM
Why did they not like your plan?
 
@Donald.McLean I didn't make the plan. I do not like the plan.
2
 
But you don't have an alternative plan?
 
It feels strange that we're shoving a load of obviously different entities into a single table and then grouping them by a discrimination column
I do have an alternative plan: Make each of these entities their own separate table, do away with the discriminant
The discriminant doesn't make sense and just makes it harder for us to bind with EF
 
I have a similar problem with a side project, and I'm not sure I like either approach. The advantage (for me) of the single table way is that if I add a new type, I don't have to add a new table.
@DanPantry EF?
 
Entity Framework
@Donald.McLean I can see that point of view, sure
But it just seems like shoving everything into this table is just going to make things harder on us
For example we're putting in a translation id for "8 hours" rather than the number 8
Which makes it harder for data warehouse to perform calculations because now they have to look at the translation ID and set up a switch instead of just knowing that the hours column having 8 means it's 8 hours
 
3:12 PM
I was reading an article about NoSQL databases and found it interesting how for many high-traffic web sites, disk IO is such a major factor that traditional DB normalization is actually a huge time killer because it causes extra reads.
 
This is SQL - not NoSQL
But I get your point
 
I'm not even saying that it's relevant to your problem, I just thought it was interesting. Sometimes the random facts in my brain just come out.
4
 
@Donald.McLean That's not a bad thing ^^
 
0
Q: Perl DBI insert of hash

Stephen OstermillerHow can this method that inserts a hashref into a database table be improved? It assumes that the columns of the database table are named identically to the fields in the hashref. The return value is the id field created by the insert. sub insert(){ my ($table, $data) = @_; my ($fields...

 
3:19 PM
@Donald.McLean And sometimes random facts enter my brain too :)
 
That's one of the hard parts about DB design - it isn't necessarily quite as easy to fix a design flaw as it can be with pure software. On the other hand, Doing The Simplest Thing That Could Possibly Work is hard - it sometime offends our sense of How Much Cooler It Would Be To Do It This Other Way.
 
@SimonForsberg that course is awesome, right?
 
@Donald.McLean That's probably the issue with me (and why I am not a DBA!)
 
0
Q: Java 8 String Unique Permutations in Parallel

bosco1Is there a better way to do this Java 8 String Unique Permutations in Parallel package com.bos; import java.util.Date; import java.util.Set; import java.util.concurrent.ConcurrentSkipListSet; import java.util.stream.IntStream; public class StringPermutation { private static Set<String> set...

 
3:36 PM
Don't use ^1.3.0 kids, unless you want to break your app... woops
 
@CaptainObvious Does not look like his code.
Looks basically direct copy pasta from dzone article
NVM, looks like he is the author of the article
Still a crap question though IMO
 
@DanPantry What, Kendo?
How do NAA notices get removed from an answer?
Author of this cleaned it up quite nicely, notice is no longer necessary.
 
Zak
2 weeks later, my code finally works.
I'd love to say that means my project is finished, but no. That was just to get our (old) spreadsheet to export its' data in a clean format.
 
@Mast No, Angular.
 
Zak
3:49 PM
On the plus side, the rest of it *should* now be fairly straightforward.
 
We're currently on 1.3.0, node automatically installs packages with the caret which means "match any minor or patch version" - which makes sense if packages use semver
Angular does not use semver (at least not very well), so ^1.3.0 will install 1.3.20, which may have breaking changes compared to 1.3.0
 
Yay ^^
 
I'm voting to close this question as off-topic because it sounds like a request for codereview.stackexchange.com. — deceze 58 secs ago
That's exactly why I'm referring you to Codereview. That's what they're for. — deceze just now
 
@Duga He's actually right in this case.
 
I'm voting to close this question as off-topic because it's more suitable for the Code Review StackExchange site. — Toby Speight 24 secs ago
 
4:02 PM
I was surprised too @Mast
 
Since the question apparently is about improving working code it belongs on CodeReview. — Ansgar Wiechers 11 secs ago
You can also submit working code for critique at Code ReviewAndyG 59 secs ago
 
0
Q: Javascript Payload

AlexandreI am coding a proof of concept on the danger of JavaScript poisoning, XSS and other client side attacks... Therefore, I coded some Javascript payloads. As I am not very familiar with Javascript (I actually hate this language ^^) I would really appreciate if you guys could give me some recommend...

 
@DJanssens Indeed it is. I have several ideas for what to do with my newly found knowledge. Have you found any practical usage for the course?
 
I'm voting to close this question as off-topic because it sounds like a better candidate for codereview.stackexchange.com. — deceze 9 secs ago
Doesn't seem long winded to me. This would be better suited for Code Review tho — Machavity 47 secs ago
 
@CaptainObvious Sounds like you'd get along with this guy, @Mast
 
4:12 PM
@DanPantry Except I never cross-post to SO ^^
Ah, original went RBA.
 
@Mast Actually he posted on SO and was told to post here. ;D
 
I know, I can read Duga too.
6
 
That makes it sound like Duga is a language, I like it
 
@SimonForsberg ^^
2
 
@DanPantry @Mast I doubt that will happen :)
 
4:17 PM
0
Q: Create functions of existing code

LlopisI have this code working: val <- 0 for (state in rownames_m){ for (cancer in tumors){ data_o <- paste0("Pg_", cancer, "_state") if ("100130426" %in% colnames(get(data_o))){ if (get(data_o)[state, "100130426"] != 0){ new_val <- get(data_o)[state, "100130426"]*log2(get(data...

 
So you doubt it rather than saying no.. so you're saying there's a chance
 
Thanks. I have asked on codereview, it's fine to close this question. — Stac Pollaidh 43 secs ago
 
0
Q: Prepared PHP Statement

Stac PollaidhI am slowly learning PHP and have been using prepared statements. I have a simple category.php page, which takes a category tag to display posts from that category, such as localhost/php/category.php?tag=sysadmin. I want to select the Category Title from the "j_oracle_cat" table based on the val...

0
Q: Code to analyse text get stuck if too much data

R3uKI've made the following VBA script to analyse text recurrence in a huge batch of descriptions. For a small part of the batch the code run smoothly, but when I include everything it tends to loose control, get stuck and both Excel and VBE freeze. What I did to avoid this (at least most of the ti...

 
4:33 PM
@DanPantry Nothing is impossible.
 
imagines some Groovy/Brainfuck combination with Swedish keywords
 
@Mast Well... Groovy/BF combination I have already. It's called Brainduck.
But Swedish keywords ain't gonna happen.
 
4:52 PM
-2
Q: singly linked list data structure in Java

user97729Create a singly linked list data structure in Java. A part from the general list manipulation methods (you are not required to implement them), your LinkedList class should contain the following functionalities (will full implementation): getFirst() - return the first item in the list addFirst(...

0
Q: Destroy script for provisioning

setevoyScript intended to remove Vault & Consul setup before run re-provision them on server. This is my first Ruby script, so will be perfect to see my mistakes here. #!/usr/bin/env ruby require 'net/ssh' $me = File.basename(__FILE__) print "\n[#{$me}] Vault & Consul DESTROY started on the $HOST.\...

 
Thanks for the Code Review tip @AndyG — SonarJetLens 18 secs ago
 
We are not a code-writing service. Do it yourself. — Mast 11 secs ago
I can't wait till I can cast delete votes...
 
5:18 PM
0
Q: Performance Optimized Project Euler Problem 14 in Clojure

Christopher DumasI have some serious misgivings about how good/idiomatic Clojure code this is. I have a very Haskell-ish implementation that runs very slowly, that I'm happy with, but this optimized version seems really clunky to me, although it runs ~20x faster. (ns project-euler.fast-problem14) ;; I've decide...

 
@SimonForsberg I tried using logistic regression for my thesis, but performance (exec. Time) wise, it was quite bad. Sadly I didnt find any other use yet. Im always up for a team up ;)
 
0
Q: Executor Service with Blocking Queue

DontForgetTheSemiColonI did not find a single working implementation of using an Executor Service with a Blocking Queue. So , I have come with with a working sample. Thoughts? import java.util.Map; import java.util.concurrent.BlockingQueue; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.Ex...

 
5:40 PM
May be this should be better asked (with a fully working code example) at SE Code Review. — πάντα ῥεῖ 48 secs ago
 
5:52 PM
Welcome @JamieBull
 
6:09 PM
@Mast Hi!
 
@DJanssens How many features did you use? You might be interested in github.com/Zomis/Machine-Learning
 
I'm voting to close this question as off-topic because this question is asking for a review. This is best suited here codereview.stackexchange.comCodexer 27 secs ago
 
http://www.commitstrip.com/en/2016/02/15/our-companys-greatest-project/
CommitStrip
Our company’s greatest project
CommitStrip
1455560094
11
 
yup ^^
 
6:28 PM
@CommitStrip no time to work on tech debt (i.e., stabilizing the tower)
 
6:42 PM
@SimonForsberg will look at it when im back from my trip (currently in prague). I used 8 features, where each feature was a textual simularity output from comparing the contents of title and body of stack overflow question, to find duplicates
 
0
Q: How does my solution compare to the 'official' solution?

eirikdaudeIn an effort to learn C# / improve my coding skills, I've started working on the Project Euler problems. After finishing problem 7, I see that I may have been overthinking things a bit, but even so I believe that my solution should be faster than what is presented in the problem overview. While ...

 
@DJanssens So each feature was a value between 0 and 1 ?
 
@SimonForsberg yep it used the cosine simularity between the text's vectors
@SimonForsberg it was based on a simular paper, but it wasnt really useful.
 
@DJanssens that is something I am not entirely familiar with.
Don't really understand why it was that slow.
 
The calculation of the multiple features :) the ml alforithm was quite fast
 
6:52 PM
okay, that explains it :)
 
But it had to compare the document (question) with all other document, which was really slow in the first place. And had to calculate the 8 features
We changed the direction and instead used ElasticSearch which is really cool and fast for duplicate retrieval. Planning to release my results in a meta post on SO soon :)
 
7:09 PM
@DJanssens Oh, that sounds slow indeed
@DJanssens Let me know when it's there
 
0
Q: Alternatives to ResultSet?

JohnJavaSE-1.6, sqlite-jdbc-3.8.7 The sql query is fast, like 50ms, and returns 10,000 to 25,000 entries, 2 columns. The problem is iterating through the ResultSet of entries takes 1.5 seconds for 10,000 entries. This is the typical code: while(rs.next()) { //blank to test iteration speed } logg...

 
7:29 PM
0
Q: Optimizing code for VB.NET

BlindercoderI want to optimize this code, whats the best way to do it? ( meaning less double lines! ) I am reading through the book but as far as I am theres nothing on optimizing the code. ( seems ridiculous to write those lines every time ) Private Sub munteenheidlistbox_SelectedIndexChanged(sender As Obj...

 
@mxdsp Your code functions correctly, so maybe this is a question for Code Review. codereview.stackexchange.comR. Murray just now
 
Hmm, deprecating a deprecation notice... Interesting, to say the least. — Kroltan Jan 30 '15 at 19:31
 
0
Q: Form submit and data display

David MašekThis is my first PHP project - just to write to something to learn from. I made a page with form to send some quote to server and display some quotes from db. I'm just starting with PHP so point out anything that could help me improve. Live version. quote-a-day.php <?php require_once $_S...

0
Q: I want to optimize this code for VB.NET

BlindercoderI want to optimize this code, whats the best way to do it? ( meaning less double lines! ) I am reading through the book but as far as I am theres nothing on optimizing the code. ( seems ridiculous to write those lines every time ) For example on each case I use the same lines how to combine that...

 
8:34 PM
Your question makes it sound like this is working code and you'd like tips on how to improve this code or your coding style in general. Seems like this question might be more on-topic at codereview.stackexchange.com - have you considered asking it there instead? — user164385 29 secs ago
 
8:48 PM
0
Q: Backing up files to remote servers

LinI have code that backup files to remote servers. There are 2 pandas data frames: storedfiles: that points to the files already stored in previous runs filelist: a list of candidates to be stored in one of the depots (comes from a config file). Filelist structure has the following columns: ...

 
9:00 PM
I know this isn't Code Review, but it's positively painful to see double-precision floating-point pulled in needlessly where you could instead just have nrows = nrows * 10 + (ch - '0')... — Notlikethat 30 secs ago
 
Naruto answer; accepted non-selfie answer with 0 score: Create Form Controls based on the properties of a class
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: Custom currency format
 
9:13 PM
0
Q: Power function in python

r0ck3I_Ii'm a freshman in Python world, i used to program in C. i wrote a function/method that return power of a number: def pow(x, y): powered = x if y == 0: return 1 while y > 1: powered *= x y -= 1 return powered Mine is a logic question (IT WORKS IN TH...

 
9:27 PM
@RoboSanta Pretty good answer it looks like
 
9:46 PM
monking
 
@Quill monking
 
@CaptainObvious Aren't the version tags redundant on that one? You only need version tags if it's specifically designed for that one.
 
360
Q: What is "chat with an expert"?

AntonyA box just comes out of nowhere which says "chat with an expert". It happened once on Stack Overflow and once on Meta. Is this an ad? Isn't Meta supposed to have no ads? Here's the HTML for that weird box: <div id="adviza-box" style="width: 380px; "> <div id="adviza-status"> <...

 
Oh, where would we be without SE...
8
Q: How to fill CAPTCHA using automation?

Tom J MuthirenthiHow can I automate, 'Enter CAPTCHA' using Selenium Web Driver ?

 
10:01 PM
I feel like you've missed the point of CAPTCHA. — ryan 4 hours ago
 
0
Q: Criticize my recursive binary search python implementation

NlightNFotisThis is my first foray into having code of mine being code reviewed, so here goes. I have this (recursive) binary search implementation in Python, and I want you to criticize every aspect of it. It is a naive implementation, (drilling the basics and stuff), but, I want you to comment on the perc...

 
10:17 PM
> // this results in minor inconsistencies in CSS, but alas
I laughed
 
Thanks santa.
 
Yes, always click on random unexpected links in pop-up messages on websites where you don't expect. What harm can come from that? — JonW Mar 31 '13 at 17:53
I sincerely hope that chat box is directly connected to Jon Skeet. — Frédéric Hamidi Mar 31 '13 at 17:52
 
0
Q: React Redux Video Lecture Example

KayoteCant this be reviewed please: The example is practice of Dan Abramov's lecture here Here is the jsBin Code: const { createStore } = Redux; const reducerCounter = ( state = 0, action ) => { switch( action.type ) { case 'increment' : return( state + 1 ); case 'decrement...

 
10:58 PM
0
Q: Parabola based math game for school project

OwenCraddockGo to riddles.gq and click on "archer". This game is for a math project. Is there anything else I should add or change before I turn it in?

 
SIR ! AT THIS TIME I CAN REALY MARRY YOU. thanks — Soufiane.ess 3 hours ago
 
11:20 PM
Man I've been looking at this SQL question for a while trying to write a decent answer, but man that logic is extremely tortuous
 
-- Date Changed  Who
-- ------------  --------
-- 12/10/2015    This Guy
 
0
Q: Input Validation: adding both and and or inside while statement

Jessiah BurgessI need a little help with a school project. The idea is to accept only the integers 1, 2, 3, 4, and 5 as options in my simple math teaching program. But whenever I enter any symbol besides a digit (1-10), the program freaks out. I want a while loop to continue asking for input until the user e...

 
Unfortunately, incomplete or broken code is off-topic on Code Review. Once you have code that does what you want, we'd love to help you do it better. — Quill 13 secs ago
@Phrancis good luck, that's some nasty code
 
@Quill yeah it's pretty scary
 
I had forgotten that I needed to include my entire source code. That has been done. — Jessiah Burgess 37 secs ago
It still looks broken
 
11:29 PM
Agreed
// VALIDATION // VALIDATION // VALIDATION // VALIDATION
// VALIDATION // VALIDATION // VALIDATION // VALIDATION
I left a comment asking for clarification
I'm not sure what the mean by "the code freaks out" lol
Maybe it throws a CodeTooUglyToCompileException
6
 
0
Q: unstructured javascript and afraid of a huge mess if I keep going like this

user308553This is one part of my website what it does: fetch a list of habit from my RestFul Api. Each description of habit in list get append to a ul tag as a li in the html. During this loop a event click listener is attached to each description. After that, a page navigation will get created. I mad...

0
Q: c itoa implementation

Matthew HogganAs an exercise, I limited my self to the man pages. I didn't look for a previous existing implementation because I wanted to see how well I could do on my own. I also tried to handle as many cases as I could think of. I am sure there are weaknesses so feel free to point them out. Where can I impr...

 
11:44 PM
> Should I be using framework such as BackBone (MVC) or React JS?
Part of the reason for this project is to become a better programmer and display my skills for future employers. However Im not sure where I should invest my time.
React Js is the new popular
AngularJS 2.0 is coming out, so learning Angular1.0 feel like a waste.
Backbone is getting less popular
any advice will help me tremendously, and Ill really appreciate them
> the new popular
four day pending flag
@CaptainObvious RBA
 

« first day (1017 days earlier)      last day (3004 days later) »