Search found 191 matches

by Live24x7
Mon Feb 04, 2013 1:09 am
Forum: Javascript
Topic: signature with a callback
Replies: 1
Views: 2396

signature with a callback

Hi I am trying to figure out the use of callback functions in asynchronous requests in AJAX. I come across terms like: "signature with a callback" or "delegate" Would really appreciate if some one could explain what signature means in this context. function mySandwich(param1, par...
by Live24x7
Mon Nov 26, 2012 1:55 am
Forum: General Discussion
Topic: What is Forking
Replies: 3
Views: 3068

Re: What is Forking

so that means - with forking - the parent can keep working on a process while delegating some work on to its children.
thanks for that example :roll:
by Live24x7
Sun Nov 25, 2012 3:50 pm
Forum: General Discussion
Topic: What is Forking
Replies: 3
Views: 3068

What is Forking

What is fork() good for in PHP ? I read the documentation at http://au1.php.net/pcntl_fork but could not understand a word of what is told there. terms like PID, PPID etc.and subsequent google search leads to proportional integral derivative controller for PID - which does not seem to fit anywhere I...
by Live24x7
Wed Nov 21, 2012 1:55 am
Forum: Databases
Topic: Table from relational mapping
Replies: 3
Views: 4282

Re: Table from relational mapping

@requinix - now i see the point for the additional table.
@califdon - thanks will explore these book refereneces.
by Live24x7
Tue Nov 20, 2012 7:35 am
Forum: Databases
Topic: Table from relational mapping
Replies: 3
Views: 4282

Table from relational mapping

Hi :) Following an example from a book, I am trying to develop a 'software development collaboration tool' The tool has 3 important interacting components. 1) User 2) Project 3) Features The relationship mapping is as follows: One user Many Projects One Project Many Users One Project Many features O...
by Live24x7
Fri Nov 09, 2012 1:20 pm
Forum: PHP - Theory and Design
Topic: why use call_user_func()
Replies: 4
Views: 10267

why use call_user_func()

wondering why php provides call_user_func()

why would somebody use:

$returnVal = call_user_func("myFunction");

instead of :

$returnVal = myFunction();

any special cases where call_user_func() may be more useful ?
by Live24x7
Tue Oct 30, 2012 1:04 am
Forum: Javascript
Topic: Populating Google Chart with Data Array
Replies: 2
Views: 10596

Re: Populating Google Chart with Data Array

Turns out that you need to add colums and rows as per google visualization API. data.addColumn('number', 'X'); data.addColumn('number', 'Y (scatter)'); data.addColumn('number', 'Y (line)'); for (var i = 0; i < arry.length; ++i) { data.addRow(arrx[i], arry[i], arrz[i]); } Also worth noting that since...
by Live24x7
Mon Oct 29, 2012 3:08 am
Forum: Javascript
Topic: Populating Google Chart with Data Array
Replies: 2
Views: 10596

Populating Google Chart with Data Array

Need help with populating data to google charts I have taken this example from google chart documentation, so it naturally works correctly. var data = google.visualization.arrayToDataTable([ ['Age', 'Weight'], [ 8, 12], [ 4, 5.5], ]); if i replace this with: var data = google.visualization.arrayToDa...
by Live24x7
Tue Oct 16, 2012 5:29 pm
Forum: PHP - Code
Topic: Whats with this piece of code
Replies: 6
Views: 1181

Re: Whats with this piece of code

thanks a lot !
by Live24x7
Tue Oct 16, 2012 3:22 pm
Forum: PHP - Code
Topic: Whats with this piece of code
Replies: 6
Views: 1181

Re: Whats with this piece of code

i tried this out and it indeed returns 1 for all odd numbers and Null for all even numbers...
but i did not quite get the logic ..


when someone says ($x & 0x01) does it mean adding binary 1(00000001) to the ASCII equivalent of $x or what is it ?
by Live24x7
Tue Oct 16, 2012 12:34 pm
Forum: PHP - Code
Topic: Whats with this piece of code
Replies: 6
Views: 1181

Re: Whats with this piece of code

now that makes sense :)
by Live24x7
Tue Oct 16, 2012 10:43 am
Forum: PHP - Code
Topic: Whats with this piece of code
Replies: 6
Views: 1181

Whats with this piece of code

Can someone pls explain what does these two lines of code mean: $y = (bool) ($x & 0x01); $x >>= 1; More specifically, 1) What is the meaning of (bool) ($x & 0x01); I know bool would convert a string to boolean but what does ($x & 0x01) mean ? 2) what does this symbol >>= in the 2nd line ...
by Live24x7
Thu Oct 04, 2012 8:56 am
Forum: Volunteer Work
Topic: open source CMS PHP/MYSQL project partner
Replies: 1
Views: 7031

Re: open source CMS PHP/MYSQL project partner

seems every developer want to build yet another CMS or yet another shopping cart.
Don't we have enough of them already !!

OK if it is a learning exercise or if your idea is so radically different that it will turn the CMS world upside down

all the best :)
by Live24x7
Tue Oct 02, 2012 9:40 pm
Forum: PHP - Code
Topic: Capitalize only the first Letter of a string
Replies: 3
Views: 657

Re: Capitalize only the first Letter of a string

that works perfect thanks a lot :)

but i failed to understand how this worked ... it first lowered the case of entire string and then used ucfirst.
My original string is always all lowercase and i don't understand what affect did strtolower have on the string.
by Live24x7
Tue Oct 02, 2012 8:53 pm
Forum: PHP - Code
Topic: Capitalize only the first Letter of a string
Replies: 3
Views: 657

Capitalize only the first Letter of a string

I want to Capitalize onlt the first Letter of a string. I tried ucfirst($string) but it also capitalizes every word that comes after 'and' & ','. With ucfirst, what i get is this: Fifteen thousand, Nine hundred and Fourty-two where as i want : Fifteen thousand, nine hundred and fourty-two Any su...