78 Topics
|
|
If you draw shapes that are closely spaced and shifted, you can create interesting interference patterns, so called moire patterns. Here is an example using the Python module PyGame to do the drawing. |
|
Any one can help me out i want to display a spiral of n*n size with out using arrays? out put when n=2 should be 3 2 0 1 when n=3 should be 8 7 6 1 0 5 2 3 4 when n=4 should be 15 14 13 12 … |
|
What would be the best way (or any way) to print out a pattern, that may cut off at any point dependant on the x & y length? for example, if i wanted a pattern 4 up (y = 4) and 14 across (x = 14) I would need it … |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 and this 1 2 3 4 2 3 4 5 3 4 5 6 4 5 6 7 |
|
I am trying to make this pattern in python but stuck, any help please? Ashley http://images.colourbox.com/thumb_COLOURBOX3492089.jpg |
|
Hi All, I have a factory which has some concrete sub classes for generating reports (.txt, .csv,.xls) I want to make the interface of the concrete classes to be generic so that i can pass in diff types of parameters (Instead of DataTable i need to use DataSet or some … |
|
I have this pattern which finds links, inside a text string from file_get_contents function. Works fine, it seems. But I am curious to understand the expression, each charachter of it, what it does etc. Here you go: preg_match_all('~href=("|')(.*?)\1~', $var, $out); I know what it does obviously, but what does (.*?)\1~ … |
|
HI, how do i draw the observer pattern in a component diagram? appreciate if someone could point me to a link thanks, |
|
good afternoon gents, first semester cs student here. i'm having a world of confusion to create an X having the left formed with "+", the right side formed with "X" and the center with an "*". with an integer of 7, the output should look like: +-----X -+---X- --+-X-- ---^--- … |
|
Hey guys, I'm trying to make an AI character perform a pattern movement when a certain action occurs rather than have him do it all the time. I call two different methods, one to move him left, then move him right, the problem is the first method is still active … |
|
Hi I have a task to do. I will just brief it in a sentence, I have a file of 20000 lines. Now task is to recognize number of similar lines. ex1 : "The quick brown fox jumps on a lazy dog" ex2 : "The quick brown dog jumps on … |
|
**Pyramid Pattern** Dear Listers, I am in the process of wrting a java code that prints the following pattern 123454321 1234*4321 123***321 12*****21 1*******1 This is the code that I have written as public class Pyramid { public static void main(String[] args) { int j; for (int i=1; i<5; i++) … |
|
Hello, thought I'd ask before getting too deep into code to make sure I understand this properly. As described in the Gamma et. al. book the Visitor Pattern looks something like this: interface Visitor{ public void visitX(X x); public void visitY(Y y); public void visitZ(Z z); } interface Visited { … |
|
Hello, I have a observer pattern based JTable. With time it is poulated with new data packets. I use addRow functionalities to add my rows. But I want to put always the last coming datapackets at the top. How to do it?? |
|
Here slightly edited code from one of my earliest posts to DaniWeb. Limitted by recursion limit of Python as it uses recursion, but interesting for me. |
|
Hi there, I have been studying he Observer pattern among other design patterns, and I am having difficulty understanding how it works. I have read the design patterns book by Head First where applicable and researched it like crazy on the internet. I was wondering if anyone can point out … |
|
I am supposed to write a method to display a pattern as follows: ________1 _______21 ______321 _____4321 ____54321 ___654321 __7654321 _87654321 987654321 (underscores are simply placeholders to show alignment on my post they are not actually part of the printout) My program works and prints the aforementioned code correctly, however … |
|
Hello all! I am working on a regular expression to be used in descrambling words in my scrabble solver. What I am attempting to do is write a regular expression that can be used to find all characters within a scrambled word, irrespective of order and match them to a … |
|
1 1 0 1 0 1 1 0 1 0 1 0 1 0 1 How To Print The Above Pattern ?? (Using For-Loops Only) |
|
Okay so this is another question printing patterns but this time using input! I have to prompt the user and read an odd number from the input. I can only use System.out.print('*'); System.out.print(' '); and System.out.println(); I need to maximize my use of repetition and minimize the number of output … |
|
Hello dear community, I have a problem which I have no idea how to walk around, see I have a really large database, with france zip codes, I imported this data from excel. the thing is that when it imported all the zip codes starting by 0 are not starting … |
|
Hello all, I am currently developing a new website in asp.net, C#. I first designed the master page in Photoshop. I used a really cool pattern that I imported into Photoshop. I want to be able to put this on my website as a repeated image. My question is; How … |
|
I'm trying to create an xsd dictionary for some data migrations, I don't fully understand how to format xsd:pattern values correctly, I was wondering if anyone had any ideas. I have some values that were done already: <xsd:pattern value="[a-zA-Z]{1}([#-. a-zA-Z0-9]*)"/> <xsd:pattern value="([ a-zA-Z0-9]*)"/> But I don't know how to manipulate … |
|
Hi guys, It is working fine, and only allowing letters and numbers. I want to a feature, so that it has to be between 3-20 charachters/numbers long. [CODE] if (!preg_match("/^[A-Za-z0-9]+$/i", $_POST['brugernavn'])){ $dosomething = ''; } [/CODE] This is not working: [CODE] if (!preg_match("/^[A-Za-z0-9]{3-20}+$/i", $_POST['brugernavn'])) [/CODE] |
|
I am trying to get consecutive words in a document using flex. Normally the forward slash should work, but for some reason it is not. Also I need to account for spaces. So I can't seem to use that regex character for this, how do I account for consecutive words … |
|
Hi! I am looking to make an adjustment to this script. I'm trying to find a way to do it as neatly as possible, and without breaking any pre-existing functionality. The code is here, with its corresponding tutorial: [URL="http://tympanus.net/codrops/2011/03/28/moving-boxes-content/"]http://tympanus.net/codrops/2011/03/28/moving-boxes-content/[/URL] What I'm trying to do is have the first section open … |
|
I have been trying for about 6 hours to get this program to work. It's a C++ program for for loops. I am trying to go through a book, but I don't have source code for how this should be. I need to make a program that looks like this … |
|
hi there, i want to develop a login in asp.net C#. please can someone give me a guide to develop a login web page using MVC pattern i am using visual studio 2008 please can some show how to create a login using MVC thanks |
|
this program i made.. should take an input 'no' from the user.. and print the following pattern.. 0 0 n+1 0 n+1 n+2 0 n+1 n+2 n+3 0 n+1 n+2 n+3 n+4 ....... n 0 n+1 n+2 n+3 n+4.. n-1 0 n+1 n+2 n+3 n+4 0 n+1 n+2 n+3 0 … |
|
Please help me with, creating an checker board!! this is all i got right now [CODE]from cs1graphics import * n = 8 paper = Canvas(400, 400) for y in range(n) : for x in range(n) : square = Square(100) square.moveTo(x*50, y*50) paper.add(square) [/CODE] |
The End.