Powered by Blogger.

Sinhala unicode in Adobe Indesign CC 2015 on Mac (සිංහල යුනිකේත ඇඩෝබි ඉන්ඩිසයින්)

Sunday, September 4, 2016

1. Download this folder.

2. Copy the folder 'si_LK' to '/Applications/Adobe InDesign CC 2015/Resources/Dictionaries/LILO/Linguistics/Providers/Plugins2/AdobeHunspellPlugin.bundle/Contents/SharedSupport/Dictionaries/'

3. Edit 'Info.plist' file at '/Applications/Adobe InDesign CC 2015/Resources/Dictionaries/LILO/Linguistics/Providers/Plugins2/AdobeHunspellPlugin.bundle/Contents/' as follows.

Add a string element with value si_LK (si_LK) to the Spelling Service and UserDictionaryService Elements in Info.plist.

4. Copy and paste or type the Sinhala words or text you want.

5. Select text, select a suitable unicode Sinhala font in the characters panel and select language as 'Sinhala (Sri Lanka)' in the bottom right corner of the characters panel.


6. Select 'Adobe world-ready paragraph composer' in paragraph panel.


How to get a new Sri Lankan driving license for a lost driving license

Thursday, September 1, 2016

Documents required

- NIC
- Police complaint
- Medical certificate
- Old driving license number
- 750 LKR for one day service

Procedure

1. Log a complaint at the nearest police station once you know that you have lost your driving license. Take a verified copy of the complaint.

2. Go to RMB, Werahera. Better to go early as there are a lots of people. Get the details of the lost passport by giving the driving license number.

3. Get the medical certificate from National Transport Medical Institute, Werahera (at the same premises).
- Queue in front of the building.
- Fill the following form and wait for your turn.
- In your turn, an officer will measure your weight and height in the form.
- Pay 750 LKR for the medical examination.
- Blood test.

- Medical examination.

- Queue in and get the stamped medical certificate.

4. Go to H building. Queue in and pay for one day service by showing the documents.

5. Go in in your turn and meet an officer.
6. An officer will take your photo, finger prints and will guide you to another counter.

7. Fill the address and other details and meet the next officer.

8. Next officer will check the details and change the required and will guide to the cashier.

9. Pay 2,200 LKR for one day service.

10. Wait for 3-4 hours in the building near main gate and check whether your license is received by them or not.

11. Once your number is called you will get your new DL.


How to get a new Sri Lankan passport for an expired Passport

Documents required

- Old passport
- NIC
- Original copy of the birth certificate
- Receipt of online photo
- 10,000 LKR for one day service
- Copies of the first page of old passport and NIC

Procedure

1. Take a online photo at a recommended studio. You can find one at the passport office. Studio will issue a receipt as follows. Old passport office was at Punchi Borella. Now they have moved to Pelawatta.

2. Fill the application form as follows. You can obtain this form at the passport office (may be available online as well).


3. Take copies of the passport and NIC. They will anyway return you all the submitted documents with the new passport.

4. Queue for the one day service and you will get a token as follows.


5. Submit your documents once your number is called. If documents are correct they will ask you to pay. Pay 10,00 LKR for one day service at the cashier and you will get another token as follows.


6. You will get your new passport after 3-4 hours with all the submitted documents.

How to get a new Sri Lankan NIC for a lost NIC

Documents required
- Original copy of birth certificate
- Set of NIC photos
- Old NIC number and issued date (better if you have a copy of the lost NIC)
- Stamps for 15 LKR
- Police complaint

Procedure

1. Make a complaint at the nearest police station once you know that you lost your NIC. Take a certified copy of the complaint from the Police. It will cost you 25 LKR.

If you lost both NIC and driving license make a photocopy of the complaint and certify it as a copy of the original from the same police station as you need certified copies for NIC and driving license separately.

Following document says you can log the complaint at the nearest police station.



Sample of a police complaint.

Sample of a copy requesting letter.

Sample of a receipt.


2. You need an original copy of your birth certificate. If you don't have one, you can get one at the nearest divisional secretariat. I think all DS offices are now interconnected. I took it from a DS office in the same district where I was born. One copy will cost you 100 LKR (as I remember).

3. Meet the Grama Sevaka where you have registered for voting and fill the following forms. Bring set of NIC photos and stamps for 15 LKR.







4. Then submit it to the relevant DS office. They will go through the documents and will give you a sealed envelope with the documents you submitted if you tell them that you will get NIC personally in the one day service.


5. Then go to the NIC office in Colombo for one day service. Old office was at Jawatte and now they have moved to Pelawatte. You better go very early as there are so many people. Submit the application, pay 2,000 LKR (as I remember) for the one day service, and wait for 3-4 hours till they call your name. Finally you will have a new NIC as follows.





How to start Latex on Mac for IEEE papers

Friday, April 1, 2016

This is how I started Latex on Mac.

1. Install TextMate. You need MacTex as well for this.
How to install TextMate (Mac OS X).

2. Download IEEEtran tex package from here.

3. Open "bare_conf.tex" inside IEEEtran folder with TextMate, and just paste your paper content in the relevant places.

4. Use Mac inbuilt command "convert" to convert images to .eps.

4. Running "cmd + R" while in TextMate creates a PDF file in the same folder. That's it.

Some very useful references.
2. All the answers for the beginner's questions are at tex.se
3. An useful wikibook
4. Cross referencing, this site contains more useful hints.

I will share once a good source is found for referencing and citing.

Install Google Course Builder (CB) in Mac

Saturday, October 31, 2015

PC Used:
MacBook Pro (Retina, 15-inch, Late 2013)
Processor: 2.3 GHz Intel Core i7
OS X El Capitan (Version 10.11)

A. Installation

https://code.google.com/p/course-builder/wiki/Download

1. Download and install Python 2.7 (https://code.google.com/p/course-builder/wiki/Download#Download_and_install_Python_2.7)

mac$ which python
/usr/bin/python
mac$ python -V
Python 2.7.10

2. Download and install Google App Engine
https://cloud.google.com/appengine/downloads#Google_App_Engine_SDK_for_Python

Download: https://storage.googleapis.com/appengine-sdks/featured/GoogleAppEngineLauncher-1.9.28.dmg

How to install: https://cloud.google.com/appengine/downloads#Google_App_Engine_SDK_for_Python

3. Download Course Builder
https://code.google.com/p/course-builder/wiki/DownloadCourseBuilder
Location I used: mac/coursebuilder


B. Running GAE (using GUI)

https://code.google.com/p/course-builder/wiki/GetCode


C. Deploy CB

Register your Course Builder with Google

Create a app specific password

https://code.google.com/p/course-builder/wiki/UploadCode#Register_your_Course_Builder_with_Google






Run a Visual Studio project in another PC via command prompt

Saturday, May 23, 2015

First we need to access Visual Studio (VS) Developer Command Prompt (DCP) in the remote machine via the regular prompt. Accessing VS DCP is explained here.

This link shows how to debug a VS project via DCP.

Assuming now we have a .exe file in the Debug folder, we can use the following code now to run the application remotely.

C:\Users\source_user_name>psexec -i \\destination_ip -u destination_user -p destination_password "C:\Users\destination_user\Documents\Visual Studio 2012\Projects\my_roject\my_roject\bin\Debug\my_application.exe"

Access command prompt of another PC via IP

1. Download and extract PsTools to "C:\Windows\System32" in both source and target PCs (In my case both are Windows 8).

2. Open command prompt and type:
"reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\system /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1 /f"

Following was the output:
The operation completed successfully.

3. Let us access "ipconfig" remotely as an example. Type the following in the command prompt of the source computer.

psexec \\destination_ip_address -u destination_username -p destination_password ipconfig

Note:
If you get the following error, please try the code given below in the remote PC.

Error:
Couldn't access 192.168.1.106:
The network path was not found.

Make sure that the default admin$ share is enabled on 192.168.1.106.

Code to try:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\AutoShareServer Change the AutoShareServer key to 1

Referrences:
1. http://stackoverflow.com/questions/18388381/make-sure-that-the-default-admin-share-is-enable-on-servername
2. serverfault.com/questions/422078/psexec-unknown-user-name-or-bad-password-in-workgroup

Flutter

Wednesday, April 8, 2015

Flutter IMDb link

A really good movie showing how mothers sacrifice their entire life for the kids.

How to Start Android Programming

Monday, February 2, 2015

I was new to Android Programming and it took a while for me to set up the system and to run my first Android application. After successfully ran the first program, I thought of sharing my experience here for someone new to Android Programming to make it a less painful start.

My environment: Windows 8 32-bits

1. First download Android Studio from this link and install.

2. Add necessary SDK Packages as explained in this link.

3. Run the HAXM installer located in the following location.
{SDK_FOLDER}\extras\intel\Hardware_Accelerated_Execution_Manager\intelhaxm.exe
Refer to this link for more information.

You may have to enable 'Intel Virtualization Technology' in BIOS as per this link.

Make sure to set up the memory during the installation as per this link. I used 768 MB.
In case if you want to change the memory assigned later re-run the HAXM installer again with new memory value. More information.

If you change the HAXM memory assigned later, make sure to change it in the Android Studio as well as per following details.
Android Studio -> Tools -> Android -> AVD Manager
Then in the row of the relevant virtual device, click the 'Edit this AVD' in 'Actions' column.
In the opened window click 'Show Advanced Settings' button and scroll down.
Change the 'Memory' value as required (I used 768), and click 'Finish'.

4. Hopefully now your system is ready to start programming. Follow the tutorials given in this link.

Building JRTP in Windows

Monday, May 20, 2013

1.
- jrtp depends on jthread. Hence, we have to build jthread first.
- Download jrtplib and jthread from this link and extract it.
- Detailed video tutorial is available in the following links from the authors, thanks a lot for such a good library and help. ;-).

http://research.edm.uhasselt.be/jori/jthread_jrtplib_example_mpeg1.mpg
http://research.edm.uhasselt.be/jori/jthread_jrtplib_example_mpeg2.mpg
http://research.edm.uhasselt.be/jori/jthread_jrtplib_example.avi

2. Download and install CMake.

3.
- Open CMake.
- Set the jthread folder path as the browse source.
- Create a folder named "build" in the above folder and set build folder location in CMake to that path.
- Click 'Add entry' and add an entry named 'CMAKE_INSTALL_PREFIX', type is 'PATH', set the value to a empty folder. In my case it is 'C:/testlocal'.
- Click OK.

- Click 'Configure'.
- Click Finish.


- Click "configure" again.

- Then click "generate".

- Now you can see VS project files in the build directory.
- Open the solution with VS.
- Right click in the 'INSTALL' project and select 'Build'.

- Check whether it builds without any fails.

- Select 'Release' from the 'Solutions configuration' menu. and build the 'INSTALL' project again.
- Again check for any errors.

4.
- Now follow the same steps for the jrtplib as well.
- Make sure to set the 'CMAKE_INSTALL_PREFIX' same like before.
- Build 'INSTALL' project for both 'Debug' and 'Release' Solution configurations in VS same as before.

5.
- Now you can locate all the relevant header and library files in 'C:\testlocal'

Use RtMidi in Windows in a Microsoft Visual Studio C++ Project

Sunday, May 12, 2013

Create a "Win32 Console Application" in Visual Studio.


Name it, click OK.


Click next.


Deselect "Precompiled header" and select "Empty project", click Finish.

Add a C++ (.cpp) file, name it and click Add.


Copy the code of "midiout.cpp" from this link to your .cpp file.
Change "SLEEP" in the code to "Sleep". (Since we are using Windows)
Add "#include " at the beginning of the code.
Copy "RtMidi.cpp", "RtMidi.h" and "RtError.h" files to your project folder. You can find these files from here.

Right click on your project in VS -> Add -> Existing item.
Select and add above three files to your project.


Now your project file structure will look like this.


Add "#define __WINDOWS_MM__" line at the beginning of the "RtMidi.h" file.


Right click on your project in VS -> Properties.


Go to Configuration properties -> Linker -> Input. Add "winmm.lib" at the end of "Additional dependencies".


Click Apply and OK.

Go to Visual Studio project. Press "F7". Press "Control key + F5". Then you can see the command prompt and can hear a short beep. If so, your RtMidi now works fine. Good luck!