Way To Optimize My Algorithms

Sep 28, 2009

I had been working on a project that would generate a loan schedule.

But, It needs to factor in specified holidays and weekends.

Now, when running with a small 'term', it seems to work fine.[code]...

View 14 Replies


ADVERTISEMENT

Encryptor / Decrypter Algorithms Need Checking

Jun 13, 2011

Problem: QuoteNeed to design a program in VB.net 2008 that can encrypt and decrypt messages stored in simple text files using a private key stored in a separate file. Software should also be able to allow the users to enter simple messages that either displays the encrypted or decrypted message. The encryption method should use a simple substitution method. It should be set out in the following format:

[Code]...

View 1 Replies

Implement Encryption And Decryption Algorithms?

Nov 30, 2010

How to implement encryption and decryption algorithms in vb.net? Which algorithm is the best suited one?

View 4 Replies

Sorting Algorithms Preferably Fastest

Jan 19, 2012

I am quite new at VB.NET and just need helo on sorting algorithms, prferbly the fastest (quick sort) but bubble would so. It is for sorting and array for 12 numbers, which are being enter by the user via a input box. These are then transfered onto a listbox for visual aid. so the steps involved would be: (already done)1) Enter then inputs into array via inputbox2) Input to sppear in listbox (not done)3) Sort the array ascending/decending4) print results into the listbox again.In my code there is also a total and a average, but that doesnt need any help on it. [code]

View 4 Replies

VS 2008 - How To Implement New Encryption Algorithms

May 28, 2009

I want to try and use the new encryption algorithms provided with .NET 3.5. Any links or examples for how to use one of them to encrypt xml content?

As written on msdn site is:
The following algorithms are included:
Advanced Encryption Standard (AES) with key sizes of 128 and 256 bits for encryption.
Secure Hash Algorithm (SHA-256 and SHA-384) for hashing.

Elliptic Curve Digital Signature Algorithm (ECDSA) using curves of 256-bit and 384-bit prime moduli for signing. This algorithm is provided by the ECDsaCng class. It allows you to sign with a private key and verify with a public key.

Elliptic Curve Diffie-Hellman (ECDH) using curves of 256 and 384-bit prime moduli for key exchange/secret agreement. This algorithm is provided by the ECDiffieHellmanCng class.

View 4 Replies

Find Virus Scanning/detection Algorithms?

Feb 2, 2010

Where I can find virus scanning/detection algorithms?

View 3 Replies

Secure(ish) Encryption/decryption Algorithms Using A String As A Key?

Aug 25, 2009

Is there a way to encrypt/decrypt text (string form) in VB.net using another string as a key? Meaning, if one user encrypts using this key, the other user needs to decrypt using the same key?I do NOT mean public and private key encryption or anything of the sort.If not, what is the second best way to encrypt/decrypt data without public/private keys?I want to make a simple way to send messages securely.

View 2 Replies

Write A Pseudocode For 2008 Programs / Algorithms?

Feb 9, 2010

How to write a pseudocode for vb.net 2008 programs/algorithms? is there any defined way?

View 2 Replies

Make Flowcharts To Describe Algorithms Used / Test Plans

May 4, 2009

i have a program(i already coded etc).Now i'm asked to make flowcharts to describe the algorithms used + test plans.Regarding flowcharts,how do i implement functions + procedures in them and about test plans--anyone knows or has some good site or notes so i know what i can do??

View 1 Replies

Optimize Waypoints For More Than 25?

Sep 10, 2010

I need to order lists of up to 100 addresses in optimized order. Is there a way to do this since getdirections is limited to 25? i don't se any way around this 25 limit. Is there one I'm missing?

No I'm trying to use MapPoint object model but it crashes as well with this many waypoints. Here is my example proof of concept code from Excel:

Sub OptimizeRoute()
Dim objApp As Object 'New MapPoint.Application
Dim objMap As Object 'MapPoint.Map

[Code]....

View 2 Replies

Will The Compiler Optimize This

Mar 8, 2012

Consider this

bar = 1
foo = <1 or 2, depending on previous code>
if foo=1
while bar <= 5

[code].....

What I want to know is, is the compiler smart enough to optimize away the (apparently) repeated tests for "foo = 1" since foo is not modified in the body of the loop?If so, I might use the second construct since it is semantically equivalent (I think!), takes less code and reduces indentation levels.

View 6 Replies

DB/Reporting :: Move Data (400 GB) Into Database Then Be Able To Run Various Algorithms Determining Correlations Of Time Series

Mar 12, 2012

I'm faced with a (fun, actually) data mining problem; I have raw ASCII files from instruments, and I want to move that data (~400 GB) into a database, then be able to run various algorithms determining correlations of time series, etc. I would like to write the mining algorithms in Visual Basic (.net, VS 2010 right now), and be able to do visualizations with VB code I have in hand.On the nature of the data: think of a set of several thousand devices, each recording a measurement at a given interval - so I'm talking time-series vectors. It's not more complex than that - though I may have vectors with holes, etc. - not sure what problems of that sort lurk in the data.I spent today re-acquainting myself with VB.NET's interface to (in one case) a Microsoft Access database. What used to be fairly simple - DAO I think it was - involved tables, recordsets, etc (and that would likely be fine). Now I seem to be required to have a weird variety of generally useless objects, e.g. 'adapters', 'datasets', etc. The problem is that I know exactly what I need, and all this extraneous stuff just gets in the way (certainly in coding complexity and opaqueness, and likely in efficiency as well). If any of these mechanisms gave me a kind of virtual access to the entire dataset, and let me control caching parameters, etc.it might be great, but I found nothing along those lines. It seems like useless bloat, though I suppose it must be useful to someone.Anyway, I tried a number of different approaches, and none seemed at all aimed at what I need to do: efficiently do math on a large dataset. I can't believe I'm the first to have this problem, but I can find no useful wisdom out there. I'd be comfortable with pretty much any underlying database mechanism: MySQL, SQL Server, MS Access, but ideally something generally SQL based (I may eventually have to transition this entire system to draw from a client's SQL database, though that's not an overriding concern now). Other than that I want simplicity and efficiency. I thought my old ODBC techniques would work, and to some extent they do, though modifying tables seemed to have bizarre problems (no errors, but not modifications either).

I do have a fairly aggressive deadline to show some algorithm results, so my focus in the short term is to get something reasonable working *in* the short term - in other words, it's less important to me to pick the 'fastest' relational database than it is to pick a database that lets me focus on coding the algorithms, not working through tedious data access coding. If this db could be any smaller, I'd have tried to do it all 'in memory' at least for proving concepts; I don't want to have to learn an entire jargon and approach just to be able to retrieve data points.Perhaps I'll need to bite the bullet and just write something myself, a .dll perhaps just to save and restore large time series vectors. It seems a bit frightening to me that one would have to do this in this age, what with all the database systems out there, but I don't have much time to work through arcane interface logic.

View 2 Replies

Timing Code - Measure The Performance Of Seven Sorting Algorithms In A Single VB 2008 Program

Sep 15, 2010

I'm trying to measure the performance of seven sorting algorithms in a single VB 2008 program. I've tried using a Timer componend, the Stopwatch, and DateTime.Ticks but nothing works. The following simple code produces a result of about 500 (milliseconds), which is correct, but when I change 500 to 1000, I get a ridiculous result like 0 or 8.

[Code]...

View 11 Replies

Optimize Linq Contains Method

Apr 1, 2012

I need a list from OldGuids that are not in the NewGuids, so I used the Contains method, the problem is that it is already running more then half hour, is there a faster way? or how much longer would it take about? [code]

View 2 Replies

Optimize Ms Access On Network?

Nov 1, 2010

Is it possible to use a string as an array? I mean:' I have several arrays

Dim a10() As Integer = {530}
Dim a15() As Integer = {370, 231}
Dim a20() As Integer = {305, 176, 126}

'I declare a variable as a string and I assign the name of an array to it

Dim tablaalfa As String = "a10"

'I retrieve data from the array using the name of the variable instead:

lbl1.Text = tablaalfa(2)

I guess it doesn't work in this way?

View 3 Replies

What Are Things Vbc.exe Does When /optimize Switch Is Used

Mar 6, 2012

vbc.exe has something called /optimize switch right. If I enable that what are the optimizations the compiler can do for me? The MSDN documentation just curtly says 'does various compiler optimizations'. Where can I find the complete quantified view of the different optimizations that actually goes into.Here is the thing I am pursuing this route. One of the code blocks in a module I am leading has a lot of delimited array manipulations. I believe this is going to be a heck costly in terms of string memory handling. I am looking to see if I can retire them by way of simple properties or methods so that the compiler can internally do something like our c++ inline functions making a best win-win offer in terms of both memory and processing time. I admit when the compiler translates them as inline function, the JITed code might be big in size right?

View 7 Replies

.net - Optimize This Simple But Horrible Implementation?

Jul 27, 2011

I basically want to remove the formula from the cells but want to retain the calculated values.

SO, I implemented it easily and it works great but REALLY SLOW. (About 2 mins for 1800 cells)

I have : Dim col As Excel.Range = getRange()For Each cell In col cell.Value = cell.Value Next

I tried to do this to the first cell and then autofill the rest, but that copied the value of 1st cell to the rest of the cells in column.

View 7 Replies

How To Optimize Simple But Complex Looking Implementation

Jul 28, 2011

Want to dump a fetched table to a excel sheet. [code] I am new to data fetching and ADO.Net concepts and just got it working.But. This seems to be very inefficient and lame to me. So, can you help reducing the complexity and may be improve performance ? A totally different (Better) implementation is most welcome !

View 2 Replies

Optimization :: Optimize Own Code Written?

Jan 20, 2011

How can I Optimize my own code written by VB.net? Is there any tools for it? Does Visual Studio have any one? What's your suggestion? I use VS2008 as my editor.

View 1 Replies

Optimize Classes Before Serializing And Saving

Oct 24, 2010

Often it is very usefull to save data as a class by serialize and compress it. From few experiments I have noticed that
Class A
Public name as string
Public List as new list(of string) <---- empty
End Class

Class B
Public name as string
Public List as list(of string) <----- not instantiated
End Class

If I serialize and compress the 2 classes the class B uses less spaces once serialized and compressed. This suggests me that if a class contains a list that is instantiated but empty it is better to set that to nothing and reset as new when it is decompressed and deserialized. Is there any dll that optimizes a class to be stored (serialized and compressed) and restore it when it is decompressed and deserialized?

View 6 Replies

Simplify And Optimize This Checksumming Code?

Jan 27, 2011

Public Function CalCheckSum(ByVal ByteList As List(Of Byte)) As List(Of Byte)
Dim total As Integer = 0
For Each b As Byte In ByteList

[code]....

View 1 Replies

Copy Selected Listview Items To Another (optimize)?

Oct 28, 2009

I fairly new to .Net. I did a small project a year or so ago but haven't coded in it since. I'm picking up maintenance of a project where items are selected from one listview and copied to another removing the selected item from the "parent". The current code is in two steps:1. Get the selected items removing from sender:

Public Function GetSelectedItems(Optional ByVal pRemoveFromList As Boolean = False) As ListView
Dim mList As New ListView

[code].....

View 4 Replies

Forms :: Optimize Code And Lower CPU Usage?

May 14, 2009

When my form first loads, it runs at about 30k CPU, but after about 10 minutes of use, it goes up to (and stays at) about 70k CPU.

What ways can i optimize my code to allow the CPU usage to stay low, or how can i lower it during the running of the program.

My most concerned areas of the CPU are:

1. I have a web browser, and when a user types in a url and presses go or enter, the CPU jumps about 4k:

Private Sub Go_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Go.Click
WebBrowser1.Navigate(OldURL.Text)

[Code]....

The second worry is when i open other forms, it boosts the CPU up aswell. the only code for this is:

Form.Show()

View 1 Replies

Optimize Loop Through Lines Of MultiLine Textbox?

Oct 11, 2008

I 'm currently developing program which I can check the lines of each textbox if it has same length. The code is working properly in few lines like 2000 lines, but when I try to load a textfile which has 50,000 lines, my program is not responding anymore it takes forever. [code]...

View 7 Replies

Optimize The Code For Copying Data From One Dataset To Another?

Oct 6, 2009

this is in reference to my main post here update mdb with data from different tables in dataseti have two tables in a dataset called dsSource. dsSource.Tables(0) has the following columns: ,,,,,,,code,art,sizerng1,sizerng2,sizerng3,etc...... dsSource.Tables(1) has the following columns: ,,,,,,,code,art,size1,size2,size3,etc...... the conditions here are: 1) to look for "1" in columns sizerng1, sizerng2, etc. of dsSource.Tables(0) 2) match code and art on both tables finally if both conditions are valid then the size values in columns size1, size2, etc. will be assigned to columns in sizerng1, sizerng2, etc. my main concern here is i have to loop through all rows in both tables which takes a long time, so is there a better way to do this than the code i have below?.

'***put the sizes from weights to traps file
row1 = 0
For Each dr As DataRow In dsSource.Tables(0).Rows

[code].....

View 8 Replies

VS 2008 : Optimize Recursive Treeview With AddRange?

Jun 23, 2009

I have this seperate class to fill a treeview from my database.There are over 33000 records and when this class runs, it takes almost 1 minute to finish.When i run this query from the server it takes for 5 seconds to retrieve all items.Is there a way to optimize this class?

Option Explicit On
Option Strict On
Imports System.Windows.Forms

[code]....

View 19 Replies

C# - Does The JIT Compiler Optimize (inline) Unnecessary Variable Declarations

Oct 20, 2011

I've read several articles and questions/answers that conclude the best practice is to let the JIT compiler do all the optimization for inline function calls. Makes sense. What about inline variable declarations? Does the compiler optimize these as well?

[Code]...

Of course I prefer the latter because it's easier to read and debug, but I can't afford the performance degradation if it exists. I have already identified this code as a bottleneck -- No need for retorts about premature optimization.

View 2 Replies

DB/Reporting :: Optimize Query (aggregates On Multiple Tables)?

Feb 20, 2008

Code:

Tables:
- Company
- Department
- Employee
- CertificationA
- CertificationB

I am trying to return a recordset that gives some summary information about each company. The fields in my returned recordset should look like the following.

Company.Name, NumberOfDepartments, NumberOfEmployees, NumberOfCertificationA, NumberOfCertificationACompleted, NumberOfCertificationB, NumberOfCertificationBCompleted

There are actually about 10 different Certification tables but, with Certification A and B you should get the hang of it. When an employee starts a certifaction, a record is added to the that certification table.Below is a query I wrote that works (gets me the data I need), but I am unsure if it is the most efficient way. There will be quite a lot of data so performance is an issue.

Code:

Dim sqlNumberOfDepartments As String
sqlNumberOfDepartments = _
"(SELECT COUNT(*) " & _
"FROM DEPARTMENT " & _

[code].....

View 1 Replies

Optimize LINQ Query For Use With JQuery Auto-complete?

May 20, 2010

I'm working on building an HTTPHandler that will serve up plain text for use with jQuery Autocomplete. I have it working now except for when I insert the first bit of text it does not take me to the right portion of the alphabet.[code]...

My question is, how would I implement this concept into my HTTPHandler without doing a fresh SQLQuery on every character change? IE: I do the SQL Query on the QueryString("ID"), and then on every subsequent load of the same ID, we just filter down the "Part".[url]...

View 2 Replies

Optimize Linq To SQL Query, Group By Multiple Fields

Jul 26, 2010

My LINQ query contains the following Group By statement:

Group p By Key = New With { _
.Latitude = p.Address.GeoLocations.FirstOrDefault(Function(g) New String() {"ADDRESS", "POINT"}.Contains(g.Granularity)).Latitude, _
.Longitude = p.Address.GeoLocations.FirstOrDefault(Function(g) New String() {"ADDRESS", "POINT"}.Contains(g.Granularity)).Longitude}

The query works, but here is the SQL that the clause above produces

SELECT [t6].[Latitude]
FROM (
SELECT TOP (1) [t5].[Latitude]

[Code]....

but this produced an error: "A group by expression can only contain non-constant scalars that are comparable by the server."

View 1 Replies







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