My next ticket for processing-js is status(). In this function I had to display a message in browser status bar. I had to set dom.disable_window_status_change to false in order for the message to be displayed in status bar. I wonder that it is possible to disable this options by using javascript. For now I have to disable it manually by typing "about:config" in url of firefox browser.
This is the output.
Friday, April 16, 2010
Monday, April 5, 2010
I have been working on my next processing-js ticket 155. There were a lot missing information that I could find answers. Since the assignment requires using JavaScript to capture inputstream from either url or a input file. However, when I googled it, I found out that JavaScript couldn't handle files.
So I went on IRC and talked to mlam19 and annasob. mlam19 suggested that I should use AJAX to work around the problem, such as return ajax(filename). Annasob told me that I should ask John Resig. So I emailed him and hopefully he would reply.
The other problem that I have in mind is how do I test the function, because it requires to capture an online stream or input. Hopefully I will have all my answers when I'll attend Processing conference call on thisThursday.
So I went on IRC and talked to mlam19 and annasob. mlam19 suggested that I should use AJAX to work around the problem, such as return ajax(filename). Annasob told me that I should ask John Resig. So I emailed him and hopefully he would reply.
The other problem that I have in mind is how do I test the function, because it requires to capture an online stream or input. Hopefully I will have all my answers when I'll attend Processing conference call on thisThursday.
Tuesday, March 2, 2010
Thunderbird Lab
For my thunderbird's lab, there is a bug that automatically change text into email url incorrectly. I noticed that thunderbird would change a text into email url if it found a "." after "@" sign. So I had to find a way that search 2 or more "." after "@" in the text that made invalid emails.
I tried using array to capture ".." from the string but I failed. Thanks to Scott's post, he mentioned about build-in function Find() in mozilla repos. I tried it but it still did not work. So I started putting "printf" inside the functions. I found out that I did my incremental build in the wrong directory because some of my "printf" statements did not updated as I changed them.
Before, I did my "make" in
/comm-central/objdir-tb-debug/mozilla/netwerk/streamconv
After:
/comm-central/objdir-tb-debug/mozilla/netwerk
Now everything work as is should be when I changed some thing in the function.
Finally I got it.
I tried using array to capture ".." from the string but I failed. Thanks to Scott's post, he mentioned about build-in function Find() in mozilla repos. I tried it but it still did not work. So I started putting "printf" inside the functions. I found out that I did my incremental build in the wrong directory because some of my "printf" statements did not updated as I changed them.
Before, I did my "make" in
/comm-central/objdir-tb-debug/mozilla/netwerk/streamconv
After:
/comm-central/objdir-tb-debug/mozilla/netwerk
Now everything work as is should be when I changed some thing in the function.
Finally I got it.
Building Thunderbird
I got my Thunderbird build on my laptop last weekend. This time, the process went little smoother than last time I built FireFox. I disabled my Avira antivirus and ZoneAlarm firewall which caused downloading and compiling problem last time. This was what I had in my .mozconfig
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/objdir-tb-debug
mk_add_options MOZ_CO_PROJECT=mail
ac_add_options --enable-application=mail
ac_add_options --enable-debug
ac_add_options --disable-optimize
ac_add_options --enable-calendar
ac_add_options --with-windows-version=600
After one hour of compilation, thunderbird finally was built.
However there was an error when I opened the thunderbird
I just click ignore to keep the program alive because I needed to finish my Thunderbird Lab first.
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/objdir-tb-debug
mk_add_options MOZ_CO_PROJECT=mail
ac_add_options --enable-application=mail
ac_add_options --enable-debug
ac_add_options --disable-optimize
ac_add_options --enable-calendar
ac_add_options --with-windows-version=600
After one hour of compilation, thunderbird finally was built.
However there was an error when I opened the thunderbird
I just click ignore to keep the program alive because I needed to finish my Thunderbird Lab first.
Tuesday, February 23, 2010
processing-js near release 0.1
For the last few days I tried to test my processing-js code however I couldn't push the code into my repos. The last steps in the instructions gave me an headache. I kept getting permission denied:
$git push origin master
permission denied .
fatal: the remote hung up unexpectedly.
I tried many times, still didn't work. May be I need to create very public key for each repos I have.
So I did tried to generate another key but I still got permission denied message. Well may be I need to dig deeper inside the documents.
$git push origin master
permission denied
fatal: the remote hung up unexpectedly.
I tried many times, still didn't work. May be I need to create very public key for each repos I have.
So I did tried to generate another key but I still got permission denied
Wednesday, February 17, 2010
Processing.js
In my Open Source Development 600 course, I was assigned to work on the bugs 41284 for on Processing.js (tickets 270 -275) which were implementation of simple string functions. I needed to review my javascript which I took in first year and learned the prof. programming style. Here were my code for the first release 0.1.
Convert all characters of a string into a upper case and return the string:
function stringToUpperCase(string str)
{
var strUpperCase = str.touppercase();
return strUpperCase;
}
Or convert all characters of a string to lower case and return the string:
function stringToLowerCase(string str)
{
var strLowerCase = str.tolowercase();
return strLowerCase;
}
To find part of string using substring:
function StringSubstring(string str, int beginIndex, int endIndex)
{
var stringSub;
if(endIndex >0)
stringSub = str.substring(int beginIndex, int endIndex);
else
stringSub = str.substring(int beginIndex)
return stringSub;
}
To find total characters in a string
function strLength(string str){
return str.length();
}
Find a substring within a string and return the first occurrence otherwise return -1
function stringIndexOf(string str, string subStr){
int p1 = str.indexIf(subStr);
if(p1==-1)
return -1;
else
return p1;
}
Get a character in a string at a specific index
function stringCharAt(string str, int strIndex){
if(strIndex > -1 && strIndex < c1 =" str.charAt(strIndex);" href="https://processing-js.lighthouseapp.com/projects/41284/project-workflow">repos and got a public key. Now I need to add my new js file to the branches and test them.
Convert all characters of a string into a upper case and return the string:
function stringToUpperCase(string str)
{
var strUpperCase = str.touppercase();
return strUpperCase;
}
Or convert all characters of a string to lower case and return the string:
function stringToLowerCase(string str)
{
var strLowerCase = str.tolowercase();
return strLowerCase;
}
To find part of string using substring:
function StringSubstring(string str, int beginIndex, int endIndex)
{
var stringSub;
if(endIndex >0)
stringSub = str.substring(int beginIndex, int endIndex);
else
stringSub = str.substring(int beginIndex)
return stringSub;
}
To find total characters in a string
function strLength(string str){
return str.length();
}
Find a substring within a string and return the first occurrence otherwise return -1
function stringIndexOf(string str, string subStr){
int p1 = str.indexIf(subStr);
if(p1==-1)
return -1;
else
return p1;
}
Get a character in a string at a specific index
function stringCharAt(string str, int strIndex){
if(strIndex > -1 && strIndex < c1 =" str.charAt(strIndex);" href="https://processing-js.lighthouseapp.com/projects/41284/project-workflow">repos and got a public key. Now I need to add my new js file to the branches and test them.
Monday, February 8, 2010
Building Firefox
This is my first experience of building Firefox on a local machine. I followed the This simple Firefox build. I downloaded MozillaBuild and installed it on my laptop. My laptop is 32 bit Windows 7. I got VS2008 and SDK v6.0A installed. Everything was checked. So I ran the command
After a few tries, it still failed. So I googled it and found out that my Avira antivirus cause the problem. I disabled it and my firewall. Finally, it completed the clone about 2 hours on my wireless connection.
I notice that it copied to c:/mozilla-central/mozilla-central. This could be part of the repos already copied to my hard drive when the connection dropped. And it prevented me from copying to the same directory. This was my mozconfig.
c:\mozilla-build\start-msvc8.bat and cloned the repository from the server. However I ran into a problem.
After a few tries, it still failed. So I googled it and found out that my Avira antivirus cause the problem. I disabled it and my firewall. Finally, it completed the clone about 2 hours on my wireless connection.
I notice that it copied to c:/mozilla-central/mozilla-central. This could be part of the repos already copied to my hard drive when the connection dropped. And it prevented me from copying to the same directory. This was my mozconfig.
. $topsrcdir/browser/config/mozconfig
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/ojbdir-ff-release
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/objdir-ff-debug
ac_add_options --enable-debug
ac_add_options --disable-optimize
ac_add_options --with-windows-version=502
For some reason the compiler did not like SDK 6.0A, because I did not update my VS2008 to sp1. So I try the quick fix and set --with-windows-version=502 to save some time. Then I ran make -f client.mk command.
Finally I got FireFox build on my laptop.
So What I learned so far about building Firefox?
- make sure all requisites installed before the clone (this could save a lot of time and headache latter).
- disable firewall and antivirus
- use wire connection instead of wireless connection.
Subscribe to:
Posts (Atom)