|
Thank you all, I have similar approach like one in http://peteohanlon.wordpress.com/2008/01/04/extending-linq/, and it is works. But I wonder (because of speed performance) about something like http://msdn.microsoft.com/en-us/library/bb386921.aspx (Creating a Custom CopyToDataTable<T> Method). They said "The existing CopyToDataTable methods only operate on an IEnumerable<T> source where the generic parameter T is of type DataRow. " but wondering is there something equivalent to CopyToDataTable method for IQueryable<T>? Probably not, but maybe somewhere someone offers equivalent method...
I have working function now, but looking for speeding it.
|
|
|
|
|
|
|
I have a project needs to help of people.
My project is : Neural networks use some character recognition ("0", "2", ..., "9") with the character of the image was prepared on the computer as different fonts.
appreciate the early response of people.
thanks.
|
|
|
|
|
read "how to get an answer" on this page. Then try again. Or not.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
|
|
|
|
|
And what have you implemented so far?
My signature "sucks" today
|
|
|
|
|
From the looks of it, just that post.
|
|
|
|
|
Refer to sig
"I need build Skynet. Plz send code"
|
|
|
|
|
if (DateTime.Now() < JudgementDay)
{
ActNormal();
}
else
{
DestroyAllHumans();
}
Voila, my fee is a billion pounds mwahahaha~
|
|
|
|
|
Hi guys,
I've an application and service, whereby when the application exits, the service will open up the application once again. It will be opened as the local account user by the service, instead of system. But somehow the temp folder is pointed to c:\windows\temp instead of the current user's temp folder. This only occurs in Windows Vista and Windows 7, probably due to the new security settings. Can anyone provide me with some help? thank u in advance for your support..
|
|
|
|
|
It's because the service wasn't installed under the user's account (it's probably using System, or something like that). Vista and Win7 are more strict about crossing user boundaries.
What you *could* do is make change the app to put its data file in the common program data folder (I forget the exact SpecialFolder to use, but I know you can do it). At that point, any program should be able to get to it.
One possible caveat to this approach is that you may have to write your own code to access the file instead of using the built-in Settings object.
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
Hi all,
I'm trying to parse the content of a page downloaded into a WebBrowser control.
I know that I can access the content of a web page accessing the Document.Body.InnerHtml element, but I cannot access the result of an Ajax request that the page makes after (I think) the completion of the page download. I.e., I can access the static content of the ajax request result (the ones contained in the static html page), but I cannot access the dynamic content for example shown into tooltips that appear when I pass the mouse over a control of the page.
I know from the code that is contained into the DocumentStream that the dynamic content (a table) has been already downloaded in a variable (I know its name) and reused each time I pass a mouse over a control of the page using the onmouseover event, but how to get the content of the table?
May I invoke (from C# code) one of the java functions already present in the Document code, that are used to generate the content of the page starting from the table variable? These functions are normally used from the dynamic page to get the html result that normally is used to fill (referring to the example before) the tooltip that appear when I pass over the controls? I could use this functions, if possible, to extract the content of the table that I need.
Any suggestion?
Thanks, any help is very appreciated
Leo
modified on Tuesday, May 25, 2010 7:36 PM
|
|
|
|
|
|
Hi aspdotnetdev,
Thank you very much. Very clear and concrete.
One more request.
How to access global variables of the javascript, or otherwise, how to execute a javascript function that returns the global variable if the javascript function does not exist in the html code of the loaded page?
In this latter case, I could create a custom code to execute a javascript function that returns the content of the global variable or its field if it's a structure.
Thank you very much for your previous reply.
|
|
|
|
|
|
To make a long story short, I created an FTP test application using the FTPWebRequest and FTPWebResponse classes. When I run this test application on my computer (the development computer), it works. However, when I run it on a second computer, it fails with error code: The remote server returned an error: (503) - I can't remember the rest of the error code. Also, I can open up windows explorer and ftp to the server with no problems. Is there some sort of security settings that I need to enable on the second computer? They both have the same .NET frameworks.
P.S. I don't need anyone to post links to existing FTP client programs that have already been written. I need this code as a .dll so that I can import it into a .NET based program and just wrote the test application to test the .dll.
Chase Davis
|
|
|
|
|
Chase Davis wrote: The remote server returned an error: (503) - I can't remember the rest of the error code.
First rule of problem resolution: Make a careful note of any error messages and try to determine why you are receiving them; see here[^].
It's time for a new signature.
|
|
|
|
|
Thanks for the response. My question was not necessarily what is the error code. It was more of a question of why would ftp through windows explorer work and the FtpWebRequest not.
Chase Davis
|
|
|
|
|
Please confirm: Was it a 503 error or a 530 error? (I list them because of the obvious possibility of transposition of digits)
503 is Bad Sequence of Commands. Do you have KeepAlive set true? It needs to be set false. Make sure not to set it after making any call to GetRequestStream, BeginGetRequestStream, GetResponse, or BeginGetResponse. Doing so will result in an InvalidOperationException.
Not to say that it is the only thing that can cause a 503. Just one of the obvious causes. Rule it out first.
FtpWebRequest request = (FtpWebRequest)FtpWebRequest.Create(uri);
request.Method = WebRequestMethods.Ftp.UploadFile;
request.KeepAlive = false;
request.UsePassive = true;
530 is Unauthorized Login. Did you provide NetworkCredentials for your FtpWebRequest?
request.Credentials = new NetworkCredential(userName.toString(), password.toString(), domain.toString());
Are you using BasicAuth or IntegratedWindowsAuthentication?
"I need build Skynet. Plz send code"
|
|
|
|
|
It's definitely error 503. When I looked that error code up, I saw the KeepAlive false code. I had that command in the code to Upload, but not in the code to Download. The FTP server is not a windows computer. It's a barcode printer, so I assume that it's a Unix operating system. I will have to try this later since I am not on-site. It's not a show stopper and I probably won't go back out there until next week sometime. Why would KeepAlive need to be false on one computer, but could be true on another?
I guess I should look up some literature on FTP and find out what that means.
FtpWebRequest ftpReq = (FtpWebRequest)WebRequest.Create(@"ftp://" + _URL + @"/" + _File);<br />
ftpReq.KeepAlive = false;<br />
ftpReq.Credentials = new NetworkCredential(_user, _pwd);<br />
ftpReq.UseBinary = true;<br />
ftpReq.Method = WebRequestMethods.Ftp.DownloadFile;<br />
FtpWebResponse response = (FtpWebResponse)ftpReq.GetResponse();
Chase Davis
|
|
|
|
|
Chase Davis wrote: Why would KeepAlive need to be false on one computer, but could be true on another?
Differing interpretations of the implementation necessary to fulfill the requirements of RFC 959[^]
Is there a firewall between your client and the printer?
Are you sure that port 20 is available as your FTP data port?
If either a firewall exists or port 20 is unavailable, you'll want to use Passive FTP.
If you're trying to cross a firewall, when the server tries to complete the Active handshake, your firewall will drop the request because it is initiated server-side and will be accessing a "high numbered" (> 1023) port. (the port range can be limited, but its done server-side)
If port 20 is restricted, then attempting to access it via Active FTP will result in failure, because ActiveFTP requires port 21 as the Command port and port 20 as the Data Port. Passive will require 21 as the command port and the server will respond with a PORT command indicating its own open Data port.
as simple as
ftpReq.UsePassive = true;
This is just a hunch on my part, but I imagine you're going to want to write to the Printer's internal Print Buffer rather than uploading a file to it. Maybe not. I've got working code that I could send if you're wanting to use this technique, but I don't want to post the code in an open forum.
"I need build Skynet. Plz send code"
|
|
|
|
|
hey,
is there any way to combine two projects to one project ?
for examp, I work on part A from some project (lets say gui layer) my first partner works on logic layer, and second partner works on data layer, in total i've 3 different solutions...
i want to merge them into one solution...
how can i do it in visual studio?
thanks
|
|
|
|
|
Copy project B's folder to your solution folder, and in Visual Studio, open the solution explorer, right-click the solution, and select "Add Existing Project".
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
It should be noted that some references may be lost during this process and they may have to be added again. If you add project A to the solution and it references project B, then you add project B to the solution, project A may lose its reference to project B (in which case the reference can simply be added again).
|
|
|
|
|
You might want to look into using some kind of source control so that all of you can work on the same project at the same time.
Subversion[^] is a free and good alternative.
Good luck
|
|
|
|