Monday, February 6, 2017

Google Drive Files Access on Mint 18.1 Serena

Installing Gnome Online Accounts sudo apt-get install gnome-control-center gnome-online-accounts Launching Gnome Online Accounts from Shell Exec=env XDG_CURRENT_DESKTOP=GNOME gnome-control-center --overview All Setting window opens up Click 'Online Accounts' add google account From File Manager Devices section select google account http://tutorialforlinux.com/2017/01/16/google-drive-client-quickstart-for-linux-mint-18-1-serena-lts/

Saturday, July 16, 2016

wget - download any resource from web in bulk - https://www.gnu.org/software/wget/#Download-Options

https://www.gnu.org/software/wget/#Download-Options
http://www.thegeekstuff.com/2009/09/the-ultimate-wget-download-guide-with-15-awesome-examples/

continue previously partially downloaded
wget -c ftp://sunsite.doc.ic.ac.uk/ls-lR.Z

download all the GIFs from a directory on an HTTP server
wget -r -l1 --no-parent -A.gif http://www.example.com/dir/
‘-A "*.gif"’ would have worked too

Suppose you were in the middle of downloading, when Wget was interrupted. Now you do not want to clobber the files already present. It would be:
wget -nc -r https://www.gnu.org/


--------------------------
Mirror a web site locally
wget -m http://zvon.org/xxl/XPathTutorial/Output/


Sunday, July 10, 2016

http://www.flightgear.org/Docs/getstart/getstartch7.html#x13-1310007.5


-------------------------------------------------------------------------------------------------------------- To use the regular KSFO airport which is near SFO Golden Gate Bridge In FlightGear Version 2016.1 above Go to [Settings] tab In 'Additional Optional' section at the bottom, type --aircraft=c172p --airport=KSFO --timeofday=noon click [Run] button --------------------------------------------------------------------------------------------------------------
For Half Moon Bay airport type --aircraft=c172p --airport=KHAF --timeofday=noon Other interesting airport VHHH - Hong Kong Intl' Airport - very beautiful Ensure you have Scenary data downloaded for the lat/lon 22.3080° N, 113.9185° E VOMM - Chennai Airport
-------------------------------------------------------------------------------------------------------------- To change AIRPORT within flight Menu -> Location -> Select Airport List of airports alphabet wise https://en.wikipedia.org/wiki/List_of_airports_by_ICAO_code:_K Numlock ON h - heads up display on
----Cockpit view-------- v - change view Ctrl + right click - Adjust cockpit view position to fine tune if any control is not visible or to make outside view more clear x/X - zoom in / zoom out c - toggle cockpit P - Caps P to view FULL PANEL (only panels in full view) p - small p to pause the simulator To adjust the SEAT HEIGHT, while NOT in mouse mode hold down Ctrl + DRAG MOUSE Right button To adjust the VIEW ANGLE (without changing seatHEIGHT), while NOT in mouse mode, DRAG MOUSE Right button (without holding down control key)
-------------------------------------------------------------------------------------------------------------- page up - throttle up until 1000 RPM in Tachometer -------------------------------------------------------------------------------------------------------------- tab - switch to mouse control mode. + will show on screen HOLD DOWN Left Mouse Button to control only RUDDER (VERTICAL FLAP in tail to control side ways movement) to run straight in the runway At 70 knots flight will take off Apply 1 flap pressing ] , and . - left and right brakes - useful when taxiing slowly on the runway 0 / Enter in numpad (RUDDER use only after nose wheel took off(not on ground)) - turn left / right during take off. (7 times 0 makes full left, and then 7 times enter makes straight back) (Using the mouse. While the mouse is in yoke control mode (+ pointer shape), if you hold the left mouse button down, the mouse controls the rudder pedals instead of the yoke. The rudder pedals are connected to both the rudder and nose-wheel. This method is much more precise.) Hold the left mouse button down to control the rudder. At airspeeds above 40 knots, the rudder has enough air-flow over it to steer the airplane.
-------------------------------------------------------------------------------------------------------------- 4, 6 (both from numpad with numpad on) - aileron (wing flaps) turn left / right respectively. (needs flap to be open with [, ] keys) 5 - Reset rudder/ailerons at horizontal and center positions This is particularly useful when landing, because the airplane glides very well. If you cut down the engine power completely, the plane will descend, yet but too slowly. You need to deploy two or three flaps steps in order to brake and really descend towards the ground. --aircraft=c172p --airport=KSFO Why two ways? Partially for redundancy, but mainly because they are complementary. The main effect of the rudder(tail flaps) is yaw (rotation around the vertical axis), while the main effect of the ailerons(wing flaps) is roll (rotation around the longitudonal axis). ctrl+ 4 arrows - Look around Or HOLD Right Mouse button and pan to view (this way Need not press another TAB) B - Toggle break m/M - fuel-to-air mixture richer/leaner (m makes more petrol and less air for powerful engine) at take and landing use m. At high altitude use M to reduce fuel usage (to test the mixture while the engine is running, try pressing M repeatedly (mix more air). The propeller will stop running at one point Ctrl + c - to highlight all knobs in the cockpit TAKE OFF So, you need to take off and rise in the air at a steady speed of around 75 knots. However, when you raise the nose slightly at 40 knots, the aircraft will probably take-off at around 55 knots. To accelerate quickly to 75 knots, lower the nose slightly immediately on take-off, then raise it once 75 knots has been achieved. You are using the yoke to control the speed of the aircraft. LANDING 1. PRESS ] 3 TIMES TO OPEN FULL FLAPS 2. LANDING SPEED SHOULD BE ABOUT 65 KNOTS TURNING AT FLIGHT Keep the airplane banked around those 20° for a few minutes and keep your eyes outside the aircraft You will see the same ground features appear again and again, every 120 seconds. This shows you need 120 seconds to make a 360° turn (or 60 seconds for a 180°)turn). This is particularly useful when navigating. Whatever speed the airplane is flying, if you bank at 20ï¿1 2 you always need 60 seconds to make a 180ï¿1 2 turn in the Cessna 172P.

Wednesday, June 1, 2016

Gmail


Gmail filter mails by date range:
In Search text box in gmail type:
after:2016/06/01 before:2016/06/02


Search in google for 'Gmail advanced search'
https://support.google.com/mail/answer/7190?hl=en

-----------------------------------------------------

Sunday, May 29, 2016

XPath techniques


    multiple condition: //div[@class='bubble-title' and contains(text(), 'Cover')]
    partial match: //span[contains(text(), 'Assign Rate')]
    starts-with: //input[starts-with(@id,'reportcombo')
    value has spaces: //div[./div/div[normalize-space(.)='More Actions...']]
    sibling: //td[.='LoadType']/following-sibling::td[1]/select"
    more complex: //td[contains(normalize-space(@class), 'actualcell sajcell-row-lines saj-special x-grid-row-collapsed')]
to handle case sensitivity  //td[contains(lower-case(text()),'youruser')]")  

xpath: find table cell with same position in different row
http://stackoverflow.com/questions/18960462/xpath-find-table-cell-with-same-position-in-different-row

//td[. = 'Label 2']/../following-sibling::tr/td[position() = count(//td[. = 'Label 2']/preceding-sibling::td)+1]/text()


//th[. = 'Last Name']/../following-sibling::tr/td[position() = count(//th[. = 'Last Name']/preceding-sibling::td)+1]/text()

get td of tr row by column heading (that uses th instead of tr)
sample site used http://www.w3schools.com/html/html_tables.asp
//th[. = 'Last Name']/../following-sibling::tr/td[position() = count(//th[. = 'Last Name']/preceding-sibling::th)+1]/text()

or

//th[. = 'Last Name']/../following-sibling::tr/td[count(//th[. = 'Last Name']/preceding-sibling::th)+1]/text()


gets values in column 'Last Name'
Jackson
Doe
Johnson
Smith



//th[. = 'Last Name']/../following-sibling::tr/td[1] and the below are same
//th[. = 'Last Name']/../following-sibling::tr/td[position() = 1]


get last in node set
//th[. = 'Last Name']/../following-sibling::tr/td[position() = last()]


get count off all td elements; this gets the value even in FireBug :)
count(//td)

Get the [column] position ( or index) of an element 
count(//th[. = 'Last Name']/preceding-sibling::*)+1
or
count(//th[. = 'Last Name']/preceding-sibling::th)+1
        |                                      |
        |   These 2 element should match       |
        ----------------------------------------



get td of tr row by column heading (that uses th instead of tr)
sample site used http://www.w3schools.com/html/html_tables.asp
//th[. = 'Last Name']/../following-sibling::tr/td[position() = count(//th[. = 'Last Name']/preceding-sibling::th)+1]/text()

gets values in column 'Last Name'
Jackson
Doe
Johnson
Smith

------------------------
Refer any element using an it's label as seen in the user page as ANCHOR point and use descendant operator descendant:: or // to avoid in-between path elements

//div[contains(text(),'User Name')]//input

note the // before input tag

-----------------------

Case in-sensitive XPATH

To locate a tag with title='Gift With Purchase' as well as title='GIFT WITH PURCHASE'
//a[contains(translate(@title, 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'), 'GIFT WITH PURCHASE')]
or 
//a[.='GIFT WITH PURCHASE' or .='Gift With Purchase']

The translate function changes every character returned by @title attribute that matches in any of 'abcdefghijklmnopqrstuvwxyz' to the corresponding character at SAME POSITION in 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-----------------------

Saturday, May 14, 2016

sed

http://www.thegeekstuff.com/2009/09/unix-sed-tutorial-printing-file-lines-using-address-and-patterns/