Search Results

Search found 5657 results on 227 pages for 'delphi 2007'.

Page 29/227 | < Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >

  • Delphi 2009 - Strip non alpha numeric from string

    - by Brad
    I've got the following code, and need to strip all non alpha numeric characters. It's not working in delphi 2009 ` unit Unit2; //Used information from // http://stackoverflow.com/questions/574603/what-is-the-fastest-way-of-stripping-non-alphanumeric-characters-from-a-string-in interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; Type TExplodeArray = Array Of String; TForm2 = class(TForm) Memo1: TMemo; ListBox1: TListBox; Button1: TButton; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } Function Explode ( Const cSeparator, vString : String ) : TExplodeArray; Function Implode ( Const cSeparator : String; Const cArray : TExplodeArray ) : String; Function StripHTML ( S : String ) : String; function allwords(data:string):integer; end; var Form2: TForm2; allword, allphrase: TExplodeArray; implementation {$R *.dfm} Function TForm2.StripHTML ( S : String ) : String; Var TagBegin, TagEnd, TagLength : Integer; Begin TagBegin := Pos ( '<', S ); // search position of first < While ( TagBegin > 0 ) Do Begin // while there is a < in S TagEnd := Pos ( '>', S ); // find the matching > TagLength := TagEnd - TagBegin + 1; Delete ( S, TagBegin, TagLength ); // delete the tag TagBegin := Pos ( '<', S ); // search for next < End; Result := S; // give the result End; Function TForm2.Implode ( Const cSeparator : String; Const cArray : TExplodeArray ) : String; Var i : Integer; Begin Result := ''; For i := 0 To Length ( cArray ) - 1 Do Begin Result := Result + cSeparator + cArray [i]; End; System.Delete ( Result, 1, Length ( cSeparator ) ); End; Function TForm2.Explode ( Const cSeparator, vString : String ) : TExplodeArray; Var i : Integer; S : String; Begin S := vString; SetLength ( Result, 0 ); i := 0; While Pos ( cSeparator, S ) 0 Do Begin SetLength ( Result, Length ( Result ) + 1 ); Result[i] := Copy ( S, 1, Pos ( cSeparator, S ) - 1 ); Inc ( i ); S := Copy ( S, Pos ( cSeparator, S ) + Length ( cSeparator ), Length ( S ) ); End; SetLength ( Result, Length ( Result ) + 1 ); Result[i] := Copy ( S, 1, Length ( S ) ); End; //Copied from JclStrings function StrKeepChars(const S: AnsiString; const Chars: TSysCharSet): AnsiString; var Source, Dest: PChar; begin SetLength(Result, Length(S)); UniqueString(Result); Source := PChar(S); Dest := PChar(Result); while (Source < nil) and (Source^ < #0) do begin if Source^ in Chars then begin Dest^ := Source^; Inc(Dest); end; Inc(Source); end; SetLength(Result, (Longint(Dest) - Longint(PChar(Result))) div SizeOf(AnsiChar)); end; function ReplaceNewlines(const AValue: string): string; var SrcPtr, DestPtr: PChar; begin SrcPtr := PChar(AValue); SetLength(Result, Length(AValue)); DestPtr := PChar(Result); while SrcPtr < {greater than less than} #0 do begin if (SrcPtr[0] = #13) and (SrcPtr[1] = #10) then begin DestPtr[0] := '\'; DestPtr[1] := 't'; Inc(SrcPtr); Inc(DestPtr); end else DestPtr[0] := SrcPtr[0]; Inc(SrcPtr); Inc(DestPtr); end; SetLength(Result, DestPtr - PChar(Result)); end; function StripNonAlphaNumeric(const AValue: string): string; var SrcPtr, DestPtr: PChar; begin SrcPtr := PChar(AValue); SetLength(Result, Length(AValue)); DestPtr := PChar(Result); while SrcPtr < #0 do begin if SrcPtr[0] in ['a'..'z', 'A'..'Z', '0'..'9'] then begin DestPtr[0] := SrcPtr[0]; Inc(DestPtr); end; Inc(SrcPtr); end; SetLength(Result, DestPtr - PChar(Result)); end; function TForm2.allwords(data:string):integer; var i:integer; begin listbox1.Items.add(data); data:= StripHTML ( data ); listbox1.Items.add(data); ////////////////////////////////////////////////////////////// data := StrKeepChars(data, ['A'..'Z', 'a'..'z', '0'..'9']); // Strips out everything data comes back blank in Delphi 2009 ////////////////////////////////////////////////////////////// listbox1.Items.add(data); data := stringreplace(data,' ',' ', [rfReplaceAll, rfIgnoreCase] ); //Replace two spaces with one. listbox1.Items.add(data); allword:= explode(' ',data); { // Converting the following PHP code to Delphi $text = ereg_replace("[^[:alnum:]]", " ", $text); while(strpos($text,' ')!==false) $text = ereg_replace(" ", " ", $text); $text=$string=strtolower($text); $text=explode(" ",$text); return count($text); } for I := 0 to Length(allword) - 1 do listbox1.Items.Add(allword[i]); end; procedure TForm2.Button1Click(Sender: TObject); begin //[^[:alnum:]] allwords(memo1.Text); end; end. ` How else would I go about doing this? Thanks

    Read the article

  • HTML Doc Tool for Delphi 2009

    - by Smasher
    Is there any free HTML creating documentation tool that fully understands Delphi 2009 features like generics and anonymous methods? I tried DelphiCodeToDoc but it crashes while parsing the source code.

    Read the article

  • Parse params from an sql query using delphi

    - by Salvador
    How i can parse and extract the parameters from an SQL Query using delphi? example : from this query SELECT * FROM MyTable WHERE Field1=:Param1 AND Field2=:Param2 AND (Field3=:Param3 OR Field4=:Param4) i want to obtain Param1 Param2 Param3 Param4 Thanks in advance.

    Read the article

  • How to disable the Formatter in Delphi 2010

    - by Gad D Lord
    Hello, The formatter in Delphi 2010 is really an annoying thing to me. I prefer formatting my code manually. I believe I do it better. How can I disable it? NOTE: Answers on why I don't use it in the first place will not be accepted. I need it switched OFF. Nothing more, nothing less. Thank you.

    Read the article

  • Looking for a good Delphi unicode string library

    - by volvox
    Any suggestion for a good unicode string library for Delphi 2010? Such thing as class that would contain a collection of independent functions, basically an encapsulation of functions that manipulate strings (ex: Trimlike, Character removal, Positional, Sub-string, Compare, Informational, Case, Replacement, Manipulation functions etc. ). Thanks

    Read the article

  • Is it possible to aggregate multiple email accounts into a single Outlook 2007 Inbox/.OST file?

    - by Howiecamp
    I'm using Outlook 2007 and would like to combine multiple email accounts (some are Exchange, some IMAP) into a single Inbox/.OST mail file. An example of the functionality I'm looking for is the Blackberry, where you can configure multiple email accounts and then access that mail either by the inbox for that specific account or via a single aggregated mailbox. In the single mailbox case, when you reply to a given piece of mail the Blackberry is smart enough to switch your "From" address to be that of the account where the email came in to. I'm essentially looking for this functionality in Outlook. Are there native options and/or third party plug-ins which do this?

    Read the article

  • Why won't the Office 2007 AutoCorrections feature install correctly?

    - by gilles27
    I've installed Office 2007 successfully but each time I use an application that requires spell checking (e.g. Word, Outlook) I begin typing and get the following message The list of common English (U.K.) AutoCorrections is not available. This feature is not currently installed. Would you like to install it now? If I click Yes, I get an error with the message The list of common English (U.K.) AutoCorrections is not available. Microsoft Office Outlook cannot install the necessary files due to Windows Installer error 1605. This action is only valid for products that are currently installed. Does anyone know what I can do to resolve this? A reinstall hasn't worked.

    Read the article

  • Migrated from Exchange 2003 to Exchange 2007 - remove old 03 computer account?

    - by TheCleaner
    Migrated from Exchange 2003 to 2007 back in February of this year. I've still got the old exchange computer account in AD. Can I simply delete the computer account or will bad things start happening? I've looked in the Exchange 07 console and don't see the old server listed at all. HOWEVER: we do still have an old CNAME for this old Exchange server pointing to the new one for a few old clients that still have their mail server set to the old name...if that matters at all. I ran "get-exchangeserver" on the new server and the old one isn't listed at all.

    Read the article

  • Can I split a spreadsheet into multiple files based on a column in Excel 2007?

    - by geofftnz
    Is there a way in Excel to split a large file into a series of smaller ones, based on the contents of a single column? eg: I have a file of sales data for all sales reps. I need to send them a file to make corrections and send back, but I dont want to send each of them the whole file (because I dont want them changing eachother's data). The file looks something like this: salesdata.xls RepName Customer ContactEmail Adam Cust1 [email protected] Adam Cust2 [email protected] Bob Cust3 [email protected] etc... out of this I need: salesdata_Adam.xls RepName Customer ContactEmail Adam Cust1 [email protected] Adam Cust2 [email protected] and salesdata_Bob.xls Bob Cust3 [email protected] Is there anything built-in to Excel 2007 to do this automatically, or should I break out the VBA?

    Read the article

  • Opening Office 2007 files using a Vista or Win7 client on a server 2008 file share causes lockups an

    - by DrZaiusApeLord
    I think this mostly happens when trying to open files opened by other users. In the XP/2003 days you would get some kind of warning about a locked/read only file. With 7/Vista/2008 I'm just seeing clients hang (Word just sits there) and if I go into the file share and attempt to right-click on the file, explorer hangs for several minutes. I tried disabling AV on the file server as well as locally. No luck. I've read that SMB2.0 might be the culprit here, but even testing that solution means disabling it on both the client and server, and requires a server reboot. Does this sound like an SMB2 issue? The server is 2008 SP1. The clients are Win7 vanilla and Vista SP2 with all the current updates. Office 2007 SP2 with all updates. Thanks.

    Read the article

  • Why is Word 2007 not allowing me to select and edit text?

    - by CT
    I have just installed Office 2007 for a user. Word is acting strangely. If I open a document. The cursor just stays at the top left of the document and I can not place it anywhere else. I cannot select other text. I cannot write additional text. If I simply open up Word and start a new document I am allowed to type like normal. If I were to save and close this document and reopen it. I would not be able to input anything. Seems like I am stuck in some wrong input mode? I have already tried uninstalling and reinstalling. Any ideas?

    Read the article

  • How to type a small fraction in Word 2007 equation editor?

    - by Timwi
    In Word 2007’s equation editor, I can enter “1/2” and I will get a properly formatted fraction. However, there is another kind of fraction that uses a smaller font size. How do I type that one using the keyboard alone? I notice that if I switch to linear mode, I get a small box displayed: Using the clipboard, I find that this is the same box (U+25A1) that I also get if I type “\box”. Despite, typing “\box(1/2)” still turns into a normal-size fraction and not the small fraction. How do I type the small fraction?

    Read the article

  • Outlook 2007: compose, and reply error with "Not Implemented."

    - by dagit
    This is happening on a Windows Vista machine with Office 2007 Ultimate. I have run repair from the control panel and also the MS Office Diagnostic tool. No problems are reported. When I started Outlook my mail box opens and I can read my messages. If I click compose or reply then Outlook gives me a dialog that says, "Not Implemented." The rest of office seems to be working fine. Does anyone know what causes this or the correct way to repair it? Thanks!

    Read the article

  • How to migrate exchange 2007 (sherweb) to Google Apps?

    - by Yoffe
    I need to migrate our Sherweb.com exchange 2007 services to a Google Apps account. For the process I am really not sure.. I understand I should start with creating aliases for all email accounts within the exchange server, in Google Apps, and here I'm not sure how am I supposed to explain the Exchange that the DNS have changed without losing emails.'' Second thing is: How can I safely move the up-to 3GB mailboxes from the Exchange server to the new Google Apps accounts? Must it be with Outlook data files? If so, how do I actually upload the data files into the Google Apps account? And if not, what would be a proper way to do so? Would really appreciate any kind of help.

    Read the article

  • How to Pre-Configure Shared Laptops' Microsoft Outlook 2010 Accounts to Connect to Exchange Server 2007 SP3?

    - by schultkl
    Our IT environment provides 10 shared, Microsoft Windows 7 laptops for an office staff of several hundred people. After checking-out and logging into a laptop with an Active Directory domain account, office staff frequently run Microsoft Outlook 2010. However, the first time office staff do this, Microsoft Outlook 2010 prompts the user to create and configure their local account. This takes just several clicks, as Microsoft Outlook 2010 auto-detects the office staff member's Microsoft Exchange Server 2007 (SP3) account. The problem is: all office staff have to do this on each new laptop they use. Until they do so, some functionality does not work (for example, Microsoft Word 2010 Save & Send fails with error "There was a problem creating the message"). How might our IT department "pre-configure" the shared laptops so office staff can simply log-in and use Microsoft Outlook 2010 functionality without the need to configure a local account?

    Read the article

  • Why Outlook 2007 pasted images are larger than original?

    - by Jersey Dude
    I have been using Outlook 2007 for over a year with no image problems. Around September 1st, images that I paste into messages are enlarged in the messages. This happends with WinSnap, the Vista Snipping Tool, or any jpeg pasted into the message I tried jpegs with 96dpi settings w/o sucess I tried different Outlook Format Picture ... and Size ... settings Problem happens with both RTF and HTML messages Attached images are ok Something mysteriously changed and I cannot figure it out. I googled this to death without any success (others have the problem but there is no solution). This is driving me nuts because I snap screenshots all day long ("a picture is worth a thousand words"). Thanks in advance.

    Read the article

  • Cannot delete links to linked tables in Access 2007 - How delete linked tables?

    - by John316
    Cannot delete links to linked tables in Access 2007 I receive the following error " is not a valid name. Make sure that it does not include invalid characters or punctuation and that it is not too long. Please note that the quotation mark is part of the error message. Read the error as: Quotation mark is not a valid name. Make sure that it does not include invalid characters or punctuation and that it is not too long. The linked table name is tblStudies. What can I do to get around this problem and be able to unlink (delete) linked tables?

    Read the article

< Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >