I want to write something of the sort:
//a[not contains(@id, 'xx')]
(meaning all the links that there 'id' attribute doesn't contain the string 'xx')
I can't find the right syntax.
Thanks
I want to do something like this, but I cannot get a cooperative syntax.
static const UIColor *colorNavbar = [UIColor colorWithRed: 197.0/255.0 green: 169.0/255.0 blue: 140.0/255.0 alpha: 1.0];
I suppose that I could define macros, but they are ugly.
I have a lot of downtime on the subway each morning and evening, and I'd like to be able to review source code for various projects I'm working on.
Are there any apps that can help with this? I'd like something that lets me browse a hierarchical tree of source files and that does syntax highlighting.
MATLAB has two ways of organizing classes:
@-directories:
@ClassName\
ClassName.m
Method1.m
Method2.m
Single files:
ClassName.m:
classdef ClassName
methods
% all methods included here
end
end
The first style existed before the new classdef syntax, but seems to be a more structured way of doing things. The second style (everything in a single file) is new.
Which method do you use, and why?
I want to automate the Visual Studio 2010 / Resharper 5 auto inserting import directives to put my internal namespaces into the namespace sphere. Like this:
using System;
using System.Collections.Generic;
using System.Linq;
using StructureMap;
namespace MeProject.DependencyResolution
{
using Core;
using Core.Common; // <--- My internal namespaces to be here!
I am trying to create a new table by copying an existing table in SQL Server 2008 using Management Studio. The existing table contains no data. I am using the following code but am receiving an error for Incorrect Syntax near AS. I am not sure what is wrong here. I am a SQL newb and any help would be appreciated. Thanks.
CREATE TABLE Drop_Centers_Detail
AS (Select * From Centers_Detail)
How would I create a random number using C++? I've heard that one should use the time as a seed, but I'm not sure how to do that with the correct syntax. How would I do this?
One more thing - how would I limit the random number to a particular range? I'm simulating a dice roll and getting numbers in the millions...
I need to be able to select only the first row for each name that has the greatest value.
I have a table with the following:
id name value
0 JOHN 123
1 STEVE 125
2 JOHN 127
3 JOHN 126
So I am looking to return:
id name value
1 STEVE 125
2 JOHN 127
Any idea on the MSSQL Syntax on how to perform this operation?
I'm a longtime C/C++ Unix guy. I recently started work in a new position that's gonna eventually require C# and WPF (and probably some LINQ). What are the best resources to quickly come up to speed on all these Microsoft technologies? Years ago I read Petzold's book and loved it because it was so complete and by the end I really felt like I knew what I was doing... Is their something equivalent for the .NET world?
I would like to save an instance of a c#.NET class in SQL for later retrieval. I am able to use LINQ to SQL to add a record complete with all the xml that makes up the class.
Now how do I retrieve that xml and reconstruct the class object instance?
I have a problem when I add an entity object with ObjectContext.AddObject method because I can't retrieve that object with LINQ querying my ObjectContext.Person entities. I know that this new added object is stored somewhere, because it is used to update database after SaveChanges method. That's bothers me because I want to update my datagrid DataContext without saving changes unless I really want to do it. It doesn't help if I add the same object to DataContext list myself directly.
I have a service with the metadata exposed. Trouble is when I browse to the wsdl the service page it has the machine name as below:
MasterLibrary Service
You have created a service.
To test this service, you will need to create a client and use it to call the service. You can do this using the svcutil.exe tool from the command line with the following syntax:
svcutil.exe http://mymachine/Master/Master.svc?wsdl
How do I make it show it as:
http://www.url.co.uk/Master/Master.svc?wsdl
What is the language with the lowest barriers to entry, simplest syntax, easiest setup. I'm aware that there's not a best language but I am sure that there will be one that's got a good score in all three areas.
It's for teaching friends how to program, I like PHP and Python but I don't want to be narrow minded and limit myself when there is a better option out there.
Common suggestions
Ruby
Python
Basic
C
Java
C#
Useful links
Best Ways To Teach A Beginner to Program
Why's (Poignant) Guide to Ruby
Think Python
Hello,
So I have an MVC project that exposes my services in JSON format.
What would be the ideal method of (unit?) testing whether or not my methods return correct content (in terms of JSON syntax as well)?
Thank you,
Sammy
I'm currently using Visual Studio 2008 to edit .js files with, and it has decent support but I want more...
I like the VS syntax highlighting and auto-indentation features but additionally would like advanced features like: contextual info and help, collapsible JavaScript blocks, implicit symbol understanding for searching, refactoring and that kind of thing; also warnings and errors for the js code.
Suggestions?
http://msdn.microsoft.com/en-us/library/aa479332.aspx form this site i download the MSDNElmah.msi.After install this, i get a solution Contain .aspx and web.config file and one dll.This site have some information about this plugin,but it's seems to difficult to me.I can not use it on my Project.I want to use this plugin on my project.Please help me to do that,give me some syntax or Full information how to do it.Thanks in advance.
I'm using geoalchemy and autoloaded tables, but I'd like to use Elixir, because it has a nicer querysyntax. Does anyone know how to get them to work together? I did get it working with this code -- http://pastie.textmate.org/private/y3biyvosuejkrtxbpdv1a -- but that still gives the ugly warning about not recognising the geometry column when the table is reflected.
Ideally, what I'd like to do is to get SQLAlchemy's own table reflection to recognise the geometry columns. How would I plumb them together?
how can I write a .py file from python such that its type should not be like 'ASCII file with Windows CRLF'
because when i run file.write(data) inside windows it write the file but when I try to
eval(open(file.py).read()) it fails and gives syntax error because of windows CRLF on each line......
Hi
I'm learning Haskell and I'd like to write some multithreaded programs now to see the performance gains from that in a functional language. I can find some references to it on the internet but never a proper introduction to it. Can anyone point me to a guide which is understandable for someone who knows the syntax fairly well, but is not a wizard in Haskell?
I'm after a book to read whilst on holiday.
Some criteria:
The book has to be relatively short. < 500 pages.
I'd prefer a book that changes your thinking, rather than reams of syntax to look at.
So the last two years here have been my books:
Last year, The Craftsman by Richard Sennet (Changed how I viewed career development, quality)
Year before, Zen and The art of motorcycle maintenance (Makes you think about quality, maintenance)
I am work on VB.net 2003 Framework 1.1 for last 3.5 years in windows Application.
We are currently migrating to VB.net 2008 framework 3.5, but i don't know about the features
which related to ADO.net and which is important to performance. I know linq to SQL but our architecture is made in .net 2003 so we should follow this.
Any features which is very important to enhance the performance?
What is the difference between ',' and 'as' in except statements, eg:
try:
pass
except Exception, exception:
pass
and:
try:
pass
except Exception as exception:
pass
Is the second syntax legal in 2.6? It works in CPython 2.6 on Windows but the 2.5 interpreter in cygwin complains that it is invalid.
If they are both valid in 2.6 which should I use?
In gcc I can do compile-time warnings like this:
#if !defined(_SOME_FEATURE_)
#warning _SOME_FEATURE_ not defined-- be careful!
#endif
But in Visual Studio this doesn't work. Is there an alternative syntax for #warning?
I'm trying to use the following code to convert a native string to a managed string in C++\CLI:
System::String^ NativeToDotNet( const std::string& input )
{
return System::Runtime::InteropServices::Marshal::PtrToStringAnsi( (static_cast<LPVOID>)( input.c_str() ) );
}
I originally found the code here:
But when I try to build it throws the error:
syntax error : identifier 'LPVOID'
Any idea how to fix this?
I'm sure I'm missing the obvious answer here, but could use a hand. I'm new to SubSonic and using version 3. I've got myself to the point of being able to query and insert, but I'm stuck with how I would get the value of the identity column back after my insert. I saw another post that mentioned Linq Templates. I'm not using those (at least I don't think I am...?)
TIA