« first day (781 days earlier)      last day (3240 days later) » 

7:00 PM
@Yuushi Probably best if you had some kind of symbolic processor that didn't evaluate until everything was reduced to simplest terms.
 
When you get into the nitty-gritty of SQL (stuff more advanced than select-insert-update-delete) I think it compares to programming to an extent, although very much domain-specific
 
@Phrancis funny. I wrote some T-SQL yesterday to infer the sequence of "production scan sites" in a db table that had "next site" for each scan site record. Used while loops and all. Felt like programming. And felt like wrong SQL, too.
 
hmm... nitty-gritty fast SQL is very often more complex than the everyday programming...
 
Rubies are such pretty stones.
 
@QPaysTaxes I know I suck at this too, but... critizise the code, not the OP..
 
7:03 PM
@Mat'sMug Well, sometimes even in SQL you have to use loops, some things just can't be done set-based
 
@Phrancis Does that count?
 
@Phrancis if it was more than the 30-some records in that table I think I would have written in in C#
 
/**
* @author Francis V.G.
* Policy term expiration calculator
* Business rules dictate that the expiration of a fixed-term warranty policy
* is calculated by multiplying 365 by the term, hence coverage than spans
* leap-years will have a few days difference between start and expiration dates.
*/
DECLARE @YearDays INT = 365;
DECLARE @TermInYears INT = 10;
DECLARE @Term INT = (@YearDays * @TermInYears);
SELECT
    [Current] = DATEADD(DAY, @Term, '6/16/2015')
  , [Correct] = DATEADD(DAY, @Term, '6/12/2015');
How I write SQL ^^ ;)
@Mat'sMug Does C# loop over DB records much faster than a DBMS?
 
Yes.
 
0
Q: Codegolf challenge that plays Mafia

Faraz MasroorI am working on writing a Codegolf King of the Hill challenge, the details of which can be read here. You can read the full code here Basically, the users will program Java bots that will play the game, given only the information provided by other players and sometimes from the controller progra...

 
7:06 PM
they wouldn't have been DB records, but in-memory tiny little objects
 
makes buttons and bumper stickers for next week's elections
That's my plan.
I also need someone to buy me out with lots of rep so that I can get others pissed off and continue doing what I'm doing.
 
this isn't a bowling alley, we have enough pins ;-)
it's ok, we can always quote the chat log come the elections :)
 
D:
 
searches chat log for "don't quote me on that"
 
Code Review was just mentioned in here...
not by mean
here == my office
 
7:13 PM
@nhgrif you're running?
 
I'll be sure to post all my tax rep returns as well.
(not)
 
@Mat'sMug Hadn't decided. Someone just mentioned it. I don't know what they were talking about. I took my headphones off just at the end of the convo.
 
@Jamal ^^
 
I'll be avoiding that tutorial.
 
@Phrancis awesome
any comments on that .... thing?
 
7:20 PM
0
Q: Is my implementation of removing an element and the one following dangerous?

EvorlorI have an ArrayList of Strings. I want to delete all elements with a particular value and the element immediately after that one. I have an ArrayList with the elements "Ape", "Bear", "Cat", "Dog", "Emu", "Fox", and "Gopher". Any time I see "Cat", I want to delete "Cat" and the element immediat...

 
@nhgrif It'd be funny to see you arguing with yourself, depending on the hat you're wearing :)
 
Hmm?
I mean... I could probably get a few dozen work people to come vote for me as a moderator... if I wanted it badly...
 
@QPaysTaxes Go Mr. Taxes, go.
 
Q is a fictional character in the James Bond films and film novelizations. Q (standing for Quartermaster), like M, is a job title rather than a name. He is the head of Q Branch (or later Q Division), the fictional research and development division of the British Secret Service. Q has appeared in 20 of 23 Eon Bond films; all except Live and Let Die, Casino Royale and Quantum of Solace. The character was also featured in the non-Eon Bond films Casino Royale (1967) and Never Say Never Again. == NovelsEdit == The character Q never appears in Ian Fleming's novels, only the Q Branch is mentione...
 
@QPaysTaxes Whenever someone mentions the IRS, I can't help but think of the movie Stranger Than Fiction.
Stranger than Fiction is a 2006 American comedy-drama-fantasy film directed by Marc Forster, written by Zach Helm, and starring Will Ferrell, Maggie Gyllenhaal, Dustin Hoffman, Queen Latifah, and Emma Thompson. The main plot follows Harold Crick (portrayed by Ferrell), a nondescript white-collar worker who begins hearing a disembodied voice narrating his life as it happens – seemingly the text of a novel in which it is stated that he will soon die – and he frantically seeks to somehow prevent that ending. The film was shot on location in Chicago, and has been praised for its innovative, intelligent...
 
7:30 PM
@QPaysTaxes that's called necromancer...
just count the necro bages
 
Hmm. My employer has five credits in the IMDB.
 
@QPaysTaxes it's probably close enough..
 
ahhhh stahppit, please...
 
That's all.
@QPaysTaxes Yes. I work on the archive. The one that stores ALL of the Hubble Space Telescope data.
 
7:42 PM
merge conflicts!
 
@QPaysTaxes Don't let anyone kid you - luck is often a huge factor in finding a good job.
 
@QPaysTaxes RSA (damn already out of stars?)
 
0
Q: Parallel factorial algorithm using std::thread

krispet krispetThis code calculates the factorial of a number on multiple threads. My issue: it is only a little bit faster than the sequential version of it (and I think I know why, I just can't find a way to solve this). I use boost::multiprecision::cpp_int so the limits of default integers are not a problem...

 
8:03 PM
Hi everyone! Anybody here solving codereview.stackexchange.com/q/94407/14363?
 
monkvening
 
1
Q: My code efficiency - Ruby

NemoSorry for the vague title, I don't know what else to call it. I have a Ruby program which should solve the following problem: Consider the divisors of 30: 1,2,3,5,6,10,15,30. It can be seen that for every divisor d of 30, d+30/d is prime. Find the sum of all positive integers n not exceeding ...

0
Q: Youtube API Grabbing Channel ID

MaximHey guys i need to make a google authentication script that will grab a channel id of a youtube user ,if you can help me please add me on skype! Skype: boomer1248

 
hmmm... yea..
and judging by how hard they spam me with "please give feedback", users are a-running
 
@CaptainObvious Burn
 
@CaptainObvious "My title efficiency"
 
8:06 PM
blatantly off topic
 
@maaartinus int a = 0; <-- red flag
 
@QPaysTaxes The nested fors are surely no good idea. You you surely haven't seen my variables, unless you hacked my computer.
 
hmm... @Jamal do you know by chance whether the monkey is free right now?
 
@Vogel612 No idea. You'll have to ping him.
 
hmm... kk
@rolfl quick question about XPath (or rather XPathFactory) ...
is there a way other than giving a Filter to get an Expression that doesn't have Object as T?
 
8:10 PM
My point is that I haven't posted my solution yet.;) And I'm not sure if I will as all these optimized stuff is fun to write but hard to read. And nobody cares.
@QPaysTaxes But you know, Lombok. :D
D:D:D Actually, not this time. Simply because there's not even a stupid getter there.
But I'm working on another solver.
 
okay nevermind, I found the Filters class..
 
Neither nor. Just indifferent laughing.
 
8:30 PM
Should I add a downvote?
Assuming you mean your last question, I can't do anything with it as I'm too ignorant with Ruby. I hate weakly typed languages. :(
All I can say is that people indenting with spaces rather than tabs are strange.
 
strongly disagree
 
Hi @QPaysTaxes.
 
hey @QPaysTaxes
 
@janos I was expecting this. It's insane, but insanity rules. ;)
 
8:46 PM
yeah, I had the feeling you might be simply bored, and just made an inflammatory remark to spice up the conversation ;-)
 
@maaartinus Behavior of tabs is not sufficiently standardized.
 
Tabs needn't behave. Nor do other chars. They're no children, they're just part of the source code. It's up to your editor to display them the way you want.
 
I have a huge problem with tabs in diffs in GitLab
it displays them using width=8
which often pushes code so far right that I have to scroll
while the IDEs used by teammates all display with width=4, so they don't notice the difference soon enough
 
@Vogel612 Nope
 
That's a pitty. Actually, so does my git in the console. But that's a small price for indenting with a single thing, rather than some stupid number of spaces.
 
8:52 PM
I never count the spaces
my IDE does it for me. Vim too
press Tab once, get 4 spaces, and everybody sees exactly what I see
 
Sure, but when you move using the cursor keys, it goes where it shouldn't. The real problem is IMHO people indenting with 2 spaces. For me, it's far too few and I can see nothing there.
 
Oh... We're at Tabs vs Spaces again
(Spoiler: Spaces wins)
2
 
Sure, that's the more important thing about computer science.
 
1. It wouldn't take forever, just 10 hours. :) 2. Have you tried combining the file openings, e.g. with open("Output.txt", "w") as result, open("bedgraph2.txt") as file1, with open("bedgraph1.txt") as file2: and doing the processing then? I'd guess you're spending a lot of overhead on that. 3. This question is better suited to Code Review. — TigerhawkT3 14 secs ago
 
pretty nice perl code in question by new user
 
9:01 PM
Anyone here experienced with Hibernate or GORM?
 
@maaartinus Scala standard is two space tabs. I haven't had any problem adapting.
 
@janos - FYI, reading your meta answer to the election question.... not all mods are re-running ... ;-)
 
^^^ no.....
who's not?
whaaaa?
 
tis true...
 
@Donald.McLean I'm afraid, Java standard is 2 spaces as well. But I really can't read it if if a method gets a bit longer.
 
9:03 PM
I guess you already discussed this here
 
yup, some transcript in there somewhere.... digging
 
ya.. 'bout 26 hours ago..
 
I'm sad to learn ;(
 
@janos - I expect and hope that the opening will create a fresh impetus in the site. It will also allow me to kill this particularly bad record.....
 
@QPaysTaxes Python has an (unconventional) ternary operator as well
 
9:06 PM
@QPaysTaxes That's what all Java code I've ever seen uses.
@QPaysTaxes no, four spaces.
 
 
2
Q: Calculating bytes of code

HSchmaleI am new to Perl and I wrote this Perl script to calculate bytes of code and lines of code in a directory. I want to know if there are any improvements that can be made to it. #!/usr/bin/perl # codestats.pl # A perl script to calculate the number of lines of code in a project # and what type of ...

0
Q: Adding action id to a history repository

JakobIn my system I have a history repository. My history class is big and with a lot of information regarding operations. My warehouse needs, for some actions to know which histories are caused by the same action. My first idea was to create an overloaded version of each method requiring to write hi...

 
@rolfl true, not so good for you
but I'm sure you're disciplined enough to get out of that anyway
 
Not sure if this is Java standard, but I'm afraid, it is: google.github.io/styleguide/…
 
I actually wanted to skip a day to avoid Fanatic
but then I forgot :)
 
9:09 PM
^ that
 
@maaartinus / @QPaysTaxes - the 2 vs. 4 space depends largely on local rules. The google java code conventions is 2 spaces
the official java one is 4
No, @QPaysTaxes is wrong
 
@QPaysTaxes You're right! I've just found it: oracle.com/technetwork/java/codeconventions-150003.pdf
 
@QPaysTaxes company policy overrides industry policy..
 
Oracle/Sun has withdrawn their standard
 
no exceptions
 
9:10 PM
well, I imagine being a mod as a LOT of work. So it's not really a shocking decision
 
Right, the old one by sun is terrible. Google made IMHO everything better, except for this.
 
Oracle's page ^^^
But, @QPaysTaxes - I find that you make very strong, emphatic, statements that are never really as clear-cut as you make them sound
 
moar bookmarks
@QPaysTaxes TS ?
 
@Vogel612 - about the XPath things....
 
@rolfl found Filters.element()
 
9:13 PM
XPath can return all sorts of content, including Integers, etc,
 
You might consider giving an @see Filters in the class-level javadoc of Filter.
basically I found the filters in a code-example on the wiki-page about XPath considerations...
 
OK, that's a good idea.
 
/me likes
 
@QPaysTaxes WOuldn't the actual Java source code be better?
In which case, who needs braces:
    /**
     * Returns the index of the first occurrence of the specified element
     * in this list, or -1 if this list does not contain the element.
     * More formally, returns the lowest index <tt>i</tt> such that
     * <tt>(o==null&nbsp;?&nbsp;get(i)==null&nbsp;:&nbsp;o.equals(get(i)))</tt>,
     * or -1 if there is no such index.
     */
    public int indexOf(Object o) {
        if (o == null) {
            for (int i = 0; i < size; i++)
                if (elementData[i]==null)
                    return i;
 
@rolfl Meh, in Java source they also don't always have whitespace everywhere and are not always using braces, etc.
@QPaysTaxes Most of it is, but some parts are written in C I believe either for performance reasons or platform specific reasons
 
9:19 PM
@QPaysTaxes depends on how you want to define Java...
 
@QPaysTaxes How can you be so confident about things you say about Java standards when you don't even know Java has Java source code?
 
monkey grumpy today?
@QPaysTaxes that argument is somewhat invalid...
 
yeah... apparently
 
hmm... NoClassDefFoundError..
 
And also a lot of unbraced 1-liners.
 
9:24 PM
@Vogel612 haha so you put your plan to execution!
 
@Mat'sMug ??
 
in VBA Rubberducking, 2 hours ago, by Vogel612
hmmm,... should I bug rolfl now??...
 
yes I did, and he opened an issue for me :)
~happy
 
@QPaysTaxes No, but you know the standards, and that is against both the oracle, and google ones.
 
configuring build servers...
 
9:26 PM
hmm... @rolfl does JDOM2 expect me to provide Jaxen?
 
@Vogel612 If you use XPath, yes. It is an optional dependency in the maven pom, and it is available as part of the package download on github.
A lot of people surprisinly don't use xpah
 
well it depends so much on what you need to do..
 
@rolfl I totally read "maven pom" as "maven porn"
 
@Mat'sMug common mistake.
 
IKR
 
9:28 PM
it stops when you get used to maven dependency management
oh, cool... the javadoc links to jaxen.codehaus.org:80, which wants me to auth...
wat?
 
Maven porn? Does it ever stop? Do you know youtube.com/watch?v=mBmExt184vc?
 
This would probably be much more appropriate at CodeReview.SE. I am going to answer in the spirit of that site. — Jörg W Mittag 50 secs ago
 
@Vogel612 Coudehaus is defunct,.
 
yep...
 
not surprising tha tthe javadoc link is toast.
 
9:41 PM
0
Q: Refactoring if statements: two conditions that result in common and also different actions

rewobs "createdRow" : function (nRow, data, iDataIndex) { var $row = $(datatable.row(nRow).draw().node()); var $quantityInput= $row.find("input.quantity"); var rowClass; if (data.wasConsumed || data.wasCancelled){ $q...

 
maybe you want to link to the github organization instead? then again jaxen is separate now, IIUC..
 
it has moved to.... cafeconleche.org/jaxen
 
I'd need 50
 
2.0.6 uses jaxen 1.1.3, right?
well it's what the pom says.
 
@Vogel612 2.0.6 uses the lates.... I thought that was 1.1.6
I pushed a bunch of performance fixes in to them at one point.
 
9:52 PM
and it doesn't work with 1.1.6 (at least not for me)
let me just retry with 1.1.6....
 
		<dependency>
			<groupId>jaxen</groupId>
			<artifactId>jaxen</artifactId>
			<version>1.1.6</version>
			<optional>true</optional>
		</dependency>
 
@QPaysTaxes :)
 
hmm... yes I was actually just too retarded to do it right...
and I'm probably overcomplicating this....
 
Someone ready for a flame? I consider the groupId/artifactId rather stupid. Couldn't it (at least 90% of time) be called simply called by the package?
This would make the jar search pretty superfluous.
 

« first day (781 days earlier)      last day (3240 days later) »