Saturday, 13 September 2014

How to run or execute a program n number of times in a terminal/command line?

If you want to run or execute a program n number of times,you can create a shell script or you can use the native commands provided in the terminal it self.It depends on your convenience.

For example you can use this one

You can use xargs and seq. Generally:

seq nr_of_times_to_repeat | xargs -Iz command
For example:

seq 10 | xargs -Iz xdotool click 1
will execute the xdotool click 1 command for 10 times. 



if you want to use a script

then use this


#!/bin/bash

x=1
while [ $x -le 10 ]
do
  <command to run>
  x=$(( $x + 1 ))
done
where 10 is the number of times to run the command
if you need to build in a little break:
#!/bin/bash

x=1
while [ $x -le 10 ]
do
  <command to run>
  sleep 1
  x=$(( $x + 1 ))
done
Copy the script into an empty file, replace <command to run> by your xdotool command, save it as run_xdotool.sh, run it by the command:
sh /path/to/run_xdotool.sh
Alternatively, you can make it executable and simply run it by
/path/to/run_xdotool.sh

How to transfer and copy files from/to an Android device with ADB via GUI?

There are various ways of doing this.

First of all you should have adb tools installed,go to the google dev site and download the latest adb tools and update it.I hope your device is rooted too to perform this operation.

sudo apt-get install mtp-tools mtpfs
$ mkdir phone
...Connect phone, set usb mode to MTP...
$ sudo mtpfs -o allow_other phone
...Trying to do anything with the new filesystem right now will take a minute or so, just be patient...
...Finally, you can access your phone and do whatever, then...
$ sudo umount 
 
This is the version I used 
mtpfs --version
FUSE library version: 2.8.6
fusermount version: 2.8.6
using FUSE kernel interface version 7.12 
 
 

Realtek RTL8723AE-BT stops working when Kernel 3.5.0-21 is used

Realtek RTL8723AE-BT stops  working when Kernel 3.5.0-21 is used ,how to make the Realtek RTL8723AE-BT work?

The model is: Realtek RTL8723AE Wireless LAN 802.11n PCI-E NIC

Install the new kernel ,them recompile ,run the update manager so that all the repositories and dependencies are updated .
Then do this 
cd Desktop/RT8723  <--or wherever you compiled the package
sudo su
make clean
make
make install
modprobe rtl8723e
exit
 
then do this 
./scripts/driver select rtlwifi
make
sudo make install
sudo modprobe rtl8723ae
You 'make clean' because the module was compiled originally against your specific versions of kernel, headers, gcc, etc. When updates are installed, the various files built in the compile process may or may not work correctly with, for instance, a newer gcc version, so wipe it all out and start fresh: make clean
 


Tuesday, 9 September 2014

NEST 2015 preparation old question papers

About NEST
National Entrance Screening Test (NEST) is a compulsory test for students seeking admission to National Institute of Science Education and Research (NISER), Bhubaneswar and University of Mumbai - Department of Atomic Energy Centre for Excellence in Basic Sciences (UM-DAE CBS), Mumbai. Both NISER and UM-DAE CBS were set up by Department of Atomic Energy, Government of India in 2007. Their mandate is to train scientific manpower for carrying out cutting edge scientific research and for providing input to scientific programmes of Department of Atomic Energy and other applied science institutions in the country. The test is conducted in 45 cities (70 venues) across India. This brochure gives the detailed procedure for applying for the test, syllabus of the test and various dead lines.

Integrated Science Education and Research Center (ISERC), Visva Bharati, is also participating in NEST 2014 and will admit students for its Integrated MSc course from the Merit List of NEST 2014. The eligibility criteria are the same as that for NISER/ CBS and the students admitted to ISERC are also eligible for INSPIRE scholarship.


 NEST 2014

NEST 2007

NEST 2008

NEST 2009

NEST 2010

NEST 2011

NEST 2012

NEST 2013





 

CAT Exam 2015 preparation 7

Eating only breakfast and lunch may be more effective at managing type 2 diabetes than eating smaller, more regular meals, scientists say. Researchers found that the volunteers who ate two meals a day lost more weight than those who ate six, and their blood sugar dropped. Scientists divided a group of 54 volunteers aged 30 to 70 with type 2 diabetes into two groups of 27 people. Volunteers were then given either a six-meal-a-day diet (A6) for 12 weeks followed by a two-meal day diet (B2), or vice versa. The study compared two meals with six meals. The B2 group ate only breakfast and lunch, and the A6 group ate their food throughout the day. Weight loss for the B2 group averaged 1.4kg (3lb) more than A6, and they lost about 4cm (1.5in) more from their waistlines.

Which of the following strengthens the conclusion of the above study that eating two meals a day may be more effective at managing type 2 diabetes than eating smaller, more regular meals?

OPTIONS

     1)   The volunteers were given the freedom to choose their diets as long as the calorific value remained the same for each meal.
     2)   The volunteers were fed the same calorie diet spread over the course of two or six meals a day.
     3)    The average rate of metabolism of the first group of volunteers was much lower than that of the second.
     4)    The volunteers who were on two meals a day ate much less than those who were on six meals a day.

CAT Exam 2015 preparation 6

A new report has laid bare the UK's pretensions to have cut greenhouse gas emissions over recent years. Ministers have claimed global leadership in reducing CO2 emissions and urged other nations to follow suit as production of CO2 in the UK is down 20% in the past two decades. But the official Climate Change Committee (CCC) said that the UK's total contribution towards heating the climate has actually increased as the overall contribution to emissions is up 10%.

Which of the following help resolve the paradoxical claims in the above passage?

OPTIONS
 
 1)While the UK has been cutting emissions at home, it has been importing more goods from other countries, pushing up CO2 emissions there.
 2)Each individual in the UK is responsible for only half of the production emissions of someone in other countries, which have kept their manufacturing base.
 3)It is hard for any government including that of the UK to quantify imported emissions and difficult to influence other nations' climate policies.
 4)UK's unilateral climate targets are forcing up energy prices and driving manufacturing jobs abroad.      

CAT Exam 2015 preparation 5

A plot of land is divided into 50 parts: a1, a2, a3, a4, …, a50.

M1 = (a1 + a2 + a3 + a4 + … + ai… + a50)
 
M2 = (a1 a2 + a2 a3 + a1 a3 + … + ai aj + … + a49 a50)
 
.
.
.
 
M50 = (a1 a2 a3 …. a50)

S = 1 + M1 + M2 + M3 + … + M50

Which of the following is true?
 
 
OPTIONS
 
 1)
S is odd if and only if all the ai’s are powers of two.
 2)
S is odd if and only if at least one of the ai’s is a power of two.
 3)
S is odd if and only if all the ai’s are odd.
 4)
S is odd if and only if all the ai’s are even.
 5)None of these                                                

CAT Exam 2015 preparation 4

Fossil-fuel companies have lobbied hard – and often successfully – against effective climate policies. But a recent report by the environmental research group CDP revealed that at least 29 major companies, including five major oil producers, are basing their internal planning on the assumption that such policies – specifically, a government-mandated carbon price – will be a reality as soon as 2020. The question now is whether oil-producing countries’ governments and citizens share this expectation. World leaders are ostensibly committed to keeping the increase in average global temperature below 2°C relative to pre-industrial levels – the threshold beyond which the most catastrophic effects of global warming would be triggered. Indeed, they endorsed the limit at the 2009 Copenhagen Climate Change Conference, and again in Cancún the following year.

In the light of the above passage, which of the following is the most relevant question that the author ought to answer?

OPTIONS
 
 1)
Why does the success of fossil fuel companies’ planning depend on the expectations of oil-producing countries’ governments and their citizens’?
 2)
Will the oil producers’ lobby divest funds from fossil fuels? 
 3)
What could be a reason behind the global leaders’ avowed commitment to keeping the increase in average global temperature below 2°C relative to pre-industrial levels?
 4)
Is the report of the environmental research group CDP credibl
 
 
 
John is working on an electronic LED board that has 480 LEDs numbered 1 - 480 and placed in ascending order on the board. He programs the board such that all the LEDs are initially switched off. At the end of one second, all the LEDs are switched on and at the end of two seconds, all the LEDs at even places invert their logic state i.e. they get switched off if they are on and get switched on if they are off. After three seconds, all the LEDs numbered 3, 6, 9, … invert their logic state. This pattern continues at the end of each subsequent second. How many LEDs are on just after 3 minutes and 45 seconds have passed?
OPTIONS
 
 1)169
 2)231
 3)249
 4)311
 

Reviews of Moto G (2nd Gen) new

Now the new  Moto G is already released ,people who had high hopes from Xiaomi Mi3 remain short lived as now Xiaomi maker had closed for the time being and they are focusing on Redmi 1s,which is a low range phone but it's specification are worth while to go for.But again now Motorola gave another surprise by releasing at right time when xiaomi mi3 stopped.So I am giving the best of reviews for all the people who were dissapointed with xiaomi mi3 but waiting to go for Moto G second gen.These review will clear there mind whether to go for or not.




















 



Review 1
With Xiaomi phones not made available for general public with their show off flash sales, I decided to purchase the Moto G(2nd gen).
This handset from the time of launch is still readily available on flipkart :)

I liked the handset look, feel and overall aspects. The Stereo speakers, Camera and additional storage are the biggest upgrades over the previous phones.

The only con in this phone is the very average battery life. If one is a regular user of the phone for browsing, whatsapp, etc several times a day I feel the battery will drain out in about 8-10 hours.

Overall very much satisfied with this phone for a price of Rs 12,999/- and one can buy on demand and not wait for your lucky chance every Tuesday.


         Moto G (2nd Gen)           


 Review 2
The product is awesome and timely delivery of flipkart was WOW.

I got product properly. Mobile is working Superb.

I must say the right time to get the Moto G2. Previous was 5MP. Now its 8MP.

Micro SD slot was added features and experience of the two speaker makes a value to the phone.

In this range, its an best option. Bad thing i may face future is of inbuilt battery.Normally in all smartphones after some time of use, Phone gets hanged, only one way to bring the phone back in action is to remove the battery and place it back and switch it on. Here if the phone gets hanged, you have to find a service center or have to wait till the battery get empty.

In overall, 7/10, Dynamic 8/10, Camera (in this range) 8/10, Processing speed 8/10



Review 3
Hi friends I have just received my new moto g 2nd generation phone its good to use. The look is awesome 5 inch display is looking great. I was trying to buy Mi3 but couldn't get it but now I am happy with this very much. I guarantee you will be really happy with this product even I had double thoughts but now I feel moto is safer and guaranteed phone better go for it. 


Review 4-
previously used Samsung galaxy grand though there were minimal problems I faced with it when I 1st saw this phone specs I just fixed my mind blindly to go up with this mobile.. seriously satisfied with the every aspect of mobile!!
felt like there would have been a better battery performance not 2070mah though anything more than that would do the thing actually.
but for the price you pay this is the best product anyone could get..no lags, no issues and no complaints just go for it!! in love with android!!
thank uu moto :)) 




Monday, 8 September 2014

CAT Exam 2015 preparation 3

The last sentence from the paragraph has been deleted. Choose the option that best completes the paragraph.

While the new exhibition focuses on Gauguin’s prints, ceramics, and woodcuts, his color paintings should not be overlooked, because Gauguin’s use of color is extraordinary. The fantastic, perfervid Upa Upa (The Fire Dance; 1891), along with Words of the Devil (1892), is reminiscent of Henri Rousseau’s vivid jungle surrealism. To gaze into its lurid, fiery display is to feel as if you were wading into a closed cultic rite. Gauguin could paint a still life like Cézanne and a pointillist gouache like Seurat. He is not often thought of as a great colorist, and while he may not have been Matisse, “Metamorphoses” illustrates that he may have been just as talented. ________________.
OPTIONS
 
 1)
One can only wonder what one would find when one explores the lesser known aspects of his oeuvre.
 2)
Several of his paintings borrow poses from a sculptured frieze found at the Borobudur Buddhist temple in Indonesia.
 3)
This makes the fact that Gauguin lacked formal artistic training, all the more remarkable.
 4)
In Mata Mua, the light and dark greens, squash yellows, bell-pepper oranges, tomato reds, and eggplant purples are a feast for the eyes.
 
 
 
 
If a, b, c, d are distinct real numbers such that a and b are the roots of the equation x2 − 3cx − 8d = 0 while c and d are the roots of the equation x− 3ax − 8b = 0, what is the value of a + b + c + d?
OPTIONS
 
 1)– 48
 2)32
 3)96
 4)– 48 or 96
 5)– 48 or 32
 

CAT Exam 2015 preparation:English vocabulary

homiletics [ hom-uh'-let-iks ]
 noun ]
 MEANING :
 the skill of sermonizing
 USAGE EXAMPLE 1 :
 He was taught homiletics as a part of his degree course.
 USAGE EXAMPLE 2 :
 What is true in the field of education, linguistics, ethnomusicology, marching bands, psychology and culture is also true in the field of homiletics, hermeneutics, biblical studies, black sacred music and black worship.
CNN, Transcript of Jeremiah Wright's speech to NAACP, 28 April 2008
 
decomposition [ dee-kom-puh'-ZISH-uh'n ]
 noun ]
 MEANING :
 1. the decay of organic material
2. disintegration or breaking down into constituents
 USAGE EXAMPLE 1 :
 The stench was caused by the decomposition of dead cattle.
 USAGE EXAMPLE 2 :
 It was found that during decomposition, the golf balls dissolved to release a high quantity of heavy metals.
CNN, Golf balls: 'Humanity's signature litter', Christina Macfarlane, 10 November 2009.
 
pomposity [ pom-POS-i-tee ]
 noun ]
 MEANING :
 1. the state of being lofty or pretentious
2. ceremonious and stately display of dignity
3. loftiness of language or behaviour
 USAGE EXAMPLE 1 :
 None of the villagers were impressed by the pomposity of the minister as he had not kept his election promises.
 USAGE EXAMPLE 2 :
 Locating himself in the older-brother character (played by "Roger Dodger's" excellent Jesse Eisenberg) who, in his teenage unhappiness, mimics his father's pomposity and blames his unfaithful mother, Baumbach lets no one off the hook, least of all himself.
CNN, EW review: 'In Her Shoes' flat-footed, isa Schwarzbaum, 7 October 2005.
 
resplendent [ ri-SPLEN-duh’ nt ]
 adjective, intransitive verb ]
 MEANING :
 1. shining luminously or radiantly
2. dazzling, garish or splendid
 USAGE EXAMPLE 1 :
 The resplendent fireworks dazzled the crowd.
 USAGE EXAMPLE 2 :
 It's a resplendent sun-drenched morning in the east of Scotland.
The Herald, Barnes's storming finish, KENNY HODGART
 
apropos [ ap-ruh'-POH ]
 adjective, adverb ]
 MEANING :
 1. (adj.) apt, appropriate, opportune or relevant
2. (adv.) opportunely, seasonably or at the appropriate or right time
3. (adv.) incidentally or by the way
 USAGE EXAMPLE 1 :
 The coup must be timed at the apropos juncture.
 USAGE EXAMPLE 2 :
 I saw one where the D had been painted over and the message seemed more apropos.
abcNews, Heat, Flat Tires and Bullets in Iraq, By MIKE TUGGLE, June 28, 2006

CAT Exam 2015 preparation 2

K, L, M, N, P, Q, R, S, U and W are the ten members of the Dalhousie Institute. A team has to be selected from among the members, subject to the following conditions:
  1. The team must include exactly one among P, R, and S.
  2. It must include either M or Q, but not both.
  3. If a team includes K, then it must also include L, and vice versa.
  4. If a team includes one among S, U, and W, then it must necessarily include the other two.
  5. L and N cannot be members of the same team. The same is true for L and U also.
The size of a team is defined as the number of members in the team.

A = Number of members in a team such that the team includes N.

B = Sum of squares of all distinct values of A

Find B.
OPTIONS
 
 1)
45
 2)
36
 3)
50
 4)
34
 5)
 20
 
 
 
 
Half of humanity – 3.5 billion people – live in urban areas today. Our metropolises are the engines of growth for a global economy emerging from the shadow of financial crisis. In Bangalore, my home, investment is pouring into a city at the forefront of the Indian economy’s transformation – home to companies like Infosys and Wipro, and named by Forbes Magazine as one of the “Fastest Growing Cities of the Next Decade.” But, as Bangalore’s citizens prepare to go to the polls in state elections, their concerns are not merely economic. The city’s financial success stories mask a darker reality – quality of life for many city-dwellers has deteriorated over recent years. The movement of the rural poor to large cities is one of the exemplary narratives of the modern era. And governments, which typically focus on crude measures of economic performance, encourage rapid urbanization.

Which of the following is the main concern of the writer in the above passage?

OPTIONS
 
 1)Movement of the rural poor to the large cities.
 2)Metropolises as engines of growth for global economy.
 3)Deterioration of the quality of life in the fast growing city of Bangalore.
 4)The main issue for the people in Bangalore in the forthcoming state elections.
 

CAT Exam 2015 preparation 1

Bharath, the mathematics genius and professor, asked his students to identify the following table:


Vicky (instantly raising his hand): Come on sir, we all know this is a Magic Square. The sum of the numbers in any row, column or diagonal adds up to 15. Also, a magic square of this type can be created using any 9 numbers in an arithmetic sequence.
Bharath: Well said Vicky. That was very informative for all of us. Now have a look at this and tell me what you can find in it.


Bharath (after a 5 minute silence): Looks like I’ll have to reveal the answer this time.
Nithin: I got it sir. The previous one was a Sum Magic Square, whereas this one is a Difference Magic Square.
Bharath: Now that’s more like it Nithin. Tell me more.
Nithin: Take any row, column or diagonal. Subtract the 1st number from the 2nd and subtract the result from the 3rd number. You get the result 5 in each case. For instance, the second row gives you 7 − (5 − 3) = 5 and the second column gives 9 – (5 – 1) = 5; and so on.
Bharath: Excellent work Nithin. I’m impressed. Anyway guys, get ready for the next challenge. This is your homework. I want all of you to create a Multiplication Magic Square. Choose any set of nine numbers that you want, and create a Magic Square based on multiplication, similar to the one on Addition, i.e., the product of the numbers in any row, column or diagonal must be the same. Also, this should be the smallest multiplication square possible.
Vicky: This seems tough sir. A few clues on this would help us.
Bharath: Alright Vicky, the 9 numbers you choose, must be the only 9 factors of a given number. I can’t tell you more than this.
 
 
 
 
 
An n-cube is a cube in n dimensions. An n-cube is a line segment in one dimension, a square in two dimensions, a normal cube in three dimensions and so on. In order to go to the next dimension, a copy of the original n-cube is made and all corresponding vertices of the new n-cube and the original n-cube are connected. Find the number of edges in a 6-cube.
OPTIONS
 
 1)1464
 2)192
 3)384
 4)20736
 5)2304
 

CAT Exam 2015 preparation

If the students of a class are arranged in a square formation, 5 students are left out. If the students are arranged in a rectangular formation with 7 more rows than columns, no student is left out. Find the maximum number of students the class can have.
OPTIONS
 1)
230
 2)294
 3)
366
 4)
261
 5)
None of the above

Answer the question based on the passage given below.


The subject matter of Rawls’s theory of justice is societal practices and institutions. Some social institutions can provoke envy and resentment. Others can foster alienation and exploitation. Rawls’s original thought is that equality, or a fair distribution of advantages, is to be addressed as a background matter by constitutional and legal provisions that structure social institutions. While fair institutions will influence the life chances of everyone in society, they will leave individuals free to exercise their basic liberties as they see fit within this fair set of rules. To carry out this central idea, Rawls takes as the subject matter of A Theory of Justice “the basic structure of society,” defined as “the way in which the major social institutions fit together into one system, and how they assign fundamental rights and duties and shape the division of advantages that arises through social cooperation.” Rawls’s suggestion is, in effect, that we should put all our effort into seeing to it that “the rules of the game” are fair. Once society has been organized around a set of fair rules, people can set about freely “playing” the game, without interference.

Rawls’s A Theory of Justice, according to the writer, answers which of the following questions?
OPTIONS
 1)Is there a way of organizing society that can keep problems of alienation and exploitation?
 2)Can society be organized around fair principles of cooperation in a way the people would stably accept?
 3)What sort of social structure can help us resolve envy, resentment, alienation and exploitation?
 4)On what basis can the parties choose the rules of the game that are fair?