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
<Window Name="mMainView" | |
x:Class="MyProject.MainView" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
xmlns:vm="clr-namespace:MyProject.ViewModels" | |
mc:Ignorable="d" | |
Title="My Project" Height="450" Width="800"> | |
<mc:AlternateContent> |
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
my $dbh = DBI->connect( | |
'dbi:Pg:dbname=DATABASE_NAME', | |
q{}, | |
q{}, | |
{ | |
RaiseError => 1, | |
AutoCommit => 0, | |
PrintError => 0, | |
ShowErrorStatement => 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
my $dbh = DBI->connect( | |
'dbi:Pg:dbname=DATABASE_NAME', | |
q{}, | |
q{}, | |
{ | |
RaiseError => 1, | |
AutoCommit => 0, | |
PrintError => 0, | |
ShowErrorStatement => 1, | |
HandleError => sub { |
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
my $previous_handler = $dbh->{'HandleError'}; | |
$dbh->{'HandleError'} = undef; | |
eval { | |
$sth_insert->execute; | |
$dbh->{'HandleError'} = $previous_handler; | |
1; | |
} or do { | |
$dbh->rollback; | |
# Insert failed, try an update | |
# No check needed because HandleError was restored |
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
include $(GOROOT)/src/Make.inc | |
TARGDIR=../bin | |
TARG=myprogram | |
GOFILES=\ | |
myprogram.go\ | |
CLEANFILES+=$(TARG)-debug | |
include $(GOROOT)/src/Make.cmd |
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
$('#loginbuttn').click(function() { | |
navigator.id.getVerifiedEmail( | |
function(assertion) { | |
if (assertion !== null) { | |
alert("logged in"); | |
} else { | |
alert("not logged in") | |
} | |
} | |
) |
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
document.getElementById('loginbutton').addEventListener( | |
"click", | |
function(event) { | |
navigator.id.getVerifiedEmail(function(assertion) { | |
if (assertion !== null) { | |
alert("logged in"); | |
} else { | |
alert("not logged in"); | |
} | |
}); |
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
case "$TERM" in | |
screen) | |
export PROMPT_COMMAND='echo -ne "\033]2;${USER}@${HOSTNAME}: ${PWD}\007\033k${USER}@${HOSTNAME}\033\\"' | |
;; | |
esac |