« first day (2351 days earlier)      last day (2597 days later) » 

Wes
12:05 AM
i've just realized i'm a social justice internet troll. it's great. i raise awareness about important topics, and i also have a lot of fun #badperson
 
 
2 hours later…
2:06 AM
Mornings o/
 
Can't "upgrade" from mysql_* functions due to memory allocation problems – #74304
 
HAPPY FRIDAY
\o/
 
2:27 AM
woot
 
 
1 hour later…
3:30 AM
What is the difference between these two ?
href="./path/to/file.php"
href="path/to/file.php"
 
Wes
no difference
 
so i can use either whenever i want? Is there any specific case when i have to use the ./ notation for file paths in my website?
 
I'm about to start a new project that will be deployed on a Raspberry Pi. I'll be serving up a web-based intranet app. I can't choose between server-side technology: Node, Php, or Java. Is there a deal-breaker or deal-maker you can mention to help the choice?
 
3:46 AM
hi, anyone here has enough knowledge about jquery? :))
 
It's the PHP room....
There's a javascript room.
 
yes i know sorry, seems that in jquery/javascript room people there are not much active hehe
 
$('#bummer')
 
that's why im asking here if anyone knows about jquery even though this is php room mehehe. it would be a big help for me :D
 
@phoenix go ahead?
 
3:51 AM
@JapanGuy thanks much!
well my question is
 
... the suspense is killing me, lol
 
@ChrisBaker hahahaha, seems like his problem is an infinite loop
 
while (true) { }
 
In my jquery function, after loading my generated file i need to return a link that is clickable to download my file, i cannot display the link button. mehehe
 
You are generating the file on the server-side?
 
3:54 AM
@ChrisBaker you know the struggle on how to explain your problem in a sentence hahaha
 
$('#target-element-to-show-the-link-inside').append('<a href="'+pathToTheFileOnYourServer+'">Click here to download the file</a>');
 
yes, I have another php file that downloads the file then throwing it back to the client side
 
Write it to a public-accessible folder, then return the name of the file instead.
 
by the way i am using code igniter framework
 
/temp/my-file-name-better-use-a-random-string-or-a-time-stamp.ext
The you build a link to that path and append it to the dom
 
3:57 AM
and i would add download="my-file-name-better-use-a-random-string-or-a-time-stamp.ext" to Chris' code
 
is there's something wrong here in my function?
function dvObrDownload(){
$mystring = "Sample";
return "<div id=\"loading\"><a href=\"genfiles/"+$mystring+"\" target=\"'_blank' class=\"btn btn-warning btn-sm\">Download "+$mystring+"</a></div><br/><br/>";

}
 
Probably a good idea, when doing that, to make sure the file extension isn't something wacky like .sh or .php, and make sure to put a permission on it so it isn't executable.
If you wrapped it in a single quote you wouldn't have to escape all those double quotes
Looks like you're missing a double quote on the target= attribute, there's some quote weirdness going on there.
 
The value of the class attribute should be in quotes
 
^ it is
 
how do i do that?
 
4:02 AM
The quotes are only wrong here: target=\"'_blank'
 
i'll remove the single quote?
 
return '<div id="loading"><a href="genfiles/'+$mystring+'" target="_blank" class="btn btn-warning btn-sm">Download '+$mystring+'</a></div><br/><br/>';
 
owww, ok i'll try that :))
 
See how the whole string is wrapped in single-quotes? When I do that, I don't have to escape double-quotes
\"
Yuck
It makes it all harder to read
That said, if you're doing this in an ajax call, you could just return the bare path to the file, then use jQuery to inject the link (the code I posted above).
 
It's almost impossible to read when there's 4 levels of quotes.
 
4:06 AM
ive tried removing, nut still the button doesn't show up
*but
 
That's why I prefer to leave DOM manipulation and generation up to javascript. You deal with quotes a lot less.
 
are you refering to this code you pasted? $('#target-element-to-show-the-link-inside').append('<a href="'+pathToTheFileOnYourServer+'">Click here to download the file</a>');
 
pheonix, you'd have to post a lot more details for this to not be other people chasing your bugs around. Who knows how you're injecting it, how you're getting it, etc. Should post a question explaining everything.
Like a question on the main site.
 
@phoenix how are you calling your jquery function?
 
where the fuck am I
 
4:09 AM
im sorry im just worried if i am allowed to paste codes here hehe.
 
@PaulCrovella You mean like figuratively or physically?
 
@PaulCrovella You are at 127.0.0.1
 
here's how I call it
function getDvObr() {
data = $('#selection_form').serializeArray();
$.ajax({
type: "GET",
url: "<?php echo base_url('dvobr_cont/generateDvObr') ?>",
data: data,
dataType: "json",
beforeSend: function() { $('#loading').show();},
complete: function() { $('#loading').hide(); dvObrDownload();}
//success: function(response)
//{

//}


});

//dvObrDownload();
}
 
You're just calling a function that generates the HTML. You have to actually insert it into the dom somewhere.
Assuming #loading exists on the page
$('<a href="genfiles/'+$mystring+'" target="_blank" class="btn btn-warning btn-sm">Download '+$mystring+'</a>').insertAfter($('#loading')); or something like that
Anyway
I'm outta here. Going to try asking about Java vs Node vs Php in the morning when some of the opinionated and cranky know-lotsa-stuff folks are on.
 
Wouldn't $('#loading').hide() hide the button?
 
4:14 AM
Yeah, so inserting the link after would be the best strategy, unless there's another container that would be more suitable.
It's pointless to speculate.
 
@ChrisBaker thanks for the help :) gonna try what you are trying to say :))
@JennaSloan the one it is hiding is the loading image
 
5:06 AM
posted on March 24, 2017

New Cyanide and Happiness Comic

 
6:04 AM
morning
 
morning o/
 
\o'
 
morning itches
 
:-P
 
> Spotify hasn’t launched in your country yet
 
@Linus Awwe
 
get a better country
 
LOL
Can you actually do that now? I'd like a new country please!
return new Country;
 
:P
 
6:52 AM
Instead can make it better! :p
 
7:04 AM
Did I mention yet that [XMW]AMP must die? They are the plague. People should just use VMs.
 
@Gordon people are addicted to them they can't die..
 
moreover people should learn how to install and configure those things individually rather than relying on some all-in-wonder package to do it for them
 
o/ morning Joe
 
'nin
 
7:22 AM
o//
 
see ^ that's what happens when you read too much anime. you grow another right arm.
 
hahaah
 
twitches
 
… and you start to twitch uncontrollably
 
morning
 
7:28 AM
o/ mornin tereško
 
7:47 AM
!!friday
 
8:16 AM
\o/
 
bob
@Jeeves \o/ shit song Jeeves :')
 
@bob What do you think about monetary crisis?
 
bob
@Jeeves which one? mine? the worlds?
 
@bob What is your point of view about the clima changes?
 
bob
@Jeeves very hot topic!
 
8:20 AM
hey @Patrick
long time no see
 
@bob Do you like to listen to music?
 
mornin
 
13
Q: mysql PDO how to bind LIKE

dmontainIn this query select wrd from tablename WHERE wrd LIKE '$partial%' I'm trying to bind the variable '$partial%' with PDO. Not sure how this works with the % at the end. Would it be select wrd from tablename WHERE wrd LIKE ':partial%' where :partial is bound to $partial="somet" or would...

then again, you shouldn't be using LIKE to begin with
a better option would be FULLTEXT index, but using SQL for search is a bad idea as a whole
you should be using sphinxsearch.com or something like that, which "sits" on to of your RDBMS
 
Anonymous
8:42 AM
!!wotd
 
esoterica: things understood by or meant for a select few; recondite matters or items.
 
moin
 
Anonymous
moin
 
o/
 
php-fpm child exited with code 0 – #74306
 
ThW
8:48 AM
Morning
 
People really need to learn how to write useful titles for bugs
 
> Have you tried reporting the bug upstream at the cat vendor?
 
o/.0.2
ha
 
Mar 18 at 10:19, by Saitama
@JoeWatkins https://gist.github.com/SaitamaSama/ca7d66ba7057bb8b9bab78137d79702e . idk why but, I get a Error (9): Bad file descriptor when calling Socket::write in another thread...
 
9:02 AM
I did see that, will have a look over the weekend, if I don't say anything by sunday, remind me ...
s/will/will try to/
 
oh alright! ^^ no worries
 
2
Q: Audio Upload to folder using PHP Jquery

Kavya ShreeHiii Everyone,, Below is my HTML. <form id="audio_form" enctype="multipart/form-data" action="" method="post"> <audio controls id="audio0" name="audio0" src="blob:localhost/3e61e886-fc12-4ab7-ab5d-745604d96564"></audio> </form> Jquery $.ajax({ url: "../../php/speaking_answers/up_...

Did anyone knws soluton please right me help?
 
Bad file descriptor sounds like it's closed before you write but... dunno
 
Bad file descriptor says the the underlying fd is not valid, probably that it does not point to an FD that exists in the current process scope
although I suspect there are socket creation options that could affect that
@Saitama have you tried setting SO_REUSEPORT?
 
@DaveRandom no... I haven't... will try in a while...
I'm not around my pc atm :P
 
9:10 AM
no worries
It's a long time since I messed about with passing descriptors like that between threads...
 
not sure why you are calling listen() in loop
don't need to do that ...
that's a strange looking bug
subsequent calls to accept() are returning the same fd
 
Morning 11
 
@JoeWatkins the same fd or a different fd with the same number because the previous one has been release?
 
9:25 AM
afaict the same fd with the same number
 
Why does that gist have a comment with entire lyrics of bohemian rhapsody @Saitama? :-P
 
ThW
@KavyaShree I am not sure that you can just add a file field as dynamic form data using AJAX. I would suggest reading a little more about HTML5 file uploads. The error message means that you did not get the request data in PHP, at least not as file upload.
 
also yes that listen and then a single accept call in a loop can't be right
 
bob
@tereško had a look at that but not to sure how to implement. here's my new code. trying to concatinate on to the query. pastebin.com/RMeAu5ZP
 
Ya I knw thts wrong way.But I dnt knw the way to get.Actually I have <audio src="some blob">
I want to convert tht blob to mp3 file I need to upload in folder
How can I achieve tht
 
9:30 AM
@bob start by indenting your code, that will help you see what the problem is
the (or at least, a) problem is related to your elseif logic and how you are constructing the query string
 
@ThW
 
@KavyaShree get a new keyboard. your o and a key seems broken
 
Hey @Gordon
:)
Help to solve the issue Yaar
 
@KavyaShree Yaar Yaar!!!
 
@KavyaShree don't use that ..
 
bob
9:39 AM
@DaveRandom pastebin.com/tBqFxmR3 indented
 
Okie
Anyone suggest me solutn?
 
@bob think about what that elseif logic actually does, with respect to what your query string will look like in each case
 
Anonymous
People don't waste your money on getting Zend Certification Exam
 
notably, think about whether you really want the else
 
@samayo Go on...
 
Anonymous
9:42 AM
@Jimbo What do you mean?
 
bob
@DaveRandom I remove the else and now just have if not empty statements and i get the error Query was empty on line 48
 
Anonymous
:p
 
@samayo Why not?
 
@samayo did you just learn this the hard way?
 
Anonymous
Because I took it, and I passed!
 
9:43 AM
why would accept return 0 @DaveRandom ?
 
@samayo congratulations
 
Anonymous
@Gordon Thanks :)
 
@bob why might that be? What is required in order to create the query?
@JoeWatkins as in accept(2)?
I have no idea :-S
 
Anonymous
I thank @Gordon and @DaveRandom for this.
 
0 is a valid fd, it's stdin
 
9:45 AM
@samayo gratz :)
 
bob
@DaveRandom the $statement string?
 
yeah, but why is accept returning it :s
yeah as in accept(2)
 
@bob what happens if $search_input is empty?
 
bob
@DaveRandom oooooh i need to add else to include all of the other statements?
 
@samayo Lol. Congrats :)
 
9:47 AM
@bob You need to make the defining of the SELECT ... part of the query unconditional, the only things that should conditional is the WHERE clause elements.
Also as a tip: you may find an array and implode() useful ...
@JoeWatkins I got nothing. Is it only happening in child threads?
 
yeah, but they don't close stdin
 
Anonymous
user image
2
 
bob
@DaveRandom do you know of a good resource i can look at? this is a bit beyond my understanding. . . it doesn't take much. problem is i don't even know what to search for.
 
Anonymous
@Linus @Jimbo Thanks :)
 
Anonymous
morning sisters
 
9:49 AM
@JoeWatkins That's actually the retval of accept(2) and not the retval of the fucking bananas stream handler layer in PHP?
Is something erroneously doing return SUCCESS; somewhere?
 
not using php streams
 
ext/sockets?
 
nope, custom layer because none of that stuff works with threads
	fd = accept(threaded->store.sock->fd, (struct sockaddr*) &sa, &sa_len);
called directly, and definitely returning 0
 
@bob moment
 
listening socket is also correct
 
9:53 AM
@JoeWatkins is there definitely a pending connection to accept? Wondering if some platform has insanely defined EAGAIN/EWOULDBLOCK as 0?
 
yeah, opened with telnet
 
Heyy all
How to pass php variable in sweet alert??
 
@JoeWatkins before that line, can you triple check that fd 0 still points to stdin?
 
stdin is FILE*, not sure how to make comparison
 
@JoeWatkins just try and read from it
 
Wes
9:59 AM
morning
 
@DaveRandom I'm not sure what magic gdb does with stdin
 
lol :-P
printf debug ftw
 
I'll have to come back to it, I'm being pestered to do proper work ...
 
@JoeWatkins if you gist the source I will see if I can repro in a bit
 
@samayo gratz dude
Alsooooo beeeeeer
 
10:07 AM
@DaveRandom is in pthreads
build master against 7.1
 
mornes 11!
 
@JoeWatkins kk, will take a look if I get time
 
@DaveRandom my birthday is sunday btw
Just saying :p
 
OH OH
 
10:10 AM
!!dave
 
@DaveRandom should work on DNS lib.
 
!!DAVE
Brb. Air time
 
@bob pastebin.com/uFEfrgWC don't use that until you understand what is does !!! Ask me if you don't understand something.
 
10:14 AM
!!alias joe sayf @JoeWatkins must work on greenlet. /
 
Command '!!joe' aliased to '!!sayf @‌JoeWatkins must work on greenlet. /'
 
!!joe
 
@‌JoeWatkins must work on greenlet.
 
that's definitely on my list for this weekend ...
 
!!alias joe sayf %p must work on greenlet. / JoeWatkins
 
10:15 AM
@DaveRandom heh…
 
Alias '!!joe' removed
Command '!!joe' aliased to '!!sayf %p must work on greenlet. / JoeWatkins'
 
!!alias unlias unalias
 
Command '!!unlias' aliased to '!!unalias'
 
Now it will actually ping him :-P
 
oh
 
10:15 AM
I actually just need to do the save/restore the ze frame
 
Anonymous
@Jeeves eh? builtin?
 
or at least once I've done that, we have something worth playing with, possibly
 
@bwoebi that's the whole point of %p, if you don't use it then it strips pings from the posted message (puts a zwnj between @ and name)
 
@JayIsTooCommon Okay, fine. What do you want to ask me?
 
what's happened to known strings, I've forgotten ?
 
10:16 AM
@JayIsTooCommon typofix, unlias != unalias
 
Anonymous
@DaveRandom oh yes, my eyes deceived me. bastards.
 
Anonymous
@PeeHaa Thanks. Yeah, there will so much beer tonight :)
 
@DaveRandom I somehow thought a few commands like say would be just flat out exempted from stripping
 
I'll be interested to know what you actually get out of that @samayo
gratz btw ...
bob, known strings, any idea ?
 
lol at the typo
 
bob
10:21 AM
@DaveRandom jeez it's complicated.
 
@JoeWatkins hmm?
 
!!lxr _zend_compiler_globals.known_strings
 
@JoeWatkins Nothing went wrong but I couldn't find a suitable definition
 
yeah, what's with that?
 
@DaveRandom fix it
it's removed in master
 
10:22 AM
!!unalias unlias
 
Alias '!!unlias' removed
 
can't remember if it was replaced with something or moved to o+, or what ?
 
@JoeWatkins that's tricky
 
I DON'T CARE CHRIS, FIX THE RUDDY THING ... GO ...
 
Hey whoa, Chris is busy on dnslib
 
10:24 AM
it works as symbol search directly ?
you can assume anything with dot in it is symbol search, since functions can't have dots in ... then fall back to file search since they might ?
 
@JoeWatkins yes it processes each result individually, also lxr.room11.org/…
ticks_count is a member of a different struct in the same file
 
so anything with a dot and >1 results uses last result ?
 
oh that is shit
thanks bob
 
@JoeWatkins so, just use ZSTR_KNOWN()
 
bob
10:27 AM
@JoeWatkins what for?
 
@JoeWatkins could do that, would get false positives but equally that might actually be useful, since you'd probably care more about the member name than the struct name
 
Anonymous
@JoeWatkins Thanks. I was forced to take it actually, by a social service program, to maximize my chances of getting a job :/ Which it likely will. Since I have nothing except this certificate so far.
 
I don't need to do anything, pthreads was doing some hackery in 70100 - 70199 because known strings was a bit wonky, that unification patch has fixed it afaict
@bob was talking at bwoebi
 
bob
@JoeWatkins sorry
 
@bob what you are doing is complicated ;-)
It's not magic, if you want to achieve a complicated thing you have to write complicated code...
 
10:30 AM
@DaveRandom yeah it looks preferable, I can't seem to pull up that member as a single result with any kind of search
which is strange, but most of the time, the last result will be the one you want ... I think ... unless it's not ...
 
@bwoebi They are (such as sayf with %p) it a flag for ChatClient#postMessage(). It's basically there to stop accidentally annoying people, a specific postMessage() call has to explicitly state that pings are allowed
@JoeWatkins well that I can deal with, because members have the member flag (in green)
 
can we make it say what it's a member of ?
although I think there is no duplication of names in structs anyway
 
bob
@DaveRandom I'm trying to get my head around it, from what I understand, it puts the search parameters into an array $conditions which is then placed into a foreach loop $conditions as $conditionSet so for each condition that isn't empty it gets put in to another array $set.... after that have no clue what's going on :')
 
@DaveRandom given how often we're trying to purposefully annoy people perhaps set the allow-pings flag based on the user's permissions rather than making people jump through hoops
 
10:34 AM
        $table = $table."<td>" . <select name=\"".$val."_".$utilizador[$i]."\">;

		foreach ($options as $opt)
                echo ""<option value='$opt'>$opt</option>\n"; </select>"."</td>"";
		  }
		}
    $table = $table."</tr>";
that code what is wrong?
i am getting the following error
Parse error: syntax error, unexpected '<' in
 
263
Q: PHP Parse/Syntax Errors; and How to solve them?

marioEveryone runs into syntax errors. Even experienced programmers make typos. For newcomers it's just part of the learning process. However, it's often easy to interpret error messages such as: PHP Parse error: syntax error, unexpected '{' in index.php on line 20 The unexpected symbol isn't...

 
i am in that page already
 
@JoeWatkins maybe, although might be slow (would have to follow the link and do some xpath magic on the source file)
 
echo ""<option value='$opt'>$opt</option>\n"; </select>"."</td>"";
 
@ChristopheCosta then READ the damned thing
 
10:37 AM
@bob What I suggest you do is var_dump($statement); at the end and experiment with how different inputs change it
 
@DaveRandom anything is better than nothing ... if anything turns out to be bad, then we should improve it ...
s/we/you/
 
:-P
 
@ChristopheCosta consider using sprintf. it makes for tidier code and you won't run into issues with non-escaped quotes
 
you don't even need to read the page, just the words of the warning/error message
 
or just what the IDE underlines as an error
 
10:38 AM
if you're into IDE's ...
 
bob
@DaveRandom what sorcery is this!? it's amazing! i'm going to be studying this for a while :)
 
so @DaveRandom, about dns.. reddit.com/r/sysadmin/comments/60v254/… ... just to keep you from ripping your hair out if you're perhaps running into it
 
@bob here is a version that's easier to play with, and also fixes a bug (company_city was used twice)
@PaulCrovella well, shit.
That doesn't affect amp/dns because it very specifically doesn't use the OS resolver
 
never? why not?
 
bob
@DaveRandom Thanks so much! I shall not sleep until I understand.
 
10:50 AM
@PaulCrovella because it's blocking
 
@bob why are you trying to bind SQL syntax?
the point of prepared statements is to separate SQL code from SQL data
 
@Gordon all hail sprintf
 
bob
@tereško building an advanced search.
 
Hey people, quick question: is there a communtiy in the SE-network, where I can ask "broader" questions?
 
@bob that is not an excuse. I am asking you, why are you trying to bind syntax instead of data?!?!
 
11:02 AM
@DasSaffe no
 
do
you
understand?
 
Like, I have to make a decision what kind of interface for data-transmission I use (soap, rest, email, json...) and I'm kinda lost on how to decide. I worked with all of them, but I can't tell any advantages / disadvantages and would like to hear so feedback from other people
 
bob
@tereško if you know of a better way of doing it, i'm all ears. . .
 
@DasSaffe you're looking for a discussion forum, SE ain't that
 
@DasSaffe what kind of data do you need to transfer?
 
11:04 AM
@bob I already have you several better ways couple hours ago
 
99% text,
might be a file as well though
 
Note that the methods you listed are different things. SOAP/REST are related to protocols, while JSON is just a format
For text, 99% of modern web services use JSON, using a REST HTTP API
You can also sent files using HTTP
 
yeah I know, just counting the elements from the wiki site, which are possible ways to transfer data.
okay, thank you Roemer :)
 
:) anytime
 
will keep that in mind. Maybe i'll read a bit about the differences between soap + rest and may come to an conclusion. Thanks as well Paul Crovella for the feedback
 
bob
11:07 AM
@tereško couple hours ago?
 
One sort of nasty thing is that if you want to sent files, you need to use a form-encoded POST request
While the rest of your service can do RAW JSON
That's the only thing. I think going for SOAP in 2017 is not a good idea
 
Roemer, may I query you privat for a quick question?
 
Unless you sent file data as base64 encoded binary
@DasSaffe Go for it
 
3 hours ago, by tereško
you should be using http://sphinxsearch.com/ or something like that, which "sits" on to of your RDBMS
 
Wes
project360.mammut.ch watch the whole route to the peak of the mount everest in 360° video
site is terrible though
 
11:16 AM
yeah, couldn't find rebecca anywhere
 
Wes
lol
 
11:47 AM
@JoeWatkins ^^ arigato Joe-sama
also, evenings o/
 
you don't have to hide your extra arm, we already know
 
@Linus how does that compare with ES, @tereško ?
@PaulCrovella ^^
 
@Gordon havent tried implementing that functionality with Elastic
ask me again in ~2 months
 
@Gordon i am just giving him link what tereško linked him ^^
 
7 messages moved to Trash
 
11:56 AM
:D
 

« first day (2351 days earlier)      last day (2597 days later) »