.\n\n.list-group {\n // No need to set list-style: none; since .list-group-item is block level\n margin-bottom: 20px;\n padding-left: 0; // reset padding because ul and ol\n}\n\n\n// Individual list items\n//\n// Use on `li`s or `div`s within the `.list-group` parent.\n\n.list-group-item {\n position: relative;\n display: block;\n padding: 10px 15px;\n // Place the border on the list items and negative margin up for better styling\n margin-bottom: -1px;\n background-color: @list-group-bg;\n border: 1px solid @list-group-border;\n\n // Round the first and last items\n &:first-child {\n .border-top-radius(@list-group-border-radius);\n }\n &:last-child {\n margin-bottom: 0;\n .border-bottom-radius(@list-group-border-radius);\n }\n\n // Align badges within list items\n > .badge {\n float: right;\n }\n > .badge + .badge {\n margin-right: 5px;\n }\n}\n\n\n// Linked list items\n//\n// Use anchor elements instead of `li`s or `div`s to create linked list items.\n// Includes an extra `.active` modifier class for showing selected items.\n\na.list-group-item {\n color: @list-group-link-color;\n\n .list-group-item-heading {\n color: @list-group-link-heading-color;\n }\n\n // Hover state\n &:hover,\n &:focus {\n text-decoration: none;\n color: @list-group-link-hover-color;\n background-color: @list-group-hover-bg;\n }\n}\n\n.list-group-item {\n // Disabled state\n &.disabled,\n &.disabled:hover,\n &.disabled:focus {\n background-color: @list-group-disabled-bg;\n color: @list-group-disabled-color;\n\n // Force color to inherit for custom content\n .list-group-item-heading {\n color: inherit;\n }\n .list-group-item-text {\n color: @list-group-disabled-text-color;\n }\n }\n\n // Active class on item itself, not parent\n &.active,\n &.active:hover,\n &.active:focus {\n z-index: 2; // Place active items above their siblings for proper border styling\n color: @list-group-active-color;\n background-color: @list-group-active-bg;\n border-color: @list-group-active-border;\n\n // Force color to inherit for custom content\n .list-group-item-heading,\n .list-group-item-heading > small,\n .list-group-item-heading > .small {\n color: inherit;\n }\n .list-group-item-text {\n color: @list-group-active-text-color;\n }\n }\n}\n\n\n// Contextual variants\n//\n// Add modifier classes to change text and background color on individual items.\n// Organizationally, this must come after the `:hover` states.\n\n.list-group-item-variant(success; @state-success-bg; @state-success-text);\n.list-group-item-variant(info; @state-info-bg; @state-info-text);\n.list-group-item-variant(warning; @state-warning-bg; @state-warning-text);\n.list-group-item-variant(danger; @state-danger-bg; @state-danger-text);\n\n\n// Custom content options\n//\n// Extra classes for creating well-formatted content within `.list-group-item`s.\n\n.list-group-item-heading {\n margin-top: 0;\n margin-bottom: 5px;\n}\n.list-group-item-text {\n margin-bottom: 0;\n line-height: 1.3;\n}\n","// List Groups\n\n.list-group-item-variant(@state; @background; @color) {\n .list-group-item-@{state} {\n color: @color;\n background-color: @background;\n\n a& {\n color: @color;\n\n .list-group-item-heading {\n color: inherit;\n }\n\n &:hover,\n &:focus {\n color: @color;\n background-color: darken(@background, 5%);\n }\n &.active,\n &.active:hover,\n &.active:focus {\n color: #fff;\n background-color: @color;\n border-color: @color;\n }\n }\n }\n}\n","//\n// Panels\n// --------------------------------------------------\n\n\n// Base class\n.panel {\n margin-bottom: @line-height-computed;\n background-color: @panel-bg;\n border: 1px solid transparent;\n border-radius: @panel-border-radius;\n .box-shadow(0 1px 1px rgba(0,0,0,.05));\n}\n\n// Panel contents\n.panel-body {\n padding: @panel-body-padding;\n &:extend(.clearfix all);\n}\n\n// Optional heading\n.panel-heading {\n padding: @panel-heading-padding;\n border-bottom: 1px solid transparent;\n .border-top-radius((@panel-border-radius - 1));\n\n > .dropdown .dropdown-toggle {\n color: inherit;\n }\n}\n\n// Within heading, strip any `h*` tag of its default margins for spacing.\n.panel-title {\n margin-top: 0;\n margin-bottom: 0;\n font-size: ceil((@font-size-base * 1.125));\n color: inherit;\n\n > a {\n color: inherit;\n }\n}\n\n// Optional footer (stays gray in every modifier class)\n.panel-footer {\n padding: @panel-footer-padding;\n background-color: @panel-footer-bg;\n border-top: 1px solid @panel-inner-border;\n .border-bottom-radius((@panel-border-radius - 1));\n}\n\n\n// List groups in panels\n//\n// By default, space out list group content from panel headings to account for\n// any kind of custom content between the two.\n\n.panel {\n > .list-group {\n margin-bottom: 0;\n\n .list-group-item {\n border-width: 1px 0;\n border-radius: 0;\n }\n\n // Add border top radius for first one\n &:first-child {\n .list-group-item:first-child {\n border-top: 0;\n .border-top-radius((@panel-border-radius - 1));\n }\n }\n // Add border bottom radius for last one\n &:last-child {\n .list-group-item:last-child {\n border-bottom: 0;\n .border-bottom-radius((@panel-border-radius - 1));\n }\n }\n }\n}\n// Collapse space between when there's no additional content.\n.panel-heading + .list-group {\n .list-group-item:first-child {\n border-top-width: 0;\n }\n}\n.list-group + .panel-footer {\n border-top-width: 0;\n}\n\n// Tables in panels\n//\n// Place a non-bordered `.table` within a panel (not within a `.panel-body`) and\n// watch it go full width.\n\n.panel {\n > .table,\n > .table-responsive > .table,\n > .panel-collapse > .table {\n margin-bottom: 0;\n }\n // Add border top radius for first one\n > .table:first-child,\n > .table-responsive:first-child > .table:first-child {\n .border-top-radius((@panel-border-radius - 1));\n\n > thead:first-child,\n > tbody:first-child {\n > tr:first-child {\n td:first-child,\n th:first-child {\n border-top-left-radius: (@panel-border-radius - 1);\n }\n td:last-child,\n th:last-child {\n border-top-right-radius: (@panel-border-radius - 1);\n }\n }\n }\n }\n // Add border bottom radius for last one\n > .table:last-child,\n > .table-responsive:last-child > .table:last-child {\n .border-bottom-radius((@panel-border-radius - 1));\n\n > tbody:last-child,\n > tfoot:last-child {\n > tr:last-child {\n td:first-child,\n th:first-child {\n border-bottom-left-radius: (@panel-border-radius - 1);\n }\n td:last-child,\n th:last-child {\n border-bottom-right-radius: (@panel-border-radius - 1);\n }\n }\n }\n }\n > .panel-body + .table,\n > .panel-body + .table-responsive {\n border-top: 1px solid @table-border-color;\n }\n > .table > tbody:first-child > tr:first-child th,\n > .table > tbody:first-child > tr:first-child td {\n border-top: 0;\n }\n > .table-bordered,\n > .table-responsive > .table-bordered {\n border: 0;\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th:first-child,\n > td:first-child {\n border-left: 0;\n }\n > th:last-child,\n > td:last-child {\n border-right: 0;\n }\n }\n }\n > thead,\n > tbody {\n > tr:first-child {\n > td,\n > th {\n border-bottom: 0;\n }\n }\n }\n > tbody,\n > tfoot {\n > tr:last-child {\n > td,\n > th {\n border-bottom: 0;\n }\n }\n }\n }\n > .table-responsive {\n border: 0;\n margin-bottom: 0;\n }\n}\n\n\n// Collapsable panels (aka, accordion)\n//\n// Wrap a series of panels in `.panel-group` to turn them into an accordion with\n// the help of our collapse JavaScript plugin.\n\n.panel-group {\n margin-bottom: @line-height-computed;\n\n // Tighten up margin so it's only between panels\n .panel {\n margin-bottom: 0;\n border-radius: @panel-border-radius;\n + .panel {\n margin-top: 5px;\n }\n }\n\n .panel-heading {\n border-bottom: 0;\n + .panel-collapse > .panel-body {\n border-top: 1px solid @panel-inner-border;\n }\n }\n .panel-footer {\n border-top: 0;\n + .panel-collapse .panel-body {\n border-bottom: 1px solid @panel-inner-border;\n }\n }\n}\n\n\n// Contextual variations\n.panel-default {\n .panel-variant(@panel-default-border; @panel-default-text; @panel-default-heading-bg; @panel-default-border);\n}\n.panel-primary {\n .panel-variant(@panel-primary-border; @panel-primary-text; @panel-primary-heading-bg; @panel-primary-border);\n}\n.panel-success {\n .panel-variant(@panel-success-border; @panel-success-text; @panel-success-heading-bg; @panel-success-border);\n}\n.panel-info {\n .panel-variant(@panel-info-border; @panel-info-text; @panel-info-heading-bg; @panel-info-border);\n}\n.panel-warning {\n .panel-variant(@panel-warning-border; @panel-warning-text; @panel-warning-heading-bg; @panel-warning-border);\n}\n.panel-danger {\n .panel-variant(@panel-danger-border; @panel-danger-text; @panel-danger-heading-bg; @panel-danger-border);\n}\n","// Panels\n\n.panel-variant(@border; @heading-text-color; @heading-bg-color; @heading-border) {\n border-color: @border;\n\n & > .panel-heading {\n color: @heading-text-color;\n background-color: @heading-bg-color;\n border-color: @heading-border;\n\n + .panel-collapse > .panel-body {\n border-top-color: @border;\n }\n .badge {\n color: @heading-bg-color;\n background-color: @heading-text-color;\n }\n }\n & > .panel-footer {\n + .panel-collapse > .panel-body {\n border-bottom-color: @border;\n }\n }\n}\n","// Embeds responsive\n//\n// Credit: Nicolas Gallagher and SUIT CSS.\n\n.embed-responsive {\n position: relative;\n display: block;\n height: 0;\n padding: 0;\n overflow: hidden;\n\n .embed-responsive-item,\n iframe,\n embed,\n object {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n height: 100%;\n width: 100%;\n border: 0;\n }\n\n // Modifier class for 16:9 aspect ratio\n &.embed-responsive-16by9 {\n padding-bottom: 56.25%;\n }\n\n // Modifier class for 4:3 aspect ratio\n &.embed-responsive-4by3 {\n padding-bottom: 75%;\n }\n}\n","//\n// Wells\n// --------------------------------------------------\n\n\n// Base class\n.well {\n min-height: 20px;\n padding: 19px;\n margin-bottom: 20px;\n background-color: @well-bg;\n border: 1px solid @well-border;\n border-radius: @border-radius-base;\n .box-shadow(inset 0 1px 1px rgba(0,0,0,.05));\n blockquote {\n border-color: #ddd;\n border-color: rgba(0,0,0,.15);\n }\n}\n\n// Sizes\n.well-lg {\n padding: 24px;\n border-radius: @border-radius-large;\n}\n.well-sm {\n padding: 9px;\n border-radius: @border-radius-small;\n}\n","//\n// Close icons\n// --------------------------------------------------\n\n\n.close {\n float: right;\n font-size: (@font-size-base * 1.5);\n font-weight: @close-font-weight;\n line-height: 1;\n color: @close-color;\n text-shadow: @close-text-shadow;\n .opacity(.2);\n\n &:hover,\n &:focus {\n color: @close-color;\n text-decoration: none;\n cursor: pointer;\n .opacity(.5);\n }\n\n // Additional properties for button version\n // iOS requires the button element instead of an anchor tag.\n // If you want the anchor version, it requires `href=\"#\"`.\n button& {\n padding: 0;\n cursor: pointer;\n background: transparent;\n border: 0;\n -webkit-appearance: none;\n }\n}\n","//\n// Modals\n// --------------------------------------------------\n\n// .modal-open - body class for killing the scroll\n// .modal - container to scroll within\n// .modal-dialog - positioning shell for the actual modal\n// .modal-content - actual modal w/ bg and corners and shit\n\n// Kill the scroll on the body\n.modal-open {\n overflow: hidden;\n}\n\n// Container that the modal scrolls within\n.modal {\n display: none;\n overflow: hidden;\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: @zindex-modal;\n -webkit-overflow-scrolling: touch;\n\n // Prevent Chrome on Windows from adding a focus outline. For details, see\n // https://github.com/twbs/bootstrap/pull/10951.\n outline: 0;\n\n // When fading in the modal, animate it to slide down\n &.fade .modal-dialog {\n .translate3d(0, -25%, 0);\n .transition-transform(~\"0.3s ease-out\");\n }\n &.in .modal-dialog { .translate3d(0, 0, 0) }\n}\n.modal-open .modal {\n overflow-x: hidden;\n overflow-y: auto;\n}\n\n// Shell div to position the modal with bottom padding\n.modal-dialog {\n position: relative;\n width: auto;\n margin: 10px;\n}\n\n// Actual modal\n.modal-content {\n position: relative;\n background-color: @modal-content-bg;\n border: 1px solid @modal-content-fallback-border-color; //old browsers fallback (ie8 etc)\n border: 1px solid @modal-content-border-color;\n border-radius: @border-radius-large;\n .box-shadow(0 3px 9px rgba(0,0,0,.5));\n background-clip: padding-box;\n // Remove focus outline from opened modal\n outline: 0;\n}\n\n// Modal background\n.modal-backdrop {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: @zindex-modal-background;\n background-color: @modal-backdrop-bg;\n // Fade for backdrop\n &.fade { .opacity(0); }\n &.in { .opacity(@modal-backdrop-opacity); }\n}\n\n// Modal header\n// Top section of the modal w/ title and dismiss\n.modal-header {\n padding: @modal-title-padding;\n border-bottom: 1px solid @modal-header-border-color;\n min-height: (@modal-title-padding + @modal-title-line-height);\n}\n// Close icon\n.modal-header .close {\n margin-top: -2px;\n}\n\n// Title text within header\n.modal-title {\n margin: 0;\n line-height: @modal-title-line-height;\n}\n\n// Modal body\n// Where all modal content resides (sibling of .modal-header and .modal-footer)\n.modal-body {\n position: relative;\n padding: @modal-inner-padding;\n}\n\n// Footer (for actions)\n.modal-footer {\n padding: @modal-inner-padding;\n text-align: right; // right align buttons\n border-top: 1px solid @modal-footer-border-color;\n &:extend(.clearfix all); // clear it in case folks use .pull-* classes on buttons\n\n // Properly space out buttons\n .btn + .btn {\n margin-left: 5px;\n margin-bottom: 0; // account for input[type=\"submit\"] which gets the bottom margin like all other inputs\n }\n // but override that for button groups\n .btn-group .btn + .btn {\n margin-left: -1px;\n }\n // and override it for block buttons as well\n .btn-block + .btn-block {\n margin-left: 0;\n }\n}\n\n// Measure scrollbar width for padding body during modal show/hide\n.modal-scrollbar-measure {\n position: absolute;\n top: -9999px;\n width: 50px;\n height: 50px;\n overflow: scroll;\n}\n\n// Scale up the modal\n@media (min-width: @screen-sm-min) {\n // Automatically set modal's width for larger viewports\n .modal-dialog {\n width: @modal-md;\n margin: 30px auto;\n }\n .modal-content {\n .box-shadow(0 5px 15px rgba(0,0,0,.5));\n }\n\n // Modal sizes\n .modal-sm { width: @modal-sm; }\n}\n\n@media (min-width: @screen-md-min) {\n .modal-lg { width: @modal-lg; }\n}\n","//\n// Tooltips\n// --------------------------------------------------\n\n\n// Base class\n.tooltip {\n position: absolute;\n z-index: @zindex-tooltip;\n display: block;\n visibility: visible;\n font-size: @font-size-small;\n line-height: 1.4;\n .opacity(0);\n\n &.in { .opacity(@tooltip-opacity); }\n &.top { margin-top: -3px; padding: @tooltip-arrow-width 0; }\n &.right { margin-left: 3px; padding: 0 @tooltip-arrow-width; }\n &.bottom { margin-top: 3px; padding: @tooltip-arrow-width 0; }\n &.left { margin-left: -3px; padding: 0 @tooltip-arrow-width; }\n}\n\n// Wrapper for the tooltip content\n.tooltip-inner {\n max-width: @tooltip-max-width;\n padding: 3px 8px;\n color: @tooltip-color;\n text-align: center;\n text-decoration: none;\n background-color: @tooltip-bg;\n border-radius: @border-radius-base;\n}\n\n// Arrows\n.tooltip-arrow {\n position: absolute;\n width: 0;\n height: 0;\n border-color: transparent;\n border-style: solid;\n}\n.tooltip {\n &.top .tooltip-arrow {\n bottom: 0;\n left: 50%;\n margin-left: -@tooltip-arrow-width;\n border-width: @tooltip-arrow-width @tooltip-arrow-width 0;\n border-top-color: @tooltip-arrow-color;\n }\n &.top-left .tooltip-arrow {\n bottom: 0;\n left: @tooltip-arrow-width;\n border-width: @tooltip-arrow-width @tooltip-arrow-width 0;\n border-top-color: @tooltip-arrow-color;\n }\n &.top-right .tooltip-arrow {\n bottom: 0;\n right: @tooltip-arrow-width;\n border-width: @tooltip-arrow-width @tooltip-arrow-width 0;\n border-top-color: @tooltip-arrow-color;\n }\n &.right .tooltip-arrow {\n top: 50%;\n left: 0;\n margin-top: -@tooltip-arrow-width;\n border-width: @tooltip-arrow-width @tooltip-arrow-width @tooltip-arrow-width 0;\n border-right-color: @tooltip-arrow-color;\n }\n &.left .tooltip-arrow {\n top: 50%;\n right: 0;\n margin-top: -@tooltip-arrow-width;\n border-width: @tooltip-arrow-width 0 @tooltip-arrow-width @tooltip-arrow-width;\n border-left-color: @tooltip-arrow-color;\n }\n &.bottom .tooltip-arrow {\n top: 0;\n left: 50%;\n margin-left: -@tooltip-arrow-width;\n border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;\n border-bottom-color: @tooltip-arrow-color;\n }\n &.bottom-left .tooltip-arrow {\n top: 0;\n left: @tooltip-arrow-width;\n border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;\n border-bottom-color: @tooltip-arrow-color;\n }\n &.bottom-right .tooltip-arrow {\n top: 0;\n right: @tooltip-arrow-width;\n border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;\n border-bottom-color: @tooltip-arrow-color;\n }\n}\n","//\n// Popovers\n// --------------------------------------------------\n\n\n.popover {\n position: absolute;\n top: 0;\n left: 0;\n z-index: @zindex-popover;\n display: none;\n max-width: @popover-max-width;\n padding: 1px;\n text-align: left; // Reset given new insertion method\n background-color: @popover-bg;\n background-clip: padding-box;\n border: 1px solid @popover-fallback-border-color;\n border: 1px solid @popover-border-color;\n border-radius: @border-radius-large;\n .box-shadow(0 5px 10px rgba(0,0,0,.2));\n\n // Overrides for proper insertion\n white-space: normal;\n\n // Offset the popover to account for the popover arrow\n &.top { margin-top: -@popover-arrow-width; }\n &.right { margin-left: @popover-arrow-width; }\n &.bottom { margin-top: @popover-arrow-width; }\n &.left { margin-left: -@popover-arrow-width; }\n}\n\n.popover-title {\n margin: 0; // reset heading margin\n padding: 8px 14px;\n font-size: @font-size-base;\n font-weight: normal;\n line-height: 18px;\n background-color: @popover-title-bg;\n border-bottom: 1px solid darken(@popover-title-bg, 5%);\n border-radius: (@border-radius-large - 1) (@border-radius-large - 1) 0 0;\n}\n\n.popover-content {\n padding: 9px 14px;\n}\n\n// Arrows\n//\n// .arrow is outer, .arrow:after is inner\n\n.popover > .arrow {\n &,\n &:after {\n position: absolute;\n display: block;\n width: 0;\n height: 0;\n border-color: transparent;\n border-style: solid;\n }\n}\n.popover > .arrow {\n border-width: @popover-arrow-outer-width;\n}\n.popover > .arrow:after {\n border-width: @popover-arrow-width;\n content: \"\";\n}\n\n.popover {\n &.top > .arrow {\n left: 50%;\n margin-left: -@popover-arrow-outer-width;\n border-bottom-width: 0;\n border-top-color: @popover-arrow-outer-fallback-color; // IE8 fallback\n border-top-color: @popover-arrow-outer-color;\n bottom: -@popover-arrow-outer-width;\n &:after {\n content: \" \";\n bottom: 1px;\n margin-left: -@popover-arrow-width;\n border-bottom-width: 0;\n border-top-color: @popover-arrow-color;\n }\n }\n &.right > .arrow {\n top: 50%;\n left: -@popover-arrow-outer-width;\n margin-top: -@popover-arrow-outer-width;\n border-left-width: 0;\n border-right-color: @popover-arrow-outer-fallback-color; // IE8 fallback\n border-right-color: @popover-arrow-outer-color;\n &:after {\n content: \" \";\n left: 1px;\n bottom: -@popover-arrow-width;\n border-left-width: 0;\n border-right-color: @popover-arrow-color;\n }\n }\n &.bottom > .arrow {\n left: 50%;\n margin-left: -@popover-arrow-outer-width;\n border-top-width: 0;\n border-bottom-color: @popover-arrow-outer-fallback-color; // IE8 fallback\n border-bottom-color: @popover-arrow-outer-color;\n top: -@popover-arrow-outer-width;\n &:after {\n content: \" \";\n top: 1px;\n margin-left: -@popover-arrow-width;\n border-top-width: 0;\n border-bottom-color: @popover-arrow-color;\n }\n }\n\n &.left > .arrow {\n top: 50%;\n right: -@popover-arrow-outer-width;\n margin-top: -@popover-arrow-outer-width;\n border-right-width: 0;\n border-left-color: @popover-arrow-outer-fallback-color; // IE8 fallback\n border-left-color: @popover-arrow-outer-color;\n &:after {\n content: \" \";\n right: 1px;\n border-right-width: 0;\n border-left-color: @popover-arrow-color;\n bottom: -@popover-arrow-width;\n }\n }\n\n}\n","//\n// Carousel\n// --------------------------------------------------\n\n\n// Wrapper for the slide container and indicators\n.carousel {\n position: relative;\n}\n\n.carousel-inner {\n position: relative;\n overflow: hidden;\n width: 100%;\n\n > .item {\n display: none;\n position: relative;\n .transition(.6s ease-in-out left);\n\n // Account for jankitude on images\n > img,\n > a > img {\n &:extend(.img-responsive);\n line-height: 1;\n }\n }\n\n > .active,\n > .next,\n > .prev {\n display: block;\n }\n\n > .active {\n left: 0;\n }\n\n > .next,\n > .prev {\n position: absolute;\n top: 0;\n width: 100%;\n }\n\n > .next {\n left: 100%;\n }\n > .prev {\n left: -100%;\n }\n > .next.left,\n > .prev.right {\n left: 0;\n }\n\n > .active.left {\n left: -100%;\n }\n > .active.right {\n left: 100%;\n }\n\n}\n\n// Left/right controls for nav\n// ---------------------------\n\n.carousel-control {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n width: @carousel-control-width;\n .opacity(@carousel-control-opacity);\n font-size: @carousel-control-font-size;\n color: @carousel-control-color;\n text-align: center;\n text-shadow: @carousel-text-shadow;\n // We can't have this transition here because WebKit cancels the carousel\n // animation if you trip this while in the middle of another animation.\n\n // Set gradients for backgrounds\n &.left {\n #gradient > .horizontal(@start-color: rgba(0,0,0,.5); @end-color: rgba(0,0,0,.0001));\n }\n &.right {\n left: auto;\n right: 0;\n #gradient > .horizontal(@start-color: rgba(0,0,0,.0001); @end-color: rgba(0,0,0,.5));\n }\n\n // Hover/focus state\n &:hover,\n &:focus {\n outline: 0;\n color: @carousel-control-color;\n text-decoration: none;\n .opacity(.9);\n }\n\n // Toggles\n .icon-prev,\n .icon-next,\n .glyphicon-chevron-left,\n .glyphicon-chevron-right {\n position: absolute;\n top: 50%;\n z-index: 5;\n display: inline-block;\n }\n .icon-prev,\n .glyphicon-chevron-left {\n left: 50%;\n margin-left: -10px;\n }\n .icon-next,\n .glyphicon-chevron-right {\n right: 50%;\n margin-right: -10px;\n }\n .icon-prev,\n .icon-next {\n width: 20px;\n height: 20px;\n margin-top: -10px;\n font-family: serif;\n }\n\n\n .icon-prev {\n &:before {\n content: '\\2039';// SINGLE LEFT-POINTING ANGLE QUOTATION MARK (U+2039)\n }\n }\n .icon-next {\n &:before {\n content: '\\203a';// SINGLE RIGHT-POINTING ANGLE QUOTATION MARK (U+203A)\n }\n }\n}\n\n// Optional indicator pips\n//\n// Add an unordered list with the following class and add a list item for each\n// slide your carousel holds.\n\n.carousel-indicators {\n position: absolute;\n bottom: 10px;\n left: 50%;\n z-index: 15;\n width: 60%;\n margin-left: -30%;\n padding-left: 0;\n list-style: none;\n text-align: center;\n\n li {\n display: inline-block;\n width: 10px;\n height: 10px;\n margin: 1px;\n text-indent: -999px;\n border: 1px solid @carousel-indicator-border-color;\n border-radius: 10px;\n cursor: pointer;\n\n // IE8-9 hack for event handling\n //\n // Internet Explorer 8-9 does not support clicks on elements without a set\n // `background-color`. We cannot use `filter` since that's not viewed as a\n // background color by the browser. Thus, a hack is needed.\n //\n // For IE8, we set solid black as it doesn't support `rgba()`. For IE9, we\n // set alpha transparency for the best results possible.\n background-color: #000 \\9; // IE8\n background-color: rgba(0,0,0,0); // IE9\n }\n .active {\n margin: 0;\n width: 12px;\n height: 12px;\n background-color: @carousel-indicator-active-bg;\n }\n}\n\n// Optional captions\n// -----------------------------\n// Hidden by default for smaller viewports\n.carousel-caption {\n position: absolute;\n left: 15%;\n right: 15%;\n bottom: 20px;\n z-index: 10;\n padding-top: 20px;\n padding-bottom: 20px;\n color: @carousel-caption-color;\n text-align: center;\n text-shadow: @carousel-text-shadow;\n & .btn {\n text-shadow: none; // No shadow for button elements in carousel-caption\n }\n}\n\n\n// Scale up controls for tablets and up\n@media screen and (min-width: @screen-sm-min) {\n\n // Scale up the controls a smidge\n .carousel-control {\n .glyphicon-chevron-left,\n .glyphicon-chevron-right,\n .icon-prev,\n .icon-next {\n width: 30px;\n height: 30px;\n margin-top: -15px;\n font-size: 30px;\n }\n .glyphicon-chevron-left,\n .icon-prev {\n margin-left: -15px;\n }\n .glyphicon-chevron-right,\n .icon-next {\n margin-right: -15px;\n }\n }\n\n // Show and left align the captions\n .carousel-caption {\n left: 20%;\n right: 20%;\n padding-bottom: 30px;\n }\n\n // Move up the indicators\n .carousel-indicators {\n bottom: 20px;\n }\n}\n","// Clearfix\n//\n// For modern browsers\n// 1. The space content is one way to avoid an Opera bug when the\n// contenteditable attribute is included anywhere else in the document.\n// Otherwise it causes space to appear at the top and bottom of elements\n// that are clearfixed.\n// 2. The use of `table` rather than `block` is only necessary if using\n// `:before` to contain the top-margins of child elements.\n//\n// Source: http://nicolasgallagher.com/micro-clearfix-hack/\n\n.clearfix() {\n &:before,\n &:after {\n content: \" \"; // 1\n display: table; // 2\n }\n &:after {\n clear: both;\n }\n}\n","// Center-align a block level element\n\n.center-block() {\n display: block;\n margin-left: auto;\n margin-right: auto;\n}\n","// CSS image replacement\n//\n// Heads up! v3 launched with with only `.hide-text()`, but per our pattern for\n// mixins being reused as classes with the same name, this doesn't hold up. As\n// of v3.0.1 we have added `.text-hide()` and deprecated `.hide-text()`.\n//\n// Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757\n\n// Deprecated as of v3.0.1 (will be removed in v4)\n.hide-text() {\n font: ~\"0/0\" a;\n color: transparent;\n text-shadow: none;\n background-color: transparent;\n border: 0;\n}\n\n// New mixin to use as of v3.0.1\n.text-hide() {\n .hide-text();\n}\n","//\n// Responsive: Utility classes\n// --------------------------------------------------\n\n\n// IE10 in Windows (Phone) 8\n//\n// Support for responsive views via media queries is kind of borked in IE10, for\n// Surface/desktop in split view and for Windows Phone 8. This particular fix\n// must be accompanied by a snippet of JavaScript to sniff the user agent and\n// apply some conditional CSS to *only* the Surface/desktop Windows 8. Look at\n// our Getting Started page for more information on this bug.\n//\n// For more information, see the following:\n//\n// Issue: https://github.com/twbs/bootstrap/issues/10497\n// Docs: http://getbootstrap.com/getting-started/#support-ie10-width\n// Source: http://timkadlec.com/2013/01/windows-phone-8-and-device-width/\n// Source: http://timkadlec.com/2012/10/ie10-snap-mode-and-responsive-design/\n\n@-ms-viewport {\n width: device-width;\n}\n\n\n// Visibility utilities\n// Note: Deprecated .visible-xs, .visible-sm, .visible-md, and .visible-lg as of v3.2.0\n.visible-xs,\n.visible-sm,\n.visible-md,\n.visible-lg {\n .responsive-invisibility();\n}\n\n.visible-xs-block,\n.visible-xs-inline,\n.visible-xs-inline-block,\n.visible-sm-block,\n.visible-sm-inline,\n.visible-sm-inline-block,\n.visible-md-block,\n.visible-md-inline,\n.visible-md-inline-block,\n.visible-lg-block,\n.visible-lg-inline,\n.visible-lg-inline-block {\n display: none !important;\n}\n\n.visible-xs {\n @media (max-width: @screen-xs-max) {\n .responsive-visibility();\n }\n}\n.visible-xs-block {\n @media (max-width: @screen-xs-max) {\n display: block !important;\n }\n}\n.visible-xs-inline {\n @media (max-width: @screen-xs-max) {\n display: inline !important;\n }\n}\n.visible-xs-inline-block {\n @media (max-width: @screen-xs-max) {\n display: inline-block !important;\n }\n}\n\n.visible-sm {\n @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {\n .responsive-visibility();\n }\n}\n.visible-sm-block {\n @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {\n display: block !important;\n }\n}\n.visible-sm-inline {\n @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {\n display: inline !important;\n }\n}\n.visible-sm-inline-block {\n @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {\n display: inline-block !important;\n }\n}\n\n.visible-md {\n @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {\n .responsive-visibility();\n }\n}\n.visible-md-block {\n @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {\n display: block !important;\n }\n}\n.visible-md-inline {\n @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {\n display: inline !important;\n }\n}\n.visible-md-inline-block {\n @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {\n display: inline-block !important;\n }\n}\n\n.visible-lg {\n @media (min-width: @screen-lg-min) {\n .responsive-visibility();\n }\n}\n.visible-lg-block {\n @media (min-width: @screen-lg-min) {\n display: block !important;\n }\n}\n.visible-lg-inline {\n @media (min-width: @screen-lg-min) {\n display: inline !important;\n }\n}\n.visible-lg-inline-block {\n @media (min-width: @screen-lg-min) {\n display: inline-block !important;\n }\n}\n\n.hidden-xs {\n @media (max-width: @screen-xs-max) {\n .responsive-invisibility();\n }\n}\n.hidden-sm {\n @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {\n .responsive-invisibility();\n }\n}\n.hidden-md {\n @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {\n .responsive-invisibility();\n }\n}\n.hidden-lg {\n @media (min-width: @screen-lg-min) {\n .responsive-invisibility();\n }\n}\n\n\n// Print utilities\n//\n// Media queries are placed on the inside to be mixin-friendly.\n\n// Note: Deprecated .visible-print as of v3.2.0\n.visible-print {\n .responsive-invisibility();\n\n @media print {\n .responsive-visibility();\n }\n}\n.visible-print-block {\n display: none !important;\n\n @media print {\n display: block !important;\n }\n}\n.visible-print-inline {\n display: none !important;\n\n @media print {\n display: inline !important;\n }\n}\n.visible-print-inline-block {\n display: none !important;\n\n @media print {\n display: inline-block !important;\n }\n}\n\n.hidden-print {\n @media print {\n .responsive-invisibility();\n }\n}\n","// Responsive utilities\n\n//\n// More easily include all the states for responsive-utilities.less.\n.responsive-visibility() {\n display: block !important;\n table& { display: table; }\n tr& { display: table-row !important; }\n th&,\n td& { display: table-cell !important; }\n}\n\n.responsive-invisibility() {\n display: none !important;\n}\n"]}
\ No newline at end of file
diff --git a/llluiop/0023/MyDjango/static/bootstrap/css/bootstrap.min.css b/llluiop/0023/MyDjango/static/bootstrap/css/bootstrap.min.css
new file mode 100644
index 00000000..a9f35cee
--- /dev/null
+++ b/llluiop/0023/MyDjango/static/bootstrap/css/bootstrap.min.css
@@ -0,0 +1,5 @@
+/*!
+ * Bootstrap v3.2.0 (http://getbootstrap.com)
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ *//*! normalize.css v3.0.1 | MIT License | git.io/normalize */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:0 0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}@media print{*{color:#000!important;text-shadow:none!important;background:transparent!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100%!important}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}select{background:#fff!important}.navbar{display:none}.table td,.table th{background-color:#fff!important}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table-bordered th,.table-bordered td{border:1px solid #ddd!important}}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\2a"}.glyphicon-plus:before{content:"\2b"}.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:before,:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}input,button,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#428bca;text-decoration:none}a:hover,a:focus{color:#2a6496;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.img-responsive,.thumbnail>img,.thumbnail a>img,.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:block;width:100% \9;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;width:100% \9;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,.h1 small,.h2 small,.h3 small,.h4 small,.h5 small,.h6 small,h1 .small,h2 .small,h3 .small,h4 .small,h5 .small,h6 .small,.h1 .small,.h2 .small,.h3 .small,.h4 .small,.h5 .small,.h6 .small{font-weight:400;line-height:1;color:#777}h1,.h1,h2,.h2,h3,.h3{margin-top:20px;margin-bottom:10px}h1 small,.h1 small,h2 small,.h2 small,h3 small,.h3 small,h1 .small,.h1 .small,h2 .small,.h2 .small,h3 .small,.h3 .small{font-size:65%}h4,.h4,h5,.h5,h6,.h6{margin-top:10px;margin-bottom:10px}h4 small,.h4 small,h5 small,.h5 small,h6 small,.h6 small,h4 .small,.h4 .small,h5 .small,.h5 .small,h6 .small,.h6 .small{font-size:75%}h1,.h1{font-size:36px}h2,.h2{font-size:30px}h3,.h3{font-size:24px}h4,.h4{font-size:18px}h5,.h5{font-size:14px}h6,.h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}small,.small{font-size:85%}cite{font-style:normal}mark,.mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#428bca}a.text-primary:hover{color:#3071a9}.text-success{color:#3c763d}a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#428bca}a.bg-primary:hover{background-color:#3071a9}.bg-success{background-color:#dff0d8}a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ul,ol{margin-top:0;margin-bottom:10px}ul ul,ol ul,ul ol,ol ol{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;margin-left:-5px;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dt,dd{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote p:last-child,blockquote ul:last-child,blockquote ol:last-child{margin-bottom:0}blockquote footer,blockquote small,blockquote .small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote footer:before,blockquote small:before,blockquote .small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse footer:before,blockquote.pull-right footer:before,.blockquote-reverse small:before,blockquote.pull-right small:before,.blockquote-reverse .small:before,blockquote.pull-right .small:before{content:''}.blockquote-reverse footer:after,blockquote.pull-right footer:after,.blockquote-reverse small:after,blockquote.pull-right small:after,.blockquote-reverse .small:after,blockquote.pull-right .small:after{content:'\00A0 \2014'}blockquote:before,blockquote:after{content:""}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-xs-1,.col-sm-1,.col-md-1,.col-lg-1,.col-xs-2,.col-sm-2,.col-md-2,.col-lg-2,.col-xs-3,.col-sm-3,.col-md-3,.col-lg-3,.col-xs-4,.col-sm-4,.col-md-4,.col-lg-4,.col-xs-5,.col-sm-5,.col-md-5,.col-lg-5,.col-xs-6,.col-sm-6,.col-md-6,.col-lg-6,.col-xs-7,.col-sm-7,.col-md-7,.col-lg-7,.col-xs-8,.col-sm-8,.col-md-8,.col-lg-8,.col-xs-9,.col-sm-9,.col-md-9,.col-lg-9,.col-xs-10,.col-sm-10,.col-md-10,.col-lg-10,.col-xs-11,.col-sm-11,.col-md-11,.col-lg-11,.col-xs-12,.col-sm-12,.col-md-12,.col-lg-12{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>thead>tr>th,.table>tbody>tr>th,.table>tfoot>tr>th,.table>thead>tr>td,.table>tbody>tr>td,.table>tfoot>tr>td{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>th,.table>caption+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>td,.table>thead:first-child>tr:first-child>td{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>thead>tr>th,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>tbody>tr>td,.table-condensed>tfoot>tr>td{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>tbody>tr>td,.table-bordered>tfoot>tr>td{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>thead>tr>td{border-bottom-width:2px}.table-striped>tbody>tr:nth-child(odd)>td,.table-striped>tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}.table-hover>tbody>tr:hover>td,.table-hover>tbody>tr:hover>th{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>thead>tr>td.active,.table>tbody>tr>td.active,.table>tfoot>tr>td.active,.table>thead>tr>th.active,.table>tbody>tr>th.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>tbody>tr.active>td,.table>tfoot>tr.active>td,.table>thead>tr.active>th,.table>tbody>tr.active>th,.table>tfoot>tr.active>th{background-color:#f5f5f5}.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover,.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr.active:hover>th{background-color:#e8e8e8}.table>thead>tr>td.success,.table>tbody>tr>td.success,.table>tfoot>tr>td.success,.table>thead>tr>th.success,.table>tbody>tr>th.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>tbody>tr.success>td,.table>tfoot>tr.success>td,.table>thead>tr.success>th,.table>tbody>tr.success>th,.table>tfoot>tr.success>th{background-color:#dff0d8}.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover,.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr.success:hover>th{background-color:#d0e9c6}.table>thead>tr>td.info,.table>tbody>tr>td.info,.table>tfoot>tr>td.info,.table>thead>tr>th.info,.table>tbody>tr>th.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>tbody>tr.info>td,.table>tfoot>tr.info>td,.table>thead>tr.info>th,.table>tbody>tr.info>th,.table>tfoot>tr.info>th{background-color:#d9edf7}.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover,.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr.info:hover>th{background-color:#c4e3f3}.table>thead>tr>td.warning,.table>tbody>tr>td.warning,.table>tfoot>tr>td.warning,.table>thead>tr>th.warning,.table>tbody>tr>th.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>tbody>tr.warning>td,.table>tfoot>tr.warning>td,.table>thead>tr.warning>th,.table>tbody>tr.warning>th,.table>tfoot>tr.warning>th{background-color:#fcf8e3}.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover,.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr.warning:hover>th{background-color:#faf2cc}.table>thead>tr>td.danger,.table>tbody>tr>td.danger,.table>tfoot>tr>td.danger,.table>thead>tr>th.danger,.table>tbody>tr>th.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>tbody>tr.danger>td,.table>tfoot>tr.danger>td,.table>thead>tr.danger>th,.table>tbody>tr.danger>th,.table>tfoot>tr.danger>th{background-color:#f2dede}.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover,.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr.danger:hover>th{background-color:#ebcccc}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>thead>tr>th,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tfoot>tr>td{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>thead>tr>th:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.table-responsive>.table-bordered>thead>tr>th:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>th,.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>td{border-bottom:0}}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=radio],input[type=checkbox]{margin:4px 0 0;margin-top:1px \9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=radio]:focus,input[type=checkbox]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#777;opacity:1}.form-control:-ms-input-placeholder{color:#777}.form-control::-webkit-input-placeholder{color:#777}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{cursor:not-allowed;background-color:#eee;opacity:1}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}input[type=date],input[type=time],input[type=datetime-local],input[type=month]{line-height:34px;line-height:1.42857143 \0}input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{line-height:30px}input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{line-height:46px}.form-group{margin-bottom:15px}.radio,.checkbox{position:relative;display:block;min-height:20px;margin-top:10px;margin-bottom:10px}.radio label,.checkbox label{padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.radio input[type=radio],.radio-inline input[type=radio],.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox]{position:absolute;margin-top:4px \9;margin-left:-20px}.radio+.radio,.checkbox+.checkbox{margin-top:-5px}.radio-inline,.checkbox-inline{display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.radio-inline+.radio-inline,.checkbox-inline+.checkbox-inline{margin-top:0;margin-left:10px}input[type=radio][disabled],input[type=checkbox][disabled],input[type=radio].disabled,input[type=checkbox].disabled,fieldset[disabled] input[type=radio],fieldset[disabled] input[type=checkbox]{cursor:not-allowed}.radio-inline.disabled,.checkbox-inline.disabled,fieldset[disabled] .radio-inline,fieldset[disabled] .checkbox-inline{cursor:not-allowed}.radio.disabled label,.checkbox.disabled label,fieldset[disabled] .radio label,fieldset[disabled] .checkbox label{cursor:not-allowed}.form-control-static{padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm,.form-horizontal .form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}textarea.input-sm,select[multiple].input-sm{height:auto}.input-lg,.form-horizontal .form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-lg{height:46px;line-height:46px}textarea.input-lg,select[multiple].input-lg{height:auto}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:25px;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center}.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .help-block,.has-success .control-label,.has-success .radio,.has-success .checkbox,.has-success .radio-inline,.has-success .checkbox-inline{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .help-block,.has-warning .control-label,.has-warning .radio,.has-warning .checkbox,.has-warning .radio-inline,.has-warning .checkbox-inline{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .help-block,.has-error .control-label,.has-error .radio,.has-error .checkbox,.has-error .radio-inline,.has-error .checkbox-inline{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn,.form-inline .input-group .form-control{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .radio,.form-inline .checkbox{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .radio label,.form-inline .checkbox label{padding-left:0}.form-inline .radio input[type=radio],.form-inline .checkbox input[type=checkbox]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .radio,.form-horizontal .checkbox,.form-horizontal .radio-inline,.form-horizontal .checkbox-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .radio,.form-horizontal .checkbox{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{top:0;right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:14.3px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn:focus,.btn:active:focus,.btn.active:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn:hover,.btn:focus{color:#333;text-decoration:none}.btn:active,.btn.active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{pointer-events:none;cursor:not-allowed;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none;opacity:.65}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default:hover,.btn-default:focus,.btn-default:active,.btn-default.active,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default:active,.btn-default.active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled,.btn-default[disabled],fieldset[disabled] .btn-default,.btn-default.disabled:hover,.btn-default[disabled]:hover,fieldset[disabled] .btn-default:hover,.btn-default.disabled:focus,.btn-default[disabled]:focus,fieldset[disabled] .btn-default:focus,.btn-default.disabled:active,.btn-default[disabled]:active,fieldset[disabled] .btn-default:active,.btn-default.disabled.active,.btn-default[disabled].active,fieldset[disabled] .btn-default.active{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#428bca;border-color:#357ebd}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#3071a9;border-color:#285e8e}.btn-primary:active,.btn-primary.active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled,.btn-primary[disabled],fieldset[disabled] .btn-primary,.btn-primary.disabled:hover,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary:hover,.btn-primary.disabled:focus,.btn-primary[disabled]:focus,fieldset[disabled] .btn-primary:focus,.btn-primary.disabled:active,.btn-primary[disabled]:active,fieldset[disabled] .btn-primary:active,.btn-primary.disabled.active,.btn-primary[disabled].active,fieldset[disabled] .btn-primary.active{background-color:#428bca;border-color:#357ebd}.btn-primary .badge{color:#428bca;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success:hover,.btn-success:focus,.btn-success:active,.btn-success.active,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success:active,.btn-success.active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled,.btn-success[disabled],fieldset[disabled] .btn-success,.btn-success.disabled:hover,.btn-success[disabled]:hover,fieldset[disabled] .btn-success:hover,.btn-success.disabled:focus,.btn-success[disabled]:focus,fieldset[disabled] .btn-success:focus,.btn-success.disabled:active,.btn-success[disabled]:active,fieldset[disabled] .btn-success:active,.btn-success.disabled.active,.btn-success[disabled].active,fieldset[disabled] .btn-success.active{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info:hover,.btn-info:focus,.btn-info:active,.btn-info.active,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info:active,.btn-info.active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled,.btn-info[disabled],fieldset[disabled] .btn-info,.btn-info.disabled:hover,.btn-info[disabled]:hover,fieldset[disabled] .btn-info:hover,.btn-info.disabled:focus,.btn-info[disabled]:focus,fieldset[disabled] .btn-info:focus,.btn-info.disabled:active,.btn-info[disabled]:active,fieldset[disabled] .btn-info:active,.btn-info.disabled.active,.btn-info[disabled].active,fieldset[disabled] .btn-info.active{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning:hover,.btn-warning:focus,.btn-warning:active,.btn-warning.active,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning:active,.btn-warning.active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled,.btn-warning[disabled],fieldset[disabled] .btn-warning,.btn-warning.disabled:hover,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning:hover,.btn-warning.disabled:focus,.btn-warning[disabled]:focus,fieldset[disabled] .btn-warning:focus,.btn-warning.disabled:active,.btn-warning[disabled]:active,fieldset[disabled] .btn-warning:active,.btn-warning.disabled.active,.btn-warning[disabled].active,fieldset[disabled] .btn-warning.active{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger:hover,.btn-danger:focus,.btn-danger:active,.btn-danger.active,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger:active,.btn-danger.active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled,.btn-danger[disabled],fieldset[disabled] .btn-danger,.btn-danger.disabled:hover,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger:hover,.btn-danger.disabled:focus,.btn-danger[disabled]:focus,fieldset[disabled] .btn-danger:focus,.btn-danger.disabled:active,.btn-danger[disabled]:active,fieldset[disabled] .btn-danger:active,.btn-danger.disabled.active,.btn-danger[disabled].active,fieldset[disabled] .btn-danger.active{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#428bca;cursor:pointer;border-radius:0}.btn-link,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:hover,.btn-link:focus,.btn-link:active{border-color:transparent}.btn-link:hover,.btn-link:focus{color:#2a6496;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,fieldset[disabled] .btn-link:hover,.btn-link[disabled]:focus,fieldset[disabled] .btn-link:focus{color:#777;text-decoration:none}.btn-lg,.btn-group-lg>.btn{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.btn-sm,.btn-group-sm>.btn{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-xs,.btn-group-xs>.btn{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=submit].btn-block,input[type=reset].btn-block,input[type=button].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;-o-transition:height .35s ease;transition:height .35s ease}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px solid;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#fff;text-decoration:none;background-color:#428bca;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#777}.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px solid}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group>.btn,.btn-group-vertical>.btn{position:relative;float:left}.btn-group>.btn:hover,.btn-group-vertical>.btn:hover,.btn-group>.btn:focus,.btn-group-vertical>.btn:focus,.btn-group>.btn:active,.btn-group-vertical>.btn:active,.btn-group>.btn.active,.btn-group-vertical>.btn.active{z-index:2}.btn-group>.btn:focus,.btn-group-vertical>.btn:focus{outline:0}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child>.btn:last-child,.btn-group>.btn-group:first-child>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn>input[type=radio],[data-toggle=buttons]>.btn>input[type=checkbox]{position:absolute;z-index:-1;filter:alpha(opacity=0);opacity:0}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn,select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn,select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn{height:auto}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=radio],.input-group-addon input[type=checkbox]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group-btn:last-child>.btn-group:not(:last-child)>.btn{border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:first-child>.btn-group:not(:first-child)>.btn{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:hover,.input-group-btn>.btn:focus,.input-group-btn>.btn:active{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:hover,.nav>li>a:focus{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:hover,.nav>li.disabled>a:focus{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:hover,.nav .open>a:focus{background-color:#eee;border-color:#428bca}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:hover,.nav-tabs>li.active>a:focus{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:hover,.nav-pills>li.active>a:focus{color:#fff;background-color:#428bca}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{max-height:340px}@media (max-width:480px) and (orientation:landscape){.navbar-fixed-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{max-height:200px}}.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030;-webkit-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}@media (min-width:768px){.navbar-fixed-top,.navbar-fixed-bottom{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:hover,.navbar-brand:focus{text-decoration:none}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-nav .open .dropdown-menu>li>a,.navbar-nav .open .dropdown-menu .dropdown-header{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:hover,.navbar-nav .open .dropdown-menu>li>a:focus{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}.navbar-nav.navbar-right:last-child{margin-right:-15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important}}.navbar-form{padding:10px 15px;margin-top:8px;margin-right:-15px;margin-bottom:8px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn,.navbar-form .input-group .form-control{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .radio,.navbar-form .checkbox{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .radio label,.navbar-form .checkbox label{padding-left:0}.navbar-form .radio input[type=radio],.navbar-form .checkbox input[type=checkbox]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-form.navbar-right:last-child{margin-right:-15px}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}.navbar-text.navbar-right:last-child{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:hover,.navbar-default .navbar-brand:focus{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:hover,.navbar-default .navbar-nav>li>a:focus{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:hover,.navbar-default .navbar-nav>.active>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:hover,.navbar-default .navbar-nav>.disabled>a:focus{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:hover,.navbar-default .navbar-toggle:focus{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:hover,.navbar-default .navbar-nav>.open>a:focus{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:hover,.navbar-default .btn-link:focus{color:#333}.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:hover,.navbar-default .btn-link[disabled]:focus,fieldset[disabled] .navbar-default .btn-link:focus{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#777}.navbar-inverse .navbar-brand:hover,.navbar-inverse .navbar-brand:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#777}.navbar-inverse .navbar-nav>li>a{color:#777}.navbar-inverse .navbar-nav>li>a:hover,.navbar-inverse .navbar-nav>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:hover,.navbar-inverse .navbar-nav>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:hover,.navbar-inverse .navbar-nav>.disabled>a:focus{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:hover,.navbar-inverse .navbar-toggle:focus{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:hover,.navbar-inverse .navbar-nav>.open>a:focus{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#777}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#777}.navbar-inverse .btn-link:hover,.navbar-inverse .btn-link:focus{color:#fff}.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:hover,.navbar-inverse .btn-link[disabled]:focus,fieldset[disabled] .navbar-inverse .btn-link:focus{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#428bca;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:hover,.pagination>li>span:hover,.pagination>li>a:focus,.pagination>li>span:focus{color:#2a6496;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>span,.pagination>.active>a:hover,.pagination>.active>span:hover,.pagination>.active>a:focus,.pagination>.active>span:focus{z-index:2;color:#fff;cursor:default;background-color:#428bca;border-color:#428bca}.pagination>.disabled>span,.pagination>.disabled>span:hover,.pagination>.disabled>span:focus,.pagination>.disabled>a,.pagination>.disabled>a:hover,.pagination>.disabled>a:focus{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:hover,.pager li>a:focus{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:hover,a.label:focus{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:hover,.label-default[href]:focus{background-color:#5e5e5e}.label-primary{background-color:#428bca}.label-primary[href]:hover,.label-primary[href]:focus{background-color:#3071a9}.label-success{background-color:#5cb85c}.label-success[href]:hover,.label-success[href]:focus{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:hover,.label-info[href]:focus{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:hover,.label-warning[href]:focus{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:hover,.label-danger[href]:focus{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-xs .badge{top:0;padding:1px 5px}a.badge:hover,a.badge:focus{color:#fff;text-decoration:none;cursor:pointer}a.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#428bca;background-color:#fff}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding:30px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron h1,.jumbotron .h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron{border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron{padding-right:60px;padding-left:60px}.jumbotron h1,.jumbotron .h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.thumbnail>img,.thumbnail a>img{margin-right:auto;margin-left:auto}a.thumbnail:hover,a.thumbnail:focus,a.thumbnail.active{border-color:#428bca}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#428bca;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-striped .progress-bar,.progress-bar-striped{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;background-size:40px 40px}.progress.active .progress-bar,.progress-bar.active{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar[aria-valuenow="1"],.progress-bar[aria-valuenow="2"]{min-width:30px}.progress-bar[aria-valuenow="0"]{min-width:30px;color:#777;background-color:transparent;background-image:none;-webkit-box-shadow:none;box-shadow:none}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media,.media-body{overflow:hidden;zoom:1}.media,.media .media{margin-top:15px}.media:first-child{margin-top:0}.media-object{display:block}.media-heading{margin:0 0 5px}.media>.pull-left{margin-right:10px}.media>.pull-right{margin-left:10px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}a.list-group-item{color:#555}a.list-group-item .list-group-item-heading{color:#333}a.list-group-item:hover,a.list-group-item:focus{color:#555;text-decoration:none;background-color:#f5f5f5}.list-group-item.disabled,.list-group-item.disabled:hover,.list-group-item.disabled:focus{color:#777;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:hover,.list-group-item.active:focus{z-index:2;color:#fff;background-color:#428bca;border-color:#428bca}.list-group-item.active .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>.small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:hover .list-group-item-text,.list-group-item.active:focus .list-group-item-text{color:#e1edf7}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:hover,a.list-group-item-success:focus{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:hover,a.list-group-item-success.active:focus{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:hover,a.list-group-item-info:focus{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:hover,a.list-group-item-info.active:focus{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:hover,a.list-group-item-warning:focus{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:hover,a.list-group-item-warning.active:focus{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:hover,a.list-group-item-danger:focus{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:hover,a.list-group-item-danger.active:focus{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group{margin-bottom:0}.panel>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.table,.panel>.table-responsive>.table,.panel>.panel-collapse>.table{margin-bottom:0}.panel>.table:first-child,.panel>.table-responsive:first-child>.table:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table:last-child,.panel>.table-responsive:last-child>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child th,.panel>.table>tbody:first-child>tr:first-child td{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#428bca}.panel-primary>.panel-heading{color:#fff;background-color:#428bca;border-color:#428bca}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#428bca}.panel-primary>.panel-heading .badge{color:#428bca;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#428bca}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive iframe,.embed-responsive embed,.embed-responsive object{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;overflow:hidden;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translate3d(0,-25%,0);-o-transform:translate3d(0,-25%,0);transform:translate3d(0,-25%,0)}.modal.in .modal-dialog{-webkit-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{min-height:16.43px;padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-size:12px;line-height:1.4;visibility:visible;filter:alpha(opacity=0);opacity:0}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{bottom:0;left:5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{right:5px;bottom:0;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;left:5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;right:5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;text-align:left;white-space:normal;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2)}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;font-weight:400;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>img,.carousel-inner>.item>a>img{line-height:1}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x}.carousel-control:hover,.carousel-control:focus{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .icon-prev,.carousel-control .icon-next,.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right{position:absolute;top:50%;z-index:5;display:inline-block}.carousel-control .icon-prev,.carousel-control .glyphicon-chevron-left{left:50%;margin-left:-10px}.carousel-control .icon-next,.carousel-control .glyphicon-chevron-right{right:50%;margin-right:-10px}.carousel-control .icon-prev,.carousel-control .icon-next{width:20px;height:20px;margin-top:-10px;font-family:serif}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000 \9;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-prev,.carousel-control .icon-next{width:30px;height:30px;margin-top:-15px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-15px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-15px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.clearfix:before,.clearfix:after,.dl-horizontal dd:before,.dl-horizontal dd:after,.container:before,.container:after,.container-fluid:before,.container-fluid:after,.row:before,.row:after,.form-horizontal .form-group:before,.form-horizontal .form-group:after,.btn-toolbar:before,.btn-toolbar:after,.btn-group-vertical>.btn-group:before,.btn-group-vertical>.btn-group:after,.nav:before,.nav:after,.navbar:before,.navbar:after,.navbar-header:before,.navbar-header:after,.navbar-collapse:before,.navbar-collapse:after,.pager:before,.pager:after,.panel-body:before,.panel-body:after,.modal-footer:before,.modal-footer:after{display:table;content:" "}.clearfix:after,.dl-horizontal dd:after,.container:after,.container-fluid:after,.row:after,.form-horizontal .form-group:after,.btn-toolbar:after,.btn-group-vertical>.btn-group:after,.nav:after,.navbar:after,.navbar-header:after,.navbar-collapse:after,.pager:after,.panel-body:after,.modal-footer:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important;visibility:hidden!important}.affix{position:fixed;-webkit-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}@-ms-viewport{width:device-width}.visible-xs,.visible-sm,.visible-md,.visible-lg{display:none!important}.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table}tr.visible-xs{display:table-row!important}th.visible-xs,td.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table}tr.visible-sm{display:table-row!important}th.visible-sm,td.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table}tr.visible-md{display:table-row!important}th.visible-md,td.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table}tr.visible-lg{display:table-row!important}th.visible-lg,td.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table}tr.visible-print{display:table-row!important}th.visible-print,td.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}}
\ No newline at end of file
diff --git a/llluiop/0023/MyDjango/static/bootstrap/css/starter-template.css b/llluiop/0023/MyDjango/static/bootstrap/css/starter-template.css
new file mode 100644
index 00000000..0691eab9
--- /dev/null
+++ b/llluiop/0023/MyDjango/static/bootstrap/css/starter-template.css
@@ -0,0 +1,7 @@
+body {
+ padding-top: 50px;
+}
+.starter-template {
+ padding: 40px 15px;
+ text-align: center;
+}
\ No newline at end of file
diff --git a/llluiop/0023/MyDjango/static/bootstrap/fonts/glyphicons-halflings-regular.eot b/llluiop/0023/MyDjango/static/bootstrap/fonts/glyphicons-halflings-regular.eot
new file mode 100644
index 00000000..4a4ca865
Binary files /dev/null and b/llluiop/0023/MyDjango/static/bootstrap/fonts/glyphicons-halflings-regular.eot differ
diff --git a/llluiop/0023/MyDjango/static/bootstrap/fonts/glyphicons-halflings-regular.svg b/llluiop/0023/MyDjango/static/bootstrap/fonts/glyphicons-halflings-regular.svg
new file mode 100644
index 00000000..e3e2dc73
--- /dev/null
+++ b/llluiop/0023/MyDjango/static/bootstrap/fonts/glyphicons-halflings-regular.svg
@@ -0,0 +1,229 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/llluiop/0023/MyDjango/static/bootstrap/fonts/glyphicons-halflings-regular.ttf b/llluiop/0023/MyDjango/static/bootstrap/fonts/glyphicons-halflings-regular.ttf
new file mode 100644
index 00000000..67fa00bf
Binary files /dev/null and b/llluiop/0023/MyDjango/static/bootstrap/fonts/glyphicons-halflings-regular.ttf differ
diff --git a/llluiop/0023/MyDjango/static/bootstrap/fonts/glyphicons-halflings-regular.woff b/llluiop/0023/MyDjango/static/bootstrap/fonts/glyphicons-halflings-regular.woff
new file mode 100644
index 00000000..8c54182a
Binary files /dev/null and b/llluiop/0023/MyDjango/static/bootstrap/fonts/glyphicons-halflings-regular.woff differ
diff --git a/llluiop/0023/MyDjango/static/bootstrap/js/bootstrap.js b/llluiop/0023/MyDjango/static/bootstrap/js/bootstrap.js
new file mode 100644
index 00000000..53da1c77
--- /dev/null
+++ b/llluiop/0023/MyDjango/static/bootstrap/js/bootstrap.js
@@ -0,0 +1,2114 @@
+/*!
+ * Bootstrap v3.2.0 (http://getbootstrap.com)
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ */
+
+if (typeof jQuery === 'undefined') { throw new Error('Bootstrap\'s JavaScript requires jQuery') }
+
+/* ========================================================================
+ * Bootstrap: transition.js v3.2.0
+ * http://getbootstrap.com/javascript/#transitions
+ * ========================================================================
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+ 'use strict';
+
+ // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
+ // ============================================================
+
+ function transitionEnd() {
+ var el = document.createElement('bootstrap')
+
+ var transEndEventNames = {
+ WebkitTransition : 'webkitTransitionEnd',
+ MozTransition : 'transitionend',
+ OTransition : 'oTransitionEnd otransitionend',
+ transition : 'transitionend'
+ }
+
+ for (var name in transEndEventNames) {
+ if (el.style[name] !== undefined) {
+ return { end: transEndEventNames[name] }
+ }
+ }
+
+ return false // explicit for ie8 ( ._.)
+ }
+
+ // http://blog.alexmaccaw.com/css-transitions
+ $.fn.emulateTransitionEnd = function (duration) {
+ var called = false
+ var $el = this
+ $(this).one('bsTransitionEnd', function () { called = true })
+ var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
+ setTimeout(callback, duration)
+ return this
+ }
+
+ $(function () {
+ $.support.transition = transitionEnd()
+
+ if (!$.support.transition) return
+
+ $.event.special.bsTransitionEnd = {
+ bindType: $.support.transition.end,
+ delegateType: $.support.transition.end,
+ handle: function (e) {
+ if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)
+ }
+ }
+ })
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: alert.js v3.2.0
+ * http://getbootstrap.com/javascript/#alerts
+ * ========================================================================
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+ 'use strict';
+
+ // ALERT CLASS DEFINITION
+ // ======================
+
+ var dismiss = '[data-dismiss="alert"]'
+ var Alert = function (el) {
+ $(el).on('click', dismiss, this.close)
+ }
+
+ Alert.VERSION = '3.2.0'
+
+ Alert.prototype.close = function (e) {
+ var $this = $(this)
+ var selector = $this.attr('data-target')
+
+ if (!selector) {
+ selector = $this.attr('href')
+ selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
+ }
+
+ var $parent = $(selector)
+
+ if (e) e.preventDefault()
+
+ if (!$parent.length) {
+ $parent = $this.hasClass('alert') ? $this : $this.parent()
+ }
+
+ $parent.trigger(e = $.Event('close.bs.alert'))
+
+ if (e.isDefaultPrevented()) return
+
+ $parent.removeClass('in')
+
+ function removeElement() {
+ // detach from parent, fire event then clean up data
+ $parent.detach().trigger('closed.bs.alert').remove()
+ }
+
+ $.support.transition && $parent.hasClass('fade') ?
+ $parent
+ .one('bsTransitionEnd', removeElement)
+ .emulateTransitionEnd(150) :
+ removeElement()
+ }
+
+
+ // ALERT PLUGIN DEFINITION
+ // =======================
+
+ function Plugin(option) {
+ return this.each(function () {
+ var $this = $(this)
+ var data = $this.data('bs.alert')
+
+ if (!data) $this.data('bs.alert', (data = new Alert(this)))
+ if (typeof option == 'string') data[option].call($this)
+ })
+ }
+
+ var old = $.fn.alert
+
+ $.fn.alert = Plugin
+ $.fn.alert.Constructor = Alert
+
+
+ // ALERT NO CONFLICT
+ // =================
+
+ $.fn.alert.noConflict = function () {
+ $.fn.alert = old
+ return this
+ }
+
+
+ // ALERT DATA-API
+ // ==============
+
+ $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: button.js v3.2.0
+ * http://getbootstrap.com/javascript/#buttons
+ * ========================================================================
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+ 'use strict';
+
+ // BUTTON PUBLIC CLASS DEFINITION
+ // ==============================
+
+ var Button = function (element, options) {
+ this.$element = $(element)
+ this.options = $.extend({}, Button.DEFAULTS, options)
+ this.isLoading = false
+ }
+
+ Button.VERSION = '3.2.0'
+
+ Button.DEFAULTS = {
+ loadingText: 'loading...'
+ }
+
+ Button.prototype.setState = function (state) {
+ var d = 'disabled'
+ var $el = this.$element
+ var val = $el.is('input') ? 'val' : 'html'
+ var data = $el.data()
+
+ state = state + 'Text'
+
+ if (data.resetText == null) $el.data('resetText', $el[val]())
+
+ $el[val](data[state] == null ? this.options[state] : data[state])
+
+ // push to event loop to allow forms to submit
+ setTimeout($.proxy(function () {
+ if (state == 'loadingText') {
+ this.isLoading = true
+ $el.addClass(d).attr(d, d)
+ } else if (this.isLoading) {
+ this.isLoading = false
+ $el.removeClass(d).removeAttr(d)
+ }
+ }, this), 0)
+ }
+
+ Button.prototype.toggle = function () {
+ var changed = true
+ var $parent = this.$element.closest('[data-toggle="buttons"]')
+
+ if ($parent.length) {
+ var $input = this.$element.find('input')
+ if ($input.prop('type') == 'radio') {
+ if ($input.prop('checked') && this.$element.hasClass('active')) changed = false
+ else $parent.find('.active').removeClass('active')
+ }
+ if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change')
+ }
+
+ if (changed) this.$element.toggleClass('active')
+ }
+
+
+ // BUTTON PLUGIN DEFINITION
+ // ========================
+
+ function Plugin(option) {
+ return this.each(function () {
+ var $this = $(this)
+ var data = $this.data('bs.button')
+ var options = typeof option == 'object' && option
+
+ if (!data) $this.data('bs.button', (data = new Button(this, options)))
+
+ if (option == 'toggle') data.toggle()
+ else if (option) data.setState(option)
+ })
+ }
+
+ var old = $.fn.button
+
+ $.fn.button = Plugin
+ $.fn.button.Constructor = Button
+
+
+ // BUTTON NO CONFLICT
+ // ==================
+
+ $.fn.button.noConflict = function () {
+ $.fn.button = old
+ return this
+ }
+
+
+ // BUTTON DATA-API
+ // ===============
+
+ $(document).on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) {
+ var $btn = $(e.target)
+ if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
+ Plugin.call($btn, 'toggle')
+ e.preventDefault()
+ })
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: carousel.js v3.2.0
+ * http://getbootstrap.com/javascript/#carousel
+ * ========================================================================
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+ 'use strict';
+
+ // CAROUSEL CLASS DEFINITION
+ // =========================
+
+ var Carousel = function (element, options) {
+ this.$element = $(element).on('keydown.bs.carousel', $.proxy(this.keydown, this))
+ this.$indicators = this.$element.find('.carousel-indicators')
+ this.options = options
+ this.paused =
+ this.sliding =
+ this.interval =
+ this.$active =
+ this.$items = null
+
+ this.options.pause == 'hover' && this.$element
+ .on('mouseenter.bs.carousel', $.proxy(this.pause, this))
+ .on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
+ }
+
+ Carousel.VERSION = '3.2.0'
+
+ Carousel.DEFAULTS = {
+ interval: 5000,
+ pause: 'hover',
+ wrap: true
+ }
+
+ Carousel.prototype.keydown = function (e) {
+ switch (e.which) {
+ case 37: this.prev(); break
+ case 39: this.next(); break
+ default: return
+ }
+
+ e.preventDefault()
+ }
+
+ Carousel.prototype.cycle = function (e) {
+ e || (this.paused = false)
+
+ this.interval && clearInterval(this.interval)
+
+ this.options.interval
+ && !this.paused
+ && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
+
+ return this
+ }
+
+ Carousel.prototype.getItemIndex = function (item) {
+ this.$items = item.parent().children('.item')
+ return this.$items.index(item || this.$active)
+ }
+
+ Carousel.prototype.to = function (pos) {
+ var that = this
+ var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active'))
+
+ if (pos > (this.$items.length - 1) || pos < 0) return
+
+ if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid"
+ if (activeIndex == pos) return this.pause().cycle()
+
+ return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos]))
+ }
+
+ Carousel.prototype.pause = function (e) {
+ e || (this.paused = true)
+
+ if (this.$element.find('.next, .prev').length && $.support.transition) {
+ this.$element.trigger($.support.transition.end)
+ this.cycle(true)
+ }
+
+ this.interval = clearInterval(this.interval)
+
+ return this
+ }
+
+ Carousel.prototype.next = function () {
+ if (this.sliding) return
+ return this.slide('next')
+ }
+
+ Carousel.prototype.prev = function () {
+ if (this.sliding) return
+ return this.slide('prev')
+ }
+
+ Carousel.prototype.slide = function (type, next) {
+ var $active = this.$element.find('.item.active')
+ var $next = next || $active[type]()
+ var isCycling = this.interval
+ var direction = type == 'next' ? 'left' : 'right'
+ var fallback = type == 'next' ? 'first' : 'last'
+ var that = this
+
+ if (!$next.length) {
+ if (!this.options.wrap) return
+ $next = this.$element.find('.item')[fallback]()
+ }
+
+ if ($next.hasClass('active')) return (this.sliding = false)
+
+ var relatedTarget = $next[0]
+ var slideEvent = $.Event('slide.bs.carousel', {
+ relatedTarget: relatedTarget,
+ direction: direction
+ })
+ this.$element.trigger(slideEvent)
+ if (slideEvent.isDefaultPrevented()) return
+
+ this.sliding = true
+
+ isCycling && this.pause()
+
+ if (this.$indicators.length) {
+ this.$indicators.find('.active').removeClass('active')
+ var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)])
+ $nextIndicator && $nextIndicator.addClass('active')
+ }
+
+ var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid"
+ if ($.support.transition && this.$element.hasClass('slide')) {
+ $next.addClass(type)
+ $next[0].offsetWidth // force reflow
+ $active.addClass(direction)
+ $next.addClass(direction)
+ $active
+ .one('bsTransitionEnd', function () {
+ $next.removeClass([type, direction].join(' ')).addClass('active')
+ $active.removeClass(['active', direction].join(' '))
+ that.sliding = false
+ setTimeout(function () {
+ that.$element.trigger(slidEvent)
+ }, 0)
+ })
+ .emulateTransitionEnd($active.css('transition-duration').slice(0, -1) * 1000)
+ } else {
+ $active.removeClass('active')
+ $next.addClass('active')
+ this.sliding = false
+ this.$element.trigger(slidEvent)
+ }
+
+ isCycling && this.cycle()
+
+ return this
+ }
+
+
+ // CAROUSEL PLUGIN DEFINITION
+ // ==========================
+
+ function Plugin(option) {
+ return this.each(function () {
+ var $this = $(this)
+ var data = $this.data('bs.carousel')
+ var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)
+ var action = typeof option == 'string' ? option : options.slide
+
+ if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))
+ if (typeof option == 'number') data.to(option)
+ else if (action) data[action]()
+ else if (options.interval) data.pause().cycle()
+ })
+ }
+
+ var old = $.fn.carousel
+
+ $.fn.carousel = Plugin
+ $.fn.carousel.Constructor = Carousel
+
+
+ // CAROUSEL NO CONFLICT
+ // ====================
+
+ $.fn.carousel.noConflict = function () {
+ $.fn.carousel = old
+ return this
+ }
+
+
+ // CAROUSEL DATA-API
+ // =================
+
+ $(document).on('click.bs.carousel.data-api', '[data-slide], [data-slide-to]', function (e) {
+ var href
+ var $this = $(this)
+ var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7
+ if (!$target.hasClass('carousel')) return
+ var options = $.extend({}, $target.data(), $this.data())
+ var slideIndex = $this.attr('data-slide-to')
+ if (slideIndex) options.interval = false
+
+ Plugin.call($target, options)
+
+ if (slideIndex) {
+ $target.data('bs.carousel').to(slideIndex)
+ }
+
+ e.preventDefault()
+ })
+
+ $(window).on('load', function () {
+ $('[data-ride="carousel"]').each(function () {
+ var $carousel = $(this)
+ Plugin.call($carousel, $carousel.data())
+ })
+ })
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: collapse.js v3.2.0
+ * http://getbootstrap.com/javascript/#collapse
+ * ========================================================================
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+ 'use strict';
+
+ // COLLAPSE PUBLIC CLASS DEFINITION
+ // ================================
+
+ var Collapse = function (element, options) {
+ this.$element = $(element)
+ this.options = $.extend({}, Collapse.DEFAULTS, options)
+ this.transitioning = null
+
+ if (this.options.parent) this.$parent = $(this.options.parent)
+ if (this.options.toggle) this.toggle()
+ }
+
+ Collapse.VERSION = '3.2.0'
+
+ Collapse.DEFAULTS = {
+ toggle: true
+ }
+
+ Collapse.prototype.dimension = function () {
+ var hasWidth = this.$element.hasClass('width')
+ return hasWidth ? 'width' : 'height'
+ }
+
+ Collapse.prototype.show = function () {
+ if (this.transitioning || this.$element.hasClass('in')) return
+
+ var startEvent = $.Event('show.bs.collapse')
+ this.$element.trigger(startEvent)
+ if (startEvent.isDefaultPrevented()) return
+
+ var actives = this.$parent && this.$parent.find('> .panel > .in')
+
+ if (actives && actives.length) {
+ var hasData = actives.data('bs.collapse')
+ if (hasData && hasData.transitioning) return
+ Plugin.call(actives, 'hide')
+ hasData || actives.data('bs.collapse', null)
+ }
+
+ var dimension = this.dimension()
+
+ this.$element
+ .removeClass('collapse')
+ .addClass('collapsing')[dimension](0)
+
+ this.transitioning = 1
+
+ var complete = function () {
+ this.$element
+ .removeClass('collapsing')
+ .addClass('collapse in')[dimension]('')
+ this.transitioning = 0
+ this.$element
+ .trigger('shown.bs.collapse')
+ }
+
+ if (!$.support.transition) return complete.call(this)
+
+ var scrollSize = $.camelCase(['scroll', dimension].join('-'))
+
+ this.$element
+ .one('bsTransitionEnd', $.proxy(complete, this))
+ .emulateTransitionEnd(350)[dimension](this.$element[0][scrollSize])
+ }
+
+ Collapse.prototype.hide = function () {
+ if (this.transitioning || !this.$element.hasClass('in')) return
+
+ var startEvent = $.Event('hide.bs.collapse')
+ this.$element.trigger(startEvent)
+ if (startEvent.isDefaultPrevented()) return
+
+ var dimension = this.dimension()
+
+ this.$element[dimension](this.$element[dimension]())[0].offsetHeight
+
+ this.$element
+ .addClass('collapsing')
+ .removeClass('collapse')
+ .removeClass('in')
+
+ this.transitioning = 1
+
+ var complete = function () {
+ this.transitioning = 0
+ this.$element
+ .trigger('hidden.bs.collapse')
+ .removeClass('collapsing')
+ .addClass('collapse')
+ }
+
+ if (!$.support.transition) return complete.call(this)
+
+ this.$element
+ [dimension](0)
+ .one('bsTransitionEnd', $.proxy(complete, this))
+ .emulateTransitionEnd(350)
+ }
+
+ Collapse.prototype.toggle = function () {
+ this[this.$element.hasClass('in') ? 'hide' : 'show']()
+ }
+
+
+ // COLLAPSE PLUGIN DEFINITION
+ // ==========================
+
+ function Plugin(option) {
+ return this.each(function () {
+ var $this = $(this)
+ var data = $this.data('bs.collapse')
+ var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
+
+ if (!data && options.toggle && option == 'show') option = !option
+ if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
+ if (typeof option == 'string') data[option]()
+ })
+ }
+
+ var old = $.fn.collapse
+
+ $.fn.collapse = Plugin
+ $.fn.collapse.Constructor = Collapse
+
+
+ // COLLAPSE NO CONFLICT
+ // ====================
+
+ $.fn.collapse.noConflict = function () {
+ $.fn.collapse = old
+ return this
+ }
+
+
+ // COLLAPSE DATA-API
+ // =================
+
+ $(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) {
+ var href
+ var $this = $(this)
+ var target = $this.attr('data-target')
+ || e.preventDefault()
+ || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
+ var $target = $(target)
+ var data = $target.data('bs.collapse')
+ var option = data ? 'toggle' : $this.data()
+ var parent = $this.attr('data-parent')
+ var $parent = parent && $(parent)
+
+ if (!data || !data.transitioning) {
+ if ($parent) $parent.find('[data-toggle="collapse"][data-parent="' + parent + '"]').not($this).addClass('collapsed')
+ $this[$target.hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
+ }
+
+ Plugin.call($target, option)
+ })
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: dropdown.js v3.2.0
+ * http://getbootstrap.com/javascript/#dropdowns
+ * ========================================================================
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+ 'use strict';
+
+ // DROPDOWN CLASS DEFINITION
+ // =========================
+
+ var backdrop = '.dropdown-backdrop'
+ var toggle = '[data-toggle="dropdown"]'
+ var Dropdown = function (element) {
+ $(element).on('click.bs.dropdown', this.toggle)
+ }
+
+ Dropdown.VERSION = '3.2.0'
+
+ Dropdown.prototype.toggle = function (e) {
+ var $this = $(this)
+
+ if ($this.is('.disabled, :disabled')) return
+
+ var $parent = getParent($this)
+ var isActive = $parent.hasClass('open')
+
+ clearMenus()
+
+ if (!isActive) {
+ if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
+ // if mobile we use a backdrop because click events don't delegate
+ $('
').insertAfter($(this)).on('click', clearMenus)
+ }
+
+ var relatedTarget = { relatedTarget: this }
+ $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget))
+
+ if (e.isDefaultPrevented()) return
+
+ $this.trigger('focus')
+
+ $parent
+ .toggleClass('open')
+ .trigger('shown.bs.dropdown', relatedTarget)
+ }
+
+ return false
+ }
+
+ Dropdown.prototype.keydown = function (e) {
+ if (!/(38|40|27)/.test(e.keyCode)) return
+
+ var $this = $(this)
+
+ e.preventDefault()
+ e.stopPropagation()
+
+ if ($this.is('.disabled, :disabled')) return
+
+ var $parent = getParent($this)
+ var isActive = $parent.hasClass('open')
+
+ if (!isActive || (isActive && e.keyCode == 27)) {
+ if (e.which == 27) $parent.find(toggle).trigger('focus')
+ return $this.trigger('click')
+ }
+
+ var desc = ' li:not(.divider):visible a'
+ var $items = $parent.find('[role="menu"]' + desc + ', [role="listbox"]' + desc)
+
+ if (!$items.length) return
+
+ var index = $items.index($items.filter(':focus'))
+
+ if (e.keyCode == 38 && index > 0) index-- // up
+ if (e.keyCode == 40 && index < $items.length - 1) index++ // down
+ if (!~index) index = 0
+
+ $items.eq(index).trigger('focus')
+ }
+
+ function clearMenus(e) {
+ if (e && e.which === 3) return
+ $(backdrop).remove()
+ $(toggle).each(function () {
+ var $parent = getParent($(this))
+ var relatedTarget = { relatedTarget: this }
+ if (!$parent.hasClass('open')) return
+ $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
+ if (e.isDefaultPrevented()) return
+ $parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget)
+ })
+ }
+
+ function getParent($this) {
+ var selector = $this.attr('data-target')
+
+ if (!selector) {
+ selector = $this.attr('href')
+ selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
+ }
+
+ var $parent = selector && $(selector)
+
+ return $parent && $parent.length ? $parent : $this.parent()
+ }
+
+
+ // DROPDOWN PLUGIN DEFINITION
+ // ==========================
+
+ function Plugin(option) {
+ return this.each(function () {
+ var $this = $(this)
+ var data = $this.data('bs.dropdown')
+
+ if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))
+ if (typeof option == 'string') data[option].call($this)
+ })
+ }
+
+ var old = $.fn.dropdown
+
+ $.fn.dropdown = Plugin
+ $.fn.dropdown.Constructor = Dropdown
+
+
+ // DROPDOWN NO CONFLICT
+ // ====================
+
+ $.fn.dropdown.noConflict = function () {
+ $.fn.dropdown = old
+ return this
+ }
+
+
+ // APPLY TO STANDARD DROPDOWN ELEMENTS
+ // ===================================
+
+ $(document)
+ .on('click.bs.dropdown.data-api', clearMenus)
+ .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
+ .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
+ .on('keydown.bs.dropdown.data-api', toggle + ', [role="menu"], [role="listbox"]', Dropdown.prototype.keydown)
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: modal.js v3.2.0
+ * http://getbootstrap.com/javascript/#modals
+ * ========================================================================
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+ 'use strict';
+
+ // MODAL CLASS DEFINITION
+ // ======================
+
+ var Modal = function (element, options) {
+ this.options = options
+ this.$body = $(document.body)
+ this.$element = $(element)
+ this.$backdrop =
+ this.isShown = null
+ this.scrollbarWidth = 0
+
+ if (this.options.remote) {
+ this.$element
+ .find('.modal-content')
+ .load(this.options.remote, $.proxy(function () {
+ this.$element.trigger('loaded.bs.modal')
+ }, this))
+ }
+ }
+
+ Modal.VERSION = '3.2.0'
+
+ Modal.DEFAULTS = {
+ backdrop: true,
+ keyboard: true,
+ show: true
+ }
+
+ Modal.prototype.toggle = function (_relatedTarget) {
+ return this.isShown ? this.hide() : this.show(_relatedTarget)
+ }
+
+ Modal.prototype.show = function (_relatedTarget) {
+ var that = this
+ var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
+
+ this.$element.trigger(e)
+
+ if (this.isShown || e.isDefaultPrevented()) return
+
+ this.isShown = true
+
+ this.checkScrollbar()
+ this.$body.addClass('modal-open')
+
+ this.setScrollbar()
+ this.escape()
+
+ this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
+
+ this.backdrop(function () {
+ var transition = $.support.transition && that.$element.hasClass('fade')
+
+ if (!that.$element.parent().length) {
+ that.$element.appendTo(that.$body) // don't move modals dom position
+ }
+
+ that.$element
+ .show()
+ .scrollTop(0)
+
+ if (transition) {
+ that.$element[0].offsetWidth // force reflow
+ }
+
+ that.$element
+ .addClass('in')
+ .attr('aria-hidden', false)
+
+ that.enforceFocus()
+
+ var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })
+
+ transition ?
+ that.$element.find('.modal-dialog') // wait for modal to slide in
+ .one('bsTransitionEnd', function () {
+ that.$element.trigger('focus').trigger(e)
+ })
+ .emulateTransitionEnd(300) :
+ that.$element.trigger('focus').trigger(e)
+ })
+ }
+
+ Modal.prototype.hide = function (e) {
+ if (e) e.preventDefault()
+
+ e = $.Event('hide.bs.modal')
+
+ this.$element.trigger(e)
+
+ if (!this.isShown || e.isDefaultPrevented()) return
+
+ this.isShown = false
+
+ this.$body.removeClass('modal-open')
+
+ this.resetScrollbar()
+ this.escape()
+
+ $(document).off('focusin.bs.modal')
+
+ this.$element
+ .removeClass('in')
+ .attr('aria-hidden', true)
+ .off('click.dismiss.bs.modal')
+
+ $.support.transition && this.$element.hasClass('fade') ?
+ this.$element
+ .one('bsTransitionEnd', $.proxy(this.hideModal, this))
+ .emulateTransitionEnd(300) :
+ this.hideModal()
+ }
+
+ Modal.prototype.enforceFocus = function () {
+ $(document)
+ .off('focusin.bs.modal') // guard against infinite focus loop
+ .on('focusin.bs.modal', $.proxy(function (e) {
+ if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {
+ this.$element.trigger('focus')
+ }
+ }, this))
+ }
+
+ Modal.prototype.escape = function () {
+ if (this.isShown && this.options.keyboard) {
+ this.$element.on('keyup.dismiss.bs.modal', $.proxy(function (e) {
+ e.which == 27 && this.hide()
+ }, this))
+ } else if (!this.isShown) {
+ this.$element.off('keyup.dismiss.bs.modal')
+ }
+ }
+
+ Modal.prototype.hideModal = function () {
+ var that = this
+ this.$element.hide()
+ this.backdrop(function () {
+ that.$element.trigger('hidden.bs.modal')
+ })
+ }
+
+ Modal.prototype.removeBackdrop = function () {
+ this.$backdrop && this.$backdrop.remove()
+ this.$backdrop = null
+ }
+
+ Modal.prototype.backdrop = function (callback) {
+ var that = this
+ var animate = this.$element.hasClass('fade') ? 'fade' : ''
+
+ if (this.isShown && this.options.backdrop) {
+ var doAnimate = $.support.transition && animate
+
+ this.$backdrop = $('
')
+ .appendTo(this.$body)
+
+ this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
+ if (e.target !== e.currentTarget) return
+ this.options.backdrop == 'static'
+ ? this.$element[0].focus.call(this.$element[0])
+ : this.hide.call(this)
+ }, this))
+
+ if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
+
+ this.$backdrop.addClass('in')
+
+ if (!callback) return
+
+ doAnimate ?
+ this.$backdrop
+ .one('bsTransitionEnd', callback)
+ .emulateTransitionEnd(150) :
+ callback()
+
+ } else if (!this.isShown && this.$backdrop) {
+ this.$backdrop.removeClass('in')
+
+ var callbackRemove = function () {
+ that.removeBackdrop()
+ callback && callback()
+ }
+ $.support.transition && this.$element.hasClass('fade') ?
+ this.$backdrop
+ .one('bsTransitionEnd', callbackRemove)
+ .emulateTransitionEnd(150) :
+ callbackRemove()
+
+ } else if (callback) {
+ callback()
+ }
+ }
+
+ Modal.prototype.checkScrollbar = function () {
+ if (document.body.clientWidth >= window.innerWidth) return
+ this.scrollbarWidth = this.scrollbarWidth || this.measureScrollbar()
+ }
+
+ Modal.prototype.setScrollbar = function () {
+ var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)
+ if (this.scrollbarWidth) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)
+ }
+
+ Modal.prototype.resetScrollbar = function () {
+ this.$body.css('padding-right', '')
+ }
+
+ Modal.prototype.measureScrollbar = function () { // thx walsh
+ var scrollDiv = document.createElement('div')
+ scrollDiv.className = 'modal-scrollbar-measure'
+ this.$body.append(scrollDiv)
+ var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth
+ this.$body[0].removeChild(scrollDiv)
+ return scrollbarWidth
+ }
+
+
+ // MODAL PLUGIN DEFINITION
+ // =======================
+
+ function Plugin(option, _relatedTarget) {
+ return this.each(function () {
+ var $this = $(this)
+ var data = $this.data('bs.modal')
+ var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)
+
+ if (!data) $this.data('bs.modal', (data = new Modal(this, options)))
+ if (typeof option == 'string') data[option](_relatedTarget)
+ else if (options.show) data.show(_relatedTarget)
+ })
+ }
+
+ var old = $.fn.modal
+
+ $.fn.modal = Plugin
+ $.fn.modal.Constructor = Modal
+
+
+ // MODAL NO CONFLICT
+ // =================
+
+ $.fn.modal.noConflict = function () {
+ $.fn.modal = old
+ return this
+ }
+
+
+ // MODAL DATA-API
+ // ==============
+
+ $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
+ var $this = $(this)
+ var href = $this.attr('href')
+ var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) // strip for ie7
+ var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
+
+ if ($this.is('a')) e.preventDefault()
+
+ $target.one('show.bs.modal', function (showEvent) {
+ if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown
+ $target.one('hidden.bs.modal', function () {
+ $this.is(':visible') && $this.trigger('focus')
+ })
+ })
+ Plugin.call($target, option, this)
+ })
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: tooltip.js v3.2.0
+ * http://getbootstrap.com/javascript/#tooltip
+ * Inspired by the original jQuery.tipsy by Jason Frame
+ * ========================================================================
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+ 'use strict';
+
+ // TOOLTIP PUBLIC CLASS DEFINITION
+ // ===============================
+
+ var Tooltip = function (element, options) {
+ this.type =
+ this.options =
+ this.enabled =
+ this.timeout =
+ this.hoverState =
+ this.$element = null
+
+ this.init('tooltip', element, options)
+ }
+
+ Tooltip.VERSION = '3.2.0'
+
+ Tooltip.DEFAULTS = {
+ animation: true,
+ placement: 'top',
+ selector: false,
+ template: '
',
+ trigger: 'hover focus',
+ title: '',
+ delay: 0,
+ html: false,
+ container: false,
+ viewport: {
+ selector: 'body',
+ padding: 0
+ }
+ }
+
+ Tooltip.prototype.init = function (type, element, options) {
+ this.enabled = true
+ this.type = type
+ this.$element = $(element)
+ this.options = this.getOptions(options)
+ this.$viewport = this.options.viewport && $(this.options.viewport.selector || this.options.viewport)
+
+ var triggers = this.options.trigger.split(' ')
+
+ for (var i = triggers.length; i--;) {
+ var trigger = triggers[i]
+
+ if (trigger == 'click') {
+ this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
+ } else if (trigger != 'manual') {
+ var eventIn = trigger == 'hover' ? 'mouseenter' : 'focusin'
+ var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout'
+
+ this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
+ this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
+ }
+ }
+
+ this.options.selector ?
+ (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
+ this.fixTitle()
+ }
+
+ Tooltip.prototype.getDefaults = function () {
+ return Tooltip.DEFAULTS
+ }
+
+ Tooltip.prototype.getOptions = function (options) {
+ options = $.extend({}, this.getDefaults(), this.$element.data(), options)
+
+ if (options.delay && typeof options.delay == 'number') {
+ options.delay = {
+ show: options.delay,
+ hide: options.delay
+ }
+ }
+
+ return options
+ }
+
+ Tooltip.prototype.getDelegateOptions = function () {
+ var options = {}
+ var defaults = this.getDefaults()
+
+ this._options && $.each(this._options, function (key, value) {
+ if (defaults[key] != value) options[key] = value
+ })
+
+ return options
+ }
+
+ Tooltip.prototype.enter = function (obj) {
+ var self = obj instanceof this.constructor ?
+ obj : $(obj.currentTarget).data('bs.' + this.type)
+
+ if (!self) {
+ self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
+ $(obj.currentTarget).data('bs.' + this.type, self)
+ }
+
+ clearTimeout(self.timeout)
+
+ self.hoverState = 'in'
+
+ if (!self.options.delay || !self.options.delay.show) return self.show()
+
+ self.timeout = setTimeout(function () {
+ if (self.hoverState == 'in') self.show()
+ }, self.options.delay.show)
+ }
+
+ Tooltip.prototype.leave = function (obj) {
+ var self = obj instanceof this.constructor ?
+ obj : $(obj.currentTarget).data('bs.' + this.type)
+
+ if (!self) {
+ self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
+ $(obj.currentTarget).data('bs.' + this.type, self)
+ }
+
+ clearTimeout(self.timeout)
+
+ self.hoverState = 'out'
+
+ if (!self.options.delay || !self.options.delay.hide) return self.hide()
+
+ self.timeout = setTimeout(function () {
+ if (self.hoverState == 'out') self.hide()
+ }, self.options.delay.hide)
+ }
+
+ Tooltip.prototype.show = function () {
+ var e = $.Event('show.bs.' + this.type)
+
+ if (this.hasContent() && this.enabled) {
+ this.$element.trigger(e)
+
+ var inDom = $.contains(document.documentElement, this.$element[0])
+ if (e.isDefaultPrevented() || !inDom) return
+ var that = this
+
+ var $tip = this.tip()
+
+ var tipId = this.getUID(this.type)
+
+ this.setContent()
+ $tip.attr('id', tipId)
+ this.$element.attr('aria-describedby', tipId)
+
+ if (this.options.animation) $tip.addClass('fade')
+
+ var placement = typeof this.options.placement == 'function' ?
+ this.options.placement.call(this, $tip[0], this.$element[0]) :
+ this.options.placement
+
+ var autoToken = /\s?auto?\s?/i
+ var autoPlace = autoToken.test(placement)
+ if (autoPlace) placement = placement.replace(autoToken, '') || 'top'
+
+ $tip
+ .detach()
+ .css({ top: 0, left: 0, display: 'block' })
+ .addClass(placement)
+ .data('bs.' + this.type, this)
+
+ this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
+
+ var pos = this.getPosition()
+ var actualWidth = $tip[0].offsetWidth
+ var actualHeight = $tip[0].offsetHeight
+
+ if (autoPlace) {
+ var orgPlacement = placement
+ var $parent = this.$element.parent()
+ var parentDim = this.getPosition($parent)
+
+ placement = placement == 'bottom' && pos.top + pos.height + actualHeight - parentDim.scroll > parentDim.height ? 'top' :
+ placement == 'top' && pos.top - parentDim.scroll - actualHeight < 0 ? 'bottom' :
+ placement == 'right' && pos.right + actualWidth > parentDim.width ? 'left' :
+ placement == 'left' && pos.left - actualWidth < parentDim.left ? 'right' :
+ placement
+
+ $tip
+ .removeClass(orgPlacement)
+ .addClass(placement)
+ }
+
+ var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)
+
+ this.applyPlacement(calculatedOffset, placement)
+
+ var complete = function () {
+ that.$element.trigger('shown.bs.' + that.type)
+ that.hoverState = null
+ }
+
+ $.support.transition && this.$tip.hasClass('fade') ?
+ $tip
+ .one('bsTransitionEnd', complete)
+ .emulateTransitionEnd(150) :
+ complete()
+ }
+ }
+
+ Tooltip.prototype.applyPlacement = function (offset, placement) {
+ var $tip = this.tip()
+ var width = $tip[0].offsetWidth
+ var height = $tip[0].offsetHeight
+
+ // manually read margins because getBoundingClientRect includes difference
+ var marginTop = parseInt($tip.css('margin-top'), 10)
+ var marginLeft = parseInt($tip.css('margin-left'), 10)
+
+ // we must check for NaN for ie 8/9
+ if (isNaN(marginTop)) marginTop = 0
+ if (isNaN(marginLeft)) marginLeft = 0
+
+ offset.top = offset.top + marginTop
+ offset.left = offset.left + marginLeft
+
+ // $.fn.offset doesn't round pixel values
+ // so we use setOffset directly with our own function B-0
+ $.offset.setOffset($tip[0], $.extend({
+ using: function (props) {
+ $tip.css({
+ top: Math.round(props.top),
+ left: Math.round(props.left)
+ })
+ }
+ }, offset), 0)
+
+ $tip.addClass('in')
+
+ // check to see if placing tip in new offset caused the tip to resize itself
+ var actualWidth = $tip[0].offsetWidth
+ var actualHeight = $tip[0].offsetHeight
+
+ if (placement == 'top' && actualHeight != height) {
+ offset.top = offset.top + height - actualHeight
+ }
+
+ var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight)
+
+ if (delta.left) offset.left += delta.left
+ else offset.top += delta.top
+
+ var arrowDelta = delta.left ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight
+ var arrowPosition = delta.left ? 'left' : 'top'
+ var arrowOffsetPosition = delta.left ? 'offsetWidth' : 'offsetHeight'
+
+ $tip.offset(offset)
+ this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], arrowPosition)
+ }
+
+ Tooltip.prototype.replaceArrow = function (delta, dimension, position) {
+ this.arrow().css(position, delta ? (50 * (1 - delta / dimension) + '%') : '')
+ }
+
+ Tooltip.prototype.setContent = function () {
+ var $tip = this.tip()
+ var title = this.getTitle()
+
+ $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
+ $tip.removeClass('fade in top bottom left right')
+ }
+
+ Tooltip.prototype.hide = function () {
+ var that = this
+ var $tip = this.tip()
+ var e = $.Event('hide.bs.' + this.type)
+
+ this.$element.removeAttr('aria-describedby')
+
+ function complete() {
+ if (that.hoverState != 'in') $tip.detach()
+ that.$element.trigger('hidden.bs.' + that.type)
+ }
+
+ this.$element.trigger(e)
+
+ if (e.isDefaultPrevented()) return
+
+ $tip.removeClass('in')
+
+ $.support.transition && this.$tip.hasClass('fade') ?
+ $tip
+ .one('bsTransitionEnd', complete)
+ .emulateTransitionEnd(150) :
+ complete()
+
+ this.hoverState = null
+
+ return this
+ }
+
+ Tooltip.prototype.fixTitle = function () {
+ var $e = this.$element
+ if ($e.attr('title') || typeof ($e.attr('data-original-title')) != 'string') {
+ $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
+ }
+ }
+
+ Tooltip.prototype.hasContent = function () {
+ return this.getTitle()
+ }
+
+ Tooltip.prototype.getPosition = function ($element) {
+ $element = $element || this.$element
+ var el = $element[0]
+ var isBody = el.tagName == 'BODY'
+ return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : null, {
+ scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop(),
+ width: isBody ? $(window).width() : $element.outerWidth(),
+ height: isBody ? $(window).height() : $element.outerHeight()
+ }, isBody ? { top: 0, left: 0 } : $element.offset())
+ }
+
+ Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
+ return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } :
+ placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :
+ placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
+ /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }
+
+ }
+
+ Tooltip.prototype.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) {
+ var delta = { top: 0, left: 0 }
+ if (!this.$viewport) return delta
+
+ var viewportPadding = this.options.viewport && this.options.viewport.padding || 0
+ var viewportDimensions = this.getPosition(this.$viewport)
+
+ if (/right|left/.test(placement)) {
+ var topEdgeOffset = pos.top - viewportPadding - viewportDimensions.scroll
+ var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight
+ if (topEdgeOffset < viewportDimensions.top) { // top overflow
+ delta.top = viewportDimensions.top - topEdgeOffset
+ } else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow
+ delta.top = viewportDimensions.top + viewportDimensions.height - bottomEdgeOffset
+ }
+ } else {
+ var leftEdgeOffset = pos.left - viewportPadding
+ var rightEdgeOffset = pos.left + viewportPadding + actualWidth
+ if (leftEdgeOffset < viewportDimensions.left) { // left overflow
+ delta.left = viewportDimensions.left - leftEdgeOffset
+ } else if (rightEdgeOffset > viewportDimensions.width) { // right overflow
+ delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset
+ }
+ }
+
+ return delta
+ }
+
+ Tooltip.prototype.getTitle = function () {
+ var title
+ var $e = this.$element
+ var o = this.options
+
+ title = $e.attr('data-original-title')
+ || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
+
+ return title
+ }
+
+ Tooltip.prototype.getUID = function (prefix) {
+ do prefix += ~~(Math.random() * 1000000)
+ while (document.getElementById(prefix))
+ return prefix
+ }
+
+ Tooltip.prototype.tip = function () {
+ return (this.$tip = this.$tip || $(this.options.template))
+ }
+
+ Tooltip.prototype.arrow = function () {
+ return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow'))
+ }
+
+ Tooltip.prototype.validate = function () {
+ if (!this.$element[0].parentNode) {
+ this.hide()
+ this.$element = null
+ this.options = null
+ }
+ }
+
+ Tooltip.prototype.enable = function () {
+ this.enabled = true
+ }
+
+ Tooltip.prototype.disable = function () {
+ this.enabled = false
+ }
+
+ Tooltip.prototype.toggleEnabled = function () {
+ this.enabled = !this.enabled
+ }
+
+ Tooltip.prototype.toggle = function (e) {
+ var self = this
+ if (e) {
+ self = $(e.currentTarget).data('bs.' + this.type)
+ if (!self) {
+ self = new this.constructor(e.currentTarget, this.getDelegateOptions())
+ $(e.currentTarget).data('bs.' + this.type, self)
+ }
+ }
+
+ self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
+ }
+
+ Tooltip.prototype.destroy = function () {
+ clearTimeout(this.timeout)
+ this.hide().$element.off('.' + this.type).removeData('bs.' + this.type)
+ }
+
+
+ // TOOLTIP PLUGIN DEFINITION
+ // =========================
+
+ function Plugin(option) {
+ return this.each(function () {
+ var $this = $(this)
+ var data = $this.data('bs.tooltip')
+ var options = typeof option == 'object' && option
+
+ if (!data && option == 'destroy') return
+ if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
+ if (typeof option == 'string') data[option]()
+ })
+ }
+
+ var old = $.fn.tooltip
+
+ $.fn.tooltip = Plugin
+ $.fn.tooltip.Constructor = Tooltip
+
+
+ // TOOLTIP NO CONFLICT
+ // ===================
+
+ $.fn.tooltip.noConflict = function () {
+ $.fn.tooltip = old
+ return this
+ }
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: popover.js v3.2.0
+ * http://getbootstrap.com/javascript/#popovers
+ * ========================================================================
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+ 'use strict';
+
+ // POPOVER PUBLIC CLASS DEFINITION
+ // ===============================
+
+ var Popover = function (element, options) {
+ this.init('popover', element, options)
+ }
+
+ if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
+
+ Popover.VERSION = '3.2.0'
+
+ Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
+ placement: 'right',
+ trigger: 'click',
+ content: '',
+ template: '
'
+ })
+
+
+ // NOTE: POPOVER EXTENDS tooltip.js
+ // ================================
+
+ Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype)
+
+ Popover.prototype.constructor = Popover
+
+ Popover.prototype.getDefaults = function () {
+ return Popover.DEFAULTS
+ }
+
+ Popover.prototype.setContent = function () {
+ var $tip = this.tip()
+ var title = this.getTitle()
+ var content = this.getContent()
+
+ $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
+ $tip.find('.popover-content').empty()[ // we use append for html objects to maintain js events
+ this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'
+ ](content)
+
+ $tip.removeClass('fade top bottom left right in')
+
+ // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do
+ // this manually by checking the contents.
+ if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide()
+ }
+
+ Popover.prototype.hasContent = function () {
+ return this.getTitle() || this.getContent()
+ }
+
+ Popover.prototype.getContent = function () {
+ var $e = this.$element
+ var o = this.options
+
+ return $e.attr('data-content')
+ || (typeof o.content == 'function' ?
+ o.content.call($e[0]) :
+ o.content)
+ }
+
+ Popover.prototype.arrow = function () {
+ return (this.$arrow = this.$arrow || this.tip().find('.arrow'))
+ }
+
+ Popover.prototype.tip = function () {
+ if (!this.$tip) this.$tip = $(this.options.template)
+ return this.$tip
+ }
+
+
+ // POPOVER PLUGIN DEFINITION
+ // =========================
+
+ function Plugin(option) {
+ return this.each(function () {
+ var $this = $(this)
+ var data = $this.data('bs.popover')
+ var options = typeof option == 'object' && option
+
+ if (!data && option == 'destroy') return
+ if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
+ if (typeof option == 'string') data[option]()
+ })
+ }
+
+ var old = $.fn.popover
+
+ $.fn.popover = Plugin
+ $.fn.popover.Constructor = Popover
+
+
+ // POPOVER NO CONFLICT
+ // ===================
+
+ $.fn.popover.noConflict = function () {
+ $.fn.popover = old
+ return this
+ }
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: scrollspy.js v3.2.0
+ * http://getbootstrap.com/javascript/#scrollspy
+ * ========================================================================
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+ 'use strict';
+
+ // SCROLLSPY CLASS DEFINITION
+ // ==========================
+
+ function ScrollSpy(element, options) {
+ var process = $.proxy(this.process, this)
+
+ this.$body = $('body')
+ this.$scrollElement = $(element).is('body') ? $(window) : $(element)
+ this.options = $.extend({}, ScrollSpy.DEFAULTS, options)
+ this.selector = (this.options.target || '') + ' .nav li > a'
+ this.offsets = []
+ this.targets = []
+ this.activeTarget = null
+ this.scrollHeight = 0
+
+ this.$scrollElement.on('scroll.bs.scrollspy', process)
+ this.refresh()
+ this.process()
+ }
+
+ ScrollSpy.VERSION = '3.2.0'
+
+ ScrollSpy.DEFAULTS = {
+ offset: 10
+ }
+
+ ScrollSpy.prototype.getScrollHeight = function () {
+ return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)
+ }
+
+ ScrollSpy.prototype.refresh = function () {
+ var offsetMethod = 'offset'
+ var offsetBase = 0
+
+ if (!$.isWindow(this.$scrollElement[0])) {
+ offsetMethod = 'position'
+ offsetBase = this.$scrollElement.scrollTop()
+ }
+
+ this.offsets = []
+ this.targets = []
+ this.scrollHeight = this.getScrollHeight()
+
+ var self = this
+
+ this.$body
+ .find(this.selector)
+ .map(function () {
+ var $el = $(this)
+ var href = $el.data('target') || $el.attr('href')
+ var $href = /^#./.test(href) && $(href)
+
+ return ($href
+ && $href.length
+ && $href.is(':visible')
+ && [[$href[offsetMethod]().top + offsetBase, href]]) || null
+ })
+ .sort(function (a, b) { return a[0] - b[0] })
+ .each(function () {
+ self.offsets.push(this[0])
+ self.targets.push(this[1])
+ })
+ }
+
+ ScrollSpy.prototype.process = function () {
+ var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
+ var scrollHeight = this.getScrollHeight()
+ var maxScroll = this.options.offset + scrollHeight - this.$scrollElement.height()
+ var offsets = this.offsets
+ var targets = this.targets
+ var activeTarget = this.activeTarget
+ var i
+
+ if (this.scrollHeight != scrollHeight) {
+ this.refresh()
+ }
+
+ if (scrollTop >= maxScroll) {
+ return activeTarget != (i = targets[targets.length - 1]) && this.activate(i)
+ }
+
+ if (activeTarget && scrollTop <= offsets[0]) {
+ return activeTarget != (i = targets[0]) && this.activate(i)
+ }
+
+ for (i = offsets.length; i--;) {
+ activeTarget != targets[i]
+ && scrollTop >= offsets[i]
+ && (!offsets[i + 1] || scrollTop <= offsets[i + 1])
+ && this.activate(targets[i])
+ }
+ }
+
+ ScrollSpy.prototype.activate = function (target) {
+ this.activeTarget = target
+
+ $(this.selector)
+ .parentsUntil(this.options.target, '.active')
+ .removeClass('active')
+
+ var selector = this.selector +
+ '[data-target="' + target + '"],' +
+ this.selector + '[href="' + target + '"]'
+
+ var active = $(selector)
+ .parents('li')
+ .addClass('active')
+
+ if (active.parent('.dropdown-menu').length) {
+ active = active
+ .closest('li.dropdown')
+ .addClass('active')
+ }
+
+ active.trigger('activate.bs.scrollspy')
+ }
+
+
+ // SCROLLSPY PLUGIN DEFINITION
+ // ===========================
+
+ function Plugin(option) {
+ return this.each(function () {
+ var $this = $(this)
+ var data = $this.data('bs.scrollspy')
+ var options = typeof option == 'object' && option
+
+ if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))
+ if (typeof option == 'string') data[option]()
+ })
+ }
+
+ var old = $.fn.scrollspy
+
+ $.fn.scrollspy = Plugin
+ $.fn.scrollspy.Constructor = ScrollSpy
+
+
+ // SCROLLSPY NO CONFLICT
+ // =====================
+
+ $.fn.scrollspy.noConflict = function () {
+ $.fn.scrollspy = old
+ return this
+ }
+
+
+ // SCROLLSPY DATA-API
+ // ==================
+
+ $(window).on('load.bs.scrollspy.data-api', function () {
+ $('[data-spy="scroll"]').each(function () {
+ var $spy = $(this)
+ Plugin.call($spy, $spy.data())
+ })
+ })
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: tab.js v3.2.0
+ * http://getbootstrap.com/javascript/#tabs
+ * ========================================================================
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+ 'use strict';
+
+ // TAB CLASS DEFINITION
+ // ====================
+
+ var Tab = function (element) {
+ this.element = $(element)
+ }
+
+ Tab.VERSION = '3.2.0'
+
+ Tab.prototype.show = function () {
+ var $this = this.element
+ var $ul = $this.closest('ul:not(.dropdown-menu)')
+ var selector = $this.data('target')
+
+ if (!selector) {
+ selector = $this.attr('href')
+ selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
+ }
+
+ if ($this.parent('li').hasClass('active')) return
+
+ var previous = $ul.find('.active:last a')[0]
+ var e = $.Event('show.bs.tab', {
+ relatedTarget: previous
+ })
+
+ $this.trigger(e)
+
+ if (e.isDefaultPrevented()) return
+
+ var $target = $(selector)
+
+ this.activate($this.closest('li'), $ul)
+ this.activate($target, $target.parent(), function () {
+ $this.trigger({
+ type: 'shown.bs.tab',
+ relatedTarget: previous
+ })
+ })
+ }
+
+ Tab.prototype.activate = function (element, container, callback) {
+ var $active = container.find('> .active')
+ var transition = callback
+ && $.support.transition
+ && $active.hasClass('fade')
+
+ function next() {
+ $active
+ .removeClass('active')
+ .find('> .dropdown-menu > .active')
+ .removeClass('active')
+
+ element.addClass('active')
+
+ if (transition) {
+ element[0].offsetWidth // reflow for transition
+ element.addClass('in')
+ } else {
+ element.removeClass('fade')
+ }
+
+ if (element.parent('.dropdown-menu')) {
+ element.closest('li.dropdown').addClass('active')
+ }
+
+ callback && callback()
+ }
+
+ transition ?
+ $active
+ .one('bsTransitionEnd', next)
+ .emulateTransitionEnd(150) :
+ next()
+
+ $active.removeClass('in')
+ }
+
+
+ // TAB PLUGIN DEFINITION
+ // =====================
+
+ function Plugin(option) {
+ return this.each(function () {
+ var $this = $(this)
+ var data = $this.data('bs.tab')
+
+ if (!data) $this.data('bs.tab', (data = new Tab(this)))
+ if (typeof option == 'string') data[option]()
+ })
+ }
+
+ var old = $.fn.tab
+
+ $.fn.tab = Plugin
+ $.fn.tab.Constructor = Tab
+
+
+ // TAB NO CONFLICT
+ // ===============
+
+ $.fn.tab.noConflict = function () {
+ $.fn.tab = old
+ return this
+ }
+
+
+ // TAB DATA-API
+ // ============
+
+ $(document).on('click.bs.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
+ e.preventDefault()
+ Plugin.call($(this), 'show')
+ })
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: affix.js v3.2.0
+ * http://getbootstrap.com/javascript/#affix
+ * ========================================================================
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+ 'use strict';
+
+ // AFFIX CLASS DEFINITION
+ // ======================
+
+ var Affix = function (element, options) {
+ this.options = $.extend({}, Affix.DEFAULTS, options)
+
+ this.$target = $(this.options.target)
+ .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
+ .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))
+
+ this.$element = $(element)
+ this.affixed =
+ this.unpin =
+ this.pinnedOffset = null
+
+ this.checkPosition()
+ }
+
+ Affix.VERSION = '3.2.0'
+
+ Affix.RESET = 'affix affix-top affix-bottom'
+
+ Affix.DEFAULTS = {
+ offset: 0,
+ target: window
+ }
+
+ Affix.prototype.getPinnedOffset = function () {
+ if (this.pinnedOffset) return this.pinnedOffset
+ this.$element.removeClass(Affix.RESET).addClass('affix')
+ var scrollTop = this.$target.scrollTop()
+ var position = this.$element.offset()
+ return (this.pinnedOffset = position.top - scrollTop)
+ }
+
+ Affix.prototype.checkPositionWithEventLoop = function () {
+ setTimeout($.proxy(this.checkPosition, this), 1)
+ }
+
+ Affix.prototype.checkPosition = function () {
+ if (!this.$element.is(':visible')) return
+
+ var scrollHeight = $(document).height()
+ var scrollTop = this.$target.scrollTop()
+ var position = this.$element.offset()
+ var offset = this.options.offset
+ var offsetTop = offset.top
+ var offsetBottom = offset.bottom
+
+ if (typeof offset != 'object') offsetBottom = offsetTop = offset
+ if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element)
+ if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)
+
+ var affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ? false :
+ offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ? 'bottom' :
+ offsetTop != null && (scrollTop <= offsetTop) ? 'top' : false
+
+ if (this.affixed === affix) return
+ if (this.unpin != null) this.$element.css('top', '')
+
+ var affixType = 'affix' + (affix ? '-' + affix : '')
+ var e = $.Event(affixType + '.bs.affix')
+
+ this.$element.trigger(e)
+
+ if (e.isDefaultPrevented()) return
+
+ this.affixed = affix
+ this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null
+
+ this.$element
+ .removeClass(Affix.RESET)
+ .addClass(affixType)
+ .trigger($.Event(affixType.replace('affix', 'affixed')))
+
+ if (affix == 'bottom') {
+ this.$element.offset({
+ top: scrollHeight - this.$element.height() - offsetBottom
+ })
+ }
+ }
+
+
+ // AFFIX PLUGIN DEFINITION
+ // =======================
+
+ function Plugin(option) {
+ return this.each(function () {
+ var $this = $(this)
+ var data = $this.data('bs.affix')
+ var options = typeof option == 'object' && option
+
+ if (!data) $this.data('bs.affix', (data = new Affix(this, options)))
+ if (typeof option == 'string') data[option]()
+ })
+ }
+
+ var old = $.fn.affix
+
+ $.fn.affix = Plugin
+ $.fn.affix.Constructor = Affix
+
+
+ // AFFIX NO CONFLICT
+ // =================
+
+ $.fn.affix.noConflict = function () {
+ $.fn.affix = old
+ return this
+ }
+
+
+ // AFFIX DATA-API
+ // ==============
+
+ $(window).on('load', function () {
+ $('[data-spy="affix"]').each(function () {
+ var $spy = $(this)
+ var data = $spy.data()
+
+ data.offset = data.offset || {}
+
+ if (data.offsetBottom) data.offset.bottom = data.offsetBottom
+ if (data.offsetTop) data.offset.top = data.offsetTop
+
+ Plugin.call($spy, data)
+ })
+ })
+
+}(jQuery);
diff --git a/llluiop/0023/MyDjango/static/bootstrap/js/bootstrap.min.js b/llluiop/0023/MyDjango/static/bootstrap/js/bootstrap.min.js
new file mode 100644
index 00000000..7c1561a8
--- /dev/null
+++ b/llluiop/0023/MyDjango/static/bootstrap/js/bootstrap.min.js
@@ -0,0 +1,6 @@
+/*!
+ * Bootstrap v3.2.0 (http://getbootstrap.com)
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ */
+if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.2.0",d.prototype.close=function(b){function c(){f.detach().trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one("bsTransitionEnd",c).emulateTransitionEnd(150):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.2.0",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),d[e](null==f[b]?this.options[b]:f[b]),setTimeout(a.proxy(function(){"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}a&&this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),c.preventDefault()})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b).on("keydown.bs.carousel",a.proxy(this.keydown,this)),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.2.0",c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},c.prototype.keydown=function(a){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.to=function(b){var c=this,d=this.getItemIndex(this.$active=this.$element.find(".item.active"));return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}if(e.hasClass("active"))return this.sliding=!1;var j=e[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:g});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,f&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(e)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:g});return a.support.transition&&this.$element.hasClass("slide")?(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one("bsTransitionEnd",function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(1e3*d.css("transition-duration").slice(0,-1))):(d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger(m)),f&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b);!e&&f.toggle&&"show"==b&&(b=!b),e||d.data("bs.collapse",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};c.VERSION="3.2.0",c.DEFAULTS={toggle:!0},c.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},c.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var c=a.Event("show.bs.collapse");if(this.$element.trigger(c),!c.isDefaultPrevented()){var d=this.$parent&&this.$parent.find("> .panel > .in");if(d&&d.length){var e=d.data("bs.collapse");if(e&&e.transitioning)return;b.call(d,"hide"),e||d.data("bs.collapse",null)}var f=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[f](0),this.transitioning=1;var g=function(){this.$element.removeClass("collapsing").addClass("collapse in")[f](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return g.call(this);var h=a.camelCase(["scroll",f].join("-"));this.$element.one("bsTransitionEnd",a.proxy(g,this)).emulateTransitionEnd(350)[f](this.$element[0][h])}}},c.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(d,this)).emulateTransitionEnd(350):d.call(this)}}},c.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var d=a.fn.collapse;a.fn.collapse=b,a.fn.collapse.Constructor=c,a.fn.collapse.noConflict=function(){return a.fn.collapse=d,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(c){var d,e=a(this),f=e.attr("data-target")||c.preventDefault()||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""),g=a(f),h=g.data("bs.collapse"),i=h?"toggle":e.data(),j=e.attr("data-parent"),k=j&&a(j);h&&h.transitioning||(k&&k.find('[data-toggle="collapse"][data-parent="'+j+'"]').not(e).addClass("collapsed"),e[g.hasClass("in")?"addClass":"removeClass"]("collapsed")),b.call(g,i)})}(jQuery),+function(a){"use strict";function b(b){b&&3===b.which||(a(e).remove(),a(f).each(function(){var d=c(a(this)),e={relatedTarget:this};d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown",e)),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown",e))}))}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.2.0",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('
').insertAfter(a(this)).on("click",b);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus"),f.toggleClass("open").trigger("shown.bs.dropdown",h)}return!1}},g.prototype.keydown=function(b){if(/(38|40|27)/.test(b.keyCode)){var d=a(this);if(b.preventDefault(),b.stopPropagation(),!d.is(".disabled, :disabled")){var e=c(d),g=e.hasClass("open");if(!g||g&&27==b.keyCode)return 27==b.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.divider):visible a",i=e.find('[role="menu"]'+h+', [role="listbox"]'+h);if(i.length){var j=i.index(i.filter(":focus"));38==b.keyCode&&j>0&&j--,40==b.keyCode&&j
').appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),e&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;e?this.$backdrop.one("bsTransitionEnd",b).emulateTransitionEnd(150):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var f=function(){c.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",f).emulateTransitionEnd(150):f()}else b&&b()},c.prototype.checkScrollbar=function(){document.body.clientWidth>=window.innerWidth||(this.scrollbarWidth=this.scrollbarWidth||this.measureScrollbar())},c.prototype.setScrollbar=function(){var a=parseInt(this.$body.css("padding-right")||0,10);this.scrollbarWidth&&this.$body.css("padding-right",a+this.scrollbarWidth)},c.prototype.resetScrollbar=function(){this.$body.css("padding-right","")},c.prototype.measureScrollbar=function(){var a=document.createElement("div");a.className="modal-scrollbar-measure",this.$body.append(a);var b=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),b};var d=a.fn.modal;a.fn.modal=b,a.fn.modal.Constructor=c,a.fn.modal.noConflict=function(){return a.fn.modal=d,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(c){var d=a(this),e=d.attr("href"),f=a(d.attr("data-target")||e&&e.replace(/.*(?=#[^\s]+$)/,"")),g=f.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(e)&&e},f.data(),d.data());d.is("a")&&c.preventDefault(),f.one("show.bs.modal",function(a){a.isDefaultPrevented()||f.one("hidden.bs.modal",function(){d.is(":visible")&&d.trigger("focus")})}),b.call(f,g,this)})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof b&&b;(e||"destroy"!=b)&&(e||d.data("bs.tooltip",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",a,b)};c.VERSION="3.2.0",c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(this.options.viewport.selector||this.options.viewport);for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show()},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var c=a.contains(document.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!c)return;var d=this,e=this.tip(),f=this.getUID(this.type);this.setContent(),e.attr("id",f),this.$element.attr("aria-describedby",f),this.options.animation&&e.addClass("fade");var g="function"==typeof this.options.placement?this.options.placement.call(this,e[0],this.$element[0]):this.options.placement,h=/\s?auto?\s?/i,i=h.test(g);i&&(g=g.replace(h,"")||"top"),e.detach().css({top:0,left:0,display:"block"}).addClass(g).data("bs."+this.type,this),this.options.container?e.appendTo(this.options.container):e.insertAfter(this.$element);var j=this.getPosition(),k=e[0].offsetWidth,l=e[0].offsetHeight;if(i){var m=g,n=this.$element.parent(),o=this.getPosition(n);g="bottom"==g&&j.top+j.height+l-o.scroll>o.height?"top":"top"==g&&j.top-o.scroll-l<0?"bottom":"right"==g&&j.right+k>o.width?"left":"left"==g&&j.left-k
g.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;jg.width&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){return this.$tip=this.$tip||a(this.options.template)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){clearTimeout(this.timeout),this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||"destroy"!=b)&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.2.0",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").empty()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},c.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){var e=a.proxy(this.process,this);this.$body=a("body"),this.$scrollElement=a(a(c).is("body")?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",e),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.2.0",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b="offset",c=0;a.isWindow(this.$scrollElement[0])||(b="position",c=this.$scrollElement.scrollTop()),this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight();var d=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[b]().top+c,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){d.offsets.push(this[0]),d.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b<=e[0])return g!=(a=f[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parentsUntil(this.options.target,".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.2.0",c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});if(b.trigger(f),!f.isDefaultPrevented()){var g=a(d);this.activate(b.closest("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})}}},c.prototype.activate=function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one("bsTransitionEnd",e).emulateTransitionEnd(150):e(),f.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(c){c.preventDefault(),b.call(a(this),"show")})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.2.0",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=a(document).height(),d=this.$target.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;"object"!=typeof f&&(h=g=f),"function"==typeof g&&(g=f.top(this.$element)),"function"==typeof h&&(h=f.bottom(this.$element));var i=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=h&&e.top+this.$element.height()>=b-h?"bottom":null!=g&&g>=d?"top":!1;if(this.affixed!==i){null!=this.unpin&&this.$element.css("top","");var j="affix"+(i?"-"+i:""),k=a.Event(j+".bs.affix");this.$element.trigger(k),k.isDefaultPrevented()||(this.affixed=i,this.unpin="bottom"==i?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(j).trigger(a.Event(j.replace("affix","affixed"))),"bottom"==i&&this.$element.offset({top:b-this.$element.height()-h}))}}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},d.offsetBottom&&(d.offset.bottom=d.offsetBottom),d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery);
\ No newline at end of file
diff --git a/llluiop/0023/MyDjango/templates/board.html b/llluiop/0023/MyDjango/templates/board.html
new file mode 100644
index 00000000..1652e43d
--- /dev/null
+++ b/llluiop/0023/MyDjango/templates/board.html
@@ -0,0 +1,63 @@
+
+
+
+
+留言薄
+
+
+
+
+
+{% if error_message %}
+
{{error_message}}
+
+
+{% else %}
+
+
+
+
+
历史留言
+
+{% for each in messages %}
+{{each.name}} 留言于 ({{each.date}})
+
+
{{each.text}}
+
+{%endfor%}
+
+
+{% endif %}
+
+
+
+
+
+
+
+
diff --git a/llluiop/0023/MyDjango/templates/index.html b/llluiop/0023/MyDjango/templates/index.html
new file mode 100644
index 00000000..bbdd67cb
--- /dev/null
+++ b/llluiop/0023/MyDjango/templates/index.html
@@ -0,0 +1,86 @@
+{% load staticfiles %}
+
+
+
+
+
+
+
+
+
+
+ Starter Template for Bootstrap
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Bootstrap starter template
+
Use this document as a way to quickly start any new project. All you get is this text and a mostly barebones HTML document.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/JiYouMCC/0024/todoList/todoList/list/migrations/__init__.py b/llluiop/0023/MyDjango/web/__init__.py
similarity index 100%
rename from JiYouMCC/0024/todoList/todoList/list/migrations/__init__.py
rename to llluiop/0023/MyDjango/web/__init__.py
diff --git a/llluiop/0023/MyDjango/web/admin.py b/llluiop/0023/MyDjango/web/admin.py
new file mode 100644
index 00000000..a2c155b9
--- /dev/null
+++ b/llluiop/0023/MyDjango/web/admin.py
@@ -0,0 +1,10 @@
+from django.contrib import admin
+
+# Register your models here.
+from models import Person
+
+class PersonAdmin(admin.ModelAdmin):
+ list_display = ('name', 'age')
+
+#admin.site.register(Person)
+admin.site.register(Person, PersonAdmin)
diff --git a/llluiop/0023/MyDjango/web/migrations/0001_initial.py b/llluiop/0023/MyDjango/web/migrations/0001_initial.py
new file mode 100644
index 00000000..81573ccf
--- /dev/null
+++ b/llluiop/0023/MyDjango/web/migrations/0001_initial.py
@@ -0,0 +1,21 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='Person',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('name', models.CharField(max_length=30)),
+ ('age', models.IntegerField()),
+ ],
+ ),
+ ]
diff --git a/llluiop/0023/MyDjango/web/migrations/0002_message.py b/llluiop/0023/MyDjango/web/migrations/0002_message.py
new file mode 100644
index 00000000..63d075ec
--- /dev/null
+++ b/llluiop/0023/MyDjango/web/migrations/0002_message.py
@@ -0,0 +1,23 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('web', '0001_initial'),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name='Message',
+ fields=[
+ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+ ('name', models.CharField(max_length=30)),
+ ('text', models.CharField(max_length=255)),
+ ('date', models.DateTimeField(auto_now_add=True)),
+ ],
+ ),
+ ]
diff --git a/llluiop/0023/MyDjango/web/migrations/__init__.py b/llluiop/0023/MyDjango/web/migrations/__init__.py
new file mode 100644
index 00000000..e69de29b
diff --git a/llluiop/0023/MyDjango/web/models.py b/llluiop/0023/MyDjango/web/models.py
new file mode 100644
index 00000000..88431220
--- /dev/null
+++ b/llluiop/0023/MyDjango/web/models.py
@@ -0,0 +1,16 @@
+from django.db import models
+
+# Create your models here.
+
+class Person(models.Model):
+ name = models.CharField(max_length=30)
+ age = models.IntegerField()
+
+ def __unicode__(self):
+ return self.name
+
+
+class Message(models.Model):
+ name = models.CharField(max_length=30)
+ text = models.CharField(max_length=255)
+ date = models.DateTimeField(auto_now_add=True)
diff --git a/JiYouMCC/0024/todoList/todoList/list/tests.py b/llluiop/0023/MyDjango/web/tests.py
similarity index 100%
rename from JiYouMCC/0024/todoList/todoList/list/tests.py
rename to llluiop/0023/MyDjango/web/tests.py
diff --git a/llluiop/0023/MyDjango/web/views.py b/llluiop/0023/MyDjango/web/views.py
new file mode 100644
index 00000000..63059e41
--- /dev/null
+++ b/llluiop/0023/MyDjango/web/views.py
@@ -0,0 +1,48 @@
+from django.shortcuts import render
+
+# Create your views here.
+from django.http import HttpResponse
+from django.http import HttpResponseRedirect
+from django.core.urlresolvers import reverse
+from models import Person
+from models import Message
+import datetime
+
+def current_time(request):
+ now = datetime.datetime.now()
+
+ html = "It is now %s." % now
+
+ return HttpResponse(html)
+
+
+def add(request, a, b):
+ c = int(a) + int(b)
+
+ return HttpResponse(c)
+
+
+def home(request):
+ return render(request, 'index.html')
+
+def person(request):
+ name = 'person in table are:'
+ for p in Person.objects.all():
+ name += p.name
+
+ return HttpResponse(name)
+
+def board(request):
+ messages = Message.objects.all()
+ content = {'messages': messages}
+ return render(request, 'board.html', content)
+
+
+def postmessage(request):
+ name = request.POST['name']
+ text = request.POST['text']
+
+ m = Message(name=name, text=text)
+ m.save()
+
+ return HttpResponseRedirect(reverse('board'))
diff --git a/lulujianjie/0000/0000.py b/lulujianjie/0000/0000.py
new file mode 100644
index 00000000..2c2f4b1d
--- /dev/null
+++ b/lulujianjie/0000/0000.py
@@ -0,0 +1,17 @@
+from PIL import Image, ImageDraw, ImageFont
+
+im = Image.open('image.jpg')
+w,h = im.size
+font_size = h/4
+
+draw = ImageDraw.Draw(im)
+fnt = ImageFont.truetype ("Arial.ttf",font_size)
+
+text_w,text_h = draw.textsize("8",font=fnt) # 给定文字message,返回所占像素(width,height)
+
+draw.text((w-text_w,0), "8", fill=(255,0,0), font=fnt)#图片宽度减去字体宽度、要写的字符、颜色、字体
+
+
+im.save('image_1.jpg')
+
+#reference http://www.cnblogs.com/wei-li/archive/2012/04/19/2456725.html
\ No newline at end of file
diff --git a/lulujianjie/0000/Thumbs.db b/lulujianjie/0000/Thumbs.db
new file mode 100644
index 00000000..c5f2ca42
Binary files /dev/null and b/lulujianjie/0000/Thumbs.db differ
diff --git a/lulujianjie/0001/0001.py b/lulujianjie/0001/0001.py
new file mode 100644
index 00000000..1343ddf9
--- /dev/null
+++ b/lulujianjie/0001/0001.py
@@ -0,0 +1,8 @@
+import uuid
+
+uuids = []
+for i in range(200):#0-199
+ uuids.append(uuid.uuid1())#append把value当作一个整体插入list
+i = 0;
+
for i in range(200):
+ print uuids[i]
diff --git a/lulujianjie/0004/0004.py b/lulujianjie/0004/0004.py
new file mode 100644
index 00000000..08870c8c
--- /dev/null
+++ b/lulujianjie/0004/0004.py
@@ -0,0 +1,29 @@
+import re
+lines_count = 0
+#words_count = 0
+chars_count = 0
+lines_list = []
+words_list = {}
+with open('./test.txt','r') as f:
+#http://www.liaoxuefeng.com/wiki/001374738125095c955c1e6d8bb493182103fac9270762a000/001386820066616a77f826d876b46b9ac34cb5f34374f7a000
+ for line in f:## ʹļ , ÿֻȡʾһ
+#http://blog.csdn.net/mvpme82/article/details/5674200
+ lines_count += 1
+ chars_count += len(line)#ո
+#ʽhttp://www.liaoxuefeng.com/wiki/001374738125095c955c1e6d8bb493182103fac9270762a000/001386832260566c26442c671fa489ebc6fe85badda25cd000
+ lines_list = re.findall(r'[a-zA-Z\-]+',line)
+ print lines_list
+ for i in lines_list:
+ #words_count += 1
+ if i not in words_list:
+ words_list[i] = 1
+ else:
+ words_list[i] += 1
+
+ print 'lines_count:',lines_count
+ print 'chars_count:',chars_count
+ print 'words_count:',len(words_list)#ֵԪظ
+
+for word,quantity in words_list.items():
+ print word,'\'s number is ',quantity
+ ## f.close()
diff --git a/lulujianjie/0004/test.txt b/lulujianjie/0004/test.txt
new file mode 100644
index 00000000..a8d88698
--- /dev/null
+++ b/lulujianjie/0004/test.txt
@@ -0,0 +1,13 @@
+hello world!
+lujianjie
+###
+ksdfksdkk*&
+ljj-wyj
+
+lujianjie
+###
+ksdfksdkk*&
+ljj-wyj lujianjie
+###
+ksdfksdkk*&
+ljj-wyj
\ No newline at end of file
diff --git a/lwh/0/addnum.py b/lwh/0/addnum.py
new file mode 100644
index 00000000..b1786382
--- /dev/null
+++ b/lwh/0/addnum.py
@@ -0,0 +1,18 @@
+from PIL import Image, ImageDraw
+from PIL import ImageFont
+import random
+
+# 设置字体
+font = ImageFont.truetype("C:/Windows/Fonts/Arial.ttf", 20)
+
+#打开文件
+im = Image.open("avatar.jpg")
+
+#使用PIl的ImageDraw
+draw = ImageDraw.Draw(im)
+text = str(random.randint(1, 20))
+point = (180, 10)
+draw.text(point, text, font=font, fill="red")
+
+#保存
+im.save("avatar2.jpg")
diff --git a/lwh/0/avatar.jpg b/lwh/0/avatar.jpg
new file mode 100644
index 00000000..e2710c9c
Binary files /dev/null and b/lwh/0/avatar.jpg differ
diff --git a/lwh/1/active_code.py b/lwh/1/active_code.py
new file mode 100644
index 00000000..4edfee9f
--- /dev/null
+++ b/lwh/1/active_code.py
@@ -0,0 +1,25 @@
+"""
+做为 Apple Store App 独立开发者,你要搞限时促销,
+为你的应用生成激活码(或者优惠券),
+使用 Python 如何生成 200 个激活码(或者优惠券)?
+
+激活码格式:
+19个字符组成,分成4组,中间用"-"连接起来
+必须同时包含大小写字母数字
+
+"""
+import random
+import string
+
+
+def generate_active_code():
+ active_code = []
+ ascii_ = string.ascii_letters + string.digits
+ active_code = ["".join([random.choice(ascii_) for i in range(16)])
+ for j in range(200)]
+ print(len(active_code))
+ return active_code
+
+if __name__ == "__main__":
+ active_code = generate_active_code()
+ print(active_code)
diff --git a/lwh/10/captcha.jpg b/lwh/10/captcha.jpg
new file mode 100644
index 00000000..e74e2a31
Binary files /dev/null and b/lwh/10/captcha.jpg differ
diff --git a/lwh/10/captcha.py b/lwh/10/captcha.py
new file mode 100644
index 00000000..3c7b8572
--- /dev/null
+++ b/lwh/10/captcha.py
@@ -0,0 +1,34 @@
+"""
+ 生成图片验证码
+"""
+import PIL
+import string
+import random
+from PIL import Image, ImageDraw, ImageFont, ImageFilter
+
+image_path = "C:\\Users\\lwhil\\Desktop\\captcha.jpg"
+save_path = "C:\\Users\\lwhil\\Desktop\\captcha_f.jpg"
+font = ImageFont.truetype("C:/Windows/Fonts/Arial.ttf", 60)
+color = ["red", "black", "green", "blue", "yellow"]
+letters = string.ascii_letters
+
+
+def generate_captcha():
+ image = Image.open(image_path)
+ draw = ImageDraw.Draw(image)
+ for i in range(1, 6):
+ nums = str(random.randint(0, 9))
+ width, height = image.size
+ print(width, height)
+ point = (50 + i * 100, 200 + random.randint(-100, 100))
+ draw.text(point, nums, font=font, fill=color[random.randint(0, 4)])
+ # image.rotate(90) #文档只有整张图片的倾斜效果,效果不好,不如不要
+
+ # 产生模糊效果
+ GaussBlur = ImageFilter.GaussianBlur(radius=5)
+ image = image.filter(GaussBlur)
+
+ image.save(save_path)
+
+if __name__ == "__main__":
+ generate_captcha()
diff --git a/lwh/10/captcha_f.jpg b/lwh/10/captcha_f.jpg
new file mode 100644
index 00000000..9dd466ef
Binary files /dev/null and b/lwh/10/captcha_f.jpg differ
diff --git a/lwh/11/filter_word.py b/lwh/11/filter_word.py
new file mode 100644
index 00000000..dcbac77d
--- /dev/null
+++ b/lwh/11/filter_word.py
@@ -0,0 +1,42 @@
+# coding = utf-8
+"""
+def filter_word():
+
+ # init
+ filter_words_list = []
+ with open("filtered_words.txt", "r") as f:
+ string_read = f.readline()
+ while string_read != "":
+ filter_words_list.append(string_read)
+ string_read = f.readline()
+
+ print("Enter \\q to exit.")
+ string_input = input(
+ "Input your word to check whether it was filtered ->")
+ while string_input != "\\q":
+ if string_input in filter_words_list:
+ print("Freedom")
+ else:
+ print("Human Rights")
+ string_input = input(
+ "Input your word to check whether it was filtered ->")
+
+if __name__ == "__main__":
+ filter_word()
+
+"""
+# coding = utf-8
+__author__ = 'Forec'
+word_filter = set()
+with open('filtered_words.txt',"r") as f:
+ for x in f.readlines():
+ word_filter |= {x.rstrip('\n')}
+while True:
+ s = input()
+ if s == 'exit':
+ break
+ elif s in word_filter:
+ print('Freedom')
+ else:
+ print('Human Rights')
+
\ No newline at end of file
diff --git a/lwh/11/filtered_words.txt b/lwh/11/filtered_words.txt
new file mode 100644
index 00000000..444eb7c6
--- /dev/null
+++ b/lwh/11/filtered_words.txt
@@ -0,0 +1,11 @@
+
+Ա
+Ա
+쵼
+ţ
+ţ
+
+
+love
+sex
+jiangge
\ No newline at end of file
diff --git a/lwh/12/demo.txt b/lwh/12/demo.txt
new file mode 100644
index 00000000..1b4f2244
--- /dev/null
+++ b/lwh/12/demo.txt
@@ -0,0 +1,11 @@
+北京
+程序员
+公务员
+领导
+牛比
+牛逼
+你娘
+你妈
+love
+sex
+jiangge
diff --git a/lwh/12/filter.py b/lwh/12/filter.py
new file mode 100644
index 00000000..d90889aa
--- /dev/null
+++ b/lwh/12/filter.py
@@ -0,0 +1,31 @@
+import re
+import string
+
+
+class Filter(object):
+
+ def __init__(self):
+ self.filtered_word_list = []
+ self.readIO()
+
+ def check(self, word_input):
+ res = word_input
+ for e in self.filtered_word_list:
+ # print(e)
+ if e in word_input:
+ res = res.replace(e, '*' * len(e))
+ return res
+
+ def readIO(self):
+ with open('demo.txt', 'r') as f:
+ s_temp = f.readline().strip()
+ while s_temp != "":
+ self.filtered_word_list.append(s_temp)
+ s_temp = f.readline().strip()
+
+if __name__ == "__main__":
+ filter_obj = Filter()
+ while True:
+ word_input = input("Enter a sentence to check >")
+ str_ans = filter_obj.check(word_input)
+ print(str_ans)
diff --git a/lwh/14/SaveToExcel.py b/lwh/14/SaveToExcel.py
new file mode 100644
index 00000000..7e82904e
--- /dev/null
+++ b/lwh/14/SaveToExcel.py
@@ -0,0 +1,43 @@
+from openpyxl import Workbook
+from openpyxl import load_workbook
+
+path_save = "/home/lwh/SublimeTextProject/test.xlsx"
+path_read = "/home/lwh/SublimeTextProject/demo.txt"
+
+
+def write_test():
+ wb = Workbook() # 1.creat a work book
+ wb_sheet0 = wb.create_sheet("student") # 2.create a sheet in the work book
+
+ datas_str = ""
+ datas_dict = {}
+
+ with open(path_read, "r") as f:
+ lines = f.readlines()
+
+ # process the data from txt file.I make it be a dict
+ for line in lines:
+ if len(line.strip()) > 1:
+ key, value = line.split(':')
+ key = key.strip().strip("\"")
+ value = value.strip().strip(",").strip("[").strip("]")
+ value_list = value.split(",")
+ # print(len(value_list))
+ datas_dict[key] = value_list
+
+ for i in range(1, 4): # 3.assign value to cell of the sheet
+ for j in range(1, 5):
+ cell = wb_sheet0.cell(row=i, column=j + 1)
+ cell.value = datas_dict[str(i)][j - 1]
+ # print(cell.value)
+ cell = wb_sheet0.cell(row=i, column=1)
+ cell.value = i
+ '''
+ for row in wb_sheet0.iter_rows():
+ for cell in row:
+ print(cell.value)
+ '''
+ wb.save(path_save) # 4.save the file
+ print('success')
+
+write_test()
diff --git a/lwh/14/demo.txt b/lwh/14/demo.txt
new file mode 100644
index 00000000..1c4ffe6d
--- /dev/null
+++ b/lwh/14/demo.txt
@@ -0,0 +1,5 @@
+{
+ "1":["张三",150,120,100],
+ "2":["李四",90,99,95],
+ "3":["王五",60,66,68]
+}
diff --git a/lwh/14/demo.txt~ b/lwh/14/demo.txt~
new file mode 100644
index 00000000..e69de29b
diff --git a/lwh/17/demo.txt b/lwh/17/demo.txt
new file mode 100644
index 00000000..ea9b1593
--- /dev/null
+++ b/lwh/17/demo.txt
@@ -0,0 +1,5 @@
+{
+ "1":["张三",150,120,100],
+ "2":["李四",90,99,95],
+ "3":["王五",60,66,68]
+}
\ No newline at end of file
diff --git a/lwh/17/test.xlsx b/lwh/17/test.xlsx
new file mode 100644
index 00000000..51718fa1
Binary files /dev/null and b/lwh/17/test.xlsx differ
diff --git a/lwh/17/xlxs_to_xml.py b/lwh/17/xlxs_to_xml.py
new file mode 100644
index 00000000..a5b2530c
--- /dev/null
+++ b/lwh/17/xlxs_to_xml.py
@@ -0,0 +1,53 @@
+from xml.etree.ElementTree import ElementTree, Element, SubElement, Comment
+from openpyxl import load_workbook
+import json
+from pprint import pprint
+
+
+class ExcelToXml(object):
+
+ def __init__(self):
+ self.path_save = '/home/lwh/SublimeTextProject/test.xml'
+ self.path_read = '/home/lwh/SublimeTextProject/test.xlsx'
+ self.excel_dict = self.get_excel_dict()
+ self.data = self.get_text(self.excel_dict)
+ self.xml_final = self.get_xml(self.data)
+ self.save_xml(self.xml_final)
+
+ def get_excel_dict(self):
+ wb = load_workbook(self.path_read)
+ wb_sheet_student = wb['student']
+ excel_dict = {}
+ for row in wb_sheet_student.iter_rows():
+ key = str(row[0].value).strip()
+ value_list = row[1:]
+ value = [ele.value for ele in value_list]
+ excel_dict[key] = str(value)
+ return excel_dict
+
+ def get_text(self, excel_dict):
+ res = '{\r\n'
+ for key, val in excel_dict.items():
+ res += ' ' + str(key) + ':' + val + '\n'
+ res += '}\n'
+ # print(res)
+ return res
+
+ def get_xml(self, data):
+ root = Element('root')
+ student = SubElement(root, 'students')
+ student.append(Comment('学生信息表 "id" : [名字, 数学, 语文, 英文]'))
+ # student.
+ print(data)
+ student.text = data
+ xml_final = ElementTree(root)
+ # print(xml_final)
+ return xml_final
+
+ def save_xml(self, xml_to_save):
+ xml_to_save.write(
+ self.path_save, encoding="us-ascii", default_namespace=None, short_empty_elements=True)
+
+
+if __name__ == '__main__':
+ excel_to_xml_obj = ExcelToXml()
diff --git a/lwh/2/active_code.py b/lwh/2/active_code.py
new file mode 100644
index 00000000..6679a15d
--- /dev/null
+++ b/lwh/2/active_code.py
@@ -0,0 +1,25 @@
+"""
+做为 Apple Store App 独立开发者,你要搞限时促销,
+为你的应用生成激活码(或者优惠券),
+使用 Python 如何生成 200 个激活码(或者优惠券)?
+
+激活码格式:
+19个字符组成,分成4组,中间用"-"连接起来
+必须同时包含大小写字母数字
+
+"""
+import random
+import string
+
+
+def generate_active_code():
+ active_code = []
+ ascii_ = string.ascii_letters + string.digits
+ active_code = ["".join([random.choice(ascii_) for i in range(16)])
+ for i in range(200)]
+
+ return active_code
+
+if __name__ == "__main__":
+ active_code = generate_active_code()
+ print(active_code)
diff --git a/lwh/2/active_code.txt b/lwh/2/active_code.txt
new file mode 100644
index 00000000..d07d57cc
--- /dev/null
+++ b/lwh/2/active_code.txt
@@ -0,0 +1,200 @@
+RXUadiI0zOKmg5Ww
+z4qo5vaXKGM8uFsB
+TU3PdPnSAKtUcXwl
+dy2nuUEjRczyXC0a
+Xn8MFsTBRCbcG45E
+7DmryUic3pOs1DFu
+REINIyXEsovPrJ2G
+OKTYjXVpTljHanCO
+SzsuRGUmL6sEXBA1
+FrKGmMjKQGt0ImDV
+BLYXVaqENcuJXfUh
+ydsilfQorQtLKJs4
+abX1AUFy61k0gPZh
+xjEyzBwwu9AXrAaU
+wuJXMMscjhUpjOu1
+fbVRxeWbpilOQEQ2
+gKnLlSMvzFup2ubi
+mcU54YoHxGZ3gbRy
+izdNk0U2nlAqN5HT
+zGx1bP240lai9qMG
+3Nqa5IB5dzuPWfBA
+jAtgS3XXojFlWI5j
+L8rb8ODGhGO03D7x
+1SZ5ouRlwulVMcVd
+jGr71Sx2eU1BTzvq
+sB24ocOCXxuUwvJg
+RHesYESjimTftYZA
+gJvEvwB7nlRnsmcQ
+hVa1H4Ig9VfzBmRz
+bEGSjiMZMWpeRyhy
+3mFUtX6T3q6qJmN1
+jfKbj7WEu7LuBjw8
+07qBOuEyTvsoeC7o
+JCAGJusp8qdr7NzD
+5vrE1vhHIJ4rqLcU
+PquV3EUuOWDTy4pX
+ZEEcNm4o7JXQuRZn
+xDGpAt5uUHbi3HLN
+7KtkUMfREmSdTebQ
+4CTfOxmFFT7VX6Ha
+hWFdJW034cEKX8nT
+vgaQuZgmOWeBdBHr
+iZsJpE4eSh7ZqgYq
+bX3Wf9ya2AYB0Ek5
+7dAQNjyHPJ3BKTmt
+yCCVEeAAXwmPjj7x
+zt4Y1ptPZmFMEQ7Y
+TNXXk5PE2dKJTKwY
+qClONH4dhtpblVxO
+BcOxR9eik1YcKAIt
+IxVcoCfhx5U1KhJL
+e6LgwfakF5sIo3Wn
+rBz6ifzKMmLjRqnr
+7sG7zoOEjwiPVwMN
+2SpgY4eExdqyFma9
+seIIcsNT0deljKcF
+jUY48NLHJWn5mjSm
+epNdFfnUy3K9tddV
+FLKdZilBUpYloqLH
+b4flf5wi6a4joQwA
+1hJ2tGTJwlvgjebQ
+KW0W8x23QRAQMC3K
+tvOBXdSFbujyiLnl
+9SygR3CYo4ReQ1x4
+rTcggxAwbuu7waNy
+ql4gqiS3kJuNexrl
+ZpmKF1VYeIbvrAwE
+NhW0mMDUX9j1QkOR
+VHKBmzABwLwH1c8Y
+238sBuP3YIJJIUn6
+EyLVxAOASe5PWDsi
+BDxWOvKpe3FRHfXZ
+qkqz0lD4ogDgG6HB
+I8M1aVJCRc2452OG
+JWl7JmPKK9sq8v2r
+bdXCjhrHUSNXsNPJ
+sEcmFMdcvz57wBkr
+OYouRL6AD21NncGn
+aNRk1zxXhrr30fAm
+g40yzH8LHOOymofr
+oPw8MO6iNamJ1bYK
+QfnffjYdbE8BKCqF
+mbEKxuHBNHHloDy0
+oeVHq1yblfNbDlm2
+S5O9WOvWHMUU0ymx
+eiwlpN9GuRGmpbn0
+TMGHVairDKmSGbCk
+kiOC0MLXtctQxLe5
+rfoaB5W9YxwMzNki
+FWIoPqzYBkxWUA5n
+HoCqNcTtQEtjAUMP
+Gy6nVQJmgsgv9hGc
+PBTm3QAQ6jNFkvUZ
+j3yRTRrcFGUgDwow
+bPF8g0RHaN47Q4dN
+NzM9WIrXiDbi5IXD
+w54j8L5ngiakgayX
+hkd4g0UkVhmNnyR6
+iEz5VpcVi1mpS1gq
+KWkIIA97y42V5cnx
+5LZGIXk2odGvSTE1
+s1NdaGmS5YB8VJEL
+272uuYgOloY7hJ8t
+oc0hco4FYw75n4US
+DzmWY32kG7JaFG3R
+UIaLpcjN9yA12Uo5
+8RYmqxQ8IxUU0aGz
+D5Td2B7lEEUDYsUw
+vJ0rZHnIlI6sHDo5
+MYLBHHfax5MvUf96
+CQisO7bfEUwpr2Qy
+dyLBeumYaTAGHFyM
+wvFS79uJMwWSUgHv
+KkwuShhSHkzKy6op
+O72zwUdEuetJnnQ6
+Qj7r8dbBf1fKV55k
+T7K47FF9KcrEYcI7
+N79n066wlGUsxanD
+XPrc3XrLHA23mmmb
+sANdjXf4gD5tJvWF
+ARJPiZz9HmQbtqOW
+7WAr9oIw9sebBNWj
+UmKbDJ9Z3XDB0uxa
+XbqEHERAPrrM42ud
+iRMKgFM0gqr9G8Rt
+WfdEyO5sGxXKiYND
+3hPPrf7M3UPk3Pis
+PiL0B8e9ZtKPRsuj
+YuQXWQTw24RlfOUw
+nG8kOk3G6VWM3XcX
+0XblQUEM8uCl8ljl
+VY2AKbDNFTXT2Vpj
+BZkiI7LxBsSPp9wI
+WuCVLSQqpj2jBA74
+I6ASBeIdmYPxg7Zx
+OIAeCY1FHbOdJHnk
+h3r45aQva46D0MkG
+BlHBdOq3KqcokYnp
+X4mFpYkR7LgyBdf9
+r04TZnPIpXlrYajl
+Zoa59BtKi0C7N3vQ
+PAUVrdCcV46DMcTa
+XzkP2UjLVPd6UdeH
+tFuOwhfZAminRknq
+LLRXDREtywZ9oL2l
+1Bt1hjCu87iRvjVO
+843udSQ5CYhxzpY3
+zm78Qr1fm6YbD5Pc
+nkKKOAThEvmvMDck
+daNI9lwDGwWPXgDh
+3AD5vzwEgCh62OGG
+g0WACS40VWUhhO3n
+8DSPNQnnPpExp5ae
+1qDbOw7VXQu6sJyx
+IHeAepe22BqzyRYI
+Pyc8MoGTBonXrsig
+caIx6iJTzzrwRh76
+TuCiIBooXAtxGA1s
+d5vL89dwRziYYkOC
+Th7QNxgmuAHgdxjY
+Qde8adGqOCJLStgi
+X4YVCKnkpIglPXNH
+DJaSfz6ZZ5AexZrh
+p0suRQkjR2gPB50J
+Xu7zNDMf8LTXgUfP
+iO7lZE1d5u9C4agr
+ZScUrgefG4mhv7sn
+cxKn0LeiJmTmOncc
+MlHM9bSCqbLeYQyl
+hnNxbuM0iFXasDNU
+U9TDcgewoYmCuL8Z
+NiWuD6W6yo5naWVa
+6xB2tyGaP9XD1Reu
+MyMQgM3LVp3OOZbH
+GNReq9Tsm9yEkjnH
+wv0m9rGnQlTzWBsz
+VXdYlEkAdRsw74Q6
+KYvyofRRw4HdHdGa
+feOc882CM6u3Vmb9
+bHfFtp2xlqR9ov7Z
+I9WJT51PDOho07f2
+mbfys9pZlaBa71fn
+Z7B8uUPNGUolHgve
+CyGhoq3E5eaLuYd8
+Sp4zPGY0Zb4ce2kX
+dawy36RyxYpGlDTG
+gJlcfSukZBZZbOji
+DM5lIjwwSR5Ixta0
+HQIN6iSuBBu95Cy1
+c3JKxSbY0vqx4SEC
+9H4DXpc17vFjPCeE
+c48hIoAA5E5lVScv
+gadG0fAunAWg3C4I
+jr9kg1rr4rGPAT5i
+aLipX2YqYy8FyImJ
+GP87sr1igGhbAVnB
+Oghe3rzJSi4N9bCh
+j0pl6r1H8LD89zpg
+g9G0cNNlbgRRiuRM
+jqyltqFWJLEe0Gez
diff --git a/lwh/2/pymysql.py b/lwh/2/pymysql.py
new file mode 100644
index 00000000..a9cc1004
--- /dev/null
+++ b/lwh/2/pymysql.py
@@ -0,0 +1,39 @@
+# -*- coding: utf-8 -*-
+
+#!/usr/bin/python
+# -*- coding: UTF-8 -*-
+
+import pymysql
+
+
+# 打开数据库连接
+db = pymysql.connect("localhost", "root", "", "")
+
+# 使用cursor()方法获取操作游标
+cursor = db.cursor()
+
+# 使用execute方法执行SQL语句
+cursor.execute("CREATE DATABASE IF NOT EXISTS pymysql;")
+cursor.execute("USE pymysql;")
+cursor.execute(
+ "CREATE TABLE IF NOT EXISTS active_code(code VARCHAR(255));")
+
+with open("active_code.txt", "r") as f:
+ while True:
+ s = f.readline().strip()
+ # print(s)
+ if s == "":
+ break
+ cursor.execute("INSERT INTO active_code (code) values(%s)", [s])
+
+db.commit()
+#cursor.execute("USE pymsql")
+cursor.execute("SELECT * FROM active_code")
+
+# 使用 fetchone() 方法获取一条数据库。
+#data = cursor.fetchone()
+
+#print("Database version : %s " % data)
+
+# 关闭数据库连接
+db.close()
diff --git a/lwh/20/CallInfo.xls b/lwh/20/CallInfo.xls
new file mode 100644
index 00000000..34826bb7
Binary files /dev/null and b/lwh/20/CallInfo.xls differ
diff --git a/lwh/20/callinfo.py b/lwh/20/callinfo.py
new file mode 100644
index 00000000..8ca4fa0b
--- /dev/null
+++ b/lwh/20/callinfo.py
@@ -0,0 +1,81 @@
+import xlrd
+import xlwt
+
+
+class Statistics(object):
+
+ def __init__(self, user):
+ self.path_read = '/home/lwh/SublimeTextProject/CallInfo.xls'
+ self.path_save = '/home/lwh/SublimeTextProject/CallInfo(1).xls'
+ self.user = user
+ self.work()
+
+ # change all format of time to second
+ def tran_time(self, time_str):
+ time = time_str.replace('分', '.').replace('秒', '')
+ temp = time.split('.')
+ if len(temp) == 1: # just second
+ time = int(temp[0])
+ # print(time)
+ elif len(temp) == 2: # minute and second
+ m = int(temp[0]) * 60
+ s = int(temp[1])
+ time = m + s
+ # print(time)
+ return time
+
+ def work(self):
+ wb = xlrd.open_workbook(self.path_read)
+ sheets_list = wb.sheet_names()
+ for sheet_name in sheets_list:
+ wb_sheet = wb.sheet_by_name(sheet_name)
+ # print(wb_sheet)
+ # print(wb_sheet.nrows)
+ # print(wb_sheet.ncols)
+ # print(wb_sheet.cell_value(3,8))
+ for i in range(1, wb_sheet.nrows):
+ row = wb_sheet.row(i)
+
+ # time
+ time_str = row[3].value
+ time = self.tran_time(time_str)
+ self.user.total_time += time
+
+ # calling info
+ in_or_out = row[4].value
+ if in_or_out == '被叫':
+ number_in = row[5].value
+ if number_in not in self.user.number_in_dict:
+ self.user.number_in_dict[number_in] = 0
+ else:
+ self.user.number_in_dict[number_in] += 1
+ elif in_or_out == '主叫':
+ number_out = row[5].value
+ if number_out not in self.user.number_out_dict:
+ self.user.number_out_dict[number_out] = 0
+ else:
+ self.user.number_out_dict[number_out] += 1
+ for key, val in self.user.number_in_dict.items():
+ print('in', key, val)
+ for key, val in self.user.number_out_dict.items():
+ print('out', key, val)
+ # print(self.user.total_time)
+
+
+class User():
+
+ def __init__(self, name, num):
+ self.name = name
+ self.num = num
+ self.total_time = 0
+ self.most_call_out = ''
+ self.most_call_in = ''
+ self.number_in_dict = {}
+ self.number_out_dict = {}
+
+
+if __name__ == '__main__':
+ user0 = User('lwh', '13257584928')
+ analyzer_obj0 = Statistics(user0)
+ print('success.')
+
diff --git a/lwh/20/callinfo.py~ b/lwh/20/callinfo.py~
new file mode 100644
index 00000000..a00d58b0
--- /dev/null
+++ b/lwh/20/callinfo.py~
@@ -0,0 +1,62 @@
+import xlrd
+import xlwt
+
+
+class Statistics(object):
+
+ def __init__(self, user):
+ self.path_read = '/home/lwh/SublimeTextProject/CallInfo.xls'
+ self.path_save = '/home/lwh/SublimeTextProject/CallInfo(1).xls'
+ self.user = user
+ self.work()
+
+ # change all format of time to second
+ def tran_time(self, time_str):
+ time = time_str.replace('分','.').replace('秒','')
+ temp = time.split('.')
+ if len(temp) == 1: # just second
+ time = int(temp[0])
+ #print(time)
+ elif len(temp) == 2: # minute and second
+ m = int(temp[0]) * 60
+ s = int(temp[1])
+ time = m + s
+ #print(time)
+ return time
+
+
+ def work(self):
+ wb = xlrd.open_workbook(self.path_read)
+ sheets_list = wb.sheet_names()
+ for sheet_name in sheets_list:
+ wb_sheet = wb.sheet_by_name(sheet_name)
+ # print(wb_sheet)
+ # print(wb_sheet.nrows)
+ # print(wb_sheet.ncols)
+ # print(wb_sheet.cell_value(3,8))
+ for i in range(1, wb_sheet.nrows):
+ row = wb_sheet.row(i)
+ time_str = row[3].value
+ time = self.tran_time(time_str)
+ self.user.total_time += time
+ # print(each_time)
+ # self.user.total_time = row[]
+ print(self.user.total_time)
+
+class User():
+
+ def __init__(self, name, num):
+ self.name = name
+ self.num = num
+ self.total_time = 0
+ self.most_call_out = ''
+ self.most_call_in = ''
+ self.number_in_dict = ''
+ self.number_out_dict = ''
+
+
+if __name__ == '__main__':
+ user0 = User('lwh', '13257584928')
+ analyzer_obj0 = Statistics(user0)
+ print('success.')
+
diff --git a/lwh/21/encrpyt.py b/lwh/21/encrpyt.py
new file mode 100644
index 00000000..9d6ccaf3
--- /dev/null
+++ b/lwh/21/encrpyt.py
@@ -0,0 +1,24 @@
+from hashlib import sha256
+from hmac import HMAC
+import os
+
+
+class Encrypt(object):
+
+ def encrypt(self, password, salt=None):
+ if salt is None:
+ salt = os.urandom(8)
+ result = password.encode('utf-8')
+ for i in range(10):
+ result = HMAC(result, salt, sha256).digest()
+ return salt + result
+
+ def vaildate(self, password, hashed):
+ return hashed == self.encrypt(password, salt=hashed[:8])
+
+if __name__ == '__main__':
+ obj = Encrypt()
+ hashed = obj.encrypt('wh5622')
+ # print(bytes.decode(hashed))
+ ans = obj.vaildate('wh5622', hashed)
+ print(ans)
diff --git a/lwh/23MessageBoard/app/__init__.py b/lwh/23MessageBoard/app/__init__.py
new file mode 100644
index 00000000..b9357d3c
--- /dev/null
+++ b/lwh/23MessageBoard/app/__init__.py
@@ -0,0 +1,5 @@
+from flask import Flask
+
+app = Flask(__name__)
+
+from app import views
\ No newline at end of file
diff --git a/lwh/23MessageBoard/app/models.py b/lwh/23MessageBoard/app/models.py
new file mode 100644
index 00000000..e69de29b
diff --git a/lwh/23MessageBoard/app/static/brand.ico b/lwh/23MessageBoard/app/static/brand.ico
new file mode 100644
index 00000000..cde355d8
Binary files /dev/null and b/lwh/23MessageBoard/app/static/brand.ico differ
diff --git a/lwh/23MessageBoard/app/static/brand.jpg b/lwh/23MessageBoard/app/static/brand.jpg
new file mode 100644
index 00000000..e2710c9c
Binary files /dev/null and b/lwh/23MessageBoard/app/static/brand.jpg differ
diff --git a/lwh/23MessageBoard/app/templates/base.html b/lwh/23MessageBoard/app/templates/base.html
new file mode 100644
index 00000000..a1d62872
--- /dev/null
+++ b/lwh/23MessageBoard/app/templates/base.html
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {% block content %}
+ {% endblock %}
+
+
+
+
+
+
\ No newline at end of file
diff --git a/lwh/23MessageBoard/app/templates/handlemessage.html b/lwh/23MessageBoard/app/templates/handlemessage.html
new file mode 100644
index 00000000..d1992067
--- /dev/null
+++ b/lwh/23MessageBoard/app/templates/handlemessage.html
@@ -0,0 +1,4 @@
+{% extends 'base.html' %}
+{% block content %}
+留言失败,未定义相关处理函数
+{% endblock %}
\ No newline at end of file
diff --git a/lwh/23MessageBoard/app/templates/index.html b/lwh/23MessageBoard/app/templates/index.html
new file mode 100644
index 00000000..d12df5d6
--- /dev/null
+++ b/lwh/23MessageBoard/app/templates/index.html
@@ -0,0 +1,15 @@
+{% extends 'base.html' %}
+{% block title %}
+给lwh的留言板
+{% endblock %}
+{% block content %}
+
+ 名字:
+
+
+ 内容:
+
+
+ 留言
+
+{% endblock %}
\ No newline at end of file
diff --git a/lwh/23MessageBoard/app/views.py b/lwh/23MessageBoard/app/views.py
new file mode 100644
index 00000000..0f9ca6b3
--- /dev/null
+++ b/lwh/23MessageBoard/app/views.py
@@ -0,0 +1,10 @@
+from app import app
+from flask import render_template
+
+@app.route('/')
+def index():
+ return render_template('index.html')
+
+@app.route('/postmessage',methods=["POST",])
+def postMessage():
+ return render_template('handlemessage.html')
\ No newline at end of file
diff --git a/lwh/23MessageBoard/run.py b/lwh/23MessageBoard/run.py
new file mode 100644
index 00000000..e217d7f5
--- /dev/null
+++ b/lwh/23MessageBoard/run.py
@@ -0,0 +1,4 @@
+from app import app
+
+if __name__ == '__main__':
+ app.run(debug=True,port=5000)
\ No newline at end of file
diff --git a/lwh/4/test_doc.txt b/lwh/4/test_doc.txt
new file mode 100644
index 00000000..1062fa01
--- /dev/null
+++ b/lwh/4/test_doc.txt
@@ -0,0 +1,57 @@
+Stanford Report, June 14, 2005
+
+Youve got to find what you love, Jobs says
+
+This is the text of the Commencement address by Steve Jobs, CEO of Apple Computer and of Pixar Animation Studios, delivered on June 12, 2005.
+
+I am honored to be with you today at your commencement from one of the finest universities in the world. I never graduated from college. Truth be told, this is the closest Ive ever gotten to a college graduation. Today I want to tell you three stories from my life. Thats it. No big deal. Just three stories.
+
+The first story is about connecting the dots.
+
+I dropped out of Reed College after the first 6 months, but then stayed around as a drop-in for another 18 months or so before I really quit. So why did I drop out?
+
+It started before I was born. My biological mother was a young, unwed college graduate student, and she decided to put me up for adoption. She felt very strongly that I should be adopted by college graduates, so everything was all set for me to be adopted at birth by a lawyer and his wife. Except that when I popped out they decided at the last minute that they really wanted a girl. So my parents, who were on a waiting list, got a call in the middle of the night asking: We have an unexpected baby boy; do you want him? They said: Of course. My biological mother later found out that my mother had never graduated from college and that my father had never graduated from high school. She refused to sign the final adoption papers. She only relented a few months later when my parents promised that I would someday go to college.
+
+And 17 years later I did go to college. But I naively chose a college that was almost as expensive as Stanford, and all of my working-class parents savings were being spent on my college tuition. After six months, I couldnt see the value in it. I had no idea what I wanted to do with my life and no idea how college was going to help me figure it out. And here I was spending all of the money my parents had saved their entire life. So I decided to drop out and trust that it would all work out OK. It was pretty scary at the time, but looking back it was one of the best decisions I ever made. The minute I dropped out I could stop taking the required classes that didnt interest me, and begin dropping in on the ones that looked interesting.
+
+It wasnt all romantic. I didnt have a dorm room, so I slept on the floor in friends rooms, I returned coke bottles for the 5?? deposits to buy food with, and I would walk the 7 miles across town every Sunday night to get one good meal a week at the Hare Krishna temple. I loved it. And much of what I stumbled into by following my curiosity and intuition turned out to be priceless later on. Let me give you one example:
+
+Reed College at that time offered perhaps the best calligraphy instruction in the country. Throughout the campus every poster, every label on every drawer, was beautifully hand calligraphed. Because I had dropped out and didnt have to take the normal classes, I decided to take a calligraphy class to learn how to do this. I learned about serif and san serif typefaces, about varying the amount of space between different letter combinations, about what makes great typography great. It was beautiful, historical, artistically subtle in a way that science cant capture, and I found it fascinating.
+
+None of this had even a hope of any practical application in my life. But ten years later, when we were designing the first Macintosh computer, it all came back to me. And we designed it all into the Mac. It was the first computer with beautiful typography. If I had never dropped in on that single course in college, the Mac would have never had multiple typefaces or proportionally spaced fonts. And since Windows just copied the Mac, its likely that no personal computer would have them. If I had never dropped out, I would have never dropped in on this calligraphy class, and personal computers might not have the wonderful typography that they do. Of course it was impossible to connect the dots looking forward when I was in college. But it was very, very clear looking backwards ten years later.
+
+Again, you cant connect the dots looking forward; you can only connect them looking backwards. So you have to trust that the dots will somehow connect in your future. You have to trust in something C your gut, destiny, life, karma, whatever. This approach has never let me down, and it has made all the difference in my life.
+
+My second story is about love and loss.
+
+I was lucky C I found what I loved to do early in life. Woz and I started Apple in my parents garage when I was 20. We worked hard, and in 10 years Apple had grown from just the two of us in a garage into a $2 billion company with over 4000 employees. We had just released our finest creation C the Macintosh C a year earlier, and I had just turned 30. And then I got fired. How can you get fired from a company you started? Well, as Apple grew we hired someone who I thought was very talented to run the company with me, and for the first year or so things went well. But then our visions of the future began to diverge and eventually we had a falling out. When we did, our Board of Directors sided with him. So at 30 I was out. And very publicly out. What had been the focus of my entire adult life was gone, and it was devastating.
+
+I really didnt know what to do for a few months. I felt that I had let the previous generation of entrepreneurs down C that I had dropped the baton as it was being passed to me. I met with David Packard and Bob Noyce and tried to apologize for screwing up so badly. I was a very public failure, and I even thought about running away from the valley. But something slowly began to dawn on me C I still loved what I did. The turn of events at Apple had not changed that one bit. I had been rejected, but I was still in love. And so I decided to start over.
+
+I didnt see it then, but it turned out that getting fired from Apple was the best thing that could have ever happened to me. The heaviness of being successful was replaced by the lightness of being a beginner again, less sure about everything. It freed me to enter one of the most creative periods of my life.
+
+During the next five years, I started a company named NeXT, another company named Pixar, and fell in love with an amazing woman who would become my wife. Pixar went on to create the worlds first computer animated feature film, Toy Story, and is now the most successful animation studio in the world. In a remarkable turn of events, Apple bought NeXT, I retuned to Apple, and the technology we developed at NeXT is at the heart of Apples current renaissance. And Laurene and I have a wonderful family together.
+
+Im pretty sure none of this would have happened if I hadnt been fired from Apple. It was awful tasting medicine, but I guess the patient needed it. Sometimes life hits you in the head with a brick. Dont lose faith. Im convinced that the only thing that kept me going was that I loved what I did. Youve got to find what you love. And that is as true for your work as it is for your lovers. Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work. And the only way to do great work is to love what you do. If you havent found it yet, keep looking. Dont settle. As with all matters of the heart, youll know when you find it. And, like any great relationship, it just gets better and better as the years roll on. So keep looking until you find it. Dont settle.
+
+My third story is about death.
+
+When I was 17, I read a quote that went something like: If you live each day as if it was your last, someday youll most certainly be right. It made an impression on me, and since then, for the past 33 years, I have looked in the mirror every morning and asked myself: If today were the last day of my life, would I want to do what I am about to do today? And whenever the answer has been No for too many days in a row, I know I need to change something.
+
+Remembering that Ill be dead soon is the most important tool Ive ever encountered to help me make the big choices in life. Because almost everything C all external expectations, all pride, all fear of embarrassment or failure C these things just fall away in the face of death, leaving only what is truly important. Remembering that you are going to die is the best way I know to avoid the trap of thinking you have something to lose. You are already naked. There is no reason not to follow your heart.
+
+About a year ago I was diagnosed with cancer. I had a scan at 7:30 in the morning, and it clearly showed a tumor on my pancreas. I didnt even know what a pancreas was. The doctors told me this was almost certainly a type of cancer that is incurable, and that I should expect to live no longer than three to six months. My doctor advised me to go home and get my affairs in order, which is doctors code for prepare to die. It means to try to tell your kids everything you thought youd have the next 10 years to tell them in just a few months. It means to make sure everything is buttoned up so that it will be as easy as possible for your family. It means to say your goodbyes.
+
+I lived with that diagnosis all day. Later that evening I had a biopsy, where they stuck an endoscope down my throat, through my stomach and into my intestines, put a needle into my pancreas and got a few cells from the tumor. I was sedated, but my wife, who was there, told me that when they viewed the cells under a microscope the doctors started crying because it turned out to be a very rare form of pancreatic cancer that is curable with surgery. I had the surgery and Im fine now.
+
+This was the closest Ive been to facing death, and I hope its the closest I get for a few more decades. Having lived through it, I can now say this to you with a bit more certainty than when death was a useful but purely intellectual concept:
+
+No one wants to die. Even people who want to go to heaven dont want to die to get there. And yet death is the destination we all share. No one has ever escaped it. And that is as it should be, because Death is very likely the single best invention of Life. It is Lifes change agent. It clears out the old to make way for the new. Right now the new is you, but someday not too long from now, you will gradually become the old and be cleared away. Sorry to be so dramatic, but it is quite true.
+
+Your time is limited, so dont waste it living someone elses life. Dont be trapped by dogma C which is living with the results of other peoples thinking. Dont let the noise of others opinions drown out your own inner voice. And most important, have the courage to follow your heart and intuition. They somehow already know what you truly want to become. Everything else is secondary.
+
+When I was young, there was an amazing publication called The Whole Earth Catalog, which was one of the bibles of my generation. It was created by a fellow named Stewart Brand not far from here in Menlo Park, and he brought it to life with his poetic touch. This was in the late 1960s, before personal computers and desktop publishing, so it was all made with typewriters, scissors, and polaroid cameras. It was sort of like Google in paperback form, 35 years before Google came along: it was idealistic, and overflowing with neat tools and great notions.
+
+Stewart and his team put out several issues of The Whole Earth Catalog, and then when it had run its course, they put out a final issue. It was the mid-1970s, and I was your age. On the back cover of their final issue was a photograph of an early morning country road, the kind you might find yourself hitchhiking on if you were so adventurous. Beneath it were the words: Stay Hungry. Stay Foolish. It was their farewell message as they signed off. Stay Hungry. Stay Foolish. And I have always wished that for myself. And now, as you graduate to begin anew, I wish that for you.
+
+Stay Hungry. Stay Foolish.
\ No newline at end of file
diff --git a/lwh/4/word_counter.py b/lwh/4/word_counter.py
new file mode 100644
index 00000000..5d3c539c
--- /dev/null
+++ b/lwh/4/word_counter.py
@@ -0,0 +1,19 @@
+import re
+#import collections.Counter
+from collections import Counter
+
+with open("test_doc.txt", "r") as file_obj:
+
+ cont = file_obj.read()
+
+ # 正则匹配精准度更高.使用切片会出现无法切换行符的情况
+ re_cont = re.compile(r"[a-zA-Z]+")
+ word_cont = re_cont.findall(cont)
+ cnt = Counter(word_cont)
+ print(cnt.most_common())
+
+ while True:
+ s = input("enter the key")
+ if s == "":
+ break
+ print(word_dict[s])
diff --git a/lwh/6/import_word.py b/lwh/6/import_word.py
new file mode 100644
index 00000000..7ba5d09a
--- /dev/null
+++ b/lwh/6/import_word.py
@@ -0,0 +1,17 @@
+import os
+import re
+from collections import Counter
+from os.path import join, getsize
+
+root_dir = os.getcwd() + "\\myrecord"
+
+
+for root, dirs, files in os.walk(root_dir):
+ for i in files:
+ with open(root_dir + "\\" + i, "r") as f:
+ cont = f.read()
+ # print(cont)
+ re_cont = re.compile(r"[a-zA-Z]+")
+ word_cont = re_cont.findall(cont)
+ cnt = Counter(word_cont)
+ print(cnt.most_common(1))
diff --git a/lwh/6/myrecord/BillGate.txt b/lwh/6/myrecord/BillGate.txt
new file mode 100644
index 00000000..8db0910c
--- /dev/null
+++ b/lwh/6/myrecord/BillGate.txt
@@ -0,0 +1,142 @@
+President Bok, former President Rudenstine, incoming President Faust, members of the Harvard Corporation and the Board of Overseers, members of the faculty, parents, and especially, the graduates:
+
+Ive been waiting more than 30 years to say this: Dad, I always told you Id come back and get my degree.
+
+I want to thank Harvard for this timely honor. Ill be changing my job next year and it will be nice to finally have a college degree on my resume.
+
+I applaud the graduates today for taking a much more direct route to your degrees. For my part, Im just happy that the Crimson has called me Harvards most successful dropout. I guess that makes me valedictorian of my own special class I did the best of everyone who failed.
+
+But I also want to be recognized as the guy who got Steve Ballmer to drop out of business school. Im a bad influence. Thats why I was invited to speak at your graduation. If I had spoken at your orientation, fewer of you might be here today.
+
+Harvard was just a phenomenal experience for me. Academic life was fascinating. I used to sit in on lots of classes I hadnt even signed up for. And dorm life was terrific. I lived up at Radcliffe, in Currier House. There were always lots of people in my dorm room late at night discussing things, because everyone knew I didnt worry about getting up in the morning. Thats how I came to be the leader of the anti-social group. We clung to each other as a way of validating our rejection of all those social people.
+
+Radcliffe was a great place to live. There were more women up there, and most of the guys were science-math types. That combination offered me the best odds, if you know what I mean. This is where I learned the sad lesson that improving your odds doesnt guarantee success.
+
+One of my biggest memories of Harvard came in January 1975, when I made a call from Currier House to a company in Albuquerque that had begun making the worlds first personal computers. I offered to sell them software.
+
+I worried that they would realize I was just a student in a dorm and hang up on me. Instead they said: Were not quite ready, come see us in a month, which was a good thing, because we hadnt written the software yet. From that moment, I worked day and night on this little extra credit project that marked the end of my college education and the beginning of a remarkable journey with Microsoft.
+
+What I remember above all about Harvard was being in the midst of so much energy and intelligence. It could be exhilarating, intimidating, sometimes even discouraging, but always challenging. It was an amazing privilege C and though I left early, I was transformed by my years at Harvard, the friendships I made, and the ideas I worked on.
+
+But taking a serious look back I do have one big regret.
+
+I left Harvard with no real awareness of the awful inequities in the world C the appalling disparities of health, and wealth, and opportunity that condemn millions of people to lives of despair.
+
+I learned a lot here at Harvard about new ideas in economics and politics. I got great exposure to the advances being made in the sciences.
+
+But humanitys greatest advances are not in its discoveries C but in how those discoveries are applied to reduce inequity. Whether through democracy, strong public education, quality health care, or broad economic opportunity C reducing inequity is the highest human achievement.
+
+I left campus knowing little about the millions of young people cheated out of educational opportunities here in this country. And I knew nothing about the millions of people living in unspeakable poverty and disease in developing countries.
+
+It took me decades to find out.
+
+You graduates came to Harvard at a different time. You know more about the worlds inequities than the classes that came before. In your years here, I hope youve had a chance to think about how C in this age of accelerating technology C we can finally take on these inequities, and we can solve them.
+
+Imagine, just for the sake of discussion, that you had a few hours a week and a few dollars a month to donate to a cause C and you wanted to spend that time and money where it would have the greatest impact in saving and improving lives. Where would you spend it?
+
+For Melinda and for me, the challenge is the same: how can we do the most good for the greatest number with the resources we have.
+
+During our discussions on this question, Melinda and I read an article about the millions of children who were dying every year in poor countries from diseases that we had long ago made harmless in this country. Measles, malaria, pneumonia, hepatitis B, yellow fever. One disease I had never even heard of, rotavirus, was killing half a million kids each year C none of them in the United States.
+
+We were shocked. We had just assumed that if millions of children were dying and they could be saved, the world would make it a priority to discover and deliver the medicines to save them. But it did not. For under a dollar, there were interventions that could save lives that just werent being delivered.
+
+If you believe that every life has equal value, its revolting to learn that some lives are seen as worth saving and others are not. We said to ourselves: This cant be true. But if it is true, it deserves to be the priority of our giving.
+
+So we began our work in the same way anyone here would begin it. We asked: How could the world let these children die?
+
+The answer is simple, and harsh. The market did not reward saving the lives of these children, and governments did not subsidize it. So the children died because their mothers and their fathers had no power in the market and no voice in the system.
+
+But you and I have both.
+
+We can make market forces work better for the poor if we can develop a more creative capitalism C if we can stretch the reach of market forces so that more people can make a profit, or at least make a living, serving people who are suffering from the worst inequities. We also can press governments around the world to spend taxpayer money in ways that better reflect the values of the people who pay the taxes.
+
+If we can find approaches that meet the needs of the poor in ways that generate profits for business and votes for politicians, we will have found a sustainable way to reduce inequity in the world.
+This task is open-ended. It can never be finished. But a conscious effort to answer this challenge will change the world.
+
+I am optimistic that we can do this, but I talk to skeptics who claim there is no hope. They say: Inequity has been with us since the beginning, and will be with us till the end C because people just dont care.
+I completely disagree.
+
+I believe we have more caring than we know what to do with.
+
+All of us here in this Yard, at one time or another, have seen human tragedies that broke our hearts, and yet we did nothing C not because we didnt care, but because we didnt know what to do. If we had known how to help, we would have acted.
+
+The barrier to change is not too little caring; it is too much complexity.
+
+To turn caring into action, we need to see a problem, see a solution, and see the impact. But complexity blocks all three steps.
+
+Even with the advent of the Internet and 24-hour news, it is still a complex enterprise to get people to truly see the problems. When an airplane crashes, officials immediately call a press conference. They promise to investigate, determine the cause, and prevent similar crashes in the future.
+
+But if the officials were brutally honest, they would say: Of all the people in the world who died today from preventable causes, one half of one percent of them were on this plane. Were determined to do everything possible to solve the problem that took the lives of the one half of one percent.
+
+The bigger problem is not the plane crash, but the millions of preventable deaths.
+
+We dont read much about these deaths. The media covers whats new C and millions of people dying is nothing new. So it stays in the background, where its easier to ignore. But even when we do see it or read about it, its difficult to keep our eyes on the problem. Its hard to look at suffering if the situation is so complex that we dont know how to help. And so we look away.
+
+If we can really see a problem, which is the first step, we come to the second step: cutting through the complexity to find a solution.
+
+Finding solutions is essential if we want to make the most of our caring. If we have clear and proven answers anytime an organization or individual asks How can I help?, then we can get action C and we can make sure that none of the caring in the world is wasted. But complexity makes it hard to mark a path of action for everyone who cares and that makes it hard for their caring to matter.
+
+Cutting through complexity to find a solution runs through four predictable stages: determine a goal, find the highest-leverage approach, discover the ideal technology for that approach, and in the meantime, make the smartest application of the technology that you already have whether its something sophisticated, like a drug, or something simpler, like a bednet.
+
+The AIDS epidemic offers an example. The broad goal, of course, is to end the disease. The highest-leverage approach is prevention. The ideal technology would be a vaccine that gives lifetime immunity with a single dose. So governments, drug companies, and foundations fund vaccine research. But their work is likely to take more than a decade, so in the meantime, we have to work with what we have in hand C and the best prevention approach we have now is getting people to avoid risky behavior.
+
+Pursuing that goal starts the four-step cycle again. This is the pattern. The crucial thing is to never stop thinking and working C and never do what we did with malaria and tuberculosis in the 20th century C which is to surrender to complexity and quit.
+
+The final step C after seeing the problem and finding an approach C is to measure the impact of your work and share your successes and failures so that others learn from your efforts.
+
+You have to have the statistics, of course. You have to be able to show that a program is vaccinating millions more children. You have to be able to show a decline in the number of children dying from these diseases. This is essential not just to improve the program, but also to help draw more investment from business and government.
+
+But if you want to inspire people to participate, you have to show more than numbers; you have to convey the human impact of the work C so people can feel what saving a life means to the families affected.
+
+I remember going to Davos some years back and sitting on a global health panel that was discussing ways to save millions of lives. Millions! Think of the thrill of saving just one persons life C then multiply that by millions. Yet this was the most boring panel Ive ever been on C ever. So boring even I couldnt bear it.
+
+What made that experience especially striking was that I had just come from an event where we were introducing version 13 of some piece of software, and we had people jumping and shouting with excitement. I love getting people excited about software C but why cant we generate even more excitement for saving lives?
+
+You cant get people excited unless you can help them see and feel the impact. And how you do that C is a complex question.
+
+Still, Im optimistic. Yes, inequity has been with us forever, but the new tools we have to cut through complexity have not been with us forever. They are new C they can help us make the most of our caring C and thats why the future can be different from the past.
+
+The defining and ongoing innovations of this age C biotechnology, the computer, the Internet C give us a chance weve never had before to end extreme poverty and end death from preventable disease.
+
+Sixty years ago, George Marshall came to this commencement and announced a plan to assist the nations of post-war Europe. He said: I think one difficulty is that the problem is one of such enormous complexity that the very mass of facts presented to the public by press and radio make it exceedingly difficult for the man in the street to reach a clear appraisement of the situation. It is virtually impossible at this distance to grasp at all the real significance of the situation.
+
+Thirty years after Marshall made his address, as my class graduated without me, technology was emerging that would make the world smaller, more open, more visible, less distant.
+
+The emergence of low-cost personal computers gave rise to a powerful network that has transformed opportunities for learning and communicating.
+
+The magical thing about this network is not just that it collapses distance and makes everyone your neighbor. It also dramatically increases the number of brilliant minds we can have working together on the same problem C and that scales up the rate of innovation to a staggering degree.
+
+At the same time, for every person in the world who has access to this technology, five people dont. That means many creative minds are left out of this discussion smart people with practical intelligence and relevant experience who dont have the technology to hone their talents or contribute their ideas to the world.
+
+We need as many people as possible to have access to this technology, because these advances are triggering a revolution in what human beings can do for one another. They are making it possible not just for national governments, but for universities, corporations, smaller organizations, and even individuals to see problems, see approaches, and measure the impact of their efforts to address the hunger, poverty, and desperation George Marshall spoke of 60 years ago.
+
+Members of the Harvard Family: Here in the Yard is one of the great collections of intellectual talent in the world.
+
+What for?
+
+There is no question that the faculty, the alumni, the students, and the benefactors of Harvard have used their power to improve the lives of people here and around the world. But can we do more? Can Harvard dedicate its intellect to improving the lives of people who will never even hear its name?
+
+Let me make a request of the deans and the professors C the intellectual leaders here at Harvard: As you hire new faculty, award tenure, review curriculum, and determine degree requirements, please ask yourselves:
+
+Should our best minds be dedicated to solving our biggest problems?
+
+Should Harvard encourage its faculty to take on the worlds worst inequities? Should Harvard students learn about the depth of global poverty the prevalence of world hunger the scarcity of clean water the girls kept out of school the children who die from diseases we can cure?
+
+Should the worlds most privileged people learn about the lives of the worlds least privileged?
+
+These are not rhetorical questions C you will answer with your policies.
+
+My mother, who was filled with pride the day I was admitted here C never stopped pressing me to do more for others. A few days before my wedding, she hosted a bridal event, at which she read aloud a letter about marriage that she had written to Melinda. My mother was very ill with cancer at the time, but she saw one more opportunity to deliver her message, and at the close of the letter she said: From those to whom much is given, much is expected.
+
+When you consider what those of us here in this Yard have been given C in talent, privilege, and opportunity C there is almost no limit to what the world has a right to expect from us.
+
+In line with the promise of this age, I want to exhort each of the graduates here to take on an issue C a complex problem, a deep inequity, and become a specialist on it. If you make it the focus of your career, that would be phenomenal. But you dont have to do that to make an impact. For a few hours every week, you can use the growing power of the Internet to get informed, find others with the same interests, see the barriers, and find ways to cut through them.
+
+Dont let complexity stop you. Be activists. Take on the big inequities. It will be one of the great experiences of your lives.
+
+You graduates are coming of age in an amazing time. As you leave Harvard, you have technology that members of my class never had. You have awareness of global inequity, which we did not have. And with that awareness, you likely also have an informed conscience that will torment you if you abandon these people whose lives you could change with very little effort.
+You have more than we had; you must start sooner, and carry on longer.
+
+Knowing what you know, how could you not?
+
+And I hope you will come back here to Harvard 30 years from now and reflect on what you have done with your talent and your energy. I hope you will judge yourselves not on your professional accomplishments alone, but also on how well you have addressed the worlds deepest inequities on how well you treated people a world away who have nothing in common with you but their humanity.
\ No newline at end of file
diff --git a/lwh/6/myrecord/SteveJob.txt b/lwh/6/myrecord/SteveJob.txt
new file mode 100644
index 00000000..1062fa01
--- /dev/null
+++ b/lwh/6/myrecord/SteveJob.txt
@@ -0,0 +1,57 @@
+Stanford Report, June 14, 2005
+
+Youve got to find what you love, Jobs says
+
+This is the text of the Commencement address by Steve Jobs, CEO of Apple Computer and of Pixar Animation Studios, delivered on June 12, 2005.
+
+I am honored to be with you today at your commencement from one of the finest universities in the world. I never graduated from college. Truth be told, this is the closest Ive ever gotten to a college graduation. Today I want to tell you three stories from my life. Thats it. No big deal. Just three stories.
+
+The first story is about connecting the dots.
+
+I dropped out of Reed College after the first 6 months, but then stayed around as a drop-in for another 18 months or so before I really quit. So why did I drop out?
+
+It started before I was born. My biological mother was a young, unwed college graduate student, and she decided to put me up for adoption. She felt very strongly that I should be adopted by college graduates, so everything was all set for me to be adopted at birth by a lawyer and his wife. Except that when I popped out they decided at the last minute that they really wanted a girl. So my parents, who were on a waiting list, got a call in the middle of the night asking: We have an unexpected baby boy; do you want him? They said: Of course. My biological mother later found out that my mother had never graduated from college and that my father had never graduated from high school. She refused to sign the final adoption papers. She only relented a few months later when my parents promised that I would someday go to college.
+
+And 17 years later I did go to college. But I naively chose a college that was almost as expensive as Stanford, and all of my working-class parents savings were being spent on my college tuition. After six months, I couldnt see the value in it. I had no idea what I wanted to do with my life and no idea how college was going to help me figure it out. And here I was spending all of the money my parents had saved their entire life. So I decided to drop out and trust that it would all work out OK. It was pretty scary at the time, but looking back it was one of the best decisions I ever made. The minute I dropped out I could stop taking the required classes that didnt interest me, and begin dropping in on the ones that looked interesting.
+
+It wasnt all romantic. I didnt have a dorm room, so I slept on the floor in friends rooms, I returned coke bottles for the 5?? deposits to buy food with, and I would walk the 7 miles across town every Sunday night to get one good meal a week at the Hare Krishna temple. I loved it. And much of what I stumbled into by following my curiosity and intuition turned out to be priceless later on. Let me give you one example:
+
+Reed College at that time offered perhaps the best calligraphy instruction in the country. Throughout the campus every poster, every label on every drawer, was beautifully hand calligraphed. Because I had dropped out and didnt have to take the normal classes, I decided to take a calligraphy class to learn how to do this. I learned about serif and san serif typefaces, about varying the amount of space between different letter combinations, about what makes great typography great. It was beautiful, historical, artistically subtle in a way that science cant capture, and I found it fascinating.
+
+None of this had even a hope of any practical application in my life. But ten years later, when we were designing the first Macintosh computer, it all came back to me. And we designed it all into the Mac. It was the first computer with beautiful typography. If I had never dropped in on that single course in college, the Mac would have never had multiple typefaces or proportionally spaced fonts. And since Windows just copied the Mac, its likely that no personal computer would have them. If I had never dropped out, I would have never dropped in on this calligraphy class, and personal computers might not have the wonderful typography that they do. Of course it was impossible to connect the dots looking forward when I was in college. But it was very, very clear looking backwards ten years later.
+
+Again, you cant connect the dots looking forward; you can only connect them looking backwards. So you have to trust that the dots will somehow connect in your future. You have to trust in something C your gut, destiny, life, karma, whatever. This approach has never let me down, and it has made all the difference in my life.
+
+My second story is about love and loss.
+
+I was lucky C I found what I loved to do early in life. Woz and I started Apple in my parents garage when I was 20. We worked hard, and in 10 years Apple had grown from just the two of us in a garage into a $2 billion company with over 4000 employees. We had just released our finest creation C the Macintosh C a year earlier, and I had just turned 30. And then I got fired. How can you get fired from a company you started? Well, as Apple grew we hired someone who I thought was very talented to run the company with me, and for the first year or so things went well. But then our visions of the future began to diverge and eventually we had a falling out. When we did, our Board of Directors sided with him. So at 30 I was out. And very publicly out. What had been the focus of my entire adult life was gone, and it was devastating.
+
+I really didnt know what to do for a few months. I felt that I had let the previous generation of entrepreneurs down C that I had dropped the baton as it was being passed to me. I met with David Packard and Bob Noyce and tried to apologize for screwing up so badly. I was a very public failure, and I even thought about running away from the valley. But something slowly began to dawn on me C I still loved what I did. The turn of events at Apple had not changed that one bit. I had been rejected, but I was still in love. And so I decided to start over.
+
+I didnt see it then, but it turned out that getting fired from Apple was the best thing that could have ever happened to me. The heaviness of being successful was replaced by the lightness of being a beginner again, less sure about everything. It freed me to enter one of the most creative periods of my life.
+
+During the next five years, I started a company named NeXT, another company named Pixar, and fell in love with an amazing woman who would become my wife. Pixar went on to create the worlds first computer animated feature film, Toy Story, and is now the most successful animation studio in the world. In a remarkable turn of events, Apple bought NeXT, I retuned to Apple, and the technology we developed at NeXT is at the heart of Apples current renaissance. And Laurene and I have a wonderful family together.
+
+Im pretty sure none of this would have happened if I hadnt been fired from Apple. It was awful tasting medicine, but I guess the patient needed it. Sometimes life hits you in the head with a brick. Dont lose faith. Im convinced that the only thing that kept me going was that I loved what I did. Youve got to find what you love. And that is as true for your work as it is for your lovers. Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work. And the only way to do great work is to love what you do. If you havent found it yet, keep looking. Dont settle. As with all matters of the heart, youll know when you find it. And, like any great relationship, it just gets better and better as the years roll on. So keep looking until you find it. Dont settle.
+
+My third story is about death.
+
+When I was 17, I read a quote that went something like: If you live each day as if it was your last, someday youll most certainly be right. It made an impression on me, and since then, for the past 33 years, I have looked in the mirror every morning and asked myself: If today were the last day of my life, would I want to do what I am about to do today? And whenever the answer has been No for too many days in a row, I know I need to change something.
+
+Remembering that Ill be dead soon is the most important tool Ive ever encountered to help me make the big choices in life. Because almost everything C all external expectations, all pride, all fear of embarrassment or failure C these things just fall away in the face of death, leaving only what is truly important. Remembering that you are going to die is the best way I know to avoid the trap of thinking you have something to lose. You are already naked. There is no reason not to follow your heart.
+
+About a year ago I was diagnosed with cancer. I had a scan at 7:30 in the morning, and it clearly showed a tumor on my pancreas. I didnt even know what a pancreas was. The doctors told me this was almost certainly a type of cancer that is incurable, and that I should expect to live no longer than three to six months. My doctor advised me to go home and get my affairs in order, which is doctors code for prepare to die. It means to try to tell your kids everything you thought youd have the next 10 years to tell them in just a few months. It means to make sure everything is buttoned up so that it will be as easy as possible for your family. It means to say your goodbyes.
+
+I lived with that diagnosis all day. Later that evening I had a biopsy, where they stuck an endoscope down my throat, through my stomach and into my intestines, put a needle into my pancreas and got a few cells from the tumor. I was sedated, but my wife, who was there, told me that when they viewed the cells under a microscope the doctors started crying because it turned out to be a very rare form of pancreatic cancer that is curable with surgery. I had the surgery and Im fine now.
+
+This was the closest Ive been to facing death, and I hope its the closest I get for a few more decades. Having lived through it, I can now say this to you with a bit more certainty than when death was a useful but purely intellectual concept:
+
+No one wants to die. Even people who want to go to heaven dont want to die to get there. And yet death is the destination we all share. No one has ever escaped it. And that is as it should be, because Death is very likely the single best invention of Life. It is Lifes change agent. It clears out the old to make way for the new. Right now the new is you, but someday not too long from now, you will gradually become the old and be cleared away. Sorry to be so dramatic, but it is quite true.
+
+Your time is limited, so dont waste it living someone elses life. Dont be trapped by dogma C which is living with the results of other peoples thinking. Dont let the noise of others opinions drown out your own inner voice. And most important, have the courage to follow your heart and intuition. They somehow already know what you truly want to become. Everything else is secondary.
+
+When I was young, there was an amazing publication called The Whole Earth Catalog, which was one of the bibles of my generation. It was created by a fellow named Stewart Brand not far from here in Menlo Park, and he brought it to life with his poetic touch. This was in the late 1960s, before personal computers and desktop publishing, so it was all made with typewriters, scissors, and polaroid cameras. It was sort of like Google in paperback form, 35 years before Google came along: it was idealistic, and overflowing with neat tools and great notions.
+
+Stewart and his team put out several issues of The Whole Earth Catalog, and then when it had run its course, they put out a final issue. It was the mid-1970s, and I was your age. On the back cover of their final issue was a photograph of an early morning country road, the kind you might find yourself hitchhiking on if you were so adventurous. Beneath it were the words: Stay Hungry. Stay Foolish. It was their farewell message as they signed off. Stay Hungry. Stay Foolish. And I have always wished that for myself. And now, as you graduate to begin anew, I wish that for you.
+
+Stay Hungry. Stay Foolish.
\ No newline at end of file
diff --git a/lwh/6/myrecord/exp.txt b/lwh/6/myrecord/exp.txt
new file mode 100644
index 00000000..912b6d3c
--- /dev/null
+++ b/lwh/6/myrecord/exp.txt
@@ -0,0 +1,23 @@
+This course will be beneficial if you wish to learn how to communicate with the sounds and music of American English. The purpose is not to increase your vocabulary, nor to improve your grammar, but to deal with the sounds of the words that you speak. Your message is of primary importance, but it may not be understood if your pronunciation is imprecise, inconsistent, or regional. This course is particularly useful for actors or for others who need to speak to diverse audiences, such as when giving a business presentation.
+
+You will have the flexibility of time to experience, at your own pace, aural and visual aspects of a sound. Within the course, students are assessed on their ability to recognize each sound in a variety of contexts and are given feedback on their particular answers.
+
+You will learn to:
+
+Articulate sounds and words using the dialect of Standard American English.
+Listen and think in terms of symbols for sounds, using the International Phonetic Alphabet.
+Use the International Phonetic Alphabet to transcribe from the Roman alphabet into the forty-four sounds of Standard American Dialect and vice versa.
+Analyze texts for phrasing, operative words, intonational patterns, degrees of stress.
+Achieve a proper use of weak forms for certain parts of speech in the English Language, making your speech clear and efficient.
+Additional Course Details
+Topics Covered: Foundations of Speech, Intonational Patterning of American English, Vowels, Dipthongs, Consonants (coming soon), Weak Forms. Additional Software or Materials Required: You will need to have Flash and Quicktime installed. These programs are free. More detailed information is provided in the course under Test and Configure Your System. Maintenance Fee (per student): Free for both independent learners and academic students.
+In-Depth Description
+In the context of effective speech, Standard American refers to a single standard, devoid of regional influences. Few people in the U.S. grow up speaking Standard American English Dialect; geography plays a major role in the way people speak. An accent or a dialect that could interfere with a clear exchange of ideas with those using a differing dialect or accent.
+
+It is true that there is no official standard, but there is an understood range of acceptability for American English. As a professor of speech for actors, Baker-Shirer aims to teach a manner of speech that communicates the content of words with clarity and consistency.
+
+Standard American is not a judgment of value; none of the numerous American dialects is superior to the others. Instead it is a standard for clear, consistent speech recognizable to listeners across dialects. It does not burden the listener with the extra cognitive load of filtering out regional differences before reaching the meaning or intent of the speaker. Speaking Standard American dialect means speaking English that will sound Americansimple, unaffected and distinct, devoid of regional influences.
+
+This course is divided into six sections or units:
+
+Foundations of Speech This first unit of the course is an overview of some of the basic concepts that will lay a foundation for your study of the Standard American English dialect. These concepts include sound identification, voiced and voiceless sounds, syllabification, and aspiration and unaspiration of the three stop-plosive consonant groups. Intonational Patterning of American English The next unit of this course attends to the music of Standard American English Dialect and is most essential to support and increase meaning. The techniques involved in successful vocal dynamics include: vocal range, tempo, pacing, inflection and pausing. Vowels The vowels unit will introduce you to the pure vowel sounds of the dialect. As the tone carriers, vowels are an important part of your speech, and there is a great deal of subtlety between some of these sounds. Here we will introduce you to the fifteen vowel sounds of the dialect in three categories, front, mid, and back vowels. Diphthongs This unit will build on what you learned in the vowels unit by introducing the ten diphthongs of the dialect. In the Standard American English Dialect there are five so-called long diphthongs and five always short diphthongs of r. Consonants (Coming Soon) This unit introduces the second big component of speech, consonants. These are sounds that interrupt or change the sound coming from the vocal tract. They are described according to vibration, the place and manner of articulation. There are sixteen voiced consonants and ten voiceless consonants in Standard American English Dialect. Weak Forms The weak forms unit will introduce you to the concept of stress in speech. More specifically, weak forms of certain words in the English language exist to increase clarity and understanding while subordinating the inessential. The following parts of speech are usually weakened in continuous speech: articles, conjunctions, auxiliary verbs, personal pronouns and prepositions.
\ No newline at end of file
diff --git a/lwh/7/line_counter.py b/lwh/7/line_counter.py
new file mode 100644
index 00000000..03edf7e8
--- /dev/null
+++ b/lwh/7/line_counter.py
@@ -0,0 +1,58 @@
+"""
+ 有个目录,里面是你自己写过的程序,统计一下你写过多少行代码。
+ 包括空行和注释,但是要分别列出来。
+"""
+# -*- coding:gbk -*-
+import os
+import re
+
+root_dir = os.getcwd() + "/卢炜豪"
+os.chdir(root_dir)
+
+code_count = 0
+note_count = 0
+
+
+def isnote(line):
+ line = line.strip()
+ #print(line, line_count)
+ if len(line) >= 2:
+ # print("***")
+ #print("&&&", line[0], line[1])
+ if line[0] == 47 and line[1] == 47:
+ return "//"
+ elif line[0] == 47 and line[1] == 42:
+ return "/*"
+ else:
+ return "no"
+
+for parent, dirnames, filenames in os.walk(root_dir):
+ #print(parent, filenames)
+ # print(dirname)
+
+ for filename in filenames:
+ os.chdir(parent)
+ # print(filename)
+ # print(parent)
+ with open(filename, "rb") as f:
+ line = f.readline().strip()
+ while line != b"":
+ # print("*")
+ ret = isnote(line)
+ # print(ret)
+ if ret == "//":
+ note_count = note_count + 1
+ elif ret == "/*":
+ line = f.readline().strip()
+ # print(line)
+ # if len(line) >= 2:
+ while b"*/" in line:
+ note_count = note_count + 1
+ line = f.readline().strip()
+ # print(line)
+ elif ret == "no":
+ code_count = code_count + 1
+ line = f.readline().strip()
+
+print("代码行数:%d" % code_count)
+print("注释函数 %d" % note_count)
diff --git a/messyidea/0000/0000.py b/messyidea/0000/0000.py
new file mode 100644
index 00000000..89675ecf
--- /dev/null
+++ b/messyidea/0000/0000.py
@@ -0,0 +1,10 @@
+# -*- coding: utf-8 -*-
+import Image, ImageDraw, ImageFont
+
+org = Image.open('./origin.jpg')
+draw = ImageDraw.Draw(org)
+w, h = org.size
+fontsize = min(w, h) / 4
+font = ImageFont.truetype('GenBkBasI.ttf', fontsize)
+draw.text((w - fontsize, 0), '3', font = font, fill = (255, 0, 0))
+org.save('rst.jpg', 'jpeg')
diff --git a/messyidea/0000/GenBkBasI.ttf b/messyidea/0000/GenBkBasI.ttf
new file mode 100644
index 00000000..c62506b1
Binary files /dev/null and b/messyidea/0000/GenBkBasI.ttf differ
diff --git a/messyidea/0000/origin.jpg b/messyidea/0000/origin.jpg
new file mode 100644
index 00000000..9586997f
Binary files /dev/null and b/messyidea/0000/origin.jpg differ
diff --git a/messyidea/0000/rst.jpg b/messyidea/0000/rst.jpg
new file mode 100644
index 00000000..82885a04
Binary files /dev/null and b/messyidea/0000/rst.jpg differ
diff --git a/messyidea/0001/0001.py b/messyidea/0001/0001.py
new file mode 100644
index 00000000..b7202cba
--- /dev/null
+++ b/messyidea/0001/0001.py
@@ -0,0 +1,19 @@
+# -*- coding: utf-8 -*-
+import uuid
+
+def gen( num):
+ assert isinstance(num, int) == True
+ assert num > 0
+ rst = []
+ while True:
+ temp = str(uuid.uuid1()).replace('-', '')
+ if temp not in rst:
+ rst.append(temp)
+ num = num - 1
+ if num == 0:
+ break
+ return rst
+
+rst = gen(200)
+for i in rst:
+ print i
diff --git a/messyidea/0002/0002.py b/messyidea/0002/0002.py
new file mode 100644
index 00000000..f5ff2f6a
--- /dev/null
+++ b/messyidea/0002/0002.py
@@ -0,0 +1,40 @@
+# -*- coding: utf-8 -*-
+import uuid
+import MySQLdb
+
+def gen( num):
+ assert isinstance(num, int) == True
+ assert num > 0
+ rst = []
+ while True:
+ temp = str(uuid.uuid1()).replace('-', '')
+ if temp not in rst:
+ rst.append(temp)
+ num = num - 1
+ if num == 0:
+ break
+ return rst
+
+rst = gen(200)
+for i in rst:
+ print i
+
+try:
+ conn=MySQLdb.connect(host='localhost',user='root',passwd='root',port=3306)
+ cur=conn.cursor()
+
+ cur.execute('create database if not exists Activation_code')
+ conn.select_db('Activation_code')
+ cur.execute('create table code(id int,uuid varchar(50))')
+
+ for i in range(len(rst)):
+ cur.execute('insert into code values(%s,%s)',(i ,rst[i]))
+
+ conn.commit()
+ cur.close()
+ conn.close()
+
+except MySQLdb.Error,e:
+ print "Mysql Error %d: %s" % (e.args[0], e.args[1])
+
+
diff --git a/messyidea/0003/0003.py b/messyidea/0003/0003.py
new file mode 100644
index 00000000..dd9edec4
--- /dev/null
+++ b/messyidea/0003/0003.py
@@ -0,0 +1,31 @@
+# -*- coding: utf-8 -*-
+import uuid
+import redis
+
+def gen( num):
+ assert isinstance(num, int) == True
+ assert num > 0
+ rst = []
+ while True:
+ temp = str(uuid.uuid1()).replace('-', '')
+ if temp not in rst:
+ rst.append(temp)
+ num = num - 1
+ if num == 0:
+ break
+ return rst
+
+rst = gen(200)
+
+r = redis.Redis(host='127.0.0.1', port=6379, db=0)
+
+prefix = 'active'
+
+for i in rst:
+ r.set('%s_%s' % (prefix, i), i)
+ print i
+
+show = r.keys('*')
+
+for i in show:
+ print r.get(i)
diff --git a/messyidea/0004/0004.py b/messyidea/0004/0004.py
new file mode 100644
index 00000000..956007ef
--- /dev/null
+++ b/messyidea/0004/0004.py
@@ -0,0 +1,17 @@
+#!/usr/bin/env python
+# coding=utf-8
+
+filename = 'input.txt'
+dict = {}
+f = open(filename, 'r')
+for eachLine in f:
+ temp = eachLine.split()
+ for i in temp:
+ if i not in dict:
+ dict[i] = 1
+ else:
+ dict[i] += 1
+
+#print dict
+for key in dict:
+ print key, dict[key]
diff --git a/messyidea/0004/input.txt b/messyidea/0004/input.txt
new file mode 100644
index 00000000..566f3f17
--- /dev/null
+++ b/messyidea/0004/input.txt
@@ -0,0 +1,3 @@
+a a b sd ad xs c c
+s t ff ss s
+f t ss s
diff --git a/messyidea/0005/0005.py b/messyidea/0005/0005.py
new file mode 100644
index 00000000..e0394d71
--- /dev/null
+++ b/messyidea/0005/0005.py
@@ -0,0 +1,8 @@
+#!/usr/bin/env python
+# coding=utf-8
+
+from PIL import Image
+
+org = Image.open('./origin.jpg')
+org = org.resize((50,50), Image.ANTIALIAS)
+org.save('rst', 'jpeg')
diff --git a/messyidea/0005/origin.jpg b/messyidea/0005/origin.jpg
new file mode 100644
index 00000000..9586997f
Binary files /dev/null and b/messyidea/0005/origin.jpg differ
diff --git a/messyidea/0005/rst b/messyidea/0005/rst
new file mode 100644
index 00000000..381555cc
Binary files /dev/null and b/messyidea/0005/rst differ
diff --git a/monkey/0004/README.md b/monkey/0004/README.md
new file mode 100644
index 00000000..f9aad3fb
--- /dev/null
+++ b/monkey/0004/README.md
@@ -0,0 +1,5 @@
+###题目要求
+任一个英文的纯文本文件,统计其中的单词出现的个数。
+
+###Topic request
+in a English plain text file, you must count the number of every word that appear in it.
\ No newline at end of file
diff --git a/monkey/0004/main.py b/monkey/0004/main.py
new file mode 100644
index 00000000..7aeee03c
--- /dev/null
+++ b/monkey/0004/main.py
@@ -0,0 +1,33 @@
+import re
+
+__author__ = 'monkey'
+
+def countWords():
+ # 打开文件
+ with open('text.txt', 'r') as file:
+ data = file.read()
+
+ words = re.compile(r'([a-zA-Z]+)')
+
+ # 统计每个单词出现个个数
+ dic = {}
+ for i in words.findall(data):
+ if i not in dic:
+ dic[i] = 1
+ else:
+ dic[i] += 1
+
+ # 将字典里面的item保存到list中
+ numlist = []
+ for k,value in dic.items():
+ numlist.append((k, value))
+
+ # 排序
+ numlist.sort(key = lambda t:t[0])
+
+ # 输出结果
+ for i in numlist:
+ print(i[0], i[1])
+
+if __name__ == '__main__':
+ countWords()
\ No newline at end of file
diff --git a/monkey/0004/text.txt b/monkey/0004/text.txt
new file mode 100644
index 00000000..d94aa6db
--- /dev/null
+++ b/monkey/0004/text.txt
@@ -0,0 +1,29 @@
+Most people need to hear those "three little words" I love you. Once in a while, they hear them just in time.
+
+I met Connie the day she was admitted to the hospice ward, where I worked as a volunteer. Her husband, Bill, stood nervously nearby as she was transferred from the gurney to the hospital bed. Although Connie was in the final stages of her fight against cancer, she was alert and cheerful. We got her settled in. I finished marking her name on all the hospital supplies she would be using, then asked if she needed anything.
+
+"Oh, yes," she said, "would you please show me how to use the TV? I enjoy the soaps so much and I don't want to get behind on what's happening." Connie was a romantic. She loved soap operas, romance novels and movies with a good love story. As we became acquainted, she confided how frustrating it was to be married 32 years to a man who often called her "a silly woman."
+
+"Oh, I know Bill loves me," she said, "but he has never been one to say he loves me, or send cards to me." She sighed and looked out the window at the trees in the courtyard. "I'd give anything if he'd say 'I love you,' but it's just not in his nature."
+
+Bill visited Connie every day. In the beginning, he sat next to the bed while she watched the soaps. Later, when she began sleeping more, he paced up and down the hallway outside her room. Soon, when she no longer watched television and had fewer waking moments, I began spending more of my volunteer time with Bill.
+
+He talked about having worked as a carpenter and how he liked to go fishing. He and Connie had no children, but they'd been enjoying retirement by traveling, until Connie got sick. Bill could not express his feelings about the fact that his wife was dying.
+
+One day, over coffee in the cafeteria, I got him on the subject of women and how we need romance in our lives; how we love to get sentimental1 cards and love letters.
+
+"Do you tell Connie you love her?" I asked (knowing his answer), and he looked at me as if I was crazy.
+
+"I don't have to," he said. "She knows I do!"
+
+"I'm sure she knows," I said, reaching over and touching his hands rough, carpenter's hands that were gripping the cup as if it were the only thing he had to hang onto "but she needs to hear it, Bill. She needs to hear what she has meant to you all these years. Please think about it."
+
+We walked back to Connie's room. Bill disappeared inside, and I left to visit another patient. Later, I saw Bill sitting by the bed. He was holding Connie's hand as she slept. The date was February 12.
+
+Two days later I walked down the hospice ward at noon. There stood Bill, leaning up against the wall in the hallway, staring at the floor. I already knew from the head nurse that Connie had died at 11 A.M..
+
+When Bill saw me, he allowed himself to come into my arms for a long time. His face was wet with tears and he was trembling. Finally, he leaned back against the wall and took a deep breath.
+
+"I have to say something," he said. "I have to say how good I feel about telling her." He stopped to blow his nose. "I thought a lot about what you said, and this morning I told her how much I loved her... and loved being married to her. You shoulda2 seen her smile!"
+
+I went into the room to say my own goodbye to Connie. There, on the bedside table, was a large Valentine card from Bill. You know, the sentimental kind that says, "To my wonderful wife... I love you."
\ No newline at end of file
diff --git a/monkey/0013/README.md b/monkey/0013/README.md
new file mode 100644
index 00000000..482eb81a
--- /dev/null
+++ b/monkey/0013/README.md
@@ -0,0 +1,7 @@
+###题目要求:
+* 用Pyhton写一个爬图片的程序,爬这个链接里的日本妹子图片
+* 地址:http://tieba.baidu.com/p/2166231880
+
+###Topic request
+* Use Python to write a crawl program and crawl photos of Japanese girls from url
+* URL:http://tieba.baidu.com/p/2166231880
\ No newline at end of file
diff --git a/monkey/0013/main.py b/monkey/0013/main.py
new file mode 100644
index 00000000..d62d05bd
--- /dev/null
+++ b/monkey/0013/main.py
@@ -0,0 +1,34 @@
+# -*- coding:utf-8 -*-
+from lxml import etree
+import requests
+import urllib
+
+__author__ = 'monkey'
+
+
+# 获取url地址,对页面进行爬去
+def spider(url):
+ html = requests.get(url)
+ selector = etree.HTML(html.text)
+
+ picitems = []
+ picitems = selector.xpath('//div[@class="d_post_content j_d_post_content clearfix"]/img[@class="BDE_Image"]')
+ print(len(picitems))
+
+ i = 0
+ for pic in picitems:
+ url = pic.xpath('@src')[0]
+ #print(url)
+ dir = './%d.jpg'%i
+ download_Image(url, dir)
+ i += 1
+
+
+# 下载图片
+def download_Image(url, save_path):
+ urllib.request.urlretrieve(url, save_path)
+
+
+if __name__ == '__main__':
+ url = "http://tieba.baidu.com/p/2166231880"
+ spider(url)
\ No newline at end of file
diff --git a/nan86150/0000/main.py b/nan86150/0000/main.py
new file mode 100644
index 00000000..46c525d3
--- /dev/null
+++ b/nan86150/0000/main.py
@@ -0,0 +1,20 @@
+#!/usr/bin/env python
+# encoding: utf-8
+
+import Image
+import ImageFont
+import ImageDraw
+
+
+text = u"7"
+
+im = Image.open('./image.jpg')
+
+dr = ImageDraw.Draw(im)
+font = ImageFont.truetype('msyh.ttf', 34)
+
+dr.text((im.size[0]*0.85, im.size[1]*0.05), text, font=font, fill="#ff0000")
+
+im.show()
+im.save('result.jpg')
+
diff --git a/nan86150/0000/msyh.ttf b/nan86150/0000/msyh.ttf
new file mode 100644
index 00000000..aa23ae1f
Binary files /dev/null and b/nan86150/0000/msyh.ttf differ
diff --git a/neo1218/0023/web/README.md b/neo1218/0023/web/README.md
new file mode 100644
index 00000000..2653eb16
--- /dev/null
+++ b/neo1218/0023/web/README.md
@@ -0,0 +1,6 @@
+web 留言簿
+======
+
+python flask框架编写的简单的留言簿
+功能: 用户登录留言。
+
diff --git a/neo1218/0023/web/app/__init__.py b/neo1218/0023/web/app/__init__.py
new file mode 100644
index 00000000..9f4f59df
--- /dev/null
+++ b/neo1218/0023/web/app/__init__.py
@@ -0,0 +1,43 @@
+# -*- coding: UTF-8 -*-
+# !/usr/bin/python
+
+# app文件
+
+from flask import Flask
+from flask.ext.bootstrap import Bootstrap
+from flask.ext.mail import Mail
+from flask.ext.moment import Moment
+from flask.ext.sqlalchemy import SQLAlchemy
+from flask.ext.login import LoginManager
+from config import config
+
+bootstrap = Bootstrap()
+mail = Mail()
+moment = Moment()
+db = SQLAlchemy()
+
+login_manager = LoginManager()
+login_manager.session_protection = 'strong'
+login_manager.login_view = 'auth.login'
+
+
+def create_app(config_name):
+ # app 工厂函数(注册app蓝图)
+ app = Flask(__name__)
+ app.config.from_object(config[config_name])
+ config[config_name].init_app(app)
+
+ bootstrap.init_app(app)
+ mail.init_app(app)
+ moment.init_app(app)
+ db.init_app(app)
+ login_manager.init_app(app)
+
+ from .main import main as main_blueprint
+ app.register_blueprint(main_blueprint)
+
+ from .auth import auth as auth_blueprint
+ app.register_blueprint(auth_blueprint, url_prefix='/auth')
+
+ return app
+
diff --git a/neo1218/0023/web/app/auth/__init__.py b/neo1218/0023/web/app/auth/__init__.py
new file mode 100644
index 00000000..e54b37dc
--- /dev/null
+++ b/neo1218/0023/web/app/auth/__init__.py
@@ -0,0 +1,5 @@
+from flask import Blueprint
+
+auth = Blueprint('auth', __name__)
+
+from . import views
diff --git a/neo1218/0023/web/app/auth/forms.py b/neo1218/0023/web/app/auth/forms.py
new file mode 100644
index 00000000..43ed7e09
--- /dev/null
+++ b/neo1218/0023/web/app/auth/forms.py
@@ -0,0 +1,37 @@
+# -*- coding: UTF-8 -*-
+# !/usr/bin/python
+from flask.ext.wtf import Form
+from wtforms import StringField, PasswordField, BooleanField, SubmitField
+from wtforms.validators import Required, Length, Email, Regexp, EqualTo
+from wtforms import ValidationError
+from ..models import User
+
+
+class LoginForm(Form):
+ email = StringField('Email', validators=[Required(), Length(1, 64),
+ Email()])
+ password = PasswordField('Password', validators=[Required()])
+ remember_me = BooleanField('记住我')
+ submit = SubmitField('登陆')
+
+
+class RegistrationForm(Form):
+ email = StringField('Email', validators=[Required(), Length(1, 64),
+ Email()])
+ username = StringField('Username', validators=[
+ Required(), Length(1, 64)])
+
+ password = PasswordField('Password', validators=[
+ Required(), EqualTo('password2', message='Passwords must match.')])
+
+ password2 = PasswordField('Confirm password', validators=[Required()])
+
+ submit = SubmitField('注册')
+
+ def validate_email(self, field):
+ if User.query.filter_by(email=field.data).first():
+ raise ValidationError('邮箱已经注册!')
+
+ def validate_username(self, field):
+ if User.query.filter_by(username=field.data).first():
+ raise ValidationError('用户名已经存在!')
diff --git a/neo1218/0023/web/app/auth/views.py b/neo1218/0023/web/app/auth/views.py
new file mode 100644
index 00000000..77d4fba8
--- /dev/null
+++ b/neo1218/0023/web/app/auth/views.py
@@ -0,0 +1,42 @@
+# -*- coding: UTF-8 -*-
+# !/usr/bin/python
+from flask import render_template, redirect, request, url_for, flash
+from flask.ext.login import login_user, logout_user, login_required, \
+ current_user
+from . import auth
+from .. import db
+from ..models import User
+from .forms import LoginForm, RegistrationForm
+
+
+@auth.route('/login', methods=['GET', 'POST'])
+def login():
+ form = LoginForm()
+ if form.validate_on_submit():
+ user = User.query.filter_by(email=form.email.data).first()
+ if user is not None and user.verify_password(form.password.data):
+ login_user(user, form.remember_me.data)
+ return redirect(request.args.get('next') or url_for('main.index'))
+ flash('用户名或密码不正确!')
+ return render_template('auth/login.html', form=form)
+
+
+@auth.route('/logout')
+@login_required
+def logout():
+ logout_user()
+ flash('你已经退出!.')
+ return redirect(url_for('main.index'))
+
+
+@auth.route('/register', methods=['GET', 'POST'])
+def register():
+ form = RegistrationForm()
+ if form.validate_on_submit():
+ user = User(email=form.email.data,
+ username=form.username.data,
+ password=form.password.data)
+ db.session.add(user)
+ flash('你现在可以登录了!')
+ return redirect(url_for('auth.login'))
+ return render_template('auth/register.html', form=form)
diff --git a/neo1218/0023/web/app/main/__init__.py b/neo1218/0023/web/app/main/__init__.py
new file mode 100644
index 00000000..90380f84
--- /dev/null
+++ b/neo1218/0023/web/app/main/__init__.py
@@ -0,0 +1,5 @@
+from flask import Blueprint
+
+main = Blueprint('main', __name__)
+
+from . import views, errors
diff --git a/neo1218/0023/web/app/main/errors.py b/neo1218/0023/web/app/main/errors.py
new file mode 100644
index 00000000..7c76c776
--- /dev/null
+++ b/neo1218/0023/web/app/main/errors.py
@@ -0,0 +1,12 @@
+from flask import render_template
+from . import main
+
+
+@main.app_errorhandler(404)
+def page_not_found(e):
+ return render_template('404.html'), 404
+
+
+@main.app_errorhandler(500)
+def internal_server_error(e):
+ return render_template('500.html'), 500
diff --git a/neo1218/0023/web/app/main/forms.py b/neo1218/0023/web/app/main/forms.py
new file mode 100644
index 00000000..0855297c
--- /dev/null
+++ b/neo1218/0023/web/app/main/forms.py
@@ -0,0 +1,11 @@
+# -*- coding: UTF-8 -*-
+# !/usr/bin/python
+from flask.ext.wtf import Form
+from wtforms import StringField, TextAreaField, BooleanField, SelectField,SubmitField
+from wtforms.validators import Required
+
+class PostForm(Form):
+ body = TextAreaField("说点什么吧!",validators=[Required()])
+ submit = SubmitField('提交')
+
+
diff --git a/neo1218/0023/web/app/main/views.py b/neo1218/0023/web/app/main/views.py
new file mode 100644
index 00000000..8231429a
--- /dev/null
+++ b/neo1218/0023/web/app/main/views.py
@@ -0,0 +1,22 @@
+# -*- coding: UTF-8 -*-
+#!/usr/bin/python
+from flask import render_template,url_for,redirect
+from flask.ext.login import current_user
+from .forms import PostForm
+from ..models import Post
+from .. import db
+from . import main
+
+
+@main.route('/',methods=['GET','POST'])
+def index():
+ form = PostForm()
+ if form.validate_on_submit():
+ post = Post(body=form.body.data,
+ author=current_user._get_current_object())
+ db.session.add(post)
+ return redirect(url_for('.index'))
+ posts = Post.query.order_by(Post.timestamp.desc()).all()
+ return render_template('index.html',form=form,posts=posts)
+
+
diff --git a/neo1218/0023/web/app/models.py b/neo1218/0023/web/app/models.py
new file mode 100644
index 00000000..a8c69891
--- /dev/null
+++ b/neo1218/0023/web/app/models.py
@@ -0,0 +1,40 @@
+# -*- coding: UTF-8 -*-
+# !/usr/bin/python
+from werkzeug.security import generate_password_hash, check_password_hash
+from flask.ext.login import UserMixin
+from datetime import datetime
+from . import db, login_manager
+
+class User(UserMixin, db.Model):
+ # 用户数据库表
+ __tablename__ = 'users'
+ id = db.Column(db.Integer, primary_key=True)
+ email = db.Column(db.String(64), unique=True, index=True)
+ username = db.Column(db.String(64), unique=True, index=True)
+ password_hash = db.Column(db.String(128))
+ posts = db.relationship('Post',backref="author",lazy='dynamic')
+
+ @property
+ def password(self):
+ raise AttributeError('password is not a readable attribute')
+
+ @password.setter
+ def password(self, password):
+ self.password_hash = generate_password_hash(password)
+
+ def verify_password(self, password):
+ return check_password_hash(self.password_hash, password)
+
+ def __repr__(self):
+ return '' % self.username
+
+@login_manager.user_loader
+def load_user(user_id):
+ return User.query.get(int(user_id))
+
+class Post(db.Model):
+ __tablename__= 'posts'
+ id = db.Column(db.Integer,primary_key=True)
+ body = db.Column(db.Text)
+ timestamp = db.Column(db.DateTime,index=True,default=datetime.utcnow)
+ author_id = db.Column(db.Integer,db.ForeignKey('users.id'))
diff --git a/neo1218/0023/web/app/templates/404.html b/neo1218/0023/web/app/templates/404.html
new file mode 100644
index 00000000..ddc8914c
--- /dev/null
+++ b/neo1218/0023/web/app/templates/404.html
@@ -0,0 +1,9 @@
+{% extends "base.html" %}
+
+{% block title %}web 404{% endblock %}
+
+{% block page_content %}
+
+{% endblock %}
diff --git a/neo1218/0023/web/app/templates/500.html b/neo1218/0023/web/app/templates/500.html
new file mode 100644
index 00000000..9bcedf46
--- /dev/null
+++ b/neo1218/0023/web/app/templates/500.html
@@ -0,0 +1,9 @@
+{% extends "base.html" %}
+
+{% block title %}web 500{% endblock %}
+
+{% block page_content %}
+
+{% endblock %}
diff --git a/neo1218/0023/web/app/templates/_macros.html b/neo1218/0023/web/app/templates/_macros.html
new file mode 100644
index 00000000..a4789c89
--- /dev/null
+++ b/neo1218/0023/web/app/templates/_macros.html
@@ -0,0 +1,29 @@
+{% macro pagination_widget(pagination, endpoint, fragment='') %}
+
+{% endmacro %}
diff --git a/neo1218/0023/web/app/templates/_posts.html b/neo1218/0023/web/app/templates/_posts.html
new file mode 100644
index 00000000..51c293a8
--- /dev/null
+++ b/neo1218/0023/web/app/templates/_posts.html
@@ -0,0 +1,18 @@
+
+ {% for post in posts %}
+
+
+
{{ moment(post.timestamp).fromNow() }}
+
+
+ {% if post.body_html %}
+ {{ post.body_html | safe }}
+ {% else %}
+ {{ post.body }}
+ {% endif %}
+
+
+
+ {% endfor %}
+
+
diff --git a/neo1218/0023/web/app/templates/auth/login.html b/neo1218/0023/web/app/templates/auth/login.html
new file mode 100644
index 00000000..8bd5dc66
--- /dev/null
+++ b/neo1218/0023/web/app/templates/auth/login.html
@@ -0,0 +1,15 @@
+{% extends "base.html" %}
+{% import "bootstrap/wtf.html" as wtf %}
+
+{% block title %}留言板——登陆{% endblock %}
+
+{% block page_content %}
+
+
+ {{ wtf.quick_form(form) }}
+
+
新用户? 注册 .
+
+{% endblock %}
diff --git a/neo1218/0023/web/app/templates/auth/register.html b/neo1218/0023/web/app/templates/auth/register.html
new file mode 100644
index 00000000..d59a857b
--- /dev/null
+++ b/neo1218/0023/web/app/templates/auth/register.html
@@ -0,0 +1,13 @@
+{% extends "base.html" %}
+{% import "bootstrap/wtf.html" as wtf %}
+
+{% block title %}留言板——注册{% endblock %}
+
+{% block page_content %}
+
+
+ {{ wtf.quick_form(form) }}
+
+{% endblock %}
diff --git a/neo1218/0023/web/app/templates/base.html b/neo1218/0023/web/app/templates/base.html
new file mode 100644
index 00000000..b4da0499
--- /dev/null
+++ b/neo1218/0023/web/app/templates/base.html
@@ -0,0 +1,55 @@
+{% extends "bootstrap/base.html" %}
+
+{% block title %}Flasky{% endblock %}
+
+{% block head %}
+{{ super() }}
+
+
+{% endblock %}
+
+{% block navbar %}
+
+
+
+
+
+
+ {% if current_user.is_authenticated() %}
+ 退出
+ {% else %}
+ 登陆
+ {% endif %}
+
+
+
+
+{% endblock %}
+
+{% block content %}
+
+ {% for message in get_flashed_messages() %}
+
+ ×
+ {{ message }}
+
+ {% endfor %}
+
+ {% block page_content %}{% endblock %}
+
+{% endblock %}
+
+{% block scripts %}
+{{ super() }}
+{{ moment.include_moment() }}
+{% endblock %}
diff --git a/neo1218/0023/web/app/templates/index.html b/neo1218/0023/web/app/templates/index.html
new file mode 100644
index 00000000..0be836c6
--- /dev/null
+++ b/neo1218/0023/web/app/templates/index.html
@@ -0,0 +1,25 @@
+{% extends "base.html" %}
+{% import "bootstrap/wtf.html" as wtf %}
+
+{% block title %}web留言板{% endblock %}
+
+{% block page_content %}
+
+
+ {{ wtf.quick_form(form) }}
+
+
+
+ {% for post in posts %}
+
+
+
{{ moment(post.timestamp).fromNow() }}
+
+
{{ post.body }}
+
+
+ {% endfor %}
+
+{% endblock %}
diff --git a/neo1218/0023/web/config.py b/neo1218/0023/web/config.py
new file mode 100644
index 00000000..c3ffa46e
--- /dev/null
+++ b/neo1218/0023/web/config.py
@@ -0,0 +1,47 @@
+# -*- coding: UTF-8 -*-
+# !/usr/bin/python
+
+# 配置文件
+
+import os
+basedir = os.path.abspath(os.path.dirname(__file__))
+
+
+class Config:
+ # 配置类
+ SECRET_KEY = os.environ.get('SECRET_KEY') or 'hard to guess string'
+ SQLALCHEMY_COMMIT_ON_TEARDOWN = True
+
+ @staticmethod
+ def init_app(app):
+ pass
+
+
+class DevelopmentConfig(Config):
+ # 开发数据库
+ DEBUG = True
+ SQLALCHEMY_DATABASE_URI = os.environ.get('DEV_DATABASE_URL') or \
+ 'sqlite:///' + os.path.join(basedir, 'data-dev.sqlite')
+
+
+class TestingConfig(Config):
+ # 测试数据库
+ TESTING = True
+ SQLALCHEMY_DATABASE_URI = os.environ.get('TEST_DATABASE_URL') or \
+ 'sqlite:///' + os.path.join(basedir, 'data-test.sqlite')
+
+
+class ProductionConfig(Config):
+ # 生产数据库
+ SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL') or \
+ 'sqlite:///' + os.path.join(basedir, 'data.sqlite')
+
+
+config = {
+ 'development': DevelopmentConfig,
+ 'testing': TestingConfig,
+ 'production': ProductionConfig,
+
+ 'default': DevelopmentConfig
+}
+
diff --git a/neo1218/0023/web/data-dev.sqlite b/neo1218/0023/web/data-dev.sqlite
new file mode 100644
index 00000000..cde0d075
Binary files /dev/null and b/neo1218/0023/web/data-dev.sqlite differ
diff --git a/neo1218/0023/web/manage.py b/neo1218/0023/web/manage.py
new file mode 100644
index 00000000..00d40d46
--- /dev/null
+++ b/neo1218/0023/web/manage.py
@@ -0,0 +1,39 @@
+# -*- coding: UTF-8 -*-
+# !/usr/bin/python
+
+# 管理文件
+
+import os
+from app import create_app, db
+from app.models import User
+from flask.ext.script import Manager, Shell
+from flask.ext.migrate import Migrate, MigrateCommand
+
+#-------------------设置编码格式-----------------------
+import sys
+reload(sys)
+sys.setdefaultencoding('utf-8')
+#------------------------------------------------------
+
+app = create_app(os.getenv('FLASK_CONFIG') or 'default')
+manager = Manager(app)
+migrate = Migrate(app, db)
+
+
+def make_shell_context():
+ return dict(app=app, db=db, User=User)
+manager.add_command("shell", Shell(make_context=make_shell_context))
+manager.add_command('db', MigrateCommand)
+
+
+@manager.command
+def test():
+ """Run the unit tests."""
+ import unittest
+ tests = unittest.TestLoader().discover('tests')
+ unittest.TextTestRunner(verbosity=2).run(tests)
+
+
+if __name__ == '__main__':
+ manager.run()
+
diff --git a/neo1218/0023/web/migrations/README b/neo1218/0023/web/migrations/README
new file mode 100644
index 00000000..98e4f9c4
--- /dev/null
+++ b/neo1218/0023/web/migrations/README
@@ -0,0 +1 @@
+Generic single-database configuration.
\ No newline at end of file
diff --git a/neo1218/0023/web/migrations/alembic.ini b/neo1218/0023/web/migrations/alembic.ini
new file mode 100644
index 00000000..f8ed4801
--- /dev/null
+++ b/neo1218/0023/web/migrations/alembic.ini
@@ -0,0 +1,45 @@
+# A generic, single database configuration.
+
+[alembic]
+# template used to generate migration files
+# file_template = %%(rev)s_%%(slug)s
+
+# set to 'true' to run the environment during
+# the 'revision' command, regardless of autogenerate
+# revision_environment = false
+
+
+# Logging configuration
+[loggers]
+keys = root,sqlalchemy,alembic
+
+[handlers]
+keys = console
+
+[formatters]
+keys = generic
+
+[logger_root]
+level = WARN
+handlers = console
+qualname =
+
+[logger_sqlalchemy]
+level = WARN
+handlers =
+qualname = sqlalchemy.engine
+
+[logger_alembic]
+level = INFO
+handlers =
+qualname = alembic
+
+[handler_console]
+class = StreamHandler
+args = (sys.stderr,)
+level = NOTSET
+formatter = generic
+
+[formatter_generic]
+format = %(levelname)-5.5s [%(name)s] %(message)s
+datefmt = %H:%M:%S
diff --git a/neo1218/0023/web/migrations/env.py b/neo1218/0023/web/migrations/env.py
new file mode 100644
index 00000000..0a038e6c
--- /dev/null
+++ b/neo1218/0023/web/migrations/env.py
@@ -0,0 +1,73 @@
+from __future__ import with_statement
+from alembic import context
+from sqlalchemy import engine_from_config, pool
+from logging.config import fileConfig
+
+# this is the Alembic Config object, which provides
+# access to the values within the .ini file in use.
+config = context.config
+
+# Interpret the config file for Python logging.
+# This line sets up loggers basically.
+fileConfig(config.config_file_name)
+
+# add your model's MetaData object here
+# for 'autogenerate' support
+# from myapp import mymodel
+# target_metadata = mymodel.Base.metadata
+from flask import current_app
+config.set_main_option('sqlalchemy.url', current_app.config.get('SQLALCHEMY_DATABASE_URI'))
+target_metadata = current_app.extensions['migrate'].db.metadata
+
+# other values from the config, defined by the needs of env.py,
+# can be acquired:
+# my_important_option = config.get_main_option("my_important_option")
+# ... etc.
+
+
+def run_migrations_offline():
+ """Run migrations in 'offline' mode.
+
+ This configures the context with just a URL
+ and not an Engine, though an Engine is acceptable
+ here as well. By skipping the Engine creation
+ we don't even need a DBAPI to be available.
+
+ Calls to context.execute() here emit the given string to the
+ script output.
+
+ """
+ url = config.get_main_option("sqlalchemy.url")
+ context.configure(url=url)
+
+ with context.begin_transaction():
+ context.run_migrations()
+
+
+def run_migrations_online():
+ """Run migrations in 'online' mode.
+
+ In this scenario we need to create an Engine
+ and associate a connection with the context.
+
+ """
+ engine = engine_from_config(config.get_section(config.config_ini_section),
+ prefix='sqlalchemy.',
+ poolclass=pool.NullPool)
+
+ connection = engine.connect()
+ context.configure(connection=connection,
+ target_metadata=target_metadata,
+ **current_app.extensions['migrate'].configure_args)
+
+ try:
+ with context.begin_transaction():
+ context.run_migrations()
+ finally:
+ connection.close()
+
+if context.is_offline_mode():
+ run_migrations_offline()
+else:
+ run_migrations_online()
+
diff --git a/neo1218/0023/web/migrations/script.py.mako b/neo1218/0023/web/migrations/script.py.mako
new file mode 100644
index 00000000..95702017
--- /dev/null
+++ b/neo1218/0023/web/migrations/script.py.mako
@@ -0,0 +1,22 @@
+"""${message}
+
+Revision ID: ${up_revision}
+Revises: ${down_revision}
+Create Date: ${create_date}
+
+"""
+
+# revision identifiers, used by Alembic.
+revision = ${repr(up_revision)}
+down_revision = ${repr(down_revision)}
+
+from alembic import op
+import sqlalchemy as sa
+${imports if imports else ""}
+
+def upgrade():
+ ${upgrades if upgrades else "pass"}
+
+
+def downgrade():
+ ${downgrades if downgrades else "pass"}
diff --git a/neo1218/0023/web/migrations/versions/3277cb11e991_initial_migration.py b/neo1218/0023/web/migrations/versions/3277cb11e991_initial_migration.py
new file mode 100644
index 00000000..e01abb43
--- /dev/null
+++ b/neo1218/0023/web/migrations/versions/3277cb11e991_initial_migration.py
@@ -0,0 +1,47 @@
+"""initial migration
+
+Revision ID: 3277cb11e991
+Revises: None
+Create Date: 2015-05-10 08:39:17.826382
+
+"""
+
+# revision identifiers, used by Alembic.
+revision = '3277cb11e991'
+down_revision = None
+
+from alembic import op
+import sqlalchemy as sa
+
+
+def upgrade():
+ ### commands auto generated by Alembic - please adjust! ###
+ op.create_table('users',
+ sa.Column('id', sa.Integer(), nullable=False),
+ sa.Column('email', sa.String(length=64), nullable=True),
+ sa.Column('username', sa.String(length=64), nullable=True),
+ sa.Column('password_hash', sa.String(length=128), nullable=True),
+ sa.PrimaryKeyConstraint('id')
+ )
+ op.create_index(op.f('ix_users_email'), 'users', ['email'], unique=True)
+ op.create_index(op.f('ix_users_username'), 'users', ['username'], unique=True)
+ op.create_table('posts',
+ sa.Column('id', sa.Integer(), nullable=False),
+ sa.Column('body', sa.Text(), nullable=True),
+ sa.Column('timestamp', sa.DateTime(), nullable=True),
+ sa.Column('author_id', sa.Integer(), nullable=True),
+ sa.ForeignKeyConstraint(['author_id'], ['users.id'], ),
+ sa.PrimaryKeyConstraint('id')
+ )
+ op.create_index(op.f('ix_posts_timestamp'), 'posts', ['timestamp'], unique=False)
+ ### end Alembic commands ###
+
+
+def downgrade():
+ ### commands auto generated by Alembic - please adjust! ###
+ op.drop_index(op.f('ix_posts_timestamp'), table_name='posts')
+ op.drop_table('posts')
+ op.drop_index(op.f('ix_users_username'), table_name='users')
+ op.drop_index(op.f('ix_users_email'), table_name='users')
+ op.drop_table('users')
+ ### end Alembic commands ###
diff --git a/neo1218/0023/web/requirements.txt b/neo1218/0023/web/requirements.txt
new file mode 100644
index 00000000..39c98b4f
--- /dev/null
+++ b/neo1218/0023/web/requirements.txt
@@ -0,0 +1,18 @@
+Flask==0.10.1
+Flask-Bootstrap==3.0.3.1
+Flask-Login==0.2.7
+Flask-Mail==0.9.0
+Flask-Migrate==1.1.0
+Flask-Moment==0.2.1
+Flask-SQLAlchemy==1.0
+Flask-Script==0.6.6
+Flask-WTF==0.9.4
+Jinja2==2.7.1
+Mako==0.9.1
+MarkupSafe==0.18
+SQLAlchemy==0.9.9
+WTForms==1.0.5
+Werkzeug==0.9.4
+alembic==0.6.2
+blinker==1.3
+itsdangerous==0.23
diff --git a/neo1218/0023/web/tests/__init__.py b/neo1218/0023/web/tests/__init__.py
new file mode 100644
index 00000000..e69de29b
diff --git a/neo1218/0023/web/tests/test_basics.py b/neo1218/0023/web/tests/test_basics.py
new file mode 100644
index 00000000..0fdf4983
--- /dev/null
+++ b/neo1218/0023/web/tests/test_basics.py
@@ -0,0 +1,22 @@
+import unittest
+from flask import current_app
+from app import create_app, db
+
+
+class BasicsTestCase(unittest.TestCase):
+ def setUp(self):
+ self.app = create_app('testing')
+ self.app_context = self.app.app_context()
+ self.app_context.push()
+ db.create_all()
+
+ def tearDown(self):
+ db.session.remove()
+ db.drop_all()
+ self.app_context.pop()
+
+ def test_app_exists(self):
+ self.assertFalse(current_app is None)
+
+ def test_app_is_testing(self):
+ self.assertTrue(current_app.config['TESTING'])
diff --git a/neo1218/0023/web/tests/test_user_model.py b/neo1218/0023/web/tests/test_user_model.py
new file mode 100644
index 00000000..b705a3bc
--- /dev/null
+++ b/neo1218/0023/web/tests/test_user_model.py
@@ -0,0 +1,35 @@
+import unittest
+from app import create_app, db
+from app.models import User
+
+
+class UserModelTestCase(unittest.TestCase):
+ def setUp(self):
+ self.app = create_app('testing')
+ self.app_context = self.app.app_context()
+ self.app_context.push()
+ db.create_all()
+
+ def tearDown(self):
+ db.session.remove()
+ db.drop_all()
+ self.app_context.pop()
+
+ def test_password_setter(self):
+ u = User(password='cat')
+ self.assertTrue(u.password_hash is not None)
+
+ def test_no_password_getter(self):
+ u = User(password='cat')
+ with self.assertRaises(AttributeError):
+ u.password
+
+ def test_password_verification(self):
+ u = User(password='cat')
+ self.assertTrue(u.verify_password('cat'))
+ self.assertFalse(u.verify_password('dog'))
+
+ def test_password_salts_are_random(self):
+ u = User(password='cat')
+ u2 = User(password='cat')
+ self.assertTrue(u.password_hash != u2.password_hash)
diff --git a/neo1218/0023/web/wsgi.py b/neo1218/0023/web/wsgi.py
new file mode 100644
index 00000000..69655517
--- /dev/null
+++ b/neo1218/0023/web/wsgi.py
@@ -0,0 +1,8 @@
+#!/usr/bin/env python
+# encoding: utf-8
+
+from manage import app
+
+if __name__ == "__main__":
+ app.run(host="121.43.230.104",port=5000)
+
diff --git a/partrita/0001/codes.txt b/partrita/0001/codes.txt
new file mode 100644
index 00000000..53b52f4a
--- /dev/null
+++ b/partrita/0001/codes.txt
@@ -0,0 +1,10 @@
+VTGwsgMjVt4rXtS
+VcBNNj2wxpxzfIn
+tRkSWNZvlKtGZ9t
+GGfymamjpwD69rx
+vMGIGYdAPwIG5zT
+Mt60KsjdS6AdM4z
+SsTkjAOskJCH1SJ
+pG9w6OXJyNGNgu2
+er4a3ZxEg1XuX0g
+lIe85Mgl7Dg9aIh
diff --git a/partrita/0001/make_code.py b/partrita/0001/make_code.py
new file mode 100644
index 00000000..f2b0a36e
--- /dev/null
+++ b/partrita/0001/make_code.py
@@ -0,0 +1,25 @@
+# -*- coding: utf-8 -*-
+"""
+Created on Mon May 11 16:04:59 2015
+
+@author: partrita
+"""
+
+from random import Random
+
+def codeGenerator(number, codeLength = 15):
+ print '**** Code Generator ****'
+ codeFile = open('codes.txt', 'w')
+ if number <= 0:
+ return 'invalid number of codes'
+ else:
+ chars = 'abcdefghijklmnopgrstuvwxyzABCDEFGHIJKLMNOPGRSTUVWXYZ1234567890'
+ random = Random()
+ for j in range(1, number+1):
+ str = ''
+ for i in range(1, codeLength+1):
+ index = random.randint(1, len(chars))
+ str = str + chars[index-1]
+ codeFile.write(str+'\n')
+
+print codeGenerator(10)
\ No newline at end of file
diff --git a/problem 0001/0001.py b/problem 0001/0001.py
new file mode 100644
index 00000000..42848e97
--- /dev/null
+++ b/problem 0001/0001.py
@@ -0,0 +1,22 @@
+import string
+import random
+def coupon_creator(digit):
+ coupon=''
+ for word in range(digit):
+ coupon+=random.choice(string.ascii_uppercase + string.digits)
+ return coupon
+
+def two_hundred_coupons():
+ data=''
+ count=1
+ for count in range(200):
+ digit=12
+ count+=1
+ data+='coupon no.'+str(count)+' '+coupon_creator(digit)+'\n'
+
+ return data
+
+
+coupondata=open('coupondata.txt','w')
+coupondata.write(two_hundred_coupons())
+coupondata.close()
\ No newline at end of file
diff --git a/problem 0001/coupondata.txt b/problem 0001/coupondata.txt
new file mode 100644
index 00000000..68b17187
--- /dev/null
+++ b/problem 0001/coupondata.txt
@@ -0,0 +1,200 @@
+coupon no.1 FWJW0YIBITUL
+coupon no.2 NQU7R8XJNBXG
+coupon no.3 ZG9GKKMSB6HV
+coupon no.4 O4XX21EKJX77
+coupon no.5 GUTI0CSN2C6X
+coupon no.6 C4MS2L6ZUC3L
+coupon no.7 6C9XNU5P9YNP
+coupon no.8 TDWZHJMH79T7
+coupon no.9 NK42DPL2KO7S
+coupon no.10 N9N53QOR49LF
+coupon no.11 QFKY2FA9YHO6
+coupon no.12 MPISYC004GMD
+coupon no.13 0JARTJT6INRB
+coupon no.14 5YE7OWV5TPXZ
+coupon no.15 T6Z42DZVZCV4
+coupon no.16 DOTG64M56IOZ
+coupon no.17 63LOHIBWKQW0
+coupon no.18 QMW1WS74YPSF
+coupon no.19 EDYA4BTEUEG8
+coupon no.20 3PP94R8DTXTH
+coupon no.21 SWTYQIFG59ZJ
+coupon no.22 5W66U5OE9EUL
+coupon no.23 04K6XU9CYP1S
+coupon no.24 380F1KRRJ952
+coupon no.25 Q7C3IBPCVGPG
+coupon no.26 516U37YWS0TD
+coupon no.27 PDZVA7NHPYIJ
+coupon no.28 1H5ONS7OKN7Q
+coupon no.29 CP447S7EIWCC
+coupon no.30 CYVFITE5CHUJ
+coupon no.31 XNYD11NWD3FN
+coupon no.32 593GXVHNSR1I
+coupon no.33 O4N12KSNXTQU
+coupon no.34 3FSNMKHUA9GG
+coupon no.35 5I6QC0FFEY55
+coupon no.36 T2H84ALIBJVS
+coupon no.37 U0WAUXJDB0OG
+coupon no.38 GUO20ACL1M18
+coupon no.39 2NDT0788JBT4
+coupon no.40 E9SFSETUOJZV
+coupon no.41 1Y553JWA9DIT
+coupon no.42 F1MQIGIVH1CV
+coupon no.43 B9E303O9UW6O
+coupon no.44 LTJI2OREX7FM
+coupon no.45 L4YDRNS9UHFX
+coupon no.46 T0L8MPN9U7BG
+coupon no.47 0GK0Y1WR4RTE
+coupon no.48 T08Y1R1F0FJA
+coupon no.49 KU0ROH2G2DAZ
+coupon no.50 AIXMX3R4P368
+coupon no.51 02A2IM6O36JY
+coupon no.52 6T4855XEPR5J
+coupon no.53 28P308KD20JK
+coupon no.54 ZJVP7I1JYB3X
+coupon no.55 EPY8ABOLUB1F
+coupon no.56 UDBEUPSFVAY7
+coupon no.57 NOCBFKB5L68F
+coupon no.58 TLK5PPPNTAYB
+coupon no.59 O3OBACP3WDJV
+coupon no.60 WKOCO2RMO3RB
+coupon no.61 J69JSK7MPDYZ
+coupon no.62 RGHO0FOCFT97
+coupon no.63 FO4XB61Y8WBV
+coupon no.64 WGL60PE7P1OJ
+coupon no.65 JDCAMB4K9EY9
+coupon no.66 AR5OPUT1WKSP
+coupon no.67 RHDAXFBN9K1E
+coupon no.68 05505M3PS7MJ
+coupon no.69 JSI9TRQGLXMG
+coupon no.70 OWCQSH53LLKM
+coupon no.71 X4HCRNGD8B5J
+coupon no.72 HP44PXN8W8B7
+coupon no.73 1H4IINT9ZDVG
+coupon no.74 S63YHUKU5UPU
+coupon no.75 OINDDAQYU3LQ
+coupon no.76 B8RG2RL7JDEM
+coupon no.77 LRH1KU8C42O6
+coupon no.78 ZKO3WO1K7ZN7
+coupon no.79 RA0LHH0ORS40
+coupon no.80 OVFUSWG36AJQ
+coupon no.81 B2I23IWM0QDK
+coupon no.82 2T66MPUSXLO8
+coupon no.83 UH8CDZE1A1FH
+coupon no.84 0PF0QTBUNHXI
+coupon no.85 RWHH6PJIM7AJ
+coupon no.86 5G51MCB9GSLZ
+coupon no.87 PWF1AXVE5BOK
+coupon no.88 URJO6LTL1OL0
+coupon no.89 88PVJOLP8107
+coupon no.90 4QZSWWA6CXWM
+coupon no.91 EM87EHTI6X8D
+coupon no.92 KXF4P56RR6P1
+coupon no.93 BTNBZ2CHQR4V
+coupon no.94 0W9S44Y8U16U
+coupon no.95 0R4AZ9EB7D6X
+coupon no.96 AZTKVO9LJJN9
+coupon no.97 6YTJ9N2TAQJB
+coupon no.98 Y1IA11Y34I0D
+coupon no.99 EWM4U6S4DBJN
+coupon no.100 QD4AQ3A7STDP
+coupon no.101 CHSNVU5ZW8GB
+coupon no.102 1NHDYWU00Q3O
+coupon no.103 QGTXZWO96PA9
+coupon no.104 49AP05QRNTRF
+coupon no.105 9SXMO0QPWOCP
+coupon no.106 I6A6GEJLNKHW
+coupon no.107 F9FK75OXX340
+coupon no.108 WGFPSQWJSTQR
+coupon no.109 YPF79O3X5NRT
+coupon no.110 QN23EXDFKDW8
+coupon no.111 ZT4T54WRM7QK
+coupon no.112 QA78PI358R74
+coupon no.113 S8UGJUXFZP6U
+coupon no.114 WU6COWJW7DTM
+coupon no.115 QPL1WSMCKLPD
+coupon no.116 A98P5VQK74BP
+coupon no.117 M6X08E3OURYN
+coupon no.118 M8GF4JOFQZ0C
+coupon no.119 TDTJV2I079TE
+coupon no.120 LLMRA43NL2J9
+coupon no.121 2BYQY8EFL35L
+coupon no.122 7B5ANII8ZHFW
+coupon no.123 D20WEWW7OB21
+coupon no.124 Y8TWI7OF7H2L
+coupon no.125 57CT9SZ03ZYB
+coupon no.126 FHPAMN9EXI6P
+coupon no.127 CPVFJQR6SI4K
+coupon no.128 PXAUDBIGIQLJ
+coupon no.129 SYACJYLSR19L
+coupon no.130 ZX9586DVR42P
+coupon no.131 FD3GK84USH9U
+coupon no.132 L6MZWX28N5J3
+coupon no.133 R88G9MC9ZIW4
+coupon no.134 R25QCRFXWK7P
+coupon no.135 811SMYNGDOJP
+coupon no.136 CEYYUOVZU4WB
+coupon no.137 GFFS1KRXBJRF
+coupon no.138 V61XLSIBNJZ9
+coupon no.139 HHJRITKF8LA0
+coupon no.140 KMZNXQ4OXRYG
+coupon no.141 AX5B3DODGMVG
+coupon no.142 IDR4RZ0H9AN3
+coupon no.143 78HVUWSM2MFN
+coupon no.144 HKETH9WRDEC8
+coupon no.145 NC9ESBZ5VILI
+coupon no.146 4FLER6LSOLCH
+coupon no.147 L0ZCC7SZHJ16
+coupon no.148 FPJN2MVKFRMD
+coupon no.149 2FA6D4HBDGRC
+coupon no.150 YLW7YHKA27CB
+coupon no.151 R2AHCEVUZIWQ
+coupon no.152 QWXGCIZSSMO5
+coupon no.153 A5M4DLS8JTY7
+coupon no.154 M8QYBQ50WLOU
+coupon no.155 P2RNVDU6XH82
+coupon no.156 8N1BBAAEGBL8
+coupon no.157 2PJN5G0V4494
+coupon no.158 JS2QAIQ93R7S
+coupon no.159 LRC9WWSREPBY
+coupon no.160 ST3RYQ1NN5MG
+coupon no.161 FQ0OCG793S9O
+coupon no.162 JZ4K0DDF10F6
+coupon no.163 SDNL4Q58BDF1
+coupon no.164 PR7ZWO97BZ8R
+coupon no.165 GWD0TPGLQG10
+coupon no.166 H627P3YBYJM2
+coupon no.167 2NBGKYA2GEEH
+coupon no.168 R9NE8UVSZYQO
+coupon no.169 6M6S808GQDJE
+coupon no.170 1FJLZ72UJN9O
+coupon no.171 QSWIVNAHY0ZV
+coupon no.172 40U7D9KGNSNJ
+coupon no.173 830BB34Z5UGD
+coupon no.174 OED6Q8LMPB6V
+coupon no.175 18VXH43MXZ5I
+coupon no.176 TBXOPC35KTET
+coupon no.177 NEKY3FDCXDWH
+coupon no.178 722G2Y5IVHGF
+coupon no.179 D0Y47HD6BQ9D
+coupon no.180 OZI60AVBQ28I
+coupon no.181 VXTAVAZWJ1G8
+coupon no.182 76M19IPC3C0T
+coupon no.183 V791ZQMP9147
+coupon no.184 6BV4ED7Q8ZF6
+coupon no.185 ONUJDDRA78DI
+coupon no.186 HRZOHHDTO9IG
+coupon no.187 4K1ZX4X12G4F
+coupon no.188 T6ZHZCCU85SF
+coupon no.189 4WWQZF5ABACB
+coupon no.190 ROXK6P3MNCT3
+coupon no.191 OWM6RQBOGF5S
+coupon no.192 E2ESEJ9Y6HLJ
+coupon no.193 DXJECVUTKZD5
+coupon no.194 2LMO21NCSBLG
+coupon no.195 FCUQWL99QLMA
+coupon no.196 HLJX67U1QQPB
+coupon no.197 0CZ43NJZ9ZG3
+coupon no.198 01O9E5A0IFFP
+coupon no.199 PCPUK158V1BS
+coupon no.200 HJVY7ZB890D0
diff --git a/problem 0004/solution for problem 0004.py b/problem 0004/solution for problem 0004.py
new file mode 100644
index 00000000..cdb4d9cb
--- /dev/null
+++ b/problem 0004/solution for problem 0004.py
@@ -0,0 +1,9 @@
+def count():
+ name = raw_input("Enter file:")
+ if len(name) < 1 : name = "test.txt"
+ handle = open(name)
+ count_words=list()
+ for line in handle:
+ count_words+=line.split()
+ return len(count_words)
+print count()
\ No newline at end of file
diff --git a/python b/python
new file mode 160000
index 00000000..4ae3b1cc
--- /dev/null
+++ b/python
@@ -0,0 +1 @@
+Subproject commit 4ae3b1cc45266a9a769960696ead49087cc02cd3
diff --git a/rahulgsalecha/0001/calculator.py b/rahulgsalecha/0001/calculator.py
new file mode 100644
index 00000000..1e7be212
--- /dev/null
+++ b/rahulgsalecha/0001/calculator.py
@@ -0,0 +1,38 @@
+#simple calculator
+
+#define functions
+
+def add(x,y):
+ return x + y
+
+def subtract(x,y):
+ return x-y
+
+def multiply(x,y):
+ return x*y
+
+def divide(x,y):
+ return x/y
+
+#take input from the user
+print("Select Operation:")
+print("1.Add")
+print("2.Subtract")
+print("3.Multiply")
+print("4.Divide")
+
+choice = int(input("enter choice(1/2/3/4):"))
+
+num1 = int(input("Enter first number: "))
+num2 = int(input("Enter second number: "))
+
+if choice == 1:
+ print(num1,"+",num2,"=", add(num1,num2))
+elif choice == 2:
+ print(num1,"-",num2,"=", subtract(num1,num2))
+elif choice == 3:
+ print(num1,"*",num2,"=", multiply(num1,num2))
+elif choice == 4:
+ print(num1,"/",num2,"=", divide(num1,num2))
+else:
+ print("Invalid input")
diff --git a/rahulgsalecha/0001/result.txt b/rahulgsalecha/0001/result.txt
new file mode 100644
index 00000000..f6def1a2
--- /dev/null
+++ b/rahulgsalecha/0001/result.txt
@@ -0,0 +1,96 @@
+TESTING$ python calculator.py
+Select Operation:
+1.Add
+2.Subtract
+3.Multiply
+4.Divide
+enter choice(1/2/3/4):1
+Enter first number: 3
+Enter second number: 2
+(3, '+', 2, '=', 5)
+TESTING$ python calculator.py
+Select Operation:
+1.Add
+2.Subtract
+3.Multiply
+4.Divide
+enter choice(1/2/3/4):2
+Enter first number: 2
+Enter second number: 3
+(2, '-', 3, '=', -1)
+TESTING$ python calculator.py
+Select Operation:
+1.Add
+2.Subtract
+3.Multiply
+4.Divide
+enter choice(1/2/3/4):3
+Enter first number: 5
+Enter second number: 6
+(5, '*', 6, '=', 30)
+TESTING$ python calculator.py
+Select Operation:
+1.Add
+2.Subtract
+3.Multiply
+4.Divide
+enter choice(1/2/3/4):4
+Enter first number: 4
+Enter second number: 2
+(4, '/', 2, '=', 2)
+TESTING$ python calculator.py
+Select Operation:
+1.Add
+2.Subtract
+3.Multiply
+4.Divide
+enter choice(1/2/3/4):1
+Enter first number: -1
+Enter second number: -1
+(-1, '+', -1, '=', -2)
+TESTING$ python calculator.py
+Select Operation:
+1.Add
+2.Subtract
+3.Multiply
+4.Divide
+enter choice(1/2/3/4):2
+Enter first number: -1
+Enter second number: -1
+(-1, '-', -1, '=', 0)
+TESTING$ python calculator.py
+Select Operation:
+1.Add
+2.Subtract
+3.Multiply
+4.Divide
+enter choice(1/2/3/4):3
+Enter first number: 0
+Enter second number: 0
+(0, '*', 0, '=', 0)
+TESTING$ python calculator.py
+Select Operation:
+1.Add
+2.Subtract
+3.Multiply
+4.Divide
+enter choice(1/2/3/4):2
+Enter first number: 1
+Enter second number: 1
+(1, '-', 1, '=', 0)
+TESTING$ python calculator.py
+Select Operation:
+1.Add
+2.Subtract
+3.Multiply
+4.Divide
+enter choice(1/2/3/4):4
+Enter first number: 0
+Enter second number: 0
+Traceback (most recent call last):
+ File "calculator.py", line 36, in
+ print(num1,"/",num2,"=", divide(num1,num2))
+ File "calculator.py", line 15, in divide
+ return x/y
+ZeroDivisionError: integer division or modulo by zero
+TESTING$
diff --git a/razzl/0000/0000.py b/razzl/0000/0000.py
new file mode 100644
index 00000000..35de70ff
--- /dev/null
+++ b/razzl/0000/0000.py
@@ -0,0 +1,22 @@
+#!/usr/bin/env python
+
+'''
+Draw a number on the image
+'''
+
+try:
+ from PIL import Image
+ from PIL import ImageDraw
+ from PIL import ImageFont
+except ImportError:
+ import Image,ImageFont,ImageDraw
+
+def draw_number(path = '/root/Desktop/1.jpg',num = 4):
+ im = Image.open(path)#open the picture
+ size = im.size#get the size of the picture
+ fontsize = size[0]/4
+ draw = ImageDraw.Draw(im)#the ImageDraw.Draw will rerturn a object then you can draw it
+ font = ImageFont.truetype('/usr/share/fonts/dejavu/DejVuSans.ttf',fontsize)#define the font and size of the number
+ draw.text((3*fontsize,0),str(num),(255, 0, 0),font)#draw it
+ im.save('/root/Desktop/2.jpg')#save
+draw_number()
diff --git a/razzl/0001/0001.py b/razzl/0001/0001.py
new file mode 100644
index 00000000..6337c64b
--- /dev/null
+++ b/razzl/0001/0001.py
@@ -0,0 +1,17 @@
+#!/usr/bin/env python
+
+'''
+It can generate the activation code
+'''
+
+import random
+#import string
+
+f = open('C:\Users\zzl\Desktop\2.txt','w')
+for x in range(200):
+ words = [chr(a) for a in range(65,91)]+[chr(a) for a in range(97,122)]+[str(a) for a in range(0,11)]
+ # It is equal to string.ascii_letters + string.digits
+ slice = random.sample(words,10)
+ temp = str(words)
+ f.write(temp)
+f.close()
diff --git a/razzl/0002/0002.py b/razzl/0002/0002.py
new file mode 100644
index 00000000..e5edfde2
--- /dev/null
+++ b/razzl/0002/0002.py
@@ -0,0 +1,39 @@
+#!/usr/bin/env python
+
+'''
+ It can save the contents of the file to the mysql database.
+'''
+
+import os
+import random
+import MySQLdb
+#import string
+
+f = open(os.getcwd()+'\\2','w')
+for x in range(200):
+ words = [chr(a) for a in range(65,91)]+[chr(a) for a in range(97,122)]+[str(a) for a in range(0,11)]
+ # It is equal to string.ascii_letters + string.digits
+ slices = random.sample(words,10)
+ #temp = str(slices)
+ temp = "".join(slices)+'\n'
+ #print temp
+ f.write(temp)
+f.close()
+
+f = open(os.getcwd()+'\\2','r')
+words = f.readlines()
+try:
+ conn = MySQLdb.connect(host = 'localhost', user = 'root', passwd = '******', port = 3306)#connet to your local database of mysql
+
+ cur = conn.cursor()
+
+ conn.select_db('python')
+
+ count = cur.executemany('insert into test(name) values(%s)',words)#executemant need two parameters sql statement and list
+
+ conn.commit()#commit the implementation results
+ cur.close()#close the cursor
+ conn.close()# close the connect
+except MySQLdb.Error,e:
+ print "Mysql Error %d: %s" % (e.args[0], e.args[1])
+
diff --git a/razzl/0004/0004.py b/razzl/0004/0004.py
new file mode 100644
index 00000000..7df7cdba
--- /dev/null
+++ b/razzl/0004/0004.py
@@ -0,0 +1,15 @@
+'''
+It can caculate the words in the text file
+'''
+
+import re
+def calculate_words(path):
+ f = open(path,'r')
+ lines = f.readlines()
+ count = 0
+ for line in lines:
+ count+=len(re.split('[,.! ?:]',line))#use the re module to split the txt file
+ return count-len(lines)#the txt file will inlcude the '\n' and '' so sub it
+
+words = calculate_words("C:/Users/razzl/Desktop/1.txt")#in python the '/' can be the path separator in all system
+print words
diff --git a/razzl/0005/0005.py b/razzl/0005/0005.py
new file mode 100644
index 00000000..a79c5ea9
--- /dev/null
+++ b/razzl/0005/0005.py
@@ -0,0 +1,22 @@
+'''
+It can resize the photos in a file
+'''
+
+import os
+from PIL import Image
+
+def resize_photo(source_dir,width,higth,destination_dir):
+ photos = os.listdir(source_dir)
+ for photo in photos:
+ photo_abspath = os.path.join(source_dir,photo)#if you use os.path.abspath,there may be some error
+ print photo_abspath
+ if(os.path.isfile(photo_abspath)):#os.path.isfile need a abspath
+ im = Image.open(photo_abspath)
+ #w,h = im.size
+ new_im = im.resize((width,higth))#note: the resize returns a resized copy of an image , so you need a new object to save it
+ destination_path = os.path.join(destination_dir,photo)
+ new_im.save(destination_path)
+ print destination_path
+resize_photo('C:/Users/razzl/Desktop/1',800,800,'C:/Users/razzl/Desktop/2')
+
+
diff --git a/renzongxian/0008/0008.py b/renzongxian/0008/0008.py
index c3848093..35580ef0 100644
--- a/renzongxian/0008/0008.py
+++ b/renzongxian/0008/0008.py
@@ -16,7 +16,7 @@
def get_body(url):
html_content = urllib.request.urlopen(url).read()
r = re.compile('(?:<.[^>]*>)?(.*?)(?:<.[^>]*>)?
')
- result = r.findall(html_content.decode('GBK'))
+ result = r.findall(html_content.decode('GBK').encode('utf-8'))
return result
diff --git a/rusia-rak/README.md b/rusia-rak/README.md
new file mode 100644
index 00000000..dd7399f2
--- /dev/null
+++ b/rusia-rak/README.md
@@ -0,0 +1,5 @@
+# My Repository
+
+View my solutions through the url below.
+
+https://github.com/rusia-rak/My-Solutions-For-Show-Me-The-Code
diff --git a/sandeepbvv11/0001/0001.py b/sandeepbvv11/0001/0001.py
new file mode 100644
index 00000000..dc07ddaa
--- /dev/null
+++ b/sandeepbvv11/0001/0001.py
@@ -0,0 +1,13 @@
+import uuid
+import random
+st= 'qwertyuiopasdfghjklzxcvbnm!@#$%^&*'
+for i in range(0,200):
+ x=str(uuid.uuid4().fields[-1])[:10]+st
+ y=''
+ for j in range(0,10):
+ y+=random.choice(x)
+ print (y+"\n")
+
+
+
+
diff --git a/sandeepbvv11/0001/IDs.txt b/sandeepbvv11/0001/IDs.txt
new file mode 100644
index 00000000..072c81b2
--- /dev/null
+++ b/sandeepbvv11/0001/IDs.txt
@@ -0,0 +1,200 @@
+1633080030
+1575331450
+2576272470
+6025196078
+6749800715
+1809784356
+1103067567
+2317154466
+2387172619
+1311479942
+2177631153
+2370287260
+1162412523
+2518779639
+2243750316
+1938180132
+1591366150
+6188050497
+2740704135
+1600959530
+2659057887
+2345262636
+3739990209
+2002762930
+1917284190
+2693778613
+2709103722
+5489642575
+1876898180
+1238515989
+4165697613
+8088099212
+2724793887
+2049639056
+1104856673
+9166531473
+9282269858
+1448264591
+1386139747
+1065576292
+4204557152
+2512295415
+1050894477
+2524912544
+6692710623
+2616827417
+7458305235
+1044794447
+5098747466
+2797008072
+7724293396
+1111770796
+1461006658
+8989839708
+6913737732
+2187806510
+2698293925
+5016785151
+2603392454
+2409248575
+2154409098
+2334854535
+7242170605
+6087847902
+1868083093
+1558536908
+2686827506
+2053548015
+8415640657
+9152960105
+1633827298
+1584236906
+5785050546
+7180274223
+1765903205
+1337873601
+1780907326
+1822360329
+6926443396
+7399201643
+1928861800
+1134654553
+1320384102
+2233968778
+1455518823
+2517263032
+1169422273
+1716334763
+1161051209
+2015915750
+1172222839
+1986125462
+2691761365
+5616099885
+1339589794
+1698316598
+1646543965
+1149678559
+1694897607
+2748354798
+6778102246
+6210771279
+1843697405
+1157328700
+2311701369
+2354728221
+1676462923
+1406252700
+8164346992
+1597080590
+2087121727
+2581425250
+2360763824
+2719496354
+1996551439
+2307124705
+1590380101
+2033501264
+2074669740
+4330833648
+6876615313
+2197033238
+1706630780
+1492489223
+2756620317
+1879142971
+5121975454
+8565292030
+2725313491
+2916240089
+2784487922
+9672375423
+2156919306
+4857227306
+2140172516
+6028740948
+1783900706
+3855460378
+2743825061
+8344693520
+7227242087
+1276410280
+8338154889
+1404111534
+1466184954
+2368850546
+2688854049
+2481429282
+2632295224
+4492399381
+2231034178
+1575661525
+1557617235
+2673273294
+1186634339
+2078658558
+2557116528
+2147464885
+1493314057
+1016852420
+1231533029
+1363504328
+5751842538
+3130274956
+1762953006
+1919187578
+1613396255
+2140266457
+1252506424
+1718690455
+3714816841
+3729165890
+1709638350
+2553647887
+2422430080
+7186739897
+5175743127
+1939180977
+2387691619
+7026319394
+2126033877
+5044248245
+1304451862
+7791137498
+6527058140
+2529986191
+7005348341
+2561005708
+8121959066
+5634593318
+9063187949
+6972178424
+1903659460
+8855566396
+1085528406
+8036753003
+2057399339
+1136500130
+7911266804
+1021556078
diff --git a/sarikasama/0000/0000.py b/sarikasama/0000/0000.py
new file mode 100644
index 00000000..c5c0815c
--- /dev/null
+++ b/sarikasama/0000/0000.py
@@ -0,0 +1,24 @@
+#!/usr/bin/env python3
+#Add a number on my icon with the name "icon.png".
+#My icon is a little ... big.
+#Problem0000
+
+from PIL import Image, ImageDraw, ImageFont
+
+def add_number(num):
+ im = Image.open("icon.png")
+ #make a image for showing the number
+ txt = Image.new('RGBA', im.size, (255,255,255,0))
+ #use the font "arial.ttf"
+ fnt = ImageFont.truetype("arial.ttf",40)
+ #draw context
+ d = ImageDraw.Draw(txt)
+ #draw the number
+ d.text((im.size[0]-50 ,5), str(num), font=fnt, fill=(255,0,0,255))
+
+ out = Image.alpha_composite(im, txt)
+ out.show()
+ out.save("icon_"+str(num)+".png")
+
+if __name__ == '__main__':
+ add_number(42)
diff --git a/sarikasama/0000/arial.ttf b/sarikasama/0000/arial.ttf
new file mode 100644
index 00000000..7ff88f22
Binary files /dev/null and b/sarikasama/0000/arial.ttf differ
diff --git a/sarikasama/0000/icon.png b/sarikasama/0000/icon.png
new file mode 100644
index 00000000..b8e21672
Binary files /dev/null and b/sarikasama/0000/icon.png differ
diff --git a/sarikasama/0000/icon_42.png b/sarikasama/0000/icon_42.png
new file mode 100644
index 00000000..656e1adc
Binary files /dev/null and b/sarikasama/0000/icon_42.png differ
diff --git a/sarikasama/0001/0001.py b/sarikasama/0001/0001.py
new file mode 100644
index 00000000..51cbb023
--- /dev/null
+++ b/sarikasama/0001/0001.py
@@ -0,0 +1,17 @@
+#!/usr/bin/env python3
+#generate 200 activation codes for my apple store app
+
+import random, string
+
+def gene_activation_code(count, length):
+ #make sure codes are diffrent
+ res = set()
+ while len(res) < count:
+ res.add(''.join(random.choice(string.ascii_uppercase + string.digits) for _ in range(length)))
+ return res
+
+if __name__ == "__main__":
+ res = gene_activation_code(200, 8)
+ f = open("codes","w")
+ f.write("\n".join(res))
+ f.close()
diff --git a/sarikasama/0001/codes b/sarikasama/0001/codes
new file mode 100644
index 00000000..88130bcf
--- /dev/null
+++ b/sarikasama/0001/codes
@@ -0,0 +1,200 @@
+9HM28I2V
+YUTUSWLX
+KO910ZXR
+1XQ7OMTH
+R8B8XWT3
+CAZDMATI
+HNHAU3QA
+VR2A5O8L
+1A2TG34C
+X3JT0T0B
+H4LSILG3
+BCICBNNJ
+LUFUT2S0
+4H51EV7M
+WMHE0LX1
+LBO6B5U7
+EJG3J6ZZ
+YQCQV5IS
+3SEL07K3
+N288TJEL
+VFCC0K2B
+P8J9ZG5N
+TDY65TGQ
+JGR14QYY
+012QG5J7
+JJD09E6O
+1V6QXSND
+MITES6G1
+V3C09ACE
+2I84H8D9
+ZR9VA4OR
+0J8VTCFY
+XCBB9HWF
+GS1NL6UB
+70GO84CW
+T1V48W99
+H4L9PCSG
+0XSXAQT0
+D7J98ZSY
+IKB10A5S
+VQGZ5L4C
+WJU2IMH8
+0XTNP65W
+XQ671726
+LCIMNOH4
+R36ZXNGT
+NU04BJOR
+P2IJVBEP
+JT1SCFZC
+69Y6VQ7A
+V5D5G6X2
+9GCKGK6M
+UB5G5OHX
+BGA0KKP6
+6V5TSJ58
+570VS9I6
+E03UJCOB
+J2UCMXGT
+8J7XBKU4
+MIJJDS35
+TCJFR4OU
+AT1M8RXF
+6G7PZVXU
+9601SLTJ
+G585YO17
+FOO71FXH
+N4TM1W45
+D0UZGV1C
+3X44O8AC
+A89NHFE7
+9PRH0BYM
+JFC3X18B
+HXBZY6DL
+2S3LZAPT
+HX572VEB
+WX0W7R99
+VKYBQBRI
+ZDU36TBC
+4L4EU1Y5
+TEBGN81Y
+BDJFCK9I
+SXA2D5EZ
+FCG7VJN0
+MWIEFAM2
+E8TO1EY5
+1JRU6F31
+7N70U7N7
+CSIWDBUK
+VQ8KR73I
+ISHABRX5
+2TXRGDJ8
+Z90BQBSG
+WSBJ4X3L
+34EKGUR8
+A63CJ0F0
+4QJ9TB49
+PTVLGUF3
+A9B0PY0K
+ZVP29VCK
+K3H9331J
+21HG6P11
+W6GZAVVD
+I5HGBM6P
+8RTCLY8R
+5A860OIH
+VLN2ZB37
+7DRYVPHU
+FWI0HDAD
+6P9RGQ8Z
+7F9Q10FR
+7HNH3EWP
+PFHK18Z6
+5VS9PKLC
+AZMBWSKW
+XA30TWRJ
+V6HI00G4
+A385GB8L
+1UFF62RI
+3TL6B4D4
+JYWHW6EY
+JZ7X5R31
+FG51SGUY
+Z7YTXLGF
+J3AVBX3P
+FNV19XYR
+M3I2Q6EV
+YY35QIOS
+J2BMJVP3
+XW9HM2HB
+1873CQQ8
+KGL61SL7
+TU41J8F4
+U1UCSYE5
+4L45MMQ9
+MFQLY7CB
+MKFH50ZZ
+LQ44DAW9
+8599GTIB
+IGCT34SA
+Q39B1TOJ
+LANF45HH
+72PJTWPK
+F0XPL1ZO
+5U7KOGZ9
+6M1MMXZ1
+HVZQD6RB
+H2D50E2W
+WJEXAK1L
+I4CBC1W5
+X9XRXBS3
+DBNDT60B
+6C6QJW0V
+H8J8ZW8D
+64MUB2X0
+8R44E4P9
+R83AV775
+UBRSJBPF
+JN36LDJW
+3C2EEMIQ
+HRE1S0SK
+SH8QH70P
+3BI5Q1ZF
+1VAQQXA0
+QGY6Y7G6
+1QQ9FLV7
+AP1SNJP2
+G68VA57Y
+N6UHT54O
+7Q9BB5JL
+B4PIP9CJ
+BAS3O1FH
+L6Q6YVSH
+APRT16IN
+K4205WGU
+R00E9H6L
+6MW091Y5
+ERCE510B
+U8XKOESQ
+1YAXZEFB
+KESINTFI
+03DUWJYK
+VRFUU0ZR
+F5E4B6FX
+XSEBU1JQ
+3E692DCL
+SF5A49NX
+7P73NY4S
+FAI8YPYC
+TDA6FHLT
+1NIX4S8W
+R549CDKZ
+CHK907PO
+5S8BU9CN
+XJIK45B5
+PK1PKL3K
+UDU54DY7
+G863ES4G
+GNW10XUX
+FEBRWV5F
+88I6TN3R
\ No newline at end of file
diff --git a/sarikasama/0004/0004.py b/sarikasama/0004/0004.py
new file mode 100644
index 00000000..864fbfd2
--- /dev/null
+++ b/sarikasama/0004/0004.py
@@ -0,0 +1,23 @@
+#!/usr/bin/env python3
+#count words in a textfile
+
+from pprint import pprint
+import re
+
+def main():
+ res = {}
+ with open('test','r') as f:
+ content = f.read()
+ tmp = re.split(r"[^a-zA-Z]",content)
+ for w in tmp:
+ if not w:
+ continue
+ w = w.lower()
+ if w not in res:
+ res[w] = 1
+ else:
+ res[w] += 1
+ pprint(res)
+
+if __name__ == "__main__":
+ main()
diff --git a/sarikasama/0004/output b/sarikasama/0004/output
new file mode 100644
index 00000000..2bd14c75
--- /dev/null
+++ b/sarikasama/0004/output
@@ -0,0 +1,107 @@
+{'a': 5,
+ 'about': 1,
+ 'age': 1,
+ 'all': 1,
+ 'always': 2,
+ 'an': 1,
+ 'and': 1,
+ 'arms': 1,
+ 'as': 2,
+ 'at': 4,
+ 'been': 1,
+ 'before': 1,
+ 'born': 1,
+ 'but': 1,
+ 'by': 1,
+ 'can': 1,
+ 'child': 1,
+ 'count': 1,
+ 'did': 3,
+ 'dolly': 1,
+ 'dolores': 1,
+ 'dotted': 1,
+ 'down': 1,
+ 'envied': 1,
+ 'exhibit': 1,
+ 'fact': 1,
+ 'fancy': 1,
+ 'feet': 1,
+ 'fire': 1,
+ 'for': 1,
+ 'four': 1,
+ 'gentlemen': 1,
+ 'girl': 1,
+ 'had': 1,
+ 'have': 2,
+ 'i': 1,
+ 'in': 6,
+ 'indeed': 1,
+ 'initial': 1,
+ 'is': 1,
+ 'jury': 1,
+ 'ladies': 1,
+ 'lee': 2,
+ 'life': 1,
+ 'light': 1,
+ 'line': 1,
+ 'lo': 4,
+ 'loins': 1,
+ 'lola': 1,
+ 'lolita': 4,
+ 'look': 1,
+ 'loved': 1,
+ 'many': 1,
+ 'might': 1,
+ 'misinformed': 1,
+ 'morning': 1,
+ 'murderer': 1,
+ 'my': 6,
+ 'no': 1,
+ 'noble': 1,
+ 'not': 1,
+ 'number': 1,
+ 'of': 7,
+ 'oh': 1,
+ 'on': 3,
+ 'one': 3,
+ 'palate': 1,
+ 'plain': 1,
+ 'point': 1,
+ 'precursor': 1,
+ 'princedom': 1,
+ 'prose': 1,
+ 'school': 1,
+ 'sea': 1,
+ 'seraphs': 2,
+ 'she': 8,
+ 'simple': 1,
+ 'sin': 1,
+ 'slacks': 1,
+ 'sock': 1,
+ 'soul': 1,
+ 'standing': 1,
+ 'steps': 1,
+ 'style': 1,
+ 'summer': 2,
+ 'ta': 2,
+ 'taking': 1,
+ 'tangle': 1,
+ 'tap': 1,
+ 'teeth': 1,
+ 'ten': 1,
+ 'that': 1,
+ 'the': 10,
+ 'there': 1,
+ 'this': 1,
+ 'thorns': 1,
+ 'three': 2,
+ 'tip': 1,
+ 'to': 1,
+ 'tongue': 1,
+ 'trip': 1,
+ 'was': 7,
+ 'what': 1,
+ 'when': 1,
+ 'winged': 1,
+ 'years': 1,
+ 'you': 1}
diff --git a/sarikasama/0004/test b/sarikasama/0004/test
new file mode 100644
index 00000000..c18efc11
--- /dev/null
+++ b/sarikasama/0004/test
@@ -0,0 +1 @@
+Lolita, light of my life, fire of my loins. My sin, my soul. Lo-lee-ta: the tip of the tongue taking a trip of three steps down the palate to tap, at three, on the teeth. Lo. Lee. Ta. She was Lo, plain Lo, in the morning, standing four feet ten in one sock. She was Lola in slacks. She was Dolly at school. She was Dolores on the dotted line. But in my arms she was always Lolita. Did she have a precursor? She did, indeed she did. In point of fact, there might have been no Lolita at all had I not loved, one summer, an initial girl-child. In a princedom by the sea. Oh when? About as many years before Lolita was born as my age was that summer. You can always count on a murderer for a fancy prose style. Ladies and gentlemen of the jury, exhibit number one is what the seraphs, the misinformed, simple, noble-winged seraphs, envied. Look at this tangle of thorns.
\ No newline at end of file
diff --git a/sarikasama/0005/0005.py b/sarikasama/0005/0005.py
new file mode 100644
index 00000000..8d275531
--- /dev/null
+++ b/sarikasama/0005/0005.py
@@ -0,0 +1,18 @@
+#!/usr/bin/env python3
+#change the resolution of pics in dir 'test' to at most 1136*640 for iphone5
+from PIL import Image
+import os
+
+def main():
+ os.chdir('test')
+ for root,dirs,files in os.walk(os.getcwd()):
+ for f in files:
+ im = Image.open(f)
+ if im.size[0] > 1136:
+ im.resize([1136,im.size[1]])
+ if im.size[1] > 640:
+ im.resize([im.size[0],640])
+ im.save('test_'+im.filename)
+
+if __name__=='__main__':
+ main()
diff --git a/sarikasama/0006/0006.py b/sarikasama/0006/0006.py
new file mode 100644
index 00000000..66823951
--- /dev/null
+++ b/sarikasama/0006/0006.py
@@ -0,0 +1,40 @@
+#!/usr/bin/env python3
+#get the most important word in the text
+
+import os, re
+from pprint import pprint
+
+def most_important_word(f):
+ #get the count of words in the text
+ res = {}
+ content = f.read()
+ tmp = re.split(r"[^a-zA-Z]",content)
+ for w in tmp:
+ if not w:
+ continue
+ w = w.lower()
+ if w not in res:
+ res[w] = 1
+ else:
+ res[w] += 1
+
+ #get the word of most importance
+ res['']=0
+ max = ''
+ for i in res:
+ if res[i] > res[max]:
+ max = i
+ return max
+
+def main():
+ res = {}
+ os.chdir('test')
+ for root,dirs,files in os.walk(os.getcwd()):
+ for file in files:
+ with open(file,'r') as f:
+ res[f.name]=most_important_word(f)
+ return res
+
+if __name__ == "__main__":
+ res = main()
+ pprint(res)
diff --git a/sarikasama/0007/0007.py b/sarikasama/0007/0007.py
new file mode 100644
index 00000000..ba8c417a
--- /dev/null
+++ b/sarikasama/0007/0007.py
@@ -0,0 +1,35 @@
+#!/usr/bin/env python3
+#count lines of code in directory 'test'
+
+import os
+
+def count_lines(f):
+ #get the count of lines in the code
+ total = note = empty_row = 0
+ line = f.readline()
+ while line != '':
+ if line[0] == '#':
+ note += 1
+ total += 1
+ elif line == '\n':
+ empty_row += 1
+ total += 1
+ else:
+ total += 1
+ line = f.readline()
+ return total, note, empty_row
+
+def main():
+ res = {}
+ os.chdir('test')
+ for root,dirs,files in os.walk(os.getcwd()):
+ for file in files:
+ with open(file,'r') as f:
+ res[f.name]=count_lines(f)
+ return res
+
+if __name__=="__main__":
+ res = main()
+ for i in res:
+ print(i+"\ntotal:"+str(res[i][0])+"\nnote:"+str(res[i][1])+"\nempty_line:"+str(res[i][2]))
+ print("\n")
diff --git a/sarikasama/0008/0008.py b/sarikasama/0008/0008.py
new file mode 100644
index 00000000..1f50c6dc
--- /dev/null
+++ b/sarikasama/0008/0008.py
@@ -0,0 +1,26 @@
+#!/usr/bin/env pyhton3
+#get the text in a html file
+
+import re, urllib.request
+
+def get_text(url):
+ content = url.read()
+ try:
+ content = content.decode('utf-8')
+ except:
+ content = content.decode('gbk')
+
+ content = re.sub(r'', '', content, flags = re.DOTALL)
+ content = re.sub(r'', '', content, flags = re.DOTALL)
+ content = re.sub(r'', '', content, flags = re.DOTALL)
+ content = re.sub(r'<[^>]*>', '', content)
+ content = re.sub(r'\n', '', content)
+
+ print(content)
+
+def main():
+ with urllib.request.urlopen('http://thwiki.cc/') as url:
+ get_text(url)
+
+if __name__ == '__main__':
+ main()
diff --git a/sarikasama/0009/0009.py b/sarikasama/0009/0009.py
new file mode 100644
index 00000000..454f1460
--- /dev/null
+++ b/sarikasama/0009/0009.py
@@ -0,0 +1,18 @@
+#!/usr/bin/env pyhton3
+#get the link in a html file
+
+import re, urllib.request
+from lxml.html import parse
+
+def get_link(url):
+ dom = parse(url).getroot()
+ links = dom.xpath('//a')
+ for link in links:
+ link = link
+ try:
+ print(link.attrib['href'])
+ except:
+ pass
+
+if __name__ == '__main__':
+ get_link('http://thwiki.cc/')
diff --git a/sarikasama/0010/0010.py b/sarikasama/0010/0010.py
new file mode 100644
index 00000000..01125d7b
--- /dev/null
+++ b/sarikasama/0010/0010.py
@@ -0,0 +1,29 @@
+#!/usr/bin/env python3
+#generate random verification codes in letters
+
+import random, string
+from PIL import Image, ImageDraw, ImageFont, ImageFilter
+
+def gene_verification_code_pic():
+ #initialize
+ im = Image.new('RGB', (200, 50), (255, 255, 255))
+ font = ImageFont.truetype('arial.ttf', 30)
+ draw = ImageDraw.Draw(im)
+
+ #init background with light color
+ for i in range(200):
+ for j in range(50):
+ draw.point((i, j), fill=(random.randint(128,255),random.randint(128,255),random.randint(128,255)))
+
+ #init letters with deep color
+ for t in range(4):
+ draw.text((50*t+10, 10), random.choice(string.ascii_letters), font=font, fill=(random.randint(0,127), random.randint(0,127), random.randint(0,127)))
+
+ #make the pic blurred
+ im = im.filter(ImageFilter.BLUR)
+ return im
+
+if __name__ == '__main__':
+ im = gene_verification_code_pic()
+ im.show()
+ im.save('res.jpg')
diff --git a/sarikasama/0010/arial.ttf b/sarikasama/0010/arial.ttf
new file mode 100644
index 00000000..7ff88f22
Binary files /dev/null and b/sarikasama/0010/arial.ttf differ
diff --git a/sarikasama/0010/res.jpg b/sarikasama/0010/res.jpg
new file mode 100644
index 00000000..e079b88c
Binary files /dev/null and b/sarikasama/0010/res.jpg differ
diff --git a/sarikasama/0011/0011.py b/sarikasama/0011/0011.py
new file mode 100644
index 00000000..c105c831
--- /dev/null
+++ b/sarikasama/0011/0011.py
@@ -0,0 +1,19 @@
+#!/usr/bin/env python3
+#filter sensitive words in user's input
+
+def filter_sensitive_words(input_word):
+ s_words = []
+ with open('filtered_words','r') as f:
+ line = f.readline()
+ while line != '':
+ s_words.append(line.strip())
+ line = f.readline()
+ if input_word in s_words:
+ print("Freedom")
+ else:
+ print("Human Rights")
+
+if __name__ == '__main__':
+ while True:
+ input_word = input('--> ')
+ filter_sensitive_words(input_word)
diff --git a/sarikasama/0011/filtered_words b/sarikasama/0011/filtered_words
new file mode 100644
index 00000000..f0da7ccc
--- /dev/null
+++ b/sarikasama/0011/filtered_words
@@ -0,0 +1,11 @@
+北京
+程序员
+公务员
+领导
+牛比
+牛逼
+你娘
+你妈
+love
+sex
+ jiangge
diff --git a/sarikasama/0012/0012.py b/sarikasama/0012/0012.py
new file mode 100644
index 00000000..df193d81
--- /dev/null
+++ b/sarikasama/0012/0012.py
@@ -0,0 +1,19 @@
+#!/usr/bin/env python3
+#filter sensitive words in user's input
+
+def replace_sensitive_words(input_word):
+ s_words = []
+ with open('filtered_words','r') as f:
+ line = f.readline()
+ while line != '':
+ s_words.append(line.strip())
+ line = f.readline()
+ for word in s_words:
+ if word in input_word:
+ input_word = input_word.replace(word, "**")
+ print(input_word)
+
+if __name__ == '__main__':
+ while True:
+ input_word = input('--> ')
+ replace_sensitive_words(input_word)
diff --git a/sarikasama/0012/filtered_words b/sarikasama/0012/filtered_words
new file mode 100644
index 00000000..f0da7ccc
--- /dev/null
+++ b/sarikasama/0012/filtered_words
@@ -0,0 +1,11 @@
+北京
+程序员
+公务员
+领导
+牛比
+牛逼
+你娘
+你妈
+love
+sex
+ jiangge
diff --git a/sarikasama/0013/0013.py b/sarikasama/0013/0013.py
new file mode 100644
index 00000000..76ee61a1
--- /dev/null
+++ b/sarikasama/0013/0013.py
@@ -0,0 +1,26 @@
+#!/usr/bin/env python3
+#get all pic in a url
+
+from urllib.request import urlopen
+from bs4 import BeautifulSoup
+
+def img_crawler(url):
+ content = url.read()
+ bs_object = BeautifulSoup(content)
+ bs_imgs = bs_object.find_all('img', pic_type='0')
+
+ for img in bs_imgs:
+ img_url = img['src']
+ try:
+ img_content = urlopen(img_url).read()
+ except:
+ pass
+ print("Downloading... "+img_url)
+ img_f = open(img_url.split('/')[-1], 'wb')
+ img_f.write(img_content)
+ img_f.close()
+ print("Complete!")
+
+if __name__ == '__main__':
+ url = urlopen('http://tieba.baidu.com/p/2166231880')
+ img_crawler(url)
diff --git a/sarikasama/0014/0014.py b/sarikasama/0014/0014.py
new file mode 100644
index 00000000..6d082f91
--- /dev/null
+++ b/sarikasama/0014/0014.py
@@ -0,0 +1,20 @@
+#!/usr/bin/env python3
+#from json to xlsx
+
+import xlsxwriter, json
+
+def json2xls():
+ wb = xlsxwriter.Workbook('student.xls')
+ ws = wb.add_worksheet("student")
+
+ with open('./student') as f:
+ data = json.load(f)
+ for i in range(len(data)):
+ ws.write(i, 0, i+1)
+ json_data = data[str(i+1)]
+ for j in range(len(json_data)):
+ ws.write(i, j+1, json_data[j])
+ wb.close()
+
+if __name__=='__main__':
+ json2xls()
diff --git a/sarikasama/0014/student b/sarikasama/0014/student
new file mode 100644
index 00000000..1c4ffe6d
--- /dev/null
+++ b/sarikasama/0014/student
@@ -0,0 +1,5 @@
+{
+ "1":["张三",150,120,100],
+ "2":["李四",90,99,95],
+ "3":["王五",60,66,68]
+}
diff --git a/sarikasama/0014/student.xls b/sarikasama/0014/student.xls
new file mode 100644
index 00000000..8575f90c
Binary files /dev/null and b/sarikasama/0014/student.xls differ
diff --git a/sarikasama/0015/0015.py b/sarikasama/0015/0015.py
new file mode 100644
index 00000000..64371333
--- /dev/null
+++ b/sarikasama/0015/0015.py
@@ -0,0 +1,18 @@
+#!/usr/bin/env python3
+#from json to xlsx
+
+import xlsxwriter, json
+
+def json2xls():
+ wb = xlsxwriter.Workbook('city.xls')
+ ws = wb.add_worksheet("city")
+
+ with open('./city') as f:
+ data = json.load(f)
+ for i in range(len(data)):
+ ws.write(i, 0, i+1)
+ ws.write(i, 1, data[str(i+1)])
+ wb.close()
+
+if __name__=='__main__':
+ json2xls()
diff --git a/sarikasama/0015/city b/sarikasama/0015/city
new file mode 100644
index 00000000..b5a6874d
--- /dev/null
+++ b/sarikasama/0015/city
@@ -0,0 +1,5 @@
+{
+ "1" : "上海",
+ "2" : "北京",
+ "3" : "成都"
+}
diff --git a/sarikasama/0015/city.xls b/sarikasama/0015/city.xls
new file mode 100644
index 00000000..c4d1e10b
Binary files /dev/null and b/sarikasama/0015/city.xls differ
diff --git a/sarikasama/0016/0016.py b/sarikasama/0016/0016.py
new file mode 100644
index 00000000..269e8997
--- /dev/null
+++ b/sarikasama/0016/0016.py
@@ -0,0 +1,18 @@
+#!/usr/bin/env python3
+#from json to xlsx
+
+import xlsxwriter, json
+
+def json2xls():
+ wb = xlsxwriter.Workbook('numbers.xls')
+ ws = wb.add_worksheet("numbers")
+
+ with open('./numbers') as f:
+ data = json.load(f)
+ for i in range(len(data)):
+ for j in range(len(data[i])):
+ ws.write(i, j, data[i][j])
+ wb.close()
+
+if __name__=='__main__':
+ json2xls()
diff --git a/sarikasama/0016/numbers b/sarikasama/0016/numbers
new file mode 100644
index 00000000..dbe6d92f
--- /dev/null
+++ b/sarikasama/0016/numbers
@@ -0,0 +1,5 @@
+[
+ [1, 82, 65535],
+ [20, 90, 13],
+ [26, 809, 1024]
+]
diff --git a/sarikasama/0016/numbers.xls b/sarikasama/0016/numbers.xls
new file mode 100644
index 00000000..e5ea32d8
Binary files /dev/null and b/sarikasama/0016/numbers.xls differ
diff --git a/sarikasama/0017/0017.py b/sarikasama/0017/0017.py
new file mode 100644
index 00000000..d42a7595
--- /dev/null
+++ b/sarikasama/0017/0017.py
@@ -0,0 +1,26 @@
+#!/usr/bin/env python3
+#convert from xls to xml
+
+import xlrd, json
+from lxml import etree
+from collections import OrderedDict
+
+def xls2xml(xls_name):
+ with xlrd.open_workbook(xls_name) as wb:
+ ws = wb.sheet_by_index(0)
+ table = OrderedDict()
+ for i in range(ws.nrows):
+ key = int(ws.row_values(i)[0])
+ value = str(ws.row_values(i)[1:])
+ table[key] = value
+
+ with open("student.xml", 'w') as f:
+ root = etree.Element("root")
+ e_root = etree.ElementTree(root)
+ e_students = etree.SubElement(root, 'students')
+ e_students.text = '\n'+str(json.dumps(table, indent=4, ensure_ascii=False))+'\n'
+ e_students.append(etree.Comment('\n 学生信息表\n "id" : [名字,数学,语文,英语]\n'))
+ f.write(''+etree.tounicode(e_root.getroot()))
+
+if __name__=="__main__":
+ xls2xml('student.xls')
diff --git a/sarikasama/0017/student.xls b/sarikasama/0017/student.xls
new file mode 100644
index 00000000..8575f90c
Binary files /dev/null and b/sarikasama/0017/student.xls differ
diff --git a/sarikasama/0017/student.xml b/sarikasama/0017/student.xml
new file mode 100644
index 00000000..bb68d95c
--- /dev/null
+++ b/sarikasama/0017/student.xml
@@ -0,0 +1,10 @@
+
+{
+ "1": "['张三', 150.0, 120.0, 100.0]",
+ "2": "['李四', 90.0, 99.0, 95.0]",
+ "3": "['王五', 60.0, 66.0, 68.0]"
+}
+
diff --git a/sarikasama/0018/0018.py b/sarikasama/0018/0018.py
new file mode 100644
index 00000000..277f1ba9
--- /dev/null
+++ b/sarikasama/0018/0018.py
@@ -0,0 +1,26 @@
+#!/usr/bin/env python3
+#convert from xls to xml
+
+import xlrd, json
+from lxml import etree
+from collections import OrderedDict
+
+def xls2xml(xls_name):
+ with xlrd.open_workbook(xls_name) as wb:
+ ws = wb.sheet_by_index(0)
+ table = OrderedDict()
+ for i in range(ws.nrows):
+ key = int(ws.row_values(i)[0])
+ value = ws.row_values(i)[1]
+ table[key] = value
+
+ with open("city.xml", 'w') as f:
+ root = etree.Element("root")
+ e_root = etree.ElementTree(root)
+ e_citys = etree.SubElement(root, 'citys')
+ e_citys.text = '\n'+str(json.dumps(table, indent=4, ensure_ascii=False))+'\n'
+ e_citys.append(etree.Comment('\n 城市信息\n'))
+ f.write(''+etree.tounicode(e_root.getroot()))
+
+if __name__=="__main__":
+ xls2xml('city.xls')
diff --git a/sarikasama/0018/city.xls b/sarikasama/0018/city.xls
new file mode 100644
index 00000000..c4d1e10b
Binary files /dev/null and b/sarikasama/0018/city.xls differ
diff --git a/sarikasama/0018/city.xml b/sarikasama/0018/city.xml
new file mode 100644
index 00000000..0db0e9cb
--- /dev/null
+++ b/sarikasama/0018/city.xml
@@ -0,0 +1,9 @@
+
+{
+ "1": "上海",
+ "2": "北京",
+ "3": "成都"
+}
+
diff --git a/sarikasama/0019/0019.py b/sarikasama/0019/0019.py
new file mode 100644
index 00000000..1f10af93
--- /dev/null
+++ b/sarikasama/0019/0019.py
@@ -0,0 +1,23 @@
+#!/usr/bin/env python3
+#convert from xls to xml
+
+import xlrd, json
+from lxml import etree
+
+def xls2xml(xls_name):
+ with xlrd.open_workbook(xls_name) as wb:
+ ws = wb.sheet_by_index(0)
+ table = []
+ for i in range(ws.nrows):
+ table.append(ws.row_values(i))
+
+ with open("numbers.xml", 'w') as f:
+ root = etree.Element("root")
+ e_root = etree.ElementTree(root)
+ e_numbers = etree.SubElement(root, 'numbers')
+ e_numbers.text = '\n'+str(json.dumps(table, indent=4))+'\n'
+ e_numbers.append(etree.Comment('\n 数字信息\n'))
+ f.write(''+etree.tounicode(e_root.getroot()))
+
+if __name__=="__main__":
+ xls2xml('numbers.xls')
diff --git a/sarikasama/0019/numbers.xls b/sarikasama/0019/numbers.xls
new file mode 100644
index 00000000..e5ea32d8
Binary files /dev/null and b/sarikasama/0019/numbers.xls differ
diff --git a/sarikasama/0019/numbers.xml b/sarikasama/0019/numbers.xml
new file mode 100644
index 00000000..951bb1d1
--- /dev/null
+++ b/sarikasama/0019/numbers.xml
@@ -0,0 +1,21 @@
+
+[
+ [
+ 1.0,
+ 82.0,
+ 65535.0
+ ],
+ [
+ 20.0,
+ 90.0,
+ 13.0
+ ],
+ [
+ 26.0,
+ 809.0,
+ 1024.0
+ ]
+]
+
diff --git a/sarikasama/0021/0021.py b/sarikasama/0021/0021.py
new file mode 100644
index 00000000..648a830f
--- /dev/null
+++ b/sarikasama/0021/0021.py
@@ -0,0 +1,18 @@
+#!/usr/bin/env python3
+
+import hmac, hashlib, os
+
+def encrypt_passwd(password, salt=None):
+ if salt is None:
+ salt = str(os.urandom(8)).encode('utf-8')
+ if isinstance(password, str):
+ password = password.encode('utf-8')
+
+ result = password
+ for i in range(10):
+ result = hmac.HMAC(result, salt, hashlib.sha256).digest()
+ return salt+result
+
+if __name__=="__main__":
+ e_passwd = encrypt_passwd(b'hello')
+ print(e_passwd)
diff --git a/sarikasama/0022/0022.py b/sarikasama/0022/0022.py
new file mode 100644
index 00000000..269a1af9
--- /dev/null
+++ b/sarikasama/0022/0022.py
@@ -0,0 +1,32 @@
+#!/usr/bin/env python3
+#change the resolution of pics in dir 'test' to at most 1136*640 for iphone5, 1334*750 for iphone6, or 1920*1080 for iphone6 Plus.
+from PIL import Image
+import os
+
+def main():
+ os.chdir('test')
+ flag = input("Which shen do you use?\n1:iphone5\n2:iphone6\n3:iphone Plus")
+ for root,dirs,files in os.walk(os.getcwd()):
+ for f in files:
+ im = Image.open(f)
+ if flag == 1:
+ if im.size[0] > 1136:
+ im.resize([1136,im.size[1]])
+ if im.size[1] > 640:
+ im.resize([im.size[0],640])
+ elif flag == 2:
+ if im.size[0] > 1334:
+ im.resize([1136,im.size[1]])
+ if im.size[1] > 750:
+ im.resize([im.size[0],750])
+ elif flag == 3:
+ if im.size[0] > 1920:
+ im.resize([1136,im.size[1]])
+ if im.size[1] > 1080:
+ im.resize([im.size[0],1080])
+ else:
+ print("Input fault.")
+ im.save('test_'+im.filename)
+
+if __name__=='__main__':
+ main()
diff --git a/sarikasama/README.md b/sarikasama/README.md
new file mode 100644
index 00000000..3dc0eb68
--- /dev/null
+++ b/sarikasama/README.md
@@ -0,0 +1,2 @@
+# My version of show-me-the-code
+No environment for debuging 0002, 0003 and 0020, so i ignored them
diff --git a/sophie2805/0001/Practice_0001.py b/sophie2805/0001/Practice_0001.py
new file mode 100644
index 00000000..65f63215
--- /dev/null
+++ b/sophie2805/0001/Practice_0001.py
@@ -0,0 +1,27 @@
+#! /usr/bin/env python
+#! -*- coding:utf-8 -*-
+
+import random, string
+__author__ = 'Sophie'
+
+def randomSequence(r,l):
+ s = string.letters + string.digits + '@#$%&*'
+ random_seq = []
+
+ # Method_1
+ #for i in range(r):
+ # random_seq.append(''.join(random.sample(s,l)))
+ #return random_seq
+
+ # Method_2
+ sl = list(s)
+ print sl
+ for i in range(r):
+ random.shuffle(sl)
+ random_seq.append(''.join(sl[:l]))
+ return random_seq
+
+if __name__ == '__main__':
+ result = randomSequence(200,8)
+ for i in range(len(result)):
+ print result[i]
\ No newline at end of file
diff --git a/stingroc/0001/0001.py b/stingroc/0001/0001.py
new file mode 100644
index 00000000..36e8c879
--- /dev/null
+++ b/stingroc/0001/0001.py
@@ -0,0 +1,28 @@
+import random
+
+if __name__ == "__main__":
+ NUM_OF_TICKET = 20
+ LENGTH_OF_TICKET = 10
+
+ char_lst = []
+
+ def get_lst(lst, c1, c2):
+ char_lst = lst[0]
+ for i in range(ord(c1), ord(c2) + 1):
+ char_lst.append(chr(i))
+
+ get_lst([char_lst], '0', '9')
+ get_lst([char_lst], 'a', 'z')
+ get_lst([char_lst], 'A', 'Z')
+
+ def gen_ticket():
+ single_ticket_lst = [char_lst[random.randint(0, len(char_lst) - 1)]
+ for i in range(LENGTH_OF_TICKET)]
+
+ return "".join(single_ticket_lst)
+
+ result = set()
+ while len(result) <= NUM_OF_TICKET:
+ result.add(gen_ticket())
+
+ print result
diff --git a/vvzwvv/0000/0000.py b/vvzwvv/0000/0000.py
new file mode 100644
index 00000000..043edf91
--- /dev/null
+++ b/vvzwvv/0000/0000.py
@@ -0,0 +1,15 @@
+from PIL import Image, ImageDraw, ImageFont
+
+def add_num(num, fill, font_name):
+ im = Image.open("in.jpg")
+ xsize, ysize = im.size
+ draw = ImageDraw.Draw(im)
+ text = str(num)
+ font = ImageFont.truetype(font_name, xsize // 5)
+ draw.text((ysize // 5 * 4, 0), text, fill, font)
+ im.save("out.jpg")
+
+num = 2
+fill = (255, 0, 0)
+font_name = "verdana.ttf"
+add_num(num, fill, font_name)
\ No newline at end of file
diff --git a/vvzwvv/0000/in.jpg b/vvzwvv/0000/in.jpg
new file mode 100644
index 00000000..c9ecf95d
Binary files /dev/null and b/vvzwvv/0000/in.jpg differ
diff --git a/vvzwvv/0000/verdana.ttf b/vvzwvv/0000/verdana.ttf
new file mode 100644
index 00000000..59f22739
Binary files /dev/null and b/vvzwvv/0000/verdana.ttf differ
diff --git a/vvzwvv/0001/0001.py b/vvzwvv/0001/0001.py
new file mode 100644
index 00000000..935565cb
--- /dev/null
+++ b/vvzwvv/0001/0001.py
@@ -0,0 +1,14 @@
+import uuid
+
+def gen(num, len):
+ L = []
+ for i in range(num):
+ ran = str(uuid.uuid4()).replace('-', '')[:len]
+ if not ran in L:
+ L.append(ran)
+ return L
+
+if __name__ == '__main__':
+ for item in gen(200, 16):
+ print(item)
+
\ No newline at end of file
diff --git a/vvzwvv/0004/0004.py b/vvzwvv/0004/0004.py
new file mode 100644
index 00000000..62e49715
--- /dev/null
+++ b/vvzwvv/0004/0004.py
@@ -0,0 +1,28 @@
+#!/usr/bin/env python
+#-*- coding: utf-8 -*-
+
+import urllib
+import re
+
+def getHtml(url):
+ page = urllib.urlopen(url)
+ html = page.read()
+ return html
+
+def getImg(html):
+ # src="http://imgsrc.baidu.com/forum/w%3D580%3Bcp%3Dtieba%2C10%2C302%3Bap%3D%C9%BC%B1%BE%D3%D0%C3%C0%B0%C9%2C90%2C310/sign=8800a2e3b3119313c743ffb855036fa7/1e29460fd9f9d72abb1a7c3cd52a2834349bbb7e.jpg" bdwater=
+ reg = r'src="(.+?\.jpg)" bdwater='
+ img_re = re.compile(reg)
+ img_list = re.findall(img_re, html)
+ return img_list
+
+def saveImg(img_list):
+ x = 0
+ for img_url in img_list:
+ urllib.urlretrieve(img_url, '%s.jpg' % x)
+ x += 1
+
+
+if __name__ == "__main__":
+ html = getHtml("http://tieba.baidu.com/p/2166231880")
+ saveImg(getImg(html))
\ No newline at end of file
diff --git a/vvzwvv/0010/0010.py b/vvzwvv/0010/0010.py
new file mode 100644
index 00000000..04942a8b
--- /dev/null
+++ b/vvzwvv/0010/0010.py
@@ -0,0 +1,42 @@
+#!/usr/bin/env python
+#-*- coding: utf-8 -*-
+
+import string
+import random
+from PIL import Image, ImageDraw, ImageFont, ImageFilter
+
+def create_image(image_size = (300, 100),
+ background_color = (255, 255, 255),
+ font_type = "arialbd.ttf",
+ font_size = 50,
+ text_num = 4,
+ point_chance = 50):
+
+ im = Image.new("RGB", image_size, background_color)
+ draw = ImageDraw.Draw(im)
+ image_width, image_height = image_size
+
+ def create_text():
+ text_font = ImageFont.truetype(font_type, font_size)
+ font_width, font_height = text_font.getsize("A")
+ for i in range(text_num):
+ text = random.choice(string.ascii_uppercase)
+ text_loc = ((image_width - font_width) / text_num * (i + 0.5), (image_height - font_height) / 2.3)
+ draw.text(text_loc, text, font = text_font, fill = (random.randint(0, 255) / 2, random.randint(0, 255) / 2, random.randint(0, 255) / 2))
+
+ def create_points():
+ for w in range(image_width):
+ for h in range(image_height):
+ tmp = random.randint(0, 100)
+ if tmp > point_chance:
+ draw.point((w, h), fill = (random.randint(0, 255), random.randint(0, 255), random.randint(0, 255)))
+
+ create_text()
+ create_points()
+ im = im.filter(ImageFilter.BLUR)
+
+ return im
+
+if __name__ == "__main__":
+ im = create_image()
+ im.show()
diff --git a/vvzwvv/0010/arialbd.ttf b/vvzwvv/0010/arialbd.ttf
new file mode 100644
index 00000000..d5fa0e60
Binary files /dev/null and b/vvzwvv/0010/arialbd.ttf differ
diff --git a/vvzwvv/0011/0011.py b/vvzwvv/0011/0011.py
new file mode 100644
index 00000000..a2398dd7
--- /dev/null
+++ b/vvzwvv/0011/0011.py
@@ -0,0 +1,22 @@
+from cmd import Cmd
+
+class CmdCheck(Cmd):
+
+ def __init__(self):
+ Cmd.__init__(self)
+ self.intro = "-------- Word Sensor (Input \"exit\" for termination) --------"
+ self.prompt = "> "
+ self.sensitive = map(lambda word: word.strip("\n"), open("filtered_words.txt").readlines())
+
+ def default(self, line):
+ if any([word in line for word in self.sensitive]):
+ print "Freedom"
+ else:
+ print "Human Rights"
+
+ def do_exit(self, line):
+ exit()
+
+if __name__ == "__main__":
+ cmd = CmdCheck()
+ cmd.cmdloop()
\ No newline at end of file
diff --git a/vvzwvv/0011/filtered_words.txt b/vvzwvv/0011/filtered_words.txt
new file mode 100644
index 00000000..69373b64
--- /dev/null
+++ b/vvzwvv/0011/filtered_words.txt
@@ -0,0 +1,11 @@
+北京
+程序员
+公务员
+领导
+牛比
+牛逼
+你娘
+你妈
+love
+sex
+jiangge
\ No newline at end of file
diff --git a/vvzwvv/0012/0012.py b/vvzwvv/0012/0012.py
new file mode 100644
index 00000000..1b003829
--- /dev/null
+++ b/vvzwvv/0012/0012.py
@@ -0,0 +1,22 @@
+from cmd import Cmd
+
+class CmdCheck(Cmd):
+
+ def __init__(self):
+ Cmd.__init__(self)
+ self.intro = "-------- Word Sensor (Input \"exit\" for termination) --------"
+ self.prompt = "> "
+ self.sensitive = map(lambda word: word.strip("\n"), open("filtered_words.txt").readlines())
+
+ def default(self, line):
+ for word in self.sensitive:
+ if word in line:
+ line = line.replace(word, ''.join("*" for i in range(len(word))))
+ print line
+
+ def do_exit(self, line):
+ exit()
+
+if __name__ == "__main__":
+ cmd = CmdCheck()
+ cmd.cmdloop()
\ No newline at end of file
diff --git a/vvzwvv/0012/filtered_words.txt b/vvzwvv/0012/filtered_words.txt
new file mode 100644
index 00000000..69373b64
--- /dev/null
+++ b/vvzwvv/0012/filtered_words.txt
@@ -0,0 +1,11 @@
+北京
+程序员
+公务员
+领导
+牛比
+牛逼
+你娘
+你妈
+love
+sex
+jiangge
\ No newline at end of file
diff --git a/yefan/001/001.py b/yefan/001/001.py
new file mode 100644
index 00000000..278a307a
--- /dev/null
+++ b/yefan/001/001.py
@@ -0,0 +1,43 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+"""
+分析
+其实要生成激活码(邀请码)也是很简单的事, 比如随机生成.或者使用GUID,UUID等,非常简单
+
+但是我们得考虑存入以及验证的问题.
+
+这里我参考产生唯一随机码的方法分析。这篇文章的思路:
+
+主键+随机码的方式.
+
+这种方法优点:使用也比较简单,不用直接去查询数据库,而最大的优点是查询的时候,可以根据邀请码直接得到主键id, 然后根据id去数据库查询(速度很快),再比较查询出来的邀请码和用户提交的邀请码是否一致。
+
+生成:id(数据库primary key )->16进制 + "L(标识符)" +随机码
+获取id:获取16进制的id再转回10进制
+"""
+
+
+import random
+import string
+
+def activation_code(id,length=10):
+ '''
+ id + L + 随机码
+ string模块中的3个函数:string.letters,string.printable,string.printable
+ '''
+ prefix = hex(int(id))[2:]+ 'L'
+ length = length - len(prefix)
+ chars=string.ascii_letters+string.digits
+ return prefix + ''.join([random.choice(chars) for i in range(length)])
+
+def get_id(code):
+ ''' Hex to Dec '''
+ return str(int(code.upper(), 16))
+
+if __name__=="__main__":
+ for i in range(10,500,35):
+ code = activation_code(i)
+ id_hex = code.split('L')[0]
+ id = get_id(id_hex)
+ print code,id
diff --git a/yefan/004/004.py b/yefan/004/004.py
new file mode 100644
index 00000000..f6eac70f
--- /dev/null
+++ b/yefan/004/004.py
@@ -0,0 +1,24 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+"""
+python实现任一个英文的纯文本文件,统计其中的单词出现的个数、行数、字符数
+"""
+
+file_name = "movie.txt"
+
+line_counts = 0
+word_counts = 0
+character_counts = 0
+
+with open('C:\Python27\oneday_one\movie.txt', 'r') as f:
+ for line in f:
+ words = line.split()
+
+ line_counts += 1
+ word_counts += len(words)
+ character_counts += len(line)
+
+print "line_counts ", line_counts
+print "word_counts ", word_counts
+print "character_counts ", character_counts
diff --git a/yefan/007/007.py b/yefan/007/007.py
new file mode 100644
index 00000000..d19f1406
--- /dev/null
+++ b/yefan/007/007.py
@@ -0,0 +1,40 @@
+# -*- coding: utf-8 -*-
+
+
+#list all the files in your path(完整路径名path\**.py)
+import os
+def get_files(path):
+ files=os.listdir(path)
+ files_path=[]
+ for fi in files:
+ fi_path= path+'\\' + fi
+ if os.path.isfile(fi_path):
+ if fi.split('.')[-1]=='py':
+ files_path.append(fi_path)
+ elif(os.path.isdir(fi_path)):
+ files_path+=get_files(fi_path)
+ return files_path
+
+# Count lines and blank lines and note lines in designated files
+def count_lines(files):
+ line, blank, note = 0, 0, 0
+ for filename in files:
+ f = open(filename, 'rb')
+ for l in f:
+ l = l.strip()
+ line += 1
+ if l == '':
+ blank += 1
+ elif l[0] == '#' or l[0] == '/':
+ note += 1
+ f.close()
+ return (line, blank, note)
+
+if __name__ == '__main__':
+ a=r'c:\python27'
+ #files = get_files(r'c:\python27\oneday_one')
+ files = get_files(r'F\v6:')
+ print len(files),files
+ lines = count_lines(files)
+ print 'Line(s): %d, black line(s): %d, note line(s): %d' % (lines[0], lines[1], lines[2])
+
diff --git a/yefan/008/008.py b/yefan/008/008.py
new file mode 100644
index 00000000..1bebe4da
--- /dev/null
+++ b/yefan/008/008.py
@@ -0,0 +1,19 @@
+#!/usr/bin/python
+#coding=utf-8
+
+"""
+第 0008 题:一个HTML文件,找出里面的正文。
+"""
+
+from bs4 import BeautifulSoup
+
+def find_the_content(path):
+ with open(path) as f:
+ text = BeautifulSoup(f, 'lxml')
+ content = text.get_text().strip('\n')
+
+ return content.encode('gbk','ignore')
+
+
+if __name__ == '__main__':
+ print find_the_content(r'D:\Show-Me-the-Code_show-me-the-code_1.html')
diff --git a/yefan/009/009.py b/yefan/009/009.py
new file mode 100644
index 00000000..14c8ec00
--- /dev/null
+++ b/yefan/009/009.py
@@ -0,0 +1,20 @@
+#!/usr/bin/python
+#coding=utf-8
+
+"""
+第 0009 题:一个HTML文件,找出里面的链接
+"""
+
+from bs4 import BeautifulSoup
+
+def find_the_link(filepath):
+ links = []
+ with open(filepath) as f:
+ bs =BeautifulSoup(f,'lxml')
+ for i in bs.find_all('a'):
+ links.append(i['href'])
+ return links
+
+if __name__ == '__main__':
+ #print find_the_link('D:\Show-Me-the-Code_show-me-the-code_1.html')
+
diff --git a/yefan/011/011.py b/yefan/011/011.py
new file mode 100644
index 00000000..df43c831
--- /dev/null
+++ b/yefan/011/011.py
@@ -0,0 +1,28 @@
+#!/bin/env python
+# -*- coding: utf-8 -*-
+import codecs
+def read_txt():
+ l=[]
+ with codecs.open(r'c:\python27\oneday_one\1.txt') as fp:
+ for line in fp.readlines():
+ l.append(line.strip())
+ return l
+
+def check(l):
+ word=raw_input('word:')
+ for each_word in l:
+ if word==each_word:
+ print 'Freedom'
+ return None
+ print 'Human rights'
+ return None
+
+def main():
+ l=read_txt()
+ check(l)
+ print l
+
+if __name__=='__main__':
+ main()
+
+
diff --git a/yefan/013/013.py b/yefan/013/013.py
new file mode 100644
index 00000000..cd5e8167
--- /dev/null
+++ b/yefan/013/013.py
@@ -0,0 +1,39 @@
+#!/usr/bin/python
+# coding=utf-8
+
+"""
+第 0013 题: 用 Python 写一个爬图片的程序,爬 这个链接里的日本妹子图片 :-)
+"""
+
+import os
+import urllib
+from bs4 import BeautifulSoup
+from urlparse import urlsplit
+import re
+
+def catch_tieba_pics(url):
+ content =urllib.urlopen(url)
+ print type(content)
+ #f.write(content.read())
+ bs = BeautifulSoup(content, 'lxml')
+ print type(bs)
+ print bs.prettify() ################
+ for i in bs.find_all('img', {"class": "BDE_Image"}):
+ download_pic(i['src'])
+
+def download_pic(url):
+ image_content = urllib.urlopen(url).read()
+ file_name = os.path.basename(urlsplit(url)[2])
+ output = open(file_name, 'wb')
+ output.write(image_content)
+ output.close()
+
+
+if __name__ == '__main__':
+ #catch_tieba_pics('http://tieba.baidu.com/p/2166231880')
+ catch_tieba_pics('http://tieba.baidu.com/p/4203526008')
+ #catch_tieba_pics('http://www.zhihu.com/question/22995735')
+
+"""
+为什么知乎的网页print内容只有一点点
+"""
diff --git a/yefan/014/014.py b/yefan/014/014.py
new file mode 100644
index 00000000..3a5ae5c2
--- /dev/null
+++ b/yefan/014/014.py
@@ -0,0 +1,17 @@
+# coding = utf-8
+__author__ = 'Forec'
+import xlwt
+import re
+
+book = xlwt.Workbook(encoding = 'utf-8', style_compression=0)
+sheet = book.add_sheet('student',cell_overwrite_ok = True)
+line = 0
+info = re.compile(r'\"(\d+)\":\[\"(.*?)\",(\d+),(\d+),(\d+)\]')
+with open('student.txt',"r") as f:
+ data = f.read()
+ data=data.decode('gbk').encode('utf-8')
+for x in info.findall(data):
+ for i in range(len(x)):
+ sheet.write(line,i,x[i])
+ line+=1
+book.save('student.xls')
diff --git a/yefan/014/14.py b/yefan/014/14.py
new file mode 100644
index 00000000..18acf36d
--- /dev/null
+++ b/yefan/014/14.py
@@ -0,0 +1,41 @@
+#!/bin/env python
+# -*- coding: utf-8 -*-
+
+#导入模块
+import simplejson as json
+import xlwt
+
+#从文件(JSON形式)中读取数据返回字典
+def read_file(filename):
+ with open(r'C:\Python27\oneday_one\student.txt','r') as fp:
+ content = fp.read().decode('gbk').encode('utf-8')
+ #print type(content)
+ #simplejson这个模块还没细看,怎么解码还是需要了解下
+ d = json.JSONDecoder().decode(content)
+ #d=json.loads(content)
+ return d
+
+#生成对应的xls文件
+def gen_xls(d,filename):
+ fp = xlwt.Workbook()
+ table = fp.add_sheet('student',cell_overwrite_ok=True)
+ #试了下,与很多要转utf-8(ASCII码)存文件的情况不同,xls不接受ASCII码形式的存储,直接用字典里面的Unicode就行了,简直好评,不用在特意decode或者encode了
+ #想写得更加自动化一些,好复用.本身不太想用两层循环的,不过也不知道有没有更便捷的存储方式(比如整行自动匹配导入,算法是背后优化封装好的,就用了万能的这种方法)
+ for n in range(len(d)):
+ table.write(n,0,n+1)
+ m = 0
+ for record in d[str(n+1)]:
+ table.write(n,m+1,record)
+ m += 1
+ fp.save('student.xls')
+ print u'写入完毕'
+
+#主函数,嘛,最后还是用“丑陋的二重循环”实现了,但是其实也没什么,还是要看场景和优化,毕竟这也不是做查找或者排序,在日常使用中也不用太担心性能问题
+def main():
+ filename = 'student.txt'
+ xls_name = 'student.xls'
+ d = read_file(filename)
+ gen_xls(d,xls_name)
+
+if __name__ == '__main__':
+ main()
diff --git a/yefan/014/student.txt b/yefan/014/student.txt
new file mode 100644
index 00000000..ddb4a149
--- /dev/null
+++ b/yefan/014/student.txt
@@ -0,0 +1,5 @@
+{
+ "1":["",150,120,100],
+ "2":["",90,99,95],
+ "3":["",60,66,68]
+}
\ No newline at end of file
diff --git a/yefan/014/student.xls b/yefan/014/student.xls
new file mode 100644
index 00000000..c392c6f5
Binary files /dev/null and b/yefan/014/student.xls differ
diff --git a/yefan/015/015.py b/yefan/015/015.py
new file mode 100644
index 00000000..79fb4590
--- /dev/null
+++ b/yefan/015/015.py
@@ -0,0 +1,16 @@
+# coding = utf-8
+__author__ = 'Forec'
+import xlwt
+import re
+
+book = xlwt.Workbook(encoding = 'utf-8',style_compression=0)
+sheet = book.add_sheet('number',cell_overwrite_ok = True)
+line = 0
+info = re.compile(r'\[(\d+),\s+(\d+),\s+(\d+)\]')
+with open(r'c:\python27\oneday_one\numbers.txt',"r") as f:
+ data = f.read().decode('gbk').encode('utf-8')
+for x in info.findall(data):
+ for i in range(len(x)):
+ sheet.write(line,i,x[i])
+ line+=1
+book.save('numbers.xls')
diff --git a/yefan/015/city.txt b/yefan/015/city.txt
new file mode 100644
index 00000000..4d62a75c
--- /dev/null
+++ b/yefan/015/city.txt
@@ -0,0 +1,5 @@
+{
+ "1" : "Ϻ",
+ "2" : "",
+ "3" : "ɶ"
+}
\ No newline at end of file
diff --git a/yefan/015/city.xls b/yefan/015/city.xls
new file mode 100644
index 00000000..b020435b
Binary files /dev/null and b/yefan/015/city.xls differ
diff --git a/yefan/020/020.py b/yefan/020/020.py
new file mode 100644
index 00000000..4f8cf398
--- /dev/null
+++ b/yefan/020/020.py
@@ -0,0 +1,26 @@
+#-*- coding=utf-8
+import xlwt
+import xlrd
+import re
+
+book = xlrd.open_workbook(r'c:\python27\oneday_one\2015.xls')
+print book.sheet_names()
+sheet=book.sheet_by_index(0)
+print sheet.name,sheet.nrows,sheet.ncols
+col3=sheet.col_values(3)
+li=[]
+for i in col3:
+ li.append(i)#.encode('utf-8')
+del li[0]
+s=[0,0]
+info=re.compile(ur"(\d+)[\u4e00-\u9fa5](\d*)[\u4e00-\u9fa5]*")#匹配汉字!!!!
+for each_time in li:
+ t=info.match(each_time).groups()
+ t=list(t)
+ if u'' in t:
+ t[1],t[0]=t[0],u'0'
+ s[0]=s[0]+int(t[0])
+ s[1]=s[1]+int(t[1])
+s[0],s[1]=s[0]+int(s[1]/60),s[1]%60
+print '通话时长累计%d分%d秒'%(s[0],s[1])
+
diff --git a/yefan/020/2015.xls b/yefan/020/2015.xls
new file mode 100644
index 00000000..f0d493e5
Binary files /dev/null and b/yefan/020/2015.xls differ
diff --git a/yefan/README.md b/yefan/README.md
new file mode 100644
index 00000000..fdc2f54a
--- /dev/null
+++ b/yefan/README.md
@@ -0,0 +1 @@
+所有程序是在win7 python2.7下调试成功,其中很多借鉴了此项目下其他贡献者的代码。侵删。
diff --git a/JiYouMCC/0023/guestbook/manage.py b/zentst/0023/manage.py
old mode 100755
new mode 100644
similarity index 61%
rename from JiYouMCC/0023/guestbook/manage.py
rename to zentst/0023/manage.py
index d04c7217..8a50ec04
--- a/JiYouMCC/0023/guestbook/manage.py
+++ b/zentst/0023/manage.py
@@ -1,9 +1,9 @@
-# -*- coding: utf-8 -*-
+#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
- os.environ.setdefault("DJANGO_SETTINGS_MODULE", "guestbook.settings")
+ os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mysite.settings")
from django.core.management import execute_from_command_line
diff --git a/zentst/0023/messageboard/__init__.py b/zentst/0023/messageboard/__init__.py
new file mode 100644
index 00000000..e69de29b
diff --git a/zentst/0023/messageboard/admin.py b/zentst/0023/messageboard/admin.py
new file mode 100644
index 00000000..11cb9f27
--- /dev/null
+++ b/zentst/0023/messageboard/admin.py
@@ -0,0 +1,13 @@
+from django.contrib import admin
+from messageboard.models import Message
+
+
+
+class MessageAdmin(admin.ModelAdmin):
+ fieldsets = [
+ (None,{'fields':['name']}),
+ ('context',{'fields':['context']}),
+ ]
+ list_display = ('name', 'context', 'vote_date')
+
+admin.site.register(Message, MessageAdmin)
diff --git a/zentst/0023/messageboard/models.py b/zentst/0023/messageboard/models.py
new file mode 100644
index 00000000..bd8d96a2
--- /dev/null
+++ b/zentst/0023/messageboard/models.py
@@ -0,0 +1,12 @@
+from django.db import models
+
+# Create your models here.
+
+class Message(models.Model):
+ name = models.CharField(max_length = 20)
+ context = models.CharField(max_length = 200)
+ vote_date = models.DateTimeField(auto_now_add = True)
+
+ def __unicode__(self):
+ return self.context
+
diff --git a/zentst/0023/messageboard/templates/message/detail.html b/zentst/0023/messageboard/templates/message/detail.html
new file mode 100644
index 00000000..ff63d703
--- /dev/null
+++ b/zentst/0023/messageboard/templates/message/detail.html
@@ -0,0 +1,6 @@
+for test
+{{messages}}
+{% for each in messages %}
+{{each}}
+{%endfor%}
+
diff --git a/zentst/0023/messageboard/templates/message/index.html b/zentst/0023/messageboard/templates/message/index.html
new file mode 100644
index 00000000..804769b2
--- /dev/null
+++ b/zentst/0023/messageboard/templates/message/index.html
@@ -0,0 +1,63 @@
+
+
+
+
+留言薄
+
+
+
+
+
+{% if error_message %}
+
{{error_message}}
+
+
+{% else %}
+
+
+{% csrf_token %}
+请尽情留言吧
+
+
+
+
+
+
+
+
+
+
历史留言
+
+{% for each in messages %}
+{{each.name}} 留言于 ({{each.vote_date}})
+
+
{{each.context}}
+
+{%endfor%}
+
+
+{% endif %}
+
+
+
+
+
+
+
+
diff --git a/zentst/0023/messageboard/tests.py b/zentst/0023/messageboard/tests.py
new file mode 100644
index 00000000..501deb77
--- /dev/null
+++ b/zentst/0023/messageboard/tests.py
@@ -0,0 +1,16 @@
+"""
+This file demonstrates writing tests using the unittest module. These will pass
+when you run "manage.py test".
+
+Replace this with more appropriate tests for your application.
+"""
+
+from django.test import TestCase
+
+
+class SimpleTest(TestCase):
+ def test_basic_addition(self):
+ """
+ Tests that 1 + 1 always equals 2.
+ """
+ self.assertEqual(1 + 1, 2)
diff --git a/zentst/0023/messageboard/urls.py b/zentst/0023/messageboard/urls.py
new file mode 100644
index 00000000..24ba1fc5
--- /dev/null
+++ b/zentst/0023/messageboard/urls.py
@@ -0,0 +1,10 @@
+from django.conf.urls import patterns, include, url
+from messageboard import views
+from django.views.generic import ListView
+from messageboard.models import Message
+
+
+urlpatterns = patterns('',
+ url(r'^$', views.index, name = 'index'),
+ url(r'^postmessage/$', views.postmessage, name = 'postmessage'),
+)
diff --git a/zentst/0023/messageboard/views.py b/zentst/0023/messageboard/views.py
new file mode 100644
index 00000000..42698c09
--- /dev/null
+++ b/zentst/0023/messageboard/views.py
@@ -0,0 +1,28 @@
+from django.http import HttpResponseRedirect
+from django.template import Context
+from django.shortcuts import render
+from django.utils import timezone
+from django.core.urlresolvers import reverse
+from messageboard.models import Message
+from django.views.decorators.csrf import csrf_exempt
+
+# Create your views here.
+@csrf_exempt
+def index(request):
+ messages = Message.objects.all().order_by('-vote_date')
+ context = {'messages' : messages,}
+ return render(request, 'message/index.html', context)
+
+
+def postmessage(request):
+ postname = request.POST['name']
+ postcontext = request.POST['context']
+ if postname == '':
+ return render(request, 'message/index.html', {'error_message' : 'You did not input your name',})
+ elif postcontext == '':
+ return render(request, 'message/index.html', {'error_message' : 'You did not input context',})
+ else:
+ m = Message(name = postname, context = postcontext, vote_date = timezone.now())
+ m.save()
+ return HttpResponseRedirect(reverse('index'))
+
diff --git a/zentst/0023/mysite/__init__.py b/zentst/0023/mysite/__init__.py
new file mode 100644
index 00000000..e69de29b
diff --git a/zentst/0023/mysite/settings.py b/zentst/0023/mysite/settings.py
new file mode 100644
index 00000000..b68a0164
--- /dev/null
+++ b/zentst/0023/mysite/settings.py
@@ -0,0 +1,161 @@
+# Django settings for mysite project.
+
+DEBUG = True
+TEMPLATE_DEBUG = DEBUG
+
+ADMINS = (
+ # ('Your Name', 'your_email@example.com'),
+)
+
+MANAGERS = ADMINS
+
+DATABASES = {
+ 'default': {
+ 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
+ 'NAME': 'D:/workspace/mysite/sqlite3.db', # Or path to database file if using sqlite3.
+ # The following settings are not used with sqlite3:
+ 'USER': '',
+ 'PASSWORD': '',
+ 'HOST': '', # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP.
+ 'PORT': '', # Set to empty string for default.
+ }
+}
+
+# Hosts/domain names that are valid for this site; required if DEBUG is False
+# See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
+ALLOWED_HOSTS = []
+
+# Local time zone for this installation. Choices can be found here:
+# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
+# although not all choices may be available on all operating systems.
+# In a Windows environment this must be set to your system time zone.
+TIME_ZONE = 'GMT+8'
+
+# Language code for this installation. All choices can be found here:
+# http://www.i18nguy.com/unicode/language-identifiers.html
+LANGUAGE_CODE = 'en-us'
+
+SITE_ID = 1
+
+# If you set this to False, Django will make some optimizations so as not
+# to load the internationalization machinery.
+USE_I18N = True
+
+# If you set this to False, Django will not format dates, numbers and
+# calendars according to the current locale.
+USE_L10N = True
+
+# If you set this to False, Django will not use timezone-aware datetimes.
+USE_TZ = True
+
+# Absolute filesystem path to the directory that will hold user-uploaded files.
+# Example: "/var/www/example.com/media/"
+MEDIA_ROOT = ''
+
+# URL that handles the media served from MEDIA_ROOT. Make sure to use a
+# trailing slash.
+# Examples: "http://example.com/media/", "http://media.example.com/"
+MEDIA_URL = ''
+
+# Absolute path to the directory static files should be collected to.
+# Don't put anything in this directory yourself; store your static files
+# in apps' "static/" subdirectories and in STATICFILES_DIRS.
+# Example: "/var/www/example.com/static/"
+STATIC_ROOT = ''
+
+# URL prefix for static files.
+# Example: "http://example.com/static/", "http://static.example.com/"
+STATIC_URL = '/static/'
+
+# Additional locations of static files
+STATICFILES_DIRS = (
+ # Put strings here, like "/home/html/static" or "C:/www/django/static".
+ # Always use forward slashes, even on Windows.
+ # Don't forget to use absolute paths, not relative paths.
+)
+
+# List of finder classes that know how to find static files in
+# various locations.
+STATICFILES_FINDERS = (
+ 'django.contrib.staticfiles.finders.FileSystemFinder',
+ 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
+# 'django.contrib.staticfiles.finders.DefaultStorageFinder',
+)
+
+# Make this unique, and don't share it with anybody.
+SECRET_KEY = 'wm-!t8*l0+5yq-##j=(%&^2ns0bw=h@r=5!b9%3(63by^7-pg&'
+
+# List of callables that know how to import templates from various sources.
+TEMPLATE_LOADERS = (
+ 'django.template.loaders.filesystem.Loader',
+ 'django.template.loaders.app_directories.Loader',
+# 'django.template.loaders.eggs.Loader',
+)
+
+MIDDLEWARE_CLASSES = (
+ 'django.middleware.common.CommonMiddleware',
+ 'django.contrib.sessions.middleware.SessionMiddleware',
+ 'django.middleware.csrf.CsrfViewMiddleware',
+ 'django.contrib.auth.middleware.AuthenticationMiddleware',
+ 'django.contrib.messages.middleware.MessageMiddleware',
+ # Uncomment the next line for simple clickjacking protection:
+ # 'django.middleware.clickjacking.XFrameOptionsMiddleware',
+)
+
+ROOT_URLCONF = 'mysite.urls'
+
+# Python dotted path to the WSGI application used by Django's runserver.
+WSGI_APPLICATION = 'mysite.wsgi.application'
+
+TEMPLATE_DIRS = (
+ # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
+ # Always use forward slashes, even on Windows.
+ # Don't forget to use absolute paths, not relative paths.
+ 'D:/workspace/mysite/templates',
+
+)
+
+INSTALLED_APPS = (
+ 'django.contrib.auth',
+ 'django.contrib.contenttypes',
+ 'django.contrib.sessions',
+ 'django.contrib.sites',
+ 'django.contrib.messages',
+ 'django.contrib.staticfiles',
+ # Uncomment the next line to enable the admin:
+ 'django.contrib.admin',
+ # Uncomment the next line to enable admin documentation:
+ # 'django.contrib.admindocs',
+ 'messageboard',
+)
+
+SESSION_SERIALIZER = 'django.contrib.sessions.serializers.JSONSerializer'
+
+# A sample logging configuration. The only tangible logging
+# performed by this configuration is to send an email to
+# the site admins on every HTTP 500 error when DEBUG=False.
+# See http://docs.djangoproject.com/en/dev/topics/logging for
+# more details on how to customize your logging configuration.
+LOGGING = {
+ 'version': 1,
+ 'disable_existing_loggers': False,
+ 'filters': {
+ 'require_debug_false': {
+ '()': 'django.utils.log.RequireDebugFalse'
+ }
+ },
+ 'handlers': {
+ 'mail_admins': {
+ 'level': 'ERROR',
+ 'filters': ['require_debug_false'],
+ 'class': 'django.utils.log.AdminEmailHandler'
+ }
+ },
+ 'loggers': {
+ 'django.request': {
+ 'handlers': ['mail_admins'],
+ 'level': 'ERROR',
+ 'propagate': True,
+ },
+ }
+}
diff --git a/zentst/0023/mysite/urls.py b/zentst/0023/mysite/urls.py
new file mode 100644
index 00000000..8e14e7af
--- /dev/null
+++ b/zentst/0023/mysite/urls.py
@@ -0,0 +1,18 @@
+from django.conf.urls import patterns, include, url
+
+# Uncomment the next two lines to enable the admin:
+from django.contrib import admin
+admin.autodiscover()
+
+urlpatterns = patterns('',
+ # Examples:
+ # url(r'^$', 'mysite.views.home', name='home'),
+ # url(r'^mysite/', include('mysite.foo.urls')),
+
+ # Uncomment the admin/doc line below to enable admin documentation:
+ # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
+
+ # Uncomment the next line to enable the admin:
+ url(r'^admin/', include(admin.site.urls)),
+ url(r'^messageboard/', include('messageboard.urls')),),
+)
diff --git a/zentst/0023/mysite/wsgi.py b/zentst/0023/mysite/wsgi.py
new file mode 100644
index 00000000..34e900eb
--- /dev/null
+++ b/zentst/0023/mysite/wsgi.py
@@ -0,0 +1,32 @@
+"""
+WSGI config for mysite project.
+
+This module contains the WSGI application used by Django's development server
+and any production WSGI deployments. It should expose a module-level variable
+named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
+this application via the ``WSGI_APPLICATION`` setting.
+
+Usually you will have the standard Django WSGI application here, but it also
+might make sense to replace the whole Django WSGI application with a custom one
+that later delegates to the Django one. For example, you could introduce WSGI
+middleware here, or combine a Django application with an application of another
+framework.
+
+"""
+import os
+
+# We defer to a DJANGO_SETTINGS_MODULE already in the environment. This breaks
+# if running multiple sites in the same mod_wsgi process. To fix this, use
+# mod_wsgi daemon mode with each site in its own daemon process, or use
+# os.environ["DJANGO_SETTINGS_MODULE"] = "mysite.settings"
+os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mysite.settings")
+
+# This application object is used by any WSGI server configured to use this
+# file. This includes Django's development server, if the WSGI_APPLICATION
+# setting points here.
+from django.core.wsgi import get_wsgi_application
+application = get_wsgi_application()
+
+# Apply WSGI middleware here.
+# from helloworld.wsgi import HelloWorldApplication
+# application = HelloWorldApplication(application)
diff --git a/JiYouMCC/0024/todoList/db.sqlite3 b/zentst/0023/sqlite3.db
similarity index 55%
rename from JiYouMCC/0024/todoList/db.sqlite3
rename to zentst/0023/sqlite3.db
index 09e30819..0a97b2e4 100644
Binary files a/JiYouMCC/0024/todoList/db.sqlite3 and b/zentst/0023/sqlite3.db differ
diff --git a/zeyue/0007/ComputeCodeLines.py b/zeyue/0007/ComputeCodeLines.py
new file mode 100644
index 00000000..a67b6e09
--- /dev/null
+++ b/zeyue/0007/ComputeCodeLines.py
@@ -0,0 +1,221 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+"""
+File: ComputeCodeLines.py
+Author: Zeyue Liang
+Date: September 2, 2015
+Email: zeyue.liang@gmail.com
+Github: https://github.com/zeyue
+Description:
+ A program that can count code line numbers in a directory.
+ Usage: Launce the program in console with directory as argument, it can add
+ several directories in one time:
+ $python -3 ComputeCodeLines.py [second] [...]
+ ATTENTION: use "/" in the place of "\"
+
+ This program has been tested using some files in C and in Python,
+ maybe support java as well.
+"""
+
+import os
+import sys
+
+"""
+Global variables
+"""
+file_suffix = "not defined"
+inline_comment_syntax = "not defined"
+start_comment_syntax = "not defined"
+end_comment_syntax = "not defined"
+multilineCommentStartFlag = 0
+result = {"Code files": 0,
+ "No blank lines": 0,
+ "Code lines": 0,
+ "Comment lines": 0,
+ "Blank lines": 0}
+
+
+"""
+Funcitions
+"""
+
+
+def getFilesList(directory):
+ """Get files's list in a directory
+
+ :directory: files' directory
+ :returns: file path list
+
+ """
+ file_paths = []
+
+ for root, directories, files in os.walk(directory):
+ for filename in files:
+ file_path = os.path.join(root, filename)
+ file_paths.append(file_path)
+
+ return file_paths
+
+
+def getSuffix(full_file_path):
+ """Get the suffix of current file.
+
+ :full_file_path: path of one file
+ :returns: suffix
+
+ """
+ return os.path.splitext(full_file_path)[1][1:]
+
+
+def identifyFileType(suffix):
+ """Identify the file type and return correct syntax.
+
+ :suffix: file suffix
+ :returns: [inline comment syntax, multiple line comment syntax]
+
+ """
+ if suffix == "py":
+ return "#", "\"\"\"", "\"\"\""
+ elif suffix == "c" or suffix == "h" or suffix == "cpp" or suffix == "hpp":
+ return "//", "/*", "*/"
+ elif suffix == "java":
+ return "//", "/*", "*/"
+ else:
+ return "not defined"
+
+
+def isInlineComment(string_line):
+ """Check if string line is an inline comment or not.
+
+ :string_line: input line
+ :returns: true or false
+
+ """
+ commentLen = len(inline_comment_syntax)
+ if string_line[0:commentLen] == inline_comment_syntax:
+ # print("zero")
+ return True
+ else:
+ return False
+
+
+def isMultilineComment(string_line):
+ """Check if the string line is a multiple comment or not.
+
+ :string_line: one string line in the file
+ :returns: True or False
+
+ """
+ global multilineCommentStartFlag
+ commentLen = len(str(start_comment_syntax))
+ # print(multilineCommentStartFlag)
+ if(string_line[0:commentLen] == start_comment_syntax and
+ multilineCommentStartFlag == 0):
+ multilineCommentStartFlag = 1
+ # print("one")
+ if(len(string_line) > commentLen and
+ string_line[-commentLen:] == end_comment_syntax):
+ multilineCommentStartFlag = 0
+ return True
+ elif(string_line[0:commentLen] != start_comment_syntax and
+ multilineCommentStartFlag == 1):
+ # print("two")
+ if(len(string_line) > commentLen and
+ string_line[-commentLen:] == end_comment_syntax):
+ multilineCommentStartFlag = 0
+ return True
+ elif(string_line[-commentLen:] == end_comment_syntax and
+ multilineCommentStartFlag == 1):
+ multilineCommentStartFlag = 0
+ # print("three")
+ # print(string_line[-commentLen:])
+ return True
+ else:
+ return False
+
+
+def countOneFile(full_file_path):
+ """Count code lines in one file.
+
+ :full_file_path: full path of the file
+ :returns: null
+
+ """
+ global inline_comment_syntax, start_comment_syntax, end_comment_syntax
+ global multilineCommentStartFlag
+ local_result = {"No blank lines": 0,
+ "Comment lines": 0,
+ "Code lines": 0,
+ "Blank lines": 0}
+ file_suffix = getSuffix(full_file_path)
+ if(identifyFileType(file_suffix) != "not defined"):
+ result["Code files"] += 1
+ (inline_comment_syntax,
+ start_comment_syntax,
+ end_comment_syntax) = identifyFileType(file_suffix)
+ with open(full_file_path, "r") as lines:
+ for line in lines:
+ line = line.strip()
+ if line.strip():
+ local_result["No blank lines"] += 1
+ if isInlineComment(line):
+ local_result["Comment lines"] += 1
+ elif isMultilineComment(line):
+ local_result["Comment lines"] += 1
+ else:
+ # print("Oops...")
+ local_result["Code lines"] += 1
+ else:
+ local_result["Blank lines"] += 1
+ print(full_file_path)
+ for key in local_result:
+ print(str(key) + ": " + str(local_result[key]))
+ result["No blank lines"] += local_result["No blank lines"]
+ result["Comment lines"] += local_result["Comment lines"]
+ result["Code lines"] += local_result["Code lines"]
+ result["Blank lines"] += local_result["Blank lines"]
+
+
+def countInDirectory(directory):
+ """Count code lines in one directory.
+
+ :directory: the directory that will be counted
+ :return: null
+
+ """
+ full_file_paths = getFilesList(directory)
+ for f in full_file_paths:
+ countOneFile(f)
+
+
+def main():
+ """main function.
+
+ """
+ global file_suffix, inline_comment_syntax, start_comment_syntax
+ global end_comment_syntax, multilineCommentStartFlag, result
+ for directory in sys.argv[1:]:
+ file_suffix = "not defined"
+ inline_comment_syntax = "not defined"
+ start_comment_syntax = "not defined"
+ end_comment_syntax = "not defined"
+ multilineCommentStartFlag = 0
+ result = {"Code files": 0,
+ "No blank lines": 0,
+ "Code lines": 0,
+ "Comment lines": 0,
+ "Blank lines": 0}
+
+ print("this is the directory: " + directory)
+ countInDirectory(directory)
+
+ print()
+ print("Final result in the directory")
+ print(directory)
+ for key in result:
+ print(str(key) + ": " + str(result[key]))
+
+"""
+Launch
+"""
+main()
diff --git a/zeyue/0007/README.md b/zeyue/0007/README.md
new file mode 100644
index 00000000..3b350d47
--- /dev/null
+++ b/zeyue/0007/README.md
@@ -0,0 +1,42 @@
+**Description:** This program is a simple program in python to count code lines in one or several directories. It will distinguish:
+
+ 1. code lines
+ 2. blank lines
+ 3. comment lines
+ 4. total non-blank lines
+
+ > for now, I suppose to count inline comment and multiple lines comment as well.
+
+ > `#` and `'''` in python; `//` and `/**/` in C/C++
+
+**Supported file types:**
+
+ .py, .c, .cpp, .h, .hpp.
+ > These 4 types have been tested, should be supposed to work well. Otherwise, `.java` maybe work as well, but not yet tested.
+
+**Usage:** This program should be launched through console, indicating directories that you want to count within. The command line is like this:
+
+ python -3 ComputeCodeLines.py [Full path of first directory] [Full path of second directory] [...]
+**Example:**I have a directory in `d:/PythonProjects/python/zeyue/0007`. So my command line will be:
+
+ python -3 ComputeCodeLines.py d:/PythonProjects/python/zeyue/0007
+> **ATTENTION:** In the directory path, the slash `/` or `\\` is necessary. **DO NOT** use `\`
+
+And I get a response like this:
+
+ this is the directory: d:\PythonProjects\python\zeyue\0007
+ d:\PythonProjects\python\zeyue\0007\ComputeCodeLines.py
+ Blank lines: 41
+ Code lines: 117
+ Comment lines: 63
+ No blank lines: 180
+ ()
+ Final result in the directory
+ d:\PythonProjects\python\zeyue\0007
+ Code files: 1
+ Code lines: 117
+ Comment lines: 63
+ No blank lines: 180
+ Blank lines: 41
+
+That's it! Hope you enjoyful!