115 Discussion / Question Topics
Remove Filter Hello, I have a 512x512 matrix and I need to split it int 16x16 blocks.. How many blocks will I therefore produce? I've tried 8 blocks of 16x16 but this does not look right when outputting the complete matrix.. Any ideas? Thanks :) | |
Hello, Wondering if you can help me.. I have a variable, that each time needs to multiply by 2 (I know, it sounds simple.. I'm probably being an idiot) but it works like this: LOOP 1 offsetX = 0; offsetY = 0; LOOP 2 offsetX = 2; offsetY = 0 … | |
Hello, I'm currently studying and sometime soon will have to do a final year project (which runs through the year).. Now I've been looking at stuff om image recognition and although it interests me I want to do some kind of signals or signalling. My idea is to capture the … | |
Hello I need some help, I'm trying to output something to a text file (.htm) which will then display the data that is being generated in the C# program.. Now the problem is, whenever I try to replace something, it doesn't work. Just replaces it with "System.Char[]" Here is the … | |
Hello, I have two paragraphs on my page and I need to draw a line between them. Now, I currently store the positions of the two paragraphs inside a database and I have access to them, I just don't know what to do from here. Some people have suggested I … | |
Hello, I have a major problem with a Correlation algorithm I'm trying to implement.. Basically, when I have two small matices: Matrix 1: 0 1 0 1 1 1 1 1 1 1 1 1 0 1 0 0 0 1 1 1 0 0 0 0 1 1 1 … | |
Hello, I have 2 massive matrix's and I need to compare one matrix with another.. Now, I have come up with a solution that takes a 5x5 block of the matrix1 and compares it with a 5x5 block of matrix2, this happens until the end of both matrix's.. I'm confused … | |
Hello, I need some help please.. I need to write a recursive predicate in Prolog that subtracts two numbers until number 2 is higher than the result. I have completed the logic in C++: [code] #include <iostream> using namespace std; int mod3(int a, int b) { int intResult = a-b; … | |
Hello I'm making an application that reads a series of values from a text file and then converts it to a bitmap image. Currently, I'm using arrays, but, deciding on a particular length is annoying. I have been reading a few tutorials and i've read a lot about using vectors, … | |
Hello, In my class I have a method that basically does this: - Reads in characters from text file (as a string) - Converts the characters into an integer - Stores the values into the integer Here is the code: [code] bool Loader::Read(string theFile) { strRepositry = theFile; string theData … | |
Hello I'm working on a project, and I have the following classes: [LIST] [*]Loader - This loads the contents of the text file [*]Matrix - This processes the data that has been loaded [/LIST] Now I'm using association, Loader -> Matrix In my matrix class I have a method that … | |
Hello :) (Too many questions about this)! Basically, I'm trying to display the contents of a matrix without using "cout" in my class. (It's a bad method) I've tried to return an array, but, that failed miserably.. So I've got a method in my class: [code] double Matrix::read(int theRow, int … | |
Hello, basically I want to return an array from a function (So I don't output things in the class - just main) But I seem to get the error: "invalid types 'int[int]' for array subscript" Here is the code: [code] #include <iostream> using namespace std; int matrix() { int matrix[10] … | |
Hello.. I'm doing a project that involves searching/matching 2 matrix's. The basic idea: Matrix 1: 0 1 0 1 0 1 0 1 0 1 1 1 1 0 1 Which will then be interpreted in memory as: 0 1 0 1 0 1 0 1 0 1 1 1 … | |
Hello, I'm just wondering really.. I have a 2D matrix but I've defined it as a 1D matrix. So for example: [code] double *matrix = new double[N*M]; [/code] My question is, I'm going to be manipulating data very shortly and want to read this data in from a text file.. … | |
Hello hope that you can help. Basically, I'm making a site that uses a header file and then for each page, include the header and set the title.. It's easy using procedural PHP but I want to do it using OO. Here is the problem: Page.php (class) <?php class Page … | |
Hello could someone explain what I'm doing wrong to get the error: Segmentation fault: 11 when trying to fill in a 2D array from two for loops? Here is the code: Matrix.h [code] #ifndef _Matrix_h #define _Matrix_h using namespace std; class Matrix { public: Matrix(); // Constructor Matrix(int M, int … | |
Hello I'm just wondering (In terms of computer science) If someone gave you a task about matrix, 2D arrays to: Assign to each of the a[I]i[/I][I]j[/I], the value 1000 + i + j? Would you assume that the array would have: rows = 500 columns = 500 That's the 1000 … | |
Hello, I'm trying to create a matrix that dynamically defines the rows and columns.. Now, everything is fine, apart from when I include a function to output the 2D array.. The error: Matrix.cpp:20: error: invalid types ‘double[int]’ for array subscript ... The code is: Matrix.cpp [code] #include <iostream> #include "Matrix.h" … | |
Hello, I'm creating a Matrix, that the user can manually define the rows and columns.. (This will be defined in a class) But, I'm having trouble resizing the vector to what is set in main.. Here is the code: Matrix.h [code] #ifndef _Matrix_h #define _Matrix_h #include <vector> using namespace std; … | |
Hello, I'm working with files in a C++ project AND the text file that I need to open is in the same directory, however when just trying to open it like this: [code] string inputFile = "myText.txt"; [/code] It will not open, even though it's in the same directory, so … | |
Hello, now it looks like this is homework help, but no - it's not! I'm trying to communicate between a C# program and a webpage, I'm generating the data into C# and wanted to export it to the webpage using JSON.. However, I can't seem to find out if it's … | |
Hello, having a slight problem here.. I have a string, that I need to do character analysis on - Basically finding out how many times "B" is in the text and then ordering this from (lowest to highest). Now I can get the results, but, I don't know how to … | |
Hey, I'm building my own platform mainly for a project, but, for my own personal use as well.. I'm also changing the style of programming that I do it in, and, setting up some rules.. I just wondered if there are any disadvantages to the way that I am setting … | |
Hello, I'm a mac user and starting a new module in Prolog and wondering if there are any applications that can compile and run Prolog for mac? Sounds silly, but can use terminal? Thanks :) | |
Hello, basically I have two tables: People Orders Now I want to grant the first person in "Peoples" with all privileges, now I've tried to do this: [code] GRANT ALL ON Orders TO {testUser |PUBLIC |role_name} [WITH GRANT OPTION]; [/code] Doesn't work (because they are technically not a user, therefore, … | |
Hello I need some advice (I'm not expecting code - Just want to know if it's possible / references) Basically, I want to create a class that I can check if the email has been submitted AND also, if it's formatted right (e.g. does it contain a @ but also … | |
Hello there, wonder if you can help me.. I've got to normalise a database, up to 3NF and wonder if you do the normalisation on each individual table, OR the database as a whole? I've got this so far: [I]Attributes[/I]: registration_No Make Model Type Cylinder Body Type Transmission Air Conditioning … | |
Hello, I'm developing a system that emails people like a week before a particular date.. But they don't actually have to visit the page to receive the email, is this possible? Thanks :) | |
Hello, I'm doing a project where I need to see which number matches to a list of letters in the alphabet. Currently I have the output as: [code] A= 5 A= 8 B= 9 B= 2 C= 0 C= 3 D= 6 D= 4 E= 1 E= 13 F= 0 … | |
Hello, I have a map that contains the alphabet (key) and a double (value) and I would like to sort the list so that the highest value is at the top but it still keeps it's key.. E.g. [code] #include <iostream> #include <map> int main() { map<char, double> alphabet; alphabet['a'] … | |
Hello, I'm writing a program that compares two percentages and I need them to be rounded up or down depending on their number.. I have used this: [code] percentage[i] = Math.Round ((analysis[i] * 100) / char_count); [/code] Bit it throws an error that it's too ambiguous.. Now the "analysis" is … | |
Hello, I have two arrays that contain different numbers that I need to compare with another array.. e.g. Array 1: 10 20 40 70 Array 2: 5 3 10 18 2 Basically, I want to write a program that calculates the highest value each array and then swops the values.. … | |
Hello, I'm trying to read in words from a text file that look like: The World Fell Over etc.. But it doesn't seem to be working.. I've written some code however it will only show the first word OR loads of question marks.. [code] string dictionary() { string words[500]; ifstream … | |
Hello wonder if you could help me please.. Basically I'm trying to implement a script where it searches through a file and sees the most popular word.. I've got it doing it like this: [CODE] Squence: 0 0 Squence: 1 0 Squence: 2 0 Squence: 3 0 Squence: 4 0 … | |
Hello, I need to search a char array, for a particular word... E.g. [code] char * search; char arr[10] = {'b', 'c', 'a', 't', 'h', 'e', 'p', 'h'}; string words[1] = {"the"}; search = strstr (alphabet, words); [/code] But it doesn't work... Any ideas what the problem could be? Thanks … | |
Hello, I'm working on a project where certain characters can have multiple values.. E.g. Letter 'A' can be replaced with 'B', 'C', 'D' Letter 'S' can be replaced with 'X', 'Y' And then it would output it like this: A can be replaced with B - Yes/No A can be … | |
Hello, I'm doing some work on Frequency Analysis and decrypting text.. Basically, this is how I think it works... You take the alphabet (as a char) [code] alphabet[26] = {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'}; [/code] Then you read in the string you want to analyse [code] crypt[26] = {'c', 'a', 'b', 'e', 'f', 'f', … | |
Hello (Dunno if this is the right forum) But basically, I've been given some text to decrypt. I've got to do it using frequency analysis. Here's what I've done: 1. Got a frequency analysis of the text: Showing how many times a letter appears. 2. Got a frequency analysis of … | |
Hello, I have an array and need to sort it so that the highest numbers show first etc.. I have written this: [code] for(int i=0; (i < 26); i++) { while(counter[i] < counter[i + 1]) { int temp = counter[i]; counter[i + 1] = temp; counter[i] = counter[i + 1]; … | |
Hey.. Is it possible to make PHP type arrays? Like keys? For example, I have an array of numbers, and an array of letters.. A = 10 B = 20 C = 30 And then I sort the numbers so that the highest number is at the top etc.. But, … | |
Hello I'm trying to display the memory location(s) of an array of pointers. It works, but it prints the memory locations out as: e.g. [code] (0x7fff672e19a0) [/code] I know that is the memory location, but in other examples, I've seen it being displayed as [code] 4041 [/code] Here is the … | |
Hello, I am working on a script that reads each individual character from a txt file and then outputs it depending on whether it's in the alphabet or not.. The problem is, it won't output spaces or anything apart from the string.. e.g. The text file reads: [code] Hello, my … | |
Hello, I'm developing an application that reads a text file, and then replaces what's in the text file with an array (alphabet) It all works ok until I try and change the position of the inputted character and it returns: [b]Segmentation fault: 11[/b] It's really confusing! Here is my code: … | |
Hello, I'm trying to calculate the center of a DIV element. But it doesn't seem to be working, I don't quite get what to do with the calculations.. Here's my code: [code] <html> <head> <script src="http://code.jquery.com/jquery-latest.js"></script> <style type="text/css"> body { background-color: #cccccc; } .rectangle { width: 400px; height: 100px; border-style:solid; … | |
Hello, I'm using jQuery and trying to create a plugin that draws a rectangle on a canvass. However, it will not even work.. I have tried to create it when I click on a button, this does not work either.. Here is the code: [code] <html> <head> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js" type="text/javascript"></script> … | |
Hello, I'm having a problem with a script I'm working on, basically, it outputs a SQL query in JSON, however, it's not doing it properly.. E.g. Right way: [{"id":111,"title":"Event1","start":"2011-10-10","url":"http:\/\/yahoo.com\/"},{"id":222,"title":"Event2","start":"2011-10-20","end":"2011-10-22","url":"http:\/\/yahoo.com\/"}] Wrong way: [{"id":"1","title":"dfssafsaf","start":"2011-10-22","url":"http:\/\/yahoo.com\/"},{"id":"3","title":"dfssafsaf","start":"1-1-1","url":"http:\/\/yahoo.com\/"}[b],][/b] As you can see it inserts a ",]" and I only want it to show "]" because it's … | |
Hello, Does anyone have any experience with phpwebsocket by google? I'm having a problem connecting to my server... Here is the two files: (server.php) [code] #!/php -q <?php /* >php -q server.php */ error_reporting(E_ALL); set_time_limit(0); ob_implicit_flush(); $master = WebSocket("[server_IP]",12345); $sockets = array($master); $users = array(); $debug = false; while(true){ $changed … | |
Hello, I was building a web chat system using jQuery, PHP, and mysql and it's working, the thing is that someone informed me that it will strain the server if I do it this way, and suggested I used "Comet Polling" for it, but I have never heard about it … ![]() | |
Hello, I am working on a chat application in jQuery and I have used the function setInterval(), however, it doesn't seem to refresh the div element.. Or load it for that matter.. Here is the code: [code] <!DOCTYPE html> <html> <head> <style> #shoutbox { width: 400px; height: 400px; border-style:solid; border-width:5px; … ![]() |
The End.