Search Results

Search found 1033 results on 42 pages for 'nm applet'.

Page 35/42 | < Previous Page | 31 32 33 34 35 36 37 38 39 40 41 42  | Next Page >

  • javascript eval backslash in window NT path problem

    - by Hammad Tariq
    I am experiencing a classic JS case (in my opinion) but after a lot of googling, still not able to find a solution. Backslash is considered as a escape character in JS but what you need when you need to pass windows path from the JS and print it? I am using eval because my java applet is executing the code and placing bits when it has a string to evaluate. That's why eval is necessary, however I have made an example which is below: <div id="mainTabs"></div> <script> var s = "document.getElementById('mainTabs').innerHTML='\\C\ganye\file.doc'"; eval(s); </script> I tried double backslashes, not working, if anyone could help me get around this with as less hassle as possible, I will feel grateful.

    Read the article

  • How to set up jndi.properties for DataStore?

    - by FarmBoy
    I'm struggling to set connect a Java program to MySQL using JPA/Hibernate. I'm currently getting the following error when I try to call createEntityManagerFactory(): [main] ERROR org.hibernate.connection.DatasourceConnectionProvider - Could not find datasource: java:jdbc/myDataDS javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:645) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288) at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:325) at javax.naming.InitialContext.lookup(InitialContext.java:392) at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:75) Googling seems to indicate that I need a jndi.properties file in META-INF in my classpath, but I can't seem to find any information about what that file should contain in my case.

    Read the article

  • What video conferencing software is suitable for communicating with clients?

    - by Nick Retallack
    You're working freelance with several small remote clients and you want to have a meeting via webcam. What do you use? Please consider price, video quality, and minimum hassle for the clients. I'd prefer my clients don't have to pay anything or install anything for it to work. I'm already serving VNC in a Java applet, so something like that would be nice. Skype is awesome, and oovoo looks great, but I'd like to have more than one client on the line at once without them having to pay a subscription too. Something like Ustream.com or Justin.tv would be nice, but it would be better if all parties could talk. Related Questions: Can someone suggest free video conferencing tools

    Read the article

  • Jythonc missing

    - by mridang
    Hi Guys, I just installed Jython 2.5.1. I want to convert my Python file into Java class file and it is instructed on the website to use the jythonc command-line tool but I can't find it. Does anyone know where I could find it? Basically what i was trying to accomplish is to get my Python code running client-side in a browser and the best way seemed to be by creating an applet using Jython. I don't want to create a desktop application and using Silverlight/IronPython is out of the question. Any other ideas are welcomed. Cheers!

    Read the article

  • How to prevent "Local transaction already has 1 non-XA Resource" exception?

    - by Zeratul
    Hi, I'm using 2 PU in stateless EJB and each of them is invoked on one method: @PersistenceContext(unitName="PU") private EntityManager em; @PersistenceContext(unitName="PU2") private EntityManager em2; @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW ) public void getCandidates(final Integer eventId) throws ControllerException { ElectionEvent electionEvent = em.find(ElectionEvent.class, eventId); ... Person person = getPerson(candidate.getLogin()); ... } @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW ) private Person getPerson(String login) throws ControllerException { Person person = em2.find(Person.class, login); return person; } Those methods are annotated with REQUIRES_NEW transcaction to avoid this exception. When I was calling these method from javaFX applet, all worked as expected. Now I'm trying to call them from JAX-RS webservice (I don't see any logical difference as in both cases ejb was looked up in initial context) and I keep getting this exception. When I set up XADatasource in glassfish 2.1 connection pools, I got nullpointer exception on em2. Any ideas what to try next? Regards

    Read the article

  • Java File and ByteArray or InputStream - please quick help

    - by Peter Perhác
    I want to use jFuge to play some MIDI music in an applet. There's a class for the MIDI pattern - Pattern - and the only method to load the pattern is from a File. Now, I don't know how applets load files and what not, but I am using a framework (PulpCore) that makes loading assets a simple task. If I need to grab an asset from a ZIP catalogue, I can use the Assets class which provides get() and getAsStream() methods. get() returns the given asset as a ByteArray, the other as an InputStream. I need jFuge to load the pattern from either ByteArray or InputStream. In pseudo-code, I would like to do this: Pattern.load(new File(Assets.get("mymidifile.midi"))); however there is no File constructor that would take a ByteArray. Suggestions, please?

    Read the article

  • how to retrieve part of a string in java?

    - by mithun1538
    Hello everyone, I am designing a chat applet. In this, a user will append his name to the beginning of the message that he sends to the other user. In the window of other user, I want to retrieve the appended user name from that string. How do I do that? The message sent by the user is as follows : final_msg = user_name + ": " + user_message Hence I want to know how to retrieve the user_name string only. Is there a function that can retrieve a substring upto the first ":"? I dont want to use final_msg.split(":"), because there is a possiblity that the user_message contains ":", which will then give me an array of strings.

    Read the article

  • C++ to bytecode compiler for Silverlight CLR?

    - by paleozogt
    I'd like to be able to compile a C/C++ library so that it runs within a safe managed runtime in the Silverlight CLR. There are several tools for doing this with the JVM that allows C++ code to run within a CRT emulation layer (see NestedVM, LLJVM, etc), which effectively allows C++ code to be run within a Java Applet. There's even a tool for this for the Adobe Flash VM (see Alchemy). However, I can't seem to find any tools like this for the CLR. fyi, the MSVC tools don't seem to allow for this: The /clr:pure flag will create C++ code that runs in the CLR, but it isn't safe (because the CRT isn't safe) and /clr:safe requires massive code changes (no native types, etc).

    Read the article

  • Multiple port asynchronous I/O over serialport in C#

    - by firoso
    I'm trying to write a test application for serial I/O (RS-232) with multiple units in C# and I'm running into an issue with my lack of threading experience so I'm soliciting feedback for a best known method. I've got a pool of COM ports COM1-16 each of which can read/write at any time and I need to be able to manage them simultaneously. Is this a situation for a thread pool? What is some guidance on structuring this applet? Edit: Upon review I was wondering is I really even need to do asynchronous threads here, I could just maintain states for each COM-port and do flow logic (i.e., statemachine) for each COM-port individually.

    Read the article

  • Quartz Window Services equivalent for Windows and X11?

    - by Jake Petroules
    What is the equivalent of Quartz Window Services for Windows and X11? I want to be able to capture individual windows with their decorations, shadows, etc., completely independent from each other. Basically what the Son of Grab example is able to do. http://developer.apple.com/mac/library/samplecode/SonOfGrab/Introduction/Intro.html Also it seems like it's not possible to capture non-top-level windows with QWS in Mac. For example I want to be able to capture a Java or Flash applet running inside Firefox. What other library would I need to use instead?

    Read the article

  • Watching a variable for changes without polling.

    - by milkfilk
    I'm using a framework called Processing which is basically a Java applet. It has the ability to do key events because Applet can. You can also roll your own callbacks of sorts into the parent. I'm not doing that right now and maybe that's the solution. For now, I'm looking for a more POJO solution. So I wrote some examples to illustrate my question. Please ignore using key events on the command line (console). Certainly this would be a very clean solution but it's not possible on the command line and my actual app isn't a command line app. In fact, a key event would be a good solution for me but I'm trying to understand events and polling beyond just keyboard specific problems. Both these examples flip a boolean. When the boolean flips, I want to fire something once. I could wrap the boolean in an Object so if the Object changes, I could fire an event too. I just don't want to poll with an if() statement unnecessarily. import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; /* * Example of checking a variable for changes. * Uses dumb if() and polls continuously. */ public class NotAvoidingPolling { public static void main(String[] args) { boolean typedA = false; String input = ""; System.out.println("Type 'a' please."); while (true) { InputStreamReader isr = new InputStreamReader(System.in); BufferedReader br = new BufferedReader(isr); try { input = br.readLine(); } catch (IOException ioException) { System.out.println("IO Error."); System.exit(1); } // contrived state change logic if (input.equals("a")) { typedA = true; } else { typedA = false; } // problem: this is polling. if (typedA) System.out.println("Typed 'a'."); } } } Running this outputs: Type 'a' please. a Typed 'a'. On some forums people suggested using an Observer. And although this decouples the event handler from class being observed, I still have an if() on a forever loop. import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Observable; import java.util.Observer; /* * Example of checking a variable for changes. * This uses an observer to decouple the handler feedback * out of the main() but still is polling. */ public class ObserverStillPolling { boolean typedA = false; public static void main(String[] args) { // this ObserverStillPolling o = new ObserverStillPolling(); final MyEvent myEvent = new MyEvent(o); final MyHandler myHandler = new MyHandler(); myEvent.addObserver(myHandler); // subscribe // watch for event forever Thread thread = new Thread(myEvent); thread.start(); System.out.println("Type 'a' please."); String input = ""; while (true) { InputStreamReader isr = new InputStreamReader(System.in); BufferedReader br = new BufferedReader(isr); try { input = br.readLine(); } catch (IOException ioException) { System.out.println("IO Error."); System.exit(1); } // contrived state change logic // but it's decoupled now because there's no handler here. if (input.equals("a")) { o.typedA = true; } } } } class MyEvent extends Observable implements Runnable { // boolean typedA; ObserverStillPolling o; public MyEvent(ObserverStillPolling o) { this.o = o; } public void run() { // watch the main forever while (true) { // event fire if (this.o.typedA) { setChanged(); // in reality, you'd pass something more useful notifyObservers("You just typed 'a'."); // reset this.o.typedA = false; } } } } class MyHandler implements Observer { public void update(Observable obj, Object arg) { // handle event if (arg instanceof String) { System.out.println("We received:" + (String) arg); } } } Running this outputs: Type 'a' please. a We received:You just typed 'a'. I'd be ok if the if() was a NOOP on the CPU. But it's really comparing every pass. I see real CPU load. This is as bad as polling. I can maybe throttle it back with a sleep or compare the elapsed time since last update but this is not event driven. It's just less polling. So how can I do this smarter? How can I watch a POJO for changes without polling? In C# there seems to be something interesting called properties. I'm not a C# guy so maybe this isn't as magical as I think. private void SendPropertyChanging(string property) { if (this.PropertyChanging != null) { this.PropertyChanging(this, new PropertyChangingEventArgs(property)); } }

    Read the article

  • Trying to Unit Test A Class That Makes DB Queries Using Hibernate And Can't Get Session Created...

    - by Jared Michaels
    I am trying to implement JUnit tests for a class that performs DB queries using Hibernate. When I create the class under test, I get access to the session through the factory by doing the following: InitialContext context = new InitialContext(); sessionFactory = (SessionFactory) context.lookup(hibernateContext); This works fine when I deploy this to JBoss 5.1. I am trying to figure out how to get this to work with my JUnit test. I keep getting an exception stating that I "Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial". I've searched high and low but haven't been able to find any information about what specifically I need to do to get this to work. I am not using Spring or any frameworks, just plain old Java and JUnit.

    Read the article

  • Portable way to determining of printer is physical or virtual

    - by Mud
    I need direct-to-printer functionality for my website, with the ability to distinguish a physical printer from a virtual printer (file). Coupons.com has this functionality via a native binary which must be installed by the user. I'd prefer to avoid that. SmartSource.com does it via Java applet: Does anybody know how this is done? I dug through that Java APIs a bit, and don't see anything that would let you determine physical vs virtual, except looking at the name (that seems prone to misidentification). It would be nice to be able to do it in Java, because I already know how to write Java applets. Failing that, is there a way to do this in Flash or Silverlight? Thanks in advance. EDIT: Well deserved bounty awarded to Jason Sperske who worked out an elegant solution. Thanks to those of you who shared ideas, as well as those who actually investigated SmartSource.com's solution (like Adrian).

    Read the article

  • Is it possible to take a screenshot of a web page with Javascript or HTML5/Canvas?

    - by Ryan Kearney
    Is there a way I could insert some code into a page that would take a screenshot of what the user sees in the browser window, then upload that image via a web form of some sort? I'm working on a clone of a pay-to-use service that lets you install a widget on a web page which in turn allows viewers to report bugs in the sites layout. Currently they use a Java applet to take the screenshot, which, in my opinion, is probably the worst way to go about it (aside from requiring the user to install a plugin) Is there a javascript/flash/other alternative? Thanks

    Read the article

  • Strophe javascript prevent disconnection on some delay

    - by patrikas
    Hello, I am developing javascript XMPP application which uses Strophe library to connect to Jabber server. I need to engage the thread for about 5-10 seconds when Strophe connects to the server. Thread is engaged by running java applet and after it releases the thread it goes back to handle XMPP events, however at the moment I cannot manage to do that - trying to use a connection after delay gives me 404 HTTP error (this is sent by XMPP-BOSHS service straight after Strophe sends POST request with XMPP message to it). I was trying to 'pause' a connection with Strophe's connection.pause and then resume it - didn't work. Would sending some raw content to the server, maybe if it's possible telling it that client's gonna be unresponsive for a short time work ? Are there any other solutions ? Thanks

    Read the article

  • I am not able launch JNLP aaplications using "Java Web Start"?

    - by akjain
    Up until recently, I was able to launch/open JNLP files in Firefox using Java web start. Don't know what happened all of a sudden JNLP files stopped launching, a splash screen appears saying Java Starting... and then nothing happens. Even the Java Console in the browser and javacpl.cpl applet doesn't open. Tried all possibilities: removed all older version and installed the latest JRE (java version "1.6.0_17"), still it doesn't work. Done some googling for this problem, people suggested to start javaws.exe with -viewer option but same behavior (a splash screen appears saying "Java Starting..." and then disappears) The problem is that I don't know any place (logs etc.) to look for to see what is causing the problem. I am using WinXP SP3, and some of the screenshots below shows further info about my system. I can provide any other detail if required but please help me solve this problem. Update: Although this question is bit old, Following solution fixed above issue for me (indeed this was the actual cause)

    Read the article

  • Trigger local program execution from browser

    - by DroidIn.net
    First and foremost: I know it's not right or even good thing to do but my current customer will not cave in. So here's what he is asking for (this is for in-house-behind-a-firewall-etc project). In the web report I need to supply a link which points to the executable script that lives on the universally mapped location (network file server). When user clicks on it it is expected to run on the local client starting local executable which should be pre-installed on the client's box. It should be agnostic to OS (Windows or Linux) and the browser used. Customer doesn't mind to click on angry pop-up alerts but he wants to do it once per client browser (or at minimum - session). QUESTION: Will trusted Java applet be able to do it? Or is the any other (better, simpler) ways of achieving the same? ActiveX control is out of question

    Read the article

  • Java + Eclipse + Pulpcore

    - by cable729
    I've never programmed in java or eclipse before, although I have used c# and visual studio. I'm trying to get started with java development, and develop 2d games, but I can't get the project to run. I've followed the tutorial here: http://cloningtheclassics.com/getting-started-with-pulpcore/ I've retried the tutorial at least 5 times, and I still can't get it to work. The error it displays is: Buildfile: C:\workspace\javapulp\project\build.xml [taskdef] Could not load definitions from resource tasks.properties. It could not be found. [taskdef] Could not load definitions from resource tasks.properties. It could not be found. -init: BUILD FAILED C:\workspace\javapulp\project\build.xml:127: Required file not found: ../../build/pulpcore-applet-debug-0.11.jar Total time: 1 second Thanks in advance!

    Read the article

  • selecting ppp of multiple interfaces

    - by Neeraj
    Hi everyone, I am currently having a hard time on getting the mobile broadband connection running on ubuntu 10.04(lucid lynx). I am using a USB modem and used wvdial to connect to the web It went like: Sending ATZ ... OK sending some more flags OK modem initialized connecting Local IP x.x.x.x Remote IP y.y.y.y Primary DNS z.z.z.z Secondary DNS a.a.a.a (Some more output) I tested this with invalid username to make sure it is really connected and i think it was connected as connection failed with invalid usernames. Now when I do a remote ping say 8.8.8.8 (Google DNS servers), the ping says unreachable I think this might be because the system may be using the ethernet to send packets which was indeed disconnected. So can anyone help me out with this. How can I select ppp as the interface to send packets or is there some other problem. A command line solution will be appreciated as my network manager applet doesnt works correctly. Any help is much much appreciated. -- thx

    Read the article

  • How to prevent UI from freezing during lengthy process?

    - by OverTheRainbow
    Hello, I need to write a VB.Net 2008 applet to go through all the fixed-drives looking for some files. If I put the code in ButtonClick(), the UI freezes until the code is done: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click 'TODO Find way to avoid freezing UI while scanning fixed drives Dim drive As DriveInfo Dim filelist As Collections.ObjectModel.ReadOnlyCollection(Of String) Dim filepath As String For Each drive In DriveInfo.GetDrives() If drive.DriveType = DriveType.Fixed Then filelist = My.Computer.FileSystem.GetFiles(drive.ToString, FileIO.SearchOption.SearchAllSubDirectories, "MyFiles.*") For Each filepath In filelist 'Do stuff Next filepath End If Next drive End Sub Google returned information on a BackGroundWorker control: Is this the right/way to solve this issue? If not, what solution would you recommend, possibly with a really simple example? FWIW, I read that Application.DoEvents() is a left-over from VBClassic and should be avoided. Thank you.

    Read the article

  • Does Java Mac OSX native look and feel respect UIManager font changes?

    - by Erik Lickerman
    I have a java applet and the only look and feel that works properly is the native mac one. I wanted to make the fonts a bit larger and tried using the standard UIManager methods UIManager.put("Label.font", new Font("Georgia", Font.PLAIN, 18)); This produces no change. It does not throw an exception, of course. Does anyone know if the native mac look and feel ignores these? I know there are specific ways to make controls different sizes on mac but these only seem to make them smaller. You cannot make the controls larger than regular.

    Read the article

  • How to wrap Plone authentication around a third-party servlet?

    - by smocking
    We're using Plone to serve up some third-party middle-ware. Unfortunately the middle-ware has a particular servlet that gets invoked from a Java applet and doesn't do any kind of authentication. I would like to firewall this off and somehow wrap authentication around it, preferably using the existing session that users will have on Plone. My first idea was to configure nginx (which we're using as the reverse proxy) to check the cookie and only proxy if the user has a valid session (along the lines of this example). However, how to check the session ID against Plone, since it's all stored in the Zope database? Alternatively we could have a Plone python script that basically passes everything along to the back-end after authenticating, but I'm not sure how to do that. Any suggestions? Or alternative ideas?

    Read the article

  • EMV credit/debit card chip application

    - by rohitamitpathak
    I am working in smart card industry and familiar with ISO 7816 and Java Card. Till now I worked for ID card, Health card and SIM application using GSM standard. Now I have a chance to work in EMV. Here I have some confusion like: Is a EMV credit/debit card will be a java card containing applet inside it? what standard I need to go through to develop emv debit/credit card application? Is there any good tutorial which helps to understand about EMV debit/credit Card application development? Is there any good simulator to develop and test emv card application?

    Read the article

  • Can a MAC address be used as a reliable part of a rights management (DRM) scheme?

    - by Jarrod Mosen
    We're currently writing some software that we want to protect. We thought that registering a user's MAC address in a database upon activation of the software seemed viable; we can profile and grab that with a Java applet, (is there a better way?) so getting it isn't too much of a problem. However, we want their computer to only run the application, and download application files/updates from the server when their MAC address has been verified with their one on-file. We understand that this means a lockdown to one computer, but special changes can be made on request. What would be the best way to verify their MAC address, to see if it exists in the database, and then serve them the files to run the application? (And to simply run it on subsequent requests, to prevent re-downloading.)

    Read the article

  • can i add textfields in the code other than in the init?

    - by themanepalli
    Im a 15 year old noob to java. I am trying to make a basic program trader that asks for the stock price, the stock name, the stock market value and the type of order. Based on the type of order, i want a new textfield to appear. do i have to add the textfield in the init first or can i do it in the action performed. I googled someother ones but they are a little too complicated for me. heres my code. import java.awt.*; import java.applet.*; // import an extra class for the ActionListener import java.awt.event.*; public class mathFair extends Applet implements ActionListener { TextField stockPrice2; TextField stockName2; TextField orderType2; TextField marketValue2; TextField buyOrder2; TextField sellOrder2; TextField limitOrder2; TextField stopLossOrder2; Label stockPrice1; Label stockName1; Label orderType1; Label marketValue1; Label buyOrder1; Label sellOrder1; Label limitOrder1; Label stopLossOrder1; Button calculate; public void init() { stockPrice1 = new Label ("Enter Stock Price:"); stockName1 = new Label ("Enter Name of Stock: "); orderType1 = new Label ("Enter Type of Order: 1 for Buy, 2 for Sell, 3 for Stop Loss, 4 for Limit"); marketValue1= new Label("Enter The Current Price Of The Market"); stopLossOrder1 = new Label ("Enter The Lowest Price The Stock Can Go"); limitOrder1 = new Label ("Enter The Highest Price The Stock Can Go"); stockPrice2 = new TextField (35); stockName2 = new TextField (35); orderType2 = new TextField (35); marketValue2= new TextField(35); calculate= new Button("Start The Simulation"); add (stockPrice1); add (stockPrice2); add (stockName1); add (stockName2); add (marketValue1); ; add(marketValue2); add (orderType1); add (orderType2); add(calculate); ; calculate.addActionListener(this); } public void actionPerformed (ActionEvent e) { String stock= stockPrice2.getText(); int stockPrice= Integer.parseInt(stock); stockPrice2.setText(stockPrice +""); String marketV= marketValue2.getText(); int marketValue= Integer.parseInt(marketV); marketValue2.setText(marketValue+""); String orderT= orderType2.getText(); int orderType= Integer.parseInt(orderT); orderType2.setText(orderType+""); if((e.getSource()==calculate)&& (orderType==1)) { buyOrder2= new TextField(35); buyOrder1 = new Label("Enter Price You Would Like To Buy At"); add(buyOrder2); add(buyOrder1); } else if((e.getSource()==calculate)&& (orderType==2)) { sellOrder2= new TextField(35); sellOrder1 = new Label("Enter Price You Would Like To Sell At"); add(sellOrder2); add(sellOrder1); } else if((e.getSource()==calculate)&& (orderType==3)) { stopLossOrder2= new TextField(35); stopLossOrder1=new Label("Enter The Lowest Price The Stock Can Go"); add(stopLossOrder2); add(stopLossOrder1); } else if((e.getSource()==calculate)&& (orderType==4)) { limitOrder2=new TextField(35); limitOrder1= new Label("Enter the Highest Price The Stock Can Go"); add(limitOrder2); add(limitOrder1);; } } }

    Read the article

< Previous Page | 31 32 33 34 35 36 37 38 39 40 41 42  | Next Page >