Remove task on Android device

Today, I found that how to remove our applications on android device task manager. It's very simple and same as "android:clearTaskOnLaunch".

[More]

CFDocument in fontembed

Last 3 days, I'm about to generate one of our reports to PDF with cfdocument but I don't know why our unicode font is missing as displaying "blank" in cfdocument even this font is in my pc. That's why I request my junior to investigate the problem to be solved. After a day, she found how to display unicode font in cfdocument.

First of all, we need to install font in our server first. Then, we need to go CFAdmin > Font Management and add installed font into coldfusion to be recognized. After all, we need to add fontembed="yes" in cfdocument as follow.

view plain print about
1<cfdocument format="pdf" orientation="portrait" backgroundvisible="true" filename="pdf_#id#.pdf" fontembed="yes" overwrite="true">

How to open default activity always in Android

Today got problem that my apps cannot go Index activity always whenever I've already configured in manifest file.

view plain print about
1<activity
2 android:name="com.ppshein.inm.IndexActivity"
3 android:label="@string/app_name"
4 android:screenOrientation="portrait" >

5 <intent-filter>
6 <action android:name="android.intent.action.MAIN" />
7
8 <category android:name="android.intent.category.LAUNCHER" />
9 </intent-filter>
10</activity>

[More]

moveToNext and moveToFirst sqlite cursor

Honestly, I've never recognized every top record is missing when I retrieve data from sqlite table. It's really bad when someone point out that one record is missing even it's in sqlite table. That's why got stressed that how come every one top record is missing by following coding.

view plain print about
1while(cursor.moveToNext()){                                  
2    startfrom = Integer.parseInt(cursor.getString(0));
3}

[More]

Background image with percentage

Today, I've found that we can adjust background image with percentage in CSS. The time before I knew only to adjust background image with two positions. It's left, right, center and bottom, up position. Now I know is to adjust by percentage for those two positions.

view plain print about
1<!--- transitional background image adjustment --->
2.mybg {
3background: url("img") no-repeat center left;
4}

Here is modern adjustment

view plain print about
1<!--- transitional background image adjustment --->
2.mybg {
3background: url("img") no-repeat 50% 25%;
4}

It's cool, isn't it?

405 - HTTP verb used to access this page is not allowed

Yesterday, I've encountered this error "server error:405 - HTTP verb used to access this page is not allowed" when I call "http://www.ppshein.net/test.html" HTTP GET from my android program. I'm confused why I got this error even I've tried following url in my desktop browser is fine. Thus I was googling and find how to solve it. After few minutes, I've found answer how to solve this problem. It's quite simple that change file extension to ".cfm" instead of ".html". It's because of web server doesn't let any request containing POST/GET method to any static page called ".html, .htm", will return such following error called "405".

Thanks god that I've got new experience.

Remove MSWord comment in Coldfusion

Today, I've got problem because of messy of Microsoft Word comments in our database. It's because of our clients wrote some messages in MsWord and paste these into CFTextarea richtext data. That's why those data cannot be displayed at our project. It's my bad that I have not thought about how to prevent these kind of problems during project development.

[More]

Convert date format UDF

Today, I've created simple UDF for convert date format "dd/mm/yyyy" to "mm/dd/yyy". Because our clients want to use "dd/mm/yyyy" format as our national format into our projects. You may all know that it's very easy to convert but it's dedicated to those who start learning Coldfusion UDF.

[More]

Disable style in CSS

Today I've found that how to create CSS for disable input form. It's very useful and we can do separate class for those event. Here is CSS for normal input event.

view plain print about
1input[type="text"], input[type="password"]{
2    color: #000000;
3    border: solid 1px #999999;
4}
5
6select {
7    color: #000000;
8    border: solid 1px #999999;
9}

[More]

Integreate Messi jQuery dialog with Coldfusion

If you're getting sick of working with coldfusion built-in dialog? Here is beautiful messi jQuery dialog can integrate with coldfusion.

Include JS and CSS in your CSS first.

view plain print about
1<link rel="stylesheet" type="text/css" href="CSS/messi.css">
2<script type="text/javascript" src="JS/jquery.js"></script>
3<script type="text/javascript" src="JS/messi.js"></script>

[More]

More Entries

Top of Page