Currantly trying to make a simple game but i cant get the renderer to repaint. My problem is that i used to make everything in 1 class... much simpler. But now im just not sure anymore. This is what i have so far... it just wont repaint. (Note i have a thread for now that calls the renderer in my gamethread class... the last class posted. ) my main class... package ballgame; import javax.swing.JFrame; /** * * @author jonathan */ public class BallGame { public static Renderer gamePainter; public static BallGame ballGame; public static Dimensions dimensions; public static GameThread gameThread; …

Member Avatar
Member Avatar
+0 forum 9

Hi Guys Just starting to make my first java game, im getting a few errors. Im just trying to figure a few things about about the game loops before i get started and this is driving me crazy when i just call the renderer to repaint after i initialize the jframe, it works... but once i put it in a loop.... (note this is not going to be my loop, i was just trying somthing out...) I get errors run: Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException Any input would be greatly appreciated. I dont understand what is null and why it …

Member Avatar
Member Avatar
+0 forum 11

Hi! I have developed a desktop application in java. Now I want to do payment integration with this app. Actually I have to do payment integration for first time in my life. So i have some questions/confusions for payment integration. But before asking those questions I tell you that what i want actually. I have many features in my app. I want that some a features available for free and some availabe after the user purchase my software Questions: 1:) I have no website and i have not hosted my software on any hosting website. Is it compulsory to have …

Member Avatar
Member Avatar
+0 forum 10

Hello, I'm writting a program to create a "Snake Game" in C#. What I want to do, is to constantly call the FOrm Paint Event Method to draw the snake and fruits in the form. I added a Timer that will call the Paint Event Method every 100ms. The thing is that I don't know how to do this. I don't know if it is the best approach but is my best idea. The paint event method, has code to add nodes to the linked list that represents the snake and draw them in the screen. Thanks in advance.

Member Avatar
Member Avatar
+0 forum 10

Hello there guys! I must implement a linked list in assembly (using MIPS). We're supposed to dynamically allocate memory for the nodes. This is what I am asked to do: Write a program in assembly (MIPS) that implements a link-list. The client can choose among the following options. So the program should include: 1. Insertion. Inserting new nodes at the correct spot keeping the list sorted in ascending order. 2. Deletion. Deleting a node, while still keeping the list in ascending order. 3. Printing in ascending order. Printing each node of the list from the first till the last one. …

Member Avatar
Member Avatar
+0 forum 3

Hello all, i need your help regaring this code, which is in python and i need to convert it into mips?? register $s0 holds the base address of list my_data, $s1 holds the length of the list my_data, register $s2 holds the base address of list my_data2 and $s3 holds the length of the list my_data2. def sum_to_x(x): sum = 0 for i in range (x): sum += i return sum my_data = [1, 3, 6, 7] my_data2 = [2, 1, 5] for i in range( len( my_data ) ): my_data[ i ] = sum_to_x( my_data[ i ] ) for …

Member Avatar
Member Avatar
-1 forum 6

Use a **for** loop to find the smallest integer n such that n^3 is greater than 1000 So I came out with below code public class Chapter4 { static int n = 0; public static void main(String[] args) { for (int i = 1; Math.pow(i, 3) <= 1000; i++) { n = i; } System.out.println("Smallest i is " + n); } } I get value answer 21 which looked like not the smallest integer. What is wrong with my logic ? I thought the value n should be 10 ?

Member Avatar
Member Avatar
+0 forum 8

So for this program im trying to print out the max height the projectile reaches and when i run the __str__ on the object it dosent change the value to the string and just gives a garbage result. the program als o prints some other vaulues but my problem is with the max height portion from math import sin, cos, radians class Projectile: """Simulates the flight of simple projectiles near the earth's surface, ignoring wind resistance. Tracking is done in two dimensions, height (y) and distance (x).""" def __init__(self, angle, velocity, height): """Create a projectile with given launch angle, initial …

Member Avatar
Member Avatar
+0 forum 2

I have a question about the dining philosopher problem. This is not about homework. I seem to have solved it, does it actually relate to anything? Is there any software that actually requires it?

Member Avatar
Member Avatar
+0 forum 1

Write a program that displays all numbers divisible by 3 and 4 within a range entered by user. Display five numbers per line. Numbers are separated by exactly two spaces. This is my code public class Chapter4 { public static void main(String[] args) { Scanner input = new Scanner(System.in); final int NUMBER_OF_PRIMES_PER_LINE = 5; int count = 0; int[] vars = new int[10]; for (int i = 0; i < vars.length; i++) { System.out.println("Enter " + (i + 1) + " numbers: "); vars[i] = input.nextInt(); if ((vars[i] % 3 == 0) && (vars[i] % 4 == 0)) { count++; …

Member Avatar
Member Avatar
+0 forum 25

So, i'm working on a layout that has to be in xhtml.. i changed the extension from html > xhtml and i got this prompt.. "This page contains the following errors: error on line 15 at column 8: Opening and ending tag mismatch: link line 0 and head Below is a rendering of the page up to the first error" <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <title></title> <meta name="description" content=""> <meta name="viewport" content="width=device-width"> <link rel="stylesheet" href="fonts.css"> <link rel="stylesheet" href="normalize.min.css"> <link rel="stylesheet" href="main.css"> </head> <body> <section> <header> <!-- TOP SECTION OF THE LETTER --> <div id="name-address-from"> …

Member Avatar
Member Avatar
+0 forum 2

Preconditions: Addresses of 2 integer variables are on the stack as the parameters. Sample c call: swap( &num1, &num2); You must implement the following C swap function: /* Swaps the two values pointed to by x_ptr and y_ptr. */ void swap (int *x_ptr, int *y_ptr) { if (x_ptr != y_ptr) { *x_ptr ^= *y_ptr; /* note that ^ means xor */ *y_ptr ^= *x_ptr; *x_ptr ^= *y_ptr; } } Postconditions: The values of the two integer parameters have been exchanged.

Member Avatar
Member Avatar
+0 forum 6

Sir Please help me about MenuStrip Control used. I create a project there one parents form and two child form MenuStripControl-1 is on parents form (main_form) Menu Item name a) Trans. b)Report c) Setting and MenuStripControl-2 is on child form (purchase_Entry_Form) Menu Item name a) File. b)Close I want to when start the application (parents form (main_form)) then show MenuStripControl-1 menu Items only. But when run the child form (purchase_Entry_Form) then show MenuStripControl-2 menu Items only. After closing child form(purchase_Entry_Form) then re show the parents form (main_form) MenuStripControl-1 menu Items only. It is possible please help me sir... What I …

Member Avatar
Member Avatar
+0 forum 13

Hi DW. Is there anyone know how to detect a pre-recorded sound on an audio? What I mean is taking a face detection as an example. To recorgnize that face you need to first have the image you want to use to match or compare with on other image or the image you want to find from other images, there are examples of that using OpenSURF, as well as OpenCV. But in my case I want to find a sound/audio within an audio. What I mean is that let say I have a pre recorded audio or special sound and …

Member Avatar
Member Avatar
+0 forum 10

Hi guys have a python software that i want to freeze for distribution. The problem is after freezing it with cx_freeze and i run it, it works fine on my development computer but when i sent it to my testing computer (window XP sp3 32bit) it give me this error Traceback(mostresent call last): File "C:Python27\lib\site-packages\cx_Freeze\initscripts\Console.py", line27, in <module? File "timeTracker.py", line 555, in <module> File "timeTracker.py", line 381, in __init__ File "timeTracker.py", line 427, in runTimeThread File "timeTracker.py", line 494, in __init__ File "timeTracker.py", line 118, in __init__ File "C:Python27\lib\site-packages\pyttsx1.1-py2.7.egg\pyttsx\__init__.py", line 39, in init File "C:Python27\lib\site-packages\pyttsx1.1-py2.7.egg\pyttsx\engine.py", line 45, in __init__ …

Member Avatar
Member Avatar
+0 forum 9

For all the above functions i get "`*****' was not declared in this scope". I searched days for an answer to find out what am i doing wrong, and what do i have to do to make it work, but all i could find, peaople saying: it depends on the os, compiler, etc So i will tell you what i'm using: Windows XP SP3, VS 2005 and sometimes wxDev-C++ I'm sure this can be fixed, but i don't know it how, because there are no proper answers to this, only a BUNCH of questions. If the above functions aren't good, …

Member Avatar
Member Avatar
+0 forum 3

Following is a matrix multiplication code written in MPI (Message Passing Interface) which could be run on CPU cluster for parallel processing. This has been successfully tested with two square matrices, each of the size 1500*1500.

Member Avatar
Member Avatar
+1 forum 6

[B]Intro[/B] This tutorial provides a brief introduction to the random number functions that come as part of the C++ standard library, namely rand() and srand(). [b]rand() and RAND_MAX [/b] The C++ standard library includes a pseudo random number generator for generating random numbers. In order to use it we need to include the <cstdlib> header. To generate a random number we use the rand() function. This will produce a result in the range 0 to RAND_MAX, where RAND_MAX is a constant defined by the implementation. Here's a piece of code that will generate a single random number: [code]#include <cstdlib> #include …

Member Avatar
Member Avatar
+2 forum 46

Is it possible to store a certain function as a variable? If not, is it okay to make a class, and define a function. Store the class as the variable and invoke that function?

Member Avatar
Member Avatar
+1 forum 5

Hello Evreryone, I am new here and would love some help with a project I have. I have to create a MIPS program where we implement different funcntions. I was able to do strcopy but Im having trouble finding how to code the strchr, strcmp, and memset functions. Unfortunately I am new to MIPS and do not know how the funcntions are written. Could anyone show me how to write the code or some code examples for the three library functions please? The functions will be called by a test file so no main is needed. Thanks for all the …

Member Avatar
Member Avatar
+0 forum 1

I am trying to a % in a printf statement represent 10%. How do I do that? My compiler warnings are complaining about it. I tried a backslash but that didn't work. printf(" 10\% of people \n");

Member Avatar
Member Avatar
+0 forum 1

Hello, this is my first post here. I'm playing around with Gtk+ and Xlib. I'm trying to get the X window ID of the active window, and then display that ID in a Gtk label. However, when I run it, it seg faults. I've narrowed it down to `XGetInputFocus`, but I'm stuck, because it seems like I'm supplying it with the parameter types it needs. All three parameters are `*Display`, `*Window` and `*int`, which is what I'm supplying it, according to https://tronche.com/gui/x/xlib/input/XGetInputFocus.html 1. What am I doing wrong? 2. Also, when I compile with `gcc -Wall `pkg-config --cflags gtk+-3.0` -o …

Member Avatar
Member Avatar
+0 forum 1

I am trying to write some symmetric cryptography for holding an FtpCredential in the database, unfortunately I am having a few problems, one of which is getting back gobbley gook from a crypto decoder. I have trimmed it down to just the bare minimum code. Please look at the SetPassword method and the GetPassword method. /*Author: Cameron Block*/ using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Security.Cryptography; using System.IO; using System.Net; using System.Diagnostics; using System.Configuration; namespace Reporting.Models { /// <summary> /// FtpCredential stores passwords in the database, and uploads files to remote FTP sites. /// </summary> public …

Member Avatar
Member Avatar
+0 forum 1

I am creating a reporting engine, it is kind of novel. **The only question I have is what are some of the wierder scheduling related things you guys have seen for you cyclical computer programs to date**. I am trying to cover as many fringe cases as I can, and just want a little bit of input. This would be fringe cases for example scheduling a quarterly report to be delivered 4 times a year etc.

Member Avatar
Member Avatar
+0 forum 6

Hi, I want to find all the words(scabble words) that can be made out of given set of letters. ex: abnana results: a aa ab an baa ban banana na nab How could i achieve this? Do i need a binary tree? Plz some one help me...

Member Avatar
Member Avatar
+0 forum 15

how to reverse words in a sentence without using split or string tokenizer. I/p :- how are you O/p :- you are how

Member Avatar
Member Avatar
+0 forum 16

Is there any method in java to generate random number (integer, byte or float). please tell me if any i need it in my program. if possible please give full example. thanks.

Member Avatar
Member Avatar
+1 forum 12

I have a web application I am trying to obfuscate portions of it, but use library mode so that all the public portions of the application should appear with names unchanged so it is accessible to the web. So I am trying to obfuscate some parts and not others. The sites I have visited appear to support it but I am getting an exception: [Click Here](https://www.preemptive.com/dotfuscator/pro/userguide/en/protection_library_mode.html) Here is my Dotfuscator.xml file which is on the root of the project. <?xml version="1.0" encoding="utf-8" standalone="no"?> <!DOCTYPE dotfuscator SYSTEM "http://www.preemptive.com/dotfuscator/dtd/dotfuscator_v1.1.dtd"> <dotfuscator version="1.1"> <propertylist> <property name="SourceDirectory" value="This Path Will Be Replaced By Visual Studio" …

Member Avatar
Member Avatar
+0 forum 3

We have an Access mdb database originally built in the late 90s. We currently use MS Access 2000 on Win7. Since switching to win7 from XP the database keeps getting locked and corrupted and we are unable to open it. We then have to revert to backup copies made days before and lose lots of data. The database is around 36mb. So does anyone know; A) Is there any way to repair these locked/corrupted mdb files so we don’t lose data every time this happens. And B) why this issue may be occurring in the first place. Are there known …

Member Avatar
Member Avatar
+0 forum 4

Hello i am getting these error node sass could not find a binding for your current environment windows 64-bit with unsupported runtime (59) when i am typing `ionic serve` on my command prompt does anyone knows how can i fix it?

Member Avatar
Member Avatar
+0 forum 1

The End.