2006-07-25

MFC vs WinForms vs SWT

All that you need to know to embed an Office application into:

MFC
http://www.rsdn.ru/article/com/xoffice.xml and http://www.rsdn.ru/article/com/autoatl.xml
two articles in about 10-12 pages - beat in a drum to adjust a project


WinForms
http://blogs.gotdotnet.ru/personal/k_savelev/PermaLink.aspx?guid=6d39ad7d-d1ae-4daf-8ce2-9b881ca7091a
A heap of links, ready external component and therefore a little headache when installing application to client


SWT
http://www.java2s.com/Code/Java/SWT-JFace-Eclipse/WordOLE.htm
a couple strings of code and everithing works from the box

2006-07-18

At work in the break we compete in knowledge.
I won with the score 50-80 :)

IMHO, the questions have changed for the better as compared with ones that were a year ago. In the past three months I even met in practice a few similar, since I moved to C + +.


strengths:

* Base constructions and syntax of the language.
* Work with memory.
* Standard library.
* Type casting and information about RTTI.
* Common questions about programming in C++.
* The difference between C++ and C.
* Namespace and scope.
* Questions about code efficiency.

weaknesses:

* Type casting and information about RTTI (the continuation).


IMHO as for Standard library I was obviously overestimated, but as for RTTI -that was an accurate observation.

2006-07-14

Spam defence - honney mail

In the eternal war of mosquitoes and mosquito nets there is one line surrendered to spamers — open publishing of E-mail addresses in the net fraught with heap of spam. So, that's why peoples pervert like michael at googlemail.com and so on.

And what if together with own address give a special address with the explanation: «Do not write here please, mail sent to this address will be considered spam automatically

Spambot will take both, and all the mail sent to the second address will be automatically used for spam filter instructions for the first one. Since spam in the first and in the second box will be probably very alike, it is possible to set very high selection threshold to spam filter. Probability to lose right mail will decrease.

The most interesting is that problem for the spammers - to separate the correct e-mail from the front one, seems to be completely analogous to the problem of spam filtering.

2006-07-05

coUbuntu from ISO

I forgot - on weekends I've raised Ubuntu Dapper on coLinux. Installed Midnight Comander, adjusted Apt through proxy. It's great!
The details:

Ho to raise Ubuntu on coLinix having on tap only installation CD/DVD of this distributive can be read in the article Howto Install Debian Sarge image from scratch.

True, in the installator I used only first two steps — mount CD and load installator components. To raise the base system there is a command — debootstrap.

About the net adjusting is written here.

Midnight Commander binaries, which wil work in coLinux console (packages from repository are buggy for some reason) are here.

As for APT through proxy, it was interesting, the first Google link sent me to... /usr/share/doc/apt/ for examples :)

I've created a file /etc/apt/apt.conf with about the following contents:
Acquire
{
// HTTP method configuration
http
{
Proxy "http://user:pass@proxy_ip:port";
Timeout "30";
};
};


It works.

2006-07-03

XSLT Decorator Pattern

As usual with patterns - read and surprised: «Oh, it's a pattern... and I always did so...».

True, the variant with a default variable a little bit more flexible.

The idea was taken from here. However, their snippet does not work.
The correct variant:
<!-- html output -->
<xsl:template name="html-wrapper">
<xsl:param name="contents">
<xsl:apply-templates/>
</xsl:param>
<xsl:result-document method="html" indent="yes" href="{concat(local-name(),'_',@name,'.html')}">
<html><body>
<xsl:copy-of select="$contents"/>
</body></html>
</xsl:result-document>
</xsl:template>

<xsl:template match="Chapter">
<xsl:call-template name="html-wrapper">
<xsl:with-param name="contents">
<-- some context there-->
</xsl:with-param>
</xsl:call-template>
</xsl:template>

<xsl:template match="Part">
<xsl:call-template name="html-wrapper">
<xsl:with-param name="contents">
<-- some context there-->
</xsl:with-param>
</xsl:call-template>
</xsl:template>

and so on