473,395 Members | 1,466 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

remove matching entries

I'm working on an app that takes live data that is constantly fed in and lists it in a datagrid on a webpage.

So it gets an entry and feeds it to the webpage. Then what I'd like to happen next is when a new entry feeds in. I'd like that new entry to first go through the other entries and see if there are any matches. If there are other matches then they should remove themselves from the page.

The catch is this:

The one column I'm able to match the entries by has "web up x.x.x.x" or "web down x.x.x.x"

I need to match by the IP (x.x.x.x) so if one website goes down and has x.x.y.n and then later an entry is fed through that says "web up x.x.y.n" then they should match up and remove themselves from the webpage. Does this make sense?

I would probably have the page refresh every 5 minutes....
Aug 22 '07 #1
7 1347
nateraaaa
663 Expert 512MB
I'm working on an app that takes live data that is constantly fed in and lists it in a datagrid on a webpage.

So it gets an entry and feeds it to the webpage. Then what I'd like to happen next is when a new entry feeds in. I'd like that new entry to first go through the other entries and see if there are any matches. If there are other matches then they should remove themselves from the page.

The catch is this:

The one column I'm able to match the entries by has "web up x.x.x.x" or "web down x.x.x.x"

I need to match by the IP (x.x.x.x) so if one website goes down and has x.x.y.n and then later an entry is fed through that says "web up x.x.y.n" then they should match up and remove themselves from the webpage. Does this make sense?

I would probably have the page refresh every 5 minutes....
What are you using as the datasource for your datagrid? You could compare the column you mention by comparing the two using the EndsWith statement.

Nathan
Aug 22 '07 #2
What are you using as the datasource for your datagrid? You could compare the column you mention by comparing the two using the EndsWith statement.

Nathan

What do you mean...what datasource am I using?

The server is MySQL btw.

The other problem is that the ip in the "message" column is endless in ways it could end. IE i don't have a pre made list of all the IPs that might show up in the message. We get new ones everyday. So the command would have to be able to look for any ip and try to match it.
Aug 23 '07 #3
nateraaaa
663 Expert 512MB
What do you mean...what datasource am I using?

The server is MySQL btw.

The other problem is that the ip in the "message" column is endless in ways it could end. IE i don't have a pre made list of all the IPs that might show up in the message. We get new ones everyday. So the command would have to be able to look for any ip and try to match it.
Do you use a dataset, an array, or something else for your datasource of your datagrid? If you are concerned with the up/down prefix in comparing your IP addresses you would use EndsWith and then the full IP address to compare the existing IP string with the one that will be used when the page is refreshed.

Nathan
Aug 23 '07 #4
Do you use a dataset, an array, or something else for your datasource of your datagrid? If you are concerned with the up/down prefix in comparing your IP addresses you would use EndsWith and then the full IP address to compare the existing IP string with the one that will be used when the page is refreshed.

Nathan

Oh dataset. Also...I can't define what the IP address is to compare with the other entries...it's random. The IP address might not even match anything else...and if so it's supposed to just add to the other entries until something else matches up with it.
Aug 23 '07 #5
nateraaaa
663 Expert 512MB
Oh dataset. Also...I can't define what the IP address is to compare with the other entries...it's random. The IP address might not even match anything else...and if so it's supposed to just add to the other entries until something else matches up with it.
You will have to be able to compare two items if you want to check for duplicates. I am suggesting that you compare your new dataset with the dataset currently being used. You will have to iterate through each row of the new dataset to see if any IP addresses already exist in the current dataset. If it does exist move on to the next item if it does not exists make sure that the IP address is added to your current dataset.

Nathan
Aug 23 '07 #6
You will have to be able to compare two items if you want to check for duplicates. I am suggesting that you compare your new dataset with the dataset currently being used. You will have to iterate through each row of the new dataset to see if any IP addresses already exist in the current dataset. If it does exist move on to the next item if it does not exists make sure that the IP address is added to your current dataset.

Nathan
heh no idea how I would go about coding that of course I'm trying to understand that through a sinus headache...
Aug 23 '07 #7
You will have to be able to compare two items if you want to check for duplicates. I am suggesting that you compare your new dataset with the dataset currently being used. You will have to iterate through each row of the new dataset to see if any IP addresses already exist in the current dataset. If it does exist move on to the next item if it does not exists make sure that the IP address is added to your current dataset.

Nathan
I think I'm going to make a stored procedure that should be a little easier.
Aug 24 '07 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Thomas Mlynarczyk | last post by:
Which is the simplest way to remove all whitespace from a string? Is there a simpler method than a regex replace? Or how can I tell a regex pattern to ignore all whitespace in my subject string?...
7
by: Matt L. | last post by:
In summary, I don't know how/why the following code works and would like to know. I'm trying to match the first 3 characters of a variable (filename). The code below crudely works, but only if I...
0
by: aredo3604gif | last post by:
I have coded a serie of singly linked lists in ANSI C which I have to use. The lists are then stored in a serie of buckets with chained hash table technique. In the various lists there are nodes...
4
by: Michael A. Covington | last post by:
Greetings, I am working on a program that is in beta testing and goes through a new version every week or so. When there's a new version, go into the setup project change the Product Code but...
3
by: Saso Zagoranski | last post by:
Hi, I'm creating a little knowledge base webservice, which would help my users when they encounter errors. In my knowledge base I would have entries like this: problem: Can't access file ...
9
by: Jim Lewis | last post by:
Anyone have experience with string pattern matching? I need a fast way to match variables to strings. Example: string - variables ============ abcaaab - xyz abca - xy eeabcac - vxw x...
3
by: YoungJohn | last post by:
I'm extracting data from a database to create a table. My table includes a text field 'Postcode' for postcodes. Sometimes the extracted postcodes are in the format SL37HY and in other...
2
by: santhoshs | last post by:
Hello I am required to parse two files that contain email addresses and figure out a way to get the matching and non-matching email addresses from both the files. I was able to get the matching...
1
by: robertstone | last post by:
The following code is meant to take a set of entry elements and while iterating through them using recursion, output a <spanspec> tag for each unique set of @namest and @nameend attributes found in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.