Tag Archives: Windows 10

Programming with C# and Unity 3D game engine – part 003 .

In this tutorials I will show how to deal with lists and enumerations.
First you need to make one C# script under Unity 3D. If don’t know how to do it then read this tutorial.
The list is an object which holds variables in a specific order.
The enumeration is an object with one distinct type that consists of a set of named constants called the enumerator list.
Let’s start with lists.
You need to put this on your script:

Now you can create list under your class , see the example with one class named YourClass:

We can see the List’s syntax is at first confusing. If you take a look to types – int, sting and GameObject and variables – ages, names and objects then the base remain this: List<...> … = new List<...>(); where types are into <> and variables can be created with = new … ().
Now will add one value to names with:

To reverse one list in-place then use this:

If you want then can remove one:

We can use an array to initialize a List named animals:

Loop into the list animals and print the list:

To get the number of elements from animals list, use this:

To clean the list just use this:

The next step is enumerations and is define by the enum type.
An enum type internally contains an enumerator list like this example:

In this enum named animals, cat will be zero (unless given another value explicitly), dog will be one, and fox will be two …
To print out the enum values, you can call ToString on the enum variable in a program.
The Console.WriteLine can automatically call the ToString method.
Using GetValues method with foreach to returns an array that contains a value for each member of the enumType enumeration.

Sometimes we have a string value that we want to convert to an equivalent enum and we can use Parse().
Also you can used many enum like: Enum.Parse, Enum.TryParse, Enum.Format, Enum.IsDefined…
You can get values from enum , see the example:

Convert enums to list:

Posted in C#, Game engine, Unity 3D, Visual Studio, Windows 10. Tagged with , , , , , , .

Android ABIs list application.

This application will show us about ABIs (Application Binary Interface support).
Basically get the information about CPU and ABIs.
You can read more about this at ARM website.
The result will come like this screenshot.
The main problem was the SDK: minSdkVersion 21 / targetSdkVersion 23 and the emulator with Nexus 6P API 23. That make me to increase the RAM – 1Gb. The hardware is old and working hard with this settings , but finally I make the screenshot.
Let’s see the source code of two files: MainActivity.java

package com.free_tutorials.catalin.abi_list;

import android.os.Build;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.TextView;

public class MainActivity extends AppCompatActivity {

protected void onCreate(Bundle savedInstanceState) {

TextView textSupportedABIs = (TextView)findViewById(R.id.supportedabis);

for(String abi : SUPPORTED_ABIS){
textSupportedABIs.append(abi + “\n”);

for(String abi32 : SUPPORTED_32_BIT_ABIS){
textSupportedABIs.append(abi32 + “\n”);

for(String abi64 : SUPPORTED_64_BIT_ABIS){
textSupportedABIs.append(abi64 + “\n”);

…and activity_main.xml:

<?xml version=”1.0″ encoding=”utf-8″?>
<LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android”

android:textStyle=”bold” />

android:layout_height=”wrap_content” />

You can see the supportedabis is a string fill by MainActivity.java and show under activity_main.xml .
And that all about sources you need to make the aplication. All files you see is make by Android Studio 2.0. Also you need to have same function like java file and take a look at android manifest intro.

I used the default AndroidManifest.xml :

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

PowerShell tips – part 002.

I will come with new examples and tips with Windows 10 PowerShell.
Let’s start:

List recursive android application from your folder using:
Get-ChildItem -Recurse -Filter “*.apk”

Calculate the number of archives for gmail attachment limit ( max gmail size 25MB):
132MB / 25MB

Lists all of the commands in the current PowerShell session.:

Show infos about powershell command shell:

Show all alias commands from powershell:

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

Android emulation with Intel® HAXM.

The Intel Hardware Accelerated Execution Manager named Intel® HAXM is a a hardware-assisted virtualization engine that help Android application emulation on a host machine.
You need to install it from here..
After that you can run the commands to install it, see the next image how to do it:
Update tool from android with Android SDK Tools to last version. Also check if the memory of HAXM is exceeded by emulator memory. You can see that into log windows of bottom of Android Studio when you start the emulator.
Also you need to have all Android Studio SDK update because you can try to use some functions from the new Android SDK.
Be advice when you start the android project. If the emulator works slow then try to use new hardware.
Also check BIOS to enable virtualization.
After that when you run the Android Studio to setup your emulator then you will see it’s working.

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

Fix Windows 10 with EMET secure application.

The Enhanced Mitigation Experience Toolkit named EMET can be found on Microsoft website.
Do you hear about hacking contest named Pwn2Own. Seam the contestants managed to hack into Internet Explorer 11, but they couldn’t do it when EMET was enabled.
So let’s begin with few infos about this application.
Will be protects against a wide class of zero-day vulnerabilities that can appear because of poorly written code. The EMET application is actually a suite of mitigation technologies.
It’s good to be aware that this can prevent some apps from loading, but it’s usually very rare and happens with very old apps.
Is one of the most powerful security applications Microsoft has built in recent years.
For Windows 10 you need EMET 5.x version and need set to Recommended Settings which mainly protects Microsoft’s applications.
Also you can set it to Maximum Protection and will enforces all the protections on all applications by default.

Posted in All, Windows 10. Tagged with , , .