Search Results

Search found 11822 results on 473 pages for 'ms word'.

Page 95/473 | < Previous Page | 91 92 93 94 95 96 97 98 99 100 101 102  | Next Page >

  • C++ Word-Number to int

    - by Andrew
    I'm developing a program that makes basic calculations using words instead of numbers. E.g. five + two would output seven. The program becomes more complex, taking input such as two_hundred_one + five_thousand_six (201 + 5006) Through operator overloading methods, I split each number and assign it to it's own array index. two would be [0], hundred is [1], and one is [2]. Then the array recycles for 5006. My problem is, to perform the actual calculation, I need to convert the words stored in the array to actual integers. I have const string arrays such as this as a library of the words: const string units[] = { "", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine" }; const string teens[] = { "ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen" }; const string tens[] = { "", "", "twenty", "thirty", "forty", "fifty", "sixty", "seventy", "eighty", "ninety" }; If my 'token' array has stored in it two hundred one in index 0, 1, and 2, I'm not sure what the best way to convert these to ints would involve.

    Read the article

  • Regex to find a word, then extract a line containing the first occurence of a different word immedia

    - by Hinchy
    World's most convuluted title I know, an example should explain it better. I have a large txt file in the below format, though details and amount of lines will change everytime: Username: john_joe Owner: John Joe Account: CLI: Default: LGICMD: Flags: Primary days: Secondary days: No access restrictions Expiration: Pwdlifetime: Last Login: Maxjobs: Maxacctjobs: Maxdetach: Prclm: Prio: Queprio: CPU: Authorized Privileges: BYPASS Default Privileges: SYSPRV This sequence is repeated a couple of thousand times for different users. I need to find every user (ideally the entire first line of the above) that has SYSPRV under "Default Permissions". I know I could write an application to do this, I was just hoping their might be a nice regex I could use. Cheers

    Read the article

  • MS Excel connection with vb.net

    - by Noreen
    I have used the connection string below but I am getting an error when trying to create a table Dim ConnString As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & strFName + _ ";Extended Properties=""Excel 12.0 Xml;HDR=YES;IMEX=1""" Cannot modify the design of table 'tablename'. It is in a read-only database.

    Read the article

  • Clickonce appref.ms argument

    - by alan
    I have a clickonce application that is available online or offline. The program takes an argument. When online I pass the argument on the url like so "url?argument" and it works well. Offline i start a process with the startmenu link to the application. My question is, is it possible to pass an argument to my application via this link? I guess I could somehow work out the location of the application file but is there an alternative?

    Read the article

  • Function in c++ for finding if a word is prefix

    - by VaioIsBorn
    Let say i have some words AB, AAB, AA. AB is not a prefix to AAB but AA is a prefix to AAB because if i just add B at the end of AA it will become AAB, which is not possible with AB. So, is there any function in c++ (STL) so that i can determine of two words if one is prefix to the another ? Thanks.

    Read the article

  • C# How to place a comma after each word but the last in the list

    - by user576712
    I totally new to C# and learning as I go. I am stuck on issue which I'm hoping an experienced programmer can help. I have added a CheckedListBox to my form and added a collection of 6 items to it. I need all but the last item selected to have a comma placed beside it, so my question is: how can I tell C# NOT to place a comma beside the last item selected? foreach (object itemChecked in RolesCheckedListBox.CheckedItems) { sw.Write(itemChecked.ToString() + ","); } Thanks for any help received! Dan

    Read the article

  • Regular expression for a string containing one word but not another

    - by Chris Stahl
    I'm setting up some goals in Google Analytics and could use a little regex help. Lets say I have 4 URLs http://www.anydotcom.com/test/search.cfm?metric=blah&selector=size&value=1 http://www.anydotcom.com/test/search.cfm?metric=blah2&selector=style&value=1 http://www.anydotcom.com/test/search.cfm?metric=blah3&selector=size&value=1 http://www.anydotcom.com/test/details.cfm?metric=blah&selector=size&value=1 I want to create an expression that will identify any URL that contains the string selector=size but does NOT contain details.cfm I know that to find a string that does NOT contain another string I can use this expression: (^((?!details.cfm).)*$) But, I'm not sure how to add in the selector=size portion. Any help would be greatly appreciated!

    Read the article

  • MS SQL Server Dates Excel

    - by KillerSnail
    I have data this is linked from SQL Server into an excel document. The column format on the SQL Server is datetime2. When I get the data via an ODBC connection it comes across as a string? I tried using CAST(column AS DATE ) but that didn't work. I tried reformatting via CONVERT(VARCHAR(10), column, 103) as well but that didn't work. I tried retrieving the data via Microsoft query as well but that didn't work. At the moment I am using VBA code like: While (ActiveCell.Value <> "") ActiveCell.Value = DATEVALUE(ActiveCell.Value) ActiveCell.Offset(1,0).Activate Wend and looping through each column that needs this treatment but 100000 rows in multiple columns takes forever to loop through. Are there any alternatives?

    Read the article

  • Regular Expression for exclude something that has specific word inside bracked (MySQL)

    - by bn
    This Regular expression if for MySQL query: I want to exclude this row because it has 'something' in side the bracket "bla bla bla bla bla bla (bla bla bla something)" However I want to include this row, because it does not have 'something' inside the bracket "bla bla bla (bla bla bla)" I tried this query but it didnt work. SELECT * FROM table WHERE field NOT REGEXP '((%something%))'; I think this is wrong, I just did trial and error, I like to use regular expression, but never understand it completely. is there any good tutorial/books/links for learning the detail of regular expression? Thank You

    Read the article

  • How to build where clause in MS SQL??

    - by Kai
    I would like to build the where clase of sql statement dynamatically from hashtable in C#. The key of the hash_table will be the column's name to be inserted and the value of hash_table will be value. string sql_1="SELECT COL_1,COL_2 FROM MY_TABLE"; string sql_2="SELECT * FROM MY_TABLE WHERE COL_3='ABC'"; //note: some statment have where clause while some do NOT have. string sql= ToSql(sql_1,myHashTable); // the actual sql statment will be returned from ToSql //execute sql sql= ToSql(sql_2,myHashTable); // //execute sql My Question is, how can I create function ToSql() function in LINQ? NOTE: The data type of the value of hashtable will be taken into consideration. Thanks in advance.

    Read the article

  • How can I delete everything after the first column in Notepad++?

    - by Bob J
    I'm trying to get rid of everything after a column in Notepad++. Column mode is not an option. Is it possible? What I have 70.97.110.40 159 ms [n/a] 21 70.97.117.177 134 ms [n/a] 21 70.97.120.10 75 ms [n/a] 21 70.97.122.105 87 ms www.portless.net 21 70.97.122.106 89 ms www.popovetsky.org 21 70.97.122.107 95 ms www.psmythe.net 21 70.97.122.104 98 ms wasabi.prostructure.com 21 70.97.122.108 89 ms crm.prostructure.com 21 70.97.122.109 87 ms internal.prostructure.com21 What I want 70.97.110.40 70.97.117.177 70.97.120.10 70.97.122.105 70.97.122.106 70.97.122.107 70.97.122.104 70.97.122.108 70.97.122.109 Thanks

    Read the article

  • MS Excel 03 - Deleting rows that have live string identifiers in column A, while concatenating other

    - by Justin
    I have this xml document that is provided as a data feed (right off the bat I can not modify the source of the data feed) and i import it into excel with the xml import. there is no schema that comes with this xml so i get a table that ends up having a whole bunch of duplicates for an identifier, because of the unique values spread throughout the spreadsheet. XML in XLS Col1(IDnum) Col2(name) Col3(Type) Col4(Category) Col(etc) ================================================================= 0011 Item 01 6B 0011 Item xxj9 7B 0011 Item xxj9 0011 Item 02 0011 Item 01 xxj9 6B 0012 etc I need to delete all rows where columnA string/number matches while concatenating all potential values from Col3, Col4 & Col5 together so it looks like this Col1(IDnum) Col2(name) Col3(Type) Col4(Category) Col(etc) ================================================================= 0011 Item 01, 02 xxj9 6B, 7B what visual basic method would allow me to accomplish this? thanks

    Read the article

  • MS SQL Server stored procedure meaning

    - by den-javamaniac
    Hi. I'm developing a simple database architecture in VisualParadigm and lately ran over next code excerpt. IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'getType') AND type in (N'P', N'PC')) DROP PROCEDURE getType; Next goes my stored procedure: CREATE PROCEDURE getType @typeId int AS SELECT * FROM type t WHERE t.type_id = @typeId; Can anyone explain what does it mean? P.S.: It would be great, if you may also check for any syntax errors as I'm totally new to MSSQL and stored procedures.

    Read the article

  • extract word with regular expression

    - by farka
    I have a string 1/temperatoA,2/CelcieusB!23/33/44,55/66/77 and I would like to extract the words temperatoA and CelcieusB. I have this regular expression (\d+/(\w+),?)*! but I only get the match 1/temperatoA,2/CelcieusB! Why?

    Read the article

  • MS VC++ 6 class wizard

    - by Shane MacLaughlin
    Ok, I'm developing an application that has been in pretty much continous development over the last 16 years, from C in DOS, through various flavours of C++ and now is largely based around C++ with MFC and StingRay GUIs and various other SDKs. While I use VS 2005 for the release builds, I still use MSVC 6 for much of the GUI building, simply because ClassWizard is so much quicker in this environment than the weak equivalent tools that followed. Note that I am using ClassWizard to automatically generate code for my own user defined types (see Custom DDXs) and I like to add a lot of member variables and methods in one go. Creating them one at a time as per later versions of Visual Studio for me is a big backward step. At the same time, working with multiple IDEs is also a pain. My question is in two parts; Is there any way of getting ClassWizard to work is VS 2005 or VS 2008? Is there any drop in replacement, or alternative IDE, that provides similar levels of productivty for old C++ hacks such as myself?

    Read the article

  • HTACCESS redirection with a word replacement in url

    - by Marwen
    I'm having trouble with this reg expression which i belive is correct, but it is not working. What im trying to do is redirect bunch of urls containing a specific string like this: http://www.example.com/**undesired-string**_another-string to http://www.example.com/**new-string**_another-string and http://www.example.com/folder/**undesired-string**/another-string to http://www.example.com/folder/**new-string**/another-string So i have this code in the .htaccess: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule (.+)+(undesired-string)+(.+) $1new-string$2 [R=301,L] </IfModule> This should replace ANY undesired-string in any url to new-string, but it is not working, any idea why ? Thank you

    Read the article

  • How to remove words based on a word count

    - by Chris
    Here is what I'm trying to accomplish. I have an object coming back from the database with a string description. This description can be up to 1000 characters long, but we only want to display a short view of this. So I coded up the following, but I'm having trouble in actually removing the number of words after the regular expression finds the total count of words. Does anyone have good way of dispalying the words which are less than the Regex.Matches? Thanks! if (!string.IsNullOrEmpty(myObject.Description)) { string original = myObject.Description; MatchCollection wordColl = Regex.Matches(original, @"[\S]+"); if (wordColl.Count < 70) // 70 words? { uxDescriptionDisplay.Text = string.Format("<p>{0}</p>", myObject.Description); } else { string shortendText = original.Remove(200); // 200 characters? uxDescriptionDisplay.Text = string.Format("<p>{0}</p>", shortendText); } }

    Read the article

  • How to avoid the linebreak inside a word (Static Layout

    - by Addev
    I'm trying to make a text as big as I can making it fit a Rect. basically I use a StaticLayout for pre-calculate the text size and make it fit the Rect's height: // Since the width is fixed for the StaticLayout it should only fit the height while (currentHeight>Rect.getHeight()){ size-=2; } textPaint.setTextSize(size); The problem is that if the Rect is very high, the exit condition is reached but breaking the words (see the capture). Is there a way for avoid this? Goal: Actual: Current code: textSize=MAX_TEXT_SIZE do { if (textSize < mMinTextSize) { Log.i(TAG, "Min reached"); textSize = mMinTextSize; textPaint.setTextSize(textSize); fits = true; } else { textPaint.setTextSize(textSize); StaticLayout layout = new StaticLayout(text, textPaint, targetWidth, Alignment.ALIGN_NORMAL, 1.0, 0, true); layout.draw(canvas); float heightRatio= (float) layout.getHeight() / (float) targetHeight; boolean fitsHeight = heightRatio<= 1f; if (fitsHeight) { fits = true; } else { textSize -= 2; } } Log.i(TAG, "textSize=" + textSize + " fits=" + fits); } while (!fits); thanks

    Read the article

  • word after the space NSlog

    - by DD007
    I am new bie to xcode may be question is silly but I am lagging with my home work. In a file I want to read a specific character after the string. I want to read all the character after the space. ex: asasasasasas wewewewewewe qwqwqwqwqwqw xyz_ 22 aaaaaaaaaaa bbbbbbbbbbb ccccccccccccccc ddddddddddddd fgfgfgfgfgfgfg ererererererer abc_ 12 bbbbbbbbbb dddddddd jkjkjkjkjkjkjk lalallalalalal everything is fine .. but i want to print after "xyz_ 22" as aaaaaaa then bbbb ccc

    Read the article

< Previous Page | 91 92 93 94 95 96 97 98 99 100 101 102  | Next Page >