How to start with jQuery

Lately I have been working on several web applications, both as hobby projects and at work. I started using YUI3 a few years ago as a Javascript framework, and I liked it. But I kept hearing about jQuery, and the times I saw code snippets, I was intrigued. It looked different, but at the same time jQuery seemed very powerful and efficient. So a while back I started looking closer at jQuery, and I found that it was extremely easy to learn. One need a decent understanding of HTML and the browser DOM (Document Object Model), as well as Javascript knowledge. Add some CSS to that, if you want the page to look good as well, and you are set. So how do you start using jQuery? The easy way is to take advantage of companies like Google and Microsoft who are hosting different frameworks (including jQuery) on their servers for public use. You don't have to worry about downloading and hosting it yourself, and you can get started in just minutes. You add code to your page to utilize jQuery, then add some script. You have to allow the browser to wait for the webpage to fully load before you can start doing things, and this is done using $(document).ready(). When that event is triggered, the code you have added there will be executed. It is very easy to address elements on your webpage. If I have an element (could be a button, a span/div section, a link or even an image) with the id "messageBox", I can address it like this: $("#messageBox"). I then have different properties and methods for that element. But I have always believed in "show me the code". I created a very simple demo. The webpage contains a button and a div where we want to display a text when the button is clicked. I have some CSS to make the text look nice, and a few lines of jQuery code to do the work. <html> <head> <title>Hello, jQuery</title> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script> </head> <script> // The following function is executed after page is fully loaded $(document).ready(function () { // Setup the element with id "btnSave" to react on click $("#btnSave").click( function() { // When clicked, set the innerHTML of the element with // id "messageBox" to the specified html string. $("#messageBox").html("You clicked the <strong>Save</strong> button.");    $("#messageBox").addClass("statusMessage"); }); }); </script> <style> .statusMessage { font-family: Arial; font-size: 0.9em; color: #AA0000; } </style> <body> <button id="btnSave">Save</button> <div id="messageBox"></div> </body> </html> That's it. Try it yourself, paste this code into a text file and call it jQuery.html, then open it in your browser. Now when you understand the basics, you can learn more advanced things. I am using jQuery to very easily perform Ajax calls, even calling Lotusscript web agents to return data from a Domino database to my webpage. I also use it for all kinds of dynamic updates to webpages. A while back I started on a Domino-based web chat as a hobby project. I started…

0 Comments

Lightbox Plus – Thanks Bob Balfe!

Earlier today, Bob Balfe wrote a blog post about installing Lightbox Plus on his blog. I decided to test it on this blog as well, and I really like it. I might make the images I post slightly smaller in the future, as the plugin does not scale down the full-size image is it is larger than the browser window. Installing the plugin was as easy as it could be. I just selected "Add New", searched for the plugin,clicked the install button and then activated it. There was a warning that the plugin might not work with the newer version of Wordpress I am running, but it all worked for me without any issue. I did not even have to configure anything, the images started showing up in the lightbox automatically. There are a few settings, mainly for the style of the lightbox. But you don't even need to touch that if you don't want. Thanks Bob for posting about this!

1 Comment

Photo – Thunderbirds in Ft Worth

I took this picture the other weekend, and it is one of my favorites from the Air Show. I always enjoyed these kind of demonstrations. It is a little like programming, man in charge of machine. Well, in most cases... You may not be able to tell, but the number 5 right behind the air intake on the lower F-16 is actually painted upside down, so it appears correct to the spectators. This is because this particular position is flying mostly upside down...

0 Comments

Fort Worth Airshow 2012

While going to the 2012 Ft Worth Airshow two weekends ago, I took a few pictures. Like a little over 2000... :-) I have processed a few of them, and wanted to show a few HDR pictures I took. The day of the airshow was cloudy and windy, so the sky was fairly gray, and it was a bit dark as well. Perfect conditions to test some more HDR...

2 Comments

Moving blog posts from Connections to WordPress

As I switched from IBM Connection to WordPress for my blog, I started thinking about my existing content. Was there a way to move them all over without having to manually copy and paste and recreate all 268 entries? Well, there is, and this is how I did it, using just a  few tools. First I used Wget to retrieve my old blog. This put all the posts on one folder (entries), and all images in another (resource). It was then a simple task to write a Lotusscript agent that processed each file in that folder and read the content, parsed out the title, date originally posted and HTML for the blog post itself. I put that data into separate Notes documents, after performing some cleanup and string replacement. I had already moved all images to a filer on my primary web server, so I performed a replace of the image URLs in the HTML, to have any images pointing to their new location. I also had to fix some special characters and replace them with the corresponding HTML entities. Now when I had all the data, I just wrote another agent to export the data out again, to create a CSV file. I then installed a CSV importer in my WordPress blog and used to to import the file I just created. After a few tweaks I performed a successful import. Later I realized I had missed a few special characters, so I had to fix those entries, but we are talking about 4 or 5, out of 268 entries. If there is an interest, I might clean up the code a little and create a nicer UI (right now many of the values like path and URL are hard-coded) and then release the code if anyone else is planning to go through the same exercise. Below is the existing code to read the blog entries into a simple Notes database. Option Public Option Declare Dim entrydir As String Dim resourcedir As String Sub Initialize Dim filename As String Dim cnt List As Integer Dim blogentry List As String Dim tst As Variant entrydir = "D:\BleedYellowBlog\www.bleedyellow.com\blogs\texasswede\entry\" resourcedir = "D:\BleedYellowBlog\www.bleedyellow.com\blogs\texasswede\resource\" cnt("Total") = 0 filename = Dir$(entrydir + "*.*") Do While fileName <> "" blogentry(filename) = entrydir + filename cnt("Total") = cnt("Total") + 1 fileName = Dir$() Loop cnt("Processed") = 0 ForAll be In blogentry cnt("Processed") = cnt("Processed") + 1 Print "Processing " & cnt("Processed") & " of " & cnt("Total") Call ProcessBlogEntry(ListTag(be),be) End ForAll End Sub Function FixHTML(html As String) As String Dim tmp As String tmp = Replace(html,_ "https://www.bleedyellow.com/blogs/texasswede/resource/",_ "http://www.texasswede.com/blogfiles/resource/") tmp = Replace(tmp,_ "http://www.bleedyellow.com/blogs/texasswede/resource/",_ "http://www.texasswede.com/blogfiles/resource/") tmp = Replace(tmp,"/BLOGS_UPLOADED_IMAGES/","/uploaded_images/") tmp = Replace(tmp,"´",|"&acute;"|) tmp = Replace(tmp,"’","&acute;") tmp = Replace(tmp,"“",|&quot;|) tmp = Replace(tmp,"”",|&quot;|) tmp = Replace(tmp,"…",|"..."|) tmp = Replace(tmp,"<wbr>",||) tmp = Replace(tmp,"> < ",|>&anp;nbsp;< |) FixHTML = tmp End Function Function ProcessBlogEntry(filename As String, localpath As String) As Boolean Dim session As New NotesSession Dim db As NotesDatabase  Dim blogentry As NotesDocument Dim rtitem As NotesRichTextItem  Dim siteurl As String Dim html List As String…

1 Comment

Welcome to my new blog

After having my blog hosted by Lotus911 (later GBS) at bleedyellow.com for almost five years, I have decided to switch blog platform. The main reason is due to limitations in IBM Connections as a blog platform (no anonymous comments and issues for example when trying to embed videos). I decided to go with WordPress as my blog platform, as it is common and widely supported. Another advantage with a WordPress hosted blog that is that I now can have the blog hosted under my personal domain, as blog.texasswede.com. Earlier today I imported the existing content to the new blog. I will write about that process in another blog entry shortly. Basically I wrote a couple of Lotusscript agents in Notes and retrieved the existing blog content and then reformatted it for WordPress. As I did not have very many comments, I did not import them, as I decided the amount of work was not worth it. They can be found on my old blog, as I will keep it alive. That way all the links to it from different placs will also continue to work. I have not verified all old entries, so if you notice anything that need to be fixed, please let me know. One known issue is when I reference another blog entry, the link will currently take you to bleedyellow.com. Again, a big thanks to GBS who hosted my blog for the last five  years, and who got me into blogging. I had made some attempt prior to 2008, but never got motivated enough. Hopefully the switch to WordPress and the greater possibilities will lead to me blogging more frequently than lately.

5 Comments

Nostalgia

I am sure most of you who started programming around the same time that I did (in the first few years of the 1980's) at one point carried something like this in your wallets:  

1 Comment

Things to think about when programming in Notes

Inspired by some of the posts in the DeveloperWorks forums and on StackOverflow, I thought I would post some more basic concepts and how I handle them. I am not saying my way is the best way, this is just what works for me. I am sure there will be more posts in the future"..." I will also mention a few other things I noticed while reading the code posted in the forums.   Retrieve something that doesn´t exist The question is how to identify what dates there are no documents created for. This is where lists are very useful. Richard Schwartz answered this question and posted some good code. Rich suggests to create a list of dates, with each list item having an initial values of false, and then loop through the documents. As each document is processed, the value of the corresponding list item is changed from false to true. You can then go through the list and see which dates still have a value of false, those dates are missing documents. My version of the same code is to actually delete the list item you have a match for, instead if setting it to true. In the end you have a list of just the items of dates without a corresponding document.   Write readable code This could be a blog entry all by itself. But I notice that much of the code in the DeveloperWorkds forums is hard to read"´". Partially because any tabs or multiple spaces used for indenting the code is stripped out, but also because the posters don´t write easy-to-read code. Variable names are often not descriptive: Dim db1 As NotesDatabase Dim db2 As NotesDatabase vs Dim thisdb As NotesDatabase Dim nabdb As NotesDatabase Which one is easier to understand? In my opinion (and I am sure you agree) the second variant. Also function names and other variables should be named so you understand what they do and what kind of data they contain. Comments are mostly non-existing. It is not that hard to add some comments to the code that explain what the code is doing. But don´t explain every line of actual code (it should be self-explanatory, if variables are named correctly), explain what a particular section of code is intended to do. Here is a section of code from an agent I wrote earlier this week: '*** Read PhotoUNID field in LossControl document'*** and build a list of the UNID values in the fieldphotoUNID = lcdoc.GetItemValue("PhotoUNID")(0)If photoUNID<>"" Then '*** Create array of values and put into photolist tmparray = FullTrim(Split(photoUNID,";")) ForAll t in tmparray If t <> "" Then photolist(t) = t End If End ForAll End If The comments above will help the next person to look at the code to quickly understand what it is intended to do.   More on variables Use Option Declare/Option Explicit. This will find many errors, especially for more inexperienced programmers, where variables are misspelled or missing, something that is a very common…

0 Comments

Movie Review: Looper

Last night I went to see Looper. I had actually not heard much about it, but I looked it up online real quick and at least it sounded like a good premise for a movie. I have always enjoyed sci-fi, and especially time-travel. The premise is that Joe is a "looper", a contract killer in a near future (2044). About 30 years after that, time-travel has been invented, but declared illegal. So only the biggest crime syndicates have access to time-travel, and they use it to get rid of people. The send the victim back 30 years in time, bound and gagged with a hood over their heads. The looper promptly kills them and disposes of the body. The looper is paid with silver attached to the victim. Occasionally the future version of the looper is sent back, who kills his older himself. The is called "closing the loop". Joe (played by an excellent Joseph Gordon-Levitt) is a looper. One day his future self (Bruce Willis) shows up, but promptly escapes. In the future, a new gangster boss, "The Rainmaker" has taken over, and he is closing the loop on all loopers. In doing so, the future Joe lost his wife, and he is now looking to prevent this by finding the young Rainmaker in the past and kill him. I truly enjoyed this movie, it was absolutely much better than I had expected, and it makes you think more than the average movie. The story is clever and it works. You see influences of both Back to The Future and The Terminator in the story, as well as to Carrie and X-Men (with the concept of telekinesis), but it all fits well into the story. I would highly recommend this movie. However, it´s not a movie for kids, due to violence (and for sensitive Americans, some nudity).  

0 Comments

Are inexperienced developers the death of Notes?

Lately I have been more active in the IBM DeveloperWorks forums, as well as on StackOverflow, trying to help people with development problems. As I am just myself starting with Xpages, I been staying in the forums for "classic" Notes development. I have noticed a trend, based on the postings. It seems like there is a substantial number of new developers who are not very familiar with Notes/Domino development. They sometimes think Domino works like a relational database. There are then several who are posting about very simple things, that can easily be found in the online help, or by looking at the properties for an element. Like how to extend the last column in a view to use all available space. There was even one user asking about how to duplicate a specific @Formula in Lotusscript, when the help file got a cross reference to the class and method to use… There are others who does not seem to even understand the basics, either when it comes to programming in general or specifically of Notes/Domino. Some of them don't understand data types. They declare a variable as integer, then make a calculation that results in a value of say 3.5, and is then wondering why the result is 4. Others don't understand the difference between strings and variables, they are surprised when @SetField("myField"; "myField + 1") does not give them the expected result (the value in the field ‘myField’ increased by one). On StackOverflow it is possible to see what other areas the user posted in. Some of the users seems to have a background in Java, SQL, .NET or other platforms. My guess is that they been thrown into a Notes projekt after their company took on a new development project, with the hope that they could learn it quickly. I think this could be dangerous, from some of the code I have seen, the lack of experience and understanding of the Notes/Domino platform will cause sub-standard or slow code, which of course will make executives think that Notes is a bad development platform. After all, if the expensive consulting company (or the off-shore based development house with all developers being at least Ph.D.) can't write fast and good code, the platform must be at fault, right? Another thing I noticed over the last year or so is that in the Notes-related groups on LinkedIn, there has been a number of requests for the answers to the IBM certification tests. They have originated from both some big consulting companies and from within IBM. None of them were from the US (or Europe, if I remember correctly), but from countries more traditionally associated with outsourced or "off-shore" development. My guess is that the companies want their developers to be certified on paper, as they can either charge higher rates, or pass themselves off as being “experts” on the platform. A number of the questions in the DeveloperWorks forums were posted under names that often are associated with the same…

0 Comments

Neil Armstrong dies at age 82

Neil Armstrong. The first man on the moon. Speaker at Lotusphere 2007 (where I took the picture above). Self-proclaimed geek. I always loved reading about space growing up, and I read everything from sci-fi to real stories. One of my favorites was Carrying the Fire: An Astronauts Journey by Michael Collins (the third Apollo 11 astronaut), which I read in Swedish translation (as I was just 7 or 8 years old at the time). So when Neil Armstrong stepped up on stage at the 2007 Lotusphere Opening General Session, that was the coolest speaker ever. And he was not just another celebrity, he was interesting and funny. My favorite quote was this (as far as I rememeber): The scientists came up with an experiment to measure the distance from Earth to the moon, using a laser. But in order to do that, they needed a mirror placed on the lunar surface. I was the service technician tasked to put the mirror there.  Best speaker ever, and with Lotusphere being renamed to Connect, he will keep that title forever.  

0 Comments

Healthy (and tasty) bread rolls from my youth

When I went to school in Sweden in the early 1980´s, it was (I believe it still is) mandatory to attend "hemkunskap" (translates into "home knowledge", probably somewhat close to home economics). These classes were taken during 7th to 9th grade, and included cooking/baking, how to do dishes, washing clothes by hand, creating a budget and furnishing an apartment with a set amount of money. A couple of years ago, my sister found a recipe I had written down on a piece of paper from when we baked bread rolls at school. I favored graph paper, not just for math but for all kinds of notes, as you can see in the scan below. One interesting item is the note in the upper right section, next to the amount of yeast to use. Translated it says "Note: put it [the yeast] in first, otherwise mom will be angry." Not long before I was supposed to bake bread using our break maker at home, and I forgot the yeast in the beginning, so I added it at the end of the baking process, with above mentioned result"..."   After I got the recipe, I tried to make the same rolls, and they actually turned out very tasty. As they are healthy, I wanted to share how to make them. I have made one change to the recipe above, I added a small amount of sugar for the yeast to consume, but I am sure it would also be very good using a little bit of honey. 1 cake of yeast (or 3 packets dry yeast, do not use RapidRise!) 8 dl (27 fl oz/3.4 cups) warm water (32?/90? for yeast cake, 37?/100? for dry yeast) 8 table spoons of oil 16 ml (just over 3 teaspoons) of salt (optional) barely 1 tablespoon of sugar or honey 12 dl (5 cups) graham flour 4 dl (1.6 cups) wheat flour Put the yeast in a big bowl. Add sugar and salt to the warm water, stir to dissolve. Add a little of the water to the years and stir to dissolve yeast in water. Add the rest of the water and the oil, stir well. Add the wheat flour and the graham flour. Add half of it, stir well, add half of the rest, stir more. Add the rest little by little. When the dough is getting fairly solid, dump on a baking table and start kneading, adding more flour as needed. When the dough is sticky but not wet, and well kneaded, shape it into a big ball, put it back in the bowl, sprinkle over some wheat flour and cover with a baking towel. Let it rise for 20-30 minutes. Don´t allow it to stand in a cool area or in draft/near an air conditioning vent. I prefer to put it outside, the Texas summer temperature of 95-100 degrees is perfect. Don´t let it get over 100 degrees, or the yeast will die. After the dough have been rising (should about…

0 Comments

Review: Samsung Galaxy S3

Last Thursday I got the Samsung Galaxy S3 I pre-ordered back in the beginning of June, and I have now been playing with it for a few days. There are of course other reviews (mainly of the international version) and overviews of the phone, so I will not list all the features and functions here. As I am in the US, I received the North American version. It differs from the international version in that it has a dual-core Snapdragon S4 processor and 2GB system memory, instead of the Samsung’s own processor Exynos 4 Quad and 1 GB memory. This is due to the latter processor not supporting the North American LTE networks. With this phone I am also moving from the Blackberry platform to Android. I have been looking forward to getting a nice big screen and a more powerful phone, but at the same time my biggest fear was the on-screen keyboard. The times when I have been using an iPhone or played with older Android phones in the store, I did not feel like I would be able to type as fast as with the Blackberry’s excellent physical keyboard. I am coming from the Blackberry Bold 9700, with OS 5. The phone is about 2 years old, and originally came with OS 4. After I upgraded, the phone became more and more sluggish, and I constantly ran out of memory, in certain applications as well as when browsing the web. The GPS started taking longer and longer to get a fix, it could take me 2-3 minutes (if it even got the position) if I was indoors. The screen on the blackberry is also tiny compared with today’s phones, even if it was a very good screen when it came out. So it was about time for me to get something more modern. I was very pleasantly surprised with the keyboard on the Samsung Galaxy S3. As soon as I started typing, the correct text came out. The predictive text works very well, as long as I use English. I know there are other keyboards (like Swiftkey 3 that Mitch Cohen blogged about last week) where I can set different languages, so that is not a big deal right now. The 4.8 inch Super AMOLED screen is just gorgeous, and features a resolution of 720x1280 pixels. The internal memory in my phone is 16GB (32GB and 64GB models are also available or coming soon). The memory can be expanded using microSD cards up to 64GB, and in some markets customers get a free 50GB DropBox account. My carrier, AT&T, opted out of this promotion. I already use DropBox, SugarSync, SkyDrive and Google Drive, so after downloading clients for those services, I can now easily transfer my pictures to my cloud storage of choice. Just like on the Blackberry, and most other smart phones, the Galaxy S3 has several screens where I can place widgets, icons for applications, and folders containing additional icons. This way it is easy…

0 Comments

Irony: FunnyJunk lawyer criticizing the same actions as his client engage in

 In a blog entry from 06/23/2010, Charles Carreon (the lawyer who is suing The Oatmeal), posts about the outcome of the case Viacom vs. Google. Youtube, owned by Google, allowed their users to upload copyrighted material, and they then benefited financially from this through the sale of ads on the site. Exactly the same activity that his client FunnyJunk engages in. As that blog entry in retrospect is somewhat embarrassing for Mr Carreon, he took that down. But since the internet never forgets, Google still got the page cached. Some interesting quotes: If Google can generate ad revenue by taking in every kind of content without distinction, and make money on the infringing attractions, then Google can “work the float,” and always have enough infringing content to keep its blood pressure up at the expense of copyright holders. The only way that content owners can act proactively is by implementing digital “fingerinting technology” through the “Claim Your Content” system that Google uses as its only screening mechanism. Fingerprinting your content is not, however, cheap. … Please don’t take me for a copyright hawk, but this seems like a ruling that benefits a company that has made a habit of turning other people’s work into their payday, and is being encouraged to keep on doing it. Here is an image of the page as well, as retrieved from Google this morning: Click image for larger/high resolution version. Source: Google cache Disclaimer: The blog entry is reproduced under “fair use”.     

0 Comments

How to make enemies (and a fool of yourself) on the internet

This last week we have seen two high profile examples of how you can screw up and make a total idiot of yourself on the internet. With social networks like twitter and Facebook, news spread quickly, and if it is perceived that there is something unfair going on, expect furious people to share it. When you or I, with perhaps a couple of hundred Facebook friends and twitter followers, post about it, it will still spread, but slowly. But when people like Jamie Oliver (2.5 million followers) or Neil Gaiman (1.7 million followers) tweet about it, things start spreading like wild fire.   The first example is The Case of The Thief Suing His Victim. Most of you are probably familiar with the online cartoon The Oatmeal. Matthew Inman, the guy behind all the funny cartoons, complained a year ago that a website called FunnyJunk was full of his drawings. FunnyJunk allow their users to post material (from a quick glance it looks like a large part of the contents is copyrighted material), and then when complaints are sent to them just blame the users, while cashing the checks for all the advertising on the site. Matthew blogged about FunnyJunk doing this about a year ago, and described their business model: Here's how FunnyJunk.com's business operates: 1.Gather funny pictures from around the internet 2.Host them on FunnyJunk.com 3.Slather them in advertising 4.If someone claims copyright infringement, throw your hands up in the air and exclaim "It was our users who uploaded your photos! We had nothing to do with it! We're innocent!" 5.Cash six figure advertising checks from other artist's stolen material  Last week, Matthew was served with papers, demanding him to pay FunnyJunk $20,000 or be sued. FunnyJunk had hired Charles Carreon as their lawyer, who wrote that letter. Matthew responded publicly here: http://theoatmeal.com/blog/funnyjunk_letter I highly suggest reading the whole thing. It is extremely amusing. So Matthew sets up a fundraiser. Not to raise money to pay off FunnyJunk, but to split even between the National Wildlife Federation and the American Cancer Society. He raised the $20,000. In 64 minutes! The amount collected by "Operation BearLove Good. Cancer Bad." is currently at $169,000. However, the lawyer, Charles Carreon, is trying to shut down the fund raiser, according to MSNBC. He is also complaining that he was not expecting an outpour of hate and people being upset at him, or having his mom accused trying to seduce a Kodiak bear (the drawing is supposed to be of the mom of the FunnyJunk admin/owner, not the lawyer, by the way). Very strange that someone who market himself as a cyber attorney is so clueless to how the internet works. He should lookup the Streisand effect, as well. Even other lawyers chime in. The law-blog PopeHat.com uses some strong words: So, The Oatmeal tried to turn this into something good ?something that would benefit wildlife protection and cancer research ?and Charles Carreon had a snit and tried to shut it down because…

0 Comments

Regular Expressions in Notes (Lotusscript)

Today I needed to use regular expressions (a.k.a. regexp) in a Lotus Notes application. I just wanted to check if the user entered a claim number (in the format "nnXXXXXnnnnn", e.g. 12RICTX12345) in a field. A quick online search found a blog entry with some code using the VBScript object available in Windows, and I adapted it for my application. Just in case someone need this, I am posting the code below. I am not taking credit for the code, I found it on Giles Hinton´s blog and just adapted it a little bit. I also found information about using LS2J and Java to handle regular expression in Notes, which should be platform independent, not restricted to just Windows. Since all our users are on Windows (either directly or through Citrix), I could use the quick method below. But I would probably use the script library posted on OpenNTF for more serious code.   Dim ws As New NotesUIWorkspace Dim uidoc As NotesUIDocument Dim regex As Variant Dim pattern As String Dim result As String Dim match As Boolean '*** Define pattern and get text value to check for match pattern = |b([0-9]{2}[a-zA-Z]{5}[0-9]{5})b| Set uidoc = ws.CurrentDocument subject = uidoc.FieldGetText("ShortDescription") '*** Create RegExp object Set regex = CreateObject("VBScript.Regexp") regex.Global = True regex.IgnoreCase = True regex.Pattern = pattern '*** Test for match of pattern in text match = regex.Test(subject) If match = True Then Msgbox "Claim number was found in the field." End If

0 Comments

Review: LEGO Lord of The Rings

This weekend I spent with my son building some of the new LEGO kits from the new Lord of The Rings series. Here is a quick review of the kits we have built this far. You can click on the images for high-res versions of them.   9469 Gandalf Arrives – 83 pieces A small but nice set. Contains Gandalf in his cart loaded with fireworks, as well as Frodo welcoming him. Plenty of nice details, like the fireworks, a carrot for the pony and an envelope for Frodo to put the ring in.   9472 Attack on Weathertop – 430 pieces This is a very nice set. It contains five minifigs: Aragorn, Frodo (with the ring), Merry and two Nazgûl (ringwraiths), as well as two horses. The three first minifigs have a feature I have not seen before, they have two sets of faces. By turning the head and exposing the part hidden by the hair, you get two different facial expression, like stern and aggressive or scared. The Frodo minifig in 9460 got the same feature, but not Gandalf as the back of his head is visible. All the minifigs are extremely detailed, it is obvious that the designers of the kits realized that collectors and adults will buy these kits.   The kit itself is of the ruins on top of Weathertop (Amon Sûl), and it features a trap door and a cooking fire. The ruins can be opened and in the inside you find weapons, toches and much more. Even a rat! There is also a stand-alone pieved of ruin with a bush and some plants. The plants are the only thing I did not like with the kit. For some reason, perhaps the kind of softer plastic used, they don’t stick well to the bricks they are placed on. But that is a minor detail, otherwise this is a great kit.   9473 The Mines of Moria – 776 pieces This is a big set, the second largest in the series, and it depicts the events in the Chamber of Mazarbul. It contains six minifigs (Gimli, Legolas, Boromir, Pippin and two Moria orcs), as well as the cave troll. There are four separate sections, a large wall section, the doors to the chamber, the well with the skeleton and the chain and bucket, as well as Balins tomb, containing the skeleton of Balin. By pulling a lever, the skeleton, bucket and chain will fall down in the well, just like in the book and movie. There are plenty of details, from old weapons to gems and even the Book of Mazarbul.   9476 The Orc Forge – 363 pieces This is currently my son’s favorite kit. It features a light brick, so when a rod is pushed, it looks like fire under the melting pot. In addition, there are four minifigs: Lurtz, two Mordor orcs and one Uruk-hai. To be really picky, Lurtz was created by Sauron, just like the Uruk-hai, so there should not…

0 Comments

35 years ago in a galaxy far, far away…

May 25, 1977. Imagine it has been 35 years"..." When the first movie (then called just "Star Wars", later renamed "Episode IV ?A New Hope") was released in Sweden, the age restriction was set to 11 years. With a parent you were allowed to see it even if you were younger. I was 8 years old, but my parents did not want to go see it. It was not until "Episode VI ?The Return of The Jedi" was released in 1983 that I actually got to see the two first movies. They were shown back-to-back with a short break in-between, and a few days later the last movie premiered. I had of course read the book that was released around the time the original Star Wars came out, so I was familiar with the story even before watching the movie. As a young boy, I really enjoyed the movies, and I still do. I recently watched "Episode I ?The Phantom Menace" in 3D. I am however slightly irritated at George Lucas and how he keep changing the movies"..."   From Wikipedia: Star Wars debuted on Wednesday, May 25, 1977, in 32 theaters, and eight more on Thursday and Friday. It immediately broke box-office records, effectively becoming one of the first blockbuster films, and Fox accelerated plans to broaden its release.   Star Wars remains one of the most financially successful films of all time. The film earned $1,554,475 through its opening weekend, eventually earning over $220 million during its initial theatrical run. Star Wars entered international release towards the end of the year, earning $410 million in total. Reissues in 1978, 1979, 1981 and 1982 brought its cumulative gross in Canada and the U.S. to $323 million, and extended its global earnings to $530 million.   Following the release of the Special Edition in 1997, Star Wars briefly reclaimed the North American record before losing it again the following year to Titanic. In total, the film has earned $775,398,007 worldwide (including $460,998,007 in North America alone). Adjusted for inflation, it has earned $2.5 billion worldwide at 2011 prices, making it the most successful franchise film of all-time; at the North American box-office it ranks second behind Gone with the Wind on the inflation-adjusted list.  

0 Comments

Lord of The Rings LEGO

Today I got the final delivery of the new Lord of The Rings LEGO I purchased the other day. The kits I got were: The Mines of Moria Gandalf Arrives The Orc Forge Attack on Weathertop Uruk-hai Army Shelob Attacks The one I am still missing is The Battle of Helm's Deep, but I plan to get it shortly. I have a very excited 11 year old son who can't wait to come over this weekend and build with me. :-)  

0 Comments

Lotusscript Code – HTML retrieval class

I saw a question in the DeveloperWorks forum about retrieving a web page (in this particular case in order to get some data out of it), and realized that I never posted my HTML retrieval class... So without further ado, here it is. It should be fairly self-documenting... Create a new object, then call the GetHTTP method with a URL to get a string representing the HTML code of that URL.  This is Windows only, by the way. Class RemoteHTML Private httpObject As Variant Public httpStatus As Integer Public Sub New() Set httpObject = CreateObject("MSXML2.ServerXMLHTTP") End Sub Public Function GetHTTP(httpURL As String) As String Dim retries As Integer retries = 0 Do If retries>1 Then Sleep 1 ' After the two first calls, introduce a 1 second delay betwen each call End If retries = retries + 1 Call httpObject.open("GET", httpURL, False) Call httpObject.send() httpStatus = httpObject.Status If retries >= 10 Then httpStatus = 0 ' Timeout End If Loop Until httpStatus = 200 Or httpStatus > 500 Or httpStatus = 404 Or httpStatus = 0 If httpStatus = 200 Then GetHTTP = Left$(httpObject.responseText,16000) Else GetHTTP = "" End If End Function End Class

0 Comments

End of content

No more pages to load