Win a copy of Bad Programming Practices 101 (e-book) this week in the Beginning Java forum!

Rocky Rocha

Ranch Hand
+ Follow
since Jul 11, 2017
Rocky likes ...
Android Chrome Python
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Rocky Rocha

I'm trying to set up a site where users can upload images, select tags, and allow others to view them. I wants tags to be something like this.

How would I do this in a sqlite database. I also need my table to store the file path, the date it was created. I also don't want there to be predetermined tags. There should also be a way to do an other category and make it searchable.
1 month ago
I want to create a program that lets me roll dice. I am wondering how I can get a python script to read a string as a dice pattern. For example, I want the script to recognize 3d4+2 as Roll a 4 sided die 3 times, and add 2 to the sum. Is there an easy way to do this? I also want it to see 3d4*2 as Roll a 4 sided die 3 times and multiply the sum by 2.
1 month ago
I want to create a bash command with the following structure.

PATTERN is the roll (e.g. 4d6+3, 10d4-5, 3d8*2, 1d12/3). How would I write a bash script to do this?
1 month ago
First, I don't know.
Second, I checked for native syntax errors, and found none. Not to mention that this code is taken directly from a tutorial on the matter.
Here is my error:

const { format } = require('util');

SyntaxError: Unexpected token {
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:374:25)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/home/gamingtimelord19/Roller Bot/node_modules/winston/lib/winston.js:9:16)
    at Module._compile (module.js:410:26)
    at Object.Module._extensions..js (module.js:417:10)

here is my code:

My code is fine, I debugged it. Anyone know what's going on?
Below is an image of what I want it to do. Just a basic idea of what I want.
5 months ago
Well, first of all I would draw rooms, both square and round. Then I would draw paths between those rooms. Then, I would create paths between the already existing paths . Finally I would Clean it up and make it look better.

I have no experience with AI, and if I need to learn it, could you direct me to a tutorial? I have looked myself, but I haven't found any good one for Java.
5 months ago
I would want an app so I could be notified when someone responds to my posts or when someone likes my posts. Otherwise, I'm stuck periodically refreshing the page.
5 months ago
As the title says, why is there no app?
5 months ago
I am creating a dungeon crawler, based off of Dungeon Crawl Stone Soup, and I want to know how I would create a method that generates a 2d char array that when printed out, resembles a dungeon map. I want to use the following chars.

# for walls
. for floors
> for stairs going down
< for stairs going up
* for items

How would I accomplish this? I am completely new to random generation, so I don't know. I am using JavaFX, so I don't know how that would affect the process.
5 months ago
I have it set so that it WILL always have a selected item, as the default is set to index 0. Either way, that is not the problem at hand. I cannot get it to change the panel. That is what I need help with.
5 months ago
The cipherComboBox has only 2 items in it. Therefore, it will always be 0 or 1.
Also, I have just done the test and both panels work, it's just that when I change the selection, in turn changing the panel, it doesn't show up. But upon changing it back, the original panel is shown correctly.
5 months ago
I've followed every post, every guide, and every doc and I can't seem to find a solution to my problem. First, the code:

Second, the error:

I have no idea why this error is happening. I have all of ncurses installed, so I don't understand. BTW, I am using Linux Mint.
5 months ago
Sorry. I have a combobox and I want it to change to content of a jpanel to another jpanel and switch between them based on the selection. Currently, when I tell it to switch to the vigenereSettings panel, it works fine, but even after doing revalidate and repaint on the parent panel, caesarSettings doesn't show up. Here is the code I am using:

6 months ago
I have a JPanel called settingsContainer. Within that, there will be either a JPanel named caesarSettings, or vigenereSettings. vigenereSettings shows up just fine, but caesarSettings does not. At the start of the program vigenereSettings is in the settingsContainer, and caesarSettings is defined, but not used. I am using revalidate and repaint, but nothing works. Why is this?
6 months ago