« first day (1179 days earlier)      last day (3994 days later) » 

00:00
@ThW We don't get any Irish beer in England that's not stout, and I've never been to Ireland - been to Belfast but apparently the Queen is still clinging on to that, she hasn't cause enough trouble yet.
ThW
ThW
yeah
You can probably find Irish beer if you look for it, but I never have. In this country it basically means "Guiness" which I am not a fan of
ThW
ThW
Same, I don't like Guiness
But I am from Cologne, ask ohter Germans about "Kölsch" (Cologne beer)
My JS sucks, but can anyone figure out why the time is 20 minutes off? gist.github.com/KyraD/fa17ce2199131d27068a (timestamp in attribute is UTC)
It's actually off by two hours but you're taking 1h40 back ? new Date().getTimezoneOffset() + 100
00:07
@Danack I have no idea what I am doing =o(
\o/
Perhaps you switched to metric time?
user895378
See, if you measured your minutes in ponies and shetlands and schooners you wouldn't have this problem.
wtf is that supposed to do? @crypticツ
@DaveRandom convert a formatted date to a localized formatted date. I store the timestamp in a data attr to grab format and replace current one with.
00:12
@ThW That's the fella.
@crypticツ Isn't that just (new Date(document.getElementById('questions-timestamp').getAttribute('data-timestamp‌​') + ((new Date()).getTimezoneOffset() * 60000))).toTimeString() ?
Or did I misunderstand? You want the toTimeString() representation of the timestamp, offset by getTimezoneOffset()?
Then that ^
I want it to be HH:MM:SS TZ
@crypticツ what do you need it for?
00:19
so it grabs the timestamp set by server, then offsets it by local timezone to produce localized time in above format.
then getTimezoneOffset() isn't reliable
nothing is reliable but a timezone name
it's for the backlog, to show when the backlog data has been last refreshed.
ThW
ThW
what's "a timezone name"?
doesn't matter for what - offset is not enough to convert time between timezones
@ThW a random link from google timeanddate.com/library/abbreviations/timezones
ThW
ThW
the full name like Europe/Paris?
00:22
yep
or the abbreviation
@ThW It's the name of a timezone.
(if a particular TZ has it)
ThW
ThW
because the abbreviations are not
are not what?
ThW
ThW
unique
ThW
ThW
reliable
oh, I haven't noticed that ever
(don't use abbreviations in my software anyway)
The TZ database is a standard library of timezone info .
/And screaming insanity when you look deeply into it, but I don't recommend doing that.
ThW
ThW
the main problem is that it can change depending on the date, like if russia says that they don't use a summer time any more.
another good point actually
btw, Russia is going to use summer time again
but doesn't timzeone db support that kind of temporal changes?
00:27
@zerkms what do I need? I thought applying the offset to the UTC time would be able to calculate the local time. I know I am not checking for DST.
ThW
ThW
so the numerical offset is actually the most reliable, but only for the datetime it is part of
@HamZa thanks
@ThW why not store everything in UTC then?
how offset can be useful then?
@crypticツ you want to display stuff in user local time?
@zerkms right now it shows the UTC time, but I want it to be formatted to the visitor's local time
@Danack yes
00:29
and it is stored in ... ?
mysql? postgresql? oracle?
@zerkms just output either on page as data attribute, or fetched via JSON and is stored as a unix timestamp
ThW
ThW
date time is always fun :-)
unix timestamp doesn't hold anything about TZ
it's just a number of seconds since unix epoch
@crypticツ What I've done for that is: i) Store everything in UTC ii) Send a list of timezones to check to the users computer with the JS + current UTC time according to the server to the page iii) Go through the timezones and find the one that would be closest to the time according to the users computer. iv) assume that is the users timezone.
gisting some code.....
"t would be closest to the time according to the users computer" --- the most fatal decision ever
ThW
ThW
00:33
sounds like "famous last words"
it is as accurate as using rand() for the very same task
Thanks for the helpful suggestion zerkms.
you're welcome
function formatTime(timestamp) {
    var date = new Date(timestamp + ((new Date()).getTimezoneOffset() * 60000)),
        hours = date.getHours(),
        mins = date.getMinutes(),
        secs = date.getSeconds(),
        timezone = date.toTimeString().match(/\(([^)]+)\)/)[1];

    hours = hours < 10 ? '0' + hours : hours;
    mins = mins < 10 ? '0' + mins : mins;
    secs = mins < 10 ? '0' + secs : secs;

    return hours + ':' + mins + ':' + secs + ' ' + timezone;
}
@crypticツ ^ ?
(where arg is a unix timestamp in secs)
00:35
@crypticツ Not particularly helpful gist: gist.github.com/Danack/8292673
@DaveRandom if timestamp points to the yesterday date and this night it was a summer time shift - then the formatted date will be incorrect
True, not sure how to resolve that though...
ThW
ThW
I output iso dates with numerical offsets or utc and use github.com/jquery/globalize in js
Oh hang on, all that timezone offset stuff is nonsense, you don't need to care about it, the constructor arg is UTC when it's a number
@ThW timezonedb DOES take into account temporal changes in tz rules
@ThW so using timezone name IS reliable even if one country decides to discard summer time
00:39
@crypticツ just new Date(attrValue * 1000) and then the formatting stuff, you don't need any of the calculations
you just need to have the actual timezonedb and you're fine
> Time is an illusion. Lunchtime doubly so.
ThW
ThW
@zerkms but not if you use the abbreviations
@ThW yep, now I know that abbreviations are not reliable as well :-)
ThW
ThW
@zerkms I build an xslt to convert rss to atom some time ago, about 3 evenings cursing because of the date time stuff :-P
Good Night
00:50
Ok, can someone tell me how to simply remove an object from an array given the object?
git push origin master Nope, that won't work
Timestamp: 01/06/2014 07:50:13 PM
Error: TypeError: date.toTimeString(...).match(...) is null
Source File: http://localhost:8000/assets/js/main.js
Line: 36
@Undo unset + array_search?
@zerkms Ok, lemme look those up
So unset only takes one argument? How does it know which array to remove the object from?
@crypticツ Yeh I wondered if that might be an issue. That works on my machine, runnign Chrome, but I have a feeling that the toTimeString() format is going to be a bit too fluid to sensibly get the timezone string from.
00:53
@Undo why do you think I suggested 2 functions?
What does new Date().getTimeString() show you @crypticツ?
> returns the corresponding key
Still doesn't look like it knows which array to remove it from
"which array to remove it from"
do you have multiple arrays?
No... but the concept of it kind of hurts my brain - are keys unique to arrays?
yes
00:55
Timestamp: 01/06/2014 07:54:51 PM
Error: TypeError: (intermediate value).getTimeString is not a function
Source File: http://localhost:8000/assets/js/main.js
Line: 27
they would be useless otherwise
k, lemme try it.
@crypticツ s/get/to/
@DaveRandom "19:56:32 GMT-0500 (EST)"
> "19:56:32 GMT-0500 (EST)".match(/\(([^)]+)\)/)[1];
< "EST"
:-S
00:58
@DaveRandom not the case
"13:58:09 GMT+1300 (New Zealand Daylight Time)"
Same format though, the regexp should work with both of those
I can always just say to hell with the Timezone =oP
@DaveRandom yep, but it's not a valid tz name
the correct numeric time is all that really matters
@zerkms Well no, that's what I mean, it's never going to be right unless you parse out the GMT offset and fetch it from a predefined map
Which IMO is a pointless exercise here
01:00
you canot get a TZ having offset and "predefined map"
I prefer just to ask a user to specify their TZ explicitly
that way I never have to guess :-)
I would go with hh:mm:ss in your craxy mofo timezone boiiiii
@zerkms Why not?
Oh right yeh, dst
Stupid fucking dst, I hate dst, it pisses me off IRL as well as in programming
I have no idea why we need it to be light at 7am in the winter
not only dst
2 areas can have the same time ritght now
and yes - differ in dst, got what you meant
This is precisely why I just use UTC for everything
"1389056535"
"NaN:NaN:NaN"
Although it helps that I live in UTC for 6 months/year
01:04
why do my amazon elastic transcoder jobs keep failing when I upload files over 100mb?
Your first proposal strips all letters. But thank you for your effort! — kylex 1 min ago
function formatTime(timestamp) {
    var date = new Date(Number(timestamp) * 1000),
        hours = date.getHours(),
        mins = date.getMinutes(),
        secs = date.getSeconds();

    hours = hours < 10 ? '0' + hours : hours;
    mins = mins < 10 ? '0' + mins : mins;
    secs = secs < 10 ? '0' + secs : secs;

    return hours + ':' + mins + ':' + secs;
}

console.log(formatTime("1389056535"));
< 01:50:56
@crypticツ ?
I am full of fail this evening, it might be an idea to stop listening to me :-P
@DaveRandom works!!!
thanks!
@crypticツ Make sure you use the current version with the two stupid mistakes fixed (forgot to * 1000 and one of the ternarys was wrong)
Also @crypticツ fun fact: that code is more or less identical to PHP just minus the dollar signs :-P
Right, I'm going to bed before I fuck anything else up
nite @all
goodnite
01:25
unset(array_search($comment->{'comment_id'}, $commentsToInspect)); //L25
gives me a:
PHP Fatal error:  Can't use function return value in write context in /var/www/charcoal/cronjob.php on line 25
@zerkms ideas?
What terribly stupid thing am I doing this time?
@JoeWatkins @JoeWatkins sure.. to what?
01:48
Good morning!
@Undo unset needs a variable. You're giving it a number (array index)
also "Can't use function return value in write context"
02:19
@crypticツ batman?
I see what you did there =oP
 
1 hour later…
user895378
03:25
@bjori FWIW I don't really have a problem with the hiding of the RFC votes ;)
04:30
@Jeremy why?
04:42
^ that
 
1 hour later…
06:11
@bwoebi nice one - though looks like it was reverted altogether by now
I have two column MobileNumber and ActiveStatus in my user table
For a particluar mobile number , I want the combination of (MobileNumber ,1) to appear only once in table and all other combinations like (MobileNumber,0) should be allowed to appear more than once .
Can we have any such constraint that can make this possible
@Tarun do it in your code
Yeah andho , I was just curious to know if this can be done via mysql
If i can put unique index constraint on some values of a column
@Tarun you can and you shouldn't
0
Q: Dynamic form field with jquery not post values to php

hserusvi had form that is add some fields via jquery when i click " add new " button it will update a dom , with input fields . Input fields are using a array as a name , when i click submit button , values did not post to php, only static form values are posted but not dynamically generated input value...

i m tried many methods but cant done
07:03
@NikiC yup, even better =)
07:45
@bjori zend I think since it's a parser mod, ta :)
morning all
08:27
you need to set permissions with mkdir to something that will allow you to read the created directory
> and folder those created with php am not even able to delete or rename those folder from my computer
^ that can only happen for one reason ...
^ voodoo .. also - bad karma
@deepak did you actually look at permissions with which the file/folder has been created ?
or did you just go "it is not working" and made a SO post ..
.. or did you just come here to advertise your question and are not even in the chat room anymore
08:55
what's with all the question dumping
2 messages moved to Trash can
Morning
morning
@JoeWatkins Why "you think..."?
GOOD MORNING
MINIONS OF PHP
Hey @webarto
09:01
morn
mornin
how should we deal i18n in PHP? Especially in regex / string processing?
what?
ThW
ThW
@fidz.id use utf-8
good morning
09:08
moinz
@Fabien it's kind of hard to say how it really went ... he seemed happy enough, and I think I answered the question "does php support multiple browsers?" correctly ...
(with laughter)
haha good one
does anyone work on google app for codeigniter ?
google app engine rather
@JoeWatkins Thanks. Btw, i need better way than Ctrl+H all the code.
no idea what ctrl+h does, is that a windows thing?
09:13
@JoeWatkins Sounds like you did fine. Perhaps he hadn't looked at your github.
He's a relatively shy guy but easy to get on with.
he had ... he had questions written down, I could hear him skipping most of them, I think he just threw that one out to be sure ...
he learned c a long long time ago
Hey all
yeah he was easy to get on with, so was peter .... I'm definitely most interested in this one ... I'm meeting with someone else on skype this evening to discuss something but I've lost interest really ... I want that ...
moin
09:26
@JoeWatkins what power plant is in your Impreza?
@JoeWatkins Still give tonights your all
Did they mention anything about the longevity of the project?
@webarto 2 litre, massive intercooled turbo
Awesome, dude.
@Fabien yeah, and yeah they did, that is was basically permanent ...
No turbo no fun.
09:30
@webarto and not nearly enough noise :)
I can't wait to get it back on the road ... I miss it ...
My friend says, life is too short to spend it on cars that don't spend much fuel :P
@JoeWatkins Not in driving condition, what's up?
it's terrible on fuel, it does about 17mpg round town ... hammer down on the motorways it'll do about 9mpg ...
one of the abs rings smashed to pieces a few months ago inside the hub, it wrecked that corner basically, it's on the driveway looking sorry for itself ... behind a porsche 924, which looks even sorrier ...
@Ram dumping your question into multiple rooms will not get you any help.
If I somehow sell the cars I have, I'll get CX7 (boost it up to ~400hp) and install LPG, yes, you've read it correctly :)
09:33
it was super hard to take it apart to the point it can be rebuilt, then I had trouble getting hold of the new rubbers, then I found aftermarket ones but you had to buy 6 ... it's gonna cost about £500 to put right ...
@Ram Especially dumping an asp.net question in a PHP room.
yeah LPG is good, there are some kits for scoobies too, the problem is finding a donor engine that it's actually worth doing it too at a reasonable price ... you basically have to rebuild it first and the internals are super expensive ...
@JoeWatkins Hah, damn... I could hook you up probably if you were here :)
@Ram If you can't figure out how to implement PayPal Express Checkout from the extensive docs & examples, I'd suggest hiring a developer.
every time I buy one I say I'm gonna do LPG ... this is my fourth
09:35
LPG is only slow on response, other things can be tuned.
If I ever drive again I probably wont do LPG
No reason not to really... @Suhosin
Sounds complicated, hard to get ahold of, no real benefit
yeah I've read about people making pretty good power with them, the curve is only just behind petrol ... at first they were pretty crap ...
well here the benefit is half the cost of petrol ...
@JoeWatkins That's good to hear. Last I knew it was only 6-months. So it's much better this way.
09:37
@Fabien well he said it's going to take 6 months to a year to finish what the other guys started, then they want it to be rewritten, to deploy that and then the job is ongoing to work on the new system ...
@JoeWatkins My friend runs with even more power on LPG :) It's cleaner than regular gasoline... racing cars use higher octane fuel anyways... and if you have 300hp, you can even waste few dozens :)
@JoeWatkins Petrol prices in Europe are a bad joke
yeah I have to buy 99 octane fuel for it, but actually one of our supermarkets do 99 octane at the same price as everywhere else does 97/95, so I don't grumble :)
they don't like me taking scoobies there ... it's very very loud, and I refuse to turn it off while filling up since it's round the corner and turning it off so quickly is not allowed ...
@JoeWatkins :D
(09:42:22) dejan: great, anything I should prepare for the sprint start?
(09:42:40) bernard: you should have your pants and shirt on - we are gonna have a video chat
At least the guys are funny.
Gotta wear pants... meh... maybe even a shower /cc @Fabien
09:46
@JoeWatkins BTW Other guys == me
Sorry in advance :(
hehe
and hehe @webarto
@webarto Are you cc'ing because you want me to join you or because of what I said the other day?
-_-
I hate when they request you wear underwear ...
2
@Fabien Uhhhhhmmmm, the other thing? :P
@crypticツ this site is draining what's left from my hope for human race
09:48
Hmm, I am not convinced.
@tereško I daresay that the issue is that you held any hope for the human race.
yeah ... you know me .. I am the embodiment of sunny outlook
11
I lost hope for mankind long ago. I'm just happy I may live long enough to watch it burn.
but smile! =o)
or get high
^ that!!!
09:50
@webarto "or" ?
well, it's ... get high and then you smile...
@webarto clearly meant "or" in the quantum sense, where really you get high at the same time as doing the other thing ... that kind of or ... always that kind of or ...
I'm going to have something along those lines for the backlog when the ajax refresh is about to happen.
I have a new pone
09:53
@Suhosin ooooh shiny
what is it ??
Well same pone
Basically a warning that hey you have 3 secs to finish reading or clicking before the data changes. Is this how you guys would want it or some other method to warn? It will countdown and then dissapear when the data update is done.
But different picture of same pone
@JoeWatkins It's my new avatar that doesn't show up here yet. If you thought I meant phone I'm running a 1520 at the moment.
It's also quite new, about 10 days.
did that say phone at first ??
09:56
It read like a typo
well, I feel tricked ... and also, windows in your pocket ?? aren't you worried that gates will get his hands on whatever is in your pocket , or somehow infect your pockets with malware ??
I have the sad choice of whether to let Microsoft, Apple or Google know pretty much everything about me.
Given that I already have an Xbox One, I figure Microsoft already know.
@crypticツ give me three implementations and I will choose one
@andho shit, I don't even do that for my clients. =oP
@andho CodeIgniter, Yii or Drupal.
10:07
@Suhosin you know that popular framework: VanillaPHP
Hi Friends I require Your help in this question stackoverflow.com/questions/20966842/…
plz help me
10:23
@andho Does VanillaPHP go with VanillaJS or is that too many frameworks to use on one project?
I wrote a framework, it's about 200 lines of PHP. <3
@Suhosin it's NoJS architecture so no
user365265
@Suhosin 200 lines would be a frame more than a framework
@andho Basically it's a routing class, a bootstrap and a templating engine
10:38
php programmers are juvenile, because working with java makes you old
@HamZa en.wikipedia.org/wiki/Dutch_national_flag_problem apparently it's some array problem.
@crypticツ yeah, I had to edit one question
10:51
Hi
Is it hard to connect to a MSAccess database with PHP ?
On a linux machine
It is not hard.
Im trying it like that but I retrieve
"could not find driver"
Are there any good ORMs other than Doctrine?
Writing 6 lines of mysqli functions over and over is annoying the shit out of me
@Suhosin What 6 lines?
11:06
7
A: Connecting to mssql using pdo through php and linux

JamesThe PDO mssql driver is no more, use sqlsrv (under php windows) or dblib (under php linux) http://msdn.microsoft.com/en-us/sqlserver/ff657782.aspx http://www.php.net/manual/en/ref.pdo-dblib.php

$select = $this->_dbHandle->prepare('SELECT ...');
$select->bind_param('sss', ...);
$select->execute();
$select->bind_result($result);
$select->fetch();
$select->close();
@Jimbo ^
@Suhosin Why you no using Entity/Repository pattern?
@Jimbo Because I have no idea what it is. :P
Doctrine does a really good job of those two, really simple
@Jimbo Im developing on a Mac with MAMP:
http://www.microsoft.com/en-us/download/details.aspx?id=28160

How do I decide which driver I download
11:09
@Duikboot You're on a Mac but on Microsoft's website for support :P Probably not where I'd start looking
True, but I was reading: Install the SQL Server ODBC Driver for Linux
* follow the instructions here in the post you send me. And then I got redirected to: http://www.microsoft.com/en-us/download/details.aspx?id=28160
@Suhosin Entity = domain objects, simple objects with only class members, a few getters / setters, maybe a teeny bit of validation in those setters / getters if you want. Repository = object that holds your db query methods like getUsersWithUsernameBeginningWith('u') (arbitrary example). You can create a new User object (the Entity), and call $entityManager->persist($newUserObject); $entityManager->flush();
Hey guys, I have this mock of a slider. The content in the middle is essentially a window to a different page. Some standalone html/css/images. The idea is to be able to simple provide a location to the content in the slider and it should work from there. What's a good way to show these 'windows' to the pages, i've always tried to avoid iframes.
The 'other page' is actually some local html
@Suhosin Once you get Doctrine set up, it's really awesome, and if you have good DI in your application and adhere to SOLID - specifically IoC, you can state your controller needs a UserRepository $ur and then you just do $ur->getUsersWithUsernameBeginningWith('s');
Or even abstract out your entity / repository requirements into a service and DI the service into your controller. Anyway, I've rambled enough now. Get into Doctrine :P
That odbc driver isn't easy to install it seems.
user3762851
11:16
hi all
@Duikboot Sorry I can't help man, not used mac for development (although I'd like to in the future)
user3762851
can anyone help me in my difficulty?
@Jimbo wassup bitch, long tym.. :D
@Jimbo Thanks, Doctrine sounds good, was just wondering if there were alternatives worth considering before I pull it in.
11:19
Oh ok. No problem. PDO_ODBC for mamp is not serving me what I want on google :) Thanks jimbo. ;)
Maybe this can help me out: pecl.php.net/package/PDO_ODBC
3
Q: Adding ODBC to MAMP

weotchI've spent the last couple days trying to get ODBC installed and I am about to lose my mind, I'm way out of my element here. Please can some one help me before I fall to pieces. Here's what I'm trying: 1) Download 1.7.2 source code package found here (I'm using 1.7.2): http://www.mamp.info/en/do...

Morning
@Duikboot I have tried several times to get the MSAccess driver to work on *nix, no dice. I recommend you give up now and use a proper RDBMS
There is a 3rd party driver that you have to pay for, I've never tried it, and really there's no reason to. Just write an import routine for another more sensible RDBMS that you can run on a Windows machine and fuggetaboutit
Jet sucks anyway, this is only the beginning of your troubles.
11:35
Dam that;s a hard workearound
It's not a work around really, what you are trying to do is fundamentally wrong
Can I export my MSAccess db a better way to use it for a webfproject?
Jet was designed specifically to run on Windows, anything else is square peg -> round hole
@Duikboot Do you have MySQL on the target machine? (or some other RDBMS)
And if not, can you install one?
Since this is my favorite room and the question I have is relevant to PHP (somewhat) I have a website system design question.

Is it a good idea to have an admin account on a website along with other user accounts? Mainly the Admin account I'd like to have is for quick site configuration and management. Say like, I want to disable user login or account registration or delete a user account.
@chx101 Generally an ACL is a better approach, rather than a single magic account
An access control list (ACL), with respect to a computer file system, is a list of permissions attached to an object. An ACL specifies which users or system processes are granted access to objects, as well as what operations are allowed on given objects. Each entry in a typical ACL specifies a subject and an operation. For instance, if a file has an ACL that contains (Alice, delete), this would give Alice permission to delete the file. ACL-based security models When a subject requests an operation on an object in an ACL-based security model, the operating system first checks the ACL for ...
11:44
@chx101 will admins and users use the same UI ?
Well its a bit weird. The people here at work are using ms access for data
But i have to use an export of it to create a web app
why is it so contradictional?
@tereško Yes
someone who works for linux foundation just forked pthreads ...
Ask them if they're hiring :)
@chx101 And there's even a decent-ish library for ACL stuff - framework.zend.com/manual/2.2/en/modules/…
11:54
@Duikboot It's trivial if you are building your web app to be hosted on Windows (but don't do that). The problem is that The people here at work are using ms access for data - despite popular opinion and how much I have complain vocally about it in here, Access is a good solution, but it's a good solution to a very narrow problem. You have now outgrown it, and you need to look at a different solution.
The simplest way to solve the problem would be to replicate your Access app in .net, with a MSSQL back-end, and then you will have issues integrating your web app
@Duikboot I have spent countless hours porting an old access db to mysql. It is an on going project that just sucks away my energy and motivation every time I have to work on it. The old access db is still live and I have to run an import to the new one occasionally. After much frustration and hair pulling I found that the most reliable format to export from access is xml. YMMV, but I thought I'd let you know as it may save you some time. Good luck :)
@Mr.Alien Where the hell have you been man? How's it going?
A preferable solution would be not to use MSSQL but I'm not going to pretend that will be an easy answer, since it's likely that your current Access users are irrevocably committed to using Windows as their desktop OS
@Fabien they forked it two hours ago, don't think they intend to make changes ... pretty cool though, I'm always seeing people who work for interesting places fork it ... they never do anything though ...
@vascowhite I wrote most of a VBA module to perform a MySQL export from Access (full DDL + DML export) if you're interested, I don't plan on finishing it any time soon but I'll give you teh codez if you like
If all you need is the data then that's fine, if you have custom functions then you are probably kinda screwed

« first day (1179 days earlier)      last day (3994 days later) »