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?
I have a bunch of dimension tables that have unique ID and Name fields. I need a T-SQL function that returns an ID when passed a table name and a value for the name field.
I'm guessing the query would build a little query then execute it? Performance isn't an issue since this is a one time ETL thing.
I made a facebook content locker(PHP + HTML + JAVA) for my website, so to access the site user must press the 'facebook share "in the middle of the screen.After pressing this button, it opens facebook pop-up and user can share or NOT my link because locker disappear in 30 seconds since clicked on this button(so I put it).
Is there any possibility, any function that content locker disappear only after the user has actually given share in facebook pop-up window,I mean after my site address appears on facebook ?
Thanks a lot
Hi everyone im new to a PHP framework codeIgniter, I am going over the user guide iv ran in to a problem, I am on the part where you load helper file but for some reason my code just isnt working I keep getting this error:
Fatal error: Call to undefined function anchor() in /home/fresherd/public_html/CI/system/application/views/blogview.php on line 17
now im not 100% sure that it is loading the helper file this could be causing the but I am not sure how to detect the file has been loaded
any advice will help many thanks, Alan
Hi all
I have a string with file content .
But my function deals with file path on the disc .
Any idea how i can solve this problem without writing to the disc my file content ?
Thanks for help.
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?
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'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.
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()";
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!
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?