I have a Lenovo Thinkpad T410 running Windows 7 64-bit and the touchpad stops working after about 10 minutes or so and required a reboot and removal of devices to get it to work again.
I found that if you remove the Lenovo version of the drivers and go to the Synaptics website to download them, then you can have the full functionality of the touchpad back.
Synaptics Driver Download site
Tags: fix, Hardware
There are two ways to include an external stylesheet. Using a <link> tag in the <head> section of your web page or using the @import tag in a <style> section. The @import tag can also be placed inside a CSS file to include other CSS files.
Example of an externally linked stylesheet named anyname.css
<head>
<link rel="stylesheet" type="text/css" name="anyname.css" href="url" media="all">
</head>
The name field is the filename and can be set to any path that is available to your Web Server. The media type can be specified in the link tag.
An example of a @import statement to include a CSS file:
<style>
@import('anyfile.css');
</style>
You can also specify the type of stylesheet with the @import statement:
@import('anyfile') screen;
@import('anyfile') print;
The @import statement is not understood by many older browsers, Netscape 4 ignores them completely and Internet Explorer 4 requires you to use parenthesis, even though they are optional. Luckily, there should be very few people still using these browsers and this is a useful technique to not include features that would not work in those browsers.
The @import directives must be the first items in your CSS. Even comments should not appear before these statements.
Internet Explorer versions 4-7 have the limitation that they do not like specifying the type on the @import line. I have not researched if this is the case with versions 8 and above.
Tags: CSS, html
In order to use an internal stylesheet, place the following in the <head> section of your html document.
<style type="text/css" media="all">
<!--
Place your css here
-->
</style>
The <!– –> (xml style comment) is so that older browsers, though very unlikely, will not get confused by the CSS code within the page.
The media=”all” entry tells the rendering engine which style sheets to use, in this case “all” means to use it for all rendering engines.
Tags: CSS, html
I have been frustrated by the crappy Authorization scheme on the iTunes store for quite some time. Purchased apps tell me that I am not authorized to use them and will not restore any apps to my device.
I already had to restore from a backup because the phone froze in a screen backlight issue and now cannot get back many of my apps to the device.
This is making me want to get rid of my iPhone and go to a device that is not so locked down. I should be able to put apps that I got legitimately back to my own device.
So I was figuring out how to parse command line arguments with python and using the getopt module with the following code
#!/usr/bin/env python
import sys
import getopt
def main(argv):
infile = "some.xml"
try:
opts,args = getopt.getopt(argv,"hi:d",["help","infile="]
except getopt.GetoptError:
usage()
sys.exit(2)
if __name__ == "__main__":
main(sys.argv[1:])
And I was getting the following error:
AttributeError: ‘getopt’ module has no attribute ‘GetoptError’
So my first problem was that I had named my script getopt.py and after renaming the script, I got the same error. Well you now need to remove the getopt.pyc file that was generated from your earlier running of the poorly named script.
If you are using perl, you may find it necessary to take some command line arguments to your scripts. When that time comes, there is a very handy variable ARGV that contains the passed in arguments.
To get the total number of arguments passed into the script you will need to use the following:
$totcommandargs = #$ARGV + 1
is equal to the number of arguments passed in to the Perl script.
Note: you need to add one to the count to get the correct number of variables.
To address the variables you use the following to address the first argument: $ARGV[0]
will address the first argument
Since arrays are addressed by n-1, to get the first element you use 0 {zero}, for the second 1, for the third {2}, and so on.
$0 will give the name of the currently executing script.
#!/usr/bin/perl
$argcount = $#ARGV +1;
print "The script $0 has $argcount argumentsn";
for( $i = 0; $i < $argcount;$i++)
{
print $ARGV[$i] . "n";
}
I regularly have to write scripts into different environments and when I am wrapping a build system, I typically use a Bash script to do it. I often have to pass a set of arguments to the underlying commands in my scripts as well. I have found that the %* argument is the easiest way to take those arguments.
The %* takes the arguements and passes them along. The %1, %2, %3…and so on are the individual arguments but unless you have a fixed amount of arguments, then you will need to process a variable amount of arguments.
while [ $# -gt 1 ]
do
case "$1" in
-a)
ANALYZE=1
;;
*)
echo "Invalid option"
;;
esac
shift
done
If you are using maven to build your projects , then you might have found an out of memory condition in your tests. Well, setting the MAVEN_OPTS variable with JVM specific options will help with this.
Example:
MAVEN_OPTS=-Xmx1024
Depending on what environment you are in, you will need to set this variable.
This will give the JVM more 1024 megs to work with and you can customize the number to fit your needs.
In an effort to save toner/ink, some browsers shut off the ability to print the background images and colors.
In Firefox:
1) Select File->”Page setup”
2) Select the “Format & Options” tab
3) Check the “Print Background (Colors and Images)” box
In Internet Explorer:
1) Select Tools->”Internet Options”
2) Select the Advanced tab
3) Scroll down in the Settings window until you find the heading “Printing”
4) Select the checkbox next to “Print background colors and Images”.
Remember to undo this if you want to conserve ink/toner.
Tags: Browsers
For the longest time, I thought the “Print Screen” or “PrtScr” Key on my keyboard was a throw back to much older computers with sheet fed dot matrix printers and would just print out the current Dos command shell.
Once I figured out how to use it in windows, it has become an invaluable tool.
I used to create presentations of source code issues. It was a great help to be able to grab a copy of the screen and place it in a Powerpoint slide or Word Doc.
If you need a complete screen capture or even just the current window, here is what you can do.
If you need to capture the complete screen, press the “Print Screen” button located near the top of the keyboard with the scroll lock or Pause key. It may seem like nothing has happened, but the complete image of your current desktop has been saved into the clipboard in windows.
If you want to just capture the current window, make sure the window you want is active and press the Alt and “Print Screen” keys together.
Now open Paint, MS Word or any other program capable of handling images, and type Ctrl-V. This will take the image that has been captured into memory and place it in the program. Now you can manipulate the image to crop it or use it in your document.
This is a built in function of the MS Windows Operating system.
If you need more control there are other applications that can let you capture portions of the screen at any time and create a file with a simple keystroke, such as SnagIt!
Tags: Utilities