Russian Peasant's Algorithm : What Do The Bold Lines Do

Nov 7, 2010

So I was reading some code that multiplies numbers using the Russian Peasant's Algorithm just now. What do the bold lines do?

while (a != 0)
{
fout << setw(5) << stage
<< setw(13) << a

[code]....

View 4 Replies


ADVERTISEMENT

VS 2010 Listbox Specific Lines In Bold?

Jan 31, 2012

as per title, I want specific lines in listbox as bold or with colours.

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Dim xyz() As Byte = {&H1B, &H0, &H10, &H1B, &H0}

ListBox1.Items.Add("XYZ: " & read_write_str(deviceHandle, xyz, xyz.Length))I get reply from device for i.e. 1234567890, I want this to be in BOLD or if I could add colours to it.

View 1 Replies

Implement An Algorithm Called "Diamond-Square Algorithm"?

Jun 8, 2009

I am trying to implement an Algorithm called "Diamond-Square Algorithm" I am having trouble ending it so that it retiurns the required result. So far I have the folloiwng.

[Code]...

View 3 Replies

Bold Some Dates The Program Doesn't Show Bold Dates On Month Calendar?

Dec 15, 2009

I have one more problem with MonthControl.And when I bold some dates the program doesn't show bold dates on month calendar.When I move on next or previous month and get back to currently month the program normal displays bold dates. What's the problem?

View 22 Replies

2008 Count Lines In Textbox With Multiple Lines Using Label To Display The Numbers?

Sep 3, 2009

how to count the lines in textbox1.text (with multiplelines). I don't need to count each character. I only need to count each line from top to bottom in textbox1.text (multiplelines) and I will use Label1 to display the numbers.

example:

1-pauljaones
2-tommyperrry
3-marktoms
4-Jonessmith
5-paulwhite

Obviously this is 5 lines and that's what I need to count.

View 12 Replies

Get A Bunch Of Lines From A Text File (they Will Be Filenames Eventually) Which Are Split By New Lines And Puts Each One Into An Array?

Jun 22, 2010

I have written a simple script to get a bunch of lines from a text file (they will be filenames eventually) which are split by new lines and puts each one into an array..

Dim ary() As String
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If My.Computer.FileSystem.FileExists("C:MenuFiles.txt") Then

[code]....

The only thing I can do for now is either use the substring function to remove the first character from all array values after 0 but I don't like that because it's messy and what if the split "works" as I want it to one one of the lines and knocks of the first character when I don't want it to.

View 1 Replies

Read Lines From Txt File After Every 7 Lines .net?

Mar 17, 2012

below are a few lines from my text file(10929 lines)I need to read each line and insert into MS Access. each line is a column in my table and the record changes on every 8th line or to be more specific(on every 8th line you will see a number [1,2,3,4,5,6,7,8,9.....] this is where another record starts,

[Code]...

View 15 Replies

Looking For An Algorithm In C#?

Apr 14, 2010

I'll do my best to explain what the algorithm is supposed to do:There's a class 'Recipe'.ach Recipe can include other Recipes but cannot include itself or any other Recipe that includes it. So, a simple example is we have just two Recipes A & B.A,B,C(1) Recipe C Adds B(2) Recipe B Adds A(3) Recipe attempts to add C, but can't because of the relationship. C- B - A.

View 4 Replies

RSA Algorithm

Sep 8, 2010

I'm Micah. Electrical/Electronic engineering 500 level student. I'm working on my final year project. please i need a code for the implementation of RSA algorithm in VB.NET. your assistance will be appreciated.

View 2 Replies

Algorithm For VB Editor?

Dec 26, 2009

is the algorithm for VB editor released anywhere? because i'm trying to create my own editor that gives various options like Linking and self defined array functions (see below) such that one edit can update several others in various places, but i do still wish to have the auto formatting VB editor provides us with.an example of a self defined array function (count):we can transform this:

Public Class test
Private Shared number_of_methods As Integer = 2
Public Function get_number_of_methods_juz_an_example() As Integer
Return number_of_methods

[code]....

well of course instead of the code it would be just click and select (i wrote out the code in <> just to show what's happening)

View 5 Replies

BLS Algorithm Guide

Mar 15, 2012

i need some tutorial to implement BLS (Boneh-Lynn-Shacham) signature algorithm to create private key and public key to encrypt a message.I need tutorial to implement this in VB.NET.

View 1 Replies

Converting And Algorithm In C# To C?

Oct 21, 2005

I found an algorithm in C# that I need to convert to C. Problem is, I have never used C# so the syntax is really strange to me.

Implementation of Berlekamp-Massey algorithm for calculating linear complexity of binary sequence
s = byte array with binary sequence
returns Length of LFSR with smallest length which generates s

[Code].....

View 7 Replies

Create My Own Algorithm?

Dec 14, 2010

I want create my own algorithm

View 1 Replies

Using Own Encryption Algorithm In VB?

Aug 21, 2009

How would I be able to use my own Encryption Algorithm in my program such as encrypting text. I havn't been able to figure this out.

View 1 Replies

An Algorithm Which Can Calculate 500 factorial?

Aug 25, 2007

can you write an algorithm which can calculate 500 factorial.scientific symbol(mode) is unauthorized.Answer should be in String mode.

View 1 Replies

.net - Intelligent Selection Algorithm?

Apr 29, 2009

I am using VB.NET and I am trying to come up with some algorithm or some pseudo-code, or some VB.NET code that will let me do the following (hopefully I can explain this well):I have 2 collection objects, Cob1 and Cob2. These collection objects store objects that implement an interface called ICob. ICob has 3 properties. A boolean IsSelected property, a property called Length, which returns a TimeSpan, and a Rating property, which is a short integer.

OK, now Cob1 has about 100 objects stored in the collection and Cob2 is an empty collection. What I want to do is select objects from Cob1 and copy them over to Cob2. I want the following rules obeyed when selecting the objects though:

[Code]...

View 2 Replies

Algorithm For Temperature Conversion?

Nov 20, 2009

[code...]

So far, my friend has this, and we're trying to figure out how to get the code to tell convert F to C, and back. All we can use for input is (example:) 10,f and it will change it to 40,C.

View 2 Replies

C# - Implement Your Own Sorting Algorithm?

Apr 29, 2011

Forgive me if this is a silly question....but I think back to my Comp. Sci. classes and I distinctly remember learning/being quizzed on several sorting algorithms and the corresponding 'Big O' notation.

Outside of the classroom though, I've never actually written code to sort. When I get results from a database, I use 'Order By'. Otherwise, I use a collection class that implements a sort. I have implemented IComparable to allow sorting; but I've never gone beyond that.Was sorting always just an academic pursuit for those of us who don't implement languages/frameworks? Or is it just that modern languages running on modern hardware make it a trivial detail to worry about?

Finally, when I call .Sort on a List(Of String), for example, what sort algorithm is being used under the hood?

View 9 Replies

Convert Algorithm From C# To .NET Fail?

May 30, 2011

I'm trying to convert the following algorithm from C# to VB.NET and the VB.NET I have is not producing the same results as my C# algorithm, can someone tell me where I've gone wrong in my conversion?

public static IEnumerable<T[]> Combinations<T>(this IEnumerable<T> elements, int k)
{
List<T[]> result = new List<T[]>();

[code]....

View 4 Replies

Encrypt Vbs File Using Some Algorithm?

Oct 17, 2011

I need to encrypt vbs file using a cryptographic algorithm. I read about converting it into vbe file, but is there any other way to do it?

View 1 Replies

Euclid's Algorithm And While Loops

Mar 17, 2011

I have visual studio 2008, and we have been given specific tasks to carry our for our course, we have been asked to implement euclid's algorithm by using a while loop, doing so without the visual part of visual basic whatever that means an example of a question they gave was 1)HCF(88,26)=2 how I would go about doing this, as I am thoroughly confused, and deadlines are fast approaching.

View 3 Replies

Find And Replace Algorithm?

Sep 9, 2010

I have some text files that contain

<img width="100" or

<img width="1400" or....

How could i replace all above with the following, since the image width is not static?

<img width="200"

View 1 Replies

Getting Code Of Antnet Algorithm

May 8, 2012

i am working on project of using ant colony optimization and espcially on antnet algorithm but i have many problems in programming of this algorithm, and since i dont perfer using simulation for that purpose.

View 4 Replies

Implement Bankers Algorithm In .net?

Jan 10, 2010

i want to implement bankers algorithm in vb.net how can i implement it

View 1 Replies

Lexicographical Sort Algorithm Using C#?

Jul 20, 2011

I am struggling to write a sorting algorithm that can sort characters in a word lexicographically (alphabetically) as follows

lexicographical sort of the word :- Contamination
lexicographically
Sorted Text Index

[code]....

write a pseudo code / or an implementation in C# or VB.NET of how I can do a lexicographical sort of the word above?

View 3 Replies

VS 2008 Algorithm For Pairing?

Nov 7, 2010

I am trying to pair numbers, like for a tournament. I need an idea for the algorithm to pair up the numbers, not the code, but the algorithm.

View 1 Replies

VS 2010 Backtracking Algorithm

May 16, 2010

Searching the internet for an example of backtracking in VB.Net has proven fruitless. All the examples I found were either in a language I don't understand (making it impossible for me to convert it to vb.net) or they contained zero commenting (making it difficult to actually understand what is going on).Does anyone have an example of backtracking in VB.Net? Commenting would be useful so I don't have to decipher single letter variables.

View 16 Replies

VS Web Browser Cache Algorithm

Jan 27, 2010

I am currently developing a advanced web browser in Visual Studio 2008. I was reading information about a browser i currently use, it said that the browser goes faster thanks to a "advanced cache algorithm". I was wondering if it was possible to implement this into my web browser, and if so how would i do so? I am using Visual Studio 2008 writing in .Net.

View 3 Replies

What Voice Compression Algorithm To Use

Jan 21, 2010

which algorithm used for voice compression mailing and decompression

View 2 Replies

.net - Graphics.drawString - Draw String In Multiple Lines And Know How Many Lines Given String Will Take

Aug 26, 2011

I want to draw string in multiple lines and and I want to know how many lines given string will take. I am using following method.

[Code]...

View 1 Replies







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