You can simulate foreach-statement in c++ with macro declaration. I'm using similar syntax for looping arrays in the following way:
int array1[10];
vector<int> array2(10);
fori(array1)
forj(array2)
fork(123)
if(array1[i]==array[j])
return true;
What's your favorite macros for extending c++ l...
Hey Guys, here is my code for this, the only help i get from VS is that the INSERT INTO statement syntax is incorrect?
I have gone through all of the code and just cannot see where i have gone wrong, can someone gimme a hand please?
public void New(string ApplicationStartupPath, string FileName, string Department, string Month,...
Please help me correct the following query:
SQL = "insert into tblContract (Empid, Start1, Finish1, Store1, " & _
"Start2, Finish2, Store2 ) " & _
"values ('" & Me.txtEmpNo.Value & _
"',select max(testid) FROM tbltesting,'" & _
Me.txtContSunStart1.Value & "', '" & _
...
What are the various options to implement a pointer-to-member construct in C++/CLI?
I have implemented some 2D geometry algorithms which perform some actions based on X and Y co-ordinates. I find that I am frequently duplicating code once for the X-axis and once for the Y-axis. An example is finding the maximum and minimum bounds along ...
I am doing a multiple insert in vba access query as below:
Private Sub btnSubmit_Enter()
DoCmd.RunSQL ("insert into tblAutonumber (Dummy)values ('DummyValue')")
Dim lastAutonumber As Long
lastAutonumber = DMax("Autonumber", "tblAutonumber")
txtAutoNumber.Value = lastAutonumber
DoCmd.RunSQL ("insert into tbltesting " & _
"(Empid, Te...
I don't know how to make an if-else statement within an IBAction! I can only make them in the button clicks... what I want it to do is check for which # the int question is at and make the appropriate changes. please help!
MainView.h
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
@interface MainView : UIView{
IBOutlet U...
I'm getting an error when I try to run my script
Error:"IndentationError: unindent does not match any outer indentation"
Code snipet that throws the error:
def update():
try:
lines = open("vbvuln.txt", "r").readlines()
except(IOError):
print "[-] Error: Check your phpvuln.txt path and permissions"
...
Possible Duplicate:
Placement of the asterisk in Objective-C
Could someone please shed some light as I am a bit confused as to the proper use of the indirection operator.
Example:
NSAutoReleasePool * pool = [[NSAutoReleasPool alloc] init];
MyAwesomeClass *awesomeClass;
So as I see them; are they just stylistic differences on...
I've done a fair bit of googling, but I've been unable to find what I'm looking for. I am looking for documentation of the syntax to the Visual Basic 6.0 language. Specifically something that could theoretically be used to build a parser for the syntax. Does anyone know of such documentation?
...
I have the below query which will delete data from multiple tables
its not working
please help me :
DoCmd.RunSQL ("delete tblTesting,tblCodes,tblContract,tblScheduled,tblAbsense,tblClock from tblTesting,tblCodes,tblContract,tblScheduled,tblAbsense,tblClock where tblTesting.TestId = " & lstResults.Column(1) & " And tblTesting.Empid = ...
I have two validation for date and time as below in text boxes:
00/00\ 00:00;0;0;_
It will take (dd/mm hh:mm) and works fine
But sometimes i put
34/34 56:78 it will take , But it shouldn't
Date sholdnot go beyond 31, month 12 time 24 and minute 59
Please help
...
I want to validate a text box
where the user enters the date in format dd/mm
and time hh/mm
in the same text box
how to do this?
...
Hello,
I have a keyUp event in button1 and EnterEvent in button2
When i press button1 and use my up arrow automatically control is navigating to Enter Event of button2 after entering into the KeyUp event of button1
Feels something fishy; Please help !!
...
I need to assign a number value to a variable in VBA.
I did this:
var num as integer
num=1
but when I put a breakpoint at num=1 and see the value of num it's showing 0 (zero).
Please help.
...
Ok, so my PHP is, to say the least, horrible. I inherited an application and am having to fix errors in it from someone that wrote it over 7 years ago. When I run the page, there is no return, so I checked the logs to see the error and here is what i get:
PHP Parse error: syntax error, unexpected '=', expecting ',' or ';' in /http...
I want a variable like $ that is sort of special, but I'm already using jQuery, so $ is taken.
...
I think the answer is simply, "no you can't do that," but my thoughts are pretty much always wrong about Ruby.
I'm trying to do this in Ruby
city, state, zip = (0..2)
this results in city being a Range and the others being nil, which is not what I want. Is there any way to do this?
...
First question on SO and it's a real RTFM candidate. But I promise you I've looked and can't seem to find it. I'll happily do a #headpalm when it turns out to be a simple thing that I missed.
Trying to figure out Zend Framework and came across the following syntax:
$this->_session->{'user_id'}
I have never seen the curly braces synta...
I am trying to make a class from a member variable like this:
<?
class A{
private $to_construct = 'B';
function make_class(){
// code to make class goes here
}
}
class B{
function __construct(){
echo 'class constructed';
}
}
$myA = new A();
$myA->make_class();
?>
I tried using:
$myClass = new $this-...
In Perl, the array index -1 means the last element:
@F=(1,2,3);
print $F[-1]; # result: 3
You can also use the $# notation instead, here $#F:
@F=(1,2,3);
print $F[$#F]; # result: 3
So why don't -1 and $#F give the same result when I want to specify the last element in a range:
print @F[1..$#F]; # 23
print @F[1..-1]; # <empty>
T...