Connection to Ad-hoc network from android phone

3

Finally , after many retrials with my galaxy s to connect to internet using ad-hoc network
i am using custom Rom CyanogenMod ‘android 2.3.7′
and creating ad-hoc network with windows 7 & it works successfully
It may not working if you make WPA2 security , but it works fine using WEP or none .
many thanks to Mahmoud Al Shinhab for helping me to test it again on 2.3.7

Steps:
1- Share your internet connection to wireless card
2- Open “Control Panel”
3- Open “Network and Internet”
4- Open “Network and Sharing Center”
5- Click “setup a new connection or network”
6- Setup “create an ad hoc network”
7- Enter Name and password
Note: it may not working when using WPA2 security , so leave it None or WEP
8- Enjoy with it.

Convert Egypt Phone Numbers to new Schema

0

Dear All
we all know about the problem of conversion of phone numbers to new schema as below

Now you can change your phone numbers to Egypt new schema by using this small application

if you are depending on google contacts services and you sync your contacts with it , this application is what you really need.

just download it and login with google account then convert and re-sync your numbers again

Note: don’t do this before 06/10/2011

update

check newer version it have more featues

1- Remove Egypt Codes 002 ,+2

2- Remove ‘-’ dashes from phone number like 01x-xxx-xxxx

3- Add Egypt Code after you finish converting your numbers

 

Surface Area Configuration Tool in SQL Server 2008

1

So, you thought that you have by now become comfortable with the Surface Area Configuration Tool in SQL Server 2005 and are ready to do the configuration once you install SQL Server 2008.  Well, the tool does not exist anymore in SQL Server 2008 and has been added to the deprecated feature list. As you will recall, we used to use SAC for doing configuration for services & connections as well as for features.

So, how can you go about making configuration changes via the GUI?  It has been divided up into different tools now:

Instance and Database Engine Features:

This will now be done through SSMS (SQL Server Management Studio).  Right click on the instance and select Facets as shown in the image below:


Once you select it, the next screen that you will get is this one:

And you can pick and choose what you want to confgure.  Surface Area configuration is one of the facets.

Another thing that you would note at the bottom right hand side is “Export Current State as Policy” – using this, one can then use that policy across the group in order to have a consistent environment.

References
Understanding Surface Area Configuration
Systems Engineering and RDBMS

SQL Server 2008 : Enable xp_cmdshell

2

The xp_cmdshell option is a server configuration option that enables system administrators to control whether the xp_cmdshell extended stored procedure can be executed on a system.

-- To allow advanced options to be changed.
EXEC sp_configure 'show advanced options', 1
GO
--To update the currently configured value for advanced options.
RECONFIGURE
GO
-- To enable the feature.
EXEC sp_configure 'xp_cmdshell', 1
GO
-- To update the currently configured value for this feature.
RECONFIGURE
GO

References
http://technet.microsoft.com/en-us/library/ms190693.aspx

SQL Server 2008 : OLE Automation

9

Ole Automation in SQL Server 2008 by default is turned off for security reasons. When OLE Automation Procedures are enabled, a call tosp_OACreate will start the OLE shared execution environment.

Executing the following script will enable Ole Automation

sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO
sp_configure 'Ole Automation Procedures', 1;
GO
RECONFIGURE;
GO

References
http://msdn.microsoft.com/en-us/library/ms191188.aspx

أول يوم شغل في رمضان

3

رمضان كريم وكل سنة وانتم طيبين وربنا يعدوه علينا جميعا واحنا بصحة وعافية

امبارح كان اول يوم شغل في رمضان و انا كعادي كل سنة بيبقى ليا طرائف من نوع خاص في اليوم ده والسنة دي بالذات الدنيا حر و انا قاعد في القاهرة لوحدي من غير عيلة (لانهم كلهم مسافرين السعودية عن والدي ) : ولا اصحاب (لان  كلهم واخدين اجازة اول اسبوع في رمضان )

الجميل السنة دي ان الطرائف بداءت معايا بدري اوي

الموقف الأول : صحيت من النوم على صوت رفيقي في الشقة بيصحيني بلهفة لاننا اتاخرنا على الشغل فقمت و جهزت نفسي باقصى سرعة ممكنة و قمت نازل راكب تاكسي ورايح الشغل ولما وصلت عند بوابة المنطقة الحرة لقيت منبه الموبايل بيرن و يا ريته ما رن صعقت ان الساعة لسه 8:20 صباحا :يعني تقريبا قبل الشغل بساعة  ،يصراحة افتكرت ان انا غلطان دورت على اقرب واحد اساله و الكل بيقولي اه فعلا الساعة 8:20   و اضطريت امشي جوا المنطقة الحرة علشضان اوصل الشركة ما الاقيش فيها غير افراد الأمن

الموقف الثاني: الساعة 3:30 وانا جعان وعطشان و كمان هلكان و لكني اصريت اني اكل اول يوم بنفسي مش هاروح اكل بره فدخلت عملت الشوربة و……  (حصل الموقف ) و هوا موقف طبيعي بيحصل لاي حد جديد على المطبخ زي حالاتي  (بس مش لازم يحصل قبل المغرب بساعة )  الانبوبة عملتها معايا ولفظت انفاسها الاخيرة معلنة عن استسلامها قبل الاذان بساعة كاملة  بس الحمد لله كنت خلصت اغلب الاكل وكويس ان الجو حر والاكل ما لحقش يبرد

كل رمضان وانتم بخير

How to get Windows Login credentials using C#.Net , ASP.Net

5

one of the most famous topics is how we can know the current user credential like

user name, Groups, Authentication Type   (I hope to find a way to know password :-) )

check this code

Console.WriteLine("AuthenticationType =" + WindowsIdentity.GetCurrent().AuthenticationType);
Console.WriteLine("Name ="+WindowsIdentity.GetCurrent().Name);
Console.WriteLine("Groups :");
foreach (IdentityReference ir in WindowsIdentity.GetCurrent().Groups)
{
          Console.WriteLine(ir.Translate(typeof(NTAccount)).ToString());
}

and this a another way to get Windows Identity

WindowsPrincipal p = Thread.CurrentPrincipal as WindowsPrincipal;
(p.Identity as WindowsIdentity)

and for ASP.Net

HttpContext.Current.User.Identity

for more information
Windows Principal , Windows Identity

How to Install Windows 7 From USB Drive without Windows 7 ISO DVD

1

Dear Friends :

                After Spending Some time to try to Install Windows 7 from USB drive ,I reach to the working way 

Here is small guide on how to install windows 7 from USB flash drive

 

Requirement:

1. USB Flash Drive (Min 4 GB)

2. Windows 7 ISO (32 bit or 64 bit)

3. MBRwiz Download and Extract it on your hard drive (Diskpart utility for Windows XP doesn’t detect USB drive as Disk hence we need to use this free utility to make bootable USB drive).

Steps :

1. Connect your USB Flash Drive to your computer Format USB drive

2. To Format USB Flash Drive Go to My Computer -> Right click on USB drive and select Format from context menu.

clip_image002

3. Now go to Start Menu->run->cmd (Open Command Prompt) and Type following command

convert i: /fs:ntfs (Where “I” is your USB drive latter)

clip_image004

4. Mount Windows 7 iso as drive (You can use Freeware MagicDisc download from here).   (In my Case , I use Power ISO)

5. Type Start->run->cmd

Now dir to directory where you have extracted MBRWiz and run following commands

mbrwiz /list (note down disk number of your USB Pen drive)

mbrwiz /disk=X /active=1 (X is Disk Number of your USB Drive)

exit

clip_image006

6. Now open another command window and type following command

J: (Drive letter of Windows 7 iso mounted with demon tool)

CD boot

bootsect /nt60 Y: (Y is drive latter of your USB drive )

clip_image008

7. Now copy all files from drive where you have mount Windows 7 iso

8. Now reboot your computer and press F9 to get your BIOS screen and select USB drive as your boot drive.

9. If everything goes fine, Your Windows 7 Installation should start from your USB drive.

Puzzle Game using WPF

0

After Spending my weekend to Read about WPF

The Windows Presentation Foundation (or WPF), formerly code-named Avalon, is a graphical subsystem in .NET Framework 3.0 (formerly called WinFX), which uses a markup language, known as XAML, for rich user interface development. WPF is included with Windows Vista and Windows Server 2008, and is also available for Windows XP Service Pack 2 or later, and Windows Server 2003. It provides a consistent programming model for building applications and provides a clear separation between the user interface and the business logic. A WPF application can be deployed on the desktop or hosted in a web browser. It also enables rich control, design, and development of the visual aspects of Windows programs. It aims to unify a number of application services: user interface, 2D and 3D drawing, fixed and adaptive documents, advanced typography, vector graphics, raster graphics, animation, data binding, audio and video. Although Windows Forms will continue to be widely used, and Microsoft has created only a few WPF applications, the company promotes WPF for line-of-business applications. Future Microsoft software will be built on WPF; for example, the code editor in Visual Studio 2010 has been rebuilt on WPF.

it is really interesting technology and it will change the way to Design GUI for Standalone and Websites Solutions.

I have to read more about its concepts and how it is really work to make my Small Puzzle Game

Puzzle

and this is the code for this game Download Source Code

Nice Start with Project Euler

0

Today I have Start to solve problems in Project Euler

It is really amazing website to start practice your self  in programming tricks and also mathematics

I solve the first problem which was very easy , it can be solved by many ways and more simpler than my way

but I love .net 3.5

Here is my solution

var numbers = from number in Enumerable.Range(0, 1000)
                            where ((number % 3 == 0) || (number % 5 == 0))
                            select number;
 var answer = numbers.Sum();
 Console.WriteLine(answer);
Go to Top