Showing posts with label Javascript. Show all posts
Showing posts with label Javascript. Show all posts

Monday, 22 June 2009

Random Musings - Day #173

Well I've arrived and saw the movie "he's just not into you" which is no way as good as the book. By the way, I saw "Taken", "The International", "The Wrestler" and the best of those seen, "Gran Torino". Favourite seen was the barbershop insult scenes.

Apparently the Stig was finally revealed as Michael Schumacher.

David Guetta moves from #7 to #1 with Kelly Rowland on "When loves takes over".
Pixie Lott and Black eyed peas slip one place each to accommodate Guetta's move.

Permission denied using Javascript xmlhttprequests as shown on devshed and salesforce.

Here's some guide on how to write technical white papers from writing-world and Stelzner

Things to remember when doing a security audit

Thursday, 11 June 2009

Random Musings - Day #162

Station closed for the 3rd day this week. Not been open at all this week in my eyes.
That lot from the North East are funny bunch making up new and fun road signs

Yet more Javascript
Some fun and games and useful links found.
- Tools used by sharpgis
- How to inspect Javascript Objects from codeproject.
- How to convert a string to xml
- XMLSerializer from Microsoft.
- Using the JRE Certificate Store from grim.
- Soap Tutorial from Javaboutique.
- Comprehensive list of Soap Clients from jguru/soapware.org
- Soap client 1.6.3 (old) from wareseeker.
- Simple Soap client from IBM.

Tuesday, 9 June 2009

Random Musings - Day #160

Soap bubbling up
I've caught looking at SOAP clients and it's doing my head in. Need to try to set up a SOAP client up in short order. Fine.
But it gets very awkward if you are using client side certificates. The browser only works with it installed, which
heavily complicates things. There is a good javascript SOAP client package from guru4. That's not to say it can be done freehand as shown in this devarticle. Another possible client to look at is Soap-sec. Surprisingly, Firefox has no add-ons for this.

Javascript
Cross-domain scripting is there for security's sake but is very hard but not impossible to by-pass if needed. More on Javascript Objects

Monday, 11 May 2009

Random Musings - Day #131

A is for...
Funny game, my sister came up with whilst in the car. Go through A-Z of food-types. For some reason, we kept coming up with animals instead... e.g. Dog, Frog, Llama, Orangutan!

Engineering works
I was annoyed on Saturday that there was engineering works to work. I lost 30 minutes waiting for a replacement bus. Another 15 minutes waiting at one station and another 20 minutes waiting at another one. So that sucked over an hour of my life away.
But engineering works weren't done yet. They were overrunning and hence this morning, my train was cancelled. Another half hour of my life... gone!

Mashup
If I haven't mentioned it before but this is a great mashup of Need you tonight.

Javascript is your friend
You can write text using fromCharCode. Very useful, if your quotation marks are escaped and you need to bypass it (cough). There is a comprehensive list of charcodes. Javascriptkit offers additional string functions.

Google hacked / Cassie naked?
I was looking for more details about Google getting hacked instead I got Cassie getting naked...
Seriously though, there was a universal xss issue with ALL google services which looks like has just been fixed.

Acai Berry Scam
It's the second time, I've got a random offline message from a contact.

I got so many messages about those acai berry pills that I decided to order them and guess what? I lost 23 pounds so far and its only been two weeks. I am living proof that they work and best part was, they only cost me five dollars to try over at http://weekcome.com

I've not seen anything specific relating to ads in msn messenger... The actual pills themselves are apparently a rip-off!
The Wicked Fire hints the problem could with account being hacked. This blog claims it's a msn virus of some description...

Whatever happened to...
90's divas, Dina Carroll and Shola Ama?

Wednesday, 18 March 2009

Random Musings - Day #77

Javascript
A couple of short tutorials that I have used for my own benefit...
SetInterval and reload.

Sunday, 6 January 2008

Encapsulating javascript objects (xmlhttprequest)

As much as I loathe Javascript objects, using them gives the developer control and limit the opportunity of overriding existing Javascript. What I really wanted to do is encapsulate the xmlhttprequest into a nice class. Unfortunately, xmlhttprequest itself uses a caller function, onreadystatechange. This proves a huge challenge. Essentially, you want to include a function/method to handle the call. But believe me, this is a headscratcher. One interesting technique is to take a copy of the class instance before running the onreadystatechange function. You then have scope to the global instance and as well as the current instance as demonstrated at mike chambers. Unfortunately, it looks like firefox and ie handle things a little different. I tried to set a text attribute for my class within the caller function, to my surprise, Internet Explorer sets it but for some reason Firefox has it undefined and only used my text attribute in a local scope. Another solution is provided hunlock. This looks to be a useful module indeed, exactly what I am looking for. But once again, firefox doesn't appear to like it.

Javascript Objects

I remember a long time ago in a job interview, saying that there was no such thing as javascript objects. This was when the notion of javascript objects was introduced on very hoky browsers like Netscape and IE. It certainly wasn't cross-browser friendly then and it looks like not a lot has changed there. I still think Javascript objects and classes are immature. Looking at articles on Javascript objects, there are number of different notations that could give average developer a nightmare. For instance this oop javascript guide gives a thorough overview how to construct a javascript class properly. However, I do not like the idea of having to explicitly utilise such functions as makeConstructor, defineMethod, defineType, instantialize, getClassName. That said, the article is spot on its assessment of Javascript OOP...

"What you may say is 'Hey, the syntax is too complicated! Writing those syntaxes will frustrate me ...'
Actually, JavaScript is not an Object Oriented Programming language. But we create context so we can do OOP. And once the syntax is too complicated, we can simplify them. But I consider borrowing the existed mature Java language would be a better choice. That is, we can write in the style of Java, which is sure an OOP style language, and then we converts the Java codes into JavaScript codes, which is somewhat syntactic complicated. And then we have a great thing."

Fortunately, there are more simpler articles that demonstrates ways of creating Javascript objects, howtocreate, mozilla and mckoss still use the newly created class' prototype object. The only benefit I see, it gives you a chance to define functions and attributes for later and also can separate functions and attributes leaving the main class constructor. However, if you are comparing against natural OOP language like Java, C++ and C#, you usually do not have to define these functions and objects explicitly and you can incorporate methods and attributes into your classes (that you would normally see in naural OOP languages) as demonstrated in these even simpler articles from daaq and asp-ajax.

Also stumbled some interesting article on using JSON objects from hunlock and some useful javascript inheritance techniques in prototypejs.

Tuesday, 21 August 2007

Useful Java/Perl/Javascript/Linux links

I find it annoying that I keep forgetting to grab the links I've found for certain websites that are worth pointing out that I have spent my precious little time researching.

Anyways I've decide to take a big step back and re-evaluate what are the key things that I like, use and need to focus on.

1. Java has always been on my mind even though I've barely touched in the longest while. It's been knocked for being slow and clunky but it does have its place in server-side computing. http://java.net appears to be a good resource on keeping tabs on Java as well the omega site http://java.sun.com

2. Perl. Ever since I went to yapc::europe in 2006, I've known about the good effort they have been putting into CPAN and Perl 6.

3. Rapid Javascript Development. Client side stuff. A lot has changed since I originally did web development. There's so much you can do. The basic knowledge is still there but there should be lots of tools to develop a quick application with fancy moving graphics and fancy moving windows. Firebug and Mozilla seem to a common thing that's cropped up in searches.

4. Linux. A lot of above languages go hand in hand with Linux. In particular, Perl's catalyst package has little support for Windows. This has to be a basic building block for me.

Monday, 23 July 2007

i can't right click and i can't see the source

I found an interesting site whilst looking for photos of myself. It's at http://www.myeventphoto.co.uk If you dig further in the site, you will find galleries where you would have to pay for photos. I think to myself I just want a little snapshot. But the site looks to have Javascript code to stop you viewing the source and right-clicking. It looks well looked down.

However, remember files maybe stored in Internet temporary directories and sure enough I found a photo of myself in there. You could stop prohibitive nature of the application by disabling Javascript!