function

Running SQL query from Module with a function call from my Form

I have a form set up where I want to run the function PopulateGrid on it's Form_Load event. I have initialized the DB connection as follows: Private Sub Main_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load LoadConfigFile() cn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Sourc...

Check if a given DB object used in Oracle?

Hi does any one know how to check if a given DB object (Table/View/SP/Function) is used inside Oracle. For example to check if the table "A" is used in any SP/Function or View definitions. I am trying to cleanup unused objects in the database. I tried the query select * from all_source WHERE TEXT like '%A%' (A is the table name). Do y...

Calling Echo inside a function pre-pends echo string to return value in Powershell

Hey guys, I'm a Powershell noob and seem to keep getting caught on little weird behaviors like this. Here is some test code: function EchoReturnTest(){ echo "afdsfadsf" return "blah" } $variable = EchoReturnTest echo ("var: " + $variable) Running this script generates this as output: "var: afdsfadsf blah" Why does the...

jquery plugin local variables between methods

I'm with trouble with a jquery plugin i've quickly playing around. Its fades in when a start handle event of ajax is called and stops with complete handle. Exemple: start : function (e,o) { target.mask(); target.showMaskAjax(); }, complete : function (e,o) { target.hideMaskAjax();.... }, The question is..when I fire 2 ...

what is the difference between these two functions/approaches

I use only jquery for writing javascript, one thing that confuses me is these two approaches of writing functions, 1st approach vote = function (action,feedbackId,responseDiv) { alert('hi'); return feedbackId; } 2nd approach function vote(action, feedbackId,responseDiv) { alert('hi'); return feedbackId; } Can anyon...

WordPress functions.php Problem

Can a function inside the functions.php file call another function from within functions.php? I'm guessing yes and which is why I wrote the code below, but it doesn't work for some reason. Can anyone please check it out and help me. I tried calling pageBarColor() from register_sidebar() Thanks. <?php if (function_exists('register_side...

How can I get the name of function inside a JavaScript function?

Hi, How is it possible to learn the name of function I am in? The below code alerts 'Object'. But I need to know how to alert "Outer." function Outer(){ alert(typeof this); } ...

Parse html page source with libcurl and C

How can I print the source of a webpage, specified in curl_easy_setopt, without html tags? So, printing only the text in the source? ...

Have loaded a php variable into flash but cant apply it in a function...

hi I have created an actionscript function which stops an animation on a specific frame which works fine. I have then loaded in a php file with a variable which will contain the number for the frame i want the animation to stop on. This has loaded in fine and i have loaded it in a function. what i cant seem to do is to get the variable i...

Stop a php function

Hello guys :) I got this code: codeviewer.org/view/code:b6f It simply validates a date, but ends the script if a error occurs (exit ()). Now i gonna put this same code in a single function that returns false on error: codeviewer.org/view/code:b70 I dont want to use "if/else". I want to return false on error and stop executi...

Is using a PHP Function Alias poor performance/Bad practice?

Just out of curiosity, Does the alias of a built-in PHP function take any more power than the regular function itself. AKA, does sizeof() take more time than count() to run? Note to Micro-Optimization Police: Unless there is a HUGE difference, I don't plan on trying to micro-optimize my script. Was just curious. Note to the 'Just tr...

Use Boost to get arity and paramerter types of member function? (boost::function_traits)

It works just fine, for plain vanilla functions. The code below works just fine. It prints just what is should: int __cdecl(int, char) 2 int,char #include <boost/type_traits.hpp> #include <boost/function.hpp> #include <boost/typeof/std/utility.hpp> #include <iostream> using std::cout; using std::endl; int foo(int, char) { retu...

ASP.NET - Can a content page call a function in its master page?

I have a site with a master page, Site.master. Many of Site.master's content pages have the same button that functions the same way on each page: <asp:ImageButton ID="btn" runat="server" OnClick="btn_Click" /> Is it possible to write btn_Click once in Site.master's CodeFile and have it called in the OnClick attribute of each content pa...

Char array pointer vs string refrence in params

Hi. I often see the following structure, especially in constructors: class::class(const string &filename) { } class::class(const char * const filename) { } By step-by-step debug, I found out the 2nd constructor is always called if I pass a hard-coded string. Any idea: 1) Why the dual structure is used? 2) What is the speed diffe...

F#: Why do I have to explicitly specify 'unit' for functions taking no arguments?

So I've just about finished my first F# program, with my only functional background being a little bit of knowledge of Haskell (read: Haven't really produced any programs in it). After experiencing some boggling behavior, I came to realize that F# makes a differentiation between: prepareDeck = allSuits |> List.collect generateCards |> ...

jQuery iterating over a function

Pretty new to jquery and having a bit of a problem with a function I wrote, very similar to this problem, and if that's anything to go on then apparently I have a closure problem. As Peter Bailey put it in the above thread, this is what's happening: Iterate over some values Define/assign a function in that iteration that uses iterated ...

Javascript trimAll() doesn't seem to work

When i executed this, var a = trimAll(document.getElementById("txt_msg").value); When i inspected through web developer toolbar I got the Error: trimAll is not defined.. Any suggestion... ...

Calling a javascript function from a textbox in winforms

I have textbox in one of my forms and i want to call a javascript function from a javascript file... My code is this.txtbox.Text = ""; this.txtbox.Location = new Point(10, 20); this.txtbox.Size = new System.Drawing.Size(200, 100); this.txtbox.Multiline = true; this.Controls.Add(txtbox); this.txtbox1.Text = ""; ...

JQuery - accessing a VAR in a function which I will need in another function?

Ok so in my html/js i have a form that updates based on the users previous selection. On the last stage i have a select menu where the user will choose their city. I have stored the value of the selected item in my Options list with the id #myCity to the following. ('#myCity').change(function(){ var CityValue = $("#myCity").val(); ...

can't access user control public properties

Hi All I am using VS2008 with both VB.NET and C# I have created a simple custom user control and have added some public functions to it my problem is that if I don't drag and drop the user control from the toolbox onto a winform but instead I try to create one dynamically via code - I am not able to access the public functions and pro...