Sunday, June 26, 2011

Read csv file in C

Here is the C code to get csv file data.

-------------------------------------------------------------------------------------
#include "stdio.h"
#include "stdlib.h"
#include "math.h"

int main(void){

FILE *fin;
float a=0;
int nb_data = 60, i=0;

float* ReadArray;
ReadArray = (float *)malloc(sizeof(float)*nb_data);


/* open file */
if( (fin=fopen("TestData.csv","r")) == NULL ){
printf("file cant open\n");
exit(1);
}
/* get data one by one */
while( fscanf(fin,"%f,", &a) != EOF )
{
/* print */
ReadArray[i] = a;
printf( "read value=%f\n", ReadArray[i]);
i++;
}

fclose( fin );
}
-------------------------------------------------------------------------------------

French tax return

French citizen have to pay the taxes by oneself. There are two types of taxes - 1) taxes drawn from salary which companies pay so people don't have to deal with and 2) taxes I have to deal with by myself.

1)

2)
- 所得税 income tax
3回に分ける方式と、毎月払う方式(銀行口座からの引き落とし)から選べる。
今年の分は、前年の給料に基づいて支払っていき、年末に調整をする。

In this site (http://www.impot.gouv.fr/), we can quickly simulate the sum of tax we need to pay.
Generally, the amount corresponds to one month salary and proportional to the working period. If you started to work in June, you'll have to pay half of your one month salary.




- 住民税 resident tax
住んでいる地域と、アパートの大きさによって、額が決まる。
パリで30程度のstudioなら、500ユーロぐらいとのこと。


[ref. 1] Other taxes in France
- Consumption tax
5.5%。TVA(Tax à la Valeur Ajoutée) という。

[ref. 2] Tax in Japan
収入is brut、所得is net.
所得税が実際に課税されるのは、所得から社会保険料(国民年金、厚生年金、健康保険等)や扶養控除、基礎控除等の各種控除を差し引いた後の金額

Saturday, June 25, 2011

Antivirus soft

Recently bought McAfee antivirus software. As the package is written in French, I expected French version for the software itself. However once it is installed in my PC, all explications were in Japanese. This means that the software somehow recognized the mother language of my PC and adopted to the language. In fact, I wanted to see French interface just for my interest and for practicing my French... this is a shame.

Sunday, June 19, 2011

Velib

Velib is much easier to use than I have been expecting. This is my impression after taking a ride for the first time since I arrived in France. Very comfortable to ride in.

Here are the problems. First, in France it is not allowed to use the walkway for bicycle so people use the car road like motorcycle. So there are bicycles in the big intersection and rotary between cars. Second, there are many one-way street in Paris and bicycles, of course, need to follow it. People have to use other non direct streets. Then how can you find it is one-way or not because there are no signs in many cases?? The most common way is to check the direction of parked cars, or if there are two traffic light on the both sides of the street, the street is one way.

Today there are 1800(!) Velib stations in/close to Paris and they are placed about every 300m.

Thursday, June 2, 2011

Why France?

タイトルの質問は、死ぬまで聞かれるであろう。ただ、ヤボだと思うし(人にはそれぞれ事情があるもので、フランスに来るというのは、スーパーに買い物に行くのとはわけが違って、込み入った理由があることが多い)、相手の個人的な領域に足を踏み入れるような気がする。自分は、躊躇してしまう。ただ、聞き方によっては、それほど領域の奥に入ることはないと思うし、状況によっては、聞くのが自然という場合があると思う。

・最初に日本から出た理由
年上の親友をきっかけに、エンジニアとして来日していた外国人たちと知り合ったときに、エクスパットという仕事のスタイルがあることを知り、ある国にとどまって、そこでずっと生活をしていくのがつまらないと感じたということが一番だろう。大学時代を通して、専攻に物足りなさを感じて、ずっとくすぶっていて、何か外に向けてしたいと思っていたが、大学を通じでは、外に繋がるものが何も見つけられなかった。1年間のインターンシッププログラムに応募した。どんな一年になるか、全く予想がつかなかったけど、何かを得たいと思っていた。経験、語学、仕事、の3つのうち、会社が決まった時点で、とりあえず経験(CVに良いという意味)はゲットした。仕事つまらなかったり、自分の能力以上のものであれば、それは捨てて、語学に専念しようと思っていた。あるプログラムの先輩が「プログラムをウルルン滞在記にするな」と言ったが、これはまさにそうで、いい思い出にするだけには勿体なさすぎるプログラムである。

・残りたかった理由
【即時的なもの】
1.エンジニアの社会的ステイタスが高い・・・エンジニアは給料が良い部類だ。頭を使って、ものを作りだす仕事が、尊敬されている。
2.仕事にとても興味が持てた
3.いい会社だった
5.パリでの生活は問題ない・・・溶け込めているように感じられる必要があると思う。溶け込めているように感じられたのは、フラットメイトの存在が大きかったと思う。
【将来的なもの】
1.キャリアの差別化ができる
2.学ぶことができ、専門を伸ばすことができる
3.英語と仏語の両方を身につけられる


Search apartment (2)

In Paris, the price of apartment has been going up since several years. One of my friend said to me that she bought an apartment in the 11th district when she was a student (now she is 30 years old), and renting it now.



is a free paper distributed every morning at the gate of metro stations in Paris.

Wednesday, June 1, 2011

Search apartmetn (1)

Finding a nice apartment is difficult in Paris. I found my current place through mixi, but I need to leave for some reason or another in not so long. This time, as I am newly hired as semi-expatriot, the company's agent helps me find an apartment. I just have to tell her the criteria and She does the research calling real estate agent and internet. My criteria are

- along the line 12 or 13
- less than 800 euros
she takes two or three days for the search so I needed to take an appointment in advance to be sure she can take enough time for the search. On May 24 she came over to me to pick me up then we went to see the apartments by her car. finally we did the visit of 9 apartments in or outside Paris. Still it is very difficult to choose one.

What is important is to "work well". Definitely. I didn't chose this time. We will do the second visit next month (June).