Hi,
I maintain a program which can be automated via COM. Generally customers use VBS to do their scripting, but we have a couple of customers who use Matlab's ActiveX support and are having trouble calling COM object methods with a NULL parameter.
They've asked how they do this in Matlab - and I've been scouring Mathworks' COM/ActiveX...
i am inserting the value of dynamic controls into the db like so;
Dim ae1 As DropDownList = FindControl("AreasExpertise1")
If (ae1 IsNot Nothing) Then
x.Parameters.AddWithValue("@areasexpertise1", ae1.SelectedValue)
End If
then in my query i have parameters like so;
INSERT INTO [foo] ([etc], [etc], [etc], ...
I have a winform app for in house use where the below is very common.
Int32? afhAgreement = null;
if (!lkuReveiewAFHAgreement.Text.Equals(string.Empty))
{
afhAgreement = (Int32)lkuReveiewAFHAgreement.EditValue;
}
DateTime? afhAgreementDate = null;
if...
I have an object that represents a physical structure (like a utility pole), and it touches a bunch of other objects (the wires on the pole). The other objects have a bunch of characteristics (status, size, voltage, phase, etc.) expressed as enums. I want to write a generic function that counts how many of the wires match any or all of t...
I am using jsr107 JCache in Google Apps Engine to save website data. My code looks like:
public static String read(String link, boolean UTF8) throws Exception {
URL url = new URL(link);
String cached = CacheLogic.instance().get(link);
if (!StringUtil.isEmpty(cached)) {
return cached;
}
// Here i save the...
SELECT *
FROM employees e
WHERE NOT EXISTS
(
SELECT name
FROM eotm_dyn d
WHERE d.employeeID = e.id
)
And
SELECT * FROM employees a LEFT JOIN eotm_dyn b on (a.joinfield=b.joinfield) WHERE b.name IS NULL
Which is more efficient,some analysis?
...
I'm trying to parse a delimited string using the javascript split function. I'm using a double character delimiter.
So for e.g. if the string contains employee related data with the following fields:
Emp Id (mandatory)
Name (mandatory)
Age (optional)
Mobile No (optional)
and the delimiter used is |* (i.e. pipe followed by star)
I m...
Hi again. I am using the next instructions to get some registers from my Database.
Create the needed models (from the params module):
$obj_paramtype_model = new Params_Model_DbTable_Paramtype();
$obj_param_model = new Params_Model_DbTable_Param();
Getting the available locales from the database
// This returns a Zend_Db_Ta...
I am writing a key value store API (like ODBC, just the interface, not the underlying store) in many different languages and while I do not want to transliterate the API between languages, I do not want for example to store a value from Java as a "null" and then read it in another language which does not support a concept of null. I'm no...
I want to redefine NULL in my program such as
#define MYNULL ((void*)0)
But this definition is not working in the following statement:
char *ch = MYNULL;
Error : can not convert from void* to char *
What would be the best way to define NULL?
...
I've wrote a query to check for users with certain criteria, one being they have an email address.
Our site will allow a user to have or not have an email address.
$aUsers=$this->readToArray('
SELECT `userID`
FROM `users`
WHERE `userID`
IN(SELECT `userID`
FROM `users_indvSettings`
WHERE `indvSettingID`=5 AND `optionID...
In the data structures class that I am currently taking, we have been tasked with writing a web crawler in C++. To give us a head start, the professor provided us with a program to get the source from a given URL and a simple HTML parser to strip the tags out. The main function for this program accepts arguments and so uses argc/argv. Th...
I want to (loosely) have a stored procedure like
select * from table where col1 like @var
the default value of @var is '%', so if I don't have a value for @var it should return every row. However, the problem is it doesn't return rows where col1 is null.
How do I return all rows if @var = '%' and rows that are like @var if it does hav...
Hi all. I came across a weird situation when trying to count the number of rows that DO NOT have varchar values specified by a select statement. Ok, that sounds confusing even to me, so let me give you an example:
Let's say I have a field "MyField" in "SomeTable" and I want to count in how many rows MyField values do not belong to a dom...
I'm working on a large project where, even with 10s of 1000s of automated tests and 100% code coverage, we're getting a ridiculous number of errors. About 95% of errors we get are NullReferenceExceptions.
Is there any way to enforce null-checking at compile time?
Barring that, is there any way to automagically enforce null-checking in ...
i have function
public List<Menu> List(int? parentId)
{
return (from i in _dataContext.Menu where i.Menu2.Id == parentId select i).ToList();
}
if i pass in function parameter null (like List(null)) it search nothing, but if i put null in query like this
return (from i in _dataContext.Menu where ...
JNI: How can i check if jobject is a null object in native c code
...
I've got a new website moved to my server. This website uses PHP and MySQL, and is built very poorly.
The problem is - it needs non-null values inserted into new records where ever I don't specify a value, though the default value is null.
I've been told it has been done on the previous server, but they have no idea how. I'd be glad t...
I'm working with an xml fragment, and finding that I'm doing the following a lot:
dim x = xe.Element("foo").Element("bar").Element("Hello").Element("World").Value
however I can't always guarantee that the xml document will contain foo or bar. Is there a nicer way to do this sort of thing without having to null check every query?
i.e....
i'm trying to remove a tween object after it has complete so the memory can be freed by garbage collection.
in this example i'm passing the fadeIn function a UILoader object that is cast as a sprite so that it fades in when it is finished loading. when the tween finishes animating, i want to remove the tween object. i've included the ...