Search the Community

Showing results for tags 'java'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Calendars

  • Community Calendar

Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 44 results

  1. Hi everyone, this is my second thread, I hope you can help me why do and while won't do loop as I put them in... public class GameGuess extends Thread { int a; public void Send(int a) { this.a = a; } do { int p1 = (int) ((Math.random() + 5) * 10); int p2 = (int) ((Math.random() + 5) * 10); System.out.print("Player 1: " + p1); System.out.print("Player 2: " + p2); if (p1 != a) { System.out.print("Player 1 get wrong guess."); } else if (p1 == a) { System.out.print("The Player 1 wins!"); } else if (p2 != a) { System.out.print("Player 2 get wrong guess"); } else if (p2 == a) { System.out.print("The Player 2 wins!"); } } while (p1 != a || p2 != a);
  2. Hi everyone, I am beginner ti learn Java, I am trying to stop the repeat number in array, but it won't work. Anyone who have idea? it will be appericate...here my code to create random number that between 50 to 60, then put in 10 array, but few number are repeated... int [] myArray = {0,1,2,3,4,5,6,7,8,9}; int pop = 0; for (int i = 0; i < myArray.length; i++0 { pop = (int) ((Math.random() + 5) *10); for (int j = 0; j < myArray.length; j++) { if (pop != MyArray[j]) { myArray[j] = pop; }
  3. hi , im try to do the java web to connect with managed bean and connect to the javaDB (entity) class i trying to insert the record in the database but ....fail.... public void createUser(){ Booking book = new Booking(); book.setLessonno(this.l_id); book.setCustomername(strName); book.setCustomerphone(strPhone); try { utx.begin(); em.persist(book); utx.commit(); } catch (Exception e) { throw new RuntimeException(e); } } this come out a error .... java.lang.UnsupportedOperationException: Not supported yet. public void updateDB(){ EntityManagerFactory emfactory = Persistence.createEntityManagerFactory("testTrainingPU"); EntityManager entitymanager = emfactory.createEntityManager(); entitymanager.getTransaction().begin(); Lesson lesson = entitymanager.find(Lesson.class, this.l_id); lesson.setQuantity(lesson.getQuantity()-1); entitymanager.getTransaction().commit(); Booking book = new Booking(); book.setCustomername(strName); book.setCustomerphone(strPhone); book.setLessonno(this.l_id); entitymanager.persist(book); entitymanager.getTransaction().commit(); entitymanager.close(); emfactory.close(); } this way also same so how i need to solve it ...thanks
  4. Hi everyone, I am trying to find source or tutorial how to create the random. I will like to learn how to create the random in poker card, but i need to make sure it must show the display that card is used. For example, I click on back of card to draw card, then show number or royal on card, then click it, moved to left-top or right-top to keep tracking those random poker card...do you have any idea? those card can't be repeated. Thank you so much
  5. http://craft.minestatus.co MineStatus - Minecraft Servers MineStatus is a brand new modern minecraft server list. Personal Server Analytics Votifier Voting Sharing Profiles Comments Blogs I have recently created my second site. Tell me what you think.
  6. function changeBtn(btn) { if (! btn.style) { alert("Big no for you and dont ask y, just cant do it D:"); return; } btn.style.background = "#00FF00"; btn.style.color = "black"; return; } <input type="button" id="btn1" value="glowwwww!!!" onclick="changeBtn(this)"></td> so i found this code on the internet, and it is very useful... sadly.... every time i refresh the page the button will go back to default color... how can i make it stay green even tho i refresh the page??? thankyou
  7. Hello friends, im using following code to insert data in database using dynamic text box. its work excellent but now i want to submit data in database without refresh page.kindly advise what and where i change my code.plz help. thanks in advance output.php<?phpinclude('connection.php');include('links.php'); if(isset($_POST['save'])){ $conn = mysql_connect("localhost","root","");mysql_select_db("esol",$conn); $itemCount = count($_POST["item_name"]);$itemValues=0; $query = "INSERT INTO invoice (name,description,quantity) VALUES ";$queryValue = "";for($i=0;$i<$itemCount;$i++) { if(!empty($_POST["item_name"][$i]) || !empty($_POST["item_price"][$i]) || !empty($_POST["quantity"][$i])) { $itemValues++; if($queryValue!="") { $queryValue .= ","; } $queryValue .= "('" . $_POST["item_name"][$i] . "', '" . $_POST["item_price"][$i] . "', '" . $_POST["quantity"][$i] . "')"; }}$sql = $query.$queryValue;if($itemValues!=0) { $result = mysql_query($sql); if(!empty($result)) $message = "Added Successfully."; } }?> <FORM name="frmProduct" method="post" action=""> <input type="button" name="add_item" value="Add More" onClick="addMore();" /> <input type="button" name="del_item" value="Delete" onClick="deleteRow();" /> <input type="submit" id="save" name="save" value="Save" /> </form> <SCRIPT src="http://code.jquery.com/jquery-2.1.1.js"></SCRIPT><script> function addMore() { $("").load("input.php", function() { $("#product").append($(this).html()); }); } function deleteRow() { $('DIV.product-item').each(function(index, item){ jQuery(':checkbox', this).each(function () { if ($(this).is(':checked')) { $(item).remove(); } }); }); }</script> INPUT.PHP<DIV class="product-item float-clear" style="clear:both;"> <input type="checkbox" name="item_index[]" /> <input type="text" name="item_name[]" /> <input type="text" name="item_price[]" /> <input type="text" name="quantity[]" />>
  8. Hi, I have a details screen where visitors to the website can leave their contact info. I have some javascript rules to validate some of the fields when the visitor is filling them out so they cannot leave certain fields empty. I have an email field where aswell as stopping the visitor leaving the field blank i want a validation check so it looks for the presence of "@" and a "." within the field. But I am having trouble getting this implemented. Currently my code for the blank checks looks like this (with the email field in the last block) :- </script><script language="javascript" type="text/javascript">function validate_form ( ){valid = true; if (document.networkOpportunity.contactName.value == "") { alert ( "Please enter the name of the contact for the opportunity." ); document.networkOpportunity.contactName.focus(); document.networkOpportunity.contactName.style.backgroundColor = "#d7edf8"; valid = false; } else if (document.networkOpportunity.companyName.value == "") { alert ( "Please enter the company name that the opportunity is for." ); document.networkOpportunity.contactName.style.backgroundColor = "#FFFFFF"; document.networkOpportunity.companyName.focus(); document.networkOpportunity.companyName.style.backgroundColor = "#d7edf8"; valid = false; } else if (document.networkOpportunity.serviceRequired.value == "") { alert ( "Please enter the details of the service you require." ); document.networkOpportunity.companyName.style.backgroundColor = "#FFFFFF"; document.networkOpportunity.serviceRequired.focus(); document.networkOpportunity.serviceRequired.style.backgroundColor = "#d7edf8"; valid = false; } else if (document.networkOpportunity.contactEmail.value == "") { alert ( "Please enter the email we can contact you on." ); document.networkOpportunity.serviceRequired.style.backgroundColor = "#FFFFFF"; document.networkOpportunity.contactEmail.focus(); document.networkOpportunity.contactEmail.style.backgroundColor = "#d7edf8"; valid = false; } Any help with how to add the extra validation on the contactEmail field to look for "@" and "." will be greatly appreciated.
  9. I have modified this script to include a call-to-action button when a video ends. What I'm trying to do is get the button to work on mouse rollover and click. The button works and comes up after the video ends but I can't seem to place the attributes in a logical place to get them to work. It's a little advanced for me so I'm hoping that someone can do this and explain what they did so I can learn. I've spent hours on this! LOL Here's the whole script... <div id="player"></div> <script type="text/javascript"> jwplayer("player").setup({ playlist: [{ image: "http://disc.maximumimpact.ca/videos/DISC-Title.png", sources: [{ file: "http://disc.maximumimpact.ca/videos/DISC Assessment Intro.m4v" },{ file: "http://disc.maximumimpact.ca/videos/DISC Assessment Intro.webm" }] }], width: 853, height: 480, stretching: "fill" }); jwplayer().onComplete(function() { var el = document.createElement("div"); var el2 = document.createElement("div"); var el3 = document.createElement("div"); var el4 = document.createElement("div"); var txt = document.createElement('a'); if (jwplayer().getRenderingMode() == "html5"){ var theBody = document.getElementById(player.id); } else { var theBody = document.getElementById(player.id+"_wrapper"); } var playerWidthPX2 = theBody.style.width; var playerWidthPX = parseFloat(playerWidthPX2); var playerHeightPX2 = theBody.style.height; var playerHeightPX = parseFloat(playerHeightPX2); el3.setAttribute('id', 'bg'); el3.style.height = playerHeightPX + "px"; el3.style.width = playerWidthPX2; el3.style.background = "#ffffff"; el3.style.opacity = "0.70"; el3.style.position = "absolute"; el3.style.backgroundImage="url('background.png')"; el.setAttribute('src', 'background.png'); if (jwplayer().getRenderingMode() == "html5"){ } else { el3.style.top = playerHeightPX-playerHeightPX+"px"; } el3.style.zIndex = "999"; el3.width = playerWidthPX; el3.height = playerHeightPX; el2.setAttribute('id', 'bg2'); el2.style.height = playerHeightPX + "px"; el2.style.width = playerWidthPX2; el2.style.position = "absolute"; el2.style.zIndex = "999"; el2.width = playerWidthPX; el2.height = playerHeightPX; theBody.appendChild(el3); theBody.appendChild(el2); el2.style.textAlign = "center"; el2.style.left = "center"; el2.style.top = ((playerHeightPX*3)/6) -"40" + "px"; el.setAttribute('id', 'hyperlink'); el.style.height = "30px"; el.style.width = "30px"; el2.width = "30"; el2.height = "30"; el.style.position = "relative"; el.setAttribute('frameBorder', '0'); el.style.top = "11px"; el.style.left = "202px"; el.style.textAlign = "center"; el.style.marginBottom = "-16px"; el.style.marginRight = "8px"; el4.setAttribute('id', 'replay'); el4.style.height = "20px"; el4.style.width = "20px"; el4.height = "20"; el4.width = "20"; el4.style.position = "absolute"; el4.style.top = "-" + playerHeightPX/2 + "px"; el4.style.marginTop = "50px"; el4.style.left = playerWidthPX/2 + "px"; el4.style.marginLeft = "50px"; el4.style.backgroundImage="url('replay.png')"; el4.setAttribute('src', 'replay.png'); el2.appendChild(txt); txt.outerHTML = '<a href="http://google.com" onMouseOver="return changeImage()" onMouseOut= "return changeImageBack()" onMouseDown="return handleMDown()" onMouseUp="return handleMUp()"><img name="jsbutton" src="http://disc.maximumimpact.ca/button/ClickHere-Normal.png" width="402" height="127" border="0" alt="javascript button"></a>'; el2.appendChild(el); el2.appendChild(el4); el.style.backgroundImage="url('hyperlink.png')"; el.setAttribute('src', 'hyperlink.png'); el.style.cursor = "pointer"; el.style.display = "table"; el2.style.display = "table"; el3.style.display = "table"; el4.style.display = "table"; txt.style.display = "table"; el.onmouseup = function(){ window.open("http://google.com"); } el4.style.cursor = "pointer"; el4.onmouseup = function(){ el.style.display = "none"; el2.style.display = "none"; el3.style.display = "none"; el4.style.display = "none"; txt.style.display = "none"; jwplayer().play(); } }); </script> Here is a complete script of the button that works... <a href="http://www.google.com" onMouseOver="return changeImage()" onMouseOut= "return changeImageBack()" onMouseDown="return handleMDown()" onMouseUp="return handleMUp()" ><img name="jsbutton" src="http://disc.maximumimpact.ca/button/ClickHere-Normal.png" width="402" height="127" border="0" alt="javascript button"></a> <script language="JavaScript"> upImage = new Image(); upImage.src = "http://disc.maximumimpact.ca/button/ClickHere-Rollover.png"; downImage = new Image(); downImage.src = "http://disc.maximumimpact.ca/button/ClickHere-Click.png" normalImage = new Image(); normalImage.src = "http://disc.maximumimpact.ca/button/ClickHere-Normal.png"; function changeImage() { document.images["jsbutton"].src= upImage.src; return true; } function changeImageBack() { document.images["jsbutton"].src = normalImage.src; return true; } function handleMDown() { document.images["jsbutton"].src = downImage.src; return true; } function handleMUp() { changeImage(); return true; } </script> I'm trying to put them together!
  10. I Am Creating A iOS WebApp [ StandAlone] Which Looks Like A iOS Application The Only Difference That It Written In HtmlAnd JavascriptWhen You Go To A Website and click on add to home screen it creates an icon with the site content [webclip] i have created a website and i need help with one little detail i found that script in my site it permit all links to open in the webapp i was trying to make the links open in safari but when i manage to do that, the navigation menu doesn't work could any one help me please ?heres the code Detect if iOS WebApp Engaged and permit navigation without deploying Safari (function(a,b,c){if(c in b&&b[c]){var d,e=a.location,f=/^(a|html)$/i;a.addEventListener("click",function(a){d=a.target;while(!f.test(d.nodeName))d=d.parentNode;"href"in d&&(d.href.indexOf("http")||~d.href.indexOf(e.host))&&(a.preventDefault(),e.href=d.href)},!1)}})(document,window.navigator,"standalone") i need to open the links in safari rather than the webapp thats it
  11. Hey there, i have a Java MVC Web Application that uses the Spring-Library for the Backend and then JSP files for the frontend. Now, in various JSP files i am using Ajax to have some smooth design when needed. This whole application is running on an Apache Tomcat Server. I have to admit that i am still very new in the whole Web-Development thing, so bare with me.Following problem: In the current state, i feel like the tomcat server is automatically handeling the Sesions, including session-timeouts. So, i can specify the time when a session is supposed to count as timed out and everything, the server recognized this correctly and whenever i try to request something with a timedout session the server automatically logs me out and brings me back to the login page. I havent found any implementation of such behavior in the source-code, hence i assume that this is somehow implemented by some standard tomcat routine. The problem with this behavior is, that the server sends a 302 redirect message specifying the login-Page as Location in the response-header. While this works fine for normal requests it is bad for ajax-requests, as these cannot handle 302 codes. The browser catches that one and the ajax-call has no chance to ever process the reply. I am experiencing weird cookie problems and i supsect that this might be the cause of the problem. Now, it shouldnt be hard to check whether or not a request is done by an ajax-call or not. However, i have no clue WHERE i should do so. Edit: I know that there is a way of specifying Filters and there is a way of setting up a listner that gets informed about Session-creations and destructions. However, none of these suit what i want. I need to cut in at a level that allows me to process a request, see if it is an ajax-call and then see if the session used along it is timed out and then i need to be able to decide how i respond to it. Using a filter i am BEHIND that step. I get controll when stuff regarding session timeout has happened already. Using a Session-Lifetime listner i do not have any infromation about the request. I cannot respond to anyone because i have no information about any Requests. How could i go about implementing my custom session-timeout behavior without interfering with the servers implementation?Am i even right assuming that the server automatically handles these cases? It feels kind of odd that the server knows that it has to logg someone out and also knows what to redirect to. Thanks in advance If there are any questions regarding mine ... ask away
  12. Hello so I made an array and it works fine when you refresh the page the image changes but at lower screen resolutions the image cuts of the edge. With my basic code it worked fine I was wondering what I was doing wrong. This was my old code which was just one image and at lower resolutions it would still fit on the screen <center><img src="my image url" width=47%> </center> But when I use my array it cuts of I want to make the image center and just put width=47% like the top code but not sure where to put it <script language="JavaScript"><!--function random_imglink(){var myimages=new Array()myimages[1]="my image url"myimages[2]="my image url"myimages[3]="my image url"myimages[4]="my image url"myimages[5]="my image url"myimages[6]="my image url"var ry=Math.floor(Math.random()*myimages.length)if (ry==0)ry=1document.write('<img src="'+myimages[ry]+'" width=47%')}random_imglink()//--></script> If you could help me it would be much appreciated
  13. which of these is NOT equivalent to 1000102 + 1000002 ? A) 6610 B)1128 C)4216 D)10000102 E)All are equivalent the answer is B because 1000102 + 1000002 = 3410 + 3210 = 6610 = 1028 = 4216 = 1000102 Can anyone help explain how these numbers relate to each other? DOC120914-12092014150849.pdf
  14. Chi è disposto ad aiutarmi per sostenere un esame di XML ? C'è anche un progettino da implementare in Java. Prego chiamarmi al 3400513727
  15. I am somewhat new to javascripting and am working on a page load for specific content. My interal client has requested an alert to occur when someone navigates to the home page. I added a popup alert to my webpage with the following javascripting: function loadImage() { alert("This reference material contains confidential information and is not to be shared with team members who do not service private exchange business.");} <body onload="loadImage()"> It's pretty simple, but my business partner has now asked that instead of it presenting on every load, they wish it to only present on the intial load of the webpage. I have searched w3schools, but can't seem to find any expressions that will handle this type of request.
  16. Dear Experts,I'm trying to parse an odd XML file that looks like this:<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"><plist version="1.0"><dict><key>Major Version</key><integer>1</integer><key>Minor Version</key><integer>1</integer><key>Application Version</key><string>9.2.1</string><key>Features</key><integer>5</integer><key>Show Content Ratings</key><true/><key>Library Persistent ID</key><string>9210E514389C76D3</string><key>Tracks</key><dict><key>732</key><dict><key>Track ID</key><integer>732</integer><key>Name</key><string>Tears All Over Town</string><key>Artist</key><string>A Girl Called Eddy</string><key>Album Artist</key><string>A Girl Called Eddy</string>...</dict><key>760</key><dict><key>Track ID</key><integer>760</integer><key>Name</key><string>The Nightingale</string><key>Artist</key><string>Angelo Badalamenti</string><key>Album</key><string>Twin Peaks</string><key>Genre</key><string>Soundtrack</string><key>Kind</key><string>MPEG audio file</string><key>Size</key><integer>7109800</integer><key>Total Time</key><integer>296150</integer><key>Disc Number</key><integer>1</integer><key>Disc Count</key><integer>1</integer><key>Track Number</key><integer>4</integer><key>Track Count</key><integer>11</integer><key>Year</key><integer>1990</integer><key>Date Modified</key><date>2006-01-04T06:51:56Z</date><key>Date Added</key><date>2009-04-02T02:04:11Z</date><key>Bit Rate</key><integer>192</integer><key>Sample Rate</key><integer>44100</integer><key>Play Count</key><integer>4</integer><key>Play Date</key><integer>3493240930</integer><key>Play Date UTC</key><date>2014-09-11T05:42:10Z</date><key>Sort Name</key><string>Nightingale</string><key>Persistent ID</key><string>9B002DC50111B620</string><key>Track Type</key><string>File</string><key>File Folder Count</key><integer>4</integer><key>Library Folder Count</key><integer>1</integer></dict><key>762</key>...Every field in the Itunes format has <key> for the fieldname, and the <datatype> surrounding the value.This looks a lot different from the xml format that I saw in this tutorial.http://www.stat.purdue.edu/~mdw/490M/STAT490Mday29.txt<CD><TITLE>Picture book</TITLE><ARTIST>Simply Red</ARTIST><COUNTRY>EU</COUNTRY><COMPANY>Elektra</COMPANY><PRICE>7.20</PRICE><YEAR>1985</YEAR></CD>First I experimented using grep on cygwin. But I don't know how to get a specific set of three lines out of the grouping with grep.With R, I was trying to parse the file, until I looked and saw that the format was different from all the examples.This post made it look easy:How can I export my iTunes library information to a spreadsheet?https://www.quora.com/How-can-I-export-my-iTunes-library-information-to-a-spreadsheetBut it completely failed. The xml doc got imported into Open Office as a document. Not a spreadsheet.For each CD, I want to extract the Artist, Album, and Composer (if it's there)Questions:Is there a name for this type of XML file?What would be the best tool and way to parse the info from the file?grep on cygwinRPythonJavaXQuerysomething else???Thanks a lot!
  17. Hi, First, i need to tell you that i am not experienced in CSS or coding myself but i have fairly good overall technical knowledge. I'm in need of a very simple full screen slideshow consisting of 4 images. I found a CSS3/javascript for this here: http://tympanus.net/codrops/2012/01/02/fullscreen-background-image-slideshow-with-css3/ I've tried to tweak it a bit to suite my needs. However, its not really optimal. I would like to change it so it doesnt fade between the images, a fast cut would be better. Also the original was for 6 images but i tried to change it to a 4 image slideshow but im not sure i did it correctly. Can someone help me with these two issues? thanks guys! the HTML looks like this: <!DOCTYPE html><!--[if lt IE 7 ]> <html class="ie ie6 no-js" lang="en"> <![endif]--><!--[if IE 7 ]> <html class="ie ie7 no-js" lang="en"> <![endif]--><!--[if IE 8 ]> <html class="ie ie8 no-js" lang="en"> <![endif]--><!--[if IE 9 ]> <html class="ie ie9 no-js" lang="en"> <![endif]--><!--[if gt IE 9]><!--><html class="no-js" lang="en"><!--<![endif]--> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <title>Claires slideshow Screen 1</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content="Fullscreen Background Image Slideshow with CSS3 - A Css-only fullscreen background image slideshow" /> <meta name="keywords" content="css3, css-only, fullscreen, background, slideshow, images, content" /> <link rel="shortcut icon" href="../favicon.ico"> <link rel="stylesheet" type="text/css" href="css/demo.css" /> <link rel="stylesheet" type="text/css" href="css/style1.css" /> <script type="text/javascript" src="js/modernizr.custom.86080.js"></script> </head> <body id="page"> <ul class="cb-slideshow"> <li><span>Image 01</span><div></div></li> <li><span>Image 02</span><div></div></li> <li><span>Image 03</span></div></li> <li><span>Image 04</span><div></div></li> </ul> </body></html> and the CSS looks like this: .cb-slideshow,.cb-slideshow:after { position: fixed; width: 100%; height: 100%; top: 0px; left: 0px; z-index: 0; }.cb-slideshow li span { width: 100%; height: 100%; position: absolute; top: 0px; left: 0px; color: transparent; background-size: cover; background-position: 50% 50%; background-repeat: none; opacity: 0; z-index: 0; -webkit-backface-visibility: hidden; -webkit-animation: imageAnimation 72s linear infinite 0s; -moz-animation: imageAnimation 72s linear infinite 0s; -o-animation: imageAnimation 72s linear infinite 0s; -ms-animation: imageAnimation 72s linear infinite 0s; animation: imageAnimation 72s linear infinite 0s; }.cb-slideshow li:nth-child(1) span { background-image: url(../images/1.jpg) }.cb-slideshow li:nth-child(2) span { background-image: url(../images/2.jpg); -webkit-animation-delay: 18s; -moz-animation-delay: 18s; -o-animation-delay: 18s; -ms-animation-delay: 18s; animation-delay: 18s; }.cb-slideshow li:nth-child(3) span { background-image: url(../images/3.jpg); -webkit-animation-delay: 36s; -moz-animation-delay: 36s; -o-animation-delay: 36s; -ms-animation-delay: 36s; animation-delay: 36s; }.cb-slideshow li:nth-child(4) span { background-image: url(../images/4.jpg); -webkit-animation-delay: 54s; -moz-animation-delay: 54s; -o-animation-delay: 54s; -ms-animation-delay: 54s; animation-delay: 54s; }/* Animation for the slideshow images */@-webkit-keyframes imageAnimation { 0% { opacity: 0 } 1% { opacity: 1 } 2% { opacity: 1 } 25% { opacity: 1 } 26% { opacity: 0 } 27% { opacity: 0 } 100% { opacity: 0 }}@-moz-keyframes imageAnimation { 0% { opacity: 0 } 1% { opacity: 1 } 2% { opacity: 1 } 25% { opacity: 1 } 26% { opacity: 0 } 27% { opacity: 0 } 100% { opacity: 0 }}@-o-keyframes imageAnimation { 0% { opacity: 0 } 1% { opacity: 1 } 2% { opacity: 1 } 25% { opacity: 1 } 26% { opacity: 0 } 27% { opacity: 0 } 100% { opacity: 0 }}@-ms-keyframes imageAnimation { 0% { opacity: 0 } 1% { opacity: 1 } 2% { opacity: 1 } 25% { opacity: 1 } 26% { opacity: 0 } 27% { opacity: 0 } 100% { opacity: 0 }}@keyframes imageAnimation { 0% { opacity: 0 } 1% { opacity: 1 } 2% { opacity: 1 } 25% { opacity: 1 } 26% { opacity: 0 } 27% { opacity: 0 } 100% { opacity: 0 }} /Joel
  18. Hello internet, I was not sure if I should put this in JAVASCRIPT or php – in the end the form gets submitted so I decided to put this in the PHP forum. Here is my dilemma – I have several JAVASCRIPT checks to make sure people fill out their name, phone number, feedback content, and have a valid email address. On occasion it seems like people are getting around that JAVASCRIPT just to prove a point. Blank forms are being submitted. What can I do to prevent this?
  19. Hello, I'm trying to make a method that creates objects of a parameterized type randomly, but also to store the hashCode of different objects created and if at any time the percentage of different objects is less than 50% throw an exception. This last part is where I've gotten stuck. I have created a population property where I store the different hashCodes and update it in the method adding the new hashCode from the new object. But I don't know how to do for to know if the percentage of different objects is less than 50%. See if someone can help me out. Regards!
  20. i just wanna create mansory look for my newly updated article and it should have "more" option to preview the full article...... i.e. for mansory........ here(above) pic here(above) pic here(above) pic a small content from the article -more-
  21. I am using this code to run python program from terminal with '34' as argument command line in terminal: import java.lang.*; import java.lang.Process.*; import java.io.*; public class java3 { public static void main(String args[]) { try{ Runtime.getRuntime().exec(new String[] { "xterm","-e","python","pthon1.py","34" }); } } catch(IOException e) { System.out.println("error:"+e); } } } but i want to store that value '34' in a integer variable and then pass to terminal. please any suggestions ???
  22. I am trying to learn any programming language and I have looked into several sites including Oracle and I must say everything I've tried to learn hasn't stayed in well. I personally love the layout and the design as well as the ability to try it yourself on W3Schools' site. I Understand that W3Schools was made to teach everything you need to know to create a webpage, or to be used as a reference to commands in a language used in making a webpage, but I and many others would greatly benefit if W3Schools could adopt a programming section. I am starting to learn Java and as for right now I only request Java, But I would like to see all commonly used programming language. I used W3Schools to learn HTML, CSS, and a little bit of JavaScript, It took me a little under 7 hours to learn a large portion of HMTL and CSS. I just love W3Schools' Website and Teaching ways. I would love to learn every language possible here, I find this the best way to learn Computer languages.
  23. Hello All, I put my question straight here. If my website address is www.abcd.in a ""Click Here"" button should be linked to http://www.XXXXXXXX.com/?r=1234567 [FIXED] If my website address is www.abcd.in/?r=1111111 a ""Click Here"" button should be linked to http://www.XXXXXXXX.com/?r=1111111 ["1111111" Its a 7digit number may vary per user] Please help me a HTML Code with javascript in it for creating a Click here button. Refer: www.click2rupee.com www.click2rupee.com = CLICK HERE Button= http://www.clixsense.com/?r=3488429 www.click2rupee.com/?r=12312312 = CLICK HERE Button= http://www.clixsense.com/?r=12312312 Thanks All.
  24. Hello guys, i need some basic info here. I need to build string, which must be builded into "'%name%'", when name is a variable. Using concat, its easy to do that:String myString = "'%" + name + "%'";how to do that with String.format() ?I`m trying to do like: String myString = String.format("'%%s%'", name); << it appears a problem with "%'" tag. how to avoid that ? How to use double %`s in the quotas ?Any suggestions ? Linas.
  25. Hi All, i'm doing sample ajax exercise and getting the response from server but the response work fine in IE browser but not in firefox/chrome browser. below is the code snippet also find the snippet ========================= ajaxdemo.html =========================l <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Insert title here</title> </head> <body> <input type="text" id="inputDisplay" /> <button type="button" onclick="sendMessageToServer()">Send To Server</button><br/> <input type="text" id="textDisplay"/> <script type="text/javascript"> var xmlhttp; if (window.XMLHttpRequest) { xmlhttp = new XMLHttpRequest(); } else if (window.ActiveXObject) { isIE = true; xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } function sendMessageToServer() { xmlhttp.open("POST","/LabAjax04/AjaxDemoServlet?name="+document.getElementById("inputDisplay").value,true); xmlhttp.onreadystatechange=receiveMessageFromServer; xmlhttp.send(); document.getElementById("inputDisplay").value=''; } function receiveMessageFromServer() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { alert(xmlhttp.responseXML.getElementsByTagName("responseFromServer")[0].text);// displays undefined alert(xmlhttp.responseText);//display the response from server document.getElementById("textDisplay").value=xmlhttp.responseXML.getElementsByTagName("responseFromServer")[0].text; } } </script> </body> </html> ======================= java file ====================== package com.sample.ajax; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; /** * Servlet implementation class AjaxDemoServlet */ public class AjaxDemoServlet extends HttpServlet { private static final long serialVersionUID = 1L; /** * @see HttpServlet#HttpServlet() */ public AjaxDemoServlet() { super(); // TODO Auto-generated constructor stub } /** * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response) */ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {} /** * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response) */ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { System.out.println("server recived the folwwoing messgae from client:"+request.getParameter("name")); response.setContentType("text/xml"); response.getWriter().println("<responseFromServer>"+request.getParameter("name")+"</responseFromServer>"); System.out.println("server replied with the folwwoing messgae to client:"+request.getParameter("name")); } } ========= web.xml ========= <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5"> <display-name>LabAjax04</display-name> <welcome-file-list> <welcome-file>index.html</welcome-file> <welcome-file>index.htm</welcome-file> <welcome-file>index.jsp</welcome-file> <welcome-file>default.html</welcome-file> <welcome-file>default.htm</welcome-file> <welcome-file>default.jsp</welcome-file> </welcome-file-list> <servlet> <description></description> <display-name>AjaxDemoServlet</display-name> <servlet-name>AjaxDemoServlet</servlet-name> <servlet-class>com.sample.ajax.AjaxDemoServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>AjaxDemoServlet</servlet-name> <url-pattern>/AjaxDemoServlet</url-pattern> </servlet-mapping> </web-app> Thanks in advance!!!