Daily Archives

Articles indexed Wednesday April 14 2010

Page 18/122 | < Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >

  • Images in Applet not showing in web page

    - by Leanne C
    I am trying to display a JPEG image and a moving dot on a Java applet which I am using on a web based application. However, when I run the applet it works fine, but when I display the applet from the JSP page, I get the moving dot but not the JPEG image. Is there a specific folder where the JPEG needs to be? These are the 2 methods i use for drawing the picture and the moving dot on the screen. public class mapplet extends Applet implements Runnable { int x_pos = 10; int y_pos = 100; int radius = 20; Image img, img2; Graphics gr; URL base; MediaTracker m; @Override public void init() { mt = new MediaTracker(this); try { //getDocumentbase gets the applet path. base = getCodeBase(); img = getImage(base, "picture.jpg"); m.addImage(img, 1); m.waitForAll(); } catch (InterruptedException ex) { Logger.getLogger(movement.class.getName()).log(Level.SEVERE, null, ex); } public void paint (Graphics g) { g.drawImage(img, 0, 0, this); // set color g.setColor (Color.red); // paint a filled colored circle g.fillOval (x_pos - radius, y_pos - radius, 2 * radius, 2 * radius); } The code one below is the call from the jsp page <applet archive="mapplet.jar" code="myapplets/mapplet.class" width=350 height=200> </applet> The jar file and the picture are in the same folder as the jsp page, and there is also a folder containing the contents of the class and image of the applet in the web section of the application. The applet loads fine however the picture doesn't display. I think it's not the code but the location of the picture that is causing a problem. Thanks

    Read the article

  • WF4 &ndash; It has suddenly got interesting

    - by MarkPearl
    I was at Teched two years ago when one of the Microsoft leads said there were three new area’s that we needed to pay attention to for development, namely: WPF WCF WF At the time I was just getting back into development work and had a look at WPF and immediately was sold on the approach. While I haven’t been to involved with WCF directly, I know that some of the guys in my dev team have been and that it too was a success. So what happened to WF? It seemed clunky, and all the demo’s that I saw of it left me scratching my head wondering how if it was going to be useful. Fast forward two years later and while I have had a brief look at WF4, I can immediately see areas where we can use the technology. Does that mean that I think WF4 is the bees knees? I don’t know enough about it yet to really have a solid opinion, but I do think that it is finally going in the right direction. A good introduction to WF4 can be found here.

    Read the article

  • How Windows Azure Works

    This article is taken from the book Azure in Action. The authors provide the history and current state of data centers, followed by a discussion of how Azure is architected and how Microsoft runs the cloud operating system.

    Read the article

  • ubuntu: mumble 1.2.2 in Karmic

    - by Dan
    Karmic only has mumble 1.1.8, but if I want to connect to a 1.2 server I need to upgrade... So I would like to know how I can upgrade to mumble 1.2.2 without messing myself up for later when I upgrade to 10.04 and beyond... I just want a smooth transition into the next versions of mumble. Is there anyway to upgrade to this newer version and either keep it in the package manager or make it not interfere with the natural upgrades the program will later recieve from the package manager? Thanks, Dan

    Read the article

  • What we call this kind of chaining in C#

    - by Thinking
    Can you please tell me what kind of construct in C# is this. Code Golf: Numeric equivalent of an Excel column name C.WriteLine(C.ReadLine() .Reverse() .Select((c, i) => (c - 64) * System.Math.Pow(26, i)) .Sum()); Though I am new to C# (only two months exp so far), but since the time I have joined a C# team, I have never seen this kind of chaining. It really attracted me and I want to learn more about it. Please give some insight about this.

    Read the article

  • What is an algorithm for minimizing some D distances between N items?

    - by Ross
    A classmate printed out a diagram of a database for class, the kind with lines representing relationships between tables. However, his lines crossed all over the place and it looked ugly. So I got to thinking about a way to move the tables to minimize the total line distance, and I couldn't think of a way to do it, other than just moving them all on top of each other. So basically: Given N items on some 2d coordinate space and some amount of connections between pairs of those items, how do you move the items so that the total distance between pairs is minimal, but that no distance is smaller than S? (so that the tables would not be too close together) Is there some algorithm for this? (I realize that smallest total distance won't necessarily make the layout less ugly; lines might still cross. But the table layout is just what got me thinking)

    Read the article

  • jQuery UI resizable : auto height when using east handle alone

    - by z33m
    i have a jqueryui re-sizable div. I want only the width to be re-sizable and the height to remain auto, so that the div grows or shrinks with the content. If i set it to display only the east handle and use css height:auto, after resize the height also gets set even though only the width changed. I have to set the height to auto on resize event everytime like so: resize: function(event, ui) { $(this).css('height', 'auto'); } to prevent the height from being set. Is there a better way to prevent the height from getting set when only the east handle is used?

    Read the article

  • Software tools for allowing end users to reprogram interfaces

    - by iceman
    What would be the examples of commercial software products (specially web-services) which allow the end user to reprogram their user-interface? I mean end users who do not know programming and they are allowed to add more functionality. One way of doing it is allowing XML gadgets like iGoogle does. What are the other approaches and also the technologies enabling them? This would be a futuristic application like collaborative software development for users.

    Read the article

  • Placement of a call to the parent method

    - by Alejandro
    I have a class that has a method. That class has a child class that overrides that method. The child's method has to call the parent's method. In all OO that I've seen or written calls to the parent's version of the same method were on the first line of the method. On a project that I am working on circumstances call for placing that method call at the end of a method. Should I be worried? Is that a code smell? Is this code inherently bad? class Parent { function work() { // stuff } } class Child { function work() { // do thing 1 // do thing 2 parent::work(); // is this a bad practice? // should I call the parent's work() method before // I do anything in this method? } }

    Read the article

  • Add a usercontrol as the value of a html attribute

    - by dmadden
    I am working in a CMS where we use tokens ( which is turned into a user control. Is there a way to add the user control into an attribute value for our template style? example : <div class="<$tokenName/$>" / this currently outputs an encoded user control, which is then not parsed by IIS.

    Read the article

  • Using Progressbar in c# windows application

    - by karthik
    The user will be able to search for some document in the local machine and i want to show user, a progress bar during my program searches. To be more clear, i have foreach loop for which i want to tie up my progress bar to show the progress. my foreach loop and progress should work simultaneously. Is this possible to do ?

    Read the article

  • packaging and distributing Python code as executables

    - by user248237
    How can I compile my python module into an executable, and distribute it in a way that doesn't require the user to download all the external Python packages that the module I wrote uses? Aside from that, is there a general guy on packaging and distributing python code? i.e. going from a script/module to someone that's user-friendly and can be run, ideally cross-platform (at least between unix and mac). thanks.

    Read the article

  • Play Sound while UIImageView animating crashes the app?

    - by Rahul Vyas
    Hello all, I am having a strange problem in my app. I am creating a app in which i have 9 buttons on the view i want to play sound and animation same time. I am using UIImageview for this but i am having starnge behaviour sometimes sound play early and then animation runs.So how do i play them at same time? I am also having crash on device on a specific animation in which i have 60 jpg files. So what's the best way to do this?

    Read the article

  • is there any IIS setting require for url rewriting?

    - by Samir
    Hello, i have used URL rewriting using global.asax file. url rewriting is working file on local machine but when i made it online its not working. void Application_BeginRequest(Object sender, EventArgs e) { var extension = Path.GetExtension(Request.PhysicalPath).ToLower(); if (File.Exists(Request.PhysicalPath)) { if (extension == ".html") { Response.WriteFile(Request.PhysicalPath); Response.End(); } return; } var path = Request.Path; if (!Context.Items.Contains("ORIGINAL_REQUEST")) Context.Items.Add("ORIGINAL_REQUEST", path); if (extension == ".html") { var resource = UrlRewriting.FindRequestedResource(); var command = UrlRewriting.GetExecutionPath(resource); Context.RewritePath(command, true); } } url is:ind205.cfmdeveloper.com when you click on about us ,demo,advertise page it will not display. so please let me know is there any IIS setting require, reply me soon thanks Samir

    Read the article

  • looking for a license key algorithm.

    - by giulio
    There are a lot of questions relating to license keys asked on stackoverflow. But they don't answer this question. Can anyone provide a simple license key algorithm that is technology independent and doesn't required a diploma in mathematics to understand ? The license key algorithm is similar to public key encryption. I just need something simple that can be implemented in any platform .Net/Java and uses simple data like characters. Preferably no byte translations required. So if a person presents a string, a complementary string can be generated that is the authorisation code. Below is a common scenario that it would be used for. Customer downloads s/w which generates a unique key upon initial startup/installation. S/w runs during trial period. At end of trial period an authorisation key is required. Customer goes to designated web-site, enters their code and get authorisation code to enable s/w, after paying :) Don't be afraid to describe your answer as though you're talking to a 5 yr old as I am not a mathemtician. Just need a decent basic algorithm, we're not launching nukes... NB: Please no philosophy on encryption nor who is Diffie-Hellman. I just need a basic solution.

    Read the article

  • Cross-platform file system

    - by Console
    I would like my external drives to be readable and writable from Linux, Mac OS X and Windows. FAT32 works, but the 4 GB file size limit is a showstopper these days. Are there any alternatives?

    Read the article

  • Setting Return-Path Header Other than Sender Address using SMTP command.

    - by Matt
    Greetings all. I'm faced with an issue with basic SMTP.. I would like to set the return-path header to an address other than the Sender address (i.e. From: Header) using SMTP command. I know MAIL -F sets it. However, I issued the following sequence of commands into my mail daemon (TELNET rlogin) and got the SMTP error 503 - Bad Command Sequence TELNET HELO: MAIL FROM : MAIL -F: RCPT TO: Subject: Test Bounce test mail for bounce functinlaity quit Can anyone of you please suggest me a possible way out of this? I will be grateful. Cheers, Matt.

    Read the article

  • What is this kind of chaining in C# called?

    - by Thinking
    Can you please tell me what kind of construct in C# is this. Code Golf: Numeric equivalent of an Excel column name C.WriteLine(C.ReadLine() .Reverse() .Select((c, i) => (c - 64) * System.Math.Pow(26, i)) .Sum()); Though I am new to C# (only two months exp so far), but since the time I have joined a C# team, I have never seen this kind of chaining. It really attracted me and I want to learn more about it. Please give some insight about this.

    Read the article

< Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >