learningfromexamples.blogspot.com
Learning from Examples: February 2009
http://learningfromexamples.blogspot.com/2009_02_01_archive.html
Friday, February 27, 2009. Here is the solution for Problem number 19. 19 Write a Java class called IsPalindrome, which. Defines a main() method that asks the user to enter. A String s, and displays whether or not s is a. Palindrome. A palindrome is a String which reads the. Same forwards and backwards, such as "laval" or. Code taken from my previous solution of problem #21. Import javax.swing.*;. Import java.text.*;. Public static void main( String[] args ) {. String s1, s2;. Result = -1;. String s1, s2;.
learningfromexamples.blogspot.com
Learning from Examples: November 2008
http://learningfromexamples.blogspot.com/2008_11_01_archive.html
Monday, November 10, 2008. Perl: Rounding off Decimal Digits. Filename: kb converter.pl. Description: Convert values from Bytes to KiloBytes. My $argc = @ARGV;. If($argc = 1) {. Val = shift;. Val = 12345;. My $val kb = $val / 1024;. My $val kb rounded = sprintf("%.2f", $val / 1024);. Print "Not Rounded Answer: n$val Bytes = $val kb KB n";. Print "Rounded Answer: n$val Bytes = $val kb rounded KB n";. Subscribe to: Posts (Atom). How To Install CPANM in CentOS Linux. Perl: Rounding off Decimal Digits.
learningfromexamples.blogspot.com
Learning from Examples: August 2008
http://learningfromexamples.blogspot.com/2008_08_01_archive.html
Wednesday, August 13, 2008. The Unix/Linux 'search' command. How to find files in Linux or Unix using 'find'. The 'find' command is very effective in searching for files in my Unix or Linux box. Here's how you do it:. Find path -name " filename " -print. Example 1: Let us search for the file 'sshd' from the root('/') directory. Find / -name "sshd" -print. So, there it is, the 'sshd' file can be found from those six different locations. Searching a File containing a particular text string in Unix or Linux.
learningfromexamples.blogspot.com
Learning from Examples: English to Bisaya Language Translator
http://learningfromexamples.blogspot.com/2008/07/english-to-bisaya-language-translator.html
Thursday, July 24, 2008. English to Bisaya Language Translator. Hmmm I have successfully created an English to Bisaya Language Translator about 3 years ago, as a project in my Natural Language Processing (NLP) subject and I developed it using Visual Basic 6. Luckily last weekend, as I tried to clear some trash in my room, I found the Object Schema documentation of my project! Labels: English to Bisaya Language Translator. English to Cebuano Language Translator. Naa pod ni nga diksyonaryo:. Here is the so...
learningfromexamples.blogspot.com
Learning from Examples: Java Problems
http://learningfromexamples.blogspot.com/2009/02/java-problems.html
Friday, February 27, 2009. I have found these problems being posted from a certain forum. It has been two years or more since I have coded in Java so I gave it a try and shared my solutions at the forum. I'll just post it here too. Here are the problems. 1 Write a Java class called Factorial which defines a main() method that asks the user to enter a positive integer n and displays the factorial of n. The factorial of an integer n, denoted n! Is defined as n * (n-1) * (n-2) * . * 1 (but note that 0!
learningfromexamples.blogspot.com
Learning from Examples: May 2008
http://learningfromexamples.blogspot.com/2008_05_01_archive.html
Thursday, May 8, 2008. Accepting Inputs in Python. I want to learn how to get or accept inputs in python. I want to start from the very basic. In C, there are several functions you can choose from, the very basic is scanf(). In python, there is this raw input() function. The raw input([prompt]) function will first display what is placed in [prompt] then wait for keyboard input(s) and return the input as a string. Now, lets try this example:. Description: A program that ask for a name and greet hello.
learningfromexamples.blogspot.com
Learning from Examples: July 2008
http://learningfromexamples.blogspot.com/2008_07_01_archive.html
Thursday, July 24, 2008. English to Bisaya Language Translator. Hmmm I have successfully created an English to Bisaya Language Translator about 3 years ago, as a project in my Natural Language Processing (NLP) subject and I developed it using Visual Basic 6. Luckily last weekend, as I tried to clear some trash in my room, I found the Object Schema documentation of my project! Labels: English to Bisaya Language Translator. English to Cebuano Language Translator. Wednesday, July 23, 2008. The script is sim...
learningfromexamples.blogspot.com
Learning from Examples: April 2008
http://learningfromexamples.blogspot.com/2008_04_01_archive.html
Wednesday, April 30, 2008. Variables in Python 1. Honestly, I got so excited learning Python after I discovered how to write the "Hello World! Program in Python. From my "Hello World! Program, I learned how to place comments in my program, in the beginning of your comment, you just got to place a sharp(#) to denote that the line is not part of the code, its only a comment. String enclosed with a double-quote. Is the first line of my code also a comment? Here's the first line of the hello.py code:. Lets d...
learningfromexamples.blogspot.com
Learning from Examples: Java Problem 21
http://learningfromexamples.blogspot.com/2009/02/java-problem-21.html
Friday, February 27, 2009. The next problem I tried to solved was problem 21. 21 Write a Java class called Equals, which defines a. Main() method that asks the user to enter two Strings s1. And s2, and displays whether or not s1 and s2 are equal. Two Strings are equal if they are of the same length. And the same characters appear in the same positions. You MUST NOT use any of the methods defined in the String. Class other than charAt() and length(). Import javax.swing.*;. Import java.text.*;. Result = -1;.