Search Results

Search found 1780 results on 72 pages for '400'.

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

  • how can i have a working dropdownlist with links from a csv in php

    - by Mark Dekker
    I have a website that loads a CSV, divides it into parts, and shows these parts. There are 7 parts, and since it is for a music store it is sliced like this: the name of the product the subname the price the stock in one shop the stock of the other shop the group name the brandname What i have now is that it shows 12 products on 1 page, with a next and previous link on top of the page. The pages are made with the group name, every group has it's own page, so you have a drums page, guitar page, speaker page. That all works great. What i programmed in there is a dropdownlist, it drops down a list of brandnames, which should narrow the search for a person who is looking at the products. Problem is right now, that the dropdown menu works, i see the brands, but they are NONE clickable, only the brands that are currently on the page are shown, so NOT all the brands from that group are shown, only the 12 that are currently showing, when you press next, it shows 12 more brands, but i want them to be shown right on the start. And the third problem is, when it is showing the brands, it shows them double or triple, depending on how many products have the same brand. Is there a way what i want, with this code as a basis ? <html> <body bgcolor=#E2E965 link=black vlink=black alink=black text=#D5DF23> <style type="text/css"> #nav, #nav ul { padding: 0; margin: 0; list-style: none; } #nav li { float: left; width: 120px; } #nav ul { position: absolute; width: 120px; left: -1000px; } #nav li:hover ul { left: auto; } <!-- a {text-decoration:none} //--> body { scrollbar-arrow-color: #E2E965; scrollbar-face-color: #D7182A; scrollbar-highlight-color: #000000; scrollbar-3dlight-color: #D6DF23; scrollbar-shadow-color: #00000; scrollbar-darkshadow-color: #00000; scrollbar-track-color: #D6DF23; } input:link {text-decoration: none; color: #E2E965;} input:visited {text-decoration: none; color: #E2E965;} input:active {text-decoration: none; color: #E2E965;} .spacer_black { margin: 0px; padding: 0px; border: 5px; height: 2px; width: 100%; line-height: 0px; font-size: 0px; background-color: #000000;} </style> <table width=800 border=0><td> </html> <?PHP $offset = isset($_GET['offset'])?$_GET['offset']:0; $LinesToDisplay = 12; $row = $offset + $LinesToDisplay; $row2 = $offset - $LinesToDisplay; $file_handle = fopen("web.txt", "rb"); error_reporting( E_ALL ); // DEBUGGING $SelectArray=array(); while ((($parts = fgetcsv($file_handle,4096,"|")) !== FALSE) && ($LinesToDisplay > 0) && (!feof($file_handle))) { //new code //skip first $offset lines $num = count($parts[6]); $SelectArray[]=$parts[6]; if ($parts[5] == 9999) { if ($offset-- > 0) {continue;} $parts[0] = ucwords(strtolower($parts[0])); $parts[1] = ucwords(strtolower($parts[1])); ?> <td> <?php echo "<table BACKGROUND='background.jpg' border=0 width=250><td width='243' height='105'>"; echo "<font size=-1 face='helvetica' color=#812990><b>$parts[0]</b></font>"; echo "<i>"; ?> <html> <div onMouseOver="this.style.color = 'black';" onMouseOut="this.style.color = '#D5DF23';"> </html><?php echo "<font size=2>-$parts[1]</font>"; echo "</div></i>"; ?><html><a href="#" title="Koop nu de <?php echo $parts[0]; ?>" onClick="window.open('form.php?p=<?php echo urlencode($parts[0]); ?>','popuppage','width=400,height=400,top=250,left=250,resizable=0,statusbar=0,titlebar=yes,toolbar=no,scrollbars=no,location=no,directories=no');"> <div><img src='ster.jpg' border=0 width='46' align='right'></a> <a href="#"><img src='envelope.jpg' border=0 width='46' align='right'title="Heeft u een vraag over <?php echo $parts[0]; ?>" onClick="window.open('vraag.php?p=<?php echo urlencode($parts[0]); ?>','popuppage','width=400,height=400,top=250,left=250,resizable=0,statusbar=0,titlebar=yes,toolbar=no,scrollbars=no,location=no,directories=no');"> <div></a> <TABLE BORDER='0' cellpadding='0' CELLSPACING='0'> <TR> <TD WIDTH='70' HEIGHT='20' BACKGROUND='pricebackground.jpg' VALIGN='bottom'> <center> <font size=2 color=white face='helvetica'> <b></html> <?php echo "€ $parts[2]"; ?> </b> </td> </tr> </table> <?php echo "<b><font size=3 color=#D7182A>Op Voorraad In:<br></font>"; echo ("<font color=black> Amsterdam </font>"); if ( $parts[3] >= 1 ) echo ("<IMG SRC =green.gif>").""; if ( $parts[3] <= 0 ) echo ("<IMG SRC =red.gif>").""; echo ("<font color=black> Utrecht </font>"); if ( $parts[4] >= 1 ) echo ("<IMG SRC =green.gif>")."</td></table></b><p style='margin:9px;'>"; if ( $parts[4] <= 0 ) echo ("<IMG SRC =red.gif>")."</td></table></b><p style='margin:9px;'>"; $LinesToDisplay--; if ($LinesToDisplay/3==intval($LinesToDisplay/3)) { echo "<tr><td>"; } }} fclose($file_handle); ?> <tr align=right> <select style="background-color: #FFFFFF; color: #000000; font-family: Arial; font-weight: none; font-size: 12; width: 150px; "> <?php $i=1; foreach ($SelectArray as $val){ echo "<option value=\"$i\">$val</option>\n"; $i++; } ?> </select> <font color=black><body alink=black vlink=black link=black text=black> <center><a href="occasiona.php?offset=<?php echo $row2; ?>" align=center>&laquo; previous</a> || <a href="occasiona.php?offset=<?php echo $row; ?>">next &raquo;</a></table></html>

    Read the article

  • SqlCE DB occasionally freezes on one handheld, not another

    - by Michael
    I have two types of custom handhelds which are similar, but slightly different, each running the same WinForm application and a WinCE database: Type 1: WinCE 4.2, 400 mhz, 93244 kb Type 2: WinCE 5.0, 520 mhz, 84208 kb Type 1 will happily proceed through a large batch db operation (initiated) by the app, by Type 2 will consistently begin c-r-a-w-l-i-n-g (for several to many cycles) at around the 200 cycle mark. As several points it will begin running normally and then crawl again. The app does several db op's (inserts, updates and selects, no deletes). To simplify my situation, I've built a small test app which essentially does this: command_s.CommandText = "select dvr from vr where vid = 2211250"; command_u.CommandText = "update pvr set LocationID=81 where Status='OK' and vri = 27861"; while(going) { command_s.ExecuteScalar(); command_u.ExecuteNonQuery(); } and set it off running on the two units side by side. Sure enough, the slower (400 mhz) unit is outpacing the faster (520 mhz) unit (it's about 5000 cycles ahead right now) and I can see noticable pauses on the 520 mhz unit. What is causing this?

    Read the article

  • Java Code for calculating Leap Year, is this code correct ?

    - by Ibn Saeed
    Hello I am following "The Art and Science of Java" book and it shows how to calculate a leap year. The book uses ACM Java Task Force's library. Here is the code the books uses: import acm.program.*; public class LeapYear extends ConsoleProgram { public void run() { println("This program calculates leap year."); int year = readInt("Enter the year: "); boolean isLeapYear = ((year % 4 == 0) && (year % 100 != 0) || (year % 400 == 0)); if (isLeapYear) { println(year + " is a leap year."); } else println(year + " is not a leap year."); } } Now, this is how I calculated the leap year. import acm.program.*; public class LeapYear extends ConsoleProgram { public void run() { println("This program calculates leap year."); int year = readInt("Enter the year: "); if ((year % 4 == 0) && year % 100 != 0) { println(year + " is a leap year."); } else if ((year % 4 == 0) && (year % 100 == 0) && (year % 400 == 0)) { println(year + " is a leap year."); } else { println(year + " is not a leap year."); } } } Is there anything wrong with my code or should i use the one provided by the book ? EDIT :: Both of the above code works fine, What i want to ask is which code is the best way to calculate the leap year.

    Read the article

  • Debugging Post Request with Chrome Dev Tools

    - by benek
    I am trying to use Chrome Dev for debugging the following Angular post request : $http.post("http://picjboss.puma.lan:8880/fluxpousse/api/flow/createOrUpdateHeader", flowHeader) After running the statement with right-click / evaluate, I can see the post in the network panel with a pending state. How can I get the result or "commit" the request and leave easily this "pending" state from the dev console ? I am not yet very familiar with JS callbacks, some code is expected. Thanks. EDIT I have tried to run from the console : $scope.$apply(function(){$http.post("http://picjboss.puma.lan:8880/fluxpousse/api/flow/createOrUpdateHeader", flowHeader).success(function(data){console.log("error "+data)}).error(function(data){console.log("error "+data)})}) It returns : undefined EDIT The post I am trying to solve generate an HTTP 400. Here is the result : Request URL:http://picjboss.puma.lan:8880/fluxpousse/api/flow/createOrUpdateHeader Request Method:POST Status Code:400 Mauvaise Requ?te Request Headersview source Accept:application/json, text/plain, / Accept-Encoding:gzip,deflate,sdch Accept-Language:fr-FR,fr;q=0.8,en-US;q=0.6,en;q=0.4 Connection:keep-alive Content-Length:5354 Content-Type:application/json;charset=UTF-8 Cookie:JSESSIONID=285AF523EA18C0D7F9D581CDB2286C56 Host:picjboss.puma.lan:8880 Origin:http://picjboss.puma.lan:8880 Referer:http://picjboss.puma.lan:8880/fluxpousse/ User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.101 Safari/537.36 X-Requested-With:XMLHttpRequest Request Payloadview source {refHeader:IDSFP, idEntrepot:619, codeEntreprise:null, codeBanniere:null, codeArticle:7,…} cessionPrice: 78 codeArticle: "7" codeBanniere: null codeDateAppro: null codeDateDelivery: null codeDatePrepa: null codeEntreprise: null codeFournisseur: null codeUtilisateur: null codeUtilisateurLastUpdate: null createDate: null dateAppro: null dateDelivery: null datePrepa: null hasAssortControl: null hasCadenceForce: null idEntrepot: 619 isFreeCost: null labelArticle: "Mayonnaise de DIJON" labelFournisseur: null listDetail: [,…] pcbArticle: 12 pvc: 78 qte: 78 refCommande: "ref" refHeader: "IDSFP" state: "CREATED" stockArticle: 1200 updateDate: null Response Headersview source Connection:close Content-Length:996 Content-Type:text/html;charset=utf-8 Date:Fri, 08 Nov 2013 15:19:30 GMT Server:Apache-Coyote/1.1 X-Powered-By:Servlet 2.5; JBoss-5.0/JBossWeb-2.1

    Read the article

  • Adding label and text box control to GUI

    - by Mike
    I would like to know what code to insert and where to add a simple label that can just say the word "Label" and a input text box that I can enter a number. public CalculateDimensions() { JTabbedPane Tab = new JTabbedPane(); JPanel jplInnerPanel1 = createInnerPanel("First Tab"); Tab.addTab("One", jplInnerPanel1); Tab.setSelectedIndex(0); JPanel jplInnerPanel2 = createInnerPanel("Second Tab"); Tab.addTab("Two", jplInnerPanel2); JPanel jplInnerPanel3 = createInnerPanel("Third Tab"); Tab.addTab("Three", jplInnerPanel3); JPanel jplInnerPanel4 = createInnerPanel("Fourth Tab"); Tab.addTab("Four", jplInnerPanel4); JPanel jplInnerPanel5 = createInnerPanel("Fifth Tab"); Tab.addTab("Five", jplInnerPanel5); setLayout(new GridLayout(1, 1)); add(Tab); } protected JPanel createInnerPanel(String text) { JPanel jplPanel = new JPanel(); JLabel jlbDisplay = new JLabel(text); jlbDisplay.setHorizontalAlignment(JLabel.CENTER); jplPanel.setLayout(new GridLayout(1, 1)); jplPanel.add(jlbDisplay); return jplPanel; } public static void main(String[] args) { JFrame frame = new JFrame("Calculations"); frame.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(0); } }); frame.getContentPane().add(new CalculateDimensions(), BorderLayout.CENTER); frame.setSize(400, 400); frame.setVisible(true); } }

    Read the article

  • Best way to implement game loop without freezing UI thread

    - by Matt H
    I'm trying to make a simple 2D game in Java. So far I have a JFrame, with a menubar, and a class which extends JPanel and overrides it's paint method. Now, I need to get a game loop going, where I will update the position of images and so on. However, I'm stuck at how best to achieve this. Should I use multi-threading, because surely, if you put an infinite loop on the main thread, the UI (and thus my menu bar) will freeze up? Here's my code so far: import java.awt.Color; import java.awt.Graphics; import javax.swing.JPanel; @SuppressWarnings("serial") public class GameCanvas extends JPanel { public void paint(Graphics g) { while (true) { g.setColor(Color.DARK_GRAY); try { Thread.sleep(100); } catch (InterruptedException e) { e.printStackTrace(); } } } } import javax.swing.JFrame; import javax.swing.JMenu; import javax.swing.JMenuBar; import javax.swing.JMenuItem; @SuppressWarnings("serial") public class Main extends JFrame { GameCanvas canvas = new GameCanvas(); final int FRAME_HEIGHT = 400; final int FRAME_WIDTH = 400; public static void main(String args[]) { new Main(); } public Main() { super("Game"); JMenuBar menuBar = new JMenuBar(); JMenu fileMenu = new JMenu("File"); JMenuItem startMenuItem = new JMenuItem("Pause"); menuBar.add(fileMenu); fileMenu.add(startMenuItem); super.add(canvas); super.setVisible(true); super.setSize(FRAME_WIDTH, FRAME_WIDTH); super.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); super.setJMenuBar(menuBar); } } Any pointers/tips? Also, where should I put my loop? In my main class, or my GameCanvas class? Any help is appreciated, thanks.

    Read the article

  • Is this an acceptable use of "ASCII arithmetic"?

    - by jmgant
    I've got a string value of the form 10123X123456 where 10 is the year, 123 is the day number within the year, and the rest is unique system-generated stuff. Under certain circumstances, I need to add 400 to the day number, so that the number above, for example, would become 10523X123456. My first idea was to substring those three characters, convert them to an integer, add 400 to it, convert them back to a string and then call replace on the original string. That works. But then it occurred to me that the only character I actually need to change is the third one, and that the original value would always be 0-3, so there would never be any "carrying" problems. It further occurred to me that the ASCII code points for the numbers are consecutive, so adding the number 4 to the character "0", for example, would result in "4", and so forth. So that's what I ended up doing. My question is, is there any reason that won't always work? I generally avoid "ASCII arithmetic" on the grounds that it's not cross-platform or internationalization friendly. But it seems reasonable to assume that the code points for numbers will always be sequential, i.e., "4" will always be 1 more than "3". Anybody see any problem with this reasoning? Here's the code. string input = "10123X123456"; input[2] += 4; //Output should be 10523X123456

    Read the article

  • How to setPage() a JEditorPane with a localfile which is outside of the .jar file?

    - by Jaguar
    My program has the following path in the .jar file src/test/Program.class and my program is as follow... Program.java package test; import java.io.File; import java.io.IOException; import javax.swing.JEditorPane; import javax.swing.JFrame; public class Program { JEditorPane editorPane; public Program() { File file = new File("temp.htm"); try { file.createNewFile(); editorPane = new JEditorPane(); editorPane.setPage(Program.class.getResource("temp.htm")); } catch (IOException e) { e.printStackTrace(); } } public JEditorPane getEditorPane(){ return editorPane; } public static void main(String[] args) { JFrame frame = new JFrame(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setSize(400, 400); frame.setVisible(true); Program p = new Program(); frame.getContentPane().add(p.getEditorPane()); } } The problem is that I have compiled the program in a .jar file. The file.createNewFile(); creates the temp.htm file outside the .jar file So when editorPane.setPage(Program.class.getResource("temp.htm")); is called the file is not found as it searches for file inside the test package. How to setPage() the temp.htm file whiich is outside the .jar file but in the same folder as the .jar file? As the temp.htm is a localfile and I want a relative path instead of an absolute path. Thanks.

    Read the article

  • Circle to move when mouse clicked Java

    - by Myt
    So I am really new to Java and I need a circle to move around JFrame when it's clicked, but the circle has to get random cordinates. So far this code generates a new circle every time it's clicked, but all the other circles stay there aswell, but I only need one circle to move around the frame. So maybe someone can help me a little :) public class test2 extends JFrame implements MouseListener { int height, width; public test2() { this.setTitle("Click"); this.setSize(400,400); this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); this.setVisible(true); addMouseListener(this); width = getSize().width; height = getSize().height; } public void paint (Graphics g) { setBackground (Color.red); g.setColor(Color.yellow); int a, b; a = -50 + (int)(Math.random()*(width+40)); b = (int)(Math.random()*(height+20)); g.fillOval(a, b, 130, 110); } public void mouseClicked(MouseEvent e) { int a, b; a = -50 + (int)(Math.random()*(width+40)); b = (int)(Math.random()*(height+20)); repaint(); } public void mouseReleased(MouseEvent e){} public void mouseEntered(MouseEvent e){} public void mouseExited(MouseEvent e){} public void mousePressed(MouseEvent e){} public static void main(String arg[]){ new test2(); } }

    Read the article

  • FLEX, how to specify parent html item, when I call external functions ?

    - by Patrick
    hi, I'm calling a javascript function from my flex application to set width and height of my html wrapper according to application size. However, I've many flex applications on my page and the wrappers have not id attribute. I'm using a unique javascript function and passing it the parameters. How could I specify the "parent" html element in these parameters ? Following is the code: Actionscript: if (ExternalInterface.available) ExternalInterface.call("changeSize",id, width, height); Javascript: <script type="text/JavaScript"> function changeSize(id, width, height) { console.log(id); console.log(width); console.log(height); } Wrapper: <div class="filefield-file clear-block"> <div class="filefield-icon field-icon-video-x-flv"> <img class="field-icon-video-x-flv" alt="video/x-flv icon" src="http://localhost/drupal/sites/all/modules/filefield/icons/protocons/16x16/mimetypes/video-x-generic.png"></div> <div style="background-color: rgb(255, 255, 255); width: 400px;"> <embed style="display: block;" src="/drupal/videoPlayer.swf?file=http://localhost/drupal/sites/default/files/files/projects/Project3/videos/9565274.flv" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" bgcolor="#ffffff" allowfullscreen="true" autoplay="true" flashvars="file=http://localhost/drupal/sites/default/files/files/projects/Project3/videos/9565274.flv" height="400" width="400"> <div>Scheduling Video</div> </div> </div>

    Read the article

  • How to make BoxLayout vertical but children flow top-aligned?

    - by user291701
    I'm trying to get get a vertical, top-aligned layout to work. This is what I have: JPanel pane = new JPanel(); pane.setLayout(new BoxLayout(pane, BoxLayout.Y_AXIS)); MyImagePanel panelImage = new MyImagePanel(); panelImage.setSize(400, 400); pane.add(new JComboBox()); pane.add(panelImage); pane.add(new JButton("1")); pane.add(new JButton("2")); pane.add(new JButton("3")); JFrame frame = new JFrame("Title"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setSize(800, 600); frame.add(pane); frame.pack(); frame.setVisible(true); All the controls appear, but it looks like padding is being applied at run time between their tops and bottoms so they're somewhat vertically centered. This is what I'm going for: ----------------------------------------------------- | ComboBox | | ------------ | | | | | Image | | | | | ------------ | | Button 1 | Any additional space fills the right | ------------ | | Button 2 | | ------------ | | Button 3 | | ------------ | | | | Any additional space fills the bottom | | | ----------------------------------------------------- How do I get BoxLayout to do that? Thanks ------------------------- Update ------------------------- Was able to use this: Box vertical = Box.createVerticalBox(); frame.add(vertical, BorderLayout.NORTH); vertical.add(new JComboBox()); vertical.add(new JButton("1")); ... to get what I wanted.

    Read the article

  • Absolute Centering Not Working in IE

    - by Vikas Ghodke
    I have a div which is centered in parent div, it working on all browser but not in ie, can you help me out with this. JSFIDDLE span.qbg3 { display: block; text-align: center; background: url(http://powerblanket.com/may2014/wp-content/uploads/2014/05/qbg3.png) no-repeat center center; background-size:cover; padding: 50px 20px; color: #fff; font-weight: 400; font-size: 30px; position: relative; margin-top: -20px; min-height: 350px; } span.inqbg3 { max-height: 100px; display: block; text-align: center; color: #fff; font-weight: 400; font-size: 40px; position: absolute; margin: auto; top: 0px; right: 0; left: 0; bottom: 0px; background: rgba(0, 0, 0, 0.5); max-width: 700px; padding: 35px 0; } span.inqbg3 a { color: #fff; }

    Read the article

  • Include php code within echo from a random text

    - by lisa
    I want to display a php code at random and so for I have <?php // load the file that contain thecode $adfile = "code.txt"; $ads = array(); // one line per code $fh = fopen($adfile, "r"); while(!feof($fh)) { $line = fgets($fh, 10240); $line = trim($line); if($line != "") { $ads[] = $line; } } // randomly pick an code $num = count($ads); $idx = rand(0, $num-1); echo $ads[$idx]; ?> The code.txt has lines like <?php print insert_proplayer( array( "width" => "600", "height" => "400" ), "http://www.youtube.com/watch?v=xnPCpCVepCg"); ?> Proplayer is a wordpress plugin that displays a video. The codes in code.txt work well, but not when I use the pick line from code.txt. Instead of the full php line I get: "width" => "600", "height" => "400" ), "http://www.youtube.com/watch?v=xnPCpCVepCg"); ?> How can I make the echo show the php code, rather than a txt version of the php code?

    Read the article

  • jQuery logic firing twice from a Usercontrol when used in a jQueryUI modal dialog

    - by AaronS
    I have an asp.net usercontrol that I'm using to put a bunch of HTML and Jquery logic into to be shared on several pages. This usercontrol has some dropdown boxes loaded from json calls and has no added codebehind logic. When I use this usercontrol on a normal page it works perfectly fine, and no issues at all. However, when I wrap the usercontrol in a div, and use a jqueryUI modal dialog, everything in the usercontrol fires twice. Not only code in the initial $(document).ready(function() {});, but also every function is also fired twice when called. Debugging this in Visual Studio, I see that everything is first being called from the external JS file, and then again from a "script block" file that is somehow getting generated on the fly. This script block file isn't getting generated on a page that doesn't wrap the user control in a modal. The same happens if I use IISExpress or IIS7. The question is, why is this script block file getting created, and why is all my jQuery logic firing twice? --edit-- Here is the div: <div id="divMyDiv" title="MyDiv"> <uc1:MyUserControl runat="server" ID="MyUsercontrol" /> </div> Here is the modal logic that uses it: $("#divMyDiv").dialog({ autoOpen: false, height: 400, width: 400, modal: true, open: function (type, data) { $(this).parent().appendTo("form"); } }); Note: The problm still occurs, even if I remove the "open:" function. But, it does not occur if I remove the entire dialog block, so it is specific to this dialog call.

    Read the article

  • Java applet wont run

    - by Courtney
    I am trying to get a Java applet to run properly when linked to an HTML page in Dreamweaver CC. I'm new to all this so please bear with me here. First I saved this code to a .java file //Triangle.java import java.awt.*; import java.applet.Applet; public class Triangle extends Applet { public void paint (Graphics g){ int bottomX=80; int bottomY=200; int base=100; int height=100; g.drawLine(bottomX,bottomY,bottomX+base,bottomY); g.drawLine(bottomX+base,bottomY,bottomX+base/2,bottomY-height); g.drawLine(bottomX+base/2,bottomY-height, bottomX,bottomY); } } I then compiled it entering javac Triangle.java After that, I inserted it into a Dreamwever page using: <html> <applet code=Triangle.class width=400 height=400 > </applet> </html> Now when I try and open the page in Chrome I get an error reading: UnsupportedClassVersionError Triangle: Unsupported major.minor version 52.0 This, as I have read, is an issue with using two incompatible Java versions? In my Java Control Panel it says I am using version 1.8.0_20 and my JDK is jdk1.8.0_20. Does anyone see anything super obvious that I am doing wrong here?

    Read the article

  • actionscript 3 website load movieclips (frames) from library

    - by steve
    Here is my current code that doesn't function: import flash.display.*; import fl.transitions.*; import flash.events.MouseEvent; stop(); var contentBox:MovieClip = new MovieClip(); contentBox.width = 400; contentBox.height = 500; contentBox.x = 400; contentBox.y = 0; var closeBtn:close_btn = new close_btn(); closeBtn.x = 850; closeBtn.y = 15; var bagLink:MovieClip = new bag_link_mc(); bagLink.x = 900; bagLink.y = 0; menu_bag_button.addEventListener(MouseEvent.CLICK, bagClick); function bagClick(event:MouseEvent):void{ if(MovieClip(root).currentFrame == 835) { } else { MovieClip(root).addChild (contentBox); MovieClip(root).contentBox.addChild (bagLink); MovieClip(root).contentBox.addChild (closeBtn); MovieClip(root).gotoAndPlay(806); } } closeBtn.addEventListener(MouseEvent.CLICK, closeBag); function closeBag (event:MouseEvent):void{ MovieClip(root).removeChild(contentBox); MovieClip(root).gotoAndPlay(850); } I don't know ActionScript at all, so this may be the complete wrong way of approaching it. The setup is as follows: site loads, there's a big menu in the center (frame 805). When you click on a menu item from there, the whole menu moves to the side, and the right side I want a "contentBox" movieclip, filled with "bagLink" (which is site content) and to have a close button (closeBtn.) It also needs to know that if you click the same link again on the left side that it doesn't reanimate, it just stays (which I achieved with the "if" statement.) Finally, if someone clicks another link, it needs to clear "contentBox" and refill it with whatever movieClip that was clicked. I know this is a lot to ask, but I'm in dire need of help as this is due on Wednesday...

    Read the article

  • Fastest way to read/store lots of multidimensional data? (Java)

    - by RemiX
    I have three questions about three nested loops: for (int x=0; x<400; x++) { for (int y=0; y<300; y++) { for (int z=0; z<400; z++) { // compute and store value } } } And I need to store all computed values. My standard approach would be to use a 3D-array: values[x][y][z] = 1; // test value but this turns out to be slow: it takes 192 ms to complete this loop, where a single int-assignment int value = 1; // test value takes only 66 ms. 1) Why is an array so relatively slow? 2) And why does it get even slower when I put this in the inner loop: values[z][y][x] = 1; // (notice x and z switched) This takes more than 4 seconds! 3) Most importantly: Can I use a data structure that is as quick as the assignment of a single integer, but can store as much data as the 3D-array?

    Read the article

  • could not bind socket while haproxy restart

    - by shreyas
    I m restarting HAproxy by following command haproxy -f /etc/haproxy/haproxy.cfg -p /var/run/haproxy.pid -sf $(cat /var/run/haproxy.pid) but i get following message [ALERT] 183/225022 (9278) : Starting proxy appli1-rewrite: cannot bind socket [ALERT] 183/225022 (9278) : Starting proxy appli2-insert: cannot bind socket [ALERT] 183/225022 (9278) : Starting proxy appli3-relais: cannot bind socket [ALERT] 183/225022 (9278) : Starting proxy appli4-backup: cannot bind socket [ALERT] 183/225022 (9278) : Starting proxy ssl-relay: cannot bind socket [ALERT] 183/225022 (9278) : Starting proxy appli5-backup: cannot bind socket my haproxy.cfg file looks likefollowing global log 127.0.0.1 local0 log 127.0.0.1 local1 notice #log loghost local0 info maxconn 4096 #chroot /usr/share/haproxy user haproxy group haproxy daemon #debug #quiet defaults log global mode http option httplog option dontlognull retries 3 option redispatch maxconn 2000 contimeout 5000 clitimeout 50000 srvtimeout 50000 listen appli1-rewrite 0.0.0.0:10001 cookie SERVERID rewrite balance roundrobin server app1_1 192.168.34.23:8080 cookie app1inst1 check inter 2000 rise 2 fall 5 server app1_2 192.168.34.32:8080 cookie app1inst2 check inter 2000 rise 2 fall 5 server app1_3 192.168.34.27:8080 cookie app1inst3 check inter 2000 rise 2 fall 5 server app1_4 192.168.34.42:8080 cookie app1inst4 check inter 2000 rise 2 fall 5 listen appli2-insert 0.0.0.0:10002 option httpchk balance roundrobin cookie SERVERID insert indirect nocache server inst1 192.168.114.56:80 cookie server01 check inter 2000 fall 3 server inst2 192.168.114.56:81 cookie server02 check inter 2000 fall 3 capture cookie vgnvisitor= len 32 option httpclose # disable keep-alive rspidel ^Set-cookie:\ IP= # do not let this cookie tell our internal IP address listen appli3-relais 0.0.0.0:10003 dispatch 192.168.135.17:80 listen appli4-backup 0.0.0.0:10004 option httpchk /index.html option persist balance roundrobin server inst1 192.168.114.56:80 check inter 2000 fall 3 server inst2 192.168.114.56:81 check inter 2000 fall 3 backup listen ssl-relay 0.0.0.0:8443 option ssl-hello-chk balance source server inst1 192.168.110.56:443 check inter 2000 fall 3 server inst2 192.168.110.57:443 check inter 2000 fall 3 server back1 192.168.120.58:443 backup listen appli5-backup 0.0.0.0:10005 option httpchk * balance roundrobin cookie SERVERID insert indirect nocache server inst1 192.168.114.56:80 cookie server01 check inter 2000 fall 3 server inst2 192.168.114.56:81 cookie server02 check inter 2000 fall 3 server inst3 192.168.114.57:80 backup check inter 2000 fall 3 capture cookie ASPSESSION len 32 srvtimeout 20000 option httpclose # disable keep-alive option checkcache # block response if set-cookie & cacheable rspidel ^Set-cookie:\ IP= # do not let this cookie tell our internal IP address #errorloc 502 http://192.168.114.58/error502.html #errorfile 503 /etc/haproxy/errors/503.http errorfile 400 /etc/haproxy/errors/400.http errorfile 403 /etc/haproxy/errors/403.http errorfile 408 /etc/haproxy/errors/408.http errorfile 500 /etc/haproxy/errors/500.http errorfile 502 /etc/haproxy/errors/502.http errorfile 503 /etc/haproxy/errors/503.http errorfile 504 /etc/haproxy/errors/504.http what is wrong with my aproach

    Read the article

  • Fastest SFTP client

    - by Stan
    Protocol: SFTP (port 22) I've tested CuteFtp, FileZilla, SecureCRT and several others. Looks like CuteFTP has the best throughput, usually 200%-400% than others. I've read something about SecureFtp may have slower rate from here. Can anyone explain why CuteFtp has better throughput? And, is there any other FTP client even faster than CuteFtp? Thanks a lot!

    Read the article

  • implementation of you tube api using Gdata objective-c client

    - by Samrudh
    Currently,I am developing an app in which i implement You Tube API for uploading videos to you tube from app. I implement API using Gdata objective-c client example youtubetest.xcodeproj. but when i upload video i am getting following error: Error Domain=com.goggle.GdataServiceeDomain code=400 "The Operation couldn't" completed.(GData error invalidRequestUri:"invalid request URL")" I try to solve this issue but can't succeeded.How can i solve this? Thanks in advance.

    Read the article

  • Socket error sendig data from loftware to zebra zm400

    - by Mike
    I have a problem with my Zebra zm 400. I print a label from loftware, and in random times comes the label not out from the printer. When this issue comes, then I can't ping my printer or I can't achive the webpage of the printer. Only I need to disconnect the UTP cable from te Zebra. and after this disconnect work the printer fine. And in variale intervals come this problem again! Thanks and regards, Mike

    Read the article

  • Win XP error 0x80041003 using GetObject/winmgmts

    - by John Lewis
    My computer is called "neil" and I want to set some values using WMI in vbScript. I adapetd the script below from one supplied by Microsoft. When I run it in my browser I get Error Type: (0x80041003) /dressage/30/pdf2.asp, line 8 I suspect it is some registry/security setting. Any advice? John Lewis FULL SCRIPT call Print_HTML_Page("http://neil/dressage/ascii.asp", "ascii") Sub SetPDFFile(strPDFFile) Const HKEY_LOCAL_MACHINE = &H80000002 strKeyPath = "SOFTWARE\Dane Prairie Systems\Win2PDF" strComputer = "." Set objReg=GetObject( _ "winmgmts:{impersonationLevel=impersonate}!\\" & _ strComputer & "\root\default:StdRegProv") strValueName = "PDFFileName" objReg.SetExpandedStringValue HKEY_LOCAL_MACHINE,_ strKeyPath,strValueName,strPDFFile End Sub Sub Print_HTML_Page(strPathToPage, strPDFFile) SetPDFFile( strPDFFile ) Set objIE = CreateObject("InternetExplorer.Application") 'From http://www.tek-tips.com/viewthread.cfm?qid=1092473&page=5 On Error Resume Next strPrintStatus = objIE.QueryStatusWB(6) If Err.Number 0 Then MsgBox "Cannot find a printer. Operation aborted." objIE.Quit Set objIE = Nothing Exit Sub End If With objIE .visible=0 .left=200 .top=200 .height=400 .width=400 .menubar=0 .toolbar=1 .statusBar=0 .navigate strPathToPage End With 'Wait until IE has finished loading Do while objIE.busy WScript.Sleep 100 Loop On Error Goto 0 objIE.ExecWB 6,2 'Wait until IE has finished printing WScript.Sleep 2000 objIE.Quit Set objIE = Nothing End Sub Update: Thanks for your reply. The line breaks seem to have been introduced in the process of paasting into this form. Well spotted - I was using a PDF file name "ascii". I added a .pdf extension but still get the error. I suspect you're right that it's to do with admin rights. Here's more about the setup and what I'm trying to achieve. Win2pdf is a product for writing PDFs by works by simulating a Windows printer. You "print" the page, select win2pdf in the print dialog and it then asks for a file name. I have it installed on my pc (called Neil) and it works fine in this conventional way. My aim is to write an html page to a PDF file using win2pdf - but via ASP/vbscript/javascript rather than with manual intervention. The script for doing this was provided by win2PDF's tech support but when it did not work, that was the limit of their understanding. In the sample script the file ascii.asp just produces a table of ascii codes/characters. The URL given is on my own PC which has IIS set up to run scripts which it does fine. The error I get occurs on about the fourth line executed. I am logged in with full admin rights - I think! But I'm no expert. I hope this helps to give some more specific suggestions about how to check/fix the admin rights.

    Read the article

  • Weird Excel bar diagram behaviour

    - by Simon
    Hi I have a very simple question. I wanna have a diagram with the following table Apple 30 40 50 Pears 200 300 400 Bananas 10 20 30 The weird thing, when I try to draw a bar diagram the order of the bars change. So Excel draws me first the Bananas, the the pears and finally the apple bar... Is there anyway to tell Excel 2003 that it keeps the order? Thank you very much

    Read the article

  • Weird Excel bar diagram behaviour

    - by Simon
    I have a very simple question. I want to have a diagram with the following table: Apple 30 40 50 Pears 200 300 400 Bananas 10 20 30 The weird thing is, when I try to draw a bar diagram the order of the bars changes. So Excel first draws the bananas, then the pears, and finally the apple bar... Is there anyway to tell Excel 2003 to keep the original order? Thank you very much

    Read the article

  • Apache consuming large memory with Apache Mobile Filter

    - by VarunGupta
    I installed and configured Apache Mobile Filter module for Apache to redirect users to mobile version of our website, depending on their user agents. I configured the module to use WURFL. But as soon as I start Apache it hogs a large amount of memory (without any in-coming web requests): Resident Memory: 300 to 400 MB Virtual Memory: 300 to 650 MB Without this module, Apache was consuming much lesser memory (4 to 10 MB). What could be the reason here?

    Read the article

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