2011-09-07

Fairy

Loading...

2011-07-10

We The Humans – Some perspectives

Since I was a little kid I had a tendency towards the philosophy. Although, I recently graduated as a M.S. in IT, I always had trouble with exact sciences. But I have a curious nature and from time to time I fuse some ideas.

The key points of the discussion:

  • In a shrinking population, the solidarity produces collapse.
  • Businesses should move around the people and not people around the businesses.
  • Licensing is against us by some of us.

Demography

I think about demography. We already are so many on this Earth. But that is not an accident. Human societies are based on solidarity. Solidarity works if the population stays at the same level or gets larger. In a shrinking population, the solidarity produces collapse. I observe some tendencies towards the disruption of solidarity, but nevertheless, the countries that have a shrinking population struggle with the adverse effects of the solidarity.

Business Models

The more educated people are, the worst is for businesses. You see, a big chunk of all the businesses are based on demand from the uneducated people. An educated human requires higher salary and better products and services. Businesses should move around the people and not people around the businesses. The businesses that do not adapt will and should die. A lot of business holders complain that the society is not providing adequate qualified work force they need in their businesses. People don’t owe them anything, their business model is outdated and their thinking is remnant from times of slavery. They want people to lack education, so they can pay them miserable salaries and have them do miserable jobs. Otherwise, they need to invest in high end technologies to do these tasks and pay a lot more the people who develop and maintain these technologies.

Licensing

Licensing is a restriction in the path of the natural need of sharing we the humans have. Licensing is against us by some of us. It’s a barrier that stifles innovation and tempers our education. The tendency to protect the knowledge exists in our societies since forever because of our selfishness and the feeling of power it provides. Copyright is the worst form of licensing, protecting income of few against the rest of us. Licenses that grant freedom, are there to combat copyright, basically stating that a thing is not to be copyrighted.

2011-07-03

Assassination of a High School President


Image courtesy of The Internet Movie Database

I have just seen the Assassination of a High School President. The film is ok, but what is more interesting is the sound of the movie. I have created a playlist in my grooveshark widget with it: Stellastarr*, Goldfrapp, Band of Horses and many others. It's a world of music out there that is hidden by the media outlets that play over and over again the same crap.

Note: A media outlet is a publication or broadcast program that transmits feature stories and news to the public through various distribution channels.

2011-05-22

Tetris

I have made some small modifications to the Tetris for Windows.
You can download it from BOX or from one of my sites xunrage.uv.ro.



2011-04-21

Bizarre You, Bizarre Me (Remastered)


Bizarre You, Bizarre Me
The luscious silver of your eyes is seen in your sandy iron heart,
And the moist gold of your lips is lost in your mordant blue kiss.
With tears like a burnt ashlar,
I deplete the pale sky of its remorses,
In the footfall of the time who silently passes...
Like a holler, beside the love of velvet that sears.

2011-04-10

Problema Chio

Caută banii în pungă. 325000 de bancnote te aşteaptă. Valoarea totală a premiilor este 600000 RON. Valorile bancnotelor sunt 1, 5, 10, 50 şi 100 RON.
Întrebare: Câte bancnote din fiecare tip sunt?
Răspuns: Există prea multe soluţii pentru a şti câte bancnote din fiecare tip sunt.
Analiza problemei:
Valoarea medie este 1.84615, ceea ce ne indică faptul că foarte probabil sunt foarte multe bancnote de 1 RON. Suma se divide la toate valorile bancnotelor, prin urmare ar putea fi plătită numai cu un singur tip de bancnotă, exceptând bancnota de 1 RON pentru care este nevoie de un număr mai mare de bancnote decât 325000. Acest calcul ne spune cât este numărul maxim de bancnote din fiecare tip: 325000 pentru bancnota de 1 RON, 120000 pentru bancnota de 5 RON, 60000 pentru bancnota de 10 RON, 12000 pentru bancnota de 50 RON şi 6000 pentru bancnota de 100 RON.
Dacă notăm cu e numărul de bancnote de 100 RON, cu d numărul de bancnote de 50 RON, cu c numărul de bancnote de 10 RON, cu b numărul de bancnote de 5 RON şi cu a numărul de bancnote de 1 RON, atunci avem două ecuaţii:
a + 5b + 10c + 50d + 100e = 600000
a + b + c + d + e = 325000
Dacă am dori să plătim suma cu cele mai mici bancnote, atunci avem soluţia: 68750 bancnote de 5 RON şi 256250 bancnote de 1 RON.
Dacă vedem spaţiul numeric în care căutăm ca un contor e-d-c-b-a cu valoarea minimă 0-0-0-0-0 şi valoarea maximă 6000-12000-60000-120000-325000, atunci valoarea 0-0-0-68750-256250 este cea mai mică valoare care este şi soluţie. Cea mai mare valoare care este şi soluţie este 6000-0-0-0-0. Este interesant faptul că nu găsim nici o soluţie între 2777-1-0-7-322216 şi 5999-12000-60000-120000-325000, inclusiv. Acest lucru înseamnă că cea mai mare valoare care foloseşte şi alte bancnote decât cea de 100 de RON este 2777-1-0-7-322215. Cea mai mare valoare care foloseşte toate bancnotele este 2776-3-1-5-322215. Disproporţia între numărul de bancnote de 100 RON şi următoarele 3 ca valoare ne spune că numărul de bancnote de 100 de RON s-a ales probabil pe la jumătatea valorii maxime.
Câteva valori posibile: 1500-1500-2000-8750-311250, 1000-2000-3000-12750-306250 sau 1000-2000-6000-6000-310000.

2011-03-24

Jocuri Sociale Online

Sora mea dorește să realizeze un sondaj online despre jocuri sociale.
Dați clic pe imaginea de mai jos dacă doriți să participați.

2011-03-06

Girl in red dress

It was somewhat more difficult to reconstruct a file protected with DOSWF 4.8.5. The decryption and decompilation were easy, but names in action script and those for sprites were unusable. That required a way to rename everything. The flash source file generated with Sothink SWF Decompiler 6, does not recompile identically with the original file, therefore I have only inserted the recompiled action script segment in the result file along with all the name changes.

Maid fashion

I have successfully decrypted, decompiled and recompiled a file protected with DOSWF 4.5.3.

2011-02-17

Natalie Chandra

This is a clip from Youtube with Chapter II featuring Natalie Chandra. This is an exotic melody that I have first discovered on GrooveShark.

2011-02-12

Stringmare


In highschool, when I started programming, there was Turbo Pascal 7 from Borland. We were taught about two data types: Char and String. Char had a representation in memory of 1 byte. A string could be seen as a sequence of chars, an array of chars or just a text literal. When it comes to the visual representation of a string, it was simply used the code page 437 also known as DOS-US, where the lower 128 symbols are the ASCII symbols, except for the first 32 symbols that in ASCII are not printable, and the upper 128 symbols are a fancy selection. A string could have only 255 characters at most. To change a code point to a visual reprezentation (1 byte integer value to the corresponding 1 byte character) the built in function CHR was used. To change a visual representation to a code point the built in function ORD was used. The string was indexed starting with 1, the value at index 0 was the size of the string. This was it.
Later this kind of string become a ShortString and String was an alias of an AnsiString. Hopefully the Char remained unchanged, but was called an AnsiChar. The visual representation of the lower 128 symbols is the representation of the ASCII symbols. The visual representation of the upper 128 symbols, however depends of the code page used. In Windows the most popular is Windows-1252 (West European Latin). Other Windows codepages are: Windows-1250(Central and East European Latin), Windows 1251(Cyrillic), Windows-1253(Greek), Windows-1254(Turkish), Windows-1255(Hebrew), Windows-1256(Arabic), Windows-1257(Baltic), Windows-1258(Vietnamese) and Windows-874(Thai). AnsiString brought cool new features: size up to 2GB, reference counting, dynamic memory management, null termination. Because of all these, it was often more convenient to pass strings around than byte arrays.
In the last versions of Delphi, things got ugly. The Char type changed to WideChar, a 2-byte memory representation. The String type become a WideString, a sequence of WideChars. The 2-byte character now permits the represenation of Unicode Basic Multilingual Plane. The thing is that most text files from the harddrive are without a specified encoding or a Byte Order Mark(BOM), and that defaults to Windows-1252 in most cases. Reading such a file and displaying it in an Unicode program it's harder. Even worse is the fact that the CHR function don't work for the AnsiChar anymore, and it's pretty useless for WideChar too (as far as the Delphi help explains it). What saves the day is the typecasting to AnsiChar of an integer value, or typecasting to AnsiChar of a WideChar value with some data loss, or even an implicit typecasting to a WideChar from an AnsiChar. What is strange is that VCL components still use the Font and Code Page properties that were used before Unicode was introduced.

2011-01-19

Diacritice

În Română există 10 diacritice, 5 litere mari şi 5 litere mici.
Iată un tabel cu aceste caractere:


GliphUnicodeUTF-8Denumire
ĂU+0102C482Latin Capital Letter A With Breve
ăU+0103C483Latin Small Letter A With Breve
ÂU+00C2C382Latin Capital Letter A With Circumflex
âU+00E2C3A2Latin Small Letter A With Circumflex
ÎU+00CEC38ELatin Capital Letter I With Circumflex
îU+00EEC3AELatin Small Letter I With Circumplex
ȘU+0218C898Latin Capital Letter S With Comma Below
șU+0219C899Latin Small Letter S With Comma Below
ȚU+021AC89ALatin Capital Letter T With Comma Below
țU+021BC89BLatin Small Letter T With Comma Below


Caracterele "Ș" şi "Ț" nu au fost disponibile de la început, şi s-au folosit adesea înlocuitorii cu sedilă.


GliphUnicodeUTF-8Denumire
ŞU+015EC59ELatin Capital Letter S With Cedilla
şU+015FC59FLatin Small Letter S With Cedilla
ŢU+0162C5A2Latin Capital Letter T With Cedilla
ţU+0163C5A3Latin Small Letter T With Cedilla


2011-01-06

Convert EPS to SVG

Although I use Inkscape and Scribus and both have the option to import EPS files, they do a lame job: Inkscape converts the EPS to a static image and Scribus converts a very small amount from the original file.
Therefore I found that a detour to PDF helps in achieving better results. The key program here is GhostScript. The command is:

"c:\program files\gs\gs9.00\bin\gswin32c.exe" -sDEVICE=pdfwrite -sPAPERSIZE=a3 -o c:\tmp\vector.pdf c:\tmp\vector.eps

Some values for PAPERSIZE argument:
PAPERSIZEX inchesY inchesX cmY cm
a033.055646.777883.9611118.816
a123.388933.055659.407883.9611
a216.527823.388941.980659.4078
a311.694416.527829.703941.9806
a48.2638911.694420.990329.7039
a55.847228.2638914.851920.9903
letter8.51121.5927.94
legal8.51421.5935.56

After the file is in PDF format, Inkscape does a good job importing it. After import I save the result as a plain SVG to edit SVG file with Scribus. The problem that bothers me so far is that after conversion from PDF the shapes lose gradient information.