TheBoox(Code, Linux, Hack,Security)
Coding, Linux, Hacking Security, Learning!
Coding, Linux, Hacking Security, Learning!
May 30th
subring defined by:
if R is a ring,
1) I is subset of R
2) I is also a ring
example:
let R = Z (integer)
I = 2Z is subring of R, since 2Z is also a ring,
is (2Z + 1) also a subring of R?, no
proof:
let a, b in Z
=> 2*a + 1 in 2Z + 1
=> 2*b + 1 in 2z + 1
let (2*a + 1 ) + (2*b + 1)
=> 2*a + 2*b + 1 + 1
=> 2(a + b) + 2
=> 2(a + b + 1)
=> 2(a + b + 1) is not in 2Z + 1
hence 2(a + b + 1) is not closed under addition
so 2Z + 1 is not a ring,
May 30th
ring is defined by
1) two operator: addition(+) and multiplication(*)
if a, b in R, then a + b in R
if a, b in R, then a*b in R
2) there exists 0 such that if a in R, then a + 0 = a
there exists additive inverse -a such that if a in R, then a + (-a) = 0examples of ring:
Integer, real number, complex number.
[ad] Empty ad slot (#1)!
May 24th
import java.io.*; class FileRead { public static void main(String args[]) { try{ // Open the file that is the first // command line parameter FileInputStream fstream = new FileInputStream("textfile.txt"); // Get the object of DataInputStream DataInputStream in = new DataInputStream(fstream); BufferedReader br = new BufferedReader(new InputStreamReader(in)); String strLine; //Read File Line By Line while ((strLine = br.readLine()) != null) { // Print the content on the console System.out.println (strLine); } //Close the input stream in.close(); }catch (Exception e){//Catch exception if any System.err.println("Error: " + e.getMessage()); } } }
May 23rd
login to your database
>mysql -u user_name -p
>drop database old_database;
here is the command to create new database
>create database mynewdb;
May 9th
May 6th
May 2nd
Apr 18th
here is the command to change ubuntu default shell
use your favorite editor to open /etc/passwd file
vim /etc/passwd
find your user name
change /bin/sh or /bin/bash or vice versa
save the change
logout your shell and login again
done!