måndag 23 september 2013
Apache Wicket love and hate story ;)
http://tech.small-improvements.com/2011/04/03/10-things-i-love-about-apache-wicket/
måndag 16 september 2013
Jquery form plugin
http://jsfiddle.net/KvXK4/1/
http://stackoverflow.com/a/12954102
http://stackoverflow.com/a/12650849
http://stackoverflow.com/a/8191682
http://www.playframework.com/documentation/1.2.7/routes#anamecontenttypesSettingcontenttypesa
http://stackoverflow.com/a/12954102
http://stackoverflow.com/a/12650849
http://stackoverflow.com/a/8191682
http://www.playframework.com/documentation/1.2.7/routes#anamecontenttypesSettingcontenttypesa
lördag 14 september 2013
Virtualbox, to copy the image to another computer
http://jen3ral.wordpress.com/ 2009/03/02/copying-a- virtualbox-virtual-machine- onto-another-host-computer/
To copy the image to another computer:
To copy the image to another computer:
- Close VirtualBox if it’s running.
- Go to your home folder and enable show hidden files through the View menu.
- Find the .VirtualBox folder, go to the HardDisks folder and copy the .vdi file you want to use. In my case I burned the file to a DVD because we have so many people who will be needing to save this in their home directory.
- Now go to the other host computer you want to use that .vdi file on and open VirtualBox if you’ve never opened it on the new host machine before. This will create the .VirtualBox folder. Then paste it in the same place (user’s home directory -> show hidden files -> .VirtualBox -> HardDisks). You might need to create the HardDisks folder yourself.
- Edit the permissions of the file in order for it to work. All I did was right-click on it after moving the file over and give read & write permissions to the owner, which should have your username there. You can change the permissions to the group and others sections if needed later, but that wasn’t necessary for me.
- From the VirtualBox window click the New button. This will open the New Virtual Machine Wizard.
- VM Name and OS Type – Give it a name and pick the type & version of the virtual machine OS.
- Memory – Just leave it as the default. You can change it later if you notice any problems.
- Virtual Hard Disk – This is where you select the hard disk you copied in to the home directory earlier. So click on existing and when the Virtual Media Manager window comes up choose to Add. It should take you to the correct folder so just select the image file and click open, then select.
- You’re done, it’ll take you back to the main window with the new virtual machine you just created based off the existing image file.
onsdag 11 september 2013
ref: http://stackoverflow.com/a/1052246/517457
Figured it out.
Turns out Internet Explorer chokes if you use anything other than
I was using version numbers appended onto
Figured it out.
Turns out Internet Explorer chokes if you use anything other than
"javascript"
in the language
attribute of the script
tag.I was using version numbers appended onto
javascript
in the language
attribute, which was causing IE not to load prototype.js
tisdag 10 september 2013
Extend JQuery UI dialog
ref: http://stackoverflow.com/a/17763712
var defaults = {
autoOpen: false,
draggable: false,
resizable: false,
closeOnEscape: true,
modal: true,
height: 'auto',
width: 200,
position: ['top', 150]
};
and then use $.extend
with the specific options you want to override:$('.detail-view').dialog($.extend({}, defaults, {
width: 600
}));
$('.forgotpass').dialog($.extend({}, defaults, {
width: 400
}));
You could encapsulate this in a function:function createDialog(selector, options) {
$(selector).dialog($.extend({}, defaults, options));
}
createDialog('.detail-view', {
width: 600
});
createDialog('.forgotpass', {
width: 400
});
Or of course if it's just width
:function createDialog(selector, width) {
$(selector).dialog($.extend({}, defaults, {width: width}));
}
createDialog('.detail-view', 600);
createDialog('.forgotpass', 400);
JQuery form plugin issue < IE10
https://github.com/malsup/form/issues/302
and
https://drupal.org/node/1675794
even better actually, use chromeframe
and
https://drupal.org/node/1675794
even better actually, use chromeframe
<meta
http-equiv
=
"X-UA-Compatible"
content
=
"chrome=1"
>
Add This slows page loading and the solution
The solution is to load AddThis script in asynchronous mode. This
would prevent AddThis from loading other assets except the initial
script. After loading this initial script your website will break
connection with the AddThis server and load itself further. When your
website’s DOM has fully loaded, you can call the init() function of
AddThis to resume loading of AddThis assets.
To do this, just add the following parameters to your script call
async=1&domready=1
So, instead of the following code:
Use this one (change the pubid parameter to your pubid):
And then call the init() function right before closing the body tag
You’ll see that your AddThis widget is loading faster than before. Of
course there could be other reasons that might be slowing down your
website. You should look at them separately.
ref:
http://techwelkin.com/slow-addthis-reason-and-solution#.Ui7RjaydnLY
To do this, just add the following parameters to your script call
async=1&domready=1
So, instead of the following code:
1 | < script type = "text/javascript" src = "http://s7.addthis.com/js/250/addthis_widget.js#pubid=xa-4f3e33c72b9a4e40" ></ script > |
1 | < script type = "text/javascript" src = "http://s7.addthis.com/js/250/addthis_widget.js#pubid=xa-4f3e33c72b9a4e40&async=1&&domready=1" ></ script > |
1 | <!-- Call for AddThis init() function --> |
2 | <script> |
3 | function initAddThis() |
4 | { |
5 | addthis.init() |
6 | } |
7 | initAddThis(); |
8 | </script> |
ref:
http://techwelkin.com/slow-addthis-reason-and-solution#.Ui7RjaydnLY
Prenumerera på:
Inlägg (Atom)