Search Results

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

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

  • java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest

    - by pAkY88
    I'm developing a servlet that receives a multipart request with content of multiple files, and I'm using apache commons file upload libraries. When I call parseRequest(request); method servlet throws following exception: GRAVE: Servlet.service() for servlet DiffOntology threw exception java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest at org.apache.commons.fileupload.servlet.ServletRequestContext.getContentType(ServletRequestContext.java:73) at org.apache.commons.fileupload.FileUploadBase$FileItemIteratorImpl.(FileUploadBase.java:882) at org.apache.commons.fileupload.FileUploadBase.getItemIterator(FileUploadBase.java:331) at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:349) at org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(ServletFileUpload.java:126) at DiffOntology.doPost(DiffOntology.java:38) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:619) I put all libraries in WEB-INF/lib.

    Read the article

  • Rich Text Editor (YUI Simple Text Editor used) not sending data to next page

    - by Aman Chhabra
    I am using a simple text editor from YUI, but when I click submit the code in the textarea/editor is not sent to the next page. I want to be able to receive it on the subsequent page and then store it in a DB(MySql). I have wasted lot of time already. Please help. HTML FILE: <html> <head> <script type="text/javascript" src="http://yui.yahooapis.com/combo?2.9.0/build/yahoo-dom-event/yahoo-dom-event.js&2.9.0/build/container/container_core-min.js&2.9.0/build/element/element-min.js&2.9.0/build/editor/simpleeditor-min.js"></script> <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.9.0/build/editor/assets/skins/sam/simpleeditor.css" /> <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.8.2r1/build/assets/skins/sam/skin.css"> <!-- Utility Dependencies --> <script src="http://yui.yahooapis.com/2.8.2r1/build/yahoo-dom-event/yahoo-dom-event.js"></script> <script src="http://yui.yahooapis.com/2.8.2r1/build/element/element-min.js"></script> <!-- Needed for Menus, Buttons and Overlays used in the Toolbar --> <script src="http://yui.yahooapis.com/2.8.2r1/build/container/container_core-min.js"></script> <script src="http://yui.yahooapis.com/2.8.2r1/build/menu/menu-min.js"></script> <script src="http://yui.yahooapis.com/2.8.2r1/build/button/button-min.js"></script> <!-- Source file for Rich Text Editor--> <script src="http://yui.yahooapis.com/2.8.2r1/build/editor/editor-min.js"></script> <script> YAHOO.util.Event.on('submit', 'click', function() { myEditor.saveHTML(); var html = myEditor.get('element').value; }); (function() { var Dom = YAHOO.util.Dom, Event = YAHOO.util.Event; var myConfig = { height: '200px', width: '900px', dompath: true, }; myEditor = new YAHOO.widget.SimpleEditor('msgpost', myConfig); myEditor.render(); })(); </script> </head> <body class="yui-skin-sam"> <form action="submit.php" method="post"> <textarea name="msgpost" id="msgpost" cols="50" rows="10"></textarea> <input type="submit" value="Submit" onsubmit="return myDoSubmit()"/> </form> </body> </html>

    Read the article

  • setting something disposed or invisible java

    - by OVERTONE
    this might be simple enough as just inserting the right method but i cant seem to get it right. i have a simple program with two buttons. each one changes the picture above them. but anytime i click the buttons i get some odd awt event queue error. i think its because im trying to add something to a frame after its already been made. package icnon; import javax.imageio.*; import javax.swing.*; import java.awt.*; import java.awt.event.*; public class FrameIconExample extends JFrame implements ActionListener { JLabel j; JPanel p, l, k; JButton picOne, picTwo; Container cPane; public FrameIconExample() { JButton picOne = new JButton("picOne"); JButton picTwo = new JButton("picTwo"); picOne.setName("picOne"); picTwo.setName("picTwo"); picOne.addActionListener(this); picTwo.addActionListener(this); JPanel p = new JPanel(new GridLayout(2, 1)); JPanel l = new JPanel(new FlowLayout()); JPanel k = new JPanel(new FlowLayout()); cPane = getContentPane(); j = new JLabel(new ImageIcon("../meet/src/images/beautiful-closeup-portrait-photography.jpg")); l.add(j); k.add(picOne); k.add(picTwo); p.add(l); p.add(k); add(p); } public static void main(String[] args) { FrameIconExample frame = new FrameIconExample(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setSize(new Dimension(300, 800)); frame.setTitle("Frame Icon Example"); // Display the form frame.setVisible(true); } @Override public void actionPerformed(ActionEvent e) { JButton temp = (JButton) e.getSource(); String src = "../meet/src/images/Majken Kruse portrait - john.jpg"; //System.out.println(src + " " + temp.getName()); if(temp.getName().equalsIgnoreCase("picOne")) { src = "../meet/src/images/beautiful-closeup-portrait-photography.jpg"; System.out.println(src + " " + temp.getName()); Icon img; j = new JLabel(new ImageIcon(src)); l.add(j); System.out.println("1"); } if(temp.getName().equalsIgnoreCase("picTwo")) { src = "../icontest/images/Majken Kruse portrait - john.jpg"; System.out.println(src + " " + temp.getName()); Icon img; j = new JLabel(new ImageIcon(src)); l.add(j); System.out.println("2"); } } } its all just the one program so if you copy paste it into an editor you can see the stack trace. but the source of the image files wont be there. does anyone know how id do it? or where im goin wrong? stack trace: ../meet/src/images/beautiful-closeup-portrait-photography.jpg picOne Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at icnon.FrameIconExample.actionPerformed(FrameIconExample.java:68) at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.setPressed(Unknown Source) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source) at java.awt.Component.processMouseEvent(Unknown Source) at javax.swing.JComponent.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source)

    Read the article

  • [SOLVED] flash 10, as3 - save text of textarea and reuse it to replace text in textarea

    - by user427969
    hi everyone Is it possible to save text of textarea (flash 10, as3, cs5) in some variable or so and with its textformat (more than one color) and then reuse it to replace text in textarea? I tried saving htmlText of textarea but the problem is when i replace it in textarea tags causes problem. There will always be another extra line. If anyone wants to view p tags problem try following. Just click on text and then move your down arrow key, cursor will go to next line. import fl.controls.TextArea; var txtHTML:TextArea = new TextArea(); txtHTML.move(0,0); var default_format:TextFormat = new TextFormat(); default_format.font = "Arial"; default_format.bold = false; default_format.align = "center"; default_format.color = 0xFFFF00; default_format.size = 14; var field:TextField = txtHTML.textField; field.defaultTextFormat = default_format; field.setTextFormat(default_format); field.alwaysShowSelection = true; field.background = true; field.type = 'input'; field.multiline = true; field.backgroundColor = 0x777777; field.embedFonts = true; txtHTML.htmlText = '<P ALIGN="CENTER"><FONT FACE="_sans" SIZE="14" COLOR="#FFFF00" LETTERSPACING="0" KERNING="0">ASDF</FONT></P>'; field.x = 0; field.y = 0; field.width = 400; field.height = 200; field.text = ""; addChild(txtHTML); Is there a way to do this? Thanks alot for any help. Regards

    Read the article

  • Rails3 renders a js.erb template with a text/html content-type instead of text/javascript

    - by Yannis
    Hi, I'm building a new app with 3.0.0.beta3. I simply try to render a js.erb template to an Ajax request for the following action (in publications_controller.rb): def get_pubmed_data entry = Bio::PubMed.query(params[:pmid])# searches PubMed and get entry @publication = Bio::MEDLINE.new(entry) # creates Bio::MEDLINE object from entry text flash[:warning] = "No publication found."if @publication.title.blank? and @publication.authors.blank? and @publication.journal.blank? respond_to do |format| format.js end end Currently, my get_pubmed_data.js.erb template is simply alert('<%= @publication.title %>') The server is responding with the following alert('Evidence for a herpes simplex virus-specific factor controlling the transcription of deoxypyrimidine kinase.') which is perfectly fine except that nothing happen in the browser, probably because the content-type of the response is 'text/html' instead of 'text/javascript' as shown by the response header partially reproduced here: Status 200 Keep-Alive timeout=5, max=100 Connection Keep-Alive Transfer-Encoding chunked Content-Type text/html; charset=utf-8 Is this a bug or am I missing something? Thanks for your help!

    Read the article

  • How to bring an application from Sublime Text to a web IDE for sharing?

    - by Kyle Pennell
    I generally work on my projects locally in Sublime Text but sometimes need to share them with others using things like Jsfiddle, codepen, or plunker. This is usually so I can get unstuck. Is there an easier way to share code that doesn't involve purely copy pasting and the hassle of getting all the dependencies right in a new environment? It's taking me hours to get some of my angular apps working in plunker and I'm wondering if there's a better way.

    Read the article

  • What options are out there for an embeddable WYSIWIG text editor?

    - by Evan Plaice
    I'm thinking something along the lines of TinyMCE Please include a list of features. Examples include: supports text formatting supports links supports images syntax types (markdown/wiki/etc) licensing and/or pricing customizibility plugin support browser compatibility Note: Please limit the answers to one editor per answer to preserve cleanliness Update: Forgot to add browser compatibility to the list

    Read the article

  • Jboss 5.1.0: java.lang.LinkageError: loader constraint violation for class javax.sql.DataSource

    - by lawrencexu
    have read quite a lot about this error, the reason is 1) more than one jar containing this class have been include into the classpath, 2)include the jar twice or more, but in my case, this class is jdk class, and I have search no this class have been found under my application. any clue would be very helpful. exception stack: 2012-10-31 14:09:58,319 WARN [org.jboss.detailed.classloader.ClassLoaderManager] (http-0.0.0.0-8080-1:) Unexpected error during load of:javax.sql.DataSource java.lang.LinkageError: loader constraint violation: loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) previously initiated loading for a different type with name "javax/sql/DataSource" at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) at java.lang.ClassLoader.defineClass(ClassLoader.java:615) at org.jboss.classloader.spi.base.BaseClassLoader.access$200(BaseClassLoader.java:67) at org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:633) at org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:592) at java.security.AccessController.doPrivileged(Native Method) at org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(BaseClassLoader.java:591) at org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(BaseClassLoader.java:568) at org.jboss.classloader.spi.base.BaseDelegateLoader.loadClass(BaseDelegateLoader.java:135) at org.jboss.classloader.spi.filter.FilteredDelegateLoader.loadClass(FilteredDelegateLoader.java:131) at org.jboss.classloader.spi.base.ClassLoadingTask$ThreadTask.run(ClassLoadingTask.java:455) at org.jboss.classloader.spi.base.ClassLoaderManager.nextTask(ClassLoaderManager.java:267) at org.jboss.classloader.spi.base.ClassLoaderManager.process(ClassLoaderManager.java:166) at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:287) at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:1163) at org.jboss.classloader.spi.base.BaseClassLoader.loadClassFromDomain(BaseClassLoader.java:862) at org.jboss.classloader.spi.base.BaseClassLoader.doLoadClass(BaseClassLoader.java:502) at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:447) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) at com.lombardrisk.webgui.dwr.ajax_search.UmbrellaNettingFundsSearch.getBranchesByAgreementId(UmbrellaNettingFundsSearch.java:199) at com.lombardrisk.webgui.dwr.ajax_search.UmbrellaNettingFundsSearch.buildConditionOfPrinAndCpty(UmbrellaNettingFundsSearch.java:177) at com.lombardrisk.webgui.dwr.ajax_search.UmbrellaNettingFundsSearch.getFunds(UmbrellaNettingFundsSearch.java:58) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.directwebremoting.impl.ExecuteAjaxFilter.doFilter(ExecuteAjaxFilter.java:34) at org.directwebremoting.impl.DefaultRemoter$1.doFilter(DefaultRemoter.java:428) at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:431) at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:283) at org.directwebremoting.servlet.PlainCallHandler.handle(PlainCallHandler.java:52) at org.directwebremoting.servlet.UrlProcessor.handle(UrlProcessor.java:101) at org.directwebremoting.servlet.DwrServlet.doPost(DwrServlet.java:146) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.lombardrisk.webgui.filter.ValidRequestFilter.doFilter(ValidRequestFilter.java:41) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:183) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:95) at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126) at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.internalProcess(ActiveRequestResponseCacheValve.java:74) at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:47) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:599) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:451) at java.lang.Thread.run(Thread.java:662)

    Read the article

  • Packaging ejb3 swing client

    - by soontobeared
    Hi, I get the "java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFac tory" error while running my packaged ejb3 swing client jar. Here's the stack trace. G:\Courses\OSUMC\Installables\June 5\New>java -jar MetaDB-Client.jar javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interf aces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: o rg.jnp.interfaces.NamingContextFactory] at javax.naming.spi.NamingManager.getInitialContext(Unknown Source) at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source) at javax.naming.InitialContext.init(Unknown Source) at javax.naming.InitialContext.<init>(Unknown Source) at net.massmatrix.metadb.ui.facade.BaseEJBFacade.getInitialContext(BaseE JBFacade.java:26) at net.massmatrix.metadb.ui.facade.UserManagerFacade.getUserManager(User ManagerFacade.java:24) at net.massmatrix.metadb.ui.facade.UserManagerFacade.isUserNameAvailable (UserManagerFacade.java:44) at net.massmatrix.metadb.ui.MainFrame.main(MainFrame.java:269) Caused by: java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFac tory at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at com.sun.naming.internal.VersionHelper12.loadClass(Unknown Source) ... 8 more Exception in thread "main" java.lang.NullPointerException at net.massmatrix.metadb.ui.facade.UserManagerFacade.isUserNameAvailable (UserManagerFacade.java:44) at net.massmatrix.metadb.ui.MainFrame.main(MainFrame.java:269) Here are my packaged swing client Jar contents:- MetaDB-Client.jar \lib - contains all jboss\client jars \net\.. - contains class files(from both client and server) META-INF MANIFEST.MF jndi.properties Here's my jndi.properties:- java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces java.naming.provider.url=localhost:1099 Here's my MANIFEST.MF:- Manifest-Version: 1.0 Main-Class: net.massmatrix.metadb.ui.MainFrame Class-Path: lib/* Command used to create the jar:- jar cfm MetaDB-Client.jar MANIFEST.MF net\* lib\* jndi.properties What else am i missing ? Thanks.

    Read the article

  • Python SQLite FTS3 alternatives?

    - by Mike Cialowicz
    Are there any good alternatives to SQLite + FTS3 for python? I'm iterating over a series of text documents, and would like to categorize them according to some text queries. For example, I might want to know if a document mentions the words "rating" or "upgraded" within three words of "buy." The FTS3 syntax for this query is the following: (rating OR upgraded) NEAR/3 buy That's all well and good, but if I use FTS3, this operation seems rather expensive. The process goes something like this: # create an SQLite3 db in memory conn = sqlite3.connect(':memory:') c = conn.cursor() c.execute('CREATE VIRTUAL TABLE fts USING FTS3(content TEXT)') conn.commit() Then, for each document, do something like this: #insert the document text into the fts table, so I can run a query c.execute('insert into fts(content) values (?)', content) conn.commit() # execute my FTS query here, look at the results, etc # remove the document text from the fts table before working on the next document c.execute('delete from fts') conn.commit() This seems rather expensive to me. The other problem I have with SQLite FTS is that it doesn't appear to work with Python 2.5.4. The 'CREATE VIRTUAL TABLE' syntax is unrecognized. This means that I'd have to upgrade to Python 2.6, which means re-testing numerous existing scripts and programs to make sure they work under 2.6. Is there a better way? Perhaps a different library? Something faster? Thank you.

    Read the article

  • Delete text from copied text

    - by riddle
    Hello, I would to use JavaScript to clean up text that’s being copied from my site. I use snippets like this: body { vertical-align: middle; ? } Where ? indicates comment later on. I want readers to copy this snippet and use it – so I need to delete that Unicode marker. How can I access text that’s being copied and make changes to it? I considered deleting marker(s) from snippet when user clicks (mousedown) on it, so she could select the text, copy it and then I would restore markers but it seems a really long way to do it.

    Read the article

  • Within headers, images with alt text vs. text

    - by Court
    Do search engines treat the alt text of an image placed within an h1 tag the same way they would treat regular text placed in an h1 tag? I gave a search through here looking for an answer to this question, but was only able to find information on image replacement and the infamous h1 debate. For example would: <h1><img src="#" alt="Contact Us" /></h1> Act the same as: <h1>Contact Us</h1> In the electronic eye of a search engine? This seems considerably less "CSS Hacky" than other image replacement techniques like negative text indents, display:none, height:0, or ridiculous z-index integers.

    Read the article

  • copy relative path of file

    - by efr
    I can copy full path of file: { "keys": ["super+i"], "command": "copy_file_path" } But don't know how to copy its relative path (relative to project folder) I even created .sublime-project { "folders": [ { "path": ".", "folder_exclude_patterns": ["node_modules"], "follow_symlinks": true } ] } But copy_file_path still copies absolute path.

    Read the article

  • Exception when indexing text documents with Lucene, using SnowballAnalyzer for cleaning up

    - by Julia
    Hello!!! I am indexing the documents with Lucene and am trying to apply the SnowballAnalyzer for punctuation and stopword removal from text .. I keep getting the following error :( IllegalAccessError: tried to access method org.apache.lucene.analysis.Tokenizer.(Ljava/io/Reader;)V from class org.apache.lucene.analysis.snowball.SnowballAnalyzer Here is the code, I would very much appreciate help!!!! I am new with this.. public class Indexer { private Indexer(){}; private String[] stopWords = {....}; private String indexName; private IndexWriter iWriter; private static String FILES_TO_INDEX = "/Users/ssi/forindexing"; public static void main(String[] args) throws Exception { Indexer m = new Indexer(); m.index("./newindex"); } public void index(String indexName) throws Exception { this.indexName = indexName; final File docDir = new File(FILES_TO_INDEX); if(!docDir.exists() || !docDir.canRead()){ System.err.println("Something wrong... " + docDir.getPath()); System.exit(1); } Date start = new Date(); PerFieldAnalyzerWrapper analyzers = new PerFieldAnalyzerWrapper(new SimpleAnalyzer()); analyzers.addAnalyzer("text", new SnowballAnalyzer("English", stopWords)); Directory directory = FSDirectory.open(new File(this.indexName)); IndexWriter.MaxFieldLength maxLength = IndexWriter.MaxFieldLength.UNLIMITED; iWriter = new IndexWriter(directory, analyzers, true, maxLength); System.out.println("Indexing to dir..........." + indexName); if(docDir.isDirectory()){ File[] files = docDir.listFiles(); if(files != null){ for (int i = 0; i < files.length; i++) { try { indexDocument(files[i]); }catch (FileNotFoundException fnfe){ fnfe.printStackTrace(); } } } } System.out.println("Optimizing...... "); iWriter.optimize(); iWriter.close(); Date end = new Date(); System.out.println("Time to index was" + (end.getTime()-start.getTime()) + "miliseconds"); } private void indexDocument(File someDoc) throws IOException { Document doc = new Document(); Field name = new Field("name", someDoc.getName(), Field.Store.YES, Field.Index.ANALYZED); Field text = new Field("text", new FileReader(someDoc), Field.TermVector.WITH_POSITIONS_OFFSETS); doc.add(name); doc.add(text); iWriter.addDocument(doc); } }

    Read the article

  • jquery ui is not scaling text properly!

    - by Stephen Belanger
    I'm trying use jquery ui to scale a div that I'm dragging around to make it easier to see what's behind it, but any text inside it is scaling strangely. The text itself becomes smaller, but it seems to have a bunch of padding around it and is floating now. The text extends past the bottom of the div even though it should be contained properly by the div. I put a red border around the lines of text and the borders are the same size as the original text. I'm not really sure what to do to get this to work... HTML: <div class="item draggable" id="item-1'"> <div class="image-block"> <a class="delete-button" title="delete me!" href="/remove/1" onclick="return $(this).confirm(\'Really remove this image?\');">X</a> <a class="image" href="/edit/1"><img src="/someimage.jpg" /></a> <div class="clear-block"></div> </div> <h3>Some title</h3> </div> CSS: div.image-list div.item { float:left; background:#fff; width:150px; padding:5px; margin:4px; border:1px solid #d3d5d6; } div.image-list div.item h3 { margin:0; padding:0; border:solid 1px #F00; } div.image-list div.item div.image-block a.delete-button { float:right; position:relative; background:#fff; display:none; top:0.8em; margin-bottom:-20.0em; width:3em; height:1.8em; padding:0.2em 1em; } div.image-list div.item div.image-block a.image { float:left; display:block; } .clear-block { clear:both; } jquery: $(".draggable").draggable({ helper: 'clone', start: function(ev, ui) { $(ui.helper).effect( "scale", { percent: 50 }, 200 ); } });

    Read the article

  • What is the quickest way to indent a block of text with spaces for use within a web browser?

    - by ændrük
    I occasionally have the need to indent a block of text with spaces for use within a web browser, for example, when formatting a code block on this site or in a post on Launchpad. So far I've just done it by hand by copying four spaces to the clipboard and then mashing keys really fast: ?, Home, Ctrl+V (repeat) What is the quickest way to accomplish this? Copying and pasting to another program? (Which?) A Firefox or Chrome browser extension? A command to directly modify the clipboard contents? An auto-typing program?

    Read the article

  • Text editor with coloring to highlight "non-parameters" in conf files?

    - by Zabba
    Some .conf files have a lot of comments and parameters in them like so: # WINS Server - Tells the NMBD components of Samba to be a WINS Client # Note: Samba can be either a WINS Server, or a WINS Client, but NOT both ; wins server = w.x.y.z # This will prevent nmbd to search for NetBIOS names through DNS. dns proxy = no ..... It gets difficult to look for only the parameters among the plethora of comments, so, is there some text editor that can highlight the comments in dark grey so that the real parameters stand out?

    Read the article

  • Is there a market for a Text-based empire-building game?

    - by Vishnu
    I am working on building a text-based in-browser empire building game. The screen will be split into a console and an EXTREMELY rough vector map of your empire (just squares in a bigger square). Commands such as building and expanding would be typed into the console and automatically reflected in the map. Would there be any market for such a game? Would anyone want to play? To clarify, it would be online and everyone's empire would be in the same 'world'.

    Read the article

  • What is a quick way to indent a block of text with spaces for use within a web browser?

    - by ændrük
    I occasionally have the need to indent a block of text with spaces for use within a web browser, for example, when formatting a code block on this site or in a post on Launchpad. So far I've just done it by hand by copying four spaces to the clipboard and then mashing keys really fast: ?, Home, Ctrl+V (repeat) What is a quicker way to accomplish this, e.g. copying and pasting to another program? a Firefox or Chrome browser extension? a command to directly modify the clipboard contents? an auto-typing program?

    Read the article

  • HTML text input and using the input as a variable in a script(tcl)/sql(sqlite)

    - by Fantastic Fourier
    Hello all, I'm very VERY new at this whole web thing. And I'm just very confused in general. Basically, what I want to do is take an input via text using HTML and adding that input to database, table trans. Should be simple but I am lost. <li>Transaction Number</li> <li><input type=|text| name=|tnumber| </li> // do i need to use value? <li>Employee Name</li> <li><input type=|text| name=|ename| </li> <li><input type=|SUBMIT| value=|Add|></li> ...... ...... sqlite3 db $::env(ROOT)/database.db mb eval {INSERT INTO trans VALUES ($tnumber, $ename} mb close They are both in a same file and there are only two fields to the database to keep things simple. What I can see here is that tnumber and ename aren't declared as variables. So how do I do that so that the text input is assigned to respective variables?

    Read the article

  • Lotus Notes - Export emails to plain text file

    - by mbeckish
    I am setting up a Lotus Notes account to accept emails from a client, and automatically save each email as a plain text file to be processed by another application. So, I'm trying to create my very first Agent in Lotus to automatically export the emails to text. Is there a standard, best practices way to do this? I've created a LotusScript Agent that pretty much works. However, there is a bug - once the Body of the memo exceeds 32K characters, it starts inserting extra CR/LF pairs. I am using Lotus Notes 7.0.3. Here is my script: Sub Initialize On Error Goto ErrorCleanup Dim session As New NotesSession Dim db As NotesDatabase Dim doc As NotesDocument Dim uniqueID As Variant Dim curView As NotesView Dim docCount As Integer Dim notesInputFolder As String Dim notesValidOutputFolder As String Dim notesErrorOutputFolder As String Dim outputFolder As String Dim fileNum As Integer Dim bodyRichText As NotesRichTextItem Dim bodyUnformattedText As String Dim subjectText As NotesItem ''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'INPUT OUTPUT LOCATIONS outputFolder = "\\PASCRIA\CignaDFS\CUser1\Home\mikebec\MyDocuments\" notesInputFolder = "IBEmails" notesValidOutputFolder = "IBEmailsDone" notesErrorOutputFolder="IBEmailsError" ''''''''''''''''''''''''''''''''''''''''''''''''''''''' Set db = session.CurrentDatabase Set curview = db.GetView(notesInputFolder ) docCount = curview.EntryCount Print "NUMBER OF DOCS " & docCount fileNum = 1 While (docCount > 0) 'set current doc to Set doc = curview.GetNthDocument(docCount) Set bodyRichText = doc.GetFirstItem( "Body" ) bodyUnformattedText = bodyRichText.GetUnformattedText() Set subjectText = doc.GetFirstItem("Subject") If subjectText.Text = "LotusAgentTest" Then uniqueID = Evaluate("@Unique") Open "\\PASCRIA\CignaDFS\CUser1\Home\mikebec\MyDocuments\email_" & uniqueID(0) & ".txt" For Output As fileNum Print #fileNum, "Subject:" & subjectText.Text Print #fileNum, "Date:" & Now Print #fileNum, bodyUnformattedText Close fileNum fileNum = fileNum + 1 Call doc.PutInFolder(notesValidOutputFolder) Call doc.RemoveFromFolder(notesInputFolder) End If doccount = doccount-1 Wend Exit Sub ErrorCleanup: Call sendErrorEmail(db,doc.GetItemValue("From")(0)) Call doc.PutInFolder(notesErrorOutputFolder) Call doc.RemoveFromFolder(notesInputFolder) End Sub Update Apparently the 32KB issue isn't consistent - so far, it's just one document that starts getting extra carriage returns after 32K.

    Read the article

  • Text over floated images

    - by Barbara
    I need to put some text over a series of images in a gallery. I found many tutorials about the text part however the images need to be floated. Whenever I add float:left though the trick no longer works. My code (css inline for sack of brevity): <a href="/photos/photo1.php" title="photo1"> <span style="position: relative; width: 100%;"> <img src="/photos/photo1.jpg" alt="" /> <span style="position: absolute; top: 10px; left: 0; width: 100%;">Text over image</span> </span> </a> <a href="/photos/photo2.php" title="photo2"> <span style="position: relative; width: 100%;"> <img src="/photos/photo2.jpg" alt="" /> <span style="position: absolute; top: 10px; left: 0; width: 100%;">Text over image</span> </span> </a> This way the images are one under another but like I said I need to float them without breaking everything else.

    Read the article

  • Full-text search in C++

    - by Jen
    I have a database of many (though relatively short) HTML documents. I want users to be able to search this database by entering one or more search words in a C++ desktop application. Hence, I’m looking for a fast full-text search solution. Ideally, it should: Skip common words, such as the, of, and, etc. Support stemming, i.e. search for run also finds documents containing runner, running and ran. Be able to update its index in the background as new documents are added to the database. Be able to provide search word suggestions (like Google Suggest) To illustrate, assume the database has just two documents: Document 1: This is a test of text search. Document 2: Testing is fun. The following words should be in the index: fun, search, test, testing, text. If the user types t in the search box, I want the application to be able to suggest test, testing and text (Ideally, the application should be able to query the search engine for the 10 most common search words starting with t). A search for testing should return both documents. Can you suggest a C or C++ based solution? (I’ve briefly reviewed CLucene and Xapian, but I’m not sure if either will address my needs, especially querying the search word indexes for the suggest feature).

    Read the article

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