Programming, computers, etc. [Serious]

All things asdf (and anything else)
User avatar
Shai'tan
ASDF's Best Friend
ASDF's Best Friend
Posts: 26130
Joined: Fri Sep 14, 2007 12:14 pm
Location: Seven
Contact:

Re: Programming, computers, etc. [Serious]

Post by Shai'tan » Sat Apr 27, 2013 10:50 pm

Anonymously Famous wrote:Aren't properly made Sudoku boards supposed to only have one solution?
Probably, but it was a requisite in case the board had too few filled squares to have one solution.

I was looking at my games folder today and I was wondering what to play. Not really having an idea I wished that I could choose one at random. Then it hit me, what if I made a program that did just that? :o

So I did, didn't take too long thanks to google. I present to you a random game chooser:

Code: Select all

import java.util.List;
import java.util.ArrayList;
import java.util.Random;
import java.io.File;
import java.io.IOException;

public class randomSelect {
    
    List<String> fileFolder = new ArrayList<String>(1);
    String path;
    
    public static void main(String[] args) throws IOException{
        randomSelect work = new randomSelect();
        work.findFiles();
        work.startFile();        
        
    }
    
    public void findFiles(){
        path = "C:\\Users\\Shai'tan\\Desktop\\Games"; 
        String files;
        File folder = new File(path);
        File[] listOfFiles = folder.listFiles(); 
        
        for (int i = 0; i < listOfFiles.length; i++)
            {
                
                if (listOfFiles[i].isFile()) 
                    {
                        files = listOfFiles[i].getName();
                        if (files.endsWith(".lnk") || files.endsWith(".url"))
                            {
                                fileFolder.add(files);
                            }
                    }
            }
    }
    
    public void startFile() {
        try{String runFile;
        Random randomGenerator = new Random();
        int index = randomGenerator.nextInt(fileFolder.size());
        runFile = fileFolder.get(index);
        String[] runThis = {"cmd", "/C",
            "start \"\" \"C:\\Users\\Shai\'tan\\Desktop\\Games\\"+runFile+"\""};
        Process p = Runtime.getRuntime().exec(runThis);
        }catch(Exception e){
            e.printStackTrace();}
    }
}
The way it works:
1. Have a folder with shortcuts for games. (They usually end with .lnk or .url (Steam) )
2. Set the path to said folder equal to the path String in the program, add a \ for each \ in the path.
3. Javac randomSelect
4. Java randomSelect

findFiles is something I found on the internet, so I take no credit for that.
Quote of the Ages:
atomtengeralattjaro wrote:The Forums of ASDF turn, and Pages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Page that gave it birth comes again. On one Page, called the Six Hundred and Ninety Fifth Page by some, a Page yet to come, a Page long past, a post was made by atomtengeralattjaro. The post was not the beginning. There are neither beginnings nor endings to the turning of the Forums of ASDF. But it was a beginning.

User avatar
atomtengeralattjaro
Site Admin
Site Admin
Posts: 35622
Joined: Wed May 23, 2007 3:43 pm
Location: green
Contact:

Re: Programming, computers, etc. [Serious]

Post by atomtengeralattjaro » Sun Apr 28, 2013 8:56 am

that's cool! :)
it could also be done with a batch file or script, though. (Not sure how, i'm not big on shell programming but it's definitely doable)
Ivokyuftaf6666 wrote:
Sun Oct 20, 2019 5:22 pm
Awesome Site, Delivering Fun
Image

User avatar
assdef
JKL;'s Nightmare
JKL;'s Nightmare
Posts: 7050
Joined: Sat Jan 02, 2010 9:30 pm

Re: Programming, computers, etc. [Serious]

Post by assdef » Sun Apr 28, 2013 4:44 pm

A program used to select a program?

Prograception?
Image

User avatar
atomtengeralattjaro
Site Admin
Site Admin
Posts: 35622
Joined: Wed May 23, 2007 3:43 pm
Location: green
Contact:

Re: Programming, computers, etc. [Serious]

Post by atomtengeralattjaro » Sun Apr 28, 2013 5:35 pm

lots of programs use other programs to program the thing they are programmed to do.
Ivokyuftaf6666 wrote:
Sun Oct 20, 2019 5:22 pm
Awesome Site, Delivering Fun
Image

User avatar
Shai'tan
ASDF's Best Friend
ASDF's Best Friend
Posts: 26130
Joined: Fri Sep 14, 2007 12:14 pm
Location: Seven
Contact:

Re: Programming, computers, etc. [Serious]

Post by Shai'tan » Sun Apr 28, 2013 9:25 pm

atomtengeralattjaro wrote:that's cool! :)
it could also be done with a batch file or script, though. (Not sure how, i'm not big on shell programming but it's definitely doable)
Probably and a lot easier too, but I decided to do it in Java, though it's harder since it's meant to be multiplatform.
Quote of the Ages:
atomtengeralattjaro wrote:The Forums of ASDF turn, and Pages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Page that gave it birth comes again. On one Page, called the Six Hundred and Ninety Fifth Page by some, a Page yet to come, a Page long past, a post was made by atomtengeralattjaro. The post was not the beginning. There are neither beginnings nor endings to the turning of the Forums of ASDF. But it was a beginning.

User avatar
atomtengeralattjaro
Site Admin
Site Admin
Posts: 35622
Joined: Wed May 23, 2007 3:43 pm
Location: green
Contact:

Re: Programming, computers, etc. [Serious]

Post by atomtengeralattjaro » Sun Apr 28, 2013 10:05 pm

speaking of java,
my applet game university project is nearly complete, and i'll show it to you guys when it's ready. (at least those of you who are close enough to play without much lag)

until then, here's a screenshot:
gameplay_ctf_2013-04-28.png
gameplay_ctf_2013-04-28.png (468.86 KiB) Viewed 4848 times
yes, it's a multiplayer top-down shooter about bugs with guns :) i still don't have a name for it though, i thought of "Bug War", but apparently there is already a game with that name (it's a neat strategy game in flash). Any name suggestions?
Ivokyuftaf6666 wrote:
Sun Oct 20, 2019 5:22 pm
Awesome Site, Delivering Fun
Image

User avatar
Shai'tan
ASDF's Best Friend
ASDF's Best Friend
Posts: 26130
Joined: Fri Sep 14, 2007 12:14 pm
Location: Seven
Contact:

Re: Programming, computers, etc. [Serious]

Post by Shai'tan » Sun Apr 28, 2013 11:13 pm

That looks awesome! :D

Don't know about name though, it's kinda hard to come up with something that isn't already used somewhere too.
Quote of the Ages:
atomtengeralattjaro wrote:The Forums of ASDF turn, and Pages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Page that gave it birth comes again. On one Page, called the Six Hundred and Ninety Fifth Page by some, a Page yet to come, a Page long past, a post was made by atomtengeralattjaro. The post was not the beginning. There are neither beginnings nor endings to the turning of the Forums of ASDF. But it was a beginning.

User avatar
ThingerDudes
ASDF Warlord
ASDF Warlord
Posts: 20868
Joined: Sun Apr 12, 2009 4:12 am
Location: close enough.

Re: Programming, computers, etc. [Serious]

Post by ThingerDudes » Sun Apr 28, 2013 11:51 pm

"Top Down Shooter Game With Bugs But Not The Computer Kind Hopefully"

I am great at coming up with names.
Image

User avatar
Shai'tan
ASDF's Best Friend
ASDF's Best Friend
Posts: 26130
Joined: Fri Sep 14, 2007 12:14 pm
Location: Seven
Contact:

Re: Programming, computers, etc. [Serious]

Post by Shai'tan » Mon Apr 29, 2013 12:05 am

It should definitely be an anagram, possibly of BUG(S).
Quote of the Ages:
atomtengeralattjaro wrote:The Forums of ASDF turn, and Pages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Page that gave it birth comes again. On one Page, called the Six Hundred and Ninety Fifth Page by some, a Page yet to come, a Page long past, a post was made by atomtengeralattjaro. The post was not the beginning. There are neither beginnings nor endings to the turning of the Forums of ASDF. But it was a beginning.

User avatar
atomtengeralattjaro
Site Admin
Site Admin
Posts: 35622
Joined: Wed May 23, 2007 3:43 pm
Location: green
Contact:

Re: Programming, computers, etc. [Serious]

Post by atomtengeralattjaro » Mon Apr 29, 2013 7:58 am

Gubs? Sugb?
Ivokyuftaf6666 wrote:
Sun Oct 20, 2019 5:22 pm
Awesome Site, Delivering Fun
Image

User avatar
Anonymously Famous
JKL; Assassin
JKL; Assassin
Posts: 11413
Joined: Thu Mar 03, 2011 6:52 pm
Location: Area ???, under Bermuda Triangle

Re: Programming, computers, etc. [Serious]

Post by Anonymously Famous » Mon Apr 29, 2013 8:08 pm

That game selector would have been fairly trivial to program in Python.

Bugs ultimate graph shooter.
BOTTOM TEXT
ThingerDudes wrote:The only reasonable amount of Nutella is infinity. Everything else is too little.
Proud poster of the 300kth post in General

User avatar
Shai'tan
ASDF's Best Friend
ASDF's Best Friend
Posts: 26130
Joined: Fri Sep 14, 2007 12:14 pm
Location: Seven
Contact:

Re: Programming, computers, etc. [Serious]

Post by Shai'tan » Mon Apr 29, 2013 8:20 pm

Anonymously Famous wrote:That game selector would have been fairly trivial to program in Python.

Bugs ultimate graph shooter.
And probably in a lot of other programming languages, but I really only know Java :shaiface:

Big Underground Graphic Shooter.
Quote of the Ages:
atomtengeralattjaro wrote:The Forums of ASDF turn, and Pages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Page that gave it birth comes again. On one Page, called the Six Hundred and Ninety Fifth Page by some, a Page yet to come, a Page long past, a post was made by atomtengeralattjaro. The post was not the beginning. There are neither beginnings nor endings to the turning of the Forums of ASDF. But it was a beginning.

User avatar
Anonymously Famous
JKL; Assassin
JKL; Assassin
Posts: 11413
Joined: Thu Mar 03, 2011 6:52 pm
Location: Area ???, under Bermuda Triangle

Re: Programming, computers, etc. [Serious]

Post by Anonymously Famous » Mon Apr 29, 2013 10:32 pm

I should maybe try to get back into Java. It's been a long time.

Bugs Unite! Gun Shooter
BOTTOM TEXT
ThingerDudes wrote:The only reasonable amount of Nutella is infinity. Everything else is too little.
Proud poster of the 300kth post in General

User avatar
atomtengeralattjaro
Site Admin
Site Admin
Posts: 35622
Joined: Wed May 23, 2007 3:43 pm
Location: green
Contact:

Re: Programming, computers, etc. [Serious]

Post by atomtengeralattjaro » Tue Apr 30, 2013 7:38 am

Java 8 may include lambda expressions:
http://blog.jthoenes.net/2012/08/03/jav ... bda-water/
Ivokyuftaf6666 wrote:
Sun Oct 20, 2019 5:22 pm
Awesome Site, Delivering Fun
Image

User avatar
Anonymously Famous
JKL; Assassin
JKL; Assassin
Posts: 11413
Joined: Thu Mar 03, 2011 6:52 pm
Location: Area ???, under Bermuda Triangle

Re: Programming, computers, etc. [Serious]

Post by Anonymously Famous » Tue Apr 30, 2013 2:21 pm

That might be cool. I wish it had generators.
BOTTOM TEXT
ThingerDudes wrote:The only reasonable amount of Nutella is infinity. Everything else is too little.
Proud poster of the 300kth post in General

User avatar
atomtengeralattjaro
Site Admin
Site Admin
Posts: 35622
Joined: Wed May 23, 2007 3:43 pm
Location: green
Contact:

Re: Programming, computers, etc. [Serious]

Post by atomtengeralattjaro » Tue Apr 30, 2013 2:27 pm

what are those?

(how about Bug Fight (or Bugfight) as a game name?)
Ivokyuftaf6666 wrote:
Sun Oct 20, 2019 5:22 pm
Awesome Site, Delivering Fun
Image

User avatar
Shai'tan
ASDF's Best Friend
ASDF's Best Friend
Posts: 26130
Joined: Fri Sep 14, 2007 12:14 pm
Location: Seven
Contact:

Re: Programming, computers, etc. [Serious]

Post by Shai'tan » Wed May 01, 2013 10:55 am

Bug( )Fight sounds nice. Bugs with Guns is also kinda nice.
Quote of the Ages:
atomtengeralattjaro wrote:The Forums of ASDF turn, and Pages come and pass, leaving memories that become legend. Legend fades to myth, and even myth is long forgotten when the Page that gave it birth comes again. On one Page, called the Six Hundred and Ninety Fifth Page by some, a Page yet to come, a Page long past, a post was made by atomtengeralattjaro. The post was not the beginning. There are neither beginnings nor endings to the turning of the Forums of ASDF. But it was a beginning.

User avatar
assdef
JKL;'s Nightmare
JKL;'s Nightmare
Posts: 7050
Joined: Sat Jan 02, 2010 9:30 pm

Re: Programming, computers, etc. [Serious]

Post by assdef » Fri May 03, 2013 5:49 pm

The question is...can they contain Lambda Lambda Lambda expressions?

Image
Image

User avatar
Anonymously Famous
JKL; Assassin
JKL; Assassin
Posts: 11413
Joined: Thu Mar 03, 2011 6:52 pm
Location: Area ???, under Bermuda Triangle

Re: Programming, computers, etc. [Serious]

Post by Anonymously Famous » Mon May 06, 2013 7:32 pm

atomtengeralattjaro wrote:what are those?
http://wiki.python.org/moin/Generators

You can get by without them, but they come in handy.
BOTTOM TEXT
ThingerDudes wrote:The only reasonable amount of Nutella is infinity. Everything else is too little.
Proud poster of the 300kth post in General

User avatar
atomtengeralattjaro
Site Admin
Site Admin
Posts: 35622
Joined: Wed May 23, 2007 3:43 pm
Location: green
Contact:

Re: Programming, computers, etc. [Serious]

Post by atomtengeralattjaro » Thu May 16, 2013 9:43 pm

I just found out about an off-road driving game that simulates mud. Holy shit, I mean, finally!
Ivokyuftaf6666 wrote:
Sun Oct 20, 2019 5:22 pm
Awesome Site, Delivering Fun
Image

Post Reply