« Previous : 1 : 2 : 3 : 4 : 5 : ... 10 : Next »

Ruby의 Send 메소드

쉽게 말해서 코드상에서 코드를 호출하는 메소드이다.
#{attribute}에 메소드명을, value에는 인자를 넣어준다.

형식 : obj.send(#{attribute}, value)

예제)
>> t = Time.now
=> Wed Feb 03 22:50:09 +0900 2010
>> t.strftime('%y')
=> "10"
>> t.send(:strftime, '%y')
=> "10"


요즘 웹게임을 만들고 있는데, 플레이어의 명령(이동, 공격 등...)을 유연하게 구현하기위해서 send 함수를 찾아보게 되었다.

Posted by 밤치

2010/02/03 22:57 2010/02/03 22:57
, , , , , ,
Response
No Trackback , No Comment
RSS :
http://bamchi.com/blog/rss/response/138

박주영 6호골! (3경기 연속골)



동그라미 동그라미 동그라미 + 네모

Posted by 밤치

2009/12/24 09:35 2009/12/24 09:35
, ,
Response
No Trackback , No Comment
RSS :
http://bamchi.com/blog/rss/response/136

박주영 5호골

최근 2연속골을 넣고 있는 간지 박주영... 2010년 남아공월드컵에서 부상없이 좋은 경기력을 보여줬으면 합니다.

Posted by 밤치

2009/12/24 00:33 2009/12/24 00:33
,
Response
A trackback , No Comment
RSS :
http://bamchi.com/blog/rss/response/135

안드로이드 2.1 구동 동영상

해외에서 선풍적인 인기를 끌고있는 모토로라 드로이드에서 구동한 영상



넥서스원에서 구동한 영상

Posted by 밤치

2009/12/23 23:59 2009/12/23 23:59
, , , ,
Response
5 Trackbacks , No Comment
RSS :
http://bamchi.com/blog/rss/response/134

IT기업 평균연봉

게임쪽은 단연 엔씨가 최고이고, 혹시나 내가 가고자 한다면 SK C&C, NHN, KT정도가 괜찮겠다. 하지만 지금 난 가난한 사장일 뿐이고!

사용자 삽입 이미지



Posted by 밤치

2009/12/04 11:44 2009/12/04 11:44
Response
A trackback , 2 Comments
RSS :
http://bamchi.com/blog/rss/response/133

3G신호를 WiFi로 변환해 공유해주는 장치

 

화웨이라는 회사에서 3G신호를 WiFi로 뿌려주는 장치를 선보인다고 한다. 최고 5.8Mbps의 업로드 속도와 7.2Mbps의 다운속도를 지원한다고 하며, 무게는 80g이다. 사용시간은 연속 5시간이며, 최대 5인까지 동시 접속 가능하다.

LG오즈 또는 무제한데이터요금제를 사용하고 있다면 Wibro신호를 WiFi로 변환해주는 KT의 Egg보다 훨씬 실용적이지 않을까 싶다.

아래 사진은 Egg


Posted by 밤치

2009/12/04 10:42 2009/12/04 10:42
, , , , ,
Response
No Trackback , No Comment
RSS :
http://bamchi.com/blog/rss/response/132


사용자 삽입 이미지
구글 안드로이드 개발자 2회 대회(ADC2)에서 네오위즈가 개발한 안드로이드용 응용프로그램 ‘씨리얼’(Ce:real)이 소셜 네트워킹 분야 1위를 수상했다고 한다. 상금은 약 1억이라고 한다.



Posted by 밤치

2009/12/03 10:24 2009/12/03 10:24
, , ,
Response
No Trackback , No Comment
RSS :
http://bamchi.com/blog/rss/response/131

여러가지 시도해봤지만 이 방법이 가장 쉽다.
주의 할 점은 DIV의 시작 좌표는 테이블의 좌측 상단에서 부터 계산해야한다.

<table align="center" width="500" border="1" cellspacing="0" cellpadding="0">
    <tr>
        <td>
            <div style="position: relative;">
                <div style="position:absolute; left: 100px; top: 100px; width:300px; height:300px; background-color:#ccc;">
                    내용
                </div>
            </div>
            <br>
            <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
        </td>
    </tr>
</table>

Posted by 밤치

2009/06/09 11:19 2009/06/09 11:19
,
Response
No Trackback , 2 Comments
RSS :
http://bamchi.com/blog/rss/response/129



사용자 삽입 이미지

사용자 삽입 이미지

이런 종이 프로토타이핑을 balsamiq에서 프로그램으로 만들어 쉽게 해볼 수 있다고 합니다. 

사용자 삽입 이미지

사용자 삽입 이미지





참고 : http://xguru.net/blog/499.html

Posted by 밤치

2009/05/19 18:02 2009/05/19 18:02
, ,
Response
No Trackback , a comment
RSS :
http://bamchi.com/blog/rss/response/128

Java로 둥근 모서리 윈도우 만들기

import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Window;
import java.awt.event.ComponentEvent;
import java.awt.event.ComponentListener;
import java.awt.geom.RoundRectangle2D;

import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JFrame;
import javax.swing.JProgressBar;
import javax.swing.JRadioButton;
import javax.swing.SwingUtilities;

public class ShapedWindow extends JFrame implements ComponentListener {
	private static final long serialVersionUID = 1L;

	private static RoundRectangle2D.Double shape;
	private static Window w;

	public ShapedWindow() {
		super("Test oval-shaped window");
		this.setLayout(new FlowLayout());
		this.add(new JButton("test"));
		this.add(new JCheckBox("test"));
		this.add(new JRadioButton("test"));
		this.add(new JProgressBar(0, 100));

		this.setSize(new Dimension(400, 300));
		this.setLocationRelativeTo(null);
		this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

		this.addComponentListener(this);
	}

	public static void main(String[] args) {
		JFrame.setDefaultLookAndFeelDecorated(true);
		SwingUtilities.invokeLater(new Runnable() {
			@Override
			public void run() {
				w = new ShapedWindow();
				w.setVisible(true);

				shape = new RoundRectangle2D.Double(0, 0, w.getWidth(), w.getHeight(), 20, 20);

				com.sun.awt.AWTUtilities.setWindowShape(w, shape);
			}
		});
	}

	@Override
	public void componentResized(ComponentEvent e) {
		shape.width = w.getWidth();
		shape.height = w.getHeight();
		com.sun.awt.AWTUtilities.setWindowShape(w, shape);
	}

	@Override
	public void componentHidden(ComponentEvent e) {
	}

	@Override
	public void componentMoved(ComponentEvent e) {
	}

	@Override
	public void componentShown(ComponentEvent e) {
	}
}
사용자 삽입 이미지

Posted by 밤치

2009/05/18 14:54 2009/05/18 14:54
,
Response
No Trackback , No Comment
RSS :
http://bamchi.com/blog/rss/response/127

« Previous : 1 : 2 : 3 : 4 : 5 : ... 10 : Next »