Thursday, April 23, 2015

Social sentiment on #NetNeutrality

I've been harvesting social conversation on #NetNeutrality, now its just a day to go before TRAI's deadline for comments by public ends. Here is a 3 hr snapshot looks like,

Cheers, StaticFix
PS. I’m using Power BI (viz)/MongoDB (data store) combination.

Friday, February 27, 2015

Convert EPOCH timestamp to MSSQL (TSQL) timestamp

Easy conversion by below multiple dateadd calls is the only option available

select dateadd(ms, cast ([Column Name] AS BIGINT)%(3600*24*1000), dateadd(day, cast ([Column Name] as bigint)/(3600*24*1000), '1970-01-01 00:00:00.0'))
from

Note: Assuming [Column Name] is imported in varchar format

Tuesday, July 1, 2014

Data storytelling with Power BI


With open data and Power BI (Excel 2013)



Wednesday, March 17, 2010

Online JSON editor

Found this one helpful, so sharing an online JSON Editor here http://braincast.nl/samples/jsoneditor/

Also has a quick XML to JSON converter

Wednesday, January 13, 2010

Real Download Speed...

Well to be frank, you cant find real download speed using any speedometers out there! Yes, that's a fact and you got to first believe it.

Now technical facts, how is download speed computed. Most of you know this, but for others.

Speed is calculated based on file size and time taken, simple division and that's it(tolerance or overhead multiplied by your ISP yes is different factor - smile)

So now after you do your speed test, read the disclaimers / FAQ's also. You will see lots of reasons (and true) for variations in results, like location of servers, simultaneous download (say your torrent download in progress and doing speed test), bandwidth used by another program running in background likewise.

Why am i writing, coz i am also building a similar simple speed test tool with a 'twist' in logic ;), for the product i am working :)

Here all links for speed test programs I checked out.

http://speed.airtelbroadband.in/
http://us.mcafee.com/root/speedometer/test_0150.asp
http://www.tracert.org/bandwidth_meter/
http://www.whatismyip.com/speedtest/index.asp
http://www.speedtest.net/
http://www.bandwidthplace.com/
http://www.zdnet.com.au/broadband/speedtest.htm
http://www.my-speedtest.com/
http://assistenza.libero.it/angolo_pc/speedtest.phtml
http://www.cyclops.it/ADSL/
http://myspeed.visualware.com/uk/index.html
http://www.thinkbroadband.com/speedtest.html
http://www.speedtest.ch/it/
http://www.speedtest.bbmax.co.uk/
http://meter.mclink.it/applet.html
http://www.broadbandchoices.co.uk/speed-test.asp
http://www.speakeasy.net/speedtest/
http://www.dslreports.com/speedtest
http://www.bandwidthplace.com/
http://infospeed.verizon.net/speedtest

Happy New Year!

Thursday, November 26, 2009

Regular Expression - Nice guide

Check the link, found this article really nice

Thursday, October 22, 2009

Remedy Integration - Common Operations

This section want to give create ticket operation / step

CREATE TICKET

Will let you create a ticket on a particular form of the Remedy Server with the fields you has populated.

// creates entry
Entry entry = (Entry)entryFactory.newInstance();

// populates context into the entry - from last posting (Create Context)
entry.setContext( context );

// set the name of the form name
entry.setSchemaID( new NameID( ARS_FORMNAME ) );

// This is an array of EntryItem, which contains the number of
// fields to store to Remedy. Assume there are only two fields.
EntryItem[] entryItems=new EntryItem[2];

// assumes the field ID is 100 for this field.
entryItems[0] = new EntryItem(new FieldID(100), new Value (“some value”));

// assumes the field ID is 2 for this field.
entryItems[1] = new EntryItem(new FieldID(2), new Value(“test value”));

// set the entry items to the entry.
entry.setEntryItems( entryItems );

// creates the ticket in remedy
entry.create();

// releases memory used by this entry.
entryFactory.releaseInstance( entry );

I hope this serves like a beginners remedy integration tutorial, next post will be on update and retreive tickets.

Monday, October 19, 2009

Remedy Integration - Common Operations

You can call it step 1 of remedy integration with your application (using Java API, C, .NET API's are also avaiable)

CREATING CONTEXT

This operation / step is to set a context which consists of server ip, port number, user name, password and so on. Fill in the details accordingly

// Remedy Server IP
public static String ARS_SERVER = "";

// Remedy Port Number
public static int ARS_PORT = "";

// Remedy RPC number, usually 0
public statis int ARS_RPC = "";

// Remedy Language, usually blank
public static String ARS_LANGUAGE = “”;

// Remedy Form Name
public static String ARS_FORMNAME =”SAMPLE_JOE_FORM”;

// Remedy User ID
public static String ARS_USER = “joelj”;

// Remedy User Password
public static String ARS_PASSWORD = “mypass”;

ARServer context = new ARServerUser(ARS_USER, ARS_PASSWORD, ARS_LANGUAGE, ARS_SERVER);

Util.ARSetServerPort(context, new NameID(context.getServer()), ARS_PORT, ARS_RPC);

Following posts will talk about Creating, Updating and Retreiving remedy tickets.

Make sure you create a sample form in your (dev) remedy server to play around.

Tuesday, October 13, 2009

Remedy Integration - Common errors and issues

MessageNum: 90
Message not in catalog; Message number = 90
RPC: Rpcbind failure - RPC: Timed out

If you are getting errors above while integrating your app with Remedy then you should
continue reading.

Default, Remedy API calls underneath C API which uses RPC to communicate to the Remedy server.
It would not cause any problem if our software and Remedy server are loaded in the same machine or
there is no firewall or any kind of device that blocks the RPC communication between our software
and the Remedy server. Let just take a moment to look at how RPC works.
Each host that contains remote program runs a port-mapping server that listens on a well-known port (111).
The client contacts the port-mapper on its dedicated port, and sends the remote program number
and version number. The port mapper starts the remote program on a free port and sends that port number
to the client. The client then contacts the remote program on the specified port.

Because of how RPC works, clients would not know the free port that the server will use until run-time,
and clients would potentially receive a different port from the port-mapper every time.
This has raised a red alert in a network which has firewall because firewall administrator has
to open pretty much very single port to get the RPC work.

So if there is a firewall between our software and the remedy server, you will only get timeout errors as above.

Whats the workaround for this?

Specify the port number the Remedy server is listening on as follows prior to pass the ARServerUser object to Remedy.

Util.ARSetServerPort(ARServerUser context, NameID server, int port, int progNum)

Saturday, July 18, 2009

Scripts to manage Active Directory Users

Recently i worked on a requirement to manage AD from our app, and thought of sharing/posting few details


1. Simple User Authentication
Get LDAP object (oDSObj) and bind to an ADSI object using credentials as shown below
oDSObj.OpenDSObject("LDAP://" & _
StrNamingContext, "Domain\username", _
"password", ADS_SECURE_AUTHENTICATION)

if this throws error, credentials are invalid.

2. Change Password, Reset Password

objUser.ChangePassword OldPword,NewPword
objUser.SetPassword "gU1d0*!"

3. Unlock Account

objUser.put "lockoutTime",0

Tuesday, January 27, 2009

Date in yyyy-mm-dd format in SSIS

You might face few issues in SSIS package date format as few functions like convert wont work in this enviornment instead you have to use DT_STR,DT_WSTR, check this link for your date format requirements.

Sunday, January 11, 2009

Here's one more to crowdsourcing.....Fixya Raises $6 Million B Round for Crowdsourced Tech-Support

Companies hate providing good tech support for their products because it is expensive. And consumers hate calling up tech support when they can’t get a gadget to work properly because they usually get the run-around. The idea for Fixya is quite simple: Let consumers help fix each other’s gadgets.

Monday, January 5, 2009

MSDN SQL 2005 Setup Failure - Fixes

Fixes to couple of issues i faced while re-installing SQL 2005 on my dev box

If you get 'the system administrator has set policies to prevent this installation' issue then

1. Open regedit.exe
2. Find the registry path 'HKEY_CLASSES_ROOT\Installer\Products\'
3. Delete all the subkeys that are empty
4. Run msxml6.msi again

If you get 'higher version of MSXML6' issue then

1. Open regedit.exe
2. Find a folder similar to Hkey_local_machine\software\classes\installer\products\ check the keys inside it to confirm it is the MSXML6 parser key
3. Delete this key
4. Run msxml6.msi again

Tuesday, September 30, 2008

Few tips for 'Plugging holes in your app'

These are few mistakes we've come across while working on performance enhancement for an app.

If you are kind of guy who stores GUID in char(36) (weird), use Unique Identifier please, GUID requires 36 bytes of data but if you use UniqueIdentifier type, then we require only 16 bytes of data.

Also, also the N '' prefix, while encoding your Unicode data (to aviod SQL injection etc), if the fields are char or varchar type (check link for the comparison sheet) it will prove costly too.

And its easy to replicate this black hole which leaks your app,

With a test table containing 100,000 rows with a char(36) field containing guids,
The following SQL took 56 ms to run:
SELECT * FROM testtable WHERE guid = N'00008999-A3B3-41FE-BF23-40465CF14147'

Where as the following sql:
SELECT * FROM testtable WHERE guid = '00008999-A3B3-41FE-BF23-40465CF14147'
took 0 ms (less than 1).

Monday, May 26, 2008

I am feeling.....

I came across this site quite accidently and 'i feel' this one is really cool, not because of a great UI or features, but appreciate the brains behind this idea.

To know more about what i am talking, land in http://www.wefeelfine.org URL, by the time you are reading this, wefeelfine.org would have sucked this blog's header and made a particle out of it and someone might be reading :)

Tuesday, May 20, 2008

SQL search on float value, using string wild cards

Do convert the float value to bigint and then to nvarchar to search using wild cards and like
e.g
CONVERT(nvarchar, CONVERT(bigint, ))

Saturday, April 12, 2008

SQL Server does not exist or access denied.

SQL Server does not exist or access denied. (with SQL 2005 Server)

Troubleshooting steps are as below:

First, telnet 1433
If connection could not be established then

Issue seems to be that you have not enabled the remote connections on the SQL 2005, to do this
1. Go to Surface area COnfiguration from Start - Programs - Microsoft SQL 2005 - Configuration Tools - SQL Server Surface Area Configuration

2. Select Surface area configuration for services and connections

3. Select Remote Connections from Database Engine dropdown list and enable 'Local and Remote Connection'

else if you are able to telnet, check the remote db user privilage you are trying to connect.

Friday, April 11, 2008

Permission denied to call method XMLHttpRequest.open

Now, this is an age old issue right!!!!

But still i see people asking this question, so its here...

Every web browser puts the security restriction on connections over n/w including our XMLHTTPREQUEST, now this security restriction prevents (the infamous jscript pop up sometimes in IE, wud you like to allow connection to this insercured connection) your scripts in your web application to open the connection to the service in another server but it does allow the call if your required service and application reside in same server (so who wants that!!! rite), and the only workaround is create a proxy in your server (this makes the call and return data )so your scripts can access.

Thursday, April 10, 2008

Why do i get a Download of Specified resource has failed error when using XMLDOM?

Best method to debug this issue is to run the requested url / page separately and check for errors.

Additionaly you may do the following to troubleshoot the issue as this is more like a permissions error. Anonymous IIS account cannot access the resource but you can.

Try following
1. Insert a Response.write(Server.HTMLEncode(xmlHTTP.ResponseText)) command
just after requesting the file on the server. If you get back the correct
data, then it's not a permissions error.
2. Check if requests are reaching the requested page in server.

Monday, March 24, 2008

Forgot your connection string, check it out here

http://www.connectionstrings.com/default.aspx