« first day (926 days earlier)      last day (4248 days later) » 

14:02
@tereško I like that they keep doing it. Gives me a good chuckle every time.
morning
@NullPointer Good Morning
@Baba hey how are you ?
@NullPointer am fine and you ?
@Baba awesome now
14:06
@NullPointer cool .. good to know
@NullPointer what are you working on now
@Baba nothing .... just free from exam today ....
ossm @NullPointer you got high grades?
@kaᵠ he hacked his grades
14:07
Hello
lol
@kaᵠ always high all the time
Can anyone tell me how can I track current location using PHP
?
@kaᵠ there is not grading system but i have 76%(10days study /year ) yet
@kaᵠ he once had 150% and that almost got him expelled
14:08
Current location's coordinates
is that ok with you @NullPointer (btw: what was the topic/subject/matter?)
@Baba but then they did the math and saw 150% is perfectly legit :P
Ok Let me check
@Gordon Thanks
@Gordon Seems that is doesn't change
14:10
@NullPointer Since you stopped being a pony I'm suffering from pony withdrawal symptoms..
@kaᵠ hehehehe
@Duikboot var_dump() the result of the unlink
@Gordon It works fine in computer
But when I run it in mobile
@kaᵠ percentage ?
14:12
Its showing wrong location
@dragon112 lol :P
It seems it won't access the if statement ( if ($object->isFile() && ($object->getCTime() < $now)) )
@Gordon any tips or do you know of any tutorial for me to use in learning how to properly document my codes.
user895378
You'd be better served to write expressive, readable code than to spend time learning how to write comments.
3
0
A: php crypt for password hashing. Blowfish produces weird output

ircmaxellThe reason that you're seeing problems is that it doesn't actually use 22 characters of salt. It only uses 21.666 characters. SO a few bits of the 22nd character are used for salt, and a few are used for hash (the result). The reason is that the salt isn't a string. It's a 128 bit number. The nu...

14:15
@iroegbu buy Clean Code by Robert C. Martin
@ircmaxell Nice one .... +
apart from that, check phpdocumentor. That's the common way of documenting code in the PHP world
does anyone know of a method to convert pdf to html using PHP?
@Gordon ok... Thanks a million
@KevinMurphy google.de/search?q=convert+pdf+to+html+using+php looks like it has useful results
14:17
I've gotta benchmark when I have a chance, but I'm guessing that using libxml's XPath is faster at filtering than using PHP against node arrays, eh?
@NullPointer That's a serious problem.. I mean having the attention span of .... hey a bird
I think I know whats wrong Gordon
I recieve the follwoing time/day from the files: 1367245149
I only, don't know what format that is :p
And that's the reason no date/time = the same or can be compared with that number.
@Baba :-D
@NullPointer thanks that's one of the first posts i looked at. I only have access to shared hosting which proves to be an issue. I started looking at the google drive API to see where that would get me
14:21
@KevinMurphy yw
there's a library of php2text but it's quite ugly and i need to keep the pictures too
@ircmaxell well explained ...
Anyone knows what date/time type this is? 1367245149
@ircmaxell what if the salt is not up to 22 characters ?
@Baba depends on the boundary
14:23
@Duikboot obviously a unix timestamp which you can easily find out by looking at php.net/manual/en/splfileinfo.getctime.php
@ircmaxell oh ok
@Duikboot note that in my answer I am using $yesterday = strtotime('-1 day', time()); which will also return a timestamp while your date() returns a formatted string
@NullPointer what do you think about this? pdfonline.com/convert-pdf-to-html
somehow submitting that form using PHP maybe? :o
@KevinMurphy havent used so no idea :(
14:33
i guess i'll just have to manually do it :/
0
A: Twitter API to get recent tweets of a particular user

JimboAs of May 7th, 2013, Twitter's v1.0 is being deprecated and v1.1 is the new method of accessing the API, using authenticated requests via OAuth. This means you won't be able to use PHP's file_get_contents() to grab this sort of thing - you need to write a script that utilises OAuth and Twitter...

i have 400 PDFs that need to be converted and then entered into a database so i figured i could do it all with PHP at the same time
arggh stupid time issue
@Jimbo thanks for this :D
@KevinMurphy No worries! :)
14:36
@Jimbo i had a cool little page that put users recent tweets on a map and calculated the area between them - forgot where i put it. pretty useless now that i think about it xD
@KevinMurphy Not useless, good for your portfolio and experience right?
@Jimbo always true :)
is there any snipping tool like windows 7 have for ubuntu ?
Can't get it working meh
I can only get the getCtime times
14:41
@Gordon thankyou
stupid people ..... dont know there is copyright
What does it mean when people say 'Run the installer: php installer.php'
@iroegbu You type in command line: php installer.php
I use windows (WAMP)
@iroegbu Then, you type in command line: php installer.php
@Jimbo do you use location enabled tweets?
14:47
@KevinMurphy Myself, personally? Sure, sometimes, why? I don't put big thought into it, ,just let the client do what it wants
@gordon can't I just use only the dat function and not the getCTime?
@Jimbo it's not recognized
do you mean powershell?
@iroegbu Nope, just plain cmd. That'll just be your environmental variables that need php in them
@Jimbo ok, I get it now
@Duikboot files do not expose formatted dates. they only expose timestamps. you need to understand how timestamps work. its essential.
14:50
@iroegbu How come you're developing on windows anyway man
@Jimbo hardcore gamer
@Jimbo i need to find someone who uses location enabled tweets and travels around a bit :P when my iphone was jailbroken, i just used locationspoof xD
can't do without windows for now
So I finally tricked the project manager to give me free hours to work on FLOSS stuff
:D
@iroegbu When I'm developing, I'm running ubuntu in a VM - works flawlessly
14:52
@Ocramius yay
Windows - The Ultimate Gaming and Virtualisation Host OS
@KevinMurphy YUNOJAILBREAK? Locationspoof was great for fooling places on foursquare to become the mayor of some place for a free pizza
Ok, so there is no function to convert a datetime in to a getcttime
@Jimbo well my phone's lock button broke so i replaced the phone at apple and... hello 6.1.3 :'(
I thought 6.1.3 had an untethered?
@Jimbo I don't have too much RAM to play with :(
14:53
@Duikboot getctime returns a timestamp, so you need to compare the timestamps. OR you convert the timestamp to a DateTime object and then compare against another DateTime object.
So if i want to compare with $now = date('Y/m/d H:i:s');
I have to convert the $now into ctime
@Duikboot into a timestamp.
197
Freelancing

Proposed Q&A site for self-employed and freelance workers.

Currently in commitment.

if anyone like this idea please commit .... only 3 commit left to move this to next phase
@Jimbo not that i've heard of. but if it exists, i'll love you forever
Committed, sounds good! :)
15:03
@Gordon I'll give it a break... My brains wont work today
What's a good name for this method? $bool = $node->atPath($xpath);; it returns a boolean on whether the current XML node is located at (or in) the XPath result set.
isAtPath?
isInXpath()
@Duikboot Better, I like it.
Just give it a logical name for yourself so you can find it back. :-)
@Bracketworks isChild
15:06
Hmm
@Bracketworks isLocatedAtXPath()
I gave an incomplete signature too though; atPath($xpath, XmlNode $context = null)
$context defaults to the root, but can be passed as anything else in the tree.
@Gordon I think that's what I had before; would work.
@Bracketworks it's what you said in plain english
Is this method implemented in other libs with a more idiomatic name?
Help
0
Q: Checking a number's factor

James GardnerI'm not sure if this title is correct but here's basically what I am trying to do. I am trying to check if a number is less than 100 and if it isn't I would like to know what factor of 10 I need to divide it by to get below 100 i.e. for 7923 the factor is 100 to make it 79.23 and for 452,936,489...

>In mathematics, a divisor of an integer , also called a [factor][1] of , is an integer which divides without leaving a remainder.
15:08
@Bracketworks you could also name it existsInQuery
7923 the factor is 100 to make it 79.23
is that not basic division ?
How the hell can you divide 7923 by 100 without reminder ???
@Baba You divided 7923 by 10, just reminding you.
;)
@Bracketworks do you get a reminder ?
Well, yea, 3.
@Bracketworks afaik there is nothing like that in the W3C's DOM API
15:13
@Bracketworks then its not a factor ... check your maths text book again
you could also name isMatchedBy
@Gordon Bingo, I think I'll go with that.
Thankyou sir.
user895378
So ... it looks like the really is on strike today.
user895378
Woe be unto the in its absence.
15:17
@rdlowrey To really sway the tides we should all go
user895378
lol
user895378
Upvote! All of the dupes!
> sir, I have php error
+1 GREAT QUESTION.
2
user895378
ehehheehe
NARQ? Always a real question!
user895378
15:19
Too Localized +2 for localized!
I lolled, people at work looked at me.
Anonymous
Does anyone know the name of that site, which lets you see your templates from different browsers? with images
Anonymous
yep, @Bracketworks
Anonymous
that was fast too
15:25
No prob Bob; I used to use it all the time; I favor just multi-browsers and IETester instead now.
Though I have been informed something better than IETester exists; don't recall it's name though.
I think @Wes mentioned it.
@Jimbo: I left you a new comment so that it can be deleted later on. No need to do finger-pointing online for too long :)
@hakre Sorry, didn't mean to be rude at all - I'll change the message, was just for humour really :) Want to delete all the additional comments on that post?
How to debug PHP: If you don't know where your PHP hangs (infinite loop for example), use gdb, attach to it (after having it started; so attaching when it's already stuck somewhere), write b zend_vm_execute.h:355, then cont ... wait a few milliseconds (until you can type again) and write p executor_globals.opline_ptr->lineno for the line and p compiler_globals.compiled_filename for the filename
Because debugging PHP only with var_dump() is out!
(In NTS mode)
@rdlowrey I hope you saw:
7 hours ago, by hakre
user image
17 hours ago, by cryptic ツ
The Daily @cryptic: BREAKING NEWS goes on strike, demands more votes! Bad questions getting out of control. SO declares state of emergency.
is there a meta post for it?
15:40
@Bracketworks It's called IE
Unless you have to support IE6, but in that case you are fucked either way
@PeeHaa埽 Just running various versions? I thought there was something to better coordinate debugging efforts across multiple versions?
@Bracketworks You can set the rendering engine in IE to IE7, 8, 9 and 10
Open dev tools and see for yourself :)
@PeeHaa埽 Did not know this.
remi is back
Have seen better though of him :)
Also did I already mention that all external idiots should die?
Because they really should
Ow I already did :P
15:50
goooo remi !
that one was fun @PeeHaa埽 the man has some loose screws
dailymotion.com/video/… - this is really funy :D
@Jimbo I know this is humour, but with error messages, be kind. It might not be the users fault :)
Listing extensions with at least 0.1% of the traffic, sorted by the amount of traffic.

reqs	%bytes	extension
300839	43.67%	.js [JavaScript code]
98919	22.17%	.png [PNG graphics]
110136	19.27%	[no extension]
36695	 4.88%	.jpg [JPEG graphics]
818	 3.75%	.pdf [Adobe Portable Document Format]
130463	 3.46%	.css [Cascading Style Sheets]
11240	 2.38%	[directories]
145519	 0.26%	.gif [GIF graphics]
5189	 0.14%	.ico
8948	 0.02%	[not listed: 2 extensions]
do you think I should start caching static assets?
. . . is this some kind of trick question?
I miss the PHP extension in the list so that's appropriate for this room
@LeviMorrison if it was, giving it away just because you ask would ruin the trick
16:01
This just happened: dailymotion.com/video/…
user895378
header('Expires: ' . date('D, d M Y H:i:s T', time() + 300));
@Gordon No, that will influence the stats result :) So you can't metric that precisely any longer
@hakre that aint no harlem shake
i transfered my drupal from not domain to the other and the drupal webform stopped working any hints? :(
@Gordon harlem shake had St. Jean? (I do not follow harlem shake)
16:03
@hakre yes. harlem shake had everything
pastebin.com/AezSsvmT this commenting is good enough for the function?
@ircmaxell there. solve this: nycbigapps.com can make movie instead of short videos then
the comment itself is ok, but i would have an issue with the code
$statement = $this->getDb()->prepare($sql); <- this one sucks
please share
also ':last_modified_on' => self::formatDateTime(new DateTime()), this will most likely fail
16:07
I have
i would instead pass in an instance of Hotel domain object and then have the delete method extract the data that it need for removing it
private static function formatDateTime(DateTime $date) {
        return $date->format(DateTime::ISO8601);
    }
@iroegbu It is probably superfluous in large parts. It's clear the function has a parameter based on the code, the name is $id which is pretty clear about itself, it's name is delete so we expect to delete and then if you return a bool it's clear as well that it is true or false and the meaning self-concludent.
i mean that the "current time" at different parts of application will not be the same
also , yes , ID usually is the unique identifier (also, badly named, i would add)
    /**
     * @return bool
     */
    public function delete($id) {
16:09
@iroegbu if that is in a class Hotel, then you dont need the description. It's obvious then. Could rename it to deleteById though
different hotels... they need to be described
public function delete($hotel) { would be kinda more descriptive and then you call $hotel->getParameter('id');
:9126576 public function save(ToDo $todo) {
        if ($todo->getId() === null) {
            return $this->insert($todo);
        }
        return $this->update($todo);
    }
I should structure delete same way...
also the delete method should not return anything. same for the you save() function there. they are commands
Hmm, maybe better ask about the parts of the code that are not comments then the comments ;)
16:12
since there is INSERT ... ON DUPLICATE UPDATE i would just use that instead
Rule for comments is rel. easy: "As little as necessary." (hard to achieve though)
It is time to cook dinner, so I'll be as well.
@Gordon I was thinking I should know if delete/save was successful
@tereško almost all functions in model should take object as function?
@Gordon ummm
16:14
@iroegbu throw an exception if there is an error
@Gordon oh! Ok. Thanks
@ircmaxell you are a new yorker, so you can participate in that challenge and make nyc a better place. then you win money. instead of yt videos, you do a movie. simple as that.
Why is someone pushing again and again this idea of continued try blocks on the internals when it was already explained that there exists a goto-keyword....
wait, do a movie?
user895378
IMHO, if someone needs that functionality it indicates poor design in the first place. A function should only be doing one thing. Error handling counts as one thing.
16:21
Hi all.
@ircmaxell Programming with Anthony - The Movie
@bwoebi what does goto have to do with it?
though I absolutely agree that that feature is a bad idea
@NikiC You can label around a goto around as a work-around :=)
@ircmaxell or you just buy a car from the prize money, but meh :)
@NikiC read the mail of "Ralph Schindler": 3v4l.org/HsdlD
16:25
if they all throw distinct exceptions, then it works, yes
@NikiC Maybe a bad idea, but as it already is possible, even worse...
you'd need a separate catch for every one of them though, which would be just as much code as the original non-goto version
which they don't want
@NikiC You can also catch them all at once if needed: catch (Exception $e) { eval("goto $last_label;"); }
(Or is goto not allowed in eval?)
@bwoebi so now we're using exceptions, goto AND eval?
And also, goto doesn't work accross eval-boundaries
@Gordon eih, car... I have one
even though it was hit the other day
16:29
@NikiC can you pull in $last_label via global keyword please
@Gordon I'll put one on top: global $$last_label; :)
@ircmaxell then a movie it is.
@NikiC Is eval handled as included code? ... I thought it injects into the op_array...
no, it doesn't inject
@NikiC thanks. and they say globalization is a bad thing. weird people
16:32
Hello everyone!
my neck is still bothering me
After goto, there need to be the "on error resume next" we know from basic variant for PHP: resume :)
@ircmaxell Do you have your monitor and chair adjusted appropriately?
Hakre's law of computer science: "The chair you sit on and the computer you work on are reasonable priced if they have the same price."
No, it was from getting rear ended on thursday
16:36
@ircmaxell I'm assuming you saw a doctor?
user895378
New Study: Room 11 regulars suffer high incidence of neck pain. Research suggests the culprit may be the crushing weight of genius.
Nah
it's getting better
@hakre My chair is far too cheap...
You cannot be right.
and I know enough to know that it's just soreness, no deeper problem
There is nothing better than a good feeling for your own body.
user895378
16:39
If the functionality you need is already encompassed by goto then it most certainly should not be implemented in PHP core. What are these people thinking.
@rdlowrey foreach can be done via goto...
@ircmaxell coenesthesia
user895378
But there was no goto in PHP when foreach was implemented :)
@rdlowrey doesn't mean we shouldn't implement goto today if it didn't exist
user895378
I just think it's symptomatic of a poor design. There's no need for that.
16:40
@rdlowrey That is why I wrote the GotoIterator which allows you to iterate over multiple gotos.
8
@hakre while you are fit .. else its damn bad :(
@rdlowrey I disagree. Goto is problematic because it's hard-coded (not dynamic)
but this particular instruction is horrible for other reasons
user895378
I'm not anti-goto. goto can have significant value in PHP from a performance standpoint. And I'm not arguing against goto.
@NullPointer I mean the feeling (sense) you have for your own body. Like when you visit the doctor and he tells you some crap stuff and you know better because you feel it.
user895378
I'm arguing against this pointless bastardization of try/continue/resume/whatever.
16:41
yay!!! NEXT EPISODE AIRING TONIGHT 8PM ON CBS: The Bro Mitzvah, Episode 22
user895378
It's just a crutch for bad design.
@rdlowrey good point. I can tell you that in basic there was "on error resume next" and such things. And it's not really helping you in getting better with programming.
@rdlowrey but goto as implemented in PHP is different, because it's PUREly static (like in C, not like a lot of other languages)
I'd say the general solution is to throw fewer exceptions.
user895378
@LeviMorrison You may have a point there.
16:43
I'd say the general solution is to catch the exception higher up and resume more appropriately
/me just had a nightmare...
amnesia + oculus
user895378
I think we can all agree that adding a new keyword to support jumping around inside your error handling code is a poor idea, though, right?
@ircmaxell Me too now a days ;-( My neck hurts.
was it you that hit me?
@rdlowrey yes
@ircmaxell You really enjoyed it, huh? :D
16:45
Some one has hit you?
an exception happens because something exceptional happened and you can't trust the stack state. So "resuming" doesn't make sense because it implies that the stack is unstable...
Was that pain just because some has hit you?
@Appu yeah, car accident
user895378
> I agree. If your code can handle the problem, it should not throw. If it throws, the control should not go back there, since the code already gave up and declared it can not continue doing whatever it was doing. Exceptions are meant to handle exceptional situations, not serve as a kind of goto with objects, IMO, and if the code threw an exception, it should be done. news.php.net/php.internals/67197
Oh! that's sad. No way lol.. I wasn't the one who hit you.
16:46
@rdlowrey yup
@Appu I know you weren't. I was just poking fun
@ircmaxell That may have been me.
@MadaraUchiha ummm?
Nothing :P
@ircmaxell Yeah. I know :P But you got a clue about who has hit you.
Woah, I agree with something that Stas said... That's gotta be like only the first or second time it's happened
2
@Appu Yes, but I don't know @MadaraUchiha's real name
16:49
@ircmaxell I know.
user895378
This might be a silly question to ask since 5.5 is still in beta, but is anyone working on "major" new features for 5.6 and beyond? Is there any sort of roadmap (I'm afraid I already know the answer to this)?
@ircmaxell Isn't that real name? o_O
Because I like that name as it sounds typical.
@rdlowrey I'm planning on pushing my few major features forward
@rdlowrey Well there were a lot of last minute proposals that didn't make it into 5.5.
@Appu It may, it may not. I don't know
@LeviMorrison and a lot that did. CAUGH OPTIMIZER CAUGH
Sir, allow me to thank you and I'd really love to shake your hand. Very excellent work. Your work will be appreciated by the whole PHP community. — Adnan 1 min ago
Anonymous
16:52
Can anyone explain the purpose of PDO::ATTIRE_MODE
@ircmaxell I am Madara Uchiha.
Anonymous
Does it work like sessions do?
Anonymous
storing connection resources and passing it from page to page?
where is election's room. I can't find it. Was it completely deleted?
no, it falls away
16:54
@PHPfan There's no such thing AFAIK... Did you mean PDO::ATTR_ERRMODE?
Anonymous
@MadaraUchiha It is ATTR_PERSISTENT
Anonymous
my bad
I don't know that one either :o
Anonymous
Evening people
Anonymous
16:59
maybe it will make sense this way @MadaraUchiha

« first day (926 days earlier)      last day (4248 days later) »