Posts

Showing posts from March, 2012
when you write 'free' on linux

you will know the rest of you computer memory

[root@posu7 logs]# free

             total       used       free     shared    buffers     cached
Mem:        524288     404716     119572          0      76072      93512
-/+ buffers/cache:     235132     289156
Swap:      1081336        112    1081224

Install Mysql

Now I let you know how to install MySQl on linux

First this will check if mysql is already installed on linux # rpm -qa | grep mysql
Remove previouse Versin # rpm -e  mysql-devel-5.0.77-4.el5_5.4 –-nodeps(--nodeps will ignore dependencies)
And go to web site to find the version that you want to install
http://dev.mysql.com/downloads/mysql/
# rpm -ivh Mysql-server....rpm # rpm -ivh Mysql-share.....rpm # rpm -ivh mysql-devel......rpm # rpm -ivh mysql-client......rpm
A) If you are /using mysql on RedHat Linux (Fedora Core/Cent OS) then use following command: * To start mysql server: /etc/init.d/mysqld start * To stop mysql server: /etc/init.d/mysqld stop * To restart mysql server /etc/init.d/mysqld restart# service mysqld start # service mysqld stop # service mysqld restart$ mysql -u root -p Enter password: mysql> use mysql mysql> GRANT ALL ON *.* to root@'192.168.1.4' IDENTIFIED BY 'your-root-password'; mysql> FLUSH PRIVILEGES; and /etc/sysconfig vi iptables and…

What is RPM

RPM(RedHat Package Manager)
RPM Package Manager (RPM) is a package management system.[2]The name RPM variously refers to the .rpmfile format, files in this format,software packaged in such files, and the package manager itself. RPM was intended primarily for GNU/Linux distributions; the file format is the baseline package format of the Linux Standard Base.
rpm -qi :  mtools-3.9.8-2.i386.rpm print package summary
rpm -i : mtools-3.9.8-2.i386.rpm install package
rpm -ivh : mtools-3.9.8-2.i386.rpm install, monitor and verify pack
rpm -q : mtools verify if pack installed
rpm -qa :  list all installed packs
rpm -ql : mtools list all files installed for pack
rpm -qd : mtools list pack doc files only
rpm -e  : mtools erase package
rpm -Uvh :  * upgrade all packs in distribution

What is Wget

What is Wget

Definition: wget: retrieves files from the web Wget is a network utility to retrieve files from the Web using http and ftp, the two most widely used Internet protocols. It works non-interactively, so it will work in the background, after having logged off. The program supports recursive retrieval of web-authoring pages as well as ftp sites -- you can use wget to make mirrors of archives and home pages or to travel the Web like a WWW robot. Wget works particularly well with slow or unstable connections by continuing to retrieve a document until the document is fully downloaded. Re-getting files from where it left off works on servers (both http and ftp) that support it. Both http and ftp retrievals can be time stamped, so wget can see if the remote file has changed since the last retrieval and automatically retrieve the new version if it has. Wget supports proxy servers; this can lighten the network load, speed up retrieval, and provide access behind firewalls. http://www.g…

FTP Install

First you need to download lftp


[root@localhost /]# yum install lftp

after that 
mkdir /usr/local/src/ftpd cd /usr/local/src/ftpd

before you write below line, you should look on the http://www.proftpd.org/ and check lasted version.
lftpget ftp://ftp.proftpd.org/distrib/source/proftpd-1.3.4a.tar.gz
[root@localhost ftpd]# tar -xvzf proftpd-1.3.4a.tar.gz proftpd-1.3.4a/ proftpd-1.3.4a/doc/ proftpd-1.3.4a/doc/utils/ proftpd-1.3.4a/doc/utils/ftpcount.html proftpd-1.3.4a/doc/utils/ftpmail.html proftpd-1.3.4a/doc/utils/ftpasswd.html proftpd-1.3.4a/doc/utils/ftpscrub.html proftpd-1.3.4a/doc/utils/ftpwho.html proftpd-1.3.4a/doc/utils/ftptop.html proftpd-1.3.4a/doc/utils/ftpquota.html proftpd-1.3.4a/doc/utils/ftpdctl.html proftpd-1.3.4a/doc/utils/index.html proftpd-1.3.4a/doc/utils/ftpshut.html proftpd-1.3.4a/doc/contrib/ proftpd-1.3.4a/doc/contrib/mod_sql_odbc.html proftpd-1.3.4a/doc/contrib/mod_wrap2_file.html proftpd-1.3.4a/doc/contrib/mod_ifsession.html proftpd-1.3.4a/doc/contrib/mod_exec.h…

Pattern easy

This is very is and amazing if you know

ex) if(split[i].matches("[A-Za-z]+\\.?")){     }
what dose that mean?
i'm just looking for JAVA API
[A-Za-z] : those alphabet A from Z or a-z is available  +       : [A-Za-z] uses more than one time \\ .?       : .? means one or nothing  

"33. "             return false "gefefeddd."       return true "ddddfedAE"        return true "d.d.d"            return false "ddkdkjeij.33412"  return false "12312tjkjkd@#"    return false

TopCoder1

Image
I just started Topcoder
it is very interesting for me
because i have to think about a lot of things.
this homepage is really good
I hope my coding pattern and style will be better than now~!


do you want to do this with me?
write message to me~!

this article is about tho question    "practiceRooms/Inv 2001 R1/ 500"




my answer is below~!







import java.util.ArrayList;


public class SquareDigits {
public static void main(String args[]){
int a= new SquareDigits().smallestResult(112);
System.out.println(a);
}


public int smallestResult(int value){
int count =0;
ArrayList<Integer> tArray= new ArrayList<Integer>();
int sum = 0;
String sValue ="";
sValue =String.valueOf(count);
while(true){

for(int i=0; i<sValue.length(); i++){
String eachValue = sValue.substring(i, i+1);
sum = sum + Integer.parseInt(eachValue)*Integer.parseInt(eachValue);
}

if(sum == value){
if(tArray.size()==0) return count;
return tArray.get(0);
}else{
if(tArray.contains(sum)){
count=count+1;
tArray.clear();
sValue =String.va…