I want to pass a pointer to a procedure in c++. I tried passing this LRESULT(*)(HWND, UINT, WPARAM, LPARAM) prc but it didn't work. How is this done?
Thanks
HWND OGLFRAME::create(HWND parent, LRESULT(*)(HWND, UINT, WPARAM, LPARAM) prc)
{
if(framehWnd != NULL)
{
return framehWnd;
ZeroMemory(&rwc,sizeof(rwc));
}
}
By "it didn't work" I mean it's a syntax error.
Is there an IDE for PHP where you can edit the code for your pages online? Real syntax highlighting is minimal. More would be great. I'd like to be able to do development on my site at times other than when I'm not at at home.
I'm running Groovy Version: 1.7.0 JVM: 1.6.0_17
(Update -- I just upgraded to 1.7.1 and get the same errors!)
I've tried to use enums, using the exact syntax from the groovy documentation, and each time I see the compile error:
Groovy:The class java.lang.Enum refers to the class java.lang.Enum and uses 1 parameters, but the referred class takes no parameters
Any ideas on what's going on?
For example: This code won't compile or run, and gets the error above.
enum VehicleStatus { OFF, IDLING, ACCELERATING, DECELARATING }
class Vehicle
{
Long id
Long version
VehicleStatus status
}
In C# 4, wasn't there a short cut for checking for null values like so:
if( myobject?.myproperty?.myotherproperty?.value != null )
The value would return null and not throw an exception.
Anyone have a link to how to use it or at least the syntax?
I'm searching a tool for generating UML-Diagrams by the import of SQL-Syntax-Files.
I need it for personal usage. Best if it's free or if there is a free trial license available.
update p
set
p.storePrice =
CASE
WHEN
p.costPrice BETWEEN 0.00 AND 1.00
THEN p.costPrice * 1.0
CASE
WHEN
p.costPrice BETWEEN 0.00 AND 1.00
THEN p.costPrice * 1.0
ELSE
p.msrpPrice
END
FROM product p
WHERE p.type = 1
The error says:
Msg 156, Level 15, State 1, Line 9
Incorrect syntax near the keyword 'CASE'.
I can't seem to see any issue with the sql?
As far as I know there is no web browser with built in validators for HTML, CSS and JavaScript. Developing web pages without validation is like using a compiler that doesn't do syntax analysis. Even Firefox with its excellent plugins aimed at developers like Firebug lacks plugins for CSS and JavaScript validation. Wouldn't it be useful to have these plugins? Am I missing something?
Hi
When debugging a java program in netbeans, I want the debugger to stop on the line that causes a NullPointerException so I can examine the variables there. I believe I have to use a condition on the breakpoint set at that line, but what is the syntax of the condition?
thanks for the help
i have this python script where i need to run 'gdal_retile.py'
but i get this an exception on this line:
if Verbose:
print(Building internam Index for %d tile(s) ..." % len(inputTiles), end=' ')
the end='' is invalid syntax just curious as to why.. and what the author probably meant to do.
I'm new to python if you haven't already guessed.
I wonder that, why are we using ({ }) ?
Is it delegate ?
What does it mean to use this syntax ?
What are we wrapping with it ?
For ex:
$.ajaxSetup ({ // <-- THIS
error: fError,
compelete: fComp,
success: fSucc
}); // <-- AND THIS
Are there any .NET testing frameworks which allow dynamic creation of tests without having to deal with a hokey Attribute syntax?
Something like:
foreach (var t in tests)
{
TestFx.Run(t.Name, t.TestDelegate);
}
But with the test reporting as you would expect...
I could do something like this with RowTests et al, but that seems hokey.
Quoting from the C-std section 6.7.2.1,
struct s { int n; double d[]; };
This is a valid structure declaration. I am looking for some practical use of this kind of syntax. To be precise, how is this construct any more or less powerful than keeping a double* as the 2nd element? Or is this another case of 'you-can-do-it-in-multiple-ways'?
Arpan
This compiles well for me - However other people on a different thread are saying that protected classes cannot be declared in c# at top level
Is that the case?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
protected class CsvReader
{
}
}
I have an asp:RadioButtonList and want to declaratively bind the value to an enumeration. I tried using this type syntax:
value = <%# ((int)MyEnum.Value).ToString() %"
I get an error list item does not support databinding. Any ideas?
var currentDate=new Date();
currentDate.setFullYear(2011);
alert(currentDate); == this works, it sets the year to 2011 as expected.
alert((new Date()).setFullYear(2011)); == this one doesn't work.
Any idea why? Am I misunderstanding the syntax?
Question http://stackoverflow.com/questions/1082474/authoring-html5-in-emacs talks about nxml-mode but, from what I read, that can only be used for XHTML5, I want to use emacs with HTML5 (no XML syntax). Is there any mode with auto-indentation, tag/attribute completion, etc.?
I was unable to find any solution of my specific issue. I'm using Xcode 3.2. I'd like to indent the next line of function argument just one step in from the previous line:
somevariable = pow(
a,
b);
However, Xcode's syntax-aware indenting insists on converting the above into:
somevariable = pow(
a,
b);
Where the arguments are aligned with opening parenthesis of the function.
How can I make indenting be configured to match my preference?
I have a workspace with which I have 5 applications based on same schema. Now I want to have a main page from where I could call main pages of all these applications. I used this syntax to call home page in another application but to no avail
f?p=4000:4150:&APP_SESSION.
Where 4000:4150 are the values for the application and the page I want to display.
Please let me know where am I making mistake.
When I read source from open source projects I often find a comment line with "$Id" at the header of the file, f. ex.:
// $Id: addappwindowa.c 30792 2009-03-07 22:40:04Z neil $
Is there an "offical" syntax for this lines? (What does "30792" means? )
Are there editors that auto-generate these "$Id"s?
Are there any tools that use this information?
I know there is some syntax with ? to optionally render attribute.
But I can't find it now that I need it ...
Something like:
< input checked=<%? model.IsActivated % > ...
Thanks.
i use this javascript syntax for validating a checkbox...
alert(document.getElementById("ctl00_ContentPlaceHolder1_Chkreg").checked);
if (document.getElementById("ctl00_ContentPlaceHolder1_Chkreg").checked == false) {
document.getElementById("ctl00_ContentPlaceHolder1_ErrorMsg").innerHTML = "please select the checkbox";
document.getElementById("ctl00_ContentPlaceHolder1_Chkreg").focus();
return false;
}
My alert showed me false but my if loop is not working... Any suggestion...
I can read settings like this, for example:
final String mytest = System.getString(this.getContentResolver(), System.AIRPLANE_MODE_ON);
...but can't seem to write to settings using putString, no matter what I've tried. Maybe it is the scope of this.getContentResolver()??? I'm a newbie, so who knows, maybe it can't be done, or it's just syntax? Currently the code is in the onCreate of an Activity class.
Any insight is much appreciated.
My code relies on version of Element which works like MemberQ, but when I load Combinatorica, Element gets redefined to work like Part. What is the easiest way to fix this conflict? Specifically, what is the syntax to remove Combinatorica's definition from DownValues? Here's what I get for DownValues[Element]
{HoldPattern[
Combinatorica`Private`a_List \[Element] \
{Combinatorica`Private`index___}] :>
Combinatorica`Private`a[[Combinatorica`Private`index]],
HoldPattern[Private`x_ \[Element] Private`list_List] :>
MemberQ[Private`list, Private`x]}