Category Archives: Windows 7

Windows 10 – replace cmd with powershell.

1. Why PowerShell?
– since Windows 7 we have a new command-line environment in Windows named PowerShell;
– is a much more powerful command-line shell;
– the scripting language is more good than the Command Prompt;
– is more complicated than the traditional Command Prompt;
– uses different commands, known as cmdlets in PowerShell;
– allows you to create your own commands and scripts using the C# programming language;
2. How to replace cmd with powershell.
Right click with the mouse on taskbar from bottom of your Windows screen.
Then select the tab named Navigation and select option with: “Replace the …”. Press then Ok button.
Right click with the mouse on the Start icon and will see the replacement of Command Prompt.
replace_cmd_powershell

Posted in All, Commands, PowerShell, Windows 10, Windows 7, Windows 8. Tagged with , , , , , , .

Android transparent background.

This is result of my application.

android_transparent_app
This android application can be updated with your features when you need to see the background.
For example a simple clock or something else.
First you need to create one default android project.
This will make all your files to working like one simple android aplication.
Now the changes come with this file ( AndroidManifest.xml) :

The changes from MyClock.java:

Another file you need to change it – activity_my_clock.xml.

… the styles.xml file:

Most users got some errors with R.layout.
This error come when you not set the correct settings of Android Studio.
So try to add your Project Settings the correct dependencies:
android_errors_001
Errors can be annoying , but if you know everything that happens in Android Studio you managed to solve it.

Posted in All, Android, Programming, Windows 10, Windows 7, Windows 8. Tagged with , , , , , , , .

How to clear ARP Cache in Windows OS ?

The Address Resolution Protocol named ARP it is a component of IP networking on any operating system.
Without this system, a machine could not communicate to the outside world.
The ARP Cache is a collection of ARP entries / mostly dynamic that are created when a hostname is resolved to an IP address and then an IP address is resolved to a MAC address .
The PC will store that newly mapped address in the ARP cache and then will stay there until the ARP cache entry timeout expires.
So open a command prompt run as admin this command:

To delete a single entry you can use this:

… where the  xxx.xxx.xxx.xxx it’s the ip address.
To delete or flush entire arp cache use this command:

Posted in All, Commands, Windows 7, Windows 8, Windows XP. Tagged with , , , , , .

Increase the cpu cycles to your applications .

Press Ctr+R or Win+R to use command shell and type regedit.
Go to : HKey Local Machine => System => CurrentControlSet => Control => PriorityControl
Set the default value to 26 Hexadecimal with new value 38 Decimal (increase the cpu cycles).
Then restart your Windows OS.

app_002

Posted in All, Windows 7, Windows 8. Tagged with , .

LINQ and LinkPad – part 001.

LINQ stands for Language Integrated Query and enadbles us to query any type of data store, like SQL Server , XML documents, Objects in memory etc.
You don’t need to know the syntax specific to data source because LINQ enables us to work with different data source.
The great goal is that it provides intellisense and compile time error checking.
If we development one application and this working with databases , xml documents and / or in memory objects then we can use LINQ.
LINQ query can be using any .NET supported programmiing language, because LINQ component between the LINQ query and the data source.
LinqPad tool can be downloaded for free from here.Now I help you to learn , write and test LINQ.
Today I will try to use C# with LinqPad.
LinqPad help you to under C# to make it converted to Intermediate Language (IL) which is also known as Microsoft Intermediate Language or Common Intermediate Language.
LinqPad
If you try to use LinqPad without source code then the oonly error under C# will come into C#Statement : ; expected
Press F4 button then press Add button (Query Properties ) and type WindowsBase.dll (Add Custom Assembly References – window) then press Ok button.
LinqPad
Let’s test all. Wrote this example and under Results tab click under IL.

Example 1
C# Expression

Result IL

Example 2
C# Statement

Result IL:

this can a little dizzy for you but will come with future details.

Example 3
C# Program

Results IL :

This examples will show us the results over IL.
Using LinqPad with assemblies .NET .
Under C# the most simple DLL example can be:

If we wrote into LinqPad under C# Statement and then run it.

Console.WriteLine(“tutorial LinqPad -001”);
… the result will be :

The next step is to create one new file into our C# project named Test.dll with this source code:

If you parse this code you will see under call I need to add this :

This is just one simple example about LinqPad.This software it’s very good when working with SQL , ASP , data , arrays.
To make the DLL file you need this : ilasm.exe
Run the command under cmd.exe:

The result will be: Test.dll .
Let test it:
Make another file with notepad , named DllTest.cs and put this source code:

Use cmd.exe to complile this into exe file format :

If you run this using cmd.exe the the output will be:

Posted in All, C#, Programming, Windows 7, Windows 8. Tagged with , , , , , , .