Oct 11
20
After looking for a currency converter api,
I finally managed to write a few lines my own in PHP using the google api for currency converter.
//You can use ISO standard country codes for currency here
$amount=1;
$fr="USD";
$to="PHP";
$url="http://www.google.com/ig/calculator?hl=en&q=".$amount.$fr."=?".$to;
$handle = @fopen($url, 'r');
if ($handle) {
$result = fgets($handle, 4096);
fclose($handle);
}
//Explode result
$result = explode(",",substr($result,1,strlen($result)-2));
$newres = explode(":",substr($result[1],2,strlen($result[1])-2));
$newres=trim($newres[1]);
$newres = explode(" ",substr($newres,1,strlen($newres)-2));
$newrate=round(preg_replace('/[^\w\d_ -.]/si', '', $newres[0]),2);
if('error: ""'<>trim($result[2])){
$newrate="Invalid Query";
}else
{
$newrate = $amount." ".$fr." = ".$newrate." ".$to;
}
echo $newrate;
?>
Hope this help!
Are you asking what are those secrets the riches had? Here, I found interesting article from forbes.com that answers your question in mind. Riches are same as me and you. They also have fear but they’re not afraid to try.
1. Never afraid to fail – point out a choice to either stick to an easy, secure route or take a calculated risk. Used those experiences to learn from mistakes and get back in the saddle. Avoid the real failure of letting a bad experience destroy your optimism and your passion.
2. Look creatively at problems to find new revenue sources – how you look at problems from different angles and like to go against the grain. Know that always think critically when analyzing any problems.
3. Find a partner – find someone who believes and is willing to accept the hardship it takes to get to the top even how critical it is.
Bottomline: Money isn’t everything. As you try to become truly rich, don’t forget your family and health
Source: Forbes.com
Jul 11
1
Resizing images on the fly can be done through inside your code but it consume a lot of time. I will show you a tip in resizing images on the fly using CSS. It is a pretty simple yet powerful.
Here’s the code:
<style type="text/css">
.newsize{ max-width:100%; height:auto; }
.newsize { width:auto; max-height:100%; }
#gallery{ width:200px; height:200px; }
</style>
How to use it?
In your HTML code just write:
<div id="gallery"> <img src="http://domain.com/iamges/myimage.jpg" class="newsize"> </div>
That’s it and you are done!
How it works?
Latest browser write now knows already how to resize images that is a new way to display images in your website. The browser will first get the maximum width and height of your placeholder which is the <div> tag. Then it’ll put your image on that div without loosing it ratio so your image will not look so distorted.
Happy coding!
Using javascript libraries will save you more time coding yourself to design and create your own program to meet as what designed or what you wanted for your website to function. Well, there are a lot of Javascript libraries you can use just for example below:
jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript.
Mootools – a compact, modular, Object-Oriented JavaScript framework designed for the intermediate to advanced JavaScript developer. It allows you to write powerful, flexible, and cross-browser code with its elegant, well documented, and coherent API.
YUI 3 is Yahoo!’s next-generation JavaScript and CSS library. It powers the new Yahoo! homepage, Yahoo! Mail, and many other Yahoo! sites. The YUI 3 Library has been redesigned and rewritten from the ground up incorporating what we’ve learned in five years of dedicated library development. The library includes the core components, a full suite of utilities, the Widget Infrastructure, a growing collection of widgets, CSS resources, and tools. All YUI components are BSD-licensed and are available for forking and contribution on GitHub. In addition to the core components included in the YUI 3 Library, there is also a gallery of components created by developers in the YUI community that provide additional functionality leveraging YUI 3 that can be used in the development of robust web applications. script.aculo.us is a set of JavaScript libraries to enhance the user interface of web sites. It provides an visual effects engine, a drag and drop library (including sortable lists), a couple of controls (Ajax-based autocompletion, in-place editing, sliders) and more.They are both powerful but it is really recommended that you use only one of them because that will mess up your site and might caused all your javascript code conflict .
However, WordPress created a function to handle such like that see
wp enqueue script
There are also chances that even you are using jQuery library still you can experience jquery undefined error.
How to Solve that?
JQuery reserved a script to fix that is call jQuery no conflict. How can we use it?
<script type="text/javascript" src="other_lib.js"></script> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> $.noConflict(); // Code that uses other library's $ can follow here. </script> You can also do something like this:<script type="text/javascript"> jQuery(document).ready(function($){ //some of your codes uses $ as its prefix. $('.example').fadeOut(); }); </script>or something like this:
<script type="text/javascript"> var $ = jQuery.noConflict(); $(document).ready(function(){ //some of your codes uses $ as its prefix. $('.example').fadeOut(); }); </script>or create a new instance of jQuery library class:
<script type="text/javascript"> var j=jQuery.noConflict(); j(document).ready(function($){ //some of your codes uses $ as its prefix. j('.example').fadeOut(); }); </script>You can replace j on whatever variables you want to rename it.
When choosing your wireless service, there are a number of points which you will want to consider. In doing so, you can be sure that you’re getting the best service for your individual needs and requirements.
The first thing which you are likely to need to consider when choosing a wireless service is the speed rating. Different services offer different speeds – and you may not necessarily need the highest speed rating which is available. Providers such as Clear Wireless, for example, offer an extremely fast, portable service, which may be beneficial for those who are often required to connect to the internet while on the move. However, if you require high internet speeds to facilitate online gaming, but are usually connecting from one place, then this might not be the best service for you. Get started by finding wireless internet service near me.
It is certainly worth considering how you will most likely use your internet connection, as this can have a significant impact on the service which you choose. As more advanced services tend to be more expensive, choosing the right service can mean that you save a considerable amount of money.
Secondly, you will want to find out if the service which you choose includes internet security protection features, such as a firewall. For some people, this may be more important than others, but all connections pose a certain risk to users’ online security, and so it is a good idea to make sure you have sufficient protection. You will also want to bear in mind that if you are thinking of investing in a service which does not include firewall protection, this could result in additional costs at a later date.
You may also want to consider how easy it will be to install and configure your chosen wireless service. Unless you’re particularly knowledgeable when it comes to technology, this is well worth bearing in mind. The chances are that you will be keen to get your internet connection up and running as quickly as possible, and so most people will want to used a service which is relatively easy to set up. Many providers offer an installation service, or an easy-to-use guide to installation which may be an advantage.
By keeping these points in mind when choosing your wireless internet, you will have a better chance of finding a service which is best suited to your individual needs.
May 11
22
i. Running Computer in slow behavior
It comes to be flickering when you are browsing your computer. Slow to respond when you are opening some files or folders. You cannot do multi-task or opening files/application simultaneously.
Causes:
Computer Viruses, Installation of New Software, Corrupted System Files due to improper shut-down/turn-off
Solutions:
Update your anti-virus software or find another best antivirus software, remove any new installed software, run Chkdsk utility and matching repair of your system, you can also use System Restore if it is enabled in your system. But enabling your system restore is not totally recommended by now because most computer viruses hide itself in your system restore point.
ii. Missing NTLDR
When your turning your computer on, Your screen displays only a Black screen and a white text “Missing NTLDR”
Causes:
Someone or Computer viruses deleted the System File on your Drive C. or where your OS located in your Drive. Most NTLDR file is located in C:\NTLDR
Solution:
You can slave your Hard drive in other working computer and put a new NTLDR from other working computer. Locate it in your drive where your OS is located. You can also use any rescue disk or other Live CD to open up your computer and paste a new NTLDR. If you are not able to do the above given solution, you can re-install your Operating System but be careful.
iii. Invalid Boot Device
It happens when you turn it on your computer and only black screen will appear and a text says “Invalid Boot Device”
Cause:
Your computer did not detect any bootable media or bootable drive.
It occurred when somebody disassemble and re-assemble your Hard drive. Sometimes it occurs unexpectedly.
Solution:
Please check any inserted CD in your CD ROM Drive, please remove it.
Enter to your BIOS Utility. You can access it by during restart of your computer press Del or F2 ( refer to your motherboard manual) then when you are in a BIOS Utility, look for BIOS Feature> Boot Sequence then change your First Boot into which drive contains your Operating System then press F10 or save it and restart.
Your Guide to Wireless Internet
and High-Speed Internet Providers
and Technology
www.wirelessinternet.net
Apr 11
19
What is Windows Recovery?
Windows Recovery is malware and a spyware program which mislead people by scanning your system and display misleading errors that needs to fix. It will display messages to scare people to buy the license of that program but you know it is a fraud. Below are the messages you can see when this program is running:
Critical Error!
Windows was unable to save all the data for the file \System32\496A8300. The data has been lost. This error may be caused by a failure of your computer hardware.
System Restore
The system has been restored after a critical error. Data integrity and hard drive integrity verification required.
Critical Error
A critical error has occurred while indexing data stored on hard drive. System restart required.
How I got this kind of Malware?
Well, this is distributed by a trojan program, sometimes it is attached within the cookies of a certain website which offer free downloads, anty-spyware and offer advertisement that will boost the performance of your computer.
How to remove this?
I recommend you to use HijackThis because i experienced it myself when I got a hit with this annoying malware application which offer you cleaning your computer for errors and boosting your computer performance but that is a fraud, a scam which only steals your money if you buy that license through credit card. Don’t buy anything or don’t try to enter your credit card information for they will only steal your money out of it.
Download HijackThis here
After you download it, double click the installer and run it.
1. Click on Next button to proceed with the installation.
2. Click on Accept the Agreement and proceed if you agree with the statement otherwise exit the application.
3. Browse where folder in your computer do you want HijackThis to be installed. Click on Install and wait while the copying of files be done and then click on Finish when it appears.
4. After the installation been done, click on the HijackThis icon on your desktop.
5. When you see the image below, click on Do a system scan and save logfile button to proceed in removing the malwares and spywares.
6. After running a scan, you can notice a detected error in your system which includes registry error. It will look like the image below. Check all boxes and click on Fix Selected and the system will ask you to proceed deleting those files. Just keep clicking on yes until it finish. Click on Restart when asked.
That’s it. Enjoy surfing the net!
Apr 11
17
What is Local Server?
A Local Server allows development and testing on a local machine without the concerns of losing Internet connection, accidentally creating temporary security holes, or constantly uploading files via FTP.
Guide on installing and setting up a server.
Today, we will talk about creating your local server to which you will be running your php files.
PHP files is unlike your HTML files that when you want to view the output of your codes you can simply right click your HTML files and then open it with the browser you like. Running PHP, you will need the following to be installed in your computer:
But that’s a bit tricky for a beginners like you. That is why there are available applications which a compiled version of that four application. You can download either of the listed below:
In this guide, we will be using Appserv anyway it doesn’t matter either of that three you will be using but because you are reading this you should follow me so we are on the same page.
Step 1: Preparing the installation package:
Download the latest version of the Appserv package here
The package contained the following:
1. Double click the appserv installer that recently you downloaded from their website.
2. License Agreement : AppServ distribution under GNU/GPL License. You must read license agreement before install. If you agree for this license click Next to go to next step. If you not agree click Cancel to cancel install.
3. Choose Install Location: AppServ default location is C:\AppServ. If you need to change destination click Browse botton to change your destination for AppServ program and then click Next to go to next step.
4. Select Components : AppServ default package components it’s checked all package.
If you need to choose some package to install. You can click at check box.
- Apache HTTP Server is a Web Server.
- MySQL Database is a Database Server.
- PHP Hypertext Preprocessor is a PHP Programming processor.
- phpMyAdmin is a MySQL Database control via WWW.
If you complete choosing it click Next to go next step.
5. Apache Configuration : This screen for specify Apache configure.
Server Name You must specify Server Name e.g. www.appservnetwork.com.
Admin Email You must specify Admin Email e.g. root@appservnetwork.com
HTTP Port You must specify HTTP port for Apache Web Server.
Here, you will enter localhost in your server name because your will be running in your local computer. You can enter your own email address at the admin email textbox. And leave the deault 80 as the HTTP port.
6. MySQL Configuration :
Root Password You must enter root password for MySQL Database.
Default user for this password is root .
Character Sets Specify for data storage language and collations.
Old Password If you have problem when you coding PHP code with Old MySQL API.
And found error Client does not support authentication protocol requested by server;
consider upgrading MySQL client
You must check this option to avoid error.
Enable InnoDB If you use InnoDB must check this option.
Click on install to proceed.
7. Complete AppServ setup : Setup ask for start Apache and MySQL immediately.
Click Finish to end this setup and AppServ prompt to use.
8. Testing your local server by running localhost. How to do that? Just open your favorite browser. Here I am using firefox. Once you open it, type in the address bar of the browser: http://localhost you should see the below image. If none, uninstall the appserv and restart your computer and review the process.
On Next topic, I will guide you to your first PHP experience.
Apr 11
14
How secured the Microsoft Windows 7 is?
MS Windows 7 is a latest most secured Operating system for the past release of Microsoft. Well, it is but time to time there are a lot of Spyware & Malware creator and Hacker all around the world finding such security hole of this operating system.
Today, we will talking about how to remove MS Removal Tool.
MS Removal Tool is a rogue security application that comes up with tons of infections and security threats to make you think that your computer is infected with malicious software. This scareware may report up to 30 infections on your computer which do not even exist. It charges about $60 to remove the threats and even claims that your PC will be protected against other malware if you choose to purchase the full version of MS Removal Tool.
I got hit with this also yesterday. It is really freakin.
How did I removed this rogue malware?
Take a look of this malware
When this virus is running, you cannot access command prompt and your antivirus been block also. So what you need to do is restart your computer and while your computer is booting, press the F8 of your keyboard to enter to Safe Mode. Take a lot of the image below:
After that, you are now in your windows. Download Malwarebytes here
Malwarebytes is a site dedicated to fighting malware. Malwarebytes has developed a variety of tools that can identify and remove malicious software from your computer. When your computer becomes infected, Malwarebytes can provide the needed assistance to remove the infection and restore the machine back to optimum performance.
When the download is complete, Right click the installer and click open.
Just click next button again and again. Select Agree with the License agreement when asked.
That is how it looks when it is still copying its files. You should wait that until it says Finish or Completed.
Allow Malwarebyes to update itself with the latest virus definitions.
When you see the below image:
Select Perform Full Scan and Click the Scan button.
You should see the below image.
The above image shows that you have completed the scan process. Don’t mind with how many results do you have because it might be differ how many spywares and malwares been detected in your computer. Check all and then Click Remove Selected button. It will automatically remove the detected spywares and malwares. Allow your computer to restart. Ops! Click restart computer when asked only.
Now when your computer is restarting, let it to boot in normal mode not in safe mode and you are done!
How you got that rogue software?
Well, you are browsing the net and you might click ads which offers free services. Some advertisement on the net, it has an embedded spyware and malware so be careful and read every piece before clicking because once you click it, you’re done.
You might also downloaded a wrong files on the torrent which contains spyware and malware.
Enjoy Surfing!
Apr 11
13
Why PHP and what is it?
Today, we will talk about starting to learn PHP programming. Why we or I choose this programming language? That’s because PHP is an open source language which is the source code is freely distributed, all of its installers, databases are downloadable through the internet and didn’t cost any amount of penny. Because of being open to the public, more people supported the community by building such codes which you can then use to your own website. Imagine, learning .net programming language will give you a lot of pain because you need to buy a license Windows, Visual Studio, Windows Server, SQL Server, etc unlike PHP you need only a free (at No COST) Appserv(www.appservnetwork.com) if you are running on windows or LAMPP for linux.
How PHP started and what is it?
|
PHP stands for PHP: Hypertext Preprocessor, with that PHP standing for Personal HomePage [Tools]. |
PHP originally stood for personal home page. Its development began in 1994 when the Danish/Greenlandic programmer Rasmus Lerdorf initially created a set of Perl scripts he called ‘Personal Home Page Tools’ to maintain his personal homepage, including tasks such as displaying his résumé and recording how much traffic his page was receiving.
More about PHP at this link: http://en.wikipedia.org/wiki/PHP
What benefits will I have when learning PHP?
Internet is now become part of most people. Everyday, the get up and open facebook and other interested websites. Building website is like putting a home which anyone can enter and welcomed.
A lot of businesses put their product information accessible through the world. And a lot of businessman wanted to have websites but didn’t know how to do it.
Think of the scenario in school, many students enrolled computer science they both enjoyed during first semester. But what happened when you look at them at the second semester? Had you find same faces inside that classroom? where they go? why only few left?
They enrolled computer science because they want to be a programmer someday because they enjoyed facebook. isn’t it? Now during first semester, they started to learn programming which is really really suck! Learning programming is like learning a new language or dialect, just for example you are an americans and wanted to learn tagalog. And what happened to this student at the second semester? well, they find themselves not mentally fit with the course that is why you can see them at the next room in a flock of Business and Accountancy, Education and so on. That is really really a waste of money and time.
Think of this, the industry of internet programming will not be down. Because everyday most people wanted to build a new website and most people wanted to have a new look for a season to their website and there are a lot of businessman needed us to monitor and maintain their existing website. Every year, there are a lot of discoveries and developed technologies in internet industry so every year we didn’t lose hope to find a job unless we don’t have this skill and that really suck you might knock your head on the wall and find yourself.
How you can learn PHP and where to start?
Well, you really want to learn PHP? considering you knew already HTML, CSS and a few of Javascript. Is it a pre-requisite to this course? Yes. Because PHP is only a server-side scripting and you cannot see its output if you don’t know about HTML.
Learning PHP is not really hard. It is so easy I will tell you. But of course you need to have a passion for programming so you can understand us, I mean the computer. Remember: “Make your passion your profession”.
On the next topic, I will teach and guide you step by step on how to start learning PHP. We will discuss about setting up your own server just what facebook does.
Thank you for reading.