Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,153,011 members, 7,817,980 topics. Date: Sunday, 05 May 2024 at 01:30 AM

DualCore1's Posts

Nairaland Forum / DualCore1's Profile / DualCore1's Posts

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

Webmasters / Re: List Of Don'ts In A PHP Application by DualCore1: 8:20am On Oct 25, 2013
Oohrhii: Please i need help on this php code. i am having problem on how to truncate a record pulled from data base while displaying it but i cant really get it.. the best i was able to do was to put it in a textarea and limit it by width and number of line. .. using this code:

<textarea name="textarea" cols="35" rows="3"><?php echo $row_rsMa['pd_description']; ?></textarea>

but i want it in a proper format without using textarea please how do i go about this?
Its not the place for this, this should be in one of the PHP help threads.

In answer to your problem:

$short_description = substr($row_rsMa['pd_description'], 0, 50);
echo $short_description;

This will display the first 50 characters of the product description. Adjust the last argument 50 to fit your need.
I recommend you go through the entire PHP documentation (www.php.net), it helps to have an idea about all PHP functions and what they can do.
Webmasters / Re: Will This Likely Overload My Server Or Crash My Database? by DualCore1: 12:33am On Oct 25, 2013
You will end up with 'maximum mysql connections' kinda errors sooner or later.



*dhtml:
Or if the user pauses to pick a phone call? or to ping his babe! Or if you type as much as this and you want to push submit button.
Quire unrelated this is but I hope I can still say it. There's a girl who dropped her pin in tht BBM pin thread. Saw her message and my instincts thought of you next, dunno why. You shld check her out smiley
Webmasters / Re: List Of Don'ts In A PHP Application by DualCore1: 8:47pm On Oct 24, 2013
Train your instincts to place a "where" immediately after typing "update" or "delete from" in your database queries. So you don't end up forgetting to put it and wiping off ALL the data.

Don't run your code after every line you type, that's a waste of time. Write a considerable amount of codes, the whole thing even (if you can) before testing. PHP error messages have line numbers so you can always figure out where an error is if any.

Don't go from brain to coding, plan your work on paper and see how things relate to each other.

Don't code from morning till night, work smart not hard.

Don't abuse OOP (most people tend to use OOP because it makes them feel among the elite that exists only in their imaginations). Some will end up having to create and instantiate classes for very ridiculous tasks.

Don't write messy codes. Have a fixed framework or file structure when working. Don't through all your php files in the root folder. Break all your files into folders (images, styles, pages, forms, javascript).

That's all I can remember now, these are not rules they are just my best practices.
Webmasters / Re: Dream Waver, HTML And WYSIWYG, Are They The Courses For Web Design Training? by DualCore1: 8:35pm On Oct 24, 2013
Considering the amount of rubbish these "webdesign schools" teach and build in this country I suggest you invest your time into learning webdesign by yourself. There are books, blogs and forums at your disposal. Spending 25k on a course where they outline the words dreamweaver, html and wysiwg as the core components you'll be learning is a waste of money.

Start your journey here: www.w3schools.com. Learn the basics there and keep growing from that point. Ask questions here, however stupid they may seem to you. Devote quality time daily to your studies. Read blogs, when you see a good site you like you can view its source codes.

1 Like

Webmasters / Re: Eyowo Closed And No Settlement 2 weeks now :( by DualCore1: 8:12am On Oct 23, 2013
Did they send out a mail that they've shut down? I don't think they've shutdown, it may be one of their many downtimes or problems and as usual they are so arrogant to communicate issues to their customers leaving them with varying speculations on the matter. Well if they have shutdown, it won't be a surprise. They lack vision and basic know-hows on running a successful business model beyond the first 2-3 years.

Wishing you the best on a company whose domain name is expiring a month from now (Nov 24, 2013) and have seen no need to add more years. This alone is a red flag for a website dealing with finances.

Its a shame.

Softcom Imagio, consider leaving the IT scene and go into something less tasking like car wash. When you can't wash people's cars well they'll just have to drive further down Allen Ave. to another wash spot, no money lost no heart aches. You're turning to serial IT business killers, from RNG to Eyowo.

Settle your merchants!

2 Likes

Webmasters / Re: Web Designers/developers Stop Charging Below 50k For Any Project. by DualCore1: 1:21am On Oct 23, 2013
Some still don't get it. This field/profession is one powered by man hours (time). You are neither in a position to tell nor enforce what a web developer does with his time or what that time is worth. If you're not powering a serious service/solution/product just take this field as a hobby and look to some price-controlled profession to make ends meet.

Let's not waste time on what will most likely never happen in the foreseeable future.

It is this freedom of what to do with one's time that has given birth to opensource and freeware. Leave money alone and let passion be your driving force, it will take you where the thought of money alone can't. Love what you do.

2 Likes

Webmasters / Re: Web Designers/developers Stop Charging Below 50k For Any Project. by DualCore1: 12:19pm On Oct 22, 2013
You cannot put a control price on a service rendered with time (its not petrol). No raw materials involved, just time. There is no fixed cost on time. An hour's worth of my time is different from an hour's worth of any other person's time.

Webdesign will likely never have a 'pump price', live with it.

Except you're working for an established firm which has successful products it is supporting or you own a firm like that, don't consider your webdesign/development skills as your only source of income.

1 Like

Webmasters / Re: Scam Report by DualCore1: 3:07pm On Oct 17, 2013
Just incase anyone is interested in some info on the number allegedly sending messages.

Classicwizzy1@gmail.com
08130539195
08132071561
2go ID: Hackwizzy1

Source: Google (as always)
Technology Market / Re: [SOLD]Galaxy Tab P1000 7.0", 32gb, 3g + Wifi - 25k by DualCore1: 10:30pm On Sep 26, 2013
The tab + screen protector without pouch


The tab without pouch and screen protector (no scratches on the screen)


The tab without pouch and screen protector (no scratches on the screen, the prints at the bottom right are my finger prints)


The back without pouch (used the razor to peel off the screen protector for a snapshot, just incase you're wondering)


Showing the small ding at the back


Showing the small ding at the back


another tiny ding


And the rest




Technology Market / Re: [SOLD]Galaxy Tab P1000 7.0", 32gb, 3g + Wifi - 25k by DualCore1: 10:08pm On Sep 26, 2013
Call or text: 08038138483.
I will upload pictures of it shortly.
Car Talk / Re: Do You Drive Auto Transmission With One Foot Or Both? by DualCore1: 7:07pm On Sep 20, 2013
One foot (the right).

I use my left leg (the area just above my knee) to control steering as I move through curves (wide angles) and to keep the steering firm on straight paths when in a traffic jam and going at snail speed so I can relax both arms on the door handle and the passenger backrest ...very relaxing tongue (short or vertically challenged people, do not try this).


Braking with the left foot (on both manual and auto) when you are not performing Formular 1 maneuvers is just overkill. Your braking will not be smooth as you will likely not have pixel-perfect control of the muscles on your left leg as you do on your right. You may intend to go light on the brake pedal with you left leg and you see the leg going all the way down...like a learner

1 Like

Webmasters / Re: Problem: Centering Text Using Php's Imagettftext by DualCore1: 3:02pm On Sep 19, 2013
dhtml4: Have you guys solved the problem already? I hav a suggestion which might work, but I prefer to code it fast.
What's the suggestion?

I decided to work with the present output pending when I get a better idea or suggestion because I had to move on to complete the next phase of the task which is to filter the background image "instagram style" so that the background has an old school, retro feel which will make the text stand out better. Looking at the output now with the filter done, its good to go.
Webmasters / Re: Problem: Centering Text Using Php's Imagettftext by DualCore1: 9:55am On Sep 19, 2013
Thank nollyj, I was thinking along the line of treating each line of text independently. Still scouring through ideas. The present nature of the script now will suffice for the project while I try out ideas.

dhtml4: Keep up the good work dudes!
You try.
Webmasters / Re: Website Ideas Please by DualCore1: 6:12pm On Sep 18, 2013
SheDonGree.com

1 Like

Webmasters / Problem: Centering Text Using Php's Imagettftext by DualCore1: 4:23pm On Sep 18, 2013
I need to align texts of varying length on a background image with known (fixed) width and height and have everything converted to an image all in PHP. I am still combing the WWW for a logical approach to achieve this.

Here's my code so far (you can use it as a base)
<?php
function make_text($text, $fontfile, $fontsize, $width)
{
$words = explode(' ', $text);
$lines = array($words[0]);
$currentLine = 0;
for($i = 1; $i < count($words); $i++)
{
$lineSize = imagettfbbox($fontsize, 0, $fontfile, $lines[$currentLine] . ' ' . $words[$i]);
if($lineSize[2] - $lineSize[0] < $width)
{
$lines[$currentLine] .= ' ' . $words[$i];
}
else
{
$currentLine++;
$lines[$currentLine] = $words[$i];
}
}

return implode("\n", $lines);
}




$font_file = 'ambient.ttf';
$image_file = 'image.png';
$font_size = 17 ;

$text = make_text("hey knlkner dafds dsfdsf df dfdf dfd fd fdf dfdfd fdf dfdfd fdf dfd fdfd fd f d f dfffewr er erqewrw fw", $font_file, $font_size, "267" ) ;


$font_color = '#000';
$mime_type = 'image/png' ;
$extension = '.png' ;
$image = imagecreatefrompng($image_file);
$font_color = ImageColorAllocate($image,0,0,0) ;

imagettftext($image, $font_size, 0, 10,20, $font_color, $font_file, $text);

header("Content-type: $mime_type" ) ;
ImagePNG($image) ;
ImageDestroy($image) ;
exit ;
?>


The output of the code above is this image attached. Looking at it I have been able to break the string into different lines already. What's needed is to change the left alignment to center alignment.

Note: You must have a TTF font file (ambient.ttf) and a png image (image.png) all in the same directory as the code.

#PHProcksLOL embarassed

Webmasters / Re: For Sale !!! !!!! !!!! by DualCore1: 3:03pm On Sep 16, 2013
Is there a real NEED for another URL shortening service?
What edge does this script have over the existing ones (i.e what does it do better)
What's the innovation?

P.S: You should consider getting a better hosting service for your script. Refreshed your link 6 times and got "Service Temporarily Unavailable" 4 our of the 6 times.
Webmasters / Re: Simplepay4u Now Messing Up! - Again!!! by DualCore1: 11:13am On Sep 12, 2013
The recharge service is quite nice, while a confirmation page will do some good I like the ease that presently exists on the site. You're just 3 clicks away from a successful recharge. The confirmation page will add a 4th click. sad

Ask for Simeon's contact and put him in copy of the mails you send to support. Maybe they got too much to handle and need expansion in the tech support dept.

As a counter measure you should be careful you're carrying out financial transactions online. Do not rely on the system's confirmation process (if any). Do your own confirmation yourself before hitting the "Submit" button.

[size=4pt]That's why its good to have one babe. You won't have to recharge Nkechi's MTN line, Stella's Glo line and Patricia's Etisalat line all at once.[/size]
Webmasters / Re: Lil Php Question by DualCore1: 9:30am On Sep 11, 2013
Sorry I have been busy. Your question about where to declare your POST variables can be answered from Teemy's code.
Foreign Affairs / Re: 10-year-old Works With His Father In Weapons Factory (pictures Inside) by DualCore1: 9:03am On Sep 10, 2013
Staged photos.
Webmasters / Re: 500 Internal Server Error by DualCore1: 6:41pm On Sep 08, 2013
This error is mostly as a result of an error in your .htaccess file. If you've deleted the .htaccess file and are still experiencing this problem, contact your host.
Webmasters / Re: Need Help On How To Go About Having Paypal. by DualCore1: 12:23am On Sep 07, 2013
Using an unverified Paypal account is like walking on a time-bomb. The day you have $$$$ in your Paypal account and its set to "limited" as a result of a "routine security check" and you're asked to start providing documents you certainly do not have legitimately, that's the day you'll regret the decision to start your Paypal adventure with an unverified account.

There are a couple of threads that give you details on how to open and successfully run verified US Paypal accounts with all limits removed and everything legit. Search.

Here are a few disadvantages of using an unverified account:
1. You can only withdraw a total of 500 USD in a month
2. No trusted Paypal exchanger will deal with you or accept to send Paypal funds to your account.
3. You increase your chances of ending up with a limited account, obviously. What financial institution will allow you to continue carrying out transactions when they cannot verify who you are... na Liberty Reserve?
4. Serious sellers will not accept funds from an unverified account.
5. Unnecessary heartaches.
6. Once your account is limited, IF you eventually get it released you will have ended up spending as much or even more than you would have spent if you originally set out to get a verified account. My IF is in serious uppercase because releasing a limited account is not a guaranteed thing or an easy process.
Technology Market / Re: [SOLD]Galaxy Tab P1000 7.0", 32gb, 3g + Wifi - 25k by DualCore1: 10:07am On Sep 05, 2013
This is still available and has been upgraded to Android 4.2.2
Webmasters / Re: Lil Php Question by DualCore1: 9:48am On Sep 05, 2013
I have no working experience with the opensource CMSes. Others can help you here or you can Google "implementing custom code with CMS".
Webmasters / Re: Lil Php Question by DualCore1: 2:39pm On Sep 04, 2013
omoelu1:
thank you jare baba dual core... am almost crying trying to solve dis code..
am starting to think “ so, i don't know anything yet in php“..
gbosa to u , boss
You can know all you need to know about PHP here: http://www.php.net/manual/en/
I advise you leave PHP eBooks alone and just read up the official PHP documentation first (http://www.php.net/manual/en/).
In my experience PHP eBooks are just like religious pamphlets which make reference to the Bible (in this case http://www.php.net/manual/en/) and are given an interpretation as understood by the writer of the eBook/book. So skipping the pamphlets and going straight to the PHP Bible (http://www.php.net/manual/en/) will do you more good, if you meet things you don't understand...Google it or Nairaland it (you will most likely find a solution to your problem on Stackoverflow.com through Google's search results.

You don't have to memorize what you read or know how to use all PHP functions. Just have an idea of what can be done with what function. When you actually have to use a function in your work you can look up it's usage in the PHP manual and apply. The more regular your usage of a function is the less you'll be consulting the manual to see its usage.

Djangocode:
@Dual core.. Pls, anytime I run php form scripts in which I embed my html forms and run it on ma localhost server(wamp), I get results buh whenever I seperate the html form and the corresponding php script that will run it, all I get is a blank page.. Any solutions?? And please what are the advantages of embedding php scripts inside html page n the disadvantages..

Thanks..
I have no idea what the advantages and disadvantages are of either options. I just keep all my form processor files in a different folder for organization. You can go through Google to see what's best to work with.

About the issue of separating your form from its processor and the problem you encounter, this explains it:
omoelu1: like u mean when you direct the “action“ call to another php page for processing?
When you separate your form from its processor, the "action" attribute of your <form></form> should direct the form to the processor. So if your processor (e.g processor.php) is in the same directory as your html file then the form declaration should be <form action="processor.php" ...
Webmasters / Re: Help! My Traffic Is Wasting! by DualCore1: 7:00am On Sep 02, 2013
Keep aside the issue of monetizing your blog and focus on informing your audience and getting quality traffic, views and comments. Money making will fall into place when the time is right.
Webmasters / Re: Lil Php Question by DualCore1: 11:42am On Aug 28, 2013
By my understanding of this logic:
Djangocode:
When the button is clicked, the PHP page shows
what happens if you can double your money each
year for the next 10 years.

This your proposed solution is wrong:
Djangocode:
PS: The solution should look like this::

Solution:

If you start with $200 dollars, Then
after 1 year(s), you will have $400
after 2 year(s), you will have $800
after 3 year(s), you will have $1600
after 4 year(s), you will have $3200
after 5 year(s), you will have $6400
after 6 year(s), you will have $12800
after 7 year(s), you will have $25600
after 8 year(s), you will have $51200
after 9 year(s), you will have $102400
after 10 year(s), you will have $204800...

The solution should look like:
If you start with 200, then
after 1 year(s), you will have 400
after 2 year(s), you will have 800
after 3 year(s), you will have 1200
after 4 year(s), you will have 1600
after 5 year(s), you will have 2000
after 6 year(s), you will have 2400
after 7 year(s), you will have 2800
after 8 year(s), you will have 3200
after 9 year(s), you will have 3600
after 10 year(s), you will have 4000


And the PHP code for that is:
<?php
$amount = "200";

print "If you start with $amount, then <br />";

for($i=1; $i <= 10; $i++){
print "after $i year(s), you will have ".$amount * 2 * $i." <br />";
}
?>


Note I fed in the amount as $amount variable, not from a form's POST or GET. I didn't set out to give you a complete solution. Figure out the easy part of connecting this to a form and supplying the amount as a PHP GET or POST global variable.

2 Likes

Webmasters / Re: Smartweb.com.ng Issue (Resolved by Smartweb) by DualCore1: 9:44am On Aug 28, 2013
velo10: Dualcore, I built the site on WP. Ithe site has over 100 different products which I took alot of time to collate their information before the aite was 100% ready.
Nothing can justify having all your data in only one place. That is just the unsentimental truth.

About the questions that were asked by the support bot:

1. That most be a configuration error. How many people are getting access to the site panel the WordPress?
Answer: You are the server admin and should know how to read server logs about access to any area of the server.

Have you made any update recently?
Answer: As the server admin with root access you can run a check on this site's home directory and draw up a list of files that were modified N number of days ago.

When last do you accessed it correctly?
Answer: Your customer already said "Axissecurity.com.ng has been down since yesterday".


Basically the support is lazy and has asked those 3 stupid questions either to buy time and continue sleeping in bed or they just don't know what to do and are buying time while they get technical support from their upstream provider if they run a managed service from them. These are speculations, the actual reason is best known by them.

About account termination, all terms aside... as long as it isn't a clear case of intentional fraud, it is just animal(jungle justice) to delete files (terminate) off of a server prior to conclusion of a problem when all access to those files can be barred by suspending the site. Even if the final outcome will be termination, the customer should be consulted and given a full backup of his site and told bye bye. This is a non-written best practice.

3 Likes

Webmasters / Re: Smartweb.com.ng Issue (Resolved by Smartweb) by DualCore1: 3:19pm On Aug 27, 2013
To the Umar guy (if you ever get to see this), stop acting like an answering machine in your responses. If your customers needed one they would know where to get one.
Webmasters / Re: Smartweb.com.ng Issue (Resolved by Smartweb) by DualCore1: 3:16pm On Aug 27, 2013
velo10: I used over 2 months to build the site with all contents of the site only online.
You "developers" are out of this world.

(1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (11) (12) (13) (of 371 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. 62
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.