Angular.js Module has no exported member error

If you are working with beta version of angular js you might experience Module has no exported member error.

That usually happens when you try to import a module using below syntax

import { NgModule }      from ‘@angular/core’;

The actual reason this error is flashing is due to Typescript is not able to find right dependency to import it. However behind the scene there might issue like

  1. Corresponding code have some error and was not compiled well
  2. Or the dependency you are trying to import is actually missing

If #1 is the case then to over come the situation you might need to fix the error (generally that is due to syntax error) so that code complies and dependency become available

If #2 is the case then you might want to update the dependencies. It can be npm module or any other custom dependency

In my case i updated @angular/core to “@angular/core”:  “2.0.0-rc.5” in package.json because NgModule become available “2.0.0-rc.5” onwards

Once that was done i run
npm update
so that required dependencies can be updated.

General note to avoid confusion – If you are using tools like Visual studio then you might notice that your dependency is still underlines in red. You can simply close the editor or the file to get rid of that confusion 🙂

!!Happy coding!!
Tarun Juneja

Advertisements

Using Selenium IDE For testing jQuery Animation

This post can help you sorting out following problems

  1. Test jQuery Animation using Selenium
  2. Test Style Information Using Selenium
  3. Test an element attribute Information Using Selenium

Willing to test jQuery animation using selenium IDE. Here is how you can do that.

Command – waitForElementPresent

css=#right[style=’left: 8%; right: 50%;’]

Value – Leave it blank

The above command will target an element with id=right and will look for its style information.

In my case left animates from 50% to 8% and right animates from 100% to 50%

Got another trick please post in comment i will merge in the article or got more question feel free to reach me!!

Cheers

Tarun Juneja

Expected CR Received 45

Are you getting above error while trying to post a file node express server.

The reason of above might be that you are having a file picket like this with out a name

<input type=”file” />

What you need to do to get it working is just a name attribute to it

<input type=”file” name=”filePicker”/>

If you would like to know how you can upload a file in Node js search my blog for same.

Nokia teases September 5 event, says ‘things are about to change’

Nokia is promising big things for a September 5 event in New York City.

Nokia is promising big things for a September 5 event in New York City.

Nokia is promising big things for a September 5 event in New York City.

The mobile company today posted a video showing a woman riding a bike down a street. About midway through that clip, a text overlay comes up that reads: “Things are about to change.” The video’s description on YouTube adds a bit more details, saying that the change is coming “5 September 2012. Stay tuned!”

Nokia announced earlier this month that it will host a New York press conference on September 5. The company said the event will be in partnership with Microsoft, leading many to believe that Windows Phone 8-bundled devices will take center stage.

Microsoft made some waves with Windows Phone 8, saying thatWindows Phone 7-based devices won’t be upgradeable to the new operating system. Instead, the devices will be upgraded to Windows Phone 7.8 — a version that adds some of the features found in Microsoft’s new operating system, but not all of them.

Source: cenet

How to Bind WPF combo box with xml file with image and text

This article demonstrates you how to bind WPF combo box with xml file data or with XmlDataProvider.

Use this post if you want to bind a wpf combo box with a xml file

Use this post if you want to bind and display some images in combo box

Use this post if you want to learn how you can customize the display of combo box

Create a Xml file, in my case it is static one but you can create one from the database programmatically.

<?xml version=”1.0″ encoding=”utf-8″ ?>

<companies>

<company name=”Microsoft” icon=”image1.png”/>

<company name=”Yahoo” icon=”image2.png”/>

<company name=”Atticmedia” icon=”image3.png”/>

</companies>

You can add more attributes as per your requirements.

Now goto you app.xaml and add below code in it

<Application.Resources>

<XmlDataProvider x:Key=”Companies” XPath=”/companies” Source=”/DataSource/CompanyData.xml”/>

</Application.Resources>

Declare a combo box on your page as shown below

<ComboBox x:Name=”SelectBox” ItemsSource=”{Binding Source={StaticResource Companies}, XPath=company, Mode=OneTime}” >

<ComboBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation=”Horizontal”>
<TextBlock Text=”{Binding XPath=@name}” Margin=”4,0″/>
 <Image Source=”{Binding XPath=@icon}” />
</StackPanel>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>

Nokia Lumia 900 – Born for the USA

Watch the first hands-on video and see full specs of Nokia’s big new Windows phone

Published by Ian Delaney on January 9, 2012

LAS VEGAS, NV, United States – Nokia announces its biggest yet thinnest Windows Phone to date with the Nokia Lumia 900, its first phone to support high-speed LTE data transfers.

As our exclusive video shows, this powerhouse was built exclusively for AT&T and promises a bigger, faster, stronger smartphone experience thanks to larger screen, faster processor and support for the fastest mobile data transfers available to date.

MG_3329

The Nokia Lumia 900 allows data downloads up to 50Mbps on AT&T’s 4G LTE network. What does that mean? It means that you’ll be able to view videos as fast as you can click on them, and never wait. It means your email arrives on time and you’re not sitting looking at an hourglass. It means the Web is totally fun to use on your mobile.

If you don’t have LTE, then the next step down is HSPA for a mere (cough!) 21Mbps download speed. How will you cope, USA?

Starting with the screen, the Nokia Lumia 900 puts an end to squinting at your smartphone display. It boasts a large, 4.3-inch AMOLED ClearBlack display to offer a big, crystal clear and super-colorful screen indoors and out. The resolution is 800 by 480 pixels.

Inside, there’s a 1.4GHz processor, running on an updated chipset, to support LTE. It’ll keep the phone running smooth and make sure everything happens now. For the tech aficionados, it’s a 1.4GHz Qualcomm Snapdragon APQ8055 + MDM9200.

But not everything is totally new. We’ve recreated the popular polycarbonate unibody design pioneered by the Nokia N9 and the Nokia Lumia 800 for this new, bigger model. It looks amazing, fits the hand superbly – and it’s really hard to do it any damage from our experience here on Conversations.

MG_3341

Tech Specs

Networks: GSM/EGSM 850/900/1800/1900, WCDMA 850/1900/2100, LTE Band 4 (1700/2100) & 17 (700)

OS: Windows Phone Release 7.5 – Mango Commercial Release 2 (Mango + LTE)

Memory: 512MB RAM

Storage: 16 GB internal memory (14.5GB user memory) + SkyDrive cloud storage

Volume: 90cc

Weight: 160g (5.6 ounces)

Dimensions: (max): 127.8 x 68.5 x 11.5 mm (5 x 2.7 x .45 inches)

A-GPS

Wi-Fi (802.11 b/g/n)

USB 2.0 high-speed

Bluetooth 2.1 + EDR

3mm headset connector

Another big plus is the battery. Often, you’d expect a bigger screen means that your battery won’t last too long. That’s far from the case here. The souped-up 1840mAH battery in the Nokia Lumia 900 will last for about 7hrs talk-time and up to 300hrs on standby.

To give another measurement of that battery, if you switch to flight mode and use it just as an MP3 music player, it’ll keep going for more than two-and-a-half days.

Fully integrated into the totally intuitive Windows Phone ease-of-use experience, the Nokia Lumia 900 offers Nokia Maps and Nokia Drive through the Windows Phone Marketplace. Nokia Drive offers free, turn-by-turn, voice-guided navigation everywhere.

Social networking is embedded to the core with all your Twitter, Facebook and LinkedIn contacts available from the start. The built-in Games and Music hubs ably handle music and entertainment – including Xbox and Zune integration.

This phone will also please users wanting to ditch their compact camera. On the back, there’s an 8-megapixel camera with a Carl Zeiss lens and a dual LED flash. This model has a larger, f2.2/28mm aperture, allowing more light into the camera for faster performance, lower chance of motion blur and better low-light shots.

It also supports hi-res video capture for 720p/30fps action footage. In addition, there’s a second, front-facing camera to give support for video calls (1-megapixel with an f2.4 lens and 30fps capture).

We’ll be giving you more in-depth detail on the new Nokia Lumia 900 during the course of the week and onwards. But what questions do you want us to answer about this great new smartphone?

Source:

http://conversations.nokia.com/2012/01/09/nokia-lumia-900-born-for-the-usa/

Display user tweets using java script and jQuery

Guys here is a very simple example of fetching user tweets

it uses user timeline to get the tweets.

There are lots of other properties which you can use I just used text and profile image url

look at the getTweet function and change its arguments as needed.

Here it goes

<html>
<head>
    <title>JSON Example</title>
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js"></script>
    <script type="text/javascript">
        function getTweet(username, howMany) {
            $.getJSON("http://twitter.com/status/user_timeline/" + username + ".json?count=" + howMany + "&callback=?",
        function (data) {
            var count = data.length;
            while (count– > 0) {
                $("#twitter").append("<div> <img src=’" + data[count].user.profile_image_url + "’/>" + data[count].text + "<div><br/>");
            }
        });
        }

        $(document).ready(function () {
            getTweet(‘tarunjuneja’, 50);
        });
    </script>
</head>
<body>
    <p id="twitter">
    </p>
</body>
</html>