15,998,027 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 .NET 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 snorkie (Top 55 by date)
snorkie
29-Aug-24 15:06pm
View
Where is the code you wrote? Please include that.
snorkie
15-May-24 16:05pm
View
It looks like a very similar question was asked and answered on this site. This should lead you towards what you need to do.
https://www.codeproject.com/Questions/40990/Detecting-if-a-key-is-pressed-outside-the-key-even
snorkie
15-Mar-24 14:25pm
View
Thanks, updated.
snorkie
11-Nov-21 13:04pm
View
Right,should have had my coffee first.
snorkie
15-Sep-21 12:48pm
View
Try looking at https://datatables.net/ it has many interesting ways to output a table and is basic javascript.
snorkie
21-Oct-16 12:41pm
View
Sure, one simple thing, near the bottom,
if (birthday2 == "1/1/0001 12:00:00 AM")
That value on the right is the same as DateTime.MinValue that enum is better than a string.
Also look at int.TryParse method as a safer way to turn user input into a number safely.
snorkie
26-Apr-16 8:25am
View
Correct, the code I provided was a starting point to build further on. Was just trying to direct you in the right direction.
snorkie
21-Apr-16 11:03am
View
SDELETE doesn't have any flags that will do this. Do you have to use sdelete? A simple recursive function would do this.
snorkie
1-Mar-16 9:28am
View
How didn't it work? If I update the example to use the two dates you mention in your example, they return the week number that you want. Provide more feedback if you want more help.
snorkie
8-Feb-16 15:11pm
View
http://bfy.tw/49fS
snorkie
4-Feb-16 14:29pm
View
I don't have access to that version. Try removing all references to iTextSharp from your Solution (not just the project you're on). Then add it back in.
snorkie
20-Jan-16 13:03pm
View
This is a very subjective question. Maybe consider searching CodeProject first...
http://www.codeproject.com/Articles/717523/Top-NET-Based-CMS-Content-Management-System
snorkie
18-Jan-16 14:10pm
View
Yes, when you pass the query string into SQL server, it will recognize the SQL function and run it.
snorkie
17-Jul-13 9:12am
View
One more thing to try before I give up... Change to:
SET @sSQL = @sSQL + ' AND tbl_Reim_Detail.Claim_Amount ='+ CAST(@Claim_amount AS Numeric)
Hogan
snorkie
28-May-13 13:25pm
View
Start by taking out the
where tsl.skill_level.Contains(RadioDisplayLevel.SelectedItem.Text)
and see if it returns any results. If not, then you know that your joins are not correct.
snorkie
15-May-13 8:14am
View
Try the following:
// sleep for 1 second
sleep(1);
http://php.net/manual/en/function.sleep.php
snorkie
13-May-13 14:29pm
View
If you're just trying to prevent people from writing a script to guess passwords, put a sleep of 500 miliseconds into each login attempt. This will not seriously affect good users, but will make it too slow to script password guessing.
snorkie
24-Apr-13 13:30pm
View
can you elaborate on what it is doing.
snorkie
11-Apr-13 13:33pm
View
Are you asking for the public/external IP address(es), or the local LAN address(es)?
snorkie
11-Apr-13 13:30pm
View
Guess you're gonna be in trouble!
snorkie
14-Jan-13 16:27pm
View
Have you tried turning it off and back on?
snorkie
27-Dec-12 9:19am
View
Try it and see what happens!
snorkie
27-Dec-12 9:17am
View
Its worth mentioning that the solution I have suggested covers things like "private browsing" mode.
snorkie
27-Dec-12 9:16am
View
This doesn't take care of other browsers. It is simple, but only for IE, and it doesn't cover "private browsing" mode.
snorkie
24-Dec-12 10:01am
View
try adding some debugging: http://php.net/manual/en/function.mysql-query.php is a great place to start with query examples and debugging to go with it. see if they query returns true or false. I bet it'll end up being a permission issue.
snorkie
24-Dec-12 9:01am
View
What is the error you're getting from the database?
snorkie
24-Dec-12 8:58am
View
change the font :) Seriously, please help us understand the context of the problem so the correct solution can be offered.
snorkie
14-Dec-12 9:20am
View
Do you want help for C# or javascript?
snorkie
12-Dec-12 18:04pm
View
Use the System.Process.Start() method. I've provided the MSDN link below with an example. As long as the machine has a mime type set up (you can double click and it opens), Windows will figure out what application is used and open it up. So place the full UNC path (if you can) or local path of the file and it'll open with your PDF viewer.
System.Diagnostics.Process openPDF = new System.Diagnostics.Process();
openPDF.StartInfo.FileName = "Your File Path.pdf";
openPDF.StartInfo.UseShellExecute = false;
openPDF.StartInfo.RedirectStandardInput = false;
openPDF.StartInfo.RedirectStandardOutput = false;
openPDF.Start();
http://msdn.microsoft.com/en-us/library/e8zac0ca.aspx
snorkie
12-Dec-12 16:44pm
View
It depends on your environment. I often deal with files in other cities/country as if they were sitting next to me because the network was set up for files/server to be local.
snorkie
12-Nov-12 15:25pm
View
Have you tried counting a column instead? Try COUNT([FailureModels].[Id])
snorkie
23-Oct-12 14:06pm
View
Fair enough.
snorkie
23-Oct-12 13:47pm
View
How would you recommend that I add additional information then? I thought this link would be useful to others...
snorkie
24-Jul-12 10:46am
View
Glad I could help. Good luck your app and have fun!
Hogan
snorkie
24-Jul-12 10:18am
View
Post the SQL you have tried and I'll help you get it straightened out.
snorkie
23-Mar-12 15:40pm
View
Please help us understand what you are trying to do. Its generally not a good idea to modify the resx as its a system file. There is probably a way to do it in your class instead.
snorkie
14-Feb-12 10:13am
View
That's fair. Thanks for your response.
snorkie
13-Feb-12 14:16pm
View
Christian, that's a bit harsh. Not everybody is a gifted programmer. Looking at the last post and the current post, the answers were not easy for a beginner. Using phrases like "member variable" may not mean anything to a newbie. I'm hoping that the simple solution I provided as number three will be enough to get him/her moving forward and gain some confidence. I think we get stuck on elegant solutions sometimes and need to refocus on dead simple.
snorkie
13-Jan-12 16:59pm
View
CodePrakash, you need to provide more information if you want help. Are you using a third party licensing tool, or do you want to create your own licensing?
snorkie
22-Nov-11 9:47am
View
What error are you getting?
snorkie
12-Oct-11 14:18pm
View
Can you provide more information. What isn't working? What database technology are you using and maybe something about the process you're trying now.
snorkie
28-Sep-11 16:31pm
View
See my improved answer. Good luck!
Hogan
snorkie
15-Sep-11 14:38pm
View
Instead of creating a service that constantly hits the database and check to see if a user is logged on, could you put that logic into the log in process. If a user is trying to log in and the database shows no activity, then auto log that expired session and start a new one. The benefit here is not processing the data for all users every couple of minutes. This would be a very focused query that minimizes resources and only runs when it is necessary.
Hogan
snorkie
28-Aug-11 16:22pm
View
The hosts file is located in %windows%/system32/etc/hosts [no extension]. Add the DNS name like "www.codeproject.com" and then point it to another location like 127.0.0.1 and nothing will show up.
For the second example with fiddler, check out the API for fiddler at http://www.fiddler2.com/fiddler/dev/
It requires custom development, but it does have great examples to get you started.
For the third example, I'm not sure. From all the research I have done a NDIS driver is about as good as it gets.
Emilio had several great points in his solution he mentioned. Based on the environment you're going to be in and the savvy of the users, it will decide your solution. Ultimately, everything that is done can be undone.
Hogan
snorkie
19-May-11 20:37pm
View
You need to use caution with this approach to account for a change in time zones. If a user travels several time zones away, you could incorrectly invalidate a license with this method. I like your approach, but maybe consider a 30 hour window before disabling the license.
Along these lines, it is possible to keep track of how long the program has been in use and compare that with dates to ensure that the time does not roll back too far.
snorkie
19-Apr-11 16:22pm
View
Why is it that somebody always has to ask "Why are you doing this" when somebody asks an honest question? wouldn't it be easier to answer or not answer. It seems that people are reamed when they don't make their question specific enough, but people can ask this generic question and get away with it.
To shanku.shau: Are you asking for the mouse not to work within your application, or in all of Windows when you are running?
snorkie
24-Mar-11 14:29pm
View
No offense taken. I wanted to clarify my answer.If I'm wrong, then I need to know so I stop making mistakes. This is a great way to validate/refute what I do every day. The .TryParse method has saved me lots of headache for unvalidated input. --Hogan
snorkie
24-Mar-11 14:07pm
View
I agree that the problem is about catching a null value. However, the code I posted will catch a null via the .TryParse method and I understand it to be much safer if other invalid values are passed in. Sorry that you didn't like it! Good luck! --Hogan
snorkie
25-Jan-11 14:39pm
View
Is this something that needs to be real time, or a one time change. For a one time change, I recommend using a tool such as Red Gate SQL Compare(http://www.red-gate.com/products/sql-development/sql-compare/) they have a 14 day trial to see if you like it.
If this is something that needs to be dynamic, can you provide a sample table with columns and how you need it changed. Hopefully you don't have to change column types often at run time.
Finally as a crazy idea, and one that I don't recommend, why don't you put all of your variables in the database under the nvarchar type. Then when you put anything in, you do a .ToString() and when you pull it out, convert it back to the intended type.
snorkie
19-Jan-11 15:13pm
View
Thanks for the answer. Now all I have to do is figure out why it works :) Time to study! --Hogan
snorkie
19-Jan-11 14:40pm
View
Yes, I just noticed that it did swallow part of my copy/paste. Thanks for the clarification.
snorkie
19-Jan-11 14:34pm
View
Sorry, I got that backwards. For an XmlNode of "profile"
.InnerText returns "pp4.PowerProfileID.01".
.InnerXml returns "pp4.PowerProfileID<hour minutes="0">.01"
.value returns <null>
What i wanted is "pp4.PowerProfileID"
I don't mean to state that the .NET framework is wrong. I'm just surprised by the results. Trying to figure out if the XML was designed wrong, or I'm just trying to get at the answer the wrong way.
snorkie
19-Jan-11 13:47pm
View
I'm actually looking for the text from hour's parent node.
snorkie
19-Jan-11 13:47pm
View
Thanks, but innerXML will return "pp4.PowerProfileID<hour minutes="0">.01" when I am only after "pp4.PowerProfileID"
snorkie
19-Jan-11 13:32pm
View
I did not mean to suggest that the DOM implementation of .NET was bad, just the design of the XML document I am working with.
Show More