Category: trouble - problems encountered

Jquery noconflict

In WordPress, jquery is configured not to define the $ variable since it may conflict with other libraries.
You are therefore encouraged to use jQuery(document).ready(…

But we are all creatures of habit and thus may prefer to use $. So simply add this line at the top of your js file / script tag

if (typeof($) == ‘undefined’) $ = jQuery.noConflict(); // added by Imran@cselian.com to use in wordpress

cleanup gmail mailbox

 

Here’s how you can get started:

  1. Create a copy of this sheet in your Google Docs account.
  2. A new Gmail Menu will appear in the sheet after about a minute. Select “Reset Canvas” from the Gmail menu to initialize your sheet.
  3. Accept the authorization screen and then choose Grant Access to let Google Docs access your Gmail Inbox. This is completely safe because your own Google Docs account is requesting access to your own Gmail account (see source code).
  4. Once the permissions have been granted, choose “Scan Mailbox” from the Gmail menu to start the scanning process.

Sit back and relax as the last step may take time depending on how big your Gmail mailbox is.

Grace a: http://www.labnol.org/internet/sort-gmail-by-size/21191/

Win7 – temp profile

http://social.technet.microsoft.com/Forums/en-US/w7itprogeneral/thread/5ec0b949-effa-4e30-ba09-dc948a4c7a8b

What happened to me was that I deleted my own profile just to get a new clean one and all of a sudden Windows 7 complains about Temporary Profile. It didn´t matter if i Rebooted or anything. I alway got a Temporary Profile.

I solved my problem by going into the registry and delete the effected profile’s subfolder under HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList

After that all was well again!
– Jesper Bernle

nhibernate hasmany to many

When doing a hasManyToMany relationship, SO makes a few observations

In a many-to-many relationship if collections on both entities aren’t populated, NHibernate doesn’t persist data to the link table.
Set Cascade.All()
Use Flush

So it looks like you dont need it on both sides, but you atleast need the cascade and the flush.
damn it looks like nhibernate isnt toilet trained! or its helping us to be

visual studio port and firewall interference

visual studio (vwd) keeps saying “unable to launch because the port is in use” no matter what port / whether auto-assign is true. netstat / telnet dont show anything either.

http://stackoverflow.com/questions/607562/visual-studio-development-server-using-wrong-port

explains that a firewall update can make things go awry

On investigating I found it to be related to the Eset personal security (guessing a recent update messed something up). To solve it I excluded VS2008 from the active browser filtering – this is in: setup -> advanced firewall setup -> antivirus & anti spyware -> web access protection -> HTTP -> webbrowsers

Deselecting vsdev in here fixed the problem – interestingly enough disabling the firewall and antivirus / antispyware did not solve the issue, so it is worth looking for a similar setting if you are running different security software

cakephp password hashing

cake’s auth component has a password method. this is called to hash all passwords before its made avail to the app controller.

When integrating with a legacy database that uses md5, simply return md5($password) here instead of calling Security::hash()

 

wcf config issues

Always use svc trace logging and the trace viewer to see the exact nature of the error. Once you pinpoint it, its easy to find fixes like:

maximum asp.net request length exceeded, where the problem is not binding, but Read more »

platform target else dll not found

Platform Targets for Unit Test Projects apparently need to be set.

A Unit Test Project that runs fine locally with an x86 machine fails to on a 64 bit Build Machine with an error:

Ensure that the assembly XYZ is located in the application directory or in the Global Assembly Cache.

But its there. Whats missing is a <PlatformTarget>x86</PlatformTarget> tag in the Release / Debug configuration.

Just whip out the proj file and look for:

<PropertyGroup Condition=” ‘$(Configuration)|$(Platform)’ == ‘Release|AnyCPU’ “> (Or Debug) and add this.

Also, if this dll is not used directly in this project, a dummy unit test that explicitly calls some class in the referred dll will also help the UTF prepare a list of dlls needed.