I had a trusty external hard drive for many years, it was a 500gb Seagate which worked fine up until the other day when the internal port for the mini usb detatched from the board and I was left w/ no way to connect it to my laptop.. Seagate failed to help me at all and external sources directed me to get another enclosure for the hard drive which I finally found @ my local Staples here in town.. It is an I/O Magic 3.5" USB 2.0 Enclosure (Works w/ IDE & SATA) I thought I was saved..:D When I …

Member Avatar
Member Avatar
+0 forum 3

Just a couple of number tricks to check Go's mathematical abilities. If you have more, let's show them here.

Member Avatar
Member Avatar
+2 forum 1

For my c++ class i have to write a code that will read integers in to a 2D array from a file and then, using functions/methods, determine if the array is a magic square. My problem is that when i build or compile i get "error C2664: 'DataIn' : cannot convert parameter 1 from 'std::ifstream' to 'std::fstream &'" Here is the code: #include <iostream> #include <fstream> using namespace std; void PrintMatrix( int x[][20], int size) { for(int i = 0; i < size; ++i) { for(int j = 0; j < size; ++j) { cout << x[i][j] << "\t"; } …

Member Avatar
Member Avatar
+0 forum 4

Hello guys, today when I was try to install Joomla on my server it prevents me from continue because of Magic Quotes GPC = ON , so I red about this and saw many sites and PHP iteself recommended to shut this feature, my question is in my projects I use function I've created to filter the $_POST variables <?php function filter($text) { $text = trim($text); $text = strip_tags($text); $text = str_ireplace("select","",$text); $text = str_ireplace("union", "", $text); $text = str_ireplace("update","",$text); $text = str_ireplace("insert","",$text); $text = str_ireplace("join","",$text); $text = str_ireplace("'", "", $text); $text = str_ireplace(";", "", $text); $text = str_ireplace("$", "", …

Member Avatar
Member Avatar
+0 forum 2

There was discussion thread http://www.daniweb.com/software-development/python/threads/424953/polynomial-division for class based implementation for polynomials, and I developed a version utilizing the magic methods to enable operation with normal arithmetic operation. I only inherited sequence structure from list type. Interoperability with scalar types is not implemented to avoid too complicated type checks of the arithmetic operations. **Division will be added** when the OP has made his own solution of it ready. Tests are continued to be run and I will update the code with bug fixes if and when I find any. I have done informal tests but not yet exhaustive ones. Multiplying by …

Member Avatar
Member Avatar
+1 forum 9

I googled little around for correct way to not reinventing of the wheel for expression evaluation (even I had done some simple evaluation check for my [Tkinter calculator snippet](http://www.daniweb.com/software-development/python/code/282548/simple-calculator) earlier). After getting totally upset with [this example](http://www.bestcode.com/html/evaluate_math_expressions_pyth.html), I made this with some struggles with `__builtins__` globals parameter of eval. First I kept the dictionary of variables approach, then I turned to keyword parameters, the format is so much nicer. To put some topping, I put `__call__` also as synonym for evaluation. That means you can call the class as functions and give any values of variables as keyword parameters. See …

Member Avatar
+0 forum 0

I have a code on the Internet and I have rewritten it, but there are t and n3 variable in the odd_order function that I don't understand their meaning. Please help me to explore it. :D. This code is generating a odd order magic square. <html> <head> <title>Magic Squares</title> <script language=JavaScript> <!-- hide var matrix; // compute ... function compute() { var i; var N = parseInt(calc.square.value, 10); if (isNaN(N)||(N < 1)) { window.alert("Invalid input!"); return; } // end if matrix = new Array(N); for (i = 0; i < N; i++) { matrix[i] = new Array(N); for (j = …

Member Avatar
Member Avatar
+0 forum 2

Hi :) I am trying to make a program that will find the first x perfect squares. I have done and redone this many times, but it never works. So basically, it needs to do two things: check if y is a perfect square. If it is, it needs to check if this number is a magic square. A magic square is a perfect square where you can do 1+2+3+4 and so on, and end up with a perfect square. This for my AP comp sci class, and the full assignment is here: [url]http://www.howard.k12.md.us/rhhs/helloworld/LessonA12/Lab-A12-1.html[/url] [CODE=java]import java.util.Scanner; public class FunLoops {import …

Member Avatar
Member Avatar
+0 forum 16

Im writing a code that ask for two positive integers entered from the keyboard. The first integer N is odd in range of 3-15 and the second with be an initial value I. N will be the size of the array. Beginning the center of the NxN array with the integer I. If I is prime then print the number I in that position of the square. Otherwise print three asterisks in that position. Move to the right one square , and test the integer I+1 for primality. Print I+1 if it is prime and three asterisks if it is …

Member Avatar
Member Avatar
+0 forum 1

Here unsystematic play with linked list structure Object Oriented style. If you have performance critical code, please do not use this but use the superb faster than list [URL="http://pypi.python.org/pypi/blist/"]blist module[/URL] (including sorted versions of main data structures). As OO newbie (though with some 30 years of other programming), I wanted to get some practice and remind myself on the basics once more. Hope you find this code interesting. Main program testing routines are 'ad hoc' not seriously planned 'cover the corners' testing.

Member Avatar
+0 forum 0

Hi, in this news you will see how in the past few years there has been some controversy over a bug or more commonly known as a feature which appears it may be removed as of php 5.4.0. According to the features list of php 5.4.0 beta there is the following quote. [QUOTE] - Removed features: . Removed magic_quotes_gpc, magic_quotes_runtime and magic_quotes_sybase ini options. get_magic_quotes_gpc, get_magic_quotes_runtime are kept but always return false, set_magic_quotes_runtime raises an E_CORE_ERROR. (Pierrick, Pierre) [/QUOTE] Now some users will have a good idea what this is but most won’t have a clue as most don’t dig …

Member Avatar
Member Avatar
+4 forum 2

hello guys, i have this code written down to print a magic square and i get an error. public void doMagic() { int k = 1; int row = 0; int col = order/2; msArray[row][col] = k; for ( int r = 0; r < msArray.length; r++) { for ( int c = 0; c < msArray[r].length; c++) { k = k + 1; if (k > (order*order)) { return; } row = row - 1; col = col + 1; if (row == -1 && col == order) { row = 1; col = order - 1; } else …

Member Avatar
Member Avatar
+0 forum 1

how can i create a magic square using jcreator.. help me please..

Member Avatar
Member Avatar
+1 forum 3

Exactly as the title says. [URL="http://www.kammerl.de/ascii/AsciiStereoMovie.php"]ASCII 3D Magic Eye movie[/URL] You can customise the image, colours, and its' movement any way you like further down the page. Also, as an added bonus, Star Wars [URL="http://www.asciimation.co.nz/#"]HAND DRAWN STAR WARS: ASCII MOVIE.[/URL] This deserves credit purely because of the skill and time this guy has put into this project... Comment! Add your own Ascii links here!

Member Avatar
+0 forum 0

May 5th should prove to be an interesting day for tech fans, as it would appear that both the much hyped Windows 7 operating system and the HTC Magic Android mobile phone will be launched to the waiting public. Neowin [URL="http://www.neowin.net/news/main/09/04/18/windows-7-rc-coming-to-msdntechnet-soon-public-may-5"]spotted[/URL] that a Microsoft Partners [URL="https://partner.microsoft.com/US/40084742"]web page[/URL] (now replaced with a bog standard information page) had been published which announced that Windows 7 Release Code would be released to the public on May 5th. OK, so we have sort of [URL="http://www.daniweb.com/blogs/entry4182.html"]been here before[/URL] with these so-called Microsoft leaks have we not? I prefer to think of them as viral press …

Member Avatar
Member Avatar
+0 forum 1

The End.