C# - A Value Larger Than ULong - Computing 100?

Aug 12, 2009

I'm trying to compute 100! and there doesn't seem to be a built-in factorial function. So, I've written:

Protected Sub ComputeFactorial(ByVal n As ULong)
Dim factorial As ULong = 1
Dim i As Integer
For i = 1 To n

[code]....

Unfortunately, running this with the value of 100 for n rseults in

Value was either too large or too small for a UInt64.

So, is there a larger data type for holding numbers? Am i mistaken in my methods?

View 5 Replies


ADVERTISEMENT

C++ ULONG Definitions To Vb.net Or C# Equivalent?

Mar 16, 2009

Trying to use a call recording API using sockets. We have the API documentation but the samples are all in C++.How would I declare the following in VB.NET or C#?

[code]...

Note from the documentation: message identifiers are unsigned 32-bit values (ULONG).

View 4 Replies

Set A Large Constant With Bitwise Operation On ULong?

Mar 1, 2010

This work nicely

Public Const test As ULong = 1 << 30
This doesn't work nicely
Public Const test As ULong = 1 << 31

[code].....

View 2 Replies

C# - Heavy Computing On Remote Pc?

May 8, 2012

I love to experiment with linqpad, but now my task requires heavy computing power. Trying to do it on my computer is painful. My friend has a much more powerful computer than I -- can I execute some operations from my linqpad on his computer? I don't have RDP access, but I can run any .NET program on his computer.

If it is not possible, then is there any FREE service that provides computing power? Maybe a hosting trial or something. I know that Windows Azure offers a 30-day trial, but it has a very slow CPU module and in my country, MS partners cannot be expected to fix service sites when they go down.

View 2 Replies

Computing A Win/Loss Percentage?

Feb 19, 2009

I need to compute the percentage of games won and games lost. I keep getting errors and it's driving me up a wall. I've changed my code so many times that I don't really remember what it was like when I started.

Private Sub btnPercentage_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPercentage.Click
Dim team As String

[Code].....

View 6 Replies

Computing Totals And Averages

Jun 14, 2010

How would you take a numerical input from 10 text boxes and total it up and send it to a label. Then average the 10 numeric text boxes and send it to its own label. I am not asking for any code, I just need a hint or two to jog my memory. If this is not clear for you, I'll provide more detail.

View 1 Replies

Distributed Computing With Mdf Files

Oct 16, 2010

I am using SQL EXPRESS EDITION 2005 and Created mdf data file using vb.net 2008. now i want to use this datafile in lan. i modified connection string "Data Source=.SQLEXPRESS;AttachDbFilename=ServerDataData1.mdf;Integrated Security=True;User Instance=True;Connect Timeout=60"it is showing security info error i want to use single database file for my application please help me with connection string. thank you

View 1 Replies

Vision And Parallel Computing?

May 26, 2010

i am trying to make a robot that i can talk to(not yet) and tell it to goto places 1st task it to figure out how to use an inbuilt webcam in my net book and do an image Recognition for walls stars eg 2nd task is to see if i can get it to use my server to help compute the images because my net book is very slow 3rd is speech to text now can all of these be done in vb.net?

View 2 Replies

A-Level Computing Exam Arghhh

Mar 6, 2011

I have been given the prep material for my AS Level (Year 12) computer programming exam based around dice cricket. Written in VB 2008.

In the exam we are supposed to change bits based upon the scenario. The scenario and skeleton code are attached.

I have looked through the code so far and made some guesses to what I think may be on the test:

[code...]

if there is anything I am missing which they think I could be asked on the test. I then have to go away and figure out how to program.

So by asking on here, I am not trying to find out coding answers - I do want to figure that out myself. I just want to see if there is anything else I possibly could be asked?

View 9 Replies

Arrays / Lists And Computing HashValues

Jun 13, 2010

I've had experience with using hashvalues from String objects. E.g., if I have StringA and StringB both equal to "foo", they'll both compute out the same hashvalue, because they're set to equal values. Now what if I have a List, with T being a native data type. If I tried to compute the hashvalue of ListA and ListB, assuming that they'd both be the same size and contain the same information, wouldn't they have equal hashvalues as well?

Assuming as sample dataset of 'byte' with a length of 5
{5,2,0,1,3}

View 3 Replies

C# - Computing EField Around A Point In A Ring?

May 31, 2011

I am trying to write code to compute the Efield on a point P in both the x and y direction, from a charged ring. double y_eField = (_ke_value * _dq * (Sin_angle) / (Math.Pow(r, r)));Problem I am having is the code seems to follow the equation as given but the result it outputs is not correct at all.

View 2 Replies

Coding Computing Project For A-Level?

Oct 24, 2009

I have just started coding my Computing project for my A-Level, and I will admit, I am far more experienced in VB6 than VB.NET (as embarrassing as that is to say).I get extra marks for making everything presentable, so was wondering if it was possible to add icons into .NET buttons. For example if I have a button to add an entry to the database, I want a nice Web 2.0 looking icon (for which I already have) next to the text on that button.

View 1 Replies

Computing Data Through Function X - VarZ

Dec 7, 2009

I have a server that runs a thread that computes some data through function X. Then I have a client that communicates with the server and gets results from function Y. Now, both function (X and Y) share a common variable lets say varZ. When function X populates varZ when the thread starts on the server, the results are not propagated on function Y when accessed by the client through Remoting. But on the server side the results are correct in function Y! It's almost like when client calls function Y, it has no idea what is happening varZ is as far as the value set by function X thread in the server.

View 2 Replies

Computing And Saving Column Rows On A Datagirdview

Jul 7, 2010

trying to understand DataGridView. I can sum columns with no problems and place the result in a textbox. My problem is multipling two column rows and saving it. I receive the following error when I go to save it. "Column mapping from source column failed because the data column is a computed column. So can I compute two column row to a third and save it, if so how. My code is below:

I save.[code....]

View 10 Replies

Error In The Code Computing Totient Function

Nov 24, 2010

i made application for computing totient function but it doesn't give me any result this is a code Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

[Code]...

View 1 Replies

Error In The Code Computing Totient Function?

Jan 12, 2010

i made application for computing totient functionbut it doesn't give me any result

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

[code]......

View 11 Replies

Making A Login Form On .net For A2 Computing Coursework?

Feb 4, 2010

I'm struggling with making a log in form on vb.net for my A2 computing coursework.

Public Class DbConn
Dim connection As OleDbConnection
Dim cmd As OleDbCommand
Dim dataReader As OleDbDataReader

[code].....

View 2 Replies

VS 2008 Arrays And Loops - Computing Average Monthly Rainfall

Dec 2, 2010

I need to create an console application that computes the average monthly rainfall, number of months with above average rainfall, and the number of months with below average rainfall, given the rainfall amounts for each month in a particular year. The program must read in and store in an array the monthly rainfall amounts entered by the user one by one.

So far this is what I have got
Const intMonths As Integer = 11 'Constant Month variable
Dim sngRainfall(intMonths) As Single 'Rain for the month
Dim intCount As Integer ' Loop Counter
Dim sngTotalRainfall, sngAvgRainfall As Single 'Total and Average Rainfall
[Code] .....

How to set this up properly and I am having a real hard time figuring out how to make the data go from this loop to another and add the data to the total.

View 15 Replies

Computing Totals : Have To Compute The Differences From Each Campus Enrollment By Semester In 1 2D Array?

Aug 2, 2011

I have everything except the calculation for the increase or decrease in enrollment. Not sure how to handle this in a 2D array. (online class is not

Module Module1
Dim campus() As String = {"Decatur Day ", "Decatur Evening ", "Huntsville Day ", "Huntsville Evening ", "Distance Learning "}
Dim semester() As String = {"Fall 2010 Semester: ", "Spring 2011 Semester: "}

[code]....

View 5 Replies

How To Get Lines Larger Then 100 Characters

Jan 22, 2009

I have a text file with a lot of lines of text, how to copy lines of text larger then 100 characters in other file?

View 1 Replies

Larger Image To Fit In Picturebox

Aug 11, 2011

As you'll can see the first image is the size of (1024*768) and it is correctly displayed in the picturebox and in the second case the image size is (1600*900) and it is displayed to half of the picturebox and the remaining is missing .So No I would like to fir that image in the picturebox no matter what the size is and even though it is greater than the size of the picturebox.I need to scale that Image.So how do I do that?And one more thing is that I need to resize the picturebox automatically when the image loads to it just as we see in the lightbox effect..url...

View 1 Replies

.net - Making Textbox In Inputbox Larger?

Jul 7, 2011

How can I make the textbox in a VB Inputbox larger?

View 2 Replies

Finding Smallest Integer But Larger Than Zero?

Apr 21, 2009

retrieving the smallest integer from an image data (image data has a data type of byte which means that numbers range from zero to 255) but if smallest integer is zero than the next smallest number which

View 1 Replies

HTTPWebRequest Not Enough To Upload Larger Files?

May 27, 2011

Is it httpwebrequest / httpwebresponse not enough to upload larger files (2-3 GB)? I requested to all vb.net or c# uploader to share your opinion and alternative too.

View 3 Replies

Make The Map Larger Then Viewable Screen?

May 13, 2012

I'm wanting to make a "Farmville" like game. However, I dont know how to make the map larger then my viewable screen. So how do you make your forum larger then the viewable screen and allow players to "scroll" through the map or allow them to "zoom" to different locations of the viewable map?

View 6 Replies

TreeView Larger Node Image?

Mar 9, 2009

am trying to display a longer image in the TreeNode Image. I have a 85x12 image that I am trying to display however the image is being cut to 12x12?Does anyone know to display the whole image?

View 1 Replies

Adapting Combination Code For Larger List?

Apr 12, 2010

I have the following code to generate combinations of string for a small list and would like to adapt this for a large list of over 300 string words.Can anyone suggest how to alter this code or to use a different method.

[Code]...

View 2 Replies

Asp.net - Image Appearing Larger Than Actual Size In PDF?

Nov 17, 2011

I have the following barcode image:

I'm using the following iTextSharp VB.NET script to generate a PDF document containing this barcode:

Dim pdfDocument As iTextSharp.text.Document = Nothing
Dim filename As String = HttpContext.Current.Server.MapPath("barcode.pdf")
pdfDocument = New iTextSharp.text.Document()

[Code]....

When this PDF is generated, however, the image is appearing larger than expected, and is distorted:

I can't see anywhere where I'm setting the image to be a specific size, so why would it distort like this? And how can I prevent it?

It's crucial that this image remains the size it is intended to be so that it can be read by barcode scanners.

View 1 Replies

Converting A Number Larger Than 255 Into A Byte Variable

May 17, 2011

I understand the concept of bytes and declaring variables to save on processing space. I understand that the max value that can be stored in a byte is 255. I cannot seem to wrap my head around my current issue. I don't have much experience working with byte manipulation.

[Code]...

View 3 Replies

Determine Which Number Is Larger , Smaller - Equal?

Mar 24, 2010

I've to write this application in which i've two text boxes and of those, i've to determine which number is smaller or larger or if both are equal.

View 13 Replies







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