Saturday, July 28, 2012

WS has stopped unfortunately



Bug at runtime
WS has stopped unfortunately
and logcat log that could not find  
developing Android application using Eclipse and ADT plugin , when try to call asp.net web service from android application and log cat log that Could not find class 'org.ksoap.serialization.SoapObject'
The solution that work with me and I took from stackoverflow


I managed to solve the problem by

Creating a folder "libs" in the project
Copying the external jars in to the folder
Refresh the folder
Go to properties -> Build path -> Add Jar (not external JAR)
Clean the project
Restart Eclipse
Boom it worked for me. Hope it'll help others too.

Thursday, May 3, 2012

Unable to find an entry point named EnumerateSecurityPackagesW in DLL security.dll

This bug occurs because I had class library called security at my project , when I renamed this class library everything work fine 

Tuesday, December 20, 2011

My Graduation Project Pictures

My father took the below pictures during the presentation of our graduation project at the beginning of the June 2011

The slides of the presentation was displayed by our Notebook and projector of our university , we met before the beginning of the presentation we set the projector and revise the presentation and the role of each one.

Committee discussion from the right : instructor Atef Abu-Salim,Dr. Adel Muhamed , and Dr. Emad Quaddoura the supervisor of our graduation project

We create a Cab project and represents our Windows mobile Call-Block into cab file , and installed it on second hand HTC smart phone.This smart phone is based on Windows mobile 5 , our project is compatible to work on Windows Mobile 5 to Windows Mobile 6 Installing the Windows Mobile Call-Block on a real smart phone enable us to test the application on real smart phone , the emulator sufficient for development time .But , the Black-Box testing on the emulator does not discover the system bugs till we deployed on real environment .And so , we had system free of bugs at our presentation

Presenting my own part of the slides

Saturday, December 17, 2011

Common Work Interviews Questiones

    Table Of Contents
  1. Part 1: Basics of the .net languages (C# and VB.Net) and OOP
  2. Part 2: Web development (in context of asp.net 2.0 – 4.0 and MS SQL Server 2005 & 2008)
    • Part 2.1 web basics and related technologies
    • Part 2.2 web security
    • Part 2.3 WCF and related technologies
  3. Part 3: Microsoft SQL Server 2005 & 2008

Part 1: Basics of the .net languages (C# and VB.Net) and OOP

What are the main .net data types?

Boolean ,Byte , Char , Date, Decimal , Double , Integer , Long ,Object ,Short ,Single ,String ,float , User-Defined Data Type and others.

What is the .Net framework architecture?

Of course the OS is not a part of the .Net framework! It presents at the diagram for conventionally reason.

What are the differences between struct and class?

StructClass
are value types are reference types
All of the members of a struct are public by default All of the members of a class are private by default.
There is no inheritance for Structs as there is for classes. A struct cannot be inherited from another struct or class, and it cannot be the base of a class. You can have a base class and derived class, where the derived class has the ability to use protected members of the base class. For example, developer can override the protected method(s) of its base class.
When you create a struct object using the new operator, it gets created and the constructor is called.
Structs can be instantiated without using the new operator. If you do not use new operator, the fields will remain unassigned and the object cannot be used until all of the fields are initialized.
To instantiate a class you need to use the new operator or take the risk of throwing a null reference exception at run time

What is the difference between reference and value data types?

Value type holds the data within its own memory allocation. A reference type contains a pointer to another memory location that holds the data.

Mention the value and reference data types

The value types consist of two main categories: Structs, Enumerations.
Struct : falls into these categories: Numeric types , Integral types (sbyte , Byte , char ,short ,ushort,int,uint,long, ulong), Floating-point types (double float), decimal, bool , User defined Structs.
Reference types include the following: String, Object, Class types, delegates, and all arrays even if their elements are value types

What are the differences between boxing and unboxing?

Boxing: is an implicit conversion of a Value Types to the type Object or to any interface type implemented by this value type. Boxing is used to store value types in the garbage-collected heap, boxing a value type means allocating an object instance on the heap and copies the value into the new object.
Unboxing: is an explicit conversion from the type Object to a value type or from an interface type to a value type that implements the interface.
An unboxing operation consists of: 1. Checking the object instance to make sure it is a boxed value of the given value type. 2. Copying the value from the instance into the value-type variable.

What is the inheritance and polymorphism?

Inheritance: is an object oriented (OO) concept permits you to use the existing features of a class. Derived class can reuse and override (for methods) the members of the base class .The main advantage of inheritance is code reusability, which is of great help in the case of distributing class libraries.
Polymorphism: is an object oriented (OO) concept includes: overriding, overloading and composition. Polymorphism allows classes to provide different implementations of a method that can be called in the same way. Polymorphism can be of three types: 1. inheritance polymorphism, 2. interface polymorphism and 3. Polymorphism through abstract classes.

What are the access modifiers?

Access modifiers are keywords used to specify the declared accessibility of a member or a type. The four access modifiers: public, protected, internal and private.

What are the accessibility levels provide by access modifiers?

Public: Access is not restricted.
Protected: Access is limited to the containing class or types derived from the containing class.
Internal: Access is limited to the current assembly.
Protected internal: Access is limited to the current assembly or types derived from the containing class.
Private: Access is limited to the containing struct or class.

Friend access modifiers

The Friend keyword confers friend access on one or more declared programming elements. Friend elements are accessible from within the program that contains their declaration and from anywhere else in the same assembly.
The Friend keyword can be used in conjunction with the protected keyword in the same declaration. This combination confers both friend and protected access on the declared elements, so they are accessible from the same assembly, from their own class, and from any derived classes.

What is LINQ?

Language-Integrated Query (LINQ) is a set of features introduced in Visual Studio 2008 that extends powerful query capabilities to the language syntax of C# and Visual Basic. LINQ introduces standard, easily-learned patterns for querying and updating data, and the technology can be extended to support potentially any kind of data store. Visual Studio includes LINQ provider assemblies that enable the use of LINQ with .NET Framework collections, MS SQL Server databases, ADO.NET Datasets, and XML documents.

What is lambda expression?

A lambda expression is an anonymous function that can contain expressions and statements, and can be used to create delegates or expression tree types.
All lambda expressions uses the lambda operator =>, which is read as "goes to". The left side of the lambda operator specifies the input parameters (if any) and the right side hold the expression or statement block.

How to create Read only property

Either Read-only keyword or implements property with implementation of the get only without set implementation

DataSet

DataSet.Clone Method
Crates a new DataSet with the same schema as the current DataSet, but none of the data.
DataSet. Copy Method
Creates a new DataSet with the same schema (table schemas, relations, and constraints) and data as this DataSet.
DataSet.CaseSensative property
Gets or sets a value indicating whether string comparisons within DataTable objects are case-sensitive.

Compilation of .net languages

Microsoft’s .Net framework relies on just in time compilation (JIT) compilation for high-speed code execution. Just-in-time compilation (JIT), also known as dynamic translation, it is a method to improve the runtime performance of computer programs.

Part 2: Web development (in context of asp.net 2.0 – 4.0 and MS SQL Server 2005 & 2008)

Part 2.1 web basics and related technologies

What is n-tier application?

Multi-tier architecture (referred to as n-tier architecture) is a client–server architecture in which the presentation (UI layer), the application processing (business logic layer), and the data management (data model layer) are logically separate processes.
UI tier: user interface layer for data representation and maybe data validation, Included: user controls, web forms, web user controls integration and others.
Business logic layer: can be local classes on the web application and / or web services distributed over the WWW on different machines.
Model tier: the data base, relations and referential constrains (primary key, foreign key, check conditions and other data base constraints)

What is PostBack?

PostBack is the name given to the process of submitting an ASP.NET page to the server for processing. For example, PostBack is done if certain credentials of the page need to be checked against a database values (such as verification of username and password).

What is autopost back?

AutoPostBack property: a property of some server side controls .When this property enabled the web page will be posted back to the server, based on a certain event. For example, enabling this property for asp.net text box will call the related text changed event handler on the server when the event Text Changed is fired (user write a character, symbol or number on the asp.net text box).

Server side and client side state management

Server side state management: Cach, Session, Application and data base. On the other side, client side are: ViewState (encrypted hidden field), hidden fields, cookies (either stored at the client volatile memory –RAM technology is the commonly used - or persisted as a text file stored on the client machine)

What are the differences between ViewState and Session?

ViewState (client side state management) at run time in described as encrypted hidden field in the html page at the client side to maintain values among different user request for the same page , server side controls like text boxes have the property of ViewState(Server side state management) enabled by default. On the other hand, session represents memory locations on the web server maintains data during the request of different web pages

What is Machine.config File?

Machine.config file is used to configure the application according to a particular machine. That is, configuration done in Machine.Config file, which is affected on any application that runs on a particular machine (web server for example).

What is Web.Config?

Xml file exists at the asp.net application to configure the asp.net applications

What can be stored in web.config file?

There are number of important settings that can be stored in the configuration file. The most frequently used configurations, stored conveniently inside web.config file: Database connections (such as connectionString), Session States (such as session state time out), Error Handling, Security (such as authentication and authorization related tags).

Part 2.2 web security

Forms authentication and windows Authentication

Windows Authentication Forms Authentication
More secure way , each user needs to be registered at the domain More practical for websites , which have a serious number of users
Better for publicly published web sites Good for intranet web sites
Default authentication way Needs to be configured at the web.config file

Part 2.3 WCF and related technologies

What are XSD, XML, and XSLT?

XML (Extensible Markup Language): XML is a markup language much like HTML. But, XML was designed to carry data, not to display data like HTML. Also, XML tags are not predefined you must define your own tags.
XSD (XML Schema Definition): XSD specifies how to formally describe the elements in XML document. This description can be used to verify that each item of content in a document adheres to the description of the element in which the content is to be place
XSLT (Extensible Style sheet Language Transformations) has evolved from the early Extensible Style sheet Language (XSL). standard. XSLT specifies a language definition for XML data presentation and data transformations, where data presentation means displaying data in some format and/or medium, Presentation is about style and data transformation means parsing an input XML document into a tree of nodes, and then converting the source tree into a result tree, and Transformation is about data exchange.

What is JSON?

JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write, JSON easy for machines to parse and generate.
JSON is built on two structures:
  • A collection of name/value pairs. In various languages, this is realized as an object, record, struct, dictionary, hash table, keyed list, or associative array.
  • An ordered list of values. In most languages, this is realized as an array, vector, list, or sequence.

What is WCF metadata?

WCF services use metadata to describe how the client can interact with the service's endpoints (endpoint includes the ABC where A stands for address, B for binding and C for contract).The tools, such as svcutil.exe, automatically generate client metadata code for accessing the service. WCF metadata.

Part 3: Microsoft SQL Server 2005 & 2008

Part 3.1 Basics and general concepts

Can you restore a deleted object of MS SQL Server?

No you can’t, unless you have a backup

How you maintain your data base at MS SQL Server?

Automate an MS SQL Server job using MS SQL Server Agent to back up the data base periodically, you can add configuration to send a daily informational e-mail for the intended operator(s) when the backup completed.

Part 3.2 T-SQL related questions

Difference between NCHAR, CHAR, NVARCHAR

Difference between VARCHAR and NVARCHAR data types
An NVARCHAR column can store any Unicode data. A VARCHAR column is restricted to an 8-bit code page. And so, NVARCHAR provides better ability to work with universal languages such as Chinese symbols Differences between VARCHAR and CHAR data types
CHAR should be used for storing fix length character strings, unused spaces will be space/blank padded before stored on disk. And so, if this type is used to store variable length strings, it will waste a lot of disk space. On the other hand, VARCHAR return the unused space to be available memory spaces.

Difference between “TRUNCATE TABLE table1”and “DELETE * FROM table1”

“TRUNCATE TABLE table1”: MS SQL Server will NOT log this operation at the log file, this command removes all the rows at the “table1”, and the truncate command is a DDL command this means it can NOT be rolled back “DELETE * FROM table1”: MS SQL Server will log this operation at the log file, this command delete all the rows from “table1” , and the DELETE command is a DML command this means it can be rolled back.

What is stored procedure?

A stored procedure is a group of Transact-SQL statements compiled into a single execution plan.

Performance wise of using stored procedures

  • Precompiled execution. MS SQL Server compiles each stored procedure once and then reutilizes the execution plan.
  • Reduced client/server traffic. Instead of send sql query over the network to data base engine , only the stored procedure name and related parameters will be sent.
  • Efficient reuse of code and programming abstraction. Stored procedures can be used by multiple users and client programs. If you utilize them in a planned manner, you'll find the development cycle takes less time.
  • Enhanced security controls. On the MS SQL Server level you can grant users permission to execute a stored procedure independently of underlying table permissions.

Types of MS SQL Server functions

Scalar User-Defined Function: return a single value.
Inline Table-Value User-Defined Function: return a table, its structure defined at the run time.
Multi-statement Table-Value User-Defined Function: return a table, its structure defined at the function implementation .And so, this function usage provides better in performance than inline table valued function.

References

Edited by Omar Adnan Isaid
http://msdn.microsoft.com/en-us/library/ms123401.aspx
http://www.albahari.com/valuevsreftypes.aspx
http://www.expresscomputeronline.com/20021118/techspace2.shtml
http://www.dotnetspark.com/qa/1767-difference-between-datasetclone-and-datasetcopy.aspx
http://www.json.org/
http://www.w3schools.com/xml/xml_whatis.asp
http://searchsoa.techtarget.com/definition/XSD
http://dotnet.tekyt.info/?p=30
http://www.programcall.com/2/aspnet/autopostback-in-aspnet.aspx
http://www.albahari.com/valuevsreftypes.aspx
http://www.expresscomputeronline.com/20021118/techspace2.shtml
http://www.dotnetspark.com/qa/1767-difference-between-datasetclone-and-datasetcopy.aspx
http://www.json.org/
http://www.w3schools.com/xml/xml_whatis.asp
http://searchsoa.techtarget.com/definition/XSD
http://dotnet.tekyt.info/?p=30
http://www.programcall.com/2/aspnet/autopostback-in-aspnet.aspx
http://www.codersource.net/asp-net/asp-net-advanced/asp-net-web-config-configuration-file.aspx
http://stackoverflow.com/questions/144283/what-is-the-difference-between-varchar-and-nvarchar
http://www.orafaq.com/faq/what_is_the_difference_between_varchar_varchar2_and_char_data_type
http://buchananweb.co.uk/security12.aspx
http://geekswithblogs.net/mahesh/archive/2006/10/11/93753.aspx
http://www.sql-server-performance.com/2003/stored-procedures-basics/
http://www.sqlteam.com/article/user-defined-functions
http://en.wikipedia.org/wiki/Main_Page

Thursday, September 9, 2010

My Windows Mobile Call-Block (User Guide)

Getting start with My Windows Mobile Call-Block

After install the Cab file of My Windows Mobile Call-Block on your Windows Mobile phone , click on the icon of the application on your programs list , the Main Menu form will appear

Main Menu Form , Menu tab
Figure 1.1 : Main Menu Form , Menu tab
  1. click on the the button titled with Enable Call-Block , responsible to enable or disable the application
  2. click on the button titled with Settings ,which is the gate to configure the groups of the application
  3. click on the tab titled with FireWall Settings , to view the firewall settings

How to configure firewall settings

  1. click on the tab FireWall Settings
  2. check on checkBox labeled with Reject all calls to reject all calls , and click on the checkBox labeled with exclude to exclude a group of contacts from the call rejection (sure how to create a new group will be discussed later)
  3. Main Menu , firewall tab
    Figure 2.1 : Main Menu Form , all calls seem to be rejected
  4. Check the checkBox labeled with Reject unknown calls to reject the calls from outside your phone book
  5. Main Menu , Firewall tab
    Figure 2.2 : Main Menu form , unknown calls seem to be rejected

    How to create a new group

    1. click on settings button (see figure 1.1) , the Group List form will appear
    2. Group List
      Figure 3.1 : Group List form , no groups defined yet
    3. From the Group List form click on the NewGroup item from the Options menu
    4. The Add New Group form will appear .And so, the user can choose the suitable name and suitable call status for the group then click ok
    5. Add New Group
      Figure 3.2 : The Add New Group Form , the user choose Friends as the name of the new group and open the call status ComboBox to choose the initialized call status for the group
    6. Pressing Ok at the New Group form , Now a new group called Friends is created
    7. Group List ,friend group
      Figure 3.3 : Group List form , a group called friends is created and you can see the items of the menu Options

    How to change a group call status

    1. From the Group List form check the CheckBox beside the group you want to change its call status
    2. Group List , change status
      Figure 4.1 : Group List form , the CheckBox beside the group Friends is checked
    3. click on the soft key Change Status to change the call status to Busy-SMS
    4. Group List , change status
      Figure 4.2 : Group List form , the call status of the group Friends is changed to Busy-SMS
    5. if you repeat the steps 1 & 2 & 3 the call status of the group becomes FastBusy , and if repeat 1 & 2 & 3 steps again the call status return to become Allowed

    How to View & Add the contacts to a group

    1. From the Form Group List (see figure x) select the name of the group ,you want to Add/View its contacts
    2. Select the sub item Contacts from the item View at the Options menu
    3. The contacts of the group will be viewed (if exists !)
    4. Members of friends group
      Figure 4.3 : The group Friends has no members yet
    5. choose the item Add Members from the Options menu, to view the list of phone book contacts
    6. The Mobile phone book
      Figure 4.4 : The user try to add three contacts at the phone book to be included at the Friends group
    7. Check the CheckBox(s) beside the name of the contact(s) you want to add to the group and click ok
    8. The chosen contacts will appear at the form supposed to view the contacts
    9. Add Members
      Figure 4.5 : Three contacts added for the group Friends

    How to remove a contact from a group

    1. From the form supposed to view the group members , select the contact you want to remove it
    2. Remove Remember
      Figure 5.1 : a member removed from the group friends
    3. Select the item Remove Member from the Options menu
    4. Remove member
      Figure 5.2 : a member removed from the group Friends

My Windows Mobile Call-Block (Specification)

What the servies the system can provide for its user

  1. Reject all calls
    • exclude a Windows Mobile Call-Block contacts' group OR
    • exclude NO Windows Mobile Call-Block contacts' group
  2. Reject unknown calls
  3. Enable/ Disable the feature
  4. Categorize the contacts into groups and apply a call status of a group
  5. The user defined group of contacts can have the following call status
    • Allowed : The feature shall do nothing with the incoming call from contact at a Windows Mobile Call-Block group
    • Busy-SMS : the feature shall reject the call and replay with predefined apologize short message text from contact at a group
    • Fast Busy : the feature shall reject the incoming call only from contact at a Windows Mobile Call-Block group
  6. User can add/remove a Windows Mobile Call-Block group according to his criteria
  7. User can add contact(s) from the phone book at his/her phone book , The changes on phone book will be reflected back to the feature configuration
    • Remove a contact from the phone book will be removed from the included Windows Mobile Call-Block group at the call block feature
    • change the contact name/mobile phone from the phone book will be removed from the included at a Windows Mobile Call-Block group at the call block feature
  8. You can remove any contact from a Windows Mobile Call-Block group any time you wish

My Windows Mobile Call-Block (Overview)

Windows Mobile Call-Block is the system named my graduation project course in My university Jami'at Al-Ulum Al-Tatbiqiya 2006 – 2010 , I got 97 % at this course having an excellence certificate for this achievement.Windows mobile Call-Block was one of Dr.Emad Quaddoura suggested ideas for students graduation projects in 2010 year.I developed my graduation project system using Visual Studio 2008 as IDE (integrated development environment) , using Device Application technology supported by Windows mobile 6 SDK professional edition. My developing language was C#.Net , and I reused a class library written by C++ , called cordel.dll intended for mobile ce application.I reused only a methods from this component.

What is the new in my Windows mobile Call Block

Of course I expected some one to say , your application is already exist .And so, can I know why the need to re invent the wheel .My answer is I added a new features to already exist windows Mobile Call-Block and I added some of the features of Call Firewall ,searching over WWW you can understand what I mean by call firewall (adding call firewall features was after my graduation project course),and the contacts distinguished as a blocked one have different treatment between reject with an apologize short text message (SMS) or just have the busy treatment. My Windows Mobile Call-Block need from its user to categorize the desired contacts into user defined groups , then the user can define the suitable call treatment for each group , Of Course, blocking contact by contact is NOT the block style any more !!!

What about the adds-on Call Firewall features

Of course , searching on WWW you can find the call firewall .But , again I am not the person , who re invent the wheel .Hence , I understood the concept of Call Firewall , deploying some of call firewall concepts in my Windows mobile Call-Block in a useful and practical manner.The adds-on features can help the user to reject all call OR reject unknown calls .In case of reject all calls you can choose the group you want to exclude from the automatic rejecting , it worthies to say I added the Call Firewall adds-on features after the graduation project course.

What is the secrets of my success

  1. Dr. Emad always told me "do not give up"
  2. posting my questions on MSDN forum , that have the enough care from MSDN Forum members
  3. googling my question , their keyword
  4. Professional Microsoft Smartphone Programming , Baijian Yang (Author) , Pei Zheng (Author), Lionel M. Ni (Author)