Elise - A Responsive Blogger Theme, Lets Take your blog to the next level using this Awesome Theme

This is an example of a Optin Form, you could edit this to put information about yourself or your site so readers know where you are coming from. Find out more...


Following are the some of the Advantages of Opt-in Form :-

  • Easy to Setup and use.
  • It Can Generate more email subscribers.
  • It’s beautiful on every screen size (try resizing your browser!)

2013년 4월 30일 화요일

// // 1 comment

Determinant of n x n Matrix and C source code



We can usually obtain the determinant of $2 \times 2$ matrix as follow;
$$
\begin{vmatrix}
a_{11} & a_{12} \\
a_{21} & a_{22}
\end{vmatrix}
=a_{11}a_{22} - a_{12}a_{21}.
\tag{1}
$$

We can also calculate $3 \times 3$ matrix as follow;
$$
\begin{vmatrix}
a_{11} & a_{12} & a_{13}\\
a_{21} & a_{22} & a_{23}\\
a_{31} & a_{32} & a_{33}
\end{vmatrix}
=a_{11}
\begin{vmatrix}
a_{22} & a_{23}\\
a_{32} & a_{33}
\end{vmatrix}
-
a_{12}
\begin{vmatrix}
a_{21} & a_{23}\\
a_{31} & a_{33}
\end{vmatrix}
+
a_{13}
\begin{vmatrix}
a_{21} & a_{22}\\
a_{31} & a_{32}
\end{vmatrix}
\tag{2}
$$

In this manner, the determinant of $ n \times n$ matrix is calculated by
\begin{align}
\begin{vmatrix}
a_{11} & a_{12} & \cdots & a_{1n}\\
a_{21} & a_{22} & \cdots & a_{2n}\\
\vdots & \vdots & \ddots & \vdots\\
a_{n1} & a_{n2} & \cdots & a_{nn}
\end{vmatrix}
&= a_{11}
\begin{vmatrix}
a_{22} & a_{23} & \cdots & a_{2n}\\
a_{32} & a_{33} & \cdots & a_{3n}\\
\vdots & \vdots & \ddots & \vdots\\
a_{n2} & a_{n3} & \cdots & a_{nn}
\end{vmatrix}
-
a_{12}
\begin{vmatrix}
a_{21} & a_{23} & \cdots & a_{2n}\\
a_{31} & a_{33} & \cdots & a_{3n}\\
\vdots & \vdots & \ddots & \vdots\\
a_{n1} & a_{n3} & \cdots & a_{nn}
\end{vmatrix}
+ \cdots \\
&+

a_{1n}
\begin{vmatrix}
a_{21} & a_{22} & \cdots & a_{2(n-1)}\\
a_{31} & a_{32} & \cdots & a_{3(n-1)}\\
\vdots & \vdots & \ddots & \vdots\\
a_{n1} & a_{n2} & \cdots & a_{n(n-1)}
\end{vmatrix}
\tag{3}

\end{align}

Note that the notation $a_{n(n-1)}$ in last term of Eq. (3) does not denote $n\times (n-1)$, but it denotes $n$th row and $(n-1)$th column for a brevity.
Also the sign of each term depends on the number of rows and columns, that is, the sum of rows and columns are even number, then the sign becomes $'+'$. Otherwise, the sign becomes $'-'$ as follows;
\begin{vmatrix}
+&-&+&-&\cdots\\
-&+&-&+&\cdots\\
\vdots&\vdots&\vdots&\vdots&\ddots
\end{vmatrix}

This is very tedious works to calculate more than 3 rows and columns.

Today, I am going to introduce the source code to calculate the determinant of $n \times n$ matrix.
The source code uses recursive function of itself.
And the recursive function returns the determinant when the column (or row) size of matrix reaches $2$.

Source File Download → Click Here


-->
Read More

2013년 4월 22일 월요일

// // Leave a Comment

Back Up files between Macs with rsync and iCloud

I have two Macs which is MBP and iMac.
Since I need to synchronize files in both Macs,
I was finding out several candidates of synchronization applications.
Among them, the ChronoSync which is developed by Econ technology was the best
for me. It gives me that folder to folder sync, schedule sync and several
options.
However, the problem is transmission speed.
In my case, the ChronoSync syncs my files at a snail pace.
I don't know why.

So, I tried to find out another sync applications for Mac.
And my friend taught me one which is terminal command based sync program named
"rsync".

rsync can synchronize files between any folders in your Mac, 
even it does in remotely connected mac which is possible to connect with ssh.



In my case, there is one more problem that  I usually use my MBP in my univ. and iMac is at my home.
And thus, I need to connect two macs with ssh but
my Univ. does NOT allow any ssh connections from external requests.
Fortunately, however, I can connect my MBP in my univ. from iMac in my home with iCloud.

And there is a solution to use ssh with iCloud.


     Setting Back to My Mac                                              


Open System Preferences, go to iCloud and Check Back to My Mac.









     How to Connect SSH with iCloud                               

First, find out your iCloud ID.
Open terminal and type 
dns-sd -E
then, you can obtain your 9-digits iCloud ID.




After obtaining iCloud ID, you can now connect to remote Macs with SSH through iCloud.
The method is simple.

Type below command to the terminal.

ssh -2 -6 account@remotemac.yourid.members.btmm.icloud.com

You have to change to your appropriate parameter written in italic as below : 
    yourid : your 9-digits iCloud ID
    remotemac : target system name what you want to connect to
    account : your account name of remotemac

This is very long command to type in the terminal.
SSH supports, however, shrinking paths.
Type below command in the terminal

vi ~/.ssh/config


Then press i (if you don't know how to use vi) to enter edit mode, and type below stuffs (in my case I set user as quezina)

Host remote-ssh 
User quezina 
HostName remotemac.yourid.members.btmm.icloud.com  
AddressFamily inet6  
Protocol 2

Note that letters written italic should be changed for your case.


Then save it and quit. (in ordet to save and quit in vi, you should press Esc key and type :wq and return key)

You can now connect to remotemac with SSH through iCloud.

Check your setting in terminal by typing below command

ssh remote-ssh

[Tips] you have to enter you password of remotemac every time when you connect to.
But, you can omit this process by generating public key.

please refer to this site : Setting up SSH public/private keys


     How to Use rsync with SSH through iCloud              

Almost done if you succeeded connecting SSH through iCloud.

rsync supports synchronization with SSH.

If you want to sync between (in you mac) 
/home/source/ 
and (in remotemac)
/storage/source/ 
then, just open the terminal and type below command

rsync -avPz --delete --stats -l -t -e ssh /home/source/ remote-ssh:/storage/source

Note that there is backslash at the end of your mac's path (/home/source/) but destination (remotemac) does NOT have it.
This gives us quiet different results whether '/' is or not.
rsync description explains difference as follows:
              rsync -avz foo:src/bar/ /data/tmp
       A trailing slash on the source changes this behavior to avoid creating an additional directory  level  at  the destination.   You  can  think of a trailing / on a source as meaning "copy the contents of this directory" as opposed to "copy the directory by name", but in both cases the attributes  of  the  containing  directory  are transferred  to  the  containing directory on the destination.  In other words, each of the following commands copies the files in the same way, including their setting of the attributes of /dest/foo:
              rsync -av /src/foo /dest              rsync -av /src/foo/ /dest/foo


That's all.
-->
Read More

2013년 4월 18일 목요일

// // Leave a Comment

Google Glass Explorer Edition Unboxing (Images and Videos)

Google Glass has just been unveiled.

It was delivered to developers who was making reservation to 'the list'.

Below images are posted by Brandon Allgood and Arthur van Hoff on Google+.

the Google Glass comes with two visor, pouch and power adapter.

Its design seems like sports sunglasses as we already know.




    Unboxing Images      












    Unboxing Video      







    Kart Rider with Google Glass




Read More
// // Leave a Comment

Volkswagen Classic Cars Event in Japan, 2013

Volkswagen Classic Car exhibition was held in Japan, 14 April 2013.






Lots of old beetles and vans are exhibited.



Read More
// // Leave a Comment

Google Glass Explorer Edition




Google notified to everyone who is listed on the Google Glass Explorer that the Google Glass Explorer edition will be shipped within a few days by e-mail.

One of the explorer, Brian Klug in Anandtech posted the e-mail to his twitter.



Gizmodo claimed the Google Glass specs (see below).

It has 16GB flash memory storage, 5Mega pixel camera, Bluetooth, WiFi and so on.
Regrettably, it does not support 802.11n, only 802.11b/g.



    SPECIFICATION of GOOGLE GLASS   
(via Gizmodo)


Fit
Adjustable nosepads and durable frame fits any face.
Extra nosepads in two sizes.
Display
High resolution display is the equivalent of a 25 inch high definition screen from eight feet away.
Camera
Photos - 5 MP
Videos - 720p
Audio
Bone Conduction Transducer
Connectivity
Wifi - 802.11b/g
Bluetooth
Storage
12 GB of usable memory, synced with Google cloud storage. 16 GB Flash total.
Battery
One full day of typical use. Some features, like Hangouts and video recording, are more battery intensive.
Charger
Included Micro USB cable and charger.
While there are thousands of Micro USB chargers out there, Glass is designed and tested with the included charger in mind. Use it and preserve long and prosperous Glass use.
Compatibility
Any Bluetooth-capable phone.
The MyGlass companion app requires Android 4.0.3 (Ice Cream Sandwich) or higher. MyGlass enables GPS and SMS messaging.


Read More

2013년 4월 13일 토요일

// // Leave a Comment

[Mac OS X] How to insert null space in Dock


This is my dock of Mountain Lion (Mac OS X 10.8).

I have lots stuffs in my dock since it's very wasting task to go to Application and open some apps.

These lots stuffs in Dock, however, makes me confused to find out app what I want to open.

There is a solution to solve this that inserting null space in dock.

First, open the Terminal app.
(if you are not terminal-friendly user, go to Application -> Utility. Terminal is in there :D)

Second, copy and paste below codes to the Terminal.

defaults write com.apple.dock persistent-apps -array-add '{tile-data={}; tile-type="spacer-tile";}'

And press return key.
There is still no effects to the Dock.

Finally, copy and paste one more source code written below to the Terminal.


killall Dock







Then, you can see a null space in your Dock.

You can move the null space to the place where you want to.




It got easier to find some apps.

When you want to remove null space, just do right click on the null space.



Read More
// // Leave a Comment

iPhone 6 (or iPhone 5S) rumours and leaked images

Well, I think the hot issue of this year will be iPhone 6 (or iPhone 5S) release.
As well as its expectation, there are lots rumours and news about it.

So, I'm gonna summarize some reliable rumours in this post.



         Apple factory photos leak online        
source from zol.com.cn


Zol.com.cn claimed that this leaked images originated from the Apple's manufacturing factory partner (i.e., Foxconn).



I am not sure differences between iphone 5 and new one in leaked image above.
Because the aspect ratio of display seems to be same as that of iphone 5.




We can see the whole image from above leaked photo.
These images is in the full assurance that the iPhone in leaked image might be iPhone 5.




         Modules of iPhone 6 are leaked        
sources from ilab.cc (iLab Factory)

It claimed that they obtained new modules of iPhone 6 (or iPhone 5s) from somewhere.
They are introducing three modules of sensor, rear and front camera.


<Home Button Module (front)>

<Home Button Module (rear)>

They said that the cable of home button module gets longer than older one.




<Front Camera Module (front)>


<Front Camera Module (rear)>

They also said that the light sensor might be allocated into the place marked as 'A'.





<Sensor & button Module (front)>



<Sensor & button Module (rear)>



Finally, the buttons of power, mute (rotate) and volume are all in one cable in the case of iPhone 5. But in this new Module for iPhone 6 (5S) has one more part which is "Dual Head Vibrator" in addition to the module for iPhone 5.




Read More