Python-wxPython Tutorial This tutorial will take you through the basics of wxPython. ##Introduction: Let's face it. I am a dinosaur. I got my computer science degree in the mid 70s. And it won't be long before **I** am in **my** mid 70s. So why am I trying to learn Python? Mostly because learning new things keeps my brain active. And besides, nobody on Daniweb seems to be asking questions about vb.Net anymore. So I thought I'd give it a try. After a few weeks of puttering I managed to learn enough Python to rewrite all of my vbscripts (stop laughing, … |
+8 forum
28 | ||

Hi guys , I'm giving you the full C# project I have uploaded , since I'm working with windows form , so you can see the source code and run it . http://www.sendspace.com/file/u7z6h0 And now , to explain my problem . The program I wanted to make is sudoku solver . Now , It's something I'm only making for fun , so if you think it's going to take you too much time to help me , do not give yourself a hard time , it's enough that you even read this post . Now , in this code , … |
+0 forum
4 | ||

/* This is source code of function which solves sudoku, function returns 1 if solution exists and 0 if not exist. In case if solution exists, you have resolution in entry parameter of this function You can run this function in function main() eg. if(sudoku(T)) print(T); where print(T) is group of printing instructions of all table T and T is matrix which is declared as int T[9][9]; */ #include <stdlib.h> #include <stdio.h> int sudoku(int S[9][9]) { int **T; int W[9]; int nr, ile, i, i1, j, j1, jest, k, L, LL, min, ok, w, wpis; ok=1; i=0; while (i<9 && … |
-1 forum
1 | ||

Hi, I am writing a sudoku solver program that uses recursion to solve all the empty cells. However, I have no idea why my function did not do anything. I read in my puzzle as double char array and convert it to double int array. My output is : 900020750 600050040 020400010 208000000 070509060 000000401 010005080 090070004 082040006 where all the 0s are the empty cells // #include "puzzle.h" #include <iostream> #include <stdlib.h> using namespace std; Puzzle::Puzzle(const char grid[][9]) { /* for(int i = 0; i < 9; i++) { for(int j = 0; j < 9; j++) { //cout … |
+0 forum
0 | ||

Hi guys, I have been working on a sudoku solver, that finds solution by brute forcing during my school days.... But due to the huge number of loops i couldn't do it at then.... SO decided to complete it now.... So here the algorithm: 1. Get the number of fixed values from the user. 2. Populate those values.. 3. Check if the input sudoku is valid. 4. If valid, fill each posistion by checking numbers from 1 to 9, if they are valid at the posistion... 5. Done.... Well! In my sudoku i have only checked for rows and colomns..... … |
+0 forum
5 | ||

I am going to be honest here, I am completley lost on trying to figure this out. I am trying to create a sudoku solver using sat4j for a 9x9 puzzle. I am trying to read a partially filled board and, by using a Satisability solver it finds a legal assignment to the empty squares (if possible). If such an assignment is impossible, the program says so; otherwise, it prints the original board and a solution to the terminal. import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.util.Scanner; public class sudoku { private int dim; private int size; private int [][] … |
+0 forum
0 | ||

I have been trying to write a program in Pascal (free pascal compiler, Lazarus IDE) that solves an uncompleted entered sudoku. I am moderately new to programming/pascal/lazarus, and so I have no idea how to use the debugging features. I have read through the code several times but I can't see what the problem is. Any help would be greatly appreciated! program sudoku; var input : array[1..9, 1..9] of integer; cell : array[1..9, 1..9, 1..9] of integer; output : array[1..9, 1..9] of integer; cposs : array[1..9, 1..9, 1..9] of integer; cloop, cloop2, rloop, rloop2, bloop, bloop2, loop, loop2, loop3, c, … |
+0 forum
9 | ||

this is Sudoku.java this is the main class. Reminder does the time keeping, the SudokuBoardDisplay displays the board and draws images. The one who handles the logic is the SudokuModel How do I make the images clickable and do something. how to display the remaining time as JLabel ....? i used textfields but instead of the textfields being the container of the row col and val, i want to use the images ,,, when the images is clicked, a frame pops up with 9 buttons, that has a value of 1 to 9. and when the user chooses, the clicked … |
+0 forum
2 | ||

Hello I have wrote a c program to solve sudokus, and i would like to know if i can draw the grid and fill it using ncurses library. i just would like to know how to control the lines and borders of boxes in ncurses thank you very much |
+0 forum
0 | ||

I have a Sudoku puzzle and I need to make sure that each row and column have each number 1 through 9. What is the easiest way of doing this? The code snippet that I have so far is below. public static boolean rowsAreValid(int[][] array){ for(int i = 0; i < array.length; i++){ for (int j=0;j<array.length;j++){ This is my Sudoku puzzle. Note that I also need to do the same for each 3x3 section. Your help is greatly appreciated! 3 8 4 2 1 6 9 7 5 9 7 1 8 5 4 3 2 6 5 2 6 … |
+0 forum
4 | ||

Hi, I'm currently trying to program a sudoku solver. As a beginner I wrote pseudocode to establish what I'd have to do. One of the first things was to make sure each number in each of the 3 x 3 grids aren't equal to any of the others. Here is my [B]attempt[/B]. I'm pretty sure I've gone the long way around tackling this but it was the only way I was fairly confident I knew how to do, haha. txt1_2 means that it's the second number in the first 3 x 3 grid (from left to right). At the moment, … |
+0 forum
7 | ||

Sudoku in C++. The program works but how do I check the minisquares? Please gimme a function. :( Pretty please? [code] #include <iostream> #include <iomanip> using namespace std; const int rowSize=9; const int columnSize=9; const int arraySize=9; int a[arraySize]; int print_values[rowSize][columnSize]={9,4,2,5,1,8,3,7,6, 7,1,6,4,2,3,5,8,9, 3,8,5,7,6,9,4,2,1, 1,6,3,8,4,2,7,9,5, 4,2,7,1,9,5,6,3,8, 8,5,9,6,3,7,2,1,4, 6,3,8,9,7,4,1,5,2, 5,7,4,2,8,1,9,6,3, 2,9,1,3,5,6,8,4,7}; bool check(int a[], int arraySize){ int i=0; for(int j=0; j<arraySize-1; j++){ if(a[j]==a[j+1]) i++; } if(i==0) return true; else return false; } void swap(int &a, int &b){ int temp; temp=a; a=b; b=temp; } void bubbleSort(int a[], int arraySize){ for(int i=0; i<arraySize-1; i++){ for(int j=0; j<arraySize-1; j++){ if (a[j]>a[j+1]) swap(a[j], a[j+1]); } } … |
+0 forum
1 | ||

hi... can anyone light me on an algorithm to solve sudoku...actually i did solve a few sudokus to know how this is done. Eventhough i managed to do the sudokus by paper and pencil, i can't figure out an algorithm to solve it. I googled for algorithms but everything ends up with graph colouring which i don't know ( i could only understand this: adjacent nodes are to be coloured differently ). Please someone help. |
+0 forum
3 | ||

Hi Guys !! I'm new to this forum so please excuse me if i'm not posting my problem correctly. I have been given a project to make a program in C++ that solves a given sudoku problem. Here is what i did : [CODE]#include<iostream.h> #include<conio.h> int board[9][9]; int checkrow(int t, int _x, int _y) { int c=1; for(int y=0; y<9 && c==1 ; y++) if(board[_x][y]==t) c=0; return c; } int checkcol(int t, int _x, int _y) { int c=1; for(int x=0; x<9 && c==1 ; x++) if(board[x][_y]==t) c=0; return c; } int checkbox(int t, int _x, int _y) { int … |
+0 forum
4 | ||

Hi Daniweb community! I started learning javascript in school, and the best way to learn is to get into it. So I found a Sudoku game online "http://iphone.janjanousek.cz/isudoku/" and download the files on to my hard drive with much success (all the scripts). The game and site is very well organized and so makes it easier for me to understand. There is one problem though. As I started from the main page with the 3 games, until the difficulty menu, I get an error page when I select the easy option. Why is that? I don't know how else to … |
+0 forum
0 | ||

To be honest, i'm really bad with c++ but it's required for my major. We have to make a sudoku program, that reads from a file, inputs the data into a 9 by 9 grid (of 2d array), inputs numbers till the grid is solved, then check for valid moves, and check when it is solved. I am stuck. This is what i have so far [CODE] #include <iostream> #include <iomanip> #include <fstream> #include <string> using namespace std; class Sudoku { private: int grid; bool badRow(int row); bool badCol(int col); bool badSec(int row, int col); public: Sudoku() { } void … |
+0 forum
5 | ||

Reusable Code Snippet
Quest for most stupid Sudoku solver I had posted here already here to forum a [beautiful code for solving Sudoku puzzles](http://www.daniweb.com/software-development/python/code/294304/eleagant-and-fast-sudoku-with-generator-expressions), so I was in kind of dilemma what to do, as I read the task to do a sudoku solve as one task in Project Euler. To use the code from before and just take the correct corner numbers or really do something from cratch by myself? I decided to do both. So I took the right answer from the super fine solver and entered the forum to see what kind of solutions the early posters had done for the task. I took as bench … |
+0 forum
2 | ||

So, I'm working on a project for my Intro to Software Development course; it's a sudoku puzzle program. So far, I've encountered two big bugs: 1.) When I wrote the code in Visual C++, the display worked fine(it showed up on the screen as a normal puzzle), but when I copied it over to linux, it displays an entire line of the input file where only a single digit should go...Can anybody help me out with that? 2.) At the main menu, after selecting 'e' to edit a square, it tells me that the input coordinate is not valid. I'm … |
+0 forum
1 | ||

Reusable Code Snippet
Eleagant and fast Sudoku with generator expressions See the link ([URL="http://norvig.com/sudoku.html"]Solve Every Sudoku Puzzle[/URL] for fine description of logic of the code) I attach the top95.txt file of tough problems and the sudoku claimed toughest of all time by Finnish mathematician Arto Inkala ([URL="http://www.kristanix.com/sudokuepic/worlds-hardest-sudoku.php"]The Worlds Hardest Sudoku Puzzle[/URL]) Solving this was piece of cake for the code, even it does not consider special rules, but strives for simplicity and fast enough: [CODE] 1 2568 2468 | 458 345 7 | 246 9 346 457 3 46 | 1459 2 159 | 1467 467 8 2478 278 9 | 6 134 138 | 5 2347 134 ---------------------+---------------------+--------------------- 2478 … |
+0 forum
1 |

The End.