Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
58% Quality Score
Upvotes Received
4
Posts with Upvotes
2
Upvoting Members
4
Downvotes Received
3
Posts with Downvotes
2
Downvoting Members
3
0 Endorsements
~6K People Reached
Favorite Forums
Favorite Tags
Member Avatar for pymatio

Hi everybody, I'm trying to make a program that goes through a directory and checks for broken links. Unfortunately it isn't working: [CODE] // Main.cs using System; using System.Collections.Generic; using Gtk; namespace LinkMonkey { class MainClass { public static void Main (string[] args) { bool cli = true; bool recursive …

0
53
Member Avatar for pymatio

Hi everyone, I'm trying to make a Space Invaders clone with pygame (python SDL library, if you hadn't guessed ;) ). The problem I'm having is that when the space invaders move down and change direction they break formation (some move left/right to far). Here is what I think is …

Member Avatar for pymatio
0
600
Member Avatar for pymatio

Hi, I'm trying to remake pacman with Mono & SdlDotNet, but I've hit a problem. I'm reading colour information off the screen that should stop pacman from going into the walls by setting the xSpeed & ySpeed to 0... But sometimes it goes into the walls and sometimes it stops …

0
66
Member Avatar for lewashby

I'M trying to switch from Windows to Ubuntu Linux. I'M trying to learn how to program and since I am also trying to move to Linux, thought that mono would be a good place for me to start. But I noticed when I installed mono ([url]http://www.mono-project.org[/url]), it said I needed …

Member Avatar for lewashby
0
67
Member Avatar for pymatio

I have been writing a program to backup files (attached). I've tried to add a new option that restores the last backup of all the files in a directory: [CODE] static void RestoreDirBackup(string filename) { string file = Path.GetFullPath(filename); string[] backups = Directory.GetFiles(BackupLocation + file); if(!Directory.Exists(file)){ Directory.CreateDirectory(file); } string lastfile …

Member Avatar for pymatio
0
131
Member Avatar for pymatio

I'm creating a media player with Qt & the phonon module: [CODE] #include "mainwindow.h" #include "ui_mainwindow.h" #include <fstream> #include <string.h> #include <stdlib.h> #include <QtGui> void MainWindow::slotFinished(){ int index = sources.indexOf(mediaObject->currentSource()) + 1; mediaObject->enqueue(sources.at(index)); setLabelNowPlaying(); } std::string ExtractFilename( const std::string& path ) { return path.substr( path.find_last_of( '/' ) +1 ); } …

0
147
Member Avatar for pymatio

This program hangs when trying to generate fixtures when the table is empty: [CODE] using System; using Gtk; using Mono.Data.Sqlite; using System.IO; public partial class MainWindow: Gtk.Window { //SQLite variables static SqliteConnection DataConn; static SqliteCommand DataComm = new SqliteCommand(); static SqliteDataReader DataReader; string dsn; //tree_1 variables Gtk.TreeViewColumn name_1 = new …

Member Avatar for DdoubleD
0
208
Member Avatar for pymatio

Attached is a project that lets you control a sports league. If you enter these teams: [CODE] FOO A FOO B BAR BAZ [/CODE] & the restart the program it should print out something like this: [CODE] FOO A vs BAR FOO B vs BAZ [/CODE] but it doesn't it …

0
82
Member Avatar for pymatio

I have an idea for a gui application: 1) the user can enter the error they are getting &/or the programming language & the program will search a database for the error & display code, reasons for it 2) the user can enter something like "class" & "c++" into the …

Member Avatar for pymatio
1
56
Member Avatar for pymatio

I have this code: [icode] #include <unistd.h> #include <iostream> #include <string> #include <fstream> #include <stdio.h> #include <stdlib.h> #include <string.h> using namespace std; void add(char todo[], string priority, string home){ FILE *file; file = fopen(home.c_str(), "a"); fprintf(file, "%-50s| %-6s\n", todo, priority.c_str()); fclose(file); } void list(string home){ string line; fstream file(home.c_str(),ios::in); int …

Member Avatar for Ancient Dragon
0
230
Member Avatar for pymatio

Attached is the start of my Breakout clone, at the moment the ball should just bounce around a couple of times (smoothly) & then quit. But the ball bounces around with varying speeds and with jerky movements, why?

Member Avatar for pymatio
0
121
Member Avatar for pymatio

I have a file like this: [CODE] 2 | H| 2 | H| 2 | H| 2 | H| 2 | H| 2 | H| [/CODE] & this code to read it in: [CODE] f = fopen(p, "r"); char *t[100]; int i = 0; int i2 = 0; int n …

Member Avatar for mvmalderen
0
199
Member Avatar for pymatio

I have this code: [CODE] #include <stdio.h> #include <stdlib.h> #include <unistd.h> int main(int argc, char *argv[]){ char *s = getenv ("HOME"); FILE *f; int optchar; char line[300]; char p[100]; strcpy(p, s); strcat(p, "/todo.txt"); while ((optchar = getopt(argc, argv, "r:a:ldc")) != -1){ switch (optchar){ case 'a': f = fopen(p, "a"); fprintf(f, …

Member Avatar for Salem
0
93
Member Avatar for pymatio

I have this code: [CODE] import pygame from pygame.locals import * from sys import exit from random import randint from sys import argv from gameobjects.vector2 import Vector2 def Intersect(s1_x, s1_y, s2_x, s2_y, image): if (s1_x > s2_x - image.get_width()): if(s1_x < s2_x + image.get_width()): if(s1_y > s2_y - image.get_height()): if(s1_y …

Member Avatar for Clueless86
0
178
Member Avatar for pymatio

Does anyone have any game ideas I could do it pygame? So far I've done a breakout clone with special blocks that give you extra points or give you an extra ball

Member Avatar for Clueless86
0
156
Member Avatar for pymatio

I have the following files: [CODE] # add.py #!/usr/bin/env python import os import Cookie import hashlib import MySQLdb import cgi import cgitb; cgitb.enable() def showform(): reshtml = '''Content-Type: text/html\n <html> <body> <form action='add.py' method='post'> Name: <input type=text name=name size = 15><br> URL : <input type=text name=url size=30><br> <input type=submit value="Add"></form> …

Member Avatar for jlm699
0
72
Member Avatar for pymatio

I have this python file: [CODE] #!/usr/bin/env python import os import Cookie import hashlib import MySQLdb import cgi import cgitb; cgitb.enable() def showform(): reshtml = '''Content-Type: text/html\n <html> <body> <a href="register.py">Not a member? </a> <form action='login.py' METHOD=post> Username: <input type=text name=person value="New User" size = 15><br> Password: <input type=password name=pass …

0
49
Member Avatar for pymatio

I have this html: [CODE] <html> <body> <form action='super.py'> <input type=text name=person value="New User" size = 15> <input type=submit></form> </body> </html> [/CODE] & this python script: [CODE] <html> <body> <form action='super.py'> <input type=text name=person value="New User" size = 15> <input type=submit></form> </body> </html> matio@matio-desktop:~$ cat /var/www/py/super.py #!/usr/bin/env python import cgi …

Member Avatar for shadwickman
0
150
Member Avatar for pymatio

I'm using python & i am trying to match ";" in a line: [CODE] for page in css: f = open(page, "r") lines = f.readlines() count = 1 obcount = 0 ebcount = 0 probwithfile = False for line in lines: [B]if not re.match("^{$", line) or not re.match("^}$", line): if …

Member Avatar for pymatio
0
104
Member Avatar for pymatio

How would you count how many opening HTML tags there were & then closing tags in a line? eg [CODE] for line in something: for match in re.match("[I]opening_regex_here[/I]",line): # will match <H1> or <html> or whatever opentags += 1 for match in re.match("[I]closing_regex_here[/I]",line): # will match <H1> or </html> or …

Member Avatar for vegaseat
0
3K
Member Avatar for pymatio

I have the following script: [CODE] import sys import os import re pages = [] if len(sys.argv) > 1: for root, dirs, files in os.walk(sys.argv[1]): for f in files: filename = os.path.join(root, f) if (filename.endswith('.html')) or (filename.endswith('.htm')): pages.append(filename) for page in pages: f = open(page, "r") count = 1 for …

Member Avatar for pymatio
0
115