I am using cat *.txt to merge multiple txt files into one, but I need each file to be on a separate line.
What is the best way to merge files with each file appearing on a new line?
Hi,
I use Entity Framework V4 and i want to update Customer who have Visits.
My code :
EntityKey key;
object originalItem;
key = this._modelContainer.CreateEntityKey("Customers", customer);
if (this._modelContainer.TryGetObjectByKey(key, out originalItem))
{
this._modelContainer.ApplyCurrentValues(key.EntitySetName, customer);
}
this._modelContainer.SaveChanges();
It works for Scalar Property only. The customers.Visits collection is not updated.
Best Regards :)
Hi,
If there is a tool for analyzing memory leaks in a c++ COM Object, please provide a link here
If no such tool exist, what would be the best way to handle memory leaks ?
Thank You
Hi,
i have added the below xsl:output tag in xslt
<xsl:output method="html" indent="yes" encoding="utf-8" doctype-public="-//W3C//DTD HTML 4.0 Transitional//EN" </xsl:output
as a result i get the below doctype tag in the html output-
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
how can i mention the url in the doctype tag using xsl:output which would output a doctype tag that looks like below
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "_http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
Best Regards, Keshav
How can I add a string as a file on amazon s3.from whaterver I searched , I got to know that we can upload a file to s3.what is the best way to upload data without creating file.?
I have a win32 GUI (MFC) application which I need to port to a WIN CE environment. I keep encountering undefined identifiers. What is the best way to deal with this- is there some site where i can get a mapping of some kind between win32 supported features and corresponding wince features (even if they are not supported, the information that they are not is valuable)
What is the best way to document system requirements? I currently use Use Cases to document requirements which does not include technical details (unless required) so that it is understood by the stakeholders.
Are there any other document formats for capturing system requirements which are also user friendly?
I would like to implement a naive bayes classifier for spam filtering from scratch as a learning exercise. What would be the best langauge of the following to try this out in?
Java
Ruby
C++
C
something else
Please give reasons (it would help greatly!)
Hello,
I'm building an app to store files on my s3 account. I use Rails 3.0.0beta
A lot of files can be uploaded at the same time, and the cost (from a performance point of view) of an upload is quite heavy, my app will be busy handling uploads all the time!
Maybe a solution is to upload directly to s3, but I still need a submit to my app, at least to store the file's name.
I'm wondering what is the best solution?
My users upload Word 2007 documents to our site and I'd like to load them into a rich edit control of some kind so the users can make modifications/ comment, etc.
What mechanisms are available to:
load the Word document via ASP.NET, and
parse/format/display the document in a rich editing control?
Also, what kinds of rich editing controls are best to use in this circumstance?
Does anybody have directions for getting Eclipse (Galileo), PyDev, and Virtualenv working together? I'm specifically trying to run Pinax but any instructions are fine.
I thought I had it (and even blogged everything but the final step - interactive debugging) and still there is no solution. I'm specifically on OS X but any answer should be sufficient. This is the best resource I've found so far:
http://blog.vlku.com/index.php/2009/06/10/djangoeclipse-with-code-complete-screencast/
I am loading a website using a WebBrowser's Navigate function, and I want the browser to load the page with a cookie I've given it.
The following code doesn't work:
wb.Navigate(url, null, null, "Cookie: " + cookie + "\n");
What am I doing wrong? Will I have to use InternetSetCookie? This doesn't seem like the best solution.
Thanks!
Hi Guys,
How do you generally proceed for your package installations on Linux, for packages that are not part of your distrib's repos?
On my side I am used to install in /opt. But since, I saw this doc on the Internet: http://www.pathname.com/fhs/. Now I am confused: apparently /usr/local would be also a possibility.
What is the difference between both? Any best practices to share?
Thanks
SirFabel
I have an Executors.newFixedThreadPool(1) that I send several different tasks to (all implementing Runnable), and they get queued up and run sequentially correct? What is the best way to only allow one of each task to be either running or queued up at one time? I want to ignore all tasks sent to the ExecutorService that are already in the queue.
Hi there!
I would like to cancel the mandatory of a field of my current schema. How can I accomplish that with a symfony migration?
Thanks in advance,
Best regards!
We have a system that has some bash scripts running besides Java code. Since we are trying to "Test Everything That Could Possibly Break" and those bash scripts may break, we want to test them. The problem is it is hard to test the scripts.
Is there a way or a best practice to test bash scripts?
Or should we quit using bash scripts and look for alternative solutions that are testable?
I would like to make server that listen on UDP port 162 (SNMP trap) and then forwards this traffic to multiple clients. Also important is that the source port & address stays same (address spoofing).
I guess that best tool for this would be Twisted or Scapy or mybe vanilla sockets,
only I can't find anything in the documentation for Twisted about source address spoofing/forging.
What would you recommend me to do?
Edit:added bounty
I have written a thread which I've started using the start method but I'm not able to know when the thread has done executing the method and destroy the thread object.
_ProgressThread = New Thread(AddressOf ExecProc)
_ProgressThread.IsBackground = False
_ProgressThread.Start()
//the flow of execution should come here only after the thread has executed the method
//but its coming and executing this line after the thread has started.
_ProgressThread = Nothing
What is the best method. Please help.
Dim x AS New URI("http://www.example.com/test//test.asp")
Dim rel AS New URI("http://www.example.com/xxx/xxx.asp")
Console.Writeline(x.MakeRelativeUri(rel).Tostring())
In here output is:
../../xxx/xxx.asp
Which looks correct almost all web servers will process the two of the following as same request:
http://www.example.com/test//test.asp
http://www.example.com/test/test.asp
What's the best way to fix this behaviour is there any API to do this, or shall manually create a new URI and remove all // in the path?
I know:
I have to sign the applet so it can read files
How to parse XML files
My Questions would be:
Should I keep the XML file in the .jar or separate?
Are there some best practices tutorials? if so please link me
I want to use EC2 for some reasons and EC2 provides both windows and linux deployments, but linux is much cheaper (linux reserved instances are approx. %63-%85 price of windows ones and spot instances are %50 cheaper for linux). I need a type safe lang and mainstream platform and I prefer to use .net/c# stack (but not mono for some reasons), but in this situation java seems a better fit for the future (when ec2 instance counts begin to increase). So, is it worth to use .net ?
best regards,
Hi,
how can I deploy an mvc application, without publishing the aspx view files. Is there a way to publish the generated dll assemblies?
In the project file is an option "MvcBuildViews", which builds these dll files. But they are build in a temp directory and not used in the publishment process. Is there a way to include these files?
best regards
What OpenGL / GLUT reference is the best around?
Ideally I'm looking for something with C++ sample code to help me learn OpenGL as well as details about the APIs similar to what MSDN provides for .net programming.
If there isn't a one stop shop, then please list the set of references I should use and what the strengths of each one is.
Thanx!