Thursday, 25 October 2012

Getting resources in database as stream in XPages (SSJS / Java)

Some time back I was trying to get the resources in database (to be precise image resource) in my SSJS / Java code. I tried a lot of options like ClassLoader.getResourceAsStream, MyClass.class.getResourceAsStream but no success. Then today while going through the sample database of Extension Library I ran into a piece of code which got the image resource as stream using a single line of code.


As simple as that. In case of Java you would write like this:


In my tests this worked for getting image resources, file resource and style sheets as streams.

Tuesday, 23 October 2012

iPad Mini arrives to battle other 7-inch tablets for dominance

iPad Mini with 7.9-inch display


Now that the iPad Mini has finally been unveiled, the real question is how it will fare among all the other small tablets on the market.

Apple has given us a mini version of previous iPads, with an A5 dual-core chip, a 7.9-inch display, and a starting price of $329 for the 16 GB version. For the 32 GB and 64 GB models, you’ll need $429 and $529 for the latter.

It also has a 10-hour battery life, LTE network capability, updated Wi-Fi performance, and as expected, the new Lightning connector that made a debut on the iPhone 5 and the new iPods announced on Sept. 12. It’s also around 24 percent less in depth than the most recent iPad.

All of these features will certainly attract some attention, especially Apple fans, but the mini Apple wonder does have a few shortcomings. The resolution, which is 1024 x 768, doesn’t stack up with competing tablets and the A5 dual-core processor is from older hardware, being last used in the iPad 2 and the iPhone 4S

Another area of concern is as the holiday shopping season draws near, the price of tablets might be a factor and the iPad Mini might have to struggle to gain buyers with its $329 starting price.

Kindle Fire HD, Google Nexus 7, Nook HD


The iPad Mini will certainly have plenty of competition on the shelves among the seven to eight-inch devices. It requires little time and thought for the Kindle family of e-readers to pop in your head, for all the good reasons. They are considered cheap at a starting price of $179 for the Kindle Paperwhite, or even cheaper if you look at one of the entry-level Kindles for only $69 or one of the other older models still being sold.

For more bells and whistles in the Kindle family, there is the Kindle Fire at $159 and the Kindle Fire HD for $199. But when has been called “one of the best values in the e-reader market” belongs to the $179 Kindle Paperwhite WiFi + 3G, which has free 3G wireless for downloading books anytime and anywhere.

Then the Android family of devices are next with the Google Nexus 7 leading the pack starting at $199, rumors of getting even cheaper soon. The other choice is the Barnes & Noble Nook HD for $199 and some change.

Another new entry in the tablet market is the Insignia Flex that can be found in Best Buy stores around Nov. 1 with a starting price of $239.

I think we can see a trend that tablet prices should not be too far north of $200 to stay competitive and entice consumer to reach for some cash in retail stores or punch the checkout button online. The iPad Mini is way north of that price.

But we’re talking Apple here, with a sense of upscale and quality among all the iDevices. Just maybe the iPad Mini can continue this mystique and bring cause for us to shell out a few more bucks for the latest creation from folks in Cupertino, Calif.

During the special event where the iPad Mini was announced, the education and business markets were highly pitched, so maybe a part of Apple’s strategy for this new device is for schools and enterprise users.

I’m going to put on my consumer hat and say I’ll consider the new iPad Mini. My current iPad now has a Bluetooth keyboard case, which turns it into an almost-a-laptop for tweeting, updating social networks and even creating an article for this blog while on the go. But it’s kind of clunky to hold and awkward to just read articles.

So I need a smaller e-reader for books, newspapers and magazines, along with my favorite apps for consuming content. This task is now handled by my Nook Color, which does a good job as a content reader. But it’s kind of a standalone device, since I don’t have an Android smartphone to have a synced-up relationship with the Android family of devices and their cloud applications.

With the iPad Mini, I could tap into iCloud and have all iDevices in sync with each other. These would include an iMac, MacBook, iPhones, iPod Touch and of course, the new iPad Mini.

My other requirement is that it’ll slip into the inside pocket of my jacket, which the Nook Color, with its 5-inch width, does just that. But the iPad Mini’s 5.3-inch width might be a tight fit or no fit at all. I’ll see about that.

So I could see an iPad Mini in my future as an e-reader, but the price is going to require me sleeping on the idea more than once.

Visit us on Facebook | Follow on Twitter | Send an email | View Photo Galleries

Click to become a LifeFlicksTech member

Friday, 19 October 2012

Using dijit.form.CheckBox in check box group in XPages

dijit.form.CheckBox adds a fancy styling to the plain check box, which I love. Adding it to a single check box is pretty straight forward. Just set the dojoType property of the check box to dijit.form.CheckBox. But in case of check box group its not that straight forward.

When a check box group is rendered in browser it is rendered inside <fieldset> tag. So setting the dojoType property doesn't give the desired result. You need to set the dojoType property individually on each of the check boxes in the group. Fortunately, all the check boxes share the same name so they can be targeted using simple dojo.query.

Let's say the name of your check box group is "checkBoxGroup", then just add this script block to your XPage:


Make sure you place this script block after your check box group. Needless to say that you need to add dijit.form.CheckBox in your XPages resources as Dojo module.

You can also extend this technique to set dijit.form.RadioButton in radio button group.

Wednesday, 17 October 2012

Windows 8 is coming; upgrading or a new device will need a plan

Windows 8 start screen


Windows 8 will be available for sale on Oct. 26 and can be pre-ordered now. So it’s time to start thinking about your game plan for upgrading your existing computers or pondering what kind of device you’ll want in a new purchase.

But there is some confusion about which version of Windows 8 will work for you and the price you’ll pay, along with a long list of choices for new Windows 8 hardware coming down the pikes.

Windows 8 will be available in several versions — one for tablet devices running ARM processors, which will be called Windows RT, and another for desktop PCs that’ll be known as Windows 8 Pro. A consumer version is also in the works and will just be called Windows 8.

As for the price, it’ll depend on whether you per-order the Windows 8 Pro DVD package now and pay $69.99, or wait until the release date on Oct. 26 and pay $39.99 using the Windows 8 upgrade Assistant online.

If you have purchased a new PC after June 2, the upgrade price from say Windows 7 will be around $15, which is not a bad deal.

The other issue with upgrading your existing Windows operating system to Windows 8 will be the licensing or product key dilemma.

According to Microsoft, If your PC is running Windows 7 Home Basic or Home Premium, your files, programs and settings will easily transfer to Windows 8. But if your PC is running Windows 7 Professional or Ultimate, Windows XP or Windows Vista, you will probably need to re-install some programs.

So in a nutshell, you should be able to install Windows 8 on the same PC hardware that powers Windows Vista and Windows 7. Just make sure you have at least a 1 gigahertz or faster processor, 2 gigabytes of RAM, 20 gigabytes of hard drive space and a video card with DirectX 9 graphics and a WDDM driver.

If you have installed Windows 8 Consumer Preview, you should be fine with an upgrade as long as the Consumer Preview was installed over a previous Windows OS.

But if it was installed on a new hard drive with no previous OS, such as if you built a PC, then you can expect a challenge and will need to purchase a new version of Windows 8 for a license and product key.

As you think about whether to upgrade you existing PC or buy something new, keep in the mind that Windows 8 is optimized for touch screens and you might not get the full experience on a desktop PC.

Anyone using a tablet with Windows 8 RT installed will be able to swipe and swoosh away in the new interface. For a desktop or laptop, you’ll have to get use to taking your hand form the keyboard to reach over and touch the screen for a little magic.

As for other choices running Windows 8, there will be somewhat traditional laptops that convert into tablets and tablets with detachable keyboard. They will have screens that’ll slide and flip or completely detach in order to transform from one device to the next.

In addition to the usual notebook PC manufacturers, such as Acer, Asus, Dell, Lenovo, HP, Samsung, Sony and others, Microsoft also will have a dog in the fight with their Surface tablet. This will put Microsoft in direct competition with the Apple iPad's iOS and many of the other manufacturers that also will have Windows 8 on their devices.

So whether your upgrading or buying for the Windows 8 experience, it’s time to start thinking about your plans.

Visit us on Facebook | Follow on Twitter | Send an email | View Photo Galleries

Click to become a LifeFlicksTech member

Monday, 15 October 2012

Japan's SoftBank in talks to acquire 70% stake in Sprint Nextel

SoftBank Corp.,Masayoshi Son
SoftBank Corp. was founded Sept. 3, 1981, with headquarters in the Higashi-shimbashi area of Minato-ku, Tokyo. Masayoshi Son is chairman and CEO.

A deal is in the works for SoftBank Corp,. a Japanese telecommunications conglomerate, to acquire a 70 percent in Sprint Nextel, the number three mobile company in the United States, behind AT&T and Verizon.

Sprint Nextel
This could be the ship coming in for Sprint, as SoftBank will put $12.1 billion on the table to close the deal and then offer another $8 billion investment for network improvements. SoftBank is touting their expertise in the "next-generation wireless networks" and their experience with deployment of LTE in Japan.

SoftBank Corp.
“This transaction provides an excellent opportunity for SoftBank to leverage its expertise in smartphones and next-generation high speed networks, including LTE, to drive the mobile internet revolution in one of the world’s largest markets," said SoftBank Chairman and CEO, Masayoshi Son. "Our track record of innovation, combined with Sprint’s strong brand and local leadership, provides a constructive beginning toward creating a more competitive American wireless market.”

Sprint could use the help with deployment of 4G LTE. They list 24 markets on their website, which is less than competitors like AT&T, who lay claim to the largest 4G network, covering 275 million people and Verizon's 400-plus LTE markets. But Sprint does have plans to roll out 4G services in 20 additional cities in the coming months.

"Our management team is excited to work with SoftBank to learn from their successful deployment of LTE in Japan as we build out our advanced LTE network, improve the customer experience and continue the turnaround of our operations,” said Sprint CEO, Dan Hesse.

SoftBank will form a new U.S. subsidiary, New Sprint, and if the deal passes regulatory approval in the coming months, SoftBank has plans to sweeten the pot with an additional $17 billion investment.

According to Sprint, their headquarters will continue to be in Overland Park, Kansas and Hesse will continue as CEO of New Sprint and as a board member.

More on Softbank: Video profile.

Visit us on Facebook | Follow on Twitter | Send an email | View Photo Galleries

Click to become a LifeFlicksTech member

Tuesday, 9 October 2012

BlackBerry 10 developers hard at work on apps for new platform



As we wait on the BlackBerry 10 platform to arrive sometime early in 2013, Research In Motion says the developers are hard at work creating apps for the new upcoming devices.

Developers have been issued 5,000 BlackBerry Dev Alpha test devices to put their apps through the paces on various BlackBerry 10 projects. We can expect apps from Cisco, Foursquare, Sencha, Gameloft, HalfBrick Studios, Madfinger Games, Funkol and others when the magic time comes.

The developers are hoping to create BlackBerry 10 apps that will entice customers to take a closer look at the new platform.

“The Weather Network is excited to develop for BlackBerry 10," said Gita Ashar, Director of Mobile and Emerging Technologies for Weather Network. "The innovations in the operating system will provide our existing loyal consumers and new consumers an application that is as stunning as it is informative, helping users to plan for anything.”

The developers will work with BlackBerry WebWorks and will use HTML5 and CSS in building apps for the new BB 10 platform.

I know of several die-hard BlackBerry fans that are among the 80 million users that RIM announced in its latest quarterly report. They are patiently awaiting the new devices that are expected in the first quarter of 2013. One in particular is fearful of losing his BlackBerry contacts if he switches to an Android device or the iPhone.

The delay of the BlackBerry 10 devices could turn into a big headache for RIM. The competitors are full steam ahead with innovative hardware that would leave less opportunity for any excitement in the BlackBerry arena.

The Samsung Galaxy S III had been around since May and doing very well in the marketplace. Now we have the iPhone 5, which is setting sales records, despite mapping software woes and other issues being reported by customers.

Next up will be Microsoft and their partners as they roll out new Windows Phone 8 devices later this month. The Nokia 920 and 820, the HTC 8X and 8S and the upcoming Samsung ATIV S are all on deck with Microsoft's unique tiles-based interface. It'll be interesting to see if the Windows 8 devices gain acceptance with consumers.

From the Android camp, the LG Optimus G is likely to draw some excitement, as the specs are pretty impressive with a 13 megapixel camera on the Sprint Nextel version.

All of these devices are likely to attract some BlackBerry fans that are tired of waiting on something new, although some will tough it out. I have one friend who is thinking about leaving her beloved BlackBerry for the Galaxy S III.

The other nightmare for BlackBerry could be the rumored Samsung Galaxy S 4, which could also arrive in the first quarter of 2013. I would think the folks inside the walls of RIM would certainly want to be ahead of this threat with their new BlackBerry 10 platform, along with some outstanding apps.

Let's hope that when the new BlackBerry 10 platform finally arrives, it will be worth the wait.

Visit us on Facebook | Follow on Twitter | Send an email | View Photo Galleries

Click to become a LifeFlicksTech member

Monday, 8 October 2012

Farseer Physics for Windows Store Apps using Monogame

  Last week I did a session on porting XNA Windows Phone 7.x games to Windows Store apps using MonoGame. I have to thank Dean Ellis from the MonoGame project team for all the help. 
 While XNA is not a framework directly supported by Microsoft for Windows Store apps the current version of MonoGame is compatible with Windows 8 and, the most important thing, the applications pass the WACK. There are already several games available in the Windows Store developed using MonoGame (Armed, Skiddy, Rune Legend and I guess there are more). 
   For the session I ended up using the Simple Animation sample but seeing how easy is to share the code between the platforms (Windows, Windows Phone,PC, MAC, iOS, Android, Playstation, Linux) I started looking for a physics engine. The most used Open Source physics engine seems to be Farseer Physics but it was too late to do the porting for my session. On Sunday I tried the porting and everything went pretty smooth. The only thing I've changed was the serialization/de-serialization of the "World" state. I compiled the engine and also the sample. For the Sample project the Content Project was compiled using Visual Studio 2010 (for the moment Visual Studio 2012 doesn't recognize this type of project) and added the xnb's to a Content folder inside the Visual Studio 2012 solution. 
 You can see the result in this YouTube video:


I've used SnagIt to capture the movie and it influenced the frame rate (when running without capturing the framerate is always at 60 fps). The test device was the Samsung Slate which has a powerful cpu. I would love to know if a WinRT device will be able to run at the . If any of my readers has access to a WinRT device please deploy the sample to the device and let me know if the framerate is as expected. For the sample you will have to use an external keyboard and mouse as the touch screen is not working in this version. I will try to fix it for the next release (the problem seems to be inside the MonoGame framework as I only receive the move event and not the pressed and released from the touch screen).
   
Use this link to download the full project (engine and sample): 

NAMASTE





Friday, 5 October 2012

Error of "Invalid field name" while saving form

While working on a legacy Lotus Notes client based application, I did some modifications on a form but while trying to save it I was getting error message "Invalid field name" and the form simply refused to be saved. I checked all the field names trying to find out any invalid character amongst them, but no luck.

So I went to my faithful old friend — Google. And it took me to this discussion on Notes/Domino 8.5 Forum where a user was having the same issue. He resolved it by removing and adding existing sections. Why it happened, he didn't know.

Continue reading »

Thursday, 4 October 2012

Facebook gets a 'Like' from one billion users; offers 'thanks' to us all

Facebook reaches one billion users
Facebook's announcement of reaching one billion users each month was the biggest "like" of their existence.

This was big enough for CEO Mark Zuckerberg to sign his name at the top of the news release. He wanted to give a big "thank you for giving me and my little team the honor of serving you."

I say "well done" to Zuckerberg for having the vision and innovation to make Facebook what it is today. But the toughest part is probably still yet to come, as Facebook is now a public company and expectations are even higher when you're dealing with financial performance.

This kind of growth is not bad for a company that has only been around since 2004. One of their competitors, Linkedin, officially launched a year earlier in May 2003 and they've only managed to attract around 175 million users.

Another competitor in the social media space, MySpace, also launched in 2003 and I hear they're trying to make a comeback after being acquired by Specific Media in June 2011. Twitter — another social media outfit that I like a lot — unveiled their sign in 2006 in the city with the Golden Gate Bridge. Around six years later, I've seen published numbers of 90 to 175 million registered users who say what they want to say in 140 characters or less. If you're looking at total Twitter accounts, the number is estimated to be even higher at around 500 million.

The youngest of the social media bunch — Google+ — is probably the closest challenger to Facebook with around 250 million users since 2011. According to Facebook, they hit 100 million users in August 2008, which is four years after they started up. If you grab a calculator and start pecking around, Google+'s growth rate is on the fast track, but not likely to catch up with Facebook no time soon.

This kind of success makes you wonder what is it about Facebook that causes us to sign on the first thing in the morning, check out mobile devices throughout the day and switch to a new window on the desktop computer when the boss is not looking. Then we run straight home after work home and get on the home computer to check Facebook again and again until after midnight. One billion people just can't get enough of Facebook.

Facebook released a few demographics along with the bragging rights to "one billion users" that give a little insight into what a typical Facebook users might look like.

The typical age was around 26 in the early years and has progressively gotten younger along the way. All of you Facebook buffs have given out 1.13 trillion "likes' since Facebook added the feature in February 2009. The "like button" was acquired from Facebook's acquisition of social networking site FriendFeed during that same year.

When the ability to upload a photo into Facebook was added in the fall of 2006, we all thought that was just grand and have since uploaded around 265 million photos of people, places and things from Brazil, India, Indonesia, Mexico, the United States and other countries.

So Facebook is certainly on its way to being a fairy tale of a company, if it can figure out the Wall Street part and make enough money to gather 'likes" from investors. Since the initial public offering, or IPO, on May 18 when the stock closed at $38.23, it hasn't seen that kind of a price since and remains down about 40 percent for the year.

But despite the stock woes, having one billion users is quite impressive and Facebook's Zuckerberg says it is simply "the things that connect us."

Although I've been hanging out on Google+ more with all the tech fanatics that seem to gather there, I guess I'll go check my Facebook page now.

Visit us on Facebook | Follow on Twitter | Send an email | View Photo Galleries