Daily Archives

Articles indexed Sunday January 9 2011

Page 24/29 | < Previous Page | 20 21 22 23 24 25 26 27 28 29  | Next Page >

  • 3 hash functions to best hash sliding window strings for a bloom filter with minimum collisions

    - by Duaa
    Hi all: I need 3 hash functions to hash strings of a sliding window moving over a text, to be used later to search within a bloom vector. I'm using C# in my programming I read something about rolling hash functions and cyclic polynomials, they are used for sliding window applications. But really, I did not find any codes, they are just descriptions So please, if anyone have any idea about 3 best C# hash functions to use with sliding window strings of fixed size (5-char), that consume less time and have minimum number of collisions, either they are rolling hash functions or others, please help me with some C# codes or links to hash functions names Duaa

    Read the article

  • android python full integration

    - by Grzegorz Oledzki
    Is there a way to fully integrate Python with Java code on Android platform? Yes, I saw the question about running Python on Android and Android Scripting Environment (ASE). But that doesn't seem to be enough (correct me if I am wrong). I wanted to be able not only to invoke a Python script from within Java code, but have a full integration. The feature I need the most is the ability to have a state of execution of python code saved and be able to run several parts of code on demand against the same execution state. On JavaSE I would rely on Jython. I believe its simplest example shows it all (and some other features too, like something I would call variable state introspection): http://www.jython.org/archive/21/docs/embedding.html PythonInterpreter interp = new PythonInterpreter(); System.out.println("Hello, brave new world"); interp.exec("import sys"); interp.exec("print sys"); interp.set("a", new PyInteger(42)); interp.exec("print a"); interp.exec("x = 2+2"); PyObject x = interp.get("x"); System.out.println("x: "+x); System.out.println("Goodbye, cruel world"); Is it possible on Android? Is ASE a way to go?

    Read the article

  • WPF : Command routing for Keyboard shortcuts.

    - by Sprotty
    Basically I want to create a keyboard shortcut which is valid within the scope of a window, and not just enabled when focus is within the control that binds it. in more detail.... I have a window which has 3 controls a toolbar textbox Custom Control The toolbar has a button bound to the Command CustomCommands.CmdA and linked to 'Ctrl-T'. My Custom Control can process CmdA. When I run the app and click on my custom control CmdA is enabled and works fine. Also Ctrl-T cause the command to fire. However when I select the text box, my custom command CmdA becomes disabled. I can rectify this by setting the command target for CmdA's button. Now when I select the textBox, CmdA is still enabled. But the Keyboard shortcut Ctrl-T does nothing. Is there any easy way to change the scope of keyboard shortcuts? Or do I need to catch the keypress somewhere lower down, and work out which Command it relates to and route it myself (if so is there a framework within which to do this?) Many Thanks Simon

    Read the article

  • Clojure warn-on-reflection and type hints

    - by Ralph
    In the following code, I am getting a warning on reflection: (ns com.example (:import [org.apache.commons.cli CommandLine Option Options PosixParser])) (def *help-option* "help") (def *host-option* "db-host") (def *options* (doto (Options.) (.addOption "?" *help-option* false "Show this usage information") (.addOption "h" *host-option* true "Name of the database host"))) (let [^CommandLine command-line (.. (PosixParser.) (parse *options* (into-array String args))) db-host (.getOptionValue command-line "h")] ; WARNING HERE ON .getOptionValue ; Do stuff with db-host ) I have a type hint on command-line. Why the warning? I am using Clojure 1.2 on OS X 10.6.6 (Apple VM). I assume that I do not get a warning on (.addOption ...) because the compiler knows that (Options.) is a org.apache.commons.cli.Options).

    Read the article

  • Rails rspec expects Admin::PostsController, which is there.

    - by berkes
    I have a file app/controllers/admin/posts_controller.rb class Admin::PostsController < ApplicationController layout 'admin' # GET /admin/posts def index @pposts = Post.paginate :page => params[:page], :order => 'created_at DESC' end # ...Many more standard CRUD/REST methods... end And an rspec test spec/controllers/admin/posts_controller_spec.rb require 'spec_helper' describe Admin::PostsController do describe "GET 'index'" do it "should be successful" do get 'index' response.should be_success end end #...many more test for all CRUD/REST methods end However, running that spec throws an error. I have no idea what that error means, nor how to start solving it. /home/...../active_support/dependencies.rb:492:in `load_missing_constant': Expected /home/...../app/controllers/admin/posts_controller.rb to define Admin::PostsController (LoadError) I may have it all set up wrong, or may be doing something really silly, but all I want is my CRUD actions on /admin, with separate before filters and a separate layout. And to test these controllers. EDIT ZOMG, made a terrible copy-paste error into this SO posting. The controller was PostsController, not the PagesController that I pasted into there. Problem still stands, as my code is correct, just the SO post, here was wrong.

    Read the article

  • ghc can't find my cabal installed packages

    - by nont
    I've installed ghc 6.12.3, and then the Haskell Platform. I'm trying to compile a test program: $ ghc test.hs test.hs:3:0: Failed to load interface for `Bindings': Use -v to see a list of the files searched for. so, naturally, I do cabal install Bindings Which works fine, and places the package in ~/.cabal/lib/bindings-0.1.2 The problem is, that when I go to compile again with ghc, it still doesn't find the package I've installed with cabal. compiling in verbose mode gives: ghc -v test.hs Using binary package database: /home/ludflu/ghc/lib/ghc-6.12.3/package.conf.d/package.cache Using binary package database: /home/ludflu/.ghc/x86_64-linux 6.12.3/package.conf.d/package.cache As suggested by another stackoverflow user, I tried: ghc-pkg describe rts > rts.pkg vi rts.pkg # add the /home/ludflu/.cabal/lib to `library-dirs` field ghc-pkg update rts.pkg But to no avail. How to I add the .cabal to the list of package directories to search? Thank you!

    Read the article

  • Singleton with eager initialization

    - by jesper
    I have class X that takes much time to initialize itself. I want to make that class singleton and force its creation when rails application starts. I've made the singleton: class X @@instance = nil def self.instance if @@instance.nil? @@instance = X.new puts 'CREATING' end return @@instance end private_class_method :new end The problem is that every time I use this class I see 'CREATING' in logs. I've tried to put creation of class in initializers directory but it doesn't work either.

    Read the article

  • How to configure Windows user accounts for ODBC network with NT authentication?

    - by Ian Mackinnon
    I'm trying to create a connection to an SQL Server database from the ODBC Data Source Administrator using "Windows NT authentication using the network login ID". Both server and client are running Windows XP. It appears that any account with administrator privileges can add the data source on the server*, though connection attempts from the client result in error messages that suggest it is trying to authenticate using a guest account. I found a Microsoft support page that says: For SQL Server...: connect using the impersonated user account. But it doesn't offer advice about how to do that. How do I impersonate a user account on the server? or (since it sounds like that would lead to an unfortuante squashing of privileges and loss of accountability): How do I give an account on the client privileges on the server database and then ensure the client attempts authentication with the privileged account and not with a guest account? I'm aware that I'm providing rather sparse information. This is because I'm in unfamiliar territory and don't know what's pertinent. I'll attempt to add any requested information as quickly as possible. *I'm planning on tightening privileges straight after I get it working as it stands.

    Read the article

  • Mac OSX Server 10.6 DNS Issues

    - by dallasclark
    Hi, The server was upgraded from 10.5 from 10.6, during the upgrade the Reverse Zones were lost so I tried to recreate these but found that it's best to delete all zones, definitions and start again. So I've started again and Reverse Zones are appearing but I'm still having issues. I receive the following errors (if they help) 01-Nov-2010 12:52:01.254 client 192.168.1.52#57051: view com.apple.ServerAdmin.DNS.public: query (cache) 'server.dev.home.gateway/A/IN' denied 01-Nov-2010 12:59:24.487 client 192.168.1.52#52858: view com.apple.ServerAdmin.DNS.public: query (cache) 'earth.server.dev.home.gateway/A/IN' denied At the moment I have the following setup in the DNS 1.168.192.in-addr.arpa. Reverse Zone 192.168.1.100 Reverse Mapping MacPro-Server.local. server.dev. Primary Zone server.dev. Machine 192.168.1.100 earth.server.dev. Alias server.dev.

    Read the article

  • RAID 5 heavy IO hard freezes Ubuntu: Why?

    - by Luke has no name
    I have a software RAID 5 partition on LVM in Ubuntu (desktop, actually, but I'm using it as a server). I have been rsyncing a ton of data to it, and the computer was hard freezing, as in I needed to press "Reset". So I thought it was rsync. But I decided I'd try a dd if=/dev/zero of=/path/to/raid5 and sure enough, the computer locked up. Did an identical dd to a JBOD partition on the same machine, and it didn't crash. Assuming a clean RAID5 partition, tri-core processor 2GB of ram, 6GB swap, what could be causing this?

    Read the article

  • Windows services not starting automatically?

    - by Jeff Atwood
    We've had some nasty time sync problems on our Windows Server 2008 R2 servers lately. I traced this back to something very simple: the Windows Time Service was not started! The time can't possibly sync via NTP when the time service isn't running... The Windows Time Service was set to start "automatically" in the services control panel, which I double and triple checked. I also checked the event logs and I didn't see any service failures or anything like that. In fact, it looked a heck of a lot like the Windows Time Service never started up automatically after the weekly Windows Updates were installed and the servers were rebooted. (this is set to happen every Saturday at 7 PM.) The minute I started the Time Service, the time synced fine. So, then, the question: why would a service set to start "Automatically" ... not be started automatically? That seems sort of crazy to me.

    Read the article

  • Free alternative to Audio Hijack Pro?

    - by Tim Visher
    I'd like to record what I hear coming out of the main audio jack on my Mac. Nothing fancier than that. I'm aware of Audio Hijack Pro but that really does much more than I'm looking for and comes with a steep price tag. If it's the only tool that can do the job that's fine but I was hoping to find something that simply captured all audio coming from the computer and dumped it to a file. Thanks in advance!

    Read the article

  • HP Envy 14, Ubuntu 10.10 and trouble with the graphics cards

    - by Carsten Gehling
    A few days ago I bought a HP Envy 14, containing 2 graphics card: An integrated Intel graphics card, and an ATI HD 5650. I've installed Ubuntu 10.10 32-bit on the machine. Most things work fine out of the box, but the graphics cards are giving me trouble. When booting, I get the message "failed to get i915 symbols, graphics turbo disabled". Then the screen blanks out during the remaining boot period. I am able to get the display working by changing to one of the consoles, then closing and opening the laptop's lid. It seems that Ubuntu gets confused about which card to use. I've read here: http://www.andreas-demmer.de/en/2010/07/18/testbericht-linux-auf-dem-hp-envy-14 that I should be able to turn off one the cards by echoing keywords into /sys/kernel/debug/vgaswitcheroo/switch, but that path is not available on my system. The BIOS does not have any methods to switch of the ATI card. Help anyone? /Carsten

    Read the article

  • How do I compile DarWINE in PowerPC Mac OS X 10.4.11...?

    - by Craig W. Davis
    So far I've tried using MacPorts which gives me this error: /Error: Cannot install wine for the arch(s) 'powerpc' because Error: its dependency pkgconfig is only installed for the archs 'i386 ppc'. Error: Unable to execute port: architecture mismatch To report a bug, etc... (I'm not allowed to post two links due to being a new poster...)./ I've also tried using the build script I found in the DarWINE 0.9.12 SDK download that I found on the DarWINE SourceForge.net Project Page... I've also tried the build script that I found at http://code.google.com/p/osxwinebuilder/#Building_Wine_via_the_script... None of these attempts to build DarWINE have actually worked. Whenever I build using the DarWINE build script I run it as follows: /1. I decompress the WINE tarball into ~/Downloads/WINE 2. I cd into ~/Downloads/DarWINE. 3. I run ./winemaker ~/Downloads/WINE/wine-1.2.2 or ./winemaker ~/Downloads/WINE/wine-1.2-rc2 (the reason for trying WINE 1.2-rc2 is that some people managed to get it to build on PowerPC Macs running 10.5.8...)./ I made sure to install Xcode Tools 2.5 & all the SDKs too... The net result is either a syntax type error resulting from trying to run the checked out Google Code DarWINE build script or a bunch of make errors when trying to run the official DarWINE build script that I forcefully extracted from the DarWINE 0.9.12 SDK .dmg file by using Pacifist. I trying to build DarWINE on mid-April 2006 1.42 GHz eMac with DL SuperDrive with Bluetooth 2.0+EDR with 2 GBs of RAM running 10.4.11 as I mentioned earlier... (it came with 10.4.4 on the Mac's Restore DVD-ROM that I ordered from 1-800-SOS-APPL & coconutIdentityCard told me it was made on April 12th 2006 & I know that's right because when I reinstalled Mac OS X 10.4.4 it displayed that it was registered/previously owned by a Hawaiian school...): /make[1]: winegcc: Command not found make[1]: * [main.o] Error 127 make: * [dlls/acledit] Error 2./

    Read the article

  • JavaScript settings are on but I still have issues with web sites using JavaScript.

    - by Mike
    I have two computers that are the same at home except I have installed Adobe Acrobat 9 Pro Extended on my main computer along with the 2010 Outlook (Beta). I have issues when I log into a website that uses pop up calendars to select the date. I pasted it below. I checked my other computer and it is fine. I've checked the Java setting and they are correct. I am at a loss. Any suggestions? Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; HPDTDF; OfficeLiveConnector.1.4; OfficeLivePatch.1.3; eMusic DLM/4; .NET4.0C) Timestamp: Mon, 26 Jul 2010 22:03:59 UTC Message: 'CalendarPopup' is undefined Line: 390 Char: 2 Code: 0 Message: 'CalendarPopup' is undefined Line: 410 Char: 2 Code: 0

    Read the article

  • Test Preparation Materials

    - by GavinPayneUK
    I wrote an article on my personal blog a few weeks ago about my preparation for my first Microsoft exam, 70-432.  ( link )  Since then I’ve been reading and demo’ing all the relevant features of SQL Server in the hope that if I get questions on them I’ll be prepared. I’ve learnt a few things in the last couple of weeks, some good, some bad which I’ll now share. The first thing I found is that learning about how SQL Server works is fun and interesting, far better than spending an evening...(read more)

    Read the article

  • How to backup BOINC

    - by Stephen Judge
    I have BOINC Manager installed from the PPA, version 6.10.17, and I am about to upgrade my Ununtu install with a clean install. I would like to know how I can backup my work done on BOINC so I don't loose what I have already done and have to start from scratch again. For example I am running the Climate Prediction project and it runs for a year or so, I'm at 30% work done so I want to backup that 30% work done. Also as an addition to this, can someone advise me the best way to upgrade BOINC when new versions are released on their website but are not available on the PPA yet. I know you can install BOINC anywhere, but I want to install it to the same place the PPA install does so all my settings and work done is recognised. Thanks in advance.

    Read the article

  • Is there a command-line utility app which can find a specific block of lines in a text file, and replace it?

    - by fred.bear
    UPDATE (see end of question) The text "search and replace" utility programs I've seen, seem to only search on a line-by-line basis... Is there a command-line tool which can locate one block of lines (in a text file), and replace it with another block of lines.? For example: Does the test file file contain this exact group of lines: 'Twas brillig, and the slithy toves Did gyre and gimble in the wabe: All mimsy were the borogoves, And the mome raths outgrabe. 'Beware the Jabberwock, my son! The jaws that bite, the claws that catch! Beware the Jubjub bird, and shun The frumious Bandersnatch!' I want this, so that I can replace multiple lines of text in a file and know I'm not overwriting the wrong lines. I would never replace "The Jabberwocky" (Lewis Carroll), but it makes a novel example :) UPDATE: ..(sub-update) My following comment about reasons when not use sed are only in the context of; don't push any tool too far beyond its design intent (I use sed quite often, and consider it to be invaluable.) I just now found an interesting web page about sed and when not to use it. So, because of all the sed answers, I"ll post the link.. it is part of the sed FAQ on sourceforge Also, I'm pretty sure there is some way diff can do the job of locating the block of text (once it's located, the replacement is quite straight foward; using head and tail) ... 'diff' dumps all the necessary data, but I haven't yet worked out how to filter it , ... (I'm still working on it)

    Read the article

  • Need Sql Server Hosting 50GB or More

    - by Leo
    Hi I am looking for a Hosting solution (Dedicated or Shared) which will allow me to host a SQL Server database service (Not SQL Express but the Web edition). The size of my database might grow to 50GB or more. The web application will offer more reads than write operations. I also need daily backups and raid 1 storage. Is there a reliable and economical hosting company that would provide this? Additional Question: If there is a easy way to host MS SQL on Amazon EC2 service, it will be preferable.

    Read the article

  • iPhone site optimization: Custom viewport size

    - by Brandon Durham
    I've got a site that should max out a 575px on the iphone and wanted to know what the best method is for defaulting the viewport to this size. Currently I am using this meta tag: <meta name="viewport" content="width=575; user-scalable=no;"> This displays some odd behavior in that it loads fully zoomed out and then, once the page is loaded, zooms in to 575. What are the best methods to ensure that my site will surely display at 575px wide in mobile browsers?

    Read the article

  • problem convert idl to tbl

    - by Bahgat Mashaly
    i try to get a selected text and the word under mouse in firefox after a lot of search i get the solution that i must access a document's HTML in Firefox using IAccessible i found that solution in c++ in this link How to access a document's HTML in Firefox using IAccessible the solution use ISimpleDOMNode.idl file so the first step to convert that solution from c++ to c# is convert ISimpleDOMNode.idl to tlb file and convert tlb to dll fill i try to use VS Command Prompt with this command to convert to tlb file midl ISimpleDOMNode.idl but That generate ISimpleDOMNode.h and ISimpleDOMDocument.h, which define the interfaces. It also create ISimpleDOMNode_i.c and ISimpleDOMDocument_i.c but there is no tlb file what is the wrong ?

    Read the article

  • JQuery - remove the chars not matching regEx

    - by JQueryBeginner
    Hi All, I am trying to use jquery for validating forms. This is the pattern that is allowed in a text box for a user. var pattern = /^[a-zA-Z0-9!#$&%*+,-./: ;=?@_]/g; If the user types anything else other than this then that has to be replaced with a "". $(document).ready(function() { $('#iBox').blur(function() { var jVal = $('#iBox').val(); if(jVal.match(pattern)) { alert("Valid"); } else { alert("New "+jVal.replace(!(pattern),"")); } }); }); }); But the replace function does not work this way.

    Read the article

  • Big time Leaking in Objective-C Category

    - by Daniel Amitay
    I created a custom NSString Category which lets me find all strings between two other strings. I'm now running into the problem of finding that there are a lot of kBs leaking from my script. Please see code below: #import "MyStringBetween.h" @implementation NSString (MyStringBetween) -(NSArray *)mystringBetween:(NSString *)aString and:(NSString *)bString; { NSAutoreleasePool *autoreleasepool = [[NSAutoreleasePool alloc] init]; NSArray *firstlist = [self componentsSeparatedByString:bString]; NSMutableArray *finalArray = [[NSMutableArray alloc] init]; for (int y = 0; y < firstlist.count - 1 ; y++) { NSString *firstObject = [firstlist objectAtIndex:y]; NSMutableArray *secondlist = [firstObject componentsSeparatedByString:aString]; if(secondlist.count > 1){ [finalArray addObject:[secondlist objectAtIndex:secondlist.count - 1]]; } } [autoreleasepool release]; return finalArray; } @end I admit that I'm not super good at releasing objects, but I had believed that the NSAutoreleasePool handled things for me. The line that is leaking: NSMutableArray *secondlist = [firstObject componentsSeparatedByString:aString]; Manually releasing secondlist raises an exception. Thanks in advance!

    Read the article

  • Function signature-like expressions as C++ template arguments

    - by Jeff Lee
    I was looking at Don Clugston's FastDelegate mini-library and noticed a weird syntactical trick with the following structure: TemplateClass< void( int, int ) > Object; It almost appears as if a function signature is being used as an argument to a template instance declaration. This technique (whose presence in FastDelegate is apparently due to one Jody Hagins) was used to simplify the declaration of template instances with a semi-arbitrary number of template parameters. To wit, it allowed this something like the following: // A template with one parameter template<typename _T1> struct Object1 { _T1 m_member1; }; // A template with two parameters template<typename _T1, typename _T2> struct Object2 { _T1 m_member1; _T2 m_member2; }; // A forward declaration template<typename _Signature> struct Object; // Some derived types using "function signature"-style template parameters template<typename _Dummy, typename _T1> struct Object<_Dummy(_T1)> : public Object1<_T1> {}; template<typename _Dummy, typename _T1, typename _T2> struct Object<_Dummy(_T1, _T2)> : public Object2<_T1, _T2> {}; // A. "Vanilla" object declarations Object1<int> IntObjectA; Object2<int, char> IntCharObjectA; // B. Nifty, but equivalent, object declarations typedef void UnusedType; Object< UnusedType(int) > IntObjectB; Object< UnusedType(int, char) > IntCharObjectB; // C. Even niftier, and still equivalent, object declarations #define DeclareObject( ... ) Object< UnusedType( __VA_ARGS__ ) > DeclareObject( int ) IntObjectC; DeclareObject( int, char ) IntCharObjectC; Despite the real whiff of hackiness, I find this kind of spoofy emulation of variadic template arguments to be pretty mind-blowing. The real meat of this trick seems to be the fact that I can pass textual constructs like "Type1(Type2, Type3)" as arguments to templates. So here are my questions: How exactly does the compiler interpret this construct? Is it a function signature? Or, is it just a text pattern with parentheses in it? If the former, then does this imply that any arbitrary function signature is a valid type as far as the template processor is concerned? A follow-up question would be that since the above code sample is valid code, why doesn't the C++ standard just allow you to do something like the following, which is does not compile? template<typename _T1> struct Object { _T1 m_member1; }; // Note the class identifier is also "Object" template<typename _T1, typename _T2> struct Object { _T1 m_member1; _T2 m_member2; }; Object<int> IntObject; Object<int, char> IntCharObject;

    Read the article

  • XDocument + IEnumerable is causing out of memory exception in System.Xml.Linq.dll

    - by Manatherin
    Basically I have a program which, when it starts loads a list of files (as FileInfo) and for each file in the list it loads a XML document (as XDocument). The program then reads data out of it into a container class (storing as IEnumerables), at which point the XDocument goes out of scope. The program then exports the data from the container class to a database. After the export the container class goes out of scope, however, the garbage collector isn't clearing up the container class which, because its storing as IEnumerable, seems to lead to the XDocument staying in memory (Not sure if this is the reason but the task manager is showing the memory from the XDocument isn't being freed). As the program is looping through multiple files eventually the program is throwing a out of memory exception. To mitigate this ive ended up using System.GC.Collect(); to force the garbage collector to run after the container goes out of scope. this is working but my questions are: Is this the right thing to do? (Forcing the garbage collector to run seems a bit odd) Is there a better way to make sure the XDocument memory is being disposed? Could there be a different reason, other than the IEnumerable, that the document memory isnt being freed? Thanks. Edit: Code Samples: Container Class: public IEnumerable<CustomClassOne> CustomClassOne { get; set; } public IEnumerable<CustomClassTwo> CustomClassTwo { get; set; } public IEnumerable<CustomClassThree> CustomClassThree { get; set; } ... public IEnumerable<CustomClassNine> CustomClassNine { get; set; }</code></pre> Custom Class: public long VariableOne { get; set; } public int VariableTwo { get; set; } public DateTime VariableThree { get; set; } ... Anyway that's the basic structures really. The Custom Classes are populated through the container class from the XML document. The filled structures themselves use very little memory. A container class is filled from one XML document, goes out of scope, the next document is then loaded e.g. public static void ExportAll(IEnumerable<FileInfo> files) { foreach (FileInfo file in files) { ExportFile(file); //Temporary to clear memory System.GC.Collect(); } } private static void ExportFile(FileInfo file) { ContainerClass containerClass = Reader.ReadXMLDocument(file); ExportContainerClass(containerClass); //Export simply dumps the data from the container class into a database //Container Class (and any passed container classes) goes out of scope at end of export } public static ContainerClass ReadXMLDocument(FileInfo fileToRead) { XDocument document = GetXDocument(fileToRead); var containerClass = new ContainerClass(); //ForEach customClass in containerClass //Read all data for customClass from XDocument return containerClass; } Forgot to mention this bit (not sure if its relevent), the files can be compressed as .gz so I have the GetXDocument() method to load it private static XDocument GetXDocument(FileInfo fileToRead) { XDocument document; using (FileStream fileStream = new FileStream(fileToRead.FullName, FileMode.Open, FileAccess.Read, FileShare.Read)) { if (String.Compare(fileToRead.Extension, ".gz", true) == 0) { using (GZipStream zipStream = new GZipStream(fileStream, CompressionMode.Decompress)) { document = XDocument.Load(zipStream); } } else { document = XDocument.Load(fileStream); } return document; } } Hope this is enough information. Thanks Edit: The System.GC.Collect() is not working 100% of the time, sometimes the program seems to retain the XDocument, anyone have any idea why this might be?

    Read the article

< Previous Page | 20 21 22 23 24 25 26 27 28 29  | Next Page >