Calendar

July 2010
S M T W T F S
« Jun    
 123
45678910
11121314151617
18192021222324
25262728293031

Quick Red5 install on Mac OS X

These steps work fine with version 0.9.0 RC2 at least…

  1. Download the latest dmg from http://code.google.com/p/red5/
  2. Open the package, drag Red5 to your Applications folder, then start the app (nothing happens visually, it’s a server!)
  3. Open http://127.0.0.1:5080/demos/ in a browser, which should hopefully now show you the demo page

The next step is to install the demos you want to try using a flash control panel that comes packaged with the distribution. Now, be warned, as of version 0.9.0 RC2, the distribution is a little flaky. So when you click the link to “install” demos on the page you just loaded, it won’t work.

So if the link doesn’t work for you, try http://127.0.0.1:5080/installer/ instead! Go back to the first page to access the demo you installed.

Finally use a terminal session to browse inside your app folder (i.e. inside /Applications/Red5.app) and have a poke around the underlying code and configurations.

/Applications/Red5.app/Contents/Resources/Java/webapps is a good place to start. You’ll notice that the system packs Tomcat, and the distribution acts as a web server.

source http://ria101.wordpress.com

OSX: Move Files Instead of Copying

You do not have to copy and then delete when moving files on your apple box. Here is how to do it all with one command. This tutorial describes how to drag and drop to move a file from one location to another.

When copying files from one location to another, I have always found it an annoying process to drag the files to one location and then go back and delete them from the original location.

The default drag and drop process in OS X is to COPY files.

We want to be able to MOVE files.

To MOVE a file is to actually copy files to a new location and to delete them from the original location.

OS X will move the file if you hold the CMD key while you drag and drop.

One caveat:

Something that confuses people is what happens if duplicate files are found during the move drag and drop. If you release the CMD key to answer the dialog box that appears, the file will be copied but not moved. If you continue to hold the CMD key as you click the Replace button, the move action will be completed.

source http://www.tech-recipes.com/rx/2581/os_x_move_files_instead_copying/

Blackberry Hidden Command

To Check Your Device General Information:

At the home screen of your Berry
press: alt + shift + h

this is what gonna appear
user posted  image

Your PIN will be shown, but If the PIN: Suspended, means u can’t use BlackBerry Internet Service. Don’t Buy it!!!

Continue reading "Blackberry Hidden Command" »

Determining if a Date is a Weekday in T-SQL

create function fn_IsWeekDay
(
    @date datetime
)
returns bit
as
begin 

    declare @dtfirst int
    declare @dtweek int
    declare @iswkday bit 

    set @dtfirst = @@datefirst - 1
    set @dtweek = datepart(weekday, @date) - 1

    if (@dtfirst + @dtweek) % 7 not in (5, 6)
        set @iswkday = 1 --business day
    else
        set @iswkday = 0 --weekend

    return @iswkday
end

source http://ryanfarley.com

Hacking Java ClassLoader

เนื่องจากว่าการทำงานส่วนมาก ต้องเขียน Business Logic ที่ Store Procedure ใน MS-SQL ทำให้เกิดความลำบากกับการทำ version ของโค๊ดเป็นอย่างมาก เลยอยากจะเขียน Script สั่นๆสักตัวเพื่อดูด Store Procedure มาเก็บเป้นไฟล์ให้ แล้วเราจะได้ดูสิ่งที่ต่างกัน (Diff) และเก็บลง SVN Server ส่วนตัว (ที่ทำงานใช้ CVS ซึ่งไม่ชอบเอาซะเลย)

ก็เลยกะว่างานนี้เขียนสั่นๆ เอา Groovy ดีกว่า ก็เลยเริ่มจาก start groovy console (run>cmd>groovyConsole ) จากนั้นก็เริ่มเขียน code

ทันใดนั้นนึงขึ้นมาได้ว่า กูจะ add jar ยังไงว่ะ ไม่ได้ start เป็น project เอ้ หรือว่า จะไปสร้าง classpath ยังไงละเนี่ย ก็เลยลองไปหาว่าเจ้า Groovy Console มันจะ add classpath ได้ไงบ้าง

ไปเจอที่บอกว่าให้แก groovy start แต่เอ้ มันไม่เท่อ่ะ ไหน groovy บอกว่าตัวเองเป็น dynamic ก็นึกว่ามันจะเอา env ข้างๆมาให้ด้วย เลยเอา jar ไปวางใน Folder ที่ทำการสั่ง groovyConsole (ในใจนึงว่ามันจะเหมือน grails console) เอ๋ ไม่ได้นี่นา

ไม่ไหวแระ ไหนๆก็ไหนๆ เลยลองเขียน ให้ JAVA มันโหลด JAR แบบ on the fly เลยละกัน ไม่อยากเขียน cmd ไป เรียก class

Continue reading "Hacking Java ClassLoader" »