Wednesday, March 26, 2014

Options Oracle issue: Current configured preferred server is not available

Last updated on 17-Jun-2017

If you are an options oracle user and you are getting one of these weird error with Options Oracle as soon as you launch it, A simple fix is suggested below.
Error Message"Current Configured Preferred Server is Not Available. Using 'PlugIn Server US (CBOE)'

Fix
Simply extract the plugin file (link provided below) to your %appdata%\OptionsOracle folder (Create one if you don't have it already there) and run options oracle. Hurrah the error is gone and you will now be prompted to update plugins as well. You should also be able to see the list of plugins available in the configuration option. Enjoy!!!

Problem: Problem is with the plugin file hosted by Samosky. It has a space missing in its plugin xml file which causes issues with the plugins (e.g. NSE)

File as updated on 02-Sept-2013

NOTE: Please enter ^NIFTY as the symbol for Nifty. Lots of people are entering incorrect symbol which is why they don't see the data.

Download
https://bitbucket.org/sandeeprawat/optionsoraclense/downloads/plugin.zip

Use option Oracle from here:
https://bitbucket.org/matsol/optionsoraclense/downloads/RELEASE_1.0.0.zip (Disclaimer: Not hosted by me. Got this from Traderji Group but tested and working)
--------------------------------------------------------------------------------------------------
Update 27-Mar-2014
People have reported issues with the software after NSE upgraded their site templates, so previous version may not work for downloading data for NIFTY. I have tried a quick fix for ^NIFTY and you can download the updated file at the following location (Thanks to the original uploader matsol)
https://bitbucket.org/sandeeprawat/optionsoraclense/downloads/OptionsOracle%201.6.1.zip

Update 17 Jun 2017

Download the Options Oracle from this location
https://bitbucket.org/sandeeprawat/optionsoraclense/downloads/OptionsOracle%2017-Jun-2017.zip

Please note:

  1. only ^NIFTY is working. Don't know about other symbols. Will try to take a look later.
  2. Not sure about the data correctness. Please verify and report an issue with screenshot if you think its incorrect 

--------------------------------------------------------------------------------------------------

Any issues with the options oracle or plug-in file, file a bug below I'll try to fix them as soon as possible.
https://bitbucket.org/sandeeprawat/optionsoraclense/issues


Sunday, March 09, 2014

Bug with Google search

Google search in general return provides correct answer to the question you ask it but I just discovered a bug with it

If you search for "who was the CM of up in 1992" it tells you VP Singh where as the correct answer should be Kalyan Singh. It incorrectly tells you about the CM of UP in 1982 (PM in 1990).

image
Hope someone from Google will take notice and will get it fixed. It sure is misleading.

and WTF

Saturday, January 11, 2014

Visual Studio Online available in Windows azure

Windows azure has introduced a great new feature called “Edit in Visual Studio Online”. This feature brings great power of Visual Studio IDE to your browser. Earlier you could edit your website only from your workstation but this new feature will allow you to edit your site from anywhere in the world.

Enable it on your Azure Dashboard Configure section

image

After enabling it go to your dashboard and you will see a new Edit In Visual Studio Online link available on your right menu bar

image

Clicking on the link will take you to the online editor, where you can edit your code. It will allow you to work in your favorite IDE.

image

Not only you can edit your files here but you could also do file operations with the help of Console tool available. Just select console from the left toolbar. It is much easier to move/copy file here in this environment then trying to do it with the FTP client (I use FileZilla). It also allows you to unzip file so in case you need to quickly deploy something you can just upload a zip file and unzip using the console (It used to take me a lot longer to upload a website earlier now I just upload the wordpress/drupal zip and extract it online)

image

Kudos to Azure and VS Team for this excellent feature.

Friday, May 31, 2013

Beautiful and mesmerizing Maldives

DSC_0057DSC_0312DSC_0318DSC_0321DSC_0367DSC_0646

Maldives, a set on Flickr.

Pics from my last trip to Maldives. It's a nice, very hospitable and beautiful country.

Tuesday, April 02, 2013

Solution: Virtual Drives not working in Windows 8

If you are having problem loading Virtual Drives on Windows 8 (most probably after you upgraded from Windows 7 to Windows 8), the following should solve the problem.

  • Open devmgmt.msc and see if you have yellow warning icon in front of your virtual drives. Try to reinstall the driver for them and see if it fixes it.
  • If it doesn't then uninstall the drivers. Goto HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E965-E325-11CE-BFC1-08002BE10318} and delete the following values
    • UpperFilter
    • LowerFilter
After deleting these two registry values, you should be able to see your virtual drives in the explorer. These keys created problem for all my native virtual drive and also with the CloneDrive. I had tried uninstall/reinstall of clone drive many a times but in the end it's the registry that always helps.

Reference: http://technet.microsoft.com/en-us/library/cc772156(v=ws.10).aspx 

Saturday, March 02, 2013

Rising Petrol price in India under UPA Govt


Lol...
Courtsey: TheekHai Dr. Manamohan Singh and Sonia Gandhi
Source: https://www.facebook.com/swami.ramdev

Friday, February 22, 2013

Proof that excessive sunburn makes your skin darker.


Proof that excessive sunburn can permanently color you black.

Look at the dog sleeping in the shade, it's still white while the one sleeping in the sun became dark.

Sunday, January 27, 2013

0x80070422 while deploying application to Windows Phone device

I’m developing an application for my Windows Phone 7 and today I got an error when I was finally ready to deploy my application on my Phone. I hit deploy and whoa I get an error that “WP7 - Zune software is not launched. Retry after making sure that Zune software is launched.” Sure Zune was opened and connected to my phone alright. It did sync and stuff but still no luck.

Luckily I found about WPConnect.exe found in your “C:\Program Files\Microsoft SDKs\Windows Phone\v7.1\Tools\WPConnect\x86”

Running this again gave ne the same error but at least with an error code 0x80070422

Now we have a little bit more information so I was able to identify the solution.

Due to my very slow system I’m working on I had disabled all the unused System Services and one of them was “zune windows mobile connectivity service”. This Service is used by Visual Studio to connect to your Windows Phone 7.1/7.5 and restarting it fixed it.

So in short if you get an error stating error code 0x80070422 or “WP7 - Zune software is not launched. Retry after making sure that Zune software is launched.”  one of the first thing you should try is to enable and start “zune windows mobile connectivity service”

 

Will be posting my app to Windows Phone Marketplace very soon.

Sunday, January 20, 2013

Choosing a CMS for your website

One of the first and most difficult question while you are planning to build your own hosted website is “which CMS to use for my blog/website”. Googling for the best CMS doesn’t help either as all people have their own expertise and comfort level with their recommendation. I too have my bias towards the CMS I chose but since I had no particular experience with any of the CMS I have tried and I’m building it from ground up, it’s applicable to all newbies (I’m primarily a .Net developer so I haven’t worked with other php based CMS and mainly looking for a .Net CMS, people preferring php should use some other reliable resource).

I have tried Wordpress, Joomla, Drupal, DotNetNuke, Kentico, Blog.Net and blogger of course (had tried several others but don’t remember their names). I’ve given them a try multiple times but for one reason or another always comes back to the following two.

  1. Wordpress, and
  2. Orchard

Wordpress is one of the best CMS out there, mainly a blogging platform but can easily (and I mean really easy) be extended for website purpose. There are so many themes and modules out there that it simply doesn’t make sense to choose any other if you don’t want to customize via code (which is not a problem if you are a php developer). I prefer .Net so I chose Orchard over wordpress but on every other aspect it’s simply perfect, fast and extensible. You can customize it the way you want and most of it is available from admin interface.

Orchard is ASP.Net/MVC based CMS from Microsoft. It is being actively developed by a very talented team and I’ve seen a lots of improvement over the time in Orchard. Installation is simple. Developing a theme is also easy and you can easily build modules for Orchard (I ‘m still learning it but it’s really good).

If you are looking for a easily setup and extensible CMS for your website, choose one of these two without blinking. They are worth their cost which is free Smile. I love freebies.

For simple blogging purpose blogger.com is also a very good choice. You don’t need to host buy a hosting space for your blog and it allows you to use custom domains (which is a disadvantage for wordpress free hosted blogs).

One CMS I would dis-recommend is DotNetNuke. It’s cumbersome, slow and not very user friendly (my personal opinion ofcourse). It’s highly commercialized and developed in VB.Net and you’ll find a lots of paid modules for DNN as well but since I like freebie I dint find it good. Also it was too slow for my taste when I last tested it (I’ve been using it on shared hosting so that could be a reason for slowness but I can’t afford costly servers not now) so it’s a no-no for me.

Recommendation: No brainer Wordpress (non-developers or php developers)/ Orchard (.net developers)

 

If you are using Orchard I’d highly recommend TheThemeMachineResponsive theme. It’s a simple responsive theme from the Orchard developers. I’m using it on my beta portal http://backup.sandeeprawat.com which will soon replace my primary domain http://www.sandeeprawat.com

[Update] Forgot to mention another CMS which is very good, light-weight and .Net based. N2 CMS is also very nice to work with. Had worked with it and is very easy and powerful.

If you are bored, sharing a nice song from a very talented singer Rabbi

Challa by Rabbi

Tuesday, May 29, 2012

Lambda closure and compiler generated code in C#

I came across an interesting problem today.

In our WPF application we are heavily using unity and prism framework and we build pieces of application using unity IModule interfaces. We also make use of EventAggregator.

Now we had a perfectly fine piece of code that was working without any problem so far until today. Here is the code snippet

Note: this is only a sample code to illustrate the problem.

class MyModule:IModule
{
void Initialize(IEventAggregator aggregator)
{
Parameter param = new Parameter();
aggregator.GetEvent<MyEvent>.Subscribe(
() => {SomeStaticMethod(param);});
}

public static void SomeStaticMethod(Parameter param1)
{
//Do Something
}
}


So far so good. Now one of my collegeue made a small change to the code.



class MyModule:IModule
{
ISomeType someTypeObj;
void Initialize(IEventAggregator aggregator, ISomeType someTypeObject)
{
someTypeObj = someTypeObject
Parameter param = new Parameter();
aggregator.GetEvent<MyEvent>.Subscribe(
() => {SomeStaticMethod(param, someTypeObj);});
}

public static void SomeStaticMethod(Parameter param1, ISomeType someTypeObject)
{
//Do Something
}
}


 



I guess you can see the small difference. We just added a new parameter to the method call in our lambda and whoa our application stops working…



Looking at the change doesn’t give a clue. Why the heck it stopped working with a small change.



Here reflector came to our rescue. After fiddling with our debugger and looking at the reflected code we figured out the issue and it was a very interesting find.



Previously we were only calling a single static method in our lambda and passing a local variable, hence compiler optimized the generated code and produced a static method for our lambda. In the second case though we passed an instance variable and hence generated method had to be an instance method.



Now you must be wondering what difference does it make. But it does when you are using it inside IModule and lambda is used by EventAggregator. By definition IModules are short lived and unless there is a reference to the Module object, it will be garbage collected. Secondly, EventAggregator by default keeps a weak reference to the event handler in the aggregated list. So now since my Module is dead so is my event handler. This event handler was doing stuff, which was life line of my application and hence it went dead too.



Learnings:




  • Compiler does and will optimize anything it wants to and it wont ask you.


  • Test your code thoroughly event when you think it’s a small change.


  • Debug, Debug, Debug…….



Sunday, February 26, 2012

Load Historical EOD chart of NSE stocks from Yahoo finance into Ninja Tr...

You can use Ninja Trader to view historical charts of NSE stocks free of cost. It allows use of free Yahoo finance EOD data. Here is a video showing how to use TCS chart from Yahoo finance. It also supports Goog finance but there is no way Yet to load it into Ninja trade (at least I couldn't get it to work).

Saturday, January 14, 2012

Argument between Passengers and Airport Staff over mismanagement - IGI A...



For some reasons this video seems to be getting lots of hits in the youtube, so just sharing it on my blog as well. Well just to update my blog..

Thursday, January 05, 2012

New year’s resolution

Courtesy: Lets laugh a bit

Sunday, December 18, 2011

Shocking but true brutal egyption police.



What is this? Aren't policemen ashamed of what are they doing? (Egyption Police). This kind of brutality can't be tolerated in a civilized world.

Tuesday, December 28, 2010

Goto – Good or evil?

Found a good article on the use of goto statements in the languages while, I was following up with posts on stack overflow. Here is a stack overflow post named Goto still considered harmful. It has some interesting discussion but I also found two articles by two great computer scientists discussing it in detail.

  1. Dijkstra's Letters to the editor: go to statement considered harmful
  2. Structured Programming with go to Statements
They have some interesting facts and information as to where goto is good and where is it harmful? A good reading nevertheless.
Beware Winking smile
Visit XKCD for more comic.
Linus (Linux Fame) also had something to share on goto here

Friday, December 24, 2010

Torrent Finder Domain Seizure

Copied from: [http://torrent-finder.info/torrent-finder-domain-seizure.php]

On Thursday, the 25th of November 2010, the Torrent Finder domain ( www.torrent-finder.com ), registered with Godaddy, was seized by the U.S. Immigration and Customs Enforcement (ICE) without any prior takedown notice or specific allegations of infringing activity. The Domain IP was suddenly changed without the registrar's knowledge and the system displayed a "Pending Registry Action" message on the domain's status. No contact was given until Wednesday, the 1st of December, when Godaddy replied to my inquiries, giving a contact for an ICE agent.

On Thursday, the 2nd of December, David Snead who is representing Torrent Finder contacted the ICE agent in charge who told him that "the orders are under seal, but that the seal will be lifted today or tomorrow". However, we have not heard from them until writing this post. Another email from Godaddy clarified that the action was taken by VeriSign: "please understand that these actions were taken by Verisign at the Registry level; and not by Go Daddy". The story was first reported on TorrentFreak and NYTimes.com.

Torrent Finder is a meta search engine that searches other search engines through iframes redirecting users to other domains and websites that Torrent Finder does not manage or control; most of the sites are suggested by Torrent Finder users through URL suggestion form. There have been many explanations about the mechanism of Torrent Finder Search on the media and how it works just like Google or Bing despite that Google does link to .torrent files directly. "So, when is the U.S. Government going to seize the Google domain?" Inquisitr.com asks. And Torrent Freak writes "When a site has no tracker, carries no torrents, lists no copyright works unless someone searches for them and responds just like Google, accusing it of infringement becomes somewhat of a minefield - unless you're ICE Homeland Security Investigations that is" and many others ask the same question, for instance Techdirt and Technobuffalo.com.

For more visit: http://torrent-finder.info/torrent-finder-domain-seizure.php

 

Support electronic freedom, fight censorship. Like the torrent-finder facebook page and spread the news.

Saturday, December 04, 2010

Funny–Indian Youth Education Series

Random TV Presents Mahilao se Baatcheet : Ek Margdarshak (how to talk to the ladies – A Guide)

How to talk to the fairer sex. A guide for the Indian Youths

 

Credit goes to the original uploader.

Monday, September 27, 2010

SharePoint–Preventing CSRF using dynamic canary

As you are aware SharePoint uses a FormDigest to prevent common CSRF attacks.

A Good article on SharePoint XSS and AllowUnsafeUpdates can be found here.

In a relatively obscure scenario you may want to call a SharePoint page asynchronously using AJAX. If so you will want to prevent CSRF attack on the target page and call SPUtility.ValidateFormDigest. But how to provide form digest to this page?

Simple! Just add a __RequestDigest variable to the Post request and call the TargetPage. Don’t forget to include a formdigest control on the TargetPage though or inherit from SharePoint master page.

var canaryValue = document.getElementById('__REQUESTDIGEST').value;
request.Send("__REQUESTDIGEST" +canaryValue+someFormData)
This code is assuming you are making the AJAX call from a SharePoint page which already includes a RequestDigest field and you can use this value to post to the Target Page.


Another method to get the request digest is to call GetUpdatedFormDigestInformation method on Sites.asmx webservice.


As an alternative of sending RequestDigest field in the Post Data, you can set the X-RequestDigest header on the web request to the Request Digest value and validate the FormDigest on Target (Couldn’t get it work for the ASPX pages. Works for WebService I believe).

request.SetRequestHeader("X-RequestDigest", canaryValue); 

Monday, September 20, 2010

Behind the Code - Anders Hejlsberg

Behind the Code with Anders Hejlsberg



Recommended C# Books

  • The C# Programming Language - Anders Hejlsberg
  • C# in Depth - Jon Skeet

Saturday, August 28, 2010

Comic - Engineering Process

Disclaimer: The intent of this comic strip is pure fun. No harm is intended to anyone.

Artist: Alone Dreamer

 

 

 

Copyright: Do not hotlink to the above images and Do not replicate the graphics without the prior permission of the author.

 

Google Analytics

Popular Posts

Powered by Blogger.