This file contains hidden or 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
test |
This file contains hidden or 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<stdio.h> | |
int main() | |
{ | |
int i,j,k; | |
int h=7,t=3,l=5; | |
for(i=1;i<=(t/2)+1;i++) | |
{ | |
for(j=1;j<=i;j++) | |
{ | |
printf("*"); |
This file contains hidden or 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
@startuml | |
' uncomment the line below if you're using computer with a retina display | |
' skinparam dpi 300 | |
!define Table(name,desc) class name as "desc" << (T,#FFAAAA) >> | |
' we use bold for primary key | |
' green color for unique | |
' and underscore for not_null | |
!define primary_key(x) <b>x</b> | |
!define unique(x) <color:green>x</color> | |
!define not_null(x) <u>x</u> |
This file contains hidden or 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
@startuml | |
@enduml |
This file contains hidden or 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
@startuml | |
'autonumber | |
hide footbox | |
participant "Client" as C | |
participant "SSO\nServer" as S | |
participant "Hadoop\nService" as H | |
C->S: 1. credentials | |
C<--S: tokens | |
C->H: 2. access token | |
C<--H: requested resource |
This file contains hidden or 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
@startuml | |
/' Styles ---------------------------------------------------------------- | |
Installing plantuml is easy, you can do it through maven! | |
# Get the plantuml jar. | |
mvn dependency:get -Dartifact=net.sourceforge.plantuml:plantuml:8045 | |
# Alias to run. | |
alias plantuml='java -DPLANTUML_LIMIT_SIZE=8192 -jar ~/.m2/repository/net/sourceforge/plantuml/plantuml/8045/plantuml-8045.jar' |
This file contains hidden or 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
@startuml | |
skinparam lifelineStrategy solid | |
skinparam handwritten false | |
skinparam monochrome true | |
skinparam packageStyle rect | |
skinparam defaultFontName FG Virgil | |
skinparam shadowing true | |
skinparam classBorderThickness .5 | |
skinparam usecaseBorderThickness .5 | |
skinparam titleBorderRoundCorner 15 |
This file contains hidden or 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
#!/usr/bin/env/python | |
# | |
# More of a reference of using jinaj2 without actual template files. | |
# This is great for a simple output transformation to standard out. | |
# | |
# Of course you will need to "sudo pip install jinja2" first! | |
# | |
# I like to refer to the following to remember how to use jinja2 :) | |
# http://jinja.pocoo.org/docs/templates/ | |
# |
This file contains hidden or 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
=head1 TUTORIAL | |
A quick example driven introduction to the wonders of L<Mojolicious>. | |
=head2 Hello World Generator | |
A simple Hello World application can be constructed in a few commands. | |
$ mojo generate app Eg | |
[mkdir] .../eg/script |
This file contains hidden or 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
#!/usr/bin/env perl | |
use Mojolicious::Lite; | |
# connect to database | |
use DBI; | |
my $dbh = DBI->connect("dbi:SQLite:database.db","","") or die "Could not connect"; | |
# shortcut for use in template | |
helper db => sub { $dbh }; |