« first day (961 days earlier)      last day (4213 days later) » 

01:30
Writing unit tests in C is much harder than in PHP. Testing is one area that dynamic programming is incredibly useful.
is it possible to input nested data into MySQL database using a PHP for? (Structure: 1.first name, 2. last name, 3. phone numbers, (start nest) 3.1. Mobile Home, 3.2. Home phone, 3.3. Work Phone) so 3. Phone Numbers don't have any data except starts the nest, ultimately i'm going to outout the database to json format - PLEASE ADVISE/HELP (i'm new to PHP)
form*
"Using a PHP Form?"**
"3.1. Mobile Phone"*
@Michael nah i don't think PHP supports relational databases; sorry about your luck.
Need help with checking if email exists with jquery validation: Here is my code:
Javascript:
i don't know much, but i can tell you that that javascript is not going to do anything.
jQuery(function(){
    jQuery("#signUpemail").validate({
    	rules: {
    		signUpemail: {
    			required: true,
    			email: true,
    			remote: {
    				url: "/inc/1x7dsL3-email-Ez7iv91.php",
    				type: "post",
    				data: {
    					email: function(){ return $("#signUpemail").val(); }
    				}
    			}
    		}
    	}
    	});
}
01:45
oh, that javascript
Here is the PHPfile
$result = $db->prepare('SELECT * FROM members WHERE email=?');
$result->execute(array($emailInput));

$count = count($result->fetchAll());

if ($count > 0){
	echo "0";
}
else {
	echo "1";
}
return;
The email textbox should validate as soon as it loses focus, but it doesn't and I can enter emails that are already in the database and still get through. what's wrong?
?
where are you setting the $emailInput variable in the PHPfile?
also, what is a PHPfile?
I meant PHP file
@dyelaw i have some JSON that i keep up to date by editing the file manually, every time someone email's me the data, i input it myself, i want to make a form where they can input it themselves and it'll update the json file, i've read that a MySQL Database can output json with some scripting (which i've tested), but i need to figure out how to get the data into the database first
@dyelaw ultimately this is the json i need outputted, how can i make it so a NON-Coder can update the json?
"LastName":"John",
"LastName":"Doe",
"PhoneNumber":[
{"MobilePhone":"555-555-5555",
"Provider":"Verizon"},
{"HomePhone":"555-555-5555",
"Provider":"AT&T"},
{"WorkPhone":"555-555-5555",
"Provider":"SBC"},
]}
@Michael: you should probably just keep updating it manually.
01:49
Forgot to add $emailInput = $_POST['signUpemail']; at the top of the line, but that doesn't make any difference
ok, because you're not posting 'signUpemail'
you're posting key => value pairs set in 'data'
so you're posting 'email'
@dyelaw so you don't think there's a way to make some kind of form?
should email be signUpemail ?
signUpemail: function(){ return $("#signUpemail").val(); } ?
@Michael not that i'm aware. like i said, php isn't good with relational databases; and forms, well that's just crazy.
you might try googling 'php + mysql' though, see if you get anything different.
@DemCodeLines that might work
@dyelawn It didn't make any difference :(
01:52
ok thanks
@DemCodeLines hmmm... might have something to do with the 'url'. i'm not sure though, javascript isn't my strong suit.
but i seem to remember that there's something important about paths that begin with /
I changed it to just this:
jQuery("#signUpemail").validate({
	rules: {
		required: true,
		email: true,
		remote: "/inc/1x7dsL3-email-Ez7iv91.php"
	}
});
@Michael where are you getting the provider data?
for the mobile phone numbers?
@DemCodeLines man, that looks so right. i'm stumped, sorry.
:( Its ok
02:12
@dawlaw thats dummy data, its actually used for music data: real data url godsgypsychristianchurch.net/music.json
0
Q: Update JSON through a form?

Michaeli have some json that i keep updated manually, but as the data is sent to me via e-mail, the more data the comes in the more time i'm spending writing json is there a way to build a form that will take some data (text & uploads), and write/output JSON into a file or database? - i've tried resear...

02:45
@DaveChen Hello
Do you wish to stick with the json approach or with the database?
@DaveChen how would it work with the database?
Instead of saving to a file, you could save every user's contact information in the database.
@DaveChen the form is working perfectly, but is there away it can write the data to a .json file and maybe collect all the entry's into one file?
02:57
So a schema for the sql might look like

ID, FirstName, LastName, Photo, MobilePhone...
1, Dave, Chen, Avatar.png, ---
2, Michael, ---, ---, ---
For multiple users?
@DaveChen - i've almost no experience with this, i'd be willing to hire you if you have the time and would like to help me
i'm just getting into this type of programming
I can write the code for the database approach if you want.
Do you have MySql running on your server?
Dave, i really need some help - i donate my time to the church to take care of the website, but i need some help because its taking up too much of my time to do so
I'm willing to help you. Are you running MySql on your server?
Yes
but let me write-up the real things i need one second please
03:03
I'm assuming this is a contacts form for the church's website. After the user submits his/her data, how will the information be shown on the website? (Or is it just for staff eyes only?)
@DaveChen almost done, one moment please
No worries :D
@DaveChen i'm gonna ask the question in SO that way you can gain the points, One second while i finish writing it and i'll give you the link
That's not necessary, please post it here.
@DaveChen sorry, i was lost in other windows heres the link
0
Q: Creating a form to update JSON Data with MySQL

MichaelThis is the output i need { "album": "Text_Input", "artwork": "DefaultURL/http://www.ggcc.tv/ArmyoftheLord/Army%20of%20the%20Lord.png/OR Overwrite with Uploaded Image", "church": "City Name And State Wich can be selected from Dropdown Menu", "cityartwork": "Default URL Will Be Se...

@DaveChen Also i wrote some info, into the json itself, and yes i do have MySQL on my server
03:13
so a text field for album, artwork, church, etc, etc?
and tracks is a variable array, which means you could upload 1 or 10 tracks that go with this album
Only the staff are able to upload new albums right?
@DaveChen Album=AlbumName(which can be typed in), Artwork=a default url would be set, but if a image is uploaded to the servers, its url would be used, church: this is going to be a city name church can be selected from a drop-down menu, des: will be a description of the album(which can be typed in), release date (self explanatory), and then the array of tracks would be a name for that track and its associated file which would need to be uploaded to the server
03:32
@DaveChen Dave? you there?
Working on the script :)
What is church? City name and state...so isn't that 2 values? or just one select box?
Oh just read previous post :), it's like a brick of text
no, its just going to be options form a drop down menu like "New York NY" or Los Angeles CA" and so on
yes
@DaveChen Thank you so much!
03:52
Done :) here's a preview 24.79.127.251/addcontact.php
note that files will be uploaded to 24.79.127.251/tracks
@DaveChen Checking it out right now, hold on
At the end, it outputs to json
@DaveChen Amazing!
just got two files on my side
completely amazing, just a couple questions, 1. can album artwork value be changed if a image is uploaded in it's place, 2. can the outputted json be collected to a single file? you see how i have godsgypsychristianchurch.net/music.json - also Dave i am going to need alot of help, i need to build a custom CMS and this is one of the most important parts, can we work something out, through paypal? or i get get you some iTunes or Amazon Cards or something in return
04:00
1. you mean no replacing, the best method is to generate a random filename so that none replace
2. Single file? So multiple albums in 1 file? Possible
umm, i'm not sure with 1. and yes to 2.
you're saying that if you upload 2 files with the same name, it would replace it
if you put the uploaded files on the server with randomly generated names, then it won't conflict
How is ID generated?
no, artwork's value is set to "http://www.ggcc.tv/ArmyoftheLord/Army%20of%20the%20Lord.png", which is good, but if i have another image on my computer (for the album), i'd like "http://www.ggcc.tv/ArmyoftheLord/Army%20of%20the%20Lord.png" to be rewritten with the newly uploaded image's url (this image should also be saved to the server
ohhh so upload -- (if upload is empty, default in this) got it!
how is {"id":"All Things Are Possible", generated?
yes!
oh, when i didn't know how to write json, i used CouchDB and it wrote other stuff that i didn't need
04:07
ohh I see it, it's just taken from Album Name
yeah...
i think the UI i was using to input the data was called Futon and it wouldn't let me delete those entry's so i just putted the album name in there
is there anyone familiar with OAuth2?
@DaveChen BTW i accepted your answer and upped it also
Completely amazing scripting Dave
@1337holiday it depends on what you want
suppose I have a refresh token, how much times can I use this token to obtain an access token?
I have read quite a bit of sources on this, most of them say a refresh token never exipres, thats cool, however does that mean it can always be used to get the access token?
04:12
@1337holiday from what I see - it's implementation-dependent
right, unfortunately, I am not implementing the server side stuff
the api I am using is salesforce's OAuth webserver flow
so follow the API documentation
yes, I am following their documentation and as I said, can get a refresh token
however is it possible to use this refresh token multiple times? Isnt this something that is in the OAuth2 spec?
I don't think so
OAuth2 doesn't even require server to produce any refresh token
damn thats not good....
the thing is, my app is very weird, the company that I work for has a central server that handles statistics for users
their data needs to be ported over to salesforce on behalf of them
since they mainly interact with salesforce, it would be bad design for them to simply come to our server, authorize OAuth2 and then go back to SF
im stumped, any ideas?
04:19
@Michael: check the update, 24.79.127.251/addcontact.php
as for merging jsons, you can tell php to parse it, then push the array, then encode it back to json
@DaveChen AWESOME! i see the upload option and when i don't use it the jsonout outputs "Default Set from PHP" perfect!, and when i did upload a image the file went into /artworks, but also when i did upload a image the json still outputted "Default Set from PHP" but like i said the file did, go to the server
I changed $_POST['artwork']
was it supposed to be $_POST['cityartwork']?
hmm?, i don't know ?
Oh, you weren't asking, you we're telling LOL
artwork will be ggcc.tv if no file was uploaded
one sec, i'll give it another shot
04:26
I didn't change the script, you'll get the same results
I'm saying I only changed artwork, cityartwork I thought was a default value that would never be changed by the user
oh, ok.. let me know when then i guess
i'm sorry, but im not understanding
what should happen with cityartwork?
ok... hold on i'll type it out
1. a image should be uploaded, 2. that image should be saved to the server, 3. the url to the newly saved image should be outputted into the json, 4. if there is no image uploaded the json should output a "default url" in its place
for which $_POST[ ?? ] value?
"artwork"
04:31
I believe that's what it currently does. cityartwork will always be Default set from php
this -> "cityartwork": "Default URL Will Be Set/ This input is hidden",
since it's set and hidden, I decided to set it with php and ignore user input for this value
yes, i have to make the images for each city yet to assign options to \"cityartwork"
oh so if city = ny, cityartwork = ny.jpg?
Yes thats fine
Yeah, that'll be great if possible
i didn't that can happen
for $_POST['cityartwork'] = ---- change it to

$_POST['cityartwork']=$_SERVER['HTTP_HOST']."/cityartwork/".$_POST['church'].".png";
then create a new folder called 'cityartwork' and have the images called 'New York NY.png' and 'Los Angeles CA.png'
WOW!, i just saw that in the output
Your Good
04:36
now the last thing is merging right?
Yeah, how to keep everything in one file, but i want to mention something (because i'm not sure if it will alter the way you need to code or not), later i need a script that can edit entry's or delete them, that and other things which need to be like in a admin area so i can give out usernames and passwords
eventually, thats what i need to make (like a custom CMS)
This sounds like a fun project :)
the current method right now doesn't allow for that much customization
if you would like, provide more details and I could potentially create this custom CMS with logins
Yeah, its gonna control music albums, a bible study directory (PDF Files/eBooks), Audio Sermons, and alot more, which is all free for everyone to be blessed by
what are you using to parse music.json?
oh I see now
very impressive
Dave, this script will help me a lot, because theres a bunch of CD's i need to input, but like i said i need a CMS, i'd like to be able to contact you on a regular basis, and i'd be happy to offer you something in return
yeah, music.json is fine
i can write up a complete list of things i need the CMS to do and email it to you
and you let me know what its worth to you for your help in return
04:43
I see now that you are using /music to parse music.json into one big music application/browser
yes, i'm using that music.json file i sowed to you make ggcc.tv/music
very impressive
yeah it is, but it took me a couple of years to figure it out, and its very hard to maintain, there's like 20 church's that send me all there data and CD's and i write it in by hand, and i donate my time, and theres no one else who can help me, since i'm the only one who has some type of coding skill's
sounds very tiring
so i' trying to put together a CMS to help me, and for those who are a little computer savvy, can assist
yeah it is
but alot of people love it and are blessed by it
04:46
I'd like to be able to contact you, what services do you use?
Services?
oh, i use gmail and skype
like msn, facebook (probably not)
LOL, myspace (jk)
haha, can I add you on skype?
no i don't use social networks - i have a twitter and facebook account but almost never use them
yes, michaelggccla
04:48
wow this site is amazing...the songs are awesome (I'm a christian btw)
Well then, God bless you brother, and yes the songs are amazing, You'll love them - but some are in our language "Gypsy Language" but there are a lot of them that are in english as well
there also a shoutcast radio station that you can stream, and there's also a iOS and Android app that i had made
what is Album Page?
05:55
Hi guys, is there any person who knows joomla component development ?
06:20
Hey guys,

I am in need to build an application for web that has video conferencing and screen sharing feature.

I am just wondering if its all possible to do it in PHP/HTML or is there other technologies required.

Note: I dont want to use Falsh
morning
in HTML / CSS / DOM & web design, 10 secs ago, by Caprica Six
 ____________________
( very good morning ? )
 --------------------
        O   ^__^
         O  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||
MoRnInG
06:28
@NullPoiиteя Back from trip?
@Mr.Alien canceled the trip ... :(
@NullPoiиteя Good na, cuz it must be real tough to move around in scorching heat
good afternoon folks
@YogeshSuthar mornin
yupp .. that is why i canceled ... will go this month on 24
06:31
@NullPoiиteя cool... thats wise
its noon @Mr.Alien :)
@Mr.Alien :)
@YogeshSuthar aaaa am busy fiddling with my new tab, so didn't cared what time is it :p
@YogeshSuthar nahhhh :P its still 11.59 :P
@NullPoiиteя Sync your clock
06:32
@NullPoiиteя yes sync your clock here its 12:02
I guess there's a difference between timezone here, and rajasthan, lol
yeah its of around 4-5 minutes difference
@YogeshSuthar LOL nah, there's no difference, 4-5 mins is wayyyyy too much
06:34
I recently went there that's why I know @Mr.Alien
@YogeshSuthar Nope, no difference
stackoverflow.com/q/16891060/212940 and how does it get 2 upvotes?!
@Mr.Alien Yes there is difference. :)
@vascowhite there are enough stupid 15+ users :D
I guess calcutta has a difference ... mmmm 8 mins
more -2 and I am deleting that question, muhahahahaha
06:40
@Mr.Alien Yeah I checked there is no difference. May be there railways having wrong time
@YogeshSuthar See.. and never follow indian railways
@Mr.Alien lolzz.....
Someone an idea what this name could be ? Sören
@Duikboot Oh wow, a question apart...
Its stored in my DB like that as only record from 100 ones but I can't make anything of it :P
06:44
@Duikboot its Søren
yeah?
Changed it to that one :-)
@NullPoiиteя Nice diagram, but those free hand drawings should be red shouldn't they?
Dose anyone know how joomla 2.5 MVC works
Is there an easy way to generate a ZIP download?
http://pastebin.com/0xED3DwJ

I craeted this one but I found out that when I press 'download zip' it downloads a zip file but when i extract it
I got a ' test.zip.cpgz ' file... and not my zipped files :/
Morning Folks!
Any Zend Geeks here?
my bootstrap file says that it extends from Zend_Controller_Booststrap_Bootstrap
but where to find this file(super class)?
07:04
Gooooodmorning!
@vascowhite :P
@tereško Rampaging same user :)
@tereško Still bored with the job
07:20
0
Q: what happen when we create file in computer? How that file and it's text being saved on harddisk?

JimitCan anyone explain me what computer do when we create text file and save the data into it? How it store the data into file? How it will read data from harddisk?

@Jimit You should ask this on superuser.com
byw , did anyone watch GSL finals this weekend ?
@Jimit Why does a Zend Certified Engineer have to ask such a basic question?
@vascowhite lolzzz... May be they are not teaching them this things. :P
@vascowhite Not necessary that a zend certified eng should know everything, many users learn things on their own, about the web, doesn't know some concepts..
07:34
@Mr.Alien Yes, I'm self taught, but that was the kind of thing I learned first, over 30 years ago. Maybe it was easier then as OS's and computers in general were simpler.
"Zend Certified Engineer (ZCE)" --- NO WAYzerkms Apr 26 at 12:16
good mornings :)
Morning.
@vascowhite Yea, but what I meant was that Zend != How Computer Works, they are totally totally diff
@hakre gm
@hakre morning ... php cowboy :D
07:36
morg
@Jack 1/2 more to go
=D
@Mr.Alien Oh, I see, but I think any half decent programmer should have some knowledge of how a computer does its stuff. Don't you?
@Jack lolz... you are closing 100+ upvote question.
07:38
9 but still not delete :O
@YogeshSuthar yep :)
It needs 10 me thinks.
@vascowhite Depends in what field is he interested in, like graphic guys don't care how pc works, so he must be focusin web, but yes, a small search can answer his question
(plus shit-question)
@Jack May be , I voted for it.
07:39
close both as the dup of other :P
I hate questions like these, theory based
0
Q: CSS - spacing columns individually

user1166981For purposes of my javascript sort, I must keep the Thead at a fixed width. There is 5 columns, and I want the first column to be twice as wide as the others. I tried inserting <divs> into each cell on the column row and styling the widths that way, but it doesn't have any affect (unlike the tbod...

I didn't understood how I got a delete vote button on this question ^^^
there should be another certificate ZCCE
@Mr.Alien Because you have 20K+ rep points.
07:45
well ... that guy has singlehandedly destroyed my last illusions about Zend certificates
I think I should use this on my profile now
@YogeshSuthar Than too question should be at -3
@NullPoiиteя Oh seriously he is certified.. RESPECT
@NullPoiиteя LOL, he will be happy to get the rep back from those questions
i would like to give him another certificate ZCCR (Zend certified crap engineer ) :D
2
Thank God I am not ZCE :P
07:52
damn its ZCCE :(
good mornings
Hi Vaibhav, I have created my project "quickstart" in /var/www/uday_sagar
and now when i give
localhost/uday_sagar/quickstart/Uday/index
@NullPoiиteя it actually is an easy task iirc
actually, i created UdayController and echoed something in indexAction
but when i give localhost/.../public
it prints the index.php
which is in public directory
why is my controller's index action not getting called?
Hello

« first day (961 days earlier)      last day (4213 days later) »