Teampregar's Posts
Nairaland Forum › Teampregar's Profile › Teampregar's Posts
1 2 3 4 5 6 7 8 9 10 11 (of 11 pages)
dhtml18:Does it involve using javscript's file upload API? help me make a google search on it and post the answers here pls, right now am using freebasics(facebook's free internet service) and i cannot access google with it no megabyte sef.. |
... |
At default when the file upload tag is used it shows choose file or chose on its upload button, just like the on on Nairaland when u want to make a post. What i want to do is to change the choose text to something like 'upload now'. I have tried this: <input type='file' value='upload now'> but its not working , i know this i acheivable as facebook have it on their web app.. Pls can anyone help.. cc: dhtml18 , guru01 , CodeHouse , scoutlebest4 |
dhtml18:How much does a vps cost in naija and do i need to manage it by myself? |
So in php 7 there is no value to assign the variable to if the condition is false?? I like the former operator better. |
cbrass:K, i advise what i posted to a php developer and someone who understands algorithm implementation , i would have written the entire codes of how it will work and give to u bt i am busy dats y i just gave an algorithm. In general here i how my solution works: STACK : PHP, JAVASCRIPT, HTML, DOM.. 1. A visitor visits ur website(radio station that plays music) 2.Visitor clicks turn on radio button. 3.Onclick of turn on radio button javascript uses ajax to get any song on your server. 4.If a song was found it plays song, Else it goes to no song available error page. 5.Before javascript plays the song it sets an onafterplay HTML event attribute . 6. When onafterplay event occurs the process in number 3 is triggered again. So different songs continue to play until the Visitor presses the turn off radio station button.. |
Goodluck, on your mission, you know the service you are trying to offer now was what Evan Spiegiel(CEO and co-founder) And His Friend(Snapchat co-founder) tried to do at first bt it failed , guess what after that they worked on snapchat and it was a hit.. Who knows u and your team might be the next big thing in african techosphere |
CodeHouse, You be babanla or baba for the codes ohh..U too much.. Well OP, here is my suggestion , Your service will only work well if your market are users of desktop,tablet devices only, Because for smartphones na only default browser and google chrome dey support ajax without refreshin pages, the rest browsers like opera mini, uc web, dey refresh pages for ajax .. And most africans like dnt like using default browsers.. Then for the business logic, see how e go work.. Prerequiesties: You need to learn ajax and how to use the audio Html 5 node with DOM and javascript.. Code the media player, mediaGetter.js, and mediaController.php or whatever programming language and mediaReturner.php. //Since u said songs go play randomly.. Here is my recipi and media player cycle : START -Onclick of start radio button: mediaGetter.js should use ajax to connect to mediaReturner.php with a parameter ?cursor=new -mediaReturner.php should connect to mediaController.php , get the value of the cursor parameter ,ie, $_GET(cursor), assign a variable to the mediaControl function in mediaController.php file with the get value as an argument, ie, $song = mediaControl($_GET(cursor)); . -on return of a value from mediaControl function , do this, header(" Content-Type : audio/mp3 " ;echo $song; -do the onreadystatechange ajax stuff then u, createElement(audio) ; den assign ajax.responsrText to the src attribute of the audio tag u created, then also assign the function mediaGetter(//song name) to onafterplay event atrribute to d audio tag. -Onafterplay: if this attribute is added to the audio tag when the music finishes playing it will recall the mediaGetter function to get another song. Here is how mediaControl in mediaController.php function works: function mediaControl($a) if($a=='new') //get ur music directory as a string use list function to get list of files in your music directory like this $musics = list('/musicdir/'); //this will return as an array. return $musics(rand(0,count($musics)); note: the bracket after $musics should not be so i only used a normal bracket because i am typing with my phone. if ($a != 'new') use list function to get list of files in your music directory like this $musics = list('/musicdir/'); //this will return as an array. -Then use php pop function to remove the music that has been played from the array, ie, $musics = pop($a,$music) So that an the music that just finished playing will not repeat itself -return $musics(rand(0,count($musics)); Here is how mediaReturner.php: include 'mediaController.php'; $song = mediaControl($_GET(cursor)); if(!empty($song)) header('Content-Type:audio/mp3') echo $song; else header('Location://No music available page). That is all i can contribute cause , i just started writin this algorithm immediately i saw ur thread.. I culd have written the actual codes but i can insert some syntax with my mobile phone.. If do not knw hw to programme i sugest u show dis to a programmer he/she will understand and help u better.. Note: the algorithm may have some flaws, but u can add urs to it , what i gave is jst the basics.. Thank You. |
I like ur idea but please make it work in a way that only students in a particular university can buy something from students in that university. For example, if i am in NDU i can only see things to buy by people who are in NDU. If not how can a student in NDU buy something from sm1 in unilag , who will transport the good for them?? is it ur company??. So i advise u to do it dat way |
Welcomme:You are very right as far as one can read and write dats all, education does not only lies beyond d boundry of a university, u only go to university to specialize so u can get a job, but Nigerians will never have dis mindset, them take am sey person wey no go university nah illeterate. |
Welcomme:You are very right as far as one can read and write dats all, education does not only lies beyond d boundry of a university, u only go to university to specialize so u can get a job, but Nigerians will never have dis mindset, them take am sey person a no go university nah illeterate. |
shugacaneman:I bin tink sey na only me dey experience am 4 my opera min for android app oh, even somethings when i press back button e go carry me go the last two pages wey i visit, i tink the Nairaland Team , should update their service with a support for opera mini android browser |
Why is it that Nigerians dont always respect intellectual property or copyright, My guy ur site is a pure facebook carbon copy, dis tins fit back fire you ohh, u stole all facebook web design and experience for mobile(i never check pc), i just showed ur websites sign in page to someone(covered the name) immediately d person saw it she said it was facebook. If facebook sees this they will say u are misleading users to ur site thinkin its the actual facebook.. Ehem wehn i visit ur help page i get a 404 Not Found Error , I also observed u have to be registered before u can view the terms of service page, how will someone register in something that he/she doesnt know d terms. |
designking:Pls How do i install dis mail server and can u recommend a good one, plus do i also need to configure my php.ini file to work with d mail server? |
Utorogun Liberation Movement People since na banner una dey use speak una mind, una 4 come put d banner 4 Nairaland na, remember it must be must be borderless, 318 pixels wide, 106 pixels tall, less than 30kb in size, and in the PNG or JPG format. SMH!! |
CodeHouse:When did you declare the variable $user and why are you comparing its value with $value variable |
D34lw4p:wat does nct mean |
CodeHouse:Thanks Alot , i will try it if u have any difficulty i will let you know, nice IDE tho, i bet u use a MAC OS |
chainsaw11:Waht i want to do is , for example, seun , bob and others makes a post then i follow seun , bob and others on twitter, how do i query the database to show me posts of pple i follow based on the time they posted |
$array = array("seun", "bob" ;for($array as $a) $query = "SELECT * FROM dbtable WHERE name= $a"; $result = mysqli_query($link,$query); //Then the rest My question is, is it possible to query a table against an array in PHP and still get your result, in the above example i want to get rows of data from seun and bob |
If you are using a wampserver your servername is localhost, your username is root, ur password is empty, go to localhost/phpmyadmin/ then click on SQL tab then insert this "CREATE DATABASE yourDBname" i suggest you learn SQL tho |
Fashola to Fayemi:.This guy don convince nigerians sey bubu go treat im ear oh.. Fayemi be like: So You men sey dem blive dis guy. Lie Mohammed: Omo no be today we start to lie, i was five months old |
Understanding a problem is the first principle of algorithm, we cannot solve the problem if we dont understand what we are solving, you should explain waht d algorithm does better, wheter it is a needle in haystack algorithm (used to iterate a loop for a match) or something else, explain better maybe i can give it a try |
talk2hb1:I would also like to know how to install a mail server on my localhost, bt wat i really want to know is the reason php mail functiom ,mail(), shows error on my localhost is it because i did not configure my php.ini file rightly (i changed the mail server from localhost to stmp.google.com) or i can only use this function when i have a website |
I am using wamp server to develop a service an it requires sending emails , each time i use the mail function in php , it throws an error, please how can i configure my php.ini file to allow sending of emails throug localhost |
Stop adding all facebooks features oh, your website name already includes book, if your service gets succesful tommorow and pose a competition to facebook, they might sue you that your are misleading users to your website.. trust me dem go slay, cause U.S.A government too powerful and naija must obey block your website.. Just think of ur own features and add or remove book from the domain name |
You are theresa's daughter, cause theresas daughter is your daughters mother(mom) |
I like ur ability to tell stories with ur graphic illustrations, it shows u know wat you are doing , nice work, u will work in a big time company one day , maybe facebook or better |
Assuming i have this: //HTML <section> Hello World </section> //CSS code on a blackberry short screen phone section( height:50px ) How do i make the height to increase automatically incase someone with iphone 6 uses the website, so the section part will automatically fit the screen height of the iphone 6,pls how do i do this with CSS |
spikesC:Thanks, can u explain in anyway how prepared statements protects against SQL injections? |
Please how do i prepare a statement, bind the parameters and execute with php mysqli procedural.. Thanks.. I would like u guys to give examples.. |
larisoft:Thanks for ur advice i will check awt that Skienna Algorithm Design Stuff Dnt blame me tho i am just a 16 year old programmer with 1 year programming experience |
;
