<script type="text/javascript">
$(document).ready(function () {
setHeartbeat();
});
function setHeartbeat() {
setTimeout("heartbeat()", 300000); // every 5 min
}
function heartbeat() {
$.get(
"/SessionExtender.ashx",
null,
function (data) {
setHeartbeat();
},
"json"
);
}
</script>
Saturday, August 21, 2010
Wednesday, August 11, 2010
Confucius
quote from Confucius' book Genuine Living says, "Developing in accordance with one's own nature is called "the way of self-realization." Proper pursuit of the way of self-realization is called "maturation"." In this quote, I believe Confucius proposes education for a but subject matter and form for that education would vary according to one's own nature. C.T.M.A.T.M. 78 At Confucius' own school, he would not teach "duflards", and would "only teach those who were bursting with eagerness for enlightenment." However he would not turn someone away because they had no money.
http://www.qddx.gov.cn/n435777/n435782/n435826/n436845/n436862/5307.html
http://www.qddx.gov.cn/n435777/n435782/n435826/n436845/n436862/5307.html
Monday, August 9, 2010
Pressing enter in textbox asp.net
<INPUT type="text" style="VISIBILITY: hidden;POSITION: absolute">
Start debugging again. You cannot see the second textbox, and everything looks like before. Try again to write something in first textbox. If you press enter now, form will submit, and your code for button's click event will now be executed. This is extremely different behavior, and you did nothing except you placed one invisible textbox on web form. :)
Start debugging again. You cannot see the second textbox, and everything looks like before. Try again to write something in first textbox. If you press enter now, form will submit, and your code for button's click event will now be executed. This is extremely different behavior, and you did nothing except you placed one invisible textbox on web form. :)
Sunday, August 1, 2010
Compiling mobile apps
Blackberry
1. Clean project
2. Project -> Blackberry -> Package All
3. *the program should automatically launch code signer
4. Inside Blackberry Manager, locate the ALX file and have it uploaded
iPhone
1. Download the latest version
2. Double click and launch the xcode project file
3. debug first and run on simulator (this is important)
4. if it works, connect the iphone
5. Select release (it will show base sdk is missing)
6. Select device
7. BUILD!
1. Clean project
2. Project -> Blackberry -> Package All
3. *the program should automatically launch code signer
4. Inside Blackberry Manager, locate the ALX file and have it uploaded
iPhone
1. Download the latest version
2. Double click and launch the xcode project file
3. debug first and run on simulator (this is important)
4. if it works, connect the iphone
5. Select release (it will show base sdk is missing)
6. Select device
7. BUILD!
Thursday, July 29, 2010
Thursday, July 22, 2010
Android Camera Picture Errors
Its important to createnewfile(), because it creates the file. also it is important that during testing, the sdcard is unmount, there will be an exception about the parent directory being unreachable.
This can be potentially useful:
http://stackoverflow.com/questions/1431042/problem-in-creating-temporary-file-in-android
File photo = new File(Environment.getExternalStorageDirectory(),"modcloth/placeholder.jpg");
try {
photo.createNewFile();
FileOutputStream fileOutputStream = new FileOutputStream(photo.getPath());
BitmapFactory.Options options=new BitmapFactory.Options();
options.inSampleSize = 5; // sets image quality
Bitmap myImage = BitmapFactory.decodeByteArray(imageData, 0, imageData.length,options);
BufferedOutputStream bos = new BufferedOutputStream(fileOutputStream);
myImage.compress(CompressFormat.JPEG, quality, bos);
bos.flush();
bos.close();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
This can be potentially useful:
http://stackoverflow.com/questions/1431042/problem-in-creating-temporary-file-in-android
File photo = new File(Environment.getExternalStorageDirectory(),"modcloth/placeholder.jpg");
try {
photo.createNewFile();
FileOutputStream fileOutputStream = new FileOutputStream(photo.getPath());
BitmapFactory.Options options=new BitmapFactory.Options();
options.inSampleSize = 5; // sets image quality
Bitmap myImage = BitmapFactory.decodeByteArray(imageData, 0, imageData.length,options);
BufferedOutputStream bos = new BufferedOutputStream(fileOutputStream);
myImage.compress(CompressFormat.JPEG, quality, bos);
bos.flush();
bos.close();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
Saturday, July 3, 2010
Placing Div above flash
place: "wmode", "transparent"
inside the following areas:
AC_FL_RunContent
<param name="wmode" value="transparent" />
inside the following areas:
AC_FL_RunContent
<param name="wmode" value="transparent" />
Subscribe to:
Posts (Atom)