Make browser tab flash a notification

You can change the title of the page (this should also change the text in the tab). document.title=”New title”; Additionally you could do this in a setInterval back and forth between the page title, and the information you are attempting to show the user. I have seen this behavior on gmail with incoming chat communication.

SSH in git behind proxy on windows 7

Setting http.proxy will not work for ssh. You need to proxy your ssh connection. See this description. To summarize: Start git-cmd.bat and create ~/.ssh/config (notepad %home%\.ssh\config.) ProxyCommand /bin/connect.exe -H %h %p Host User git Port 22 Hostname IdentityFile “C:\users\username\.ssh\id_rsa” TCPKeepAlive yes IdentitiesOnly yes Host User git Port 443 Hostname IdentityFile … Read more

How to force MVC to Validate IValidatableObject

You can manually call Validate() by passing in a new instance of ValidationContext, like so: [HttpPost] public ActionResult Create(Model model) { if (!ModelState.IsValid) { var errors = model.Validate(new ValidationContext(model, null, null)); foreach (var error in errors) foreach (var memberName in error.MemberNames) ModelState.AddModelError(memberName, error.ErrorMessage); return View(post); } } A caveat of this approach is that in … Read more

How do I install a test-jar in maven?

You don’t need to install them manually. Maven will do this for you when executing: mvn clean install You need a configuration along the lines of: … <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <version>2.2</version> <executions> <execution> <goals> <goal>test-jar</goal> </goals> </execution> </executions> </plugin> </plugins> </build> … Then, later on in your other module where you’ll need to … Read more

When should I use support vector machines as opposed to artificial neural networks?

Are SVMs better than ANN with many classes? You are probably referring to the fact that SVMs are in essence, either either one-class or two-class classifiers. Indeed they are and there’s no way to modify a SVM algorithm to classify more than two classes. The fundamental feature of a SVM is the separating maximum-margin hyperplane … Read more

Why can a .NET delegate not be declared static?

Try this: public delegate void MoveDelegate(object o); public static MoveDelegate MoveMethod; So the method-variable can be defined static. The keyword static has no meaning for the delegate definition, just like enum or const definitions. An example of how to assign the static method-field: public class A { public delegate void MoveDelegate(object o); public static MoveDelegate … Read more