homework

Mach-O 64-bit format does not support 32-bit absolute addresses

Hi, I have a sample piece of code that writes the value of the xmm6 register into a memory location. The code is in NASM: value: dd 0 movq [value], xmm6 However I am getting the error when I tried to compile it to macho64 format: 64-bit format does not support 32-bit absolute addresses. Is there a way to resolve this? I am...

what is green threading ?

What is green threading means in ruby on rails , what it actually do? Is it a. " A design where fixed size pool of threads is shared around the program?" b. "when threads are emulated by virtual machine or interpreter?" or c. " where program run accross the multiple CPU?" Please explain with right ans? ...

C++ - Single Linked List - Ideas

I want to write a method to remove consecutive items with duplicate data values from a singly linked list. The method should return the number of items removed. The method should clean up memory as required, and should assume that memory was allocated using new. For example, passing in the list ->a->b->c->c->a->b->b->b->a->null should ...

Help implementing Least Squares algorithm in C [was: want to find the square root of an array]

the formula is pretty complicated. the numerator is num and the denominator is den, in the formula there is a root on the denominator so i have putted den in sqrrt() but sqrrt only accepts doubles #include<stdio.h> #include<conio.h> #include<math.h> #define LEN 11 // for the following set of x and y find r by the formula .. float sum(fl...

compiler says declaration missing ;

I am having two minor problems in this code but i am unable to get them. i have mentioned on the places the compiler is giving error.There are two of them given below: #include<stdio.h> #include<conio.h> #include<stdlib.h> #define SIZE 100 int count; void menu(void); void input(int[]); void print(int[]); void insert(int[]); void delete...

Can I compile a class along with all of its inner classes to a single class file?

I've been working on a fairly simple project for a class. I knew it was supposed to be written in Java, and I read enough of the Assignment description to have an idea what I was supposed to be doing, so I set about creating a nice, object-oriented solution ('cause it's Java, right?). When I finally get to reading the nitty-gritty deta...

SQL views. do i need to use it to increase performance?

i mostly need to know - views and their purpose ? - do they increase performance of an application ? - in what kind of cicumstance will I need to use views? ...

convert to uppercase using macros

I have been given a task to covert lower case character into upper case by using macros .the problem is that i have never been introduced to macros. i just know that its something #define name size .. please can anyone guide me on this issue ...

Fortran: Binary Subtraction (is there a binary type?)

I have a homework question regarding operator precedence in Fortran. In order to understand the question I need to know how to use binary numbers in Fortran. Can someone give me an example of how to use binary numbers in fortran? (Specifically with subtraction). ...

selectors with variables

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt; <html> <head> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js"&gt;&lt;/script&gt; <script> $(document).ready(function(){ $("#c1").hover(function(){ $("[id='gp1']").attr("bgcolor","...

Grammar: difference between a top down and bottom up? (Example)

This is a follow up question from Grammar: difference between a top down and bottom up? I understand from that question that: the grammar itself isn't top-down or bottom-up, the parser is there are grammars that can be parsed by one but not the other (thanks Jerry Coffin So for this grammar (all possible mathematical formulas): ...

shuffling a word

how to shuffle a word's letters randomly in python? for example, we have the word "cat". change that randomly to, act, tac or tca and ex.. to be exact,The scrambling process must be implemented manually. Built-in functions or string methods that “automate” this process are prohibited from use. thanks ...

Regex validity for Degree

hi all, i have an assignment where i should check validity of the string where : N90 -> North and must have key degree between 0-90 W180 -> have degree between 91-180 S270 -> have degree between 181-270 E360 -> have degree between 271-360 how can i create a reg ex like this. ...

structure program giving unexpected output

/* It is not entering data into the third scanf() statement .*/ #include<stdio.h> #include<conio.h> #include<string.h> void main(void) { struct book { char name; int pages; float price; }; struct book a1,a2,a3,a4; printf("Enter data into 3 books\n"); scanf("%c %d %f",&a1.name,&a1.pages,&a...

Homework: Negative to -1, 0 to 0, Positive to 1

I have an enumeration MyEnum (Neg -1; None 0; Pos 1). I use the result of CompareTo() to initialize a object of that enum. What is the most performant way in .NET to do it (Negative to -1, 0 to 0, Positive to 1)? NB. CompareTo() returns an Integer value.. ...

mergesort array of int using pointers

Hello everyone! For school I have to program a merge sort using only pointers. I've tried almost everything, but I can not get it working. #include <stdio.h> #include <stdlib.h> #include <string.h> #define num_elementi(array) (sizeof(array)/sizeof(array[0])) void selsort(int arr[],int n); void swap(int * a, int * b); void print(int a...

C++ Linker Error

Hello, I'm new to C++ and was working on an assignment for a class. We were given a .txt file, have to read information from it, and store it in a linked list, and then print it out to the user. After hours of trying to manipulate the examples we were given, and another couple hours of trying to write the code from scratch, I'm getting ...

C Fixed array pointing to parts of an array

I'm doing a project where I struck against this situation: typedef unsigned char Page[16384]; unsigned char Memory[16384*64]={...values...}; void foo(Page* page); Now as you can see Memory is composed of "Pages", now I would like to pass a Page to a function but a Page should be a POINTER to values of Memory (so indexes of a Page shou...

Python: how to print range a-z?

1. Print a-n: a b c d e f g h i j k l m n 2. Every second in a-n: a c e g i k m 3. Append a-n to index of urls{hello.com/, hej.com/, ..., hallo.com/}: hello.com/a hej.com/b ... hallo.com/n ...

Error with C++ operator overloading, in Visual Studio AND Xcode

...