Update (08/09/2016): Starting version 2.8.6, fullpage.js now has built-in support for fade-in effect for slides via the 'faddingEffect' extension.
fullpage.js offers the option to display slides in sections which navigate horizontally. The plugin uses a scroll-left or scroll-right transform for changing slides.
The plugin however doesn't support cyclic loop back for slides. This means that after the last slide, the slides container will scroll-left all the way to the first slide. If there are 3 or more slides, this can be an unwanted effect.
An elegant solution to this is to nullify the scrolling and use a fade-in effect for each slide. This can be achieved by using the plugin's options to hook callbacks on slide transitions as shown below.
Java initialization errors on Linux
Java (JVM) can fail to start and throw error messages like these:
There can be several reasons behind this and increasing the heap size and permgen size of the JVM often fixes this issue.
However, such errors can still occur even if the heap size and other JVM parameters have been setup correctly. In such cases, the issue is often with the system level configuration.
On Linux, this issue can occur if the virtual memory size limit is not sufficient enough. To fix this:
$ java -version
Error occurred during initialization of VM
Could not reserve space for ObjectStartArray
$ java -version
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
There can be several reasons behind this and increasing the heap size and permgen size of the JVM often fixes this issue.
However, such errors can still occur even if the heap size and other JVM parameters have been setup correctly. In such cases, the issue is often with the system level configuration.
On Linux, this issue can occur if the virtual memory size limit is not sufficient enough. To fix this:
- On RHEL, execute: limit vmemoryuse unlimited
- In bash, execute: ulimit -v unlimited
Fixing sticky Control key issues with Citrix Reciever 13.0 on Ubuntu
To fix this issue on Ubuntu, edit these two files:
- ~/.ICAClient/wfclient.ini
- Replace 'KeyboardLayout = (User Profile)' with 'KeyboardLayout = US-International' (or your preferred keyboard layout)
- /opt/Citrix/ICAClient/config/module.ini
- Replace 'UseLocalIM=True' with 'UseLocalIM=False'.
If the sticky Ctrl key issue is still not fixed, update Ubuntu system settings to not show the mouse location when Ctrl key is clicked. Instructions can be found here.
If the issue still persists, try these links:
- Citrix forums: CTRL key sticking
- Citrix forums: CTRL Key Stuck
- ServerFault: Why is my Linux ICA client unable to use the “CTRL” key?
Related resources:
- CitrixICAClientHowTo (contains installation instructions for Ubuntu)
Fixing Android shutting down on screen lock
There are many reasons that can cause Android 4.x versions to shut down on screen lock. If you start facing this problem, then the first thing that you should do is revert the most recent changes - change in settings, newly installed applications etc. - and check if it fixes the problem.
Some known reasons for this issue are -
Some known reasons for this issue are -
- Netflix app on Android 4.3
- http://www.androidcentral.com/netflix-and-google-working-android-43-device-lock-solution
- http://forum.xda-developers.com/showthread.php?t=2377304&highlight=chromecast
- In some cases this is known to have frozen the Android device which required a hard reset to fix.
- Enabling developer options and turning off all animations can cause the device to shut down on screen lock
- Enabling 'Settings -> Developer Options' and changing a couple of settings to disable animations can cause this bug. Switching off developer options fixes the bug. Alternatively, you can keep developer options enabled but ensure that the 'Window Animation Scale' option is not disabled/switched off.
Google Apps standard account alternative - Microsoft Outlook.com
Checkout this pretty comprehensive post by Derrick Wlodarz -
http://betanews.com/2013/08/26/how-to-use-outlook-com-as-a-free-custom-domain-email-host/
( Labels:
collaboration-tools,
google-apps,
microsoft,
outlook.com
)
( Posted on: September 30, 2013 )
How to mount disks at startup with custom file/directory access permissions in Ubuntu
- https://help.ubuntu.com/community/AutomaticallyMountPartitions
- http://opensuse.swerdna.org/susentfs.html#table
- Alternate link - http://swerdna.dyndns.org/susentfs.html
- Google webcache link
- http://askubuntu.com/questions/252361/how-could-i-mount-an-ext4-partition-and-have-write-permission
- http://itsfoss.com/set-write-permission-ext4-partition-ubuntu-linux/
Enabling/disabling auto start up services in Ubuntu
Services which are automatically started on boot-up can be enabled or disabled using the BootUp Manager (BuM) application in Ubuntu. BuM can also be installed via apt-get -
Also check this great answer on askubuntu for other ways to accomplish this. The upstart method of creating override files described in that answer also works great.
Some typical services which don't necessarily need to be started on boot are -
sudo apt-get install bumInstructions for other ways to install BuM are provided on the project's homepage linked above.
Also check this great answer on askubuntu for other ways to accomplish this. The upstart method of creating override files described in that answer also works great.
Some typical services which don't necessarily need to be started on boot are -
- mysql
- apache(2)
- postgresql/postgres-xc (if installed)
- vsftpd - a FTP daemon
- zramswap - might not be required on systems with sufficient RAM (~ 4GB or higher)
- bluetooth
sudo service <service-name> start
Making Ubuntu Software Center work with KDE Plasma Desktop
After installing the KDE Plasma Desktop on top of Ubuntu 12.10, the Ubuntu Software Center is unable to install or remove any applications. On performing these operations, the software center gives this error message -
Authentication Error
Software can't be installed or removed because the authentication service is not available. (org.freedesktop.PolicyKit.Error.Failed: ('system-bus-name', {'name': ':1.184'}): org.debian.apt.install-or-remove-package
To fix this issue, install the PolicyKit Authentication Agent for KDE -
sudo apt-get install polkit-kde-1
You might need to logout or restart for the changes to take effect.
Reference -
Adding a volume indicator to the KDE panel in Ubuntu
The volume indicator does not show up in the KDE panel after installing it on Ubuntu 12.10. Installing kmix fixes this issue -
sudo apt-get install kmix
Reference - https://answers.launchpad.net/ubuntu/+question/79037
sudo apt-get install kmix
Reference - https://answers.launchpad.net/ubuntu/+question/79037
Why you shouldn't download Wordpress themes and plugins from non-trusted websites
Wordpress themes and plugins might seem harmless and especially impossible to use as a means for spreading trojans and malwares since they mostly consist of text files (PHP, Javascript, CSS, HTML etc) and images. But that assumption would be wrong.
Recently, during a boot time scan of my system using Avast, some files were identified as infected with malware and trojans. The most striking part of this was that the footer.php file of a Wordpress theme was detected as being infected by a Trojan (PHP:Agent-FQ [Trj])! The same theme was installed across 2 local Wordpress installations and the footer.php file was infected in both places.
The theme files were infected due to some base64 encoded text present in them. This does not mean that all encrypted/encoded text is bad. Some free themes have the license/copyright information and the creator's details (name, link etc.) in base64 encoded text in the footer along with some required HTML and PHP code so that removing the copyright information becomes difficult. But this might not be the case everytime.
Leland Fiegel has written a very good article over at Theme Lab which also discusses some measures to check themes with encrypted or encoded code if their use cannot be avoided.
Also, apart from Wordpress, this advice would also apply to any text/ASCII file in general containing encoded or encrypted text.
Recently, during a boot time scan of my system using Avast, some files were identified as infected with malware and trojans. The most striking part of this was that the footer.php file of a Wordpress theme was detected as being infected by a Trojan (PHP:Agent-FQ [Trj])! The same theme was installed across 2 local Wordpress installations and the footer.php file was infected in both places.
The theme files were infected due to some base64 encoded text present in them. This does not mean that all encrypted/encoded text is bad. Some free themes have the license/copyright information and the creator's details (name, link etc.) in base64 encoded text in the footer along with some required HTML and PHP code so that removing the copyright information becomes difficult. But this might not be the case everytime.
Leland Fiegel has written a very good article over at Theme Lab which also discusses some measures to check themes with encrypted or encoded code if their use cannot be avoided.
Also, apart from Wordpress, this advice would also apply to any text/ASCII file in general containing encoded or encrypted text.
Tips to speed up Eclipse IDE
Allocate more heap size: This is the most useful tip. This can be done by editing the -Xms and -Xmx JVM flags in the eclipse.ini file which can be found in the same directory as the eclipse.exe file.
Disable breadcrumbs: This will speed up switching between files.
Disable theme animations: Go to Window -> Preferences -> General -> Appearance -> uncheck the 'Enable Animations' checkbox.
Switch to the classic theme: Go to Window -> Preferences -> General -> Appearance -> select the classic theme. Restart eclipse once if you do not see any immediate changes or performance improvement.
Upgrade to a latest version: Juno (version 4.2.x) had several issues but many of these have been addressed and fixed in version 4.2.2.
Disable unnecessary plugin load on startup: Go to Window -> Preferences -> General -> Startup and Shutdown -> uncheck all plugins which don't need to be loaded on startup.
Use the latest JDK for launching Eclipse.
Minimalize file editors: This tip will speed up switching between files and is especially important for Java file editors. Try to disable file editor features which you don't use - e.g. hide line number, disable code folding, disable range indicators.
These settings can be controlled via Window -> Preferences -> General -> Editors -> Text Editors.
Disable automatic builds: This preference might vary from project to project. Automatic builds might not affect small projects but can cause a major hindrance for huge projects. This setting can be toggled from Project -> Build Automatically.
Close unused projects: Right click on a project -> Close Project.
Increase the autocomplete/content-assist timeout: Java content assist is known to timeout very often in Eclipse Juno. This is a reported bug and should be fixed in newer Juno releases. Until then, the content assist timeout can be increased by setting this flag in the eclipse.ini file
Also check this.
More references -
Disable breadcrumbs: This will speed up switching between files.
Disable theme animations: Go to Window -> Preferences -> General -> Appearance -> uncheck the 'Enable Animations' checkbox.
Switch to the classic theme: Go to Window -> Preferences -> General -> Appearance -> select the classic theme. Restart eclipse once if you do not see any immediate changes or performance improvement.
Upgrade to a latest version: Juno (version 4.2.x) had several issues but many of these have been addressed and fixed in version 4.2.2.
Disable unnecessary plugin load on startup: Go to Window -> Preferences -> General -> Startup and Shutdown -> uncheck all plugins which don't need to be loaded on startup.
Use the latest JDK for launching Eclipse.
Minimalize file editors: This tip will speed up switching between files and is especially important for Java file editors. Try to disable file editor features which you don't use - e.g. hide line number, disable code folding, disable range indicators.
These settings can be controlled via Window -> Preferences -> General -> Editors -> Text Editors.
Disable automatic builds: This preference might vary from project to project. Automatic builds might not affect small projects but can cause a major hindrance for huge projects. This setting can be toggled from Project -> Build Automatically.
Close unused projects: Right click on a project -> Close Project.
Increase the autocomplete/content-assist timeout: Java content assist is known to timeout very often in Eclipse Juno. This is a reported bug and should be fixed in newer Juno releases. Until then, the content assist timeout can be increased by setting this flag in the eclipse.ini file
: -vmargs -Dorg.eclipse.jdt.ui.codeAssistTimeout=60000. Also check this.
More references -
Zenburn - A pleasant color scheme for PuTTY
PuTTY's ("Putty" henceforth) default color scheme doesn't work for everyone. Especially, the (pure) blue color used for listing folders; that looks terrible on the black background.
On searching for better color schemes for Putty, I stumbled upon this blog post which shows two color schemes for Putty. Out of these, I settled for the Zenburn color scheme.
Steps to modify Putty's color scheme and saving it to new or already loaded sessions can be found here.
Putty RGB colors/options for the Zenburn color scheme are as follows -
More on the Zenburn color scheme -
On searching for better color schemes for Putty, I stumbled upon this blog post which shows two color schemes for Putty. Out of these, I settled for the Zenburn color scheme.
Steps to modify Putty's color scheme and saving it to new or already loaded sessions can be found here.
Putty RGB colors/options for the Zenburn color scheme are as follows -
- Default Foreground - 255/255/255
- Default Background - 51/51/51
- ANSI Black - 77/77/77
- ANSI Green - 152/251/152
- ANSI Yellow - 240/230/140
- ANSI Blue - 205/133/63
- ANSI Blue Bold -135/206/235
- ANSI Magenta - 255/222/173 or 205/92/92
- ANSI Cyan - 255/160/160
- ANSI Cyan Bold - 255/215/0
- ANSI White - 245/222/179
In addition to the above colors, I applied two more changes to the font (Putty -> Window -> Appearance -> Font Settings) -
- Font - Consolas, 10-point
- Font quality - Default (you can play around with this option to see what suits your screen/display best).
Edit: If you're on Windows, check out this Github repo which contains ready made registry files for installing the Zenburn scheme in Putty.
- Official Zenburn Page
- Zenburn : Low contrast colour scheme for low light conditions
- Zenburn for Eclipse
- Zenburn for EasyEclipse for Python 1.3.1
- Is Your IDE Hot or Not?
Google Apps standard account alternative - Zoho Apps Lite suite
Note - Zoho's offerings for the various apps mentioned in this article may have changed. Please visit Zoho's website for the latest details.
Also see - Google Apps standard account alternative - Microsoft Outlook.com
Also see - Google Apps standard account alternative - Microsoft Outlook.com
Google Apps Standard vs Zoho Lite
Recently, Google discontinued its free version of Google Apps for businesses. The free version of Google Apps, also known as Google Apps Standard, offered 10 user accounts per organization and access to free versions of all Google Apps - Google Mail, Google Drive/Docs, GTalk, Google Sites, Calendar and much more. This free account was perfect for small businesses and startups.With the standard Google Apps account being discontinued, Zoho offers a very good alternative/replacement with a free business account for its apps called Zoho Lite. Zoho Lite hosts 1 domain only and offers maximum 3 user accounts per organization with the free/personal versions of the following Zoho products available for each account -
- Zoho Mail - The lite/free version of Zoho mail offers -
35 user accounts (Zoho's Lite plan offerings have changed including a new referral program which awards 5 bonus users per referral)- 3 mailing groups
- 5GB storage per user account
- Contact management
- All standard features available in most email apps (labels, filters, forwarding, themes, archiving etc.)
- IMAP and POP access (this means that Zoho Mail can also be configured with email clients like Outlook and Thunderbird)
- Overall, Zoho Mail competes very well with GMail.
- Zoho Docs -
- 1 workspace with 1GB storage per account.
- Document version history
- File sharing
- Support for editing documents (Zoho Writer), spreadsheets (Zoho Sheet) and presentations (Zoho Show) online
- Real-time collaboration with chat (similar to Google Docs)
- and more
- Zoho Calendar - All standard calendar features like event sharing, invitations, reminders etc.
- Zoho Chat - Chat is integrated with the Zoho mail interface (similar to Google Talk) and can be used separately as well. Zoho Chat also supports other instant messaging platforms (IM) like Google Talk, Facebook, Yahoo!, MSN, AIM and more.
- Zoho Wiki - As the name suggests, this is an online collaboration and knowledge sharing platform. The following wiki features are included under the Zoho Lite package -
- 1 wiki per organization
- 3 wiki workspaces per organization
- 3 wiki users per organization (same as in Zoho Lite)
- Total 50 MB attachment storage space
- Unlimited pages and revisions
- Does not support custom domain
- and more
- Zoho Discussions - The free version of Zoho Discussion is offered under the Zoho Lite plan.
- Zoho Notebook - Allows creating online note-books with revision history.
- Zoho Bookmarks/Links - Integrated into the zoho apps dashboard.
Zoho is mobile ready
Zoho Docs has apps for iPhone, iPad and Android. Documents can also be accessed in read-only mode via Zoho's mobile website.Zoho Mail and Calendar are available via Zoho's mobile website.
Signing up for Zoho Lite
You'll need a registered domain name for your business/organization before signing up for Zoho Lite. Once the domain name is registered, initiate the Zoho Lite sign up process through this link and follow the instructions.Zoho Lite admin account
During the sign up process, you'll be asked to create a zoho personal account. This account will be the administrator account for your Zoho Lite business/organization account. This admin account will be used to create user accounts (@your-domain.com) and add/remove, enable/disable and configure Zoho apps for these user accounts.The admin account can also be updated to have an organization email address (@your-domain.com) later.
Enabling and Configuring Zoho Apps
After your Zoho Lite sign up is complete including the domain verification, follow these steps to enable the various Zoho Apps available under the Zoho Lite plan -- Login to Zoho Mail using your organization's admin account.
- Click on the 'Control Panel' link on the top right hand side.
- Inside the control panel, click on the 'Applications' menu entry.
- Click on the 'Add Apps' link next to the 'Office Suite' title/heading.
- Select the Zoho apps that you'd like to enable for each user account for your organization and save your selection.
![]() | |||
| Configuring Zoho Apps from the Control Panel. |
This is how the Zoho dashboard looks with all free Zoho Apps enabled. All apps can be easily accessed from the left navigation menu.
![]() |
| Zoho Apps dashboard. |
Alternatives for Twitter Bootstrap's affix navigation menu component
Bootstrap provides an affix navigation menu component which can make a nav-bar sticky while scrolling within a certain section of a page.
At the time of writing this article, this component is known to have cross-browser compatibility issues which are not yet fully fixed in Bootstrap's version 2.1.1 - e.g. flickering and violent movement of the affix menu when it reaches the bottom of its defined scrolling area/limit.
There are two jQuery based alternatives which can be used to provide a similar functionality -
The only drawback in these alternatives is that when used with menus, they do not provide automatic highlighting of the current menu entry (which is in view) on scrolling as seen in Bootstrap's affix plugin.
At the time of writing this article, this component is known to have cross-browser compatibility issues which are not yet fully fixed in Bootstrap's version 2.1.1 - e.g. flickering and violent movement of the affix menu when it reaches the bottom of its defined scrolling area/limit.
There are two jQuery based alternatives which can be used to provide a similar functionality -
- sitckyMojo - homepage / github
- jQuery Stick 'em - announcement / github / demo
The only drawback in these alternatives is that when used with menus, they do not provide automatic highlighting of the current menu entry (which is in view) on scrolling as seen in Bootstrap's affix plugin.
Fixing the jQuery scrollTo bug in Chrome and Safari
Introduction
The jQuery scrollTo plugin provides a smooth scroll effect for navigating within a page. The target to scroll to can be provided in many ways - DOM element (id, class, jQuery element selectors), absolute position, relative position and much more.
A common use of this plugin is to add 'scroll to top' buttons/links on a page. Clicking on these buttons/links would smooth-scoll to the top of the page. The animation effect and its duration can be controlled by setting the appropriate plugin options.
Issue
If the target specified for scrolling is a CSS class/id applied to the HTML body tag, then the smooth-scroll does not work in webkit based browsers like Chrome, Safari and Dolphin (mobile browser).
Solution
Instead of using a CSS class/id associated with the HTML body tag, create a separate HTML element (<div> or <a>) and use its class/id for the scrollTo plugin. This element should be styled appropriately to ensure that it is positioned at the top of the page and its positioning is not affected by other elements and vice versa.
Example
jsFiddle - http://jsfiddle.net/U6gFZ/1/
Code -
<html>
<head>
<!-- CSS style to position the placeholder element at the top of the page and making it unobtrusive -->
<style type='text/css'>
#top {
padding: 0px;
margin: 0px;
width: 0px;
height: 0px;
position: absolute;
top: 0px;
}
</style>
<!-- include jQuery and scrollTo plugin's javascript files -->
<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js'></script>
<script type='text/javascript' src='http://demos.flesler.com/jquery/scrollTo/js/jquery.scrollTo-min.js'></script>
<!-- initialize the scrollTo plugin on document load -->
<script type='text/javascript'>
$(document).ready(function() {
$('#scroll-to-top').bind('click', function(e) {
try {
e.preventDefault();
target = this.hash;
$('html, body').scrollTo(target, 1000);
} catch(error) {
alert('error - '+error);
}
});
});
</script>
</head>
<body>
<!-- the placeholder element for top of page -->
<div id="top"></div>
<!-- add some filler content -->
<div style='background-color: #FAA; width: 100px; height: 500px; border: #000 solid 1px;'></div>
<div style='background-color: #AFA; width: 100px; height: 500px; border: #000 solid 1px;'></div>
<div style='background-color: #AAF; width: 100px; height: 500px; border: #000 solid 1px;'></div>
<!-- 'scroll-to-top' link -->
<a id='scroll-to-top' href='#top'>Go to top</a>
</body>
</html>
Fixing USB mouse or laptop touchpad freeze and hanging in Ubuntu
After upgrading from Ubuntu 12.04 to 12.10, I occasionally started facing a problem with my touchpad. All of a sudden the left and right clicks would stop working. Left click only worked on the unity panel (on the left) and the top Ubuntu menu bar (which contains the clock, network and sound icons). These are two three possible solutions to this problem -
1) Restart the laptop touchpad or USB mouse [1]
This can be done via the command line and does not require you to reboot or logout of your account.
To restart the laptop touchpad -
2) Uncheck the 'Disable touchpad while typing' option [2]
This setting is specific to the laptop touchpad.
3) Ensure that the Unity HUD or any other Unity lens is off
I was watching a video in VLC fullscreen mode. I primarily use VLC's keyboard commands - ctrl + navigation keys & alt + navigation keys - to move around the playback. During playback I abruptly switched to another app. That's when I faced this problem yet again. I had already unchecked the option as mentioned in step 2 above sometime ago. I tried restarting my mouse by running the commands mentioned in step 1, but that didn't work as well.
While I was using the browser via my keyboard (alt + tab to the rescue) and searching google for help, I happened to press escape 2-3 times and lo and behold, the mouse started working again.
And then it struck me! Whenever you have any unity lens open - the application, video, audio lens or even the HUD - the only areas where you can click with the lens open are the unity panel on the left hand side and the top menu bar. You cannot click anywhere in the app display area when any lens is open. These were exactly the symptoms I was facing and it seems that pressing the escape button multiple times closed a lens which was open in the background (probably when VLC was in fullscreen mode).
To reproduce the above mentioned problem - open a video in VLC and switch to fullscreen mode. Press alt once - this does bring up the HUD for VLC, but it does not show up in front. Now since the HUD is active (but not visible though), you won't be able to use any keyboard commands in VLC! Press escape once which will close the HUD and you'll be able to use VLC keyboard commands again.
Alternatively, you can just open the unity lens once (by pressing the Windows/super button) and close it. This should fix the issue.
References -
[1] Restarting your touchpad/mouse in Ubuntu in simple steps
[2] Trackpad freezes often [closed]
1) Restart the laptop touchpad or USB mouse [1]
This can be done via the command line and does not require you to reboot or logout of your account.
To restart the laptop touchpad -
- Open terminal (ctrl + alt + t) or press alt + f2 to bring up unity's command lens.
- Execute the following commands (recommended to run using gksudo but can be run using sudo as well) -
- gksudo modprobe -r psmouse (removes the mouse interface from the linux kernel)
- gksudo modprobe psmouse (adds the mouse interface to the linux kernel)
- Open terminal (ctrl + alt + t) or press alt + f2 to bring up unity's command lens.
- Execute this command -
- sudo /etc/init.d/hotplug restart
2) Uncheck the 'Disable touchpad while typing' option [2]
This setting is specific to the laptop touchpad.
- Go to System Settings -> Mouse and Touchpad (under Hardware section)
- Click on the Touchpad tab and uncheck the Disable touchpad while typing option.
3) Ensure that the Unity HUD or any other Unity lens is off
I was watching a video in VLC fullscreen mode. I primarily use VLC's keyboard commands - ctrl + navigation keys & alt + navigation keys - to move around the playback. During playback I abruptly switched to another app. That's when I faced this problem yet again. I had already unchecked the option as mentioned in step 2 above sometime ago. I tried restarting my mouse by running the commands mentioned in step 1, but that didn't work as well.
While I was using the browser via my keyboard (alt + tab to the rescue) and searching google for help, I happened to press escape 2-3 times and lo and behold, the mouse started working again.
And then it struck me! Whenever you have any unity lens open - the application, video, audio lens or even the HUD - the only areas where you can click with the lens open are the unity panel on the left hand side and the top menu bar. You cannot click anywhere in the app display area when any lens is open. These were exactly the symptoms I was facing and it seems that pressing the escape button multiple times closed a lens which was open in the background (probably when VLC was in fullscreen mode).
To reproduce the above mentioned problem - open a video in VLC and switch to fullscreen mode. Press alt once - this does bring up the HUD for VLC, but it does not show up in front. Now since the HUD is active (but not visible though), you won't be able to use any keyboard commands in VLC! Press escape once which will close the HUD and you'll be able to use VLC keyboard commands again.
Alternatively, you can just open the unity lens once (by pressing the Windows/super button) and close it. This should fix the issue.
References -
[1] Restarting your touchpad/mouse in Ubuntu in simple steps
[2] Trackpad freezes often [closed]
Fixing the XAMPP/LAMPP phpMyAdmin access problem on Ubuntu
If you get a message like this on accessing phpMyAdmin, check this post for a fix -
Access forbidden!
New XAMPP security concept:Access to the requested object is only available from the local network.
This setting can be configured in the file "httpd-xampp.conf".
If you think this is a server error, please contact the webmaster.
Backstetch - An awesome jQuery plugin for dynamically resizing background images to occupy full size!
Backstretch is a simple yet awesome jQuery plugin that lets you add background images to the whole page or specific div/blocks covering the full area.
While this can be achieved using CSS3's
Backstretch automatically determines the dimensions and stretches the background images so that they cover the full area. And backstretch does this without skewing the width to height ratio which is an added advantage.
Background images can also be added as fully-stretched slideshows using backstretch!
And it's simple too. Adding a fully stretched background image to the whole page can be done in just one line with a single backstretch function call -
Check out the official backstretch page for download, demos and more.
Note: You can use this screen resolution simulator website to test your web page with different resolutions after adding backstretch.
While this can be achieved using CSS3's
background-size property (using 'cover' as the value or the appropriate fixed/percentage length and width), there are still some issues with this approach -- This property is not supported by IE7 and IE8. Support was added in IE9.
- You need to ensure that the dimensions of your body tag, especially the height, is set correctly to cover the full screen. This can be tricky to achieve across all browsers especially if your page content does not span the entire screen height or exceed it.
Backstretch automatically determines the dimensions and stretches the background images so that they cover the full area. And backstretch does this without skewing the width to height ratio which is an added advantage.
Background images can also be added as fully-stretched slideshows using backstretch!
And it's simple too. Adding a fully stretched background image to the whole page can be done in just one line with a single backstretch function call -
<!-- add jQuery before adding the backstretch plugin -->
<script src="jquery.min.js"></script>
<!-- add the backstretch plugin -->
<script src="jquery.backstretch.min.js"></script>
<script type='text/javascript'>
$(document).ready(function() {
$.backstretch("http://site.com/background-image.jpg");
});
</script>
Check out the official backstretch page for download, demos and more.
Note: You can use this screen resolution simulator website to test your web page with different resolutions after adding backstretch.
Swing development tip: Migrate event listeners when setting models
Change this -
to this -
public void setTableModel(TableModel tableModel) {
this.tableModel = tableModel;
}
to this -
public void setTableModel(TableModel tableModel) {
//migrate listeners
if(this.tableModel != null) {
if(this.tableModel.getTableModelListeners() != null) {
for (TableModelListener p : this.tableModel.getTableModelListeners()) {
tableModel.addTableModelListener(p);
}
}
}
this.tableModel = tableModel;
}
( Posted on: August 28, 2012 )
How to display an empty div in HTML using CSS
Empty div(s) collapse only if its height is not set. Thus setting height/min-height of the empty div will show it correctly.
To avoid specifying any explicit height, set the CSS min-height property as below -
Other references/options/tricks -
To avoid specifying any explicit height, set the CSS min-height property as below -
min-height: 1px;
Other references/options/tricks -
- http://stackoverflow.com/questions/1616879/is-it-possible-to-render-empty-div-style-width50-div-with-css-in-xhtml
- http://stackoverflow.com/questions/6177593/why-does-my-empty-div-collapse-although-it-has-a-width-when-display-inline-is-us
- http://stackoverflow.com/questions/1479239/how-to-force-an-hiddenempty-div-to-take-up-space
Subscribe to:
Posts (Atom)


