Search Results

Search found 19992 results on 800 pages for 'font size'.

Page 64/800 | < Previous Page | 60 61 62 63 64 65 66 67 68 69 70 71  | Next Page >

  • ftp .net getdirectory size

    - by Xaver
    hi i write method which must to know that is size of specified directory i get response from server which contains flags of file name size and other info and on the different ftp servers format of answer is different how to know format of answer? unsigned long long GetFtpDirSize(String^ ftpDir) { unsigned long long size = 0; int j = 0; StringBuilder^ result = gcnew StringBuilder(); StreamReader^ reader; FtpWebRequest^ reqFTP; reqFTP = (FtpWebRequest^)FtpWebRequest::Create(gcnew Uri(ftpDir)); reqFTP->UseBinary = true; reqFTP->Credentials = gcnew NetworkCredential("anonymous", "123"); reqFTP->Method = WebRequestMethods::Ftp::ListDirectoryDetails; reqFTP->KeepAlive = false; reqFTP->UsePassive = false; try { WebResponse^ resp = reqFTP->GetResponse(); Encoding^ code; code = Encoding::GetEncoding(1251); reader = gcnew StreamReader(resp->GetResponseStream(), code); String^ line = reader->ReadToEnd(); array<Char>^delimiters = gcnew array<Char>{ '\r', '\n' }; array<Char>^delimiters2 = gcnew array<Char>{ ' ' }; array<String^>^words = line->Split(delimiters, StringSplitOptions::RemoveEmptyEntries); array<String^>^DetPr; System::Collections::IEnumerator^ myEnum = words->GetEnumerator(); while ( myEnum->MoveNext() ) { String^ word = safe_cast<String^>(myEnum->Current); DetPr = word->Split(delimiters2); } }

    Read the article

  • Converting ntext to nvcharmax(max) - Getting around size limitation

    - by Overflew
    Hi all, I'm trying to change an existing SQL NText column to nvcharmax(max), and encountering an error on the size limit. There's a large amount of existing data, some of which is more than the 8k limit, I believe. We're looking to convert this, so that the field is searchable in LINQ. The 2x SQL statements I've tried are: update Table set dataNVarChar = convert(nvarchar(max), dataNtext) where dataNtext is not null update Table set dataNVarChar = cast(dataNtext as nvarchar(max)) where dataNtext is not null And the error I get is: Cannot create a row of size 8086 which is greater than the allowable maximum row size of 8060. This is using SQL Server 2008. Any help appreciated, Thanks. Update / Solution: The marked answer below is correct, and SQL 2008 can change the column to the correct data type in my situation, and there are no dramas with the LINQ-utilising application we use on top of it: alter table [TBL] alter column [COL] nvarchar(max) I've also been advised to follow it up with: update [TBL] set [COL] = [COL] Which completes the conversion by moving the data from the lob structure to the table (if the length in less than 8k), which improves performance / keeps things proper.

    Read the article

  • jQuery Syntax Error - Trying to detect viewport size and select background image to use w/CSS

    - by CuppyCakes
    Hi all. Please be gentle, I'm still learning. I imagine that the solution to my problem is simple and that perhaps I have just been in front of the computer too long. I am trying to detect the size of the viewport, and then use a different sized image for a background on an element depending on the size of the viewport. Here is what I have so far: $(document).ready(function(){ var pageWidth = $(window).width(); if ( pageWidth <= 1280 ) { $('#contact').css('background-image', 'url(../images/contact_us_low.jpg)'); } elseif ( pageWidth > 1280 ) { $('#contact').css('background-image', 'url(../images/contact_us_high.jpg)'); } }); Error: missing ; before statement [Break on this error] elseif ( pageWidth 1280 ) {\n (Line 7) To me it seems like all of my semi-colons are in the right place. Two questions: Am I going about solving the problem in a sensible way? To me a simple conditional should solve this background problem, as the code is merely selecting between two images based on what size it detects the viewport to be. Can you please help point out my n00b syntax error? Sometimes it really does help to have an extra pair of eyes look at something like this, even if small. Thank you kindly for your advice, I will continue poking and perusing the docs I have available to me.

    Read the article

  • Threads are blocked in malloc and free, virtual size

    - by Albert Wang
    Hi, I'm running a 64-bit multi-threaded program on the windows server 2003 server (X64), It run into a case that some of the threads seem to be blocked in the malloc or free function forever. The stack trace is like follows: ntdll.dll!NtWaitForSingleObject() + 0xa bytes ntdll.dll!RtlpWaitOnCriticalSection() - 0x1aa bytes ntdll.dll!RtlEnterCriticalSection() + 0xb040 bytes ntdll.dll!RtlpDebugPageHeapAllocate() + 0x2f6 bytes ntdll.dll!RtlDebugAllocateHeap() + 0x40 bytes ntdll.dll!RtlAllocateHeapSlowly() + 0x5e898 bytes ntdll.dll!RtlAllocateHeap() - 0x1711a bytes MyProg.exe!malloc(unsigned __int64 size=0) Line 168 C MyProg.exe!operator new(unsigned __int64 size=1) Line 59 + 0x5 bytes C++ ntdll.dll!NtWaitForSingleObject() ntdll.dll!RtlpWaitOnCriticalSection() ntdll.dll!RtlEnterCriticalSection() ntdll.dll!RtlpDebugPageHeapFree() ntdll.dll!RtlDebugFreeHeap() ntdll.dll!RtlFreeHeapSlowly() ntdll.dll!RtlFreeHeap() MyProg.exe!free(void * pBlock=0x000000007e8e4fe0) C BTW, the param values passed to the new operator is not correct here maybe due to optimization. Also, at the same time, I found in the process Explorer, the virtual size of this program is 10GB, but the private bytes and working set is very small (<2GB). We did have some threads using virtualalloc but in a way that commit the memory in the call, and these threads are not blocked. m_pBuf = VirtualAlloc(NULL, m_size, MEM_COMMIT, PAGE_READWRITE); ...... VirtualFree(m_pBuf, 0, MEM_RELEASE); This looks strange to me, seems a lot of virtual space is reserved but not committed, and malloc/free is blocked by lock. I'm guessing if there's any corruptions in the memory/object, so plan to turn on gflag with pageheap to troubleshoot this. Does anyone has similar experience on this before? Could you share with me so I may get more hints? Thanks a lot!

    Read the article

  • Querying the size of a drive on a remote server is giving me an error

    - by Testifier
    Here's what I have: public static bool DriveHasLessThanTenPercentFreeSpace(string server) { long driveSize = 0; long freeSpace = 0; var oConn = new ConnectionOptions {Username = "username", Password = Settings.Default.SQLServerAdminPassword}; var scope = new ManagementScope("\\\\" + server + "\\root\\CIMV2", oConn); //connect to the scope scope.Connect(); //construct the query var query = new ObjectQuery("SELECT FreeSpace FROM Win32_LogicalDisk where DeviceID = 'D:'"); //this class retrieves the collection of objects returned by the query var searcher = new ManagementObjectSearcher(scope, query); //this is similar to using a data adapter to fill a data set - use an instance of the ManagementObjectSearcher to get the collection from the query and store it ManagementObjectCollection queryCollection = searcher.Get(); //iterate through the object collection and get what you're looking for - in my case I want the FreeSpace of the D drive foreach (ManagementObject m in queryCollection) { //the FreeSpace value is in bytes freeSpace = Convert.ToInt64(m["FreeSpace"]); //error happens here! driveSize = Convert.ToInt64(m["Size"]); } long percentFree = ((freeSpace / driveSize) * 100); if (percentFree < 10) { return true; } return false; } This line of code is giving me an error: driveSize = Convert.ToInt64(m["Size"]); The error says: ManagementException was unhandled by user code Not found I'm assuming the query to get the drive size is wrong. Please note that I AM getting the freeSpace value at the line: freeSpace = Convert.ToInt64(m["FreeSpace"]); So I know the query IS working for freeSpace. Can anyone give me a hand?

    Read the article

  • How come JFrame window size in Java does not produce the size of window specified?

    - by typoknig
    Hi all, I am just messing around trying to make a game right now, but I have had this problem before too. When I specify a specific window size (1024 x 768 for instance) the window produced is just a little larger than what I specified. Very annoying. Is there a reason for this? How do I correct it so the window created is actually the size I want instead of being just a little bit bigger? Up till now I have always just gone back and manually adjusted the size a few pixels at a time until I got the result I wanted, but that is getting old. If there was even a formula I could use that would tell me how many pixels I needed to add/subtract from my my variable that would be excellent! P.S. I don't know if my OS could be a factor in this, but I am using W7X64. private int windowWidth = 1024; private int windowHeight = 768; public SomeWindow() { this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); this.setSize(windowWidth, windowHeight); this.setResizable(false); this.setLocation(0,0); this.setVisible(true); }

    Read the article

  • Obtain File size with os.path.getsize() in Python 2.7.5

    - by Ruxuan Ouyang
    I am new to python. I am trying to use os.path.getsize() to obtain the file size. However, if the file name is not in Englist, but in Chinese, Gemany, or French, etc, Python cannot recognize it and do not return the size of the file. Could you please help me with it? How can I let Python recognize the file's name and return the size of these kind of files? For example: The file's name is:?????????? ????????????? ? ????????????? ???????? ?? 2030?.doc path="C:\xxxx\xxx\xxxx\?????????? ????????????? ? ????????????? ???????? ?? 2030?.doc" I'd like to use" os.path.getsize(path) But it does not recognize the file name. Could you please kindly tell me what should I do? Thank you very much!

    Read the article

  • Overlaying one div over another, but not knowing the size of the div

    - by andyuk
    I'm trying to lay one div over another. This is really simple if you know the dimensions of the div. Solved here: How to overlay one div over another div So, here is my HTML: <div class="container"> <div class="overlay"></div> <div class="content"></div> </div> In my case, I don't know the exact dimensions of the "content" or "container" div. This is because I don't have control over any of the content in the div (we are making our app extensible for 3rd party developers). See my example on jsFiddle The overlay should cover the content entirely. Width 100% and Height 100%. However, this does not work because in my example I positioned the overlay absolutely. One solution is to use JavaScript to get the size of the content div and then set the size of the overlay. I don't like this solution much since if image sizes are not specified, you need to wait until images are loaded and recalculate the size of the div. Is there any way of solving this problem in CSS? 

    Read the article

  • specified size of td

    - by ognjenb
    <table class="data-table"> <tr> <th style="width: 200px;"> Description </th> </tr> <% foreach (var item in Model) { %> <tr> <td style="width: 200px;"> <%= Html.Encode(item.Description) %> </td> </tr> </table> browser html: <table class="data-table"> <tr> <th style="width: 200px;"> Description </th> </tr> <tr> <td > This is description </td> </tr> </table> Why this td size is not to apply on View page? In Design view on VS 2008 td size is applied, but after run project in my browser not have specified size

    Read the article

  • ArrayIndexOutOfBoundsException double array size

    - by Andy
    I'm going to preface this question with this statement: I know that I can easily handle this problem by reading the amount of lines in a file and making an array that size. I am not allowed to do this. Anyway, here is my question. I need to double my array's size whenever my program encounters an ArrayIndexOutOfBoundsException and then copy all the previous read in information into the larger array. Here is my code public static void main(String[] args) throws IOException { Scanner inScan, fScan = null; int [] A = new int[5]; inScan = new Scanner(System.in); System.out.print("Please enter the file to read from: "); while(true) { try{ String fName = inScan.nextLine(); fScan = new Scanner(new File(fName)); break; } catch (FileNotFoundException ex) { System.out.println("Your file is invalid -- please re-enter"); } } String nextItem; int nextInt = 0; int i = 0; while (fScan.hasNextLine()) { try { nextItem = fScan.nextLine(); nextInt = Integer.parseInt(nextItem); A[i] = nextInt; i++; } catch (NumberFormatException e) { System.out.println("Found an invalid int -- ignored"); } catch (ArrayIndexOutOfBoundsException e) { //double the size of array A until //copy all previous read in information to the larger array } } System.out.println("Here are your " + i + " items:"); for (int j = 0; j < i; j++) { System.out.println(A[j] + " "); } } }

    Read the article

  • Can my PowerMac G3 B&W really take a harddrive larger than 128GB?

    - by Josh Calvetti
    So it's a well known fact that the PowerMacs manufactured before 2002 cannot take a harddrive larger than 128GB. I have an old B&W that was running 10.4, and upon putting a 250GB drive inside, it told me that I had inserted a 128GB. That was expected. However, I recently decided to turn that machine into a Debian home file server. I shoved the 250GB drive inside, did some formatting, and now it tells me that it is a 250GB drive. Is this safe to use? Will all my data go corrupt after I've added more than 128GB of stuff? In case the specs are helpful to have, it's a 400MHz B&W, 1GB RAM, Rev. B.

    Read the article

  • How many disks to use for eight channel RAID controller

    - by Tvrtko
    I have a 3ware 8 channel SAS controller and a back plane extender (also 8 channel) which can take 16 drives. I will be creating a single RAID 10 volume. I know that adding more drives has positive effect on performance, but I'm not sure if adding more than 8 drives on an 8 channel controller will have any positive impact at all. Am I wrong? Should I put 16 drives for best performance? Would 8 drives give me the same performance?

    Read the article

  • Enlarging everything on 16" 1920x1080 notebook display in Windows 7

    - by Rob
    Does Windows 7 have an option to enlarge everything on the screen, e.g. via a spi setting? How well does this work? i.e. do the objects look clear when enlarged? I ask this because sometimes software that enlarges non-photographic bitmap images e.g. icons and symbols can leave them artifacted with harsh jaggier slopes and blurred lines. I've tried the dpi setting in Windows XP but it doesn't enlarge everything, and some things are not so clear as described above. I'm looking at a notebook/laptop with this spec. I've already enjoyed using a 15.4" 1920x1200 display for 5 years. I've tried the dpi setting in Windows XP but it doesn't enlarge everything, and some things are not so clear as described above. I am buying a laptop for my father who will probably prefer larger objects on the screen, although I want to provide some future proofing by allowing more on the screen if needed. I'm not interested in answers that debate the effectiveness or otherwise merits of 1920x1080 on a 16" display, please. The alternative option of 1366x768 seems too little.

    Read the article

  • Can Windows 7 restore itself from image to a smaller HDD than original?

    - by Borek
    I've created a full system image using the built-in Win7 utility, it was from a 300GB drive but there is only about 50GB of data. I then swapped disks in my notebook, the new one being 80GB SSD and now when I boot to the system restore applet, go through all of the settings (finding the backed up image on a network share, confirming that I'm willing to repartition my disk etc.), I get this: The system image restore failed. No disk that can be used for recovering the system disk can be found. [Details] Is this because I'm trying to restore to a smaller disk? (Even though the data should fit without any problems, there being only 50GB of it.)

    Read the article

  • Any method to resize my app's window on Mac (macbook) to 1600 x 1200 or 1920 x 1200?

    - by Jian Lin
    I would like to make a screen capture for an app (Firefox), but I am using a macbook, so the display is at 1280 x 800. I think if I can somehow resize the window to 1920 x 1200, then I can use Command + Shift + 4 and then space bar, and then mouse click on that app to capture the whole app's window (which will be bigger than the screen) So I can resize the window horizontally to 1920 by dragging the window to the left, and then make it wider by going to the bottom-right corner of the window. But there seems to be no way to make it taller... even javascript: self.resizeTo(screen.availWidth+300,screen.availHeight+300); on the Firefox address bar (URL bar) won't work... it can make the window wider than the screen, but not taller. Is there any method at all?

    Read the article

  • Compatible case?

    - by Rick
    Hello everyone, first of all, I'm not sure where this question should go. So I've looked around and found the 'hardware' tag used in superuser.com please forgive me if I'm posting this on the wrong site. I'm new to the hardware part of computers. I've been looking around for a few months and now is the time to make my choice. I want to build my own computer and I think I got all the items I need. I want to know if the case and the motherboard I've chosen are compatible or if you could tell me how to check if they're compatible I want to know if they fit. Here's the motherboard/processor/memory package And this* is the case I'd like to fit it in. I'm sure that all the other stuff I might need I have with me already. Thanks in advance -Rick *See my comment, I may not post two hyperlinks due to spam protection

    Read the article

  • Pushing new mailbox limits for Exchange 2003 accounts

    - by Dobler
    There is this problem that I have every time I set up an account for a user on Exchange 2003. After I update the Mailbox limit to unlimited in the Exchange tab in the user preferences it does not seem to update right away. I remember reading somewhere that it takes several hours for the change to update in the database. I also remember typing in some terminal command that pushed the new updates immediately. What is that command, and why is it so difficult to find the answer to this problem on Google?

    Read the article

  • Select list shrinks in size horizontally when empty

    - by joe
    Hello, I have two select list boxes and i can move items back and forth between them using the forward (--) and backward (<--) button. However, if there are no items in a select list, it shrinks in size horizontally. Any way to keep the select list a fixed size, irrespective of whether it contains any options or not ? Below is the code: <html> <head> <script language="JavaScript" type="text/javascript"> <!-- var NS4 = (navigator.appName == "Netscape" && parseInt(navigator.appVersion) < 5); function addOption(theSel, theText, theValue) { var newOpt = new Option(theText, theValue); var selLength = theSel.length; theSel.options[selLength] = newOpt; } function deleteOption(theSel, theIndex) { var selLength = theSel.length; if(selLength>0) { theSel.options[theIndex] = null; } } function moveOptions(theSelFrom, theSelTo) { var selLength = theSelFrom.length; var selectedText = new Array(); var selectedValues = new Array(); var selectedCount = 0; var i; // Find the selected Options in reverse order // and delete them from the 'from' Select. for(i=selLength-1; i>=0; i--) { if(theSelFrom.options[i].selected) { selectedText[selectedCount] = theSelFrom.options[i].text; selectedValues[selectedCount] = theSelFrom.options[i].value; deleteOption(theSelFrom, i); selectedCount++; } } // Add the selected text/values in reverse order. // This will add the Options to the 'to' Select // in the same order as they were in the 'from' Select. for(i=selectedCount-1; i>=0; i--) { addOption(theSelTo, selectedText[i], selectedValues[i]); } if(NS4) history.go(0); } //--> </script> </head> <body> <form action="yourpage.asp" method="post"> <table border="0"> <tr> <td width="70"> <select name="sel1" size="10" multiple="multiple"> <option value="1">Left1</option> <option value="2">Left2</option> <option value="3">Left3</option> <option value="4">Left4</option> <option value="5">Left5</option> </select> </td> <td align="center" valign="middle"> <input type="button" value="--&gt;" onclick="moveOptions(this.form.sel1, this.form.sel2);" /><br /> <input type="button" value="&lt;--" onclick="moveOptions(this.form.sel2, this.form.sel1);" /> </td> <td> <select name="sel2" size="10" multiple="multiple"> <option value="1">Right1</option> <option value="2">Right2</option> <option value="3">Right3</option> <option value="4">Right4</option> <option value="5">Right5</option> </select> </td> </tr> </table> </form> </body> </html> Please help. Thank You.

    Read the article

  • Formatting XML using XSLT1.0

    - by DS
    Hi, I have the following xml: <Subscriptions> <Subscription> <Uplink> <Size>15</Size> <Unit>Mbps</Unit> </Uplink> <Name>Class D</Name> </Subscription> <Subscription> <Uplink> <Size>10</Size> <Unit>Mbps</Unit> </Uplink> <Name>Class A</Name> </Subscription> <Subscription> <Downlink> <Size>50</Size> <Unit>Mbps</Unit> </Downlink> <Name>Class B</Name> </Subscription> <Subscription> <Uplink> <Size>10</Size> <Unit>Mbps</Unit> </Uplink> <Name>Class B</Name> </Subscription> <Subscription> <Downlink> <Size>40000</Size> <Unit>Mbps</Unit> </Downlink> <Name>Class A</Name> </Subscription> <Subscription> <Downlink> <Size>20</Size> <Unit>Mbps</Unit> </Downlink> <Name>Class C</Name> </Subscription> <Subscription> <Downlink> <Size>45</Size> <Unit>Mbps</Unit> </Downlink> <Name>Class D</Name> </Subscription> </Subscriptions> I want to group it in the following format based on name using XSLT1.0. Please help <?xml version="1.0" encoding="UTF-8"?> <Subscriptions> <Subscription> <Downlink> <Size>45</Size> <Unit>Mbps</Unit> </Downlink> <Uplink> <Size>15</Size> <Unit>Mbps</Unit> </Uplink> <Name>Class D</Name> </Subscription> <Subscription> <Downlink> <Size>40000</Size> <Unit>Mbps</Unit> </Downlink> <Uplink> <Size>10</Size> <Unit>Mbps</Unit> </Uplink> <Name>Class A</Name> </Subscription> <Subscription> <Downlink> <Size>50</Size> <Unit>Mbps</Unit> </Downlink> <Uplink> <Size>10</Size> <Unit>Mbps</Unit> </Uplink> <Name>Class B</Name> </Subscription> <Subscription> <Downlink> <Size>20</Size> <Unit>Mbps</Unit> </Downlink> <Uplink> <Size>0</Size> <Unit>Mbps</Unit> </Uplink> <Name>Class C</Name> </Subscription> </Subscriptions> Thanks & Regards, D

    Read the article

< Previous Page | 60 61 62 63 64 65 66 67 68 69 70 71  | Next Page >