Borort

The sky’s the limit…

Error: uncaught exception: Permission denied to call method XMLHttpRequest.open

with 2 comments

If you want to do cross-domain scripting with XMLHttpRequest, e.g. fetching data from a remote location but you’re on a local page or local XUL application (file:///), you need to tell Mozilla/Firefox about that, otherwise you get the infamous error:

Error: uncaught exception: Permission denied to call method XMLHttpRequest.open

Always remember: XMLHttpRequest needs UniversalBrowserRead!

If the page with the XMLHttpRequest is on a http:// URI (on a webserver), it is not possible to fetch data from another domain!!! This is a security measure of Mozilla/Firefox.

cross-domain-xmlhttprequest.html

<script type="text/javascript" language="javascript">

// Error: uncaught exception: Permission denied to call method XMLHttpRequest.open

  var http_request = false;

  function makeRequest(url, parameters) {

   try {
    netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
   } catch (e) {
    alert("Permission UniversalBrowserRead denied.");
   }

    http_request = false;
    http_request = new XMLHttpRequest();
    if (http_request.overrideMimeType) {
      http_request.overrideMimeType('text/xml');
    }
    if (!http_request) {
      alert('Cannot create XMLHTTP instance');
      return false;
    }
    http_request.onreadystatechange = alertContents;
    http_request.open('GET', url + parameters, true);
    http_request.send(null);
  }

  function alertContents() {
    if (http_request.readyState == 4) {
      if (http_request.status == 200) {

        var string = http_request.responseText;
      alert(string);

      } else {
        alert('There was a problem with the request.');
      }
    }
  }
  function updateweather() {
    makeRequest('http://www.wunderground.com/auto/rss_full/global/stations/16239.xml', '');
  }
</script>

<input type="button" name="button" value="GET XML"
  onclick="javascript:updateweather();">

Source: http://www.captain.at/howto-ajax-permission-denied-xmlhttprequest.php

Written by borort

January 24, 2009 at 11:55 pm

Posted in Research, Tips

Happy New Year 2009!

with 2 comments

Written by borort

December 31, 2008 at 9:55 pm

Freebase Paralax

with 2 comments

Written by borort

December 4, 2008 at 4:07 am

reading for this month…

with 2 comments

Beginning PHP and PostgreSQL 8: From Novice to Professional (Beginning: From Novice to Professional)

Building Scalable Web Sites: Building, scaling, and optimizing the next generation of web applications

 

Programming Collective Intelligence: Building Smart Web 2.0 Applications

RESTful Web Services

Written by borort

November 19, 2008 at 5:35 pm

Posted in Book

Solr Post.jar – post to different Solr port other than 8983

with 2 comments

What if you want to post data to Solr instance whose http port is different from 8983 using post.jar which comes along Solr package?

For example, your Solr http address is : http://localhost:8080/solr

To post data to this Solr index: java -Durl=http://localhost:8080/solr/update -jar post.jar *.xml

That’s all… :)

Written by borort

November 19, 2008 at 5:14 pm

Posted in Search Engines, Solr

Change We Can Make – Obama

leave a comment »

Written by borort

November 6, 2008 at 6:00 am

Posted in Social

Tagged with

Some historical books..

with 3 comments

  • Archambault, New Years Ceremony at Basak, 6mb
  • Barney, Meo of Xieng Khouang Province (Laos Paper No. 13) 5mb
  • Bassene, In Laos and Siam, 13mb
  • Bazancourt, Les Expeditions de Chine et de Cochinchine, 9mb
  • Bernatzik 1970, Akha and Miao: Problems of Applied Ethnography
  • Bertrais 1978, Dictionnaire Hmong-Francais 20mb
  • Bertrais 1985, Dab Neeg Phau Ib (Hmong Folktales) 4mb
  • Berval, Kingdom of Laos, 18mb
  • Blau, Organizing and Managing Unconventional Warfare in Laos, 3mb
  • Bliatout, Hmong Sudden Unexpected Nocturnal Death Syndrome, 4 mb
  • Boyes 1989, A Life Apart Viewed from the Hills 5mb
  • Broderick, Little Vehicle, 14mb
  • Buttinger, Smaller Dragon, 18mb
  • Catlin 1980, Music of the Hmong, Singing Voices and Talking Reeds 5mb
  • Cooper 1991, The Hmong 30mb
  • Dooley, Night They Burned the Mountain, 10mb
  • Downing 1982, Hmong in the West: Observations and Reports 11mb
  • Downing 1986, Hmong in Transition 16mb
  • Evans, Yellow Rainmakers, 6 mb
  • Finkle 1985, Hmong Recipe Cook Book 1mb
  • Franck, East of Siam, 15mb
  • Garnier, Further Travels in Laos and Yunnan, 18mb
  • Geddes 1976, Migrants of the Mountains 15mb
  • Graham, Songs and Stories of the Ch’uan Miao 24mb
  • Grant, Boat People, 9mb
  • Halpern, American Policy in Laos, 1mb
  • Halpern, Tribal People of Laos, 1mb
  • Harmand, Laos and Hilltribes of Indochina, 27mb
  • Heimbach 1969, White Hmong English Dictionary 13mb
  • Hickey, Free in the Forests, 20mb
  • Hickey, Sons of the Mountains, 40mb
  • Hickey, Village in Vietnam, 11mb
  • Iwata, Minority Groups in Northern Laos (Laos Paper No. 16) 1mb
  • Johnson, 1981, Hmong Folktales
  • Kerr, Lao-English Dictionary, Vol 1, 16mb
  • Kerr, Lao-English Dictionary, Vol II, 13mb
  • Knoll, Becoming American, 64mb
  • Larteguy, Bronze Drums, 13mb
  • Lavalle, Last Flight from Saigon, 7mb
  • Lavelled, Air Power and the 1972 Spring Invasion, 10mb
  • Lemoine 1993, L’Initiation du Mort Chez les Hmong 6mb
  • Lemoine 1972, Un Village Hmong Vert du Haut Laos 17mb
  • Lemoine 1982, Yao Ceremonial Paintings 83mb
  • Leepreecha, Hmong Proverbs 1mb
  • Luangpraseut 1984, Dara Reads Lao Book 1 2mb
  • Luangpraseut 1984, Dara Reads Lao Book 2 3mb
  • Luangpraseut 1985, Dara Reads Lao Book 3 2mb
  • Luangpraseut 1995, Laos and the Laotians 2mb
  • Luong, Ethnic Chinese from North Vietnam, 2mb
  • Luce, Vietnam: the Unheard Voices, 12mb
  • Lyman 1974, Dictionary of Mong Njua 13mb
  • Manich 1967, History of Laos 7mb
  • Meeker, Little World of Laos, 10mb
  • McCoy, Politics of Heroin, 20mb
  • Mienh study book, Laos
  • Mottin, 55 Chants d’Amour Hmong Blanc
  • Mottin 1982, Allons Faire le Tour du Ciel et de la Terre 20mb
  • Mottin 1980, History of the Hmong 6mb
  • Mottin 1980, Elements de Grammaire Hmong 6mb
  • Ngaosyvath, Lao Women, 9mb
  • Nguyen, From Rice Paddies and Temple Yards, 7mb
  • Pfaff 1995, Hmong in America: Journey from a Secret War 49mb
  • Roberts 1967, Area Handbook for Laos 15mb
  • Sam and Campbell, Silent Temples, 9mb
  • Sam, Khmer Folk Dance, 2mb
  • Schanche, Mister Pop, 12mb
  • Strecker 1986, White Hmong Dialogues 1mb
  • Tien, Pirates in the Gulf of Siam, 4mb
  • Toye, Laos, Buffer State or Battleground, 9mb
  • USAF, Plans and Policies in Laos, 3mb
  • Vang 1988, English Hmong Bilingual Glossary of School Terminology 3mb
  • Vang 1987, Hmong Alphabet Pre-Primer for Learning Vowels (Pahawh) 1mb
  • Vang 1987, Learn How to Read Hmong (Pahawh) 11mb
  • Vang and Lewis, Hmong in Thailand, 29mb
  • Villa 1982, Primary Word Book (Hmong English) 2mb
  • Vincent, Land of the White Elephant, 14mb
  • Viravong 1964, History of Laos 7mb
  • White 1983, Showing the Way: A Hmong Initiation of the Dead 1mb
  • Yiu-Mienh Zieqv Nzangc Sou (Mien Primer) 2
  • Yiu-Mienh Zieqv Nzangc Sou (Mien Primer) 3
  • Yiu-Mienh Zieqv Nzangc Sou (Mien Primer) 4
  • Young 1962, Hilltribes of Northern Thailand 6mb
  • Source: http://www.reninc.org/BOOKSHELF/bookshelfindex.html

    Written by borort

    October 20, 2008 at 4:58 am

    Posted in Book

    Do Not Believe..

    with one comment

    Do not believe in anything simply because you have heard it.
    Do not believe in anything simply because it is spoken and rumored by many.
    Do not believe in anything simply because it is found written in your religious books.
    Do not believe in anything merely on the authority of your teachers and elders.
    Do not believe in traditions because they have been handed down for many generations.
    But after observation and analysis, when you find that anything agrees with reason and is conducive to the good and benefit of one and all, then accept it and live up to it.
    [Buddha]

    Written by borort

    October 2, 2008 at 12:13 pm

    Express Yourself

    leave a comment »

    Expressing How You Feel Can Release a Lot of Tension

    Expressing yourself can help you keep in touch with how you are feeling. It can also release a lot of tension that you may be carrying around with you. Sometimes when people get out of touch with how they feel, their feelings burst out in situations or ways that are embarrassing or inappropriate.

    Everyone needs some time to themselves to reflect on their feelings. Being able to express how you feel may help you make better decisons about what is right for you now.

    Ways of Expressing Yourself

    Finding out the best way for you to express yourself can be rewarding. You may find that you enjoy expressing yourself in a particular way, such as painting, playing sport, singing, drumming, or even doing something like kicking ball or yelling at a tree. If you don’t know what way suits you, try some of the following suggestions.

    Write About How you Feel

    Writing may be a useful way to explore your feelings. Some people keep diaries, others just write down whatever comes into their head. You may want to write a story about whatever is happening in your life now (try ‘Scream it Dream it’), or even make up a story based on some past event in your life. Writing poetry works for some people so you might like to try that. You can use the “Journal” in the members section of Reach Out! to record your thoughts and feelings in a way that is confidential.

    Play Sport

    Playing sport lets you express yourself in a physical way. There are plenty of opportunities to yell or curse or feel elated when things go well. Team sports allow you to express yourself and combine your energy with others both in verbal and non-verbal ways.

    Draw or Paint

    Even if you don’t think of yourself as artistic, drawing and painting are useful ways of expressing yourself. No one else has to see what you do. You may just want to experiment with drawing lines, sketching, colours and so on.

    Sing, Play Music, or Shout

    Singing along to your favourite songs or playing a musical instrument is another way to express yourself. Sing in the shower or out in a park. If you play an instrument or sing regularly you may find that you even start writing your own songs or music to express how you feel.

    Dance

    Dance is a form of self-expression. Put on some music at home or go out and dance as much as you like.

    Source: http://www.reachout.com.au/default.asp?ti=325

    Written by borort

    September 23, 2008 at 9:56 pm

    How to Express Yourself

    leave a comment »

    Being creative helps you achieve your goals more effectively. It leads you to new pathways, and you will hardly believe what you find out about yourself. It’s also a way of venting, and for teenagers, a way of finding yourself.

    STEPS

    1. Never think of yourself too seriously. Don’t put pressure on yourself to be perfect! If you don’t have restrictions on yourself, it gives you more room to just let yourself flow creatively. Don’t worry about being perfect. Perfection is boring anyway, and it’s also kind of…unoriginal.
    2. Find a place that inspires you and that will help spark your creativity. Maybe you like a place that is quiet and feels private to you, such as the outdoors – calm, serene, and beautiful. Or maybe you have a bright colorful room that makes you feel artistic. Maybe you like starry nights – whatever it is, revel in it!
    3. Experiment with different mediums. Never be afraid to try something new. If you want to try sculpting, go for it! If you don’t like it, you can always just stop. But how will you know whether or not you’re a secret writing/painting/sewing genius is you never try it?
    4. Meditate. Relax. Get away from the outside world. Forget about the grocery shopping you have to do. You are in your own personal space — be with yourself.
    5. Find examples. If you think you might be interested in art, go to an art museum or find artists online. If you like writing, read a variety of books and investigate classical authors. It’s a type of self-education, and it’s what seperates the true intelectuals from everybody else: a willingness to explore, learn, and discover.
    6. Consider starting a journal to use everyday. It doesn’t even have to be the kind of journal that you write in. It could be a doodle journal, or a sketch journal, or a poetry journal. Just use it to record your emotions day-to-day, in a place where no one can see them if you don’t want them to.

    TIPS

  • Be yourself! Even though you are consciously trying to be more expressive, it doesn’t mean that you have to act like a totally different person.
  • WARNING

  • Some people may have weird reactions to your more creative life.
  • Source: http://www.wikihow.com/Express-Yourself

    Written by borort

    September 23, 2008 at 9:43 pm