PigRider Blogs

Sign In
HTML CSS Javascript Ruby on Rails C++ Java Python SQL Git Linux Others All By Author: Dingyu
Previous 1 2 3 4 5 6 Next

Resync git repo with new gitignore file

[Author: Dingyu]   [Mon, 2014-05-26, 22:37]   [1745 views]

Git

git rm -r --cached .
git add .
git commit -m ".gitignore is now working" ... see full article

Comparing two branches in Git

[Author: Dingyu]   [Wed, 2014-02-26, 15:48]   [1634 views]

Git

git diff Branch_1..Branch_2
That will produce the diff between the tips of the two branches. If you'd prefer to find the diff from their common ancestor to test, you can use three dots instead of two:
git diff Branch_1...Branch_2 ... see full article

Vim Cheat Sheet

[Author: Dingyu]   [Wed, 2014-01-15, 15:10]   [1702 views]

Linux

In the Insert Mode
Esc Go back to the normal mode.
In the Normal Mode
i Change into the insert mode. Insert text before the character under the cursor.
a Change into the insert mode. Append text after the character under the cursor.
o Change into the insert mode. Create a new, empty line below the c ... see full article

How to use Git to download a particular tag?

[Author: Dingyu]   [Tue, 2014-01-14, 10:30]   [1638 views]

Git

git clone will give you the whole repository.
After the clone, you can list the tags with: git tag -l 
Then you can checkout a specific tag with: git checkout tags/TAG_NAME ... see full article

Useful Linux Commands

[Author: Dingyu]   [Sat, 2014-01-11, 15:19]   [1600 views]

Linux

Add a user and set the password
useradd USERNAME
Add a user with the username "USERNAME".
passwd USERNAME
Set the password for the user "USERNAME".
Delete a user
userdel USERNAME
The disadvantage of the above command is that it only deletes users login details but not his home directory.
userdel -r ... see full article

Start and Stop MySQL Service on Windows with Windows Command Prompt

[Author: Dingyu]   [Sun, 2013-10-20, 15:03]   [1780 views]

SQL

# Start MySQL Service on Windows with Windows Command Prompt
net start MySQL
# Stop MySQL Service on Windows with Windows Command Prompt
net stop MySQL
# Start and Stop other Windows Service with Windows Command Prompt
net start ServiceName
net stop ServiceName ... see full article

Basic C++ Concepts

[Author: Dingyu]   [Wed, 2013-10-02, 09:35]   [1715 views]

C++

Basic C++ Concepts
Pointer
int square(int iNum) {
  return iNum*iNum;
}
int main() {
  int iNum=10;
  int* p1=&iNum;      // Define a pointer and let it point to an integer variable
  int* p2=p1;      // Still point to that integer variable
  int** p3=&p2;      // Define a pointer that points to ano ... see full article

Study note for Java

[Author: Dingyu]   [Sun, 2013-09-22, 21:29]   [1513 views]

Java

1. Bitwise and Bit Shift Operators
// Operator & performs a bitwise AND operation.
// Operator | performs a bitwise inclusive OR operation.
// Operator ^ performs a bitwise exclusive OR operation.
// Operator ~ is an unary bitwise complement operator.
// Operator << is the signed left shift operator ... see full article

Basic Ruby on Rails Concepts

[Author: Dingyu]   [Tue, 2013-09-10, 15:29]   [3217 views]

Ruby on Rails

Basic Ruby on Rails Concepts
Why Ruby on Rails ? 
1) for fast developing websites
2) DRY Principal(Don’t Repeat Yourself)
3) convention over configuration
4) scaffolding
5) pure Object oriented concepts
6) less coding
7) easy understanding of coding
8) follows MVC architecture
9) using library and g ... see full article

Basic Object-Oriented Programming Concepts

[Author: Dingyu]   [Tue, 2013-08-20, 13:05]   [1558 views]

Others

Basic Object-Oriented Programming Concepts
Class vs. Object
Many people get confused by the difference between class and object. The difference is simple and conceptual. A class is a template for objects. A class defines object properties including a valid range of values, and a default value. A cla ... see full article
Previous 1 2 3 4 5 6 Next

Most Popular By This Author: