set currentpath=%~dp0
Friday, June 26, 2009
Bat file and current path
You can use this in your bat files to get current path
Zamena GPS Navigatora 2
Nastavak price Zamena GPS Naviagatora
Danas u 15:30 moj GPS navigator je isporucen servisu. Nesta pre toga sam dobio obavestenje iz servisa u kome pise:
Danas u 15:30 moj GPS navigator je isporucen servisu. Nesta pre toga sam dobio obavestenje iz servisa u kome pise:
Navigacia koju ste slali jos nije dostavljena servisu, cim dodje do nas bice pregledana I bice Vam javljeno.
Thursday, June 25, 2009
Zamena GPS Navigatora
Kupio sam GPS navigator Prestigio GeoVision 150 u Gigatron prodavnici (www.gigatronshop.com). Ispostvavilo se da je neispravn. Ovde cu da vam opisem kako je tekao tok reklamacije pa ce gore navedena firma dobiti od mene ili pohvale ili kritike.
- Dakle, danas u 13:00 doso je covek iz city expressa i uzeo neipsravan uredjaj. Kaze da ce biti u servisu gigatrona sutra do 13:00
...
- Dakle, danas u 13:00 doso je covek iz city expressa i uzeo neipsravan uredjaj. Kaze da ce biti u servisu gigatrona sutra do 13:00
...
Tuesday, June 09, 2009
Remove quotes from parameter in bat file
SET prop=%1
SET prop=###%prop%###
SET prop=%prop:"###=%
SET prop=%prop:###"=%
SET prop=%prop:###=%
Sunday, April 26, 2009
Second monitor preview
If you want to see what is on your second monitor (for example on your TV that is connected on your comp) you can use this application:
http://sites.google.com/site/mijalko/Home/second-monitor-preview
http://sites.google.com/site/mijalko/Home/second-monitor-preview
MSTest and TeamCity trouble
When I run test from Visual Studio all tests pass but when I setup test environment from Teamcity half of my test fails.
Problem was because some of assemblies was missing in mstest environment. Actually, I have used Enterprise library and I had custom trace listener. Test project had that trace listener in references. But when Teamcity runs mstest my assembly was missing in build agent working folder.
All assemblies that are not used directly in test (for example class from my assembly was dynamically loaded by enterprise library application logging block) will not be copied to test folder. Therefor, those test methods should be decorated with attribute like:
Somehow, this was not necessary when you run tests from Visuals Studio IDE.
I hope that I save you some time.
Problem was because some of assemblies was missing in mstest environment. Actually, I have used Enterprise library and I had custom trace listener. Test project had that trace listener in references. But when Teamcity runs mstest my assembly was missing in build agent working folder.
All assemblies that are not used directly in test (for example class from my assembly was dynamically loaded by enterprise library application logging block) will not be copied to test folder. Therefor, those test methods should be decorated with attribute like:
[DeploymentItem("MyTraceListener.dll")]
Somehow, this was not necessary when you run tests from Visuals Studio IDE.
I hope that I save you some time.
Wednesday, March 11, 2009
Hibernate (NHibernate) and Polymorphism
If you use lazy loading on base class, NHibernate will create proxy class of base class so you will not be able to use is operator to check type of object. For example:
If you now list all C objects from database and try to check of what type is C.BaseClass with
you will get an error.
Simplest way to solve this problem is to add method in base class that will returns instance to itself:
Now, you can check:
abstract class Base
{
};
class A : Base
{
}
class B: Base
{
}
class C
{
public virtual Base BaseClass {get; set;}
}
If you now list all C objects from database and try to check of what type is C.BaseClass with
if (c.BaseClass is A)
{
}
else if (c.BaseClass is B)
{
}
else
{
//ERROR
}
you will get an error.
Simplest way to solve this problem is to add method in base class that will returns instance to itself:
abstract class Base
{
public virtual Base This()
{
return this;
}
};
Now, you can check:
if (c.BaseClass.This() is A)
{
}
else if (c.BaseClass.This() is B)
{
}
Tuesday, March 10, 2009
Firefox hangs
It happened to me that firefox won't shutdown. Also, when I choose to start new instance of firefox it fails.
I found that problem was in skype's addon for firefox . I uninstalled it (in firefox: Tools => Addon=> Extension) and everything works OK now.
I found that problem was in skype's addon for firefox . I uninstalled it (in firefox: Tools => Addon=> Extension) and everything works OK now.
Friday, February 20, 2009
Missing svc handler
Windows 2008 comes with installed .NET framework 3.5 but without installed IIS. When you install IIS you don't have support for WCF (there is no handler for svc). To install support for svc open command prompt and go to .net framework 3.0 location (:\Windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation\) and run:
servicemodelreg -i
servicemodelreg -i
Wednesday, February 04, 2009
An error occurred when verifying security for the message
One of the possible reasons:
- Check if the time on the server and the time on the client does not match.
- Check if the time on the server and the time on the client does not match.
Subscribe to:
Posts (Atom)