Sunday, June 3, 2012

[C#] String Replacer

          Hello, Reader ^^! Back again with source code. This time is String Replacer which is made using C# programming language. This shows how to do a string replace. Mainly, you can use (String object).Replace to replace the string. In this one, I also added save and load feature so it easier to read very long string. Okay, that's all I can say. Thank you for reading ^^!





Download/View Source Code
Dropbox
Dropbox (Repository)
GitHub
GitHub (Repository)







[Ruby] String Replacer

          Hello, Reader ^^! Back again with source code. This time is String Replacer which is made using Ruby programming language. This shows how to do a string replace. Mainly, you can use gsub to replace the string. In this one, I also added save and load feature so it easier to read very long string. Okay, that's all I can say. Thank you for reading ^^!



Download/View Source Code
Dropbox
Dropbox (Repository)
GitHub
GitHub (Repository)







Friday, April 27, 2012

[PHP] If-Then-Else Syntax

          Hello, Reader ^^! Back again with source code. This time is a basic syntax If-Then-Else in PHP programming language. This source code is to show how to do If-Then-Else statement in PHP language. Here's the template:


if <condition> {
       <statement if true> 
} else {
       <statement if false>
}


Okay, that's all I can say. Thank you for reading ^^!

Download/View Source Code
Dropbox
Dropbox (Repository)
GitHub
GitHub (Repository)







[PHP] If-Then Syntax

          Hello, Reader ^^! Back again with source code. This time is a basic syntax If-Then in PHP programming language. This source code is to show how to do If-Then statement in PHP language. Here's the template:


if <condition> {
       <statement if true> 
}


Okay, that's all I can say. Thank you for reading ^^!

Download/View Source Code
Dropbox
Dropbox (Repository)
GitHub
GitHub (Repository)







[Ruby] Random Choice With Hash Table

          Hello, Reader ^^! Back again with source code. This time is Random Choice With Hash Table which is made using Ruby programming language. This shows how to do a random number and use hash table combined into choosing output of hash table by randomize the choice. The input of the left side of the hast table must be integer type. Other still work, but you need to hash it before randomizing hashing it. Okay, that's all I can say. Thank you for reading ^^!


Download/View Source Code
- Dropbox
- Dropbox (Repository)
- GitHub
GitHub (Repository)







[Javascript] [Crafty] Draw Image

          Hello, Reader ^^! Back again with source code. This time is Draw Image which is written in Java script programming language and Crafty extension. This shows how to draw image in Crafty screen. You need Image and 2D object in the Crafty object for image and positioning. You also need linking with an image in the folder you want. Okay, that's all I can say. Thank you for reading ^^!






Download/View Source Code
Dropbox
Dropbox (Repository)
GitHub
GitHub (Repository) 







[Javascript] [Crafty] Text Example

          Hello, Reader ^^! Back again with source code. This time is Text Example which is written in Java script programming language and Crafty extension. This shows how to write text inside Crafty screen. You need to include 2D, Text, and DOM Crafty object first. Then you set the position and the text which want to be written. Okay, that's all I can say. Thank you for reading ^^!






Download/View Source Code
Dropbox
Dropbox (Repository)
GitHub
GitHub (Repository) 







[Java] If-Then-Else Syntax

          Hello, Reader ^^! Back again with source code. This time is a basic syntax If-Then-Else in Java programming language. This source code is to show how to do If-Then-Else statement in Java language. Here's the template:


if <condition> {
       <statement if true> 
} else {
       <statement if false>
}


Okay, that's all I can say. Thank you for reading ^^!

Download/View Source Code
Dropbox
Dropbox (Repository)
GitHub
GitHub (Repository)







[Java] If-Then Syntax

          Hello, Reader ^^! Back again with source code. This time is a basic syntax If-Then in Java programming language. This source code is to show how to do If-Then statement in  Java language. Here's the template:


if <condition> {
       <statement if true> 
}


Okay, that's all I can say. Thank you for reading ^^!

Download/View Source Code
Dropbox
Dropbox (Repository)
GitHub
GitHub (Repository)







Thursday, April 26, 2012

[Java] [JSP] Login and Logout

          Hello, Reader ^^! Back again with source code. This time is Login and Logout which is written in Java programming language and JSP extension. This one demonstrates how to do login and logout. It uses session to persistent the information between pages and MySQL to get user data from database. Okay, that's all I can say. Thank you for reading ^^!




Download/View Source Code
Dropbox
Dropbox (Repository)
GitHub
GitHub (Repository) 







[Java] [JSP] Insert Data to MySQL

          Hello, Reader ^^! Back again with source code. This time is Insert Data to MySQL which is written in Java programming language and JSP extension. In this one, it shows how to insert data input from html page into mysql query. The input itself is processed in jsp page using mysql library. This example also shows error if any of the input is null value, returning to the input page. To ensure that the input is really inserted, after submitting input, it will redirect to view page showing the query in the database, if you see your input, that means the inoput is successfully inserted into MySQL database. Okay, that's all I can say. Thank you for reading ^^!






Download/View Source Code
Dropbox
Dropbox (Repository)
GitHub
GitHub (Repository) 







[Java] [JSP] Search Based Similarity (Substring)

          Hello, Reader ^^! Back again with source code. This time is Search Based Similarity (Substring) which is written in Java programming language and JSP extension. In this one, it shows how to do a search based on similarity of word using substring. In this case is title. If the title contain the substring, it will be included in query. Btw, you need MySQL library to call it before you can use it. Okay, that's all I can say. Thank you for reading ^^!




Download/View Source Code
Dropbox
Dropbox (Repository)
GitHub
GitHub (Repository) 







Wednesday, April 25, 2012

[Ruby] Dancing With the Googlers (Google Code Jam 2012)

          Hello, Reader ^^! Back again with source code. This time is Dancing With the Googlers problem solver which is written in Ruby programming language. The case is from Google Code Jam 2012: Qualification Round. I participated in the qualification and fortunately I can go to Round 1 :D. This one easy but a bit tricky. See the detail at the Extra Credit. Okay, that's all I can say. Thank you for reading ^^!






Extra Credit

Problem case and example (in B-small-attempt0.in, B-large.in, and Dancing_With_the_Googlers_example.txt) from Google Code Jam 2012 Qualification Round (http://code.google.com/codejam/contest/1460488/dashboard#s=p1)



Download/View Source Code
Dropbox
Dropbox (Repository)
GitHub
GitHub (Repository) 







[Ruby] Speaking in Tongues (Google Code Jam 2012)

          Hello, Reader ^^! Back again with source code. This time is Speaking in Tongues problem solver  which is written in Ruby programming language. The case is from Google Code Jam 2012: Qualification Round. I participated in the qualification and fortunately I can go to Round 1 x3. Now, instead of letting the code unused after helping me facing the competition, I post it in my blog as my thanks for my codes :3. About the case, it is about hashing one-to-one input, but the detail, looks at the extra credit for the link :D. Okay, that's all I can say. Thank you for reading ^^!




Extra Credit
Problem case and example (in A-small-attempt0.in and Speaking_in_Toungues_example.txt) from Google Code Jam 2012 Qualification Round (http://code.google.com/codejam/contest/1460488/dashboard#s=p0)


Download/View Source Code
Dropbox
Dropbox (Repository)
GitHub
GitHub (Repository) 







Tuesday, April 24, 2012

[Java] [JSP] Search Based Tag

          Hello, Reader ^^! Back again with source code. This time is Search Based Tag which is written in Java programming language and JSP extension. In this one, it shows how to do search based tag. It will return output based on whether the post has the tag which input is received from user. It also calls from mysql database so you might need a .jar before you can use the mysql in jsp. Okay, that's all I can say. Thank you for reading ^^!


(Note: the picture there is 7, but since my monitor is too big or I was too lazy to minimize it, so I crop it xD)


Download/View Source Code
Dropbox
Dropbox (Repository)
GitHub
GitHub (Repository) 







[Ruby] [FXRuby] Read (Load) File

          Hello, Reader ^^! Back again with source code. This time is Text Example which is written in Ruby programming language and FXRuby extension. In this one, it will show load file dialogue. It will get the path of the to be loaded/read. However, it only get the file path, it will not load it immediately, so you need to define the read/load in standard ruby after using the file load dialogue. There's example how to do it in the source code. Okay, that's all I can say. Thank you for reading ^^!






Download/View Source Code
Dropbox
Dropbox (Repository)
GitHub
GitHub (Repository) 







[Ruby] [FXRuby] Write (Save) File

          Hello, Reader ^^! Back again with source code. This time is Text Example which is written in Ruby programming language and FXRuby extension. In this one, it will show save file dialogue. It will get the path of the to be saved/written. However, it only get the file path, it will not save it immediately, so you need to define the write/save in standard ruby after using the file save dialogue. There's example how to do it in the source code. Okay, that's all I can say. Thank you for reading ^^!






Download/View Source Code
Dropbox
Dropbox (Repository)
GitHub
GitHub (Repository) 







[Ruby] [FXRuby] User Defined Message Dialogue

          Hello, Reader ^^! Back again with source code. This time is Text Example which is written in Ruby programming language and FXRuby extension. In this one, how to pop up message dialogue using your own defined message dialogue. There is already built-in message dialogue but I prefer to define my own message dialogue so I can define my own message icon in it. Okay, that's all I can say. Thank you for reading ^^!






Download/View Source Code
Dropbox
Dropbox (Repository)
GitHub
GitHub (Repository) 







[Ruby] [FXRuby] Input From Text Field

          Hello, Reader ^^! Back again with source code. This time is Text Example which is written in Ruby programming language and FXRuby extension. In this example, it shows how to get input from a text field. You need to call the FXRuby component as variable to achieve it for calling the variable value. Okay, that's all I can say. Thank you for reading ^^!




Download/View Source Code
Dropbox
Dropbox (Repository)
GitHub
GitHub (Repository) 







[Ruby] [FXRuby] Text Example

          Hello, Reader ^^! Back again with source code. This time is Text Example which is written in Ruby programming language and FXRuby extension. In this example, it will display how to use text. You can use FXLabel to achieve it. That way, there will be text on window form. Its value can be also changed to other text. Okay, that's all I can say. Thank you for reading ^^!




Download/View Source Code
Dropbox
Dropbox (Repository)
GitHub
GitHub (Repository)