homework

Java: Simple Combination of a set of element of k order

Hi, I have a set of numbers {'1','13','25','32','49',...}, i want to calculate all possible combinations of this numbers of order k. Esample1: set = {'1','5','23','41,'54','63'}; k = 4; Output1: 1 5 23 41 1 5 23 54 1 5 23 63 1 5 41 54 1 5 41 63 1 5 54 63 1 23 41 54 1 23 41 63 1 23 54 63 1 41 54 63 5 23 41 54 5 23 41 63 5 23 54 63 5 ...

Webpage background image won't load

I'm using the following css to define my background: body { background-image: url('background.png'); font-size: 12pt; font-family: Veranda, Arial, Helvetica, sans-serif; } The image background.png is stored in the root directory, but whenever I refresh the webpage, the background remains white. MY instructor currently has ...

How can we swap two numbers without third variable and without arithmetic operator?

How can we swap two numbers without third variable and without arithmetic operator? ...

adjacency matrix

my question is given an adjacency matrix of a graph and a positive interger n find the number of path of length n between two vertices,i don't know how to convert to programming? somebody can help me. ...

updating fields automatically

hi im new to programming i have this small system for room reservations (school requirement). i have this question that is it possible to update the fields of my table on specific date? i have three tables naming users , reservations, and rooms. i want to update the field of the rooms on specific date, like if the date_out in the rooms ...

how casting of return value of main() function works ?

Hi, I am using Visual studio 2008. For below code double main() { } I get error: error C3874: return type of 'main' should be 'int' instead of 'double' But if i use below code char main() { } No errors. After running and exiting the output window displays The program '[5856] test2.exe: Native' has exited with code -8...

Having problems with Java and GUI

Having a problem getting my code to work correctly. I can't get the char array (myArray) to display in the GUI. When it works correctly I have to display the array, if the letters are used next I have to re-display the array with the letters used gone. Continue this until the array of letters is empty.I placed in quotes what the instruc...

Implementation for Bresenham's ellipse drawing algorithm in OpenGL

I'm looking for one to build a MS-paint like app. ...

Reverse the contents of each line in a file?

I was hoping someone could help me, I need to reverse the contents of each line in a file. So basically this: 101.228.168.192 to 192.168.228.101 Is there a command I could use in a bash script, or even just the logic needed to get the job done. Thanks ...

SQL multiple join with count, having trouble.

Hello All, First of all this is a homework assignment so I'm looking for assistance, not solutions. Let me try to explain my schema. I have three tables we'll call users (with columns id and name), parties (with columns id, partydate, and user_id) and questions (with columns id, createdate, and user_id). My requirement is to show for e...

Which of the following php.ini directives should be disabled to improve the outward security of your application?

Answers: (Choose 4) safe_mode magic_quotes_gpc register_globals display_errors allow_url_fopen ...

SQL SUM with CASE and DISTINCT?

Continuing on my last question... Let me try to explain my schema. I have three tables we'll call users (with columns id and name), parties (with columns id, partydate, and user_id) and questions (with columns id, createdate, and user_id). My requirement is to show for every user the number of parties within the last year and questio...

binary sequences and floating point IEEE 754 what???

I HAVE NO IDEA what this means please help anyone? With 32-bit binary sequences x = 0100 0110 1101 1000 0000 0000 0000 0000 and y = 1011 1110 1110 0000 0000 0000 0000 0000 representing single precision IEEE 754 floating point numbers, perform following arithmetics and show the results in both normalized format and IEEE 754 sin...

Undefined Variable error

Hi, I'm a newbie to programming in C, and I'm having trouble understanding the error that is coming up when I attempt to compile my program. I've got the following program, which is fairly simple and which my professor says is correct: #include <stdio.h> #define TRUE 1 #define FALSE 0 #define BOOL int extern int x; extern BOOL do_exp; ...

htaccess & htpasswd not hooking up correctly

Every time I try to go to Art School on Home Page and put it the correct username/password I get a server error. Yes this is homework, and yes it is my first time doing anything related to this type of setup so any help would be appreciated. All the various instructions that I found listed this as the correct way so I'm sort of stuck. ...

Problem with Recursion

Hello, I am running into a little pickle. For class I have an assignment (below), I came up with a solution but I keep getting an error, that says; "'factorial' : recursive on all control paths, function will cause runtime stack overflow;" If someone could help me, I've been working on this for about an hour and I'm stumped! Assi...

Why isn't this bresenham line appearing where it should?

I'm writing a MS paint-like application (I'm not allowed to use opengl primitives). So far it only draws lines and points. I don't understand why when rendering a single point on click this code prints it where it should, based on the transformation on the renderPoint function: void renderPoint(double x, double y) { W = glut...

Memory and pointers

Hi I have need some some help with some thinking around a task. My task is to create one memory area void *memory = malloc(320); and then use pointers to store texts into this storage place: We want to divide this area into data blocks of 32 bytes, sow we can store: 320/32 = 10 data blocks a 32 bytes. Into one data block I can store...

[python] get numbers from user & print maximum and minimum (w/o using built-in function)

I'm reviewing a python exercise which does the following : reads list of numbers til "done" gets entered. When "done" is inputted, print largest and smallest of the numbers. And it should be without directly using the built-in functions, max() and min(). Here is my source. Traceback says, "'float' object is not iterable" I think my...

invalid conversion from ‘char*’ to ‘char’ in C++

My code, when compiled, returns the error invalid conversion from ‘char*’ to ‘char’, and identifies the second last line, return char32 as the problem. I've searched internet and this site and haven't found anything that has helped. I've found the error goes away and the code compiles if I replace the problem line with return *char32, bu...