VS 2005 Write This Function Without Using Log Function?

Jul 31, 2010

I have Ln in my function that I write in excel but in vb it doesn't work

0.215*Ln(4.32/0.3)

it should return the value = 0.573

how can I write this function without using log function (I don't know logs functions)

View 5 Replies


ADVERTISEMENT

Write A Function As "Function DeleteIfExist(strFileName)"

Apr 25, 2009

i need code to write a function DeleteIfExist(StrFileName)

View 4 Replies

How To Pass A Function To A Function Is Functors/function Objects Avaiable In VB2010

Oct 12, 2011

I want to make an numerical integration method with takes in an analytic function and integrate it over a specific interval. For the numerical integration procedure I want to use some procedures in nr.com. The problem is that these are programmed in C++ and they uses functors to pass a function to the integration method. How can I do this in VB 2010?

I want to initialize the function (i.e. set a=1,b=0 for function y(x)=a*x+b) and then pass the function to the integration method. Then when the integration method call the function it only calls the function with one parameter (i.e. x since a,b is already set)

What is the best way to do this in VB2010?I want to make a general integration method where I can pass any single valued function and integration limits.

I have just started using VB, and from what I have found so far it seems like the tools you have is

- to us a delegate for the function
- to use a lambda expression for the function
- send a pointer/adressOf
- to create a function class/structure and submit this to the function

As for now I am most inclined to create a function-class. But I am not really sure how.F.ex. I make different classes for each "uniqe function" I want to integrate, but how can I pass them to the integration function when I need to specify the argument type in the integration-function-call?This seems like a basic problem which applies to many Math operations, so I think it would be very useful to clarify this.

View 2 Replies

Function Syntax - Call A Function With 2 Arguments When The Function Is Only Defined For One

Apr 1, 2010

I'm trying to undersatnd the syntax of calling a funciton and it seem confusing when I'm using a web service in ASP.net. Maybe this question should be in an ASP forum, but it is a VB question. This simple web service allows you to type in your name and it response with an alert box with you name.

My question is, How can you call a function with 2 arguments when the function is only defined for one. I understand that the second argument is actually a method that handling the respons, but how can you interchange function arguments for methods and how do you know that there are methods for

Here's my call:

<script type="text/javascript">

function HelloWorld()
{

var yourName = $get('txtYourName').value;

[CODE]...

View 7 Replies

VS 2010 : Convert A DLL Function Call Which Has The Callback Function Routine Called Within The DLL Function Call?

May 25, 2012

I am trying to convert a DLL function call which has the Callback function routine called within the DLL function call.The DLL function call signature is like this:

typedef void *HANDLE;
typedef HANDLE HACQDESC;
DECLARE_HANDLE (HWND);

[code]....

how to convert this DLL call to VB.NET and also how to create the callback function and send it as parameter to this function
call.

View 15 Replies

Write The Log Function In VB?

Mar 26, 2011

I have the following equation. It's a log function or the ln, which I think is called the natural log function.I want to compute the value of x using my vb program. How do I write this function in visual basic?

y = 19.322ln(x) - 8.5994

How do I write the ln(x) function in general?

View 2 Replies

Make Picturebox1(function Already Assigned) Perform The Same Function As Picturebox2(no Function Assigned)

Aug 1, 2009

i wanted to ask how to make picturebox1 ,to which functions are already assigned, perform the same function as picturebox2 ,to which no functions are assigned.For example:I have already made picturebox1 and have assigned it alot of function like when play button is pressed then picturebox1.visible = true and when we press pause button picturebox1.visible = false. So now i decided to make a theme and have to remove the picturebox1 and want to allow the picturebox2 to havefunction of picturebox1.But when i disable the theme the function of picturebox1 should go back to picturebox1.

View 6 Replies

Errors With Write() Function

Apr 27, 2010

I have a bit of a problem with the following bit of code. Basically the last line (Return Write...) is giving me the error 'Expression does not produce a value'.[code]...

View 1 Replies

Write A Function That Would Get A String Of Text?

Mar 24, 2011

Say I have some text like this: blah blah

this is my text and I like it,some more text here .I am trying to write a function that would get a string of text like that and put it into a single line. I've tried string.replace(vbcrlf, ""), but that doesn't get rid of all the line breaks. Can someone help me out here?

View 1 Replies

Write A Function Where If The Number In The First Textbox?

Nov 29, 2011

I'm trying to write a function where if the number in the first textbox is greater than the number in the second textbox.the result shows that it is "True", otherwise, it will show "False."

This is what I have so far:

[Code]...

What am I suppose to put in the Button coding? Or is what I have wrong? I don't know.

View 4 Replies

Write The Generic Version Of This Function?

Jan 18, 2011

I like to turn Option Strict On I cant figure out how to write the generic version of this function?

Public
Shared
Sub UpdateItem(ByRef
oldValue As

[code]....

View 8 Replies

Code To Write File Browser Function

Apr 28, 2009

I need to write a function to select a text file.also let me know if i need to add any thing from references or from components window.is file browser and folder browser the same?

View 2 Replies

AND Function - Don't Wanna Write Out A Bunch Of If Statements ?

Nov 1, 2010

I don't understand the AND function.

I'm trying to say:

CODE:

It all works, except for the AND part. And I don't wanna write out a bunch of if statements just for this one thing.

View 3 Replies

Write A Function That Select Some Of Xml Nodes From A Xml File?

Jun 28, 2011

I want to write a function that select some of xml nodes from a xml file that xml file has a attribute is date 20/06/2011 12:00:00 PM if i want to select all the node that is before 20/06/2011.i know sql query has >>> date LIKE "20/06/2011%" does xpath or .net has kind of method

View 3 Replies

Write A Function To Print The Fibonacci Value At A Given Position?

Mar 11, 2010

Write a function to print the Fibonacci value at a given position in the series.you should write two versions of the function both of wich must be named Fibonacci(overload functions).the first version should be implemented using a for loop.the second version should be implemented using do until.

View 3 Replies

Write Case Sensitive Function In SQL Query?

Feb 25, 2009

How to write Case Sensitive Function In SQL Query?

View 3 Replies

Write Small Single Function Wrapper?

Jul 15, 2009

I am looking to write a small application that will mount an image using imagex and show a progress bar as to how much of the image has been mounted.

View 2 Replies

Is Write A Function Procedure That Takes An Array Of Strings

May 9, 2010

I'm a beginner and doing a review for my final...the question is-Write a Function procedure that takes an array of Strings, sorts it using Shell sort and returns the sorted array. I do not get shell sort at all.

View 3 Replies

Javascript - Writing Back A Function Through Response.Write()?

Apr 12, 2012

I am trying to return a javascript function using response.write in an aspx page. The problem is that the function i am returning has lots of quotes and they are conflicting with the repsonse.write syntax. Here is a sample code:

Response.Write(" If hello.StartsWith("H", StringComparison.InvariantCultureIgnoreCase) OrElse hello.StartsWith("W", System.StringComparison.InvariantCultureIgnoreCase) Then")

This is giving me a problem as the quotes inside are cutting off the response early. Is there a better way to do this?

View 4 Replies

Use Function WriteAllBytes To Write To The End Of Code Of Previous Program?

Dec 24, 2009

How to use function WriteAllBytes, to write to the end of code of previous program, so it wouldn't overwrite it?

View 1 Replies

Using A Variable, A Function, To Write A String Of Characters Or Numbers?

Mar 8, 2009

I know how to declare a variable, a function, to write a string of characters or numbers (I still looking in tutorials and depict from there what i need to know) but...WHAT I DONT KNOW is how to USE them? At "what" or "how" are you thinking when you make a program? I try for SOME LOooNG TIME to understand but I think im too stupid to understand from pages on the net (or i dont find THAT tutorial who can explain right for me).I try a lot of programing languages starting with pascal,c,c++,darkbasic,alice, Visual-c,c#,c++,basic,php,even assembler, some programing zones in Excel and Word but from all of this i cant manage to understand the life behind the words.

View 1 Replies

VS 2008 - How To Write Wrapper DLL For Accessing Function Calls

Jul 27, 2011

I have a camera for which the complete source code with header files(.h) and all libraries files(.lib) are given in VC++. Now if I want to access the function calls in the header files and in turn the functions in the library from VB.NET, I am required to write a wrapper DLL for accessing the function calls which I never did till now.

View 1 Replies

Write A Generic Function In .NET That Only Accepts Numerical Types?

Jun 4, 2009

Suppose I want to write a function like the following (as usual, a trivial example for illustrative purposes):

Public Function calcSqSum(Of T)(ByVal list As IEnumerable(Of T)) As T
Dim sumSq As T
For Each item As T In list

[Code]....

As you can probably guess, this function causes an error because a generic object is not guaranteed to implement the + operator. As far as I know, though, any numerical type (Integer, Double, Decimal, etc.) will.

Is there a way to write a (quasi-)generic function that can accept any numerical type, without having to explicitly overload the function for every such type yourself?

Alternatively, I suppose an equally acceptable solution would be to somehow check if a type implements the '+' operator (or any operator generally associated with numerical types and used by the function).

View 4 Replies

Write A Function That Is Called Everytime An Exit Button Is Pressed?

Feb 26, 2012

I'm looking to write a function that is called everytime an exit button is pressed, just simply prompting the user to click yes or no is there a guide anywhere? is there a name for this kind of thing i can look at it more?

View 7 Replies

Write A Function That Returns The Number Of Duplicates That Exist In An Array

May 18, 2009

Write a function that returns the number of duplicates that exist in an array.

View 2 Replies

Ado.net - Execute A Stored Function In Oracle Or Sql - Adding The Parameter Values Of The Function

Dec 13, 2011

I need to execute a stored function in oracle or sql through vb.net. I created a command object. Depending on the database type(oracle or SQL) i am preparing the Command text as Select functionName(?,?,?,?,?,?,?,?) from dual; (For Oracle) Adding the parameter values of the function. Now performing the ExecuteScalar which is not working saying invalid parameter. This works with ODBC connection string. But ODBC doesn't with 64bit. My Requirement: Code should execute a user defined stored procedure by taking the values at runtime.

View 1 Replies

Setting A Variable To Accept The Result Of A Function By Calling The Function With Many Parameters

Feb 17, 2011

I'm currently working with a client's VB.Net code, which was developed for them by a small development shop a few years ago and which they purchased and have been maintaining and uprgrading since. This client's primary developer is out on indefinite (likely permanent) medical leave and I'm now filling in until they bring in a full timer (as I'm a contractor here). My current task is to add some functionality to a the VB.Net code they purchased. I'm finding practices and techniques in the code that absolutely baffle me and can't make the code do what I want. I'm starting to wonder if it's me and was hoping to get some thoughts on the code I've encountered.

For example: Setting a variable to accept the result of a function by calling the function with many parameters, clearing the parameters in the function, setting them to some value, calling another function with those new values, then never using the values returned by the functions. I'll add a code snippet in the first comment since this is already getting long.

View 9 Replies

VS 2008 Difference Of Sleep Function And Pause Function (using Timer) Between A Loop

Aug 20, 2009

Hi. what is the difference of sleep function and pause function (using timer) between a loop.

View 12 Replies

C# - Function Or Interface Marked As Restricted Or The Function Uses An Automation Type Not Supported In Visual Basic?

Oct 19, 2010

What does this error mean in VB6? Function or interface marked as restricted, or the function uses an Automation type not supported in Visual Basic.

I keep getting it when i call a particular method of a dll that comes with windows xp and beyond (in system32 called upnp.dll)

View 2 Replies

Call A Function From Inside Another And Suspend It Until The Called Function Is Finished

Jan 25, 2010

How can I call a function from inside another function and suspend the calling function until the called function is finished? I hope I can get some replies because I don't know how to ask the question and make sense:).

Anyway what I am trying to do in steps:

1. The user clicks button1 which triggers the click event.
2. From the click event I call a function
3. I then pop-up a form, that has instructions for the user to read.
4. After the user has read the form he will click the "Done" button and return to the calling function.

The problem is the the calling function continues to execute. I want to stop execution of the calling function until the users clicks the "Done" button on the instruction pop=up. I know I can use a msgbox but the instructions can be lengthly and does not look good in a msgbox.

I have tried the Call method with return in the "Done" button click but I can make that work. I also tried a goto statement but I can get that to work either. In the call statement I said call frmInstruction.show() and it got there but as I said the calling function continued to execute.

View 3 Replies







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