Welcome, Guest
You have to register before you can post on our site.

Username/Email:
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 2,090
» Latest member: aamastopy7803
» Forum threads: 849
» Forum posts: 3,633

Full Statistics

Online Users
There are currently 12 online users.
» 0 Member(s) | 12 Guest(s)

Latest Threads
Database error anyone hel...
Forum: VB.NET
Last Post: Bobadilla
08-28-2017, 03:24 AM
» Replies: 1
» Views: 1,354
http://healthyboosterspro...
Forum: Random Discussion
Last Post: Casly
01-20-2017, 07:04 AM
» Replies: 0
» Views: 4,978
Turnkey Online Casino
Forum: Random Discussion
Last Post: AdemCot
11-28-2016, 04:05 PM
» Replies: 0
» Views: 3,945
Character ammount
Forum: Java
Last Post: brandonio21
04-28-2016, 02:13 PM
» Replies: 1
» Views: 4,632
RunAsAdmin
Forum: VB.NET
Last Post: brandonio21
04-15-2016, 11:11 AM
» Replies: 2
» Views: 5,687
Hangman in Rust
Forum: Other
Last Post: brandonio21
03-30-2016, 05:15 PM
» Replies: 0
» Views: 3,604
Krypton Toolkit Download
Forum: VB.NET
Last Post: brandonio21
03-28-2016, 07:55 PM
» Replies: 0
» Views: 1,919
Adding backgroundcolor to...
Forum: Java
Last Post: brandonio21
09-01-2015, 10:09 PM
» Replies: 1
» Views: 3,483
Using a string as an alia...
Forum: VB.NET
Last Post: brandonio21
06-20-2015, 09:00 PM
» Replies: 1
» Views: 3,289
Read all lines from multi...
Forum: VB.NET
Last Post: strawman83
06-04-2015, 08:54 AM
» Replies: 2
» Views: 2,879

 
  Java Videos on Youtube
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.

Thanks for posting videos in Youtube.

Print this item

  Website Giveaway Program
Posted by: brandonio21 - 01-06-2014, 11:12 AM - Forum: Code Snippets - No Replies

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));
}

public static void rest()
{
try
{
Thread.currentThread();
Thread.sleep(1000);
}
catch (Exception e) {}
}
}[/code2]

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 -->



Attached Files
.zip   comments.zip (Size: 5.58 KB / Downloads: 155)
Print this item

  Drunk_Snake Game PLEASE HELP!!
Posted by: andre2pi - 12-29-2013, 04:16 AM - Forum: Programming Help - Replies (2)

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 <!-- sWink --><img src="{SMILIES_PATH}/icon_e_wink.gif" alt="Wink" title="Wink" /><!-- sWink --> )
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.

Any Ideas are very welcome !!
cheers!

Print this item

  Help needed to recreate a vb6 program into vb2010
Posted by: icedemonzz - 12-15-2013, 08:20 AM - Forum: VB.NET (Visual Basic 2010/2008) - Replies (1)

i need some help to recreate this program into vb2010 it was coded in vb6 there are some changes i need to make to this program but im having some problems trying to recreate it
<!-- sArrow --><img src="{SMILIES_PATH}/icon_arrow.gif" alt="Arrow" title="Arrow" /><!-- sArrow --> heres the link on how the program works
https://drive.google.com/folderview?id=0...sp=sharing

<!-- sArrow --><img src="{SMILIES_PATH}/icon_arrow.gif" alt="Arrow" title="Arrow" /><!-- sArrow --> this link must be paste into c:/ beacuse the data frm the program is stored there
[url]
<!-- m --><a class="postlink" href="https://drive.google.com/folderview?id=0B0a_4emJ1XJmX0pXY1oxWVFJTkk&usp=sharing">https://drive.google.com/folderview?id= ... sp=sharing</a><!-- m -->[/url]

<!-- sArrow --><img src="{SMILIES_PATH}/icon_arrow.gif" alt="Arrow" title="Arrow" /><!-- sArrow --> here the link off my progress on how far im gone
[url]
<!-- m --><a class="postlink" href="https://drive.google.com/file/d/0B1Aag3Xqa7xqbWVHNFBRZVNrUms/edit?usp=sharing">https://drive.google.com/file/d/0B1Aag3 ... sp=sharing</a><!-- m -->[/url]
could some one advise me on how to remake this program

<!-- sArrow --><img src="{SMILIES_PATH}/icon_arrow.gif" alt="Arrow" title="Arrow" /><!-- sArrow --> you can email/skype/facebook if u willing to help me <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->

Print this item

  How to export Snake Game as a Runnable JAR file?
Posted by: bedigursimran - 11-19-2013, 10:01 PM - Forum: Programming Help - No Replies

Hi Guys.

I got the snake Game working great and I made a few changes to it too. And I was wondering if there is any way that I can save this as a 'Runnable Jar' file, so I can give it to my friend and try it without having Eclipse. Because it always give me an error like "couldn't find the main". I looked in the code provided by BrandonioProductions as well, and there wasn't any 'public static void main(String[] args)'.

Thanks,
Any help would be appreciatedSmile

Print this item

  Help finding problem
Posted by: gfb - 10-22-2013, 12:09 PM - Forum: Programming Help - Replies (1)

I have been following these tutorials but I can't seem to find the problem. I changed some names just so that it makes me think a little more.
Here is what i have:

Code:
public class digitextractor {
    int number = 0;
    String snumber = "";
    
    public digitextractor(int numberSequence) {
        int number = numberSequence;
    }
    
    public digitextractor(String numberSequence){
        snumber = numberSequence;
    }

    public void returnorder(){
        
        int integer1 = 0;
        int integer2 = 0;
        int integer3 = 0;
        int integer4 = 0;
        int integer5 = 0;
        
        integer1 = (number % 10);
        integer2 = (number % 100) / 10;
        integer3 = (number % 1000) / 100;
        integer4 = (number % 10000) / 1000;
        integer5 = (number % 100000) / 10000;
        
        System.out.println(integer1 + "\n" + integer2 + "\n" +
    integer3 + "\n" + integer4 + "\n" + integer5);
    }
    
    
    public void returnorderThroughString(){
        char part1;
        char part2;
        char part3;
        char part4;
        char part5;
        
        part1 = snumber.charAt(4);
        part2 = snumber.charAt(3);
        part3 = snumber.charAt(2);
        part4 = snumber.charAt(1);
        part5 = snumber.charAt(0);
        
        System.out.println(part1 + "\n" + part2 + "\n" + part3 + "\n" + part4 + "\n" + part5);
    }
}

Code:
import java.util.Scanner;
public class digitfinished {
    
    static Scanner input = new Scanner(System.in);

    public static void main(String[] args) {
        // process starts
        System.out.println("Welcome to this thing." + "\n" + "Enter your number");
        String in = input.nextLine();
        digitextractor product = new digitextractor(Integer.parseInt(in));
        product.returnorderThroughString();
        System.out.println("Using Strings");
        digitextractor output = new digitextractor(in);
        output.returnorderThroughString();
    }

}

Print this item

  Problems with dividing a string
Posted by: brco900033 - 10-19-2013, 12:09 PM - Forum: Programming Help - Replies (6)

I have already another question, I'm not asking how to do something for a change.

I have written something but it seems that it doesn't work properly and I don't know what the problem is.

The purpose of the code is to divide a key (length of key can varie) into parts of each 4 characters.
[code2=vbnet]Dim strings As New List(Of String)
'Just an example of the key, this string will be generated randomly
Dim s As String = "p6s0arJHmuOQmUhIczfnynRS1dOrRxYm0EF05b5Vk1YR7TQVItShNjFJQ1L3d"
Dim i As Integer = 0
Dim intMaxNumber As Integer = CInt(Math.Round((s.Length / 4), 0))
For i = 0 To intMaxNumber Step 4
strings.Add(s.Substring(i, 4))
Next
For Each srtininglist As String In strings
MessageBox.Show(srtininglist)
Next[/code2]
Everything goes fine when I debug it but it seems that the code only returns 4 parts, and it should (in this case) be about 16 parts.

I'm probably making a logical mistake but I can't figure out what I'm doing wrong.


Hope someone can help me out,
Brecht

Print this item

  Rename application file
Posted by: brco900033 - 10-12-2013, 06:25 AM - Forum: Programming Help - Replies (3)

Hi

Is there a way of renaming the application file itself while it is running? I saw somewhere a code snippet to do it and I think it is possible but I can't remember how.

Print this item

  Double Clickable
Posted by: justindude - 10-09-2013, 04:15 PM - Forum: Java - No Replies

How does one make a double clickable jar file so that it opens when you double click it and you don't have to go to the cmd to type java -jar jarfile.jar to send to people without jdk?

Print this item

  The forum is a mess - Let's fix it.
Posted by: brandonio21 - 09-20-2013, 11:06 PM - Forum: Computing - No Replies

Hey guys! I hope we're all doing well!

So I recently ran into a bunch of errors regarding an anti-spam mod I have been using for a bit. It turns out, my knowledge of phpBB is so minimal that updating the plugin(mod) caused the forum to die.

Well, this caused me to look into the forum's mySQL and FTP structures. They are a catastrophe.

Several years of uneducated modification has ruined the structure of the forum - so I am going to have to fix it. I am going to start by uninstalling all mods and starting from scratch. Keep in mind, users, posts, pictures, files, and all of our precious data shouldn't go anywhere. I will also be making regular backups.

With that being said, if you experience any forum downtime in the next few weeks - do not be alarmed! It is intentional! (More or less)

But - Do you guys have any suggestions for improvements for the forum? Theme suggestions? Ranking suggestions? Feature suggestions? Anything at all? Your contribution is much appreciated!


*Sorry for the crazy English - I am very tired.

Print this item