« first day (814 days earlier)      last day (4119 days later) » 

Hi I have a quick question if anybody is online that know both some .php and jquery, somebody here?
"Discussion for all things PHP - You don't have to ask whether someone is here or can help. Just tell us your problem. If anybody can and wants to help, they will."
:)
ok then.
 
@Wobot means ?
 
I am a webdesigner so I know to little about this, really beginner question. I have a site there some material (divs) with extra settings to are hidden as default and when click on a button the divs show using jquery. I wounder, is it possible to code so the setting in the hiddens divs (selectboxes) dont includes in a search if its hidden
 
@Wobot you mean you dont want to include those div to code ?
you can do this by php condition
 
I mean, is it possible if somebody first show the div and make some settings, then dont need those settings anymore and they just hideand when the div then is hidden the "hidden" settings dont get included in the search
 
6:20 AM
@Wobot what you mean by search ?
 
On my site there is a search-form. There is also some settings before making a search to sort out some results. Some of these settings are in hidden divs example: Click on checkbox "Search for pictures" > A hidden div show up with alternativ to search for smal-medium or big pictures. I choose to search for medium pictures, I click Medium pictures then click button "search". I then realise that I wantet to search for all pictures and hide the div that earlier showed up and click search again.
<*
 
I mean is it possible to "uninclude" for example a selectbox value in a search IF the selectbox is hidden?
 
@Wobot why not remove those div ? or make array those div and ignore them by if condition
(by jquery and javascript )
 
yes that the alternativ, but then I have to load them each time they will show up etc. easier (and less code) to just have the divs in the page thats why the question hit me
 
6:30 AM
@Wobot load you mean using load() or from server side?
 
I have to load the content from somewhere eitherway, if its not included in page @ pageload
or how to you mean
 
@NullPointer if you load using load() that is from serverside? (sorry I am so bad at this)
 
@Wobot noop... depends ..
 
but if using jquery example to load content from another page
 
6:38 AM
@Wobot as i understand what you want to do is ..show a div than hide and never use /show again ..
 
@NullPointer I want to know if its possible to uninclude settings (selectboxes/checkboxes etc) in a div only when its hidden
in a search
so hide div = settings not included in search, show div = settings included
 
@Wobot ya its possible ... you can so this by setting value 0 or 1 if 0 than include if 1 than hide .
 
aha thats awsome! thats for your help
 
@NullPointer just a quick question more. can you explain easy what you mean by load from serverside or load()
 
6:43 AM
@Enigmo reload page
 
if a page gets content from another page by using jquery load (ajax), it have to get the content from the server? or have I missunderstand?
I mean, new call
thats serverside?
 
@Wobot load() Load data from the server and place the returned HTML into the matched element.
 
yes, then that have be a serverside load? becuse its collection data from server dynamic (based on new call while the whole page dont have to reload)
 
@Wobot yup...
 
why not to use load()?
 
6:47 AM
@Wobot working backhand ... on php only ...
used ajax where i need ...
also check this awesome new jquery website api.jquery.com/load
 
but issent load() using ajax? but with less code?
 
@Wobot i am kind beginner .. in javascript (feel not in DS and algorithm )
@Gordon morning ...
 
morning
 
Please, don't use mysql_* functions in new code. They are no longer maintained and are officially deprecated. See the red box? Learn about prepared statements instead, and use PDO or MySQLi - this article will help you decide which. If you choose PDO, here is a good tutorial. — NullPointer 10 mins ago
@Enigmo ^^^
 
aha I couldent read the message before you deleted if I thought you wrote "Dont use jquery" or was that was you wrote? :P
 
6:52 AM
@Wobot it wasnt about jquery and its for @Enigmo to dont use mysql_*
 
sorry for all misspellings, 20h+ I guess
aha but I meant the message you deleted before
 
@Wobot yo that was ....
 
did you advice me to not use jquery .load()? or that you dident use jquery?
is there anything bad with using load()?
compared to other languges?
 
@Wobot i can not .. i don't know prose and cones of this
 
aha ok
but your a master of .php right
:)
 
6:55 AM
@Wobot noop .. i think gordon , ircmaxell ,nickc .,harkra ,daveR,peehaa,teresko ................. webrto,.igrow are master
i am student
 
whats the best page to learn php you think?
aha ok
 
you can ask about load in chat.stackoverflow.com/rooms/17/javascript room
 
oki. but thanks for the .php question, I think it will be much more eaiser and less code to include the divs from beginning (hidden) and use that method
 
@Wobot yw
 
@ShaquinTrifonoff 24 hour later...
it will connect
 
@NullPointer ha ha, no
 
7:11 AM
:-p:-P:-p:-P:-p
 
It's the network that I set up on my phone
(phone is running Network Spoofer)
 
@ShaquinTrifonoff sounds cool..... :D
hack the world ...
 
this file exists there but
its shows page not found error
 
8:06 AM
morning
 
@tereško morning ...
 
user1125394
@NullPointer epic
 
user1125394
it enters in the hall of fame
 
@cyril lol...
1
Q: Badge in Careers profile

NullPointerBadges are like awards awarded by Stack Overflow .. and it's quite good to show badges in our Careers 2.0 profile as per the image below, but currently we can only add tag badges (like php ,xml, etc.) not like marshal or copy-editor. There should be option to add any 5 badges that we'd like to...

if anyone wants to show badge in career profile ..support fr
 
8:27 AM
Here is a result for you. 49.8682 seconds for 52 pages, parsing and mysql insert 816 times. The website's response time is slow average (0.9 sec). — CanberkP 34 mins ago
 
@NullPointer +1 from me, good idea.
 
@vascowhite thankyou ..:)
 
user652649
good morning every1
 
Morning people
 
Y HELO THAR
 
@PeeHaa morning's ...
@wes morning
 
user652649
@NullPointer @PeeHaa @Charles morning
 
8:56 AM
@Charles hola
 
Morning
 
user652649
@DaveRandom morning
 
@DaveRandom morning ..
 
9:14 AM
Has anyone come across an issue where PHP 5.4 is slow on win32? It's really odd, it's almost as if it "goes to sleep" - whenever I come in in the morning and I try and run PHP (CLI or FCGI) it takes 10-20 secs to run the first script I call. After the first run it's fine. I don't think it's my script(s) that's slow, because it does matter what script I call (even php -r "echo 'hello world';" does it) - the binary take a long time to initialise.
If I run the above, the first call will take 10-20 secs, the second and subsequent calls will run as normal.
 
Apache or IIS?
 
Apache FCGI, but I don't think it matters because the CLI does it as well
It's XP Pro SP3 32-bit if that make a difference (my work are cheapskates)
I tried the same setup on another machine as well, same issue
 
Does bouncing either the FastCGI process manager or Apache before the first request show the same symptom?
 
bouncing = restarting?
 
yea
too bad about XP, next step would have been opening the windows performance monitoring tools...
 
9:18 AM
I don't have an issue with Apache serving static files but I'll try it tomorrow (it only seems to happen when it's been idle for a long time)
 
@Charles That is a very good point actually, I'll crack procmon out tomorrow and see what it's actually doing
 
@Charles Are you going through the review queue?
 
No.
I have a few saved searches for suspiciously unanswered questions.
 
9:30 AM
Need to integrate the cv review queue with the plugin so people can get review progress credits from cvs
 
Starting to dislike the new search results page... it no longer fades out questions that have ignored tags.
 
Comment on the meta post, they'll sort it out if there's enough people bitching about it
 
@DaveRandom Already had a big fat Working As Intended attached the last one, might try a differently worded plea.
 
@Charles We should create a gist for stuff like that
 
The big one is easy, really. /search?tab=newest&q=[php]%20answers:0%20closed:0
WHERE DID MY AMPERSANDS GO
 
9:33 AM
lol
 
wtf chat.
no ait
wait
..... I'm a stupidhead
 
Shouldn't they be = and not :
Oh right lol
 
chrome didn't copy the URL to the clipboard correctly
 
Yeh it does that, making the web nicer for n00bs and simultaneously making it more difficult for developers
At least it's not as bad as old FF, which used to fail to encode the spaces in the address bar so you got a 400 most of the time.
That used to piss me off royally
 
Never had the misfortune to encounter that one.
 
9:36 AM
If was like FF3 or something where I had it, seems like a long time ago but probably not as long as I think...
Speaking of which:
1
A: Modify jsm in omni.ja

Wladimir PalantCurrent Firefox versions have a cache inside omni.ja itself. If you remove the file jsloader/resource/gre/modules/AddonUpdateChecker.jsm from omni.ja then Firefox should start looking at your modified modules/AddonUpdateChecker.jsm instead. Additionally, you want to specify -purgecaches command l...

wtf Mozilla
That is not documented anywhere
(although to be fair I haven't tested it yet)
 
foreach($user as $u) { $u->greet($time_of_day); }
 
throw new MondayMorningException('blegh');
 
throw new OutOfCoffeeException();
 
throw new LifeException();
 
throw new SmallPhoneKeyboardException();
 
9:45 AM
@Oyeme Jesus, is it really that bad?
 
Okay, maybe not
 
@DaveRandom yea..
 
Only markdown I'm afraid, no inline html
[tag:cv-pls] is what you want
 
throw new Doh();
 
9:50 AM
im so lazy to work..man..
 
then play...
 
Throw new NoBackticksInAndroidException();
 
@webarto So that's why you never manage to get anything useful done...
The line between work and play is quite blurry for me...
@ShaquinTrifonoff What, really?
 
Hi everyone.
 
9:54 AM
@DaveRandom Actually, yesterday (Sunday), I did amount of work equal to entire December. Solving problems is fun. Making money even better :P
 
@Dave 'hacker's keyboard' has backticks though
 
@ShaquinTrifonoff I know a guy with an alt keyboard app where you can enter ascii codes and unicode code points which would sort you out, bit of a pita though
@ShaquinTrifonoff Oh right, winner
@webarto Kind of proving my point there mate, you managed to do a month work in a day :-P
Are you freelance or do you have an actual job atm?
 
@DaveRandom I've got more serious problems :P kia-forums.com/kia-ceed-forum/40709-help-pulling-left.html
 
@dave 'keyboard with ctrl key' also has `'s, btw
 
9:59 AM
@webarto There are multiple possible problems here. 1) vBulletin. 2) Pulling left. 3) Kia.
 
@webarto Just needs the tracking pins tightening, shouldn't be more than 5 mins work for a proper mechanic, probably doesn't even need jacking up. My Fiesta used to do it, cost me £15 to sort it out and it's been fine ever since.
 
@Charles I'm questioning last one :P
 
@Charles lol +1
 
@webarto can I take your one min please.. i just want to ask..if I want to know logic behind a price calculator then where can I ask this on stackoverflow..
 
ftr "ce'ed" would probably make it into my top 5 most ridiculous car names ever
 
10:02 AM
I mean on maths or programmers or on which section..so that i dont bother the related.
 
@DaveRandom Everything is tighten up, and straight (done wheel geometry etc), but still pulls to the left when you let go steering, I think the rims is egg shaped and bounces up and down, so it doesn't show as fault on "wheel balance machine".
@DaveRandom It's Cee'd :P
 
herro
merry christmas and happy new year (belated) to all!
 
@Sharmaji Hm, sorry, I really don't know.
 
0
Q: Jquery validation engine, Prompt doesnt appear if called by ajax

ChristopherI am using callback function in the sign up form to check username validity. validate[required,funcCall[username_check]].. Here is the javascript function function username_check(field, rules, i, options) { var username = $('#username').val(); if (username == "" || username.length <...

ne1 ?
 
@Christopher Does this look like Javascript chat? No? Well, that's cause it isn't.
Begone, vile jQuery question! Begone!
 
10:04 AM
Oh common..
 
@Charles chill dude
 
@webarto thanks for replying.. no issue... :) :)
 
people constantly post JavaScript questions in here.
 
There's a difference between simple JS questions and wandering into PHP chat to just blatantly drop in a jquery question link without so much as a simple greeting.
 
@webarto Aren't you driving on the right though? That guy is suggesting it's the camber that does it, unless you have a concave camber it should be pulling right if that's the issue. If it still pulls left when you drive on the right it's just badly tracked/balanced
 
10:05 AM
ahh yeah I mean I see that
like the whole idea of going in any chat for that matter and dropping questions with no greeting (vampyrism)
 
@Sharmaji What exactly do you want to know?
 
btw hello @DaveRandom
 
@DaveRandom I want to know about the logic behind ukessays.com/how-to-write/write-business-essay.php ..I know the ajax , php and how to implement this.. but I want to know the formulae only.
I know how to do this using ajax but dont know the formulae behind price calculator
 
@DaveRandom Roads are disaster, but I have other car that doesn't behave the same, I switched entire wheel set, and now the good car is slightly pulling, so probably the alloy wheel is too soft and gets deformed quickly (on the inner side, etc). Thanks :)
 
@DaveRandom Get a price calculator
 
10:12 AM
^ and then kill please
 
@hakre please make a perfect function,,, thanks,,,, its urgent!!!!
 
works always, is very fast: die();
 
@Sharmaji Well it's more important that you understand what you want to implement. Presumably you are trying to implement a pricing calculator for some product or other that you/your client is trying to sell? Well, what you need is the algorithms behind that pricing model, looking at someone elses won't help that much.
 
@DaveRandom thanks for replying DavRandom website
.. I am unable to have the algo from the price calculator.... client says I want the same like this website....
I dont have any idea about this....
 
@hakre Death to xml2array! I wonder if whoever wrote that piece of crap ever thought it'd still be used today...
 
10:18 AM
@Charles now accepting delvotes
 
@Sharmaji OK well that's a classic "not thought it through" client request. You need to say to them "I can implement the same style of UI, but you need to tell me what you want to charge". What they are doing at the moment would be me walking into a supermarket and telling them how much I am going to pay for the things I have in my trolley, based on the fact that that's what some other supermarket charges. You can't be expected to decide how much they charge for their products.
 
@Charles Let's create a website for it an claim copyright and say one license is only 9.99.
 
That's my $0.02 anyway.
 
And then we file DMCAs against sites like SO who have the code somewhere ;)
 
@DaveRandom thanks again..need to do the same...thank you...
 
10:20 AM
@hakre Make sure you throw a few super::$tatics in there if you are going to do that
 
@hakre Devious. I like it!
 
@DaveRandom and a $dom = "\x73ee\x70"; $$dom(1); here and there.
 
Security through obscurity ftw
 
Random Trivia: my helpful flags atm correspond to my favorite jeans model
 
10:32 AM
the calculator on that site looks like a + b + c + d = total. doesn't seem that complicated?
 
@Wonder I also assumed the same but want to be sure about this..
 
Beginning to seriously wonder who told these people that you could do file uploads via ajax...
 
@Sharmaji i mean, your obvioudly gonna need to know the price of each item. but once you have them, add them up.
 
@Charles well it's the natural conclusion
@Charles the link OP mentions is about the FileAPI
 
Gah, cancel the CV on that one.
Yeah, didn' tnotice the File API call out.
 
10:43 AM
@WonderBred ok... but if you will closely check this then you will find that if i am having static pricing of everything then after changing selections they should not vary too much.
 
@Gordon Random Trivia: 1972 was the longest ever year in history, as it was a leap year and had 2 leap seconds added at the end.
 
{
"data": [
{
"name": "Eldhose George",
"id": "538262047"
},
{
"name": "Shafeek Mohammed",
"id": "592753174"
},
{
"name": "Ashok Raj Venkatachalam",
"id": "615640685"
}
{
"name": "Vashu Gupta",
"id": "100004922282692"
}
],
"paging": {
"next": "https://graph.facebook.com/100001279683939/friends?fields=name,id&limit=5000&offset=5000&__after_id=100004922282692"
}
}
how to get the pageing url fri=om this?
 
$obj->data->paging->next
 
can u make it simpler?
 
Or $obj['data']['paging']['next'] if you pass true to the second arg of json_decode()
 
10:47 AM
am not that much good in php
 
where $obj is the result of passing that string to json_decode()
 
use json_decode($variable), then use var dump() to see the path to the object
 
@Sujaysreedhar OK so if you have that JSON string in a variable called $json, it's $result = json_decode($json); var_dump($result->data->paging->next);
 
10:48 AM
ok ok thanks
 
Morning.....
 
@Oyeme Sorry for random ping
 
@jhonraymos morning
 
Why do people think that screencaps of phpmyadmin are adequate to describe a table?
 
thanx....
 
10:50 AM
@jhonraymos thanx..????
 
@DaveRandom thanks
 
@NullPointer did you find any user..?
 
run the same command with --libcurl. It'll dump C code. there you can see what switches are needed to be set in PHP-curl. — shiplu.mokadd.im 13 secs ago
 
@shiplu.mokadd.im That's such an amazing response that I expected it to come from @hakre, not you.
 
10:58 AM
Grrr bugzilla.mozilla.org is down :-(
 
And by amazing I meant jackassy and hilarious.
 
@Charles I wrote a program long ago just to parse that C code and make a valid PHP code. Written by Perl.
 
@shiplu.mokadd.im I've now added that to the list of things I never thought I'd read
Okay, my wife's computer just turned on at 3 AM sharp. In related news, it's 3 AM sharp. I think I should go to bed.
 
Isn't quicker just to, y'know, read the docs? :-P
 
@DaveRandom But that requires effort. If half of the people asking questions exerted effort before asking, we'd have half the question volume and half the quality problem.
 
11:15 AM
in json_decode($var,true ) what dose the true denotes? '
 
bool $assoc = false
 
@Sujaysreedhar It converts objects to associative arrays. Which the manual page will tell you ;-)
 
@Sujaysreedhar When TRUE, returned objects will be converted into associative arrays.
 
thanks @DaveRandom and @Oyeme
 
@Oyeme why title ?
 
11:18 AM
@DaveRandom when i do this var_dump($result->data->paging->next); i get it as null
$url="https://graph.facebook.com/me/friends?fields=name,id&access_token=".$temp_sesid;

$me = file_get_contents($url);


$data = json_decode($me);
foreach ($data as $name => $value) {

foreach ($value as $entry) {
echo '<div><a href="get_by.php?uid='. $entry->id.'">' . $entry->name.'</a></div>';
}
}
var_dump($data->data->paging->next);
 
VICTORY! Mozilla fought I hard battle but I have won! I can now actually debug my problem. Now, if only I could fix it...
 
@NullPointer thanks,I'll fix it.
 
@Sujaysreedhar Please show print_r($data); after the json_decode() line.
@Sujaysreedhar Ow wait, it should be $data->paging->next, sorry, my bad
 
@Oyeme yw
 
ok
:D
@DaveRandom thanks its workin now
 
11:25 AM
superuser.com/a/529222/95576 this guy just "fixed" something I was trying to do for about 6 hrs last night
@Sujaysreedhar Cool :-)
 
@DaveRandom actually am trying to list all the friends in facebook
 
@Sujaysreedhar I'm afraid I know pretty much zero about the FB APIs, never done anything with it
 
Wow. I have 170 rep on SU
 
@DaveRandom i haven't used php sdk but am using it by script written by me
 
@DaveRandom is there a way to prevent the page from being out of exicution time?
its a big queary
 
reputation 1 )
 
11:56 AM
@hakre i would allow you give me sleepless night today ....
3
Q: Finding the depth of a json in PHP

xendrasIn the html page I can get any one of the below mentioned jsons, now in order to know which json is recieved I need to check the depths of these json objects. can somebody suggest a way to get the depth of json object in PHP. The two formats of the json are mentioned below: { "Category": { ...

I there any faster way to get array depth ?
nmap -S @NullPointer
 
@Baba hola
 
hping3 while {1} { hping send "ip(saddr=1.2.3.4,daddr= @PeeHaa )+tcp(sport=4231,dport=80,flags=s)
 
@NullPointer how are you doing today
ping @DaveRandom -t
 
@Baba good... how you ?
 
12:01 PM
@Baba Brace matching regex maybe, whether that would be faster is definitely up for debate though, and it would most certainly require better regex-fu than mine to ensure that braces in string literal data didn't trip you up. I know that sort of thing is possible though, I have seen it done.
 
@DaveRandom lol .... regex-fu
 
@Baba I'm pretty certain that with a minor modification to the PHP source you could do it though, the json lib does know what the nesting depth is because it has flags to control the max. Obviously customising the PHP source is not really a viable option most of the time though...
 
Please don't click on this link .. It might remind you of your childhood and you must waste about 2hrs or more there : The LINK florian-rappl.de/html5/projects/SuperMario
@DaveRandom exactly .. that would really be an interesting feature
@DaveRandom even RecursiveArrayIterator does not have depth
 
Really? That sucks
 
I think i can come up with a solution array_walk_recursive but its not clean
@DaveRandom yes it does not have
 
12:07 PM
supermario I like it ))))))))
 
@Dezigo lol i told you not to click on that link .. its very bad
 
@Baba php.net/manual/en/class.recursiveiteratoriterator.php does, don't know if you could concoct something with that?
 
@Baba :D wtf, how to shoot using cookies?
 
@DaveRandom that is what i used see stackoverflow.com/a/14193761/1226894
@Dezigo no idea yet
 
:(
 
12:12 PM
@Baba oh.. now I can't work..
 
@Oyeme why do people click on link when they are asked not to ??? you are on your own
 
@Baba DAMN YOUUU /me plays super mario
 
@Baba yea.. psychology..
 
@Jimbo now i wish my chrome can crash so that i can stop this game
 
this game eats so much memory..fck
 
12:17 PM
hai all
 
@Oyeme lol chrome has been taking too much memory lately
 
i am new to php , i am creating a web service for get and post data
i done with basic get
now i need to post it
 
@DaveRandom array_walk_recursive would work but not clean
 
@baba @Oyeme help me on this
 
@Baba I stopped playing the game after I understood there was no opportunity to shoot with cookies: {
 
12:20 PM
@Dezigo there is ... the issue with the game is that the help information is not in English
 
@SAHIL use if(isset($_POST['your_post_action'])){ //yes .its post }
 
@Baba oh yes.. there is another way to do it,I can view the source code :))
 
@Dezigo its better i don't encourage you ... :)
 
@Baba hiya :)
 
@PeeHaa :) how are you doing
 
12:23 PM
Terrible. Still having a nasty cold. And no time to take time off from the job :(
 
@Oyeme thanks for ur response , can you please tell me in detailed , because i very new to php
 
@PeeHaa am having headache my self .. but i have a solution i must deliver on
 
@SAHIL there are a lot of tutorials in the web.. w3schools.com/php/php_post.asp
 
@Baba event.keyCode -> 17. its CTRL!
 
@Oyeme One does not simply link to w3schools
3
 
12:26 PM
@Dezigo Daammmmmmmmm you I hate you .. now i have to lunch the game again
 
Hey, having issue in URL rewriting for a URL with more than one query string params
 
@Baba :D haha
it's working.. :))
 
BRB everyone @Dezigo just spoiled my day
 
@Cody use mode_rewrite
 
12:28 PM
here's the link to the question with details
 
@Oyeme thanks
 
oh yes, that's me :))
 
0
Q: Rewriting Query String URL in htaccess with 301 Redirect

CodyI have tried to find a solution to my problem in the other asked questions on Stackoverflow, but though there a lot of such questions answered for the exact same question yet it is different because I am asking as to how I should define more than two query strings in the ReWrite Condition, I am ...

I am not able to understand as to how I should define more than arguments in the query string rewrite condition
 
so hard to choose between NARQ and too localised :/
 
lunch time..
 
whats up with that rep?
 
@qwertymk bounties
 
ooh, he must be like Django... a bounty hunter
is there a list of all the blogs that the php chat follows?
 

« first day (814 days earlier)      last day (4119 days later) »