Sql Connection String

September 17, 2012 Leave a comment

Hi,

I found a good technique in BizTalk 2010 unleashed book about db connection string. Well lets call it a technique or a way to do thing,

as sometime you might not remember the parameters to your DB. In the book how it goes:

1. Create a empty file on desktop and name it conn.udl

2. Double click the file and it will bring a wizard (not Wizard of OZ), in that wizard test your DB parameters and Save it.

3. Open the conn.udl file in text editor and there you have your parameters to use ūüôā in your application or etc

Nice ? Isn’t it …

Advertisements

pushd and popd Windows

July 18, 2012 Leave a comment

Need for CMD cheat sheet Aahhh…I always wanted to keep CMD cheat sheet in my head. But as i cannot maybe I should just write it down here.

Update it from time to time. Yes i will do like that

Soo while working between different directories on CMD ofcourse ūüôā one might need kind of /root directroy to access anytime (you disagree?)

lets say we are working on  C:\Music and then switch to D:\Music backup and then E:\Music send

now by typing the whole path back to C:\Music esp if we are inside doom of subfolder’s

CMD command PUSHD comes handy so when we are on C:\Music we will do E:\Music\pushd C:\Music

then next time we just use POPD and Voille we are in C:\Music

I found a List of more command have a look -> http://ss64.com/nt/

Thats All…

C#: VS lovers love Immediate Window

December 16, 2011 Leave a comment

Hello,

It has been on/off that I have worked with VS2008 in 2 years, But this year I really had to put 5th gear and work with VS2008 :).

Yeah I landed in a job where It’s required and every day I’m loving it. So here comes the deal! ‘I’ never¬†knew before of Immediate Window in VS, instead of writing a piece of code to find the value of object, expression or value.Seriouly don’t waste hours¬†anymore¬†Lesson learned ‘I’ must use things like Add Watch and Immediate Window.

Links camed handy ->

http://dotnetdud.blogspot.com/2007/12/visual-studio-immediate-window.html

http://blog.fossmo.net/post/The-Immediate-Window-in-Visual-Studio-2008-can-save-you-some-time!.aspx

Google & noodle time

Cheers!

XML result with Java query from Database

Hi, This post is about to how to generate xml result or output from PostgreSQL database with query i mean :).  In PostgreSQL 8.4 there is sql xml query by which we can generate the xml result from table or tables. the sql query goes like this

select xmlelement (name Item, c.item)
from inventory c where itemname='inkpen';

In my case I had to generate xml result into file with my Java application for later use into web services . Below is the partly shown code ran in java application . what is does run query against table and bring result in XML format later file is created and the result is stored in that file.

String sqlxmlquery = select xmlelement(name Sensor,xmlelement(name NodeId, c.nodeid),"+
"xmlelement(name Xaxis, c.xaxis),xmlelement(name Yaxis, c.yaxis),"+
"xmlelement(name Zaxis, c.zaxis),xmlelement(name Temp, c.temp),"+
"xmlelement(name Light, c.light),"+
"xmlelement(name Time, c.modtime)) from spot_result c where nodeid='0014.4F01.0000.6A40';";

//execute query
ResultSet result1 = select.executeQuery(spotquery1);

//condition loop to print the update result all the time
while (result1.next()) {
    String outputsunspot= result1.getString(1);
    System.out.println(outputsunspot);

  //create file
    File spot1 = new File("C:/Documents and Settings/Admin/Desktop/webdump/xml_sensor_result/spotresult1.xml");

//write the result in file
    Writer writer = new BufferedWriter(new FileWriter(spot1));
    writer.write(outputsunspot);

//not sure with this one - writer should be closed i guess :)
 writer.close();

Thats it for now ! if you need to know more , criticize me . most welcome to query on my inbox at mubeen44us at gmail.com cheers!

Notify-Send POP up the B* messages on Desktop Ubuntu way

April 21, 2011 Leave a comment

Hi ,

Well going through mix of emotions as mix of technologies in myself, while reading a magazine. I came across this amazing thingy !!! Notify Send ? alright I’m not in windows mode . Yes you guess it right ūüėČ . Well in short what is does is pop up messages on screen, of course you can play around it with as what ever you like it to be.

Downloading steps are here ->

http://ubuntuforums.org/showthread.php?t=1411620

Infact it has whole bunch of explanation also what you can do with it.

I have installed it sudo apt-get install libnotify-bin.

Fun part try couple of things from that url i have said above.

cool thing this notify-send can do for you! my example

Notify Send bash script

#!/usr/bin/env bash

while true;
#Display who
#do msg=`w`;
#Display files
#do msg=`ls -a`;
#Display ifconfig
#do msg=`ifconfig`;
#Display USB status
do msg=`lsusb`;
notify-send "Notification" "$msg";
sleep 60;
done

Screen result:

update : [Where B**** equals to BEEF Steak is ready !]

Good Weekend & Happy Easter to you ALL ūüôā

Cheers

Windows Mobile painless BlueTooth API

March 17, 2011 Leave a comment

Hi ,

It happen while playing around with my windows mobile (6.1) with BT. if you are aware of GRemote or simliar kind of app for windows phone.

I wanted to write my own BT application but for different purpose. (purpose disclosed for this time).

Visual studio 2008 didn’t had what i needed to program in windows mobile for BT. standard set of libraries!…ihan but fear not there is one excellent API named “In the hand” 32Feet.

well i came to knew about it from some group forums.  here we go to real deal part download the api -> http://inthehand.com/ read all documentation , FAQ all kind of stuffs.

What i did for now made my¬†initial¬†BT j2SE server communicate with my windows phone ūüôā

after downloading the api extract them or install it,  add the api to your C# mobile project in add reference.

start to explore and see what potentials it has!

my code if you need is here ->

main

in case you need to ask something most welcome to write me on my gmail address, best thing would be if you are using this 32feet grab those techy guys of 32feet :).

Thats all , Cheers

*warning the code is¬†slightly¬†off tune. in case it hangs your phone don’t press¬†any other¬†button then “Find”. extend the code as you like.

Windows File integrity checker

February 18, 2011 2 comments

Hi,

I came to know about windows version of file integrity checker ! (I’m not asking myself why now as earlier my lovable Fedora 10 gave me the power to run md5sum easily by command line).

So what is File integrity checker google it;
define: file integrity checker

What is md5sum google -it;
define: md5sum

Coming back to windows part FCIV is a command line tool to check the hashes of file.

The scenario could be you have downloaded some files and for some reason it doesn’t work! “its wiser to check the integrity of files after download” more wiser is also to download the files which gives some SHA (hash)values.

Where to download it from ; http://support.microsoft.com/kb/841290/

Need to read more -; http://searchsecurity.techtarget.co.uk/tip/0,289483,sid180_gci1521983,00.html

Result fciv

fcivresult

Cheers!