I am trying to get in the habit of practicing coding on daily basis. I decided to try do do tic tac toe in powershell. This took my a rediculous amount of hours to finsh. I am glad to be done. Nest projec will be something more useful like automating some stuff I do at work everyday # tic tac toe game # by shane lindberg #the starting point of available moves $humanmoves = @() $computermoves = @() $whosx = 1 $humanwon = 0 $computerwon = 0 $tie = 0 #pristine new board $box0 = " " $box1 = " …

Member Avatar
Member Avatar
+0 forum 3

You have a block of platinum that can be exchanged in your bank either for cash or for smaller blocks of platinum. If you exchange a block of m grams, you get three blocks of weight m/2, m/3 and m/4 grams each. You don't get any fractional part, as the division process rounds down the value. If you exchange the block of platinum for cash, you get m units of currency. You can do any number of exchanges for smaller blocks or currency. Given the value of a block in grams as input, write a program that would print the …

Member Avatar
Member Avatar
-2 forum 6

Here's a simple game code, open a new vb project and copy paste this code and hit run. the game contains 3 levels, all you have to do is to shoot the smiley faces to earn money using mouse clicks, also there's a boss enemy on level 3. I didn't have much time to add more levels to the game (actually i only tried to play it once :p), here's my point of this code "Just for fun" try to import some enemy characters(in a picturebox) and add more levels and add some sound effects to the shooting or when …

Member Avatar
Member Avatar
+3 forum 8

I have one class called Class1.cs using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace static2 { public class Automobile { public static int NumberOfWheels = 4; public static int SizeOfGasTank { get { return 15; } } public int compute(int a,int b) { int c = a*b; return c ; } public static void Drive() { } //public static event EventType RunOutOfGas; // Other non-static fields and properties... } } I am trying to use the compute method from Class1 under Program.cs using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using static2 ; namespace static1 …

Member Avatar
Member Avatar
+0 forum 2

Hy I would like to know what python gui framework, I can use that will be compatible cross platform and will help me create my snippet saver, that will be relational database, with categories for each language. I thought I can use kivy to create my graphical interface than use standalone python to create the rest. Am i on the wright track? Oh my experience with python goes like this, I finished codeacademy python watched some tutorials 2 years of web experience html css js php mvc, some java swing and the kivy pong game etc. Thank you

Member Avatar
Member Avatar
+0 forum 2

What is Rich Snippet and Link prospectus?

Member Avatar
Member Avatar
+0 forum 3

I wanted to make an array of bits which I could click on and off at will. Sort of a register you could manipulate. First thing that came up was a checkbox control. But I wanted to change the usual checkmark with a 1 or a 0. With tips from JerryShaw and Ramy Marhous I came up with the following.

Member Avatar
Member Avatar
+0 forum 3

I posted one Scheme code to Legacy Languages, and noticed that the formating for Lisp style quoting (single single quote or back quote before) does not function. I know you have more urgent things to consider, but you could put it in your list, Dani.

Member Avatar
Member Avatar
+0 forum 3

What is the recommended way to make changes to a code snippet that I have posted after the half-hour edit period is over? Would it be to add another posting with the new code or make a new posting and somehow invalidate the original, or could the edit period be reactivated or is it something else altogether? Is there a community concensus on how to edit a code snippet?

Member Avatar
Member Avatar
+0 forum 2

Hey everyone, We haven't done a good contest here on DaniWeb for quite some time, so I'd like to start one up again :) Throughout the months of June and July, I'd like to encourage members to submit fully working code snippets to our library. Throughout the month of August, we're going to vote on the best snippets fitting the criteria of most creative functionality, most elegant code and most efficient algorithm. The three winners will each receive Amazon gift certificates up to $250. More details to follow shortly :) Happy coding!

Member Avatar
Member Avatar
+3 forum 90

Here are instructions for voting for winner of the code snippet competition! http://www.daniweb.com/community-center/threads/429756/code-snippet-contest-...-cast-your-vote

Member Avatar
Member Avatar
+0 forum 2

Cast your vote in the Summer 2012 Code Snippet Contest :) **http://www.surveymonkey.com/s/CodeContest**

Member Avatar
Member Avatar
+1 forum 16

Just want to remind everyone that the code snippet contest is wrapping up the middle of this week, so get the last of your submissions in! :)

Member Avatar
+0 forum 0

I tried to make a post without code snippets of any kind in Geek's Lounge and got this error message >The code snippet in your post is formatted incorrectly. Please use the Code button in the editor toolbar when posting whitespace-sensitive text or curly braces. I found out that it's because I tried to post this line: Deleted that line and it posted without error. cor·rupt/kəˈrəpt/

Member Avatar
Member Avatar
+0 forum 5

Do not miss http://www.daniweb.com/community-center/geeks-lounge/threads/424660/code-snippet-contest

Member Avatar
Member Avatar
+0 forum 1

What is prefered version on handling 'serialized' code snippets, with features added to previous post? I have posted a [polynomial expression snippet](http://www.daniweb.com/software-development/python/code/425151/class-based-polynomials-with-magic-methods#post1817526) to which I could not include the division part because original poster whose thread inspired me to start, have not proved finding his solution to the problem. Should I post new thread and include all code, considering that parts of earlier functionality has also changed in this version? Should I post the new version as answer to my earlier snippet, or just include link to the more limited version posted earlier. I also refered my earlier snippet in …

Member Avatar
Member Avatar
+0 forum 3

Here you see how one could use recursion together with generators for (inefficient) permutations generator. It is kind of interesting to know how one can do it recursively (of course there exist many ways). Anyway this snippet demonstrates how you can use recursive generator call to feed a for statement. If you want usefull use of recursive generator, see my 11.11.11 11:11:11 Code Snippet post of [full multiword anagram program](http://www.daniweb.com/software-development/python/code/365540/simple-multiword-anagram-candidate-words).

Member Avatar
+0 forum 0

Just a quick snippet for beginners

Member Avatar
Member Avatar
+0 forum 6

Here you can share assembly code snippets for the YASM assembler and you can also help people with their YASM assembly programming and share 32-bit apps. :) I also have a problem when I do this (It is supposed to generate a very simple hello in the cmd(DOS/command.com/command prompt): [CODE] MOV AH,09 MOV DX,text INT 21h MOV AH,4Ch MOV AL,0; Exit code 0 INT 21h text: db "Hello!",24h; 24h = "$" [/CODE] Thanks in advance!

Member Avatar
Member Avatar
+0 forum 2

I posted a code snippet ([URL="http://www.daniweb.com/software-development/csharp/code/355645"]Optimizing Matrix Multiplication[/URL]) and when I check the stats on it and click the [URL="http://www.daniweb.com/forums/linkbacks.php?t=355645"]linkbacks[/URL] I get a page of "Incompatible Browser | Facebook" links. What's up with that?!

Member Avatar
Member Avatar
+1 forum 3

Hi, so I am trying to create a text file, that holds coordinates of bricks for the game brick breaker. I have a the textfile labeled as level1, and the coordinates are -5,9,0 -4,9,0 -3,9,0 now I am having trouble with getting python to open the file, and read the coordinates. I am not sure what command I would use to get that. also I am not sure on how to convert them into integers once they are read. Because they are currently in string form

Member Avatar
Member Avatar
+0 forum 9

Hi, I am trying to make a brick breaker game, but I am stuck. i need help moving the panel, and getting the ball to bounce off of bricks upon collision and erase the bricks. Also I wanted to create two lists, one that contains coordinates, the second would be an empty list, which would read the coordinates, and then create a brick, then add it to that empty list, I am just unsure on how to do this. here is my outline code[CODE]from visual import* scene.title = 'brick' scene.range=10 brick1=box(pos=(-5,9,0), length=1, height=1, width=1, color=color.white, material=materials.marble) brick2=box(pos=(-4,9,0), length=1, height=1, width=1, …

Member Avatar
Member Avatar
+0 forum 8

I have seen lots of websites that use Google Snippets to attract the users. What is the correct way to use them and in which part of website these are applied?

Member Avatar
Member Avatar
+0 forum 3

1. Imports System.IO 2. Create class "CreateThumbnails" or any class and place following function inside that class You need one function to response call back to main function Function ImageAbortDummyCallback() As Boolean Return False End Function

Member Avatar
+0 forum 0

this snippet is to create random passwords with a chosen length and a specified number of numbers. Uses both lower case and capital letters, which are chosen at random. And example is: wep5Q268LtTe. [B][U]How to use.[/U][/B] Using this is very easy just add to the appropriate page and call the procedure like passGen(10,6) for a password 10 characters long with 6 numbers like in the example: w7p5Q268L or passGen(5,2) for password 5 characters long with 2 numbers like: X5fD8.

Member Avatar
+0 forum 0

Hi all, I have a suggestion (not sure if it has already been discussed). In the profile, at the community tab, we have, for example, [quote] Code Snippets: 10 [/quote] If this number [i]10[/i] is made a href linking to all the code snippets posted by that particular user, it would be great. At present, to find a code snippet posted by a user, we have to go to statistics tab, click on [i]Find all threads started by xyz [/i], then look for "code snippet". This is like searching for a needle in the haystack if the user has created …

Member Avatar
Member Avatar
+6 forum 7

Would anyone be able to provide pointers / comments on this object-oriented PHP program? You can take a look at it on [URL=http://github.com/codejoust/PHPContactForm/]http://github.com/codejoust/PHPContactForm/[/URL] It's still a work in progress.

Member Avatar
+0 forum 0

The End.