15,906,766 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by sigsand (Top 20 by date)
sigsand
25-Mar-13 12:39pm
View
Thank you very much for a quick and precise answer. Calling the dispose on the picture frames image before rendering another one solved the memory issue.
Now when I have 5 seconds of buffer I use around 135MB of memory and it never goes more than a few megabytes up and down.
I accept this as the solution.
I would like to further improve my application by not using Aforge.Control.PictureBox. I have read some of your links but I am not sure where to begin. Is there a simple tutorial explaining how to do display an image properly?
sigsand
25-Mar-13 11:55am
View
Sorry.
It is a Windows Forms Application. I am using the Aforge.Controls.PictureBox to display the buffered frames and Aforge.Controls.VideoSourcePlayer to render the real time image.
sigsand
2-Nov-12 9:10am
View
Alright I will try to go through them when I have time.
Thanks.
sigsand
2-Nov-12 8:49am
View
Thank you for that suggestion. I am aware of google.
I was hoping maybe someone experienced in running such a server could give me an overview of what software needs to be installed on each machine and how they work together. Then I can puzzle it together.
sigsand
17-Sep-12 10:06am
View
Ahhh I see. I thought that since it used the clock as a seed that it would be okay to use it again and again. Somehow I thought the resolution was high enough or this not to happen.
But I am glad that it is solved :D It was making me scratch my head every 5 minutes.
Thanks for the definition.
sigsand
17-Sep-12 8:21am
View
Thanks for the link. Does not answer my question though. I was hoping someone might be able to explain why my program behaved so strangely.
I think I might have found out why it does. Will post my solution soon.
sigsand
9-Sep-12 6:42am
View
Did not see the reply button.
"respect the fact that you have the responsibility to make your account (and thus your student's private information/records that you hold about them) secure" I hold no such information. I am not a professor or a lecturer. I am a student myself.
But back to the question I asked please.
Is there someone who knows the libray called 32feet or inthehand that could help me out a little?
I want to send a small message to my phone every 30 seconds or so. If I don't get a reply then that means the phone is out of range.
List<device> devices = new List<device>();
InTheHand.Net.Sockets.BluetoothClient bc = new InTheHand.Net.Sockets.BluetoothClient();
InTheHand.Net.Sockets.BluetoothDeviceInfo[] array = bc.DiscoverDevices();
int count = array.Length;
for (int i = 0; i < count; i++)
{
Device device = new Device(array[i]);
devices.Add(device);
}
foreach(Device d in devices)
{
if (d.DeviceInfo.ToString().Equals("myphonesdevicenumber"))
{
Guid MyServiceUuid
= new Guid("{00112233-4455-6677-8899-aabbccddeeff}"); // found this somewhere not sure what the string represents.
byte[] guidbytearray = d.DeviceInfo.ToByteArray(); // guid as a byte array.
string guidstring = d.DeviceInfo.ToString(); //guid as a string.
Int64 guid64 = d.DeviceInfo.ToInt64(); // guid as an int64.
Guid g = new Guid(guidbytearray);
bc.Connect(d.DeviceInfo,MyServiceUuid);
// turnoff = false;
}
}
This compiles but throws an error: "The requested address is not valid in its context 6C8336E70FC2:00112233445566778899aabbccddeeff"
sigsand
8-Sep-12 17:43pm
View
Thanks for the detailed and long answers.
You are taking it to far..
I can see how someone would be able to do a man-in-the-middle attack and pretend to be me if I simply scanned for the name of the device since multiple devices can have the same name but I use devices ID. Anyways..
"Please have some respect for the fact that you are supposed to be protecting your student's private data." I am not sure what you mean by this. I am making this software for myself. Noone else.
So now my phone is paired to my computer and I the solution that I want to implement will be something in the direction you said. Sending a message every 30s or so to see if it gets an answer. Even better if I figure out how to do it encrypted.
I appreachiate that you point out that it requires some type of security but I am rather asking how to do it at all, not how to do it well. The security issues can be implemented later.
Thanks
sigsand
8-Sep-12 16:32pm
View
The security issue is almost not a factor. It's just that sometimes when I am in class and I leave the classroom (for lunch or something) I forget to lock my computer.
I simply want to make it so that my computer locks itself when I leave for lunch or something.
I have made an application now that scans every XX seconds/minutes, puts all the devices in range into a List and then goes through the List checking if my device is one of them. It works, but now I just found out that even if I turn off my bluetooth radio on my phone the application (or probably the computer itself) remembers my phone and displays it also since I paired my phone to my computer.
If I do NOT pair my phone to my computer then my computer won't see my phone unless I press a button on my phone that tells my phone to be visible for 2 minutes.
I am not sure how to get around this.
sigsand
31-May-12 8:06am
View
Thank you very much.
Your program is sooooo simple and elegant compared to mine.
It is exactly what I was tring to do. Now I only need to make it look good on the outside with a GUI :D
Thank you very much.
sigsand
30-May-12 15:29pm
View
Okay.
Your example works perfectly but the html code that I gave you is only a part of the whole html code.
Here is the website I am trying to "fish" the information from: http://us.battle.net/d3/en/status
If I use the whole website with your code then I get a bunch of errors about the string.
sigsand
30-May-12 11:54am
View
Sorry fo not replying earlier.
I am not that good with regular expressions and I still have problems with doing what I want.
I'll tell you the whole idea, in case you are still following this thread.
I want to make a program that retreives information from a website and displays some information pulled from that website on its GUI.
The GUI consists of a lot of labels that simply show a boolean value, on or off.
Every second (or whatever, user specific) the program should make a post to the website and store the website as a string (already achieved).
The string when retreived looks like this (with a lot of garbage both in the beginning and the end):
<div class="server alt">
<div class="status-icon up" data-tooltip="Available">
</div>
<div class="server-name">
Hardcore
</div>
<span class="clear"><!-- --></span>
</div>
<div class="server">
<div class="status-icon down" data-tooltip="Maintenance">
</div>
<div class="server-name">
USD
</div>
<span class="clear"><!-- --></span>
</div>
And the information I need to get is if the "data-tooltip=" shows Available or Maintenance. Then change the status of the labels in the GUI to show either on or off.
I have not figured out how to do this yet.
I think that the webpage always has the same content so I was thinking to sput some specific line numbers as constants and simply check each specific line for the word Maintenance or Available.
sigsand
24-May-12 12:50pm
View
In c# like this:
string expression = @"<h3.*?>(.*?).*?data-tooltip=(.*?)";
?
Notice that I removed one " from your expression.
sigsand
23-Nov-11 14:46pm
View
Deleted
Mehdi Gholam: Would you care to explain that a little further, for educational purposes?
sigsand
23-Nov-11 14:46pm
View
Ahh. Thanks. As you can see I am new to Codeproject.com. :)
sigsand
23-Nov-11 13:51pm
View
Mehdi Gholam: Would you care to explain that a little further, for educational purposes?
sigsand
23-Nov-11 12:36pm
View
Nice. Thanks.
Just a little follow up on that last question.
I use the System.Security.Cryptography
And here is my method:
public static string ComputeMD5Hash(string fileName)
{
return ComputeHash(fileName, new MD5CryptoServiceProvider());
}
I will most likely be timing the execution of the code later on but there must be some general rule of thumb about which hashing algorithm is fastest.
Also a question I just thought about. Since there is so unlikely I will get a false positive, are there any methods that use less bits to calculate the hash to make it even faster. I think the lowest general method, that I know of, is using 128 bits.
sigsand
7-Nov-11 13:23pm
View
It's not supposed to be professional even though I always try to make it look good. But this method of mine seems to be working nice for laying out the players names. The textboxes behind each name are supposed to be filled in on the go. So if player1 beats player2 with 2-1 then 2 would be written in the textbox for player1 and 1 in the textbox for player2 and some logic would kick in to place player1 in the finals. I guess I need to add listeners to the textfields as I add them. :D
sigsand
7-Nov-11 13:19pm
View
Here is what I have done so far. When I have added all the players to a listbox I press a button called Create and here is the code in the Click event:
int xpos = 10;
int ypos = 10;
int numberofplayers = listBoxPlayers.Items.Count;
foreach (Player player in listBoxPlayers.Items)
{
Label newLabel = new Label();
newLabel.Content = player.getName;
canvas1.Children.Add(newLabel);
TextBox newText = new TextBox();
newText.Width = 22;
canvas1.Children.Add(newText);
Canvas.SetLeft(newLabel, xpos);
Canvas.SetTop(newLabel, ypos);
Canvas.SetLeft(newText, xpos + 75);
Canvas.SetTop(newText, ypos);
ypos += 50;
}
sigsand
7-Nov-11 11:52am
View
Richard MacCutchan, I have tried to search google for something like this but without success. My searches: single elimination layout c#, tournament setup layout c#, and others.
John Simmons, it isn't a homework assignment. Even if it was, what would be the problem? Everyone looks to the internet for help.
Espen Harlinn, the DataGridView is not exactly wht I am looking for but i is better than nothing. I'm not sure how I could use it the way I want it to be. Could you give a short example on maybe how to layout two players and the winner of the two.
I will try to make something simple aswell using the DataGridView.
Thanks.
Show More