Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
D

davilism

@davilism
About
Posts
20
Topics
15
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • MySQL Transaction deadlock
    D davilism

    The situation occurs when two transactions exist in two sessions. Table: Tlock: Lock_id Tinyint Entry: 0 Steps to reconstruct the occurrence: 1. Open two client sessions of MySQL 2. In session 1, type "begin" followed by "update Tlock set Lock_id = 1". The sesssion shows the query "OK". 3. In session 2, type "begin" followed by "update Tlock set Lock_id = 2". The session waits for session 1 to release lock so nothing happens. 4. In session 1, type "update Tlock set Lock_id = 0". Session 2 warns a deadlock found. Why? If session 1 still holds the lock on Tlock, whatever it does to it shouldn't produce a deadlock. Can somebody explain what's actually happening behind the scene? Thank you very much!

    MySQL announcement database mysql question

  • How to specify character encoding in JavaMail?
    D davilism

    Hi, I successfully send email with the following code in English. However, if the message and the subject title are in other characters, everything becomes question marks and the subject title says something like ...ANSI...3F=3F=3F... How do I set the character encoding to utf-8, for example? Thanks. try { Properties props = new Properties(); Session sendMailSession; Transport transport; sendMailSession = Session.getInstance(props, null); props.put("mail.smtp.host", SMTP_CLIENT); Message newMessage = new MimeMessage(sendMailSession); newMessage.setFrom(new InternetAddress(EMAIL_FROM)); newMessage.setRecipient(Message.RecipientType.TO, new InternetAddress(strEmail)); newMessage.setSubject(SUBJECT); newMessage.setSentDate(new Date()); strMsg = "Dear " + RS.getString("FIRST") + " " + RS.getString("LAST") + ","; strMsg += "\n\n"; strMsg += [MESSAGE IN CHARACTERS OTHER THAN ASCII]; newMessage.setText(strMsg); transport = sendMailSession.getTransport("smtp"); transport.send(newMessage); } catch(MessagingException m) { ... }

    Java question tutorial

  • sun.net.smtp.SmtpProtocolException help
    D davilism

    Hi, my jsp page uses sun.net.smtp.SmtpClient to send email. It worked fine until the hosted location was moved to another server. Now it generates the sun.net.smtp.SmtpProtocolException and the hosting company can't find what's wrong with it so I'm here hoping somebody can help. What could cause the SmtpProtocolException? "locahost" was what I used to connect to the smtp server. When it failed, I tried another smtp server like "mail.xxx.com" on another server and it worked but the problem is that this server can't let me send mail to other domains except its own domain. Thanks The following is the code responsible for the email: ------------------------------------------------------------- try { client = new SmtpClient(localhost); client.from(EMAIL_FROM); client.to(strEmail); PrintStream message = client.startMessage(); message.println("From: " + EMAIL_FROM); message.println("To: " + strEmail); message.println("Subject: " + SUBJECT); message.println(); ... client.closeServer(); } catch(IOException e) {

    <%=e%>

    }

    Java help csharp java com sysadmin

  • Is it possible to detect if an image file really exists on the drive with javascript?
    D davilism

    That's one good technique but if it's used in a loop, the time it takes to load the image is certainly longer and the size it finds must be 0. How do I get around this?

    Web Development javascript help question

  • Is it possible to detect if an image file really exists on the drive with javascript?
    D davilism

    I want to load all the images with the specific name and ended with a digit like image1.jpg, image2.jpg, image3.jpg, etc. The problem is that I wouldn't know in advance how many of them, so I just keep looping until I am told there is no more file.

    Web Development javascript help question

  • U can help
    D davilism

    How to call a javascript function when I type in a textbox and hit the Enter button? Thanks.

    Web Development javascript help tutorial question

  • Don't work in Netvigator
    D davilism

    The following code is supposed to submit the form to the process page. It works fine in IE, but not in Netvigator. When I hit the Submit, it just returns to the top and won't go. What should I add to make it work in Netvigator? function chkform() { var message = ""; /*if there is error in the form, append error string to the message*/ if(message.length > 0) { alert(message); return false; } else return true; } ... ... ...

    ... Submit

    Web Development help question

  • Don't work in Netvigator
    D davilism

    The following code is supposed to submit the form to the process page. It works fine in IE, but not in Netvigator. When I hit the Submit, it just returns to the top and won't go. What should I add to make it work in Netvigator? function chkform() { var message = ""; /*if there is error in the form, append error string to the message*/ if(message.length > 0) { alert(message); return false; } else return true; } ... ... ...

    ... Submit

    Web Development help question

  • How to call &quot;Send page by email&quot; in javascript?
    D davilism

    How to invoke the Send page by email in IE in javascript? Thanks

    Web Development javascript tutorial question

  • How to display a color instead of text in the status bar?
    D davilism

    It changes the whole status bar to the color specified. How to change a specific pane of the status bar? Thanks.

    C / C++ / MFC question graphics tutorial

  • How to display a color instead of text in the status bar?
    D davilism

    Hi, my drawing application wants to display the color in-use in the status bar, how can I do that?

    C / C++ / MFC question graphics tutorial

  • How to smooth drawing on the screen?
    D davilism

    I'm doing a Windows Paint-like application. I draw on the screen by capturing every mouse button-downs and moves, and then SetPixel(), the line drawn will be broken and I guess the Windows does not process the messages fast enough so some MouseMove do not react to every point the mouse moves. How does Windows Paint do that drawing on the screen without breaking? What should I do to smooth it?

    C / C++ / MFC javascript graphics tutorial question

  • What is a development plan?
    D davilism

    Hi, veterans, I'm a student of C.S. I'm going to do a Windows program on drawing with MFC for my class project. Before I get into the real coding, I have to write a development plan to describe how I am going to do the project. I never made one before, and I have no any idea how to write a legitimate one. Please help, with some examples if any. Thanks very much.

    C / C++ / MFC question c++ graphics help tutorial

  • What is a development plan?
    D davilism

    Hi, veterans, I'm a student of C.S. I'm going to do a Windows program on drawing with MFC for my class project. Before I get into the real coding, I have to write a development plan to describe how I am going to do the project. I never made one before, and I have no any idea how to write a legitimate one. Please help, with some examples if any. Thanks very much.

    IT & Infrastructure question c++ graphics help tutorial

  • How to tell it's a text file or a rich text file in CRichEditView?
    D davilism

    Hi, all, I want to read text files for processing in my CRichEditView text editor. If I don't set the attribute m_bRTF to FALSE when loading, it can't read other text files besides my own. How to test for other text files?

    C / C++ / MFC tutorial question

  • How to delete a character in CRichEditView?
    D davilism

    Thanks, Carl, this is great.

    C / C++ / MFC question tutorial

  • How to delete a character in CRichEditView?
    D davilism

    Hi, veterans, how can I delete a character in CRichEditView?

    C / C++ / MFC question tutorial

  • How to move the caret in CRichEditViewed application?
    D davilism

    Thanks, squizz, this is great.

    C / C++ / MFC c++ tutorial question

  • How to insert characters in a CRichEditViewed application?
    D davilism

    Hi, all, I have problem doing a replacement of text in my text editor using CRichEditView class. I want to replace some text that the user types but have no idea what functions I can use. I am aware of the GetRichEditCtrl( ).Paste, which can paste a copied text at the position of the caret, but how do I insert a not clipboard stuff, such as a CString object. Peace, no war

    C / C++ / MFC question help tutorial

  • How to move the caret in CRichEditViewed application?
    D davilism

    Hi, all, I'm programming a text editor with spell check using MFC's CRichEditView class. Anybody knows how to move the caret? My usage is that when the user types a word that is found spelled wrong, the editor has to move its caret to the word's beginning position and replace the word. I'm new to Windows programming. I have no idea how to move the caret and replace the word. I tried typing SetCaretPos( ) and ShowCaret( ) in the CMainFrame derived from CFrameWnd, but it didn't actually move the caret. The caret seemed to change its postion to the one I set in SetCaretPos( ), but when I used GetRichEditCtrl( ).Paste to paste a text for a test, the text was pasted at the position as if I didn't do the SetCaretPos( ). Peace, no war

    C / C++ / MFC c++ tutorial question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups