Overview
I had a problem in development for android add element empty list was returned on eclipse when trying to add a new element to PreferenceScreen (XML). The ok button disabled.
I had a problem in development for android add element empty list was returned on eclipse when trying to add a new element to PreferenceScreen (XML). The ok button disabled.
Android preference multiple dependency is not out-of-the-box feature until api level 14 introduced us with SwitchPreference (extends TwoStatePreference) to implement such feature. the old CheckBoxPreference can’t do that.
If your app is designed for newer systems only, (min-api equal or higher than 14) that won’t be a problem for you – because you can use the new SwitchPreference element to get at least 2 states, but if your app designed to work with older api support, or more than 2 dependencies on one element – you need another method.
Note: you can always implement both ways! use the ‘/xml-v14‘ directory to create multiple version of your XML, better with include, one for API 14 with SwitchPreference, and one for the old API’s with the following solution.
Android toast stuck on screen when you called Toast.show() ? There’s a solution.
Oracle VirtualBox has no GUI to resize VirtualBox disk VDI format so you need to use a Command Prompt utility called VBoxManager.
The famous RTS game Command & Conquer – Red Alert 2 by Westwood Studios was released on October 2000 but there are still many who consider this game a must.
Westwood Studios was bought by Electronic Arts (EA) in 1998, and closed by EA in 2003.
With the release of Microsoft Windows 8 the game Red Alert 2 stopped working.
Follow these next few steps to Fix Red Alert 2 on Windows 8 x32 and x64 bit.
Python based web applications can be served in several ways. You can use the old and good CGI interface, or use the more common used mod_python. FastCGI and SCGI are also an option. but most of those ways supports the WSGI interface which is the recommended way. You can learn more about each way, and the cons and pros of each, and what is wsgi in this great tutorial/article: How to use python in the web.
We’ll build a skeleton for a Python based WSGI web application hosted on Apache HTTPd. I’ve choosed WSGI over other methods to promote web application portability across a variety of web servers.
red-hat/fedora/centos: install mod_wsgi using:
yum install mod_wsgi
debain/ubuntu: install mod_wsgi using:
apt-get install mod_wsgi
configure your httpd with:
1 2 3 4 5 | WSGIScriptAlias /myapp /var/www/myapp/myapp.wsgi <Directory /var/www/myapp> Order allow,deny Allow from all </Directory> |
WSGIScriptAlias /myapp /var/www/myapp/myapp.wsgi <Directory /var/www/myapp> Order allow,deny Allow from all </Directory>
Create the file myapp.wsgi at ‘/var/www/myapp’ and fill it with the example from mod_wsgi documentation:
1 2 3 4 5 6 7 8 9 | def application(environ, start_response): status = '200 OK' output = 'Hello World!' response_headers = [('Content-type', 'text/plain'), ('Content-Length', str(len(output)))] start_response(status, response_headers) return [output] |
def application(environ, start_response): status = '200 OK' output = 'Hello World!' response_headers = [('Content-type', 'text/plain'), ('Content-Length', str(len(output)))] start_response(status, response_headers) return [output]
You may need to restart your apache using: service httpd restart.
Now use your browser to see the ‘Hello World’ response from your first wsgi server.
Happy wsgi python-ing…!
I’ve recently had the need to optimize my VPS plan so it won’t consume that much memory.
The main culprit was Apache with more then a few processes using over 50MB.
Load Balancing SSH Connections using Pen, a load balancer for “simple” tcp based protocols such as http or smtp.
It allows several servers to appear as one to the outside and automatically detects servers that are down and distributes clients among the available servers. This gives high availability and scalable performance.
Not widely known, but you can use pure CSS to split background image into several divs quite easily! I’ll teach you how.
Load balancing Remote Desktop Services using Pen, a load balancer for “simple” tcp based protocols such as http or smtp.
It allows several servers to appear as one to the outside and automatically detects servers that are down and distributes clients among the available servers. This gives high availability and scalable performance.
Including and customing the facebook Meta inside every page of your website is an important reality in today web. It’s a very easy task to setup, one that must be done quickly as possible.
ERPXE – Open Source PXE Project Version 1.06 Released on March 17, 2013.
Continue reading