Search Results

Search found 40494 results on 1620 pages for 'selected text'.

Page 11/1620 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • Rendering formatted text in a direct3d application

    - by Fire Lancer
    I need to render some formatted text (colours, different font sizes, underlines, bold, etc) however I'm not sure how to go about doing it. D3DXFont only allows text of a single font/size/weight/colour/etc to be rendered at once, and I cant see a practical way to "combine" multiple calls to ID3DXFont::DrawText to do such things... I looked around and there doesn't seem to be any existing libraries that do these things, but I have no idea how to implement such a text renderer, and I couldn't even find any documentation on how such a text render would work, only rendering simple fixed width, ASCII bitmap fonts which looking at it is probably an entirely different approach that is only suitable for rendering simple blocks of text where Unicode is not important. If there's no direct3d font renders capable of doing this, is there any other renderers (eg for use in rendering rich text in a normal window), and would rendering those to a texture in RAM, then uploading that to the video card to render onto the back buffer yield reasonable performance?

    Read the article

  • Loop through text nodes inside a div

    - by crosenblum
    I am trying to do a text replace, but to do so, i need to loop through the text nodes of a div. Each Div upon clicking, loads via ajax it's appropriate content. But then I need to do text-replacing inside any of the text nodes inside there. My current code, after loading the ajax content, loops through all text nodes of the whole page, and therefore is too resource intensive. I have been looking for hours trying to find out how to both loop thru a div, and get the text nodes... and this has to work in firefox, google chrome and ie6. Any thoughts or suggestions?

    Read the article

  • Console-like control that allows full control over individual text formatting

    - by Rich.Carpenter
    I'm tinkering with writing a simple text-based role-playing game. I would like to use WinForms, and utilize WinForm controls for the UI and simple text for the output. The catch is, I would like to have complete control over the formatting of the individual text - some words being different colors, etc. A simple console control would suffice, as that would provide control over text colors, but it would be nice to also be able to change style, font and size. Less important: it would be nice to have complete control over where text appears in the control through a coordinate system, as with DOS windows of old. I'd appreciate suggestions on the best method of implementing this. Perhaps there is a better method I had not considered for rendering the output of a text-based game.

    Read the article

  • Full text searching in SQL Server 2008 Express Advanced

    - by Iain Macleod
    Hi, I have recently installed SQL Server 2008 Express Edition with Advanced Services on XP Pro but am having trouble getting full text searching to work with an restored database. The database was originally created in SQL Server 2005. When I call a stored proc that uses the full text index then I get the following error: Full-Text Search is not installed, or a full-text component cannot be loaded. This is my db version: Microsoft SQL Server 2008 (RTM) - 10.0.1600.22 (Intel X86) Jul 9 2008 14:43:34 Copyright (c) 1988-2008 Microsoft Corporation Express Edition with Advanced Services on Windows NT 5.1 (Build 2600: Service Pack 3) When I run: SELECT DATABASEPROPERTY('DBNAME','ISFULLTEXTENABLED') I get: 1 Also, when I look in the advanced properties for the db server in Management Studio I see both the "Default Full-Text Language" and "Full-Text Upgrade Option" properties. However, when I go to SQL Server Configuration Manager I don't see the "MSSQLFDLauncher" service. Does anyone know how to get this working? Cheers, Iain

    Read the article

  • Python - open text file, but specify name when executing command

    - by Dunnolol
    I have a directory of text files that all end in the extension .txt My goal is to print the contents of the text file. I wish to be able use the wildcard *.txt to be able to specific the text file name I wish to open (I'm thinking along the lines of something like "F:\text*.txt" ?), split the lines of the text file, then print the output. Here is an example of what I want to do, but I want to be able to change "somefile" when executing my command. f = open('F:\text\somefile.txt', 'r') for line in f: print line,

    Read the article

  • Programmatically Making the Selected OutlineView Cell Editable

    - by Geertjan
    When you're using the OutlineView and you use the Tab key to move through its cells, the cells are shown to be selected, as below: However, until you press the Space key in the selected cell, or until you click the mouse within it, you cannot edit it. That's extremely annoying when you're creating a data-entry application. Your user would like to begin editing a cell as soon as they have tabbed into it. Needing to press Space first, or click the mouse in the cell first, is a cumbersome additional step that completely destroys your work flow. Below, you can see that an editable cell looks very different to one that is merely selected: I.e., now I can type and the text changes. How to set up the OutlineView so that the Tab key makes the selected cell editable? Here's the constructor of the TopComponent you see above: public ViewerTopComponent() {     initComponents();     setName(Bundle.CTL_ViewerTopComponent());     setToolTipText(Bundle.HINT_ViewerTopComponent());     setLayout(new BorderLayout());     OutlineView ov = new OutlineView();     final Outline outline = ov.getOutline();     outline.setRootVisible(false);     //When column selection changes, e.g., via Tab key,     //programmatically start editing the cell:     ListSelectionListener listSelectionListener = new ListSelectionListener() {         @Override         public void valueChanged(ListSelectionEvent e) {             int row = outline.getSelectedRow();             int column = outline.getSelectedColumn();             //Ignore the node column:             if (row > -1 && row > -1) {                 outline.editCellAt(row, column);             }         }     };     outline.getColumnModel().getSelectionModel().addListSelectionListener(listSelectionListener);     ov.setPropertyColumns(             "city", "City", "state", "State");     add(ov, BorderLayout.CENTER);     em.setRootContext(             new AbstractNode(Children.create(new CustomerChildFactory(), true)));     associateLookup(ExplorerUtils.createLookup(em, getActionMap())); }

    Read the article

  • Intelligent "Subtraction" of one text logfile from another

    - by Vi
    Example: Application generates large text log file A with many different messages. It generates similarly large log file B when does not function correctly. I want to see what messages in file B are essentially new, i.e. to filter-out everything from A. Trivial prototype is: Sort | uniq both files Join files sort | uniq -c grep -v "^2" This produces symmetric difference and inconvenient. How to do it better? (including non-symmetric difference and preserving of messages order in B) Program should first analyse A and learn which messages are common, then analyse B showing with messages needs attention. Ideally it should automatically disregard things like timestamps, line numbers or other volatile things. Example. A: 0:00:00.234 Received buffer 0x324234 0:00:00.237 Processeed buffer 0x324234 0:00:00.238 Send buffer 0x324255 0:00:03.334 Received buffer 0x324255 0:00:03.337 Processeed buffer 0x324255 0:00:03.339 Send buffer 0x324255 0:00:05.171 Received buffer 0x32421A 0:00:05.173 Processeed buffer 0x32421A 0:00:05.178 Send buffer 0x32421A B: 0:00:00.134 Received buffer 0x324111 0:00:00.137 Processeed buffer 0x324111 0:00:00.138 Send buffer 0x324111 0:00:03.334 Received buffer 0x324222 0:00:03.337 Processeed buffer 0x324222 0:00:03.338 Error processing buffer 0x324222 0:00:03.339 Send buffer 0x3242222 0:00:05.271 Received buffer 0x3242FA 0:00:05.273 Processeed buffer 0x3242FA 0:00:05.278 Send buffer 0x3242FA 0:00:07.280 Send buffer 0x3242FA failed Result: 0:00:03.338 Error processing buffer 0x324222 0:00:07.280 Send buffer 0x3242FA failed One of ways of solving it can be something like that: Split each line to logical units: 0:00:00.134 Received buffer 0x324111,0:00:00.134,Received,buffer,0x324111,324111,Received buffer, \d:\d\d:\d\d\.\d\d\d, \d+:\d+:\d+.\d+, 0x[0-9A-F]{6}, ... It should find individual words, simple patterns in numbers, common layouts (e.g. "some date than text than number than text than end_of_line"), also handle combinations of above. As it is not easy task, user assistance (adding regexes with explicit "disregard that","make the main factor","don't split to parts","consider as date/number","take care of order/quantity of such messages" rules) should be supported (but not required) for it. Find recurring units and "categorize" lines, filter out too volatile things like timestamps, addresses or line numbers. Analyse the second file, find things that has new logical units (one-time or recurring), or anything that will "amaze" the system which has got used to the first file. Example of doing some bit of this manually: $ cat A | head -n 1 0:00:00.234 Received buffer 0x324234 $ cat A | egrep -v "Received buffer" | head -n 1 0:00:00.237 Processeed buffer 0x324234 $ cat A | egrep -v "Received buffer|Processeed buffer" | head -n 1 0:00:00.238 Send buffer 0x324255 $ cat A | egrep -v "Received buffer|Processeed buffer|Send buffer" | head -n 1 $ cat B | egrep -v "Received buffer|Processeed buffer|Send buffer" 0:00:03.338 Error processing buffer 0x324222 0:00:07.280 Send buffer 0x3242FA failed This is a boring thing (there are a lot of message types); also I can accidentally include some too broad pattern. Also it can't handle complicated things like interrelation between messages. I know that it is AI-related. May be there are already developed tools?

    Read the article

  • Fill CSS box with text from MySQL till there is no overflow, scrollbar, or hidden text

    - by terrance branigan
    I want to fill a CSS box with text till there is no overflow or scrollbar. I fetch text from MySQL. The user clicks a button and the next bit of text that can fit will fill the box. The only way I've figured to do this is by parsing through the text and counting characters and newlines, etc and calculating whether it will fit in the box. Is there an easier way to do this? Thank you

    Read the article

  • Quick fix, Read text in a text box?

    - by Tony C
    I have a simple text reading code for Visual Basic: Dim fileReader As String fileReader = My.Computer.FileSystem.ReadAllText("C:\test.txt") MsgBox(fileReader) I have used this in the past, but I usually make the text display in a text box. I know this is sort of a "newb" question but I can't remember how to display the text in a textbox. If you guys could help me out that would be great!

    Read the article

  • How to build compass in sublime text 2

    - by aurel
    I downloaded this package which allows use to build compass in though sublime text by pressing cmd+b. I created a sass file, made sure compass is selected from the tools build system compass menu. But when I press cmd+b the file does not compile and I get no error. I only get [Finished in 0.0s with exit code 1]. However I also tested to build the code with sass (tools build system sass) and it works fine. Do I need to do anything to the sass file for compass to work. Thanks

    Read the article

  • copy a text file in C#

    - by melt
    I am trying to copy a text file in an other text file line by line. It seems that there is a buffer of 1024 character. If there is less than 1024 character in my file, my function will not copie in the other file. Also if there is more than 1024 character but less a factor of 1024, these exceeding characters will not be copied. Ex: 2048 character in initial file - 2048 copied 988 character in initial file - 0 copied 1256 character in initial file - 1024 copied Thks! private void button3_Click(object sender, EventArgs e) { // écrire code pour reprendre le nom du fichier sélectionné et //ajouter un suffix "_poly.txt" string ma_ligne; const int RMV_CARCT = 9; //délcaration des fichier FileStream apt_file = new FileStream(textBox1.Text, FileMode.Open, FileAccess.Read); textBox1.Text = textBox1.Text.Replace(".txt", "_mod.txt"); FileStream mdi_file = new FileStream(textBox1.Text, FileMode.OpenOrCreate,FileAccess.ReadWrite); //lecture/ecriture des fichiers en question StreamReader apt = new StreamReader(apt_file); StreamWriter mdi_line = new StreamWriter(mdi_file, System.Text.Encoding.UTF8, 16); while (apt.Peek() >= 0) { ma_ligne = apt.ReadLine(); //if (ma_ligne.StartsWith("GOTO")) //{ // ma_ligne = ma_ligne.Remove(0, RMV_CARCT); // ma_ligne = ma_ligne.Replace(" ",""); // ma_ligne = ma_ligne.Replace(",", " "); mdi_line.WriteLine(ma_ligne); //} } apt_file.Close(); mdi_file.Close(); }

    Read the article

  • Latex: Text cannot be placed below image

    - by Frederik Wordenskjold
    I love latex! But sometimes, it does not love me... I'm having a problem with an image and some text. I have this code: Some text...\\ \begin{figure}[ht] \centering \includegraphics[scale=0.75]{picture.jpg} \caption{The caption} \label{fig:picture} \end{figure} Some more text... Basically, I want this: Some text. (Above image in the code) [end of page / new page] image Some more text. (Below the image in the code) [start of new section] But, what the above code gives me is this: Some text. (Above image in the code) Some more text. (Below the image in the code) [end of page / new page] image [start of new section] Latex insists on putting everything but a new section above the image even though its below the image in the code. Its probably because the image floats on top - but whats my alternative? There's not enough space on the first page to display the image there, to I cannot use [h] as the float-alignment. I can "hack it", by creating an empty new section, like \section*{}, but this creates some white-space, which looks weird. Any suggestions?

    Read the article

  • Clearing input text feilds when clicked on in Flash (AS 2.0)

    - by rickstyphilis
    I have a problem where I want a text field that by default has the word NAME in it, to become empty when a user clicks on it. The text field has the instance name 'nam' and is inside a movie with the instance name 'input_text'. I've searched around and found samples of code where everyone keeps suggesting this: textboxinstancename.onSetFocus = function() { textboxinstancename.text = ""; }; should work. It seems to work for everyone else but me. I've tried using the following on the first frame of the 'input_text' movie with no luck: this.input_text.nam.onSetFocus = function() { this.input_text.nam.text = "" } I've tried putting this on the first frame of the scene, again with no result: _root.input_text.nam.onSetFocus = function() { _root.input_text.nam.text = "" } I've tried this in the same manner as the last respectively with both 'this' on the instance and '_root' on the scene (denoted by x): x.input_text.nam.onSetFocus = function() { if (x.input_text.nam.text == "NAME") { x.input_text.nam.text = ""; } }; Still no luck. Can anyone tell me what I might be doing wrong?

    Read the article

  • jQuery display text nested in paragraphs inside a div

    - by user961627
    I have HTML that looks something like this: <div class='textbox' data-title='Sometitle'> <div class='textareaedit'> <p><strong>Test sample text</strong></p> </div> </div> I'm sometimes going to have a few different <p> tags inside the textareaedit divs, and sometimes strong tags around the text inside the <p> (as in this example), and sometimes a span tag, and sometimes it's going to be without further tags inside the <p>. I want to iterate through each textbox on my page, grab its title and also the text nested inside <p> tags in textareaedit. I'm giving the output via console for testing. This is my jQuery code, but I get no output for the second console.log() line: $('.textbox').each(function() { $this = $(this); console.log($this.attr('data-title')+ ":\n"); $this.children('textareadit').children('p').each(function(){ console.log($(this).html()); // not giving any output, it's blank }); }); I tried $(this).text() as well, but no difference. You may think this example has the sample text inside <strong> tags within the <p>, but I've also tried the same example without the strong, where the text was the direct child of <p>, but it didn't make a difference. How can I capture the text?

    Read the article

  • [PHP/MySQL] How to create text diff web app

    - by Adam Kiss
    Hello, idea I would like to create a little app for myself to store ideas (the thing is - I want it to do MY WAY) database I'm thinking going simple: id - unique id of revision in database text_id - identification number of text rev_id - number of revision flags - various purposes - expl. later title - self expl. desc - description text - self expl . flags - if I (i.e.) add flag rb;65, instead of storing whole text, I just said, that whenever I ask for latest revision, I go again in DB and check revision 65 Question: Is this setup the best? Is it better to store the diff, or whole text (i know, place is cheap...)? Does that revision flag make sense (wouldn't it be better to just copy text - more disk space, but less db and php processing. php I'm thinking, that I'll go with PEAR here. Although main point is to open-edit-save, possiblity to view revisions can't be that hard to program and can be life-saver in certain situations (good ideas got deleted, saving wrong version, etc...). However, I've never used PEAR in a long-time or full-project relationship, however, brief encounters in my previous experience left rather bad feeling - as I remember, it was too difficult to implement, slow and humongous to play with, so I don't know, if there's anything better. why? Although there are bazillions of various time/project/idea management tools, everything lacks something for me, whether it's sharing with users, syncing on more PCs, time-tracking, project management... And I believe, that this text diff webapp will be for internal use with various different tools later. So if you know any good and nice-UI-having project management app with support for text-heavy usage, just let me know, so I'll save my time for something better than redesigning the weel.

    Read the article

  • Read huge free text docs in one file for lucene indexing

    - by Jun
    I have heaps of free text news docs in one big file. The structure of each news doc is like: (Header line) Category, Doc1, Date (day, month, year) (body text) ... ... ... (Header line) Category, Doc2, Date (day, month, year) (body text) ... ... ... If I extract each doc from the big file, it costs too much time and not efficient. Therefore, I decide to read the file line by line and feed information to lucene the same time. I write c# code to index each doc to lucene like: Streamreader sr = new Streamreader(file); string line = ""; while((line = sr.ReadLine()) != null) { How can I tell this line is a doc header line from text line and get the metadata and all the text lines of a doc for lucene to index. Also, the text is read by OCR which can not give correct line-separating. Captions are mixed with content text iterate the process till the end of the file } with thanks

    Read the article

  • How can I "bulk paste" a clipboard string of multi-line text into a readable ordered list?

    - by gunshor
    How can I "bulk paste" a clipboard string of multi-line text into a readable ordered list? I'm trying to demonstrate how to turn any string of multi-line text into an ordered list. The script (preferably JS) needs to respect: - carriage returns at the end of a line, to mean "that line ends here" - indentations at the beginning of a line, to mean "this is part of the item above it" - dashes at the beginning of a line, to mean "this is a task, and the line above it is its project"

    Read the article

  • jQuery textbox required validation based on another text box having text

    - by doug
    Pretty basic question, however, I am very new to jQuery and javascript in general. I have a jQuery validation that is requiring a text box to have text in it, if a checkbox is checked. <script type="text/javascript"> $(document).ready(function () { $("form").validate( { rules: { Comments: { required: "#IsAbnormal:checked" } }, messages: { Comments: { required: "Comments are required" } }, onkeyup: false, wrapper: "", errorLabelContainer: "#ErrorMessageBox" }); }); Pretty straight forward, if you check the IsAbnormal checkbox, it will throw a validation if there are no comments. What I am trying to do is require a textbox based on if another text box has any text in it, for instance require the old password if a user enters a new password into a textbox. Is there an easy way to get the required: "#NewPassword:NotBlank" to work?

    Read the article

  • Best practices: displaying text that was input via multi-line text box

    - by chris
    I have a multi-line text box. When users simply type away, the text box wraps the text, and it's saved as a single line. It's also possible that users may enter line breaks, for example when entering a "bulleted" lists like: Here are some suggestions: - fix this - remove that - and another thing Now, the problem occurs when I try to display the value of this field. In order to preserve the formatting, I currently wrap the presentation in <pre> - this works to preserve user-supplied breaks, but when there's a lot of text saved as a single line, it displays the whole text block as single line, resulting in horizontal scrolling being needed to see everything. Is there a graceful way to handle both of these cases?

    Read the article

  • Speech recognition - MP3 to text software

    - by pako
    I'm looking for a speaker independent program (commercial or free) that would enable me to transcribe MP3 files containing speech recordings to text. I wanted to try Dragon Naturally Speaking, but it seems like it only supports transcribing my own speech recordings. So what are the alternatives?

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >