Archive for August, 2008

Aug 29 2008

Ugly nature of Politics

Published by under General

I have never bothered with politics while i was in India, didn’t have any opinion about it and stuff. After i moved here, i thought things would be better out here in terms of politics but i was wrong. By better i mean in terms of scandals, honesty etc.

 

Surprisingly I have followed elections this year very closely, specially the Democratic primary battle between Hillary and Obama. No holds barred, that is the policy when it comes down to politics play to the psyche of the people and win.

 

I just want to list few instances of how politicians backtrack and play to the psyche of general public. Its my personal opinion i could be wrong and few might disagree with me as well.

 

New Hampshire primary, Hillary cried on camera and won it. I personally think it was a very well planned thing and it simply made voters sympathetic towards her specially women. The 3 am ad during Texas primaries was a masterpiece in highlighting Obama’s lack of experience. 

 

I have been a Obama supporter mainly because he is a straightforward guy which he demonstrated during the debates with Hillary. When asked if he would invade Iraq again after pulling out of it just because Al Qaeda had a base, his answer was a firm Yes while Hillary didn’t give a firm answer. During the end of primaries Obama was against the popular move of eliminating the state tax on Gas to lower its price. 

 

Obama, he isn’t all about being honest and straightforward.He has backtracked on some issues as well, he initially said that he would use the public funding system if his republican counterpart agreed to same but he backed out later, I don’t blame him he is raising millions more as compared to Mccain. Its an advantage he doesn’t want to loose as simple as that. Obama was against offshore drilling but then he said after a while that he would reconsider that option. 

 

He made lot of promises rather very grand promises during the Democratic National Convention (DNC) acceptance speech, it would be interesting to see how he keeps those or whether he keeps those if elected. Isn’t that the question we always ask about politicians. 

 

Bill Clinton, I was completely surprised to see how much he praised Obama, during the primaries he didn’t think Obama had enough experience to be a president but at the DNC he was all over Obama. Did he have a divine realization before the DNC that people were having same accusation against him (lack of experience) when he was running for presidency?

 

The best of all is the choice of VP for Mccain, Sarah Palin. She is a mom of 5 and looks gorgeous, i wonder how many men would vote for her only because of that. It is obvious that Mccain camp wants to attract women voters and it was highlighted by the fact that as soon as Sarah got on the stage she appealed to them. It doesn’t matter that she has been a governor only for two years and has lesser experience than Obama, she is going to bring in all those women votes for Mccain. By picking a woman they are playing to the psyche, its an added bonus that she is hot and ultra conservative as well which works for lot of republicans.

 

One of my friends told me, in presidential election you just have to pick the lesser of two evils. I would pick Obama if i could vote in these elections.

 

 

No responses yet

Aug 21 2008

Getting Shipping Rates from USPS

Published by under Flex

I have been working on a Flash/Flex shopping cart which uses AMFPHP to connect with OSCommerce and you can manage your cart using OScommerce. 

 

The client wanted to get shipping prices based on the weight and it had to be USPS. It turned out to be a really easy integration, I have used Flex but it would be the same using Flash as well. 

 

The only problem is when you hit the testing server of USPS they expect the xml to be exactly the same as they specify in the examples and also Rate3 API’s don’t work well. Shown below is the simple Flex code to get response from the testing server,

 

<?xml version=”1.0″ encoding=”utf-8″?>

<mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml” layout=”absolute” creationComplete=”sendService()”>

    <mx:Script>

        <![CDATA[

            import mx.controls.Alert;

            private function errorMsg(info:Object):void{

                var data:Object = info;

            }

            private function gotBack(event:Object):void{

                var data:Object = event;

                mx.controls.Alert.show(event.result.Error.Description);

            }

            private function sendService():void{

                var xmlData:String = ‘<RateV2Request USERID=”xxxxxx”><Package                                                                         ID=”0″><Service>PRIORITY</Service>’ + 

                     ‘<ZipOrigination>10022</ZipOrigination><ZipDestination>20008</ZipDestination>’                                     + ‘<Pounds>10</Pounds><Ounces>5</Ounces><Container>Flat Rate Box</Container><Size>REGULAR</Size></Package></RateV2Request>’;

                var requestObj:Object = new Object();

                requestObj.XML = new XML(xmlData).toXMLString();

                requestObj.API = “RateV2”;

                upsService.request = requestObj;

                upsService.send();

            }

]]>

</mx:Script>

<mx:HTTPService id=”upsService” url=”http://testing.shippingapis.com/ShippingAPITest.dll” result=”gotBack(event)”

  fault=”errorMsg(event)” resultFormat=”e4x” />

</mx:Application>

 

As you can see there is not much to it, you just have to use a simple httpservice and the parameters required is the XML and the API. You can request upto 25 rates and the details can be found on the usps site out here.

 

USPS will return an XML even if there is an error and for production you have to move to a different server but the basic things still remain the same. Now only if they would have a crossdomain.xml on their servers, have put in a request for that but i doubt they would be willing to have it. *sigh*

One response so far

Aug 20 2008

Mixed Day of diving this weekend…..

Published by under Diving

Since i won’t be able to dive the next two weekends i decided to take advantage of the excellent conditions and dive this sunday. I decided to go on Great Escape Charters and i loved what the boat had to offer.

 

I reached the pier at about 6.30 am and was pleasantly surprised to see Andrew on board, Ferris was going to be there too so i didn’t have to bother about dive buddies. I love the facilities on the boat, it has nice seating arrangement on the stern and the galley is spacious too. They have an amazing DVD collection, I won’t hesitate to spend a weekend on this boat, too bad i can’t make it for the labor day weekend trip they have. The boat wasn’t only half full so there was plenty on room to spread out the gear and take things easy. My only complain would be having those mugs for water, for some reason i tend to drink less water if there aren’t any water bottles.

 

I found myself a bunk and tried to take a nap since i was really exhausted from all the laser tag games from the previous night and I also felt not adequately hydrated. Didn’t get too much of sleep so i went on the deck and we saw a huge pod of young dolphins. There must be atleast 50 of them, I tried taking pics, will have to see if got them. 

 

We got out pre-dive briefings as we approached the site and there was this old guy who was without a buddy, i wasn’t too keen on buddying up with him but i did nevertheless. He told me that he was an instructor and it was his first time diving in Calif. I felt little more comfortable diving with this guy but at the end of the dive i was pissed.

 

So since he was the instructor out of respect and he being more experienced i asked him to lead the dive, a big mistake. He got into the water ahead of me and went in an opposite direction of the dive site, i didn’t think too much about it then. We dropped to about 70 ft and kept going deeper, I wasn’t sure why was he going deep since the dive site was in about 30 ft of water and on the opposite side as well. I followed him, didn’t have a choice and we soon reached 110 ft. 

 

After 5 mins into the dive i saw his SPG was leaking air so i swam upto him and pointed it out. He said it was fine and we continued the dive, he briefly headed out in the correct direction and we came across a small reef in about 40 ft of water but then suddenly not sure what struck him he headed of in the wrong direction again. After a while all of sudden he signaled out of air and indicated that he was going to ascend. I expected him to take a safety stop at 15 ft and then after a while hit the surface but as soon as i came to 15ft for my safety stop he was at the surface. 

 

Wow, what reckless diving from an instructor, skipping a safety stop after hitting 110 ft and we were at 100+ feet for a few good minutes as well. I completed my safety stop and then met him at the surface, he said he was fine and he just ran out of air. duh!!!! i pointed out that your spg was leaking so you should have monitored your air and immediately moved to a lower depth instead of loitering more at 100+. We could have also shared air and completed safety stop together but he didn’t bother. 

 

I was super pissed at the end of the dive not only did we missed the dive site but also for some reason my camera won’t work in its case. Also I was completely surprised how that instructor acted, it was completely irresponsible on his part. He didn’t bother to ask about my dive experience or my certification level and went to a depth of 100+ without actually bothering to see how i was doing etc. He acted as if he was on his own during the entire dive, why did he want a buddy in that case?

 

Dive 1 Details: 

Max Depth: 112 ft.

Dive Time: 20 mins.

 

I was glad that he decided not to dive again and his SPG was still broken. I was going to buddy up with Andrew and Ferris for the next two dives, boy i was glad or what. I tried opening my camera up and it just wouldn’t budge, for some reason it didn’t want to take pictures when i put it inside the case. So i gave up on the camera and decided to dive without it, wish i had it one me though.

 

For the second dive we moved to a different spot and I got into the water first, Ferris had some problem with the tank so i had wait almost 15 mins but it was no biggie since i was very comfortable in water and i preferred that instead of getting heated up on the deck. 

 

We dove right next to the reef and were exploring it, the usual critters were there nothing too exciting till i found an eel, It was a big moray and as soon as i come little closer it opened its jaw as if trying to intimidate me. It was more like a yawn to me and it seems that they breathe that way too. That was the highlight of the dive and we just explored kelp a lot more. Ferris was having a good time clicking pictures with her brand new camera. I also found another eel, it was hiding in the rocks. There was also a gang of Garibaldis who were going crazy, they were really fighting it out over something and each of them was big. It was fun watching them slog it out so to say. 

 

Andrew found a lobster and was shining his bright light on that guy, it was interesting to watch the lobster react to it, the lobster was kinda curious and also appeared to be confused at the same time, what is this bright thing. It was cool. We finished the dive soon and it was time for lunch. Had veggie burger which was good and we were going to stay at the same spot for the final dive.

 

Dive 2 Details:

Max Depth: 76 Ft

Dive Time: 43 mins

 

Steve, the divemaster was also diving by himself and when he came aboard he mentioned that there were few Giant Sea Bass  (GSB), I was super excited always have wanted to see these huge monsters and today could be my lucky day. Indeed it was. I told Andrew that we need to find these guy and so we decided to stay at about 50 ft and just outside the kelp. It would be little cold but would be worth it. 

 

We got into the water and hit the bottom where i saw a flounder sitting there, i pointed it out to Ferris since she was the one with camera. After that picture Ferris mistook some other divers for us and we lost her. We looked for her for sometime but couldn’t find her. Me and Andrew continued the dive and as we were hanging by the kelp I saw a couple of GSB, i just caught a brief glimpse, the vis wasn’t that great as well. I wanted to follow them but they were headed in the direction of ocean so i decided against it. We explored the kelp more and I was losing sight of andrew a lot in the kelp, it was like a little game of hide and seek. 

 

After a while as i was hanging near the kelp, I saw another GSB this was going into the kelp so i decided to approach it, It was an awesome experience that thing was huge atleast 4 – 5 feet and seemed like 250 lbs easy. After that experience I also saw a kelp bass which was about 2.5 – 3 feet, never seen those guys get so big as well. Found an eel hiding in the rocks as well after a while and it didn’t seemed to be bothered by our presence. I was at 550 psi and so it was time to end the dive soon.

 

Dive 3 Details:

Max Depth: 71 ft

Dive Time: 47 mins.

 

I packed up my stuff, took a shower and it was time for fudge and ice cream, that thing was good. Also earlier in the day there was some sort of sweet bread called as Monkey bread, it seemed as if it was dipped in honey. I totally digged that stuff, couldn’t stop eating it. As usual I went to the bunk and dozed off on the way back home. 

 

We reached early and i was at home by 6.30 pm. Cleaned my stuff and went to ralphs to get water, soon i passed out after having dinner at Taco Bell. A mixed day of diving but nevertheless was good.

 

Finally after today’s experience and in general the more i dive, more i appreciate how well you have taught me Jeanne, thank you hollywooddivers. Now only if you could improve your website 😉

Mean Eel

That is one mean Eel Eyeballing.

 

State Fish of California, Garibaldi

Pictures Courtesy of Ferris.

No responses yet

Aug 18 2008

Living the FOB (Fresh on Board) Student life….

Published by under General

This saturday i took 3 kids shopping to walmart, kids????? by kids i mean new students who have come to USC for their Masters (MS) from India. It reminded me of my MS days as well and the lifestyle back then. This article mainly refers to lifestyle of a typical Indian student who has moved here for his MS.

 

NOTE: Please don’t take this article personally i am not pointing fingers at anyone, it is just a personal opinion and my observations/experiences.

 

I would classify three kinds of lifestyles of a typical desi MS student,

  • Super Stingy (SS)
  • Well Balanced (WB)
  • No Worries (NW)

Above categories would easily describe the way of life of a desi, it can be the way of life not only while being in school but also after graduation. I just want to focus my experiences with student lifestyles while still being in school, mainly during MS. Sometimes its just not possible to change your student lifestyle but a lot of people don’t want to change their thinking/lifestyle even though the circumstances make it possible. Lets take a look at each of the above categories,

 

Super Stingy (SS):

Everything in life is about money, every decision they make in life is about saving money 99% of the times. Saving money is their motto in life. I can understand that USC is an expensive school etc but not everything in life is about money. They would know which place has the cheapest toilet paper or what place serves free food during which time. Being the first in line for free food makes them feel proud and they feel even better if atleast 10 other people take advantage of it because of them.

 

My Personal Experiences:

USC had or still does have an active yahoogroup where free food events are posted so that people canshow up for free food only and don’t care about the event. So this one dude goes for such event which happens to be for LGBT members (Lesbian, Gay, Bi-sexual and Trans Gender), unfortunately for him there is press coverage as well and his picture ends up on the front page of Daily Trojan (USC Campus paper), fun times.

 

Being Indian saving money is a mentality which is in our genes (of course there are exceptions) but this one incident confirmed the hereditary nature of this trait. We (me and my roomies) used to cook almost daily at home, we enjoyed it and cooking turns was fun, so while having a conversation with one of the parents we happened to mention that yes we cook a lot at home and the reply we got back was “So you must be saving a lot of money” grrrrrrrr, come on give us a break. It does help to save money to cook at home but that isn’t the sole reason to do so. Also the manner in which the statement was made was very offending and gave us an idea of the mentality of that person.

 

There have been a quite a few instances where is have seen SS at work but i shall not go further into it, I am sure you get the idea.

 

Well Balanced:

Save money and spend it wisely. People in this category like to visit places, would rent a car and go out have a good time while not making a huge dent in savings and things like that. A better paying on campus job certainly helps to maintain a WB lifestyle. Quality of groceries takes priority over cheaper ones and little things like these matter over money.

 

My Personal Experience:

Our lifestyle, 4 of us bought a car together to roam around and visit few places, the car was an idea which came to us after 9 months since everyone had a good on campus job it was affordable. It wasn’t an expensive car but it did take us around. Groceries would be done from Ralphs and not from Superior or any other place. 

 

No Worries:

Money is not an issue and spending it is even easier, if you run out of it just ask your folks from India to send some more. Very few people fall in this category but there some chosen ones. Eating food outside all the time, not worrying about trying to find on campus jobs and things like that define them.

 

My Personal Experience:

I have seen a people like that who tend not to work on campus or for that matter work less so that they can “concentrate on studies”. Eating outside was a routine for few since they didn’t want to deal with hassle of cleaning the dishes afterwards and things like that.

 

I am sure you can find contradictions to everything i have mentioned above and argue with me on it. There are always circumstances beyond one’s control which forces you to do things as well. I am also not criticizing anyone or maybe just a little for SS but ultimately it is upto that individual to live their life and its their decision not mine.

 

At Walmart I saw someone with a notebook noting down the prices of items he was interested it, I think it was for comparing the prices at different stores and picking up whatever is cheapest from whichever store. I didn’t know how to react, but it was understandable since being a new student you are still converting $ into INR but if after a year in MS or getting a full time job if that person does the same thing then i would certainly feel sorry for that person.

 

3 responses so far

Aug 15 2008

Turning into a NRI (Na Raha Indian)??????

Published by under General

Today is India’s 61st Independence day and i was reminded about it by a friend. It has also been over 5 years now since i moved to USA and i have been to india only once during those 5 years. 

 

Since i moved out here i have realized that the festivals like Diwali, Holi, Navratri etc don’t really mean the same to me as they did when i was back home. Am i being unemotional or its just that living this country doesn’t evoke the same excitement in me about these things anymore. It is really hard to explain but most of the festival days are like any other day to me there is nothing special.

 

Not that i would do something special but in India when i would wake up on independence day, atleast i would realize that is independence day and stuff you know, but here its like any other weekday. Of course you would expect that since its not US independence day but then at the same time if there are any celebrations out there, i just don’t attend them. Maybe there aren’t any parades out here in LA as they happen in NY or New Jersey which makes it different. 

 

Also whenever people celebrate festivals its usually on weekends because no one has time during the weekdays to get everything organized and people won’t simply attend those functions on a weekday. It is a matter of convenience over significance , ofcourse celebrating things on a different day doesn’t lower the significance or maybe it does, I will let you decide that.

 

Personally for me no matter what the enthusiasm or the excitement just isn’t there, call it being unemotional, cold or maybe i am just turning into an NRI…..It is a sad thing but for some reason i just can’t help it.

3 responses so far

Aug 11 2008

Diving Catalina..

Published by under Diving

I decided to head out this sunday on Sundiver diving Catalina. It was supposed to be a clear sunny day and it definitely turned out to be one. The previous night i had met up with paras, miril and diti for dinner and then had ice cream at Mashti Malone. I was really stuffed that night and it was a good thing.

 

Woke up at 4.30 am and because of previous night heavy dinner i didn’t feel like having anything for breakfast. I left at about 5.45 am and the usual ramp on sunset for 101 was closed so had to take a detour but managed to reach the boat at about 6.40 am. The boat was going to be full.

 

After completing the usual paperwork etc, i found myself a bunk and tried to take a nap since i had like 3-4 hours of sleep the previous night, but i wasn’t able to sleep. Got up, had something to eat and drink and then it was almost time to get ready. I saw that we were getting closer to island and going in direction of two harbors. At first, we were planning to dive a place where the bat rays were supposed to be in plenty but then we moved to a different spot for some unknown reason. The water was crystal clear with vis upto 70 ft.

 

Dive teams were being created so to say since there were some who were diving for the first time in cold calif water and i was supposed to tag along with Andrew and a group of 5 more people. The heat was intense and i was starting to sweat in my wetsuit so i decided to get into water as soon as possible. Some people decided to take off their hoods since the water was 70F on the surface which was surprising. I got into the water and it surely felt good, i wasn’t hot anymore but wasn’t cold at all, just comfortable. It took a long 10-15 mins to get the entire group together and for some reason i thought my dive light fell off. Andrew asked to me dive down and look for it so i went in by myself while keeping an eye on the gang.

 

I started looking for my light but after a while i realized that it was attached to my BC, bummer and i also lost Andrew and rest of the gang. i decided to go Solo and explore the reefs by myself. The kelp was thick and there was no way that i would have found those guys but back in my head i was thinking what if they are looking for me or something but i was wrong about that. Andrew figured i would be fine on my own so he didn’t bother to look. I found lots of bugs and the usual critters and while i was looking for something i came across a Scorpion fish by chance. I always wanted to find those things since they are really well camouflaged and today was my lucky day, i found couple of them on this dive and all of them by accident.

Scorpion

yes that is a fish.

revealing its true colors

It blends really well.

School of Fish

Since i wasn’t sure whether or not those guys were looking for me, I decided to end my dive early though i had like more than 900 psi left in my tank and could have gone for another 10 mins. I saw a group of 6 and thought it must be andrew n gang but it was others. I finally found andrew and ferris during their safety stop and i also stopped along with them.

 

Dive 1 Details:

Total time: 44 mins 

Max Depth: 44 ft

Buddies: None

 

People were getting warm with their hoods and 7 mm suits so some of them were diving without wetsuits. I contemplated taking off my hood but decided against it. We were going to be anchored at the same point since the conditions were so great and this time for the dive it was just me, andrew and ferris. The rest of the gang were comfortable and diving on their own. Jumped into the water and we decided to head in a different direction this time, with Andrew leading and me being the last person. I was going to be slow since i would get caught up taking pictures. Few mins into the dive as we were exploring the reefs, Ferris had stopped and was pointing me to something. It was a horn shark resting and it was quite big as well about 3-4 feet i suppose. Took a few pictures and then continued on, saw lots of lobsters again, quite a few rock fish and a big cod resting. The algae forest closer to the shore at about 12-15 feet was very colorful with some lavender growth. It was really pretty. We did little more exploring and i was trying hard to find some nudibranches but they weren’t to be seen anywhere. It was a good dive nonetheless. For some weird reason my mask was really bothering my during this entire dive, i had to clear it every couple of mins.

The plant life

Forest

The underwater forest

The Horn Shark

This it the lavender plant.

Dive 2 Details:

Total Time: 44 mins

Max Depth: 36 ft

Buddies: Andrew and Ferris

 

It was time for lunch and there were no veggie sandwiches for me but there were some spinach pizzas which were good enough for me. For the last dive we moved across two harbors and came to place called Africa rock or something like that. This was the place where the boat captain Kyaa had her students see some crazy Bat ray behavior so i was hopeful of seeing them this time. Hilary needed a buddy so i decided to go along with her, I was going to lead and she wanted me to go really slow so that she could explore things and have more time to look around. I was fine with it since i wanted to find some nudibranches myself and take few cool pics. Also she wasn’t sure about her navigation and I am not that bad myself so that was another reason for me to lead the way. The vis out here wasn’t as great as the earlier spot but it wasn’t too bad either. It was in 25 – 30 ft range.

 

We decided on a general direction and then dropped down, Hilary had some problems clearing her ears initially but managed to clear them and so we continued our dive. I was looking out for anything colorful and bright but couldn’t find anything at all. No nudis during the entire dive. The reefs were abundant in life with the usual critters, lots of bugs aka lobsters. Also managed to find a scorpion fish on this dive, at 40 feet I was getting bit chilly and 20-25 mins into the dive Hilary told me that she was also feeling cold. On the way back i wanted to go along the edge of the reef since that was the place where the rays would hang out but since both of us were little cold i decided to go to a shallow depth and explore the reefs again. No luck with the rays or the nudis. Hilary had about 990 psi left and myself about 800 so i decided to continue a bit longer with the dive but after a while hilary signaled that she was down to 800 and wanted to end the dive. We took our safety stop and then swam back to the boat, we didn’t wander that far and it was a short surface swim to the boat.

Love this picture, was from the previous dive.

Sea Fan, Juvenile Garibaldi and Star Fish

Dive 3 Details:

Total Time: 48 mins

Max Depth: 43 ft

Buddies: Hilary

 

I packed up my things, took a shower and was ready to crash as soon as possible but not before i had that awesome yummy chocolate cake. I slept the entire way back, it was almost 7 pm by the time we docked. Almost forgot to take the camera out of the camera bucket, if it wasn’t for Ferris reminding me about it. She gave me her email address so that i could send her the pics. Reached home at about 8ish and then the usual cleaning up of my gear etc.

 

It was a satisfying day of diving even though i didn’t see bat ray or nudibranches but there were plenty of lobsters and saw a few scorpion fish.

3 responses so far

Aug 08 2008

Understanding Scale 9 grid for Flex

Published by under Flex

This article is for my reference as well because i always confused what co-ordinates i should use to specify the scale 9 grid i.e, upSkin: Embed(source=”../assets/graphics/combobox/ComboBox_upSkin.png”, scaleGridTop=”7″, scaleGridBottom=”10″, scaleGridLeft=”7″, scaleGridRight=”106″);

I use the above skinning method a lot and hence need to completely understand how to specify the co-ordinates to scale the graphic to any extent.

 

If this all doesn’t make sense then i would ask you to read this article, it is awesome article but i was totally confused on how to find the correct co-ordinates for scaling. 

 

Finally after lot of trials and errors i managed to get it right and understand it. I am going to show exactly how i calculate it. Take a look at the following picture,

 

I am selecting the same fancy_border.png from the Adobe site and i am trying to find a rectangular region in the center which if scaled is not going to affect my image. This region begins at 53,54 and is 215×82.

 

So now i need to assign my scaleGridTop, scaleGridBottom, scaleGridLeft and scaleGridRight from the above information,

 

scaleGridTop is the y position of this rectangle i.e. scaleGridTop=54

scaleGridBottom is the y position of this rectangle plus its height i.e scaleGridBottom=54+82

scaleGridLeft is the x position of this rectangle i.e scaleGridLeft=53 and finally

scaleGridRight is the x position of this rectangle plus its width i.e scaleGridRight=53+215

 

so for the above image embed tag would like,

  [Embed(source=”../assets/fancy_border.png”,
scaleGridTop=”54″, scaleGridBottom=”136″,
scaleGridLeft=”53″, scaleGridRight=”268″
)]

 

Flex scales this rectangular region when it scales the image, so your rectangle should be selected such that any distortion to this region won’t affect your original image. Also this rectangle will determine how much smaller your image can get without distortion, if you select a small rectangular region then you won’t be able to downsize your image.

 

Hope this article makes the scale nine implementation in Flex more clear. Here is a swf file for you all to play with it applies two different scale nine grids to the same image and you will see the difference how it affects the downsizing of the image. 

EDIT: 01/15/09

Using 0 in the scaleGridTop doesn’t work, you have to use 1. I don’t know but it seems to be the case.
 

Click here for the source.

 

 

10 responses so far

Aug 06 2008

Price of Reaching the Summit

Published by under General,Mountaineering

I read about the recent tragedy to strike the mountaineering world on K2, 11 climbers lost their lives and few suffered from injuries. It was a very unfortunate incident and something we can all learn from

 

The climbers had a very excellent window of opportunity to scale K2 and it would be very difficult for any individual to resist the urge to get to the summit no matter what, specially when they had waited a long time for that window to open. When they found out that the fixed ropes were in wrong places and they had to move them. It took them a long time to do so and also some of the climbers returned since they didn’t trust the ropes anymore. The entire climbing party could have returned but they wanted to make full use of that small window of excellent weather. They reached the summit but it was about nightfall, its really hard to believe why would someone want to reach the summit of a mountain regarded as killer peak so late.
 
you can read complete account of the tragedy in this article,

Article which gives account of survivor

http://thelede.blogs.nytimes.com/2008/08/05/tales-of-chaos-and-survival-on-k2/index.html?partner=rssnyt&emc=rss

http://www.belfasttelegraph.co.uk/news/local-national/fears-k2-team-were-consumed-by-summit-fever-13930275.html

 
Many accidents happen because people always try to push themselves without realizing their limits, i am tempted to use the word most instead of many here, this is not limited to mountaineering but to every day life in general. you won’t drive an old badly maintained car at speed of 100 mph on a freeway would you????? Heck, i wouldn’t even go past 75 mph now in my 98 Sentra, give me a 08 BMW and its a different story :D. Its the same concept that can be applied to any adventure sport. Divers shouldn’t dive to depths beyond their limits or Rock climbers shouldn’t lead climbs rated way beyond they normally lead and so on.

 

http://tvnz.co.nz/view/page/536641/1977025, Reinhold Messner mentions how one of his client wanted to go higher on the peak even he wasn’t in any shape to do so. The same problem caused the Everest disaster which Jon krakauer mentions in his book Into This Air. When someone pays 50-60K for an expedition I am sure they want their money’s worth out of it but at what cost?. Losing your feet or fingers to frost bite isn’t worth any amount of money nor is your money going to be of any use to urself when you die. 

 

The mountain is here to stay, another attempt to get to the summit can be made, its definitely not worth something to die for. I have abandoned my summit attempt of Mt Stok Kangri 6155m because i was not in any position to reach the top, if i had continued i would have been at summit at around noon or maybe later, something i wasn’t ready to do. I wanted to reach summit before a certain time and i didn’t so it was time to turn back.  I hope i keep following the same principle on all of my future attempts on any peak.

One response so far

Aug 03 2008

Opening popups from text links

Published by under General

I already have a post which shows how to open popups using getURL or navigatetoURL (this is the link) but what if you want to use html text to open a popup in Flash. Firefox blocks those popups and you cannot do anything about it, but there is a solution using javascript.

 

The trick is using javascript in href tag instead of normal http link, for eg, lets say you want to open http://www.nayansavla.com/blog, the normal code for html enabled text box would be,

 

sampleText.htmlText = “<a href=’http://www.nayansavla.com/blog’> My Cool Blog</a>”;

 

The above link might not work in all browsers, the solution to make this link work would be using javascript and External Interface. First we modify the link as shown below,

 

sampleText.htmlText = “<a href=’javascript:openwindow(” + “\”http://www.nayansavla.com/blog\”” +”)’>My Cool Blog</a>”;

 

Also we add few lines of extra code in our Flash file,

import flash.external.ExternalInterface;

ExternalInterface.addCallback("callGetURL",this,callGetURL);

function callGetURL(url:String){

getURL(url,"_blank");
}

 

The basic idea is we will first try to open a window with javascript but then if that fails we will call this function callGetURL using ExternalInterface. The javascript function openwindow looks as shown,

 

function openwindow(pageUrl) {
var winName = Math.round(9999*Math.random()) + new Date().getTime();
var winNew = window.open(pageUrl,winName,"toolbar=1,scrollbars=1,location=1,statusbar=0,menubar=0,resizable=1,width=800,height=700,left=200,top=100");
if(!winNew) {
if(navigator.appName.indexOf("Microsoft") != -1) {
//href is the id of the flash element
window.href.callGetURL(pageUrl);
}else {
//href is the id of the flash element
window.document.href.callGetURL(pageUrl);
}
}
}

So now if your javascript doesn’t open a popup, flash geturl will :D. hope this helps. This doesn’t work with Firefox 3, will have to look more into it. Also on further looking into this, it displays inconsistent behavior in Firefox. :(
 

 

No responses yet