Hello,
I have a simple text file processing tool written in C#, the skeleton looks like this:
using (StreamReader reader = new StreamReader(absFileName, true)) // auto detect encoding
using (StreamWriter writer = new StreamWriter(tmpFileName, false, reader.CurrentEncoding)) // open writer with the same encoding as reader
{
...
I'm puzzled by how pattern matching works in F# for let. I'm using the Visual Studio 'F# interactive' window, F# version 1.9.7.8. Say we define a simple type:
type Point = Point of int * int ;;
and the try to pattern match against values of Point using let.
let Point(x, y) = Point(1, 2) in x ;;
fails with error FS0039: The value or...
we're working on a .Net application that does a low level keyboard hook. When we call the SetWindowsHookEx running inside the debugger the call always fail.
When running from the compiled executable everything works fine. If we attach to the processs the the SetWindowsHookEx has been called everything works too.
I've read somewhere (I ...
I want to get sub folders of a root folder. And i am able to get it through the below code.
But has a issue when the sub folder has a sub folder in it and i over come it writing a second for each loop. But what if the second sub folder has a sub folder under it.
So there will be an infinte for each loop, so i have to overcome it.
Any hel...
I need to output XML / ASX on an ASPX page.
The XML is generated from the code behind and will look like this.
I'm using string builder to create the XML / ASX.
(...)
sb.AppendLine("<asx version='3.0'>");
sb.AppendLine("<title> Spilliste </title>");
while (i < pdc.Count)
{
...
I really like ASPxGridView, but I can't use .NET to develop my applications. I wonder if there is a Java or more generic alternative to it.
Thanks
...
i created one shared Add-ins in visual studio 2005
all events working fine but new document event is not working i don't know why
my code for new document is
((Word.ApplicationEvents4_Event)wb).NewDocument += new Word.ApplicationEvents4_NewDocumentEventHandler(Application_NewDocument);
void Application_NewDocument(Word.Document Doc)
...
I'm using a ButtonRenderer to draw a button in a custom cell. I'd like the button to have a nonstandard BackColor. This is supported by normal buttons, but there's nothing in button cells or ButtonRenderer to support it. How do I draw a button with a nonstandard BackColor? The method has to take the user's theme into account - I can'...
hi,
it`s possible to create snippet into StringBuilder/MemoryStream or something else and to use it? More important: without to create snippet files on hard disk in Visual Studio folder ( ...\Microsoft Visual Studio 9.0\VC#\Snippets\1033\Visual C#)
I can do it? and how?
...
When compiling a project in Visual Studio, the error message "the exec task needs a command to execute" appears, with no line number. What does this error mean?
(Apologies for asking and answering my own question; I just found an answer as I was writing this. Have made it community wiki, so as not to offend.)
...
We have made a .net C# applications and want to test the performance.
What are good tools to test performance ?
Something to record the flow through the application and can play it later again
something like a stress tool
And what are the best options to debug the application for performance ?
So that we can see how long a class/method...
Is there java or .net version of R ?
(like jython / ironpython for python language)
I guess some r-packages which use c or fortran may not run on java/.net version of R, but as long as pure r code can be run, it must be great.
...
I mean If I was using WCF over http I wouldn't hesitate.
My ORM is LLBLGen Pro which provides me with some pretty nice entity collections features, like tracking changes and other. If I would go the DTO path I would lost this functionality. For now there is on the client side a Web app, which does not need any tracking changes funcional...
Hi,
for localizing purpose I wonder how to databind the text properties of controls e.g. buttons in a C# .NET windows application to an external resource..?
Currently I created a resource, containing a table like
ButtonText1 - "Value1"
ButtonText2 - "Value2"
...
and compiled it as an embedded resource to a DLL. In my windows appl...
Hi all,
I am currently thinking about with what pattern I should solve the following issue.
I've got an entity called IdentificationRequest. This entity is used to identify a Person by some criteria.
public class IdentificationRequest
{
public IdentificationCriteria Criteria;
public Person IdentifiedPerson;
protected i...
I'm trying to use YouTube API to upload videos from browser. I read Google API documentation and wrote this piece of code:
public static YouTubeRequest GetRequest()
{
var request = HttpContext.Current.Session["YTRequest"] as YouTubeRequest;
if (request == null)
{
var settings = new YouTubeRequest...
Right now when i'm setting publishing restrictions for items in Sitecore that get rendered by xslt renderings, the xslt will just output empty blocks which don't look very nice on the website.
This is the xslt code i'm using to render my Sitecore item:
<xsl:for-each select="$item[sc:fld('__created',.)]">
<xsl:for-each select=...
I have an issue where my application runs fine for hours but then suddenly increases memory usage (in a matter of minutes) until it crashes. If we minimize the application during the increasing memory usage, the memory goes way down and stays down for a while. This seems to happen very inconsistently. Any idea how to troubleshoot it/what...
I need to programatically highlight PDFs on the fly, preferrably using the highlight file method.
Are there any .net programming libraries to generate a xml highlight offsets file for a pdf? Doesnt have to be open source or free.
I tried converting PDFBox to a .net DLL using IKVM and it did not work correctly. Im not terribly excit...
We have a strange problem printing images and text. When we print FOR THE FIRST TIME on a machine, ONLY the background is shifted up and left, and is printed at the wrong location.
The text is printed correctly.
When we print the same again, everything is fine .... both bg and text .. ?
Uninstalling and reinstalling the app or restarting...