Search found 63 matches
- by SumCode
- Wed Oct 15, 2014 3:18 am
- Forum: General coding help
- Topic: Using Regex to find elements?
- Replies: 3
- Views: 2264
So when a user enters some text into a textbox I want to find matches with this pattern '[A-Z][a-z]?\d+' So if a user entered "Hg2H1' it would split it to 'Hg2' and 'H1' and it does. However, if a user were to enter 'Zn4Pb15H2O' the program would split it to 'Zn4' 'Pb15' and 'H2O' which isn't d...
- by SumCode
- Sun Oct 12, 2014 11:37 pm
- Forum: C-Sharp Tutorials
- Topic: [C#] Using Lambda Expressions
- Replies: 1
- Views: 1923
What is a Lambda expression? A Lambda expression, according to MSDN , it is an anonymous function that you can use to create delegates or expression tree types. Now, that sounds very confusing, but I promise you will understand in a little. Using the Lambda Expression: To create a Lambda expression...
- by SumCode
- Sun Aug 31, 2014 12:28 am
- Forum: Tutorials
- Topic: How To Sort A List Using A Custom Method
- Replies: 0
- Views: 2057
Introduction: To normally sort a list, one would use ArrayList.Adapter(exArray).Sort() Unfortunately, this only sorts that array alphabetically. Fortunately, we can create our own way of sorting things, so let's jump into it! Part 1: Creating the Comparer Class -Step 1: Create the new class by righ...
- by SumCode
- Sat Aug 30, 2014 3:31 pm
- Forum: Coding Help & Support
- Topic: Compare items using two variables
- Replies: 3
- Views: 1443
Finally I made the working code: Public Class PopularityComparer Implements IComparer Dim pop As Specialized.StringCollection Dim aW As Specialized.StringCollection Public Sub New(ByVal allWords As Specialized.StringCollection, ByVal popularity As Specialized.StringCollection) pop = popularity aW = ...
- by SumCode
- Fri Aug 29, 2014 12:21 am
- Forum: Coding Help & Support
- Topic: Compare items using two variables
- Replies: 3
- Views: 1443
I'm sorry I'm not completely clear on what it is you're trying to do :? So if I had the the list of words tango amigo photo patio outgo outdo motto micro metro mango macro macho lotto limbo lento lasso piano plato pluto polio turbo And I used the the comparer the program should output: tango turbo ...
- by SumCode
- Tue Aug 26, 2014 2:04 am
- Forum: Coding Help & Support
- Topic: Compare items using two variables
- Replies: 3
- Views: 1443
I have two arrays in My.Settings (allWords and popularity). allWords contains a lot of words and popularity contains the same amt. of values as allWords, but instead of words it's numbers (1, 2, 3, etc.). Then I have an array of letters (etaoinshrdlcumwfgypbvkjxqz). So using that knowledge I want to...
- by SumCode
- Wed Aug 20, 2014 3:37 am
- Forum: Coding Help & Support
- Topic: Program reading strings wrong?
- Replies: 1
- Views: 1150
So I have a text file that contains every word on this list ("C:\ListOfWords.txt") and I have a program with this code: Dim allWords As New Specialized.StringCollection Sub Main() Dim hits As Integer = 0 Dim sw As IO.StreamWriter = New IO.StreamWriter("C:\log.txt") allWords.AddRa...
- by SumCode
- Wed Jul 30, 2014 2:02 am
- Forum: Coding Help & Support
- Topic: Program Skipping Steps
- Replies: 2
- Views: 1339
You can label the code you want to run, then use GoTo :) Take the following code, for example: Public Sub doItMultipleTimes() ' Start a named subroutine Dim counter As Integer = 0 ' Holds the number of times the "loop" has already iterated. While (counter > 3) ' Begin the "while-bloc...
- by SumCode
- Tue Jul 29, 2014 3:31 am
- Forum: Coding Help & Support
- Topic: Program Skipping Steps
- Replies: 2
- Views: 1339
So basically my program gets some elements from a webpage and does it multiple times by itself (well at least it should) using this code For i As Integer = 0 To getmoviename.Count - 1 If getmoviename(i).GetAttribute("property") = "og:title" Then Dim moviename As String = getmovie...
- by SumCode
- Sun Jun 08, 2014 9:05 pm
- Forum: Work in Progress
- Topic: [WIP] Workout Manager
- Replies: 5
- Views: 2576
-Intro Hey guys guys SumCode here and wow it has been longer than forever since I have been active here. Anyways I yesterday I was thinking to myself about how it's summer and I haven't been very active so I wanted to get back to working out again so I created this program -Description So what is i...
Copyright Information
Copyright © Codenstuff.com 2020 - 2023