« first day (621 days earlier)      last day (3390 days later) » 
00:00 - 18:0018:00 - 00:00

12:00 AM
[Vogel612/JavaBot] 7 commits. 0 issues opened and 0 closed
[skiwi2/HearthMonitor-LogReader] 3 commits. 0 issues opened and 0 closed
[retailcoder/Rubberduck] 3 commits. 0 issues opened and 0 closed
[Cardshifter/Cardshifter] 8 commits. 0 issues opened and 0 closed
[Cardshifter/cardshifter.github.io] 1 commits. 0 issues opened and 0 closed
 
0
Q: Code Prettify - Line numbers?

PhrancisSE sites use Google Code Prettify for code formatting. While it's still up in the air as to whether we would be able to get SE to use community-voted code formatting, I've been experimenting with Prettify. There are a few options for line numbering in Prettify, and I was interested to know what...

 
@all Feel free to down-vote styles you really don't like, as well. It's community so it won't do anything rep-wise
Is it common for IDEs to bolden some of the code? What's the rule, if so? Keywords only, or... what?
 
12:16 AM
@Phrancis It's meta so it won't do anything rep-wise
 
Oh, right.
 
@Phrancis, if it's your preference you can edit your editor to have bold styles here and there but nothing that I have seen so far in the standard IDE.
 
Cool. I'm getting Notepad++ now.
 
it's a handy tool to have. I format and indent lots of code in it
 
Oh wait, can't install on Mac :|
 
12:23 AM
Oops
You must have a virtual machine running Windows somewhere, don't you? :D
 
Unfortunately, yes. Running XP. Not sure it's worth the hassle though
 
Nobody can survive a day to day life with an Appleeee... (you need oranges to boost your immune system:P )
 
An Apple a day, keeps the doctor blue screen of death away!
 
a day ?! that would keep the money out of my wallet away :D
 
lol
 
12:29 AM
what about Sublime2?
if you can install it on Mac all you need to do is to press Ctrl + Shift + P (or it's equivalent ( I would say Command + Command + P ) and type SSPython
or any other language. Then it will pretty it for you
 
That seems like a good alternative. I wonder if it can be switched to look more like a "regular" IDE formatting, e.g., Netbeans or VS default settings
Although, I could just use Netbeans lol.
 
ah yes, it's NPP that I've seen bolding keywords!
 
NPP?
 
NotepadPlusPlus
 
12:32 AM
Yes... that would work as well
 
Oh, duh
 
Woah, +80 on MSE today, with @SimonAndréForsberg's DVLR post... 9 away from a Guru badge!
 
and I checked. it has a MacDonaldsOs version :D
 
Hahahaha
The OS that comes in a trio
2
 
Does that look like a typical code formatting?
 
12:38 AM
It's very close
except I don't like that I doesn't change the color of classes or Methods
would be confusing for me
@Phrancis is that Sublime?
 
Yes, with the Eiffel color scheme
 
29
Q: What's happening with this expression? b = a + (a = a + 5)

fasteca = 5 b = a + (a = a + 5) result b = 15 Why the first 'a' do not changes after that (a = a + 5)? But why second one changes? What exactly is happening here by steps?

 
cuz mine looks a little bit better with the original color scheme. It doesn't have that fault that I mentioned.
 
Ummm it's called a stack...
 
12:42 AM
We have a tag, and there are questions with and . Should all of these be retagged, possibly along with others? I'm not sure how important this tag is.
 
@RubberDuck what about this question?
 
@Mehrad I see that. I just have reservations that the community would like a black BG (though I'll make one just for kicks) I'm looking to replicate as closely as possible what a standard IDE formatting would be
To start with, anyways
 
that's a perfectly good idea.
 
A huge problem working with recording + outputting audio in code and earphones is that if you screw up you end up breaking your eardrums
As I just did
 
Ouch... Feedback loop?
 
12:49 AM
What question @Mehrad?
 
@Phrancis I'm thinking improper reallocation of memory
 
what's happening with a = a + 5 ? @RubberDuck
 
I really don't use realloc() that much
 
Oh. Yeah. What about it?
I was just being snarky.
@Jamal I would flip that around and ask what [jquery-mobile] gives that the other two combined don't.
Never mind. I see now. jquerymobile.com
Would probably need a domain expert to clean that up....
 
0
Q: Three.JS State Object

Shien'use strict'; var State = function (definitions, autostart) { var keys = Object.keys(definitions); for (var i = 0, l = keys.length; i < l; i++) { this[ keys[i] ] = definitions[ keys[i] ]; } var paused = false; Object.defineProperty(this, 'isPaused', { get: function () { ...

 
12:58 AM
This is one of my more painful programming endeavors lol
 
Literally literally.
2
@Mehrad @Vogel612
It's not the fall the kills you.RubberDuck 35 secs ago
 
@RubberDuck Literally?
 
Can someone take a look at this real quick? I think I'm doing something really stupid: gist.github.com/syb0rg/c0995542613390ddc876
See, when I change the 79th line from what it is currently to
err = Pa_WriteStream(stream, sampleBlock, FRAMES_PER_BUFFER );
My code works fine, continuously outputting whatever audio is input
However, when I try to copy the data to a buffer of the exact same size and then output the copy buffer as I'm doing in the gist, it breaks and I'm clueless as to why
 
1:16 AM
@Mat'sMug yeah I don't know why that one got popular suddenly
 
@RubberDuck hahaha... I am totally lost... Have no idea what's that about.
 
@SimonAndréForsberg I think I saw it linked from a mSO post as a duplicate
 
@JeroenVannevel do you know which one?
 
38
Q: "Come back just now to continue reviewing"?

tmyklebuI just won a Thank you for reviewing 20 suggested edits today; come back just now to continue reviewing. Really? :) What did I trip over?

 
that might explain it
 
1:21 AM
@Mehrad it's the impact. =;)-
 
Oh wait...
 
@RubberDuck the more you say the less I understand... What have I DONEEEE :)
It's not the fall that kills you, but the SUSPENCE
 
I'm an idiot...
I needed to use memcpy()
smashes head on keyboard
 
Glad I could help @syb0rg.
 
@syb0rg is it a mechanical keyboard?
@RubberDuck help mee help mee
 
1:28 AM
@Mehrad No, it's my MBP keyboard haha
Now that I've fixed that, on to reallocation of memory!
 
0
Q: Sum of First N Primes

LegatoTask: Print sum of first 1000 primes. public class PrimeSummation { public static void main(String[] args) { System.out.println(sumFirstPrimes(1000)); } // Calculates the total of the first n primes public static int sumFirstPrimes(int n) { /* Since 2 is the only ...

 
Hmmm, I'm getting some sort of weird feedback now... gist.github.com/syb0rg/c0995542613390ddc876
Ahh, fixed it by moving the writing of the stream inside the if statement
 
That seriously sounds like hell.
 
1:43 AM
Did you run my code?
 
An audible representation of buggy code.
No no. Poor choice of words.
Figuratively sounds like hell.
 
Yeah, it's so relieving when you get it to work nicely because that means there's no more of that
 
I just meant that it sounds like an awful experience to be able to actually hear bugs.
Lol. I bet!
I'm stuck in some kind of weird language loop here...
 
Got a Git brainfart... If I pushed changes to develop and I want to update master with those changes, how do I go about it?
 
Merge?
 
1:47 AM
I know I need to git checkout master but from there I'm drawing a blank
Just git merge develop then?
 
I believe so, don't quote me on that though since it's been a while since I used Git
 
> Francis-Veilleux-Gabourys-MacBook:cardshifter.github.io francisveilleux-gaboury$ git merge develop
Auto-merging page-template.html
CONFLICT (content): Merge conflict in page-template.html
Auto-merging cardshifter.css
CONFLICT (content): Merge conflict in cardshifter.css
Automatic merge failed; fix conflicts and then commit the result.
 
Heads up: search updates will be delayed a bit as we re-index the entire network for new analyzers and such as part of our search project.
 
Guess I better RTFM
 
2
Q: Should the [jquery-mobile] tag be populated with existing questions?

JamalWe have a new jquery-mobile tag. This is the tag description from to SO: jQuery Mobile is a touch-optimized web framework for smartphones and tablets. It provides a unified user interface system across all popular mobile device platforms, built on jQuery. We currently have questions tagged...

 
2:46 AM
Ohhh, I might have figured out a way to record the audio without multiple reallocations of memory!
The constantly seeking to the end of a file isn't super fast either...
 
Glad you're making progress!
2
 
3:04 AM
Unfortunately, I can't find the file to which I'm writing the audio to lol
Also, half the time my code decides to use over a GB of RAM, the other half roughly 3 MBs... whut
I think it's time to call it a night haha
 
3:25 AM
0
Q: PHP: Pass by reference deprecated / removed?

RaptorI pass variable by reference in the following code: $arr = array(); $arr[] = array('code' => 123, 'name' => 'Tom'); $arr[] = array('code' => 234, 'name' => 'Peter'); foreach($arr as &$entry) { $entry['code'] += 100; } print_r($arr); but I saw from this PHP documentation, this feature is remo...

 
3:38 AM
@Mehrad Looks like there are a few interesting pre-made Prettify themes, including Github's theme this should be handy
 
@Phrancis the one called Github is actually looking nice and very close to be standard IDE like
 
Yeah it looks nice. The colors I find a little dull/dark, I'll see if I can brighten it up a bit
 
What's the reason you're working on the Prettify @Phrancis
is it a personal project?
 
Combination of things. A bit personal, but also for CR
I find the current formatting for code on CR... lackluster, or ugly. Since we're (likely) going to have graduation "colors" this year I wanted to see if we could improve it
 
interesting. are you employed by SE? I am just curious
 
3:47 AM
Oh no, I wish :)
 
graduation is when a beta site goes solid?
 
AFAIK - That's when you get rid of the Beta look, get moderator elections, all that stuff
Though I hear the process takes 6-8 weeks months.
 
I mean I just don't know the decision making hierarchy for SE. Does anybody actually works for them? and then moderators, high reputation and so on?
 
SE has employees. They're based in NY I think. Beta sites have pro tempore moderators (chosen by SE, I think). Graduated sites have elections for moderators
 
just couldn't relate some of us (say you in this case) can pass suggestions such as how the website need to look to the people who actually can make it happen. I mean have an access to the Admin tools
Interesting...
it's quite an interesting community.
 
3:54 AM
From my understanding, when a graduated site's "colors" (looks) start being worked on, I think some people from SE reach out to the site's community for input..? Really not certain how that works. Moderators can likely provide more valuable input than mine.
In any case, I'm trying to contribute something tangible :)
 
No actually it was quite good. Now I think I have a sort of idea about the whole thing
It's a fantastic way of doing so. I would be proud of something that I could see something that I made is running and people are liking it.
 
@Mehrad That's kind for you to say. I suck at programming but I really love this community!
 
well your 5K+ reputation say's the opposite.
I mean opposite of you being humble and expressing not being good at it. Not the second part :D
 
4:10 AM
Only have 4.2K but I guess my posts are mostly well received. But, most of them are SQL, and that's not really programming (IMO) rather just telling a machine to change or fetch some data :)
 
hahah... well you're the machine to do what you want damn well then
 
LOL ok I'll own that, for all it's worth :D
Hello @moarboilerplate !
 
I think he just touched down slightly and took off...
 
Hahah
 
4:22 AM
I thought I would stop by and see how things were going. Although I can't say I will awe you very much. I'm the kind of guy whose top priorities are hot topics like data mapping instead of prime numbers.
 
But... prime numbers... JK
 
I'd love to help you out with your prime number problem, but I've got this PDF report that needs attending to.
 
Mathematics problems are interesting, but I don't feel really apply to a lot of real-life scenarios
 
Any of you on Philosophy.SE?
 
I agree, to an extent. A lot of times the problem is not complex enough so a lot of times if you bring high math into it you're taking it there to a degree
 
4:35 AM
My question is struggling along.
 
@Hosch250 Been there on occasion, but not a regular...
 
Definitely on-topic, but too broad :(
I really appreciate that you took the time to edit and improve this question. Welcome to Philosophy.SE! — mixedmath ♦ 2 hours ago
Oops
2
Q: Eastern/Western Thinking

Hosch250What are the main distinctive characteristics of Western philosophy?

 
Definitely feels "too broad"...
 
0
Q: FizzBuzz from a file

LegatoChallenge: Write a program that prints out the final series of numbers where those divisible by X, Y and both are replaced by “F” for fizz, “B” for buzz and “FB” for fizz buzz Specifications: Your program should accept a file as its first argument. The file contains multiple separated lines; eac...

 
Yeah.
 
4:36 AM
Well, as someone who has been known to rant about how particular stackexchange sites can be about posts, I may not be the right person to help your question along
 
:)
I know, its just...
 
@Hosch250 Try rewording it: What are the main distinctive characteristics of functional programming?
 
WHAT?!
That would be closed in seconds!
 
Exactly
 
Off topic :(
But SO might have that.
 
4:38 AM
At least he didn't try to solicit best practices...
 
:)
 
What are the main distinctive characteristics of cooking meat?
 
Would get closed instantly also
 
wait. The question you just posted had an insanely good answer.
how did that even survive
oh. it was from 4 years go
ago*
 
4:42 AM
@moarboilerplate Did you know you can edit chat posts?
 
evidently not!
 
You can press the Up key, or click the little arrow to the left of a chat post when you hover it. Editing does have a time limit, I think 2 minutes.
 
Got it. Sorry for crapping up the place
 
You're good, no worries
 
Who cares.
It'll be essentially invisible in minutes.
 
4:46 AM
Chat is pretty ephemeral, though it's all saved (for some reason)
 
Well, as long as it doesn't leave a stain, that's what's important I guess
 
I think SE is run by the FBI.
Probably all the NK programmers learn here, and they can get all the information need to take them out, or something.
 
This is the future. In the future, if you can save it, you will save it.
 
@moarboilerplate You're doing fine, AFAIK :)
 
All right well it has been fun, but I am out for tonight
 
4:50 AM
Ok, good night
 
have a good one
 
Night.
 
5:50 AM
It needs 5 users to approve. Right now the question has 4 reopen votes. — Heslacher 10 secs ago
Monking @all
 
@Heslacher Monking :)
Also; signing off, monknight all
 
night @Phrancis
 
6:30 AM
monking
 
Morning
 
6:48 AM
^^^ a bit creepy
 
monking @Mehrad monking @janos
 
hi @Heslacher
I kinda want to flll this screen with messages now so the EYE goes out of sight ;)
maybe I could tell a story or something
 
I am listening ;-)
They should prohibit animated gifs in chat
Lucky me, I will finish my started answer and then I need to restart the VM because of updates. So maybe then the eyes are gone.
 
or change the flag message to Do you want to flag this message as spam, inappropriate, or freakin' annoying?
ah, sometimes I forget the power of Chrome
right click -> inspect element -> Del -> bye bye animated gif
2
anyway, I have to make breakfast, then get to work
so, see you guys later :-)
 
7:23 AM
@janos Works also with firefox ;-)
 
7:50 AM
0
Q: How to refactor goto in C#

user1219310public static int Calculate(ref Vars vars) { int functionReturnValue = 0; int retValue = 0; retValue = MethodA(ref vars); if (retValue != 0) { goto Err_Blk; } // Gas or pressurised water. if (vars.CatagoryType == OmgType) { retValue = MethodB...

 
8:08 AM
I do hope we get a tag
stackoverflow.com/a/27958972/2853637 (cheating on CR, I'm sorry)
 
8:22 AM
Monking
 
8:35 AM
monking @skiwi monking @chillworld
 
0
Q: use of get queryset and using pass in except block

Prashant GaurI wrote a view to update my draft object , before updating my draft I need to see if any draft exists for package(draft.package) in db or not . If any draft available, i need to update that draft's fields. I am using get queryset to look into db to check draft availability. I want to know th...

 
Iew, C# supports goto?
 
9:13 AM
0
Q: Performance problem when getting text from a context node with VTD-XML

halloeiI have a structure like this: <a> <b> <c>foo</c> <d>bar</d> </b> <b> <c>baz</c> <d>qux</d> </b> </a> I set /a/b as context and loop through all occurrences to get the texts of c and d. VTDGen vg = new VTDGen(); vg.parseFile("test.xml", true); VTDNav vn = vg.getNav(); ...

0
Q: Generic Tree in Java

KaoMy implementation of generic Tree structure: /** * Tree data structure */ public class Tree<T> { private T value; private Tree<T> parent; protected List<Tree<T>> children = Collections.emptyList(); public Tree(T value) { this.value = value; } public Tree()...

0
Q: Text-based Tetris game CRTP 3

MORTALPrevious question: Text-based Tetris game CRTP 2 Summary of improvements: Fixed Issues preventing the code from compiling on Clang Implemented helper class range_impl Removed all std::initializer_list Elimination of magic numbers How can I improve this code further? #include <iostream> #i...

 
9:45 AM
0
Q: Speed up python date conversion function currently using list comprehension and datetime?

cmeerenI am reading a large data file where the time is given in number of days since some epoch. I am currently converting this to Python's datetime format using this function: import datetime as dt def days2dt(days_since_epoch): epoch = dt.datetime(1980, 1, 6) datelist = [epochRef + dt.timede...

 
10:09 AM
1
Q: Copying contents of two files into one file/ bufferedReader close calls

user2822178I am using the following code to copy the contents of two files into one. Earlier I was not closing the Buff and as eclipse gave warnings I did close it. I want to know if this code is susceptible to failure. public void mergeFiles() throws IOException{ ArrayList<String> list = ne...

 
 
1 hour later…
11:22 AM
1
Q: Image cache for lots of images 2.0

Guillermo MestreFollowing from this question I created a Image cache of sorts (let's call it version 1.0) that used WeakReference as "cache" items. And this comes from the accepted answer: It looks like weak reference would serve the purpose of what you are trying to achieve [IF] those images will go out of...

 
0
A: Should the [jquery-mobile] tag be populated with existing questions?

RubberDuckI wanted to add to the conversation, but I'm not sure this is really an answer, because I don't know. We really need a domain expert here. jquery-mobile seems to be a good tag. jQuery Mobile is a framework. Traditionally, there's been little question that technology tags are good tags. The singl...

So, yeah..... if anybody knows and , we could use an expert's opintion there ^
 
Hey, there is a bounty for a question :D
 
I once met a "developer". That guy made me completely sure I never wanted to even think about learning php. He didn't last long in my office.
2
 
I have a friend who likes developing with . He makes it look fun.
 
11:43 AM
I'm sure some people do. I mean, Mug and I make VBA look fun from time to time.
It's not about the language, it's about the idiot behind the keyboard. =0
2
 
@RubberDuck Doesn't the idiot always sit in front of the keyboard?
 
@skiwi lol. Yes. I suppose you're right.
Case and point.... @ducky. =)
 
I've got a question about the Single Responsibility Principle... I've got a class that reads and parses a log file, that seems to violate it...
However only the parser itself knows if it needs to know more lines to build up an entry
The main flow of the application is that you read the lines yourself, then ask every parser if it can handle that line, if so it handlesit, but during handling it may request extra lines if it thinks it needs them
 
BAM!!! bug fixed
So, you're using a chain of command?
I'm a bad person to ask that question. A lot of people would say having a "reader/writer" breaks SRP, but I think you have to as yourself
 
Hmm, I don't know how to best visualize this
 
11:53 AM
> Will I ever use a reader without a writer?
 
I think the explanation about the main flow is the best I can give
 
If you would want to ever just read a log file, or just write to a log file, then yes. Break it into two classes.
 
What you want is to parse a log file, what happens underneath is that also need to read it obviously
 
There's your problem. Why would the parser need to read the file?
 
On the other hand, the class for all of this is called a LogReader, as you want to read log entries from a log file...
 
11:58 AM
A parser should take in a string (assuming a string).
 
@skiwi pass the "reader" aka LineEnumerator to the parser too.
 
But the parsers themselves are called EntryReader, perhaps sthey should be called EntryParser
@RubberDuck Yeah, that also happens
It doesn't know anything about the source of the log anymore
sorry gotta grab lunch now
 
0
Q: How robust is this PHP templating code?

Programming cat<?php if (!empty($_REQUEST['content'])&&!empty($_REQUEST['title'])&&!empty($_REQUEST['writer'])) { $title = $_POST['title']; $content = $_POST['content']; $writer = $_POST['writer']; require_once 'htmlpurifier/library/HTMLPurifier.auto.php'; $purifier = new HTMLPurifier(); $pure_content = $purifier-

0
Q: Implementing Simple and Fast Inheritance in JavaScript

albanxI have been using the John Resig javascript class implementation in my web apps, but the tests shows it is really slow. I really find it useful for the way of extending objects, and the benefits got from having a better code and less redundancy. In some post was explained that it was slow becau...

 
@Heslacher Those are abstracted already
public interface EntryReader {
	boolean isParsable(final String input);

	LogEntry parse(final String input, final LineReader lineReader) throws NotParsableException, NoMoreInputException;
}
It would only make sense if it was named EntryReader
And the NoMoreInputException should be refactored away
 
12:30 PM
0
Q: A commented Python function with checks

user63053Here's my function for calculating the volume of a tetrahedron. I've tried to comment well, and perform a few checks on the types of the objects passed to it. Can it be improved for commenting? I'd also like an opinion about my method for checking the object types: is it better to use assert for...

 
You should have a reader class and a writer class. Whether or not you want to expose these individually or not is or create a ReadWrite wrapper class is another question entirely.
2
But internally, two classes.
 
1:13 PM
0
Q: Simplifying select-all, select-none, toggle-all, and toggle-one code

KokizzuI have this code, this code used to toggle buttons within a div var chosen = {}; var form_name = 'the_div'; function(what) { if('number' != typeof what) { // toggle-one var el = $(what); var name = el.html(); var ch = ['success','default']; if( !chosen[name] ) ...

 
1
Q: Is the [comments] tag too meta?

RubberDuckLast summer we burninated a number of meta tags. These were mostly tags that described what the original poster of a question was concerned about or wanted to have reviewed. I stumbled across the comments tag this morning and I'm thinking it should go. From the tag wiki: Comments are non-exe...

 
1:58 PM
[].slice.call(document.all).forEach(function(elm) {
  elm.setAttribute('style', 'background-color: #' + (Math.random()*100).toString(16).slice(-3));
});
How to brighten your day ^^^^
3
 
hahahaha. Very nice.
 
 
Wow it's hummm nice...
 
Ugh...... now I'm nauseous.... awesome.
 
@rolfl What is the size of your screen ? Looks like a 4:3 to me
 
2:04 PM
It's a hand-selected rectangle, not a screenshot
 
Are you working on an April Fools day page?
3
 
7 mins ago, by rolfl
[].slice.call(document.all).forEach(function(elm) {
  elm.setAttribute('style', 'background-color: #' + (Math.random()*100).toString(16).slice(-3));
});
7 mins ago, by rolfl
How to brighten your day ^^^^
@Marc-Andre Better?
 
@rolfl Ahaha yeah :D !
 
Greetings, Programs.
 
2:29 PM
0
Q: Three "alias-functions" in my .bashrc file

aliteralmindI'm new to Bash programming. These functions work well for me. Can they be improved or made more standard in some way? :<<COMMENT Alias function for recursive deletion, with are-you-sure prompt. Example call: srf /home/jeffy/django_files/rest_tutorial/rest_venv/ Short descri...

 
2:47 PM
0
Q: Using NSPredicate with NSFetchRequest in a NSFetchedResultsController

KFPI am learning CoreData and I wanted to have my code reviewed. As usual, I get something to work, then I attempt to refine it. I have a data model that consists of an Item entity and a subItem entity. The Item has a 'to many' relationship with the subItem and subItem has a 'to one' relationship ...

0
Q: What's the best approach to map objects and database table's relationship when using collections?

adheusLet's say we have this classes below: class User(id: int, name:String, userRole:List<UserRole>) {} class UserRole(identifier:String) {} class AdminRole(administration:Administration) extends UserRole {} //Administration is a specific feature of this class, could by anything. class VisitorRole...

-1
Q: Operating System FCFS scheduling with IO

NIHAL ABDULLAHWrite a application for simulating the work of a FCFS scheduler on a single CPU system, when processes block due to I/O. Your program should be able to read from a file the description of a set of tasks and calculate their turnaround time. An example that illustrates the format of the task specif...

0
Q: Best practice for properties initialization using costructor

GibboKI am declaring a "class" using a "constructor method". In both samples, properties uuid and dateCreated are initialized but in different places. I would like to know, what is "best practice" in this scenario and why (also in term of readability). Solution A define([ 'dojo/_base/declare',...

 
@Donald.McLean Hello, user.
 
I was starting to wonder where everyone had gone to.
 
The ether
 
3:02 PM
@CaptainObvious Is this on topic?
 
@Phrancis That isn't actual Scala code. I'm not sure what language, if any, that is.
 
VTC'd "Hypothetical"
Could be on topic for Programmers, but I don't know well enough to tell OP that.
 
You can tell because even though the classes are defined with parameters, the templating uses Java syntax. A Scala list would be List[UserRole].
 
> Did you quit school or do you have a few years of experience with Java?
> Experience doesn't matter, just be passionate!
> (...)
> Profile:
> * You own a bachelors or masters degree
People don't know what they want
5
 
@Donald.McLean Oh. They mentioned Scala so I thought it was. Let me roll back my tag edit.
 
3:18 PM
@Phrancis Yeah, that's what I thought at first too, until I actually read the "code".
 
0
Q: How to handle overwriting of unique Dictionary value C#

PugsOverDrugsI am working in C# to write a scheduling application for operations in a factory. I have a custom class Workday, with properties to represent a Workday for the operations in the shop. And I have a class Timeline that contains a dictionary of DateTimes as keys (using DateTime.Date to make sure we ...

 
I also have to say, I'm not entirely sure why the Scala community is so down on Hibernate.
 
@JeroenVannevel Is that somewhere public I can point to? Love to show my one friend....
 
3:39 PM
@rolfl Afraid not, I was sent it in an email in Dutch today
but on the off chance your friend speaks Dutch: i.imgur.com/LD5RvRF.png
 
0
Q: lvl 1 upgradeable attributes

Nick UdellI've built the groundwork for an attributes (as in Stength, Intelligence, not as in DebuggerHidden, TestMethod) framework for my game. Each attribute can be upgraded and downgraded individually as well as part of a bulk change (such as for upgrades that have side effects, or leveling up). I'm lo...

0
Q: Reusable Unit Of Work Interface / Factory

Issa FramGiven my IUnitOfWork interface using System; public interface IUnitOfWork : IDisposable { void Commit(); } I then create an abstract factory interface called IUnitOfWorkFactory using System.Transactions; public interface IUnitOfWorkFactory { IUnitOfWork GetUnitOfWork(IsolationLe...

 
Is this a quirk with SQL Server that this works? (with the slashes in the date format)
SELECT DATEADD(DAY, 90, '12/26/2012'); -- result: 2013-03-26 00:00:00
 
@Phrancis Most DBs document what date formats they recognize. Some are more accommodating, some more strict.
 
lol @JeroenVannevel I'm loving it, they essentially first get you warmed up if you have had experience with Java, and then they say a big I DON'T CARE in case you actually have experience
 
@CaptainObvious Nice title
 
3:59 PM
@CaptainObvious That's a good first question, it ought to get some love votes!
@Donald.McLean Wonder if it's dependent on locale... I tried with 15/03/2012 and 15-03-2012 and both gave an out-of-range exception, even though both are valid date formats (in some countries)
 
@Phrancis Could be. I would be tempted to actually read the documentation. I'm weird that way.
4
 
Smoking the documentation is usually a good idea.
2
I'll say the page on date-time functions in SQL on MSDN is one of the most confusing things I've ever read.
2
 
@Phrancis Hmm. Not the best documentation I've ever seen.
 
4:16 PM
@Phrancis Personally I'm more puzzled why it returns 26/03 when 25/03 would be 90 days later
26/12 -> 31/12 => 5 days
01/01 -> 31/01 => 36 days
01/02 -> 29/02 => 65 days
01/03 -> 26/03 => 91 days
right?
 
Here is a secret I want to share at the moment : Working with dates (in a program) is something I hate to do.
 
0
Q: Printing prime numbers in Assembly

user1720897I am learning to code in the Assembly language for the x86 architecture. I currently know of a few registers and certain arithmetic operations like add, sub, inc, dec, mov and to check for conditionality using certain jump statements. I am using some "ready-baked" code for input and output. The i...

0
Q: Replace from all words, even if seperated with dash, first character with uppercase

lennert_hI got it working, all variations are displayed Sint-Anna as should be, but I wonder, is there a simpler way to this, since it looks very cluttered? String.prototype.capitalize = function(){ var sa = this.replace(/-/g,' '); var saa = sa.toLowerCase(); var sb = saa.replace( /(^|\s)([a-...

 
What is quirky Phrancis?
@Phrancis
 
@JeroenVannevel Not too sure either
@nhgrif I would have assumed that the date formats should be required to be input in the same way they are output, e.g., 2015-01-15, and not in the "American" format
But, it's MS SQL so I guess I shouldn't be surprised. Postgres requires the YYYY-MM-DD format, pretty sure MySQL does too
 
4:36 PM
The input accepts a few different formats, the output is a server setting.
Inputs is a localization.
Also, how management studio prints it is different how other things will print it. Remember, the output is a date type not a string.
 
you guys should vote on some of my CSS answers, I only need 4 more upvotes for another Bronze tag badge! ==> codereview.stackexchange.com/search?q=user:18427+[css]
@Phrancis would you like to start a SQL Helpline chat? I need a hand on a simple piece of SQL
 
@Malachi Sure just invite me to a separate room whenever
 

 SQL Helpline

SQL is Weird sometimes.... bit.ly/F5-Now
 
When I get a date from iPad without converting in SQL it's an even longer string. Like: Mon, Jan 1, 2015
 
@Malachi LOL. Sometimes?
3
 
4:46 PM
lol
 
Sometimes Usually Always.
 
@nhgrif Your iPad is broken. Jan 1, 2015 was a Thursday ;)
3
 
5:07 PM
0
Q: How to change a recursive code to iterative form

ChuNanI implemented a simple FFT below (the final scaling is ignored): typedef complex<double> base; vector<base> w; int FFTN = 1024; void fft(vector<base> &fa){ int n = fa.size(); if (n==1) return; int half = (n>>1); vector<base> odd(half),even(half); for(int i=0,j = 0;i<n;i+=2,j+...

 
0
Q: Least common ancestor in a binary tree

yadav_viI saw this implementation of Least common ancestor and thought that it was very inefficient as it used Queues. I have tried to implement it using a normal tree traversal. I have also tried to keep all the utility methods as public static so that they could be accessed from anywhere. Is the implem...

-1
Q: Having alignment issues with pygame draw lines

James UptonI have a script that I am working on that creates a grid on the desktop which eventually will become a voice activated grid for mouse control. The problem I am having is that for grids 4 through 9 the horizontal lines are not being drawn correctly. I have played with the math on the button presse...

 
@Malachi WTF?
you should have posted this on StackExchange, it is off-topic here. — Malachi 7 mins ago
2
 
it doesn't work
 
@Malachi Read it again.
 
but OP did post it on Stack Exchange...
2
 
5:35 PM
> The problem I am having is that for grids 4 through 9 the horizontal lines are not being drawn correctly
 
LOL. No! Your comment!
2
 
@RubberDuck lol
 
SE > SO
 
=:)-
 
CR > SO
lol
 
5:39 PM
Unfortunately, I agree it is off-topic for Code Review, but it is unlikely going to fare well on Stack Overflow, since there's too much code, and it needs to be a simplified example of the problem. SO needs small examples, CR needs more complete and real code. Migration in it's current state is not a good option. — rolfl ♦ 7 secs ago
 
0
Q: Classes to manage collections of records with variable fields structure

ps0604The objective of the two classes below is to manage a collection of records where the record structure (i.e. the fields that comprise the record) is variable and defined at run-time. The record structure may contain integers, amounts, dates and strings. The RecordDefinition class is used to def...

 
Odd, don't understand the hot-network list:
 
Nobody does. Not even SE devs...
4
 
Well, now it has a better title and tags too.
10
Q: Capitalize the first character of all words (even when following a '-')

lennert_hI got it working, all variations are displayed Sint-Anna as should be, but I wonder, is there a simpler way to this, since it looks very cluttered? String.prototype.capitalize = function(){ var sa = this.replace(/-/g,' '); var saa = sa.toLowerCase(); var sb = saa.replace( /(^|\s)([a-...

 
@rolfl With emoticon
2
 
5:46 PM
makes me happy, and nosy
 
'-'
 
user image
4
Out-of-context there, funny
 
Regarding the isolation level. Typically with CRUD operations, Create Updates and Deletes I like to use a Serializable isolation level and use a ReadCommitted isolation level with any Read operations. But that is why I think it shouldn't be hard coded into a container. It can change depending on what the user is doing. — Issa Fram 11 mins ago
could TransactionScope be not DI-friendly?
OP isn't showing their IRepository implementation...
 
00:00 - 18:0018:00 - 00:00

« first day (621 days earlier)      last day (3390 days later) »