Search Results

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

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

  • how to change display text in django admin foreignkey dropdown

    - by FurtiveFelon
    Hi all, I have a task list, with ability to assign users. So i have foreignkey to User model in the database. However, the default display is username in the dropdown menu, i would like to display full name (first last) instead of the username. If the foreignkey is pointing to one of my own classes, i can just change the str function in the model, but User is a django authentication model, so i can't easily change it directly right? Anyone have any idea how to accomplish this? Thanks a lot!

    Read the article

  • Weird text addition in PHP

    - by Patrick Gates
    I have a form posting data to a php page. Then I have the PHP page echoing the data aswell as posting it to twitter. Whenever In a word with an apostrophe it adds a back-slash right before it. So I type in "I'm going to the park" it echos "I\'m going to the park" what's going on and how do I fix it? Thanx :)

    Read the article

  • System.Drawing - bad text rendering using DrawString on top of transparent pixels.

    - by mackenir
    When rendering text into a bitmap, I find that text looks very bad when rendered on top of an area with non-opaque alpha. The problem is progressively worse as the underlying pixels become more transparent. If I had to guess I'd say that when underlying pixels are transparent, the text renderer draws any anti-aliased 'gray' pixels as solid black. Here are some screenshots: Text drawn on top of transparent pixels: Text drawn on top of semi-transparent pixels: Text drawn on opaque pixels: Here is the code used to render the text: g.SmoothingMode = SmoothingMode.HighQuality; g.DrawString("Press the spacebar", Font, Brushes.Black, textLeft, textTop);

    Read the article

  • Indent or comment several text lines with VI

    - by Werner
    Hi, can vim or vim be used to comment or indent at the same time a number of lines? For instance: for item in Lista: ind = int(floor(1.0*(item-lmin)/width)) if ind==nintervals: ind=ind-1 print item,ind comment it to: #for item in Lista: #ind = int(floor(1.0*(item-lmin)/width)) #if ind==nintervals: #ind=ind-1 #print item,ind or indent it to: for item in Lista: ind = int(floor(1.0*(item-lmin)/width)) if ind==nintervals: ind=ind-1 print item,ind Thanks P.D. Is relevant the difference between VI and VIM?

    Read the article

  • Searching for Nodes with Specific Text using the Prototype Javascript Framework

    - by Alan Storm
    Does the Prototype Javascript library have a selector that's equivalent to jQuery's :contains()? If not, what would what be "The Prototype Way" to selector/filter-down a list of elements that contains a particular string. For example, using the following $$('#some_div dd a') I may get back an array of 50 or so links. I only want the links that contain the work 'home'. In jQuery I'd do this jQuery('#some_div dd a:contains('home')'); Is it possible to do something similar using Prototype? If not, is there an elegant way to filter out the array of 50 elements that gets returned.

    Read the article

  • split all text inside dom element into <span>

    - by gruber
    I would like to split all elements inside html DOM node into spans with ids, for example: lets say I have element: <div> <h1>Header</h1> <h2>header2</h2> <p class="test">this is test p</p> </div> and the result should be: <div> <h1><span id="1">Header</span></h1> <h2><span id="2">header2</span></h2> <p class="test"><span id="3">this</span><span id="4">is</span><span id="5">test</span> <span id="6">p</span></p> </div> thanks for any help it shoul also work if there are nested images for example: <div> <h1>Header</h1> <h2>header2</h2> <p class="test"><img alt="test alt" />this is test p</p> </div> and the result: <div> <h1><span id="1">Header</span></h1> <h2><span id="2">header2</span></h2> <p class="test"><img alt="test alt" /><span id="3">this</span><span id="4">is</span><span id="5">test</span> <span id="6">p</span></p> </div>

    Read the article

  • IDispatchMessageInspector to log plain-text soap messages?

    - by Dan Thomas
    I've written a WCF IDispatchMessageInspector, so I can log incomming and outgoing messages. But I'm not sure how to get a nicely-formatted XML string to log. My code looks something like this: public object AfterReceiveRequest(ref Message request, IClientChannel channel, InstanceContext instanceContext) { MessageBuffer buffer = request.CreateBufferedCopy(Int32.MaxValue); request = buffer.CreateMessage(); Log("Received", request.ToString(); return null; } The result of this logging includes things like "ampersand lt;" and some sort of binary-encoded data. How do I get something that looks like a standard soap XML document? I know this should be obvious, but I'm just too dense to figure it out. Thanks. Dan

    Read the article

  • Text piped to PowerShell.exe isn't recieved when using [Console]::ReadLine()

    - by crtracy
    I'm getting itermittent data loss when calling .NET [Console]::ReadLine() to read piped input to PowerShell.exe: >ping localhost | powershell -NonInteractive -NoProfile -C "do {$line = [Console]::ReadLine(); ('' + (Get-Date -f 'HH:mm :ss') + $line) | Write-Host; } while ($line -ne $null)" 23:56:45time<1ms 23:56:45 23:56:46time<1ms 23:56:46 23:56:47time<1ms 23:56:47 23:56:47 Normally 'ping localhost' from Vista64 looks like this, so there is a lot of data missing from the output above: Pinging WORLNTEC02.bnysecurities.corp.local [::1] from ::1 with 32 bytes of data: Reply from ::1: time<1ms Reply from ::1: time<1ms Reply from ::1: time<1ms Reply from ::1: time<1ms Ping statistics for ::1: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 0ms, Maximum = 0ms, Average = 0ms But using the same API from C# recieves all the data sent to the process (excluding some newline differences). Code: namespace ConOutTime { class Program { static void Main (string[] args) { string s; while ((s = Console.ReadLine ()) != null) { if (s.Length > 0) // don't write time for empty lines Console.WriteLine("{0:HH:mm:ss} {1}", DateTime.Now, s); } } } } Output: 00:44:30 Pinging WORLNTEC02.bnysecurities.corp.local [::1] from ::1 with 32 bytes of data: 00:44:30 Reply from ::1: time<1ms 00:44:31 Reply from ::1: time<1ms 00:44:32 Reply from ::1: time<1ms 00:44:33 Reply from ::1: time<1ms 00:44:33 Ping statistics for ::1: 00:44:33 Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), 00:44:33 Approximate round trip times in milli-seconds: 00:44:33 Minimum = 0ms, Maximum = 0ms, Average = 0ms So, if calling the same API from PowerShell instead of C# many parts of StdIn get 'eaten'. Is the PowerShell host reading string from StdIn even though I didn't use 'PowerShell.exe -Command -'?

    Read the article

  • Programming issue while applying text to the third party control.

    - by srivatsa
    Hello I have used some third party controls in my windows application. There is a snippet which is being used in our code which re-initializes all the .text property of all the controls on the form. Everything works fine except for a control. This control is similar to the Windows Panel except for it has a dropdown appearance. This control has .Caption property instead of .Text property associated to it. This causes the problem whenever i use such codes foreach (Control oControl in this.Controls) { if (oControl is DropDownPanel) { { oControl.Text = rm_ResourceManager.GetString(oControl.Name + ".Text"); } } } The text is not set here for the DropDownPanel control in the above method. Since .Text is not available for DropDownPanel control. I cannot do the following either .. ((DropDownPanel)oControl).Caption = rm_ResourceManager.GetString(oControl.Name + ".Text"); Cos it shall throw exception if i try to cast oControl with that of DropDownPanel Any ideas how can i overcome such a condition. Regards

    Read the article

  • Copying a java text file into a String.

    - by Deepak Konidena
    Hi, I run into the following errors when i try to store a large file into a string. Exception in thread "main" java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Arrays.java:2882) at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100) at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:515) at java.lang.StringBuffer.append(StringBuffer.java:306) at rdr2str.ReaderToString.main(ReaderToString.java:52) As is evident, i am running out of heap space. Basically my pgm looks like something like this. FileReader fr = new FileReader(<filepath>); sb = new StringBuffer(); char[] b = new char[BLKSIZ]; while ((n = fr.read(b)) > 0) sb.append(b, 0, n); fileString = sb.toString(); Can someone suggest me why i am running into heap space error? Thanks.

    Read the article

  • R: ca plotting text attributes

    - by chasec
    Does anyone know of a way to control the font size/color/weight of the row and column names when plotting a correspondence plot with the ca package? The following code will produce a very nice looking chart, though if there were more attributes (very heavy, super heavy, something more than super heavy) or more classes of workers (peons, underlings, etc) then the graph will get a little cluttered and hard to tell what was what. It would be nice if you could list all the attributes in a separate color than the categories of workers. library(ca) data("smoke") plot(ca(smoke) , map = "symmetric" , what =c("active","active") , mass = c(T,T) , contrib = "absolute" , col = c("red","blue") , pch = c(15,17,15,17) , labels = c(2,2) , arrows = c(T,F) ) Alternatively, does anyone know if there is a way to reproduce something along these lines with ggplot2? I didn't find anything on the website that seemed comparable, but I don't know much about the package. Thanks, -Chase

    Read the article

  • preg_match , regexp , php , extract text from html

    - by Michael
    I'm trying to extract "Florida (FL)" from http://www.auctionarms.com/search/displayitem.cfm?itemnum=9736364&oh=216543. My code is //get location $pattern = "/(State)<\/i\:<\/td(.*)<\/td/"; preg_match_all($pattern, $htmlContent, $matches); print_r($matches); any idea why is not working ?

    Read the article

  • Text goes goes into separate lines when using a percentage padding

    - by Haxed
    Hi, I have a small problem in html forms. When I give the following css, .row .section-1 label {/* Formatting all section-1 labels */ padding: 0 5px 0 10px; margin: 3px 0 0 0; display:block; } This is the output that I get : However when I edit the css to put padding in the form of a percentage: .row .section-1 label {/* Formatting all section-1 labels */ padding: 0 40% 0 80%; margin: 3px 0 0 0; display: block; } This is the output I get : I want to use percentages, however I want the look in the first image. Any ideas?? Thanks

    Read the article

  • htaccess, remove text from url

    - by Keiron Lowe
    Here is the email from the client explaining what he is trying to do, we have spent hours trying to sort out this problem but cannot find a solution that works. I am trying to correct a problem with my blog and google “not found” URLs. I thought it might be very simple to correct (!ha!) This is my line of code; RewriteCond %{THE_REQUEST} ^www.uk-domestic-cleaning.com/wpblog/tag/?(.*)/HomeMaid%20Domestic%20Cleaning$ RewriteRule ^wpblog\/tag\/?(.*)\/HomeMaid%20Domestic%20Cleaning$ "http\:\/\/www\.uk\-domestic\-cleaning\.com\/wpblog\/tag\/$1" [R=301,L] What I am trying to do is any request to */wplog/tag/ “anything here”/HomeMaid Domestic Cleaning To strip the “HomeMaid Domestic Cleaning” bit off the end, but leave the rest of the request intact, which will then be a valid request. Any idea's guys?

    Read the article

  • How to extract keywords from a body of text in PHP

    - by Akeem
    Currently I'm leveraging http://developer.yahoo.com/search/content/V1/termExtraction.html which isn't ideal for performance and quality reasons. Before I embark on spending time on writing a system I wanted to see if there are any other available options that can do the trick.

    Read the article

  • How do I programmatically translate a LINQ query to readable English text that correctly describes t

    - by eniac
    I am working on a project that uses Albahari's PredicateBuilder library http://www.albahari.com/nutshell/ to create a linq expression dynamically at run time. I would like to find a way to translate this dynamically created linq predicate of type Expression<Func<T, bool>> into a readable english statement at runtime. I'll give a statically created linq statement as an example: from p in Purchases select p where p.Price 100 && p.Description != "Bike". For this linq statement I would want to dynamically generate at runtime an english description along the lines of: "You are searching for purchases where the price is greater than 100 and the description is not bike". Are there any libraries that already exist which accomplish this goal, keep in mind I am using PredicateBuilder to dynamically generate the where predicate. If no solution exists how would you go about building a solution? Thanks!

    Read the article

  • Replace text in string with delimeters using Regex

    - by user1057735
    I have a string something like, string str = "(50%silicon +20%!(20%Gold + 80%Silver)| + 30%Alumnium)"; I need a Regular Expression which would Replace the contents in between ! and | with an empty string. The result should be (50%silicon +20% + 30%Alumnium). If the string contains something like (with nested delimiters): string str = "(50%silicon +20%!(80%Gold + 80%Silver + 20%!(20%Iron + 80%Silver)|)| + 30%Alumnium)"; The result should be (50%silicon +20% + 30%Alumnium) - ignoring the nested delimiters. I've tried the following Regex, but it doesn't ignore the nesting: Regex.Replace(str , @"!.+?\|", "", RegexOptions.IgnoreCase);

    Read the article

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