This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private ManualResetEvent mre = new ManualResetEvent(false); | |
void startBW() { | |
BW = new BW(); //BW is BackgroundWorker class | |
BW.RunWorkerCompleted += BW_RunWorkerCompleted; | |
BW.ProgressChanged += BW_ProgressChanged; | |
BW.RunWorkerAsync(); | |
//wait until it finishes | |
mre.WaitOne(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Settings | |
{ | |
private bool showid = true; | |
public bool showID | |
{ | |
get | |
{ | |
return showid; | |
} | |
set |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class FooUser { | |
Provider<List<Foo>> elementsProvided; | |
@Inject | |
public FooUser( Provider<List<Foo>> elementsProvided) { | |
this.elementsProvided= elementsProvided; | |
List<Foo> elements = elementsProvided.get(); | |
//Now you can access the elements! | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class GAModule extends AbstractModule{ | |
//@Constant(value = "elements") | |
protected List<Foo> elements; | |
@Provides List<Foo> getElements() { | |
return elements; | |
} | |
public void setElements(List<Foo> elements) { | |
this.elements = elements; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source common.sh | |
echo $@ | |
if is_myfile $1 $2 ; then | |
"$RHAPSODY_PATH" -base $3 $1 $2 -xcompare | |
else | |
"$KDIFF3_PATH" $1 $2 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source common.sh | |
if is_myfile $1 $2 ; then | |
#DiffMerge.exe -base BASE FILE1 FILE2 -out OUTPUT -xmerge | |
"$RHAPSODY_PATH" -base $3 $1 $2 -out $4 -xmerge | |
else | |
#kdiff3 BASE FILE1 FILE2 -o OUTPUT | |
"$KDIFF3_PATH" $3 $1 $2 -o $4 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Functions in this file are called from difftool.sh and mergetool.sh to determine file extension. | |
#They should return true (0) if given two files both have desired extension and return false (1) otherwise. | |
RHAPSODY_PATH="C:/Program Files (x86)/IBM/Rational/Rhapsody/8.0.5/DiffMerge.exe" | |
KDIFF3_PATH="C:/Program Files/KDiff3/kdiff3.exe" | |
FILE_EXTENSION="sbs" | |
is_myfile() { | |
#extract filename | |
filename1=$(basename $1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[difftool] | |
prompt = false | |
[mergetool] | |
prompt = false | |
[difftool "selectiveDiff"] | |
cmd = difftool.sh $LOCAL $REMOTE $BASE $MERGED | |
keepBackup = false | |
[mergetool "selectiveMerge"] | |
cmd = mergetool.sh $LOCAL $REMOTE $BASE $MERGED | |
keepBackup = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
python | |
import sys | |
sys.path.insert(0, 'c:\MinGW\share\gcc-4.8.1\python') #Change this | |
from libstdcxx.v6.printers import register_libstdcxx_printers | |
register_libstdcxx_printers (None) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void addNewRow(DataView dataView) | |
{ | |
DataRowView newRow = dataView.AddNew(); | |
newRow["Column Name"] = "Column Value"; | |
newRow.EndEdit(); | |
comboBoxViews.ItemsSource = dataView.Cast<DataRowView>().Select(o => o["Column Name"]); | |
} |