Sunday, July 28, 2019

Constructing house DIY for dummies


Foundation and plinth



Super structure above plinth beam



Steps of house construction (Mysuru, Karnataka) for 30 x 40 plot with costs for reference

1. Paper work:

  1.  Approval from Urban development authority of sanction plan  (this is for approval only showing the space from compound to house etc)
    1. Sanction plan cost for 2 floors Rs. 2,500  . done in 2 days
    2. Government fee for approval : Rs.21,000. Done in 2 weeks
  2. Working plan  Rs. 2500. Done in 3-4 days (ensure you spend more time on this as it is realized and cant change after starting)
  3. Structural design plan (showing the columns position, plinth beam details) Rs.7000
  4. KEB electricity approval can be done after sanction plan approval.. Rs.6000 for 1kw
     Total cost: 39,000

2. Dig borewell before starting any work. 

     Cost :rs 70 per feet . 240 feet digging cost Rs. 50,000 along with 100 feet of casing pipe (which costed a lot around rs. 28000) . Done in 1 day.
     Gotchas: The bore digging company cheated us by charging Rs.280 per length (20 feet long) MS pipe of 7 inch diameter. The actual cost in market is just Rs. 130 per length. We needed 5 lengths of such pipe
In fact the cost of pipe was more than digging. b** cheated us as we didnt know and they force us to use their pipes. Better to be informed about it and negotiate early.

3. Foundation

    1.Digging - carried out by JCB in 1 day. 12 columns with pit size 5 ft x 5ft x5 ft. Also sump is dug
    Gotchas: The sump dug was too small and we ended up manual digging. Make sure you consider atleast 9 x 6 x 6 feet sump for storing 9,000 litres of water. The sump dug should be 2 feet more than what you want to build that is 11 x 8 x 7 feet so after laying bricks it will be as required
     Cost breakup: Rs.550
                           JCB hired at Rs.750/hour x 5 hours = 3750
                           Tractor hired for dumping mud from JCB = 1800

   2. Footing -
          a. Prepare : Before column footing is filled with 1.6 feet of concrete it should be prepared with 6 inches of concrete using 40mm jelli (big sized) and cement.
          b. Bar bending for column and mat for footing: 4 feet square mat is laid below as per column size given in structural design the TMT bar diameter is selected like 12mm, 16mm. The column using TMT bar is 20 feet high.
          b. Footing concrete is added for upto 1.6 feet with concrete. The grade of concrete we selected was M15 for footing (1: 2 :4 bandli of cement: msand: jelli or 1 bag :4 bandli: 8 bandli of ratio). Refer. Less than 25 litres of water should be used per bag of cement. Better to use a concrete mixing machine.
      Cost breakup: 
        1. TMT rods SK super at Rs. 47 /kg . For 820kg I paid Rs. 39,000.
        2. 70 bags of ACC cement at Rs.380/bag = Rs. 26600
        3. msand double wash : Rs. 20,000
        4. Jelli 20mm : Rs. 11000

    3. Footing column
           a. Prepare: Alway good to keep the plinth lower level 2 feet above the road (as roads will become taller over time and we can avoid rain water seepage etc). Using a water pipe the tube level is used to raise all the footing columns to plinth level. (note : plinth is normally 3 feet above the footing concrete bed but varies as per rise we want for house above the road).
Note: Plinth is basically a 2 feet hight concrete cement structure above the size stone coarse which becomes the base of all the walls being raised.
           b. Concrete column : ratio of 1:6:4 (cement : sand: gravel 20mm) was used for column building of footing column.

    4. Digging is done by laying of size stone below the plinth beam. This is done using the plinth diagram provided by the structural design team.







Tuesday, May 8, 2018

Polymer

https://www.polymer-project.org/2.0/start/install-2-0
Pre-requisites
--------------
npm install -g bower
npm install -g polymer-cli

Quick start
-----------
mkdir my-app
cd my-app

1. Create skeleton project
polymer init
//Press the down arrow until polymer-2-starter-kit is highlighted and press the enter / return key to select.
2. Run from the folder created
polymer serve --open

3. Run tests
polymer test --open

Next steps:
----------
1. add element
bower install --save PolymerElements/paper-checkbox


Polymer video: https://skillsmatter.com/skillscasts/5743-introduction-to-building-polymer-web-components

HTML5 video tag:
1. https://www.w3schools.com/tags/tryit.asp?filename=tryhtml5_video
2. Open video tag : (set chrome inspector >> settings >> Elements >> show shadow DOM
3. Components made of :
HTML templates  - the html that defines the web component eg: HTML for video tag
Custome elements - The things that gets injected into the shadow DOM
Shadow DOM
HTML imports
4. Anatomy of a web component:


//html here



5. Without Polymer also we can create above components
var sr=DOMelement.createShadowRoot();
sr.AC(doc.QS("#template")).content.cloneNode(true);
6. Polymer - API written by google to create shadow DOM web components.
Includes pre-written web components.
Browser support is limited but provides polyfills for older browsers

Polyfills
Provides things mentioned in point 3.
HTML templates  - the html that defines the web component eg: HTML for video tag
Custome elements - The things that gets injected into the shadow DOM
Shadow DOM
Model driven views
Web animations
Pointer events


PPT: http://slides.com/bobbijvoet/redux-polymer-8#/26

Thursday, April 19, 2018

Cassandra

1. Download cassandra
Key notes
----------
Session replication on database
Nodes/Zones

ACID

C - Consistency.. Cassandra provides eventual consistency
A - Availability
P  - Partitioning ...processing can continue in the face


CQL - Cassandra query language


Let’s start with a short survey of some of the key concepts of Cassandra:

Cluster – a collection of nodes or Data Centers arranged in a ring architecture. A name must be assigned to every cluster, which will subsequently be used by the participating nodes

Keyspace – If you are coming from a relational database, then the schema is the respective keyspace in Cassandra. The keyspace is the outermost container for data in Cassandra. The main attributes to set per keyspace are the Replication Factor, the Replica Placement Strategy and the Column Families

Column Family – Column Families in Cassandra are like tables in Relational Databases. Each Column Family contains a collection of rows which are represented by a Map>. The key gives the ability to access related data together

Column – A column in Cassandra is a data structure which contains a column name, a value and a timestamp. The columns and the number of columns in each row may vary in contrast with a relational database where data are well structured



commands:
desc keyspaces

use demo
desc tables
desc department;

Friday, February 16, 2018

Nederlandse vocabulaire

Greetings :

  • Goede[morgen/middag/avond] --> Good morning/afternoon/evening
  • ("KHOO duh MORE khen")  ("KHOO duh midakh")  ("KHOO dun AH fohnt")


Directions :

  • Noord Zuid Oost West  --> north south east west


Salutations :
  • hallo("HAH low"), hoi("hoy") --> hi
  • doei, tot ziens  --> bye ,see you
  •  ("dooey" or "dookh")    ("toht zeens")
  •  dank je    -->  thank you
  • Bedankt ("buh DAHNKT")—Thanks
  • Meneer ("muh NEAR")—Mister
  • Mevrouw ("muh FROW")—Miss, Mrs.
  • Alstublieft ("ALST oo bleeft")—Please or if you please (formal)

Numbers:
een twee drie vier vijf zes zeven acht negen tien  -->  one two three four five six seven eight nine ten

Dutch poetry:
http://4umi.com/marsman/herinnering

Vocabolario Italiano

Buongiorno  --> Good morning
Buonasera  --> Good evening
tuttala vitta, va bene --> alright
ciao  --> Hello,hi
addio --> bye

tutto bene --> everything good
tutto a posto  --> it's all OK
a posto is in place
si  --> yes
va bene allora  --> alright then
yes, ok is va bene  --> yes, ok is fine
bravo --> good   (it could be good guy, but also able guy)

ci vediamo domani  --> see you tomorrow

il domani non muore mai  --> tomorrow never dies
buon compleanno  --> Happy birthday
contento  --> Happy

Monday, November 13, 2017

GIT cheatsheet

1. Git clone
- always pulls from master

2.  Branch create/switch/download
   git checkout   //swtich branch
        - IE_Migration
       
   git checkout -b     //-b create branch
 
 
   git checkout [file name]
 
 
   Branches are created under the current branch (default master)
 
   Master <--> Dev Common Branch
          |
           ----> Dev1 Branch
         
3. Pushing
git push origin [branch name]
-u upstream
Note: so we are sure we are comitting on the right branch
***Always pass origin and [branch name] to be sure you are pushing on the right branch ****

4. git status
- status of local repo

5. Comitting specific files
   git add [file name with complete path]
   git commit -m "commit text"
 

6. git branch  // to view all the branches

7. Pull and fetch
git pull  // pull the files and automerege
git fetch   // doesnt do automerge

8. Merging
  MasterBranch ---> DevBranch
  git checkout Dev
  git pull  // to update on the branch
  git checkout MasterBranch
  git pull
  git merge DevBranch

9. Ways for merging
    1. create seperate branch per functionality
    2. Tagging
git tag -v 1.0.0 [tagName]
    3. Milestone

10. git reset -hard   //to get everything from server. all local changes will be gone.
11. Reset branch as remote
	git fetch --prune
	git reset --hard @{upstream}
	git clean -d --force

12. Branch : team/cotr
	git add .
	git commit -m “DD-17384:Added extra parameter”
	git push origin HEAD:refs/for/team/cotr
	git commit --amend --no-edit

	git log -p -2



Other
Git rebase

Tuesday, September 19, 2017

Guide for staying working in netherlands/ amsterdam for Indians

Netherlands is a beautiful country close to the sea with lot of water locked land area sprinkeled with natural beauty trees and flowers. Also the geometrically aligned buildings, trees, electrical poles and roads definitely needs to be praised.
The train and bus network is one of the best but expensive if you dont know how to make best use of the options available. I herewith make my best effort to help you getting around and accommodation search esp. in Amsterdam.


1. Travel

  • Bus is the widely used mode of travel by expats and with highest connectivity. There are various companies who run the service like GVB, Connexxion and EBS.
  • Metro is available in Amsterdam which connects majority of the places. Tram also go through some of these metro lines.
  • Train is of two types. The super fast Intercity and super slow Sprinter. Link
  • Bike/ Cycle. The cycle lane is all around the country and people enjoy cycling even in a Suit.
All the above can be accessed using an OV Chipkart card. First you need to buy an anonymous blue card. Later you can order a personalized yellow card which can be booked online.

Money saving tips on travel:
     Order the yellow card online and opt for a monthly buss pass based on Zone you prefer to travel from work and home. The zones you will choose can be 1, 2, 3 etc and costs Euro 50,85, 125 or so, and you can travel unlimited in these zones.
    Trains are relatively more expensive. To get discount go for a 20% peak hour discount(peak hours are work travel hours like 6:30 am to 9:00 am and 4:30 to 6:30 pm) or a 40% off peak hours discount and weekends. 

2. Accomodation
    Most Indians stay in Amstelveen (30 mins by bus to Amsterdam). Hotels are very very expensive and do not have cooking facility so best to get into shared house .
    Options - shared flat or house. Cost is around 1200 for single room flat or  1800 for double room in Amstelveen. So many go for shared house to avoid too high costs.

    Useful websites
3. Language
     Most speak Dutch by default but would be ready to talk in English when asked. All sign boards and documents are in Dutch so it would be good to know few terminology
     Oost - East, Westen - west, Noord - North, Zuid - South
     Outgang - exit , Ingang - Entrance
     danke - thank you, doei - bye, tot ziens - good bye

Use google translate and app 

4. BSN and registration of address
        BSN - Burger (civilian) service number. It is like SSN or Aadhar number here. Once you arrive you are supposed to get it for getting a bank account or any service.  All services are provided through appointment.
        Registration of address is required to confirm you are staying and for any government related claim purpose ( i think)

5. Taxes in NL
    Taxes are very high in NL around (20-52%). Most of the working professionals fall under the 35% tax bracket. So for expats there is a 30% ruling option
    30% ruling : Basically 30% of your gross salary will not be taxed.
     Eg: You earn Euro 5000 per month gross. then you pay tax for 70% of your earning that is Euro 3500.  30% of it or Euro 1500 is without tax. So total you earn is (say at 35% tax slab) Euro 3775.

The tax slab depends on how much you earn in a year (like India tax system with tax slabs and range between 20-52%).
  Useful tax link

6. Visa 
        HSM visa is required for working non-european nationals eg: Indians
        Schengan visa for tourists to travel around Europe. Link

I hope to write more about points 5. and 6. soon.

     



   

Saturday, August 19, 2017

Pranayama

The content below is taken from Captain Ajit Vadakayil's blog:

Pranayama is the regulation of the incoming and outgoing flow of breath with retention.  It needs to be practised only after perfection in asana has been attained.  Patanjali expressly advises the sadhaka to perform pranayama only after attaining perfection in asana.   For the first time, he demonstrates a distinct step in the ascension of the ladder of yoga, whereas he has not specified progression for the other aspects.  Normally the flow of breath is unrestrained and irregular. Observing these variations, and conditioning the mind to control the inflow, outflow and retention of the breath in a regular, rhythmic pattern, is pranayama.  The word pranayama consists of two components - prana and ayama.  Prana is energy, when the self-energising force encompasses the body.   Ayama means regulation.  Pranayama— where you exhale twice as long as inhale— is more about dumping old experiences rather than mere oxygenation  of blood.  It is always starts with the left nostril for right handers – for left handers it is vice versa ( no book on pranayama talks about this ) .. Left handed people have their sub-conscious in the left lobe of the brain.Breathe in the new , breathe out the old. Pranayama—inhale and exhale with awareness— long exhales with the sound of  MMMMMMM.    Humming boosts level of nitric oxide—this in turn ups the oxygen intake by 98%, the biggest secret . Ordinary breath is a mere 4%.  It is amazing Nitric oxide was discovered by Indian yogis 11000 years ago.  For re-inventing this a Nobel prize was given 2 decades ago.

Nitric oxide is necessary for-
1. Destruction of viruses, parasitic organisms, and malignant cells in the airways and lungs by inactivating their respiratory chain enzymes.
2. Regulation of binding - release of O2 to hemoglobin.
3. Vasodilation of arteries and arterioles (regulation of blood flow or perfusion of tissues).
4. Inhibitory effects of inflammation in blood vessels.
5. Hormonal effects. Nitric oxide influences secretion of hormones from several glands (adrenaline, pancreatic enzymes, and gonadotropin-releasing hormone)
6. Neurotransmission. Memory, sleeping, learning, feeling pain, and many other processes are possible only with NO present (for transmission of neuronal signals).

Obviously, during mouth breathing it is not possible to utilize one's own nitric oxide which is produced in the sinuses.  The mouth, was created by nature for eating, drinking, and speaking.  At all other times, your trap should be shut.When there is lack of oxygen in your blood , you living to a small percentage of your potential. Endurance exercise can increase oxygen utilization from 10 to 20 times over the resting state. This greatly also  increases the generation of free radicals, which can cause cancer.  Metabolism, or, more accurately the metabolic rate of the cells, sets the demand for oxygen. At rest, a human consumes about 250 millilitres of oxygen each minute. With exercise this rate can be increased more than 10-fold in a normal healthy individual, but a highly trained athlete may achieve a more than 20-fold increase.. Muscle can do more work, but beyond the aerobic scope they must revert to anaerobic metabolism, which results in waste products, mainly lactic acid.  The ability of the eye to dark-adapt (, increase its sensitivity at low light levels) decreases with age, but part of that decrease can be restored by breathing pure oxygen. Various mental processes in old people are also found to be improved by breathing oxygen. Any slowed induction of protein synthesis, as from lower oxygen intake, with age is a factor in the deficits of learning and memory of old people. 70% of toxins in your body are released by exhalation— rest by sweat, defecation and urine— surprised?  Oxygen drives the basic metabolic processes that permit growth and constant body temperature. The main purpose of respiration is to provide oxygen to the cells at a rate adequate to satisfy their metabolic needs. This involves transport of oxygen from the lung to the tissues by means of the circulation of blood. The precise object of respiration therefore is the supply of oxygen to the mitochondria.  Ganges' self-purifying quality leads to oxygen levels 25 times higher than any other river in the world. Ganga, show that it is able to reduce BOD (biochemical oxygen demand) levels much faster than in other rivers. Ganges cleans up suspended wastes twenty times faster than other rivers on the planet. The power of breathing lies in its relationship with your energy source. The mind is intimately connected to your breathing. Deep breathing triggers the lymph, your body’s sewage system which will give your cells more efficiency. It keeps the blood fully oxygenated. Breathe in the ration 1/4/2.  .The physical aspect of lack of oxygen in the body is not as important as the mental and spiritual aspect.  Lack of oxygen always slows your reaction time. The more oxygen our brains receive the better they function. Glial cells are mediators between the neurons and blood vessels of the brain. Oxygenating the brain can slow down constant die off of brain cells, and can activate areas of the brain which usually idle from lack of blood. The cells you use the least are the first to die off. 35000 brain cells die every day—more when there is lack of blood. But don’t worry, you have a stock of 100 billion brain cells. Arterial blood is slightly more acidic in pH value ( 0.05 ) than the venous blood. Blood is an electrolyte. Blood is a carrier for oxygen and nutrients to the cells, but more fundamentally it is a carrier of electrical current. The movement of blood produces EM waves through changes in the electrical charge (voltage) and current (amperage) of the fluid.  Because oxygen is vital to life, the body and brain are extremely sensitive to even very small reductions . This is why exercise must be done at least ONE hour after a meal or oxygen required for digestion is used by muscles leading to indigestion and cramps. Stress, fear and anxiety causes muscles to contract and blood vessels to constrict. When blood cannot be transported freely through the body to provide oxygen, and antibodies and to carry away and dispose toxic wastes, illness sets in. Mind is non material , but it works in partnership with communicator molecules. With every thought mind moves atoms of hydrogen, carbon , oxygen and other particles in the brain . Knowing the connection between breath and consciousness, the ancient yogis devised PRANAYAMA to stabilise energy and consciousness. All that vibrates in this universe is the cosmic personality and prime mover Prana, potent in all living beings and non-living beings --- heat, light, gravity, magnetism, vigor , power , vitality,life, spirit.   When a man is contented and happy , he has more Prana inside him. Anxiety vanishes entirely when you are one with the rest of the universe. When your mind is disturbed the fundamental energy Prana leaks . Pranayama just reverses the process.  Yoga says that longevity depends on slow deep diaphragmic breathing. A tortoise takes 4 breaths a minute and so lives more than 200 years. People who do Pranayama regularly have quieter nerves , less lethargy , better sleep and lower BP.  It prevents accumulation of Uric acid which gives joint pains. Fluctuations of mind are controlled and hence Pranayama prepares you for meditation.


The benefits are:--
1)  You raise your consciousness
2)  Develop inner peace
3)  Rekindle your drooping spirit
4)  Detoxification of body and mind
5)  Your face glows --balance of mind, body and spirit.
6)  Mental clarity and concentration
7)  Raise your immunity
8)  Reduces biological age.
9)  Centring yourself and stoking your inner flame
10)  Gratitude and communion with self
11)  Awakening at cellular level, improves metabolism, burns fat
12)  Expansion of perception
13)  Physical exercise , stretching, flexing of spine. Removes stiffness of joints and ligaments.
14) Destress.
15) Good sleep at night.
16) Miraculous delivery from disease -physical and mental.
17) Your skin is cleansed by sunlight and you have less BO. Clears eyesight too.
18) Improves body posture.
19) Drives away phobias.

The  HYPERVENTILATION ( Sudarshan Kriya ) patented by Triple Enyme Sri Ravsihankar made evil pharma very happy ,for it made people fall sick.  

VEDIC YOGA SUPPORTS ONLY DEEP DIAPHRAGMATIC BELLY BREATHING AND NEVER EVER SHALLOW CHEST HYPERVENTILATION, AS PATENTED BY SUDARSHAN KRIYA / SOHUM . . 

YOGA HAS SHUNNED HYPERVENTILATION , AND HAS USED BHASTRIKA PRANAYAMA ONLY TO SHIFT THE DOMINANT NOSTRIL ( IDA/ PINGALA ) FOR A FEW SECONDS. . .

Human brain cells degenerate and die when you do hyperventilation. This is irreversible. . Hyperventilation leads to spontaneous and asynchronous firing of neurons . .. Brain diseases (or disorders of the central nervous system - CNS) are possible only in conditions of chronic hyperventilation, chest breathing and mouth breathing. . . Most brain diseases are characterized by chronic hyperventilation, there are additional effects due to low CO2 levels in the CNS. . .If excess ventilation cannot be compensated metabolically, it will lead to a rise in blood pH. This rise in blood pH is known as respiratory alkalosis. . .When hyperventilation leads to respiratory alkalosis, it causes dizziness, tingling in the lips, hands or feet, headache, weakness, fainting and seizures. . .In extreme cases it can cause carpopedal spasms (flapping and contraction of the hands and feet). . .Your body relies on carbonic acid to regulate the acidity of the entire bloodstream. By hyperventilating you remove far too much CO2 from your blood. . .The acidity of your bloodstream falls as a result. This has all sorts of nasty effects on your body if it is sustained, not least of which is an interference with nerve transmissions. . .Hypocalcemia, which results from hyperventilation, can cause tingling sensations, spasms of the muscles, and even convulsions. . Hyperventilating DOES store extra oxygen. But you can't necessarily use that extra oxygen, because with low CO2, your blood becomes too alkaline. . .Hemoglobin, in an alkaline environment, doesn't want to release the oxygen bound to it. . .Hyperventilation leads to MARTINI EFFECT and NIRTOGEN NARCOSIS.. Nitrogen narcosis is a neurological impairment caused by excess dissolved blood nitrogen . . Hyperventilation immediately causes a changed state of consciousness albeit a FAKE one . Many old people while doing hyperventilation on their beds have died . ..When a person hyperventilates, lowered level of carbon dioxide causes the pH of the blood to increase, leading to alkalosis. . .Yoga increases GABA levels in the brain . Low GABA levels are associated with depression and Alzheimer’s disease. . .Hyperventilation is NOT yoga.  Do NOT do too much kapabathi-- you will get inguinal hernia!Swara Yoga is the science which is about the realization of cosmic consciousness, through the awareness or observation, then control or manipulation of the flow of breath in the nostrils. Shiva answers Parvati's questions ( Vigyan Bhairava Tantra) patiently and fully and goes on the tell her all about swara saying that "for all beings, breath is only the base." These include techniques for managing the planetary effects and the moon's phases and avoiding the negative influence of the planets and astral forces, through altering the breath flow or swara in the nostrils, manipulating and controlling the breath or the breath flow through each nostril. While on the subject of effect of moon on women, some Chutney Marys attacked me –so some ancient secrets will not be revealed and are now lost forever. By swara yoga you can even choose the gender of the baby you want.  I guess signs tell us what happens for the best.



We can alter our destiny by  being more auspicious, and realising, and eventually attaining the harmony and the Highest Consciousness. Swara yoga is an ancient tantric science which involves the systematic study  of the breath flow through the nostrils (or swara) in relation to the prevailing phases of the moon, time of day and direction . Although we think of 'pranayama' when we think of techniques associated with the breath, in Swara yoga, it is the association of the breath in relation to the activities or phases or positions of the sun, moon, planets, seasons, time of day, with the physical and mental conditions of the individual and then taking the appropriate action according to these subtle relations. It was kept as a closed secret by the ancient sages and saints who had intuitively received this knowledge from the Divine. Swara yogi knows that during the flow of left nostril or right nostril when favorable elements rises certain things can be undertaken if you want to be successful. There are three modes of breathing- flow from left nostril, flow from right nostril and flow from both the nostrils. The last mode is generally for a short duration when breathing switches from left to right and vice versa.  Mode of breathing can be checked by examining air flow while exhaling. All our actions can be classified into three main categories; physical, mental and spiritual; which are respectively presided by the above three modes of breathing.  Breathing through the left nostril ( ida nadi ) stimulates the right hemisphere of brain, and breathing through the right nostril ( pingala nadi ) stimulates the left hemisphere. Breathing through the left nostril is connected with higher intraocular pressure and breathing through the right nostril lowers that pressure Intraocular pressure  is created by the continual renewal of fluids within the eye. The intraocular pressure is increased in glaucoma. Breathing through the left nostril stimulates Ida which relates to the moon and the parasympathetic nervous system, breathing through the right stimulates Pingala, relating to the sun and sympathetic nervous system.   Ida nadi is associated with the rest and restorative system of the body, whereas the pingala nadi is associated with the fight and flight response. Pranayama starts with the left nostril always. The benefits of left nostril breathing are numerous including sharper, clearer focus of the mind, and a deep, full relaxation or sleep.  In the Yogic tradition, left nostril breathing has been used to break vices and habits, which usually take 21 days  . If you watch your breath you will find that it is usually flowing more in one nostril than the other. Again, if the left nostril has a greater flow of air, then ida nadi is predominant. When the flow is greater in the right nostril, then pingala is predominant. If the flow is equal, then sushumna is ruling. When the right nostril is flowing, then vital energy is more active, allowing the individual to do physical work, digest food and so on. The mind is extroverted and the body generates more heat. When the left nostril (ida) is flowing, mental energy is dominant, the mind is introverted, any kind of mental work; thinking concentration, etc., may be undertaken. Ida nadi also flows mainly during sleep. The primary aim of hatha yoga is to bring about a balance of flow between the prana in ida and pingala, (ha = sun, tha = moon). To do this the body is purified by the six techniques known as the shatkarmas.  As per swara yoga, in a day the flow of air through the left nostril should predominate for about twelve hours and through the right nostril for the other twelve hours. If pingala flows, the body will be restless; if ida flows, the mind will tend to think too much. In human physiology, the two nadis correspond roughly to the two halves of the autonomic nervous system - the sympathetic and parasympathetic. Pingala coincides with the sympathetic nerves, responsible for the stimulation and acceleration of activities concerned with the external environment and the deceleration of the organs which tend to utilize a lot of energy internally. The sympathetic nerves speed up the heart, dilate the blood vessels, increase the respiration rate, and intensify the efficiency of the eyes, ears, etc. The parasympathetic nerves directly oppose the sympathetic nerves, for they reduce the heartbeat, constrict the blood vessels, and slow the respiration so that the individual becomes introverted. The flow of prana in ida and pingala is completely involuntary and unconscious until yogic practices control it. A Swara yogi realizes cosmic consciousness through control and manipulation of breath. The ancient 7000 year old Sanskrit texts mention 72,000 subtle channels through which prana flows, the dominant flow of prana occurs within the ida and pingala nadis, two channels that course upwards on either side of the spine from their origin within the kanda or ‘bulb’ in the sacral plexus. The ida and pingala nadis relate to the activities of the parasympathetic and sympathetic divisions of the autonomic nervous system, respectively. Surya Bhedana when breathing in through the right nostril and Chandra bhedana when breathing in through the left nostril. Breathing in takes air down to the lungs which will produce suction in the eustachian tube. Scientists have postulated that external forces set the biological clock by stimulating the pineal gland, which is affected by dark/light cycles.  These rhythms which were previously known to the ancient Rishis, so man is actually only rediscovering himself in relation to the cosmos. By the practice of Swara yoga one  can become the master of the nadis and elements, so as to adjust himself with  the universal forces which is the source of everything that gives birth to the experience of both  material and spiritual life with heightened awareness.  As per Swara Yoga , different modes of breathing leads to different types of actions; physical, mental and spiritual.   Swarodaya Yoga’ has three types of breathing systems – For a right hander  Ida (Inhaling and exhaling from  left nostril ), Pingala (inhaling and exhaling from right side of the nostril) and Sushmana (inhaling and exhaling from both sides of the nostrils). We mostly breathe in and out from either Ida or Pingla but sometimes we breathe from both the nostrils.  The Sushumna mode is generally for a short duration when breathing switches from left to right and vice versa.  Mode of breathing can be checked by examining air flow while exhaling. Compliance to the dictums of ‘Swar Shaastras’ is more efficacious than omens, and a suitable time selected through astrology based on moon and planet phases. it was used to go beyond the limitations of the mind.

One must change mode of breathing suitably at the time of initiating specific desired activity. Example: When the left nostril is running (for righthanders ) , intitiation of mantras and consecration of deities in temples is done. When the right nostril is running certain deadly and destructive vashikaran mantras of Atharva Veda and psychic works are done.  I will only say so much. Swara yoga aims at directly awakening the highest human potential. . Swara Yoga is a path which leads to awakening of the entire being.

Sunday, November 8, 2015

Rooting android and executing Super commands

Android 4.4.4 has introduced additional restrictions to turn on GPS/internet programatically. My requirement was to auto flip GPS/internet connection.
With Android 4.4.4 security restriction the android.permission.WRITE_SECURE_SETTINGS would stop the code to flip gps/internet connection. I managed to get around by rooting and following few simple steps:

Steps required to take:

1. Root you Android phone (Note: the warranty of the phone will be void once you root it also do backup data just in case mobile gets bricked)
  Rooting basically means to gain complete access to modify mobile settings at system level. 
  Download and install KingoRoot from here

 Note:  There is an android APK also for rooting, but it didn't work for me, so better to use windows desktop version.

2. Open KingoRoot desktop application and connect your Android device( ensure USB debbuging is turned on  follow link if not)

3. Follow instructions on KingoRoot desktop application and the mobile will have KingoROOT and Superuser APK installed after the mobile gets rebooted. At this stage, the root access is available to KingoRoot and can be given to other APKs who request it.

4. The user apps can now run commands to remove security restrictions: Some command i ran programmatically to remove GPS/internet flip restrictions are below:

a. "pm grant " + context.getPackageName() + " android.permission.WRITE_SECURE_SETTINGS";
b. "settings put global mobile_data 1";  // to enable=1 disable =0 mobile data
c. "svc data enable/disable";   //to enable/disable mobile data incase a. doesnt work.

The code used to run above commands from Android is below.

public static void runAsRoot(String[] cmds) {
try {
Process p = Runtime.getRuntime().exec("su"); // this give super user access
DataOutputStream os = new DataOutputStream(p.getOutputStream());
for (String tmpCmd : cmds) {
Log.i(TAG, "Calling root command : " + tmpCmd);
os.writeBytes(tmpCmd + "\n");
}
os.writeBytes("exit\n");
os.flush();
} catch (Exception e) {
e.printStackTrace();
}
}


Thursday, July 9, 2015

Cordova hurdles


Cordova setup steps (windows 7 + Android):

Pre-requisites
1. Download npm here  and setup. Its a package management tool to install cordova.
2. JDK 7
3. Android emulator or device. Ant might be required for older versions. newer version use gradle build system.

Setup cordova CLI (command line client)
1. From DOS prompt run >npm install -g cordova@x.x.x
Note: cordova specific version can be installed using x.x.x eg: 5.0.0 or remove it for default latest version.

Create Cordova project
  1. cordova create directoryName com.package AppName
  2. cd directoryName
  3. cordova platform add android@x.x.x
  4. cordova plugin add
  5. cordova build android/ios --release
  6. cordova run android/ios --device

Setup on eclipse
1. Follow blog
This is still work in progress... Will share once it is done.

Debug
Add Debug Console plugin to your project by running this command:
$ cordova plugin add org.apache.cordova.console
To see debug output adb logcat CordovaLog, but generates too much logs.

Or use remote debugging http://jsconsole.com/remote-debugging.html (way better logs)

Gotchas
  1. cordova build command first time downloads gradle. On cordova 5.1 had issue downloading it, the fix was as below :
    1. Stackoverflow link
    2. update ..\platforms\android\cordova\lib\build.js (search for .zip and replace to ../[].zip)
  2. Cordova plugin are downloaded from npm package (like maven). 
  3. aidl files failed to compile :  fix
aidl -I/Volumes/work/projects/java/android/cordova/hello/platforms/android/src -p/Volumes/work/projects/java/frameworks/android-sdk-mac_x86/platforms/android-22/framework.aidl IInAppBillingService.aidl

4. Android API 16+ requires JDK 7+ only. And mac Snow Leopard 32 bit doesnt support JDK 7 anymore (ridiculous). Mac is such a waste of time when it comes to backward compatibility.



5. I am yet to figure out how to run cordova(newer projects) from eclipse. Running from CLI is fine, but how can we debug like logcat in eclipse Juno?


6. The cordova.js ,cordova.jar and cordova_plugin.js are generated under \platforms\android\build\intermediates\assets\debug\www\cordova.js
Note the way plugins are included in later version of cordova is through JS.
7. To rename app : http://www.stefangordon.com/renaming-your-cordova-application/


Ionic

https://ionicframework.com/docs/intro/installation/ 1. npm install -g ionic cordova 2. ionic start letsgo-mobile blank 3. cd letsgo-mobile 4. ionic serve




Tuesday, August 19, 2014

Automation in agriculture/gardening - Drip irrigation


Given :
 Water is required by plants(roots only),
When :
 The traditional way of putting water using hose pipes
Then
  Water and energy(electricity) is wasted

Solution:
  Drip irrigate the plant roots like human circulatory system (network of pipes - remember to use T-bends at 90 degrees to avoid lag in flow).
  Reuse existing overhead tank to circulate the water into this system. (Overhead tank uses gravity. Fill this tank when sun shines using a solar powered water pump to make it self sustaining)
     -Also can add a rain water harvesting system
  Connect automatic timer on the tap to irrigate water on certain times of day/month/year
  Sow the seeds and enjoy self sustaining flower and fruit plants.
 
  Scale it to a farm!

Exceptions 
  Cost of building overhead tank (reuse existing tank or water tap)
  Clogging of pipes (needs maintenance)

Practicals
  This i will try and post in detail when in India.
 
Links:
  Drip irrigation timer only on Alibaba or ebay(buy pipes and connectors in local shop to save Rs.) :
 
 Pls leave a comment if you find it useful. That would keep me motivated :)

सर्वे भवन्तु सुखिनः
सर्वे सन्तु निरामयाः
सर्वे भद्राणि पश्यन्तु
मा कश्चिद्दुःखभाग्भवेत्
शान्तिः शान्तिः शान्तिः ॥  meaning

Wednesday, June 18, 2014

Preparing for a Solar adventure (Solar PV based systems)

"I am bored of software" Its all virtual in the mind, no concrete matter. Hmmn.. I am thinking of building a hardware system(solar PV based farm) :)
I aim to blog here my findings as i venture into the Solar adventure and open source all the knowledge gained in the due course.

With the solar energy based electricity production catching up in Germany and other western countries, I have been thinking for a while the best way to get into this space to contribute and monetize by setting up a self sustainable business as sun light is abundant in India.

Germany seems to be leading in the solar energy space (They call it Energiewende  or energy revolution). This revolution seems to be because of rising energy prices(as they were major importers of electricity), the Fukushima nuclear disaster and government policy to give good feed in rates for energy producers. 


Given
   India has temperature of  around 25-40 degrees around the year
   Solar PV panels cost have reduced drastically (0.4 to 0.7$/w)
   Indian Government has solar feed in tariff with net metering(in Karnataka) at subsidized rates
   Current goverment has backing for solar energy (considering Gujrath's model)
When
   Solar PV based system are setup as farms or on roof tops
Then
   Electricity can be generated and fed into existing grid. With two way net metering we can run the meter backwards. Carbon footprint can be reduced and a small profit made

Exceptions and unknowns
   Power companies like BESCOM might be unwilling to pay the rates and provide net metering(considering corruption in govt offices)
   Risks like fire disaster or grid tie cut off (when main grid is turned off, the unit should stop supplying power so the line man doesnt get electocuted etc ) need to be evaluated
   What if feed in tariff gets reduced drastically by government?
    Profit need to be computed:

Estimated Profits 
  Ingredients
    Solar panel  at say 0.5$/watt = Rs.25/watt a 10kwph system would cost : 2.5 lakhs
    Micro inverters (per panel inverter is better than one single inverter)
    Net meter , wires and other components
    Labour
    Land
    Permission from electricity board
 Profits
   Feed in tariff rate say Rs.12/kw . If a 10kw system runs say 10 hrs/day produces 100KW in a ideal scenario. So earning is around Rs.1200/day on a good day?? Roughly one can make Rs.30,000( $600) a month with 10kw unit (considering the feed in tariff rate is real)?? 10% returns
Note: these are rough calculations and might be wrong. will update once i get the system in place and start earning in real from these power companies.
 
Hmmm, so I need to buy the ingredients. The most important being solar panel. 2 options - Mono or poly crystalline. Mono is expensive and compact than Poly.

A Report on Design Estimation of 1MW Solar PV Plant (Utility Scale) with potential earnings is here 

The Government policies (in India)
  • Subsidy : The Ministry of New and Renewable Energy (MNRE) provides up to 30% capital subsidy for roof top systems (off-grid)
  •  Tax breaks  A company can claim 80% accelerated depreciation in the first year of installation under section 80 IC of the Indian Income Tax Code, leading to savings on income tax.
  • Renewable Purchase Obligations (RPOs) and Renewable Energy Certificates (RECs) - Under the REC mechanism, developers are eligible to receive one certificate for every 1,000 kWh of renewable electricity fed into the grid 
  • Net metering Until May 2014, four Indian states: Gujarat, Andhra Pradesh, Uttarakhand,
    Tamil Nadu and West Bengal have finalized the net metering policies. Another
    four states: Delhi, Kerala, Karnataka and Punjab have net metering policies
    in a draft stage. In Gujrath the roof top FiT price is Rs.11.21/kWh and Rs11.78/kWh


Solar PV companies in India:
  Solar panel supplier list  http://www.enfsolar.com/directory/panel/India
    http://www.evergreensolar.in/index.php  (Tamil nadu based)

Useful links
  1. BRIDGE TO INDIA is launching the INDIA SOLAR NAVIGATOR. This online, analytical tool is designed provide you with up-to-date, in-depth business insight on the Indian solar market.
  2.  Bridge to India - The India Solar handbook : download pdf

Thursday, June 12, 2014

When agile becomes Fragile

Its been a while I blogged, probably i got lazy or too busy with other things after getting married :).

Lately I was involved in a project where the so called scum master/monkey advocated and promoted Agile practices to his bosses overseas probably to get apprised, but wouldn't practice it in his own team. Probably his lack of enthusiasm, insecurity or his ways to get on top of the corporate ladder by pushing others down. God only knows. It did annoy me and can see clearly the team was getting disintegrated and drowned in misery.

There was no tester involved, no business analyst to communicate or document requirements/backlog(we had to produce the backlog and code and test and release and communicate to business and take the risk of getting something wrong as we were doing multiple roles). Just another Dev ops dude Y and me figuring out how to deal with things - digging legacy code/building the new messaging pipeline/ reverse engineer the data model/ liaise with teams and what not. This was not scrum. Just adhoc. The scrum monkey would as well shamelessly admit being a Hippocratic. It was absolute shambles - me and Y (who could spend only some time on this project as he was pulled into another project by the so called scrum monkey). I did mention him several times to get another resource and a tester, but he would simply brush it away. And with his crooked ways would ask for the build result without being involved in the design or build process and would like to take the credit when the boss would make an occasional visit? Also on the other side there was a tech ops/support team trying to coax me into dealing with their stuff applying Social engineering skills/Behavioral science/Jingoism. Well one needs to learn moral science  first and do their duty instead of troubling their colleague who is doing his job.

This was so unnatural and demotivating. Obviously good developers would run out of choice and  move on at this stage, so am I. I can see others following. One dirty fish seems to spoil the pond.

So as usual i asked Google god (our digital god who answers our prayers with search results), Why?

1. Basically we were ending up doing Cowboy coding with the boss only interested in the results - doesn't matter how you do it. And he would pull the resource to do other tasks than the main goal.  An undisciplined scrum master who doesn't care for his team but only the outcome by simply not pulling his weight.

Refer http://www.agilebuddha.com/agile/agile-is-not-ad-hoc/


2. Happiness Metric is something a scrum team should always consider along with retrospectives followed by its implementation. After all a motivated healthy and happy team will always produce good result. This does seem like the natural way of doing things.
Refer http://scrummethodology.com/happiness-metrics/



Digression
My miseries and rant apart. Let me think what was going wrong here.

Ongoing maintenance and build over legacy application is a challenging task especially with so many technologies involved built by several different minds over time. The tech ops team struggle to understand whats going inside when something breaks while the dev team struggle to build over legacy apps as there are no regression tests.
Both team need to co-exist to be an ideal Eco-system.

1. The tech stack builds up with many new technologies(Java and its loads of relatives, Mule, ESB, Oracle, Linux) and functionality while the older technologies(C, VB, websphere, messaging, Sybase, Solaris) and functionality haunt the developers. It is like renovating an old house, and the builders waste get expensive to be cleared and affects the new building blocks.

2. The old process and the new process need to match up. The bosses expect the migration to be done somehow.

3. The programming mindset - Stored procedural programming vs Object oriented programming mindset is hard to change IMHO. After years of PL/SQL programming ones brain gets hard wired to its style. As industry moves to OOP technologies like Java there needs a shift of ones thinking which has a hard learning curve involved.

4. As developers move out of team for grazing into greener pastures - there is a huge loss to the team. The new comers are left with no choice but to reverse engineer the code to understand the functionality as the docs might not exist or tend to get obsolete. Moreover the flat documentation can never be as complete as the relational application code. The code is the only source for latest functionality.

5. Working with the existing complex data model can get harder with time if no good process is followed.Also applications cross referencing database tables make them more tightly coupled

But there is no real process for that defined in Agile afaik for a moving target (for porting legacy apps along with ongoing maintenance ). From the bosses point of view Agile might mean getting things done fast with less resource so one can secure a bonus or promotion fast.

Hmmn thats how corporates work isn't it or am I being too pessimistic?

A similar pattern i could see in the past with another media company and could see stressed out developers and tech ops. Someone was not pulling his weight or there was no one to see the big picture and steer/guide the team(perhaps an Architects role) or was there a lack of process for this moving target?



More later...

Thursday, January 10, 2013

iPhone/Android source and monitization

Some websites to buy iphone/android app source or components from:



App monetization:
1. Interstitial Ad(full mobile): quite annoying for user, but better revenue than banner ads for authors
     Chartboost
     Revmob - earnings were good on first day only

2. Banner ads
   Adwhirl is best as a free mediation layer for many ad networks like below
   Admob - average eCpm(0.2 - 0.9). Fill rate 90%+
   iAd(ios only) - good eCpm . But fill rate is lower
   Millenial media - low eCpm (0.2). Fill rate is good.
   inMobi - good eCpm(0.7). Fill rate is 60%
   Leadbolt - low eCpm(0.2) so far

eCPM = effective $ earned per 1000 requests.   [ (earnings/impressions) *1000 ]

Mostly eCpm varies on country of Ad request, rating, etc.

3. Paid app (usually lite and a paid version should be released)
4. Free app with paid in-app purchase after some usage.

   

Monday, August 6, 2012

Hardware/Software stack:
 iPhone 3Gs having iOS 5.1.1(latest as of today). 

The Xcdode 4.2 failed to detect this iphone as it has support only till SDK 5.0..

[UPDATE]
 Follow this : http://stackoverflow.com/questions/9614918/xcode-4-2-snow-leopard-and-ios-5-1
Copy few ios 5.1 folders/version.plist/SDK and you are ready

The below steps will mostly not work. Too many to tackle.. Best go with the link above..tada
--------------

I had 2 choices for getting iPhone ready for development:

1. Upgrade Xcode to 4.4
       - This was not possible as Xcode 4.4 would only run on Lion or more (i have snow leopard which i thought is pretty new ,,but no you need the lion) . So had to drop this option as it was too much effort and setup for new OS..

2. Downgrade iPhone iOS 5.1 to 5.0 or less
        - Had to look around for jailbreaking iphone . But no luck using iFaith, redsn0w.
        - iFaith 1.4.2 runs on windows support SHSH extract till ios 5.0 only. But as i did not had shsh saved. I was literally screwed. Googled more, then found TinyUmbrella5.11.01 had support to extract SHSH from 5.1 . With a catch - in advanced tab uncheck Request SHSH from cydia - very important.
If you not uncheck you get the below error:
05/21/2012 17:10:21.796 CYDIA DOES NOT HAVE YOUR SHSH FOR iPhone3GS 4.3.5 (8L1) THERE IS NO WAY FOR YOU TO GET THEM. SORRY. YOU ARE JUST TOO LATE.

Then got the SHSH for 4.1 from TinyUmbrella. I had an SHSH for 4.1, using it i downloaded the IPSW (the iOS) file from iFaith --> Download from server..

So far so good, it is downloading IPSW for 4.1 SHSH file.  

Hope these steps saves time for someone stuck with iOS 5.1.1 as I spent almost 10 hrs figuring and downloading softwares. 

References:

Glossary:
SHSH blobs  -  Hash signature system (Signature HaSH blobs) to control manual software downgrades on iPhonesiPads, and iPod touches (using this we download IPSW file from iFaith)
IPSW file - iOS package i think
iFaith - Tool for downgrading iOs 5.1 to 5.0 or less
TinyUmbrella - Tool to extract SHSH (details below