$ git init
$ echo 111 > 1.txt
$ git add .
$ git commit -m "m10"
$ git checkout -b server
$ echo ser >> 1.txt
$ git commit -am "s11"
$ echo ser1 >> 1.txt
$ git commit -am "s12"
$ echo ser2 >> 1.txt
$ git commit -am "s13"
$ echo ser3 >> 1.txt
$ git commit -am "s14"
$ echo ser4 >> 1.txt
$ git commit -am "s15"
$ git checkout -b experiment
$ echo exp1 >> 1.txt
$ git commit -am "e1"
$ git checkout server
$ echo ser5 >> 1.txt
$ git commit -am "s16"
$ git checkout master
$ git merge server
$ git checkout experiment
$ git rebase master
# будут конфликты, решаем их
$ git mergetool
$ git rebase --continue
$ gitk --all
select a.id, a.name, count(b.id) from users a
left join articles b on b.user_id = a.id
group by a.id, a.name
private static void InitConnectSetting() {
Configuration config = ConfigurationManager.
OpenExeConfiguration(ConfigurationUserLevel.None);
var path = DebugMode ? DebugModeDbPath() : Application.StartupPath;
Dictionary<string, string> db = new Dictionary<string, string>() {
{"ec", string.Format("{0}\\db\\{1}", path, /*DebugMode ? "data.db" : */"data.db")},
};
var conSets = config.ConnectionStrings;
foreach (var key in db.Keys) {
var sName = key + "Entities";
var conSet = conSets.ConnectionStrings[sName];
if (conSet != null)
conSets.ConnectionStrings.Remove(conSet);
conSet = new ConnectionStringSettings();
conSet.ProviderName = "System.Data.EntityClient";
conSet.Name = sName;
conSet.ConnectionString =
string.Format("metadata=res://*/{0}Model.csdl|res://*/{0}Model.ssdl|res://*/{0}Model.msl;" +
"provider=System.Data.SQLite;" +
"provider connection string=\"data source={1}\"", key, db[key]);
conSets.ConnectionStrings.Add(conSet);
var file = new FileInfo(db[key]);
if (false && !file.Exists) {
using (BinaryWriter binWriter =
new BinaryWriter(File.Open(db[key], FileMode.Create))) {
switch (key) {
case "ec":
binWriter.Write(Properties.Resources.kladr, 0, Properties.Resources.kladr.Length);
break;
}
}
}
}
conSets.SectionInformation.ForceSave = true;
conSets.SectionInformation.RequirePermission = false;
config.Save(ConfigurationSaveMode.Modified);
ConfigurationManager.RefreshSection(conSets.SectionInformation.Name);
}
namespace WindowsFormsApplication1 {
public partial class Form1 : Form {
public Form1() {
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e) {
dataGridView1.DataSource = bindingSource1;
var dt = new DataTable();
bindingSource1.DataSource = dt;
dt.Columns.AddRange(new DataColumn[] {
new DataColumn("ID", typeof(long)),
new DataColumn("NAME", typeof(string)),
new DataColumn("DESC", typeof(string))
});
for (var i = 0; i < 3; i++) {
var row = dt.NewRow();
row["ID"] = i;
row["NAME"] = string.Format("group{0}", i);
row["DESC"] = "Lots of symbols";
dt.Rows.Add(row);
}
dt.AcceptChanges();
comboBox1.DataSource = bindingSource1;
comboBox1.DisplayMember = "NAME";
}
}
}
awk '
BEGIN {
split("\b\b\b\b\b. . . . . \b- \b\b- \b\b- \b\b- \b\b- \b= = = = =", st, " ")
i=0
}
/^[0-9]/ {
sub(/:.*/, "");
d=$0;
next;
}
/^&/ {
sub(/&/, "");
f=$0
substr($0, 2, length($0) - 1);
next;
}
/^+/ { a="A"; }
/^-/ { a="D"; }
/^[\+-]/ {
fflush("")
sub(/[\+-]/, "")
cmd="echo \"" $0 "\" | md5sum | cut -f1 -d \" \" | sed -e \"s@[32|16]@/sd@g\""
cmd | getline str;
close(cmd)
print ""
system("echo -ne \"" st[i++] "\" >&2")
if (i > 16) i=0
}
' $gitdiff | \
sed -e 's/\(filename="[^"]"\)/\1/'
* This source code was highlighted with Source Code Highlighter.