Posted on 20-09-2010
Filed Under (Technology) by bigbang

I want to change the text colors in my Org files. I tried to use

M-x customize-group RET org-faces RET

to adjust text color settings.

By using this way, I can adjust colors of headlines leve 1 & 2 &3 and something else. But I just don’t know how to change plain text in my notes. The plain text means the body of my ordinary text entries.

I want to change it into yellow or something else. So I can protect my eyes.

By searching the result on the Internet, I think I can use this command:

M-x customize-face RET default RET

If you want to find the fonts of current text line in Emacs, just put your cursor on the text that you are interested in and say

M-x describe-face

That’s the face which you’ll need to customize.

Ordinary text is in the default face: Org does not define a face for it. So if you change it, you’ll change the appearance of text all through Emacs.

(0) Comments    Read More   
Posted on 19-09-2010
Filed Under (Technology) by bigbang

A lot of companys are using Trac to track their daily work, and there are also a lot of small companys which are using Google Apps to build their Email systems and etc..

Here shows an example about how to set Trac for using Google Apps Gmail to send Email notifications. Modify trac.ini file with following part:

[notification]
admit_domains = 
always_notify_owner = false
always_notify_reporter = false
always_notify_updater = true
email_sender = SmtpEmailSender
ignore_domains = 
mime_encoding = none
sendmail_path = sendmail
smtp_always_bcc = 
smtp_always_cc = example@yourcompany.com
smtp_default_domain = 
smtp_enabled = true
smtp_from = trac@yourcompany.com
smtp_from_name = Trac
smtp_password = your_password
smtp_port = 587
smtp_replyto = trac@yourcompany.com
smtp_server = smtp.gmail.com
smtp_subject_prefix = __default__
smtp_user = trac@yourcompany.com
ticket_subject_template = $prefix #$ticket.id: $summary
use_public_cc = false
use_short_addr = false
use_tls = true

Just replace the trac@yourcompany.com with your own Email address. Please check The Trac Configuration File for the detail explanation of the settings.

Then enjoy the Email notifications.

(1) Comment    Read More   
Posted on 19-09-2010
Filed Under (Technology) by bigbang

I am building an application which can snapshot a screen shot and show the darker picture of this bitmap in my application.

We can also call this darker picture as semi transparent picture. It is just something like we put a gray transparent overlay on the top of this bitmap.

I try to do this job using MFC function CDC::BitBlt. Here is my example:

CRect rect;

GetClientRect(&rect);

CDC* pDC;

//
          get the value of pDC here

pDC->BitBlt( 0, 0, rect.Width(), rect.Height(),

             &dcCompatible, 0, 0, MERGECOPY);

This way can make the bitmap darker, but the result is not perfect. If you want to make it perfect, you can use AlphaBlend function. I will write a blog article to descripbe how to use it.

(0) Comments    Read More