August 27, 2008 at 10:38 am (Learning)
I have found a great service at islamicfinder.org. Its daily prayer timing. Now anyone can show the daily prayer timing on his own website. IS just a piece of html code to put on the website. I put here the code for the city Dhaka, Bangladesh.
<iframe
src=”http://www.islamicfinder.org/prayer_service.php?country=bangladesh
&city=dhaka&state=81&zipcode=&latitude=23.7231&longitude=90.4086
&timezone=6&HanfiShafi=1&pmethod=1&fajrTwilight1=10&fajrTwilight2=10
&ishaTwilight=10&ishaInterval=30&dhuhrInterval=1&maghribInterval=1
&dayLight=0&page_background=&table_background=&table_lines=
&text_color=&link_color=&prayerFajr=&prayerSunrise=&prayerDhuhr=
&prayerAsr=&prayerMaghrib=&prayerIsha=&lang=”
frameborder=0 width=175 height=280 marginwidth=0 marginheight=0scrolling=”no”>
</iframe>
You can see it in the action here.
Leave a Comment
August 25, 2008 at 12:23 pm (General)
9 24947 73800 67013 22247 75838 25476 64051 92535 44010 79958 29902 10309 36080 29565 65805 59610 04761 31215 55730 58464 90245 42650 47654 19020 97669 79058 27672 54479 29026 15806 67487 15669 67166 87781 57814 83854 68287 40682 13904 67694 27809 51774 59820 81094 86314 67725 76296 25700 34225 39582 11451 17842 91740 45553 09456 56656 94021 03759 68977 73451 04671 90634 46067 80985 34559 34820 44157 14816 57162 38608 28858 17169 58496 15443 47147 17468 37130 67595 48487 67748 85808 57871 52804 52544 45185 14554 00990 77754 62950 81187 75475 30309 83715 00921 63396 73550 74023 20792 65361 38198 56821 64290 88393 77520 34003 89763 76817 57525 73830 19258 20025 81510 26027 05890 15776 50741 43699 96094 31568 75063 73190 13957 51137 39703 54348 50125 49547 23327 01638 55657 41076 13665 71062 37313 81467 23947 48016 44140 19101 17652 51658 04943 86331 54249 62629 14669 95839 17451 38490 99874 71792 19924 10890 08377 21531 72208 39399 15256 26033 08218 86493 76486 29057 95218 59625 40238 05015 74916 87847 49595 14067 79716 41442 56177 00893 14434 31033 74926 49945 42376 05488 47535 72035 26522 45033 22204 06079 81403 63983 02277 61020 68141 50686 48044 14240 60444 06283 01398 64769 78379 87206 77957 75093 73326 18306 88079 82986 41139 82175 45839 62020 38076 38912 47662 14024 75684 74970 96215 51877 76519 38293 93829 16289 70249 27861 35251 47577 79950 57624 30296 43554 45908 07280 68740 85602 14543 84040 25497 68674 36610 61273 16136 87598 96159 56528 42717 90118 81855 20030 27876 63574 14244 48193 15465 81365 97545 26948 00024 72273 60759 69740 25941 32640 07957 87636 47625 72106 73953 32727 35323 67734 37482 19929 34353 33570 60205 44225 60727 55269 17620 69944 62858 63033 62376 58179 19922 94687 74606 54079 39081 00678 46811 45451 00140 77359 59030 82174 66081 91617 57146 32510 66116 02434 73929 52411 31428 23141 78142 01482 91477 44880 96088 28685 48764 37625 41174 25032 16172 79213 37680 27111 83068 26615 37800 60583 71192 08568 15305 35668 98368 07610 51991 79393 46318 22097 57424 53436 75856 13835 07837 86370 00208 23013 21031 53921 93901 69044 67224 39733 68770 64579 43679 15843 44429 94727 94609 36250 96255 12982 47823 57845 73105 57062 43933 60651 78915 81461 01769 15741 71556 37896 69760 40534 14369 79289…
m39 = 213,466,917-1
It has 4,053,946 digits in decimal
Its the largest known prime number. Very interesting. Here is the glimpse of that number. To see the full number, please visit http://www.math.utah.edu/~pa/math/largeprime.html
Leave a Comment
August 13, 2008 at 11:46 pm (Learning)
Tags: javascript
Now a days, website design using images becomes popular trends. As Internet speed increases, designers can now use images for website design more freely and frequently. But if our targeted user base has slow connection, then they may experience a broken site. Images are loaded part by part. Web browsers start to build the output as soon as it start to get the html. So the user may see a broken site as all the design images on that page is not loaded first. To overcome this problem we can use JavaScript. We can use JavaScript to preload the design images for any page at the very first moment of loading the page. We can put the JavaScript code below inside our <head> tag so that the images are started to load as soon as the page started to load. After that we can use the images in normal way. If we put the CSS codes after that, then the page will be built without any broken look.
<script type="text/javascript">
image01 = new Image();
image01.src = "http://mywebsite.com/images/1.gif";
image02 = new Image();
image02.src = "2.jpg";
</script>
If we have many images for any page, then we can use array to load
images. For example,
<script type=“text/javascript”>
if(document.images)
{
imgPreloader = new Image();
ImageUrl = new Array();
ImageUrl[0] = “http://myweb.com/images/topbar.png”;
ImageUrl[1] = “http://myweb.com/images/sidebar.png“;
ImageUrl[2] = “images/mainbanner.jpg”;
for(i = 0; i <= count(ImageUrl); i++)
{
imgPreloader.src = ImageUrl[i];
}
}
</script>
This preloading technique can be used for any photo album or gallery where we can preload the
next or previous images of the current image so that the user does not have to wait much
when he see a slideshow or browse images using next/previous links. You can view such
album in Picasa by Google or at facebook. We can use Ajax with this to avoid the page loading in viewing photo albums.
2 Comments
August 12, 2008 at 12:41 pm (Learning)
The good and clear definition of Web2.0 at Wikipedia

Web2.0 Tag Cloud
1 Comment
August 11, 2008 at 11:00 pm (Learning)
Tags: javascript
Javascript lets you submit a single form, conditionally, to different script. Here, we’ll learn how to achieve this. First, let us go through a simple form:
<form method=”post” name=”frm1″ onSubmit=”javascript: decide_action();” action=”">
<input type=”radio” name=”ch” value=”one” /> Choice 1<br />
<input type=”radio” name=”ch” value=”two” /> Choice 2<br />
<input type=”radio” name=”ch” value=”three” /> Choice 3<br />
<input type=”submit” name=”s1″ value=”Submit” />
</form>
As you can see, this form displays three radio buttons. The objective is, send the form to a script according to the radio button selected. Since some Javascript action needs to take place once the Submit button is clicked, we invoke decide_action() function through the onSubmit attribute of the <form> tag. Although we include the action attribute, it is left blank. The other form fields are the usual ones. Now let us dive into the cryptic world of the actual script that steers the submission.
<script language=”javascript”>
function decide_action(){
if(check_buttons()==true){
if(document.frm1.ch[0].checked==true){
document.frm1.action=”one.php”;
}else if(document.frm1.ch[1].checked==true){
document.frm1.action=”two.php”;
}else{
document.frm1.action=”three.php”;
}
document.frm1.submit();
}
}
function check_buttons(){
var ok=false;
for(i=0; i<3; i++){
if(document.frm1.ch[i].checked==true){
ok=true;
}
}
if(ok==false){
alert(“Select at least one option.”);
}
return ok;
}
</script>
1 Comment
August 8, 2008 at 11:29 pm (General)
Today we have passed a magical date of 08-08-08. Wish best of luck to all in this magical date. The number eight is believed to bring happiness and fortune. The three eights in Aug 8, 2008, therefore, make that day especially popular. Especially the Chinese thinks that this day will bring fortune for them. They also want to get married in this date as they believe, getting married in this day will bring them happiness for whole life. Record number(16,400) of marriage registration application has been placed in china to register their marriage on this day.
Li Jun, who is going to get married officially on Friday told to China Daily that, “Eight is such an auspicious number, and with the opening of the Beijing Olympics, the whole nation will be celebrating with us”.
To know more about that, visit http://www.chinadaily.com.cn/olympics/2008-08/06/content_6907038.htm
Leave a Comment
August 8, 2008 at 2:40 am (Home Project)
Tags: addressBook, API, Email, Gmail, windowsLive, Yahoo
Recently I was asked by my job authority to study and research on address book api of Gmail, Yahoo and Windows Live(Hotmail). This study is for friend inviter script of our social networking site hottDhaka.com. It a very good news that all of these email providers has released some sort of web services to access their address book. So now any user using any of the above mentioned email services can access their address book programatically and retrieve, add, edit and synchronize their contacts from a third party application.
I have studied all these api’s and found that, all the providers tried to keep their service as simple as possible. And social networking has a great impact on todays web trend. Otherwise I don’t think that the trio would give these type of functionality. This will greatly help the social networking sites to let their users access their address book directly from their sites and search and invite friends to their sites. While studying these api’s, I found one bottleneck which is not so important and I think developers can overlook this problem. The problem is, any user trying to access their address book from any third party web application, s/he has to authenticate from their respective service providers website. They don’t provide any mechanism for third party sites to authenticate the users off the providers sites. For example, if any Gmail users try to access his email address book from any third party web application, then he will be redirected to Gmail login page, s/he will authenticate him/herself there by providing his username and password, then Gmail send him back to the original site with his address book information. This is for security reason and I think this is ok. At least the developers don’t need to develop the security and login things by themselves as the service providers are take the responsibility to doing this. This also ensure the highest level of security.
But, as usual, Windows Live has another bottleneck I found, at least in my case. For security reason, the use the hash function mhash() for which I have to install the php mhash module. This is very rare module installed in local web hostings. And I still can’t check windows service for mhash() function. So I am looking for a hosting who can give me the mhash support. may be then I can use the api for PHP. Otherwise I have to try at .NET.
And I also tried the Yahoo Addressbook API. At very first sight, I thought Yahoo’s API is the easiest to build and test. But in fact, still I am getting a service unavailable error. And the interesting thing is that, I was trying their web services with a test code downloaded from their web site
Though, at first sight, it was seems that, Google’s api is very tough to try. And again interesting matter is that, I first success with Google’s API. I tried and played with their Javascript addressbook api. Its very easy. Google also provides a full working example. I just downloaded it and make some changes need for me. If you like to see, you can see it here.
5 Comments
August 8, 2008 at 1:54 am (Home Project)
Tags: googleApi, photoGallery, php
If you surf the web frequently then you must have heard the name of Google. If you don’t, then do not proceed, because this post may not have any worth to you. Google has many many great services. And among them, Picasa is a nice photo service provided by google. You can upload as many images as you can at picasa. All you need is a google id. Picasa is a free service. You can upload photos in different albums. You can also make you albums private and public.
So, some days ago I was trying to accessing my picasa albums using google picasa web api. I successfully accessed my public albums and see the images in those albums. So I thought to find some ways to make these photos visible by an Lightbox image album created in Javascript. After a day of work, I can successfully see my picasa albums through lighbox. If you want to see your own album, check this link. Next I am thinking to build this up as a widget to add to any website for its user’s personal use.
Leave a Comment
August 2, 2008 at 1:47 pm (Learning)
Tags: google, photoGallery, php, picasa
Last night I was working on a home project. I was trying to build a lightbox photo gallery from picasa image gallery feed using google api. When I trying to get all photo list by album name, then I found that, google strips all non alpha-numeric characters from the album name and capitalize the first character of each words in the album name. For example, I have an album named “Little angels (1)”. But in the album url, google wrote the name as “LittleAngels1″ (http://picasaweb.google.com/<my_user_name>/LittleAngels1). So I need to write a tiny function to take my actual album name and made it url ready as google. Here is the function:
<?php
function stripNonAlphaNumChars($dirtyStr)
{
$string = ucwords($dirtyStr); // capitalize the first characters of each word in the string
$patterns = ‘/[^a-zA-Z0-9]+/’; // reg. exp. for non alphanumeric characters
$replacements = ”; // replaced with empty string
$cleanStr = preg_replace($patterns, $replacements, $string); // return the clean string
return $cleanStr;
}
echo stripNonAlphaNumChars(‘The little angels (1)’);
// the output is: TheLittleAngels1
?>
Very large function huh ?!
Leave a Comment