Daniela da Cruz Blog


Learning Japanese – Lesson 1 (Hiragana)

After the promise of posting some of the things that I learn in my Japanese classes, here I’m after a few weeks…

As you probably already know, Hiragana (ひらがな) is a Japanese syllabary, one component of the Japanese writing system, along with katakana, kanji, and the Latin alphabet (Rōmaji.)

Hiragana and katakana are both kana systems. Each kana is either a vowel such as “a” (あ); a consonant followed by a vowel such as “ka” (か); or “n” (ん), a nasal sonorant which, depending on the context, sounds either like English m, n, or ng, or like the nasal vowels of French.

In this lesson, I’ll talk about Hiragana.

The Hiragana consist of a basic set of characters: five singular vowels, 39 distinct consonant-vowel unions and one singular consonant. Additionally, を wo is included (although pronounced the same as vowel お o), bringing up the total count of common use characters to 46.

Here they are. Please take some time and try, in this first lesson, to write them by your own.

Hiragan characters

Hiragan characters


Using Response.Write inside a TabPanel

Update panels are a great thing that you could use with ASP.NET and Ajax. Once you use them once you will use them everywhere.

However, when you want to use them with a Response.Write, you’ll obtain an error:
Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.

In order to fix this issue, you should add the button responsible for the Response.Write to the UpdatePanel in the form of a PostBackTrigger.

But, if the button/linkbutton is inside a TabPanel you should specify the right id. This is, for example, if the button “link” is inside a TabPanel called “tabContainer”, and is in the second tab called “TabPanel2″, the id you should specify in the trigger is “tabContainer$TabPanel2$link”.

I hope this can help someone.


Learning Japanese

At June 2, 2009 I finish my course on Japanese (first level). The course had a duration of 9 months.
So, I’ve decided to start post here some of the things that I learned.

In the first lesson, I’ll start by introducing the Hiragana and then the Katakana alphabet.

If you’re interested in learning Japanese and also its culture, keep in touch.


Debugging Tree Grammars using AnTLRworks

The current version of ANTLRWorks does not support tree grammar debugging directly.
However, there is a way to get it to work using remote debugging.
The solution is to generate an extra Java class to work with the AnTLRworks Remote Debugging.
For example, suppose that you have the following grammar to define the well known programming language LISP (a statement in LISP in a S-Expression). You can download
here.

As you can see, the AST was build just to recognize all the numbers that appears in the S-Expression.
Now, suppose that you want to sum all the numbers in the AST build in the previous phase.
For that, you’ll need to develop a tree grammar, like the one you can find
here.
Until now, nothing is new if you are familiar with grammars and tree grammars.
The novelity appears now. You’ll need to develop a class similar to the one you can find here.
Notice that you always need to replace LispLexer, LispParser and
LispTree by the correct class names generated from your grammar.
You should generate this files by executing:
java org.antlr.Tool -debug Lisp.g

java org.antlr.Tool LispTree.g.

Now, we will need to compile your files.
javac DebugTree.java
After this, you should run this class file with your input file:
java DebugTree < input.txt

And now, its time to open AnTLRworks and see it working: open the LispTree.g file,
go to Debug-> Debug Remote and that’s all.
You’ll see now in the Input window, not the source text in input.txt, but
the AST built using the rules in Lisp.g.



Follow

Get every new post delivered to your Inbox.