Search Results

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

Page 154/1405 | < Previous Page | 150 151 152 153 154 155 156 157 158 159 160 161  | Next Page >

  • Sentence recognition and ability to answer with another sentence

    - by terabytest
    Hi. I'm looking into sentence recognition to make a program that should play voice clips from the game Team Fortress 2. I have .wav files and text files containing the transcription for every sound. What I'd like to make is a system that makes two characters of the game talk to each other (trough playing sound clips), and each one recognises the sense of what the other is saying and tries to answer with another of the available sound clips (trying its best to fit the sense of what it's trying to say) Is that possible in any way?

    Read the article

  • What speech libraries are available in Linux?

    - by George Edison
    When it comes to TTS (text-to-speech) libraries in Linux, what choices do developers have? What libraries ship with the majority of distros? Are there minimal libraries? What functionality does each library offer? I'm approaching this primarily from a C++ point of view, although Python would suit me too.

    Read the article

  • PHP string parsing

    - by tmatthews
    I am trying to parse a list of operating system instances with their unique identifiers. I am looking for a solution to parse a text string, and pass the values into two variables. The string to be parsed is as followed: "Ubuntu 9.10" {40f2324d-a6b2-44e4-90c3-0c5fa82c987d}

    Read the article

  • Replace a whole line in a txt file

    - by user302935
    I'am new to Python 3 and could really use a little help. I have a txt file containing: InstallPrompt= DisplayLicense= FinishMessage= TargetName=D:\somewhere FriendlyName=something I have a python script that in the end, should change just two lines to: TargetName=D:\new FriendlyName=Big Could anyone help me, please? I have tried to search for it, but I didnt find something I could use. The text that should be replaced could have different length.

    Read the article

  • Multiline Regular Expression search and replace!

    - by Scott
    I've hit a wall. Does anybody know a good text editor that has search and replace like Notepad++ but can also do multi-line regex search and replace? Basically, I am trying to find something that can match a regex like: search oldlog\(.*\n\s+([\r\n.]*)\);replace newlog\(\1\) Any ideas?

    Read the article

  • Tagging the differencies in both files

    - by Hakim
    I know that comparing 2 files is a typical problem and there are many discussions on this problem. but I have a rather different problem while working with text files: I have two text files which may differ in number of lines. now I want to compare two files and find the lines which differ. after that I want to tag all the differencies in both of files. for example here are the content of my files: File1.txt: This is the first line. This line is just appeared in File1.txt. you can see this line in both files. this line is also appeared in both files. this line and, this one are mereged in File2.txt. File2.txt: This is the first line. you can see this line in both files. this line is also appeared in both files. this line and, this one are mereged in File2.txt. After processing I want both files to be like this: File1.txt: This is the first line. <Diff>This line is just appeared in File1.txt.</Diff> you can see this line in both files. this line is also appeared in both files. <Diff>this line and,</Diff> <Diff>this one are merged in File2.txt.</Diff> File1.txt: This is the first line. <Diff></Diff> you can see this line in both files. this line is also appeared in both files. <Diff>this line and, this one are mereged in File2.txt.</Diff> <Diff></Diff> How can I do this? I know that some tools such as diff could help me, but how can I convert their results in this format? Thank you in advance.

    Read the article

  • I want to create an expression for querystrings, this stuff is hard!

    - by jkirkerx
    I want to extract some keywords out of a query string for a search application in asp.net. I decoded the url string first, so it's plain text I have this to start with, but I want to add a keyword group I'd like to trim off the stuff for pure words, but not sure if that's possible I also have a long list of possible query string value fields that I want to check against ?q= @q= ?qs= &qs=

    Read the article

  • How to add MousePressEvent?

    - by John Son
    In qt: I create a class based on QToolButton to display icon and text. How can I add 'mousePressEvent' to the class? Thank you. bool IconLabel::event (QEvent* e ) { if ( e->type() == QEvent::Paint) { return QToolButton::event(e); } return true; } The class is: class IconLabel : public QToolButton { Q_OBJECT public: explicit IconLabel(QWidget *parent = 0); bool event (QEvent* e ); signals: public slots: };

    Read the article

  • Silverlight - Adding Text to Pushpin in Bing Maps via C#

    - by Morano88
    I was able to make my silverlight Bing map accepts Mousclicks and converts them to Pushpins in C#. Now I want to show a text next to the PushPin as a description that appears when the mouse goes over the pin , I have no clue how to do that. What are the methods that enable me to do this thing? This is the C# code : public partial class MainPage : UserControl { private MapLayer m_PushpinLayer; public MainPage() { InitializeComponent(); base.Loaded += OnLoaded; } private void OnLoaded(object sender, RoutedEventArgs e) { base.Loaded -= OnLoaded; m_PushpinLayer = new MapLayer(); x_Map.Children.Add(m_PushpinLayer); x_Map.MouseClick += OnMouseClick; } private void AddPushpin(double latitude, double longitude) { Pushpin pushpin = new Pushpin(); pushpin.MouseEnter += OnMouseEnter; pushpin.MouseLeave += OnMouseLeave; m_PushpinLayer.AddChild(pushpin, new Location(latitude, longitude), PositionOrigin.BottomCenter); } private void OnMouseClick(object sender, MapMouseEventArgs e) { Point clickLocation = e.ViewportPoint; Location location = x_Map.ViewportPointToLocation(clickLocation); AddPushpin(location.Latitude, location.Longitude); } private void OnMouseLeave(object sender, MouseEventArgs e) { Pushpin pushpin = sender as Pushpin; // remove the pushpin transform when mouse leaves pushpin.RenderTransform = null; } private void OnMouseEnter(object sender, MouseEventArgs e) { Pushpin pushpin = sender as Pushpin; // scaling will shrink (less than 1) or enlarge (greater than 1) source element ScaleTransform st = new ScaleTransform(); st.ScaleX = 1.4; st.ScaleY = 1.4; // set center of scaling to center of pushpin st.CenterX = (pushpin as FrameworkElement).Height / 2; st.CenterY = (pushpin as FrameworkElement).Height / 2; pushpin.RenderTransform = st; } }

    Read the article

  • Sitecore not resolving rich text editor URLS in page renders

    - by adam
    Hi We're having issues inserting links into rich text in Sitecore 6.1.0. When a link to a sitecore item is inserted, it is outputted as: http://domain/~/link.aspx?_id=8A035DC067A64E2CBBE2662F6DB53BC5&_z=z Rather than the actual resolved url: http://domain/path/to/page.aspx This article confirms that this should be resolved in the render pipeline: in Sitecore 6 it inserts a specially formatted link that contains the Guid of the item you want to link to, then when the item is rendered the special link is replaced with the actual link to the item The pipeline has the method ShortenLinks added in web.config <convertToRuntimeHtml> <processor type="Sitecore.Pipelines.ConvertToRuntimeHtml.PrepareHtml, Sitecore.Kernel"/> <processor type="Sitecore.Pipelines.ConvertToRuntimeHtml.ShortenLinks, Sitecore.Kernel"/> <processor type="Sitecore.Pipelines.ConvertToRuntimeHtml.SetImageSizes, Sitecore.Kernel"/> <processor type="Sitecore.Pipelines.ConvertToRuntimeHtml.ConvertWebControls, Sitecore.Kernel"/> <processor type="Sitecore.Pipelines.ConvertToRuntimeHtml.FixBullets, Sitecore.Kernel"/> <processor type="Sitecore.Pipelines.ConvertToRuntimeHtml.FinalizeHtml, Sitecore.Kernel"/> </convertToRuntimeHtml> So I really can't see why links are still rendering in ID format rather than as full SEO-tastic urls. Anyone got any clues? Thanks, Adam

    Read the article

  • Create Text File Without BOM

    - by balexandre
    Hi guys, I tried this aproach without any success the code I'm using: // File name String filename = String.Format("{0:ddMMyyHHmm}", dtFileCreated); String filePath = Path.Combine(Server.MapPath("App_Data"), filename + ".txt"); // Process ProcessPBS pbs = new ProcessPBS(); pbs.CreatePBSInfoFile(pbslist, Convert.ToInt64(filename)); // Save file Encoding utf8WithoutBom = new UTF8Encoding(true); TextWriter tw = new StreamWriter(filePath, false, utf8WithoutBom); foreach (string s in pbs.GeneratedFile.ToArray()) tw.WriteLine(s); tw.Close(); // Push Generated File into Client Response.Clear(); Response.ContentType = "application/vnd.text"; Response.AppendHeader("Content-Disposition", "attachment; filename=" + filename + ".txt"); Response.TransmitFile(filePath); Response.End(); the result: It's writing the BOM no matter what, and special chars (like Æ Ø Å) are not correct :-/ I'm stuck! I can't create a file using UTF-8 as Encoding and 8859-1 as CharSet :-( Anyone can help me find the light in the tunnel? All help is greatly appreciated, thank you!

    Read the article

  • MVC/HTML - input submit won't trigger when HTML is in a text area

    - by cw
    Any idea why the below code doesn't trigger if I were to put some HTML inside the textarea? It works fine it I don't have HTML in it, but I'm not sure why it doesn't work with it. Here is the code. <form action="/Home/AddPost" method="post"> <table> <tr> <td>Post Title:</td> <td><input id="Title" type="text" name="title" /></td> </tr> <tr> <td>Post Description:</td> <td><textarea id="Description" rows="10" cols="60" name="description"></textarea></td> </tr> </table> <input type="submit" value="Save" /> </form>

    Read the article

  • How to make hyperlink change text in overflow:hidden div without jumping to the div

    - by paracaudex
    I have a div element with fixed height and width and overflow:hidden, and I have a menu that causes this div to scroll to anchors in the text within the div. However, when you click on an item on this menu, it doesn't just scroll the div, it also scrolls the page to the div. How do I prevent this second from happening. That is, I just want the div to scroll without the page itself scrolling. So I have <div id="boxcontent"> <p id="id1">Some content</p> <p id="id2">Some content</p> <p id="id3">Some content</p> </div> boxcontent { width:600px; height:180px; overflow:hidden; margin-left:auto; margin-right:auto; } And then a ul with anchor links to id1, id2, etc. Does this make sense?

    Read the article

  • Calculating skew of text OpenCV

    - by Nick
    I am trying to calculate the skew of text in an image so I can correct it for the best OCR results. Currently this is the function I am using: double compute_skew(Mat &img) { // Binarize cv::threshold(img, img, 225, 255, cv::THRESH_BINARY); // Invert colors cv::bitwise_not(img, img); cv::Mat element = cv::getStructuringElement(cv::MORPH_RECT, cv::Size(5, 3)); cv::erode(img, img, element); std::vector<cv::Point> points; cv::Mat_<uchar>::iterator it = img.begin<uchar>(); cv::Mat_<uchar>::iterator end = img.end<uchar>(); for (; it != end; ++it) if (*it) points.push_back(it.pos()); cv::RotatedRect box = cv::minAreaRect(cv::Mat(points)); double angle = box.angle; if (angle < -45.) angle += 90.; cv::Point2f vertices[4]; box.points(vertices); for(int i = 0; i < 4; ++i) cv::line(img, vertices[i], vertices[(i + 1) % 4], cv::Scalar(255, 0, 0), 1, CV_AA); return angle; } When I look at then angle in debug I get 0.000000 However when I give it this image I get proper results of a skew of about 16 degrees: How can I properly detect the skew in the first image?

    Read the article

  • how to pass password text while calling java-cxf webservice from php

    - by Darpan Desai
    hi, i have developed my webservice in java-cxf which returns java.util.List. This webservice is password enabled. that means i have used org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor for security purpose. Now i want to call this webservice from php. but i am not able to do so. Without security settings i am able to access my webservice using nusoap. but when i enabled security feture (interceptor) in webservice, i am getting error like ns1:InvalidSecurity An error was discovered processing the header and i am getting response as follows: HTTP/1.1 500 Internal Server Error Server: Apache-Coyote/1.1 Content-Type: text/xml;charset=ISO-8859-1 Content-Length: 361 Date: Fri, 18 Jun 2010 08:53:54 GMT Connection: close < soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"< soap:Body< soap:Fault< faultcode xmlns:ns1="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" ns1:InvalidSecurity< /faultcode< faultstringAn error was discovered processing the <wsse:Security header< /faultstring< /soap:Fault< /soap:Body any help will be appriciated thanks in advance Darpan Desai

    Read the article

  • Producing an view of a text's revision history in Python

    - by hekevintran
    I have two versions of a piece of text and I want to produce an HTML view of its revision similar to what Google Docs or Stack Overflow displays. I need to do this in Python. I don't know what this technique is called but I assume that it has a name and hopefully there is a Python library that can do it. Version 1: William Henry "Bill" Gates III (born October 28, 1955)[2] is an American business magnate, philanthropist, and chairman[3] of Microsoft, the software company he founded with Paul Allen. Version 2: William Henry "Bill" Gates III (born October 28, 1955)[2] is a business magnate, philanthropist, and chairman[3] of Microsoft, the software company he founded with Paul Allen. He is American. The desired output: William Henry "Bill" Gates III (born October 28, 1955)[2] is an American business magnate, philanthropist, and chairman[3] of Microsoft, the software company he founded with Paul Allen. He is American. Using the diff command doesn't work because it tells me which lines are different but not which columns/words are different. $ echo 'William Henry "Bill" Gates III (born October 28, 1955)[2] is an American business magnate, philanthropist, and chairman[3] of Microsoft, the software company he founded with Paul Allen.' > oldfile $ echo 'William Henry "Bill" Gates III (born October 28, 1955)[2] is a business magnate, philanthropist, and chairman[3] of Microsoft, the software company he founded with Paul Allen. He is American.' > newfile $ diff -u oldfile newfile --- oldfile 2010-04-30 13:32:43.000000000 -0700 +++ newfile 2010-04-30 13:33:09.000000000 -0700 @@ -1 +1 @@ -William Henry "Bill" Gates III (born October 28, 1955)[2] is an American business magnate, philanthropist, and chairman[3] of Microsoft, the software company he founded with Paul Allen. +William Henry "Bill" Gates III (born October 28, 1955)[2] is a business magnate, philanthropist, and chairman[3] of Microsoft, the software company he founded with Paul Allen. He is American.' > oldfile

    Read the article

  • Android/Java -- Post simple text to Facebook wall?

    - by borg17of20
    Hello all, I'm trying to integrate posting to one's wall from within my app. I already have an area where the user can save his/her username and password (encrypted). I would like my program to recall the saved username and password, pass that to Facebook for authentication, and then allow the app to post simple text (maybe a link too) to the user's wall. That said, I've read everything on the developer pages at Facebook (the api looks completely foreign to me... I've never don't any type of web app development before... just desktop apps), and experimented with the Java libraries here: http://wiki.developers.facebook.com/index.php/User:Java but to be honest, I don't understand any of the various implementations. Some claim to be simple to use, but apparently they are all way above my head. I've even tried messing with the official Facebook Android SDK, but that uses a webview interface, and I can't pass in the username and password for easy authentication. Plus, I'm still clueless as to how to post to the wall even after correct authentication. Please help. Thanks. Oh, btw I already have a Facebook API key and Application ID.

    Read the article

  • Simple Android Binary Text Clock

    - by Hristo
    Hello, I want to create a simple android binary clock but my application crashes. I use 6 textview fields: 3 for the decimal and 3 for the binary representation of the current time (HH:mm:ss). Here's the code: import java.text.SimpleDateFormat; import java.util.Calendar; import android.app.Activity; import android.os.Bundle; import android.widget.TextView; public class Binary extends Activity implements Runnable { Thread runner; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); if (runner == null) { //start the song runner = new Thread(this); runner.start(); } } @Override public void run() { TextView hours_dec = (TextView) findViewById(R.id.hours_dec); TextView mins_dec = (TextView) findViewById(R.id.mins_dec); TextView secs_dec = (TextView) findViewById(R.id.secs_dec); TextView hours_bin = (TextView) findViewById(R.id.hours_bin); TextView mins_bin = (TextView) findViewById(R.id.mins_bin); TextView secs_bin = (TextView) findViewById(R.id.secs_bin); SimpleDateFormat hours_sdf = new SimpleDateFormat("HH"); SimpleDateFormat mins_sdf = new SimpleDateFormat("mm"); SimpleDateFormat secs_sdf = new SimpleDateFormat("ss"); Calendar cal = Calendar.getInstance(); while (runner != null) { WaitAMoment(); cal.getTime(); hours_dec.setText(hours_sdf.format(cal.getTime())); mins_dec.setText(mins_sdf.format(cal.getTime())); secs_dec.setText(secs_sdf.format(cal.getTime())); hours_bin.setText(String.valueOf(Integer.toBinaryString(Integer.parseInt((String) hours_dec.getText())))); mins_bin.setText(String.valueOf(Integer.toBinaryString(Integer.parseInt((String) mins_dec.getText())))); secs_bin.setText(String.valueOf(Integer.toBinaryString(Integer.parseInt((String) secs_dec.getText())))); } } protected void WaitAMoment() { try { Thread.sleep(100); } catch (InterruptedException e) { }; } }`

    Read the article

  • Export the datagrid data to text in asp.net

    - by SRIRAM
    Problem:It will asks there is no assembly reference/namespace for Database Database db = DatabaseFactory.CreateDatabase(); DBCommandWrapper selectCommandWrapper = db.GetStoredProcCommandWrapper("sp_GetLatestArticles"); DataSet ds = db.ExecuteDataSet(selectCommandWrapper); StringBuilder str = new StringBuilder(); for(int i=0;i<=ds.Tables[0].Rows.Count - 1; i++) { for(int j=0;j<=ds.Tables[0].Columns.Count - 1; j++) { str.Append(ds.Tables[0].Rows[i][j].ToString()); } str.Append("<BR>"); } Response.Clear(); Response.AddHeader("content-disposition", "attachment;filename=FileName.txt"); Response.Charset = ""; Response.Cache.SetCacheability(HttpCacheability.NoCache); Response.ContentType = "application/vnd.text"; System.IO.StringWriter stringWrite = new System.IO.StringWriter(); System.Web.UI.HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite); Response.Write(str.ToString()); Response.End();

    Read the article

  • sqlite3 update text in uitextview

    - by summer
    i had the sqlite statement ready for update..but i am confuse about grabbing text from uitextview and updating it..and i waned to update it using a uibutton..how do i carry on after creating the sql statement???kinda lost..any new solution is appreciate.. - (void) saveAllData { if(isDirty) { if(updateStmt == nil) { const char *sql = "update Snap Set snapTitle = ?, snapDesc = ?, Where snapID = ?"; if(sqlite3_prepare_v2(database, sql, -1, &updateStmt, NULL) != SQLITE_OK) NSAssert1(0, @"Error while creating update statement. '%s'", sqlite3_errmsg(database)); } sqlite3_bind_text(updateStmt, 1, [snapTitle UTF8String], -1, SQLITE_TRANSIENT); sqlite3_bind_text(updateStmt, 2, [snapDescription UTF8String], -2, SQLITE_TRANSIENT); sqlite3_bind_int(updateStmt, 3, snapID); if(SQLITE_DONE != sqlite3_step(updateStmt)) NSAssert1(0, @"Error while updating. '%s'", sqlite3_errmsg(database)); sqlite3_reset(updateStmt); isDirty = NO; } //Reclaim all memory here. [snapTitle release]; snapTitle = nil; [snapDescription release]; snapDescription = nil; //isDetailViewHydrated = NO; }

    Read the article

  • XPATH query, HtmlAgilityPack and Extracting Text

    - by Soham
    I had been trying to extract links from a class called "tim_new" . I have been given a solution as well. Both the solution, snippet and necessary information is given here The said XPATH query was "//a[@class='tim_new'], my question is, how did this query differentiate between the first line of the snippet (given in the link above and the second line of the snippet). More specifically, what is the literal translation (in English) of this XPATH query. Furthermore, I want to write a few lines of code to extract the text written against NSE: <div class="FL gL_12 PL10 PT15">BSE: 523395 &nbsp;&nbsp;|&nbsp;&nbsp; NSE: 3MINDIA &nbsp;&nbsp;|&nbsp;&nbsp; ISIN: INE470A01017</div> Would appreciate help in forming the necessary selection query. My code is written as: IEnumerable<string> NSECODE = doc.DocumentNode.SelectSingleNode("//div[@NSE:]"); But this doesnt look right. Would appreciate some help.

    Read the article

  • Tagging translated text correctly (tagging with lang="")

    - by toomanyairmiles
    A client has asked me to add some polish text to their website, not having much experience in this area, can anyone tell me which of the two 'lang' solutions below is correct (or offer an alternative):- Tag everything:- <div lang="pl"> <h2 lang="pl">Najlepszy ruch jaki zrobisz!</h2> <p lang="pl">Do przyszlych najemców:</p> <p lang="pl">Tutaj w SPS mamy bogate doswiadczenie na rynku najmu i wyszukiwaniu domu, który bedzie idealnym miejscem dla przyszlych lokatorów. Dla wielu moze to byc trudne i stresujace, dlatego my w SPS pomozemy Wam przejsc przez pole minowe zwiazane z najmem i uczynic ten proces najprostszym i najszybszym jak to mozliwe.</p> <p lang="pl">Jesli szukasz nieruchomosci obecnie lub w najblizszej przyszlosci prosimy o kontakt z naszym doswiadczonym , przyjaznym i pomocnym personelem, a my postaramy sie pomóc znalezc Ci idealne miejsce, które jest wlasnie dla Ciebie.</p> <p lang="pl">Wiec aby w latwy sposób wynajac zadzwon juz dzis.</p> </div> Just tag the div <div lang="pl"> <h2>Najlepszy ruch jaki zrobisz!</h2> <p>Do przyszlych najemców:</p> <p>Tutaj w SPS mamy bogate doswiadczenie na rynku najmu i wyszukiwaniu domu, który bedzie idealnym miejscem dla przyszlych lokatorów. Dla wielu moze to byc trudne i stresujace, dlatego my w SPS pomozemy Wam przejsc przez pole minowe zwiazane z najmem i uczynic ten proces najprostszym i najszybszym jak to mozliwe.</p> <p>Jesli szukasz nieruchomosci obecnie lub w najblizszej przyszlosci prosimy o kontakt z naszym doswiadczonym , przyjaznym i pomocnym personelem, a my postaramy sie pomóc znalezc Ci idealne miejsce, które jest wlasnie dla Ciebie.</p> <p>Wiec aby w latwy sposób wynajac zadzwon juz dzis.</p> </div>

    Read the article

  • Delphi: Alternative to using Assign/ReadLn for text file reading

    - by Ian Boyd
    i want to process a text file line by line. In the olden days i loaded the file into a StringList: slFile := TStringList.Create(); slFile.LoadFromFile(filename); for i := 0 to slFile.Count-1 do begin oneLine := slFile.Strings[i]; //process the line end; Problem with that is once the file gets to be a few hundred megabytes, i have to allocate a huge chunk of memory; when really i only need enough memory to hold one line at a time. (Plus, you can't really indicate progress when you the system is locked up loading the file in step 1). The i tried using the native, and recommended, file I/O routines provided by Delphi: var f: TextFile; begin Assign(filename, f); while ReadLn(f, oneLine) do begin //process the line end; Problem withAssign is that there is no option to read the file without locking (i.e. fmShareDenyNone). The former stringlist example doesn't support no-lock either, unless you change it to LoadFromStream: slFile := TStringList.Create; stream := TFileStream.Create(filename, fmOpenRead or fmShareDenyNone); slFile.LoadFromStream(stream); stream.Free; for i := 0 to slFile.Count-1 do begin oneLine := slFile.Strings[i]; //process the line end; So now even though i've gained no locks being held, i'm back to loading the entire file into memory. Is there some alternative to Assign/ReadLn, where i can read a file line-by-line, without taking a sharing lock? i'd rather not get directly into Win32 CreateFile/ReadFile, and having to deal with allocating buffers and detecting CR, LF, CRLF's. i thought about memory mapped files, but there's the difficulty if the entire file doesn't fit (map) into virtual memory, and having to maps views (pieces) of the file at a time. Starts to get ugly. i just want Assign with fmShareDenyNone!

    Read the article

< Previous Page | 150 151 152 153 154 155 156 157 158 159 160 161  | Next Page >