F# keyword ‘Some’

Some is not a keyword. There is an option type however, which is a discriminated union containing two things: Some which holds a value of some type. None which represents lack of value. It’s defined as: type ‘a option = | None | Some of ‘a It acts kind of like a nullable type, where … Read more

When were the ‘and’ and ‘or’ alternative tokens introduced in C++?

From the first ISO C++ standard C++98, this is described in 2.5/ Alternative tokens [lex.digraph]: Alternative token representations are provided for some operators and punctuators. In all respects of the language, each alternative token behaves the same, respectively, as its primary token, except for its spelling. The set of alternative tokens is defined in Table … Read more

Do C# static functions perform better than nonstatic functions, beyond reduced memory usage?

From Static Classes and Static Class Members (C# Programming Guide) A call to a static method generates a call instruction in Microsoft intermediate language (MSIL), whereas a call to an instance method generates a callvirt instruction, which also checks for a null object references. However, most of the time the performance difference between the two … Read more

SQL Server equivalent to MySQL’s EXPLAIN

The MySql EXPLAIN statement can be used either as a synonym for DESCRIBE or as a way to obtain information about how MySQL executes a SELECT statement. The closest equivalent statement for SQL Server is: SET SHOWPLAN_ALL (Transact-SQL) or SET SHOWPLAN_XML (Transact-SQL) From a SQL Server Management Studio query window, you could run SET SHOWPLAN_ALL … Read more

How to select data from 30 days?

You should be using DATEADD is Sql server so if try this simple select you will see the affect Select DATEADD(Month, -1, getdate()) Result 2013-04-20 14:08:07.177 in your case try this query SELECT name FROM ( SELECT name FROM Hist_answer WHERE id_city=’34324′ AND datetime >= DATEADD(month,-1,GETDATE()) UNION ALL SELECT name FROM Hist_internet WHERE id_city=’34324′ AND … Read more

What SQLite column name can be/cannot be?

Can it have characters like “https://stackoverflow.com/”? All examples are from SQlite 3.5.9 running on Linux. If you surround the column name in double quotes, you can: > CREATE TABLE test_forward ( /test_column INTEGER ); SQL error: near “https://stackoverflow.com/”: syntax error > CREATE TABLE test_forward (“/test_column” INTEGER ); > INSERT INTO test_forward(“/test_column”) VALUES (1); > SELECT … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)