dynamic 2d array using double data type

 #include <stdio.h>  
 #include <iostream>  
   
   
 int main() {  
  // dimensions  
  int N = 74;  
  int M = 3;  
   
  int i, j;  
    
  // dynamic allocation  
  double** ary = new double*[N];   //2d array  
  for(i = 0; i < N; ++i)         //↑  
    ary[i] = new double[M];      //1d array  
    
  for(i=0; i<N; i++){  
       for(j=0; j<M; j++){  
          ary[i][j] = i+j;  
          printf("point[%d][%d] = %.2f \n", i, j, ary[i][j]);  
       }  
    }  
    
  // free  
  for(i = 0; i < N; ++i)  
   delete [] ary[i];  
  delete [] ary;  
    
  return 0;  
 }  

//reffer to [http: codeformatter.blogspot.jp]

passing and returning array in c language

#include                                         //standard library
#include                                        //standard mathematical library

//first derivative function
static double* GetDerivative(double t, double A[], double B[], double C[])       
                                                              //the function must be pointer double*
                                                              //for returning array

{
    //P・(t) = 3At^2 + 2Bt + C
    static double Pdot[3] = {0};                      //must be static
   
    Pdot[0] = 3*A[0]*t*t + 2*B[0]*t + C[0];
    Pdot[1] = 3*A[1]*t*t + 2*B[1]*t + C[1];
    Pdot[2] = 3*A[2]*t*t + 2*B[2]*t + C[2];
   
    return Pdot;                                       //return the array
}
//first derivative function

int main ()
{
    //P(t) = At3 + Bt2 + Ct + D
    ////P・(t) = 3At^2 + 2Bt + C
    double *derivative = 0;                        //must be pointer double *
                                                          //because the function is a pointer as well

    //double t[4] = {0.0, 0.25, 0.5, 0.75};
    double t[1] = {1};
    double A[] = {1, 2, 3};
    double B[] = {4, 6, 6};
    double C[] = {7, 8, 9};
    double D[] = {10, 11, 12};

    derivative = GetDerivative(t[0], A, B, C);    //put the return function to derivative
                                                              //plus make it as an array
                                                              //do not add [] even if it is array,
                                                              // unless you want to point the specific
                                                              // address of the array like t[0]
   
    printf("%ft2 + %ft + %f \n", derivative[0], derivative[1], derivative[2]);

    return 0;
}

//output 18.000000t2 + 26.000000t + 30.000000

yodogawa fireworks!






Yodogawa fireworks is the biggest fireworks event in Osaka, I am glad that we came there because that was one of the best firework event I have ever came to visit. But, to be honest the smoke was a bit disturbing as you can see in the picture, sigh!

なにわ淀川花火大会は大阪で最大の花火イベントです。嫁と二人で行ってきましたが、非常によかったです。日本歴9年間の中でベストスリーの花火大会に入るぐらいの迫力だと思います。ただ、煙が邪魔でいい写真を撮るのは難しかったです。



Our place was there (near minamikata station), we arrived there at 18:00 but we can still found a good spot easily. Although a bit far from the main spot, yet, quite a view. Next year, we want to try to find a spot at Yodogawa athletic park so we can get a good close spot.

ところで撮影スポットは以下の通りで、南方駅から近いです。場所的には18時についてもまだ余裕で座れるし、屋台も多くてにぎやかなスポットだし、写真もよかったです。次回行くときには打ち上げ場所にもっと近づいて淀川河川公園から撮影してみたいです。




花火の季節が来た~ァ!
the hanabi season has arrived!

test switching to japanese driving ilcense, tes ganti ke sim jepang, 外面切替試験 part 2

技能試験
driving test

courses in fuchu driving license center, i got b course on february 9

img067.jpg



tips and tricks for your driving test

  1. before driving
  1. put your belonging on the back seat, check back and front of your car (include under the car), check the road situation behind the car, open the door, say "onegaishimasu" to the instructor, go inside, close the door
  2. lock the door, set your seat position, wear seat belt, set the position of upper mirror, check the transmission lever (hold it and make sure it is in N or P position) and parking brake, step on the brake pedal and hold it, say "junbi dekimashita"
  3. turn the engine on while holding the brake, unlock the parking brake, set transmission into D, say "ikumasu", right blinker, check right mirror, right side of your car and check the road condition through right back window of the car, drive slowly to the right, and there you go


  1. while driving
  1. use left side lane, in a straight road, step the accelerator pedal to maximum speed that are allowed there (usually 40kmph), pull the pedal, brake slowly until before the curve. note: you are not allowed to step on the brake pedal while in the curve
  2. when you see "something annoying" on the way, you have to turn right blinker (about 30m before the "thing"), check right mirror, check through right back of the car, go to the right side, when you about to pass the "thing", turn your blinker to the left, check left mirror, check through left back window, go to the left side, continue to drive
  3. when you want to turn left you must turn your blinker to the left, check left mirror, check through left back window, go to the left so bike cannot pass through, in intersection or fork you must see right, left and right again (move your neck), then check your left back through left back window, when it is clear you can go to the left
  4. it is the same when you want to turn right
  5. when you see stop sign (tomare or 止まれ), you must stop (0kmph), check your right, left and right again, then go
  6. crank road and S road? you must practice! just place your right foot on the brake pedal, and move slowly
  7. when your test is about to finish turn the left blinker, check left mirror, check through left back window, go to the left so bike cannot pass through, make sure that the car is in align with the side walk, then stop
  8. set your seat position so you can go out easily, unlock the safety belt, lock the parking brake, set the transmission lever into P, turn the engine off, check right mirror, right side of your car and check the road condition through right back window of the car, say "arigatou gozaimashita", check behind you again, go out
  9. take your bag from the back seat, go to the instructor, take your exam result, say again "arigatou gozaimashita"



-----------------------------------------------------------------------------------------------
*******************************************************************************
=====================================================


技能試験
tes praktek menyetir



Tips dan trik tes praktek menyetir


  1. sebelum ngejalanin mobil
  1. masukin tas di kursi belakang, cek belakang mobil (bawah juga), depan mobil (bawah juga), cek belakang lagi, buka pintu,bilang onegaishimasu, masuk, tutup pintu
  2. kunci pintu, atur seat, pake sabuk pengaman, atur cermin diatas, cek gigi, rem tangan, injek rem, bilang "junbi dekimashita"
  3. sambil injek rem nyalain mesin, unlock rem tgn, masukin ke gigi D, blg "ikimasu", sen kanan, cek cermin kanan,cek belakang kanan (tengok kanan belakang via jendela belakang kanan), ambil kanan sedikit, jalan lah


  1. pas udah jalan
  1. jalan di jalur kiri, pas jalan lurus injek gas, sampe batas maksimum kecepatan (biasanya 40kmph), terus lepas gas, rem pelan pelan sampe mau belokan, tapi pas belokan ngga boleh ngerem, ngeremnya harus sebelum belokan
  2. pas ada barang di kiri, harus dihindari, dari jauh (sekitar 30m) sein kanan, liat spion kanan, liat kaca belakang kanan, ambil kanan, lewatin, pas sejajar sama benda yang dilewatin sein kiri, liat spion kiri, liat kaca belakang kiri, ambil kiri, lurus lagi
  3. kalau mau belok kiri dari jauh jauh harus sein kiri, liat spion kiri, liat kaca belakang kiri, ambil kiri supaya nutup jalan motor/sepeda, pas perempatan atau pertigaan, liat kanan, kiri, kanan (gerakin leher), setelah itu liat kaca belakang kiri (cek barang kali ada orang), kalo ngga ada jalan
  4. sama untuk kalau mau belok ke kanan
  5. jangan lupa kalau ada tanda tomare (止まれ) harus berenti dulu (0kmph), liat kanan, kiri, kanan, baru jalan
  6. kalo tips crank road atau S road, latian! sambil injek rem aja, terus jalanya pelan
  7. pas mau parkir setelah tes, sein kiri, liat spion kiri, liat kaca belakang kiri, ambil kiri, stop dipinggir, lurusin sejajar trotoar 
  8. atur seat supaya gampang keluar, lepas sabuk pengaman, rem tangan, pindahin gigi ke P, matiin mesin, kiat cermin kanan, liat belakang kanan, bilang "arigatou gozaimashita", keluar mobil, cek lagi belakang kanan
  9. ambil tas di kursi belakang, samperin instruktur, dapet kertas lulus atau ngga, bilang lagi "arigatou gozaimashita"

test switching to japanese driving ilcense, tes ganti ke sim jepang, 外面切替試験 part 1

外面切替
switching to japanese driving ilcense

学科試験
written test

I went to fuchu driving license center to switch my indonesian driving license to the japanese one on january 26. on that day i did the administration and also the written test.

what you need to bring:
1. driving license in your home country
2. passport
3. residence card (在留カード)
4. residence status (住民票) from ward office (区役所)
5. picture  3 x 2.4cm
6. japanese translated driving license from JAF
7. driving status (if any) from police office/station

note:
you have to be in your home country more than 90 days since you got your driving license!


here are the questions of written test.

right or wrong question
1. you cannot pass the road when there is this sign (right)
No Parking, Traffic Sign,No Entry, Road, Sign, Red,

2. this sign shows you not to enter (wrong)
指定場所一時停止[編集]
3. suppose that there is a 30kmph sign, nobody is on the road, then you may drive more than 30kmph (wrong)
4. you can drive as fast as you can when there is nobody there (wrong)
5. you are very tired, but you still drive a car (wrong)
6. suppose that you are at an intersection, you want to turn right, but the re is also a car across you wanting to go to the left, you need to let the car across you to go first (right)
7. when you drive on the road and there are sign like this, it means you are free to change the direction as you want (wrong)
stock-photo-road-sign-for-go-straight-turn-left-turn-right-and-stop-line-345190727.jpg
source: shutterstock
8. you want to park your car but cannot find the empty parking lot, then you park your car on the left side because there are no car passing by (wrong)
9. you can drive on the bus lane (wrong)
10. you can change your lane after passing this yellow line (right)
loading-yellow.jpg
source: geocities

-----------------------------------------------------------------------------------------------
*******************************************************************************
=====================================================


外面切替
ganti ke sim jepang

学科試験
ujian pengetahuan


saya ke fuchu untuk bikin sim jepang, nge ganti dari sim indonesia tanggal 26, nah disitu saya daftar sekaligus tes ujian pengetahuan.

yang harus dibawa:
1. sim negara asal
2. passport
3. residence card (在留カード)
4. residence status (住民票) dari kantor kecamatan (区役所)
5. foto 3 x 2.4cm
6. sim yang udah ditranslate dari JAF
7. status mengemudi kita (kalau ada) dari kantor polisi tempat kita buat sim dulu

note:
kita boleh ganti kalo udah lebih dari 90 hari ada di negara tempat kita buat sim!


ini soal ujian pengetahuannya.

benar atau salah

1. tanda ini adalah tanda dilarang masuk/lewat (benar)
No Parking, Traffic Sign,No Entry, Road, Sign, Red,

2. tanda ini adalah tanda dilarang masuk/lewat (salah)
指定場所一時停止[編集]
3. kalau ada tanda 30km speed limit, boleh melaju lebih dari itu karena jalan kosong (salah)
4. kalau jalanan kosong boleh melaju dengan sangat cepat (salah)
5. anda capek dan tidak yakin bisa menyetir, tapi anda tetap menyetir (salah)
6. anda ada di perempatan, lalu mau belok ke kanan, di sebrang anda ada mobil yang mau belok kiri, anda harus mempersilahkan mobil yang belok ke kiri duluan (benar)
7. ketika anda menyetir dan di jalan ada tanda seperti ini anda bebas berpindah jalur (salah)
stock-photo-road-sign-for-go-straight-turn-left-turn-right-and-stop-line-345190727.jpg
8. anda tidak menemukan tempat parkir, lalu anda parkir di sisi kiri jalan karena sedikit mobil yang lewat (salah)
9. anda boleh masuk kedalam jalur bus karena sepi (salah)
10. anda boleh berpindah jalur (untuk nyalib/belok) setelah melewati garis kuning di sisi jalan (benar)
loading-yellow.jpg

mosque in Cordoba Spain

When I went to Cordoba, Spain, I found that I can pray in the mosque in the middle of a park called Plaza Colon, the imam is very nice person and he is still young!
*unfortunately we cannot pray in Mezquita-catedral Cordoba, because it is no longer mosque.

This is the direction to the mosque from Cordoba station and from the legendary Mezquita-catedral Cordoba.