Search Results

Search found 37239 results on 1490 pages for 'javax swing text'.

Page 31/1490 | < Previous Page | 27 28 29 30 31 32 33 34 35 36 37 38  | Next Page >

  • Text wrap in a <canvas> element

    - by Gwood
    I am trying to add text on an image using the <canvas> element. First the image is drawn and on the image the text is drawn. So far so good. But where I am facing a problem is that if the text is too long, it gets cut off in the start and end by the canvas. I don't plan to resize the canvas, but I was wondering how to wrap the long text into multiple lines so that all of it gets displayed. Can anyone point me at the right direction?

    Read the article

  • Conditionaly strip the last line from a text file

    - by fraXis
    Hello, I posted this yesterday on SO, and I received an answer that works great, but I need to change it around and I don't know how. Here is my original message: I need to strip the last line from a text file. I know how to open and save text files in C#, but how would I strip the last line of the text file? The text file will always be different sizes (some have 80 lines, some have 20). Can someone please show me how to do this? Here is the code that someone gave me to do this (which works fine) //Delete the last line from the file. This line could be 8174, 10000, or anything. This is from SO string tempfile = @"C:\junk_temp.txt"; using (StreamReader reader2 = new StreamReader(newfilename)) { using (StreamWriter writer2 = new StreamWriter(tempfile)) { string line = reader2.ReadLine(); while (!reader2.EndOfStream) { writer2.WriteLine(line); line = reader2.ReadLine(); } // by reading ahead, will not write last line to file } } File.Delete(newfilename); File.Move(tempfile, newfilename); File.Delete(tempfile); How would I change this to only delete the last line of the text file if it is a 4 or 5 digit string (such as 8001 or 99999). If it is anything other than that, such as a %, then I don't want to delete the last line. Can someone please modify the above code to do this for me? Thanks so much.

    Read the article

  • Justify Text in a HTML/XHTML TextArea

    - by Matt
    I am currently trying to justify text in a textarea, unfortunately the CSS: text-align: justify; Doesn't work on the text like center, left and right do. I've tried this in both Firefox 3 and IE 7 with no luck. Is there any way around this?

    Read the article

  • MS SQL Server Text Datatype Maxlength = 65,535?

    - by craigmj
    Software I'm working with uses a text field to store XML. From my searches online, the text datatype is supposed to hold 2^31 - 1 characters. Currently SQL Server is truncating the XML at 65,535 characters every time. I know this is caused by sqlserver, because if I add a 65,536th character to the field directly in Management Studio, it states that it will not update because characters will be truncated. Is the Maxlength really 65,535 or could this be because the database was designed in an earlier version of MS SQL Server (2000) and it's using the legacy text datatype instead of 2005's? If this is the case, will Altering the datatype to Text in sql server 2005 fix this issue?

    Read the article

  • How to convert Xml files to Text Files

    - by John
    Hi all, I have around 8000 xml files that needs to be converted into text files. The text file must contain title, description and keywords of the xml file without the tags and removing other elements and attributes as well. In other words, i need to create 8000 text files containing the title,description and keywords of the xml file. I need codings for this to be done systematically. Any help would be greatly appreciated. Thanks in advance.

    Read the article

  • How to justify text on a TextView made easy- Android

    - by Juan
    I'm looking for a simple way to forget that I'm using a WebView to have justified text in my TextView. Has someone made a custom view for this? I'm well aware that I can do something like this: WebView view = new WebView(this); view.loadData("my html with text justification","text/html","utf-8"); But it gets ugly when you want to set the size, the color or other common properties of the TextView, there must be a more convenient way of doing it.

    Read the article

  • loading Data in VBA from a text file

    - by omegayen
    I am not very familiar with VBA but need to use it for a new software program I am using (not Microsoft related) I have a text file that has columns of data I would like to read into VBA. Specifically the text file has 4 entries per row. Thus I would like to load in the column vectors (N by 1). The text file is separated by a space between each entry. So for example I want to load in column one and save it as array A, then column two and save as array B, then column three and save as array C, and then column four and save as array D. This code snippet found below from http://www.tek-tips.com/faqs.cfm?fid=482 is something I found that can load in text to an array, but I need to adapt it to be able to save the columns as different arrays as specified above... Open "MyFile.txt" For Input As #1 ReDim Txt$(0) Do While Not EOF(1) ReDim Preserve Txt$(UBound(Txt$) + 1) Input #1, Txt$(UBound(Txt$)) Loop Close #1

    Read the article

  • predict location of single-line text from a UITextView

    - by William Jockusch
    Is this possible? Specifically, I have a UITextView, and the text is short enough that it will fit on a single line. I want to predict where it will appear, so that (for example) if I wanted to, I could set up a UILabel that rendered the text in exactly the same location. Once I get that figured out, what I really want to do is pick contentInset and/or contentOffset so that the text of the UITextView and the left-justified UILabel will render in the same location. But I figure the above will let me do that. EDIT: In response to a comment, the fundamental problem I am trying to get around is that UITextField does not let you set the location of the cursor. It appears a lot of people have tried to get around this without success. I need to be able to move the cursor -- inserting/deleting text there is not enough. Control cursor position in UITextField Insert string at cursor position of UITextField Moving the cursor to the beginning of UITextField iOS -- dealing with the inability to set the cursor position in a UITextField

    Read the article

  • Replacement Text Syntax for JavaScript’s String.replace()

    - by Jan Goyvaerts
    A RegexBuddy user told me that he couldn’t easily find a detailed explanation of the replacement text syntax supported by the String.replace() function in JavaScript. I had to admin that my own web page about JavaScript’s regular expression support was also lacking. I’ve now added a new Replacement Syntax section that has all the details. I’ll summarize it here: $1: Text matched by the first capturing group or the literal text $1 if the regex has no capturing groups. $99: Text matched by the 99th capturing group if the regex has 99 or more groups. Text matched by the 9th capturing group followed by a literal 9 if the regex has 9 or more but less than 99 groups. The literal text $99 if the regex has fewer than 9 groups. $+: Text matched by the highest-numbered capturing group. Replaced with nothing if the highest-numbered group didn’t participate in the match. $&: Text matched by the entire regex. You cannot use $0 for this. $` (backtick): Text to the left of the regex match. $' (single quote): Text to the right of the regex match. $_: The entire subject string.

    Read the article

  • WYSIWYG editor for structured text (suitable for SVN versioning)

    - by chris_l
    I'm looking for an open source cross platform WYSIWYG editor that I can use to write documentation. I'm not looking for a web based solution - i.e. it should work without a web server, and I want to save my files directly to disk. The result could be any structured format, like Wiki markup, ReStructuredText, DocBook, or a small subset of HTML, ... But it's important, that Subversion diff can be used to see differences between the versions easily (this wouldn't work with .odt or .rtf files for example) I'm currently thinking about using Open Office, and saving the files as HTML, but is there a better solution?

    Read the article

  • Good text editors or viewers for large log files

    - by Kristopher Johnson
    Log files and other textual data files are often tens or hundreds of megabytes in size, and some editors choke when you try to open something so large. What are some good applications for viewing large files? Bonus points for apps that can open compressed files, search for things with regular expressions, parse output lines, etc.

    Read the article

  • Looking for Linux text editor

    - by Daniel
    I'm looking for VIM replacement. My key points are: Extensible in sane language (such as Python, Ruby, or even Lua, after vimscript everything will do). Also GUI part should be extensible too, so no SublimeText2. GUI. Preferrably GTK+. Lightweight. I don't understand IDEs like Eclipse/NetBeans consuming up to 1G of RAM. File browser panel. Splits, tabs and windows. There should be ability to split views tabs infinite number of times (or while they fit to screen). VCS support (optional: especially Git) Snippets & autocompletion (not mandatory, but I would very love to have those) Any ideas?

    Read the article

  • Working with Lightweight User Interface Toolkit (LWUIT) 1.4

    - by janice.heiss(at)oracle.com
    Vikram Goyal's informative and practical article, "Working with Lightweight User Interface Toolkit (LWUIT) 1.4," shows developers how to best take advantage of LWUIT 1.4. LWUIT is a user interface library designed to bring uniformity and cross mobile interface functionality to applications developed using Java Platform, Micro Edition (Java ME). Version 1.4 offers support for XHTML, multi-line text fields, and customization to the virtual keyboard.Goyal notes in the article that, "Perhaps the most important feature of this release is the ability for LWUIT to support XHTML. Specifically, it now supports XHTML MP (Mobile Platform) 1.0, a version of XHTML designed for mobile phones. To be even more specific, it now supports CSS styling for the HTMLComponent within the LWUIT library through Wireless Application Protocol CSS (WCSS)." Read the entire article here. 

    Read the article

  • Modify Sublime Text 2 whitespace representation?

    - by Mike Grace
    Is there a way to modify the whitespace representation characters so I can change it from dots and dashes to something else? Because I currently have whitespace characters being drawn always, it looks like this. I don't need it turned off, just interested in changing how it's represented. I like how TextMate shows invisible characters but I would be ok with just being able to change the spaces to show a blank space instead of a dot.

    Read the article

  • Recovering text files in terminal using grep on Mac OS X Snow Leopard

    - by littlejim84
    I foolishly removed some source code from my Mac OS X Snow Leopard machine with rm -rf when doing something with buildout. I want to try and recover these files again. I haven't touched the system since to try and seek an answer. I found this article and it seems like the grep method is the way to go, but when running it on my machine I'm getting 'Resource busy' when trying to run it on the disk. I'm using this command: sudo grep -a -B1000 -A1000 'video_output' /dev/disk0s2 > file.txt Where 'dev/disk0s2' is what came up when I ran df. I get this when running: grep: /dev/disk0s2: Resource busy I'm not an expert with this stuff, I'm trying my best. Please can anyone help me further? I'm on the verge of losing two days of source code work! Thank you

    Read the article

  • Indexing text file content with command line query

    - by Drew Carlton
    I take daily notes in a plaintext file labeled with date in the YYYYMMDD format. These files are no more than 100 lines long, and are written in a blog style format. I'd like to be able search these files as if they were blog posts indexed by google, with some phrase query returning the most relevant/recent date filenames, with a snippet containing the relevant part. Ideally it would be something like this: #searchindex "laptop no sound" returns: 20100909.txt: ... laptop sound isn't working... 20100101.txt ... sound is too loud... debating what laptop to buy... and so on and so forth. I'm working on a linux platform (Debian with GNOME). I've looked at beagle and tracker, but they just seem complete overkill for what I want.

    Read the article

  • Question about JPanel "transition" for Java Swing

    - by user16778
    I want to make like a sort of main menu (in GUI). When the user clicks the start button, the screen transition into another "screen" (JPanel). This image will make it easier to understand. http://i.imgur.com/Cfdry.png Currently, I have a MainMenu extends JPanel and that gets added into a driver class with a JFrame. I can't figure how to switch to another class like Game extends JPanel. So when the user clicks the start button in MainMenu, I want it to somehow hide itself and the Game to show itself. Thanks.

    Read the article

  • Compiling/executing Java on Sublime Text 2 works fine except that it cannot read user input

    - by meiryo
    I am a student learning Java and I want to compile and run some simple Java on ST2. Also Eclipse is very slow on my laptop. Here is my JavaC.sublime-build file so far: { "cmd": ["sublimejavaexec.bat", "$file"], "file_regex": "^(...*?):([0-9]*):?([0-9]*)", "selector": "source.java" } So far it can run code that does not require user input. However when I have something that uses the Java input scanner it either skips through or generates an error. Can anyone suggest a solution such as a plug-in or if ST2 actually has this kind of feature on its console? Thanks.

    Read the article

  • Textwrangler (OS X) -- Simple Text Macro Help Needed

    - by bobber205
    I often, when parsing log/error files, need to replace < and < and > with in order to be able to efficiently understand what's going on in the files. I know TextWrangler has a macro ability but I can't figure out a efficient way to do this. Since I have to do it so often I'd love to just have a simple keybinding or menu item to do this simple replace/find all for me. Anyone know how to do this? ^_^

    Read the article

  • javax.servlet.ServletException: Servlet.init() for servlet Relay threw exception

    - by Talha Bin Shakir
    I built application by using Netbeans and its working fine. But When i deployed on TOMCAT I am getting this error javax.servlet.ServletException: Servlet.init() for servlet Relay threw exception org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849) org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454) java.lang.Thread.run(Thread.java:636) *root cause* java.security.AccessControlException: access denied (java.util.PropertyPermission jasper.reports.compile.class.path write) java.security.AccessControlContext.checkPermission(AccessControlContext.java:342) java.security.AccessController.checkPermission(AccessController.java:553) java.lang.SecurityManager.checkPermission(SecurityManager.java:549) java.lang.System.setProperty(System.java:744) com.servlet.Relay.init(Relay.java:38) javax.servlet.GenericServlet.init(GenericServlet.java:212) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:616) org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:269) java.security.AccessController.doPrivileged(Native Method) javax.security.auth.Subject.doAsPrivileged(Subject.java:537) org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:301) org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162) org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:115) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849) org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454) Any Idea.

    Read the article

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