function

Does Fortran preserve the value of internal variables through function and subroutine calls?

After much painful debugging, I believe I've found a unique property of Fortran that I'd like to verify here at stackoverflow. What I've been noticing is that, at the very least, the value of internal logical variables are preserved across function or subroutine calls. Here is some example code to illustrate my point: PROGRAM function...

PHP - How to upload & Save Files with Desired name

i am using this code to upload files(images to a folder) <form action='' method='POST' enctype='multipart/form-data'> <input type='file' name='userFile'><br> <input type='submit' name='upload_btn' value='upload'> </form> <?php $target_Path = "images/"; $target_Path = $target_Path.basename( $_FILES['userFile']['name'] ); move_uploaded_f...

how to get List Of User Defined Functions using OleDbSchemaGuid in c#?

how to get List Of User Defined Functions using OleDbSchemaGuid in c#? ...

PHP does not recognize CSS and stuff

Problems Project1.php does not show: CSS, thumbs and sidebar navegation I do not know what is wrong with it? Site Structure: giving | - - css | - - footer.inc.php | - - header.inc.php | - - index.php | - - portfolio | - - print | - - images.inc.php | - - img ...

Returning from a nested function in javascript

Hello, I'm trying to make a function that uses jquery's ajaxfunction to get some info from my ajax.php file. code: function ajaxIt(dataLine){ $.ajax({ type: "POST", url: "ajax.php", data: "ajax=true&"+dataLine, success: function(msg){ console.log("[AjaxIt]: "+dataLine+" returned "+msg); ...

Read returned XML by function with SimpleXML

This is sort of confusing to explain, so thank you ahead of time for bearing with me. I am using Kohana PHP framework to develop an application. I have a model function that accepts parameters for a search, and should return an XML styled page. I need this to be read by the controller with SimpleXML. Any ideas how to do this? $o = ...

How to modify SQL SELECT results

I need to write a SQL function that will allow me to strip an email address to the bare domain name. EX: I would make [email protected] read as [email protected]. This is most likely very simple but, I cannot seem to find any information on it. ...

Did I do this properly? .each() & .click() jquery

Am I doing something wrong? Or is there a better way to do this? This is the code I have: //Create as many li's as needed for(var t = 1; t <= pageLimit; t++) { if (t <= 9) { $('ul.thumb-list').append('<li><p>PAGE ' + t + '</p><img id="' + t + '" src="../jpeg/thumbnails/0' + t + '.jpg" /></li>'); } else if (...

How to apply multiple events to the same function

I'm not the best at this jquery stuff. But I'm trying to seperate the action from the function so I can apply multiple events that cause the same function. Unfortunately this isn't working. Anyone know why? Updated Function, but still errors $(document).ready(function() { var $info_items = jQuery('.checkbox.has_info, .has_info'); $in...

Overloading/specializing STL algorithms for non-local containers (database back end).

What I want to do is, in a separate namespace, define my own sort(), copy(), etc implementations that work with database tables/views/etc containers instead of in-memory std containers. If I define my own sort() that accepts my custom forward iterator, how does the compiler resolve that? Or, what do I need to do so that it will resolve...

Syntax Error in Create Function

This is one of the more confusing functions I've attempted. The logic works within a select statement, but I can't seem to create a user-defined function. Here's the error: "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'delimiter$$ creat...

Python, using two variables in getattr?

I'm trying to do the following: import sys; sys.path.append('/var/www/python/includes') import functionname x = 'testarg' fn = "functionname" func = getattr(fn, fn) func (x) but am getting an error: "TypeError: getattr(): attribute name must be string" I have tried this before calling getattr but it still doesn't work: str(fn) ...

how to set up daily php functions or mysql queries

Hi. I have wondered for a while now how to this. If I want to take weekly backups of all or many of my tables that stores values that changes every day in mysql. I also want to execute daily functions with php that update update values in my db. I was thinking of making a stock investing function. Where I have fictional data as the val...

Python list function argument names

Is there a way to get the argument names a function takes? def foo(bar, buz): pass magical_way(foo) == ["bar", "buz"] ...

minimize 'n' number of javascript functions into one function in jquery.

I have 'n' number of javascript functions in javascript which nearly gets an element and sets its display property. function ShowDivforassignclick() { document.getElementById("FollowupDiv").style.display = 'block'; document.getElementById("datatable").style.display = 'block'; } function HideDivforassignclick() { document.get...

How to get return data from event handler?

Ok, this is a very simple question. I am actually 90% sure I know the answer, but the late hour is causing me to completely space it. I've searched it on SO and Google to no success. How do I get return data from an event handler function? I have several nests of event handlers, and need to get the result from the deepest out to the ma...

Extracting functions from a script file

Is there an easier way to get a list of all the functions in a given Powershell script than matching the function signatures with a regex (in Powershell)? ...

Really simple document.onmouseup not working with IE

Hey, I have another incredibly simple JavaScript problem... I have a div that is shown when a link is clicked on. That is no problem and working fine. I then need the div to be hidden when the mouse is clicked anywhere on the page. Again, no problem in FF,Chrome,Safari and Opera but not in IE and it is really doing my head in now(!) Her...

Functions php, make drop down list work.

In functions php, this works like a charm: <textarea name="menu1anchor" id="menu1anchor" cols="40" rows="1"><?php echo get_option('menu1anchor'); ?></textarea> How can i make this drop down list work? I want to be able to input my values and select a desired one later on. Right now, it does not matter which value I select, after i pr...

Python - why is it not reading my variables??

I'm a python newbie and I don't understand why it won't read my IP and ADDR variables in the function dns.zone.query(IP, ADDR)??? import dns.query import dns.zone import sys IP = sys.stdin.readline() ADDR = sys.stdin.readline() z = dns.zone.from_xfr(dns.query.xfr(IP , ADDR)) names = z.nodes.keys() names.sort() for n in names: pri...