« first day (982 days earlier)      last day (3036 days later) » 

12:00 AM
@Quill let us discuss unit testing of my code in Maths is hard...is that fine?
 
RELOAD! There are 1638 unanswered questions (94.5903% answered)
 
No, that's okay, I have work to do and that's all I can really say about it
 
@Quill oh... that is sad... please tell me when you are available...
 
@TanMath You should probably read about unit tests first, then try to implement simple tests for practice
Once you get the hang of them, then you can start applying them to your more complicated code
 
ok...
 
12:02 AM
^^Good place to start, with examples and all
 
in JavaScript Masterrace, 53 mins ago, by Santa's Helper
    wow
such cr
               so  code
                       very  review
many  code review
            much  JAVA
                            much  phpoop
very  lol
            such  upvotes
                      many  santa
so  monking
 
lmao
 
@TanMath Which question is that?
 
@holroy huh? you mean you want to know what code I am talking about?
 
yeah
 
12:08 AM
@Phrancis I still do not see how it is not what I am doing...there is not much for me to check apart from my matrices...otherwise, it is like I need to check the entire Lindblad equation solver...

 Maths is hard

It really is!
 
1
Q: Sample Python game is running slow

Carlos JohnI got my game working for so far, however, I would like the game to run faster. It's running at approximately 26 FPS when most of the blocks come in; my FPS goal would be about 60 FPS. How do I fix this? import pygame, random, sys from pygame.locals import * TEXTCOLOR = (0, 0, 0) FPS = 60 BADD...

 
12:20 AM
 
54 mins ago, by Duga
This may be a good question for Code Review, so long as: (A) the code works, and (B) it's not hypothetical or incomplete in any way. Please read the on-topic guide before posting, if you choose to go to Code Review. If you have any questions or concerns, join us at our CR Help Desk. — Quill 39 secs ago
 
0
Q: Bash command helper in C

Dave KennedyPreviously, I had written this program in C++ and asked about it here on Code Review. After spending some time with C++, I desired to become more familiar with its namesake. This is my first C program. The purpose of the program is to help with remembering complex bash commands. It's invoked wit...

 
1:03 AM
You might try Code Review instead, codereview.stackexchange.comHugh Bothwell 35 secs ago
@HughBothwell, Please read a Guide to Code Review for Stack Overflow users. For this to be on topic for Code Review, the code at least needs to be included and working as expected. — holroy 45 secs ago
 
0
Q: Simplify repititive jQuery

ᴉʞuǝI am working on a UserScript that displays total flag counts, percentages and other information on the Flag Summary page. Everything is working correctly but this bit seems rather repetitive and I'm sure it could be improved upon. The following code pulls the total count of each flag type from...

0
Q: Opening the same CSV file in two different ways in order to transform data in one column and update original CSV using Python

ahlusar1989My specs: Python 3.4.3 Windows 7 My IDE is Jupyter Notebooks I have the following functions and accompanying script. The purpose of these is is to extract XML data from one CSV column (one XML document for each row), and then transform it into a dictionary (where the tags are the keys and t...

 
1:40 AM
@Malachi I'm not on LinkedIn
 
2:36 AM
you should ask that question at codereview.stackexchange.comDirk Reichel 1 min ago
This may be a good question for Code Review, so long as: (A) the code works, and (B) it's not hypothetical or incomplete in any way. Please read the on-topic guide before posting, if you choose to go to Code Review. If you have any questions or concerns, join us at our CR Help Desk. — Quill 32 secs ago
If you edited the title to roughly summarize what the code is doing, and included more description about what problem this is solving, it would do fine on Code Review indeed. — Mat's Mug 58 secs ago
 
2:54 AM
0
Q: Javascript navigation effects

099I am attempting to build my own website, based off Google's Material Design principles, to better my design/UX skills. I am currently working on effects for my navigation, I wondered what would be best to lower browser resource usage when viewing my web page. Quick Example: When scrolling,...

2
Q: Lotto simulator in Rust

electrometroGreetings, With the recent craziness of the Powerball in the US I got interested in building a little lotto simulator to see how frequently I could win with purchasing large amounts of tickets. For those not familiar with the game and it's ways to win/odds I have included some interesting numbe...

 
@CaptainObvious examplish?
those A vs B questions....
 
3:11 AM
import java.util.concurrent.ThreadLocalRandom;
/**
 * Generates an array containing `n` pseudo-random integers.
 */
public class RandomIntArray {
    static int[] generateRandomIntArray(int numOfRandomInts) {
        int[] randomIntArray = new int[numOfRandomInts];
        for (int i = 0; i < randomIntArray.length; i++) {
            randomIntArray[i] = ThreadLocalRandom.current().nextInt();
        }
        return randomIntArray;
    }
}
Does that look like a reasonably good utility class? Got a whole chapter about arrays and just wanted to write a quick tool to generate them on the fly
 
does it work?
 
Oh yeah, works great
 
Wouldn't it be nice to have a way of using a given set of int's? That is have a way to regenerate the same pseduorandom array, in case the RandomIntArray triggers a mistake?
I'm thinking something along the lines of having a given seed, you get the same RandomIntArray all the time
 
given the class is named RandomIntArray the name generateRandomIntArray seems redundant. I'd go for generateRandom, maybe.
RandomIntArray.generateRandom(42);
 
@holroy I mean, it wouldn't be pseudo-random if you always got the same result...?
 
3:15 AM
This would make writing unit tests, and doing repeated test on the same test data a lot easier.
 
^^
 
Well you could always hard-code it, which is what it sounds like anyways?
 
@Phrancis Given the same seed, it would produce the same. Seed changes, array changes. Same seed, same array.
 
even more if it weren't static
interface IRandomArray<T> {
    T[] generate(int length);
}
^^ "mock me", it says
 
Most time I've used arrays of random numbers, I end up wanting to redo some of the tests with a previously created random array. And this usually ends up with having to repeat the random generation multiple times to recreate the array which triggers the bug/feature I saw on an earlier set
@Mat'sMug That is a good suggestion, as well!
 
3:19 AM
@holroy Well you could store the generated arrays, along with whatever result you want/get, in an external file when running tests, to make it easy to reproduce manually if needed
 
IDK how much Java that is, Egyptian braces and camelCase aside. does it compile?
 
Does what compile?
 
The HTML is from the Flag History page on any StackExchange site so it's not mine. I do however really like that flagCount function, that is pretty slick!! — ᴉʞuǝ 10 mins ago
 
the interface
 
> Slick as, bro
 
3:20 AM
lol
 
@Phrancis That is the point I'm trying to make, that if the array is pseudo random and dependent on a seed, you could log the seed and number of entries, instead of an entire array
 
@Mat'sMug I have no idea how to use an interface (yet) lol
 
randomize the seed for production, control it for testing
 
@Mat'sMug My thoughts exactly!
 
Then just store the arrays you want to test with somewhere, e.g., a "seed file", and there you have it ;p
 
3:25 AM
    class RandomIntArray : IRandomArray<int> {

        private final int _seed;

        public RandomIntArray(int seed) {
            _seed = seed;
        }

        public int[] generate(int length) {
            // you know what to do
        }
    }
 
I think you fail to see the beauty of storing the seed and the number in the array, versus the logistics of creating an entire file with the array values (and something to reread that file)
 
How about:
public RandomIntArray(int seed = System.CurrentTime) {
    _seed = seed;
}
That way, the default is random.
 
and it's clearer if it's the call site that makes it so IMO
 
I don't know. I think people would assume it was random, especially given that name.
 
in C# default values must be static constants
 
3:27 AM
OK, so provide two constructors.
 
why, if all it really needs is just a seed?
 
public RandomIntArray() : RandomIntArray(System.CurrentTime) {}

public RandomIntArray(int seed = System.CurrentTime) {
_seed = seed;
}
 
default values are just a way to make defaults implicit, and hide what's really going on at the call sites
 
@Mat'sMug Because 99% of the calls will use the default value.
 
there won't be 99 calls
 
3:29 AM
^^
 
You don't need 99 calls to have a 99%.
 
there will be one in the production code, and, well, a hundred-and-some in test code, that will all need to supply an explicit seed.
 
OK, but I don't think the production caller needs to know, or even cares about the seed.
 
the majority of calls will use the explicit seed parameter
app.Start(System.CurrentTime);
app.Start();
 
 
3:31 AM
both behave identically?
 
Why not?
You don't need it, but I don't think production callers need to know or care about what seed is used. You could even make the one public and the other internal so only the tests can set the seed.
 
> When scrolling, without wrapping certain property changes within an if, does the browser (jQuery) attempt to make the property changes although they have already been made?
wtf?
Does ThreadLocalRandom even take a seed parameter?
 
you're asking me?
 
@Quill It can
 
 okay(); continue;
 
3:34 AM
Here is one for the normal Random() variant:
21
A: Java random always returns the same number when I set the seed?

Ben AlpertYou need to share the Random() instance across the whole class: public class Numbers { Random randnum; public Numbers() { randnum = new Random(); randnum.setSeed(123456789); } public int random(int i){ return randnum.nextInt(i); } }

 
you could over-engineer and supply the RandomIntArray with some IRandomGenerator interface, implemented like this:
 
@Quill It doesn't seem like ThreadLocalRandom can use a seed. The link below states that ThreadLocalRandom would throw UnsupportedOperationException
 
Actually, the term "seed" to me shouldn't apply to something that's supposed to be random, that kind of takes the meaning out of the word "random". The Java random generation classes can take an origin and bound (or min and max) but nothing like a "seed"
 
return 4;
it's pseudo-random
 
int min = 0, max = 100;
ThreadLocalRandom.current().nextInt(min,max);
 
3:38 AM
Yeah ^^ it's psuedo-random... anyway, consider using random.org's api
That's more random than ThreadLocalRandom would generate
 
Okay. I'm going to go back to playing with arrays then, now that I've started some kind of controversy ;D
 
Ethical troll ;P
 
lol
 
To help you relocate/recreate bugs/features, my suggestions still stands to rather use the Random() instance with given seeds, and before you use the arrays you print the seed and size of the arrays, so that you can easily reproduce the array. This rather than using ThreadLocalRandom()
 
I'd recommend you edit the post to include your actual real code, while expressing your concerns about browser resource usage - you can even include your html, css and javascript in an on-site executable snippet; you'll get the best value out of Code Review that way, since reviewers are always free to address any & all aspects of your code. — Mat's Mug ♦ 41 mins ago
That is real code.
just really crap
 
3:46 AM
I wish there were more Rust experts on here :(
 
be one :)
 
Rust is one of the tags that we do not have many reviewers for
Amongst a small but unfortunately present list
 
Hi, @electrometro.
 
10
A: How do I start an active userbase for a tag in on a question and answer site (like Stack Exchange)?

Mat's MugCreate content: post selfies A tag that doesn't have much content doesn't make the site attractive to the users you want to bring over. So, make content. Answer your own questions after a day or two, maybe more - and post at least one every week. Eventually you'll get the attention of one or mor...

 
@Mat'sMug I would love to be but I still suck at Rust :D
@Quill Yes, I have one other question that has yet to be reviewed :( I have given up hope on that one though
 
3:49 AM
soon we'll be able to run community ads, we can make one to "recruit" rusty rust reviewers :)
 
Hehehe, that would be awesome!
 
I wrote the top-scoring answer on a question on SO.
Unfortunately, it appears to be a bad answer with 0 votes. The other answer is in the negatives.
BTW, folks, if I get one vote apiece on this selfie Q/A, I'll hit 1k at SO: stackoverflow.com/questions/32195314/…
 
double monking to the two who just entered
 
mo-monking!
 
Oh thanks. 3 away from 1k now.
 
3:55 AM
congrats
 
Thanks, santa(s).
 
Monking
 
I can now expand votes on SO.
@EthanBierlein Minking.
 
@electrometro I don't know rust at all, and I won't be bored with my semester starting.
 
3:56 AM
 
@electrometro it's about to get closed as a duplicate
I don't think that's possible without writing custom code right now. — Dogbert Nov 18 '14 at 16:05
 
Yeah, I am a bit frustrated about that. The "duplicate" is over a year old (That is a really long time in Rust) and the only sort of answer on there is broken.
 
fix it :)
 
That's the problem! I don't know how :D
Guess who can now create tags on SO? :D
 
if you can define "broken", and include the code you're using that's not working, you could probably have a better-standing SO post.
 
4:00 AM
0
A: Human readable numbers

QuillTry this psuedo algorithm: Divide the string length by 3 Round that down, and we'll call it x Loop over the string x times: Get the string at x times 3 position, we'll call it y. Replace y with "," + y

 
congrats!
 
I'm unusually tired, it's TTGTB for me. See y'all tomorrow from the new office building!
 
@Phrancis night
 
@EthanBierlein Love the profile pic
 
Thanks
 
4:01 AM
That fro is awesome
 
Oh yeah.
 
@quill that got a lot of upvotes quick
@Mat'sMug I edited my question after he posted that comment
 
oops, removed
 
> R2-D2 plugs into Death Star computers directly (well, he plugs into all computers around: he must have industrial strength antivirus).
I should write Star Wars Revised - computer wars edition.
 
@Quill you available?
 
4:07 AM
I have a few minutes on lunch, I guess
 
I'm off to wash dishes. TTYL.
 
@Quill i really need to work on this pep8 thingy...
 
0
Q: Print values of an array while stripping out some parts of the string

Felipe AlvarezIs there a more efficient way to run this? I am especially interested in a way which perhaps does not require a for loop... shopt -s nullglob file= declare -a ARRAY1 ARRAY1=( ~lettus_*.sh ) for file in ${ARRAY1[@]} do ## ## Get <name> from /some/path/lettus_name.sh ## # remove ...

 
let us talk in maths is hard
 
sure
 
4:37 AM
so it turns out rust is weird
3
 
Yeah, rust is weird.
I am learning this more and more
 
I could probably write that pseudo-algorithm in a few lines in JavaScript ;-;
 
I don't understand the "solution" from your last comment... anyway, don't you have those config methods in your config class? Why don't you set the config object once, outside of Sporter, and then pass that to your instance of Sporter. Also, in your commented out code, you create another instance of config... why? ... Whatever your response, this probably isn't the right site to discuss all this(maybe codereview.se?) and I need sleep — Terminus 10 secs ago
 
function humanify(string){
    for (var i = Math.floor(string.length / 3), newString = string.split(""); i >= 0; i--){
        newString[(i * 3) - 1] += ",";
    }
    return newString.join("");
}
 
Yeah, python is pretty similar, really easy.
Did you see my revised answer to fix negative numbers?
 
4:52 AM
yeah
 
@Terminus PS, I wasn't asking for code review really. Anyway, thank you for your help and sleep well :) — CoreModule 27 secs ago
 
@Duga flagged as too chatty
 
@RMunroe wtf
 
5:07 AM
@RMunroe Awesome! I love xkcd. Sometimes the funniest part is the image title.
 
^
 
5:45 AM
monking @all
 
Over at CR, this might fit the Not As Easy As It Looks category (especially with a non-symmetric compare and general java.util.List<>. — greybeard 15 secs ago
 
Monking
 
monking
 
why?
 
5:52 AM
I don't understand what Monking means. Thought it meant be like the monks.
Those are some monks
 
on meta you will find some explication about that ;)
it's all have to do with a little monkey ;)
 
Those don't look like monks... and here:
27
A: What's a Zombie? And what are the many other memes of Code Review?

Vogel612Meme: Monking Originator: Morwenn Cultural Height: The 2nd Monitor Background: A morning greeting to the Monkey doing his monkey-business, in other words: monking Examples: A small chat search Variations: Monkernoon, Monkevening, Monknight, ... Important is only that it begins with Monk... ;...

 
I see. A quick google search of "monking" came up with them and a few other things.
 
6:10 AM
In 5 hours ends the bounty for codereview.stackexchange.com/questions/93690/… . So anybody who wants to get 150 rep should answer soon.
Just filled out my swag form. Impatiently waiting now for my T-shirt although its blue instead of black ;-)
 
6:40 AM
My laptop makes a crisping sound, like a campfire
Possibly not a good sign
 
6:51 AM
@JeroenVannevel I should say : get the marshmallows ready.
 
7:17 AM
@Phrancis It was called BrainDuck at first, but changed that to lowercase d, so Brainduck is the correct spelling.
 
Monking.
 
Monking.
 
Decision paralysis is hell of a thing :\
 
7:32 AM
Monking
 
monking
 
0
Q: Standardize Repository, UnitOfWork, IOC Container Asp.Net MVC

Thanh Son NguyenAfter read some articles about DI, Repository Pattern,... I have created a project with Asp.Net MVC. Below are some classes. It worked, but I'm wondering what I did are standard? Is that correct pattern? If no, how can I adjust to make it better? Thank you in advance. IGenericRepository interfa...

 
@Cap: potentially example code (Look at GenericRepository<T>).
 
Yeah, I would agree
 
There really should be a boilerplate library for that stuff, because that's used in nearly every C# enterprise project I've ever seen.
 
7:37 AM
there probably is
 
@DanPantry I would say, the methods aren't implemented yet because its just a proof of concept. The methods which throws the NotImplementedException are there because of the interface but are never called so I would say its gray/grey.
 
@DanPantry he says it works
and code looks like it could compile
 
It shouldn't work
GenericRepository has all of its methods throwing NotImplementedException
AccountRepository extends GenericRepository, and AccountRepository is consumed by AccountService, which uses methods of AccountRepository that will fall back to GenericRepository
var entity = unitOfWork.AccountRepository.
            Find(o => o.Username.Equals(username, StringComparison.OrdinalIgnoreCase)
            && o.Password.Equals(password, StringComparison.OrdinalIgnoreCase));
That line will throw NotImplementedException
So from my POV this is example code
But maybe I'm being a bit of a hard-ass. I'll let the votes decide :-)
 
7:53 AM
While it's not mine normal language, I'm thinking you are correct.
The find method is not implemented in the AccountRepository either so it should throw the error
 
Zak
8:11 AM
monking @all
 
monking @Zak
 
morking @zak
 
morking? :P
 
@DanPantry he commented mine comment, it's the pattern what he wanted to review. the actual implementation is not a part of the review
grey zone indeed
 
@chillworld Doesn't that make it off-topic/borderline hypothetical?
 
8:17 AM
I'm skipping this because for me it's in the middle of the grey zone ;)
 
I would split this into two questions, how to crop a raster and how to histogram a raster. But see ?crop for a start. Also don't use assign, will try to answer just for code review — mdsumner 26 secs ago
 
So much lotto :D
 
I'm going to take a break before I'll have a meeting ;)
 
good luck
 
Monking all
 
8:26 AM
got it saving it postgres now, because awesome
 
 
@Quill uh
 
spammers are ever so subtle these days
 
Wonder what there was to edit...
 
-5
Q: Nothing Here Nothing here

Laura SwiftNothing here Nothing here Nothing here Nothing here Nothing here Nothing here Nothing here Nothing here Nothing here Nothing here Nothing here Nothing here Nothing here Nothing here Nothing here Nothing here Nothing here Nothing here Nothing here Nothing here Nothing here Nothing here Nothing her...

He edited the nothing here into the question
 
8:30 AM
 
@Quill Flagged as UWYA.
Although it looks like spam.
 
0
Q: How to show JSON data

AgonyI have an API that returns the following JSON code: [ { "cardId":"LOEA16_15", "name":"Ysera's Tear", "cardSet":"The League of Explorers", "type":"Spell", "cost":0, "text":"Gain 4 Mana Crystals this turn only.", "img":"http:\/\/wow.zamimg.com\/images\/...

 
Wow, the Paypal express checkout api is garbage
 
@CaptainObvious @Heslacher beat me by a second to the comment, close as broken code.
 
;-)
 
8:34 AM
It attempts to load //www.paypalobjects.com/api/button.js, so if you're not on a web server, the paypal checkout won't work.
 
Or, you know, run a simple Node server to fix that.
 
@Mast you should always use ssl; the protocol-relative url //foo/resource is bad practice
 
user image
6
10/10 photoshopping skillz
 
@DanPantry Yup. But it's not my job to fix API, it's my job to work around flaws in other people their API.
@Quill Do you ship those internationally? I'll take 2.
 
@Quill I want one.
is there such thing as too much editing?
 
8:42 AM
@electrometro Certainly when it comes to films.
But in terms of CR questions, as long as it doesn't invalidate answers, no
 
Great. Because I have been editing the crap out of my post for like 4 hours. Feel like people would get annoyed.
 
8:54 AM
@electrometro On other SE sites it would eventually turn the question into a Community Wiki I think.
But IIRC that's disabled on CR.
 
I'm so tempted to ping a CM and ask about some minor design modifications to the duck
Why the downvote? — Jon Skeet Jul 20 '09 at 21:59
LOL
 
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: Merge inserted and deleted tables in SQL trigger
 
@RoboSanta That's a below-average question with 2 below-average answers.
 
9:10 AM
0
Q: Body Mass Index Calculator

Phoenix1355I created a quick calculator in Javascript and I was wondering if there was a way to make the code look prettier or make it simpler. To me, it looks really cramped and messy and I'm not sure how change that. function calc() { var height = (document.getElementById('height').value) / 100; ...

0
Q: Repository pattern best practices

AlexandrWhich option is better? In the first case, I use a universal repository that can work with any entities. The methods of this repository have many parameters, such as string queries, table names, entity mappers, etc. Another option is to use for each entity separate repository (which is probably...

 
Zak
@electrometro As long as nobody's posted an answer yet, you are free to edit to your heart's content.
 
9:22 AM
@Magisch Well it will work... but it suggests that the programmer 1) is unaware of the implicit promotion rules in C, and 2) that the programmer is unaware of the type of character literals in C. While the code itself isn't problematic, it is a typical case of "warning signs" to other programmers reading the code. If I found code like this upon code review, I would read all other code by that programmer much more carefully. In general, return (something) rather than return something is another such a warning sign. — Lundin 24 secs ago
 
Monking
 
hello @MathiasEttinger
 
Zak
TIL VBA has a built-in array filter function
 
9:39 AM
I think this belongs to codereview.stackexchange.comT J 38 secs ago
 
0
Q: Extra Fun Tile Based Puzzle Game Frame Based Decision Making

user3995789This is a tile based game, It has a circular dependency and everything gets undefined. levels.js import roles from './roles'; const roles = { role1: { name: 'role1', nextDecision: roles.decisionA }, role2: { name: 'role2', nextDecision: roles.decisionB } }; const makeR...

Ehh, VTC?
> It has a circular dependency and everything gets undefined
 
it won't work
the export of roles.js will be undefined
 
@TJ "And it mostly works" is a smell that this question is probably off-topic for codereview. Besides, in cases the code actually works as intended and is posted on codereview, stub code like set: function () {/*some code*/}, is also off-topic there. — Mathias Ettinger 5 secs ago
 
@CaptainObvious gross
 
possible answer invalidation by Quill on question by Phoenix1355: codereview.stackexchange.com/posts/116406/revisions
 
9:45 AM
made it into a snippet
 
@Duga and it is answer invalidation; why is the alert added?
also the indentation is now wonky
 
@Pimgd +1
alert probably added to test the snippet.. I've reverted it
Remember to remove test code before submitting
 
whoops
anyway
it's not answer invalidation, the formatting screwed up
 
Codereview might be better suited. — Evert 49 secs ago
 
fix it, remove the alert, and it's fine for me
hmmh although that's one ugly form =D
 
9:48 AM
yeah, I don't know about that HTML tbh
 
For better result post your code at CodeReview StackExchangeSuprabhat Biswal 10 secs ago
 
feels like answer invalidation for adding it
 
0
Q: Searching a list of an int arrays into another list of int arrays

Oscar GuillamonWe are given two list on integer arrays, and the objective is to retrieve another list which contains the duplicates in both lists. The code developed is the following: public List<int[]> GetDuplicates(List<int[]> pInputList1, List<int[]> pInputList2) { var outputList = new List<int[]>(); ...

0
Q: Share module api among require js modules

user2311920Can you please give some clear way to share data and API from require.js AMD modules among them. First time i used just an publicData: {} object in Backbone.Router but this was a bit messy. After that i tried to create Bridge module something like this: require(['underscore', 'backbone'], funct...

0
Q: Postive integer to Roman converter function error in vb.net console application

BACThis code I found in site and it is helpful in completing one of my assignment and this code is supposed to create a function which converts positive integers to roman numerals but there is a problem after the if statement in this code pls explain the code set after the end if. and I can't unders...

 
10:04 AM
21 mins ago, by Duga
@TJ "And it mostly works" is a smell that this question is probably off-topic for codereview. Besides, in cases the code actually works as intended and is posted on codereview, stub code like set: function () {/*some code*/}, is also off-topic there. — Mathias Ettinger 5 secs ago
 
@Quill Darn it!
I should have worded that comment in a more "Do not post this on codereview" manner.
 
you should've just said that
 
Yup, was trying to educate the commentor, forgot about the OP :/
 
10:23 AM
0
Q: C++ Bitstring (like Python's bitstring)

alexandernstI wrote a library that (tries to) mimic Python's bitstring and I'd like to know what do you think about it. Is there anything I can improve/change. Do you see any bugs? Is there anything I should change in order to improve the API?

 
10:35 AM
Monking
 
monking
swag votes are nearly over
 
My laptop is still ded
Well, practically ded, I have no clu ehow it can be this bad
 
try reinstalling the OS
 
have you tried turning it off and back on again?
8)
 
@DanPantry That must be some time ago, last time I used it was 17 Dec
Trying to find job offers that are really interesting isn't really that easy at all
 
10:39 AM
it says something about how bad documentation is when you find out how to use a service via SO instead of via the vendor docs. :\
4
 
Trying to find some English company in Eindhoven (area) that does interesting stuff ;-)
@DanPantry lol
 
10:51 AM
@DanPantry that's the usual case though...
monking
 
@Vogel612 Meh, usually docs are good. Paypal's are atrocious
 
@DanPantry Agreed
 
Weird AI is weird
> Mrw my friend gets frozen in a previous scene and I wave for help, but I refuse to get in that egg, only for people who think I'm doing when I try to play with my pizza slice and I have to shoot things, but it tries to stop moving but it's broken
 
wtf what is that @skiwi
 
wat
 
11:03 AM
AI network that tries to generate Reddit posts
 
oh that
 
tries and fails miserably ;-)
 
Gets more interesting when it's mixed with your frontpage...
Too bad I have my OGNext project already, I really want to make some AI (neural network) that can predict if a CR qustion is on-topic
 
If I knew how to code neural networks or markov chain generators, there's so many things I'd do ;-;
 
11:16 AM
Maybe one day I can manage two projects without abandoning the former ;)
 
@Phrancis Java 8: new Random().ints().limit(1000).toArray()
 
why would you need an array of random integers?
 
8 hours ago, by Phrancis
import java.util.concurrent.ThreadLocalRandom;
/**
 * Generates an array containing `n` pseudo-random integers.
 */
public class RandomIntArray {
    static int[] generateRandomIntArray(int numOfRandomInts) {
        int[] randomIntArray = new int[numOfRandomInts];
        for (int i = 0; i < randomIntArray.length; i++) {
            randomIntArray[i] = ThreadLocalRandom.current().nextInt();
        }
        return randomIntArray;
    }
}
probably just a learning exercise
 
Wow, after 3h 30m my phone is still at 85% even when using it quite a lot and listening music at least 30 mins... My old one would already be at 50% by now I bet
I don't regret switching
 
to which model?
 
11:23 AM
0
Q: Python3 command line chess

VesnogI have written command line chess in Python 3.4.3 and the code is included here. The chessboard is printed to standard output as a 2-D array and now I would like to use some GUI tool in order to show the movement of the pieces. I virtually have no idea on how to do that as I am inexperienced in t...

0
Q: Jacobian product - fast way - Python

John LudosDo you have in mind a way to compute the sum (LaTeX) R_{i,j,k} = \sum_{l=0}^{2} J_{i,j,l+3k} v_{i,j,l} obviously vectorised. This may sound like an equivalent of c = np.einsum('ij(l + 3k),ijl->ijk', j, v) where of course the notation 'ij(l + 3k),ijl->ijk' is not accepted by einsum. I tri...

0
Q: Expression tree representation for complex math expressions

Display nameI'm trying to represent an expression tree for symbolic calculations that support Rn arithmetic (vectors/matrices/values) with whole, rational and complex numbers. My naive approach was to implement the numbers extending the Number abstract class and implementing the Comparable interface as: fi...

 
It is professional to put "£100 - due to frustration" on an invoice? lol
3
/s
 
> 2h explaining concepts to superior
put that on your invoice
 
@CaptainObvious hammertime, please
 
@Mast for me it's grey as he wanted to review the construction made. The construction is working like it's supposed to be. The code compiles and the only thing he need to do is implement the DB search, but as he said, that's not the part of the review. If he removed the class AccountRepository and just said that the implementation overrides the unimplemented methods of GenericRepository it would be on topic ....
 
11:38 AM
@SimonForsberg Oh nice, didn't know about that one :)
(monking)
 
monking @Phrancis
 
Monking all
random.choice is not how we offer financial advice. citation needed — njzk2 2 days ago
Wish I could reply to that ^ with a link about how on average stock brokers perform worse than chance, but that's probably a tad off topic.
 
11:53 AM
Finance.SE
public class RandomIntArray {
    static int[] generate(int numOfInts) {
        int[] randomIntArray = new Random().ints().limit(numOfInts).toArray();
        return randomIntArray;
    }
}
Certainly looks cleaner and simpler!
 
or just return it directly, the method's purpose is clear enough
 
@Phrancis you may want to seed the Random and not always create a new one
actually you should, else the results will not be random enough
 
@Quill I can't return a declaration statement...
 
huh? is that not a thing in Java?
return new Random().ints().limit(numOfInts).toArray();
 
Negative
Er
Wait maybe
Yeah that works
 
12:07 PM
oh
 
I was trying to do return int[] randomIntArray = new Random().ints().limit(numOfInts).toArray();
 
uh, yeah, don't think that's valid syntax in many languages
IIRC something similar is valid in Swift
 
I see now that it would be pointless to declare a variable if you just need to return something back from the method
 
@Quill From Samsung Galaxy S4 to Samsung Galaxy S5 Neo
 
oh, Android
Is there a Google Music Subscriptions style thing for Android or it all MP3 importing or whatever?
 
12:10 PM
I think there is and there's Spotify as well
Meanwhile I'm still ripping mp4 from YouTube...
 
I had Spotify premium for a few months and now I have Apple Music
 
@Vogel612 Might be a bit overkill if this is just for exercises? (sorting and stuff like that)
 
Apple Music is great for making your library cloud based, but Spotify has heaps more content
 
@Phrancis you should still do it IMO
 
Yup, better to get in the practice of doing it right the first time you do it
 
12:14 PM
OK, any advice on seeding then? I really have never tried that
 
use a pseudo randomly generated int (seeded by your datetime) and concate your datetime string with it, and then use it as a seed
just kidding
 
12:27 PM
@SimonForsberg My wife and I have been following any news about it and nothing so far that we've seen.
 
You can set yourself to get Google Alerts about that kinda thing
 
12:45 PM
TTGTW
 
0
Q: Memory mapped classpath HttpServlet

CheetahI hope I have the correct stack exchange area. I have a single page application where the resources sit on the classpath. Any request for a resource that doesn't exist should redirect to the index.html page. Resources should be mapped to memory on first request and then all subsequent requests s...

 
19 hours ago, by holroy
> CBS just released their mid-season schedule and the premiere date of "Person of Interest" Season 5 has been moved in summer 2016.
 
Opinions wanted about this question:
0
Q: Performance of Cocos2d-js gamelogic methods in extended cc.Class vs. in the window scope

zantafioi just finished my first game-porting to cocos2d-js and i am now in the process of code-optimizing. Since I come from a Object-Oriented Background i usually put all my game Logic in an extended cc.Class like so: var Logic = cc.Class.extend({ ctor:function(gamelayer,overlaylayer) { //here ar...

 

« first day (982 days earlier)      last day (3036 days later) »