Click here to Skip to main content

Comments by Dave Kreskowiak (Top 200 by date)

Dave Kreskowiak at 8 hrs ago View
   
You have no choice but to scrap what you have and rewrite so that your service doesn't attempt to do anything with the users station. It's simply NEVER going to work.
 
You'll have to have a separate application that runs on the users desktop and accepts commands from the service over some IPC channel, like a named pipe. This second application can do whatever you want, like launching other applications because it is running as the user and in the users Desktop.
 
Dave Kreskowiak at 21 hrs ago View
   
Again, read the documentation.
 
The only thread that sleeps is the thread that calls Thread.Sleep. No other threads are affected.
Dave Kreskowiak at 23 hrs ago View
   
Your question doesn't make a lot of sense because windows don't have "unique names" like you find in code. They have integer window handles that uniquely identify them to Windows.
Dave Kreskowiak at yesterday View
   
You haven't read this entire thread, have you?
 
For the last time, NO, THERE IS NO WAY TO PUT UP A USER INTERFACE OR LAUNCH A PROCESS ON THE USERS DESKTOP FROM A WINDOWS SERVICE! THAT ABILITY WAS REMOVED FROM WINDOWS AS IT WAS DETERMINED TO BE A SECURITY RISK.
Dave Kreskowiak at yesterday View
   
Try not to reply to posts over a year old. Start your own thread with your own question.
 
The problem was more than likely database connection objects not being Disposed when the connection is no longer used.
Dave Kreskowiak at 4 days ago View
   
First, stop using TXTspeak. You've got a 101 key keyboard in front of you, use it.
 
Second, you never said what kind of problem you're having implementing the algorithm. No, nobody here is going to write your code for you.
Dave Kreskowiak at 4 days ago View
   
One word of warning. You didn't say what kind of application you're trying to run on the remote machine, but it can NOT be an interactive application, meaning that it cannot put up any kind of user interface on the remote machine. This is a security violation and is not allowed.
Dave Kreskowiak at 5 days ago View
   
Soooo you're saying your HR department is too lazy to send out an email?
Dave Kreskowiak at 19-Nov-14 14:49pm View
   
Without seeing your existing (working code) and what you've written in VB.NET, it's impossible to tell you what's wrong.
 
There's no such thing as a "FORTRAN Array".
Dave Kreskowiak at 18-Nov-14 23:56pm View
   
And? It's pretty much impossible to tell you anything useful if you don't say anything about the control you're using and in what kind of application you're using it in, and the code you're using to call it, and yada, yada, yada.
 
You've given us nothing at all to go on.
Dave Kreskowiak at 18-Nov-14 9:56am View
   
Your question makes no sense at all.
 
What does a command prompt have to do with a Windows Service app? What command are you using? Are you writing the code for the command? ...? ...? ...?
Dave Kreskowiak at 17-Nov-14 20:16pm View
   
Why would you save the image of a barcode? You just save the data that the barcode represents. If you need the image of the barcode again, retrieve the data from the database and generate the image from that.
Dave Kreskowiak at 17-Nov-14 11:54am View
   
That's not a sufficient definition.
 
"temp file in system" can mean anything and not all "temp files" have the same extension, so how are you going to determine what is a "temp file" and what isn't??
Dave Kreskowiak at 17-Nov-14 7:28am View
   
...and your definition of a "junk file" is what?
Dave Kreskowiak at 17-Nov-14 7:16am View
   
Yeah, he posted a couple of "questions". Both of them are "write my code for me."
Dave Kreskowiak at 17-Nov-14 7:14am View
   
Thanks for the 1-vote. Like I said, YOU are the only one who is going to do the work.
Dave Kreskowiak at 15-Nov-14 9:33am View
   
Your "question" isn't a question and doesn't make any sense no matter who many time you read it.
Dave Kreskowiak at 15-Nov-14 9:30am View
   
OK, so what is a "marquee" in this context?
 
What the hell does this mean: "All I get is a recording and I need all the records"??
 
You're using terms that do not apply to programming so it's impossible to tell you what you're doing wrong.
Dave Kreskowiak at 14-Nov-14 9:40am View
   
He already told you why it's not working.
 
Both of your signatures are {string}/{string}/{integer}. Since the first route matched always wins, the second one is never evaluated.
 
You cannot do what you want in your original post. You cannot have the controller name and actions switched an expect either format to work. It MUST be one way and used consistently throughout your web app.
 
To pull off what you want to do, you'd have to write your own implementation of the MvcRouteHandler.
Dave Kreskowiak at 13-Nov-14 23:09pm View
   
All you had to do was look at solution #1 and there's a link to an example.
Dave Kreskowiak at 11-Nov-14 16:43pm View
   
I seriously doubt that.
 
What I see you saying is that you tried copying and pasting code into your application and it doesn't work because you don't understand the code.
 
There's a ton of articles here on CP that explain what you're trying to do. I'm not going to write another one.
 
Read these: Storing Passwords[^]
Dave Kreskowiak at 9-Nov-14 13:05pm View
   
This is a setup question so another sock-puppet account can come by and post spam.
Dave Kreskowiak at 6-Nov-14 22:14pm View
   
Are you shitting me?? That gives you a KNOWN base path to start with, which GetCurrentDirectory will NOT do. You use the other methods to get the parent folder of that path, like putting that path into a DirectoryInfo object and then getting the parent of that directory.
 
DirectoryInfo path = new DirectoryInfo(folderPath);
string parent = path.Parent.Parent.Fullname;
 

There is a problem with what you're doing. When you release this code for production, the bin and Debug folders will not be there so hard coding a navigation out of the Debug folder (up two directory levels) will fail when you go to production.
 

 
Dave Kreskowiak at 4-Nov-14 23:39pm View
   
"The ground" isn't a well-known object. I doubt there will be any well-known objects in his particular application.
 
Frankly, it's a lot smaller and easier to use an ultrasonic sensor to get an altitude above ground level.
Dave Kreskowiak at 4-Nov-14 15:02pm View
   
Nobody insulted you. I've read through the posts a few times now and can't find where the problem is.
 
What I think he meant to say was "offending code", not offensive. In either case, it was a reference to the code that was throwing the exception, not a reference to you personally.
Dave Kreskowiak at 4-Nov-14 14:56pm View
   
Still won't work. Again, since your users are admins they can stop ANY PROCESS you start, even your "warning" process that monitors the installations.
Dave Kreskowiak at 3-Nov-14 9:44am View
   
You might want to ask a question, not tell us what you want to do. So far, all we can tell you is "permission granted, please proceed!"
Dave Kreskowiak at 1-Nov-14 12:43pm View
   
NO I can't provide you with code. Nobody can. This all depends on what your database table looks like and what code YOU are using to retrieve that data. How are you determining if a time slot is available? I have no idea what you're using and nobody else does either.
Dave Kreskowiak at 31-Oct-14 13:42pm View
   
Possible, but it's likely we'll never know. The chances are getting a reply on this question is very low.
Dave Kreskowiak at 29-Oct-14 17:23pm View
   
Considering we can't see the code that you're using to write this data back to the database, see your hard drive, your monitor or read your mind, it's pretty much impossible to tell you what you're doing wrong.
Dave Kreskowiak at 29-Oct-14 8:25am View
   
<SMACK!> WHAT ARE THE RETURN VALUES?!?!?!
Dave Kreskowiak at 29-Oct-14 7:59am View
   
To play a YouTube video? No.
 
Terms of Service also dictate that you MUST use YouTubes player to play the videos.
Dave Kreskowiak at 28-Oct-14 9:46am View
   
Your code is ignoring the return values from those function calls. You might want to look at those and see what the return values mean.
Dave Kreskowiak at 28-Oct-14 9:20am View
   
Depending on the version of IE you're supporting, this may not be possible. For example, Telerik's Upload control only supports multiple file select on IE 10 and above. On IE 9 and below, the user MUST select one file at a time to upload.
Dave Kreskowiak at 28-Oct-14 9:18am View
   
ASP.NET is a framework for generating web pages, nothing more. It has nothing to do with copying files.
 
All you need is the System.IO.File class to copy a file and the path to the source file. What that path is depends entirely on how the DVR exposes itself to Windows.
Dave Kreskowiak at 26-Oct-14 11:14am View
   
I don't know. I've never used the Google Maps API. This is when you start reading the documentation to see what the API offers to solve this problem.
Dave Kreskowiak at 24-Oct-14 16:31pm View
   
You're an idiot.
 
PEOPLE ARE ASKING YOU QUESTIONS AND TELLING YOU THINGS TO TRY AND ALL YOU'RE DOING IS SAYING "i am already updated the question with codes ..."
 
That's not going to get your problem solved.
Dave Kreskowiak at 23-Oct-14 12:55pm View
   
What the puck does this have to do with the question??
Dave Kreskowiak at 23-Oct-14 12:53pm View
   
"eject all variables in namespace"?? That makes no sense either.
 
I have no idea what you're talking about. This is probably because you're not using the correct terminology.
Dave Kreskowiak at 19-Oct-14 10:43am View
   
Upload to what kind of server?
 
Without knowing that it's impossible to answer your question.
Dave Kreskowiak at 18-Oct-14 19:47pm View
   
You first have to learn how to communicate with people. For example, we have no idea what your question is.
Dave Kreskowiak at 18-Oct-14 19:42pm View
   
Considering there is no "connection" between pages of text, your question makes no sense.
 
Now, if you wanted to APPLY the CSS styles to the HTML, that's entirely different.
Dave Kreskowiak at 18-Oct-14 18:12pm View
   
What's your definition of "link" in this case?
Dave Kreskowiak at 16-Oct-14 16:08pm View
   
Vote of 2: Considering you never said anything about what you're using this parsed data for, this "answer" has no real application to anyone else but yourself and this one project you're working on.
Dave Kreskowiak at 16-Oct-14 11:53am View
   
You're not listening.
 
You CAN NOT speed that line up! It's the Add() call that's slow and there's nothing you can do about it. It is NOT the "(char)(magic2.Read()) + Convert.ToChar(magic2.PeekChar()).ToString()" code that is slow.
 
You're an idiot for trying to stuff 1,000,000 items into a ListBox. THAT'S THE SLOW PART!
Dave Kreskowiak at 15-Oct-14 8:11am View
   
You STILL don't need the PictureBox control. You can paint the image yourself too.
Dave Kreskowiak at 15-Oct-14 0:35am View
   
That all depends on what you're using to get the .XML file in the first place.
 
You cannot control the headers from the client side. Those are specified by the server.
Dave Kreskowiak at 13-Oct-14 7:59am View
   
That screen shot tells us absolutely f***ing nothing!
 
We would need to see the code that is executing that script. Since you can't seem to understand that little concept, it looks like you're never going to get an answer to your question.
Dave Kreskowiak at 13-Oct-14 7:55am View
   
...and stop reposting the same question over and over in the same forum. Repeatedly doing this will only get you banned.
Dave Kreskowiak at 10-Oct-14 18:28pm View
   
Sorry, but I don't click on links I don't trust.
 
Also, your question has the word "error" in a couple of places, so...
 
Lastly, what do you think should be correct? I can't see that so I don't know what you're expecting.
Dave Kreskowiak at 10-Oct-14 8:14am View
   
Why is it every newb thinks that the error message isn't important?
Dave Kreskowiak at 10-Oct-14 7:58am View
   
https://www.google.com/?gws_rd=ssl#q=build+installer+with+database
Dave Kreskowiak at 8-Oct-14 13:16pm View
   
If you run it under the debugger, it will throw this message. If you run the Release outside of Visual Studio, it doesn't happen.
Dave Kreskowiak at 7-Oct-14 12:00pm View
   
Well, here's the problem. It doesn't matter what YOU want the location to be. It's what the SERVER want's the URL to be.
 
The solution is correct IF the image is in a folder under your website root directory, such as C:\inetpub\wwwroot\MyWebApp\UserDP\14.jpeg.
 
The tilde (~) character maps to the URL root of your site, such as "http://MyWebApp/. So, if the path specified is "~/UserDP/14.jpeg", the resulting URL will be "http//MyWebApp/UserDP/14.jpeg".
 
In YOUR code, since you used Server.MapPath(), the url is not valid since you're specifying a path that is only legal if the browser is running on the server!
 
Since you don't specify what the path is under your application root folder, this is about the best information you're going to get.
Dave Kreskowiak at 7-Oct-14 9:57am View
   
You really do NOT have an option here. The only way to get it to go is to fire off a web request to load that page, every 5 minutes. That alone will take a seperate .EXE!!
 
Dave Kreskowiak at 7-Oct-14 7:27am View
   
Yeah I was short on time.
Dave Kreskowiak at 6-Oct-14 8:07am View
   
What does this have to do with C#?
 
Have you tried Googling for it?
Dave Kreskowiak at 4-Oct-14 10:01am View
   
NO! It's plainly obvious that is not the case! In your example, the two operations have nothing to do with each other.
 
What you're missing is that there is another operator in that expression: && (and).
 
What you're seeing is called "short circuiting". In an AND operation, each side of the expression is evaluated separately, but, if the left side expression evaluates to false the right side expression is not evaluated.
 
That's why you're not seeing a NullReferenceException.
 
C# does short circuiting automatically. VB.NET requires that you use the AndAlso and OrElse operators to do the same thing.
 

Read: http://msdn.microsoft.com/en-us/library/2a723cdk.aspx
Dave Kreskowiak at 2-Oct-14 23:10pm View
   
Console app that runs from Windows Scheduled Tasks.
Dave Kreskowiak at 1-Oct-14 7:59am View
   
You add scripts to your installation that run on the server to create your database.
 
You also have to change the connection string in your application so that you're NOT attaching the database to the server in a user instance.
Dave Kreskowiak at 29-Sep-14 11:48am View
   
I quote: "I have tried everything what im I doing wrong?"
 
The first thing I would look at would be the URI source that you specified. This is where debugging skills come into play.
 
Dave Kreskowiak at 28-Sep-14 18:44pm View
   
Nope. Like I've said previously. I've never used the library.
Dave Kreskowiak at 28-Sep-14 9:48am View
   
That doesn't make very much sense. I THINK you want to hover the mouse over a point in the chart and have the value of that point show up in a textbox?
 
That depends on the charting library you're using and if it supports doing that. Since you didn't specify the library you're using to generate the chart images, it's impossible to tell you anything useful.
Dave Kreskowiak at 25-Sep-14 7:50am View
   
Deleted
Soooo instead of adding this information to your question by hitting the "Improve question" widget up there just under your post, you decided it was a good idea to post this as a "solution" to your own problem?
 
Not a good start...
Dave Kreskowiak at 23-Sep-14 14:30pm View
   
You're kidding, right? What do you mean "how do I determine..."? YOU wrote the code didn't you?
 
The default Main method is normally in a class called Program.
 
You have another Main method somewhere else in your code. Which one is correct is up to the logic you used when you wrote the code!
Dave Kreskowiak at 22-Sep-14 23:16pm View
   
Help you with what? You haven't said anything about what you're stuck on.
Dave Kreskowiak at 22-Sep-14 7:25am View
   
>SMACK<
 
Go back and reread what I posted. I hate repeating myself.
Dave Kreskowiak at 21-Sep-14 23:03pm View
   
Then why did you put the C# tag in your post?
Dave Kreskowiak at 21-Sep-14 20:12pm View
   
First, don't post additional comments as "Solutions"!
 
Second, you never showed any code that you're using so it's impossible to know what you're doing wrong.
 
Third, what library are you using to "mount" this image?
Dave Kreskowiak at 21-Sep-14 14:13pm View
   
What the %&#@ is a "dis code"??
Dave Kreskowiak at 21-Sep-14 14:11pm View
   
Really? I could have solved it simply by taking out those f'ing useless "for" loops to 1,000,000,000.
 
Oh well. To each his own I guess.
Dave Kreskowiak at 21-Sep-14 12:05pm View
   
Tag this a repost and see if the system kills it.
Dave Kreskowiak at 19-Sep-14 14:09pm View
   
From the client workstation? You don't have any options.
 
Any HTML formatter email will have to be sent from web server itself. You cannot do it consistently across browsers and email clients on the client side.
Dave Kreskowiak at 18-Sep-14 9:55am View
   
You're not giving it time to build up. You're actually preventing it from painting because you put the UI thread to sleep.
Dave Kreskowiak at 18-Sep-14 7:53am View
   
Don't answer a 3 year old question.
Dave Kreskowiak at 17-Sep-14 13:06pm View
   
You're going to have to be a lot more specific than that. WHAT PASSWORD? TO GAIN ACCESS TO WHAT?
Dave Kreskowiak at 16-Sep-14 15:28pm View
   
This made no sense at all. What's a "router"? What's a "node"? What do they have to do with PictureBoxes? How does this "file" fit into all of this??
Dave Kreskowiak at 16-Sep-14 15:19pm View
   
Yeah, but this little question is over 3 years old now. That tool is still a Developer Preview and didn't exist back then.
Dave Kreskowiak at 15-Sep-14 7:21am View
   
Yeah, I was in a bit of a rush last night.
Dave Kreskowiak at 15-Sep-14 7:13am View
   
Funny. It's no different than doing it on a wired interface. You just have to enable the option on the WiFi interface because it's normally not enabled by default if it's supported at all!
 
Dave Kreskowiak at 13-Sep-14 9:35am View
   
Yes, but your comment implies that there isn't a runtime for a C program. I assure you there is. Various versions of it are already installed with Windows.
Dave Kreskowiak at 12-Sep-14 22:38pm View
   
Not entirely. There are runtimes for those too, but Windows comes with the runtimes already installed.
 
Windows is mostly written in C.
Dave Kreskowiak at 12-Sep-14 20:04pm View
   
Uhhh... Spoon.Net doesn't do what your question is asking.
Dave Kreskowiak at 11-Sep-14 13:37pm View
   
You're going to have to do a better job of explaining your problem. I don't think anyone is going to figure out what you're talking about with the complete lack of detail you've posted.
Dave Kreskowiak at 11-Sep-14 10:49am View
   
"changed the target windows system"??? THere's no such thing anywhere is a solution. I have no idea what you're talking about.
 
As for "protecting" a .MDF file, look at http://www.codeproject.com/Questions/811766/How-to-protect-sqlexpress-mdf-file
Dave Kreskowiak at 11-Sep-14 8:11am View
   
OK. This is an unhandled exception message.
 
Did you look in the Application event log for an exception message from your application?
 
Did you distribute ALL of the .DLL files from your bin\Release folder with your app?
 
Does your application depend on SQLEXPRESS?? Is it installed on the target machine?
 
Does your app rely on a remote SQL Server? Did you change the connection string to point to that server?
Dave Kreskowiak at 10-Sep-14 23:42pm View
   
Would you care to specify what kind of server you're trying to send this file to?? The type of server dictates how you're going to "send the file".
Dave Kreskowiak at 10-Sep-14 20:37pm View
   
OK, so did you check all of your references to make sure they are using the 4.0.x runtime??
Dave Kreskowiak at 10-Sep-14 16:01pm View
   
OK, it sounds like there is a stack problem. If the stack gets too corrupted, there's no way for the code to backtrack to a known good frame to find an exception handler, or really to even continue running for that matter.
 
Interop you say? Are the string types the calling code is marshaling matching what the called code expects? If the code is expecting a BSTR and you're marshaling as a LPSTR, that'll screw things up pretty bad.
 
I don't know if that's going to be the case, but I have been bitten by it before. I just don't remember the app crashing the way you've described.
 
Dave Kreskowiak at 10-Sep-14 15:27pm View
   
Any 3rd party library being used? Could be blowing up in a call to that where .NET isn't going to see an exception.
Dave Kreskowiak at 10-Sep-14 9:55am View
   
Really? You can't type "Blackberry open serial port" into Google?? Are you f'in kdding me??
 
Wow. Look what I found: http://docs.blackberry.com/en/developers/deliverables/11938/Use_a_USB_or_serial_port_connection_508962_11.jsp
 

Holy sh*t! It's in the Blackberry SDK documentation!!
Dave Kreskowiak at 10-Sep-14 7:21am View
   
I know what you want to achieve.
 
Nothing in the answer changes and I have no idea what you have to do to a BlackBerry to get it to show up as a serial device on USB. That's what the documentation on the BlackBerry SDK is for.
Dave Kreskowiak at 10-Sep-14 7:18am View
   
The answer doesn't change. You have the same problem no matter what file type it is. Well, other than a .TXT file.
Dave Kreskowiak at 10-Sep-14 0:12am View
   
That's downloading the file. If there is a Word viewer of some kind installed that can handle the file, that component will display the file.
Dave Kreskowiak at 9-Sep-14 12:02pm View
   
OK, so you're device has to be setup to show itself as a Serial device on it's USB port. I can't tell you how to do that and it has nothing to do with your code. This has to be done in the configuration of the device itself.
Dave Kreskowiak at 9-Sep-14 9:36am View
   
Yes, you can. Your SQL command is nothing but a normal string. It just happens to contain text that an SQL server recognizes.
Dave Kreskowiak at 9-Sep-14 9:21am View
   
You're actually telling your SQL Server session to "USE DATABASE". But, first, your command is invalid because it should be "USE myDatabase; GO". And your command is completely useless because once the connection is closed, so is your session. Any future commands don't use that database.
 
You really don't even have to say "USE myDatabase" at all because your connection string specifies the database you're going to use.
 
Again, WHAT ARE YOU TRYING TO DO WITH ALL THIS??
Dave Kreskowiak at 9-Sep-14 8:02am View
   
You have to have an application on the device that also opens a COM port to talk to your application on the PC. Without that, only one side is talking/listening and there's no one on the other end.
Dave Kreskowiak at 9-Sep-14 8:01am View
   
The code isn't really complete, but are you Disposing the Bitmap you created?? It doesn't look like it!
Dave Kreskowiak at 5-Sep-14 12:57pm View
   
Permission granted! Please, proceed.
 
OH, AND STOP YELLING! Using all capital letters is the equivalent of walking into a room and screaming. Don't do it.
Dave Kreskowiak at 5-Sep-14 8:33am View
   
In that case, you REALLY need to get a beginners book on VB.NET and work through it. This is a very basic building block of programming and you can't afford to not understand it.
Dave Kreskowiak at 4-Sep-14 17:16pm View
   
Considering you never described any kind of a problem it's pretty much impossible to help you!
Dave Kreskowiak at 4-Sep-14 9:13am View
   
It throws an exception, huh? Why is it every noob thinks that the exception message is not important when asking a question about it??
Dave Kreskowiak at 3-Sep-14 9:56am View
   
No, I would describe your code as inefficient, unsupportable and monolithic. This is showing "beginners" how NOT to write code.
 
Seriously, just a brief look at what you posted and I can see at least 10 new methods that this could should be refactored into to make it more modularized and supportable.
Dave Kreskowiak at 2-Sep-14 12:14pm View
   
Sorry, I misunderstood what you were talking about.
 
Defalte kind of sucks as it only does one stream at a time. Read http://www.codeproject.com/Articles/313790/NET-Native-Multiple-File-Archive-Library for more information on how to use it to do multiple files.
Dave Kreskowiak at 2-Sep-14 10:30am View
   
Don't post a new "solution" if you're trying to respond to someone. Find the Reply button in their post and use that instead.
Dave Kreskowiak at 2-Sep-14 10:18am View
   
Then change the AND to an OR.
Dave Kreskowiak at 2-Sep-14 10:17am View
   
So what? I think Richards solution at the top is the best, but is a bit more complicated to understand.
 
My solution is easily understood and easily built using string concatenation, though I despise the method.
Dave Kreskowiak at 1-Sep-14 17:27pm View
   
Why is it every newb thinks that the error message isn't really important when asking a question about how to fix the error they mention nothing about??
Dave Kreskowiak at 1-Sep-14 14:13pm View
   
Stop posting the same question over and over again. This will only get you ignored.
 
We are all volunteers and answer questions on OUR TIME, not yours.
Dave Kreskowiak at 1-Sep-14 13:51pm View
   
You haven't said anything about what the problem is other than "it doesn't work". That doesn't help at all.
 
What error? What's the exception message? What do you expect this code to do? What is it doing?
Dave Kreskowiak at 1-Sep-14 11:38am View
   
Yeah, you're going to have to specify what line that crashes on.
Dave Kreskowiak at 31-Aug-14 16:46pm View
   
Since may people have already done this...
 
I can guarantee you that it's not as many as you think and you're not going to find but one or two of them here. The chances of them seeing your question are close to zero.
 
You go to where you will find the greatest number of people using the library in question, A forum dedicated to the library you're using!
Dave Kreskowiak at 29-Aug-14 8:29am View
   
No, you didn't. You didn't as anything at all to my answer.
 
Don't reply to questions over a year old and don't copy someone's else's answer.
Dave Kreskowiak at 28-Aug-14 19:35pm View
   
I never thought of that. Pretty slick!
Dave Kreskowiak at 28-Aug-14 16:39pm View
   
Rentering event handlers while they are still executing is one of those problems.
 
DoEvents is good for "simple" things, not the one described by the OP.
 
In order to use DoEvents, you must be VERY careful about preventing non-reentrant code from executing again, for example, a button click that starts a long-running process can be clicked again if you're not careful.
 
I say DoEvents is a method of last resort and prefer to use Tasks and Threads over anything else.
Dave Kreskowiak at 28-Aug-14 16:32pm View
   
This is why I was stressing showing us the code, not your opinion of what's going on.
Dave Kreskowiak at 28-Aug-14 8:48am View
   
50,000 records??? So to get to that point, you're going to force the user to scroll down, and scroll down, and down, and down, and down, and down, ... ad nauseum, to get to some record that's 40,000 records in? You really haven't thought this through, have you?
 
Use paging. It's a lot easier on you and even more so on the users you're trying to torture.
Dave Kreskowiak at 28-Aug-14 8:37am View
   
No, you're not. This is FAR more complicated to do than you realize.
 
First, what would happen if backup software or a virus scanner tried to open the file and nobody was logged in to type in the password?
 
Second, this needs to be written in C, not C# or VB.NET. NTFS extensions and Windows drivers are best written in C, not C# or VB.NET.
 
Third, how are you going to set passwords for each file? Where are you going to store them? How do you handle setting passwords on multiple files at one time? How are you going to handle recovering the files from lost passwords? ...? ...? ...?
 
This is not some simple little tool some newbie can whip up and expect to work. There's a reason you don't see this little application all over the web. It's very difficult to implement and offers no benefits at all beyond what NTFS security already offers.
Dave Kreskowiak at 27-Aug-14 19:03pm View
   
I asked for the code, not your opinion of what you think you did. It doesn't work because wheat the machine expects and what you THINK you did are two different things.
Dave Kreskowiak at 27-Aug-14 15:00pm View
   
What are you doing that you think you need to "hook" a file being opened??
Dave Kreskowiak at 24-Aug-14 12:57pm View
   
Yeah and a bunch of those downloader don't work anymore because of changes YouTube made to prevent this from happening!
Dave Kreskowiak at 16-Aug-14 10:41am View
   
Aww $*#%! There's isn't any upvote for comments! A virtual +5 +5 +5 +5 +5 +5 +5 +5 +5 +5 +5 +5 for you.
Dave Kreskowiak at 16-Aug-14 10:07am View
   
No, because we don't know anything about your requirements, and I suspect neither do you. I say that because "handle multiple rfids" is not a proper requirement. Define, in explicit detail, what the business case that needs to be solved is. Is this a situation where you're scanning badges for security? Are you unlocking doors with this access? How many doors are you securing? How many doors do you anticipate expanding to in the future? Are you supporting multiple buildings in the same system? How far from each door to a central location? Is an existing communication infrastructure nearby each location, i.e.: Ethernet network, premise phone wiring? Is there an existing system out there that meets all of your requirements without having to write any code?
 
If you think it's cheaper to write your own code, think again. How much do you get paid per hour? How long do you think it's going to take to write the system yourself and upgrade it? Chances are really good that off-the-shelf solutions are cheaper.
 
You're designing a system, not just a piece of software. Since you have no hardware, writing the software is a moot point. You have no idea what you're using for hardware, what it communicates over, how you're going to connect these devices to your computer, ..., nothing.
 
You have to define your requirements before you go off trying to find hardware to satisfy those requirements.
 
For example, it makes absolutely no sense to get a bunch of USB-based RFID readers when you're trying to attach them to doors for security. You'd have to put a PC near every door to do that. Ethernet-based RFIDs would be better for that case.
Dave Kreskowiak at 15-Aug-14 22:36pm View
   
What is this for? If it is what I think it's for, it's a pretty bad idea.
Dave Kreskowiak at 13-Aug-14 12:01pm View
   
Well, if you went through every solution, I don't know what else to tell you.
Dave Kreskowiak at 13-Aug-14 9:04am View
   
Do the system have Office installed on it? The same version that you built your code against? Does it have Visual Studio Tools for Office installed?
Dave Kreskowiak at 12-Aug-14 9:55am View
   
I already told you what to do.
Dave Kreskowiak at 12-Aug-14 9:53am View
   
I already told you what to do. I'm not "whipping up" an example just for you when there are a ton of them out on the web already. I've got my own code that I get paid to write.
 
Google for "C# Interprocess Communication" and start reading.
 
Dave Kreskowiak at 12-Aug-14 8:37am View
   
Again, without knowing what KIND OF SERVER, it's impossible to tell you what to do.
Dave Kreskowiak at 11-Aug-14 19:37pm View
   
Yes you can.
Dave Kreskowiak at 11-Aug-14 19:36pm View
   
And that means what to me?
Dave Kreskowiak at 11-Aug-14 19:35pm View
   
You're pushing DropBox as a solution for very different problems and this problem doesn't lend itself to it at all.
 
This problem description sounds a LOT like a database representation problem and you're pushing a file replication solution on it. Very weird.
Dave Kreskowiak at 11-Aug-14 18:14pm View
   
He meant what type of app are you writing? Windows Forms, WPF, ASP.NET, ....???
Dave Kreskowiak at 11-Aug-14 18:06pm View
   
OK, and the @model definition at the top of your Index view for that controller??
Dave Kreskowiak at 10-Aug-14 10:58am View
   
OK, get off the DropBox addiction. It's not a solution for everything and all you're doing is storing data in a text file.
Dave Kreskowiak at 10-Aug-14 10:50am View
   
C/C++.
 
If you're going to ask how to code it, don't bother. The answer requires writing an entire book.
Dave Kreskowiak at 9-Aug-14 10:23am View
   
If you can't do something so simple, you're way over your head on this project. You REALLY need to pickup a few books and work through them, like C#, MVC, and Entity Framework.
 
I HIGHLY RECOMMEND IT.
 
In Visual Studio, click once on the word DateTime, and then hit F1. Read the documentation on the DateTime class and those methods that all start with "Add".
Dave Kreskowiak at 8-Aug-14 10:44am View
   
Not really. Well, nothing that you can copy and paste into your code and expect it to work. This is for a couple of reasons.
 
First, we know NOTHING AT ALL about your existing code.
 
Second, there is actually very little code to write. It's more View and ViewModel than it is any real "code".
 
Basically, the core of what you're asking comes down to this in your controller code for authentication:
 
if (DateTime.Now > userObject.PasswordExpiredDate)
return RedirectToAction("PasswordChange", "Index");
 
Happy now?
Dave Kreskowiak at 8-Aug-14 10:32am View
   
There is no tool that will do the conversion for you perfectly. YOU are going to have to at least fix the code by hand yourself. Nobody is going to do the work for you.
Dave Kreskowiak at 7-Aug-14 8:36am View
   
I don't have time to write up an example.
 
It's not hard at all if you know the basics of MVC.
 
You already built your model, so I take you already know how to do a database query to retrieve your user.
 
Do you know how to put up a form and post the data back in MVC? If not, you really need to pickup a book on MVC and work through it. This is very basic stuff.
 
When a user submits their credentials for login and your controller gets called to authenticate those credentials you simply check the current date time against the expired time in the database. If the password is expired you simply RedirectToAction (HINT!) to another action in your controller that shows the password change view.
 
If you don't know how to do RedirectToAction or how to return a View from a controller, you REALLY need to learn the basics of MVC.
 
Dave Kreskowiak at 6-Aug-14 12:39pm View
   
All I said is that may not be a desired effect for other users.
Dave Kreskowiak at 6-Aug-14 8:38am View
   
You forgot to mention a side-effect of your solution. If there are other rows/columns with percentage heights/widths, you're changing the layout of the entire TLP and all controls will move/grow/shrink (depending on docking) to take up the space. This may not have a desired effect.
Dave Kreskowiak at 6-Aug-14 8:25am View
   
Yeah, about that. Either you've not explained your requirement in enough detail or you're going about this the hard way and will find that it is indeed not the solution you're looking for.
 
Good luck.
Dave Kreskowiak at 6-Aug-14 8:23am View
   
I don't know as I've never used the Facebook API and probably never will.
 
That's what reading the documentation on the API and the Facebook Developer forums are for.
Dave Kreskowiak at 5-Aug-14 18:42pm View
   
OK, weird.
 
Since a web server/WCF service cannot push notifications to clients a better solution would be to poll for the mutex in a Windows Service app.
 
What you do with that information is up to you. A web site could connect to the service over a named pipe and talk to it for the data it needs.
 
Dave Kreskowiak at 5-Aug-14 12:46pm View
   
WHAT??? A website? WHY? What's the point of this?
 
Why would a website be monitoring a mutex?
Dave Kreskowiak at 5-Aug-14 12:43pm View
   
I think you REALLY need to pickup a book on MVC and work through it.
 
You NEVER modify your Model classes just to pass them to the View. You create ViewModel classes that take the information from the Model classes and any additional data the View may need to display/edit the data.
Dave Kreskowiak at 5-Aug-14 8:34am View
   
You're going to have to define what you mean by "good"?
 
You could also just Google for "WPF Gauges" and start browsing to find what fits your definition.
Dave Kreskowiak at 5-Aug-14 8:23am View
   
What problem? What you wrote made no sense at all.
Dave Kreskowiak at 4-Aug-14 15:49pm View
   
Do NOT reply to 3 year old questions!
 
Besides, internally, the .NET Framework uses code that is not very far off from what the OP ended up using.
Dave Kreskowiak at 4-Aug-14 14:10pm View
   
OK, so did you put code in to SaveChanges back to the database? It doesn't look like it.
Dave Kreskowiak at 29-Jul-14 14:30pm View
   
Where I'm at, everyone has full permissions to the ProgramData folder.
 
In your case, it's easily fixed. Just create a folder under CommonAppData and then give Everyone Read/Write permissions to it.
Dave Kreskowiak at 29-Jul-14 13:34pm View
   
Other users on the machine will have normal read/write permissions to the files so long as they are not already open by another user at the same time.
 
Unless you've got more than one user logged into the console at the same time, it'll work.
Dave Kreskowiak at 29-Jul-14 7:06am View
   
You simply put the .DLL's in the same folder as your .EXE. That's it. You can add them to the project so they get copied automatically into your bin folder when you compile the app but that's only for convenience.
Dave Kreskowiak at 28-Jul-14 13:12pm View
   
Yeah, DependencyViewer will show you the function names, but there is no tool to give you the parameters list.
 
The parameters list can be figured out by examing the code in the library for how it's values are popped off the stack. If YOU want to walk him through that, be my guest. I don't have a months worth of time to do it.
 
:)
Dave Kreskowiak at 28-Jul-14 12:19pm View
   
Yep. You MUST have the documentation on it in order to use it.
Dave Kreskowiak at 27-Jul-14 10:42am View
   
You didn't specify what app type this is. Is this a Windows Forms app, WPF, Silverlight, ASP.NET, ... what?
 
Yes, the answer is entirely dependent on this information.
Dave Kreskowiak at 27-Jul-14 10:25am View
   
No. I meant "COM36" doesn't exist. It may come up as a different post ID. Look in Device Manager under Ports to see what it is.
 
Dave Kreskowiak at 26-Jul-14 9:48am View
   
By writing all the database code yourself and not depending on the data designers to do it for you.
Dave Kreskowiak at 22-Jul-14 8:25am View
   
Wow. You gave him a fish to eat instead of teaching him how to catch fish for himself. Congratulations. You've taught him nothing.
Dave Kreskowiak at 20-Jul-14 13:44pm View
   
All you have to do is Google for "C# Salt password" and you'll come up with all kinds of examples.
Dave Kreskowiak at 20-Jul-14 11:24am View
   
None of this makes any sense at all considering databases store DATA not "WORKERS", whatever that means.
 
You cannot call a method in your application from the SQL Server. Newer versions of SQL Server, however, can use what are called CLR Stored Procedures. https://www.google.com/#q=sql+server+clr+stored+procedures
Dave Kreskowiak at 19-Jul-14 9:17am View
   
We'd like to but your English is so bad that we can't understand what you're wanting to do!
Dave Kreskowiak at 18-Jul-14 15:00pm View
   
I can appreciate that English isn't your native language but none of that question made any sense at all.
Dave Kreskowiak at 17-Jul-14 13:03pm View
   
Why are you responding to 3 year old questions?? DON'T!
Dave Kreskowiak at 15-Jul-14 23:48pm View
   
I don't use DropBox.
 
Probably because they went through the pain of researching every browsers support for this an implemented separate support modules for each browser they wanted to support.
Dave Kreskowiak at 15-Jul-14 14:13pm View
   
Sometimes I have to cry looking at the state of this industry and the direction it's going.
Dave Kreskowiak at 15-Jul-14 12:42pm View
   
What account is the Task scheduled to run under?
Dave Kreskowiak at 15-Jul-14 12:39pm View
   
So f'ing what? And hashes are usually stored as byte arrays, not strings.
 
You obviously have no idea what a cryptographic hash is.
 
A hash is a lossy algorithm that generates a value that can NOT be turned back into the string it was derived from. Security like that is the entire point of using a hash!
Dave Kreskowiak at 15-Jul-14 8:30am View
   
Look at the vast amount of information you gave us to examine what you're doing and, more importantly, how you're doing it, and tell me if you think anyone can answer that question.
 
Without seeing exactly how you exported this data it's impossible to tell you what you did wrong.
Dave Kreskowiak at 15-Jul-14 8:08am View
   
No.
Dave Kreskowiak at 15-Jul-14 8:07am View
   
Procrastination on your part is not a justification for being demanding.
Dave Kreskowiak at 13-Jul-14 20:12pm View
   
The problem with this is the assumption that something is actually listening on the other end. The port may be available for connections but there's no universal way to tell if the server is responding on it.
Dave Kreskowiak at 13-Jul-14 19:27pm View
   
First, pictures of code and message don't mean much.
 
Second, you're question makes no sense at all, even with the picture.
Dave Kreskowiak at 13-Jul-14 11:33am View
   
I gave him the points too!
 
After looking at the bottom of that article, I'm kind of interested in taking a crack at converting the C code for the Sieve of Atkin he linked to C#. When I have time...
Dave Kreskowiak at 13-Jul-14 11:33am View
   
I said that your solution was no different than the code he already has. It's not faster than what he's got and therefor not an answer to the question.
Dave Kreskowiak at 13-Jul-14 11:21am View
   
Get's my 5. I used that algorithm to implement my sieve when I did a bunch of the Project Euler problems. Millions of primes generated in milliseconds.
Dave Kreskowiak at 13-Jul-14 11:19am View
   
It's good, but not fast enough for my tastes.
 
I wrote an implementation of the Sieve of Eratosthenes that can generate a list of primes, up to 10,000,000 in under 170 milliseconds, on a 4 year old machine.
Dave Kreskowiak at 13-Jul-14 11:06am View
   
That's really no different than what he has already. That's also the slowest way to generate a list of primes.
Dave Kreskowiak at 11-Jul-14 23:23pm View
   
OK, so what kind of server are you talking about? FTP? HTTP? SMB? what?
Dave Kreskowiak at 11-Jul-14 10:32am View
   
Don't you think this question would be better responded to on YouTube's developer forums? After all, there you're going to find the largest concentration of users who have used the API. Here, you're not going to find many at all.
Dave Kreskowiak at 11-Jul-14 7:41am View
   
I don't know which jackass gave you a one but I countered.
Dave Kreskowiak at 10-Jul-14 18:10pm View
   
https://www.google.com/#q=visual+studio+2008+crystal+reports+redistributable
Dave Kreskowiak at 10-Jul-14 9:53am View
   
Really? You're going to put more faith into a bunch of strangers who know less about you than your advisors? Doesn't quite make sense to me, but OK.
 
So, what's the question? You really haven't asked one, other than "what language should be used for ...". That's easy to answer. Whatever language you're comfortable in.
Dave Kreskowiak at 10-Jul-14 9:48am View
   
"Check" can mean anything at all. If you want to write code to "check" what was entered, you're going to have to define, in nauseating detail, what you mean by "check". If you can't describe it to us, how on earth are you going to describe it to a computer?
Dave Kreskowiak at 10-Jul-14 0:52am View
   
Don't post the same question in multiple forums. It makes collaboration on an answer a royal pain in the ass.
Dave Kreskowiak at 8-Jul-14 11:16am View
   
Are you doing this for a fun project so you can learn or are you trying to write production code that will be used by a real bank?
Dave Kreskowiak at 7-Jul-14 23:35pm View
   
You don't Import classes. You can remove the System.Data.SqlClient.SqlConnection and System.Io.Directory lines.
Dave Kreskowiak at 7-Jul-14 21:29pm View
   
Since you've told us absolutely NOTHING about your application and what it's doing in the code when the error occurs it's impossible to tell you anything useful.
Dave Kreskowiak at 7-Jul-14 21:27pm View
   
You could also just do it like this:
 
Dim f As New FolderBrowserDialog
 
VB.NET doesn't really care about the parenthesis in a New like C# does.
Dave Kreskowiak at 6-Jul-14 16:56pm View
   
On what line did the exception occur?
Dave Kreskowiak at 5-Jul-14 19:13pm View
   
I'd just try and get a speech recognition app working first.
 
If you'll notice, there's already a little microphone in the textbox you type in on Google. It already has speech recognition built into the page. Click on that icon and it'll listen for your voice.
 
You also haven't asked a question. All you did was state what you wanted to do. So, permission granted! Please proceed.
Dave Kreskowiak at 29-Jun-14 20:14pm View
   
Your question isn't answerable.
 
What do mean "control the size of the files before storing"??
 
What path? The path of the file on the client machine or on the server? If it's the client, that pretty useless information.
Dave Kreskowiak at 28-Jun-14 10:02am View
   
Since the java code runs in the browser and is running in a restricted sandbox, the code cannot see the SUB hardware on the machine. This will not work.
Dave Kreskowiak at 28-Jun-14 10:01am View
   
This will NOT work in an ASP.NET application.
Dave Kreskowiak at 28-Jun-14 10:01am View
   
This will NOT work in an ASP.NET app.
Dave Kreskowiak at 27-Jun-14 9:12am View
   
Rewrite your question in the body of the post instead of the subject line. Your question is being cut off because it's to long for three subject line.
Dave Kreskowiak at 24-Jun-14 13:03pm View
   
On top of that, the code you found fires the Timer every 5 seconds. The Elaplsed code should be checking the current time against the scheduled time to determine if the code you want to run on the schedule should be executed.
 
If you didn't do that and just set the Timer for 12 hours, you'd be getting a 12-hour delay before your "scheduled code" would execute, starting from the time the first request comes in to your website.
Dave Kreskowiak at 24-Jun-14 12:58pm View
   
This doesn't make any sense. All you need is the two methods in the Global.asax file. What you're talking about isn't even part of Global.asax and would have no impact at all on how Global.asax runs.
 


Advertise | Privacy | Mobile
Web04 | 2.8.1411023.1 | Last Updated 1 Jan 1900
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid