Tag Archives: tutorial

Using Speech with C# and Visual Studio 2013.

This example will show you how to use Speech with C# an Visual Studio 2013 to recognition your words , speak your words from your list and also to command the exit appplication.
Create one empty project from File – New Project.
You have now one Form and you will add 3 buttons and one TextBox.
After that will need to select MultiLine by using right click on the arrow of TextBox.
The next image show you this 3 buttons and TextBox.
Speek C#
You need to activate Speech from Visual Sudio 2013 IDE:
Go to right panel and Add Reference ( use right click and select it – see next image).
Speek C#
Then select Speech and click Apply – see next image:
Speek C#
All buttons will have source code, just double click on buttons and will have the functions for all buttons.
Also If you want to renamed the buttons just search Properties and then Text and rename buttons or Form title.
I used Speak, Start and Stop for buttons.
I used also one if-else with exit word from list, to stop application.
The list will have all words to recognition your words from list.
You need also to have hardware microphone or portable microphone and also you must activate it unde windows.
Now, the source code of your form is this:

Using F7 Buil Solution and then Start Debugging – F5 you will run the application.

Posted in All, C#, Programming. Tagged with , , , , .

Unity 3D – C# script – countdown timer tutorial.

This tutorial will show us how to make one simple countdown timer.
First go to Asserts tab and click with right mouse button.
Create new C# script and open it with double clicks – left mouse button.
Drag and drop the script into your main camera.
Fill into Mono Developer with this script:

Press Play Button and you will see this.
The GameOver is empty and you can put there your own game over script.

Posted in 3D, All, C#, Game engine, Programming, Unity 3D. Tagged with , , , , , , .

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

This tutorial will cover the first steps programming with C#.
The C# is an more complicated language like another programming language.
Now, C# it is an object-oriented programming language like C++ or Java.
If you know this programming language then will be easy to you to use C#.
First in C# the entry point of program is a static function called Main inside a class, not more than one.
If you want to compile one C# program then you can use the compiler:
cc yourprogram.cs
… or just use the Mono IDE.
C# has data types, operators, variables, constants, typecasts, branching like any programming language.
Also C# allow you to create your own data types. This mean the C# is an extensible language.
Let’s see more about this:

  • data types: bool,byte, sbyte, char, short, ushort, int, uint, float, long, ulong, double, decimal
  • operators: +,-,*,/,%,++,–,*=,/=,-=,%=,>>=,<<=, bitwise, logical, shifting operators …
  • variables: int my_var = 1;
  • constants: const float my_const = 5;
  • typecasts: C# need to know if is an explicit and implicit conversions.
  • branching: if, switch, while, for, do-while, …

After you open the Unity 3D IDE the next step is to create the C# script.
Right click with the mouse into Project tab, like in the next image and simply create the script.
The default script is named NewBehaviourScript and come with this source code:

You can see the class NewBehaviourScript calls to the Unity Engine ( see: using UnityEngine).
Also two functions:
Start() – this is called when the scene first launches and Update() – This is called in every frame that the game runs.
Unity 3D will rewrite the class name in your C# script when you will rename your script in the Project panel.
You can create new scripts and also can be used to call different features of the game engine.
Foe example you can create one new script to move, rotate or scale one object from Unity 3D Engine.

Posted in All, C#, Game engine, Unity 3D, Windows 7, Windows 8. Tagged with , , , , , , .

Google Apps Script – google maps – part 003.

The Maps Services service allows scripts to generate static maps, find directions, convert addresses into geocode coordinates, and sample elevations.

This is a simple example about how to make one static map using data from one spreadsheet.

Also you need to follow this tutorial.

I put all comments on script to make simple to read the source code and how it’s working.


The full source code of this tutorial :

Posted in All, Google Apps Script, Programming. Tagged with , , , .

Programming with FASM – first steps .

The FASM is a self-assembling open-source 80×86 assembler for

DOS, Windows and Linux. It supports all 8086-80486/Pentium instructions

with MMX, SSE, SSE2 and with more features.

FASM contains many programming options and features.

The source code can be written in different ways because of control

directives, macros and management of resources.

FASM, by default uses the Intel syntax for the assembly


You can go on and download it.

Below we see the files that are used by fasm.

The FASMW is a GUI to help in programming, as shown here.

fasmw GUI

Let’s see some example and how this working…

In this first example you will see a message box.

See result in image show below:

fasm message box

First line include some macro – functions.

If the source code is another folder, like for example in a folder

named asm in same folder with INCLUDE, then you need to declare this

macros in this way:

As you see the fasm is not case sensitive , in this case.

The next two lines are data declarations.

Code execution takes place between the two labels:

Code between these labels is written in assembler and can be easy


If you think it is easy then let’s see a second example, here’s the

source code:

It seemed more complicated and structured differently from the first


Let’s see the result.

fasm another example

As I said above, fasm – The flat assembler is a series of directives

and special words.

That help us if we know, if not then we use what we know.

Let’s look the source code of the second example and try to understand

it a bit.

Tihis tell us about creating PE file for the x86-64 architecture or if

you want use PE64 keyword instead of PE in the format declaration

This select the Portable Executable output format and will be a console


Also can be console or GUI for Windows applications,

native for Windows drivers, EFI, EFIboot or

EFIruntime for the UEFI or optional DLL and


Next entry directive sets the entry point for MZ executable.

The section directive defines a new section and it should be

followed by flags.

We have three sections in this instance one for data, one for code and

one for other data

Other source code lines are easily recognized by how they were reported

in these sections.

I hope you enjoyed the tutorial, I will expect you to come and other


Use the contact page to write

Posted in Assembler, Programming, Windows 7. Tagged with , , , , .