LazyDreamy

관리자 | 글쓰기

LazyDreamy » Search » Results » Articles

Computer/Programming와 관련된 글 21개

  1. 2010/09/20 jQuery 회전 배너 (Rotating Banner)
  2. 2010/08/18 jQuery table tr hover highlight (2)
  3. 2010/05/18 jQuery Input field control
  4. 2010/05/18 jQuery Text Highlighter plugin
  5. 2010/05/03 C++ Builder 개발자를 위한 참고사항
  6. 2010/04/08 jQuery 네비게이션 메뉴 (Navigation Menu)
  7. 2010/03/08 C CRC16, CRC32, CRC-CCITT (1)
  8. 2010/03/07 .NET Socket Programming (for data arriving event) (1)
  9. 2010/03/03 BCB W8058 Cannot create pre-compiled header
  10. 2010/02/27 Windows 7 mscomm32.ocx , mswinsck.ocx 사용하기 (7)

LazyDreamy » Computer/Programming

jQuery 회전 배너 (Rotating Banner)

드림 | 2010/09/20 13:50

jqbanner

Rotating Banner http://www.mclelun.com/blog/2010/01/jquery-rotating-banner/

jQuery Corner http://www.malsup.com/jquery/corner/

 

두 가지 소스를 활용하였고, 마우스 오버 이벤트와 자동 이동 외에 강제 이동 부분을 추가했음.

 

Sample View : http://dream.nmain.net/sample/jquery/jqbanner/

JS (modified jqbanner.js) : http://dream.nmain.net/sample/jquery/jqbanner/jqbanner.js

2010/09/20 13:50 2010/09/20 13:50


태그

(go to top)

LazyDreamy » Computer/Programming

jQuery table tr hover highlight

드림 | 2010/08/18 11:23

css 로 지원되면 그게 가장 간편하지만;; ie들 때매 귀찮아서 jQuery로 처리를..

 

jQuery_table

적용 예 : http://dream.nmain.net/sample/jquery/tableHighlight/

css http://dream.nmain.net/sample/jquery/tableHighlight/tableHighlight.css

js http://dream.nmain.net/sample/jquery/tableHighlight/tableHighlight.js

2010/08/18 11:23 2010/08/18 11:23


(go to top)

LazyDreamy » Computer/Programming

jQuery Input field control

드림 | 2010/05/18 15:58

text

get   $(‘input[name=inputname]’).val();

set   $(‘input[name=inputname]’).val(‘value’);


selectbox

get   $(‘select[name=selectname] > option:selected’).val();

set   $(‘select[name=selectname] > option[value=selectvalue]’).attr(‘selected’, ‘true’);


radio , checkbox

get   $(‘input[name=inputname]:checked’).val();

set   $(‘input[name=inputname]’).filter('input[value=selectvalue]').attr(‘checked’, ‘checked’);

set   $(‘input[name=inputname]’).filter('input[value=selectvalue]').attr(‘checked’, ‘’);

count    $(‘input[name=inputname]:checkbox:checked’).length;

2010/05/18 15:58 2010/05/18 15:58


태그

(go to top)

LazyDreamy » Computer/Programming

jQuery Text Highlighter plugin

드림 | 2010/05/18 10:01

http://www.unwrongest.com/projects/highlight/


How to use Highlight

You can throw both a string or an array on Highlight. Have a look at the example below. The first row is going to highlight the word acknowledgment, the second row is going to highlight both ‘matching’ and ‘class name’. The code shown in the example below has been executed in this page.

	$('.body').highlight("acknowledgment");
	$('.body').highlight(["matching","class name"]);

What actually happens is that the matching phrases are wrapped inside a span element with the class name highlight. Therefor you will also need to add some css code to get a visual result.

.highlight { background: #ff0; }
2010/05/18 10:01 2010/05/18 10:01


태그

(go to top)

LazyDreamy » Computer/Programming

C++ Builder 개발자를 위한 참고사항

드림 | 2010/05/03 21:59

0. 설치 (무료버젼 및 업데이트)

   0) free or trial vertion
http://www.codegear.com/downloads/free/cppbuilder
   1) bcb6-trial edition
http://cbuilder.borlandforum.com/impboard/impboard.dll?action=read&db=bcb_res&no=145
   2) bcb6 personal Edition (정품,무료)
http://cbuilder.borlandforum.com/impboard/impboard.dll?action=read&db=bcb_res&no=162
   3) Turo C++2006 Explorer 
http://cbuilder.borlandforum.com/impboard/impboard.dll?action=read&db=bcb_res&no=318
     (이제 더이상 무료키가 발급이 되지 않는다는 군요)
   4) CodeGear RAD Studio  2007 Trail
http://cbuilder.borlandforum.com/impboard/impboard.dll?action=read&db=bcb_res&no=361
   5) bcb6 -- update(update4만 하면 될듯)
         update4 - http://cbuilder.borlandforum.com/impboard/impboard.dll?action=read&db=bcb_res&no=207
         update3 - http://cbuilder.borlandforum.com/impboard/impboard.dll?action=read&db=bcb_res&no=201
         update2 - http://cbuilder.borlandforum.com/impboard/impboard.dll?action=read&db=bcb_res&no=171
         도움말 update - http://cbuilder.borlandforum.com/impboard/impboard.dll?action=read&db=bcb_res&no=205
   6) BDS2006 update
        update1 -  http://cbuilder.borlandforum.com/impboard/impboard.dll?action=read&db=bcb_res&no=295
        update2 - http://cbuilder.borlandforum.com/impboard/impboard.dll?action=read&db=bcb_res&no=307
        hotfix  - http://cbuilder.borlandforum.com/impboard/impboard.dll?action=read&db=bcb_res&no=319
        hotfix11 - http://cbuilder.borlandforum.com/impboard/impboard.dll?action=read&db=bcb_res&no=338
        hotfix11,12,13 http://cbuilder.borlandforum.com/impboard/impboard.dll?action=read&db=bcb_res&no=352
   7) 컴맨드라인에서 BDS 2006설치하기
http://cbuilder.borlandforum.com/impboard/impboard.dll?action=read&db=bcb_tutorial&no=156

1. 개발툴에 대해..
   1) IDE
   2) BCB32.exe (C++Builder컴파일러)
       ; Command-Line으로 컴파일 하는 방법
http://cbuilder.borlandforum.com/impboard/impboard.dll?action=read&db=bcb_tip&no=107   -#1
http://cbuilder.borlandforum.com/impboard/impboard.dll?action=read&db=bcb_tip&no=108   -#2
http://cbuilder.borlandforum.com/impboard/impboard.dll?action=read&db=bcb_tip&no=109   -#3
   3) IMPLIB.exe (Dll을 쉽게 link해 쓸수 있도록  Import Library를 만들어주는 유틸 )
       ; implib 사용법과 옵션
http://cbuilder.borlandforum.com/impboard/impboard.dll?action=read&db=bcb_tip&no=116

2. 개발자 가이드
   1) C++Builder6 DeveloperGuide(영문 and 한글)
     * http://cbuilder.borlandforum.com/impboard/impboard.dll?action=read&db=bcb_res&no=358
   2) C++Builder6 Help메뉴얼
http://cbuilder.borlandforum.com/impboard/impboard.dll?action=read&db=bcb_res&no=332
   3) bcb6 입문서 및 개발자 가이드(한글)
http://cbuilder.borlandforum.com/impboard/impboard.dll?action=read&db=bcb_res&no=153
   4) Embarcadero Technologies Product Documentation
http://docs.embarcadero.com/products/rad_studio/

3. Add-In
    ; C++Builder 및 Delphi를 더욱 편리하게 쓸수 있도록 해주는 Add-In
   1) GExport
http://cbuilder.borlandforum.com/impboard/impboard.dll?action=read&db=bcb_res&no=403   - down
http://www.gexperts.org/  - 개발site
http://www.delmadang.com/community/bbs_list.asp?bbsNo=18 - 상세 사용 설명 강좌
   2) CnPack
http://www.cnpack.org/index.php?lang=en  - 개발 site 및 download
   3) C++컴파일 가속기
http://cbuilder.borlandforum.com/impboard/impboard.dll?action=read&db=bcb_res&no=375
http://andy.jgknet.de/blog/?page_id=12  - 개발site

4. VCL
   ; VCL이란 C++Builder 및 Delphi의 근간을 이룬 Framework이라 할수 있는것으로
     VC++의 MFC위치에 있는 것입니다.
  1) VCL 상속도
     bcb5 - http://cbuilder.borlandforum.com/impboard/impboard.dll?action=read&db=bcb_res&no=6
     bcb6 - http://cbuilder.borlandforum.com/impboard/impboard.dll?action=read&db=bcb_res&no=147
  2) C++Builder언어적 특징
     *C++Builder의 C++ 언어 확장
http://cbuilder.borlandforum.com/impboard/impboard.dll?action=read&db=bcb_tip&no=105
     * C++Builder에서의 VCL의 Support
http://cbuilder.borlandforum.com/impboard/impboard.dll?action=read&db=bcb_tip&no=146
*C++ Builder와 Delphi의 비교
http://cbuilder.borlandforum.com/impboard/impboard.dll?action=read&db=bcb_tip&no=133

5. Library
   1) RxLib
http://cbuilder.borlandforum.com/impboard/impboard.dll?action=read&db=component&no=570
http://sourceforge.net/projects/rxlib/  - 개발site
   2) Graphic32 - 그래픽 관련 Component
http://cbuilder.borlandforum.com/impboard/impboard.dll?action=read&db=component&no=562 - downd
http://www.graphics32.org  - 개발site
   3) GraphicEx - png, tif , gif 등의 다양한 image파일 포멧을 지원해주는 라이브러리
http://cbuilder.borlandforum.com/impboard/impboard.dll?action=read&db=component&no=519
http://www.soft-gems.net/index.php?option=com_content&task=view&id=13&Itemid=33 - 개발site
   4) Turbo-Power
       : 시리얼 통신 및 전화, FAX 라이브러리의 대명사
http://cbuilder.borlandforum.com/impboard/impboard.dll?action=read&db=component&no=516 - down
http://sourceforge.net/projects/tpapro/ - 개발site
http://www.borlandforum.com/impboard/impboard.dll?action=read&db=news&no=175   - 오픈소스 사연
   5) FastMM
      : Fast Memory Manager
http://cbuilder.borlandforum.com/impboard/impboard.dll?action=read&db=component&no=438
http://fastmm.sourceforge.net  - 개발site
   6) JEDI  - JOINT ENDEAVOR OF DELPHI INNOVATORS
http://www.delphi-jedi.org/

6. 기타 문서 자료
   1) Power of Delphi -  97년 3월호부터 98년 9월호까지 연재한 국내 유일 델파이 잡지,  얼마전 완전공개
http://cbuilder.borlandforum.com/impboard/impboard.dll?action=read&db=bcb_res&no=108
http://www.delmadang.com/community/bbs_view.asp?bbsNo=21&bbsCat=0&st=&keyword=&indx=415156&keyword1=&keyword2=&page=2
   2) Delphi정복4 - 책 ( win api 책으로 유명한 김상형님이 쓴 델파이책 , 얼마전 완전공개)
http://www.delmadang.com/community/bbs_view.asp?bbsNo=21&bbsCat=0&st=&keyword=&indx=414030&keyword1=&keyword2=&page=2
   3)  Inside the VCL(1~3편)
http://cbuilder.borlandforum.com/impboard/impboard.dll?action=read&db=bcb_tutorial&no=40
http://www.borlandforum.com/impboard/impboard.dll?action=read&db=bcb_res&no=246
   4) BCB 저널 (유료)
http://www.bcbjournal.com/
http://cbuilder.borlandforum.com/impboard/impboard.dll?action=read&db=bcb_res&no=262  - 2000년이전 무료자료
http://www.borlandforum.com/impboard/impboard.dll?action=read&db=free&no=10742  - 그밖에 무료

7. 사이트
: 국내 C++Builder개발자 커뮤니티
   1) 볼랜드포럼
http://www.borlandforum.com/
   2) C++Builder완전정복
http://cafe.naver.com/bcbmaster/
: 아래는 델파이 관련 국내 site
   3) 델마당
http://www.delmadang.com/
   4) 코드웨이
http://codeway.co.kr/board/
   5) 한델
http://www.delphi.co.kr/
: 그밖에
   6) 데브기어 - 델파이 및 C++Builder한국 총판
http://www.devgear.co.kr/
   8) 엠바케데로 (Delphi / C++Builder개발회사)
http://www.embarcadero.com/
개발자네트워크http://edn.embarcadero.com/
블로그s             -  http://blogs.embarcadero.com/
Articles              - http://edn.embarcadero.com/article/
whitepaper        -  http://edn.embarcadero.com/whitepapers
해외사이트
   10) 델파이.어바웃.컴
http://delphi.about.com/
   11) 코드구루
http://codegearguru.com/
해외블로거
    12)  마크로칸투 - http://www.marcocantu.com/
    13)  해롤드   - http://hallvards.blogspot.com/
    14)  닉호지스   - http://blogs.embarcadero.com/nickhodges/
국내블로거
     박지훈.임프 - http://blog.devgear.co.kr/imp/

 

 

출처 : http://itbiz.tistory.com/183

2010/05/03 21:59 2010/05/03 21:59


(go to top)

LazyDreamy » Computer/Programming

jQuery 네비게이션 메뉴 (Navigation Menu)

드림 | 2010/04/08 09:42

captured_Image.png

http://www.noupe.com/jquery/45-jquery-navigation-plugins-and-tutorials.html

2010/04/08 09:42 2010/04/08 09:42


(go to top)

LazyDreamy » Computer/Programming

C CRC16, CRC32, CRC-CCITT

드림 | 2010/03/08 22:48


출처 : 볼랜드 포럼 (http://turboc.borlandforum.com/impboard/impboard.dll?action=read&db=cpp_res&no=70)

http://forum.falinux.com/zbxe/?mid=lecture_tip&document_srl=406152&sort_index=readed_count&order_type=desc

http://www.lammertbies.nl/comm/info/crc-calculation.html
2010/03/08 22:48 2010/03/08 22:48


(go to top)

LazyDreamy » Computer/Programming

.NET Socket Programming (for data arriving event)

드림 | 2010/03/07 23:09

Imports System
Imports System.Net
Imports System.Net.Sockets
Imports System.Threading
Imports System.Text

' State object for receiving data from remote device.

Public Class StateObject
    ' Client socket.
    Public workSocket As Socket = Nothing
    ' Size of receive buffer.
    Public Const BufferSize As Integer = 256
    ' Receive buffer.
    Public buffer(BufferSize) As Byte
    ' Received data string.
    Public sb As New StringBuilder
End Class 'StateObject

Public Class AsynchronousClient
    ' The port number for the remote device.
    Private Const port As Integer = 11000

    ' ManualResetEvent instances signal completion.
    Private Shared connectDone As New ManualResetEvent(False)
    Private Shared sendDone As New ManualResetEvent(False)
    Private Shared receiveDone As New ManualResetEvent(False)

    ' The response from the remote device.
    Private Shared response As String = String.Empty

    Public Shared Sub Main()
        ' Establish the remote endpoint for the socket.
        ' For this example use local machine.
        Dim ipHostInfo As IPHostEntry = Dns.Resolve(Dns.GetHostName())
        Dim ipAddress As IPAddress = ipHostInfo.AddressList(0)
        Dim remoteEP As New IPEndPoint(ipAddress, port)

        ' Create a TCP/IP socket.
        Dim client As New Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)

        ' Connect to the remote endpoint.
        client.BeginConnect(remoteEP, New AsyncCallback(AddressOf ConnectCallback), client)

        ' Wait for connect.
        connectDone.WaitOne()

        ' Send test data to the remote device.
        Send(client, "This is a test<EOF>")
        sendDone.WaitOne()

        ' Receive the response from the remote device.
        Receive(client)
        receiveDone.WaitOne()

        ' Write the response to the console.
        Console.WriteLine("Response received : {0}", response)

        ' Release the socket.
        client.Shutdown(SocketShutdown.Both)
        client.Close()
    End Sub 'Main

    Private Shared Sub ConnectCallback(ByVal ar As IAsyncResult)
        ' Retrieve the socket from the state object.
        Dim client As Socket = CType(ar.AsyncState, Socket)

        ' Complete the connection.
        client.EndConnect(ar)

        Console.WriteLine("Socket connected to {0}", client.RemoteEndPoint.ToString())

        ' Signal that the connection has been made.
        connectDone.Set()
    End Sub 'ConnectCallback

    Private Shared Sub Receive(ByVal client As Socket)

        ' Create the state object.
        Dim state As New StateObject
        state.workSocket = client

        ' Begin receiving the data from the remote device.
        client.BeginReceive(state.buffer, 0, StateObject.BufferSize, 0, New AsyncCallback(AddressOf ReceiveCallback), state)
    End Sub 'Receive

    Private Shared Sub ReceiveCallback(ByVal ar As IAsyncResult)

        ' Retrieve the state object and the client socket
        ' from the asynchronous state object.
        Dim state As StateObject = CType(ar.AsyncState, StateObject)
        Dim client As Socket = state.workSocket

        ' Read data from the remote device.
        Dim bytesRead As Integer = client.EndReceive(ar)

        If bytesRead > 0 Then
            ' There might be more data, so store the data received so far.
            state.sb.Append(Encoding.ASCII.GetString(state.buffer, 0, bytesRead))

            ' Get the rest of the data.
            client.BeginReceive(state.buffer, 0, StateObject.BufferSize, 0, New AsyncCallback(AddressOf ReceiveCallback), state)
        Else
            ' All the data has arrived; put it in response.
            If state.sb.Length > 1 Then
                response = state.sb.ToString()
            End If
            ' Signal that all bytes have been received.
            receiveDone.Set()
        End If
    End Sub 'ReceiveCallback

    Private Shared Sub Send(ByVal client As Socket, ByVal data As String)
        ' Convert the string data to byte data using ASCII encoding.
        Dim byteData As Byte() = Encoding.ASCII.GetBytes(data)

        ' Begin sending the data to the remote device.
        client.BeginSend(byteData, 0, byteData.Length, 0, New AsyncCallback(AddressOf SendCallback), client)
    End Sub 'Send

    Private Shared Sub SendCallback(ByVal ar As IAsyncResult)
        ' Retrieve the socket from the state object.
        Dim client As Socket = CType(ar.AsyncState, Socket)

        ' Complete sending the data to the remote device.
        Dim bytesSent As Integer = client.EndSend(ar)
        Console.WriteLine("Sent {0} bytes to server.", bytesSent)

        ' Signal that all bytes have been sent.
        sendDone.Set()
    End Sub 'SendCallback
End Class 'AsynchronousClient


출처 : http://msdn.microsoft.com/en-us/library/bew39x2a.aspx


winsock 을 강제로 사용하지 않고, .net 내장 함수를 사용하려고 찾다 보니 소켓 이벤트 형태를 지원한다.

2010/03/07 23:09 2010/03/07 23:09


태그

(go to top)

LazyDreamy » Computer/Programming

BCB W8058 Cannot create pre-compiled header

드림 | 2010/03/03 22:33

2010-03-03 오후 10-25-12

 

해결

#include <vcl.h>
#pragma hdrstop

#pragma hdrstop
#include <vcl.h>

로 순서를 수정

 

2010-03-03 오후 10-25-56

 

성공.. tpasyncpro 깔기 힘들다 –;

 

참고주소 : http://www.richelbilderbeek.nl/CppCompileWarningCannotCreatePreCompiledHeaderInitializedDataInHeader.htm

2010/03/03 22:33 2010/03/03 22:33


(go to top)

LazyDreamy » Computer/Programming

Windows 7 mscomm32.ocx , mswinsck.ocx 사용하기

드림 | 2010/02/27 10:09

Windows 7에서부터는 VS6 버전과의 호환성 문제가 있습니다.

뭐..;; 하다보면 아직 구버전으로 개발된 것들이 있어서 테스트 하기위해 돌려보면 ocx 파일 로딩 에러가 납니다.
windows 7 에서는 해당 파일을 구해서 windows\sysWOW64 에 넣고 등록하면 정상적으로 동작합니다.

간단히 정리하면

1. ocx 파일을 windows\sysWOW64 에 복사
2. regsvr32 windows\sysWOW64\ocx파일명

그외에 필요하면 dll 파일은 system32 에 두면 됩니다.

추가 -
sysWOW64 가 어떤 부분을 지원하는 것인가 찾아보니까
64비트 운영체제의 경우 system32 에 64비트 라이브러리가 들어가고 32비트 라이브러리는 sysWOW64 에 위치한다고합니다.
아마 운영체제가 32비트 일 경우 ocx 파일의 위치와 로딩은 system32 에서 하는 것이 맞다고 생각됩니다.
해당 부분은 windows7 64비트를 기준으로 작성되었습니다.

참고 url : http://www.sevenforums.com/drivers/47248-mscomm32.html
2010/02/27 10:09 2010/02/27 10:09


(go to top)