Category Archives: Windows 8

Android calendar application example – part 1.

This is a simple example about using widget calendar under Andoid OS.
Can be easy to do it if you know the basic of the programming.
First you need to make one application ( I use Android Studio – version 0.5.1).
Let’s see my example:
My application use:
the class is :
public class MainActivity extends ActionBarActivity
the project is set with this :
com.example.calendar.app
the widget is : CalendarView
I make this changes into this source files :

  • MainActivity,java
  • AndroidManifest.xml
  • activity_main.xml
  • main.xml
  • strings.xml

Let’s see the source code for this files:
The result working well. Also you can see in this picture the calendar result …

MainActivity.java



AndroidManifest.xml



activity_main.xml



main.xml



strings.xml



The result working well. Also you can see in this picture the calendar result …


android_calendar_001

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

Windows cmd – verifier .

The command verifier it’s one great tool that is included in every version of Windows since Windows 2000.
Is used to detect and troubleshoot many driver issues that are known to cause system corruption, failures, or other unpredictable behavior.
Also this is not working like antivirus or another tool to fix your operating system.
In Windows 7 and later versions of the Windows operating system, all the features of Enhanced I/O Verification are included as part of I/O Verification.
So it’s not necessary to select the Enhanced I/O Verification option in Driver Verifier Manager or from the command line.
Just run it into command prompt and will see something like this :
verifier

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

Android gps application example – part 1.

This is a simple example about gps under Android OS.

I make this tutorial few days ago.

It’s easy and simple to do that. Is like any project under Android OS.

I use Android Studio but you can use Eclipse also…

Anter you open the new project you need to use the next source code.

Using Android Studio can be hard if you don’t know how this IDE link java source code.

So , your project will be named : SimpleLocation and main activity will be like this :

public class LocationActivity extends Activity implements LocationListener

First the LocationActivity.java file:

Also you can make two projects to see the diff and you will understand well how is working this …

…and AndroidManifest.xml :

finally the last file main.xml:

The GPS and A-GPS is something different so read all specification about your hardware device.

Finally the result will be something like this.

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

My first logger python script to record keys .

Few days ago I worked with one issue : keyboard logger .
My first dilemma was: to use assemblly language or something simple like python.
My option was python – simple and fast to test how to deal with this issue.
About logger : A keyboard Logger is intended to record the keystrokes that a user inputs on a computer keyboard in addition to other user actions.
I make simple script after I search about how to deal with this.
You can see my script is simple and can be use if you want to record Python Interactive Interpreter.
I don’t finish it , some keys like : backspace or enter will be put into log file.
So if you deal very well with python don’t use this keys…
Anyway if I want to finish this then I need to fix this …
Let’s see the python script:

Let’s see the result of this :

The output log text file …:

Posted in All, Programming, Python, Windows 8. Tagged with , , , , .

CRYENGINE – about Lua programming – part 1.

First I make this tutorial because lua language is used not only CryEngine …
Most game engines used this language programming.
Because I used the 64 bits into Cry Engine I will use the LuaCompiler from this folder :
C:\CRYENGINE\Bin64>LuaCompiler.exe
About Lua if you read the official website you will see this :
Lua is a powerful, fast, lightweight, embeddable scripting language.
Lua combines simple procedural syntax with powerful data description constructs based on associative arrays and extensible semantics. Lua is dynamically typed, runs by interpreting bytecode for a register-based virtual machine, and has automatic memory management with incremental garbage collection, making it ideal for configuration, scripting, and rapid prototyping.

Also you can read about lua and windows OS here :
Now let’s make a simple example with this programming language.
First we need to deal with three file type: .cgf , .lua and .ent .
The .cgf cry engine file is a file will load into game.
The .lua file is a lua program file.
… and .ent file is a cry engine file ( entity file ).
So I make this files : test001.ent and test001.lua.
I save the test001.ent with this path : C:\CRYENGINE\GameSDK\Entities
and test001.lua come with this path: C:\CRYENGINE\GameSDK\Scripts\Entities\Physics
The content of the test001.ent:

The content of the test001.lua:

The next step is to open your Cry Engine Editor and will see your script working.
cryengine-test001
Now about the lua script ( test001.lua) is very simple to understand how it’s working.
First line is the name , in this case is test001.
All about this is store with {} and after that will come the functions: OnInit , OnReset and PhysicalizeThis.
Because all this functions come from test001 then the syntax is: test001:your_function() and will end with this word: end.
Also be advice about ; and , under Properties and after that is need to see how is the diff when we use:
self: and self.
All of this tips can be found if you read the test001.lua and try to understand that script.
Also you need to following prefixes on the value name…
Prefix Type
b – boolean
f – float
i – integer
s – string
clr – color
object_ – an object compatible with CryENGINE: a CFG, CGA, CHR or CDF file

You also can read this webpage.

Posted in 3D, All, Game engine, Programming, Windows 8. Tagged with , , , .