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.
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?
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...
basically i need to write a query for mysql, but i have no experience in this and i cant find good tutorials on the old tinternet.
i have a table called rels
with columns "hosd_id" "linkedhost_id" "text link"
and a table called hostlist
with columns "id" "hostname"
all i am trying to achieve is a query which outputs the "hostname" and "linked_id" when "host_id" is equal to "id"
any help or pointers on syntax or code would be helpfull, or even a good mysql query
guide
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......
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?
Hi,
Is there a way to use the "NOT IN (select XXX...)" clause in Linq to Entities?
All the questions I found were regarding a list of objects (IN (1,2,3)) but I want to generate a query with the following syntax:
"select * from table1 where field1 not in(select subfield from subtable)"
Be aware that this is Linq to Entities and not Linq to Sql...
Is it possible?
Thanks!
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
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
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 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?
I'm using geoalchemy and autoloaded tables, but I'd like to use Elixir, because it has a nicer query syntax. 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?
I've tried using the following commands to download the ctrl alt del comics.
$ for filename in $(seq 20021023 20100503); do wget http://www.ctrlaltdel-online.com/comics/"$filename".jpg; done
I get the following error code, "bash: syntax error near unexpected token 'do'"
I've also tried using cURL, using this command,
curl http://ctrlaltdel-online.com/comics[20021023..20100503].jpg
I get the following error code, "curl: (3) [globbing] error: bad range specification after pos 37"
Any help would be great.
How would I create a truly 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?
Hi, let's say that I have a table called
Items (ID int, Done int, Total int)
I can do it by two queries:
int total = m.Items.Sum(p=>p.Total)
int done = m.Items.Sum(p=>p.Done)
But I'd like to do it in one query, something like this:
var x = from p in m.Items select new { Sum(p.Total), Sum(p.Done)};
Surely there is a way to call aggregate functions from LINQ syntax...?
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
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?
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?
In Komodo Edit, if I name the file *.django.html it gives me django syntax highlighting BUT it also indents with a tab character (8 spaces) instead of giving me the usual 4 space indent. How can I fix this?
I've tried changing the value in Edit Preferences Editor Indentation Language Settings, but that seems to have no effect on it.
The indentation works as normal (4 spaces) if I'm using any other extension (.py, .html, etc.).
Ideas?
I seem to have lost the association from .sql files to the default VS T-SQL editor. I'm using Visual Studio 2008. When i open a .sql file it opens using a text editor with no syntax highlighting. How do I reassociate all .sql files with the default T-SQL editor while inside Visual Studio?
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)
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?
Hi,
Which do the concepts control flow, data type, statement, expression and operation belong to? Syntax or semantics?
What is the relation between control flow, data type, statement, expression, operation, function, ...? How a program is built from these primitives level by level?
I would like to understand these primitive concepts and their relations in order to figure out what aspects of a new language should one learn.
Thanks and regards!
I wish to find out what tables references are used in a DML. I prefer to use an oracle package as it can be self contained in the database.
But other suggestions welcome. Open source very welcome.
Here is the link to the syntax diagram of the table_reference definition:
http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_10002.htm#i2126863
Do any parsers exist?