« first day (1119 days earlier)      last day (2913 days later) » 
00:00 - 15:0015:00 - 00:00

3:03 PM
@N3buchadnezzar The last reduce is \$a!\$ or \$\Pi_{i=1}^{i <= a} i\$ where the first is \$\Pi_{i=a}^{i <= b} i\$. Since you're dividing a factorial by a factorial that means you just increase the lower bound to the other upper bound. :) But that's probably a good idea
 
@JoeWallis I did it like this pastebin.com/ukGbPeq3. In order to make sure the result is an integer
 
@N3buchadnezzar Err, what does that do?
 
@JoeWallis (a+b)!/a!b! ?
 
@N3buchadnezzar It does mine had a one off bug in it, ):
 
@JoeWallis =( Mine is slow though :p
 
3:16 PM
If your form cannot distinguish between the 07xx and +447xx form, you don't deserve your pay
 
In our daily job, we fetch and checkout the master branch before any job starts, work on it or any branch out of it, and run git pull --rebase origin master before any git push. If there is any conflict, it could be found during git pull --rebase. We have a team to do the code review. Before the submit, we always try to press rebase, by which gerrit tries to find the proper commit as the new base. If it cannot, we could find the proper one manually. If a conflict occurs and could not be resolved by rebase, the author is asked to update the patchset and solve the conflict. — ElpieKay 16 secs ago
 
0
Q: More performant / efficient mongoose schema design?

NoobSterHere is my current Schema Brand: var mongoose = require('mongoose'); var Schema = mongoose.Schema; var BrandSchema = new mongoose.Schema({ name: { type: String, lowercase: true , unique: true, required: true }, photo: { type: String , trim: true}, email: { type: String , lowercase: ...

 
3:40 PM
possible answer invalidation by deathgeo888 on question by deathgeo888: codereview.stackexchange.com/posts/129195/revisions
 
@Duga They just invalidated twice...
 
@Duga Rolled back again.
 
0
Q: Cleaning up my user input check, or is this as clean as it gets?

MatthewI am writing a asp.net console app that will take a user input from a list of selected options and do things based on the selected option. I have it working right now but just looking over it there seems that I should be able to shorten the code with other methods and make it perform a bit faster...

 
Next invalidation will get him a flag.
 
It seems this question would be more at home at the Code Review exchange — PaweÅ‚ Obrok 49 secs ago
 
3:45 PM
@Mast How do we prevent edit wars?
 
With flags.
Mod flags.
 
> I did not write it.
 
Ok, thanks :)
 
@skiwi But does he maintain it?
Is he looking for clean-up or explanation?
 
Hmm... that I don't know
 
3:46 PM
Explanation is off-topic.
 
3:59 PM
@Quill I just lost like an hour looking watching the F8 Keynote intro
well not just that
there was some Harvard speech that I didn't make through.
 
4:13 PM
Banana
 
This site is not about offering general feedback about code. If you have working code, post your question on code review. If you have a specific problem with your code, make it clear what that is and we might be able to help. — roryap 28 secs ago
 
4:26 PM
0
Q: How to expand child node to next column of parent node using jqGrid?

ShankhaHow to expand child node to next dynamically created column of parent node using jqGrid ? I could not expand the child nodes to next dynamically created column and so on, I have used JqGrid treeGrid. Please help. Thanks in advance.

 
@Mat'sMug @200_success @janos @SimonForsberg @Jamal Question was migrated, needs to be merged with the one she cross-posted
1
Q: How to optomize this code?

Anya  KushykI have this code: def sortFirst(data: List[FirstClass], desc: Boolean, by: String): List[FirstClass] = desc match { case true => by match { case "good" => data.sortWith(_.good > _.good) case "bad" => data.sortWith(_.bad > _.bad) ...

2
Q: Code returns sorted list. But here are a lot of repetitive code

Anya  Kushyk def sort[A, B: Ordering](data: List[A], desc: Boolean)(measure: A => B): List[A] = { val baseOrdering = Ordering.by(measure) val ordering = if (desc) baseOrdering.reverse else baseOrdering data.sorted(ordering) } private def sortOne(stats: List[One], by: String,...

 
4:48 PM
0
Q: Command line password generator

bestinthewestI built a random password generator in Java and I would like to receive some feedback on my code. Bitbucket : https://bitbucket.org/eaudet/etpass The aim of the program : This is a password generator program which is meant to be run from the command line. It accepts a couple of arguments : ...

 
@syb0rg Reluctantly merged. It's not a great CR question, but merging seems like the least bad course of action now.
 
@200_success It's the right place for the question, just not well constructed on the OP's part
SO didn't help with the process much either
Thanks for doing that tho
 
I screwed up by not reading the code in this question carefully:
1
Q: Detecting if two given strings are isomorphic using Java data structures

Mona JalalSo I have written the following code and it works for various same length isomorphic strings I have tried. However I am not sure what are some time complexity improvements and coding tweaks that could be applied to the code: /** * Created by mona on 5/26/16. */ import java.util.List; import ja...

It doesn't do what it claims at all! Rather, it tests whether the input strings are anagrams of each other.
@coderodde also missed that in his review.
 
Reading more and more into Rust and by the looks of it you'll get a modern language, which I could personally compare a bit to Groovy (and Java to a lesser extent) with the speeds and precision of C++
 
5:01 PM
I hate Makefiles
 
class Validation
  def EqualSize(left, right)
    raise ArgumentError, 'Arguments are not of equal size' unless left.size == right.size
  end
end
 
Off to lunch
 
Not sure whether it's the right way to do that, but it works.
 
Only one of the downsides is that when googling you really need to prepend with "stackoverflow" to get answers
@Mast That's Ruby?
 
Yea.
@skiwi !so
 
5:02 PM
What are you doing with Ruby? ^^
 
@skiwi Genetics
 
If you are just looking for general comments and improvements, your question might be better suited to the code review site — Matt 7 secs ago
 
Mainly the Rosalind challenges.
 
Perhaps this should be migrated to codereview.stackexchange.com, along with a bit more info? — Random Davis 57 secs ago
 
0
Q: Javascript - Object Key Diff

moaxacaProblem So I've been tasked with finding property differences in massive JSON structures and return them in a particular fashion ([key_1.key_2, key_1], etc). Solution Heres my code: https://gist.github.com/moaxaca/c04bb7bd3817a2f28195fa4dbd51f125 Its focused on readability so some redundant ...

 
5:09 PM
I'm happy if Rust turns out a language that looks close to a more high-level language and if I can actually learn it
Maybe one day getting into low-level code (think graphics engine, etc.) is reasonable again as I really cannot see myself doing C++ or C for a big part of my life
 
So don't.
You have that luxury nowadays.
There's what, almost a hundred decent languages out there now?
 
Are you counting VBA and COBOL with those as well?
 
Yes, and FORTRAN, and Python, C#, C++, C, Pascal, F#, Go, Swift, JavaScript (yuck), undsoweiter.
 
It looks like it's incredibly difficult to create subtle bugs in Rust as long as you work with the safety warnings/errors and not against them
 
Why on earth are you trying to create subtle bugs?
 
5:17 PM
Programmers tend to do that all the time ;-)
In a way it's exactly opposite to C++ though, where in C++ you have to specify const if you want variables to be immutable, in Rust you have to specify mut if you want them to be mutable
 
0
Q: Design SQL Insert When Using Modular Address

ffrugoneIn designing my database, I created the addresses as a modular system. One table has the AddressID, and the rest of the address tables have a row for both the AddressID and their type of information, (i.e. Phone Number, Email Address, Physical Address, etc.). This is to save space and add exten...

 
@skiwi What a novel idea.
 
5:32 PM
fun with path separators :P
 
@DanLyons Identical source files? Shouldn't that mean that there's no issue as they are identical?
 
I think it's trying to complain about duplicate source files
 
That shouldn't be a problem either. Compiler can just pick one and move on.
 
I don't know specifics, since someone else posted the image
 
HOWEVER, it obviously shouldn't happen.
 
5:36 PM
the first reason it shouldn't happen is that there should be a standard path separator character :)
 
@DanLyons Well, there's a standard character... one for Windows and one for Unix
 
@skiwi Same with line endings, gives me headaches when developing on two platforms at the same time.
 
line endings are almost as bad as different encodings
 
You probably better post that at Code Review SE supposed your code already works properly. — πάντα ῥεῖ 51 secs ago
 
5:44 PM
> - Does anything render right in Edge?
- Yeah, it is really good on the phone... It just renders on the far left instead of the center.
- So, it renders *on the edge* ..bah-dum-tish
 
I'm voting to close this question as off-topic because it belongs on Code Review. — Jonathon Reinhart 25 secs ago
 
References are a funny thing...
struct Foo<'a> {
    x: &'a i32,
}

impl<'a> Foo<'a> {
    fn x(&self) -> &'a i32 { self.x }
}
 
&' a? What's that?
I understand &a, but what's the ' doing there?
 
Something with lifetimes
Which I don't understand yet
 
5:48 PM
Scope?
 
@JonathonReinhart While you are right that this question should have been asked on Code Review, we would appreciate it if you could stick to bona fide closure reasons to help avoid spreading misinformation — or help support this proposal. — 200_success 21 secs ago
@200_success Are you referring specifically to this (not yet officially implemented) template? meta.stackoverflow.com/a/313267/119527 Or what exactly would you have preferred I selected? There's not a "belongs on Code Review" reason that I missed, is there? — Jonathon Reinhart 28 secs ago
 
@Mast You'll have to read it for yourself, it has something to do with scope yes
 
undefined method `numeric?' for "42":String (NoMethodError)
stdlib trouble, great...
@skiwi Sounds like Rust's version of a local then.
 
It's more ownership, rather than scope. Unless they've now changed that and box since I last looked at it, ):
 
6:05 PM
0
Q: Viability of custom framework to serve RESTful API

BahaïkaContext ( I've first asked this question here : http://programmers.stackexchange.com/questions/319636/viability-of-custom-framework-to-serve-restful-api and I've been told to ask it here, so, here I am. ) For my end-of-year project at school I had to create a framework to serve a RESTful JSON A...

 
6:16 PM
Dir["/path/to/directory/*.rb"].each {|file| require file }
 
1
Q: A* Generic Implementation in Swift

Redjimi AdelMy first Code Review post. I'm up to a generic implementation of the A* search algorithm in Swift(for now, it's a single goal implementation). Here's what's been coded so far: // State : a protocole for states in the search space protocol State : Equatable { // successors() : returns an a...

 
Madness.
@CaptainObvious CBL
Oh heck, require could very well be platform specific with it's slashes.
Argh, I've been doing this wrong.
Awrgh
 
0
Q: CUDA brute force 48 bit key

robertkinI have a cryptographic function with two 24 bit keys. I have two blocks of input and two blocks of output, and want to brute force the keys using CUDA. Overview: The function is composed to two back-to-back 3 round substitution-permutation-networks with block size of 24 bits and sbox size of ...

 
6:32 PM
so many VB6 items in the Visual Studio uservoice page -_-
 
6:51 PM
This belongs on Code ReviewzzzzBov 30 secs ago
 
@Duga Meh.
 
7:30 PM
Also, if your code works fine, this question is better suitable to Code Review Stack ExchangeRogalski 15 secs ago
 
7:51 PM
0
Q: Travelling Salesman Problem solver

RK1I am writing a program that can implement algorithms to solve the TSP. My goals: The solver can record every algorithm step, so that the whole solving process can be later visualised by charts or animations It's easy to add new algorithm implementation End user has full control over the simulat...

 
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: SessionHandlerInterface Class
 
So apparently Rust doesn't have classes, that's also interesting
 
8:14 PM
0
Q: Basic F# Programming Challenge

reggaeguitarI wrote some code to solve this problem https://www.hackerrank.com/challenges/string-o-permute which basically states: take an even length string and swap all the even indexed characters. For example the string "abcd" should become "badc". I'm looking for a general code review as I'm very new to ...

 
8:35 PM
0
Q: HTML Color Picker Tool

Govind ParmarSo basically, this app gives you an HTML color code for whatever color the pixel currently under the mouse cursor is. What I want to know is: Is the documentation/commenting sufficient, but not too verbose? Are the few global variables I use 'bad' for their specific use case? Is the code oth...

 
8:52 PM
Code Review is for working code needing optimization. — Johnny Mopp 43 secs ago
 
# Define directories here, not absolute paths or stuff breaks and idk why
Comment I'm leaving future developers who will wonder wtf I was doing
 
lol ^^
A weird issue though
 
@syb0rg Yourself in 6 months.
Chat is having trouble with time I suppose.
 
9:07 PM
Quick! Make use of the extra time now you're 2 hours ahead
 
Something's FUBAR...
2
 
since your code is actually working, good job! this looks like a prime candidate to move to codereview.stackexchange.comJeff Puckett II 53 secs ago
 
0
Q: Apriori Algorithm - Mining association rules in Java

WiTon NopeScan the transactions to find L1 For ( k = 2; Lk-1 !empty; k++) { Generate Ck from Lk-1 Count the occurences of itemsets in Ck Find Lk L1: set of all frequent 1-itemsets with counts no less than the support Ck: set of candidates k-itemsets Lk: subset of Ck with counts no less than the support T...

 
@CaptainObvious broken and not explained at all
 
9:26 PM
mv /internet/docs/languages/rust/ /brain/knowledge/programming/
 
0
Q: Epplus ExcelWorksheet: Is there a better way to find specific values than nested for-loops?

Rubix_RevengeI have a working ExcelPackage function in an MVC 5 application where I can successfully output a strongly-typed model to a new Excel file. I have a case where a specific column is of type DateTime? with four possible values: null date only time only date and time I have extracted a function ...

 
9:38 PM
0
Q: Ceasar Cipher (Rot 13)

13aalI've created a basic cipher program that will turn your string into a Rot13 cipher. I'm pretty sure there are much easier ways to do this, so a little input on what I've done would be great: What did I do well? What can be done better? Are there easier ways to do this? using System; namesp...

 
10:08 PM
Ha. Told you, @EthanBierlein academia.stackexchange.com/q/69358/48772
I suspect almost every member of the flat earth society joined for a practical joke or for trolling. — vsz 12 hours ago
I said almost that exact same thing.
 
0
Q: changing player's turn in c++

user106551Hey guys i need a help with changing the turn of players in c++ program. How can i write loop for switching players? Any help would be appreciated. #include<iostream> #include <string> #include <ctime> #include <cmath> using namespace std; double y,x; void showMenu1()...

 
10:27 PM
@Hosch250 Most of them don't believe in the flat earth "theory", yeah. There were a couple of loonies who did genuinely believe it though. Anyways, I stopped visiting that site ages ago. It was a waste of time.
 
Just posted the second in the Code Explorer series.
Next one will be the main UI and it's VM and code-behind.
 
Oof, OpenGL is difficult.
 
0
Q: A simple register VM written in Rust

Leigh SheppersonI'm teaching myself Rust, and to do this I've written a toy register based virtual machine. I hope the code is easy to follow - I just want to know if there are any mistakes I am making with the language philosophy or if there are syntax tricks I could be using. For example, the program counter p...

1
Q: Code Explorer View Models

Hosch250Continuing the series of Code Explorer posts, here is the collection of view models for the tree nodes: This is the interface for nodes with a declaration. public interface ICodeExplorerDeclarationViewModel { Declaration Declaration { get; } } And here is the abstract view model they ar...

 
10:51 PM
Yep. It's because you have PHP tags inside PHP tags. Your code is wrong on so many levels. Please read a beginner's guide on PHP. SO is not a code review tool, Matthew. — Fred 53 secs ago
 
11:10 PM
possible answer invalidation by Fnord on question by Fnord: codereview.stackexchange.com/posts/121138/revisions
 
11:23 PM
0
Q: MIST - Auto-implemented, attribute-driven .NET Notification mechanism (ie: INotifyPropertyChanged)

Mik3cI have a component that I've used myself for quite some time, the short story is that it automagically implements a property change notification mechanism (very useful for implementing INotifyPropertyChanged for example, but can be useful in other ways as well). There are other solutions availab...

0
Q: Evaluating an if statement

Programmer 400My use case is to evaluate an if statement the way a command-line shell does it for example if [ 1==1 ];then echo FOO; fi When I run the if statement the following should happen: $ if [ 1==1 ];then echo FOO; fi FOO I learnt how to evaluate digits with the lemon grammar from a question on SO ...

 
@Vogel612 Do you have a lot of knowledge in JPA ?
 
11:52 PM
0
Q: GUI rogram connecting to SQL and listing information about products in specific category

EdeniaThis is my very first application written in Java and so I finalized it, solely because it occurs to be my thesis. It is a very simple program that lists categories (Northwind database is used as a template db) and as you one-click one it lists ID, Name and price of all the products in this ca...

 
@Marc-Andre let's say mediocre.. that might be an overstatement though. What can I do for you?
 
I did not find any good tutorial to suggest design recommendation when you're building an API.
I'm building a Back-End API for an app I'll be building. I'm trying to know how to manage list in my api like persons belonging in groups, how do I design the actions of adding someone to a group etc.
 
@Mat'sMug JPA isn't quite .NET
 
Did you know #google #chrome uses #d3js somewhere internally? https://t.co/esTitVHRh1
 
11:57 PM
hmm I missed that part of the conversation
sorry! :)
 
@Marc-Andre that's business requirements. I daresay that this doesn't have too much to do with JPA in itself
 
(it's still an excellent book IMO)
 
@Vogel612 Indeed, but depending on how JPA react, I could have different action. In rails, you can have specific attributes of an object updated and you can submit list to update a one_to_many relationship. I don't know yet how JPA deal with this.
 
00:00 - 15:0015:00 - 00:00

« first day (1119 days earlier)      last day (2913 days later) »