I have a file of the following format.
"08-10-2010 13:29:31 1 APs were seen
"
"08-10-2010 13:29:31 MAC Address SSID RSSI"
"08-10-2010 13:29:31 00:1e:79:d7:d5:b0 -80"
"08-10-2010 13:30:32 2 APs were seen
"
"08-10-2010 13:30:32 MAC Address S...
I am working on a scalar value function in MSSQL 2008. I created it and It is shown in object Explorer But when I use this function in MS Query Analyzer It gave me error
**Msg 208, Level 16, State 3, Line 1
Invalid object name 'calculatecptcodeprice'.**
For Me this type of error after creating Function is new. What went wrong. Please ...
Hi everybody,
We've all seen that stores have nice-looking pricing on their products; "1.99", "209.90" and so on.
That's easily done as well if you enter prices manually, but l et's say that we would have a database which stores prices, that are daily updated according to currency changes.
Prices are therefore automatically calculated...
Hi,
I am sending a reference of an array variable which is initially empty.
In the called function the array gets populated.
function one()
{
$ret = array();
two($ret);
pri nt_r($ret);
}
function two(&$res)
{
foreach($a as $b)
{
$id = $b->getid();
$txt = $b->gettxt();
$res[$id] = $txt;
...
Hello, I'm writing logger file. I'd prefer to use macros _FUNCTION_ there. I don't like the way like:
Logger.write("Message", __FUNCTION__);
Maybe, it's possible to make something like:
void write(const string &message, string functionName = __FUNCTION__)
{
// ...
}
If not, are there any ways to do that stuff not by hands (I mea...
I want to modify the glBindTexture() function to keep track of the previously binded texture ID's. At the moment i just created new function for it, but then i realised that if i use other codes that use glBindTexture: then my whole system might go down to toilet.
So how do i do it?
Edit: Now when i thought it, checking if i should bin...
I'm trying to make the code below reusable. I need multiple toggle buttons in my flash project. Right now the code below works on one button. If I continue and create more buttons, and follow the format below, I would need to create separate functions for each button.
I would like to put the reusable code in a separate ActionScript file...
Hi,
Can I call a function when building an array in Flex 3?
public function gridBuilder(myArray:Array):void {
var i:uint;
for (i=0; i<myArray.length; i++){
dGArray = [
{Name: myArray[i].name, Type: 'A:', Score: myArray[i].score, Rank: myArray[i].rank, Grade:(myFunction(myArray[i].ra...
I'm using the following code from PHPBuilder.com to handle user privileges on my site:
/**
* Correct the variables stored in array.
* @param integer $mask Integer of the bit
* @return array
*/
function bitMask($mask = 0) {
if(!is_numeric($mask)) {
return array();
}
$return = array();
while ($mask > 0...
i wrote a simple function to write into a text file. like this,
def write_func(var):
var = str(var)
myfile.write(var)
a= 5
b= 5
c= a + b
write_func(c)
this will write the output to a desired file.
now, i want the output in another format. say,
write_func("Output is :"+c)
so that the output will have a meaningful nam...
hi there,
I'm a newbee
I've got a little problem with my php-script. I try to generate dynamic formulars with php. which works very good. the problem is, I want my data to be send to another funcion in another php-script. I gues its a problem with the syntax:
<?php .... <form action=\"<?php myfunction() ?>\" ... > ... ?>
When I used ...
I am submitting a page onclick of a form element and need a function to run after the submit refreshes the page. I'm trying to add an animated scroll back to the clicked element that caused the submission. I've got the scroll part covered but I can seem to figure out how to cause the function I wrote for the scroll to run after the page ...
Hi all,
I'm trying to show a custom column in my gridview which displays a content type based on a couple of boolean fields in my database. Everything works fine but it's causing a lot of overhead the way I do it now.. like this:
<ItemTemplate>
<asp:Label ID="lblType" runat="server" Text='<%# GetType((int)DataBinder.Eval(Container.D...
I have two JavaScript code snippets. These perform specific task when an 'Update' button is clicked.
I would like to merge them. Any help is appreciated.
JavaScript 1: When the button is clicked, it checks if at least one checkbox is selected:
function doUpdate(){
var c = document.getElementsByTagName('input');
for (var i = 0...
Right. So I've created a stored procedure in a MySQL DB which happens to use SUBSTRING.
Running the procedure via a query gives me:
SQL Error 1630: Function mydatabase.SUBSTRING does not exist
Beg your pardon?
...
What does the last line, return 1 + .... do ? How can you return 1 plus a function call?
Below is the assignments text:
These functions recursively count the number of instances of the key in the target string
def countSubStringMatchRecursive(target, key):
currentPosition = find(target, key)
if find(target, key) == -1:
...
I have a form that is validated once the user "blur"s out of an input field. So:
$("#field1").blur(function() {
if($(this).val().length>0) {
$(this).attr('class', 'completed');
}
});
When the user first visits the form, and up until all fields are "completed", the submit button is hidden:
$(".submit").hide();
I want the submit...
i was learning this PHP code from a tutorial to upload files
<form method="post" enctype="multipart/form-data">
<input name="userfile" type="file" id="userfile">
</form>
<?php
if (isset($_POST['upload']) && $_FILES['userfile']['size'] > 0) {
$fileName = $_FILES['userfile']['name'];
$tmpName = $_FILES['userfile']['tmp_nam...
The following example, beats me. I've been so far thinking, that when functor is being used, the object gets constructed once and the same object is used multiple times, when used with for_each algorithm and that seems to be correct.
However, even though, only one object gets constructed, but multiple objects are destroyed. Now, this b...
lets say i make a file Services.php
<?php
$myGlobalVar='ranSTR';
function serv1($num)
{
//some processing...
return $num;
}
function serv2($num)
{
//some processing...
return $num;
}
?>
and i include it in some other file lets say myFile.php by
include "Services.php";
OR
require "Services.php";
How can i call it...