For example: You just inserted something into database with query, and you need to receive ID of the last insert. You dont need to create another selection with `id` DESC. All you need to do is just receive id with function called - mysql_insert_id().
PHP: $last_id = mysql_insert_id();
Thursday, March 17, 2011
Monday, March 14, 2011
Download video of Flowplayer
Today i was faced with problem - Downloading video of flowplayer. All i wanted to do is to download video from one site to my desktop.
It took me not long time for searching google and result is that i fount freeware! You will need to download it and run from your machine. Its virus free and no stupid tool bars are required to install. So don't worry.
Very easy to use and very well done freeware! Great job developers!
Free download: http://www.streamtransport.com
Friday, February 25, 2011
Hidden new line in string PHP
I guess you seen the problem, or maybe facing with it at the moment. So if you echo the string with pre tags, it will show normally. But without pre tags, it shows ugly... just like a plain text.
The problem is that there is hidden new lines symbols like /r or /n and so on...
Just by replacing the with str_replace is not enough. So here solution for it:
$value = preg_replace('/[\r\n]+/', '\n', $value);
echo htmlentities($value);
Tuesday, February 22, 2011
Real Megatron Tank from Transformers 2
Can you believe it? Real replica of Megatron Tank from Transformers 2 was made by one chinese metal artist. Full weight of the tank is more than 5000 kg.
Here is image of megatron tank made by fan
Here is image of megatron tank made by fan
And here photos from real life
Tags:
Art,
Awesome,
Cool,
funny,
Images,
Interesting,
Movie,
Transformers,
True,
WWW
Monday, February 21, 2011
Do you need to close apps in your multitasking bar?
No you don't says website - http://www.tipb.com/.
I was wondering about this too and i always close applications in my multitasking desk of my ipod touch 2generation.
I was wondering about this too and i always close applications in my multitasking desk of my ipod touch 2generation.
Thursday, February 17, 2011
How to test your hardware for problems
To find problem in your hardware you need to test everything... But you need to think... I mean, if windows loads up it means that video card, hard disk, rams, and so on works... Possible case - they works not good as "good", but they still works.
Anyways..
Here is some list of programs and other tricks i found while searching internet how to test your hardware parts.
Ram ( Random Access Memory ):
To test your RAM, you can do just by checking your Task Manager ( Performance tab ). Also you can see how many rums installed by going to "my computer"'s properties.
In harder cases people recommend to download these programs:
Hard Disk ( Hard Drive ):
Most of test which you can do for your hard drive is installed in windows. It called "checkdisk" or chkdsk.exe, you can run it from command line. In other case you can do that from your file explorer:
Funny part of this, is that you can listen for sounds which hard drives are making ( in case if it is still working ), and check if it matches one of these ones: http://datacent.com/ . If it does,... i guess you need to change it.
More useful freewares such as "Hitachi Drive Fitness Test" or "Samsung HUTIL" and so on... can be fount here: http://pcsupport.about.com/
GPU ( Graphic Process Unit ):
First of all windows has included tool for this - dxdiag . You can run it from Command line.
Motherboard:
If motherboard is not working properly you will notice it. Some of these facts says about it:
One of great software to test motherboard is Hot CPU Tester.
Anyways..
Here is some list of programs and other tricks i found while searching internet how to test your hardware parts.
Ram ( Random Access Memory ):
To test your RAM, you can do just by checking your Task Manager ( Performance tab ). Also you can see how many rums installed by going to "my computer"'s properties.
In harder cases people recommend to download these programs:
- memtest86+ ( http://tinyurl.com/6dgkn46 ), requires to burn CD to run
- Windows Memory Diagnostic ( http://tinyurl.com/4qw9hr5 ), requires to burn CD to run
- memtest ( http://tinyurl.com/2lqo2 ), no burn requires!
Hard Disk ( Hard Drive ):
Most of test which you can do for your hard drive is installed in windows. It called "checkdisk" or chkdsk.exe, you can run it from command line. In other case you can do that from your file explorer:
- Go to computer,
- Select hard drive
- Open properties
- Choose tools tab
- Press "Check Now" button, in "Error-checking" section
- In showed up windows check all possible check boxes and press Start.
- Wait until finishes and press Done.
Funny part of this, is that you can listen for sounds which hard drives are making ( in case if it is still working ), and check if it matches one of these ones: http://datacent.com/ . If it does,... i guess you need to change it.
More useful freewares such as "Hitachi Drive Fitness Test" or "Samsung HUTIL" and so on... can be fount here: http://pcsupport.about.com/
GPU ( Graphic Process Unit ):
First of all windows has included tool for this - dxdiag . You can run it from Command line.
- Press Start
- Run
- Cmd.exe
- dxdiag
- hit Enter
- check Dispay tab, for video card information.
Motherboard:
If motherboard is not working properly you will notice it. Some of these facts says about it:
- Computer does not boot, and instead gives beep sounds.
- Computer random crashes.
- Computer randomly reboots.
One of great software to test motherboard is Hot CPU Tester.
Sunday, February 6, 2011
Error 324 (net::ERR_EMPTY_RESPONSE): Unknown error. [Solved]
I got the error after, updating my chrome to 9 version. I appeared few times, and i decided to fix it. So here is solution for the error:
Chrome:
1. Open Options
2. Choose Under the Hood tab in options
3. Press Reset to Defaults
4. Done.
Common tags for the article: chrome, problem, mistake, bug, error, how to
Wednesday, January 12, 2011
PHP export mysql table to text file
Here is simple script which will help you a bit, to export all fields of your database table to text file. It will not be same as export of MyAdmin, but its better than nothing... at least you will have data.
$sql_export = "SELECT * INTO OUTFILE 'tables.txt' FROM `table_name` ";//var_dump($sql_export);if($result = mysql_query($sql_export))echo "Recorded";else echo "Not recorded";
Sunday, January 9, 2011
Joomla Error loading feed data
The error occurs after installing joomla.
So fix the thing all you need to do is:
1. go to administrator panels
2. Extensions -> Module Manager -> Administrator tab
3. Find "Joomla! Security Newsfeed"
4. Disable it
5. Done
If you have the “yoo_tweet module” installed, disable this module as well. This module is known to display this error message.
Why:
Because this module load feed data with link http://feeds.joomla.org/JoomlaSecurityNews, this link is broken, so it pop up a error loading feed data error.
Have fun!
Thursday, January 6, 2011
Finding time difference in seconds between 2 dates ( timestamps )
In my situation i needed query to find time difference in seconds between current time and field's value.
SELECT TIME_TO_SEC(TIMEDIFF(NOW(),`field_name`));between 2 mysql fields can look like this:
SELECT TIME_TO_SEC(TIMEDIFF(`field_name1`,`field_name2`));
httpd.exe apache cpu 100% load
I had the problem today. When i started Apache from Xampp control panel, CPU usage became 100%. Nothing changed after apache restart and PC restart. Same.. - 100%.
So to understand what is happening you need to
1. go to: C:\xampp\apache\logs
2. open access.log with text editor
if file is too big to open ( bigger than 5 mb ) do this:
1. just delete access.log and error.log
2. start apache and stop it after it will start loading your CPU to 100%.
In access.log, you will be able to figure out what is happening with your apache ( httpd ).
In my situation was some kind of apache virus ( which affects my files with new scripts called webdav and webalizer ).
So if you have the folders in your xampp folder, that means you have same problem..
i solved it by this way:
1. -> Control Panel\Network and Internet\Network and Sharing Center
2. -> Windows Firewall
3. -> Allow programs to communicate through Windows Firewall
4. Removed Apache HTTP Server with checked under Public ( To do that press Change settings button on top )
5. Close everything.
It might not help you. So here is one more idea what you could do in the situation:
After finding out what IP requested execution of the script in part with error.log just Block it! Google for answer..
Tuesday, January 4, 2011
Facebook smiles
Here is collection of all smiles which are possible in facebook.
Happy emote: :) or :-)
Really happy emote: :D or :-D
Sad: :( or :-(
Crying emote: :’(
Happy eyes: ^_^
Laughing eyes: >:o
Cat smile: :3
Grumpy: >:-(
Shocked emote: :o or :-o
Glasses emote: 8) or 8-)
Cool shades: 8-|
Rude: :p or :-p
Woot?!: O.o
Dork emote: -_-
Duhhh emote: :/ or :\
Devil emote: 3:)
Angel emote: O:)
Kiss emote: :-* or :*
Love emote: <3
Pacman: :v
Shark: (^^^)
Robot: :|]
Weird guy’s face: :putnam:
¢ – cent £ – pound ¤ – currency ¥ – yen € – euro sign § – section © – copyright ® – registered trademark ™ – trademark ° – degree – e.g. 45° ¹ – superscript 1 ² – superscript 2 ³ – superscript 3 · – middle dot ¸ – spacing cedilla ¼ – fraction 1/4 ½ – fraction 1/2 ¾ – fraction 3/4 ¿ – inverted question mark × – multiplication ÷ – division • – bullet = black small circle ◊ – lozenge ℠ – Service Mark ✓ – check mark ✔ – heavy check mark ✕ – multiplication sign ✖ – heavy multiplication sign ✗ – ballot ✘ – heavy ballot ✝ – Latin Roman Cross ✞ – Latin Cross 3D shadow ✟ – Latin Cross outline ✠ – Maltese Cross ✡ – Star of David ❛ – quotation mark single turned comma ❜ – quotation mark single comma ❝ – quotation mark double turned comma ❞ – quotation mark double comma | ℃ – Celsius ℅ – care of ℉ – Farenheit № – numero symbol – number sign ℗ – Sound Recording Copyright ℞ – Prescription Take pharmaceutical symbol Ω – Ohm ℧ – Inverted Ohm ☀ – sunshine – sun ☁ – cloudy – cloud – dark cloud ☂ – raining – rain – umbrella ☃ – snow – snowman ☄ – shooting star ★ – star solid ☆ – star outline ☇ – lightning ☈ – thunderstorm ☉ – sun ☊ – ascending node ☋ – descending node ☌ – conjunction ☍ – opposition ☎ – phone ☏ – phone symbol outline ☐ – check box ☑ – check box check mark ☒ – ballot box with X ☓ – St. Andrew’s Cross ♔ – White King ♕ – White Queen ♖ – White Rook ♗ – White Bishop ♘ – White Knight ♙ – White Pawn ♚ – Black King ♛ – Black Queen ♜ – Black Rook ♝ – Black Bishop ♞ – Black Knight ♟ – Black Pawn | ☚ – left-pointing index finger ☛ – right-pointing index finger ☜ – left-pointing index finger ☝ – upwards pointing index finger ☞ – right pointing index finger ☟ – downwards pointing index finger ☠ – skull & crossbones ☡ – caution sign ☢ – radioactive sign ☣ – biohazard sign ☮ – peace sign ☯ – yin & yang ☹ – frowning face ☺ – smiley face ☻ – black smiley face ☽ – waxing crescent moon ☾ – waning crescent moon ♈ – Aries ♉ – Taurus ♊ – Gemini ♋ – Cancer ♌ – Leo ♍ – Virgo ♎ – Libra ♏ – Scorpio ♐ – Sagitarius ♑ – Capricorn ♒ – Aquarius ♓ – Pisces | ♠ – black spade suit ♢ – red diamond suit ♣ – black club suit = shamrock ♤ – red spade suit ♥ – black heart suit = valentine ( <3 ) ♦ – black diamond suit ♧ – red club suit ♨ – hot springs ♩ – musical quarter note ♪ – musical eighth note ♫ – musical single bar note ♬ – musical double bar note ♭ – flat note ♮ – natural note ♯ – sharp note ✁ – cut above ✂ – cut here ✃ – cut below ✄ – scissors ✆ – public pay phone ✇ – film reel – tape spool ✈ – airport jet airplane ✉ – envelope mail email ✌ – victory sign ✍ – signature – sign here ✎ – pencil diagonal down ✏ – pencil ✐ – pencil diagonal up |
Also meaning of the article could be like this:
Facebook smile, Facebook smileys, Facebook, Smileys, Facebook Smiles
Subscribe to:
Posts (Atom)


















