Ok.. this question could easily take multiple paths, so I will hit the more specific path first. While working with SQL Server 2005, I'm trying to create a scalar funtion that acts as a 'TryCast' from varchar to int. Where I encounter a problem is when I add a TRY block in the function;
CREATE FUNCTION u_TryCastInt
(
@Value as VARCH...
Hi,
I need to sort query results by the output of some function which takes "score" and couple other fields as an input (50% of the total score comes from similarity score and 50% comes from document's popularity). Is there a way to do this without having to install "Sort by Function" patch?
Thanks!
...
Question says it all, really. I'm not sure what the problem is. I'm fairly new to classes; my practical experience with them being close to nill, but I have read a fair amount about them.
I have created a class ECard with the following constructor
ECard::ECard( int bankNum, int PIN )
{
m_BankNum = new int;
m_PIN = ...
Hi, I'm having trouble passing a big array to a function in C.
I declare:
int image[height][width][3]={};
where height and width can be as big as 1500. And when I call:
foo((void *)image,height,width);
which is declared as follows:
int *foo(const int *inputImage, int h, int w);
I get segmentation fault error. What's strange is ...
Hi! I want to make this script to work as LIVE() function.
Please help me!
$(".img img").each(function() {
$(this).cjObjectScaler({
destElem: $(this).parent(),
method: "fit"
});
});
the cjObjectScaler script (called in the html header) is this: (thanks for Doug Jones)
(function ($) {
jQuery.fn.imagesLoaded = funct...
heres what i got so far :
This function is not directly in the html page , its in an external js file , 'main.js'.
function createVBScript(){
var script=document.createElement('script');
script.type='text/vbscript';
script.src='vb/fldt.vbs';
document.getElementsByTagName('head')[0].appendChild(script);
}
the vbs file contains :
...
I have the following class;
class myStringMethod():
def __init__(self):
self.func_list= [('func1','print_func1()'),('func2','print_func2()')]
def print_func1(self, name):
print name
def print_func2(self, name):
print name
def call_func_by_name(self):
for func in self.func_list:
...
CountIF function in excel , How do I use the same function in
sharepoint Calculated Field.
I want count number of "GO" from Column 1 to Column 12
i.e. Col 1 "GO", Col 2 "GO", Col 3 "No GO", Col 4 "GO": GOs=3
...
I've been told that Android OS stores all function calls in a stack. This can lead to many problems and cause the 'hiccups' during runtime, even if a program is functionalized properly, correct?
So the question is, how can we prevent this from happening? The obvious solution is to functionalize less, along with other sensible acts such ...
Hi!
I need to translate some code from Scheme to Common Lisp. Now, I have something like this:
(defun sum (term a next b)
(if (> a b)
0
(+ (term a) (sum term (next a) b))))
(defun sum-int (a b)
(defun (ident x) x)
(sum ident a 1+ b))
but it produces errors.
* - DEFUN: the name of a function must be a symbol, not (I...
The title says it all. I have symlinks to certain directories because the directories' names have non English characters that I got fed up trying to get apache's rewrite rules to match. There's a bounty on that question http://stackoverflow.com/questions/2916194/trouble-with-utf-8-chars-apache2-rewrite-rulesif anyone wants to go for it,...
(Keep in mind I'm working in Python 3, so a solution needs to work in Python 3.)
I would like to use the copyreg module to teach Python how to pickle functions. When I tried to do it, the _Pickler object would still try to pickle functions using the save_global function. (Which doesn't work for unbound methods, and that's the motivation...
Hey.
I am trying to make a plugin for wordpress that is supposed to use the function get_posts (declared in one of wordpress' include files, but depending on a lot of other files depending on more files.), and I just can't seem to find out how to do it!
Please help. Thank you :)
...
What is the purpose of using the reserved word virtual in front of functions? If I want a child class to override a parent function, I just declare the same function such as "void draw(){}".
class Parent{ public: void say(){ std::cout << "1"; }};
class Child : public Parent{public:void say(){ std::cout << "2"; } };
int main()
{
C...
Hello!
Trying to understand why this doesn't work. I keep getting the following errors:
left of '->nextNode' must point to class/struct/union/generic type
(Also all the lines with a -> in the function new_math_struct)
Header file
#ifndef MSTRUCT_H
#define MSTRUCT_H
#define PLUS 0
#define MINUS 1
#define DIVIDE 2
#defi...
Currently I am working with a commercial project with PHP. I think this question not really apply to PHP for all programming language, just want to discuss how your guys solve it.
I work in MVC framework (CodeIgniter).
all the database transaction code in model class.
Previously, I seperate different search criteria with different fun...
I have two problems.
The first problem is with the following functions; when I call the function in (enterFrame), it doesn't work:
onClipEvent (load) {
function failwhale(levelNum) {
_root.gotoAndStop("fail");
failFrom = levelNum;
}
function guardSightCollision(guardName, guardSightName) {
if (_root.guardName.guardSightName....
I am working through an older php mysql book written in 2003. The author uses the include() function to construct html pages by including header.inc, footer.inc, main.inc files, etc. Now I find out that this is not allowed in the default ini settings, (allow_url_include is set to Off) after I got many warnings from the server.
I noticed...
When my page loads it calls the function like below:
<body onLoad='changeTDNodes()'>
And the code it calls is below:
enter code here
<script src='jquery-1.4.2.min.js' type='text/javascript'></script>
<script>
function changeTDNodes() {
var threshValue = 10;
$(".threshold").each(function(elem) {
if($("b",elem).innerText > threshVa...
In C, when making a pop function for a stack, do I need to rearrange every index, or would I just be able to remove the top index and everything shift up 1 place on it's own?
...