Archive for the ‘Cum Sa …’ Category

Default Language For Google Blogger

Posted: 6 Martie 2012 in Cum Sa ...
Etichete:

Clear your Internet temp folder and make sure that you have enabled cookies in the web browser.Now open the webpage at blogger.com/language.g and check your preferred language. Click Save settings

CSS short Guide

Posted: 18 Aprilie 2011 in Cum Sa ..., Uncategorized
Etichete:

BACKGROUND
Backgrounds can be tricky. Nevertheless, effective when condensed correctly. The syntax for
declaring the background shorthand values are as follows
BACKGROUND PROPERTIES
element {
background-color: color || #hex || (rgb / % || 0-255);
background-image:url(URI);
background-repeat: repeat || repeat-x || repeat-y || no-repeat;
background-position: X Y || (top||bottom||center) (left||right||center);
background-attachment: scroll || fixed;
}
Believe it or not, all these properties can be combined into one single background property as follows:
THE BACKGROUND SHORTHAND PROPERTY
element {
background:
#fff
url(image.png)
no-repeat
20px 100px
fixed;
}
THE UNKNOWN
Often times developers find themselves wondering What if I leave out this value or that one? How will
that effect the design?. Good questions.
By default, the background property will assume the following when you do not declare each value of
the properties.
DEFAULT BACKGROUND PROPERTY VALUES
element {
background-color: transparent;
background-image: none;
background-repeat: repeat;
background-position: top left;
background-attachment: scroll;
}
BACKGROUND SHORTHAND EXAMPLE (UNEXPLICIT)
element {
background:red url(image.png);
}
This would be the same as declaring the following values:
BACKGROUND SHORTHAND EXAMPLE (EXPLICIT)
element {
background:red url(image.png) repeat top left scroll;
}
FONT
Font is perhaps the trickiest. However, it follows the same rules as the background shorthand
property. All that you do not declare will have unexplicit values. Here is the font shorthand
specification:
FONT PROPERTIES
element {
font-style: normal || italic || oblique;
font-variant:normal || small-caps;
font-weight: normal || bold || bolder || || lighter || (100-900);
font-size: (number+unit) || (xx-small – xx-large);
line-height: normal || (number+unit);
font-family:name,”more names”;
}
The default values for the font shorthand property are as follows:
DEFAULT FONT PROPERTY VALUES
element {
font-style: normal;
font-variant:normal;
font-weight: normal;
font-size: inherit;
line-height: normal;
font-family:inherit;
}
And of course without any further ado. The font shorthand property syntax:
THE FONT SHORTHAND PROPERTY
element {
font:
normal
normal
normal
inhert/
normal
inherit;
}
Here is where it gets tricky. The fact that font-style, font-variant, and font-weight all come “normal”
out of the box, you may need to pay a little more close attention when you’re styling elements that
come with default browser styles like <h1> – <h6> or <strong> and <em>. For example, styling the
strong element:
STRONG ELEMENT STYLED WITH FONT
strong {
font:12px verdana;
}
By writing the above into your style sheet, you will be unexplicitly removing the font-
weight:bold default browser style that is applied to strong elements.
Last but not least (for -font- that is), a real world example:
FONT SHORTHAND PROPERTY EXAMPLE (UNEXPLICIT)
p {
font:bold 1em/1.2em georgia,”times new roman”,serif;
}
This would be the same as declaring the following properties:
THE FONT SHORTHAND PROPERTY (EXPLICIT)
p {
font-style:normal;
font-variant:normal;
font-weight:bold;
font-size:1em;
line-height:1.2em;
font-family:georgia,”times new roman”,serif;
}
BORDER
Let’s not waste time discussing the warnings. The same rules apply from here on out. This is all you
need to know
BORDER PROPERTIES
element {
border-width: number+unit;
border-style: (numerous);
border-color: color || #hex || (rgb / % || 0-255);
}
becomes this:
THE BORDER SHORTHAND PROPERTIE
element {
border:
4px
groove
linen
}
Don’t ask me how that would look. The fact that “linen” is in there, things could get scary. Nevermind
the matter, here is where ‘border’ gets funny.
BORDER EXAMPLES
p {
border:solid blue;
}
/* will create a ‘3px’ solid blue border…
who knows where 3px came from?? */
p {
border:5px solid;
}
/* will create 5px solid ‘black’ border…
default must be black?? */
p {
border:dashed;
}
/* will create a ‘3px’ dashed ‘black’ border…
3px black lines unite! */
p { border:10px red; }
p { border:10px; }
p { border:red; }
/* these just don’t even work */
One thing to specially take note about declaring a border without a color, the default will be ‘black’
unless otherwise noted through an explicit or inherited ‘color’ property. See the following examples:
BORDER COLOR EXAMPLES
p {
border:dotted;
color:red;
}
/* will create a 3px dotted red border */
/* –––––––––– */
body {
color:blue;
}
body p {
border:5px solid;
}
/* will create a 5px solid blue border */
/* –––––––––– */
Get it? Got it. Good! (isn’t that a song?) Anyway. On with this
MARGIN AND PADDING
These are by far the easiest. Just think about the hands of a clock starting at noon, and follow the hour.
For the sake of brevity, we’ll be working with margin (since it’s a shorter word). So for all cases of
margin, the same rules apply to padding.
MARGIN PROPERTIES.
element {
}
margin-top: number+unit;
margin-right: number+unit;
margin-bottom: number+unit;
margin-left: number+unit;
… combined into the margin superpowers:
THE MARGIN SHORTHAND PROPERTY
/* top right bottom left */
element {
margin: auto auto auto auto;
}
Of course, you may declare your margin with one, two, three, or four values. Here is how each scenario
will be played out:
MARGIN FUN
/* adds a 10px margin to all four sides */
element {
margin:10px;
}
/* adds a 20px margin to top and bottom
and a 5px margin to left and right */
element {
margin:20px 5px;
}
/* adds a 50px margin to top
and a 10px margin to left and right
and a 300px margin to bottom */
element {
margin:50px 10px 300px;
}
Understood? Let’s keep going. This is fun isn’t it! (whatever, you like it).
OUTLINE
Quite frankly, this property has dropped off the existence of the design radar. Mainly because of lack of
browsers supporting this CSS 2.1 standard (yep, it’s an actual property), but nonetheless, it too has a
shorthand property. This property follows the exact same (or same exact – they mean the same thing)
specification as the ‘border’ shorthand property. But, for purposes of this being a Guide, it must be
here. So:
OUTLINE PROPERTIES
element {
outline-width: number+unit;
outline-style: (numerous);
outline-color: color || #hex || (rgb / % || 0-255);
}
Outline written as shorthand:
OUTLINE SHORTHAND PROPERTY
element {
outline:3px dotted gray;
}
For purposes of trying to keep things from repeating, please see the border shorthand section on this
document to understand the odds, ends, and quirks of the outline property.
LIST-STYLE
This is it. The last one. It’s rarely used frequently. Hence rarely. That is why I kept it until the end
(sorry, the best was first in my own opinion). Here is the list-style properties:
LIST-STYLE PROPERTIES
element {
list-style-type: (numerous);
list-style-position:inside || outside;
list-style-image:url(image.png);
}
Here is the defaults:
LIST-STYLE PROPERTY DEFAULTS
element {
list-style-type:disc;
list-style-position:outside;
list-style-image:none;
}
And for the sake of final brevity. Here is a simple example:
LIST-STYLE SHORTHAND PROPERTY EXAMPLE
ul li {
list-style:square inside url(image.png);
}
/* in this particular case if image.png is not available
then a square will be provided as secondary */

Ctrl-D = Add bookmark
Backspace = Back
Ctrl-B = Bookmarks
Ctrl-I = Bookmarks
F7 = Caret Browsing
Ctrl-W = Close Tab
Ctrl-F4 = Close Tab
Ctrl-Shift-W = Close Window
Alt-F4 = Close Window
Ctrl-Enter = Add .com to address bar
Shift-Enter = Add .net to address bar
Ctrl-Shift-Enter = Add .org to address bar
Ctrl-C = Copy
Ctrl-X = Cut
Ctrl– = Shrink text
Delete = Delete
Shift-Delete = Delete Individual Form AutoComplete Entry
Ctrl-Shift-I = DOM Inspector
Ctrl-J = Downloads
Ctrl-G = Find Again
F3 = Find Again
‘ = Find As You Type Link
/ = Find As You Type Text
Ctrl-Shift-G = Find Previous
Shift-F3 = Find Previous
Ctrl-F = Find in This Page
Shift-Backspace = Forward
Alt-Enter = Forward
Down Arrow = Scroll Down
Up Arrow = Scroll Up
Page Down = Scroll Down really fast
Page Up = Scroll Up really fast
End = Go to Bottom of Page
Home = Go to Top of Page
F11 = Full Screen
F1 = Help
Ctrl-H = History
Alt-Home = Go to your homepage
Ctrl-+ = Enlarge text
F6 = Move to Next Frame
Shift-F6 = Move to Previous Frame
Ctrl-M = New Mail Message
Ctrl-T = New Tab
Ctrl-Tab = Next Tab
Ctrl-Page Down = Next Tab
Ctrl-N = New Window
Ctrl-O = Open File
Enter = Activate selected hyperlink
Ctrl-Enter = Open selected hyperlink in a new window
Shift-Enter = Open selected hyperlink in a new window
Alt-Enter = Open address in address bar in a new tab
Ctrl-U = Page source
Ctrl-V = Paste
Ctrl-Shift-Tab = Previous Tab
Ctrl-Page Up = Previous Tab
Ctrl-P = Print
Ctrl-Shift-Z = Redo
Ctrl-Y = Redo
F5 = Refresh
Ctrl-R = Refresh
Ctrl-F5 = SuperRefresh (refreshes the page even if no changes have been made to
the page since you last loaded it)
Ctrl-Shift-R = SuperRefresh (refreshes the page even if no changes have been made
to the page since you last loaded it)
Ctrl-0 = Restore text size
Ctrl-S = Save Page As
Alt-Enter = Save target of selected hyperlink as
Ctrl-A = Select All
Ctrl-L = Select Location Bar
Alt-D = Select Location Bar
Down Arrow = Select Next AutoComplete entry in textbox
Up Arrow = Select Previous AutoComplete entry in textbox
Ctrl-Down Arrow = Select Next Search Engine in Search Bar
Ctrl-Up Arrow = Select Previous Search Engine in Search Bar
Ctrl-1 = Select first tab
Ctrl-2 = Select second tab
Ctrl-3 = Select third tab
Ctrl-4 = Select fourth tab
Ctrl-5 = Select fifth tab
Ctrl-6 = Select sixth tab
Ctrl-7 = Select seventh tab
Ctrl-8 = Select eighth tab
Ctrl-9 = Select ninth tab
Escape = Stop loading a page
Ctrl-Z = Undo
Ctrl-K = Web Search

Homebrew LASER

Posted: 4 August 2010 in Cum Sa ..., Uncategorized
Etichete:

Disclaimer

The purpose of this presentation is to present interesting ideas and perhaps stimulate future projects, but anyone attempting to realize these projects will have to take responsibility for their own safety.
At the same time, I have tried to give credit where credit is due, by including links. I apologize, if I have failed to acknowledge any sources of information.

WARNING: Construction and operation of any laser device is hazardous. Do not attempt to construct or operate a laser without adequate safeguards and safety practices. Most lasers involve high voltages, toxic chemicals, high vacuum, laser radiation and other hazards. The author specifically disclaims any and all liabilities associated with the construction and use of such devices. Designs presented here are in the interests of providing information on operational principles only and do not represent safe nor ANSI safety compliant designs.

Basic Principles of Lasers:

Advantages of the TEA N2 Laser:
  • Can operate in air (72% nitrogen)
  • No optics required
  • Amplification of nitrogen is very high
  • Significant reduction in cost and complexity
  • No vacuum required
  • Parts are generally inexpensive
Disadvantages of the TEA N2 Laser:
  • Timing of spark pulse is critical: ns
  • Upper state lifetime: t[ns] = 36/(1+P[torr]/58)
  • Beam profile is not so good and small
  • Hard to use as dye laser pump (1.5mm-2mm)
  • Light output is in UV (337.1 nm) (but fluorescence visible on paper)
  • Some people recommend the N2 laser in vacuum
  • Less critical electronic requirement

How TEA is looking and some more info you can find here:

Jarrod Kinsey’s TEA Laser



Now that summer is over and your digital camera is full of pictures, how do you get them organized? At the command line of course! The script provided here automatically organizes them into sub-directories by date.

After my digital camera fills up with pictures, usually after a few weeks or months, I download them to my Ubuntu system. Usually they all end up in one directory. I find it more helpful to sort the image files by the date they were taken: most of the time I want to geotag them and usually photos that were taken on the same day are likely to have been taken in the same location also.

The following short script goes through the .jpg files in the current directory and gets the date stored within each image. It then creates a directory corresponding to the date (in case it doesn’t exist) in the format year/month/day (all numeric) and copies the image into that directory. So for example, a photo called IMG_001.jpg taken on July 4th 2009 will end up under the path 2009/07/04/IMG_001.jpg.

The script requires the IMageMagick package, but that shouldn’t be a problem on recent distributions.

#!/bin/sh
# Goes through all jpeg files in current directory, grabs date from each
# and sorts them into subdirectories according to the date
# Creates subdirectories corresponding to the dates as necessary.
for fil in *.jpg
# Also try *.JPG
do
datepath="$(identify -verbose $fil | grep DateTimeOri | awk '{print $2 }' | sed s%:%/%g)"
if ! test -e "$datepath"; then
mkdir -pv "$datepath"   fi
mv -v $fil $datepathdone

If you don’t want to step up to a full monitoring solution such as Nagios you can create your own scripts for monitoring the things that you want to monitor, such as disk space. The following script alerts you when your root partition is almost full:

#!/bin/bashCURRENT=$(df / | grep / | awk '{ print $5}' | sed 's/%//g')\
 THRESHOLD=90
if [ "$CURRENT" -gt "$THRESHOLD" ] ;
then   mail -s 'Disk Space Alert' mailid@domainname.com <<
EOF "Your root partition remaining free
space is critically low. Used: $CURRENT" EOF
fi

The script sends an email when the disk usage rises above the percentage specified by the THRESHOLD varialbe (90% here).

To run it daily, for example, save the script to the file sample.sh in your home directory, change the email to your email, and add the following line at the end of /etc/crontab file:

@daily ~/sample.sh

You need to do this steps:

1. Get the ndiswrapper latest version
For that you need to open a browser and go to this link and download the source code
http://sourceforge.net/projects/ndiswrapper/
or Open Terminal (Applications > Accessories > Terminal)
wget http://surfnet.dl.sourceforge.net/sourceforge/ndiswrapper/ndiswrapper-1.52.tar.gz

2. Get the Windows drivers form youe installation cd or site of the manufacturer, if for some reasons you are not able to get them you can try here too
http://www.avengergear.com/upload/WG111v3.tar.bz2
wget http://www.avengergear.com/upload/WG111v3.tar.bz2

3. Extract the archives in terminal use tar xvvf ndiswrapper-x.xx.tar.gz
tar xvvf ndiswrapper-1.52.tar.gz /* where x.xx is the version */
tar xvvf WG111v3.tar.bz2
after extracting you need to change the directory to ndiswrapper-x.xx
$ cd ndiswrapper-1.52
for this operation you need to be super user so su or sudo are needed

$ make
$ sudo su – (enter your password)
# apt-get remove ndiswrapper-common
# apt-get install build-essential
# make install
# ndiswrapper -i ../WG111/WG111v3.inf
# depmod -a
# modprobe ndiswrapper
# ndiswrapper -m
# exit
$ exit

4. Create wpa_supplicant configuration, let say „/etc/wpa_supplicant.conf”
Now edit this file, we will use a simple configuration such as

sudo vi /etc/wpa_supplicant.conf or if you preffer sudo mcedit /etc/wpa_supplicant.conf

ctrl_interface=/var/run/wpa_supplicant
network={
ssid=”myssid”
psk=”mysecret”
key_mgmt=WPA-PSK
proto=WPA
}
save it.

Note that psk given above can be plain text ASCII pass phrase that is used on the AP or hex digits (without quotes) that can be generated with wpa_passphrase from the same ASCII pass phrase. For simplicity, go with ASCII pass phrase.

Above configuration causes wpa_supplicant to negotiate which encryption scheme to use. Certain AP’s might not work with this negotiation procedure. So it can help to limit the scheme to the most basic WPA one: TKIP. Add this line to your config to do so: pairwise=TKIP

Now start the interface and then wpa_supplicant. For example, as
ifconfig wlan0 up
wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf -dd

It should work for you, Good luck.