Selecting Text (Visual Mode)
To select text, enter visual mode with one of the commands below, and use arrow keys to highlight the text you are interested in. Then, use some command on the text.
The operators that can be used are:
~ switch case
d delete
c change
y yank
> shift right
< shift left
! filter through external command
= filter through 'equalprg' option command
gq format lines to 'textwidth' length
Any time following are the basic commands to remember.
| v |
start Visual mode per character. |
| V |
start Visual mode linewise. |
| <Esc> |
exit Visual mode without making any changes |
Bookmark it!
These icons link to social bookmarking sites where readers can share and discover new web pages.
Tags:
Proxy setup in svn always a headache when you work behind a firewall.
Following is the common proxy error we get when we try for any svn command.
svn: PROPFIND request failed on '/svn/glassfish-svn/trunk/v3/web/appserv-webtier'
svn: PROPFIND of '/svn/glassfish-svn/trunk/v3/web/appserv-webtier': Could not resolve hostname
`svn.dev.java.net': No address associated with hostname (https://svn.dev.java.net)
To avoid this, following the setup needed.
In ~/.subversion/servers file, add the following lines. Also, you need to add username/passwd based on your proxy setup.
http-proxy-host = xxx.xxx.xxx.com
http-proxy-port = 8080
Bookmark it!
These icons link to social bookmarking sites where readers can share and discover new web pages.
Tags:
December 21st, 2009 · 1 Comment · Gen
1. Firmware update ?
- Download the latest firmware based on the player model from the url http://www.sandisk.com/DriverDownload/index.asp .
- Then, connect the device to the PC and then, you see a new drive E:\sansa e260R.
- Drag and drop the firmware unzipped file to this drive.
- Disconnect the device and restart player. Verify the firmware version through settings.
2. Put Sansa E200/R into Recovery Mode
3. Format Sansa
- Goto recovery mode and connect to the PC. You’ll see 16MB-FORMAT drive.
- Create a NEW EMPTY DIRECTORY with name as sansa.fmt and disconnect the device.
- Now, it’ll format automatically and after few seconds restarts, before that unlock the slide.
4. Some important firmware file Descriptions
Firmware file
- Often called PP5022.mi4, this is the file that controls most of the Sansa, with the exception of when it turns on.
- The latest firmware may be downloaded automatically from the Sansa Firmware Updater
- It is automatically applied to the Sansa when using the Sansa Firmware Updater
Sansa.fmt
- To create this file we will just need to create a new notepad file on the desktop. We can do so by Right-clicking a clear area on the desktop, selecting new and then ‘Text Document’, once the file appears on the desktop we will need to rename the entire filename and extension to Sansa.FMT. A dialogue box should appear that states “If you change a file name extension, the file may become unusable. Are you sure you want to change it”, when the change is made. After right-clicking on yes, the Sansa.FMT file is ready for use.
- This file, though normally not used, can be placed on the Recovery
Mode drive to format the main partition, which stores all of the music.
- This file is often used to fix most problems that are not fixed by
replacing the firmware, such as a music file that is corrupt, which occasionally causes the Refresh Database ‘window’ to freeze.
- This file’s extension must be fmt. The full filename can not be sansa.fmt.txt or similar, and must only be sansa.fmt
Other files
- Unless it is noted in the Manual Firmware Download thread that
another file must be included for the firmware to work, do not add any other files to the Recovery Mode drive
- Do not, under any circumstances, place a file ending in ‘.bin’ on the Recovery Mode drive.
- If in doubt about placing any other files besides the firmware (and
possibly bootloader) onto the Recovery Mode drive, PM a SanDisk moderator, who will be able to help you.
|
5. Switching between MSC and MTP modes
- Turn the Sansa on, if it is not already
- Navigate to the main menu of the player; the menu that gives us options such as Play, Record, Settings, Info
- Navigate to ‘Settings’ on the main menu of the player.
- After navigating to ‘Settings’ we should see an option that states ‘USB’ or ‘USB MODE’.
- From here we can select MSC or MTP modes
- Once the mode is selected, it will roll back to the ‘Settings’ menu
*Auto Detect = Plays For Sure = MTP
*Rhapsody Mode = Mass Storage Class/Device = MSC
6. What is the MicroSD card, and how do I use it?
The MicroSD card is extra storage for your Sansa e200R Rhapsody
Your Sansa e200R Rhapsody comes with a MicroSD card slot that lets you use removable MicroSD cards to add memory to your player. You can
manage your MicroSD card with Rhapsody as long as you insert the card before you connect your player. An inserted MicroSD card will appear in
the Sources area.
What you can do with a MicroSD card and Rhapsody:
Transfer and play purchased and downloaded Rhapsody tracks, as well local tracks imported from CD or downloaded from the internet.
Use any number of MicroSD cards.
Use your MicroSD card in any Sansa e200R Rhapsody authorized to your account.
Note:Playlists and Rhapsody Channels cannot be transferred to MicroSD cards at this time.
Warning:
You cannot “hot-swap” MicroSD cards. Always disconnect your player and allow it to finish restarting before switching cards, or data will be lost.
7. What if recovery mode also got corrupted ?
Use the tool http://daniel.haxx.se/sansa/e200tool/e200tool in linux to recover the rom file. Also for more help,
http://forums.rockbox.org/index.php?action=printpage;topic=8443.0
http://daniel.haxx.se/sansa/e200.html
http://www.rockbox.org/wiki/UsefulSansae200Tools
8. “Not enough space for music DB Please free 6 MB. Data base had to be repaired. Connect to your PC to refresh database” After that it shows the regular screen but then I try to play music, there seems to be no songs in the list. However, my photos are still in there. When I plug my Sansa to my PC, nothing happens and the Sansa doesn’t seem to connect. What’s the problem with my Sansa? And how do I fix it?
You have to many songs a sansa e 250 only holds a certain amount of space so your best bet is to buy a memory card or delete songs so you
can add new ones. Though I’ve formatted for this to make it back to original empty pod.
Bookmark it!
These icons link to social bookmarking sites where readers can share and discover new web pages.
Tags:
Last weekend was spent with a trip to Yadagiri. From Hyderabad, there are many buses to reach this place. From Jublee Bus Stand, every 15 mins one bus is available towards here. Also, other stations MGBS has buses, not this frequent. It is around 60kms from Hyderabad and takes 1hr to 1:20 hrs to reach place. Totally, I feel the inside city journey is more than that of outsider city journey towards Yadagiri. Route is to take NH202 High way, which leads to warangal, till raigiri and take other turn for 15 mins to reach Yadagiri.
One of the few temples near to Hyderabad is YadagiriGutta which is place for Lord Vishnu in the form of Sri NaraSimha Avatara of the Ten great avataras mentioned in Hindu epics. Lord NaraSimha Swamy, is half man and half lion, incarnated to kill the evil king Hiranyaksha (refer to Sanskrit books for exact name) who got the boons from Lord Bramha not to get killed by either man or by animal, either in day or in night, either by metals or by body, either at outside house or insider house, either in sky or on soil etc.
To kill that evil king without voilating the boons given by Lord Bramha, Lord Vishnu in the form of Sri Narasimha (Nara (man) + Simha (lion)) Avatara, is neither a man or nor a animal, kills him in the mid day (i.e exactly 12′O clock) which is neither day time nor night time with his own nails as the weapon which is neither body nor metal at the entrance of the house (called dwara in sanskrit) which is neiter inside of house nor outside by keeping the king’s body in his lap which is neither sky nor soil.
This is the one of the two existed Narasimha Swaymy templs in Andhra Pradesh. Another one located in Simhachalam near to Vizag. It is said that Lord NaraSimha Swamy after killing the evil king, stayed here on this single rock hill (called gutta in sanskrit) untill his anger got under control. That is the reason, the status/idol of Narasimha Swamy at this place is very fearful manner. That is the reason the temple authority not directly show this idol to devotees, by side view. There is another idol established by temple authority for front view to the devotees.
Apart from the historic/mythological importance to this place, there are some more aspects I found here. This place is very small village and completely entire village established just due to this Temple. But, this is a very plesenet place to spend in free time without any traffic noises which become part of our daily routine in city/corporate life. This is the first place I found Tangas (a cart pulled by horse) getting used in place Autos in Andhra Pradesh. Though Autos available, but very few in number. Tanga is a nice experience too. We hired one tanga to reach Old Template which resides in down hill about 2 kms from bus stand.

There are other visiting places near by as well.
1. Surendra Puri, comes 2 kms ahead of Yadagirigutta, which has the replicas of all most all of Indian famous temples idols. But entry ticket is too much argues some people which is 200/- in working days, 300/- in weekends.
2. Kulpaka, one of the few jain temples in andhra pradesh, which is 25-30kms from Yadagiri, 20kms from raigiri which is the junction for other two places. But, local people doesn’t have much idea about this temple even though it’s very near, so you might not get much help by enquiring about this. Better hire a vehicle to see this place as bus route is not direct.
3. Bongir Fort, built on single rock hill in 12th centuary. This comes much early before raching Yadagiri. To cover all, better first drop here before going to Yadagiri. From here, bus frequency is very hight towards both Hyderabad and Yadagiri. Fort is very close to bus stop. It has very robus boundary wall covering entire single rock hill with a gaint rock wall entrance. Though main buildings insider the fort were vanished as Tourism Dept in AP never shown interest in preseving these historic monuments. Though I’m not sure about the kings who built & ruled this fort, by first look it is very attractive with wide long gaint rock walls, never get a chance to see these except in theatre :).
You can find all these places in the above map starting from Bhongir.
Overall, it is one day weekend trip for all. Great relief for those who work entire week without any other thought. Though, it’s very rare to check for accommodation in this place, there is one devastanam accommdation facility in Up hill along with AP Tourism Punnami restaurent. Some of community based dormitories available in down hill like Arya Vysa Satram etc. Apart from these, always private hotels are available charging in the range 200-400/- per day.
Overall that’s a nice weekend trip.

Bookmark it!
These icons link to social bookmarking sites where readers can share and discover new web pages.
Tags:
One of the very common task in oracle environment is export/import of CSV files to Oracle database. Export is pretty straight forward as many of oracle clients provide this as standard functionality for any query. But for import, we can do by writing our own scripts using pl/sql or java or .NET or any other platform.
Since, pl/sql belongs to oracle family and also no need of Middle tier code (application server dependent i.e. Java or .NET etc), we use it in this example. Oracle provides another tool, SQL Loader, using which we can import data files with our custom control files with respect to SQL Loader.
$ sqlldr apps/apps@fz1rw102 control=mycontrolfile.ctl log=test.log
When you install SQL Loader in your system (windows/linux), you can find ’sqlldr’ executable in bin directory.
From the above command,
1. apps/apps@fz1rw102 - username/passwd@SID of oracle database.
2. mycontrolfile.ctl - control file we write will be passed.
3. test.log - log file to know the errors/warnings during the course.
Content of mycontrolfile.ctl is:
LOAD DATA
INFILE ‘data.dat’
APPEND
INTO TABLE PAVAN_TEST
FIELDS TERMINATED BY “:” OPTIONALLY ENCLOSED BY ‘”‘
(PAYMENT_NUMBER,PAYMENT_METHOD,CUSTOMER_NAME,
CUSTOMER_NUMBER,
APP_GL_DATE DATE(20) “DD-MON-YYYY”,
PAYMENT_GL_DATE DATE(20) “DD-MON-YYYY”,
ENTERED_DEBIT,ENTERED_CREDIT,ACCTD_DEBIT,
ACCTD_CREDIT,
RECEIPT_DATE DATE(20) “DD-MON-YYYY”,
RECEIPT_CURRENCY,CODE_COMBINATION_ID,RECEIPT_SOURCE,
BATCH_NAME,CATEGORY,ACCOUNT,COMPANY,ACCOUNT_DESC)
In the above content, you can find file name ‘data.dat’ which is the CSV file having the data to be imported into some table named PAVAN_TEST with it’s fields mentioned over there.
For more details about sqlloader, please refer to here.
Bookmark it!
These icons link to social bookmarking sites where readers can share and discover new web pages.
Tags:
For Question
The idea is to reduce the number of participants (greedy pirates) and see what happens in that case and start reasoning based on that. One more thing to note here is that a pirate would accept a proposal only if he knows that in case he would not accept the proposal, he would get less of the treasure. Let’s say we identify the pirates by the number of years of experience they have.
Now consider the case when pirates 5, 4 and 3 killed and only 2 and 1are left. Now 2 has to get a vote from 1 to stay alive. However, 2 can never give 1 more number of coins that what he would get by killing 2 and hence 2 can never satisfy 1. Therefore, 2 would never want to be left alone with 1 and 3 being intelligent knows that!
Now consider the case when pirates 5 and 4 are killed and only 3, 2 and 1 are left. 3 has to get one more vote from either 2 or 1 to stay alive. And 3 knows that 2 never wants to stay alone with 1 and hence would always vote for 3. So 3 being so lucky could keep all the 1000 gold coins and give nothing to 2 and 1 and still stay alive. So 2 and 1 would not want 3 to be a proposer of the split even if they get one gold coin each and 4 being intelligent knows that!
Now consider the case when only the pirate 5 is killed and 4, 3, 2 and 1 are left. 4 has to get 2 more votes to get a majority which it can get from 1 and 2 by giving them 1 gold coin each and keeping the rest 998 with himself and giving 3 nothing. So 3 would not want 4 to propose even if he gets 1 gold coin for himself, and 1 and 2 would not want 4 to propose if they get more than 1 gold coin which 5 being intelligent knows!
Now consider the real problem wherein 5 has to propose so that he gets the maximum and doesn’t get killed. He needs 2 more votes minimum inorder to stay alive. He could get one vote from 3 by giving him one gold coin. And for one more vote he could give either 1 or 2 two gold coins as discussed above! So he keeps 997 gold coins for himself, gives 1 gold coin to 3 and give 2 gold coins to either 1 or 2!
Hence the proposal is :
5 - 997 gold coins
4 - 0 gold coins
3 - 1 gold coin
2 - 0 gold coins or 2 gold coins
1 - 2 gold coins or 0 gold coins
Bookmark it!
These icons link to social bookmarking sites where readers can share and discover new web pages.
Tags:
There are 5 pirates, all of them being equally greedy. They have varied number of years of experience. Say for convenience sake 5, 4, 3, 2 and 1. They find a booty of 1000 gold coins which they want to split amongst themselves. Everyone being greedy, wants the most for themselves. So they device a scheme!
They agree that each one would propose a split starting with the most senior person to the least senior person. If there is no majority, the guy who proposed will be killed and then the next guy gets the chance. So it’ll be 5 first then 4 etc. How does the guy with 5 years experience propose to split the coins so that he gets the max and does not get killed?
Check the solution
Bookmark it!
These icons link to social bookmarking sites where readers can share and discover new web pages.
Tags:
For Question
Since there are 5 cards, at least two will have to be of same suite. So
I keep one of them and pass the other one as the first card. This way
the second guy will know the suite.
With the three remaining cards
that needs to be passed on, I will establish an absolute ordering
between them (breaking ties on number based on suite). So lets call the
largest card C3, the second largest C2 and smallest card C1. I can
arrange these in 3! = 6 ways. I can use these to represent 6 numbers.
The second prisoner needs to guess only one of 12 numbers (since the
first card passed to him will eliminate one number). By passing the
first card face up or face down, the first prisoner can tell the second
one whether the number to be guessed is in the first half (1 - 7) or
second half (7 - 13). He can encode the number using C1, C2 and C3 in a
particular permutation.
Case 1: what if the prisoners are not allowed to pass the card facing a
particular direction (the jailer just hands over the card to the other
prisoner without maintaining any configuration?
Then send the first card + the difference between first and second (on
a circular scale from 1 to 13) by encoding using C1, C2 and C3.
Difference can never be more than 6 so it can be encoded using the
other 3 cards.
Key part here is to arrange C1, C2 and C3 such that the circular differences (always less than 6 for 3 cards) starting from first card is equal to missing card.
Bookmark it!
These icons link to social bookmarking sites where readers can share and discover new web pages.
Tags:
Two prisoners were sentenced to death by King Xuan of Zhou and were
kept in two different inaccessible cells. They were to be put to the
gallows the day after. However, King Xuan wanted to give them a last
chance. Since he was very fond of riddles, he came up with one for the
prisoners which if they solved, they would be set free. The prisoners
were told that they would be put into a single cell for a day when they
can discuss their strategy, after which they would again be sent back
to their respective cells. One of the prisoners would then be given 5
playing cards out of the pack of 52 cards. He can send four of these
five cards to the other prisoner through the jailor one by one after
which the second prisoner has to guess the one card (number and suit)
which is left with the first prisoner. If he guesses right, both the
prisoners would be set free but if not they would be hanged the same
day.
What strategy could they possibly come up with which could save them?
To know the solution .
Bookmark it!
These icons link to social bookmarking sites where readers can share and discover new web pages.
Tags:
Recently, I came across this scenario that when ever I open any word files which copy from different system, word getting crashed with error ‘Microsoft Word has encountered a problem and needs to close error’ . After a small search, I figured out that it is well known issue to the rest of world.
Checking Microsoft web site for the problem, it told me it was the normal.dot template that was corrupted, but how could the normal.dot template could be corrupted when it never had been open before? Then I realized the problem; Microsoft word was open when I ran the File and Settings Transfer Wizard on the old computer, and because of that a temporary normal.dot got copied to the new computer.

that (picture above) temporary normal.dot file is created when word is open, and if you run the File and Settings Transfer wizard while it is open, it will get copied to the new computer, creating conflicts in the new computer with word.
The normal.not file can be found at your computer profile path at: C:\Documents and Settings\yourprofilename\Application Data\Microsoft\Templates if you are having the same issue I had, delete everything under the template folder.
Microsoft word will recreate the files automatically when you open it up. Remember that is not a good practice to have applications open when you run Files and Settings Transfer Wizard on computers to transfer data.

Bookmark it!
These icons link to social bookmarking sites where readers can share and discover new web pages.
Tags: