ramlicious Blogs by Tina & Prabhu

July 19, 2016

Preparing NULL counts for SQL and Oracle data tables

Filed under: Oracle,SQL Server,Technology,Tools,Uncategorized — Prabhuram @ 2:26 pm

I am posting this one after a very long time. Just thought this information will be useful for someone.

Here is the T-SQL for SQL Server that will fetch the columns in a table and provide you the NULL, ZERO, NEGATIVE and UNIQUE count of each table columns.

USE <database>

	DECLARE @TAB NVARCHAR(100) = <table_name>

		WHERE object_id = @OBJECT_ID;

	OPEN col_cursor

	set @sql = N'SELECT @ptotrecords = count(1) FROM ' + @TAB 
	EXECUTE sp_executeSQL
        N'@ptotrecords INT OUTPUT', @ptotrecords=@totrecords OUTPUT

		set @sql = N'SELECT @precords = count(1) FROM ' + @TAB + ' WHERE ' + @COL + ' IS NULL'
		EXECUTE sp_executeSQL
            N'@precords INT OUTPUT', @precords=@records OUTPUT
		PRINT(convert(varchar, CURRENT_TIMESTAMP) + CHAR(9)+ @TAB + '.' + @COL + '[' + @COLTYPE + ']' + CHAR(9) + 'NULL' + CHAR(9) + convert(varchar, @records) + CHAR(9) + convert(varchar, @totrecords)+ CHAR(9) + convert(varchar, @records*1.00/@totrecords*100))

		set @sql = N'SELECT @precords = count(distinct ' + @COL + ') FROM ' + @TAB  + ' WHERE ' + @COL + ' IS NOT NULL'
		EXECUTE sp_executeSQL
            N'@precords INT OUTPUT', @precords=@records OUTPUT
		PRINT(convert(varchar, CURRENT_TIMESTAMP) + CHAR(9)+ @TAB + '.' + @COL + '[' + @COLTYPE + ']' + CHAR(9) + 'UNIQUE' + CHAR(9) + convert(varchar, @records) + CHAR(9) + convert(varchar, @totrecords)+ CHAR(9) + convert(varchar, @records*1.00/@totrecords*100))

			set @sql = N'SELECT @precords = count(1) FROM ' + @TAB + ' WHERE ' + @COL + ' = 0'
			EXECUTE sp_executeSQL
				N'@precords INT OUTPUT', @precords=@records OUTPUT
			PRINT(convert(varchar, CURRENT_TIMESTAMP) + CHAR(9)+ @TAB + '.' + @COL + '[' + @COLTYPE + ']' + CHAR(9) + 'ZERO' + CHAR(9) + convert(varchar, @records) + CHAR(9) + convert(varchar, @totrecords)+ CHAR(9) + convert(varchar, @records*1.00/@totrecords*100))
			set @sql = N'SELECT @precords = count(1) FROM ' + @TAB + ' WHERE ' + @COL + ' < 0'
			EXECUTE sp_executeSQL
				N'@precords INT OUTPUT', @precords=@records OUTPUT
			PRINT(convert(varchar, CURRENT_TIMESTAMP) + CHAR(9)+ @TAB + '.' + @COL + '[' + @COLTYPE + ']' + CHAR(9) + 'NEGATIVE' + CHAR(9) + convert(varchar, @records) + CHAR(9) + convert(varchar, @totrecords)+ CHAR(9) + convert(varchar, @records*1.00/@totrecords*100))
	CLOSE col_cursor;
	DEALLOCATE col_cursor;

PL/SQL code below does a similar job in Oracle.

   L_ROW_COUNT                        PLS_INTEGER;
   L_TOTAL_COUNT                        PLS_INTEGER;
   COL  VARCHAR(200);
     FOR x IN (SELECT * FROM all_tab_columns WHERE table_name = Y.TABLE_NAME and owner = Y.OWNER ORDER BY  column_id ) LOOP
        COL := X.TABLE_NAME || '.' || X.COLUMN_NAME || '[' || X.DATA_TYPE || ']' || CHR(9) ;
        DBMS_OUTPUT.PUT_LINE (COL || 'NULL' || CHR(9) || TO_CHAR (l_row_count, 'fm999,999,999,990') || CHR(9) || TO_CHAR (L_TOTAL_COUNT, 'fm999,999,999,990') || CHR(9) || TO_CHAR (L_ROW_COUNT*1.0/L_TOTAL_COUNT*100.0, 'fm999,999,999,990'));
        DBMS_OUTPUT.PUT_LINE (COL || 'UNIQUE' || CHR(9) || TO_CHAR (L_ROW_COUNT, 'fm999,999,999,990')|| CHR(9) || TO_CHAR (L_TOTAL_COUNT, 'fm999,999,999,990') || CHR(9) || TO_CHAR (L_ROW_COUNT*1.0/L_TOTAL_COUNT*100.0, 'fm999,999,999,990'));
          DBMS_OUTPUT.PUT_LINE (COL || 'ZERO' || CHR(9) || TO_CHAR (L_ROW_COUNT, 'fm999,999,999,990')|| CHR(9) || TO_CHAR (L_TOTAL_COUNT, 'fm999,999,999,990') || CHR(9) || TO_CHAR (L_ROW_COUNT*1.0/L_TOTAL_COUNT*100.0, 'fm999,999,999,990'));
          DBMS_OUTPUT.PUT_LINE (COL || 'NEGATIVE' || CHR(9) || TO_CHAR (L_ROW_COUNT, 'fm999,999,999,990')|| CHR(9) || TO_CHAR (L_TOTAL_COUNT, 'fm999,999,999,990') || CHR(9) || TO_CHAR (L_ROW_COUNT*1.0/L_TOTAL_COUNT*100.0, 'fm999,999,999,990'));
        END IF;
     END LOOP;

February 20, 2015

Extracting XML Element and Attribute values in Oracle

Filed under: Oracle,Programming — Prabhuram @ 12:03 pm

Let’s assume that you have a XML (xmltype) table column.

<?xml version="1.0" encoding="UTF-8"?>
     <data k="a1">
        <value>row 1</value>
     <data k="a2">
       <value>row 2</value>

One way to easily extract data is given below

Select Xmltype(t.Col).Extract('//form/data[@k="a1"]/value/text()').Getstringval()  a1
From Mytable t

and reading an attribute value can be like this:

Select Xmltype(t.Col).Extract('//form/data[1]/@k').Getstringval()  k
From Mytable t

February 19, 2015

A Quick and Dirty Algorithm for fuzzy matching

Filed under: Programming,Scripting — Prabhuram @ 3:34 pm

The VBA program below is an easy-to-use Excel function that can be used to quickly check two strings through a fuzzy logic.  I created this program to locate some phonetic equivalents in Tamil.

Input 1 Input 2 Fuzzy 1 Fuzzy 2 Result
Madrass Madras mrs mrs Match
Rangoon Yangooon rnkn nkn Not a Match
Thiruvizhaa Thiruvila rvl rvl Match
Aan Azhagan Aanazhagan anlkn anlkn Match

Feel free to apply your language equivalents that you think are relevant.

Option Explicit

Function Cleanup(Text As String) As String
    Dim firstChar As String
    firstChar = Mid(Text, 1, 1)
    Text = Mid(Text, 2) 'keep the first char
    Text = LCase(Text) 'change the case
    Text = RemoveSplChars(Text) 'remove spl characters
    Text = RemoveVowels(Text) 'remove vowels
    Text = ReplaceLangEquivalents(Text) 'replace lang equivalents
    Text = RemoveRepeatingChars(Text) ' remove repeating  (or duplicate) chars
    Text = LCase(firstChar & Text) 'include the first char

    Text = ReplaceLangEquivalents(Text) 'replace lang equivalents once more

    Cleanup = Text
End Function

Private Function RemoveSplChars(Text As String) As String
    Text = Replace(Text, ".", "")
    Text = Replace(Text, " ", "")
    RemoveSplChars = Text
End Function

Private Function RemoveVowels(Text As String) As String
    Text = Replace(Text, "a", "", , , vbTextCompare)
    Text = Replace(Text, "e", "", , , vbTextCompare)
    Text = Replace(Text, "i", "", , , vbTextCompare)
    Text = Replace(Text, "o", "", , , vbTextCompare)
    Text = Replace(Text, "u", "", , , vbTextCompare)
    RemoveVowels = Text
End Function

Private Function RemoveRepeatingChars(Text As String) As String
    Dim i As Integer
    'remove 2 chars
    For i = 1 To Len(Text) - 2
        If Mid(Text, i, 2) = Mid(Text, i + 2, 2) Then
            Text = Replace(Text, Mid(Text, i, 2) & Mid(Text, i + 2, 2), Mid(Text, i, 2), , , vbTextCompare)
            GoTo x:
        End If

    'remove 1 chars
    For i = 1 To Len(Text) - 1
        If Mid(Text, i, 1) = Mid(Text, i + 1, 1) Then
            Text = Replace(Text, Mid(Text, i, 1) & Mid(Text, i + 1, 1), Mid(Text, i, 1), , , vbTextCompare)
            GoTo y:
        End If
    RemoveRepeatingChars = Text
End Function

Private Function ReplaceLangEquivalents(Text As String, Optional Lang As String = "ta") As String
    Select Case (Lang)
        Case "ta":

            Text = Replace(Text, "gh", "g", , , vbTextCompare)
            Text = Replace(Text, "th", "d", , , vbTextCompare)
            Text = Replace(Text, "dh", "d", , , vbTextCompare)
            Text = Replace(Text, "zh", "l", , , vbTextCompare)
            Text = Replace(Text, "sh", "s", , , vbTextCompare)
            Text = Replace(Text, "dr", "r", , , vbTextCompare)

            Text = Replace(Text, "g", "k", , , vbTextCompare) 'sakodhara, sagodhara
            Text = Replace(Text, "y", "", , , vbTextCompare) 'koyil, kovil, koil
    End Select
    ReplaceLangEquivalents = Text
End Function

October 12, 2014

Vinoth’s Wedding Video

Filed under: Family,Fun — Prabhuram @ 10:31 am

Thought I will spend some time editing my brother’s long wedding video into a short seven minutes. Here is the final product.

October 11, 2014

Comparing Excel Worksheets using VBA

Filed under: Scripting — Prabhuram @ 9:58 am

My wife asked me if I could help her with a macro that will compare two Excel Worksheets to generate a variance or a diff report. Here it is;

Sub CompareSheets(Sheet1 As Worksheet, Sheet2 As Worksheet, RangeToCompare As String, SkipFirstRow As Boolean)
    Dim i As Integer, j As Integer
    Dim val1, val2
    Dim ResultSheet As Worksheet
    Set ResultSheet = Application.Sheets.Add()
    ResultSheet.Name = "ResultSheet" & Format(DateTime.Date, "yyyymmdd") & "-" & Format(DateTime.Time, "hhmmss")
    For i = 1 To Sheet1.UsedRange.Rows.Count
        For j = 1 To Sheet1.UsedRange.Columns.Count
            If j = 1 Or (SkipFirstRow = True And i = 1) Then
                ResultSheet.Cells(i, j) = Sheet1.Cells(i, j)
                val1 = Sheet1.Cells(i, j)
                val2 = Application.WorksheetFunction.VLookup(Sheet1.Cells(i, 1), Sheet2.Range(RangeToCompare), j, False)
                ResultSheet.Cells(i, j) = (val1 = val2)
            End If

        Next j
    Next i
End Sub

This Sub-routine can be simply called like this:

Sub Test()
    CompareSheets Application.Sheets(2), Application.Sheets(3), "A:E", True
End Sub

June 19, 2014

Who are Iraq’s Sunni Arabs and What did we Do to them? | Informed Comment

Filed under: Do You Know! — Prabhuram @ 8:43 pm

via Who are Iraq’s Sunni Arabs and What did we Do to them? | Informed Comment.

The two great branches of Islam coexist in Iraq across linguistic and ethnic groups. There are Sunni Arabs and Shiite Arabs, Sunni Kurds and (a tiny minority of) Shiite Kurds. Arabs are a linguistic group, speaking a Semitic language. Kurds speak and Indo-European language related to English.

Sunnism and Shiism as we know them have evolved over nearly a millennium and a half. But the difference between them begins after the death of the Prophet Muhammad in 632 AD (CE) in in western Arabia. Muhammad, the son of Abdallah, had derived from the noble Quraysh clan. Those who became the Shiites insisted he should be succeeded by Ali, his cousin and son-in-law (and the next best thing to a living son). This dynastic principle was rejected by the group that became the Sunnis. They turned for leadership to prominent notables of the Quraysh, whom they saw as caliphs or vicars of the Prophet. The first three caliphs were his in-laws, but Sunni principles said that they needn’t have been– any prominent, pious male of the Quraysh would have done.

There is a vague analogy to the split between Catholicism and Protestantism, on the difference between seeing Peter as the foundation of the Church and of seeing Paul as that.

Iraq was part of the medieval caliphates– the Orthodox Caliphs, then the Umayyad Arab kingdom, and then the Abbasids. In 1258 the invading Mongols (themselves Buddhists and animists) sacked Baghdad and executed the last caliph. It is said that they were warned that it was very bad luck to shed the blood of a caliph, so they rolled him up in a Persian rug and beat him to death with hammers.

Parts of what is now Iraq were ruled by the Mongol Il Khanid state (which gradually became Muslim), and then by fragmented small principalities until the rise of the two great Middle Eastern empires of the early modern period, the Safavid and the Ottoman. The Safavids, based in Iran, were Shiites and ruled Baghdad 1508-1534. Then the Ottomans, Sunnis based in what is now Turkey, took Iraq in 1534 and ruled it, with the exception of a couple of decades of Iranian reassertion, until World War I.

The elite of Iraq was Sunni since the medieval period, though there were always significant Shiite movements. In the course of the late 18th and the nineteenth centuries, under Ottoman rule, the tribes of the south of Iraq gradually converted to Shiite Islam. This may have been a form of protest against Ottoman oppression. It was in part influence from wealthy Shiite states in India after the fall of the Mughal Empire in the 1700s and before the imposition of British direct rule over all of North India from 1856. The Indian Shiite potentates or Nawabs gave money for the building of water canals out to the shrine cities of Najaf and Karbala in Iraq, which suffered from lack of water. Once the canals were built, tribes irrigated off them and settled near the holy cities, the residents of which proselytized them into Shiism.

The elites of Mosul and Baghdad, however, tied to patronage from the Ottoman Sultan, resisted this conversion movement and remained Sunnis, recognizing the four Orthodox Caliphs. From about 1880, Ottoman Sultan Abdulhamid II started claiming to be a caliph, on the medieval model. This claim wasn’t universally accepted but it was popular among Muslims in colonized British India in particular. The British, French and Russians defeated the Ottomans in World War I, after which the empire collapsed. In 1924 the new secular Republic of Turkey under Mustafa Kemal Attaturk abolished the caliphate. Sunnis became like Protestants, organized by country and lacking a central node of authority. Some fundamentalist Sunnis refused to accept this situation and dreamed of reconstituting the caliphate as a center of authority that could unite 1.5 billion Muslims and deliver them from their divided estate and consequent weakness in the face of the West.

When the British took Iraq during World War I, after the Ottomans unwisely allied with Germany and Austria, they mainly turned to the Sunni elites as partners in building a new “Mandate” or colony recognized by the League of Nations. When the Iraqis revolted in 1920 against the prospect of British colonialism, desiring independent statehood instead, the British brought in Faisal as king. He was the son of Sharif Hussein of Mecca, and a Sunni, who had allied with the British (think Lawrence of Arabia) to revolt against the Ottomans during the war.

Faisal lacked roots in Iraq, and turned, in order to rule the country, to the Sunni mercantile and bureaucratic elites of Baghdad and Mosul. He also picked up the remnants of the Ottoman-trained officer corps to constitute his new military, almost all of them Sunnis (the Sunni Ottomans were skittish about 12er Shiite officers).

Although the Shiites were a majority in Iraq, Sunnis predominated in positions of power and wealth throughout the twentieth century. When the Baath Party, a secular, socialist and nationalist movement, came to power in 1968, it was dominated by Sunnis from the area north of Baghdad. The Baathists created a one-party state and repressed religious Shiites (and also religious Sunnis who mixed in politics). The high generals, bureaucrats, entrepreneurs and politicians were Sunni. There were Shiites in the Baath Party, but they had less status than the Sunnis. After the Gulf War of 1990-91 when the US and allies pushed Iraq back out of Kuwait, the Shiites of south Iraq rose up. The US had urged them to do so, but stood by while the Baath massacred the Shiites. The Shiite religious parties interpreted this spring 1991 repression as sectarian genocide. Belonging to the main Shiite religious party, the Da’wa (Call or Mission) Party, was made a capital crime by the Baath already in 1980 and members were often killed and put in mass graves.

In the 1990s when Iraq was under severe US and UN sanctions, some lived on smuggling oil and other goods out to Jordan. The Jordanian form of modern Sunni fundamentalism, or Salafism, made inroads into Iraq along truck stop towns like Fallujah and Ramadi. The Baath Party, although hostile, winked at this development because sanctions made it weak. At the same time, Baath leader Izzat Duri developed ties of patronage with the Naqshbandi Sufi order in Mosul. Sufism or Muslim mysticism is the opposite of fundamentalism, valuing rituals and saints and mystical experiences of God. Both Salafism and Sufism had a revival in the 1990s.

The US overthrew Saddam Hussein of the Baath Party in 2003 in alliance with Shiite groups primarily. Those Shiite groups wanted revenge on the disproportionately Sunni Baath Party. They carried out a program of “de-Baathification,” in which they fired tens of thousands of Sunni Arabs from their government jobs as bureaucrats and even teachers. They hired Shiite clients instead. The Neocons hated the state-owned industries, and closed them down as inefficient without putting anything in their place. The Bush administration backed Shiite supremacism and debaathification to the hilt. Its proponents likened it to de-Nazification after WW II in Germany, but actually former Nazis below the top level in Germany typically kept their jobs.

In the new Iraq, Sunni high status was turned upside down. The Sunnis had been the top graduates of the officer training academies, the equivalent of West Point. They disproportionately dominated the officer corps. They were at the top of the Baath Party. They were the rich entrepreneurs to whom lucrative government contracts were given. Now they were made unemployed, or given menial jobs, while the goodies went to the members of Shiite religious parties. Massive unemployment swept the Sunni cities in 2003-2004.

In 2005 the US was maneuvered by Grand Ayatollah Ali Sistani and his allies, all Shiites, into having parliamentary elections. Because of the US military attack on Sunni Fallujah, the Sunnis of Mosul, Ramadi and elsewhere boycotted that election. Sistani had insisted that the parliament also function as a constituent assembly to draft the constitution. There were almost no Sunnis in the first 2005 parliament, so the constitution was crafted by the Shiites and the Kurds. They Sunnis rejected it in their provinces by a solid majority (by 2/3s in two provinces).

Sunnis all along were nervous about the Shiite-Kurdish government erected under the Americans and some turned to guerrilla warfare. When guerrillas blew up the Golden Dome shrine in Samarra in February 2006, a site sacred to Shiites, it kicked off a civil war. In summer of 2006 3000 people were being killed a month. Shiite militias ethnically cleansed Sunnis from mixed neighborhoods in Baghdad. When Gen. Petraeus conducted his troop escalation (‘surge’), he disarmed the Sunni militias first, inadvertently leaving Sunnis in the capital vulnerable to threats and night raids. The Sunnis ran away to Syria and Jordan or to Mosul. After a while there were few mixed neighborhoods and it was harder for Shiites and Sunnis to get at one another, so the violence subsided.

In the one-chamber Iraqi parliament, Sunnis would always be a minority. When they stopped boycotting they typically got 56 seats. The Shiites and Kurds typically allied against them so that they lost all important votes. In 2010, they united behind the Iraqiya Party of ex-Baathist Ayad Allawi, which became of the largest single party in parliament, with 91 seats. But Allawi could not find Shiite or Kurdish allies to bring his total up to 51% and so could only have headed a minority government open to being toppled at any time by a vote of no confidence. In contrast Nouri al-Maliki of the Da’wa Party put together, with Iran’s help, a Shiite majority and allied with the Kurds for a super-majority. President Jalal Talabani therefore appointed al-Maliki to a second term.

Secular groups like the 1920 Revolution Brigades and the Army of Muhammad, and Sufi ones like the Men of the Naqshbandiya, formed cells to fight the American occupation. Another of the Sunni insurgent groups was al-Qaeda in Mesopotamia, led by the Jordanian Abu Musab al-Zarqawi. He was killed in 2006, but it made no difference to the movement, which continued to blow things up. When US military officers in the field in 2005 tried to reach out to disaffected Sunni tribes, Condi Rice is said to have stopped them, lest Washington offend its Shiite allies in Baghdad. Al-Qaeda in Mesopotamia later started styling itself the Islamic State of Iraq. It engaged in extensive terrorist operations in a bid to stop the new Shiite-dominated government from establishing itself. When the revolution in Syria turned violent in late 2011, its fighters went there and the organization became the Islamic State of Iraq and Syria (or Iraq and the Levant). It is said to have received money from rich private businessmen in Kuwait who support the fundamentalist Salafi form of Sunni Islam, and which typically hates Shiites. ISIS became the best fighters and they captured Syrian Baath military bases and took towns like Raqqa and Aleppo neighborhoods.

From 2011 when there was a ‘Sunni Arab Spring’ in Iraq, with urban youth demonstrations and demands for an end to discrimination, the al-Maliki government heavy-handedly repressed it. If it instead had accommodated those moderate young people in their demands, it might have avoided losing the Sunni areas to religious extremists.

In the 2014 elections, the Sunnis did poorly and it was clear that they would continue to be marginalized in parliament by Shiites and Kurds. The Shiite-dominated government provided them with few services or jobs. Although Iraq is an oil state, you can’t tell it. I was in Baghdad last year this time and it was dowdy and nothing like Abu Dhabi or Dubai. In Mosul, residents complained of electricity outages and lack of services or jobs. Shiite troops often put up Shiite insignia to humiliate Sunnis. They frisked Sunnis at checkpoints. Sunnis felt as though they were frozen out of meaningful power and treated as though under Shiite occupation. This situation derived in part from the invidious Bush policies of backing the Shiites against the Sunnis.

ISIS, having gained fighting experience and a taste of urban administration in Syria, expanded its cells back in Fallujah, Ramadi and Mosul in western and northern Iraq. Last January it took over Fallujah and parts of Ramadi west of Baghdad. Last week it took over Mosul and most other towns in Ninevah Province. This was not primarily a military conquest but a coordinated urban uprising against Iraqi security forces, in coordination with other Sunni groups, including secular ex-Baathists. ISIS also tried to advance into Salahuddin and Diyala Provinces, though it seems to have been checked there by the Iraqi army and Sunni tribal and urban allies. At the moment, ISIS is a force in al-Anbar and Ninevah Provinces, which are mostly Sunni Arab. But they are demographically vastly outnumbered by the Kurds and Shiites, who could well riposte militarily.

Sunni Iraqis had been in the 20th century cosmopolitan and often modernists. Many were liberals yearning for democracy. From 1968 they turned to more of a Soviet model, a strongly secular one. They have turned in desperation to rural fundamentalists who want a medieval caliphate only because of the vast reversal in their fortunes resulting from the Bush invasion and occupation, and the unfair policies of the Shiite government, which has turned them from an elite into an underclass. They are capable, trained, educated people. They aren’t going to put up with that, and if turning to al-Qaeda is the only way to avoid that fate, they are often willing now to do it.

May 25, 2014

The Most Expensive Fruits in the World | FirstWeFeast.com

Filed under: Do You Know! — Prabhuram @ 10:08 am

How ’bout them apples? Here are eight exotic fruits that will literally break the bank.

via The Most Expensive Fruits in the World | FirstWeFeast.com.

May 19, 2014

Basic Mudras

Filed under: Uncategorized — Prabhuram @ 3:49 pm
Gyan Mudra – Mudra of Knowledge

Method: Touch the tip of the thumb to the tip of the index finger, with the other three fingers stretched out.

Specialty: A mudra of knowledge, it enhances the knowledge. The tip of thumb correlates to the pituitary and endocrine glands. When you press these centers with the index finger the two glands work actively.

Time duration: No particular time duration for this mudra. You can practice while sitting, standing or lying on a bed whenever and wherever you have time.

Benefits: Increases memory power and sharpens the brain, Enhances concentration and prevents insomnia, when practiced regularly, it will relieve psychological disorders like Hysteria, Anger and Depression

Prithvi Mudra -Mudra of Earth

Method: Tip of the ring finger touches the tip of the thumb with the other three fingers stretched out.

Specialty: Reduces all physical weaknesses.

Time duration: Has no particular time duration. Practice it any time.

Benefits: Helps to increase weight for weak life-force people, Improves the complexion of skin and makes the skin glow, Promotes body functionality

Varuna Mudra – Mudra of Water

Method: Tip of little finger touches the tip of thumb with the other three fingers stretched out.

Specialty: Balances the water content and prevents all diseases which come due to lack of water.

Time duration: Has no specific time duration.

Benefits: Retains clarity in blood by balancing water content in the body

Prevents the pain of Gastroenteritis and Muscle Shrinkage

Vayu Mudra – Mudra of Air

Method: Keep the index finger on the base of the thumb and press with the thumb keeping the other three fingers straight.

Specialty: Prevents diseases that occur due to imbalances in the air.

Time duration: The practice of this mudra for 45 minutes reduces the severity of disease in 12 to 24 hours. For better results practice for 40-60 days.

Benefits: Relieves Rheumatism, Arthritis, Gout, Parkinson’s disease and paralysis without any medicine, Useful for Cervical Spondilytis, paralysis of the face, and pressure on nerves in neck, Relieves gas pressure in the stomach

Shunya Mudra – Mudra of Emptiness

Method: Keep the middle finger at the mount of Venus and press with the thumb.

Specialty: Reduces the dullness in the body.

Time duration: One can practice this for 40 to 60 minutes daily until relieved.

Benefits: Relieves an earache within 4 or 5 minutes, Useful for the deaf and mentally challenged.

Surya Mudra – Mudra of the Sun

Method: Bend the ring finger and press it with thumb.

Specialty: Correlates to the thyroid gland.

Time duration: Practice twice daily for 5 to 15 minutes.

Benefits: Reduces cholesterol in body and helps in reducing weight

Reduces anxiety, Corrects or relieves indigestion

Prana Mudra – Mudra of Life

Method: Bend ring finger and little finger and touch the tip of thumb with their tips keeping the remaining two fingers stretched.

Specialty: As it is the mudra of life, this improves the life force. The weak become strong. Reduces clumps in blood vessels. Practiced regularly this promotes physical activity.

Time duration: No specific time duration. One can practice it any time.

Benefits: Improves immunity, Improves the power of the eyes and reduces eye related issues, Relieves vitamin deficiency and fatigue

Apana Mudra – Mudra of Digestion

Method: The tips of middle finger and ring finger touch the tip of thumb while the other two fingers are stretched out.

Specialty: Plays an important role in our health as it regulates the excretory system. Note: Your health and wellness is absolutely dependant on the rapid removal of systemic waste. Toxicity can be mitigated if removed from the body rapidly.

Time duration: Practice daily for 45 minutes, but practicing for longer period yields more benefits.

Benefits: Regulates diabetes, Relieves constipation and piles, Helps establish regular excretion of solid waste

Apana Vayu Mudra – Mudra of the Heart

Method: The tips of the middle finger and ring finger touch the tip of thumb, while the index finger touches the base of thumb and the little finger is stretched out.

Specialty: Benefits the heart and works like an injection in the reduction of heart attack. Reduces the gas content in body.

Time duration: Practice as many times as you can. Heart patients and BP patients can practice twice for 15 minutes daily for better results.

Benefits: Strengthens the heart and regularizes palpitation, Regulates excretory system, Relieves gastric issues

Linga Mudra – Mudra of Heat

Method: Interlock the fingers of both hands and keep the thumb of the left hand vertically straight and encircle it with the thumb and the index finger of the right hand.

Specialty: Generates heat in the body. Take milk, ghee, more water and fruit juices in addition to the practice of this mudra for many benefits.

Time duration: Practice any time. But do not over-practice as it produces heat in the body. It can cause excessive sweating even in winter.

Benefits: Stops production of phlegm and gives power to lungs, Relieves severe cold and bronchial infections, Invigorates the body

Thumb – Fire; Index – Air; Middle – Ether or Space; Ring – Earth; Pinky -Water.

Can be performed at any time in any way, sitting, standing, walking or travelling. Maximum benefit is by doing it in sitting posture, especially in sukhasana (easy pose), vajrasana, or padmasana.

In the initial phase mudras should be performed for at least 10 minutes and then can be extended to 30 minutes to 1 hour. It is not necessary to leave all your normal work for 1 hour to perform mudras as it can be done at any time, any place, and in any posture, even if you can’t perform all at one stretch you can practice in 2-3 installments.


Vayu Mudra prevents heavy eyelids – 3 times a day before meals for 15 min.

Varuna Mudra for burning, dry eyes – Sit (palms on knees) and practice for 3x a day, 10-15 min

Gyan Mudra for weak eyesight and retina – 3x a day 15 min

Surya or Prithvi Mudra (Cataract) – 3x at least 10 min, seated facing east

Jala Samhar Mudra (excess tears, phlegm)- Press down on little finger, 2-3x – 15 times per session

May 1, 2014

Half of people living in Illinois and Connecticut want to get the hell out – Vox

Filed under: Do You Know! — Prabhuram @ 9:30 am

Gallup asked people around the country whether they would move away from their states, given the chance. As it turns out, half of Illinois residents and 49 percent of all Connecticutians Connecticutese? Connecticuters? want to change states. In addition, it looks like a good chunk of the northeastern seaboard is just itching to pack up a U-Haul.

via Half of people living in Illinois and Connecticut want to get the hell out – Vox.

April 30, 2014

State of the Air 2014 | American Lung Association

Filed under: Do You Know! — Prabhuram @ 8:51 am

The American Lung Association State of the Air 2014 report ranks the metropolitan areas based on ozone and particle pollution during 2010, 2011 and 2012. For particle pollution, we rank separately the areas with high year-round (annual average) levels and high short-term levels (24-hour) found in monitoring sites across the United States. We take official data from the U.S. Environmental Protection Agency (EPA) to compile the rankings. For more information about how we grade and rank cities, go to Methodology.

Most Polluted Cities

The cities are ranked by the air quality in the most polluted county in the metropolitan area. Click on the city name to open links to a chart of the trends for ozone and year-round particle levels, as well as more information about air pollution and the local Lung Association. Note that some cities rank high on one list and don’t show up on other lists because of the differences in their pollution problems. Each city includes all the counties that form the economic and transportation network that makes up the metropolitan area as defined by the federal government.

Cleanest Cities

The cities on the cleanest cities lists for ozone and for short-term levels of particle pollution had no days with unhealthy levels of ozone or particle pollution. These lists are not ranked because all the cities earned the same scores. The cities on the list of the cleanest for year-round particle pollution levels are ranked by their average levels of particles, as calculated by the EPA. Note that some cities are clean for one category, but not for others.

County rankings and cleanest county lists are also available in the full report.

via City Rankings – State of the Air 2014 | American Lung Association.

« Newer PostsOlder Posts »

Powered by WordPress