Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - ElementCoder

Pages: 1 [2] 3
16
Miscellaneous / Notch has lost his power
« on: February 28, 2013, 04:00:46 pm »
So mojam hit $500k and now this will happen:
http://instagram.com/p/WSYEhFpMNe/ D:

17
Computer Programming / Eclipse Android plugin
« on: February 25, 2013, 02:56:07 pm »
I don't know if this is the right place to put this, but here it is:
I want to start development for Android and found the ADT plugin for Eclipse. However, I can't seem to get the new android project option. I've installed ADT and some other plugins that supposedly fixed the problem, but none works for me. Does anyone have any experience with this? I'm a  bit lost :(

18
Computer Usage and Setup Help / Partitioning problem.
« on: February 17, 2013, 11:17:20 am »
I want to shrink a volume on my HDD so I can create another partition. It took very long so I though it wasn't doing anything and shut it down. Apparently I should not have done that because now it says "Logical Disk Manager: Acces denied" everytime after a while when I attempt to shrink. Is there any way to fix this that doesn't involve reformatting? I can't afford to lose the data on this disk.

19
Computer Usage and Setup Help / Installing linux
« on: February 08, 2013, 10:30:35 am »
I plan to install Mint as a dual boot on my old laptop since I can't find any new drives that fit. I'm completely new to installing a linux distro, only having used live boots before. The current OS is Windows Vista. I have two partitions C(windows) and D(empty). How would I install Mint on D without risking breaking my windows install and losing everything :P?

20
Computer Usage and Setup Help / Hosting server
« on: January 30, 2013, 02:04:53 pm »
I may want to set up a server in my home someday in the future and I was wondering what I would have to do. Things I have in mind:
  • SVN stuffs
  • Minecraft server
  • Possibility to host websites (is this possible?)
I've never set up a server or worked with it so I don't know what I should do soft- and hardware wise.

21
Computer Programming / Nullpointer exception
« on: January 25, 2013, 03:37:04 pm »
I have the following arrays:
Code: [Select]
JTextArea foxBA, foxMA, foxBP, foxMLS;
JTextArea[] textFox = {foxBA, foxMA, foxBP, foxMLS};
String[] label = {"Breeding Age: ", "Max Age: ", "Breeding Probability: ", "Max Litter Size: "};
I initialize them by doing:
Code: [Select]
for(int i = 0; i < textFox.length; i++){
tab2_fox.add(new JLabel(label[i]));
textFox[i] = new JTextArea(1, 5);
textFox[i].setText(Fox.getData().get(i).toString());
tab2_fox.add(textFox[i]);
}
However, when trying to get the text by doing
Code: [Select]
foxBA.getText() I get a NullPointerException. But when doing
Code: [Select]
textFox[0].getText() everything works fine. Why can't I acces the actual object, but can I acces it by using its array reference?

22
Other / The WiiU is powerful
« on: January 23, 2013, 03:11:12 pm »
There may be some discussion about how powerful the WiiU really is. Like the tile says it is, in its own way.

http://www.zeldainformer.com/news/comments/developers-have-it-wrong-the-wii-u-is-powerful-its-just-next-generation-pow

23
Art / Fruit
« on: January 03, 2013, 10:25:34 am »
Suddenly I found myself in the need for some delicious spriting, so I'm going to post my fruity pixels in this thread. Of course anyone is free to use them if he/she wants to (though I warn you, I'm not very good :P) Also if anyone has suggestions/critics on my work please say so, so I can work on improving my skills :)

My first try is attached below. It is supposed to be a pair of bananas :)

 :ninja:

24
Lua / Eat Nethams Lua Edition
« on: January 02, 2013, 11:05:53 am »
My first game in Lua has been released :D
You control a lobster hungry monster omnom (for which I really need a better sprite :P) who must stop the lobster army from invading his calculator :) It has an animated title screen and lots of lobsters.

Screenshots and tns attached below :)

Controls:
Movement: left/right or 4/6
Eat lobster: automatically :P
Reset: ESC
Start: enter
Increase/decrease lobster spawning: +/-

Changelog
1.0 - Initial release
1.01 - Changed timer from 1/30 to 0.03
1.02 - Fixed issues with monster hitbox. Changed lobster spawning. Fixed a few bugs (starting with lobster filled screen, having <100 lives, having >0 lobsters eaten).

To do:
* Improve the hitboxes for eating
* Get a decent sprite for the lobster eating monster

The lobster sprite is made by yeong, I plucked them from a topic which I can't seem to find anymore, I hope it's ok? :)

New version is up which hopefully fixes the crash.Crash is fixed, new version changes the spawn rate to a more playable state :)

Source code: https://github.com/ElementCoder/Eat-Nethams-Lua-Edition
Download: https://www.dropbox.com/s/abtt0bl32beapxd/EatNethams.tns

25
TI-Nspire / Protect your TI-Nspire CX (and more)
« on: December 20, 2012, 03:57:22 pm »
Protective Covers
You can now have a fancy calculator protector to style up your CX. Now for only $19.99.

The fancy blue one:
http://www.amazon.com/Guerrilla-Silicone-Instruments-Graphing-Calculator/dp/B00AMNSHB4?tag=dodotoday-20

Go netham style and support the pink lobsters:
http://www.amazon.com/Guerrilla-Silicone-Instruments-Graphing-Calculator/dp/B00AMNT9M0/ref=sr_1_12?s=electronics&ie=UTF8&qid=1356037173&sr=1-12

Go for green:
http://www.amazon.com/Guerrilla-Silicone-Instruments-Graphing-Calculator/dp/B00AMNTW04/ref=sr_1_9?s=electronics&ie=UTF8&qid=1356037173&sr=1-9

For other calcs as well: http://www.amazon.com/s/ref=bl_sr_electronics?_encoding=UTF8&field-brandtextbin=Guerrilla&node=172282

Slide cases
Broke your old slide case? Lost it? Or just want a new one?

Yummi yellow: http://www.amazon.com/TEXAS-INSTRUMENTS-NSPIRE-YELLOW-SLIDE/dp/B009FE367G/ref=sr_1_10?s=electronics&ie=UTF8&qid=1356037485&sr=1-10&keywords=nspire
Beloved blue: http://www.amazon.com/TEXAS-INSTRUMENTS-NSPIRE-SLIDE-COVER/dp/B009FE1VHS/ref=sr_1_11?s=electronics&ie=UTF8&qid=1356038627&sr=1-11&keywords=nspire

Thanks to CompSystems for pointing me to the blue rubber cover through which I found the other things :)

Other things are a bit weird though teacher software for $16 (second hand too :P) and a black slide case for $50 O_O

And for those heavy programs:

this should probably be in another section ?

26
Miscellaneous / 2012 Apocalypse Survivors
« on: December 20, 2012, 03:52:21 pm »
So the world is supposed to end in a few hours from now. Let's see if omni survives  :angel:. If not, then this will function as a kind of goodbye thread :P Hope I see you all tomorrow again :3 Else I die without knowing Lua D:
So how did/do you spend your last few hours here in this universe? I learned how to write an ArrayList to a file on my computer and did some random stuff:P

If this falls under spam, my apologies

27
Computer Programming / Inheritance
« on: December 10, 2012, 03:08:56 pm »
So I am in need of a little help here. There is the following problem:
Look at the following code. Assume there are five types (classes or interfaces) (U, G, B, Z and X) and one variable with each type.
Code: [Select]
U u;
G g;
B b;
Z z;
X x;
The following assignments are allowed (they compile):
Code: [Select]
u = z;
x = b;
g = u;
x = u;
The following assignments are NOT allowed:
Code: [Select]
u = b;
x = g;
z = u;
g = x;
The question:
What can you say, with the information you've gotten, about the types and their relations (how do they relate to each other?)

I'm pretty confused here so any help would be appreciated :)

28
Computer Programming / HTML to CSV
« on: November 07, 2012, 01:30:31 pm »
I am in need of converting HTML tables to a CSV file. I was thinking of something like:
1. Look for <table></table> and remove everything outside of it
2. Remove any formatting tags like <a href=> etc.
3. Somehow put every <tr> on  a new line and all <td> elements within that on the same line, seperated by a , (CSV :P)
Truth be told. I have no idea how to accomplish this.

29
Computer Programming / Reading files and processing contents
« on: November 06, 2012, 11:34:32 am »
I have a txt file with a few names of channel operators in it and I want to use it for my bot, so that if a command is ordered, first it checks if that person is op.
The txt file simply has each name on a seperate line. If I run the isOp() method in main outside of anything, it works fine. I can print out the names, check them, do whatever I want. But for some reason when using it in the bots class, it won't work.
It is supposed to return true when the name is found but the check in line 51 (isOp(sender)) doesn't seem to work. My name is in the file, but yet it does not enter the if statement. Am I doing something terribly wrong here?
Code: [Select]
package bot;

import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;

import org.jibble.pircbot.PircBot;

public class HelpBot extends PircBot{
public HelpBot(){
this.setName("AmA");
}

public void onJoin(String channel, String sender, String login, String hostname, String message){
if (!(sender.equalsIgnoreCase(this.getNick()))){
sendMessage(channel, "Hello "+sender+"! Enjoy your stay here :)");
}else{
sendMessage(channel, sender+" is up and running again :)");
}
}
public void onMessage(String channel, String sender, String login, String hostname, String message){
//Operator commands. Settings etc.
if (message.startsWith("!")){
//Owner only commands (me :P)
if (sender.equals("@tikker") || sender.equals("tikker")){
if (message.equalsIgnoreCase("!stop")){
System.out.println("Stopping AmA :(");
sendMessage(channel, "Out of fuel, all systems shutting down :(");
this.disconnect();
System.exit(0);
}
if (message.equalsIgnoreCase("!test")){
sendMessage(channel, "====== Running tests now ======");
sendMessage(channel, "====== Starting message test...");
sendMessage(channel, "Hello World!");
sendMessage(channel, "====== Starting PM test...");
sendMessage("Franz24", "Hi I'm AmA! Don't be scared, this is a test. Not some sort of attack :)");
sendMessage("Gorok", "Hi I'm AmA! Don't be scared, this is a test. Not some sort of attack :)");
sendMessage("Agent321", "Hi I'm AmA! Don't be scared, this is a test. Not some sort of attack :)");
sendMessage("tousent", "Hi I'm AmA! Don't be scared, this is a test. Not some sort of attack :)");
sendMessage("tikker", "Hi I'm AmA! Don't be scared, this is a test. Not some sort of attack :)");
sendMessage(channel, " ");
sendMessage(channel, "Tests succesfully ran");
sendMessage(channel, "====== Stopping tests ======");
}
}
//Regular OP commands
if (message.contains("!nick")){
System.out.println("Person "+sender+" tried to order !nick.");
try {
if (isOp(sender) == true){
System.out.println(sender+" changed AmA's nick.");
String newNick = message.substring(6);
this.changeNick(newNick);
}
} catch (FileNotFoundException e) {
e.printStackTrace();
}
}
if (message.equalsIgnoreCase("!topic")){
try {
if (isOp(sender)){
String newTopic = message.substring(8);
this.setTopic(channel, newTopic);
}
} catch (FileNotFoundException e) {
e.printStackTrace();
}
}
}
//User commands. Questions etc.
if (message.startsWith(">")){
if (message.equalsIgnoreCase(">AmA")){
sendMessage(sender, "I'm "+this.getNick()+" the question bot. I'm here to help you with questions about Galaxy55 :) I'm created by tikker. Should there be any trouble, contact him.");
}
if (message.equalsIgnoreCase(">wiki")){
sendMessage(sender, "The wiki can be found at http://www.galaxy55wiki.com");
}
}
}

public void onPing(String sourceNick, String sourceLogin, String sourceHostname, String target, String pingValue) {
sendMessage(sourceNick, "PONG");
System.out.println("Received PING from "+sourceNick+" sent PONG");
}

/*
* User defined methods
*/
//Checks if a name is listed in ops.txt
public static boolean isOp(String name) throws FileNotFoundException{
File opsFile = new File(System.getProperty("user.dir")+"\\src\\ops.txt");
Scanner scan = new Scanner(opsFile);
String line = scan.nextLine();

while (scan.hasNextLine() && line != name){
line = scan.nextLine();
System.out.println(line);
if (name == line){
System.out.println(line);
System.out.println(line == name);
return true;
}
}
return false;
}
}



30
Humour and Jokes / Multicolor domination
« on: October 23, 2012, 05:55:54 am »

Now with double the thread, omni has become an even more dangerous place to be 0.0 Their experiments have shown to be succesful.

Headcrabs are real D:

Pages: 1 [2] 3