Friday, February 24, 2012

DATAGRIDVIEW CELL COLOR & FILTER WITH VB.NET


'**************************************************************************

'* DATAGRIDVIEW CELL COLOR & FILTER WITH VB.NET *

'**************************************************************************

' COPY PASTE THIS CODE TO FORM1

'CREATE A DATAGRIDVIEW







'CREATE A COMMAND BUTTON






'CREATE A TEXTBOX



Imports System.Data.OleDb
Public Class Form1
Dim dv As New DataView
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim cn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\data.mdb")
If cn.State = ConnectionState.Closed Then cn.Open()
Dim cmd1 As New OleDbCommand("select * from itemmast", cn)
Dim dr As OleDbDataReader
dr = cmd1.ExecuteReader
Dim dt As New DataTable
dt.Load(dr)
dt.TableName = "itemmast"
dv.Table = dt
DataGridView1.DataSource = dv
With DataGridView1
.RowHeadersVisible = False
.RowsDefaultCellStyle.BackColor = Color.LightBlue
.AlternatingRowsDefaultCellStyle.BackColor = Color.White
.EnableHeadersVisualStyles = False
.ColumnHeadersDefaultCellStyle.BackColor = Color.Green
.ColumnHeadersDefaultCellStyle.ForeColor = Color.White
End With
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
dv.RowFilter = "partno like '%" & TextBox1.Text & "%'"
End Sub
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
dv.RowFilter = "partno like '%" & TextBox1.Text & "%' or partds like '%" & TextBox1.Text & "%'"
Label1.Text = dv.Count & " Rows"
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
End Sub
End Class

Saturday, February 11, 2012

object reference not set to an instance of an object

1) Run regedit.exe;
2) Browse to the location "HKEY_CLASSES_ROOT\CLSID\{F9AE8980-7E52-11d0-8964-00C04FD611D7}" in the tree;
3) If there is a child node in the tree called "ProgID", then you are indeed experiencing a different problem - let me know if this is the case.

Otherwise, follow these steps to modify the registry:

1) Right click the node and select "New > Key";
2) Enter "ProgID" as the name;
3) Go to the main window and double click "(Default)";
4) Enter the value "MSIDXS.1";

Now if you run Visual Studio, it should be working.


************************************************************************************
Regards,

Chittaranjan Satpathy

+919973661801


Wednesday, December 28, 2011

Earn Online Data Entry

Earn upto Rs. 9,000 pm with PaisaLive.com!

Hi ,

I have something interesting for you - you can easily earn regular income online via PaisaLive.com!

It’s really amazing! You get paid to open & read the contents of PaisaLive mails. You also receive special discount coupons, promotions and free passes to various events in your city.

Join now and get Rs. 99 instantly, just for joining. What more, as a special bonus you get paid for inviting your friends also!

Create your PaisaLive Account & refer your friends to earn launch referral bonus on every new registration.

http://www.PaisaLive.com/register.asp?4636259-3824958

PaisaLive - Get Paid to read emails


Tuesday, December 27, 2011

Tally Import 7.2 or Tally ERP

Insert your tally Sale Voucher /Purchase voucher directly to Tally 7.2, Tally9 or Tally.ERP9 from your any sale software database.

The compatibility has been checked with foxpro database, dbase, DBF, ms-access, SQL Server,Oracle. Need to customize to interlink with your sale software.












For customization please contact me at ranjansatpathy@gmail.com

Friday, September 23, 2011

How to create .UHA file


HOW TO CREATE .UHA FILE AND RUN AUTOMATICALLY

NEED TO DOWNLOAD UHA.EXE OR UHARC.EXE

1. create a batch file (to compress uha file)
==============================================
echo off
uha.exe a -m3 -r -pf -o sales.uha e:\sales\*.*

Note: here sales.uha is target filename
e:\sales\*.* is source folder name


2. create another batch file ( to decompress and run uha file)

uha.exe x -t"%TEMP%\Soft" -y+ sales.uha
start "" /D"%TEMP%\Soft\Sales" "sales.bat"

How to create .UHA file


HOW TO CREATE .UHA FILE AND RUN AUTOMATICALLY

NEED TO DOWNLOAD UHA.EXE OR UHARC.EXE

1. create a batch file (to compress uha file)
==============================================
echo off
uha.exe a -m3 -r -pf -o sales.uha e:\sales\*.*

Note: here sales.uha is target filename
      e:\sales\*.* is source folder name


2. create another batch file ( to decompress and run uha file)

uha.exe x -t"%TEMP%\Soft" -y+ sales.uha
start "" /D"%TEMP%\Soft\Sales" "sales.bat"

************************************************************************************
Regards,

Chittaranjan Satpathy

+919973661801

Saturday, June 18, 2011

Finding the chords of a song

Finding the chords of a song


When I started playing the piano, I had absolutely no clue about chords. Infact, I used to wonder how do people play using both their hands, when I struggle to play with just one. One fine morning, I felt it's about time I learn chords. I was so enthusiastic that I even placed holds on a couple of books in the library that teach you how to play chords in less than a week! Read exhaustively on chords, rhythmic patterns and stuff, only to realise its too much for me. Since I'm just a "bathroom singer" kind of keyboard player :), I thought I'll play chords as and how I like. I sat down for about two days, read some material, the basics I should say and devised a chord-determination algorithm. Surprisingly, it yields good results most of the time. And that's why I decided to share it with my visitors.

Here you go!

Step 1: Identify the notes of the song corresponding to the tune. The song will include only those chords which are combinations of these notes.

Step 2: Analyse the song, line-by-line. Divide each line of the song into logical segments, call each segment a measure. There's more to a measure of a song that what is mentioned here. For simplicity, I'm calling a segment a measure. A measure can typically include 3-6 notes of the tune. Now the question is, where do you set the break points inorder to get measures of a line of song? Here's the simple rule of thumb: Follow your intuition! How I look at it is, I set the breakpoint at the transition of the song from one scale to another. Now, "scale" is yet another technical term like "measure". Pls note that all these terms are used in a very general sense in my context.

Lets take an example. "Yeh mera dil" from Don.

Yeh mera dil pyaar ka deewana
------------ -------- -------
Deewana deewana pyaar ka parvana
------- ------- -------- -------
Aata hai mujhko pyaar mein jaljaana
--------------- ---------- --------
....

Listen to the song keeping an eye on the segmentation above. Sounds right?

I play the first line ("Yeh mera dil pyaar ka deewana") using only three chords. The original song might include many more, but the tune can be contained in three chords. I guess I'm sure of that.

Step 3: Having identified the measures, the next task is to map each measure to a chord. The rule for this is, the chord that correctly maps to the measure should include as many notes of the measure as possible. For instance, look at this:
Yeh mera dil
D E D E C

The chords C and Aminor include both the notes E & C. But how ironical, I play Dminor chord for this measure. An exception in the very beginning! Well, its like this. Generally, the note with which the song begins determines the "scale" of the song. Most of the chords would be centered around this note.

Try playing this measure with C, Aminor and Dminor. You'll see the difference yourself.

Here's what I do. I have this simple chords table which I drafted out.



Step 3.1: Given a measure, using the table above, I identify all possible chords (only major, minor and flat) that include the notes of the measure. I then set the "accompaniment" of my keyboard to ON, and play the notes of the measure with each chord. The chord that perfectly carries the tune of the measure is the one I go with. Somewhat a brute force approach, but for a layman like me, it sure works.

Step 3.2: Once you get a rough idea of the chords for a line (like "yeh mera dil pyaar ka deewana"), play them in sequence without playing the notes. If you can identify the tune by playing just the chords, your chords are right! Otherwise, use your judgement and tweak the chord combination by reconsidering those chords that you've discarded in step 3.1 above.

Repeat steps 3.1 and 3.2 for each line of the song.

Step 4: That's the end of the algorithm!
Powered by intuition, Driven by sharp ears (Quotation courtesy: Infosys :D)

Source :http://sari-gama.blogspot.com/2008/08/finding-chords-of-song.html