Skip to content

Dr Mahbob Blog

articles about technology, computers, internet, Jewellery

Archive

Category: Programming

MicrosoftSQL_2008_Logo

Microsoft added Geometry and Geography Datatypes to the MSSQL2008

And Also :
varbinary replaces image
Note that Microsoft states the image data type is deprecated and will be dropped in a future release of SQL Server. varbinary(max) should suffice as a replacement.

source1[link]
source2[link]
source3[link]

BlackBerry

To develop program for blackberry using JDE with BlackBerry JDE Plug-in for Eclipse Watch BlackBerry® Java® Development Environment videos

    First : Download BlackBerry JDE Plug-in for Eclipse and Install it

I download Full Installer BlackBerry® Plug-in for Eclipse™

How to install and configure BlackBerry JDE Plug-in for Eclipse ? [Watch]

When you see the video and follow the example you need HelloWorld application here it is [Ref]:

/**
*
* HelloWorld.java
* The sentinal sample!
*
* Copyright © 1998-2008 Research In Motion Ltd.
*
* Note: For the sake of simplicity, this sample application may not leverage
* resource bundles and resource strings. However, it is STRONGLY recommended
* that application developers make use of the localization features available
* within the BlackBerry development platform to ensure a seamless application
* experience across a variety of languages and geographies. For more information
* on localizing your application, please refer to the BlackBerry Java Development
* Environment Development Guide associated with this release.
*/

import net.rim.device.api.ui.UiApplication;
import net.rim.device.api.ui.container.MainScreen;
import net.rim.device.api.ui.Field;
import net.rim.device.api.ui.component.Dialog;
import net.rim.device.api.ui.component.LabelField;
import net.rim.device.api.ui.component.RichTextField;

/*
* BlackBerry applications that provide a user interface must extend
* UiApplication.
*/
class HelloWorldDemo extends UiApplication
{
/**
* Entry point for application.
*/
public static void main(String[] args)
{
// Create a new instance of the application.
HelloWorldDemo theApp = new HelloWorldDemo();

// To make the application enter the event thread and start processing messages,
// we invoke the enterEventDispatcher() method.
theApp.enterEventDispatcher();
}

/**
*

The default constructor. Creates all of the RIM UI components and pushes the
* application’s root screen onto the UI stack.
*/
private HelloWorldDemo()
{
// Push the main screen instance onto the UI stack for rendering.
pushScreen(new HelloWorldScreen());
}
}

/**
* Create a new screen that extends MainScreen, which provides default standard
* behavior for BlackBerry applications.
*/
/*package*/ final class HelloWorldScreen extends MainScreen
{

/**
* HelloWorldScreen constructor.
*/
HelloWorldScreen()
{
// Add a field to the title region of the screen. We use a simple LabelField
// here. The ELLIPSIS option truncates the label text with “…” if the text
// is too long for the space available.
LabelField title = new LabelField(“Hello World Demo” , LabelField.ELLIPSIS | LabelField.USE_ALL_WIDTH);
setTitle(title);

// Add a read only text field (RichTextField) to the screen. The RichTextField
// is focusable by default. In this case we provide a style to make the field
// non-focusable.
add(new RichTextField(“Hello World!” ,Field.NON_FOCUSABLE));

}

/**
* Display a dialog box to the user with “Goodbye!” when the application
* is closed.
*
* @see net.rim.device.api.ui.Screen#close()
*/
public void close()
{
// Display a farewell message before closing application.
Dialog.alert(“Goodbye!”);
System.exit(0);

super.close();
}
}

To make test more interesting you can add icon to you HelloWorld Application [Ref]

How To – Create an icon for an application
[icon dim]Article Number: DB-00126
How To – Define a rollover icon for an application Article Number: DB-00467

Specifying a rollover icon in BlackBerry JDE Plug-in for Eclipse

Note: While this option is always present in the BlackBerry® JDE Plug-in for Eclipse™ it will only take effect when the application is built using the BlackBerry JDE Component Package 4.7.0 or later.

Complete the following:

1. In the Eclipse™ Package Explorer, right-click the project.
2. Select Properties.
3. Select BlackBerry Project Properties.
4. Select the Resources tab.
5. Add the non-rollover/unfocused application icon in the Icon Files field and add the rollover/focused icon in the Focus Icon Files field.

    Second : Deploying and Signing Applications in the BlackBerry® JDE Plug-in for Eclipse

How to Deploy and sign BlackBerry JDE Plug-in for Eclipse ? [Watch]

How to Download BlackBerry® Smartphone application Over The Air by user ? [Watch]

MIME types are important without you can’t download the software properly :
.jad = text/vnd.sun.j2me.app-descriptor
.cod = application/vnd.rim.cod

How to Register RIM Controlled APIs ? [About]

What Is – Appropriate version of the BlackBerry JDE [Ref]

Description

When creating and building your application, it is important to choose the correct version of the BlackBerry JDE to make sure that the application is compatible with the target BlackBerry smartphones. Applications built in the BlackBerry JDE are forward-compatible with newer BlackBerry Device Software versions, but they are not backward-compatible with older versions.

For example, an application built in BlackBerry JDE 4.1 runs on a BlackBerry smartphones running BlackBerry® Device Software 4.1 and later. It does not run on a BlackBerry smartphones running BlackBerry Device Software 4.0. Thus, when building applications,

    you should use a BlackBerry JDE version that matches the lowest version of BlackBerry Device Software you want to support.

Note: To verify the version of BlackBerry Device Software installed on the BlackBerry smartphone, select Options > About.

BlackBerry

BlackBerry I want to do program for my mobile BlackBerry Bold so I watch the BlackBerry Plug-in for Microsoft Visual Studio Videos so it is very easy to develop program for BlackBerry using VisualStudio.Net 2008 :

    First : Download Visual Studio Plugin and Install it

Development Tools And Downloads

And then download: BlackBerry Plug-in for Microsoft Visual Studio 2008

Now they have version 1.1 which doesn’t support new devices like Bold , Curve and Storm

so they have Version 1.2 beta which support Bold

but also you need to install MDS runtime in order to deploy your application to device [link] because after compiling your project using VS.Net 2008 the output is .jar file which you need !

so I installed V 1.2 it can be found here [link]

    Second : You must Create Web Service

How Do I Create a Wireless-friendly Web Service? [Watch]

    Third: Add Web Service to your application

How Do I Add a Web Reference to My BlackBerry® Project? [Watch]

    Fourth: Deployment

when I came to this part I felt it is not easy and then you need to use another tools for deployment not only Visual Studio.Net so I switch to Developing BlackBerry Application using Java Environment (JDE) using Eclipse

    This video made me convert for Java [ Java I'm Back ;) ]

Contrasting MIDlets and BlackBerry® Java® Applications – March 23, 2009
This video tutorial discusses the pros and cons of developing applications using the Research In Motion (RIM) UI classes versus the Java® ME UI classes.

To be Continue …

my office

I’m trying to link my excella stx with the network with asp.net application to read IDs and Checks images and data and send it to asp.net shifting from my old applicaiton using vb.net windows applicaiton to web based application and I had some problem -excella stx could not open port- while googling I found that guys doing same as my project for project in the university I was happy to see people with the same interest and also facing same problem of mine .

Recently when we were giving the final demo to our mentor, we faced an issue with the new MICR machine. We had assumed that this machine will always work on COM port 3 and hence we hard-coded the COM port value to be 3 in our code. While giving demo on one of the machine, MICR would not work because the machine’s COM port 3 was used by some other device and the MICR was using COM port 4. In this scenario our application did not work. So our mentor suggested us a minor change. He asked us to add a dropdown list in the configuration panel to select the COM port.

refrences:
team site [link]
doc site [link]

uploaded doc

it is really small world over the internet :)

I start this project from 2004 and I bought my first magtek back then micrImage for check and magnetic card reader then I bought excella when it was available online about 2007 it have more features through the ethernet plus it can scan IDs.

iphone

I just bought the new ipod touch 32GB and I have list of files mp3s that I’m collecting and archiving with my own db . so I want to search to them through my pc and listen to them through my ipod . so I’m making VB.Net 2008 code to do that for me.

First Step

I need to search in my database and check the file description this is easy for developers (programmers)

Second Step

When I select the mp3 from the list and play it . It will connect to my ipod touch and check for me if the file exist in my ipod or not.

Sln : I will connect to my ipod touch and copy the itunes database which is located “/iTunes_Control/iTunes/iTunesDB” and download it to my pc so I can search where is the file is located easily . In this case I read to project the main is manzana which my project based on it , The second project iphonebrowser which I read it to see the example how I can use the functions in manzana .

Third Step

I will need to read the iTunesDB file which I copied on my pc and extract the information from it .

Sln : So I used on of the project called ipodmediaextractor I used “System.IPod.dll” library so it can extract the data from iTunesDB (its easy) .

Fourth Step

I will need to search in the list I extract it previously from ipodmediaextractor and if the files is there I will use again iphonebrowser functions to get my mp3 and TADA finish .

Finally

you can download my source code from here [link]

PS: I faced some problems when first I used the iphonebrowser

It didn’t work for me. Downloaded n installed the program but when I open the program , a message pop up saying “An error has occurred during load. Error text: AMDeviceNotificationSubscribe failed with error -402653180. The program will now exit, sorry. Please report this online.”

Answer

Make sure you have iTunes installed properly, with the latest (or close to latest version).

hint so you can’t run the project without iTunes installed on the machine .

References

http://code.google.com/p/manzana/
http://code.google.com/p/iphonebrowser/
http://code.google.com/p/ipodmediaextractor/
http://www.ipodtouchfans.com/forums/showthread.php?p=967300
http://www.codeproject.com/KB/vb/mp3id3v1.aspx
http://www.itunessdk.com/blog/itunesdb-library/
http://www.iconspedia.com/icon/ipod-touch-menu-4423.html
http://www.everythingicafe.com/forum/50185-post3.html
http://www.iphone-hacks.com/downloads/file/46

e-go to go

I was trying to send sms through hsdpa usb modem using vb.net because I wan to use my ZAIN e-go to go device.

I found this article from codeproject article link [here]

And I also found that some one is trying the same [link]

Re: hyperterminal
well, ive been working on this project for awhile now. im trying to create a program to interact with a hsdpa usb modem to send and recieve sms text messages (it uses a sim card). ive been succesfull in sending sms’s, checking the state of the modem, and getting the phone book using the gsmcomm library but it isnt working for getting the modems inbox messages. so i thought id just try ussing AT commands to get to the inbox but that isnt working either. i wanted to use the hyperterminal to send AT commands to see if its even supported. i assume it has to be, as the software that came from the modem can do it, so why cant it? this project has been super frustrating and if anyone could help id really appreciate it
thanks
jason
__________________
I am using Microsoft Visual Basic 2008 Express Edition. I use Access for my data base

by using the gsmcomm library it was working fine with me but i changed the sim card and put Ezee sim with removing the pin code request and it was working great sending and receiving using my ego to go modem. so know I can make two-way messaging with my own application and server.

The file source code I upgrade it to .Net 2008 you can get it here [link]

Civil ID

you can verify if the civil id number is correct or not by the following equation :

11 – Mod(( c1 * 2 ) + ( c2 * 1 ) + ( c3 * 6 ) + ( c4 * 3 ) + ( c5 * 7 ) +
( c6 * 9 ) + ( c7 * 10 ) + ( c8 * 5 ) + ( c9 * 8 ) + ( c10 * 4 ) + ( c11 * 2 )),11) = check digit

update:

one of the guys ask me to explain how the formula is working and I did on rtf format [link]

cid equation explanation

nokia n95 8gb

I wish that Nokia use this Stored Procedure because I have N95 8GB and while I’m searching one of the names called Ahmed (in arabic) I didn’t find because it have hamza (irc = 2) so it won’t find it . this stored procedure one of my friend create it for searching purpose using MSSQL to search for arabic names truncating the Hamza & Taa maboota & yaa Maqsoura & and also double spaces .

—————————— Begin of SP ——————————

if exists (select * from dbo.sysobjects where id = object_id(N’[dbo].[PURE_NAME]‘) and OBJECTPROPERTY(id, N’IsProcedure’) = 1)
drop procedure [dbo].[PURE_NAME]
GO

SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO

CREATE procedure PURE_NAME
(
@DirtyName varchar(255),
@PN varchar(255) output
)
AS
declare @I bigint ,
@L bigint,
@XN bigint,
@S varchar(255) ,
@X varchar(255),
@PureName varchar(255)
begin
set @S = ”
set @L = len(@DirtyName)
set @I = 1
while @I <= @L
begin
set @X = substring(@DirtyName,@I,1)
set @XN = ascii(@X)
--print @X
--print @XN

--if @XN = 199 then @X= char(199) --ا
if @XN = 195 begin set @X= char(199) end --أ
if @XN = 197 begin set @X= char(199) end --آ
if @XN = 194 begin set @X= char(199) end --إ
--if @XN = 237 begin set @X= char(237)end --ي
if @XN = 236 begin set @X= char(237) end --ى
--if @XN = 229 begin set @X= char(229)end --ه
if @XN = 201 begin set @X= char(229)end --ة
--if @XN = 32 begin set @X= char(32) end --space
if @XN = 32 begin set @X= '' end -- no space

set @S = @S + @X

set @I = @I +1
end
set @PN = @S
--print @PureName
--return @PureName
end

GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO

------------------------------ End of SP ------------------------------

arabteam

هذا الموضوع مثبت في منتدى الفريق العربي

http://www.arabteam2000-forum.com

الرابط اضغط هنــــــا
———-

لقد قمت بعمل الموضوع المرتبط :
ميزة جديدة في مشروع Setup, VB 2005ولكن واجهتني مشكله في تثبيقه مع نظام الفسيتا لان التحديث SP1 للفيجوال الستديو لا يتضمن التحديث المرافق له للـ :
C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages

لان الباكيج للـ SQLExpress لا توجد معه SP2 المتوافق للوندوز فيستا و بعد البحث الطويل وجدت الحل مع مقالات مايكروسوفت التالية :

http://blogs.msdn.com/sqlexpress/archive/2…otstrapper.aspx

و

http://blogs.rbaconsulting.com/agrocholski…dc80f393f5.aspx

التي حلت مشكلة bootstrapper update و فعلا حلت المشكله

و لكن هناك مشكله اخرى واجهتني مع الفيستا و وجدت حلها وهي عندما تنصب sqlexpress لا يضيف admins الى SQL sysadmins بسبب UAC ووجدت حلها عند مايكروسوف للنسخة sqlexpress sp2 وهي التالية:

http://blogs.msdn.com/sqlexpress/archive/2…-vista-uac.aspx

و ارجو التي واجهتهم نفس مشكلتي يناقشوني ممكن هناك حلول اخرى من الاخوان الاعضاء

و شكرا