Search Results

Search found 6510 results on 261 pages for 'umesha ms'.

Page 203/261 | < Previous Page | 199 200 201 202 203 204 205 206 207 208 209 210  | Next Page >

  • How can I speed up line by line reading of an ASCII file? (C++)

    - by Jon
    Here's a bit of code that is a considerable bottleneck after doing some measuring: //----------------------------------------------------------------------------- // Construct dictionary hash set from dictionary file //----------------------------------------------------------------------------- void constructDictionary(unordered_set<string> &dict) { ifstream wordListFile; wordListFile.open("dictionary.txt"); string word; while( wordListFile >> word ) { if( !word.empty() ) { dict.insert(word); } } wordListFile.close(); } I'm reading in ~200,000 words and this takes about 240 ms on my machine. Is the use of ifstream here efficient? Can I do better? I'm reading about mmap() implementations but I'm not understanding them 100%. The input file is simply text strings with *nix line terminations.

    Read the article

  • Are ASCII diagrams worth my time?

    - by Jesse Stimpson
    Are ASCII diagrams within source code worth the time they take to create? I could create a bitmap diagram much faster, but images are much more difficult to in line in a source file (until VS2010). For the record, I'm not talking about decorative ASCII art. Here's an example of a diagram I recently created for my code that I probably could have constructed in half the time in MS Paint. Scenario A: v (U)_________________(N)_______<--(P) Legend: ' / | J = ... ' / | P = ... ' /d | U = ... ' / | v = ... ' / | d = ... '/ | N = ... (J) | | | |___________________|

    Read the article

  • drop-down combo box-like functionality for queries.

    - by Frank Developer
    Is it possible to provide the following type of fuctionality with informix client tools? As the user types the first two characters of a name, the drop-down list is empty. At the third character, the list fills with just the names beginning with those three characters. At the fourth character, MS-Access completes the first matching name (assuming the combo's AutoExpand is on). Once enough characters are typed to identify the customer, the user tabs to the next field. The time taken to load the combo between keystrokes is minimal. This occurs once only for each entry, unless the user backspaces through the first three characters again. If your list still contains too many records, you can reduce them by another order of magnitude by changing the value of constant conSuburbMin from 3 to 4.

    Read the article

  • Windows/C++: detect when focus has changed between windows (globally)

    - by twig
    I'm trying to find a way to detect when focus is changed to another window (without having to poll every X ms). I've already figured out a way to detect when focus is switched between applications using WH_SHELL and HSHELL_ACTIVATESHELLWINDOW. The problem is I want to detect when focus is switched between dialog/windows within the same app. ie. In Notepad, I can determine when the app switches to Notepad, but I cannot detect when the "Open" or "Save" dialogs appear because the focus is still within the same application.

    Read the article

  • Will Windows Update modify anything in Visual Studio?

    - by Martin
    (Note: Yes, the technical side of this question seems to be rather SuperUser, but the implications are more relevant for StackOverflow readers.) As the title says, we are wondering if (fully) enabling automated Windows Updates on our developer machines will have implications for MS Visual Studio. That is, will any fixes to any components (be it libraries, UI/IDE, compiler, ...) ever be updated through Windows Update? We want to have 100% exact and reproducible development environments (wrt C++) on all developer machines, and so we are concerned that automated Windows updates may introduce some uncontrolled updates into our development chain.

    Read the article

  • Controling CRT memory initialization

    - by Ofek Shilon
    Occasionally you meet bugs that are reproducible only in release builds and/or only on some machines. A common (but by no means only) reason is uninitialized variables, that are subject to random behaviour. E.g, an uninitialized BOOL can be TRUE most of the time, on most machines, but randomly be initialized as FALSE. What I wish I would have is a systematic way of flushing out such bugs by modifying the behaviour of the CRT memory initialization. I'm well aware of the MS debug CRT magic numbers - at the very least I'd like to have a trigger to turn 0xCDCDCDCD (the pattern that initializes freshly allocated memory) to zeros. I suspect one would be able to easily smoke out nasty initialization pests this way, even in debug builds. Am I missing an available CRT hook (API, registry key, whatever) that enables this? Anyone has other ideas to get there?

    Read the article

  • [ASP.NET] How can I HTML-encode a string and use human-readable encoded tags (ex: &ecirc; instead of

    - by Beerdude26
    Greetings, I'm looking for a way to encode a string into HTML that uses human-readable tags such as &ecirc; (=ê). At the moment, I am using the HttpUtility.HtmlEncode() function, but it appears to return numbered tags instead of human-readable ones. For example: Dim str as string = HttpUtility;HtmlEncode("vente - en-tête") 'Expected: vente - en-t&ecirc;te 'Actually received: vente - en-t&#234;te Is there a setting or function in ASP.Net to encode a string into HTML resembling the first comment? EDIT: I am looking for this kind of functionality because the text is saved HTML-encoded in the database. The text comes from a bunch of MS Word documents that have been converted to HTML.

    Read the article

  • Format table header

    - by Ryan Erb
    I have a table with slanted text in the header row, the only problem is that the text still makes the width of the columns way to large. Is there any way to squish together the table columns so that they are about the width of the select boxes? Or is there a way to place the text there without it in the header and maybe just use a <div> or <p>? Here is the fiddle I am working with: http://jsfiddle.net/t9Krg/1/ .slanted { -webkit-transform: rotate(-45deg); -moz-transform: rotate(-45deg); -ms-transform: rotate(-45deg); -o-transform: rotate(-45deg); transform: rotate(-45deg); white-space:nowrap; /* display:noblock; */ } The boarders around the header is just to see the extra spacing and will be removed later.

    Read the article

  • how to restore very large .bak file (180 GB) in SQL Server 2008

    - by Umutos
    Hello! I have a verly large .bak file (180 GB) which was stored in Microsoft SQL Server 2008 and I have to restore it. I first installed Microsoft SQL Server 2008 Express and tried to restore it in MS SQL management studio express but it didn't work because there is a size limit. Does anybody know a method how i can restore the file? Its the first time I work with Microsoft SQL and I have no clue what to do. Its really urgend and I would be really helpful for any help! Thanks a lot! Umutos

    Read the article

  • How do you escape double quotes inside a SQL fulltext 'contains' function?

    - by Richard Davies
    How do you escape a double quote character inside a MS SQL 'contains' function? SELECT decision FROM table WHERE CONTAINS(decision, '34" AND wide') Normally contains() expects double quotes to surround an exact phrase to match, but I want to search for an actual double quote character. I've tried escaping it with \, `, and even another double quote, but none of that has worked. P.S. I realize a simple example like this could also be done using the LIKE statement, but I need to use the fulltext search function. The query I provided here has been simplified from my actual query for example purposes.

    Read the article

  • Visual Studio 2008 error while debugging an app with "uiAccess=true" in the manifest

    - by Jon Tackabury
    I have a C# WinForms application that has "uiAccess" set to "True" in it's manifest file. When I try to start/debug it in Visual Studio 2008 SP1 under Windows 7 x64 (RTM) I get this error: Running an Accessibility application requires following the steps described in Help. The help button is a broken link, and clicking ok just closes the application. It is digitally signed, and I can start it just fine in Windows Explorer. Here is the same bug in MS Connect, but unfortunately it's closed: https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=384183 Question: Can anyone else using Vista/Win7 x64 (with UAC enabled) confirm that they experience the same problem? Has anyone seen this problem before and have any idea how to work around it?

    Read the article

  • Can I prevent a computed column from changing it's value if the formula changes?

    - by William Hurst
    I have a computed column in MS SQL 2005 that does some VAT calculations. The website uses invoices that can only be generated once and rely on the value in the computed column to work out the VAT. Unfortunately, a bug was found that means that the the VAT value calculated was off by a few cents. Not a huge problem but we can't change the values from all the previously computed values as these need to be honoured on the invoices. tldr; How do I change the calculation for a computed column without re-calculating the values that have already be calculated?

    Read the article

  • Doing a lot of input validation in VB.NET

    - by Andy
    I have a form set up where users can enter their booking for a room at my college. I want to validate the user input to avoid SQL injection (my program uses a MS Access database) and also stop numbers and synbols in their name, etc. I can do the validation fine, but there is to be a lot of validation and then methods executed only if all validation tests come back as true. I did have something like this: If txtName.Text = "" Then frmBookErr.SetError(txtName, "Name field cannot be left blank.") fail = 1 Else frmBookErr.SetError(txtName, "") fail = 0 End If And then check the fail variable, but it obviously gets overridden later in the form if one of the validation tests come back as true. Can anyone provide some input into this? Thanks.

    Read the article

  • c/c++ how to convert short to char

    - by changed
    Hi I am using ms c++. I am using struct like struct header { unsigned port : 16; unsigned destport : 16; unsigned not_used : 7; unsigned packet_length : 9; }; struct header HR; here this value of header i need to put in separate char array. i did memcpy(&REQUEST[0], &HR, sizeof(HR)); but value of packet_length is not appearing properly. like if i am assigning HR.packet_length = 31; i am getting -128(at fifth byte) and 15(at sixth byte). if you can help me with this or if their is more elegant way to do this. thanks

    Read the article

  • Is Microsoft CCR gaining any traction?

    - by spender
    Microsoft's Concurrency and Coordination Runtime quite literally saved a project that was running into major issues with deadlocking. Since then I find that I use it more and more frequently for almost anything that requires asynchronous coding producing results that run lighter and faster than before. I can honestly state that it has transformed the way I think about multithread/multicore dev. Despite my personal love for CCR, there appears to be very little buzz surrounding it on the web and was wondering if anyone can offer any reason for this. Are there better alternatives, or is it a lack of promotion from MS, or are people simply happy with the existing tools?

    Read the article

  • Stored procedure called from C# executes 6 times longer than from SQL Management studio

    - by Sergey Osypchuk
    I have search stored procedure which is my performance bottleneck. In order to get control about what is happened, I added logging for all parameters and also execution time in SP. I noticed, that when I call SP from MIcrosoft SQL server management Studio execution time is 1.3-1.6 seconds, but when i call it from C#, it takes 6-8 secods (!!!) Parameters | Time (ms) "tb *"TreeType:259Parents:212fL:13;14fV:0;lcid:2057min:0max:10sort:-1 | 6406 "tb *"TreeType:259Parents:212fL:13;14fV:0;lcid:2057min:0max:10sort:-1 | 1346 SP is called with LINQ. Login settings are same. SP uses full text search What could cause this?

    Read the article

  • How do I download an attachment from an annotation using client-side JScript?

    - by VVander
    I'm trying to provide a link to the attachment of a note through the client-side JScript. The standard MS-made Notes component does this through the following url: [serverurl]/[appname]/Activities/Attachment/download.aspx?AttachmentType=5&AttachmentId={blahblahblah}&IsNotesTabAttachment=1&CRMWRPCToken=blahblahblah&CRMWRPCTokenTimeStamp=blahblahblah The problem is that I don't know how to get the Token or TokenTimeStamp, so I'm receiving an Access Denied error ("form is no longer available, security precaution, etc"). The only other way I can think of doing this is through the OData endpoint, but that would at best get me a base64 string that I still would have translate into a filestream to give to the browser (all of which seems like it would take forever to implement/figure out). I've found a few other posts that describe the same thing, but no one has answered them: http://social.microsoft.com/Forums/en-US/crmdevelopment/thread/6eb9e0d4-0c0c-4769-ab36-345fbfc9754f/ http://social.microsoft.com/Forums/is/crm/thread/45dabb6e-1c6c-4cb4-85a4-261fa58c04da

    Read the article

  • Why can't I pass in a uniqueidentifier/GUID to a stored procedure

    - by chobo2
    Hi I have this SP USE [TestDB] GO /****** Object: StoredProcedure [dbo].[sp_test] Script Date: 06/12/2010 11:47:27 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[sp_test] @id uniqueidentifier AS BEGIN select * from TestTbl where ProductId= @id END I then went to the SP with ms sql 2005 and clicked execute. It comes up with a box where I entered in the GUID. I copied and pasted it straight from my test database. I get this error. Msg 102, Level 15, State 1, Line 5 Incorrect syntax near 'cac671b'. So why can't I sent in GUIDs? even ones that are copied right from the database and must be valid as they where allowed into the db.

    Read the article

  • php database excel export

    - by user434885
    i am using a php script to export datd from mysql into excel. the first row of the excel sheet is a column headings i want them to appear in bold how do i do this ? i am using hte following code: $con = mysql_connect("localhost","admin","password"); if (!$con) { die('Could not connect to DB: \n' . mysql_error()); } mysql_select_db("ALNMSI", $con); $result = mysql_query("SELECT * FROM survey1"); $filename = "alnmsi_" . date('d-m-Y') . ".xls"; header("Content-Disposition: attachment; filename=\"$filename\""); header("Content-Type: application/vnd.ms-excel"); $flag = false; $flag = false; while($row = mysql_fetch_array($result)) { if(!$flag) { data_keys(); $flag = true; } array_walk($row, 'cleanData'); data_array($row);

    Read the article

  • building an ASP NET MVC site, should i go with linq to sql?

    - by aspm
    so i'm about to start a new website from scratch and i've spent about a week trying to figure out what technology to go with. i'm sold on ASP NET MVC. i'm 100% sure i'm going to love using that. but what i am not so sure about yet is using LINQ 2 SQL. so far i've gathered some data... 1) stack overflow uses it - can't be that bad 2) can be REALLY slow if you don't take advantage of compiled queries 3) will always be slower than ADO net, but can be almost just as fast if using #2 in the proper places 4) is NOT the preferred MS solution (there was a thread here on SO about dropping support) i'm itching to use it, but just want to make sure it's the best for me. i come from a heavy ADO/stored procedure and traditional asp net background (this will be my first experience with ASP MVC).

    Read the article

  • Best way to move a bunch of SQL Server 2005 tables to another Server?

    - by Mikecancook
    I've been looking for a way to move a bunch of tables, more than 40, to another server with all the data in them. I've looked around for scripts to generate inserts but so far I'd have to run them once for every table, then copy all the scripts over and then run them on the server. Seems like there is a better way. --Update-- My strategy for doing this may have been for naught. The end script, using MS SQL Server Publishing Wizard and Red Gates SQL Data Compare (excellent tool, btw) results in a file over 1GB. This makes my system plead for mercy and I'm not willing to risk crashing a clients server just opening the file to run it. I may have to rethink this whole thing and break down to just individual per table scripts. I'm not looking forward to that.

    Read the article

  • SQL Server 2000, how to automate import data from excel

    - by Stan
    Say the source data comes in excel format, below is how I import the data. Converting to csv format via MS Excel Roughly find bad rows/columns by inspecting backup the table that needs to be updated in SQL Query Analyzer truncate the table (may need to drop foreign key constraint as well) import data from the revised csv file in SQL Server Enterprise Manager If there's an error like duplicate columns, I need to check the original csv and remove them I was wondering how to make this procedure more effecient in every step? I have some idea but not complete. For step 2&6, using scripts that can check automatically and print out all error row/column data. So it's easier to remove all errors once. For step 3&5, is there any way to automatically update the table without manually go through the importing steps? Could the community advise, please? Thanks.

    Read the article

  • Could someone explain __declspec(naked) please?

    - by Scott
    I'm looking into porting a script engine written for Windows to Linux; it's for Winamp's visualization platform AVS. I'm not sure if it's even possible at the moment. From what I can tell the code is taking the addresses of the C functions nseel_asm_atan and nseel_asm_atan_end and storing them inside a table that it can reference during code execution. I've looked at MS's documentation, but I'm unsure what __declspec(naked) really does. What is prolog and epilog code mentioned in the documentation? Is that related to Windows calling conventions? Is this portable? Know of any Linux-based examples using similar techniques? static double (*__atan)(double) = &atan; __declspec ( naked ) void nseel_asm_atan(void) { FUNC1_ENTER *__nextBlock = __atan(*parm_a); FUNC_LEAVE } __declspec ( naked ) void nseel_asm_atan_end(void) {}

    Read the article

  • converting tabular structures in a Word document into an actual table or reading data from the tabul

    - by Chris
    I have a macro which can read the last cell/column of all tables in a Word 2003/2007 document and store the data in an MS-Access table. But, some Word documents have the data in structures like a table format but are not actually tables. The structure looks like a table, but the table borders are actually line connectors. These documents were created by a software(VeryPDF PDF to Word converter) which converted the PDF documents(the original format these documents were) into Word documents. Is there a way I can convert/replace the tabular structures with actual tables in Word so that I can use the macro? Or, is there a way I can read the value of the last column from the tabular structures using some VBA code? Any advice would be appreciated.

    Read the article

  • How to do insert one row from one table to another table(what has less columns)?

    - by chobo2
    Hi I am trying to find rows that are not in one table and insert them into another. The table I am trying to insert into has less columns then the other one. These columns are null but it would be cool if I could hardcode a value before I do the insert. But I am having so much trouble with just trying to get it to insert. I have something like this SELECT p.ProductId, p.ProductName INTO SomeTable FROM Product as p WHERE p.ProductName != 'iPad' I will get a error like this though Msg 4104, Level 16, State 1, Line 1 The multi-part identifier "p.ProductId" could not be bound. I am not sure what I am doing wrong. I copied and pasted the names in so I don't think it is a spelling mistake. I am using ms sql 2005 express.

    Read the article

< Previous Page | 199 200 201 202 203 204 205 206 207 208 209 210  | Next Page >