How to link a .xib file to a class with Xcode 4 :: 2012/10/05 05:47

To link a .xib to a class under Xcode4:

Open your .xib.
In placeholder: select File's Owner.
In the third thumbnail:"Identity Inspector" of the right panel, edit the "Custom Class" field and enter the name of your class.

I also then had to:

Click the root view under Objects.
Click the last tab: "Show Connections".
Drag "New referencing outlet" to "File's Owner" and select "view".

SQL Test Query for Database :: 2012/06/14 15:52

SELECT 1
MySQL
Microsoft SQL Server
PostgreSQL
H2
SQLite


SELECT 1 FROM DUAL
Oracle


SELECT 1 FROM INFORMATION_SCHEMA.SYSTEM_USERS
HSQLDB

Android: Keep the Screen On :: 2011/06/15 04:07

안드로이드 애플리케이션에서 스크린 슬립모드로 자동 전환되면서 화면이 꺼지는 것 방지하는 방법이다. 레이아웃 XML 이나 코드 상에서 설정할 수 있는데, 아래 세가지 어느 방법으로 해도 된다.

1. AndroidManifest.xml 에서가 아닌 layout 파일에서 다음처럼 속성값을 준다.

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="
http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:keepScreenOn="true"
    >

2. 코드에서는 Activity 생성 시 다음과 같은 코드를 추가한다.

getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);

3. 또는 View에서 아무곳에서나 다음 메소드를 호출하면 된다.
    (내부적으로 WindownManager의 FLAG_KEEP_SCREEN_ON 플래그를 설정)

setKeepScreenOn(true);

Using Ant to Automate Building Android Applications :: 2011/05/30 01:03

http://www.androidengineer.com/2010/06/using-ant-to-automate-building-android.html

How to remove MySQL completely Mac OS X :: 2011/04/17 13:46

The steps:

First you need to edit the file in: /etc/hostconfig and remove the line

Since this is a system file I advise you to open it with nano in terminal:

Open Terminal
sudo nano /etc/hostconfig
Enter your password if you’re not authed yet.
Delete the following line: “MYSQLCOM=-YES-”
CTRL+X (This is the command for closing NANO, Enter the “Y” key to save the file and exit nano).

Second step:

Make sure MySQL is not running.

Open Terminal and copy and paste and run the following commands:
sudo rm /usr/local/mysql
sudo rm -rf /usr/local/mysql*
sudo rm -rf /Library/StartupItems/MySQLCOM
sudo rm -rf /Library/PreferencePanes/My*
sudo rm -rf /Library/Receipts/mysql*
sudo rm -rf /Library/Receipts/MySQL*
sudo rm /etc/my.cnf

MySQL is now removed from your MAC.

< PREV |  1  |  2  |  3  |  4  |  5  |  ...  39  |  NEXT >