miercuri, 25 noiembrie 2009

Script Integration Test


sâmbătă, 21 noiembrie 2009

MinGW Developer Studio 2.05 cu MinGW 5.1.6

MinGW Developer Studio 2.05 de la Parinya Software are inclus o versiune de MinGW mai veche (posibil incepand cu 3.1.0-1 si mai mica decat 3.4.5, pentru ca __MINGW32_VERSION este 3.7, iar __W32API_VERSION este 3.2). In MinGW 5.1.6 __MINGW32_VERSION este 3.15.2, iar __W32API_VERSION este 3.13. Cele doua valori se gasesc in fisierele _mingw.h si w32api.h din directorul include. De fapt suita este interesanta de prezenta fisierelor g++.exe, gcc.exe si gdb.exe in directorul bin din cadrul directorului MinGW. GCC este o colectie de compilatoare, iar G++ este compilatorul pentru C++ din cadrul acestei colectii. In versiunea de MinGW care vine impreuna cu suita, compilatorul are versiunea 3.4.2, iar in MinGW 5.1.6 are versiunea 3.4.5. Pentru a afla versiunea se foloseste comanda:

gcc -dumpversion

Daca se doreste instalarea noii versiuni se descarca de pe situl http://www.mingw.org/ fisierul MinGW-5.1.6.exe. In momentul rularii, acest fisier va descarca pachetele necesare instalarii:

  • mingwrt-3.15.2-mingw32-dev.tar.gz,
  • mingwrt-3.15.2-mingw32-dll.tar.gz,
  • w32api-3.13-mingw32-dev.tar.gz,
  • binutils-2.20-1-mingw32-bin.tar.gz,
  • gcc-core-3.4.5-20060117-3.tar.gz,
  • gcc-g++-3.4.5-20060117-3.tar.gz,
  • gcc-g77-3.4.5-20060117-3.tar.gz,
  • gcc-ada-3.4.5-20060117-3.tar.gz,
  • gcc-java-3.4.5-20060117-3.tar.gz,
  • gcc-objc-3.4.5-20060117-3.tar.gz,
  • make-3.81-20090914-mingw32-bin.tar.gz.

Ne intereseaza numai G++ din cadrul GCC, prin urmare daca nu vom selecta si alte compilatoare atunci pachetele respective nu vor mai fi descarcate (G77, Ada, Java, Object C). Dupa instalare vom descarca gdb-5.2.1-1.exe din ramura GNU Source-Level Debugger, subramura Current Release_ gdb-5.2.1. Vom instala acest pachet in acelasi director unde am instalat si MinGW. Pentru MinGW Developer Studio nu este necesar sa fie instalat si pachetul care contine executabilul make.exe, asa cum este necesar pentru NetBeans. In general nu se recomanda amestecarea pachetelor MSYS cu cele MinGW. Daca este necesar executabilul make.exe, o solutie ar fi redenumirea fisierului mingw32-make.exe in make.exe.

Pentru a seta MinGW Developer Studio sa foloseasca noua versiune a compilatorului se va merge in meniu la Edit -> Options..., se alege tabul Compiler si apoi se introduce calea catre MinGW.

Daca programelul de mai jos se compileaza si se construieste fara probleme, atunci instalarea a avut succes. Este necesara o linie libera la urma pentru a nu avea o avertizare.

#include <iostream>
using namespace std;

int main(){
cout << "Hello world!"; }

marți, 3 noiembrie 2009

Kaze no Gekido

Wind's Fury, the translation of xunrage is written as "Kaze no Gekido" in Japanese. 

luni, 19 octombrie 2009

Hello world!

Blogger supports scripted forms:

duminică, 11 octombrie 2009

Javascript object functions runs on creation

Consider the code bellow:

function myfunction(){
document.write("I was executed.");
}
var f = new myfunction();

The function myfunction is used as a class for the object f, and is also executed at creation time.

The code produces this result:

Static variable in a Javascript object function

Consider the code bellow:

function myfunction(){
var myvariable=19.21;
this.mymethod = function(){ return myvariable; };
this.increase = function(amount){ myvariable+=amount; };
}
var f = new myfunction();
document.write("initial value is " + f.mymethod());
f.increase(0.80);
document.write("<br/>new value is " + f.mymethod());

Because the function myfunction is used as a class for the object f, the local variable myvariable is considered static, although it can be accessed only by member functions like mymethod and increase. Therefore this code produces something like this:

sâmbătă, 10 octombrie 2009

Test Java Presence

To detect if Java is enabled on your computer use the following code:
if(navigator.javaEnabled()){ ... }

Therefore you on your computer.

marți, 22 septembrie 2009

Detecting Internet Explorer version with Javascript


This post contains JavaScript.

I have found on the Internet the following function for detecting Internet Explorer version:

function vIE(){return (navigator.appName=='Microsoft Internet Explorer')?parseFloat((new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})")).exec(navigator.userAgent)[1]):-1;}
  • The property navigator.appName returns something like:
  • The property navigator.userAgent returns something like:
  • The function returns the conditional result of the expression <logical> ? <value_for_true> : <value_for_false>
  • Constructor RegExp creates a new object and defines a regular expression as: [0-9] defines a character set formed by any character in the range 0-9; {x,} defines the minimum x number of occurrences used in the match; () creates a subexpression.
  • RegExp.exec(string) returns an array of the matches of the regular expression in the given string or null if no match is found. The returned array contains both matches for the regular expresion as well as for present subexpressions. For this reason, the second element in the array is parsed to a float value and returned by the function.
Therefore your Internet Explorer version is:

Note: You may get a wrong version for Internet Explorer 8 if you use Compatibility View, as at the time of this writing Blogspot domain is in the Compatibility View List (more information at this page). Check the list by typing in the Internet Explorer 8 address bar: .

miercuri, 2 septembrie 2009

DKU-5 Driver

Although the Nokia DKU-5 cable is rather old, there is not a fair practice to not support it on Vista. After a few searches on the web, I have found a third party driver for this cable that works with Windows Vista SP2. I put it on MediaFire.

If you have a Nokia 3100 phone like I have, it's recommended to use Nokia PC Suite 6.84 with it because the latest version crashes when I try to install java applications.

This phone supports only MIDP-1.0 and CLDC-1.0 for java applications, 128x128 color display with 4096 colors and MIDI poliphonic sounds.

marți, 25 august 2009

Registry value types

Name

Type

Data

(Default)
BigEndian Value
Binary Value
DWORD Value
Expandable String Value
LittleEndian Value
Multi-String Value
None Value
String Value

REG_SZ
REG_DWORD_BIG_ENDIAN
REG_BINARY
REG_DWORD
REG_EXPAND_SZ
REG_DWORD
REG_MULTI_SZ
REG_NONE
REG_SZ

xunrage 
0xff000000
32
0x00000020
A text here
0x00000100
"Line One" "Line Two"
10 00 00
A text here

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\xunrage]
@="xunrage"
"BigEndian Value"=hex(5):ff,00,00,00
"Binary Value"=hex:32
"DWORD Value"=dword:00000020
"Expandable String Value"=hex(2):41,00,20,00,74,00,65,00,78,00,74,00,20,00,68,\
00,65,00,72,00,65,00,00,00
"LittleEndian Value"=dword:00000100
"Multi-String Value"=hex(7):4c,00,69,00,6e,00,65,00,20,00,4f,00,6e,00,65,00,00,\
00,4c,00,69,00,6e,00,65,00,20,00,54,00,77,00,6f,00,00,00,00,00
"None Value"=hex(0):10,00,00
"String Value"="A text here"

Twitter Updates