« first day (2066 days earlier)      last day (2884 days later) » 

3:00 PM
Your code looks good. You might do switch(true) to shorten it a little, but I haven't seen switch(true) in the wild, so it might confuse some.
 
looks straightforward enough. Is there a performance problem?
 
Nah, it just feels so verbose
thanks
 
I would inline the function definition
 
it looks okay to me ^^
 
But it needs recursion?
or maybe I don't understand what you mean, @JanDvorak
 
3:01 PM
pretty much, yes
 
it does if you want child objects handled.
 
@StephanMuller _.mapValues(object, function(){...}
 
yeah that won't work with the recursion though
 
it does with a named function expression
 
ah, right
 
3:02 PM
_.mapValues(object, function r(){...})
 
it's not too verbose. It's short enough to fully comprehend in a minute and it performs a single purpose.
 
or, you could recurse the outer function instead
 
^
 
But yes, this function is a keeper
 
function fixThatShit(obj) {
	for( const val of obj ) {
		if( typeof val === "object" ) {
			val = fixThatShit(val);
		}
		val = val === "true" ? true : val === "false" ? false : val;
	}
	return obj;
}
?
destructive tho
 
3:04 PM
Also, offensive naming ;-)
 
if you're 11
 
Everybody poops, Jan.
 
OK, immature naming :-D
 
Yeah I considered that too. As for the inline function, we generally don't do that purely because if you chain them, this makes it a lot more readable.

`myObj.map(changeSomeValue).filter(removeCertainItems)` is easier to comprehend at a glance than inline functions
 
Ohh, like that dick symbol you just put on your message isn't?
 
3:05 PM
@StephanMuller true that. But you can't afford to start with that line in most languages
 
@rlemon it was a foreach first, but map is semantically more correct, aka it conveys what the method is doing better imo
@JanDvorak fair enough
 
but you don't need the functional or function scope approach
 
it's fine, just make it recurse on the parent function and it'll be cleaner
 
thanks for thinking along, all
 
so why introduce it. therefore for..of is better
 
3:06 PM
filter removeCertainItems $ map changeSomeValue obj
  where removeCertainItems el = ...
 
@rlemon because it's mapping, not just looping
 
@rlemon es5 comp?
 
@Mosho ok, ran into first wtf with mobx
 
@rlemon because it's mapping, not just looping
 
function transformValueToBoolean(object) {

  return _.mapValues(object, function (value) {
    if (typeof(value) === 'object' && !Array.isArray(value)) {
      // Recursively restore booleans in this object as well
      return transformValueToBoolean(value);

    } else if (value === 'true') {
      return true;

    } else if (value === 'false') {
      return false;

    } else {
      return value;
    }
  });
}
 
3:07 PM
What's the public opinion on switch(true)?
 
oops.. that can't be a return, then
 
@StephanMuller meh, whatever you like. still doing more work than you need. there is no reason to introduce a new anonymous function if I understand the problem.
 
yea, it can.
 
It can
 
I have an array, no matter how I sort it the sort appears to be a no-op, even if I dump it into another array.
 
3:09 PM
borken comparator?
 
empty array ?
 
already sorted?
 
all the values the same?
reboot.
 
@computed get latestPrice() : number {
    console.log("Entered latestPrice")
    if(this.data.prices.length === 0) return NaN;
    var pojoPrices = Array.from(this.data.prices);
    try {
      pojoPrices.sort((x,y) => dateComparator(x.d, y.d))
      return pojoPrices[0].close;
    } finally {
      console.log(pojoPrices[0], pojoPrices[1]);
    }
If I switch x and y I get the same result.
//comparator is simple:
const getDate = (origin: string) : Date => {
  if(!origin) return new Date(); // invalid date
  const [day, month, year] = origin.split("/").map(Number);
  return new Date(year, month, day);
}

function dateComparator(x:string, y:string) {
  return Number(getDate(x)) - Number(getDate(y));
}
 
does dateComparator return a function, by any chance?
 
3:11 PM
no, it returns a number, good hunch though
 
What kind of number?
 
negative, 0 or positive depending on their equality
 
fiddle?
 
I'll see if I can set it up, honestly I was just complaining to Mosho, this should be easier to debug. I started with new Date(2000 + year, month - 1, day) and the format from server is 11/6/15 for example
 
  pojoPrices.sort((x,y) => dateComparator(x.d, y.d))
  return pojoPrices[0].close;
How can mobx be the cause of that returning the wrong value?
 
3:14 PM
@Luggage these are not real arrays, they're mobx observable arrays
I did Array.from them
 
oh
 
Array.from should return a real array
 
Yeah, it should
but the elements are mobx observable elements too
 
hmm...
 
it should be transparent, I'm testing it today to make sure the abstraction doesn't leak
 
3:16 PM
convert each element to something immutable before sorting?
wouldn't be nice of MobX, but it's plausible
 
I don't think it does that, I'm confused, it looks like it's parsing the dates correctly.
 
do try
worst case you eliminate an unlikely case
 
Guys does anybody have used dropbox?
 
looks like it was the opposite, a small parsing bug and the fact .sort is immutable on mobx observable arrays.
 
> When you have eliminated the impossible whatever remains however improbable must be the truth
by immutable, do you mean no-op? Functions should always be immutable
 
@Learning Somebody has used dropbox, yes. Why?
 
Actually I have to create same functionality like dropbox file upload
Drag and drop file upload functionality
 
[insert ellipsis here]
 
Can anybody give me some idea regarding this
 
Modern browsers provide the necessary events; do research
fileDrop, or something like that
 
3:23 PM
@JanDvorak ok thanks.is it a tough or daunting task?
 
@Learning in js ?
 
Depends on the coder level.
 
@KarelG yes
 
I have no experience with file upload, but I'd assume the server can't tell the difference
 
use HTML5 + js to provide that drag and drop file feature read this and from there, use an upload function (googleable answer)
 
3:28 PM
I hate this file upload functionality
Always troubles me alot
 
you alot? Me Jan Dvorak.
 
I ate alot once. It was gamey.
 
Sometimes I wonder that developers life is so hectic
 
I thought it would be much tougher meat, like a really big cow.
 
As a developer we always have to upgrade ourself
 
3:34 PM
Yeah... just recently I've uninstalled some bloatware from myself.
 
Because today angular js is popular and tomorrow it will be something else and then we have to upgrade again
 
Angular JS is not popular today
 
I installed it that bloatware. :(
 
companies that adopt a technology will not be so quick to move away from it without some large compelling reason
 
Actually (although that I don't like it) Angular is popular. It's now in the phase that "the bosses have heard from it" and want to "implement it" because it's "hip", aka deprecated
 
3:36 PM
So, what would be a compelling reason for companies to move away from IE7?
 
@JanDvorak you need to check it buddy.disagree
 
Let me just wat that suggestion
 
Security vulnerabilities? Is IE7 even still supported by MS?
 
IE7 is only supported by ISIS.
 
If you can show your team leader that you can hack his computer because he uses IE7, then you got a hell of a reason to move away from it
 
3:38 PM
IE11 can still emulate IE7.
 
if a company invests hundreds or thousands of developer hours into their product and built it with Angular, there is no easy way to just drop it. Angular or [whatever technology] will be used for a while. even if there is no cutting edge development being done on it
 
@JohannesB Nope. They fire you for hacking their computer.
 
ok, then you hack your colleague who agreed to it
same difference
 
@rlemon like at TipRanks
 
in theory, maybe. But theory rarely matters in practice.
 
3:40 PM
true
though I would refuse to program for IE7 altogether
and send them my regards
 
I get the point, but I take working in crappy conditions (programming, not physical) as a challenge instead.
 
(as every programmer with a tiny grain of self respect should do)
Are you one of these people that learns languages from 1980 because they are used in 3rd world factories? :)
because these guys are geniuses
 
You'll have a hard time finding a company that doesn't need to support some kind of weird legacy environment
> I'm a Rust developer.
> Nice. May I take a photo?
3
 
@JohannesB lol, that's the dumbest thing I've heard all day.
I would never pass anyone an interview if they say "I refuse to write code for some system out of pride".
The right attitude is almost always "I will do whatever is beneficial for the company technology wise and I will push for innovation while understanding that a company is for-profit and I'll look out for those interests first".
 
refusing to pick up technical debt is fine, just word it right.
 
3:49 PM
That is, you can push for dropping IE7 and there's a good chance that'll work, but if it doesn't don't have a shitty attitude.
 
How would you word it?
 
@rlemon the minute you open an editor and save a .js file you have accumulated technical debt.
No matter what you'll write, in 2-3 years it's legacy.
 
@BenjaminGruenbaum the point is you can refuse any job for any reason. that is fine. it is your career and your choice on what you want to work on
 
@BenjaminGruenbaum even if you don't change the byte content?
 
pre-job, aka the interview process, that is the best time to do so
 
3:50 PM
@JanDvorak even if you have 0 bytes
 
I don't think Angular is that bad. I got an offer recently for investment fund company, the RD team-leader hated Angular because it was according to him: "magic".
I rejected the offer.
 
@rlemon right, that's entirely fine, but I think it's a very weak argument.
@EhouarnPerret that's not reason enough to reject an offer IMO.
 
that's fine for you. I have enough self respect to not do work I don't want to do. Finding a job you enjoy is important
 
My last hire used only technologies I hated, I think he's doing a good job (to be fair, all our developers are doing a good job).
 
3:51 PM
I refuse and I know why
 
"magic" is just a keyword, meaning "anything smarter than me"
 
@rlemon the concept that there is work that is beneath you is poison IMO.
 
Benjamin, oh not only his arrogant attitude towards some technologies but also because the company was badly ranked on glassdoor.
 
@JanDvorak not IMO.
 
(and the ranking was kinda average cause the company posted fake positive reviews...)
 
3:52 PM
@EhouarnPerret well, that's a different story then.
 
@BenjaminGruenbaum I never said that it was beneath me. I don't want to do it. period. Why take a job I wouldn't enjoy
 
(yup)
 
@rlemon B I G cash
 
don't need it
I make enough money doing a job I enjoy
 
touche
 
3:53 PM
@rlemon fair enough, we do a lot of things to make things better for devleopers although they're hard to justify business wise - if it's a straight up requirement in the interview by all means.
I'd rather work with smart people on IE6 than with tools on Chrome only though.
 
yea If you've already taken the job and then become a douche about the requirements than that is another thing. to refuse a job because you can already tell it is work you won't enjoy is not a weak argument or poison
 
I've gotten hands on an HTML page that absolutely had to fit within a single file. I thought I would get to not use jQuery. Nope.
 
@rlemon definitely agree with you on that. My point was being that what platforms you have to support should hardly be a motivator for what work you enjoy or not.
 
I'm liking ansible..
 
but ymmv
 
3:55 PM
!!wiki ansible
 
An ansible is a fictional machine capable of instantaneous or superluminal communication. It can send and receive messages to and from a corresponding device over any distance whatsoever with no delay. Ansibles occur as plot devices in science fiction literature. == Origin == Ursula K. Le Guin coined the word ansible in her 1966 novel Rocannon's World. Le Guin states that she derived the name from the word "answerable", as the device would allow its users to receive answers to their messages in a reasonable amount of time, even over interstellar distances. Her award-winning 1974 novel The...
 
Nope.
ansible.com Basically describe what you need on your server in a yaml file and it makes it happen
over ssh
 
@BenjaminGruenbaum I agree that you sometimes must do tasks you don't like. I mean tasks as in several days a year in total. I do not mean tasks as in "develop and maintain a system for IE7". That's something I would blatantly refuse. I'm not a fool, you know.
 
so, it's a very limited server-side programming language encoded in YAML?
 
@JohannesB I wouldn't, probably.
 
3:59 PM
yaml is the config files. I can take it or leave it. There is no server-side component. I just communicates over SSH to execute your wishes. Like install a package from the repo, put a config file at the right location, etc.
So that your entire server setup can be automated. Also the ansible 'playbook' serves as a form of documentation about what the server setup is.
 
is it possible to remove an item from an array using a for of loop?
 
you mean in the declaration of your for loop?
 
i want to just rewrite this for of into just a backwards for loop
 
@bitten yes, it is.
 
no in the body of it
 
4:01 PM
Although, don't.
It's also possible with sets and maps, but again, don't.
Use a .filter
 
so for(var item of array) { if(something) // remove item from array pls }
i haven't written the for of, but i am able to rewrite it to use a iterated for loop
 
Yes, but don't.
 
use splice
 
array = array.filter(x => !something(x));
 
@JohannesB but i don't know the index in a for of
@BenjaminGruenbaum ah okay
 
4:02 PM
but as @BenjaminGruenbaum says, filter might be better
 
@BenjaminGruenbaum there's a possibility that -every- item will be deleted
is it still okay to use filter?
actually the odds are that the majority will be deleted
 
array.filter! . Oh wait, this isn't Ruby.
 
@JanDvorak what does it do in Ruby?
 
You could do : for (var [index, value] of array)
but filter is better
 
@bitten yes.
 
4:05 PM
@bitten Methods with a bang usually overwrite the object while their unbanged counterparts return a new object.
 
@JanDvorak aw i like that
array = array.filter((x) => { /* something */ if(somethingElse) { x.kill(); return false } });
 
nil while str.gsub! /needle/, substitution # recursive replace
 
@JanDvorak -whoosh-
the sound of it going over my head
 
I just want to share this poetic piece of documentation I found: "With 256-color mode, Vim explodes with photorealism: the terminal is a medley of color and code comes alive."
 
gsub! and several others return self if they did anything, and nil if they didn't.
op while cond is a postfix loop, equivalent to while cond do op; end
nil is a literal and, thus, a no-op
 
4:10 PM
(git) would a read-only deploy key be ok to store in the repo it's for?
 
elaborate?
 
well thanks for explaining
i'm not familiar with ruby at all :l
 
Worth learning
oh, and did I mention Ruby doesn't need parentheses in method calls? :-)
 
So storing passwords in your repo is bad.. but what about a private key that only has read-only access to the code that it's in?
 
I would say yes, but keep elaborating
 
4:13 PM
@Luggage Well you'd have to read it in order to use it to read it, so...
 
Don't ever store your private key in a public place
 
well, not MY private key.
 
If your key ever gets compromised you might have a problem, use per-password keys
 
also it's a private repo, but still feels wrong
 
How well is your private repo secured?
Your private key is only as private as your private repo
 
4:14 PM
still not MY provate key
 
Print your private key and store that somewhere
 
it's a deploy key. A key that ony has access to that repo.
a github deploy key
 
What's a github deploy key?
 
I'm guessing you mean it uses some hook to deploy?
 
a key that grants you read-only access to a single repo
 
4:16 PM
Oh. So, what's the point of a key somewher you need that key to access?
 
In general, if you ask "is X safe?" the answer is no. If you ask "is X safe enough" the answer might be maybe
 
because the scripts for deploying an update are in the repo
 
Wouldn't it be easier to just make a new key?
 
but if the key is for read-only purposes, why could an update benefit from it?
 
forget i asked.
 
4:17 PM
If for some reason your server explodes and the key is lost. I'm not sure what you need to keep the key around for, outside the server that is deploying it.
 
for every single update
 
how long is the key?
 
nevemrind.. I can't expect an answer about what is common proactice from you if I have to explain what I am even doing
about 2 inches
 
if someone gets the key, they could acces your repository right?
 
Your password is too short ;-)
 
4:19 PM
True.
 
haha knowing what you're doing is generally helpful if you want someone to tell you if you should be doing it.
C'mon now. Let's not turn this into a password measuring contest.
 
100
A: Where do you store your personal private GPG key?

deed02392I like to store mine on paper. Using a JavaScript (read: offline) QR code generator, I create an image of my private key in ASCII armoured form, then print this off. Note alongside it the key ID and store it in a physically secure location. If you have a large key or lots of keys I recommend pa...

 
still not my personal key.
 
I don't have one key for everything.
 
4:21 PM
That's putting a lot of trust into the security of a printer...
 
Well, luggage, you need to determine how important you find it that someone could access your repository, if the answer is very very important, then print it, if the answer is somewhat important, put it on a forgotten usb, if the answer is I don't care so much, put it on your computer and if the answer is I don't give a damn, put it in your repo
 
Printers are actually very insecure, so are monitors.
 
I would be surprised to see a printer hacked with a printlogger.
 
You can easily tap into both, there is very little effort to defend them - printers have a ton of code for counterfeit money detection though.
 
i'm not printing it, asshole.
 
4:22 PM
@twiz uh. Split your key into two parts, print one using a printer from Uganda, another from a printer you own already
 
Or just don't worry about it?
 
What if I own a printer from Uganda?
 
@Luggage I was referring to @littlepootis 's link, earhole.
 
then you're screwed, prints 1pg / min
 
Oh sorry, that's not what pinged me...
 
4:23 PM
Ok, the next hole gets flagged
 
HOLE
 
I was mislead by the fact that you directly addressed me in your response. Not sure how I could have made that mistake.
 
Chat rooms are so distracting.... haha
 
@Mosho how is the presentation coming along btw?
 
4:26 PM
@BenjaminGruenbaum What do they do if they detect it? Just refuse to print?
 
@BenjaminGruenbaum didn't get around to it yet
 
give it a try
 
I doubt I'll have time today
 
@Mosho that's fine, I'm thinking about postponing to Tuesday because it's version day.
 
yeah, I wasn't even sure when you planned to do it
 
4:27 PM
Monday, but I'll do it Tueday
 
@twiz it's scarier than that... pcworld.com/article/229647/…
 
ha that's kind of crazy.
So the printer doesn't actually look for it, it just prints its "id" onto everything you print.
Whatever, I don't even own a printer... ¯\_(ツ)_/¯
 
The EURion constellation (also known as Omron rings or doughnuts) is a pattern of symbols incorporated into a number of banknote designs worldwide since about 1996. It is added to help imaging software detect the presence of a banknote in a digital image. Such software can then block the user from reproducing banknotes to prevent counterfeiting using color photocopiers. Research shows that the EURion constellation is used for color photocopiers but probably not used in computer software. However, there have been reported incidents where Adobe Photoshop doesn't allow the editing of banknotes upon...
 
Ban banknotes
Also, 2D printers
 
4:36 PM
Are there little yellow spheres added by 3d printers?
 
Those would be harder to hide
unless you can make them out of transparent material
 
Gotta stop them counterfeit quarters.
 
Just prevent people from printing with metal. In fact...
 
Slack has made it really hard to tolerate chat apps that don't support emojis....
 
hey there
 
4:40 PM
hola. Actually, I'm going to leave. Bye.
 
Just copy/paste the unicode symbol
 
> "There's almost certainly a new-generation tracking technology that does not use yellow dots," warns Schoen. As if we needed more reasons to be paranoid.
 
I started counterfeiting pennies. The government thanked me.
 
There's gotta be an emoji keyboard userscipt somewhere
 
//my controller:
                res.redirect(302,redirectTo);

// in my test:

            request(sails.hooks.http.app)
                .post('/login')
                .send({name: 'bla', password: 'thisIsReallyMYpw'})
                .expect(302)
                .expect('location', '/', done);
 
4:41 PM
@twiz 😞
 
 1 failing

 1) UserController #login() should redirect to / indexpage:
 
Error: expected 302 "Found", got 200 "OK"
why is there a "200" when I send there a 302 ?
 
chinese keyboard
 
4:43 PM
emoji pedals?
 
@PomeGranate any chance the test follows the redirect?
The page you redirect to returns 200
 
@PomeGranate lol
 
var request = require('supertest');

describe('UserController', function () {

    describe('#login()', function () {
        it('should redirect to / indexpage', function (done) {
            request(sails.hooks.http.app)
                .post('/login')
                .send({name: 'bla', password: 'ItoldyouthisisMypw'})
                .expect(302)
                .expect('location', '/', done);
        });
    });

});
thats the whole test
in chrome, when I observe the network, I see actually a 302
 
It surely isn't 200 at the same time the URL is /
 
aha you mean at first its "/login" (200) and then it redirects to "/" (302) ?
Request URL:http://localhost:1337/login
Request Method:POST
Status Code:302 Found
Remote Address:[::1]:1337

in chrome
 
4:52 PM
... no.
 
hä? what?
haha what do you mean with ...no.?
no: thats impossible?
no: nononono don't lie?
when I change 302 to 200 in my Test, I got another error:

Error: expected "location" header field
 
Hi all, I am trying to attach a listener to my buttons (in the initializeEvents() method), but its not working. Any clue as to why its not working ? jsfiddle.net/vv442vm9/1
 
5:07 PM
@FlyingGambit use addEventListener
 
I read somewhere addEventListener gets cancelled if i try to attach another function to the same event
 
@FlyingGambit this depends on how you call the function it's in
 
@FlyingGambit you can attach only one event listener (DOM events)
 
@FilipDupanović wat
You totally can attach more than one
It's just that onXxx overwrite each other
 
Tried eventListen but that also not triggering on click event jsfiddle.net/vv442vm9/2
 
5:13 PM
@JanDvorak oh you can? I know the old style of attaching handlers would override the previous one for the event of the same type
 
That's why you don't use the old style
 
How to run a JavaScript file in node so that this === global ?
 
@EricLippert It's an interesting idea to classify a transistor as creative wiring... ;-) — Jan Dvorak 15 secs ago
@noob Why would you want to do that?
 
The problems seems really weird or i am missing something big, this is not the 1st time i tried to attach an event but its not working at all
 
@JanDvorak Because when I compile stuff using the closure compiler with the closure library for node (yes some people do that) then goog.global = this and I'm too lazy to fork the closure library and keep it up to date with upstream
 
5:19 PM
@FlyingGambit is that still the old fiddle with button.onclick = function() {}?
 
yes I have updated after the suggestions , here is the new one jsfiddle.net/vv442vm9/3
 
...
> Yes, it's true that sometimes I listen to loud repetitive music with no real lyrics or melody. Today, I've been listening to "Hailstorm on my Umbrella" by Mother Nature.
 
@FlyingGambit heh, that's a big fiddle, but it looks good (attaching the event handlers)
 
16 mins ago, by Jan Dvorak
@FlyingGambit this depends on how you call the function it's in
 
@JanDvorak Na it's fine I forked it -.- Thanks anyway
 
5:25 PM
...
 
@JanDvorak The function is just called like initializeEvents.call(this); , I dont understand why it would be different if it had been called any other way
 
Any ideas what to do when you see a bird with its head upside-down in your back garden. Think it fell off one of our trees
 
@FlyingGambit oh you're destroying the DOM elements on grid.filter()
 
@FilipDupanović Yes I plan to work on it later, as of now I have no idea how to handle it
 
you've correctly attached the event listeners, but the header gets re-created and you don't attach the listeners to the new elements
 
5:28 PM
BBL, family reading of What If.
 
@FilipDupanović Thanks its working now :)
 
Guys any ideas what an undefined ready state in ws means?
 
I am actually working on a JS plugin (my 1st plugin) where json data can be viewed in a tabular form, where the user will have the ability to filter the table. I am not sure how to handle DOM elements after filter. Should I just delete the whole dom elements and re-create like i am doing now or show i use some means to reuse the element like hide show table rows ?
 
@RowanHarley hmm, sounds like you're not reading the property from the socket; you're looking at some other object
 
Well I'm using ws.readystate. Is this the right thing to do
 
5:39 PM
@FlyingGambit, it might be better to just hide and show them only if needed, certainly performance and serverload-wise
 
@RowanHarley you're supposed to get a number :/
 
Give me a minute, I'll see what number I get. I'm pretty sure I'll be left with undefined again though
I'm not getting any numbers, I've gone from 0 to 4 but still had no luck
 
@FlyingGambit this is a tricky topic; usually, you would use a view library to manage how application state is represented in the DOM
 
I think I might be getting undefined because I'm using ws.Server
 
yup, you're probably not handling a socket
 
5:52 PM
Thanks anyways!
 
I have been looking at ExtJs Grid (only framework i have worked with) .It seems it is also recreating the DOM elements after each filter as the <tr> elements disappear. dev.sencha.com/deploy/ext-4.0.0/examples/grid-filtering/…
@FilipDupanović I cannot use any other library other than JQuery, I want to keep it as close to pure JS as possible (even though i am using JQuery >_> )
 
oi
 
hi filip
 
Guys what does 2 mean in ws.readystate
 
6:01 PM
 
Lazy butt
 
probably should've searched it before coming here
 
6:02 PM
:)
 
I learn every time I search something :P
 
@taco I thought my weekend was bad
 
wut
I work weekends, so. :(
Luckily, it's usually slow, just not today
 
networking, ugh :/!
 
ndugger was having issues with making his PC the highest priority device on his LAN & he won't/can't buy a router
Came to work and found out about this shooting. So sad. I don't understand the mentality
 
6:17 PM
Guys, any ideas why my websocket server is always in a closing state? Whenever I try to send an array I get: [TypeError: Invalid non-string/buffer chunk] and I get the error not opened. I edited the error message and found that the websocket was closing
 
6:27 PM
Nope, no idea
But I can still read your code and tell you what's wrong with it
 
Ok, give me a sec, Ill put it up on pastebin
 
6:58 PM
any ideas whats wrong?
 
oh, you could have shared only the relevant fragments and not the whole file :/
 

« first day (2066 days earlier)      last day (2884 days later) »