Sunday, June 5, 2011

There are approx three links on a page of a logged blogger that can bring them into edit mode. Two of them are at the top right "New Post" and "Design" and the last one being the edit button (looks like a pencil) at the end of the posts.

Once in edit mode go to Settings tab and there you have import/export functionality.

The edit mode has a lot more features.
It turns out that the Internet has changed a lot the last decade: some communities faded, most notably the usenet, while forums, and social networking sites made a steady progress. Somehow skype managed to become the chat application of the net, and google the search engine of the net. While I think the latter owes their success mostly to the huge and well maintained search engine, and the fact that they limited the number of ads and they stayed away from the heavy multimedia ads that bogged the other search engines, the success of skype is still not that easy to figure out why it happened to them.

Anyway, everyone moved from static to dynamic, from local to remote and global, the plain HTML just got a little standardization, while javascript became the king, Sun died and Oracle is probably going to fuck the idea up, this was a heavy blow to the open source movement, but it is still there and is going stronger. Wikipedia is a great project, that grew on simple open source, and a great community. Clouds are becoming modern, secure, cheap, etc.

What I am writing all this for, though, is that I notice for some time, that the blogging has become a great thing, bloggers a getting more and more savvy. I really don't know of sites other than blogspot, but there probably are, but I think I can use blogging to say something smart to the world, something that is probably going to be of benefit to readers, and something that will be of benefit to me to have it written, so I can re-read it from time to time and improve on it. I really see some guys are applying nice styling and customizing their blogs considerably and that is of great interest to me.

Here is a list of blogs that on a first look, impressed me today:
rainydaygardening.blogspot.com
artearthinksoul.blogspot.com
fangmannfollies.blogspot.com
innisrecipes.blogspot.com
vinceslifesong.blogspot.com
johnnyjeffords.blogspot.com
tomionsoftware.blogspot.com
robbyoconnor.blogspot.com
lborupj.blogspot.com
juddsolutions.blogspot.com
deepakarora1984.blogspot.com
compdocs.blogspot.com
mlawire.blogspot.com

Also, I have to figure a way to backup! This is crucial. I've worked for AOL and after seeing how they screw data of their paying customers I can hardly rely on a company to keep my data especially if I have a free account.

One of the things that I don't like about blogging is that newer posts display above (IOW before) older posts. Sometimes (especially when several posts are related) it makes more sense to present the new post after the old. Maybe there's a way to change that.

Another thing that I don't like is that the edit window is not very big.

Here some other blog providers:
blog.bg - in Bulgarian, doesn't seem like it is very customizable. Nice postings are Devetashka Cave Erma river gate old well-temple at village Garlo Pernishko
wordpress.com

Nice photos at
http://www.evgenidinev.com/seen/buzludzha_inside/

GRUB

Ubuntu 11.04 (i still don't know its name) comes with a more recent version of GRUB. Here is a nice tutorial for it: Grub 2 Basics

What I did is: 1) install puppy 2) install ubuntu (both of them put their grubs on their partitions even though I had small 16MB ext3 partition for a boot loader - ubuntu installer does not allow putting grub on fat) ubuntu set its grub as the default one, and after that i reformatted the 16MB partition to fat and installed win7 on an extended partition, and win7 put its boot loader on the 16MB partition, but everything got fucked up and nothing wanted to load. I followed point 13 from the above tutorial (Reinstalling GRUB 2 from LiveCD ) so I boot the live CD and run

sudo mount /dev/sda6 /mnt
sudo grub-install --root-directory=/mnt /dev/sda
sudo umount /mnt
sudo init 6

that fixed everything
The next point in this tutorial 14 also seems interesting
Booting LiveCD and Other ISOs

Saturday, June 4, 2011

here's a joke I heard from a co-worker:

Четирима вървят по тротоара и носят един Трабант. Някакъв ги среща и пита:
- Абе, не го ли карате това Трабантче?
- Ааа, караме го, но сега бързаме.




Двама скитници прибягвали до следната хитрост. Когато положението станело много тежко и нямали никаква храна и стомасите им стържели от глад, отивали на гробището, намирали някой пресен гроб отравяли го, разпорвали стомаха на мъртвеца и ядяли това което той бил ял преди да почине.

Веднъж след като отровили гроба, извадили мъртвеца, той бил ял макарони, единия скитник започнал да яде, яде, яде, след малко се усетил че другия само гледа и нищо не хапва.
- Абе що не ядеш?
- Има косъм.
Като чул това на този който ядял му се повдигнало и повърнал. Приятелат му, който до сега гледал безучастно, тихо казал:
-Мерси че ми ги стопли - и веднага се впуснал лакомо да лапа.

When I made a search for the phrase "мерси че ми го стопли" I got italoauto-bg *

Wednesday, March 3, 2010

NHibernate

Quickstart guide

1. Create db nhibernate
2. Create table users
CREATE TABLE users (
LogonID nvarchar(20) NOT NULL default '0',
Name nvarchar(40) default NULL,
Password nvarchar(20) default NULL,
EmailAddress nvarchar(40) default NULL,
LastLogon datetime default NULL,
PRIMARY KEY (LogonID)
)
go

3. Create the test windows forms app, add the user class
public class User{
private string id, userName, password, emailAddress;
private DateTime lastLogon;

public virtual string Id{
get { return id; }
set { id = value; }
}
public virtual string UserName{
get { return userName; }
set { userName = value; }
}
public virtual string Password{
get { return password; }
set { password = value; }
}
public virtual string EmailAddress{
get { return emailAddress; }
set { emailAddress = value; }
}
public virtual DateTime LastLogon{
get { return lastLogon; }
set { lastLogon = value; }
}
}


Add the mapping file user.hbm.xml and set its build action as embedded resource

<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
<class name="quickstart.User, quickstart" table="users">
<id name="Id" column="LogonId" type="String" length="20">
<generator class="assigned" />
</id>
<property name="UserName" column="Name" type="String" length="40"/>
<property name="Password" type="String" length="20"/>
<property name="EmailAddress" type="String" length="40"/>
<property name="LastLogon" type="DateTime"/>
</class>
</hibernate-mapping>


add an app.config

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="hibernate-configuration"
type="NHibernate.Cfg.ConfigurationSectionHandler, NHibernate"/>
</configSections>
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
<session-factory>
<property name="dialect">NHibernate.Dialect.MsSql2000Dialect</property>
<property name="connection.provider"> NHibernate.Connection.DriverConnectionProvider </property>
<property name="proxyfactory.factory_class"> NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu </property>
<property name="connection.connection_string">Server=(local);database=NHibernate;Integrated Security=SSPI;</property>
<property name="show_sql">false</property>
<property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property>
<property name="connection.isolation">ReadCommitted</property>
<property name="use_proxy_validator">true</property>
</session-factory>
</hibernate-configuration>
</configuration>


download and extract nhibernate to a folder
set references from ur winapp to nhibernate.dll, LinFu.Dynamic.Proxy.dll, NHibernate.ByteCode.LinFu.dll

add some handler to ur app and paste this code

Configuration cfg = new Configuration();
cfg.AddAssembly("quickstart");
ISessionFactory factory = cfg.BuildSessionFactory();
ISession session = factory.OpenSession();
ITransaction transaction = session.BeginTransaction();

User newUser = new User();
newUser.Id = "joe_cool";
newUser.UserName = "Joseph Cool";
newUser.Password = "abc123";
newUser.EmailAddress = "joe@cool.com";
newUser.LastLogon = DateTime.Now;

// Tell NHibernate that this object should be saved
session.Save(newUser);

// commit all of the changes to the DB and close the ISession
transaction.Commit();
session.Close();

find the dbid by running
select * from master..sysdatabases
run profiler create new trace filter for the dbid of ur db (users)
step thru the above code
u should get a trace like this

exec sp_reset_connection
go
SET TRANSACTION ISOLATION LEVEL READ COMMITTED;BEGIN TRANSACTION
go
exec sp_executesql N'INSERT INTO users (Name, Password, EmailAddress, LastLogon, LogonId) VALUES (@p0, @p1, @p2, @p3, @p4)', N'@p0 nvarchar(11),@p1 nvarchar(6),@p2 nvarchar(12),@p3 datetime,@p4 nvarchar(8)', @p0 = N'Joseph Cool', @p1 = N'abc123', @p2 = N'joe@cool.com', @p3 = 'Mar 3 2010 8:54:54:000AM', @p4 = N'joe_cool'
go
COMMIT TRANSACTION
go

if u check the db there should be a record for joe


if wan more info http://groups.google.com/group/nhusers
if wana copy/paste between local comp and remote desktop follow these steps
http://cutecomputer.wordpress.com/2007/01/03/howto-copy-paste-between-local-and-remote-desktop/