« first day (1840 days earlier)      last day (3124 days later) » 

Abe
4:00 PM
 
Abe
got this on twitter
 
link them to cars getting hacked
 
Abe
¯\_( -__-)_/¯
 
4:31 PM
heh happy fryyyyyyyydai!
it's Fryydai fryydai gotta get down on fryydaiiihh
 
Any WordPress peeps in here?
 
@Plummer their usually isn't. maybe try wordpress.stackexchange.com
 
@Danack No one's ever chatting over there
 
@Naruto am back!
 
Feel free to ask whatever you want, i'm just setting your expectations for getting an aswer.
 
4:40 PM
^
 
@ScottArciszewski That's kinda vague man. I dunno what to use after reading that
 
It's not interesting enough to warrant a question submission, but I came across this question stackoverflow.com/questions/33421096/…
 
@Plummer what was your question?
 
didn't know if anyone's ever fiddled with creating custom permalink tags
You can put regular strings in the custom permalinks definition
so like `/blog-page/%postname%/
But in WP, you can map the blog page to other pages and use that endpoint
So your blog roll appears on the "News" page
or whatever
What doesn't exist is a permalink tag to get the slug of the blog page
 
yea, there is also the alternative of using rewrite rules on the http server level
 
4:45 PM
Google search came up nil
I've done that before too
But a %blogslug% seems so much simpler
 
sure yes
 
Anyone every registered their own permalink tag?
I'm not sure it's a thing
 
ok ive got the basics: http://pastebin.com/Dhdq78Y3

how would i do the following:
post data to callback.php
get the results from callback.php
load the graph?

please help or point to a good tutorial :)
 
@iCeptic Asking for tutorials on subjects is something that google is really good at.
 
@danack i am struggling to find a tutorial on what im trying to do :(
 
4:51 PM
Then practicing that would be a useful skill to work on.
 
  <select name="dept">
<?php
$con=mysqli_connect('127.0.0.1','root','','ass');
$q="select s_name from student";
$res=mysqli_query($con,$q);
if(!$q){
	die('unable to cconnect'.mysqli_errno($con));
	}
while($num=mysqli_fetch_row($q)){
	echo "<option value=$num[s_name]>$num[s_name]</option>";
	}

?>
hi i want to fetch selectbox value from database here is the part of code it doesn't show any error neither data?? any idea
 
try fetch object?
 
@iCeptic any reason ??
why i use fetch object
 
@SajjadKhan
while($num=mysqli_fetch_object($q)){
echo "<option value=$num->db value here>$num->db value here</option>";
}
 
5:06 PM
If I'm not wrong the method i use is procedural??
and you show me the object oriented solution?
 
correct :)
oop i prefer :)
 
I'm new at php and doesn't know much about OOP so will you give me the solution in Procedural way.. I appriciate your effort
 
23:7. So many yes votes
77% yes
@SajjadKhan if you look at the mysqli documentation, it shows both the OOP and procedural versions of each function
 
@SajjadKhan
modify this line
echo "<option value=$num[s_name]>$num[s_name]</option>";

to

echo "<option value=".$num[s_name].">".$num[s_name]."</option>";

try that?
 
You shouldn't do $num[s_name] when it's not a string interpolation. Do $num['s_name']
 
5:16 PM
@iCeptic i think the first mistake i made i use mysqli_fetch_row where you give the column number not name..
 
and do what @Andrea said i dont a small oversight
that should solve your problem :)
echo "<option value=".$num['s_name'].">".$num['s_name']."</option>";
that should be the line of code for you :)
 
the output result is
".$num['s_name']."
 
$mysqli = new mysqli('localhost','root','','ass');

//Output any connection error
if ($mysqli->connect_error) {
die('Error unable to connect '. $mysqli->connect_errno .') '. $mysqli->connect_error);
}
$query = $mysqli->query("select * from student");


while($obj = $query->fetch_object()){

echo "<option value='" . $obj->s_name . "'>" . $obj->s_name . "</option>";
}

echo '</select>';
 
5:35 PM
Happy friday yall
 
o/
and happy Halloween to all guyz :)
 
thanks
you too
can someone help me please with this documentation?
I'm trying to echo the value of the meta box
 
5:49 PM
@iCeptic you really shouldn't use "root" for accessing database from web
 
Hi.
Can someone help me here with Regular Expressions?
 
can, yes
but probably nobody will, because dealing with regex is a pain in the ass
you should try to solve the problem on your own using something like regexr.com
and if you get stuck at some specific problem, then ask about it here
 
Yes. I can't quite figure it out on my own, as you may agree, regex is pain in the ass.
 
is there something special that you cannot figure out how to select?
 
Here's my problem, I need to match these following pattern: ?anychar=
I need to match a pattern like this in a string and need only the first occurence.
 
6:00 PM
do you need to extract values from URL?
 
no. it's from a string.
 
regex101.com is also very helpful. It breaks down how the regex is parsed, so it might help show where you're going wrong.
 
I am creating a formula parser functionality, and in this case, I need to fetch variable assignments.
 
you can write an example of what you are trying to do in regexr.com , save it and share the link here
 
@ChibangDayanan This is not a job for regexp - stackoverflow.com/questions/524548/…
probably.
 
6:03 PM
that way we will be at least able to understand what you mean, because "?anychar=" just made me confused
 
I mean, take matches of regular expressions from a string that would look like a variable assignment. My planned format goes like
?a = 4+5
Wherein ?a is the variable. Therefore, I need to check whether or not the string matches this pattern and do computation/evaluation of remaining (patter removed) string.
here's my regex test case
 
@ChibangDayanan why are you doing that with regex?
you need a proper parser for that: github.com/ircmaxell/php-math-parser
 
@ircmaxell: woah. Hi! I've been actually using your library right now. but substituted the registerVariable token from $ to ?
Since, I think, your lib doesn't offer conditional constructs, I instead build one from scratch and I am still tinkering about whether or not I should base it on your pattern or not.
 
@hakre meh, sorry, too async :D I just got poked by the MeinFernbus folks for a job
 
so arithmatic can be done with a shunting yard algorithm
but more complex things depending on your conditionals may need a more robust parser implementation
 
6:13 PM
There's also Hoa\Math for that btw
I'm currently considering using it for a client project, quite interesting lib
 
@Ocramius but that doesn't use conditionals, does it?
 
I'd implement conditionals as functions tbh
IF(COND(), TRUTHYCASE(), FALSEYCASE()) (for example)
but again, I am missing the initial use-case, just hopped into the chat
 
@Ocramius still has no conditionals i think.
and @ircmaxell's lib is easy to understand.
 
Well, HOA's is extensible grammar, so it is indeed a larger codebase
 
yay, currently 23:7
 
6:28 PM
Level 2 is also coool youtube.com/watch?v=TlXUSw_y1cg
2
 
6:49 PM
@Machavity lol
 
Abe
i have few questions about pthreads - remember i'm a clueless fool - a thread will continue to run even if the "main php thread" ends?
[insert i have no idea what i'm doing dog picture]
 
Abe
i want to reduce deadlocks so i'm removing slow infrastructure stuff from within transactions and planning executing them asynchronously using workers. will it work?
the 250 lusso is one of the best looking ferraris
 
7:09 PM
@Ocramius From MeinFernbus "PHP developer (f/m)" - that bit in brackets can't be what I think it is, is it?
 
@Danack I don't suppose you know what the PHP 7 version of ZEND_SET_SYMBOL is? I want to add a variable to the active symbol table...
 
@tpunt No sorry - my knowledge of internals doesn't extend to the compiler side of stuff.
Also, that sounds weird.
 
@Danack Ok, thanks anyway!
 
@ircmaxell I've been thinking a little bit about collections and algorithms and whatnot.
 
7:12 PM
Yeah, I'm just dabbling in internals by creating an extension that exposes a create_var function
 
I think if you call the function map on something that is Mappable it will delegate to $Mappable->map.
If it's not Mappable then it does normal array/iterator behavior.
What do you think about that?
 
@LeviMorrison hmmm
at moments like this I ask "what would Haskell do?"
 
@Andrea It wouldn't be in this situation in the first place.
But, for the record, Haskell has three mapping functions.
61
Q: Why do we have map, fmap and liftM?

fredoverflowmap :: (a -> b) -> [a] -> [b] fmap :: Functor f => (a -> b) -> f a -> f b liftM :: Monad m => (a -> b) -> m a -> m b Why do we have three different functions that do essentially the same thing?

Anyway, the reason I think Mappable would be useful is actually because if you implement Optional/Maybe as an iterator then applying map over it would ideally return an Optional/Maybe instead of just a normal generator.
Other classes may also be able to provide specializations.
 
Greetings.
php 7 not available on windows.php.net/download
is it because of Beta?
7.0 has no release. on site
 
whats up
 
Abe
7:27 PM
@Rafee because it's still RC
you can find snaps here windows.php.net/downloads/snaps/php-7.0 @Rafee
 
okay thanks
i wanna run this php 7 with XAMPP
what if i just copy and paste these file and overwrite with xampp.
I just did it.. something is not working out.
 
Abe
just get the binaries from apache lounge and get rid of xampp
 
nothing found in logs too.
okay..
 
Anonymous
why not download vbox and work on linux
 
hmm
 
Abe
7:40 PM
@samayo do you do that?
 
Anonymous
yes
 
Abe
like you run phpstorm within the vm
 
Anonymous
Nah, just the sever
 
Abe
oh, how?
is there a way to mount a host's folder within the vm?
or do you upload files every time :P
 
Anonymous
Yeah, you can install Guest Additions, and share files in-between
 
Abe
7:42 PM
yeah but that sucks
 
Anonymous
Nope. It doesn't. All my projects exist in /var/www/ and c:/web/www at the same time
 
Abe
but you need to trigger the transfer every time, it's not automatic, no?
 
Anonymous
I edit files on Windows using any IDE, and refresh the page :D
 
oh what?
you mean, you access from VBox
 
Anonymous
@Abe hell no. You don't even have to wait 1 second for the change to take effect.
 
Abe
7:44 PM
i would rather look if there is a way to mount a host's folder within the guest os
@PeeHaa you use windows, any idea? ^
 
Anonymous
@Abe You DO mount it, using mount -t vboxsf /var/www/ C:/www
 
Abe
oh
it wasn't possible before
 
Abe
in fact i tried doing that already but vbox only threw shit at me
 
I only use a virtual machine when I want to test something and don't want to fuck around with my vps
 
Abe
7:46 PM
and same did vmware
@samayo instead where you run the database? on guest or host?
 
Anonymous
guest
 
Anonymous
mariadb, php-fpm, nginx, gitlab all in CentOs 7. Everything else, on windows.
 
8:00 PM
@Rafee what exactly is your problem ?
 
Abe
downloading debian @samayo :B
 
come to the dark side
 
Anonymous
+1
 
Anonymous
hipster
 
8:04 PM
@samayo if I was a hipster, I would have gone with the old logo: upload.wikimedia.org/wikipedia/en/5/55/Bsd_daemon.jpg
 
@samayo vbox … that's so 2014. Docker all the things ;)
 
Anonymous
@tereško still better than linux's logo
 
true .. though not as cure as Plan9 mascot
 
Anonymous
@Gordon I don't think my 2GB RAM can handle yet another software like docker/vagrant
 
@samayo if you are on linux, docker is more lightweight than vagrant+vbox
 
Anonymous
8:09 PM
Ah, I didn't know.
 
Anonymous
I got vagrant to try rasmus/php7dev some months ago, but it nearly crashed everything.
 
try with Docker and github.com/bripkens/dock
then it's as simple as doing dock php7-apache. that will bring up a container with php7 and apache and the webroot mounted to whatever directory you run that. cant get anymore simpler than that.
 
@tereško I am going to try php 7..
so, i tried working to replace files in XAMPP with old php directory file..

now. I am trying VM to get new php with centos.
on my windows 7
 
hmm, that's reasonable
though, to replace XAMPP completely you will have to forward ports from the VM to the host system
 
no, left that XAMPP stuff.. i am working on VM to get complete new Package bundle
apache, mysql, php7
 
8:21 PM
@Gordon I think it's better to at first learn how things work with something like VBox, before you start using docker
 
@tereško if all you wanna do is play around with php7, it's the fastest way.
 
I have begun to thin that "fastest way" usually does quite a lot of damage, when it comes to learning programming
 
Anonymous
@Gordon Actually, I have php7 already, but I will give docker another try for the sake of simplicity.
 
@tereško its not much different than downloading a xamp with php7. isnt it? its a prepackaged thing.
 
Anonymous
@tereško I'm actually very comfortable using with VBox.
 
8:25 PM
vegan is a fundamentalist vegetarian
(just heard in an audiobook)
 
Anonymous
I thought they were the same thing
 
does anyone happen to have a list of official twitter accounts for programming languages?
otherwise I'll just start one
 
@samayo nope. Vegans do not use any animal-derived products. Like milk, gelatin, eggs
 
Anonymous
@tereško Due to health issues or Animal rights ?
 
usually - the latter
 
Abe
8:29 PM
what the fuck is this 3v4l.org/kuF1A
why it assumes i want $previous set that way
 
How dare those heathens in C++ flag Rebecca Black!
 
Abe
/me flips table and goes watching F1
 
@samayo they are mostly people who do not realize that cows, pigs and chickens have one of the largest population among multi-cellular life forms
 
MyDispatcher::call vs MyDispatcher::invoke -- Which is more appropriate a name when acting on a callable parameter? I'm thinking call, as in MyDispatcher::call($function), as invoke sounds like it's acting on $this in some way.
 
if humans stopped using those animals, they would basically go extinct
 
Anonymous
8:38 PM
@tereško I wander how these people plan to tackle the issue of animals that kill other animals for survival, once they are done with us :/
 
yeah.. read this.. few days back
maybe its, food chain.. for us.. and in nature for animals too.
 
Anonymous
unbelievable.
 
Anonymous
@tereško btw, I read a couple of days ago, for the first time about gamergate.
 
Anonymous
that was a major ftw
 
8:45 PM
I wonder, what have you read
 
Anonymous
A woman sleeps with a journalist to get good reviews for her game, and when exposed she screams misogyny, sexism, gender inequality as always.
 
it didn't begin with where you think it begun
 
That wtf moment ^
 
@marcio What is that tool?
 
Looks like phpunit in coverage mode?
 
8:53 PM
yup
 
But how do you even skip those lines? xdebug gone screwed up.
 
It does tell you that?
TIL
 
it's a bug ^^
 
:P
 
@marcio that code is basically a shell game 24.media.tumblr.com/6de178a6091cfceab094399f7c3635cd/…
 
8:54 PM
Yeah, try coverage=html and give it a place to dump the files, it's really pretty and also somewhat infuriating.
 
I'm using the phpdbg code coverage, btw... but I have a hunch it's on phpunit side.
@tereško it's impossible to avoid it, at least in this case.
 
Fucking idiots throwing n number of years experience lines
 
those usually just make me sad
 
Abe
9:22 PM
@Trowski ^ opinion on this exceptions magic?
 
<?php
$con=mysqli_connect('127.0.0.1','root','','ass');
$q="select s_name from subject";
$res=mysqli_query($con,$q);
echo "<select>";
while($num=mysqli_fetch_row($res)){
$id=$num[0];
echo '<option value="'.$id.'">'.$id.'</option>';
}
?>
after spending time I finally fix it.. thanks to @iCeptic
 
Abe
nice password
or is that the db name :D
 
@Abe When a new exception is constructed, any exception in flight is auto set to the previous exception property. This makes sense otherwise the first exception would be lost.
 
Any of you guys had experience with (or shall I say "in") phpfreaks irc channel?
 
Abe
@Trowski perhaps one wants to hide it intentionally
 
9:34 PM
@Joewatkins are you here?
 
@Abe Sorry, not when it's constructed, when an exception is thrown any exception in flight is set to the first exception in the tree without a previous: 3v4l.org/Ea5Ke
@Abe Then you can catch the exception you want to hide and throw a new one.
 
Abe
correct, but why assume that, since one can do that manually if they want
 
@Abe There is no way to know about an in-flight exception in a finally block.
At least not without previously catching and re-throwing it... not the same.
 
Abe
catch(\Throwable $all){throw $all}finally{
   // $all
}
 
Not the same at all. Plus you'd have to check if $all is actually an exception in finally.
 
Abe
9:37 PM
idk, i don't like it. must be because i hate infinite traces, i try to hide all the unnecessary information if i can
 
Look at it as a convenience to having to do that manually.
To me it avoids a lot of boilerplate in the 99% case.
 
Abe
yes but the trace is hierarchical while finally is executed on a different level, so you get a messy trace in my opinion
 
Which is why it's nice to get the original exception that was in flight :)
 
Abe
will need to check the trace i'm getting from such cases; if i'll be able to understand it i'll probably change my mind about it
at the moment looks a bit wrong. it's like an early throw. why should i care of something that wasn't thrown, basically?
considering it's php - at least i'm not getting "finally can't throw exceptions", as in __toString :D
 
9:59 PM
@marcio I strongly hope it's not a phpdbg bug though^^
 
Abe
o/
 
@tereško the environmental issue also matters
 
@rdlowrey indeed … Grovo has a culture absolutely hostile and harmful to open source contributing… Its employees cede to work on their projects!!! (j/k, but I'm nevertheless slightly annoyed by your absence :-( )
 
@Andrea granted. But food production in every form was has an environmental cost. Our civilization is yet too new to fully mitigate it. It probably will be a least 20 more years till "developed world" achieves an ability to produce food without creating waste.
.. maybe even 50+ years
 
@bwoebi speaking about bugs, did you ever managed to reproduce that backtrace loss from the other day?
 
10:08 PM
@marcio hmm, don't remember what you're talking about
 
Oct 20 at 22:30, by marcio
(gdb) r
Starting program: php /usr/local/bin/phpunit ./tests/SpecsTest.php
[Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault. 0x0000000000000000 in ?? ()
(gdb) bt
#0  0x0000000000000000 in ?? ()
#1  0x00007fffee92c800 in ?? ()
#2  0x00007fffee9901d0 in ?? ()
#3  0x00007fffffff94c0 in ?? ()
#4  0x00000000007303b0 in zim_spl_FilterIterator_next (execute_data=0x0, return_value=0x7fffffff9490) at /.../php/ext/spl/spl_iterators.c:1900
 
@marcio nah, I didn't
 
ok, damn. I gave up using generators as data providers on PHPUnit anyway. It collects everything before running the tests, so it makes no sense.
 
Gotta know how many total tests there will be :P
 
captcha on google search .____.
 
10:27 PM
@bwoebi maybe you're actually not a human? :P
 
@kelunik well… I was able to solve the captcha!
 
Abe
...using neural networks!
 
obviously!
 
Abe
:p
haha
user image
9
 
@Abe I doubt that is even legal. It's properly not over here
 
Abe
10:38 PM
in fact it's totally illegal
 
@bwoebi Google can solve all its captchas.
 
@kelunik It needs better captchas!
 
This new Ubuntu Gnome Shell notification bar is somehow annoying...
 
10:59 PM
@PeeHaa it's not in the US
 

« first day (1840 days earlier)      last day (3124 days later) »