Search Results

Search found 35102 results on 1405 pages for 'text mining'.

Page 168/1405 | < Previous Page | 164 165 166 167 168 169 170 171 172 173 174 175  | Next Page >

  • Adding line with text between pattern and next occurence of the same pattern in bash

    - by kasper
    I am writing a bash script that modifies a file that looks like this: --- usr1 --- data data data data data data data data data data data data --- usr2 --- data data data data data data data data --- usr3 --- data data data data --- endline --- One question is: How to add next user line --- usrn --- after last user data lines? Second one is: How to delete specific user data lines (data lines and --- userx ---) i.e. I would like to delete usr2 with all his data set. It must work on bash 2.05 :) and I think it will use awk or sed, but I'm not sure.

    Read the article

  • split line of text

    - by plys
    Hi all, I was wondering if there is an algorithm to split a line into multiple lines, so that the resulting set of multiple lines fit into a square shape rather than a rectangle. Let me give some examples, Input: Hi this is a really long line. Output: Hi this is a really long line Input: a b c d e f Output: a b c d e f Input: This is really such looooooooooooooooooooong line.This is the end. Output: This is really such looooooooooooooooooooong line This is the end. If you see in the above examples, input line fits into a wide rectangle. But the output more or less fits into a square shape. Essentially what needs to be done here is simply count the number of characters in the line, take the square root of that number. Then put square root number of characters in each line. But in the above example, the splitting needs to be done by respecting word wraps instead of characters. Is there any standard algorithm for this? Any code examples/ pointers would be appreciated!

    Read the article

  • Regular - Take all numeric characters following a text character

    - by Simon
    Given a string in the format: XXX999999v99 (where X is any alpha character and v is any numeric character and v is a literal v character) how can I get a regex to match the numeric chatacters following the v? So far I've got 'v\d\d' which includes the v but ideally I'd like just the numeric part. As an aside does anyone know of a tool in which you can specify a string to match and have the regex generated? Modifying an existing regex is one thing but I find starting from scratch painful!

    Read the article

  • Help with regex - extracting text.

    - by Yeti
    I have 3 separate strings: $d = 'Created on November 25, 2009'; $v = 'Viewed 17,603 times'; $h = '389 hits'; Which needs to be converted to: $d1 = {unix timestamp of November 25, 2009}; $v1 = "17603"; (commas stripped if it exists) $h1 = "389"; What is the most efficient way to do this (possibly with regex)? Any code snippet would be great.

    Read the article

  • How can i underline a text in JDK5, NOT JDK6

    - by Serkan Kasapbasi
    when i search internet i have found a way to underline font like this, Font f=jLabel1.getFont(); Map<TextAttribute,Object> map = new Hashtable<TextAttribute,Object>(); map.put(TextAttribute.UNDERLINE,TextAttribute.UNDERLINE_ON); f=f.deriveFont(map); jLabel1.setFont(f); it works well on jdk6, however it doesnt work on jdk5, and it doesnt warn about anything. first, how can i get same effect on jdk5? second, why is there a TextAttribute.UNDERLINE constant, if it doesnt work?

    Read the article

  • Include at text file as is in (Python) Sphinx Docs

    - by Gregg Lind
    (using Python-Sphinx Documentation tool) I have a .txt log file I'd like to build into _build/html unaltered. What do I need to alter in conf.py, index.rst, etc. Here is the layout: src/ index.rst some_doc.rst somefile.txt How do I get somefile.txt into the html build? I tried adding a line like this to index.rst: Contents: .. toctree:: :maxdepth: 2 some_doc "somefile.txt" hoping it would work by magic, but no magic here! Assuming this is even possible, what would I put in some_doc.rst to refer/link to that file? Note Yes, I'm aware I could put it in /static and just be done with it, but that seems like a total hack, and ugly.

    Read the article

  • How to set text editable in GtkEntry

    - by paultop6
    Hi Guys, Pretty straight foward question, I have a GtkEntry widget that i want to set to be editable. I know the function i should use is: gtk_editable_set_editable But i dont know how to make it take a GtkEntry widget as an arguement Can anyone help me? Regards Paul

    Read the article

  • PHP regular expression

    - by Ferol
    such text: $text = ' href="http://yahoo.com" target="_blank"> link text </a> text... text... <br> text...'; // $text = ' text... <a href="http://yahoo.com" target="_blank"> link text </a> text... text... <br> text...'; and such regular expression: preg_match_all('/^(.*)(<.+>)(.*)(<\/.+>)(.*)$/',$text,$matches); what I want, - to check if text matches the regular expression. If yes, then $matches should contain parts of string above, if not (as I guess) it should contain four zero-length arrays. something is wrong, but I can't find, what actually is?

    Read the article

  • reformat text in perl

    - by paul44
    I have a file of 1000 lines, each line in the format filename dd/mm/yyyy hh:mm:ss I want to convert it to read filename mmddhhmm.ss been attempting to do this in perl and awk - no success - would appreciate any help thanks

    Read the article

  • Run shell script using fabric and piping script text to shell's stdin

    - by Peter Lyons
    Is there a way to execute a multi-line shell script by piping it to the remote shell's standard input in fabric? Or must I always write it to the remote filesystem, then run it, then delete it? I like sending to stdin as it avoids the temporary file. If there's no fabric API (and it seems like there is not based on my research), presumably I can just use the ssh module directly. Basically I wish fabric.api.run was not limited to a 1-line command that gets passed to the shell as a command line argument, but instead would take a full multi-line script and write it to the remote shell's standard input.

    Read the article

  • Contenteditable text editor and cursor position

    - by Cal S
    How can I (using jquery or other) insert html at the cursor/caret position of my contenteditable div: <div contenteditable="true">Hello world</div> For example, if the cursor/caret was between "hello" and "world" and the user then clicked a button, eg "insert image", then using javascript, something like <img src=etc etc> would be inserted between "hello" and "world". I hope I've made this clear =S Example code would be greatly appreciated, thanks a lot!

    Read the article

  • Radio Button text

    - by niya
    Trying to create a profile using content provider.I want to add the gender to the table when the radio button corresponding to the male or female is clicked. Any solution?

    Read the article

  • text flowing out of border in pdf

    - by Jasim
    I have created a pdf using tcpdf in php. i have a table with one row and one column. when i put the content from a form which is a textarea, the content in the form flows out of the table border. how can i make it so that it is contained in the border itslef???

    Read the article

  • Encrypt text using a number

    - by Adam Matan
    Project Euler I have recently begun to solve some of the Project Euler riddles. I found the discussion forum in the site a bit frustrating (most of the discussions are closed and poorly-threaded), So I have decided to publish my Python solutions on launchpad for discussion. The problem is that it seems quite unethical to publish these solutions, as it would let other people gain reputation without doing the programming work, which the site deeply discourages. My Encryption problem I want to encrypt my answers so that only those who have already solved the riddles can see my code. The logical key would be the answer to the riddle, which is always numeric. In order to prevent brute-force attacks on my answers, I want to find an encryption algorithm that takes a significantly long time (few seconds) to run. Do you know any such algorithm? I would fancy a Python package, which I can attach to the code, over an external program that might have portability issues. Thanks, Adam

    Read the article

  • How to place text on top of image in ReportViewer

    - by Christoffer
    I feel very silly asking this, since it seems like it just should work, but I cannot make it work and cannot find anything in the documentation about this. The problem: I'm developing an application in Visual Studio 2010 that is utilizing ReportViewer, rendering the report locally. In the report designer, I place a textbox on top of an image. This looks fine in the designer, but when rendering the report, the textbox is rendered below the image. Now, before you suggest it, I have tried placing a textbox on top of a rectangle (or other control) with the BackgroundImage property set. This works. But: I cannot find a way to rescale the background image to fit the control. Setting a different dpi for the background image does nothing. Simply rescaling the image to a different resolution is not an option, since I eventually want to print the report. Does anybody have a solution to this?

    Read the article

  • Get entire text of document as a string using javascript

    - by Tom Dignan
    I am developing a firefox extension and ideally would be able to get the whole darn DOM as a string.. forget any data structure. I just want what I see in "view source" in a buffer. I have been checking out javascript references and HTMLDocument etc. with no avail. Ideally I would be able to write to this buffer as well (seems possible i.e. document.writeLn()) I wish there was a document.read()? Am I just a js noob?

    Read the article

  • how to ouput text to java console from servlet

    - by mithun1538
    I have a servlet. But it is not working as desired. Hence for debugging purposes, I want to print statements to the java console(the one that can be opened using the java icon in taskbar). However, if I use System.out.println("message"), it doesnt display in java console. Is there any alternative way where I can display messages to the console from the servlet? Or can anyone suggest me an alternative way to display messages to any other console?

    Read the article

  • SEO: does google bot see text in hidden divs

    - by Alexey
    I have login/signup popups on my site which are in hidden div by default. According to http://stackoverflow.com/questions/1547426/google-seo-and-hidden-elements googlebot should NOT see it. But Google Webmaster tool says that keywords "email" and "password" are top keywords over the site. Why it is so? Why google bot sees them? Should I worry about relevancy of top keywords at all?

    Read the article

< Previous Page | 164 165 166 167 168 169 170 171 172 173 174 175  | Next Page >