Well on facebook, there is this iStudent competition. If you win apple will give you some gadgets so you can show off in college. Sounds fun, right ?
To participate you need to register and use iStudent facebook app. There you'll get some question that you need to answer. Tricky part is that there's limited time for that, each couple of seconds you loose one point. So... what can you do to stop the time ? It's easy, buy a time machine ! No, but really, just install NoScript for firefox and you're good. Seriously. You can always create second facebook account to get the questions and cheat, but this is just sooooo easy ! Anyway, have fun. You can get also points for inviting friends but that's just too easy. I hope I'll write here more often than once a year ;)
Cheers !
BTW.
Remember, fact that you can cheat do not allow you to do so ! ;-)
Sunday, November 7, 2010
Wednesday, March 17, 2010
Telelogic Synergy problem
Recently I've encountered a strange Telelogic Synergy problem.
When starting classic client I got couple of errors:
ACcent execution aborted in module vistartup, file, line 123
ACcent execution aborted in module viproject, file, line 321
operand of generic cast has an incompatible type
Well that tells nothing. After further investigation it finds out that the configuration file (ccm.ini) was either corrupted or read/write access to it was denied.
Deleting the file helped and everything went back to normal ;) (of course the file re-created with default settings)
This is more a remainder for me that actual note, but maybe someone will find that information usefull :)
When starting classic client I got couple of errors:
ACcent execution aborted in module vistartup, file
ACcent execution aborted in module viproject, file
operand of generic cast has an incompatible type
Well that tells nothing. After further investigation it finds out that the configuration file (ccm.ini) was either corrupted or read/write access to it was denied.
Deleting the file helped and everything went back to normal ;) (of course the file re-created with default settings)
This is more a remainder for me that actual note, but maybe someone will find that information usefull :)
Friday, March 5, 2010
HTC G1 and SMS Service Center
Well, recently I've switched phones with my friend (just for one day) and suddenly when I got my g1 back I couldn't send any sms!
So I called to my mobile operator and asked wth. Nice guy on line told me that he cannot help me with phone configuration because they don't know my phone model and they don't support it. What a bummer!
So I told him to give me Service center number and I configure it myself.
I never done that on this phone so I jumped to settings and started searching, searching... and nothing! No SMS Service Center number to change!
Well, that's not nice. I found two ways to do it.
First you have to dial *#*#4636#*#* and then g1 will take you to some super-cool-secret configuration screen where you can choose "Phone information" and change sms sc number.
The other way is to use app called AnyCut. It let you create shortcuts to applications and other stuff, you can create a shortcut to "Phone Info" there :)
Great thing is that you can create shortcuts to other fun things like "Debug intent", "Debug Tool" or "FieldTest" (you can also bring up FieldTest with code *#*#7262626#*#* ) which gives you some cool information about active gsm connection!
Have fun!
So I called to my mobile operator and asked wth. Nice guy on line told me that he cannot help me with phone configuration because they don't know my phone model and they don't support it. What a bummer!
So I told him to give me Service center number and I configure it myself.
I never done that on this phone so I jumped to settings and started searching, searching... and nothing! No SMS Service Center number to change!
Well, that's not nice. I found two ways to do it.
First you have to dial *#*#4636#*#* and then g1 will take you to some super-cool-secret configuration screen where you can choose "Phone information" and change sms sc number.
The other way is to use app called AnyCut. It let you create shortcuts to applications and other stuff, you can create a shortcut to "Phone Info" there :)
Great thing is that you can create shortcuts to other fun things like "Debug intent", "Debug Tool" or "FieldTest" (you can also bring up FieldTest with code *#*#7262626#*#* ) which gives you some cool information about active gsm connection!
Have fun!
Tuesday, December 9, 2008
Samba, vfs_extd_audit module and syslog

Did you ever wanted to monitor samba shares? To know, who's opening what and when, who's deleting what?
That's a good thing to know. Every sysadmin should know which user deleted some public file - by accident of course ;-)
By default SAMBA offers extended logging system, setting "log level = 5" in smb.conf allows us to see what's happening to our files. But! It logs ALOT of crap that we don't need!
Samba comes with some default modules that we can use some of them are responsible for logging, ie, vfs_audit which logs opening, renaming, deleting creating, etc to syslog, vfs_extd_audit which do exacltly the same thing but to BOTH syslog, AND samba log file and third module - vfs_full_audit which is richer and more configurable version of vfs_audit. We can choose what to log and what to not (to syslog only tho :(), very nice thing. However in this case we just need to log file access. Logging should go to separate samba log files, not to syslog.
According to SAMBA documentation, we can turn syslog off by setting "syslog = 0" variable in smb.conf file. However it doesn't work for vfs_extd_audit module. This module also offers us the log level, documentation says that setting "log level = 0 vfs:X" where X=vfs_extd_audit log level, we can seperate the global log level, and module log level. However it doesn't work either! So basicly we are stuck with logging to both syslog and samba log files which waste our disk spacem and we don't want that.
I wrote a simple patch for latest version of Samba (3.2.5) which resolves those issues.
It can be downloaded at https://bugzilla.samba.org/show_bug.cgi?id=5956
To patch your Samba go to samba_src/source/modules and type patch -p0 < vfs_extd_audit.c.patch
Then recompile and enjoy! :)
Friday, April 11, 2008
Playing with Hibernate.
So recently I'm in love in JAVA (at least my girlfriend says that). I'm developing simple project for my company (because I'm bored). Swing based thing with Hibernate and mssql.
I've used annotations to map classes to db, very cool thingy. Gotta love that. Everything in one file, class and database mapping. Some genius invented this :D But lets get to the point.
Following the manual on hibernate page good thing to do is to create a HibernateUtil (or call it whatever) class to help us menage hibernate session. (http://www.hibernate.org/hib_docs/v3/reference/en/html/tutorial.html#tutorial-firstapp) So I've created it. But I don't wanna use mapping files in xml's, I wanna use Annotations, so what I need to change is
sessionFactory = new Configuration().configure().buildSessionFactory();
to
sessionFactory = new AnnotationConfiguration().buildSessionFactory();
Hibernate has couple of configuration methods.
- You can configure thru the code, eg.
sessionFactory = new AnnotationConfiguration()
.addPackage("test.animals") //the fully qualified package name
.addAnnotatedClass(Flight.class)
.buildSessionFactory()
- Configure thru hibernate.properties file. Altrought that method (as far as i know) cannot directly add/configure annotated classes.
- And the last but best method thru hibernate.cfg.xml file. It is the common way of using hibernate.cfg.xml for Hibernate configuration.
File is very flexible, and understandable.
All tutorials and manuals on hibernate.org tell that hibernate.cfg.xml is the best way of configuring hibernate.
But, they don't tell that if you'll be using AnnotationConfiguration that file ISN'T searched in classpath!
That gave me smth. to think about when i was wondering why my configuration file isn't parsed. I've tryied adding in do different folders, debugging my app and nothing.
Then I've came up with simple idea. I simply put path to my config file in creation of sessionFactory. So it looks like this.
sessionFactory =
new AnnotationConfiguration()
.configure("/hibernate.cfg.xml")
.buildSessionFactory();
And boom~! Everything works fine ;-)
I've used annotations to map classes to db, very cool thingy. Gotta love that. Everything in one file, class and database mapping. Some genius invented this :D But lets get to the point.
Following the manual on hibernate page good thing to do is to create a HibernateUtil (or call it whatever) class to help us menage hibernate session. (http://www.hibernate.org/hib_docs/v3/reference/en/html/tutorial.html#tutorial-firstapp) So I've created it. But I don't wanna use mapping files in xml's, I wanna use Annotations, so what I need to change is
sessionFactory = new Configuration().configure().buildSessionFactory();
to
sessionFactory = new AnnotationConfiguration().buildSessionFactory();
Hibernate has couple of configuration methods.
- You can configure thru the code, eg.
sessionFactory = new AnnotationConfiguration()
.addPackage("test.animals") //the fully qualified package name
.addAnnotatedClass(Flight.class)
.buildSessionFactory()
- Configure thru hibernate.properties file. Altrought that method (as far as i know) cannot directly add/configure annotated classes.
- And the last but best method thru hibernate.cfg.xml file. It is the common way of using hibernate.cfg.xml for Hibernate configuration.
File is very flexible, and understandable.
All tutorials and manuals on hibernate.org tell that hibernate.cfg.xml is the best way of configuring hibernate.
But, they don't tell that if you'll be using AnnotationConfiguration that file ISN'T searched in classpath!
That gave me smth. to think about when i was wondering why my configuration file isn't parsed. I've tryied adding in do different folders, debugging my app and nothing.
Then I've came up with simple idea. I simply put path to my config file in creation of sessionFactory. So it looks like this.
sessionFactory =
new AnnotationConfiguration()
.configure("/hibernate.cfg.xml")
.buildSessionFactory();
And boom~! Everything works fine ;-)
Subscribe to:
Posts (Atom)
