On Fedora, installation finishes, but you won’t be able to start the service:

[hji@localhost ~]$ sudo /opt/mssql/bin/sqlservr-setup
Microsoft(R) SQL Server(R) Setup
You can abort setup at anytime by pressing Ctrl-C. Start this program
with the --help option for information about running it in unattended
mode.
The license terms for this product can be downloaded from
http://go.microsoft.com/fwlink/?LinkId=746388 and found
in /usr/share/doc/mssql-server/LICENSE.TXT.
Do you accept the license terms? If so, please type "YES": YES
Please enter a password for the system administrator (SA) account:
Please confirm the password for the system administrator (SA) account:
Setting system administrator (SA) account password...
sqlservr: This program requires a machine with at least 3250 megabytes of memory.
Microsoft(R) SQL Server(R) setup failed with error code 1.
Please check the setup log in /var/opt/mssql/log/setup-20161117-122619.log
for more information.

Some simple testing From the output below, we learn that: 1)in sys.sysfiles, full file name is presented like “C:\var\opt\mssql\data\TestDb.mdf”; 2) Database name, at least inside sqlcmd, is not case-sensitive. By the way, login is also case-insensitive: SA is sA.

Overall, it looks pretty nice! I’ve got to say, I’m really impressed with Microsoft’s embrace of Linux. By the way, if you use Windows 10, I recommend Bash on Ubuntu on Windows. It’s in beta, but it works for me pretty well so far.

Stay tuned for more. I’ll definitely write more as I play with this new toy!

I didn’t realize that Java’s regex class, Matcher, uses m.group(0) to denote the entire pattern. I spent some time debugging it. Hence this note.

As is stated in the documentation, “Capturing groups are indexed from left to right, starting at one. Group zero denotes the entire pattern, so the expression m.group(0) is equivalent to m.group().”

Here is a sample code to pick out twitter user names out of a string using Java. A set is returned, therefore if a user name is mentioned more than once, it’ll only be stored once in the set. All user names are returned back in lowercase. This function has gone through pretty through testing and works pretty well.

In addition, this is also a pretty good sample of negative lookbehind regex usage: we are not looking for pattern where @ is proceeded by any valid Twitter user name character.

Update: Angle brackets in Java code caused my code formatter to add some junk inside the code. Be aware! I need to look for a good code formatter for WordPress…

package com.haidongji.java;
import java.util.HashSet;
import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Tweet {
/**
* Get usernames mentioned in a string.
*
* @param s
* string, a tweet
* @return the set of usernames mentioned in the text of the tweet.
* A username-mention is "@" followed by a Twitter username
* A Twitter username is composed of:
* English letters, digits, dash, and underscore
* The username-mention cannot be immediately preceded or followed
* by any character valid in a Twitter username. Therefore:
* user@example.com does NOT contain a mention of the username example.
* Twitter usernames are case-insensitive
*/
public static Set<string> getMentionedUsersFromString(String s) {
Set</string><string> set = new HashSet</string><string>();
String pattern = "(?< ![a-zA-Z0-9_-])@([a-zA-Z0-9_-]+)"; // see spec above
Matcher m = Pattern.compile(pattern).matcher(s);
while (m.find()) {
set.add(m.group(1).toLowerCase());
}
return set;
}
}

I’ve learned that SQL Server 2016 Standard and Enterprise Editions no longer provide 32-bit. But I do wonder about SQL Server 2016 Express Edition. It’s different in that it’s free, and mostly geared toward lightweight usage, people who are learning, etc. So perhaps it still offers 32-bit?

After some upgrade work to one SQL Server 2008 R2 Express 32-bit, I can tell you with real experience that SQL Server 2016 Express does NOT have 64-bit either.

So the latest Express edition that has 32-bit is SQL Server 2014. Like Allan Hirt, I also say good riddance. It’s time to move on.

A couple of months ago Outlook 2016 on my old PC (Windows 10) started misbehaving:

Clicking “Attach File” to add an attachment from my PC to an email message;

A window would show up. When it worked, I would be able to move the mouse down and click “Browse This PC…”. However, nowadays this window disappears so quickly that it doesn’t give me enough time to click that “Browse This PC…” item!

Web search ensued. Some suggested repairing the mailbox, which I’ve done but to no avail;

To get around this, open a windows Explorer window and navigate to the location where the attachment is located, drag it to the email window and release it. Viola, attachment added and you’re done!