Click here to Skip to main content
15,357,464 members

Comments by HobbyProggy (Top 84 by date)

HobbyProggy 23-Jan-19 3:31am View
I understand, so making the server sleep isn't the best idea. But how would i ensure that a communication
Client -> Server (i want data) -
Server -> Client (i'll give you data) -
Client -> Server (Ok) -
Server -> Client (Buffer wil be) -
Client -> Server (Ok) -
Server -> Client (Here is the data)
would run smooth without them getting messed up?
Would it just work if i remove the sleep and wait for data? Or will that clog things up?
HobbyProggy 22-Jan-19 1:59am View
Btw, does sleep 100 make sense according to processing times?
HobbyProggy 21-Jan-19 5:37am View
Oh wow, it totally did the trick! The CPU is chillin now, even with 25 clients connected.

Thanks alot!
HobbyProggy 21-Jan-19 4:02am View
Yeah, i am new to this stuff, the empty while is actually just for testing purposes. But if that would be the problem of my cpu load i'd change it to an amount that makes sense.
HobbyProggy 18-Jan-19 8:15am View
As i did not get to this point yet, i'll try the async code. But if i need to fall back to oldfashioned (TM) working code i'd call you okay?
HobbyProggy 11-Apr-18 1:41am View
Or you could use a stats class and make an array or list of it, adding each value by the user. You then just need getters and setters to set or retrieve the values from your stats. If not totally necessary avoid static!
HobbyProggy 10-Apr-18 7:18am View
Have you tried anything yet? We should know a bit more than what you wrote. Please use the Improve question Button to update your question :)
HobbyProggy 14-Mar-18 9:35am View
You are right... my eyes got blinded by the "non static" class :)
HobbyProggy 14-Mar-18 8:00am View
You probably should create an instance of MARS first.
HobbyProggy 13-Mar-18 4:46am View
As far as i can see you are lacking an "KeyDown" event which gets triggered when you press any key on your keyboard.
HobbyProggy 7-Dec-17 1:36am View
Without further information we will not be able to help you. Please give examples of your tables and of your datagrid.
HobbyProggy 24-Nov-17 2:33am View
I could only suggest you to iterate through the rows and setting the cells that are not allowed to be edited also to readonly. Probably that helps you.
HobbyProggy 27-Apr-17 2:00am View
I see you understood :)
HobbyProggy 26-Apr-17 8:14am View
You would need an ODBC driver to get a connection to the Notes Server. This should be your first step to tackle that problem.
HobbyProggy 14-Dec-16 3:25am View
If you select by cards it should automatically list up the same merchant multiple times as long as you don't group by merchant.
HobbyProggy 12-Dec-16 2:09am View
Sorry for the late response by the way, i forgot to submit my reply on friday and had no time on the week end.
HobbyProggy 12-Dec-16 2:08am View
I had some errors in the code but updated it now.
Interfaces are usefull but you can work without them, it's a matter of how you wanna design your structure :)
I hope with the updated code you get better into it, i would love to help you way further but im afraid that time is a limiting factor and teaching you a whole study on computer science with a plattform like this is impossible :)
HobbyProggy 9-Dec-16 3:42am View
Close but not 100% ;)

Here the "correct" order of what i said.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsFormsApplication1
public partial class Form1 : Form, Interface1
Controler _c = null;

public Form1()
_c = new Controler(this);

public void SetUI(string Data)
label1.Text = Data;

//here is the UI Requests:
private void button1_Click(object sender, EventArgs e)

//The Business Class
public class Business
public string UI()
string _uiData = "";
Base _base = new Base();
_uiData = _base.requestDataFromDatabase();
return _uiData;

//The controler Class
public class Controler
Interface1 _view = null;

public Controler(Interface1 View)
_view = View;

public void GetData()
Business _b = new Business();
string _data = _b.UI();

public class Base
//Somehow this grabs data with specified methods
public string requestDataFromDatabase()
string _data = "";
//Grab data
_data = "Hello";
//If Data is bad
if (string.IsNullOrEmpty(_data))
return "No Data";
return _data;

public interface Interface1
void SetUI(string Data);

I forgot the interface, to make it more clear how the separation works i added it now. As you can see in the interface you declare the method head. This means whatever you change inside the method, as long as the head is untouched it is irrelevant for the rest of your classes.

BTW. this is very complex with a lot of gears working on it so if you want to simplyfy do it. As i already stated, start off and separate once a while and you'll get an idea of how it works. Hard but the effect of learning is bigger.

*Updated the code so it works, had some forgotten stuff ^^* I don'T program often without my IDE.
HobbyProggy 8-Dec-16 11:44am View
Glad you got a bit of what i wanted to point out, and yes it is a problem for most programmers, since this is the job of an architect. It is hard for everyone but with the experience and "design patterns" we get along with it cause we know how and have the "tools" for it. So you are probably good enough but lack the experience.
To design patterns, it ain't a book, it is a word for a set of designstructures you may use. So there are sevaral books and wikipedia articles about that stuff.
To .Dll's, i guess you know what they are for? If not then just programm a small software that has 2 project files, one is set to compile as dll and one is an executable. The executable project needs the dll project as reference and see how "magic" happens.
A ".dll Project" (if one can call it so) is just a project file consisting of classes, views, whatever that can be used by actual ".exe Projects". With this you create a modular system being able to modify one part without "needing" to touch the other part.
A business class for me is a class that does the business (funny right?), for example i have a UI that displays a set of data (think of an excel sheet). I click on show data -> the UI now calls it's controler and asks for data -> the controler asks it's business class to get the data he wants -> the business class now does the job and uses the Basic Module to get the requested objects. As soon as the business class has the objects it hands them to the controler -> the controler keeps them in his data hold and fills the UI with the data. Voila you see the data on screen. As this is just an example it might not fit 100% on your case but i hope you get the idea of it. And although this sounds complex it is worth it since you can change on every layer without needing (Sometimes you might need to change) to change stuff on the other parts.
To say it in one sentence, "A business class should be a class that is dedicated to exactly one job or subject and be holding the "production/business" code for this job or subject".
I can tell you this CORE you are talking about is existing, since every application needs a heart that keeps pumping. How the "CORE" will look like is something you gotta find out yourself. But you don't need to create the CORE and then switch to the other stuff. Do it the way you think you'll find the solution. Maybe start off with the objects and figure out how to punch them together. You have to find YOUR way of creating a system, nobody can teach you that, we just can give hints or perspectives how we would do it.
That is by far the hardest thing, but if you use your tools properly you can build a CORE and later separate it, extend it, separate it again and you'll finally have a CORE consisting of several classes working together and driving the machine to where you need it. You are an artist, think of a picture, you start at one point and fill it up, you separate the views on objects on that and specifiy it piece by piece to make a final whole painting right? It's just like that but more technical :)
MVC is one of the most used (i hope i am right :) ) Patterns though it gets pushed by MVVM which is another pattern i can't explain very well ^^.
The idea of MVC (Model-View-Controler) is to keep the UI as UI that is dumb and just presents data. The controler does the job on asking for data or shoving it into the UI. The Model is the actual data Object that is held by the controler. The idea is that if the UI requests a refresh the controler does it and if the Model got refreshed the Controler shovs it into the UI. You can modifiy the UI and let the controler be and vice versa, same goes for changes on the model, since everything is separated well and has it's dedicated job.
And yes it is a matter of getting into it, as soon as you have expierence you create your own patterns according to your previous steps and will easier take on such jobs.
Way 2, it sounds like a lot but you'll see it is less than a 1000 files
HobbyProggy 8-Dec-16 8:37am View
Just to inform you why your "Question" might get removed, this ain't a question, nor is understandable what you want. Firstly you should learn to be more precise and not just throw random words in the pot. Thanks.
HobbyProggy 8-Dec-16 3:47am View
By the way, there is no "proper way" or "best thing" to tackle this. It is very specific and therefore you have to decide it everytime. A recipe like do it this way and you succed doesn't exist AFAIK.
HobbyProggy 28-Oct-16 2:09am View
Thanks alot, will go this way :)
HobbyProggy 25-May-16 4:40am View
So how is done then? This is not an invention from my side, therefore i thought as this is already done if im not mistaken, there is a proper way to solve this problem.

As far as i understand you i would have to send the file uncrompessed and "decrypt" it? But as i stated opencv compresses during the save process.

So no solution for my problem available?
HobbyProggy 24-May-16 9:47am View
Well the problem is that this is about finding out if this way is better, algorithms for that system are already in use, i get the encryption done quite good but the compression ruins the RGB values which is destroying the mask.
HobbyProggy 24-May-16 3:18am View
thanks, i'll try that out and respond :)
HobbyProggy 24-May-16 3:18am View
Thanks for the info, i am the one encryping the videos. It's because of a study of how you could prevent piracy on videos by only masking the faces of the persons in the video.
HobbyProggy 19-May-16 9:52am View
Thank you +5 :)
HobbyProggy 12-May-16 7:50am View
You posted the same quetion twice, could you please remove one of them for better overview? Thanks :)
HobbyProggy 9-May-16 6:53am View
Well you have to check if you are just creating objects and not dumping any. I would suggest you to review your code and see where you can dispose objects that are not needed anymore. Also check the link Richard gave you, this might also help :)
HobbyProggy 3-May-16 8:35am View
Do you have administration rights? The Registry, and so is the path where Microsoft stores the keys, is locked (by privileges) for a reason you know?

Why won't you create a subkey in your own "folder" ?
HobbyProggy 28-Apr-16 7:44am View
It's not complete though.
HobbyProggy 28-Apr-16 5:52am View
Instead of the MouseMove you should use the MouseHover and there you just set the combobox on DroppedDown = true;

Then your combobox opens properly.
HobbyProggy 26-Apr-16 2:55am View
In my opinion, from what i could identify without knowing the complete code i'd say you increase your i on the wrong place. Like you enter the while loop with 9 and immedeatly jump to 10?

Secondly you should try debugging it step by step. Then you could check the current value of i at your println and check when i gets the wrong values.
HobbyProggy 26-Apr-16 2:23am View
Do you have indexes set on your database tables? Maybe you should set them on the identfying columns on which you join. This could enhance the performance enormously.
HobbyProggy 11-Apr-16 2:45am View
I would suggest you start debugging this program, the error tells that there is an object on which you want do something (reading value f.e.). If the object is null then this error comes up. My suggestion, start debugging from the first line of this codepart and go through every line until you find the empty object. Then you cann easily fix it :)
HobbyProggy 31-Mar-16 4:55am View
Could you please form your Questions and into this question and provide more data to let us help you more efficient?
HobbyProggy 21-Mar-16 9:49am View
We do not do your homework, is it set for you to understand what you have learned.
HobbyProggy 4-Mar-16 2:21am View
What do you mean by this question?
Do you want it as a Date Display or should the user be able the change the date?
HobbyProggy 3-Mar-16 11:07am View
You know this ain'T about gimme the codeZ?
HobbyProggy 2-Mar-16 5:50am View
Ain't this a repost to ?
HobbyProggy 19-Jan-16 4:44am View
Sorry i respond so late, i didn't see you replied.
I messed it up with the usual GridRow i updated the solution

It is Myrow.Cells[2].Value.ToString() == "";
HobbyProggy 12-Jan-16 8:15am View
Your Form 1 opens the Form 2 right? Does Form 2 know Form 1 ?
HobbyProggy 12-Jan-16 7:37am View
Yes okay, but that is a normal behivour, you close your grid form and don't delete the data in form so it will stay there since you don't hand your form 1 references but "hard" values. If you close form 2 you would have to clear the data in form 1 and that should do the trick you want to, then everything there is empty
HobbyProggy 12-Jan-16 6:39am View
Okay, your code is a little messy (at least for my eyes). In your main Form when you click the button you display the data from the grid right?
The second Form is just a Datagrid that shows some values?

And if you close Form 1 your Grid does what? I'am sorry i don't understand it.
HobbyProggy 12-Jan-16 6:01am View
Have you tried anything so far?
Could you show us your Codeparts where the Function is seated?

Mainly from what you say i guess you just have to fire an event on the doubleClick and return/send the Text to your Form1.
HobbyProggy 12-Jan-16 1:58am View
Thanks again +5 for the effort :)
Let the comments stay, so one can see how it came to this
HobbyProggy 11-Jan-16 7:46am View
Okay good :)
Yeah currently i do not need it, but if i start as if i would need it i have a solution at hand when it comes to this point. Then i will start to worry about server security and ask a question XD

Thanks for everything so far. Have a virtual +5 for your efforts :)
HobbyProggy 11-Jan-16 7:32am View
We have assemblies on one side like the Business layer and DMS plugins on the other side that are loaded depending on the configuration.

With new modules i thought about a reporting Module that will come surely.
It is a very informative one, thanks for that :)
HobbyProggy 11-Jan-16 7:30am View
I see, thank you for all that information :)
But this whole thing might only work if i use it internal right? Because i don't think our server is allowed to install/copy stuff to clients not in the network. In this case i have to transmit the files right?

I don't wanna annoy you with all these questions but i thought when i do it, i'll do it right and fitting for all possibilities. Because selling the software would be a "dream" but handing it to our enterprise is a must.
HobbyProggy 11-Jan-16 6:53am View
It will be client <-> server based as soon as i transfer my SQL into a Observer. That's actually not a bad idea, i didn't work with json yet but i guess that should be rather easy? But if understand correctly i have to write an installer and an updater right?
And additionally, what about new modules?
HobbyProggy 5-Jan-16 9:21am View
Thank you for that information OG :)
But i just "jumped over my shadow" and fiddled a WPF uc into a WindowsForms Form and this also works quite smooth.

Nonetheless, i'll try your solution!
HobbyProggy 5-Jan-16 8:34am View
It is, and while trying on and on i fear this won't work properly with it right? Do i really have to switch to WPF?
HobbyProggy 18-Dec-15 6:50am View
Did you try anything till now? Show us some effort and we help you to correct it :)
HobbyProggy 16-Dec-15 8:23am View
Please, before posting the same Question again.
1. Write a Question in your text
2. Show us where your problem is
3. provide some of your code and the error you get
4. Stay calm and wait for someone who can answer your question
HobbyProggy 16-Dec-15 8:11am View
This is a repost from this, please dont do that
HobbyProggy 4-Dec-15 7:38am View
Well you could write a service that checks if the server version is newer than the local one and just copy the .dll or exe to your local application. But since i don't understand what you want from us i can't say for sure if thats all you need.
HobbyProggy 4-Dec-15 4:29am View
Allright, i didn't encouter your problem but i got the code a little tidyed up
i Update it in my solution.
HobbyProggy 4-Dec-15 3:56am View
Could you show some code and form a statement or question what we should do with your exception?
HobbyProggy 4-Dec-15 3:23am View
Hmm yeah i guess that might be cause the enddate is quite tricky, if you put anything not to your defined end then it glitches somehow. I#ll try to fix that but am not sure how fast i'll have it done.
HobbyProggy 4-Dec-15 2:51am View
If you use the code i posted you wont have this error, dont ask me why it errupts though :)

If you want to go back more years then you just could add another loop. like this code(i updated it in my solution)
HobbyProggy 3-Dec-15 10:51am View
BTW, would you mind to accept the solutions that got posted to you?
I saw all your questions got solved but you didn't accept any solution, i just want to inform you that by accepting a solution this might help other people also by seeing a solved question, so they don't have to open the same question again.
HobbyProggy 3-Dec-15 9:07am View

CASE WHEN (@FirstTableMonth - @CurrentMonth) % 100 BETWEEN 0 AND 13
EDIT: sorry Between uses the said numbers therefore
CASE WHEN (@FirstTableMonth - @CurrentMonth) % 100 BETWEEN 1 AND 12
would be correct i guess :)
HobbyProggy 3-Dec-15 9:06am View
Yes, if you go in your mind through your code (like i did) you will end up with this
201401-1 => 201400
201401-2 => 201399
But here your code says this is not < 13 therefore it wont display
HobbyProggy 1-Dec-15 8:11am View
Have you written any code for that yet?
Could you show us that code?
HobbyProggy 17-Nov-15 10:39am View
Why do you post the same Question twice? Or at least kind of that question?
HobbyProggy 17-Nov-15 8:12am View
Did you get an exception message ?
Also, do check if your connection String is correct :)
HobbyProggy 17-Nov-15 8:10am View
Did you get an exception message ?
HobbyProggy 17-Nov-15 7:05am View
What do you want to do with this programm?
It works fine, how do you think it would be more efficient?
HobbyProggy 27-Aug-15 2:27am View
Hi there, most times, the exception you get refers to a null value in a variable you got. So check every variable in your code if there is a null instead of an expected object.

Secondly, please provide more information, codesnippets, what you wanted to do and which site you mean.

HobbyProggy 28-Jul-15 8:16am View
Hellu? You have a Question?
HobbyProggy 2-Jun-15 9:20am View
I had this homework too, i can remember it wasn't that hard.
Let me have a look at it later, maybe i find something to push your mind to the solution ;)
HobbyProggy 2-Jun-15 9:00am View
1. Query please
2. DB structure
3. Testdata
4. Dependencies you want to create

If you can give us these points we might have a solution for you mate :)
HobbyProggy 1-Jun-15 4:47am View
Did you import it correctly and read all the information on this page? A missing Namespace is not a great problem, check if you have added all the reference you need to your project and reread the page i gave you. The MD Namespace is related to this given calendar, therefore i need to ask if you downloaded the Library or copied the code?
HobbyProggy 21-May-15 5:49am View
Further information ? Have you tried anything?
HobbyProggy 21-May-15 2:50am View
DO you have any additional information or some code to show where you tried?
As far as i understand it you just have to add the list of the datagrid column as a datasource to the combobox.

If that's wrong then please explain more
HobbyProggy 20-May-15 5:50am View
Is your Date YYYY/MM/dd ? If that would be the case i can tell you there is no 30th/31st of February :) not even a 29th
HobbyProggy 15-Apr-15 9:13am View
Wow, im deeply impressed by the quick replies!
Seems like now this topic is interesting...
Basic point why i did not want to post the code is because i was a little frustrated by the 1% of people that read this question.
Because i am not the a****le type of a coder i changed my mind on posting the code as soon as i get home.

What really disturbes me is that everybody is p***ed cause i didn't want to post code and now rants this whole question! If it was interesting in the beginning why did no one even bother asking anything?

That's all i wanted to say to that. As said code follow later
HobbyProggy 25-Mar-15 4:40am View
How could i make it more efficient?
HobbyProggy 23-Sep-14 8:37am View
okay :)
I am at work and had no chance to check that out till yet
HobbyProggy 21-Aug-14 5:13am View
Ah :) that might be a typo, sorry for that :/
HobbyProggy 21-Aug-14 4:46am View
Yes i know that, i tried to find out and can't make it out where the Problem is.
But as i am using a local databasefile i thought i might not Need a Server running as the file is the "Server"? Or am i getting something wrong on that?

As i mentioned the Connection is only not working in my code, i have full Access with the Server Explorer in VS.
HobbyProggy 21-Aug-14 4:33am View
The Problem is i can't create, connect with the Server Explorer to my .sdf, thats why i dropped that. The connect string to the .mdf database seems not working, as i open a Connection with my code i always get ther error Code:40 database/ Server is unable to connect.

But it seems like i found a solution proposed by my collegue to create a Connection string via the Settings file in the Project, i'll give that a try and then give a reply if it worked.
HobbyProggy 18-Dec-13 5:56am View
Didn't know this is Job portal
HobbyProggy 11-Dec-13 9:12am View
A little more information might help.
This literally tells me nothing but it doesn't work :/