Patterns Using For...Next?

Sep 23, 2009

I'm supposed to write a program that displays the following patterns, one below the other:

(1)
*
**
***
****

[code]....

I get the first pattern using this code.

For i As Integer = 1 To 10 'number of row
For j As Integer = 1 To i 'number of *
Console.Write("*")

[code]....

When I try to do the 2nd pattern I get a square of 10 asterisks.Here's what I have:

For l As Integer = 1 To 10 'number of new rows
For k As Integer = 10 To 1 Step -1
Console.Write("*")

[code]....

View 4 Replies


ADVERTISEMENT

Get Text Between Two Patterns?

Nov 10, 2009

I'd like to tell a regex statement to get the text between two patterns IE: find /* and */ and get all text between it.

I can do Dim rRegex As New Regex("/*|*/"), which will find all matches of /* and */ in order, but what can I do to get the text between them?

(I think that regex is correct, I might be wrong though)

I want each Match from my rRegex variable to return the text between the two patterns in the regex, if that makes sense.

View 4 Replies

Display User Defined Patterns?

Apr 20, 2009

This program would allow users to click a button and display three different types of patterns (shown below). The user could also enter the number of rows they wanted to display and a character that they wanted to use for the pattern (*, &, etc).[code]...

View 3 Replies

GetFiles - Any Way To Specify Multiple Search Patterns

Jan 14, 2005

When you do GetFiles() you can specify a search pattern such as *.txt. How can I specify multiple patterns. For example, in windows search you do *.jpg;*.bmp;*.gif. I tried that but no luck and the msdn not work. Is this possible?

View 11 Replies

IDE :: Doesn't Detect Any Dublicate Patterns

Sep 25, 2009

The following code works fine when it doesn't detect any dublicate patterns. Is it possible to somehow alter to to also work with dublicate patterns? (i.e. to color duplicate patterns as well and nto just unique ones) Any ideas? [code]

View 1 Replies

C# - Reading Text File With Linq With 2 Patterns?

Jul 22, 2011

I need to read a text file like this

MyItemName = Description @ MoreInfo

Now I need to convert this 3 fields in to a table. using the '=' and '@' as pattern.

View 2 Replies

Design Patterns - Implement The IDisposable Interface With A Dispose?

Apr 21, 2009

Recently I needed to compare a suggested pattern for IDisposable and object finalization with the auto-generated one we which VS2005/VB.NET provide. We have used the auto-generated one a fair bit, but after looking it the two side by side I had a number of questions about the VB.NET implementation..

[Code]...

Overall I am confused by the supposed added value of having an extended code-path that executes when Dispose() is called explicitly(as opposed to having a common path that is executed regardless of whether or not Dispose() was called explicitly). how it does anything other than delay the actual release of managed resources if Dispose() isn't called directly. In essence it seems to only work to make the managed resources unreachable in the object graph, orphaning them until the 2nd GC run rather than freeing them at a point where they are known to be no longer needed.

View 3 Replies

Sheep Will Follow And Who Started Doing Patterns In AVATAR Pictures?

Aug 29, 2009

Who started the pattern making in AVATAR pictures??I've seen none with circles, ovals or any curves in yet either.

View 11 Replies

Pattern Finding In Files Using Byte Arrays And Multiparted Patterns To Search ?

Nov 28, 2011

As a continuation of my other thread, "Finding A Pattern without a string Array (http:[url]....)", I would like to continue asking questions about enhancing a scanner with a few things:

1. Here is my code for finding signatures in a file:

'First the Signature Class:
Interface Signature
End Interface[code]......

View 2 Replies

Design Patterns - Inheritance - Do All Properties In The Derived Classes Have To Be Declared In The Base Class

Aug 8, 2011

Background:I have a base class and several inherited derived classes. The derived classes don't always need to have the same properties. If any properties are shared among the derived classes, those properties would live at the base class level ('Contents', for example).Similarly, GoodDocument below has 'GoodThings' but would not want/need to have 'BadThings'.I want to treat instances of both 'GoodDocument' and 'BadDocument' as type 'Document'

public mustinherit class Document
public property Contents as string
public sub new()...

[code]....

View 3 Replies

C# - Speeding Up An Algorithm That Find Patterns In A Growing Collection - Code Review Beta - Stack Exchange?

Jun 25, 2012

I want to find a way to speed up this code.if you look at the condition of If calculated Then in the code below, this is what slowing down the code.While the code provided seem fast with Const initBit = 4 try it with something over 12.

I want to be able to use this code (with calculated param as True) with initBit of 20 or more.

Beware that 20 or more might require a gig or more of ram and/or compiled as x64.

C# code (converted with an online tool from VB.NET):

[Code]...

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved