Hello, I have some template function and I want to call it using define in c++:
#define CONFIG(key, type, def) getValue<type>(key, def);
Of course, it won't work. Could I make something like this?
Is there a difference, performance or efficiency wise, between placing javascript calls such as blur, onclick etc. in $(document).ready(function(){ as opposed to placing them in DOM?
Thanks!
Google doesn't want to help!
I'm able to calculate z-scores, and we are trying to produce a function that given a z-score gives us a percent of the population in a normal distribution that would be under that z-score. All I can find are references to z-score to percentage tables.
Any pointers?
I have following code:
static __inline__ LIST list_List(POINTER P)
{
return list_Cons(P,list_Nil());
}
After compilation I got following warning:
inlining is unlikely but function size may grow
I removed the inline and changed into the following :
static LIST list_List(POINTER P)
{
return list_Cons(P,list_Nil());
}
Now I get the following warning:
list_List is defined but not used.
Can anybody please suggest me how can remove that warning.
write a scheme function that remove the first top level occurrence of a given item
from a list of items.
eg given list (a b c) item b, result list (a c)
plz help me
I'm making a new php page and I get the error
Fatal error: Call to undefined function phpinclude_once() in /home8/nuventio/public_html/marketing/pb2/dashboard.php on line 1
I'm not sure why I'm getting this error, I've done previous pages the same way as this with no problems. This is the line in question:
<?php
include_once("../utils.php");
?>
After that it just goes into regular HTML code. It works fine without that line.
I have the following code. I would like username to take the value of the getUserName function however I am fighting with syntax. Can anybody tell me what should be the correct one?
$query = "SELECT user FROM users_entity WHERE username = getUserName()";
I've been searching examples for the Win32 API C++ function TerminateProcess() but couldn't find any.
I'm not that familiar with the Win32 API in general and so I wanted to ask if someone here who is better in it than me could show me an example for,
Retrieving a process handle by its PID required to terminate it and then call TerminateProcess with it.
If you aren't familiar with C++ a C# equivalent would help too.
Code Sinnpet:
int CreateaTCPSocket()
{
int iSockID = ACE_OS::socket(......);
ACE_OS::set_flags(iSockID,O_NONBLOCK);
ACE_OS::bind();
if (ACE_OS::connect(iSockID ,....) < 0)
{
if (ACE_OS::select(.....,timeout) <= 0)
{
return INVALID_HANDLE;
}
}
return iSockID;
}
My question is when connect is failed for non-block error and select is called and say select return success then again we need to call connect or select function internal do connect?
I would like to know if there is something similar to PHP natsort function in python?
l = ['image1.jpg', 'image15.jpg', 'image12.jpg', 'iamge3.jpg']
l.sort()
gives:
['image1.jpg', 'image12.jpg', 'image15.jpg', 'iamge3.jpg']
but I would like to get:
['image1.jpg', 'iamge3.jpg', 'image12.jpg', 'image15.jpg']
I want to return the number of a month and i made a function but it always returns 0
this is my code:
public int getNrMonth(String s)
{
int nr=0;
if (s.Equals("January"))
nr = 1
if (s.Equals("February"))
nr = 2;
return nr;
}
Could someone tell me wath is wrong please? I'm beginner!
I need a function that accepts a parameter with its id example a div
and after that loops inside the div to look for checkboxes and if there is/are any checks if its value is checked and returns true if every checkbox is checked returns false.
If I run something like Sleep(10000), and the system clock changes during that, will the thread still sleep for 10 seconds of wall-clock time, or less or more? I.e. does the Sleep() function convert milliseconds into hardware ticks?
Trying to convert this tax-like IRS function http://stackoverflow.com/questions/1817920/calculating-revenue-share-at-different-tiers to SQL. The assumption is the table would be one column (price) and the tiers will be added dynamically.
My first attempt has some case statements that didn't work out well. I have since scrapped it :) Thanks for the help!
How to check in Oracle Function whether value is increasing in particular field for last 3 year or not. Suppose one table is company and if we want to consider only values if profit of past 3 year of company is in increasing manner.
Consider this function declaration:
int IndexOf(const char *, char);
where char * is a string and char the character to find within the string (returns -1 if the char is not found, otherwise its position). Does it make sense to make the char also const? I always try to use const on pointer parameters but when something is called by value, I normally leave the const away.
What are your thoughts?
I need to pass two array list references to a function and return the reference of merged array list.
how can i do it????
pls help....
public int merge(ArrayList x, ArrayList y)
{
List all = new ArrayList();
all.addAll(x);
all.addAll(y);
System.out.println(all);
return all;
}
is it correct???
Is it possible to determine this at runtime?
contents of external.js:
function x() {
//can i get the path/name of the html file that included this js file?
//which is test.html
}
contents of test.html
script src="external.js"