Friday, June 12, 2009

Adding new black berry simulator in JDE

 If we install blackberry simulator after installing jde, sometimes it does not get the simulator. So we need to add manully. The steps are: 

       1. Go to jde intalled directory and go inside simulator folder like (C:\Program Files\Research In Motion\BlackBerry JDE 4.5.0\simulator)
       2. Now we need to add the batch file inside this folder.
       3. Copy the simulator batch file from the simulator installed location like ( "C:\Program Files\Research In Motion\BlackBerry Smartphone Simulators 4.7.0\4.7.0.75 (9530-Verizon)\9530-Verizon.bat") and paste it to the simulator folder.
       4. Now we need to edit the batch file that have pasted in simulator folder:

        For example if we want to add 9530-Verizon.bat simulator we will find following text if we open the .bat file in edit mode.

       @echo off 
fledge.exe /title="Blackberry 9530 Simulator -Verizon" /app=Jvm.dll /handheld=9530 /session=9530 /app-param=DisableRegistration /app-param=JvmAlxConfigFile:9530-Verizon.xml /data-port=0x4d44 /data-port=0x4d4e /pin=0x2100000A 


we need to edit the path of fledge.exe, Jvm.dll and 9530-Verizon.xml file like following:

@echo off 
"C:\Program Files\Research In Motion\BlackBerry Smartphone Simulators 4.7.0\4.7.0.75 (9530-Verizon)\fledge.exe" /app="C:\Program Files\Research In Motion\BlackBerry Smartphone Simulators 4.7.0\4.7.0.75 (9530-Verizon)\Jvm.dll" /title="Blackberry 9530 Simulator -Verizon" /handheld=9530 /session=9530 /app-param=DisableRegistration /app-param=JvmAlxConfigFile:9530-Verizon.xml /data-port=0x4d44 /data-port=0x4d4e /pin=0x2100000A 


Here we need to put the actual path of these above mentioned file where the simulator is actually installed.

                       5. Now double click the the batch file. If it runs the simulator then its ok. 

      Now you can easily got it added in your jde.



       
      
 

Sunday, January 11, 2009

Beginning Lamda Expression in C#


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Lamda_expresion_test
{
class Program
{
public delegate int ChangeInt(int x);
public delegate int SummingInt(int x, int y);

static void Main(string[] args)
{
int[] numbers = new[] { 3, 8, 4, 6, 1, 7, 9, 2, 4, 8 };
int[] negetiveNumbers = new[] { -1,-2,-3,-4,-5,-6};

int count = numbers.Count(x => x % 2 == 0);//x % 2==1 for odd

Console.WriteLine("Total even numbers: {0}\n",count);


Console.Write("Numbers greater than 6: ");
foreach (int a in numbers.Where(p => p > 6))
Console.Write(" {0}",a);


Console.WriteLine();

//// using delegate...reducing code

ChangeInt doubleInt = delegate(int x) { return x * 2; };
Console.WriteLine(doubleInt(12));

//using Lamda Expression code more reduced
ChangeInt delgate = x => x * 2;
Console.WriteLine(delgate(12));

//Lamda expression on two parameters....
SummingInt summing = (x, y) => x + y;
Console.WriteLine(summing(12,100));

// More complex operations......
Console.WriteLine("Numbers between 3 and 8: ");
foreach (int i in numbers.Where(x => x>=3 && x<=8))
 Console.Write(" {0}",i); 

Console.WriteLine(); 
//same as previous expression...... 
// we can make some codition like following.... 

foreach (int i in numbers.Where( 
x =>
{
if (x >= 3 && x <= 8) 
return true; 
else return false; 
} )) 
Console.Write(" {0}", i);
 Console.WriteLine(); 
}
 
}
}

Sunday, December 14, 2008

Graphical problem in IE 8 Beta version

There is some graphical problem i have faced in Internet Explorer 8 Beta version. I do not why this problem is occuring. Bu i have noticed that when i scroll or making some quick page up/down this problem occurs. I am giving a snapshot of its version and the problem:



Version:





Problem:


Saturday, November 29, 2008

No xaml designer in vs2008 Team System

I have faced the problem after installing vs2008 team system, there was no xaml design view & no graphical toolbox. I have repaired & reinstalled but problem was still occurring.....

Finally i got the solution from a forum. I m gonna make it clear

1. Close vs2008 team system if it is open.
2. Go to: start menu>all programs>Microsoft Visual Studio 2008> Visual Studio Tools> Visual Studio 2008 Command Prompt.
3. Write on the command prompt: devenv/resetskippkgs
4. Then open a wpf solution & right click a .xaml file and select open with, u will appear a dialog. U should set windows presentation foundation designer as default designer.

Now everything is right.

Monday, November 24, 2008

Sending Mail using your gmail account

c# source code u can use it and can develop ur own mail sender

System.Net.Mail.MailMessage mail = new System.Net.Mail.MailMessage();

System.Net.NetworkCredential cred = new System.Net.NetworkCredential("yourid@gmail.com", "yourpwd");

mail.To.Add("acme@acme.com");
mail.Subject = "subject";

mail.From = new System.Net.Mail.MailAddress("yourid@gmail.com");
mail.IsBodyHtml = true;
mail.Body = "message";

System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient("smtp.gmail.com");
smtp.UseDefaultCredentials = false;
smtp.EnableSsl = true;
smtp.Credentials = cred;
smtp.Port = 587;
smtp.Send(mail);

PC Magazine Tips and Solutions

PC World: Latest Technology News

PCWorld.com - Most Popular Downloads of the Week