Hello, I'm having a hard time trying to get a certain part of my code to work. I have created an inventory application that displays system info prints software specs and hardware as well, of all computers on my domain. So far I have a list-box that populates on load of all the computers on my network, and now I would like to select a computer and display all system info in one tab and software in another tab and so on. Being a newbie sucks! I have researched and researched please help. I have a class called OSINfo that I'm trying to use to get the info but Im not able to call to to the class.
I've firstly started programming in C, and in C there's a great website that displays all of the basic libraries you can use, and covers all the parameters and examples of usage for any basic function(method) - http://www.cplusplus.com/reference/.
Basically I'm looking for a similar website for java, I want to know about what functions can be found so I can look into the options available in Java.
hi Guys can you help me what program that will help my school tnx <!-- s --><img src="{SMILIES_PATH}/icon_e_smile.gif" alt="" title="Smile" /><!-- s -->
I was hoping someone could help me with this. I am semi-experienced in coding, but I'll let you know if I don't understand something.
I want to make the drop down menus under the menu strip buttons have traits/names based on previously entered information from text boxes.
I'm trying to make a trading system for a game. So under the Trade tab, I would like it to list the names of the players that are entered manually in separate text boxes beforehand. Then, in each name, have the submenus generated by other previously entered information.
I hope this is explained well enough.
Thanks to all who reply! (If you need images, just request them)
I thought to drop Brandon a line that his Java programming tutorials on YouTube have been recommended for a class I am taking. We were surprised when our professor mentioned that Java was "kind of" a prerequisite for the class and passed along a link to BP videos. I'm through the first 12 and am quite pleased with how they are getting me into the language after more than 15 years away from it. Between the videos and Eclipse, I have more confidence that I thought possible after just one week.
Posted by: Alex - 01-13-2014, 02:58 PM - Forum: Request a Video
- No Replies
I have been following Java tutorials on Youtube posted under BrandonioProductions channel. They are really helpful. My question is that can you, BrandonioProductions, post videos on Encapsulation,Polymorphism, Abstraction please? I watched video on Inheritance which has been really helpful to clear the concept but did not find anything related to above 3 concenpts. As a Java newbie, I want to learn all four concepts of object oriented programming.
Many of the viewers of the website giveaway video have requested that I share the source code of the program used. In order to heed these requests and ensure that everyone knows that the giveaway is fair, here is the code for the website giveaway program.
Basically, it reads from a text file containing all the comments, parses the text file for usernames, and randomly selects one of them. Any forced waiting is simply for dramatic effect and time creation.
The winner selector:
[code2=java]import java.util.Scanner;
import java.util.Random;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.io.File;
public class comments
{
private static ArrayList<String> commentList;
private static ArrayList<String> removeList;
public static void main(String[] args)
{
System.out.println("Welcome to the giveaway calculator!");
System.out.println("This is for use by BrandonioProductions for his");
System.out.println("2013-2014 website giveaway! Press <ENTER> to begin");
Scanner waiter = new Scanner(System.in);
waiter.nextLine();
System.out.println("First, gathering YouTube comments, please wait.");
for (int i = 0; i < 5; i++)
{
System.out.print(".");
rest();
}
System.out.println();
commentList = new ArrayList<String>();
removeList = new ArrayList<String>();
//First, we need to read from the file
try
{
Scanner reader = new Scanner(new File("comments.txt"));
reader.useDelimiter(System.getProperty("line.separator"));
while (reader.hasNext())
{
String line = reader.next();
if (line.contains("week"))
{
//This is a username
int ind = line.indexOf("1 week ago");
String username = line.substring(0, ind);
if (commentList.contains(username))
removeList.add(username);
else
commentList.add(username);
}
}
reader.close();
}
catch (FileNotFoundException e)
{
e.printStackTrace();
}
System.out.format("We found %d entries! Press <ENTER> to continue", commentList.size());
waiter.nextLine();
System.out.println("Removing duplicate entries, please wait..");
for (String s : removeList)
commentList.remove(s);
for (int i = 0; i < 5; i ++)
{
System.out.print(".");
rest();
}
System.out.println();
System.out.println("We are good to go! Press <ENTER> to get the first winner!");
waiter.nextLine();
Random rnd = new Random();
int winner1 = rnd.nextInt(commentList.size());
System.out.format("The first winner has entry # of %d", winner1);
for (int i = 0; i < 5; i++)
{
System.out.print(".");
rest();
}
System.out.println();
System.out.format("The first winner is: \n %s \n", commentList.get(winner1));
System.out.println("Press <ENTER> to get the second winner!");
waiter.nextLine();
int winner2 = rnd.nextInt(commentList.size());
System.out.format("The second winner has entry # of %d", winner2);
for (int i = 0; i < 5; i++)
{
System.out.print(".");
rest();
}
System.out.println();
System.out.format("The second winner is: \n %s", commentList.get(winner2));
}
The text file is attached
[attachment=0]<!-- ia0 -->comments.zip<!-- ia0 -->[/attachment]
You can also find the program on Pastebin:
<!-- m --><a class="postlink" href="http://pastebin.com/DzLdPzGc">http://pastebin.com/DzLdPzGc</a><!-- m -->
Hello everyone! I'm trying to implement a funny version of the snake game posted on youtube by brandonioproduction , and I'm kind of stucked. The idea is to make the snake wobble after eating some fruits ( that in the end will be changed to beers <!-- s --><img src="{SMILIES_PATH}/icon_e_wink.gif" alt="" title="Wink" /><!-- s --> )
so by the move() when the snake is going direction.NORTH for example , the coordinates are (head.x , head.y -1) so it goes straight up.
I have to implement something that changes the head.x like this:
case Direction.NORTH:
newPoint = new Point(head.x -1, head.y - 1);
then
newPoint = new Point(head.x +1, head.y - 1);
then
newPoint = new Point(head.x -1, head.y - 1);
then
newPoint = new Point(head.x +1, head.y - 1);
so you get the idea here. The snake would zigzag in x axis when moving vertically. and of course also would zigzag in the y axis when going horizontally.