Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/content/f/e/r/ferasferas1/html/scriptslibrary/libraries/joomla/database/database.php:2) in /home/content/f/e/r/ferasferas1/html/scriptslibrary/libraries/joomla/session/session.php on line 423
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/content/f/e/r/ferasferas1/html/scriptslibrary/libraries/joomla/database/database.php:2) in /home/content/f/e/r/ferasferas1/html/scriptslibrary/libraries/joomla/session/session.php on line 423
Warning: Cannot modify header information - headers already sent by (output started at /home/content/f/e/r/ferasferas1/html/scriptslibrary/libraries/joomla/database/database.php:2) in /home/content/f/e/r/ferasferas1/html/scriptslibrary/libraries/joomla/session/session.php on line 426 Code Snippets - The Scripts Library CommunityFree programming tutorial and source code for beginners and professionalhttp://www.scriptslibrary.net/code-snippets2010-09-09T07:22:21ZJoomla! 1.5 - Open Source Content ManagementRemove characters from a string except numbers and letters2009-12-05T01:34:19Z2009-12-05T01:34:19Zhttp://www.scriptslibrary.net/php/124-remove-characters-from-a-string-except-numbers-and-lettersFerasferasc@hotmail.comIf you want to remove all characters and special symbols from a string in php, use the following code snippet:<br /><br /><br />{CODE brush: php;} <br /><?php<br /><br />$string = "remove *unwanted !character% from my string 1212&&";<br />$clean_string= ereg_replace("[^A-Za-z0-9]", "", $string);<br />echo $clean_string<br /><br />?><br />{/CODE}If you want to remove all characters and special symbols from a string in php, use the following code snippet:<br /><br /><br />{CODE brush: php;} <br /><?php<br /><br />$string = "remove *unwanted !character% from my string 1212&&";<br />$clean_string= ereg_replace("[^A-Za-z0-9]", "", $string);<br />echo $clean_string<br /><br />?><br />{/CODE}Get Local IP Address List Using VB.NET2009-11-28T15:43:49Z2009-11-28T15:43:49Zhttp://www.scriptslibrary.net/visual-basic-net/123-get-local-ip-address-list-using-vbnetFerasferasc@hotmail.comGet local IP address list using VB.NET.<br />Get local IP address list using VB.NET.<br />Get Computer Name Using VB.NET2009-11-27T16:47:14Z2009-11-27T16:47:14Zhttp://www.scriptslibrary.net/visual-basic-net/122-get-computer-name-using-vbnet-Ferasferasc@hotmail.comGet a computer’s name by using the static method Dns.GetHostName in VB.NET<br /><br />Required namespace for this snippet:<br />Get a computer’s name by using the static method Dns.GetHostName in VB.NET<br /><br />Required namespace for this snippet:<br />Count Words in a Text String in VB.NET2009-11-27T04:32:41Z2009-11-27T04:32:41Zhttp://www.scriptslibrary.net/visual-basic-net/121-count-words-in-a-text-string-in-vbnetFerasferasc@hotmail.comA simple function that count number of words in a given text string, assuming that it’s delimited by spaces:<br />A simple function that count number of words in a given text string, assuming that it’s delimited by spaces:<br />PHP Function to Prevent SQL injection2009-11-27T03:06:22Z2009-11-27T03:06:22Zhttp://www.scriptslibrary.net/php/120-php-function-to-prevent-sql-injectionFerasferasc@hotmail.comFunction to clean user input string to prevent SQL injections:Function to clean user input string to prevent SQL injections:Play Movie Flash File using HTML2009-11-27T02:49:24Z2009-11-27T02:49:24Zhttp://www.scriptslibrary.net/html/119-play-movie-flash-file-using-htmlFerasferasc@hotmail.comA simple code snippet demonstrates how to play a Flash Movie in Object Tag:<br />A simple code snippet demonstrates how to play a Flash Movie in Object Tag:<br />Socket Connect and Data Send in VB.NET2009-07-24T23:49:13Z2009-07-24T23:49:13Zhttp://www.scriptslibrary.net/visual-basic-net/118-socket-connect-and-data-send-in-vbnetFeraspayment@lebmailer.comFunction to connect to host machine, and send data via TCP Socket in VB.NET<br /> <br />First, add the following namespace<br />Function to connect to host machine, and send data via TCP Socket in VB.NET<br /> <br />First, add the following namespace<br />Auto-Fill ComboBox Using C#2009-06-30T06:35:54Z2009-06-30T06:35:54Zhttp://www.scriptslibrary.net/c-sharp/117-auto-fill-combobox-using-cFerasferasc@hotmail.comThis is simple code of how you fill a combobox automatically in C#.<br /> First, lets bind the combo with some data:<br />This is simple code of how you fill a combobox automatically in C#.<br /> First, lets bind the combo with some data:<br />Get User Domain Name in C#2009-06-29T17:37:41Z2009-06-29T17:37:41Zhttp://www.scriptslibrary.net/c-sharp/115-get-user-domain-name-in-cFerasferasc@hotmail.comGet user domain name in C#<br /><br /><br />{CODE brush: cpp;}<br /> protected string GetUserDomainName()<br /> {<br /> return System.Environment.UserDomainName;<br /><br /> }<br />{/CODE}Get user domain name in C#<br /><br /><br />{CODE brush: cpp;}<br /> protected string GetUserDomainName()<br /> {<br /> return System.Environment.UserDomainName;<br /><br /> }<br />{/CODE}Play Audio Files Using VB.NET2009-06-29T02:17:43Z2009-06-29T02:17:43Zhttp://www.scriptslibrary.net/visual-basic-net/114-play-audio-files-using-vbnetFerasferasc@hotmail.comHere is a simple example of how to play audio file in VB.NET.<br /><br /> It requires the System.Media Namespace:<br /> {CODE brush: vb;}Imports System.Media{/CODE}<br /><br /> And the code:<br /> {CODE brush: vb;} Sub PlaySound(ByVal filepath As String)<br /> Dim soundplayer As New SoundPlayer<br /> soundplayer.SoundLocation = filepath<br /> soundplayer.Play()<br /> End Sub<br />{/CODE}<br /> <br /> Happy Coding.Here is a simple example of how to play audio file in VB.NET.<br /><br /> It requires the System.Media Namespace:<br /> {CODE brush: vb;}Imports System.Media{/CODE}<br /><br /> And the code:<br /> {CODE brush: vb;} Sub PlaySound(ByVal filepath As String)<br /> Dim soundplayer As New SoundPlayer<br /> soundplayer.SoundLocation = filepath<br /> soundplayer.Play()<br /> End Sub<br />{/CODE}<br /> <br /> Happy Coding.