2011년 11월 10일 목요일

HTML5 Example - Web SQL.

 Here is an HTML5 Web SQL example. This is from www.html5rocks.com.


<!DOCTYPE html>
<html>
  <head>
    <style>
      body {
        color: #222;
        font: 14px Arial;
      }
      
      body a {
        color: #3D5C9D;
        text-decoration: none;
      }
    </style>
    <script>
      var html5rocks = {};
      html5rocks.webdb = {};
      html5rocks.webdb.db = null;
      
      html5rocks.webdb.open = function() {
        var dbSize = 5 * 1024 * 1024; // 5MB
        html5rocks.webdb.db = openDatabase("Todo", "1.0", "Todo manager", dbSize);
      }
      
      html5rocks.webdb.createTable = function() {
        var db = html5rocks.webdb.db;
        db.transaction(function(tx) {
          tx.executeSql("CREATE TABLE IF NOT EXISTS todo(ID INTEGER PRIMARY KEY ASC, todo TEXT, added_on DATETIME)", []);
        });
      }
      
      html5rocks.webdb.addTodo = function(todoText) {
        var db = html5rocks.webdb.db;
        db.transaction(function(tx){
          var addedOn = new Date();
          tx.executeSql("INSERT INTO todo(todo, added_on) VALUES (?,?)",
              [todoText, addedOn],
              html5rocks.webdb.onSuccess,
              html5rocks.webdb.onError);
         });
      }
      
      html5rocks.webdb.onError = function(tx, e) {
        alert("There has been an error: " + e.message);
      }
      
      html5rocks.webdb.onSuccess = function(tx, r) {
        // re-render the data.
        html5rocks.webdb.getAllTodoItems(loadTodoItems);
      }
      
      
      html5rocks.webdb.getAllTodoItems = function(renderFunc) {
        var db = html5rocks.webdb.db;
        db.transaction(function(tx) {
          tx.executeSql("SELECT * FROM todo", [], renderFunc,
              html5rocks.webdb.onError);
        });
      }
      
      html5rocks.webdb.deleteTodo = function(id) {
        var db = html5rocks.webdb.db;
        db.transaction(function(tx){
          tx.executeSql("DELETE FROM todo WHERE ID=?", [id],
              html5rocks.webdb.onSuccess,
              html5rocks.webdb.onError);
          });
      }
      
      function loadTodoItems(tx, rs) {
        var rowOutput = "";
        var todoItems = document.getElementById("todoItems");
        for (var i=0; i < rs.rows.length; i++) {
          rowOutput += renderTodo(rs.rows.item(i));
        }
      
        todoItems.innerHTML = rowOutput;
      }
      
      function renderTodo(row) {
        return "<li>" + row.todo  + " [<a href='javascript:void(0);'  onclick='html5rocks.webdb.deleteTodo(" + row.ID +");'>Delete</a>]</li>";
      }
      
      function init() {
        html5rocks.webdb.open();
        html5rocks.webdb.createTable();
        html5rocks.webdb.getAllTodoItems(loadTodoItems);
      }
      
      function addTodo() {
        var todo = document.getElementById("todo");
        html5rocks.webdb.addTodo(todo.value);
        todo.value = "";
      }
    </script>
  </head>
  <body onload="init();">
    <ul id="todoItems">
    </ul>
    <form type="post" onsubmit="addTodo(); return false;">
      <input type="text" id="todo" name="todo" placeholder="What do you need to do?" style="width: 200px;" />
      <input type="submit" value="Add Todo Item"/>
    </form>
  </body>
</html>


 Type this code and save it html5_websql.html. Open this file at your browser, I recommend Google chrome or Firefox not IE to test.


 Add some todos in test page, and close your browser and reopen this example. Your previous input will be alived.


2011년 11월 6일 일요일

How to Detect Mobile Browser

If users access your web system through mobile browser, you might like to redirect the access of them.

Follow this link, and download script file.

http://detectmobilebrowsers.com/

2011년 11월 2일 수요일

FIFA Manager 12 Player Stats Hex Location

  • How to Find any player's data in Memory

 If you want to edit your player, first, write down player's stat from "Shot power" to "Man Marking", like this. But here is very important point, that is the sequence. The stat "Free kicks" is not followed by "Foward runs" but "Finishing". You can compare the sequence of stats from next chapter's excel like table with the one on your game screen. I think you can undestand what I'm saying.


 And convert your values to Hex decimal. Find it with Memory editor.


 There are several locations related to your player. Because FIFA Manager 12 stores the player's stats each week like a snapshot. So edit "Shot power" value and check your editing was applied in game correctly. If not, recover to its original value and find next one.
  • Player's stats Hex Location
 This is Hex Location of each player's in memory. You can use this location information when editing player's stats with memory editor.



  • Userful Information

My previous posts can be helpful with this stats editing.


How to edit Player's characters


How to edit Player's Age



  • Be warned

 I found that editing young player below age 20 can cause stat drop. Each player's stat can be downed -2 ~ -3 per a week. After half season has passed, that player would become useless than before. So it would be better you edit your player's age to 23~24 yrs.


 Some fan of this game found that age 23~24 player's stat is not downed.



FIFA Manager 12 Money Cheat (Easy way)

This is a easy way how to increase manager's money, no momory editing.





2011년 10월 20일 목요일

FIFA Manager 12 Players Birth day

 The birthday of each football players in FIFA Manager 12 stores in a fashion of Julian Date. Since AD 1585, we've used Gregorian Calendar. So the stored value is very strange.

For example, a player was born in 1984. 7. 21.

Generally, it stores as decimal value 30844. This value means the elapsed days from AD 1600.1.1. But in FIFA Manager 12, stores 2445903. It means the elapsed days from AD 0.1.1.

If you edit a player's stat with in-memory-value editing, you must consider this fact.

It may help you to find some sites which has a special calculator;Gregorian Date to Julian Data converter.


This is the site it distributes Julian date converter.
Go

It can be helpful for you.
(This site is not commercial site. You can easily download utility from them)

How to use TSearch Memory Editor

 I think TSearch program is the only one has powerful functions after Gamehack 2.0. It can search in-memory-values on both 32bit and 64bit OS.


Step 1. Find Program and Install it

 The developer or studio of TSearch has no homepage. But many people has it in their PC. Search at Google or your favorite search engine. You must be careful, there are so many fake or infected programs on the net.








This is TSearch Program.










Step 2. Select your process.

 Click "Open Process" on the tool bar. And select the process name. Now we can access its local memory area.







This is selecting process.

I erased some process names related to my privacy.







Step 3. Find a value.

 Now let's find somethins. Click maginifying glass icon below toolbar. Most cases you know the exact value. Then choose exact value. But if you don't know the exact value,  choose "Unknown" or "Range". We can check the differences after modifying it in the game or program.






"4 bytes" is enough for me long ago.












I found so many results. I typed "0".








Step 4. Change its value and Research

 The mechanism of tracking the memory location is "difference check". Now we must make its value to be changed.

 For example, in game, your character has one-bucks in his pocket. But you don't satisfy such a poverty. Then you search a value "10" at TSearch. And sell something to increase money amout to 11$. Now you search "11" on previous search result.







Never be confused with left icon.
We can search again, on previos result.







Step 5. Reduce the count of result as less as possible.

 Repeat change and research. Because some values are so common on the memory.
After repeating any times, you can find only 1~3 result. Its count will not be changed.

 This is the real location of your value. Doubleclick the result line, and modify it at right table. And check the modified value has been applied exactly in your program. If it is not, select another location at left table and modify again.

Trick1. Encrypted value

 Some programs store its value with encryption. If you are lucky, you can find its location. Because TSearch provide the difference check feature.

 For example, value "10" is stored as "1A0A" after encryption. And you change its value to "11". If the algorithm of encryption is simple, the encrypted value would be "original" + 1.

Trick2. Long Range value.

 Sometimes you want to find the series of values. Then use the Hexeditor. You can find it on the tool bar. For example, one record of DB table can be mapped to a chunk of memory. So the value of field may be stored linearly. This situation, Hex editor is more useful.

2011년 10월 19일 수요일

FIFA Manager 12 Player Character Byte order

The footballers character is consist of 8 byte.
( = 4digits of Hexadecimal XX XX )

1st Digit

10 Flexibility
20 Inflexibility
30 10 + 20
40 Ambitious
50 40 + 10
60 40 + 20
70 40 + 10 + 20
80 High work rate
90 80 + 10
a0 80 + 20
b0 80 + 10 + 20
c0 80 + 40
d0 80 + 40 + 10
e0 80 + 40 + 20
f0 80 + 40 + 10 + 20


2nd Digit



01 Attitude win
02 Complacent
03 01+02
04 Nerves of steel
05 04 + 01
06 04 + 02
07 04 + 01 + 02
08 Week nerves
09 08 + 01
0a 08 + 02
0b 08 + 01 + 02
0c 08 + 04
0d 08 + 04 + 01
0e 08 + 04 + 02
0f 08 + 04 + 01 + 02



3rd Digit

10 Sportsmanship
20 Hardman
30 10 + 20
40 Introvert
50 04 + 01
60 04 + 02
70 04 + 01 + 02
80 High club identification
90 08 + 01
a0 08 + 02
b0 08 + 01 + 02
c0 08 + 04
d0 08 + 04 + 01
e0 08 + 04 + 02
f0 08 + 04 + 01 + 02

4th Digit


01 Low club identification
02 Language genius
03 01 + 02
04 Media darling
05 04 + 01
06 04 + 02
07 04 + 01 + 02
08 Scandal prone
09 08 + 01
0a 08 + 02
0b 08 + 01 +02
0c 08 + 04
0d 08 + 04 + 01
0e 08 + 04 + 02
0f 08 + 04 + 01 + 02


For example, the 4-digit value is "9096".
Then the character of player is,

High work rate + Flexibility + High club identification + Sportsmanship + Media darling + Language genius

This post can be helpful for you. --> Go

2011년 10월 18일 화요일

Amazon EC2 Automated Deploy Idea



You can add or scale out your virtual machine easily on Amazon EC2.
This characteristic is a  big burden for designing a automated and flexible deploy workflow or deploy module.

Then, revise the Amazon web services.
You can access Amazon web services by some 3rd party library.
And get the instance list (= server list), collect destination IP address for coping your web application.

I suggest, every web application on your system has the security group for its own.

Everytime, whether your machine added or not, whether your system scaled ouy automatically, you can get the exact server list at deploy time.

Amazon EC2 Coherence Member join failure trouble shooting

"Why my coherence member can not join with cluster?"

This is due to the disabled ICMP OS service at Amazon virtual machine.

The member detection mechanism of Coherence is wrapped ICMP;TCMP. So, if the OS can't communicate with each other through ICMP, Coherence member join would be failed.

Follow these steps.

1. Enabling, ICMP Echo request Protocol
2. Check the iptables, open 7th port TCP/UDP inbound/outbound.
3. OS Service start
  $> chconfig echo-dram on
  $> chconfig echo-stream on

This solution will be heplful on other PaaS Services, which allow only UNICAST in their virtual LAN.

FIFA Manager 12 Money Cheat

This is how to cheat game money, FIFA Manager 12 by memory editing.

If you don't hava any experience using memory editor, read my another post.

1. Install "TSearch" program.
2. Run "FIFA MANAGER 12"
3. Go to the menu, Personal Life -> Stock Market.
4. Buy some stocks, which is the most expensive.
5. Run TSearch program, and find the value you bought.
6. Return to the game, buy or sell some stocks.
7. Research the modified value.
8. Repeat 5~7 step, until you can see only 3 results.
9. When you can see only 3 results, modify the bottom value to 999999999
10. Return to the game, check the stock amount has been changed.
11. Sell most of your stock. Do not sell all of the stocks.
12. Go to TSearch, check the remains are same as game's. If it is not, back to 6 step.
13. Modify and sell stocks again until you think you are rich enough.
14. You can donate the money to the club, and do anything what you want.

FIFA Manager 12 is Electronic Arts's(EA) new game.



Below link describes more easier way. If you are in trouble with memory editing, follow this link

http://fahrenblue.blogspot.com/2011/11/fifa-manager-12-money-cheat-easy-way.html

FIFA Manager 12 돈 에딧 방법 (돈 늘리기)

FIFA MANAGER 12 에서 메모리 에딧으로 감독의 게임 머니를 증가시키는 방법입니다.

1. TSearch 를 다운 받아 실행할 준비 해둡니다.
2. 감독 개인 생활 메뉴로 가서, Stock Market 으로 갑니다.
3. 주당 가격이 가장 비싼 구단의 주식을 삽니다.
4. TSearch 에서 구매한 주식의 값을 Search 합니다.
5. 게임에서 주식을 더 구매합니다.
6. 4의 결과에서 증가한 주식의 수치만큼을 다시 검색합니다.
7. 결과가 3개가 될 때까지 5~6을 반복합니다.
8. 결과가 3개가 되면, 가장 밑에 있는 (메모리 주소값이 가장 큰) 것을 더블 클릭하여 999999999 로 고칩니다.
9. 게임으로 가서 주식을 9주만 남기고 모두 팝니다. 만약 모두 다 팔면 검색 과정을 다시 되풀이 해야 되므로 9주를 남깁니다.
10. TSearch 로 가면 99..99 인 값이 9로 되어 있을 겁니다. 이것을 다시 999999999 로 늘립니다.
11. 원하는 액수가 될 때까지 9~10 반복합니다.
12. 개인 자산이 늘어나면, 클럽에 기부 등을 하여 원하는 일을 할 수 있게 됩니다.

2011년 4월 21일 목요일

Could not open "jvm.cfg"

This problem occured because Window is suck.

You can fix this,

1) Open "regedit"
2) Go to path HKLM/SOFTWARE/Javasoft/JavaRuntimeEnvironment
3) See "CurrentVersion" key has value
4) Open sub-directory like the value of "CurrentVersion"
5) Fix the java-intalled-path