« first day (733 days earlier)      last day (4226 days later) » 

1:04 PM
That clears it out a bit. I already had a "to each it's own" opinion of Java-backend and php-backend (meaning: java's not meant for web-backend but it can do pretty amazing shinags) but then i saw node.js and everything in my opinion trembled like a little girl
 
node.js is good for ajax-heavy applications with sockets, that are written by javascript experts
i would venture a guess that you are not a javascript expert
 
btw, if anyone wants to "go legit" and buy AV software, you can use the coupon code "modoffer55" at kaspersky.co.uk to get 55% discount ... 3 PC license for £20 for a year, for me + gf + sister = not bad spending
 
@Leigh i would not use kaspersky if you paid me for it
 
@Leigh I would rather purchase a days worth of elephant dung from chester zoo, I would get less shit to deal with. Still, at least it's not Norton.
 
@tereško It's doing better than most of the others
AVG doesn't detect half of things, norton is hideous, avast is clunky
 
1:10 PM
actually , if i used a commercial antivirus, i would choose either Nod32 or BitDefender .. then again I don't and can easily live with MSE + limited user
 
@tereško i'd give you an item for you successful venture alas we are not in a rpg :x but that did cleared it out indeed: i was thinkinh node.js would come and replace php - but what you said reassured me :) (it was percieved something like: "if you do it in php and have a nice ajax function you'll manage to reproduce it")
 
@MoshMage , if i had to write a chat like this - i would use node.js, if i had to write a standard website - i would use php
 
@Leigh speaking of AV's Commodo upgraded me from free to premium - idk if this is a commercial AV tho - for free, i guess it was because i used their free version for as long as i remember
 
if i had to write a twitter clone - i would pick a different project
 
i see! that does make me warmer inside (as in: im not using the wrong technology) and does spite my interest because i do dream of coding something like tweeter (.. just .. because i like the way it works for users)
also, thank you for starting my php5 journey (as i see __set and __construct werent there before and mysqli class doesnt count :P)
 
1:19 PM
morning
 
@NikiC morning
 
ahoy
 
Noob sql question. How to get the count of all matched rows in this query:
SELECT count(products.id) as productCount
FROM products
INNER JOIN productData ON productData.parentId = products.id
LEFT JOIN media on products.id = media.productId
WHERE (productData.languageId = :languageId)
AND (
  products.code = :code
  OR productData.name = :name
)
AND productData.active = 1
GROUP BY products.id
It returns rows for every record instead of the total
 
@PeeHaa count(*) ?
 
1:22 PM
neh. same
 
@hakre Surely you mean COUNT(1) ;D
@PeeHaa not sure what you mean by "all matched rows", you should be getting that anyway?
 
@PeeHaa Someone will come in here and tell you mysql_num_rows :P
 
SELECT SQL_CALC_FOUND_ROWS ... your SQL
SELECT FOUND_ROWS( ) ;
 
nvm
 
or do you mean rows prior to the grouping?
 
1:23 PM
forgot limit 1
sorry all
:(
@NikiC :P
 
also , @PeeHaa , please stop using unnamed id columns
 
@PeeHaa Don't be sorry. We already know that you are...
Sep 30 at 19:30, by PeeHaa
Fuck me I'm stupid
:)
 
:D
@tereško Yes sir
 
also @tereško, stop complaining about unnamed id columns
:P
 
@tereško They all have names! They're called "id"
 
1:28 PM
^ someone had to say it
 
@Leigh lol
 
hi guys
 
@Leigh it's having method a() in in your class ..
 
@tereško not really, it's like having a property $id in your class
 
classes are not tables
 
1:30 PM
@tereško Your "named" ids are more like having the method HelloWorld_FooBar in the class HelloWorld, so you have to use HelloWord::HelloWorld_FooBar. Just pure redundancy/pointlessness ;)
 
Moerning @NikiC
 
@NikiC I bet he uses hungarian notation too!
 
morning @ircmaxell
sup?
 
not much, you?
You see this yet?
Hmmm. That's interesting: http://3v4l.org/TpeZO
 
@ircmaxell Yes. I was the one who told you ^^
 
I used lowercase though
 
I like the idea of £variable_name syntax
 
which never worked before...
 
No, it always worked ^^
 
@ircmaxell And if you additionally add another true in my code, it will even work with any case, i.e. also TRUE, tRue or whatever
 
yes, but lowercase never worked without the namespace trick
 
@tereško in the link you sent me, codeangel.org/articles/simple-php-template-engine.html , there's online one thing i can't understand: why can't i define the variable $view_template_file ?
 
wat
 
erm..
 
1:36 PM
@MoshMage Amateur implementation.
You could avoid the restriction by not having a formal parameter and rather use func_get_arg(0) instead ;)
But I don't think it matters much. You probably won't use that varname anyways
 
@MoshMage , you should read it as explanation of concept , not the be-all-end-all implementation
 
@tereško hence why wanting to understand that exception ;)
@NikiC Thanks;
Is it like.. the code is "reserving" the variable so it doesn't get set before it's needed?
i understand the code is preventing wrong use, what i can't understand is how it could be used wrongly
 
user1125394
Men I have a question, Do you think Ipv6 can facilitate data streaming (end to end communication is more direct)
 
No men in here, little girls only I'm afraid.
 
user1125394
1:46 PM
and a baby ;)
 
user1125394
c'mon
 
user1125394
@DaveRandom I don't think a girl ever came here
 
...and in theory yes. In practice at the moment, no.
@cyril Tits or GTFO
 
user1125394
Stack Overflow = 99% men
 
what is really wacking my mind is: he is avoiding a variable that can never be set. I'm really attonished here.
 
1:50 PM
@cyril There were a few, but you people scared them off. This room has grown too abusive...
 
To hell with it: i understand everything unless why would i ever want to set that variable before. So.. I'll just ignore that stray fact and call it a win; Even the comments ignored that wicked and evil line ^^'
thanks @tereško it should put me on the right path :)
 
@ircmaxell The site has grown too abusive. It's definitely time for some major reforms.
 
be awesome everyone :)
 
no, it has nothing to do with the site
 
o/
 
user1125394
1:55 PM
the reality is there are just really few geek girls (and even less pretty geek girls)
 
That's not true
 
user1125394
not in my country so
 
@ircmaxell Are you quite sure? I remember something to do with ticks and the GC being called at intervals to spare excessive processing. Though, I'm no PHP core dev, so I'm probably wrong.
 
@ircmaxell It does a little. There are way too many first time posters who get instantly closed questions, with a couple of curt comments if they are lucky. Yes that's because their questions suck, but they're not really given a chance to improve them and they aren't really given any incentive to come back and try again. And since you can't get into chat until you have 20 rep, none of those users are ever likely to end up here.
 
@Christian Yes, unset calls the destructor imediately. And so does leaving scope
it's not a GC run
GC only handles circular references and the like
 
2:05 PM
@ircmaxell dereferencing then?
 
@MoshMage The code extracts all template variables into the local scope. So if you set a view_template_file template variable, then it would create a $view_template_file variable from it in the local scope. But the method has a parameter with the same name. So it would just overwrite it. And then it would include the wrong file ;)
 
huh?
 
@cyril Well, even worse is the fact that they're probably married. :(
What's the best way to get a list of classes to descend a particular class? I was thinking about get_defined_class() and filtering with using is_subclass_of($subClass, $rootClass). For this use, it won't need to be fast, but I thought there might be a better way?
 
great some idiot didn't turn off emulated prepared statements and used the same named placeholders multiple times... o joy o joy
\o/
 
2:22 PM
quick question guys.
I got an array of format
Array ( [0] => Array ( [name] => Ivy Joe [sex] => female [uid] => 528965755 ) [1] => Array ( [name] => Nithu K Cherian [sex] => female [uid] => 617923920 )...........

I need to randomly get 2 uids.

I cant just make it out. :-/
 
Will this do it?
$rand = array_rand($array)
$result1 = $array['$rand']
$finalresult1 = $result1['uid'];
Yeah I got that NikiC. What bothers me is an array inside the array.
 
@Kishor $rnd = array_rand($yourArray, 2); echo $yourArray[$rnd[0]]['uid'].' and '.$yourArray[$rnd[1]]['uid'];
 
@Kishor yes. Only that should rather be $array[$rand] (without teh quotes)
@Christian It returns the keys, not the values ;)
 
Trying now..
 
2:25 PM
@NikiC Yeah :/ should have RTFMed
 
$rani = array_rand($fqlresult1);
$result1 = $array[$rand];
$rani = $result1['uid'];

$dancer = array_rand($fqlresult1);
$result1 = $array[$dancer];
$dancer= $result1['uid'];
echo $rani;
echo $dancer;

returns nothing :(
format of fqlresult1 is
Array ( [0] => Array ( [name] => Ivy Joe [sex] => female [uid] => 528965755 ) [1] => Array ( [name] => Nithu K Cherian [sex] => female [uid] => 617923920 )...........
Am I doing something wrong @NikiC
 
@Kishor Your variable names don't match
 
@NikiC You know what? I'm off editing the manual.
 
0
Q: wp_ajax_ actions that use object-oriented action handlers?

TenSpeedI'm trying to pass an ajax action to /wp-admin/admin-ajax.php, however I can't seem to get it to call any functions that use a class to encapsulate the namespace. I get the following error: Warning: call_user_func_array() expects parameter 1 to be a valid callback, class 'PHP_faq_backend' not f...

 
Well, @NikiC I got the variables corrected. Still it returns nothing.Duh. Can I post the codes again ?
 
2:36 PM
wtf
4 messages moved to bin
 
$rani = array_rand($fqlresult1);
$result1 = $array[$rani];
$rani = $result1['uid'];

$dancer = array_rand($fqlresult1);
$result1 = $array[$dancer];
$dancer= $result1['uid'];
echo $rani;
echo $dancer;

Still comes in blank. Last 30 mins figuring out this thing.
 
3
A: Is include()/require() with "side effects" a bad practice?

hakreThat's a question of general design, not personal preference. If you can design with personal preference, then it's your personal preference. Do whatever you like, use the language as a tool. For example, if you use PHP as a replacement for server-side includes, it's pretty common that includes ...

 
Oh, never mind :)
 
Well actually, what I was trying to do, was predict the next message id, then link to it, to see what would happen
 
6 messages moved to bin
 
2:38 PM
@hakre I used to include/require files that did actual work a lot in the dim and distant past, but bitter experience has taught me that doing so is more trouble than it's worth
 
10 messages moved to bin
 
any help guys? :-/
 
@Kishor turn on notices. You'll notice a notice about $array being undefined. You need to use the original array you passed into array_rand()...
 
How sweet.
Problem solved :D
 
2:45 PM
so the mcrypt extension comes in the form of a C file mcrypt.c. Does anyone know what mcrypt.mng is?
 
mng?
 
thats what i said :(
its from an answer to something i asked and the responder hasnt gotten back to me yet so i figured i would ask in here
i know wiki says mng is for animation or multiple pngs if i remember correctly
 
@owengerig Is that a siberian husky??
 
yes!
 
Yours?
 
2:48 PM
ya
:D
 
Bet you're very happy with it. I know, I just love mine.
 
o ya!
 
i love taking her out on the bike or skateboard
 
Mine a few months ago.
 
2:49 PM
o wow yours is just a pup
 
Nah, 9 months now..
 
awesome looking
i wonder how much of the white will take over
myn had the classic husky "mask" and it all went away
 
@Christian cute :)
 
@NikiC Cats still better
 
pft
 
2:50 PM
@NikiC I know. And I dislike pets normally. At least after the rat accident 10 ears ago.
 
no @Leigh
 
Cats double up as a weapon!
You can throw them like ninja stars
 
@Leigh That's debatable ;) But in any case, the husky is a lot cuter than the puppy that @DeadMG from the C++ room has.
That puppy is frightening.
 
@Leigh Well, I assure you cats actually run away when they see my dog running at them. I tried reasoning with them that he just wants to play...
 
Before I didn't even know that puppies can be frightening
 
2:52 PM
@NikiC Frightening?
 
@Christian My old cat once attacked a doberman. Surprised the dog could run, its tail was so far between its legs
 
sorry dont mean to spam but wanted to show how much her colors changed
 
@Christian Look at those pictures: wide-language.com/About.aspx Some are really scary. The puppy looks like it could eat you.
 
Alright, I agree with others. This room is done. I give up
 
2:54 PM
@owengerig She's really cute. Eyes with different color, same as mine.
 
@ircmaxell Just give up the on-topic part of it :)
 
@ircmaxell Huh..at least no Nazi or 80 years olds so far... cheer up :D
 
@Christian o ya, but opposite eyes
 
Owen, where are you from if you don't mind my asking?
 
He'll be back ;D
 
2:55 PM
chicago
 
But yea, you guys, get a room
 
im mostly in the nschat room alot as i mostly do ios coding
 
user1125394
pets.stackexchange.com
 
How's summer for her? I keep having to sustain mine with helpings of ice.
@cyril It doesn't exist yet. You go vote for it, I already did.
 
the shedding is relentless
she does ok, and i have read that the same insulation from the cold that their coat brings offers similar protection in the heat
but ya she gets hot
 
user1125394
2:57 PM
no SE shouldn't turn into ... FB
 
room topic changed to PHP: Discussion for all things apart from PHP - Don't ask whether someone is here or can help. Just tell us your problem. If anybody can and wants to help, they will. [php]
 
PHP = pictures of horrible pets?
 
lol
 
@cyril FB? There are good reasons why pets.se would work. You'd be surprised how much attention and problems they may get.
 
@NikiC huh? why didn't that update my room description?
 
3:00 PM
PHP is short for Puppies Hug Puppies
 
@NikiC Or was it a fake?
 
@PeeHaa Maybe you have some kind of cv-pls magic interfering with it ;)
 
since youporn uses Symfony, I'd say it's Porn Hypertext Processor
 
@NikiC That may be the case, but strange thing is it did a update of some sort. I.e. it updated it with the original topic
 
QOTD from Rasmus: "We could make a case for not doing it in 5.3 anymore since that is getting close to sunset at this point"
 
3:03 PM
@Leigh Don't interpret too much into it though. It's a long sunset I guess ;)
A sunset lasting three years :P
 
Also, Carmageddon is free on the app store today.
Oh wait, that was yesterday
 
lame
 
I don't have an iShit, I was just relaying
 
@Leigh Good for you!
 
ios is AWESOME!
 
3:05 PM
@owengerig for what?
 
easily the best mobile os
and objective c is really cool
 
You're really not doing yourself any favours
 
u guys ever heard of or mess around with phalanger
 
Objective-C is about as cool as a bucket of monkey faeces
 
no way, once u get to know it, there are alot of cool features
 
3:07 PM
I guess you mean "cool" like the way being a goth or an emo is "cool"
 
0
Q: How to parse curl response with no html <head> <body>?

Maia CubeSo the response I got from curl is a part of the it start with tag not with the HOw do I parse it , I've tried with simple_html_dom with no result , should I use regex instead ??

 
whatever not going to argue
 
And yes, I've used Phalanger
 
Wtf, did I just read Objective-C and cool in one sentence?
@Leigh Ohyoudid?
How broken is it?
 
@NikiC Highly
 
3:08 PM
<- dropping topic of obj-c though alot of people love it (including myself)
 
And we even sponsored some of it's development to get it less broken.
 
i have been playing with phalanger the last few days. cool concept.
 
@Leigh To be assumed
@Leigh Who's "we" again?
 
@NikiC ;) the company I work for
 
you wouldnt happen to have any idea how i could get a php extension working like mcrypt? (stackoverflow.com/questions/12922689/…)
 
3:09 PM
Don't try and use reflection or serialisation with it, you'll be upset.
 
@Leigh Yes, I got that much. I mean who it is you're working for ;)
 
PHPUnit doesn't work for a start.
 
@owengerig OS?
 
operating system?
 
yes
 
3:10 PM
windows, VS, .net, c#
not sure exactly what your asking @NikiC
 
Ow wait, didn't read the question. nevermind
 
@owengerig Eh, you'd have to get them to port the extension. You can't just "include" extensions
 
so the link to my question above you will see there is an answer by jacob who seems to be the maker of phalanger, but like i said earlier and in my response to him, he talks about added mcypt.mng which i dont understand what he is referring to
@Leigh did you read his answer. he talks about useing the "native" implementation
 
brb
 
3:19 PM
sup sup
 
@NikiC kewl
 
Does not like the zend framework >.<
 
I hope most of those comments discussed are already burninated?
 
Hey guys so I have an interface I am creating to allow someone to link accounts to bidding sites so they can make bids and it will go onto all...my issue is that for this one site, when I send over the login fields to the site it is not going through...here is my original question stackoverflow.com/questions/12946882/…
 
@DavidBiga CSRF token?
 
3:26 PM
?
 
Cross-site request forgery, also known as a one-click attack or session riding and abbreviated as CSRF (sometimes pronounced sea-surf Unlike cross-site scripting (XSS), which exploits the trust a user has for a particular site, CSRF exploits the trust that a site has in a user's browser. History CSRF vulnerabilities have been known and in some cases exploited since 2001. Because it is carried out from the user's IP address, some website logs might not have evidence of CSRF. there are few well-documented examples. About 18 million users of eBay's Internet Auction Co. at Auction.co.kr in Kor...
 
so is this bad?
all I am doing is just signing in through my browser, just not on the site. So how is that forgery?
 
which exploits the trust a user has for a particular site - Id say so
 
Then what is openid?
 
@owengerig I guess thats the php extension wrapped in some sort of .fail compatible bundle?
 
3:29 PM
@DavidBiga 1 account on a service which you use to login to different sites
 
@Leigh i really dont understand that statement, is that sarcasm? .fail ?
 
@DavidBiga It's not a matter of bad, but without knowing how you let user login to the service it's hard to tell you what is going on
 
@owengerig i tried to type .NE... nope, can't do it
 
So what should I go about with doing this?
 
I suggest inspecting the request of a valid login and see if some things are different with your request
 
3:31 PM
and if there different?
 
Anyway, @owengerig After a quick chat here, yes, it wraps the normal php extension in some sort of managed layer to be loaded by the ExtSupport extension.
Managed code, the childs security blanket of the programming world :D
 
@DavidBiga do the math
:)
 
lmao
 
@Leigh ok thanks.
 
@PeeHaa But I want to do this lol, I don't see how it is violating anything.
 
3:35 PM
have fun when people wont use your application or site.
if I am correct they will get a warning - no?
 
So is there anyway around this?
 
@DavidBiga I never told you you shouldn't do it. :) I just told you you would have to inspect a valid request and try to mimic that (if possible. i.e. if there is not CSRF protection)
 
okay, so if i can mimic it, i am okay?
 
@DavidBiga Yes probably
 
now could i take a different approach also and ask them if i can do this?
 

« first day (733 days earlier)      last day (4226 days later) »