« first day (1071 days earlier)      last day (3883 days later) » 

user895378
7:02 PM
well a valid URI doesn't have to have a scheme: /file/path/is/still/a/uri
 
if you don't count the different between locator and identifier yeah ...
which I guess you can't in an environment that doesn't count the difference between a string and a number most the time ...
 
@PeeHaa Look at the tests for it lxr.php.net/xref/PHP_5_4/ext/standard/tests/url/urls.inc - I have the strongest sense of deja vu....
 
hmmm why didn't I think of that :)
 
I think @Jack has assimilated @PeeHaa chat.stackoverflow.com/transcript/11?m=11785666#11785666
 
hah, lxr isn't escaping ampersands fully, so Firefox is showing me ?lots=1&of=2¶meters=3&too=4&here=5
 
7:07 PM
@Danack ow lol
 
reasons i'm wrong to criticise this answer on a postcard, please; now for that dinner i claimed i was going to make about an hour ago! :|
 
7:24 PM
If I have a link to mp3 like link1.songspk.name/song1.php?songid=8090 How can I show a save as dialog box in browser instead to just playing it ? The link redirects before going to actual link of mp3 file, hence php headers are not working.
 
@user2396962 Where does it redirect to? Can't you set the headers on the redirect page?
 
I don't have have direct links to mp3 files. First link queries a database with songID and redirects to actual mp3 file link.
It redirects to other server where the mp3 file is actually present.
 
Well yeah. Than just don't redirect to the mp3
 
I think I will watch "Drive" (2011) this evening:
 
Meaning ?
 
7:28 PM
 
Either setup a php file to serve the file it on the other machine or download the file and serve it
 
critics (that I actually trust) have given good reviews and you can get it in good quality on torrents
that said ..
what's the current subject ?
 
@PeeHaa Can I open the first link in php code to get back the actual link ??
 
@tereško It's... odd tbh. I didn't find it engaging at all.
 
@user2396962 What does that mean what you just wrote? :P
 
7:31 PM
Ryan Goslings newer film Only God Forgives looks pretty cool though.
 
@PeeHaa I have first link, if I can somehow follow it within my script and get the link of page it redirects to ... then I can simply use headers to let the user save the file. .... Just a random thought .....
 
@user2396962 file_get_contents
But it would be so much easier if you just setup a simple php script on the remote server
Otherwise you are copying files from the remote to the other one just to serve it to the client
 
I don't own the remote server :P
 
is it possible for me to develop web applications that do not use ASP.NET or MVC.NET or basically anything microsoft (e.g. it uses HTML, JS, CSS, Node.js, jQuery, PHP, AJAX) on the Microsoft Visual Express 2012 and/or the Microsoft Webmatrix?
 
Hello everyone, what would be robust method to detect filetypes in php. Should i compare file mime types to array of file types or what?
File could be document, image, music, video etc.
 
7:35 PM
@PeeHaa file_get_contents will get me the mp3 file itself. Isn't there something which I can use to get just the last URL.
 
if you want, i'll just ask it on SO, but i thought it might be too basic for that
 
@user2396962 This sounds dodgy to me
 
@tereško got good ratings, but movie sucked
 
@Raindrop no.
 
@user2396962 What do you mean by "the last URL"???
 
7:39 PM
@PeeHaa The actual URL of mp3 file after redirect.
 
ok so i shouldnt
 
@user2396962 You are the one redirecting so that shouldn't be hard to find out
 
also, the file's "group" is the first part of mime-type
 
@ims
gahh
@imsop still in here?
 
7:51 PM
@JoeWatkins "failing" in which way?
 
Ah the beauty of remember a manga I paused reading back in June has released MANY new parts. :)
 
@Fabien most of manga site provide ability to have "bookmarks" in your profile
 
Greetings from the airport
So, @hakre and @ocramus are we meeting tomorrow in Frankfurt or what?
 
@tereško Yeah but weekly with this one can be frustrating as there's large gaps. Easier to remember all at once then be disappointed every other week.
 
also, If you have not read Kiseijū (Parasyte) add it to your list .. it has finished, so - no waiting
 
7:56 PM
it's Hajime No Ippo BTW
 
3 weeks in Europe. Yay!!!!!!
 
I'll take a look. Mushishi is a good anime btw.
@ircmaxell What are you looking forward to the most?
 
Anonymous
arghh
 
The drive through the Bavarian alps...
 
Anonymous
anime talk again :P
 
7:57 PM
@tereško Its great, but in few cases files are not categorised say in case of pdf and flash both will return application/* but one comes in doc category while another in media.
 
@ircmaxell Yeah there's some fantastic roads along the track. Just rent a nice car to appreciate it :)
 
Rented a BMW 3 or Mercedes. Will see what I get...
 
@Simon_eQ well , try watching "death note" and then come back. Maybe you discover what all this fuss is about
=P
 
or "Monster".
 
How can I change the default editor for git commit messages?
 
8:01 PM
monster might be to serious
 
Anonymous
The last anime-like thing I watched was spirited-away, like 2 months ago. Although I loved it, but generally, anime or emo-like stuff is not my thing.
 
currently, it's configure to be editor from GIT_EDITOR
 
@MadaraUchiha git config --global core.editor "path/to/editor.exe"
 
@Fabien wouldn't GIT_EDITOR override that?
(also, linux)
 
@red6 was AFK getting food
 
8:02 PM
@MadaraUchiha Unsure, I am a noob but I changed my editor that way for squashing commits
 
> The editor used to edit the commit log message will be chosen from the GIT_EDITOR environment variable, the core.editor configuration variable, the VISUAL environment variable, or the EDITOR environment variable (in that order). See git-var(1) for details.
 
@Simon_eQ since episodes are 20 min long, watch the first one ... that should be enough for you to decide if it's some "emo crap"
=P
also, I think I will do some programming
 
Anonymous
huh... its about time
 
@red6 just looking over your edit; you need more tables :P
 
Anonymous
I was wandering if you worked at a video store or not
 
8:04 PM
@Simon_eQ Anime is often misinterpreted with cartoons as some weird oriental fetish. In reality anime finds a nice bridge between what is relatable and unrealistic. Concepts that can not be made in Live Action and are too adult for 'cartoons' find a perfect place in Anime.
 
Anonymous
I will give the crap a try </vomit>
 
Granted you will still find some terrible animes out there but I find plenty of terrible TV series too.
 
@NikiC fails on ZEND_NEW_SPEC_HANDLER
 
@red6 a key part of normalisation is that you shouldn't have repeated columns
 
also zend_do_parse_param has memory errors ...
am I missing something ?
 
8:08 PM
@red6 so (period_001, activity_001) and (period_002, activitiy_002) should be rows in a join/pivot table referencing periods and activities by their key (normally, an arbitrary ID)
 
@JoeWatkins please look at what class_name_reference does. It has a do_fetch_class in it ;)
you're missing that part presumably
 
nope, got fetch_class in this time ...
 
@JoeWatkins sorry, missed that
 
@red6 plus, you shouldn't need to model a set of dates, the DB will have a date type built in
 
@AbhishekGahlot well, for those mime-types you will have to make an array with [ mime => group ] pairs
 
8:13 PM
@JoeWatkins the arguments to it don't seem right
You put the result into $1 put begin_new gets $2 as the class name
 
I put it there because it's unused, is that not okay ?
 
@JoeWatkins but you use the wrong one in the next line
Also the arguments to zend_do_begin_class_declaration seem off
 
begin_new_object takes (new_token, class_name) :s
zend_do_fetch_class(&$1, &$2 TSRMLS_CC);
zend_do_extended_fcall_begin(TSRMLS_C);
zend_do_begin_new_object(&$1, &$2 TSRMLS_CC);
 
@JoeWatkins yes, but $2 is not the (fetched) class name, right? At that point $1 is the fetched class name
 
okay, I need another znode don't I ...
 
8:19 PM
@JoeWatkins if you need temporary nodes, use those of the semantic actions themselve
They each have a node too
 
give me a line to look at that does that ... sorry bit hopeless with parser, the syntax confuses fuck out of me for some reason ...
also, the logic of what I'm trying to do is sound right, I mean the functions I'm executing should do what I want them to do ??
you mean $0 ?
 
@JoeWatkins the functions should do the right thing, if you pass in the right arguments ^^
@JoeWatkins In your case $4 can be used for example ;)
@JoeWatkins Btw, why are you using class_entry_type in new_anon_class? new abstract ... doesn't quite make sense to me
 
@red6 here's a sample schema i just threw together to demonstrate how normalisation would look gist.github.com/IMSoP/6653849
 
@NikiC yeah just T_CLASS will do, it's implicitly abstract I guess too ...
wait, isn't ctor_arguments $4 ?
 
@JoeWatkins no. it's $10.
 
8:31 PM
Hmmm... Free beer is good.
 
@JoeWatkins the code blocks and single strings are also znodes.
@JoeWatkins quick example T_TOKEN '{' { /* some code */ } T_TOKEN { /* the second T_TOKEN is here $4. */ }
 
@IMSoP damn, wow.
 
@red6 lol
 
@JoeWatkins That is what @NikiC meant: '{' has also a znode (in the example above it's $2), so you can use $2 as temporary node.
 
@IMSoP I dont think its far off from what I had just drawn up in my notebook here, but im still looking
 
8:37 PM
@bwoebi got it
 
@IMSoP I see what you did with the extra table though
@IMSoP prevents having to have potentially outrageous numbers of columbs in the "schedule" one that I had and just uses pairs of columns at a time that can be referenced as a group
 
@red6 yeah, that's one of the bits that isn't obvious until you've done it a few times: sometimes just linking two "entities" means creating an extra table
 
So I have blocked my first non-spam person on twitter. And it feels quite therapeutic. Sad, but therapeutic.
@ircmaxell ^-- was it pierre?
 
;-)
And good guess
 
@red6 basically anything that repeats should be multiple rows, meaning you sometimes have to create a table for there to be multiple rows of
 
8:41 PM
Also, this tweet really took off:
I heard rumors that PHP was really developed by the NSA in order to establish bad security practices all over the internet.
400 retweets :)
That's my record, I think
 
/me tries desperately not to say the wrong thing about normalisation in a room full of learned peers
 
You stole that from reddit or HN didn't you...
 
@ircmaxell I stole it from that thread on internals
where somebody was asking for review of our crypto functions
 
Ah yes. I remember reading it before
 
to check whether the nsa has any backdoors in them ^^
 
8:43 PM
They do. I put one in. They gave me a shit load of money and a pretty significant get-out-of-jail-free card...
Oh, you think the rage quit was an emotional response? Nah, it was planned from the beginning... Had to have a think enough cover that nobody would know...
 
Wow, things got silent here... You do realize I was kidding, right...?
 
/me wasn't paying attention
 
ok now just memory errors, but functioning as expected ... pastebin.com/B99C1DEv
 
you said something important ?
 
8:47 PM
@ircmaxell so that "condition is always true" bug in the hashing code was intentional!
good that we caught it ;)
 
No, that one was a cover. The real one is a lot deeper... Well, one of the real ones...
 
OMG I just found out that FILTER_VALIDATE_BOOLEAN also handles on/off
 
@ircmaxell I didn't feel worthy to respond to such dramatic revelations! ;)
 
@IMsoP OK, it took me some time to figure out what the heck you wrote into that SQL query - now I know what Aliases are.... lol
 
@PeeHaa and maybe also yes/no? ^^
 
8:48 PM
@PeeHaa must have been copied from ini parser…
 
Lol. I guess that sarcasm doesn't really come across we'll online in chat rooms...
 
that's what /s is for @ircmaxell
 
is there are NSA backdoors in php hashing/encryption algos, then those are part of the algorithm and not fault of php implementation of said algos
 
And holy hell, iOS has a crap ton of rendering bugs...
 
@ircmaxell safari? yes…
 
8:50 PM
@ircmaxell nah, if it had been true you'd have been arrested by the NSA by now, seeing as they're reading everything on the internet and all...
 
@NikiC Yeah, but I am missing yep in there :P
 
@red6 you might need to skip though some general guidebook in mysql (preferably one that does not have "php" in title) and then read "SQL Antipatterns"
 
@PeeHaa But really, it would have been a lot more php-y if it accepted everything as "true" apart from the strings "false", "no", "off" and "" :)
 
@tereško adding it to a long, long list. Thanks.
@tereško List title: "Stuff to learn"
 
@IMSoP how do you know that didn't already happen? He's gone all silent. Likely a chopper is shooting in his apartment right now ;)
 
8:52 PM
@NikiC :-P
 
@PeeHaa Oh and "0". I always forget the "0"
 
Good thing I am not in my apartment right now :-)
 
@ircmaxell not so good for your neighbours...
 
@ircmaxell ah, right, I forgot ^^
 
Well, not my problem...
You know, my build server did just go offline... Weird...
 
8:54 PM
@PeeHaa our codebase at work has an is_true function; my boss thought it was a joke
 
:D
 
@IMSoP wtf
 
@NikiC postgres drivers return everything as strings; booleans are either 't' or 'f'
 
function is_true($arg) { return !$arg; }
 
@IMSoP oh, that's ugly
 
8:56 PM
(I think PDO may auto-convert them, but the pg_* funcs don't, and that's what we were wrapping until recently)
 
@ircmaxell function is_true($arg) { return [false, true][mt_rand(0, 1)]; }
 
plus, we were converting from MS SQL, which has Bits rather than Booleans, so everything is 0 or 1
 
@NikiC mt_rand is too good for PHP. Use rand.
 
Yeah......
 
trivia: implementing mersenne twister in php is really shitty. no unsigned integer type :/
 
8:58 PM
@bwoebi obligatory XKCD link
http://xkcd.com/221/
 
Which is why I made my arbitrary precision php component in security lib (and crypt lib)
 
@ircmaxell might want to make that variadic and implicitly do a logical and.
 
/me sighs
 
@NikiC would have been my guess too
evening :)
 
Howdo folks
 
9:03 PM
@NikiC don't get me started on how Postgres's array types come out; i'm hoping some day they'll write a binary-mode connection driver which can convert them straight into something actually useful
 
Evening @igorw and @MarkBaker
 
Whereabouts are you now Anthony? Still in the air, or have you made it to Europe?
 
@IMSoP hey it beats mysql no matter the issues with it
 
Well, I board in 15" so going to head out to the gate to see what's up. Talk to you all later! And see some of you shortly!
 
@IMSoP array types are a gimmick. I don't think anyone actually recommends to use them
 
9:04 PM
@Anthony see you in a couple of weeks then
Any chance I can persuade some of you folks to vote to reopen stackoverflow.com/questions/3930975/alternative-for-php-excel
 
@tereško well, they are kind of handy occasionally, just as any de-normalisation is
 
of course
 
I maintain my convenient list of all the libraries for reading/writing Excel files there
 
as input and output to functions, even if you never store them in the schema
 
But it's been closed
 
9:06 PM
also "select x, array_agg(foo order by foo) from bar group by x" can be handy
or would be if you didn't have to run a stateful parser in user-land code to decode the output!
 
@MarkBaker only if you are willing to protect the post, because in general the "software lists" are not considered to be acceptable
 
I'll see if I can make it community wiki
I'm still not sure the question even deserved closing
 
well , it was not closed by us
and with "protect" I actually meant the link that's there, on the right from "flag"
 
seems to pretty much exactly match that off-topic description to me
 
Gotcha teresko - didn't even know there was an option to protect a question
 
24
Q: Why are "shopping list" questions bad?

not Pekka This is intended to be a canonical reference question that we can point people to. Maybe even a FAQ? I'm not sure. If something like this already exists, feel free to point it out - I didn't find a question that deals with the question this clearly. My question was closed for being a "shoppi...

 
Perhaps, but it saves me a lot of typing whenever people want pointers to libraries for reading/writing Excel files in PHP, which is several times a week
 
@IMSoP have you read that post actually ?
 
The argument about outdating doesn't hold, because I make a positive effort to keep the list in my answer up-to-date
 
@MarkBaker AIUI, that's what protecting is for: the answer can still be referenced, but the question can't attract more spammy answers
@tereško you think there's part of it I haven't read well enough?
 
9:15 PM
that's the impression, yes
 
Well I'll happily protect it if it's reopened
 
note that they're considered off-topic, not low quality: it's not that it's a bad thing to have a list, it's just that Stack Overflow's not the place to store such lists
 
Yet that one question with its list of answers saves me a lot of typing every time the question is asked, and it's a pretty regular question
 
hey all
 
maybe that's what tag wikis were supposed to be, although in practice they're more or less invisible
 
9:19 PM
got a quick sql question
`INSERT INTO Followings (follower_id, followed_id)
VALUES ('1', SELECT id FROM Users u
WHERE id NOT IN (SELECT id FROM Users WHERE group_id = '300')
)
`
 
@IMSoP Normally I would agree. And this is borderline. But considering @MarkBaker is willing and does keep it clean, up2date and complete I don´t see any issue with the question being there
 
i'm trying to grab all teh current users and make them follow user with the ID of 1
 
The fact that it's been upvoted 35 times, and is flagged 54 times suggests that it has value
 
@PeeHaa sure, I wouldn't have bothered voting to close it; I'm just on the fence about reopening it
 
those are "favorites" not "flags"
if it had been flagged 54 times, the user would be removed
 
9:20 PM
it throws an error on the select query, but when i run it by itself it works fine
 
@JohnBlythe you don't need both VALUES and SELECT
 
Yeah, apologies for terminology - favourited rather than flagged - but I rest my case - people find that question and answer useful
 
@JohnBlythe just write the SELECT query with the rows you want to insert, and stick the INSERT clause on top
INSERT INTO Followings (follower_id, followed_id)
SELECT 1, id FROM Users u
WHERE id NOT IN (SELECT id FROM Users WHERE group_id = '300')
(I'm assuming follower_id isn't actually a string type, so I've taken the quotes away)
 
mindsplosion
bingo
so when using queries for insert values you don't use the VALUES() gig eh?
 
nope, it's an either-or kind of thing
SQL's about as big on consistency as PHP :P
 
9:24 PM
ha
nice
 
SQL has the advantage of age.... lack of consistency can be put dwn to senile dementia :)
Yet SQL also puts a lot of power at your fingertips for manipulating data
So we put up with all its foibles and quirks
 
oh, it's a bloody marvellous tool
i just wish its designers had concentrated less on making grammatically correct english sentences and more on designing a programming language!
 
thanks for the help, @im
@IMSoP
 
@JohnBlythe np :)
substring('Thomas' from '%#"o_a#"_' for '#')
^ that's what trying to make a programming language look like english does
cos, y'know, those "from" and "for" keywords really help me understand what's going on there...
 
You should see the language for retrieving from OLAP databases
MDX is a bit like SQL on steroids
SELECT
{ [Measures].[Sales Amount],
[Measures].[Tax Amount] } ON COLUMNS,
{ [Date].[Fiscal].[Fiscal Year].&[2002],
[Date].[Fiscal].[Fiscal Year].&[2003] } ON ROWS
FROM [Adventure Works]
WHERE ( [Sales Territory].[Southwest] )
 
9:37 PM
Hi every one
 
Hi Amir
 
wow i didnt knew that INSERT can work this way..without VALUES....but thats pretty logical
 
there are times when I would be ready to "pay" for ability to downvote comments
@tereško That's not enough. You might want to recommend him a SoC, MVC and Data Mappers — Dave Just 3 mins ago
 
I'm trying to install a web-application called "Postfix" using Apache httpd. I tried to unzip Postfix into "htdocs" folder of Apache but when I go to the localhost/postfix/setup.php it shows the code of the page instead of the formatted page. How can I deploy Postfix on Apache? Thanks in advance
 
.. smacking someones head in keyboard would be acceptable alternative too
 
9:43 PM
Apache is definitely configured to parse PHP?
@teresko - smacking someones head against the keyboard should be limited to serial downvoters
 
@MarkBaker seems more like SELECT { [SQL Query] } ON DRUGS FROM [An Alternative Dimension] WHERE ( [Nothing].[Is Quite].[As You'd Expect] )
 
@tereško When i looked at that question i saw mysql_query, i looked at the comments and thought 'Ok.....lets see how long it takes....' about 5 sec and the first "use PDO" comment. incredible.
 
@joschua011 it's not about "use PDO", but about "don't concatenate queries"
 
@IMSoP - the trouble is differentiating dimension names from values
 
@MarkBaker Sorry Mark, I'm totally new with PHP. I just read on the net that I need Apache http in order to deploy PHP application and run them
 
9:45 PM
you also need the php parser
 
@Amir - you need to tell Apache to process PHP files, not simply to display them - what operating system?
 
@MarkBaker I'm using Kubuntu
 
sudo apt-get install php
 
I think they now used something called "aptitude", or something like that
I have not kept up with desktop distros
 
sudo apt-get install libapache2-mod-php5
 
9:48 PM
@tereško aptitude and apt-get are both console apps backing onto the same package manager
 
And don't forget to restart apache
 
the GUI one is called synaptic i think
 
well .. fuk'em, I stick to freebsd for servers
 
does anyone know a good movie, something like "the fourth kind", little bit sci-fi little bit horror ?
 
@MarkBaker Thanks a lot Mark. I'm running that now. Got some error, I think missing libraries. going to fix them and I'll let you know
 
9:51 PM
stackoverflow.com/q/18936619/168868 and his other two questions, they're horrible.
 
nope ... I tend to avoid them because of childhood trauma
 
@Charles question ban in 3, 2, 1
 
@PeeHaa And nothing of value was lost. Developing a compiler, my ass...
 
:)
 
Wonder what his amazing new language is like
 
@IMSoP <3 esolang
 
Do we have a dupe to close this one against? stackoverflow.com/q/18931787/168868
 
there was a programming language that when you do something, it only executes right with a certain possibility, anyone remember that? I wonder if i would notice the difference if suddenly php was like that....
 

« first day (1071 days earlier)      last day (3883 days later) »