78 Topics

Member Avatar for
Member Avatar for vegaseat

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.

2
724
Member Avatar for Bchandaria

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 …

Member Avatar for ahmedhamdy
0
3K
Member Avatar for meowmonkey

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 …

Member Avatar for NP-complete
0
236
Member Avatar for amit.hak50
Member Avatar for JamesCherrill
0
821
Member Avatar for ashley9210

I am trying to make this pattern in python but stuck, any help please? Ashley http://images.colourbox.com/thumb_COLOURBOX3492089.jpg

Member Avatar for Gribouillis
0
145
Member Avatar for anish.anick

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 …

Member Avatar for Momerath
0
214
Member Avatar for klemme

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~ …

Member Avatar for klemme
0
182
Member Avatar for anisha.silva

HI, how do i draw the observer pattern in a component diagram? appreciate if someone could point me to a link thanks,

Member Avatar for TnTinMN
0
122
Member Avatar for shawn.widjaja

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-- ---^--- …

Member Avatar for deceptikon
0
153
Member Avatar for Dann0

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 …

Member Avatar for nmaillet
0
175
Member Avatar for prakash89.gitam

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 …

Member Avatar for Taywin
1
168
Member Avatar for vilas_tadoori

**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++) …

Member Avatar for NormR1
0
984
Member Avatar for sciwizeh

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 { …

Member Avatar for JamesCherrill
0
1K
Member Avatar for blackmagic01021

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??

0
127
Member Avatar for TrustyTony

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.

Member Avatar for TrustyTony
0
1K
Member Avatar for deucalion0

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 …

0
85
Member Avatar for DanOath

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 …

Member Avatar for zeroliken
0
396
Member Avatar for termin8tor

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 …

0
91
Member Avatar for CY0T3R

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)

Member Avatar for ravenous
0
193
Member Avatar for letters1417

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 …

Member Avatar for DavidKroukamp
0
511
Member Avatar for RicardoE

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 …

Member Avatar for smantscheff
0
142
Member Avatar for inplainsite

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 …

Member Avatar for maninaction
0
323
Member Avatar for shannonkr

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 …

Member Avatar for nmaillet
0
184
Member Avatar for klemme

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]

Member Avatar for klemme
0
4K
Member Avatar for QuesoTaco

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 …

0
132
Member Avatar for ari$av3s

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 …

Member Avatar for Airshow
0
193
Member Avatar for zachcoenen4

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 …

Member Avatar for zeeshan soomro
0
466
Member Avatar for judithSampathwa

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

Member Avatar for abelLazm
0
155
Member Avatar for c_newbie1

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 …

Member Avatar for thekashyap
0
240
Member Avatar for needsHelp!

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]

Member Avatar for Gribouillis
0
98

The End.