Program Download – IE CHROME – “is not commonly downloaded and could be dangerous.”

The best resources are this blog post and this blog post. To sum up: Sign you package with an authenticode signature. Don’t be malware (I’m sure you got that covered). Logo your software (if it’s not a browser plug-in). This can be a frustrating process, so hang in there. Microsoft has not disclosed how many … Read more

Grails – getting a message value from controller

Inside a controller or a taglib, you can use the following : g.message(code: ‘some.message’) However, inside domain classes or services, you need to inject messageSource and call getMessage() method from Sping class AbstractMessageSource. This snippet shows you how to do that: import org.springframework.context.i18n.LocaleContextHolder as LCH … class MyServiceOrMyDomain { def messageSource … messageSource.getMessage(code, msgArgs, defaultMsg, … Read more

socket.io private message

No tutorial needed. The Socket.IO FAQ is pretty straightforward on this one: socket.emit(‘news’, { hello: ‘world’ }); EDIT: Folks are linking to this question when asking about how to get that socket object later. There is no need to. When a new client connects, save a reference to that socket on whatever object you’re keeping … Read more

django display message after POST form submit

The django admin uses django.contrib.messages, you use it like this: In your view: from django.contrib import messages def my_view(request): … if form.is_valid(): …. messages.success(request, ‘Form submission successful’) And in your templates: {% if messages %} <ul class=”messages”> {% for message in messages %} <li {% if message.tags %} class=” {{ message.tags }} ” {% endif … Read more

How to send an email through iOS simulator?

You have to rely on the iOS that the MFMailComposeResult that is handed back in mailComposeController:didFinishWithResult:error: is correct. The simulator fakes that result; no actual mail is sent although it says MFMailComposeResultSent. The tutorial mentioned misses an important point: The first thing you should do before using MFMailComposeViewController is to check [MFMailComposeViewController canSendMail]. That will … Read more

Exception message (Python 2.6)

This prints the exception message: except Exception, e: print “Couldn’t do it: %s” % e This will show the whole traceback: import traceback # … except Exception, e: traceback.print_exc() But you might not want to catch Exception. The narrower you can make your catch, the better, generally. So you might want to try: except IOError, … Read more

Can I add a message/note/comment when creating a new branch in Git?

You want branch descriptions: git branch –edit-description This will open up your editor and let you attach metadata to the branch. You can extract it with: git config branch.<branch>.description A couple of important notes: This is stored locally. By definition it can’t be pushed since it’s stored in .git/config. All the same it works great … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)