Wednesday, February 11, 2015

Getting Access Denied when accessing application data folder in Windows 7

Problem:
C:\Users\<ME AS ADMINSTRATOR>\AppData\Local\Application Data is not accessible

Those are junction points : hidden, protected operating system files that are not meant to be accessed by users.
Each one points to a user-accessible folder:

Real path is as follows:

Application Data - C:\Users\{user name}\AppData\Roaming
Cookies - C:\Users\{user name}\AppData\Roaming\Microsoft\Windows\Cookies
History - C:\Users\{user name}\AppData\Local\Microsoft\Windows\History
Local Settings - C:\Users\{user name}\AppData\Local
My Documents - C:\Users\{user name}\Documents
NetHood - C:\Users\{user name}\AppData\Roaming\Microsoft\Windows\Network Shortcuts
PrintHood - C:\Users\{user name}\AppData\Roaming\Microsoft\Windows\Printer Shortcuts
Recent - C:\Users\{user name}\AppData\Roaming\Microsoft\Windows\Recent
SendTo - C:\Users\{user name}\AppData\Roaming\Microsoft\Windows\SendTo
Start Menu - C:\Users\{user name}\AppData\Roaming\Microsoft\Windows\Start Menu
Templates - C:\Users\{user name}\AppData\Roaming
Temporary Internet Files - C:\Users\{user name}\AppData\Local\Microsoft\Windows\Temporary Internet Files

Laptop wake up from sleep after closing the lip

I am using Toshiba Laptop with Windows 7.

Use tips from
http://www.howtogeek.com/122954/how-to-prevent-your-computer-from-waking-up-accidentally/

I turn off
Network adapters/Intel(R) Ethernet Connection I218-LM
Mice and other pointing devices/HID-compliant Mouse

[You could test whether you computer will be turned on with those devices after that]

Saturday, January 10, 2015

How Rainbow Table Works





Objective: 
Given a hash, get back the hash key.
Naive Way: 
1. Too much space - Have all mappings between plaintext and hash key (almost impossible - too large space)
2. Too much time - Trying one by one plaintext and try mapping
Rainbow Table:
Compromise between Space and Time


1.       Find the correct chain – Using the last column
2.       Getting the plain text – Using the first column
3.       1 failed or 2 failed, try again
What if we use R rather than R1,R2,R3?


Sunday, December 14, 2014

Regular Expression - replace group

I have a html
<a href="cc.ccs"/><a href="bb.ccs"/><a href="#"/>

I want to replace the non # href so that it become
<a href="my_cc.ccs"/><a href="my_bb.ccs"/><a href="#"/>

print re.sub(
r"href=\"([^#].*)\"", 
r"href=\"my_\g<1>",
r"<a href=\"my_cc.ccs\"/><a href=\"my_bb.ccs\"/><a href=\"#\"/>")

Saturday, December 6, 2014

Open second winedt

http://tex.stackexchange.com/questions/11374/running-multiple-winedt-processes-on-windows-7-x64

Monday, December 1, 2014

Installation of Apache ODE on Windows 7

1. Use latest JRuby
2. Use latest JDK
3. Use Tomcat 6.0

Guideline of installation is here
http://ode.apache.org/developerguide/building-ode.html

---Some meta information for myself, not sure whether it is useful---
For rewriting (just rewriting it)

Installing Source of Apache ODE
My current version jdk 1.7 Update 51

Using latest junit
Set the java_home to jdk
Install buildr
Run buildr


macos with JDK 1.5 and JDK 1.6) is
buildr 1.4.4, jruby 1.5.1 (ruby 1.8.7 patchlevel 174).



jruby -S gem install buildr -v 1.4.4
jruby -S gem install buildr --verbose


cd c:\
buildr package test=no

buildr test

buildr eclipse

Setup Java Web service Service

  1. Create Dynamic Web Project
    1. Configuration -> Axis2
  1. Create src file
  2. Create Web Service
    1. Choose Operator Class
    2. Choose Apache Axis2
    3. After all start server

  1. Right Click Project, Right On Server, Copy the URL
Details can be found here: