15,790,976 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 Python questions
View PHP 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 NeverJustHere (Top 26 by date)
NeverJustHere
3-Nov-14 3:05am
View
Unfortunately, there is no automatic conversion from database values to Nullable int, so you need to code this yourself.
Use something like (from memory, so may need fixing):
NullableInt = dbField.IsNull ? Nothing : dbField.GetInt()
NeverJustHere
3-Nov-14 2:42am
View
Why do you not need this mystring.Replace("\"","s"); ??
NeverJustHere
3-Nov-14 2:40am
View
There is nothing wrong with using int for data that can be null.
The difference is the string type natively supports null, int does not. The string type is a little unusual in .net in this regard.
The int type can be wrapped around a null manager by using nullable<int>. This would be the correct way of representing any number that may not exist, rather than converting them all to strings.
NeverJustHere
15-Jun-14 2:58am
View
You will also have to read he terms of use of the websites you are scanning to make sure you are allowed to. There are many sites that get annoyed by this type of thing, and will actively look to detect and block you.
NeverJustHere
11-Jun-14 8:52am
View
If it's YOUR computer, then set up a scheduled job.
If it's the client running your code, then use javascript to refresh when the date changes.
NeverJustHere
11-Jun-14 8:49am
View
Your question is too vague. We need more details.
NeverJustHere
19-May-14 8:36am
View
Then maybe it reports errors without using an exception. You should read the documentation for the mail library you are using.
NeverJustHere
9-May-14 19:23pm
View
Is it possibly related to the length of the arguments? Try with a shorter argument length. I have a vague recollection of a 255 character limit, but that may be on older version of windows.
NeverJustHere
30-Apr-14 19:23pm
View
Apologies, I wasn't intending to be rude, but I can see what I wrote doesn't read nicely.
NeverJustHere
29-Apr-14 19:54pm
View
Try speaking in an American accent :)
I'm only half joking. The only experience I have with Speech to Text was a system installed in Australia in the late 90's using Dialogic Speech to Text recognition boards. The accuracy improved significantly when we got them to provide an Australian accented pattern.
We were only attempting to distinguish Yes/No answers over a telephone line.
NeverJustHere
28-Apr-14 12:50pm
View
Yes. You can do a cross join. It will join all rows of table A with all rows of table B.
NeverJustHere
20-Apr-14 9:21am
View
Yes it can be done with SSIS. This article seems to be a ood starting point for SSIS. http://www.codeproject.com/Articles/173918/How-to-Create-your-First-SQL-Server-Integration-Se
You say "I want my data to be update when my data source be update or change". Do you mean it really needs to be at the same time, or is a process that runs on a schedule sufficient?
If the update needs to be at the same time, there are a couple of more complex solutions you could look into:
1. Triggers to update the other database. These will have a performance impact, and a reliability dependency.
2. Database clustering - but this is more for performance concerns.
The other possible solution would be to use database replication. SQL Server has a replication system that will keep a slave in sync with a master database, with minor delay between changes propagating. It can be fiddly, and difficult to diagnose when something goes wrong. It also can use a lot of extra disk space.
NeverJustHere
19-Apr-14 17:23pm
View
Inf possibly means you are performing a divide by zero somewhere in the calculation.
Since we don't have the data you are using, we cannot determine exactly where the error is.
I suggest you put some debugging code in to see what all the divisions are actually doing. Hopefully then, the issue will become clear to you.
NeverJustHere
19-Apr-14 11:00am
View
There is a better way to do this.
If the databases are on different SQL Servers, you can create a link between them. http://technet.microsoft.com/en-us/library/ms188279.aspx
You can then access Server2 from Server1. So, in a SP on Server1, you can select * From Server2.Database.Table and fetch the data.
Then for scheduling, use a SQL Server Job. It can be set to execute a SP on whatever frequency you require.
That SP will then move the data from one server to another.
There is no need for a windows service for this.
NeverJustHere
18-Apr-14 9:24am
View
Two thoughts:
1. Run it through the profiler to see which parts are slow.
2. Try to re-write it to not use cursors. If this logic can be replaced with normal SQL set based operations, you shuld see a big improvement in speed. Cursors are slow.
NeverJustHere
17-Apr-14 19:27pm
View
I hope that is not real data you posted :)
NeverJustHere
15-Apr-14 13:05pm
View
Look at the definition of atoi. Is that really what you want to be doing?
As Sergey said - run the code in the debugger, put in break points, you can examine the values of the variables throughout each step of the loop. This is a really useful way of finding errors.
NeverJustHere
3-Mar-14 12:51pm
View
No.
This type of software is big and complex.
There is an open source system called Squid that you should look at if you wish to understand how these types of systems work in detail.
It is c/c++ codes rather than c#.
NeverJustHere
1-Mar-14 7:24am
View
Your question doesn't make any sense. Please edit and state more clearly what you are having trouble with.
NeverJustHere
26-Feb-14 15:33pm
View
Why do you want to split the data across multiple data tables based on data type?
Why is this better than having all the data in one table?
NeverJustHere
20-Feb-14 7:03am
View
OK, I understand better now.
You need to change the font to a fixed width font. This will be a property on whatever text control you are using.
The console uses a fixed width font. A fixed width font has each letter taking the exact same width.
As an alternatice, in Silverlight you could use 6 different text controls, and align them as you want. Then each of the controls gets a different part of the text.
NeverJustHere
19-Feb-14 15:25pm
View
I'm not quite understanding the problem here.
Is it that the upload is overwriting a previously uploaded image? If so, you need to make sure the upload filename is unique.
NeverJustHere
19-Feb-14 14:33pm
View
You should use the code formatting features available to make your code easier to read.
Have you looked at the source generated by the php script for any clues as to why it's not working?
NeverJustHere
19-Feb-14 10:45am
View
The in clause is equivalent to (T.SP_EAT_ID = 15 or T.SP_EAT_ID = 16).
You can see this when you use a column name that doesn't exist - you get an error for each value of the in clause.
The UNION ALL merges two result sets, on where T.SP_EAT_ID = 15, and one where T.SP_EAT_ID = 16.
These two ways of expressing the query look equivalent.
The difference between the your two queries is the impact of the TOP 1 and the ORDER BY statement.
The first query asks for the TOP 1 record, ie the first record in the unordered result set. This is up to the database to decide, and may be non-deterministic.
The second query asks for the TOP 1 record ordered by T.SP_EAT_ID, so the first record once the result set has been ordered by T.SP_EAT_ID. If the result set can contain multiple rows with the same value for this column, it may also be non-deterministic.
NeverJustHere
19-Feb-14 3:53am
View
The Row index is 0-based, not 1-based. This is why the for loop starts with i=0. When Rows.Count = 6, the 6 valid Rows[i] are where i = 0,1,2,3,4,5.
(Other languages would use 1-based arrays, but c# is 0-based)
If you try to access Rows[6], you are asking for the 7th Row, which doesn't exist - hence the error.
An alternate way of iterating through the Rows collection is to use the for each loop
Foreach (DataRow row in ds.Tables[0].Rows)
{
lstuser.Items.Add(row["FName"].ToString());
}
NeverJustHere
8-Nov-11 22:59pm
View
Deleted
So, what happens if the click point is not in any of the rectangles returned by GetTabRect? Maybe completely outside of them, or in-between them (assuming styling adds space between to adjacent tabs).
Sometimes simple, slower and safe is better is better than the alternative.
Show More