Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 85 86 [87] 88 89 ... 91

Author Topic: Programming Help Thread (For Dummies)  (Read 100408 times)

Sappho

  • Bay Watcher
  • AKA Aira; Legendary Female Gamer
    • View Profile
    • Aira Plays Games
Re: Programming Help Thread (For Dummies)
« Reply #1290 on: July 14, 2014, 02:11:18 pm »

Thanks for all the info. I think I'm going to table this idea for now and hold on to it as a future project, because I won't have the time to both learn how to make such a site and also make it. Too many other things I need to get done this summer. Instead of worrying about a web site, I've designed a collectible card game instead. The kids will each get a starter pack, we'll play the game in class (it will force them to use English), and with the points they earn during lessons, they can buy booster packs. I'll also have them design their own cards, naming them and drawing pictures which I'll scan at home and add to the next set of booster packs. I made a mockup set of decks yesterday and tried it with my friends and it was a hit. I think it will work out well, and will be a more worthwhile use of my time to develop. We can just keep track of the points on paper for now, or in a simple way on our class web site. But I'll definitely be bookmarking that Bootstrap link for future use!

Valid_Dark

  • Bay Watcher
  • If you wont let me Dream, I wont let you sleep.
    • View Profile
Re: Programming Help Thread (For Dummies)
« Reply #1291 on: July 14, 2014, 03:28:46 pm »

That HabitRPG site is a good idea,

After I finish my current project, I may make a app like it for android.
Logged
There are 10 types of people in this world. Those that understand binary and those that don't


Quote
My milkshake brings all the criminals to justice.

Anvilfolk

  • Bay Watcher
  • Love! <3
    • View Profile
    • Portuguese blacksmithing forum!
Re: Programming Help Thread (For Dummies)
« Reply #1292 on: July 14, 2014, 08:00:19 pm »

Thanks for all the info. I think I'm going to table this idea for now and hold on to it as a future project, because I won't have the time to both learn how to make such a site and also make it. Too many other things I need to get done this summer. Instead of worrying about a web site, I've designed a collectible card game instead. The kids will each get a starter pack, we'll play the game in class (it will force them to use English), and with the points they earn during lessons, they can buy booster packs. I'll also have them design their own cards, naming them and drawing pictures which I'll scan at home and add to the next set of booster packs. I made a mockup set of decks yesterday and tried it with my friends and it was a hit. I think it will work out well, and will be a more worthwhile use of my time to develop. We can just keep track of the points on paper for now, or in a simple way on our class web site. But I'll definitely be bookmarking that Bootstrap link for future use!

Oh, that's actually a super neat idea!

dennislp3

  • Bay Watcher
    • View Profile
Re: Programming Help Thread (For Dummies)
« Reply #1293 on: July 19, 2014, 07:31:15 pm »

So this is probably...a bad question in general...

But I am starting to work on a project that I would like to be cross platform (though that is not entirely essential).

My big question is whether or not anyone has any experience with mono and/or monodevelop (outside of unity) and if anyone would recommend using it for making a cross platform project.

My other option right now would be to use visual studio and compile using different operating systems.
Logged

Angle

  • Bay Watcher
  • 39 Indigo Spear Questions the Poor
    • View Profile
    • Agora Forum Demo!
Re: Programming Help Thread (For Dummies)
« Reply #1294 on: July 20, 2014, 03:05:54 pm »

So I'm trying to make a jaascript script connect to a server and send things back and forth. The server side app is written in java though, and I don;t want to rewrite it. Can Node.js do what I want, or is there somewhere else I should look?
Logged

Agora: open-source platform to facilitate complicated discussions between large numbers of people. Now with test site!

The Temple of the Elements: Quirky Dungeon Crawler

Anvilfolk

  • Bay Watcher
  • Love! <3
    • View Profile
    • Portuguese blacksmithing forum!
Re: Programming Help Thread (For Dummies)
« Reply #1295 on: July 21, 2014, 01:02:14 pm »

This looks like a regular socket interface that works with javascript: http://socket.io/docs/

It apparently supports sending binary data, which is what BSON is, so hopefully it'll work! I don't think you need to use socket.io's server, only the clientside thing!

My Name is Immaterial

  • Bay Watcher
    • View Profile
Re: Programming Help Thread (For Dummies)
« Reply #1296 on: November 26, 2014, 02:43:05 am »

*Pokes thread*
Anyone here?
I'd like to utilize the following code, but I don't know what to install, how to plug it in, etc. Can anyone explain what I need to do to use it?
Code: [Select]
#!/usr/bin/python
import urllib
import urllib2
import re
import socket
import os
socket.setdefaulttimeout(30)
#adjust the site here
search_term="site:guyrutenberg.com"
def main():
    headers = {'User-Agent': 'Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4'}
    url = "http://www.google.com/search?q="+search_term
    regex_cache = re.compile(r'<a href="(http://\d*\.\d*\.\d*\.\d*/search\?q\=cache.*?)".*?>Cached</a>')
    regex_next = re.compile('<a href="([^"]*?)"><span id=nn></span>Next</a>')
 
    #this is the directory we will save files to
    try:
        os.mkdir('files')
    except:
        pass
    counter = 0
    pagenum = 0
    more = True
    while(more):
        pagenum += 1
        print "PAGE "+str(pagenum)+": "+url
        req = urllib2.Request(url, None, headers)
        page = urllib2.urlopen(req).read()
        matches = regex_cache.findall(page)
        for match in matches:
            counter+=1
            tmp_req = urllib2.Request(match.replace('&amp;','&'), None, headers)
            tmp_page = urllib2.urlopen(tmp_req).read()
            print counter,": "+match
            f = open('files/'+str(counter)+'.html','w')
            f.write(tmp_page)
            f.close()
        #now check if there is more pages
        match = regex_next.search(page)
        if match == None:
            more = False
        else:
            url = "http://www.google.com"+match.group(1).replace('&amp;','&')
 
if __name__=="__main__":
    main()
 
# vim: ai ts=4 sts=4 et sw=4
Source.
Thanks.

Skyrunner

  • Bay Watcher
  • ?!?!
    • View Profile
    • Portfolio
Re: Programming Help Thread (For Dummies)
« Reply #1297 on: November 26, 2014, 03:06:46 am »

Install Python 2, probably, then type into the terminal or Powershell

python [filename]

without the brackets. Should be saved as a .py code. It's the same as a regular program.
Logged

bay12 lower boards IRC:irc.darkmyst.org @ #bay12lb
"Oh, they never lie. They dissemble, evade, prevaricate, confoud, confuse, distract, obscure, subtly misrepresent and willfully misunderstand with what often appears to be a positively gleeful relish ... but they never lie" -- Look To Windward

My Name is Immaterial

  • Bay Watcher
    • View Profile
Re: Programming Help Thread (For Dummies)
« Reply #1298 on: November 26, 2014, 03:37:40 am »

Quote
python: The term 'python' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ python [filename]
+ ~~~~~~
    + CategoryInfo         : ObjectNotFound: (python:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
I did what you asked. It seems to work, but doesn't. Help?

HopFlash

  • Bay Watcher
    • View Profile
Re: Programming Help Thread (For Dummies)
« Reply #1299 on: November 26, 2014, 04:07:43 am »

with what *nix are you working?
Many have python preinstalled but it could be that it isn't installed in "/usr/bin" what would be a little surprise I think.

your file is executable? (chmod +x if I remember right)
Logged
GENERATION 11: The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experiment.

Inactive Therian Saga Char: Stormhead
Dominions: 4.03 Berytos; 4.06 Pangaea; 4.08 Arcoscephale; 4.11 Shinuyama
Inactive Wurm Online Char: Stormhead

My Name is Immaterial

  • Bay Watcher
    • View Profile
Re: Programming Help Thread (For Dummies)
« Reply #1300 on: November 26, 2014, 04:18:04 am »

with what *nix are you working?
Many have python preinstalled but it could be that it isn't installed in "/usr/bin" what would be a little surprise I think.

Windows peasant right here. I don't think the first or second points apply to me.

your file is executable? (chmod +x if I remember right)
I don't have a chmod button on my keyboard. Can I run the program? Yes.

Skyrunner

  • Bay Watcher
  • ?!?!
    • View Profile
    • Portfolio
Re: Programming Help Thread (For Dummies)
« Reply #1301 on: November 26, 2014, 05:37:32 am »

Are you sure you installed Python? :0
Logged

bay12 lower boards IRC:irc.darkmyst.org @ #bay12lb
"Oh, they never lie. They dissemble, evade, prevaricate, confoud, confuse, distract, obscure, subtly misrepresent and willfully misunderstand with what often appears to be a positively gleeful relish ... but they never lie" -- Look To Windward

HopFlash

  • Bay Watcher
    • View Profile
Re: Programming Help Thread (For Dummies)
« Reply #1302 on: November 26, 2014, 05:46:49 am »

ah...ok...it looked for me like you were working with some *nix system :)

as this is not then you shouldn't think about what I wrote before ;)

if you install Python with the normal setup like https://www.python.org/ftp/python/2.7.8/python-2.7.8.msi (32bit) or https://www.python.org/ftp/python/2.7.8/python-2.7.8.amd64.msi (64bit) you should be able to execute Python programs :)

here is a more complicate way to execute it if doubleclicking doesn't work:
If you had done the installation open a commandlinewindow (press Windows-Start-Button and type "cmd" then you should get "cmd.exe"). In there type "python". then you should see something like "Python 2.7.8 (default, .......".

If yes then type "exit()". Go into the directory where your python program/tool is with "cd C:\my\path\to\the\tool" and type "python toolname.py" ("toolname.py" is the filename of your script).

if no then go into the python-directory where you installed it like "cd C:\Python27" and then type "python c:\my\path\to\the\tool\toolname.py" (and here too you should replace the path and filename like it is on your machine).

then I hope it will work :)
Logged
GENERATION 11: The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experiment.

Inactive Therian Saga Char: Stormhead
Dominions: 4.03 Berytos; 4.06 Pangaea; 4.08 Arcoscephale; 4.11 Shinuyama
Inactive Wurm Online Char: Stormhead

eerr

  • Bay Watcher
    • View Profile
Re: Programming Help Thread (For Dummies)
« Reply #1303 on: November 26, 2014, 07:26:24 am »

https://dl.dropboxusercontent.com/u/19360805/FlapsterZip.unitypackage
Can anyone debug my Unity project?

I need Removal Trigger to destroy the rockPair However- only the player seems to properly collide with the rocks.
Logged

My Name is Immaterial

  • Bay Watcher
    • View Profile
Re: Programming Help Thread (For Dummies)
« Reply #1304 on: November 26, 2014, 12:39:48 pm »

Are you sure you installed Python? :0
Yes. 100% sure.

-snip-
All it's spitting out is
Code: [Select]
>>>
PAGE 1: http://www.google.com/search?q=site:[sitename]
>>>
What do I do now?
Pages: 1 ... 85 86 [87] 88 89 ... 91