Sunday, December 1, 2013

The myth of using "None of" in a sentence

So many times I have to check my grammar for writing. "None of" usually makes me go over several websites and books emphasizing on the use of it.

The following sentences always give me an acceptable conclusion.

None of students are lazy.
None of meat is delicious.

Some people argue that "none of" must be treated as a singular pronoun.
I think I will use it in a more intuitive way as both "none of" and "most" are the words that indicate portions.

It is worth dropping by the website for the reference.

Friday, November 15, 2013

ขั้นตอนการอัพเดต nexus 7 (2013) เป็น android 4.4 (Kitkat) ด้วยตนเอง

เป็นที่ทราบกันว่า nexus 7 ของเราๆกำลังอยู่ในระหว่างรอการปล่อยอัพเดตจาก Google สำหรับผู้ใช้ทั่วๆไป ก็นั่งรอกันไปตามลำดับ แต่เราสมาชิค Droidsans ย่อมคันไม้คันมือ อยากจะเห็นว่า Kitkat บน nexus 7 จะเจ๋งลื่นไหลสมคำร่ำรือจริงหรือ

ขั้นตอนการอัพเดตด้วยตัวเองนั้น มีโพสต์อยู่ทั้วไปบนอินเตอร์เนต แต่เป็นภาษาอังกฤษบ้าง ยาวบ้าง และแอบงงบ้าง
ผมจะสรุปวิธีที่ผมได้ทำไปแล้วสำเร็จด้วยเครื่อง Windows 7 64bit ดังต่อไปนี้
ทำตามไปทีละข้อ น่าจะไม่หลงทางกันนะครับ

อนึ่ง ผมใช้บทความจาก phandroid.com (http://phandroid.com/2013/11/13/how-to-install-kitkat-nexus-7/) ในการอ้างอิงนะครับ และวิธีต่อไปนี้ที่ผมจะกล่าวได้ถูกปรับแก้บ้างแล้ว

สิ่งที่ท่านต้องเตรียม
1. จะใช้วิธีนี้ได้ nexus ของท่านจำเป็นต้องเป็น stock build ตัวล่าสุด ของ android 4.3 เพราะจะเป็นการอัพเดตเพิ่มไปจากสิ่งที่เคยมีอยู่
2. ไปดาวน์โหลด Android SDK จาก http://developer.android.com/sdk/index.html แตก Zip file ออกมาท่านจะเจอโฟล์เดอร์ 2 อัน เราจะสนใจเฉพาะ โฟลเดอร์ ที่ชื่อ sdk ครับ ไม่ต้องกดติดตั้งอะไร ลากไปวางไว้ที่ไหนก็ใช้งานได้ครับ
ผมลากไปวางไว้ที่ไดร์ C:
3. ไปดาว์โหลดไฟล์อัพเดตครับ (http://android.clients.google.com/packages/ota/google_razor/3a3951e8243c82bc01a620ab858f4454c8ebd65c.signed-razor-KRT16O-from-JSS15R.3a3951e8.zip)
ชื่อมันยาวสุดจะทน เปลี่ยนเป็นชื่อสั้นๆว่า update.zip ครับเพื่อง่ายต่อการหา

เอาล่ะ ถ้าท่านเตรียมตัวเตรียมใจพร้อมแล้ว ก็เริ่มพิธีกันเถอะ!
1. เข้าไปที่ Development menu และ เปิด USB Debugging ในเครื่องของท่าน เนื่องจาก android version 4.2 เป็นต้นมาจะซ่อน Development menu ไว้ วิธีเรียกกลับมาคือ แตะที่ แถว Build number ใน About tablet จำนวน 7 ครั้ง
2. นำไฟล์ update.zip ไปวางในโฟล์เดอร์เดียวกับ platform-tools ซึ่งอยู่ในโฟล์เดอร์ชื่อ sdk
3. ปิดเครื่อง nexus 7 จากนั้นกดปุ่มเปิดเครื่องและปุ่มลดเสียง พร้อมๆกัน ย้ำว่า พร้อมๆกัน สักครู่เดียวเราจะเข้าสู่ fastboot mode มีหุ่นเขียวนอนหลายพร้อมกับพุงเปิดอยู่ และเมนูต่างๆ ณ จุดๆนี้ หน้าจอจะไม่รับรู้การสัมผัสแล้ว แล้วจะใช้ปุ่มเปิดปิดและปุ่มปรับเสียงในพิธีของเราจากนี้ไป
4. กดปุ่มลดเสียงสองครั้ง ท่านจะได้เจอคำว่า Recovery mode กดปุ่มเปิดปิดเครื่องเพื่อเข้าสู่ Recovery mode
ท่านจะเจอหุ่นหงายท้องพร้อมด้วยเครื่องหมายตกใจบนสามเหลี่ยมสีแดง แน่นอนท่านจะตกใจครับ ผมก็ตกใจ จากนั้น กดปุ่มเปิดเครื่องพร้อมกับปุ่มเพิ่มเสียงพร้อมกัน กดแล้วปล่อยไม่ต้องค้างนาน ท่านจะเจอเมนูต่างๆขึ้นมาให้อุ่นใจ ผมกดหลายรอบกว่าจะสำเร็จ ไม่รู้เป็นอะไร
5. ต่อเครื่องคอมพิวเตอร์ของท่านเข้ากับ nexus 7 ด้วยสายยูเอสบี ตรงนี้ไม่แน่ใจว่าต้องลง driver อะไรเพิ่มไหม เพราะผมปล่อยให้เครื่องคอนพิวเตอร์หาเอาเอง
6. ใช้ปุ่มเพิ่มหรือลดเสียง เพื่อเลือกเมนู apply update from ADB แล้วเลือกโดยใช้ปุ่มเปิดปิด
7. เปิดหน้าต่างสีดำแห่งวันวานคือ cmd โดยค้นหาว่า cmd ใน search ของ Windows เปลี่ยนไดเรกทอรี่ไปยัง platform-tools
8. เมื่อเรามายังไดเรกทอรี่ที่ถูกต้องแล้ว พิมพ์ adb sideload update.zip เครื่องท่านจะส่งไฟล์ไปให้ nexus 7 และทำที่เหลือเอง
9. ปล่อยให้ nexus 7 อัพเดตตัวเอง มี progress bar ให้ลุ้นเล็กๆ แต่ถึงจุดนี้ ไม่มีปัญหาให้ลุ้นแล้วล่ะครับ
10. รีสตาร์ทเครื่องโดยเลิก reboot system now เป็นอันเสร็จพิธี

มีข้อสงสัยตรงไหนก็ถามไว้นะครับ ผมและเพื่อนๆจะได้ช่วยท่านนำ Kitkat มาสู่เครื่องด้วยความภาคภูมิใจของท่านเอง
ผิดพลาดจุดไหน ช่วยกันบอกนะครับ ขอให้สนุกทุกท่านครับ

Monday, July 29, 2013

Kate: comment and uncomment

To toggle a block comment
--
Clt+d
--
and to remove a block comment
--
Clt+Shift+d.

That's it.

Monday, July 22, 2013

From "list" in python to "vector" in C++

We can do this easily in Python but we need some new things to do this in C++.
An example of randomly generating heterogeneous numbers is shown below.


      std::vector<int> groupI;
      int k;
      do {
      k = 0 + (std::rand() % (int)(41 - 0 + 1));     
      }
      while (std::find(groupI.begin(), groupI.end(), k) != groupI.end());
      groupI.push_back (k);   


And we got it. :)

Tuesday, May 28, 2013

Fix the scrolling speed of a Microsoft wireless mouse in Ubuntu 12.04

So many times I had an headache while I was using a Microsoft wireless mouse with Ubuntu. The scrolling speed of the mouse was too fast. The solution is just 2-step operation.
1. Simply unplug the receiver module of  the mouse (a tiny USB connecting device.)
2. Plug the receiver module again.
That completely solves the problem.
Last but not least, I found the solution from the page: http://askubuntu.com/questions/27270/increasing-scroll-speed/172668#172668

Wednesday, May 8, 2013

To open a bank account at Japan Postal Bank, this may help.


“Ginkô Kôza wo hirakitai desu” – I would like to open a bank account


1. 種類 (しゅるい or Shurui). ACCOUNT TYPE:
You have two choices here. You can either go with number1。通常 (つうじょう or Tsujo)- The general Account or with number2。貯蓄 (Chochiku or ちょちく)- The savings account. With the first account you can deposit and withdraw as you please. But bear in mind with the second account, interest rates change depending on your balance and it can’t be used for direct deposit (salary) nor for automatic payments.

2. 送金機能 (そうきんきのう or Sokinkino). REMITTANCE FEATURE:
Shading in this box enables the remittance function for your new account.

3. 基準額 (きじゅんがく or Kijungaku). STANDARD LIMIT:
What do you want your deposit limit to be? When I signed up, I set my deposit limit as ten million yen. Has my account ever even gotten much money? No way! But it’s nice to have options, should you ever need them.

4. お預け入れ金額 (おあずけいれきんがく or Oazukeire Kingaku). DEPOSIT AMOUNT:
This box is for the amount of your first deposit. I’m not exactly sure what the minimum deposit can be, but I know it’s pretty low. I think I deposited 1000 yen on my first deposit.

5. おところ or Otokoro. ADDRESS:
There is a space for フリガナ (furigana) which are the kana (hiragana and katakana) corresponding the the kanji in your address. There is also a space for 漢字 or かんじ (kanji). If you don’t know how to write your address. If you give your Alien Registration Card to the clerk and say “Tetsudatte kudasai.” The clerk will fill in this part for you.

6. おなまえ or Onamae. NAME:
Just like section number five, there’s a space for furigana (フリガナ) and for kanji (漢字). I entered my name’s katakana in the top, smaller, boxes and the printed, block letters in the larger boxes below. I entered my last name first. ASH, DONALD

7. お届け印 (おとどけいん or Otodokein)。確認印 (かくにんいん or kakunin). STAMPS
This area is where you will use your official seal, your hanko or your inkan. I don’t know the major differences between the otodokein and the kakunin, but my hanko was just fine. Even if you don’t have a hanko, you can just sign here, and it will be okay.

8. 生年月日 (せいねんがっぴ or Seinengappi). BIRTHDATE: 
WAIT! Before you rush and fill this out, please note that this is will be written in the Japanese imperial year format. 元号 (げんごう or gengo) refers to the different era names that your birthday falls into. This system is based on Japanese imperial reign. The four options are 1. 明治 (めいじ or Meiji), 2. 大正 (たいしょう or Taisho), 3. 昭和 (しょうわ or Showa), and 4. (へいせい平成 or Heisei). In the interest of time. This is another one you can ask the clerk to do. Write your birthdate on a separate sheet of paper an show it to him or her. They will be able to tell you the imperial date.

9. キャッシュサービス. CASH CARD SERVICE
Okay, nothing too tough here. Just chose one of the following:
1. 通帳 (つうちょう or tsuchou) . カード(card)- You want both a bank book and a card.
2. カード -You only want the card
利用しない (りようしない or riyoshinai)- You don’t want to use this service.
I personally chose option one.

10. キャッシュサービス デビト機能 (きゃしゅさーびすでびときのう or kyashusa-bisudebitokino). DEBIT CARD FEATURE
This box gives you the option of enabling the debit card function on your card.

If you select option 1. 利用する (りようする or riyosuro) you opt in to this service. You will be able to withdraw and transfer funds to the Account of Japan Debit Card Promotion Council. With the cash card you receive, you will be able to use this cash card at member stores and shops affiliated with the Promotion Council. Honestly I had a hard time navigating through this part on my own so I opted not to use it. I chose option 2 利用しない (りようしない or riyoshinai) which means I choose not to use this service.
11.カード種類(かーどしゅるい or ka-doshurui). CARD TYPE:
Here, you choose the type of card that you want.
2. SUICA付カード (SUICAつきかーど or SUICA Tsukika-do)- This is a cash card with a linked SUICA feature. I chose not to do this because I can’t use this type of Suica for commuter passes, which I use almost every month.
8.JPBANK カード (JPBANKKa-do)- This is like a credit card, and I just decided not to even get into that in Japan. Plus there’s an application process and subsequent time lag involved.
9.一般カード (いっぱんka-do)- This is a regular cash card.

I chose option 9 or the regular cash card, which I received in about a week-and-a-half to two weeks after doing my application.
12. 暗証番号必須取り扱い(あんしょうばんごうとりあつかい or anshinbangotoriatsukai) PIN NUMBER SERVICE
I know this looks like a super long word, but it’s just asking if whether or not you want to use the pin number service for in-person withdrawals.
You can choose to 1. 申し込む (もうしこむ or moushikomu) apply. Or option 9. 申し込まない (もうしこまない or moshikomanai) not to apply. I chose option one since I will already know my own pin number. It’s just an added security measure.

13. ボランティア DONATIONS 
Almost there, everybody. This section asks if you want to donate money to 1. a general volunteer organization (全般 (ぜんぱん or zenpan)), 2. an environmental organization (環境(かんきょう or kankyo)), or 9. 申し込まない (もうしこまない or moshikomanai)- you don’t plan to donate.
A percentage of your interest (I think my job said it was 20%) will be donated.

14. 性別 (せいべつ or seibetsu). GENDER.
You only have to worry about filling this one out if you chose the Suica option in field number ten.