391 Discussion / Question Topics

Remove Filter
Member Avatar for Violet_82

HI all, I am trying to validate the input in my tic-tac-toe program. I had a good look around on the net and tried a few combinations, but I couldn't get anywhere. Some people seem to be using methods like hasNextInt(), some other a try and catch statement. I tried …

Member Avatar for Violet_82
0
326
Member Avatar for Violet_82

Hi all, I have just finished with my tict-tac-toe program, and I thought I'd post it here if anybody fancy giving me any feedback. Also, I have a problem with printing the board, probably due to my lack of knowledge in using `printf` as opposed to `println`. Anyway this is …

Member Avatar for Violet_82
0
237
Member Avatar for Violet_82

Hi all, I hope somebody can help me with this really annoying issue. Basically I have a some radio buttons and some text inside a label. This is in a small container and when the line of text breaks and goes to the other line, I want it to be …

Member Avatar for JorgeM
0
5K
Member Avatar for Violet_82

Hi guys, I am not sure this is right or not. If I have one variable whose value is true or false and I want to use it in an if statement I could easily do if(variable1){ //do this and that } but I want to check 2 variables I …

Member Avatar for Violet_82
0
194
Member Avatar for Violet_82

Hi chaps, quick question. Is a html form tag always required when you add a form to the html? In other words if you have a form and leave out the form tag will the code still validate? I have heard some saying that a form tag is only necessary …

Member Avatar for paulkd
0
113
Member Avatar for Violet_82

Hi, when I started to look into programming, one of the things I remember many programmers are quite keen on are setters and getters. I totally understand the importance of them but there is one thing that isn't really clear to me. If I have a class with some private …

Member Avatar for Violet_82
0
173
Member Avatar for Violet_82

Chaps, I am having some problems with a return statement in a function. I have this situation: public boolean isFine(){ for( int i = 0; i < myarray.length; i++ ){ for(int j = 0; j < myarray[i].length; j++ ){ if( myarray[i][j] == myEnumeration.FRIDAY ){ return false; } else{ return true; …

Member Avatar for Violet_82
0
172
Member Avatar for Violet_82

Chaps, sorry I have a silly question. I am not quite sure if this is right, but what is the differenct between the two below: public class myclass{ public static void main( String args[] ){ boolean variable1 = false; boolean variable2 = false; ... System.out.print(variable1 + " and " + …

Member Avatar for Violet_82
0
183
Member Avatar for Violet_82

Hi all, I wonder if you can help me at all. I need to display one ul list into separate (3-4) columns one next to the other one, only if the number of items is bigger than 6. Let's look at the following code. Html is: <div class="wrapper"> <h2 id="first">First</h2> …

Member Avatar for LastMitch
0
215
Member Avatar for Violet_82

Hi all, I have a few questions about compatibility mode. I am using IE9 at the moment. First and foremost, I have noticed that the compatibility icon tends to appear quite often when browsing the internet: it appears when I look at the bbc site http://www.bbc.co.uk/ and w3c schools just …

Member Avatar for Violet_82
0
87
Member Avatar for Violet_82

Hi all it's that time again, java exercise! Mindful of what happened last time http://www.daniweb.com/software-development/java/threads/449525/building-a-simple-airline-reservation-system-exercise/ , this time I have decided that I want to have all the pseudocode done before I even start thinking about how to code the whole thing. This is what the exercise requires: > Create …

Member Avatar for Violet_82
1
4K
Member Avatar for Violet_82

Chaps, I have come across something really really odd. I won't bother you with too many details, what happened on the website I am working on, but I have managed to recreate the issue in a very simple page. Basically, it seems to me that chrome doesn't handle list-style-position very …

Member Avatar for Violet_82
0
411
Member Avatar for Violet_82

Hi there, on one of my pages I am working on [url]http://www.antobbo.webspace.virginmedia.com/photography/category_1.htm[/url] I have a script which works in firefox, opera but it doesn't in chrome and IE. Now, let me explain first what the script is supposed to do. On the above page if you click on the second …

Member Avatar for 1@3RaJa
0
2K
Member Avatar for Violet_82

Hi chaps, I wonder whether this is possible or not. Basically, I have an absolutely positioned div with a width and height and a background image (it's a little arrow) that I want to overflow its container so that it sticks out and point at something. Is it possible with …

Member Avatar for Violet_82
0
185
Member Avatar for Violet_82

Hi all, I was reading a few things on the net about how to calculate a leap year in java (and not only for that matter). So something like `...if( year % 400 == 0 || ( year % 4 == 0 && year % 100 != 0 ) )...` …

Member Avatar for Violet_82
0
284
Member Avatar for Violet_82

Hi I wonder if somebody can help me to understand a few things in the following example: // Fig. 8.17: PackageDataTest.java // Package-access members of a class are accessible by other classes // in the same package. public class PackageDataTest { public static void main( String[] args ) { PackageData …

Member Avatar for Violet_82
0
159
Member Avatar for Violet_82

Hi chaps, what do we define as a client of a class please? I keep reading about "clients of a class" but I don't understand what that means. Maybe it is better to have some examples: take the following 2 files: //Employee.java public class Employee{ public static void main(String[] args){ …

Member Avatar for Violet_82
0
168
Member Avatar for Violet_82

Hi there, I am not entirely sure how to target checkboxes with jquery. I had a look around but the methods indicated don't seem to work for me for whatever reason. Given the following html fragment: ... <form> <input type="checkbox" value="red" name="the_color" checked="checked" id="red"><label for="red">This is red</label><br> <input type="checkbox" value="blue" …

Member Avatar for LastMitch
0
146
Member Avatar for Violet_82

Hi chaps, I am having a little problem. Given the following snippet: html <div id="carousel"> </div> css #carousel{ border:1px solid magenta; width:600px; height:258px; background: url('sprite.png') no-repeat 0 0; position:absolute; left:0; top:28%; } jquery $(document).ready(function(){ function scroll(){ $("#carousel").animate({ backgroundPosition:'-600px'}, 500); } setInterval(function(){scroll()},2000); }); I am trying to run scroll() forever to …

Member Avatar for GliderPilot
0
335
Member Avatar for Violet_82

Hi all, does anybody know a good guide (step by step perhaps) that could help me to take apart my dell xps17? COuldn't find that much on google. I have to get to the back and have a look at the power connector thanks

Member Avatar for Reverend Jim
0
190
Member Avatar for Violet_82

Hi all, I'd like to clarify something here please, the inconsistent behaviour of browsers with regards to the pseudo class :visited. I had done quite a lot of research into it ont he web and it seems to me that every browser does something different. I appreciate this has a …

Member Avatar for Violet_82
0
175
Member Avatar for Violet_82

Hi chaps, I have a problem with my dell xps 17 lappy, the connector for the main is really dodgy inside the laptop itself therefore charging it is a nightmare. I was wondering if there is such a thing as a USB main charger that can be plugged in to …

Member Avatar for Violet_82
0
87
Member Avatar for Violet_82

Hi there, I was wondering if anybody can help me understanding this code please - well it's more about the usage of :first really): <!DOCTYPE html> <html> <head> <style> span { color:red; cursor:pointer; } div { margin:3px; width:80px; display:none; height:80px; float:left; } div#one { background:#f00; } div#two { background:#0f0; } …

Member Avatar for Violet_82
0
413
Member Avatar for Violet_82

HI all, I was wondering if anybody can help me to understand this exercise: "A small airline has just purchased a computer for its new automated reservation system. Write an application to assign seas on each flight of the airline's only plane (capacity: 10 seats). Your application should display the …

Member Avatar for Violet_82
0
7K
Member Avatar for Violet_82

Chaps, I was wondering what this.id (and for that matter this.whatever) is in jquery and how to use it. A few quick examples are here: <!DOCTYPE html> <html> <head> <script src="http://code.jquery.com/jquery-latest.js"></script> </head> <body> <img title="hat.gif"/> <script> $("img").attr("src", function() { return "/resources/" + this.title; }); </script> </body> </html> and another one: …

Member Avatar for Violet_82
0
157
Member Avatar for Violet_82

Hi all, I am slightly confused about passing functions to the addClass method. This code is taken from the jquery.com site http://api.jquery.com/addClass/: <!DOCTYPE html> <html> <head> <style> div { background: white; } .red { background: red; } .red.green { background: green; } </style> <script src="http://code.jquery.com/jquery-latest.js"></script> </head> <body> <div>This div should …

Member Avatar for Violet_82
0
230
Member Avatar for Violet_82

Chaps, I am thinking to redesign and redevelop my site, http://www.antonioborrillo.co.uk/ I want to get rid of those hideous buttons and make it mobile friendly, add extra info and have a page where people can leave comments on some of the pix. Now first thing: mobile version. I will go …

Member Avatar for JessicaJohn
0
151
Member Avatar for Violet_82

Chaps I think there might be an issue here, I have just posted something http://www.daniweb.com/software-development/java/threads/449524/building-a-simple-airline-reservation-system-exercise and it looks like it posted it twice. I am fairly sure I didn't press submit twice, so I am not sure what's going on. thanks

Member Avatar for Violet_82
0
142
Member Avatar for Violet_82

Chaps, I am thinking to build a nice picture blog, to upload pictures and add a bit of a blurb, just enough to describe the picture, and let people comment if they want to. Now, here's the thing: one of the main feature I would like to have, well really …

Member Avatar for Violet_82
0
113
Member Avatar for Violet_82

Chaps, I am doing a bit of responsive/mobile development. SOme concepts are pretty new to me, like using viewports, initial-scale, maximum-scale etc etc, so I was wondering if anybody is aware of a good tutorial that could clear these things up for me. I have found this quite beneficial http://alistapart.com/article/fluidgrids …

Member Avatar for Violet_82
0
116
Member Avatar for Violet_82

Hi all, can somebody please let me know where I can find a good guide on how to use and especially what's included and what you can accomplish with Open CMS (I believe it's an open source content management system, probably a bit like wordpress)? ALso, if anybody has used …

Member Avatar for Violet_82
0
165
Member Avatar for Violet_82

HI all, I have just come across this: `System.out.printf("Student %2d: %3d\n");` What does that ":" mean? I assume it is a kind of separator becasue that line prints something like this: `Student 1: 87` thanks

Member Avatar for Violet_82
0
482
Member Avatar for Violet_82

HI guys, sorry to go on about these visited links. I have spotted an issue with safari, and it looks like it is only safari doing it (at least on windows). DOes safari have some special settings that need to be enabled/changed? Same link as before, but different content this …

Member Avatar for Violet_82
0
158
Member Avatar for Violet_82

HI all, I wonder if you can help me at all. Today I changed the system battery to an Asus laptop, which had to be taken apart completely. I changed the battery and put it back together and everything was working ok. Now, when I switched it back on I …

Member Avatar for gerbil
0
219
Member Avatar for Violet_82

HI all, not long ago I posted something about a similar issue http://www.daniweb.com/web-development/web-design-html-and-css/threads/447728/change-the-colour-of-visited-link-with-avisited but this time it is slightly different. Ok, so here's the offending page http://antobbo.webspace.virginmedia.com/various_tests/links/faqTest.html When you click on the question, the answer will slide down. Now, the links will always point to #, but I still need …

Member Avatar for Violet_82
0
225
Member Avatar for Violet_82

HI all, I am a bit confused about right justifying and formatting strings and numbers in general, and I was wondering if somebody can clarify this for me please. Ok, so let's take an example: // Fig. 7.2: InitArray.java // Initializing the elements of an array to default values of …

Member Avatar for Violet_82
1
1K
Member Avatar for Violet_82

Hi all, I am trying desperately to align correctly a set of 2 adjacent input boxes, but alas, this is turing into a nightmare and I wonder what guys you think it might be the best approach. Here's the code: <html> <head> <title>test</title> <style> .theForm{ background-color:#f4f4f4; margin-top:14px; padding:25px 0 40px …

Member Avatar for Violet_82
0
106
Member Avatar for Violet_82

Hi chaps, I wonder if you can help me with something. I am looking into responsive design a bit, and I was testing something here http://antobbo.webspace.virginmedia.com/test/responsive/test.html Now, if you try to resize the window the cnes logo gets pushed under the "this is an extra bit" div: what I would …

Member Avatar for AleMonteiro
0
334
Member Avatar for Violet_82

Sorry guys, I'd like to just confirm this, is it correct to have a p tag inside a form tag? Something like <form action="demo_form.asp"> <p>This is a test.</p> First name: <input type="text" name="FirstName" value="Mickey"><br> Last name: <input type="text" name="LastName" value="Mouse"><br> <input type="submit" value="Submit"> </form> thanks

Member Avatar for Violet_82
0
929
Member Avatar for Violet_82

HI all, I have a question about changing the colour of visited link with `a:visited{}`: it doestn' seem to work the way I thought it would, or, more likely I am doing something wrong. I have this situation: .box1 a:link{ color:#ac2973; text-decoration:none; } .box1 a:visited{ color:#6bb8c0; } .box1 a:hover{ color:black; …

Member Avatar for pritaeas
0
226
Member Avatar for Violet_82

Hi all, I am looking into responsive design and I have a problem with media query. Being pretty new to the whole responsive design business, it seems that media queries are quite a good way to deal with it. But IE7 and 8 don't seem to be able to read …

Member Avatar for iamthwee
0
77
Member Avatar for Violet_82

Hi there, quick question. Say my laptop is connected to a wireless network, and I then decide to plug the wire in, does the wired connection takes over? In other words with both the wireless and the wired cable connected, which one take precedence? thanks

Member Avatar for riahc3
0
142
Member Avatar for Violet_82

Hi I wonder if somebody can help me with this. This programs simulates throwing a die 20 times: import java.util.Random; // program uses class Random public class RandomIntegers { public static void main( String[] args ) { Random randomNumbers = new Random(); // random number generator int face; // stores …

Member Avatar for Violet_82
0
532
Member Avatar for Violet_82

hi chaps, I am having some trouble decoding this regex in a javascript (wasn't entirely sure whether javascript was the right place to post this since it has more to do with regex). I am very new to it - this is the first time I look into that - …

Member Avatar for Violet_82
0
210
Member Avatar for Violet_82

Hi there, I have to calculate the pithagorean triplets up to 500 (it's an exercise I found on the deitel and deitel book) and I got a little stuck, in that it looks like I am getting an infinite loop. The exercise says to use a triple for loop, but …

Member Avatar for Violet_82
0
132
Member Avatar for Violet_82

hi all, I need to draw a series (10) concentric circles starting fromt he middle of the panel. This is what I have done, do you reckon it is ok? //Ovals.java import java.awt.Graphics; import javax.swing.JPanel; public class Ovals extends JPanel{ public void paintCmponent(Graphics g){ super.paintComponent(g); //calculates the centre of the …

Member Avatar for Violet_82
0
3K
Member Avatar for Violet_82

hi chaps, I would like to do this exercise taken from the deitel and deitel book, chap 4 exercise 4.38, in brief: "Write an application that reads a 4 digit int and encrypt it replacing each digit with the result of addin 7 to it and getting the reminder after …

Member Avatar for Violet_82
0
580
Member Avatar for Violet_82

Hi there, I have opened another thread even if the program is very similar. I have modified some code I have produced earlier and now I am getting some runtime errors, and I can't quite understand why. Now, here's the code: EmployeeClass.java public class EmployeeClass{ private String firstName; private String …

Member Avatar for Violet_82
0
4K
Member Avatar for Violet_82

Hi all, I have just installed the jdk on a windows7 machine 64bit. I run the first test application in the terminal and got the following message: "'java' is not recognized as an internal or external command, operable program or both file". So I had a look online and found …

Member Avatar for vishnu.khera.5
0
440
Member Avatar for Violet_82

Hi all, I am having a few problems with a css. Basically in my conditional css I need to target IE9 and below (IE9 included). Now, I have this: <!--[if IE 9]> ... <![endif]--> and <!--[if lt IE 9]> ... <![endif]--> Can I combine them together somehow? thanks

Member Avatar for Violet_82
0
65

The End.