I'm am trying to write vba code to fill out web-forms and click buttons for me. I am looping through the various option tags on the page to select the one I want. When I reach it, I want to select it, but I'm not sure of the syntax.
Dim htmlO As HTMLOptionElement
For Each htmlO In Object.getElementByTagName("option")
If Trim(htmlO.v...
Hi,
How do I combine these two select statements into one query:
SELECT SUM( incidents ) AS fires, neighborhoods AS fire_neighborhoods
FROM (
SELECT *
FROM `fires_2009_incident_location`
UNION ALL SELECT *
FROM `fires_2008_incident_location`
UNION ALL SELECT *
FROM `fires_2007_incident_location`
UNION ALL SELECT *
FROM `fires_20...
I'm designing a syntax for templates/generics. The C++ family languages use angle brackets for this, but I'm looking at using a separator character instead. For example, where in Java you might write:
Map<String, Foo> foos = new HashMap<String, Foo>();
I'm aiming for:
.foos = hmap*string*foo
I'm trying to decide what the separator ...
I want to redefine several arithmetic operators in Haskell in order to make them more extensible and generic.
E.g.
class Mul a b c | a b -> c where
(*) :: a -> b -> c
This seems to work in combination with
import Prelude hiding ((*))
hiding the standard * operator. But of course all usual multiplications have to work as well, ...
Most programming languages use parentheses for grouping subexpressions.
In Aklo, I'm using square brackets for grouping subexpressions, on the grounds that the precious unshifted brackets should be used for the most common case.
But that's on a US keyboard. Are there any keyboard layouts on which it's actually easier to type parenthese...
I couldn't figure out that from SASS documentation. For example I would like to use Compass mixin with 5 parameters:
=link-colors(!normal, !hover = false, !active = false, !visited = false, !focus = false)
I would like to declare 5 constants with semantically understandable names like those:
!top_line_navigation_link_normal_color = ...
if we have
char *val = someString;
and then say
if(val){
....
}
what is the if statement actually checking here?
thanks
edit : Thanks for all the replys
...
I notice that the character/symbol '`' and '@' is not used as an operator in C/C++,
does anyone know the reason or historically why its so?
if its really not used, is it safe to define those symbols as another operator/statement using #define?
...
This is a bit weird, but here goes.
I have many hardcoded "tables" that I'm defining as arrays of std::strings or const char *.
So for example:
const char* resp_desc[] = {
"00=Approved",
"01=Declined",
"03=Incorrect User name",
// more values
NULL
};
In some functions these are passed as the table to lookup the d...
I have a variable, emailBody, which is set to a string stored in a database. The email body is set to a string via a dlookup function.
emailBody = DLookup("emailBody", "listAdditions", "Id = " & itemType)
The string that email body is set to includes an IIf function (which includes a dlookup function). When
?emailBody is entered in...
I am trying to create an asp.net web form that allows a user to enter information, then have this information sent via an XMLwriter to a web service.
Here is a snippet of the xml as it should be outputted;
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body xmlns:ns1="http://its/foo.wsdl">
I try t...
Hi,
Can anyone explain to me why the following is resulting in a syntax error (unexpected '=')?
protected function processDates()
{
foreach($this->dates as $name => $unitprefix)
{
$this->$unitprefix.'year' = '';
$this->$unitprefix.'month' = '';
$this->$unitprefix.'day' = '';
...
Simple question: Office debate about whether the keyword AS is necessary in our T-SQL statements. I've always used it in cases such as
SELECT mycol AS Something
FROM MYTABLE;
I know you don't NEED it but is there any benefit of using it (or not using it)? I think it makes statements easier to read but people seem to disagree with me.
...
In NUnit, I can write either
Assert.That(5, Is.EqualTo(5));
or
Assert.AreEqual(5, 5);
Is there any functional difference between these two forms or is the choice between the two just down to personal preference and perception of readability?
...
I'm trying to make a method that will tell me weather or not it is true or false that a number is prime. here's the code:
class prime
{
public static boolean prime (int a, int b)
{
if (a == 0)
{
return false;
}
else if (a%(b-1) == 0)
{
return false;
...
I have hack I need to employ under these conditions:
-It's the last page of data.
-It's not the first page, either.
-There's not a page-size-even number of data items.
So I tried this code:
my $use_hack =
$last_page_number == $current_page_number and
$page_number != 1 and
$total_items % $items_per_page != 0;
And I keep gett...
I have just stumbled upon the bash syntax:
foo=42
bar=$[foo+1] # evaluates an arithmetic expression
When I Googled for this, I found http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_03_04.html#sect_03_04_05:
3.4.6. Arithmetic expansion
Arithmetic expansion allows the evaluation of an arithmetic expression and the substitut...
Possible Duplicate:
Python == vs is comparing strings, is fails sometimes, why?
In Python, what is the difference between these two statements:
if x is "odp":
if x == "odp":
...
I'm trying to use a delegate library in gcc http://www.codeproject.com/KB/cpp/ImpossiblyFastCppDelegate.aspx but the "preferred syntax" is not recognized by gcc 4.3. I.e. howto make compiler understand the
template < RET_TYPE (ARG1, ARG2) > syntax instead of template ??
TIA
/Rob
...
I am attempting to pass a text box value into a SQL query, something which just does not want to work for me. The error I receive is 'End of statement expected.'
I presume it is a syntax error on my behalf, I am brand new to ASP and would be grateful if someone could point out where I am going wrong. Below is the code that is causing th...