simple singularities

simple and clean mssql full-backup script

Filed under: programming — fri13th April 24, 2010 @ 7:27 pm

open the sql query and execute this code for backup

BACKUP DATABASE dbname TO DISK='C:\dbbackup\backupfile.bak'

and load it from another server!

USE master
GO
DROP DATABASE dbname
GO
RESTORE DATABASE dbname FROM DISK='C:\dbbackup\backupfile.bak'

very simple, isn’t it? also there are many and many other backup options worth for check.

there are some critical bug(?) in cygwin. if you upload some files using cygwin’s ssh protocol, the files’s permission are -rwx—— by default, it causes operation system error. so you have to change the permission to -rwxrwxrwx. not only db backup file, even just a plain asp file can’t be opened. so don’t miss it.

struts 2 ‘s no result problem

Filed under: java,programming — fri13th April 8, 2010 @ 9:47 pm

i stucked on some mysterious error today. i made some xml config in struts.xml, it’s very simple one and there’s nothing wrong as far as i knew

<action name="someurl" class="someAction" method="list" >
	<result>/WEB-INF/pages/someurl.jsp</result>
</action>

and i got this error

Could not find action or result
No result defined for action com.fri13th.SomeAction and result input

of course i checked and checked all the parameters again. there was no mistake at all.. so why it didn’t work?

then i make another class and check again. it works fine. so what the difference was? the only difference was annotated validation in front of class definition. i deleted some validation code and it worked fine..

i’m too tired today, must go to bed early than usual..

ubuntu network disconnect problem

Filed under: smalltalk — fri13th December 25, 2009 @ 10:00 am

there was some weird problem in my ubuntu pc. the network connection is closed frequently and it was fixed by rebooting. i googled the situation and nothing found. then i check the resolv.conf and it was empty and there was a message #Generated by NetworkManager. WTF!

i googled it and found these solutions

sudo chmod -w /etc/resolv.conf
sudo chattr +i /etc/resolv.conf

this prevents to change the resolv.conf file, but not a good idea

this one is more primitive solution

sudo vi /etc/dhcp3/dhclient.conf

and change this line.

prepend domain-name-servers 8.8.8.8

i don’t know which one works and which one works not. i applied all.. and got no problem now. so i wish you luck! enjoy the ubuntu life!

Selenium RC and Firefox issue in Snow Leopard

Filed under: apple,java — fri13th December 16, 2009 @ 10:22 pm

I just surprised that selenium rc 1.0.2 can’t launch firefox in snow leopard os. these all softwares are so famous in their fields. so it must be easy to solve this issue, but nope..

the problem is complicated, and i almost blow up my macbook’s hard drive by moving sqllite library..

there are many suggestions but none works. believe me, i try all. and this is the final solution that really works

http://jira.openqa.org/browse/SRC-743

there’s an attachment called snowleopard.patch file. you can apply it to the source of selenium-server.jar. and this can fix all the problem at once.

ie6 overflow and scroll bar bug

Filed under: programming — fri13th November 19, 2009 @ 6:32 pm

if some content i.e. image is bigger than contents pane i.e. div, ie6 doesn’t show it right. it just cut and show only half of image. wtf..

so i find the solution, or maybe this is also ie6′s bug?

just add this to the css properties of the cropped image.

position:relative;

and this doesn’t solve the whole problem.

the scroll bar is set to show div’s width and and no scrollbar for image..

so i add this line

position:relative;
zoom:1;

and problem solved.. you can check the final result from my another gourmet and photo blog here

Microsoft PowerShell 2.0 RC with Ruby & vi

Filed under: programming — fri13th October 17, 2009 @ 4:23 pm

i didn’t notice that PowerShell which is bundled in Windows7, can also be installed in WIndows XP SP3. and i googled and knew RC version is available now. so why not give a try?

you can download the rc version here
https://connect.microsoft.com/windowsmanagement/Downloads

after install, you need to permit script execution

Set-ExecutionPolicy RemoteSigned

and install ruby and vi, which vendor you like :-)
i prefer this ruby distribution
http://rubyinstaller.org/

vi has many variation, so i can’t choose one. anyway gvim might be a good idea..
http://www.vim.org/download.php#pc

and you need to setup the vi path.

modify or create below file

%userprofile%¥My Documents¥WindowsPowerShell¥Microsoft.PowerShell_profile.ps1

and add this line

Set-Alias vi 'path/to/vi.exe'

that’s all! you can do many convenient script jobs in Windows XP!

unalz in mac

Filed under: apple,programming — fri13th September 17, 2009 @ 12:03 pm

alzip format alz is the most wierd compression format, widely spread in korea. it’s some kind of disaster, why i have to use alz? only one thing good is it can split big files into pieces.

i usually use winrar in windows, but for alz format i have to install another one, like panzip. it’s the most thing i don’t like, so.. i found some good solution

download unalz from this link

http://www.kippler.com/win/unalz/

the usage is very simple

make posix
sudo mv unalz /usr/bin

actually unalz is included in port, but not compiled well in my snow leopard

sudo port install unalz

will show some error, please someone fix this issue ;-)

MacPorts issues in snow leopard, again

Filed under: apple,smalltalk — fri13th September 15, 2009 @ 6:52 am

i encountered the same trouble again.

like this:

dyld: Library not loaded: /opt/local/lib/db46/libdb-4.6.dylib
  Referenced from: /opt/local/bin/svn
  Reason: no suitable image found.  Did find:
        /opt/local/lib/db46/libdb-4.6.dylib: mach-o, but wrong architecture

this time, i manage to fix it. it was because snow leopard doesn’t use 32bit libraries. so you need to uninstall and rebuild all products for 64bit system. if you clean-install snow leopard, you don’t need to this.

1
2
port installed # listing installed software
sudo port -f uninstall installed

and install necessary program again :-)

for me:

1
2
sudo port install coreutils +with_default_names
sudo port install subversion

etc… etc…

you may need to reinstall macports 1.8.0 for snow leopard again, after uninstalling all programs

MacPorts issues in snow leopard

Filed under: apple — fri13th September 10, 2009 @ 8:51 pm

after upgrade to snow leopard, it became impossible to install some program using MacPorts system. the fix is very simple, just download new MacPorts from homepage and also download new xcode from ADC.

this is very simple, though downloading big file like xcode took some time..

and you know, we need to update whole system

1
sudo port -v selfupdate

it looks pretty easy till now, but..

if you try this..

1
sudo port upgrade installed

you got some error like this

dyld: Library not loaded: /opt/local/lib/libintl.8.dylib
  Referenced from: /opt/local/bin/ls
  Reason: no suitable image found.  Did find:
        /opt/local/lib/libintl.8.dylib: mach-o, but wrong architecture
Trace/BPT trap

what the heck! it is caused by wrong gettext, so we can solve it by this code…

1
2
sudo port activate gettext @0.17_3
sudo port uninstall gettext @0.17_4

i don’t know well, but automatic update is not done right now.. nayway it doesn’t that matter now.. so i’ll wait next version

new blog opened

Filed under: smalltalk — fri13th April 25, 2009 @ 5:38 pm

i don’t know who sees this message but i opened another blog for korean people. this blog’s theme is gourmet, and travel. it may not so fun..

http://fri13th.com/ep

i’ll add some link for this blog..

and anyway.. i will setup another blog for my art works..
the name will be e.a.f.d.l..

this blog will continue also, i earn money by developing software..
(i’m deeply suffered by ie6 in these days.. maybe there will be a chance to tell the whole story.)

Next Page >>>