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.
In C# I can do this:
new SomeObjectType("abc", 10);
In other words, I can call new without assigning the created instance to any variable. However, in VB.Net it seems I cannot do the same thing.
New SomeObjectType("abc", 10) ' syntax error
Is there a way to do this in VB.Net?
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?
hello.
Is there some utility which would allow me to inspect template instantiation?
my compiler is g++ or Intel.
Specific points I would like:
Step by step instantiation.
Instantiation backtrace (can hack this by crashing compiler. Better method?)
Inspection of template parameters.
Thanks
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?
I really want to know popular opinion on controversial programming topics. Questions like:
Why do some people prefer vi over emacs (or vice versa)?
Is Java faster than C++?
Is Intel faster than AMD?
It seems SO discourages such conversions because of potential flamewars. So where do people go to discuss such matters? I'm especially interested in venues where people can "up vote" good comments and good questions.
I am trying to do the following in a bit of python code:
class Parent:
class Child(Parent):
pass
And it does not work. Is there any python syntax I can use to achieve the same result?
Thanks.
I'm trying to use a dynamically generated fully-qualified table name in sql server 2008. For example, this does not work:
select max([id]) from @dbName+N'.[T1]'
This will give an error like:
Msg 102, Level 15, State 1, Line 73
Incorrect syntax near '+'.
I know that something like this works:
declare @qualifiedTable varchar(200) = @dbName+N'.[T1]'
select max([id]) from @qualifiedTable
But I have to do this LOTS of times so I would really like to do it in line. Is it possible?
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 am running
ruby script/generate scaffold
or
ruby script/generate model
and I know the basic syntax, like
ruby script/generate scaffold Dude name:string face:boolean
but I do not know things like:
should names of variables have
underscores or be camelCased?
what
kind of variable types are
acceptable?
Where can I find such information?
THANKS!
P.S. The answers to my two questions would help for now, too :)
Looking at the information under the heading "Precision can be omitted or be any of:".
The example: printf("%.*s", 3, "abcdef"); works, outputting:abc (truncating the rest of the string.)
Now, I would like to have a string with multiple parameters formatted (truncated):
printf("%.*s, %.*s", 3, 3, "abcdef", "xyz123");
but the program crashes.
What is the correct syntax?
Thank You.
what is the syntax (i.e. code example) in Lua so you can call a function prior to it being defined? i.e. how do you kind of create the function, but then add it's implementation further down in code.
So roughly like this:
define function name (doX) here somehow (i.e. subject of this question)
call doX here (further down in the code)
doX implemention here (i.e. all functions down at the bottom of the file)
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.
By textbook based i mean the author asks the reader questions/mini projects after every section/chapter of the book. And the book includes background info on php 5, like what kind of language, its use, syntax/semantix/structure etc. Any suggestions?
In Python, I want to make selected instance attributes of a class be readonly to code outside of the class. I want there to be no way outside code can alter the attribute, except indirectly by invoking methods on the instance. I want the syntax to be concise. What is the best way? (I give my current best answer below...)
Hi everyone
Iam trying to this in HQL:
select A.a A.a1, B.b,B.b1 from A,B
where A.x=B.x;
It is simple to realize the join with sql but when returninig in HQL I find a problem.
would you please give me the HQL syntax for the join
Thanks for help.
ie6 isn't playing nice with my jquery snippet, why is this throwing a syntax error in IE6
if(typeof isIE6 !="undefined"){
$("#dropdown-list li").hover(
function(){ $(this).addClass("hover"); },
function(){ $(this).removeClass("hover"); },
);
};
Hi,
The syntax for the wait system call is pid= wait(&var) where pid is the process id of child and var is the variable which will contain the reason for exiting child.
But what happens when we use wait((int *)0)? What does it exactly mean?
Thank you.
Dear Everyone,
Is there a better shell than the native mongo shell?
When I press UP I am seeing
^[[A . Does the shell not support
last query?
Tabbing in the shell
does not autocomplete either.
Of course, if there's a shell with syntax
highlighting that would be great
Is there an alternative that has the following features? (Or at least has some of them).
I'm coming to C++ from a .Net background. Knowing how to use the Standard C++ Libraries, and all the syntax, I've never ventured further. Now I'm looking learning a bit more, such as what libraries are commonly used? I want to start getting into Threading but have no idea to start. Is there a library (similar to how .net has System.Threading) out there that will make it a bit easier? I'm specifically looking to do Linux based network programming.
I always considered database as a storage .
but never thought it can be used for querying across tables etc.
Which is a good book for sql for a developer. not just the syntax.
How to write a query in different ways
How internally queries are executed.etc
especially related to microsoft sql server
Hi
I am using visual studios 2010 and created a javascript file(jscript.js) and I saw on one page saying you can make constant variables in javascript like:
const x = 20;
bu to on another page I read it says you can't. So I am confused now what is it now?
Also in Visual studios when I write "const" it underlines it in the javascript file and goes syntax error.
The line cmd.ExecuteNonQuery();
cmd.CommandText
CREATE TRIGGER subscription_trig_0 ON subscription AFTER INSERT AS UPDATE user_data SET msg_count=msg_count+1 FROM user_data
JOIN INSERTED ON user_data.id = INSERTED.recipient;
The exception:
Incorrect syntax near the keyword 'TRIGGER'.
Then using VS 2010, connected to the very same file (a mdf file) i run the query above and i get a success message. WTF!