Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,148,466 members, 7,801,179 topics. Date: Thursday, 18 April 2024 at 11:57 AM

Sayhi2ay's Posts

Nairaland Forum / Sayhi2ay's Profile / Sayhi2ay's Posts

(1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (of 12 pages)

Religion / Re: *~ Goshen360 Voted Religion Section Poster Of 2012*~ Congratulations! by sayhi2ay(m): 2:07am On Dec 25, 2012
Goshen360

3 Likes

Programming / Re: Best PHP Framework For Application Development? by sayhi2ay(m): 7:15pm On May 29, 2012
pc guru: @Timileyin i will explain the frameworks ave used and why they are cool
... Yii is very flexible, it lazy-loads meaning a class is loaded when it is instantiated, ...
'lazy-loads' means a class is instantiated when it is called.

anyhow, have used cakePHP extensively, used zend some, played around with yii and symfony ... will still stick with cake.. yii is very fast though, doesnt come with much overhead other framework comes with.
Webmasters / Re: How Do I Connect Php With Oracle 11g? by sayhi2ay(m): 6:40pm On Jan 06, 2012
minimal tolerance for concurrent access? maybe you are using the wrong engine. few inserts would be done at any given day anyways, why are you so worried about concurrent access? if you have your indexing and constraints right ,  reading from the db isnt bad at all in mysql,  i have co-developed web apps with mysql as db ,  during peak periods,  we have about 2000 people accessing it at the same time, and the server doesnt take a hit. am part of a team that manage a web app right now with about 20000 db transactions daily - using mysql,  and all is good and dandy.

i developed a learning management system(LMS) web app last year and had about 300k test record of users in the mysql Db, i simulated concurrent access and the server didnt drag.

maybe you should do some code/data structure review and code refactoring; and try to minimize mysql internal function calls in your query - if you have any.
Webmasters / Re: Which Cms Is Best For School by sayhi2ay(m): 9:04pm On Nov 23, 2011
i have a school management software i developed, maybe i can send you the source if you can set it up yourself. plan to resume maintenance next January
Webmasters / Re: Mysql :: My First Function :: Substring Count Like Php by sayhi2ay(m): 12:07pm On Aug 22, 2011
Try to avoid using mysql functions if php can easily do it, efficient when building a web app
Webmasters / Re: I Want To Bake My Website by sayhi2ay(m): 8:58pm On Aug 05, 2011
i have been using it for 2years now. really fantastic.

lemme know if you have any question on it.
Webmasters / Re: Php: Converting Timestamp To Word by sayhi2ay(m): 7:40pm On Jul 28, 2011
always try to set a default value, and set your return outside your condition.

when dealing with numeric, try to test for string > 0 ,

is_numeric('0') would return false, what do your return then ?

function get_date($unix_time)
{
$read_in = null;

if( !empty($unix_time) && is_numeric($unix_time) && $unix_time > 0 ))
{
$read_in = date("F j, Y, g:i a", $unix_time);
}
return $read_in;
}
Webmasters / Re: Please Help Me Out With Mysql Distinct by sayhi2ay(m): 3:14pm On Jul 23, 2011
select distinct state_population, state_weather, income from etc etc.


distinct will apply only to the state_population column
Webmasters / Re: Please Help Me Out With Mysql Distinct by sayhi2ay(m): 2:05pm On Jul 23, 2011
use distinct on the username, and pull other columns.
Webmasters / Re: Php Poop Quick Quiz :: Merging Multipart Arrays by sayhi2ay(m): 10:25pm On Jul 21, 2011
shouldnt your array keys be quoted?

array_unique(array_merge(array_values($arr1), array_values($arr2), array_values($arr3), array_values($arr4), array_values($arr5)));
Webmasters / Re: Website Malfunction Please Help by sayhi2ay(m): 6:21pm On Dec 16, 2010
seem someone messed with the template
Webmasters / Re: How To Create Birthday Table/form In Php And Mysql? by sayhi2ay(m): 1:32am On Dec 09, 2010
- make your DB column datetime format

- then for your input field, you can merge all the 3, and use the strtotime function to convert it to a single date format.
Webmasters / Re: How To Create Birthday Table/form In Php And Mysql? by sayhi2ay(m): 3:54pm On Dec 08, 2010
what are your input fields? and how is the date appearing currently ?
Webmasters / Re: Php Simultaneous Checking Of Multiple Records by sayhi2ay(m): 12:08pm On Nov 18, 2010
do you want to compare against the DB or the file?
Webmasters / Re: Getting The First Character Of Array Values, Php ? by sayhi2ay(m): 3:19pm On Nov 11, 2010
thanks dualcore.
my main goal is to check if letters a to z are the first letter of my data array. i have a search function that returns a list of names depending on your search string.  so say i search 'ay' in my database, it should return all the names that contains 'ay', then my snippet above will return the list of first letters of my record set. that way, i can make a list of A-Z, and just make the whatever letter i got from my snippet an active link.

so you search 'ay', you get your result.

then you can click an active link from A-Z.

say D is an active link, then the search condition will be , from the search 'ay' result set, find the records that starts with 'D'.

if the first search returns this list:
Ayo
Layo
Dayo
Tayo
Mayo
Morayo
Tunrayo
Desayo

then my snippet will return A, D, L, M, T

so when i echo letters A - Z, only A,D,L,M and T will be active links. and when you click on D, the search result = 'Dayo', 'Desayo'
Webmasters / Re: Getting The First Character Of Array Values, Php ? by sayhi2ay(m): 10:32pm On Nov 10, 2010
maybe something faster? here's what i have now.
thanks.

function firstChar($string)
{
return($string[0]);
}

$data = array('dayo','tobi','john');
$data = array_map("firstChar", $data);

for($letter = ord('a'); $letter <= ord('z'); $letter++) {

if (in_array(chr($letter), $data)) {
print chr($letter);
echo "<br/>";
}
}
Webmasters / Getting The First Character Of Array Values, Php ? by sayhi2ay(m): 10:01pm On Nov 10, 2010
anyone has a better way for achieving this ?

$data = array('dayo','tobi','john');
$firstChar = array();
for ($i=0; $i < count($data); $i++){
$firstChar[$i] = $data[$i][0];
}

for($letter = ord('a'); $letter <= ord('z'); $letter++) {

if (in_array(chr($letter), $firstChar)) {
print chr($letter);
echo "<br/>";
}
}


just need a better function cos my $data set has more than 100k records, want something faster to look through the array instead of parsing through it and then using in_array
Webmasters / Re: Coldfusion Vs Php/asp by sayhi2ay(m): 3:46pm On Nov 02, 2010
dyn:

PHP and ASP are very similar. But somehow, i prefer php because it is open source, and very easy to find help.
As for coldfusion markup language - i never saw any good reason to venture into it!

I maintain an ASP application, develop using PHP and coldfusion. PHP and ASP are not similar.
coldfusion is easy to learn but not free, PHP is also easy too
Webmasters / Re: Coldfusion Vs Php/asp by sayhi2ay(m): 2:33pm On Nov 02, 2010
Youngichou:


NOW On SECURITY
beside Php is very simple in ways that it explain security lapses and portholes now building on this you can create more Lapses.

NOTE that this is the reason why banks or a Bank will never accept you to design its INTRANET application with php because they believe its open source and therefore liable to Hackers.


though PHP has had it's share of security holes, security fix are applied before they are exploited. most vulnerabilities lie in the PHP application - poor design, XSS, CSRF, injections or lack of variable declaration - which can lead developers inadvertently allow holes in the app.
to think PHP is not capable of secure application is wrong
Webmasters / Re: Site Review (security Analysis) - Gamecdswap by sayhi2ay(m): 2:58pm On Oct 18, 2010
- put successful registration details on the dashboard, and not the sidebar above the login info, that's not where users expect to find it

- on the welcome page: add 'Messages' quick link, and then the number of new messages , e.g Messages (3) or Messages *new

- You can have a functionality where users can click that they have interest in a game CD, but they might not have the exchange the original poster is looking for , then the poster can contact whoever is interested for alternate negotiations.

- Put the Recent available items available on another page entirely, not after the profile and account section. looks weird .

- i shouldn't be able to rate another user, unless we have had a transaction. you might need to implement another rating system though, people should be able to write a short note on feedback.

Well done!!! cool
Webmasters / Re: Site Review (security Analysis) - Gamecdswap by sayhi2ay(m): 2:15pm On Oct 16, 2010
Np. Not tested the functionalities though, checked from iPad.
Why not make it open source if you are not developing for a client?
Webmasters / Re: Site Review (security Analysis) - Gamecdswap by sayhi2ay(m): 2:07pm On Oct 16, 2010
- put recent games on the dashboard
- change timestamp to 12 hours
- don't make me confirm that I indeed want to edit a message or save, I know what I clicked!
- categorize game types, Ps2, ps3 wii etc etc
- aggregate your ratings, you can create a modal box to show rating break down, n I will click it if I care to know
Webmasters / Re: Reading An Xml, Using Php ? by sayhi2ay(m): 3:47pm On Oct 14, 2010
yea, but number of files is dynamic,
Webmasters / Re: I Need Help!want To Create A Gallery Based Site With Out Flash by sayhi2ay(m): 5:52pm On Oct 12, 2010
try featured content gallery, i prefer dynamic content gallery though
Webmasters / Re: Reading An Xml, Using Php ? by sayhi2ay(m): 2:28pm On Oct 12, 2010
@dhtml: yes o

correction: the first loop is necessary as the $xml->nodeType will forever be assigned XMLReader::ELEMENT, and therefore, the other 'if' statements wont be touched.

Thanks anyway, solved my challenge.
Webmasters / Re: Reading An Xml, Using Php ? by sayhi2ay(m): 6:37pm On Oct 08, 2010
btw - my first 'if' statement is not necessary, was trying to loop with it, but not anymore.

my xml file would ALWAYS have an element, so the first 'if' statement will ALWAYS be true, meaning $article[$name] is valid at ALL times.

thanks again.
Webmasters / Reading An Xml, Using Php ? by sayhi2ay(m): 6:30pm On Oct 08, 2010
<Document>

<PubDate>2010-10-10</PubDate>


<Categories><![CDATA[Animals]]></Categories>

<Authors><![CDATA[<p>Ay Dot Bleep@yahoo.com</p>]]></Authors>

<Headline><![CDATA[<p>This is a 9th headline</p>]]></Headline>


<Excerpt><![CDATA[<p>This is a test story. This is a test story. </p>]]></Brief>

<Body><![CDATA[<p>This is a test story. </p> <p>This is a test story. </p> <p>This is a test story. </p> <p>This is a test story. </p> ]]></Body>

<Files>
<File>
<FileID>55365</FileID>
<FileName><![CDATA[foxy.jpg]]></FileName>
<FileDescription><![CDATA[This is a fox]]></FileDescription>
<FileType>image/jpeg</FileType>
<FileBytes>256</FileBytes>
<FileDateTime>2010-10-05 16:32:27</FileDateTime>
</File>
<File>
<FileID>55370</FileID>
<FileName><![CDATA[catty.jpg]]></FileName>
<FileDescription><![CDATA[This is a cat]]></FileDescription>
<FileType>image/jpeg</FileType>
<FileBytes>512</FileBytes>
<FileDateTime>2010-10-05 16:33:04</FileDateTime>
</File>
<File>
<FileID>55371</FileID>
<FileName><![CDATA[doggy.jpg]]></FileName>
<FileDescription><![CDATA[This is a dog]]></FileDescription>
<FileType>image/jpeg</FileType>
<FileBytes>1024</FileBytes>
<FileDateTime>2010-10-05 16:33:06</FileDateTime>
</File>
</Files>
</Document>




My code:

$xml = new XMLReader();
$xml->open('filename.xml');

$article = array();
while($xml->read())
{

if($xml->nodeType == XMLReader::ELEMENT)
{ $name = $xml->name; }

else if($xml->nodeType == XMLReader::CDATA)
{$article[$name] = $xml->value; }

else if($xml->nodeType == XMLReader::TEXT)
{ $article[$name] = $xml->value;}

}

print_r ($article);
$xml->close();




Result:


Array (
[PubDate] => 2010-10-10
[Categories] => Animals
[Authors] =>Ay Dot Bleep@yahoo.com
[Headline] =>This is a 9th headline
[Excerpt] =>This is a test story. This is a test story. This is a test story.
[Body] =>
This is a test story. This is a test story. This is a test story. This is a test story. This is a test story. This is a test story. This is a test story. This is a test story. This is a test story. This is a test story. This is a test story.

[FileID] => 55371 [FileName] => doggy.jpg [FileDescription] => This is a dog [FileType] => image/jpeg [FileBytes] => 1024 [FileDateTime] => 2010-10-05 16:33:06 )


Challenge:

I am missing the first 2 files. -- fileID, fileName etc etc

been a busy week, cant even think straight, any thoughts?

thanks.
Webmasters / Is There A Chance That A Persitent Connection Can Damage Mysql Data ? by sayhi2ay(m): 4:01pm On Oct 08, 2010
I got an 'Access denied for user' error on a web app. investigation further, i found out that the table which the query is trying to select is bad.

using CLI at the back end, when i selected the table for view, gave same error : Access denied for user 'username'@'localhost' (using password: YES)

so i copied the bad table, and could access the copied table.

i noticed that the there was a persistent connection to the bad table been used by the web app, so was wondering if this could be the cause of the bad data ?
Webmasters / Re: I Need A Sample Web Proposal Document To Prepare Mine As A Webmaster by sayhi2ay(m): 4:28pm On Sep 30, 2010
Dual Core:

No, who's she?

lwkmd

(1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (of 12 pages)

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 43
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.