Jump to content

Search the Community

Showing results for tags 'Java'.

  • 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

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

  1. How can I determine which files this java program depends upon to run ?
  2. I need some some help in Java Assignment Operators basically on 4/5 operator like &= |= ^= >>= <<=
  3. Hi! I would like to know if it is possible to convert the code that was wrote based on JavaScript to Java or Kotlin. What type of commands do I need to do, to make these changes? This one is part of a BootCamp´s exercises that I am engaged in. Below, the code and IDE´s print: for (i = 0; i < 3; i++) { let t = gets(); let v = gets(); let arrayV = v.split(" "); let maior = 0; let nivel = 0; maior = arrayV.reduce((a, b) => ( Math.max(a, b) )) if (maior < 10) { nivel = 1; } else if (maior < 20) { nivel = 2; } else { nivel = 3 } console.log(nivel) }
  4. Hi All, So I am having some trouble implementing Java/JSON onto my WordPress site. However, being self taught in HTML I am not as knowledgeable as this community, and W3schools is always my go to site. I have been given some brief instructions and 'codes/scripts' that will allow me to show an automatic feed from my partner. However, I cannot seem to get my head around how it is done. The instructions say to add some code to the header of the page, but when this is done and the rest of the instructions followed (to the best of my knowledge) there is nothing displayed. I have spent countless hours trying to figure out how to implement this Java/JSON this onto my site with no success. I have even contacted an online 'developer' who seemed to just go around in circles and not help in any way. He suggested adding the JSON Content Importer plugin and upgrading to the Pro version. This still didn't help in any way. Im sure that there is something very simple and easy missing from the equation, but I just cannot seem to get anywhere with this. I can provide any information and screenshots to anyone willing to help.
  5. Hi there, so i have a file that needs to be decoded, this is a thing now that i can't do it. So any help would be highly appreciated. Please help me decode this code, its been weeks and i'm still in the same place text.txt
  6. Java String Methods The description for intern() in the tutorial reads: This is actually the short description of the overloading indexOf(int ch, int fromIndex) method. The actual short description of intern() reads: Java Strings The Java Strings section contains: According to the JLS, 3.10.5. String Literals: and since String implements CharSequence and states: and since collection has a special meaning in Java the following would be more precise: a) from a general point of view: A String variable contains a sequence of characters (without the enclosing double quotes that form a string literal!). b) in detail: A String variable contains a reference to an object that represents a sequence of characters. Java Modifiers The section Static contains: The difference between those two is that on methods the former defines an invocation scope (of class compared to object) and the latter is an access modifier (public compared to private, default or protected). These are two completely different concepts. So, comparing these two doesn't make any sense and is extremly misleading.
  7. I have 2 questions: 1. Is it the norm that a Java program can only have One class? 2. Is a Class in Java always"Public"? If any of your answers is a No, can you please show a simple example program with System.out.println(). I'm a beginner, so, sorry if these questions appear stupid to you.
  8. What's the difference between a Method and a Constructor? Only in the name?
  9. How to back sqlite database on said email's google drive in android studio.. PROBLEM : I don't want to store my data on online data base as it will charge me when it will be for commercial uses.. Now i am storing data in Local data base SQLite database.. Now it is big challenge to me that i am unable to the backup my SQL Database to google drive.. I want to add these facilities 1) Restore & Backup SQLite database on google drive after user sign in their account. 2) The Data will be store into their google drive. 3) The Backup procedure will be made after any makes any changes. Please Help...
  10. Hi everyone, I am still learning Java. I am trying to create an array with images. I have images in folder, but I can't figure how to start to have images in array. How can I do that? I checked around in google, none of them make sense, more likely off topic to image icon. I need to tell java to pull all images from folder into array, so i can process programming. can you please show how to do that? Thank you so much. Gary
  11. Java jdk v- 15 class not found error on android command line tools install manually
  12. Hi, Can someone please help with some code I am trying to have the numbers *clicked* & stay blue in color and then display over on the right side in the ? circles only allowing each number to be used once photo is attached of my web page
  13. Hello Everyone,I am Shivam and I am new here, one of my friend was suggested to me ask your query here. I hope so this is the right way to ask my query. I want to learn java programming and how to become proficient in java coding. I am doing daily practice to deploy a code but currently learning the basic oops concept of online resources. Can anyone suggest me a better and best way to proficient in java programming?
  14. Is it possible to use a formatting (escape) sequence in the Java printf statement to remove specific characters from the string argument? For example, if I have a string like, "[0, 1]", is there a formatting string I can use to remove the left and right bracket characters ([])? Is there a "regular expression" for the Java printf statement that will filter out those characters?
  15. When trying to do what the tutorial says in the beginning I come across a problem. The tutorial says the return must be "Hello world", however when you follow the instructions the execute window will close without displaying anything. Perhaps this is something with windows, anyways the tutorial doesn't work because of it as you can't read the output.
  16. hello, 1 month ago i started to learn java from udemy and w3schools. actually im a russian language student at university. all i want is learn java for a basic app. i dont wanna be prof. medium degrees enough for me. but problem is, i know nothing about this world and what it could be. my question is where am i. i can answer all the questions at 3school's website java tutorial test questions. but i cant see from here "what is my level" "can i call myself as a rookie level" "with these knowlegde, can i make an basic education app" "are these questions enough for the basic level" help me guys
  17. Hi, I am building a website in wordpress! Even though im very new to coding HTML, CSS and Java, i am trying! My problem is that i want to make a slideshow based for ads, so every picture need a individual link! Can anyone tell me how thats done? Thank you
  18. Hello Everyone, I'm a beginner in CSS, HTML and Java Script/jQuery. I actually do not code, but i found a solutiuon for my problem with a simple CSS animation. I did not know, that the @keyframes animation still has some difficult stuff. I know they are hardcoded, but i need the help of jquery for dynamic change of the keyframes-selector. I have searched several threads for my problem. Some do sound similar to my, but i just can not apply it into my code, it does not work. I am trying to code dynamic keyframes with jquery. I got the following code below in a code snippet. It does not apply the animation yet. HTML code: <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <body> <h1>My Code</h1> <hr> <form> <span style="display:inline-block; height: 20px;"></span> <b><font size="4">amplitude:</font></b><br> <input type="range" id="amp" name="amplitude" oninput="myFunction2()" placeholder="0" min="156" max="484" value="320" step="1"> <br> <span style="display:inline-block; height:20px;"></span> <b><font size="4">phase:</font></b><br> <input type="range" id="pha" oninput="myFunction()" name="phase" min="181" max="681" value="181" step="1"> <br> <span style="display:inline-block; height:20px;"></span> <b><font size="4">phase2:</font></b><br> <input type="range" id="pha2" oninput="myFunction3()" name="phase2" min="681" max="1181" value="781" step="1"> </form> <p id="print1"></p> <p id="print2"></p> <p id="print3"></p> <p id="print4"></p> <input class="toggle" type="checkbox"> <div id="up-triangle1"></div> <div id="down-triangle1"></div> <div id="rectangle1"></div> <div class="arrow21"></div> <div class="arrow22"></div> </body> CSS code: body {background-color: wight;} h1 {color: black; text-align: center; font-family: LM Roman 12;} p {font-family: LM Roman 12; font-size: 20px;} .toggle{ position: absolute; margin: -120px 150px; width: 300px; color: white; text-align: center; text-shadow: 0 1px 0 rgba(0,0,0,.5); font-size: 2.5em; cursor: pointer; z-index: 5; } .toggle:after { position: absolute; display: block; padding: 10px 0; width: 300px; border: 1px solid #76011b; border-radius: 8px; background: green; content: "Start"; z-index: 5; } .toggle:checked:after { background: red; content: "Stop"; } .toggle:checked ~ #up-triangle1 { -webkit-animation-name: up-triangle; /* Safari 4.0 - 8.0 */ -webkit-animation-duration: 2s; /* Safari 4.0 - 8.0 */ animation-name: up-triangle; animation-duration: 2s; animation-direction: forward; animation-iteration-count: 100; animation-timing-function: linear; } .toggle:checked ~ #down-triangle1 { -webkit-animation-name: down-triangle; /* Safari 4.0 - 8.0 */ -webkit-animation-duration: 2s; /* Safari 4.0 - 8.0 */ animation-name: down-triangle; animation-duration: 2s; animation-direction: forward; animation-iteration-count: 100; animation-timing-function: linear; } .toggle:checked ~ #rectangle1 { -webkit-animation-name: rectangle; /* Safari 4.0 - 8.0 */ -webkit-animation-duration: 2s; /* Safari 4.0 - 8.0 */ animation-name: rectangle; animation-duration: 2s; animation-direction: forward; animation-iteration-count: 100; animation-timing-function: linear; } .toggle:checked ~ .arrow21 { -webkit-animation-name: arrow21; /* Safari 4.0 - 8.0 */ -webkit-animation-duration: 2s; /* Safari 4.0 - 8.0 */ animation-name: arrow21; animation-duration: 2s; animation-direction: normal; animation-iteration-count: 100; animation-timing-function: linear; } .toggle:checked ~ .arrow22 { -webkit-animation-name: arrow22; /* Safari 4.0 - 8.0 */ -webkit-animation-duration: 2s; /* Safari 4.0 - 8.0 */ animation-name: arrow22; animation-duration: 2s; animation-direction: reverse; animation-iteration-count: 100; animation-timing-function: linear; } #up-triangle1 { position: absolute; top: 320px; left: 168.5px; width: 0; height: 0; border-left: 15px solid transparent; border-right: 15px solid transparent; border-bottom: 45px solid #01ADAB; } @keyframes up-triangle { 0% {top:320px;} 25% {top:420px;} 75% {top:220px;} 100% {top:320px;} } #down-triangle1 { position: absolute; top: 607px; left: 168.5px; width: 0; height: 0; border-left: 15px solid transparent; border-right: 15px solid transparent; border-top: 45px solid #01ADAB; } @keyframes down-triangle { 0% {top:607px;} 25% {top:707px;} 75% {top:507px;} 100% {top:607px;} } #rectangle1 { position: absolute; top: 365px; left: 181px; height: 242px; width: 5px; background-color: #01ADAB; } @keyframes rectangle { 0% {top:365px;} 25% {top:465px;} 75% {top:265px;} 100% {top:365px;} } .arrow21 { position: absolute; top: 540px; left: 181px; height: 332px; /* 332 */ width: 5px; background-color: #80D0CF; } @keyframes arrow21 { 0% {top:320px;} 25% {top:420px;} 75% {top:220px;} 100% {top:320px;} } .arrow22 { position: absolute; top: 320px; left: 681px; height: 332px; width: 5px; background-color: #80D0CF; } @keyframes arrow22 { 0% {top:320px;} 25% {top:420px;} 75% {top:220px;} 100% {top:320px;} } #print1 { position: absolute; top: 111px; left: 182px; width: 50px; height: 10px; } #print2 { position: absolute; top: 58px; left: 110px; width: 50px; height: 10px; } #print3 { position: absolute; top: 151px; left: 182px; width: 50px; height: 10px; } #print4 { position: absolute; top: 170px; left: 200px; width: 50px; height: 10px; } Java/jQuery code: var supportedFlag = $.keyframe.isSupported(); $.keyframe.debug = true; var start = temp; var start_100 = temp + 100; var start_200 = start_100 + 100; <script type='text/javascript'> $(document).ready(function(){ $('.arrow21').resetKeyframe(function() { switch (animation) { case 'normal': $('.arrow21').animate({ name: 'arrow21-move', '0%': start, '25%': start_100, '75%': start_200;, '100%': start }); }); }); function play(animation) { $('.arrow21').playKeyframe({ switch (animation) { if document.getElementById("pha").value < 180 then case 'normal': name: 'arrow21-move', duration: "4s", timingFunction: 'linear', iterationCount: '100', direction: 'normal', fillMode: 'forwards', }); break; else case 'reverse': $('.arrow21').playKeyframe({ name: 'arrow21-move', duration: "4s", timingFunction: 'linear', iterationCount: '100', direction: 'reverse', fillMode: 'forwards', }); function pause() { $('.arrow21').pauseKeyframe(); } function resume() { $('.arrow21').resumeKeyframe(); } /* phase */ function myFunction() { x = parseInt(document.getElementById("pha").value); document.getElementsByClassName('arrow21')[0].style.left = x; document.getElementsByClassName('arrow21')[0].style.top = 460 + (80 * Math.sin(0.0111 * (x-20))); temp = 460 + (80 * Math.sin(0.0111 * (x-20))); document.getElementById("print1").innerHTML = Math.round((x - 181) / 2.78); document.getElementById("print4").innerHTML = 460 + (80 * Math.sin(0.0111 * (x-20))); } /* amplitude */ function myFunction2() { y = parseInt(document.getElementById("amp").value); document.getElementsByClassName('arrow21')[0].style.height = y; document.getElementById("print2").innerHTML = y; document.getElementsByClassName('arrow22')[0].style.height = y; document.getElementById("ball").style.top = y + 100; } /* phase2 */ function myFunction3() { z = parseInt(document.getElementById("pha2").value); document.getElementsByClassName('arrow22')[0].style.left = z; document.getElementById("print3").innerHTML = Math.round((z - 181) / 2.78);; } The animation with the Start Button (checkbox) works fine for me. This should also be the resume button to continue the animation, if it once started. The shapes are moving in a proper way. My Problem is, i do not kwow how can i get the current value from amplitude and apply it as a start condition to the shape. It is a dynamic value because of the range slider. This value changes the top position of the shape. The animation must begin from this current value shown at print1. So if you change the value, the animation should change either and start from the same value where the range slider is. I need an updated animation, so if the animation is running and the amplitude is changed, it should be directly updated. (or after clicking start/stop) This should be possible for each value you set at the range. Also the animation should change from normal to reverse at the edge of 180 from phase range. How can i achieve this? I tried already something, maybe it just have to be slightly modified. Thanks in advance.
  19. Hello, this post will contains some suggestions which have no link between them. -Firstly, i think it could be great to have something which allows us to follow news from w3schools "easily, something like a page where we could see the last update in a single line. example : 02/03/2018 Update "How to" section 01/30/2018 Add php tutorial (server side) In fact, the website become "big", then it could be an asset. -Secondly, i see more and more websites which have a functionnality to switch the theme (to a night theme) by clicking on one button (in their navbar) and the change is done on the whole website . This featur could get its place in "the How to" section. -To finish, this last idea is probably out of the main content of w3schools, but maybe Java could get its place like Node.js in the server side section although Java does not necessarily have this main purpose. (of course this add should only approach the server side).
  20. Hello people Can You help me with an Jave script ( it is unreadable and I think its also compiled or something like that ) I have try'd to look at it with an DeCompiler but it keeps unreadable It is used for calculations in another part of de system ( XML scripts ) The system (soft- and hard-ware) is made by an company that is not able to get service of this product. Because of problems with the system I'm trying to figure out how the software works. But this script is the part that is not possible to see what is going on in it. Filename = Calculations.js Note: It is running on an "Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40 GHz With Windows 7 Ultimate" system When someone can get the file more readable much thanks. calculations.js
  21. Hello everyone I want to make a login page and I want to connect it with loptop or mobile fingerprint scanner and people can login with their fingerprint. Can anyone help me what should I do?
  22. hi, I hv a problem. i want make such a web app such as if I Click button in my website then as result button1 in website1 and button2 in website2 will be clicked at the same time. any1 plz help. suggest something
  23. 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);
  24. 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; }
  25. 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
×
×
  • Create New...