Pages

Monday, October 10, 2011

Ve Parser, A combinatory parser for .Net

A couple of years ago I tried to write a simple parser and I wanted to do it in the simplest way, I did not wanted to create a high performance compiler supporting lots of features, so instead of learning some already ready parser libraries I followed the recursive descent parsers technique and wrote the parser I wanted, then after doing some refactoring I end up with something that was different from a recursive descent parser. I searched through the net and I found out that the thing I made is called combinatory parser. Actually what I did was a simple library for creating combinatory parsers in .Net environment.

Last week I needed the parser for a current project, and then I brought back the source codes from my archive. I thought this would be a good idea to make it a public available(aka open source) library, so it would become more alive. I named the library Ve Parser and published the codes in codeplex: you can go and visit it in http://veparser.codeplex.com/.




Monday, October 3, 2011

A solution for User does not have permission to create new post



Developing a piece of code for sending content to a blog in Blogger I wrote the whole thing and then I tested and published my work. Then after a while without modifying the codes it becomes corrupted and by investigating the error logs I found this error message: "User does not have permission to create new post". If you search for this error you will see a lot of people having the same problem and nowhere there is no solution for it, or even an explanation about it.

I had a code like this

response = service.Insert(new Uri("http://myblogname.blogspot.com/feeds/posts/default"), newPost);

I just changed it to

response = service.Insert(new Uri("http://www.blogger.com/feeds/874763488093493674364/posts/default"), newPost);

In the above code, that number after 'feeds/' is the blog id which you can find it easily when you are in your blog's control panel, almost every url is consisted of your blog id. (For security and privacy reasons I wrote a fake id, but yours should look similar.)