text:
@charset "utf-8";
*{ padding: 0px; margin: 0px;}
html{font-size:87.5%;}
body{background:#fff;margin:0px;padding:0px;color: #777;font-size:100%;line-height:160%;word-break: break-all; word-wrap:break-word;
font-family:Microsoft Yahei,helvetica,arial;-webkit-text-size-adjust:none;}
img, p, h3, ul, li, dl, dd, dt, h2, h4{margin:0px;border:0px;padding:0}
img{display:block;}
a:active{outline:0 none}
a:focus {outline:0;}
a:link{color: #333;text-decoration:none}
a:hover{color:#0785D4;text-decoration:none}
a:visited{color: #333;text-decoration:none}
li{list-style:none}
.clearfix:after{display:block;clear:both;visibility:hidden;height:0;content:''}
.clearfix{zoom:1;}
input,select,textarea,button{font-size:100%;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}
button,input[type=button],input[type=submit]{cursor:pointer}
button::-moz-focus-inner,button::-moz-focus-outer,input::-moz-focus-inner,input::-moz-focus-outer{border:0 none;padding:0;margin:0}
input[type=search]{-webkit-appearance:textfield}
input:focus::-webkit-input-placeholder{color:transparent}
textarea{resize:vertical;overflow-y:auto}
.wrap{margin:0 auto;padding-top:60px;}
.none{display:none;}
@-webkit-viewport{width:device-width; }
@-moz-viewport{width:device-width; }
@-ms-viewport{width:device-width; }
@-o-viewport{ width:device-width; }
@viewport{ width:device-width; }
@charset "utf-8";
@media (min-width: 0px) and (max-width: 639px){
    .mb{margin-bottom:4%;}
    .wrap{width:96%;}
    .n10,.head .nav-pc-2,.head .nav-pc,.head .login,.ls,.head .search,.ylink,.footer,.content .desd .des1{display:none;}
    .index-tj li,.index-list-l li{width:32%;margin-right:2%;}
    .index-tj .m3,.index-list-l .m3{margin-right:0;}
    .index-tj .img{height:0;padding-bottom:150%;}
    .index-list-r{display:none;}
    .index-list-l .img{height:0;padding-bottom:150%;}
    .topiclist li{width:32%;margin-right:2%;}
    .topiclist .m2{margin-right:0;}
    .topiclist .img{height:0;padding-bottom:70%;}
    .sy{display:none;}
    .content .pic{float:left;width:30%;height:0;padding-bottom:45%;overflow: hidden;}
    .content .info{margin-left:34%;}
    .content .desd .desmb{display:block;}
    .content .info dd{line-height:22px;height:22px;}
    .content .info dt.name{line-height:26px;height:26px;}
    .content .info dt.desd{line-height:22px;}
    .content .c-r{width:100%;clear:both;padding-top:2%;}
    .urlli li{width:18%;margin:2.5% 2.5% 0 0;}
    .urlli .p2{margin-right:0;}
    }
@media (min-width: 640px) and (max-width: 767px){
	.mb{margin-bottom:4%;}
	.wrap{width:96%;}
    .head .nav-pc,.head .nav-pc-2,.head .login,.head .ls,.ylink,.footer,.content .desd .desmb{display:none;}
    .index-tj li,.index-list-l li{width:18%;margin-right:2.5%;}
    .index-tj .m5,.index-list-l .m5{margin-right:0;}
    .index-tj .img{height:0;padding-bottom:150%;}
    .index-list-r,.c6{display:none;}
	.index-list-l .img{height:0;padding-bottom:150%;}
    .topiclist li{width:18%;margin-right:2.5%;}
    .topiclist .m4{margin-right:0;}
    .topiclist .img{height:0;padding-bottom:70%;}
    .content .pic{float:left;width:20%;height:0;padding-bottom:30%;overflow: hidden;}
    .content .info{margin-left:22%;}
    .content .info dd{float:left;width:50%;line-height:24px;height:24px;}
    .content .info dt.name{line-height:26px;height:26px;}
    .content .info dt.desd{line-height:24px;}
    .content .c-r{width:100%;clear:both;padding-top:2%;}
    .urlli li{width:18%;margin:2.5% 2.5% 0 0;}
    .urlli .p2{margin-right:0;}
}
@media (min-width: 768px) and (max-width: 1023px){
    .wrap{width:800px;}
    .mb{margin-bottom:20px;}
    .n8,.c6,.sy-title .more,.head .nav-pc,.head .nav-mb,.content .desd .desmb{display:none;}
    .sjbg2{height:50px;width:50px;background: url(p50.png) no-repeat;}
    .index-tj li{width:140px;margin-right:25px;}
    .index-tj .m5{margin-right:0;}
    .index-tj .img{height:190px;}
    .index-tj .li-hv:hover .sjbg2{left:45px;top:70px;}
    .index-list-l{float:left;width:580px;}
    .index-list-r{float:right;width:200px;}
    .index-list-l .img{height:180px;}
    .index-list-l li{width:130px;margin-right:20px;}
    .index-list-l .m4{margin-right:0;}
    .index-list-r li{margin-bottom:12px;*margin-bottom:9px;_margin-bottom:11px;}
    .index-list-r li a{height:20px;line-height:20px;}
    .index-list-l .li-hv:hover .sjbg2{left:40px;top:65px;}
    .topiclist li{width:140px;margin-right:25px;}
    .topiclist .m4{margin-right:0;}
    .topiclist .img{height:100px;}
    .topiclist .tplay{width:38px;height:44px;background: url(t1.png) no-repeat;}
    .topiclist .li-hv:hover .tplay{left:51px;top:28px;}
    .content .pic,.content .info{float:left;overflow: hidden;}
    .content .c-r{float:right;width:250px;}
    .content .pic{width:160px;height:240px;margin-right:20px;}
    .content .info{width:355px;}
    .content .info dt.name{line-height:24px;height:24px;}
    .content .info dd{line-height:22px;height:22px;}
    .content .info dt.desd{line-height:22px;}
    .urlli li{width:71px;margin:10px 10px 0 0;}
    .urlli .p1{margin-right:0;}
    }
@media (min-width: 1024px) and (max-width: 1365px){
    .wrap{width:1000px;}
    .mb{margin-bottom:20px;}
    .n8,.c6,.sy-title .more,.head .nav-mb,.content .desd .desmb{display:none;}
    .sjbg2{height:60px;width:60px;background: url(p60.png) no-repeat;}
    .index-tj li{width:180px;margin-right:25px;}
    .index-tj .m5{margin-right:0;}
    .index-tj .img{height:260px;}
    .index-tj .li-hv:hover .sjbg2{left:60px;top:100px;}
    .index-list-l{float:left;width:760px;}
	.index-list-r{float:right;width:220px;}
    .index-list-l .img{height:250px;}
	.index-list-l li{width:175px;margin-right:20px;}
    .index-list-l .m4{margin-right:0;}
	.index-list-r li{margin-bottom:21px;*margin-bottom:18px;_margin-bottom:20px;}
	.index-list-r li a{height:20px;line-height:20px;}
    .index-list-l .li-hv:hover .sjbg2{left:57px;top:95px;}
    .topiclist li{width:180px;margin-right:25px;}
    .topiclist .m4{margin-right:0;}
    .topiclist .img{height:130px;}
    .topiclist .tplay{width:38px;height:44px;background: url(t1.png) no-repeat;}
    .topiclist .li-hv:hover .tplay{left:71px;top:42px;}
    .content .pic,.content .info{float:left;overflow: hidden;}
    .content .c-r{float:right;width:250px;}
    .content .pic{width:230px;height:310px;margin-right:20px;}
    .content .info{width:475px;}
    .content .info dt.name{line-height:35px;height:35px;}
    .content .info dd{line-height:30px;height:30px;}
    .content .info dt.desd{line-height:30px;}
    .urlli li{width:91px;margin:10px 10px 0 0;}
    .urlli .p1{margin-right:0;}
    }
@media (min-width: 1366px) and (max-width: 1599px){
    .wrap{width:1200px;}
    .mb{margin-bottom:20px;}
    .n8,.c6,.sy-title .more,.head .nav-mb,.content .desd .desmb{display:none;}
    .sjbg2{height:70px;width:70px;background: url(p70.png) no-repeat;}
    .index-tj li{width:220px;margin-right:25px;}
    .index-tj .m5{margin-right:0;}
    .index-tj .img{height:300px;}
    .index-tj .li-hv:hover .sjbg2{left:75px;top:110px;}
    .index-list-l{float:left;width:940px;}
    .index-list-r{float:right;width:240px;}
    .index-list-l .img{height:300px;}
    .index-list-l li{width:220px;margin-right:20px;}
    .index-list-l .m4{margin-right:0;}
    .index-list-r li{margin-bottom:28px;*margin-bottom:25px;_margin-bottom:27px;}
    .index-list-r li a{height:20px;line-height:20px;}
    .index-list-l .li-hv:hover .sjbg2{left:75px;top:115px;}
    .topiclist li{width:220px;margin-right:25px;}
    .topiclist .m4{margin-right:0;}
    .topiclist .img{height:180px;}
    .topiclist .tplay{width:38px;height:44px;background: url(t1.png) no-repeat;}
    .topiclist .li-hv:hover .tplay{left:91px;top:68px;}
    .content .pic,.content .info{float:left;overflow: hidden;}
    .content .c-r{float:right;width:250px;}
    .content .pic{width:230px;height:310px;margin-right:20px;}
    .content .info{width:675px;}
    .content .info dt.name{line-height:35px;height:35px;}
    .content .info dd{line-height:30px;height:30px;}
    .content .info dt.desd{line-height:30px;}
    .urlli li{width:111px;margin:10px 10px 0 0;}
    .urlli .p1{margin-right:0;}
    }
@media (min-width: 1600px) {
    .wrap{width:1400px;}
    .mb{margin-bottom:20px;}
    .n8,.c6,.sy-title .more,.head .nav-mb,.content .desd .desmb{display:none;}
    .sjbg2{height:80px;width:80px;background: url(p80.png) no-repeat;}
    .index-tj li{width:260px;margin-right:25px;}
    .index-tj .m5{margin-right:0;}
    .index-tj .img{height:350px;}
    .index-tj .li-hv:hover .sjbg2{left:90px;top:135px;}
    .index-list-l{float:left;width:1100px;}
    .index-list-r{float:right;width:280px;}
    .index-list-l .img{height:350px;}
    .index-list-l li{width:260px;margin-right:20px;}
    .index-list-l .m4{margin-right:0;}
    .index-list-r li{margin-bottom:35px;*margin-bottom:32px;_margin-bottom:34px;}
    .index-list-r li a{height:20px;line-height:20px;}
    .index-list-l .li-hv:hover .sjbg2{left:90px;top:135px;}
    .topiclist li{width:260px;margin-right:25px;}
    .topiclist .m4{margin-right:0;}
    .topiclist .img{height:220px;}
    .topiclist .tplay{width:38px;height:44px;background: url(t1.png) no-repeat;}
    .topiclist .li-hv:hover .tplay{left:116px;top:88px;}
    .content .pic,.content .info{float:left;overflow: hidden;}
    .content .c-r{float:right;width:250px;}
    .content .pic{width:230px;height:310px;margin-right:20px;}
    .content .info{width:875px;}
    .content .info dt.name{line-height:35px;height:35px;}
    .content .info dd{line-height:30px;height:30px;}
    .content .info dt.desd{line-height:30px;}
    .urlli li{width:131px;margin:10px 10px 0 0;}
    .urlli .p1{margin-right:0;}
    }
@media (max-width: 319px) {
    .wrap{width:320px;}
}
.sjbg1{display:block;font-size:0px;height:0;line-height:0;width:0;overflow:hidden;border-top:50px solid red;border-left: 50px solid transparent;_border-left-style:dotted;}
.sjbgs{display:block;width:7px;height:5px;overflow: hidden;}
.sjbgx{display:block;width:7px;height:5px;overflow: hidden;}
.sjbg3{display:block;width:16px;height:10px;position:absolute;background: url(sj1.png) no-repeat;}
.sjbg2{position: absolute;display:block;}
.bg1{position: absolute;left:0;bottom:0;height:22px;width:100%;background:#000;opacity: 0.6;filter: progid:DXImageTransform.Microsoft.Alpha(opacity=60);}
.bz{position: absolute;right:0;bottom:0;padding:0 2%;height:22px;line-height:22px;overflow: hidden;color:#fff;font-size:85%;}
.play-hv{position: absolute;left:0;top:0;width:100%;height:100%;background:#000;opacity: 0;filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0);}
.li-hv{cursor: pointer;}
.li-hv:hover .play-hv{opacity: 0.6;filter: progid:DXImageTransform.Microsoft.Alpha(opacity=60);transition: opacity 300ms linear 0s;}
.h1{height:36px;line-height:36px;margin-bottom:15px;font-size:150%;color:#000;border-bottom:2px solid #e5e5e5;}
.h1 a{color: #0785D4;}
.h1 span{border-bottom:2px solid #0785D4;margin-bottom:-2px;height:36px;display:inline-block;position: relative;}
.h1 .more{float:right;font-size:70%;}
.h2{height:40px;line-height:40px;overflow:hidden;margin-bottom:15px;font-size:120%;color:#000;border-bottom:2px solid #e5e5e5;}
.shadow{box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.2);}
.ico{background: url(ico.png) no-repeat;}
.filter{opacity: 0.95;filter: progid:DXImageTransform.Microsoft.Alpha(opacity=95);}
/*head*/
.topall{width:100%;height:60px;background: #0785D4;position: fixed;z-index:9999;_position:absolute;top:0;_top:expression(documentElement.scrollTop+0+'px');left:0;}
.head{height:60px;padding-top:0;position: relative;z-index:999;}
.head .logo{float:left;width:100px;height:60px;}
.head .logo .logobg{display:block;cursor: pointer;width:100px;height:60px;background: url(logo.png) no-repeat;}
/*nav-pc*/
.head .nav-pc{float:left;}
.head .nav-pc li{float:left;}
.head .nav-pc li.js1{position: relative;}
.head .nav-pc li .navb{font-weight:400;display:block;}
.head .nav-pc li .navb a{line-height:60px;color:#fff;font-size:120%;display:block;padding:0 15px;}
.head .nav-pc .v .navb a{color:#0785d4}
.head .nav-pc .v .navb{background: #fff;}
.head .nav-pc .js1 .sjbgs,.head .nav-pc .js1 .sjbgx{position: absolute;right:0;top:28px;margin-right:5px;}
.head .nav-pc .js1 .sjbgs{background-position: -145px -2px;}
.head .nav-pc .js1 .sjbgx{background-position: -145px -15px;width:0;}
.head .nav-pc .v .sjbgs{width:0;}
.head .nav-pc .v .sjbgx{width:7px;}
.head .nav-pc .navb a:hover{background: #fff;color:#0785d4}
.head .nav-pc .nav-down{position: absolute;border:1px solid #0785d4;border-top:0;left:-1px;top:60px;width:245px;padding:20px 0 5px 15px;background:#fff;display:none;}
.head .nav-pc .nav-down li{float:left;text-align:center;padding:0 10px 15px 0;}
.head .nav-pc .nav-down li a{font-size:110%;line-height:34px;width:70px;float:left;display:block;border-radius: 3px;}
.head .nav-pc .nav-down li a:hover{background: #0785d4;color:#fff;}
.head .search{width:200px;margin:0 15px;height:30px;margin-top:15px;float:right;background:#0570AF;position: relative;}
.head .search input{border:0 none;}
.head .search .input{float:left;border:0;background:transparent;color:#fff;line-height:30px;height:30px;width:160px;padding:0 5px;}
.head .search .imgbt1,.head .search .imgbt2{position: absolute;top:0;right:0;}
.head .search .imgbt1{float:left;border:0 none;width:30px;height:30px;background-position: -104px 5px;cursor: pointer;}
.head .search .imgbt2{width:0;}
.head .shcur .imgbt2{float:left;border:0 none;width:30px;height:30px;background-position: -74px 5px;cursor: pointer;}
.head .shcur .imgbt1{width:0;}
.head .shcur .imgbt{background: #fff;}
.head .shcur,.head .shcur .input{background: #fff;color:#333;}
.head .search .search-key{display:none;position: absolute;left:0;top:30px;width:198px;padding:5px 0;background: #fff;border:1px solid #e4e4e4;}
.head .search .search-key a{display:block;line-height:28px;height:28px;overflow:hidden;padding:0 5px;}
.head .ls{position: relative;float:right;}
.head .ls .lsjl{border:1px solid #0785d4;border-top:0;position: absolute;top:60px;right:-1px;display:none;padding:10px;background: #fff;display:none;}
.head .ls li.js1{display:block;float:left;}
.head .ls .ls1{display:block;line-height:60px;color:#fff;padding:0 15px;}
.head .ls .v .ls1{background: #fff;color:#0785D4;}
#mh-ul li a{display:block;padding:0 5px;line-height:26px;height:26px;overflow: hidden;}
#mh-ul li a:hover{background: #f6f6f6;}
.head .login li.js1{position: relative;display:block;float:right;width:22px;height:60px;padding-left:15px;}
.head .login .bglogin{display:inline-block;margin-top:18px;width:22px;height:22px;background: url(login.png) no-repeat;}
/*.head .login .loginon{border:1px solid #0785d4;border-top:0;text-align:center;position: absolute;right:0;top:60px;width:100px;padding:10px;display:none;background: #fff;}
.head .login .loginon a{line-height:30px;}*/
.head .nav-pc-2{float:left;margin-left:15px;}
.head .nav-pc-2 li.js1{position: relative;display:block;float:left;padding:0 15px;}
.head .nav-pc-2 .js1 .navb{font-size:120%;color:#fff;line-height:60px;float:left;font-weight:400;padding-left:5px;}
.head .nav-pc-2 .js1 .pc1bg,.head .nav-pc-2 .js1 .pc2bg{display:inline-block;margin-top:19px;float:left;height:24px;overflow:hidden;}
.head .nav-pc-2 .js1 .pc1bg{background-position: 0 0;width:22px;}
.head .nav-pc-2 .js1 .pc2bg{background-position: -22px 0;width:0;overflow: hidden;}
.head .nav-pc-2 .v .pc1bg{width:0;overflow: hidden;}
.head .nav-pc-2 .v .pc2bg{background-position: -22px 0;width:22px;}
.head .nav-pc-2 li.v{background: #fff;}
.head .nav-pc-2 li.v .navb{color:#0785D4;}
.head .nav-pc-2 .nav-down-pc{border:1px solid #0785d4;border-top:0;position: absolute;left:-1px;top:60px;width:325px;padding:20px 0 5px 15px;display:none;background:#fff;display:none;}
.head .nav-pc-2 .nav-down-pc li{float:left;text-align:center;padding:0 10px 15px 0;}
.head .nav-pc-2 .nav-down-pc li a{float:left;display:block;font-size:110%;line-height:34px;width:70px;border-radius: 3px;}
.head .nav-pc-2 .nav-down-pc li a:hover{background: #0785d4;color:#fff;}
.head .nav-mb{line-height:60px;}
.head .nav-mb .nav-sj{float:left;margin-left:3%;}
.head .nav-mb .nav-sh{float:right;}
.head .nav-mb li{padding:0 15px;}
.head .nav-mb .navb{font-size:120%;color:#fff;line-height:60px;float:left;font-weight:400;padding-left:5px;}
.head .nav-mb .nav-sj .pc1bg,.head .nav-mb .nav-sj .pc2bg{display:inline-block;margin-top:19px;float:left;height:24px;overflow:hidden;}
.head .nav-mb .nav-sj .pc1bg{background-position: 0 0;width:22px;}
.head .nav-mb .nav-sj .pc2bg{background-position: -22px 0;width:0;overflow: hidden;}
.head .nav-mb .shcur .pc1bg{width:0;overflow: hidden;}
.head .nav-mb .shcur .pc2bg{background-position: -22px 0;width:22px;}
.head .nav-mb .shcur li{background: #fff;}
.head .nav-mb .shcur .navb{color:#0785D4;}
.head .nav-mb .nav-sh .navb{padding-left:0;}
.head .nav-down-mb,.head .search-mb{width:92%;padding:4%;background:#fff;display:none;position: absolute;left:0;top:60px;}
.head .nav-down-mb li{float:left;text-align:center;width:25%;padding:2% 0;font-size:110%;}
.head .nav-down-mb li a{display:block;line-height:220%;}
.head .nav-down-mb li a.on{background: #0785d4;color:#fff;border-radius: 3px;}
.head .search-mb .shall{padding:0 2%;font-size:110%;background: #f3f3f3;border:1px solid #ddd;}
.head .search-mb .input{float:left;width:80%;border:0 none;height:40px;line-height:40px;background: transparent;color:#333;}
.head .search-mb .imgbt{float:right;width:19%;border:0 none;border-left:1px solid #e1e1e1;height:40px;line-height:40px;background: transparent;}
/*index*/
.index-tj li{float:left;}
.index-tj .img{width:100%;position: relative;overflow: hidden;}
.index-tj .img img{width:100%;height:auto;}
.index-tj .text p{overflow: hidden;}
.index-tj .name{line-height:30px;height:24px;}
.index-tj .zy{color:#999;font-size:85%;line-height:20px;height:20px;}
.index-list-l li{float:left;}
.index-list-l .img{width:100%;position: relative;overflow: hidden;}
.index-list-l .img img{width:100%;height:auto;}
.index-list-l .text p{overflow: hidden;}
.index-list-l .name{line-height:30px;height:24px;}
.index-list-l .zy{color:#999;font-size:85%;line-height:20px;height:20px;}
.index-list-r .qt{float:right;color:#999;}
.index-list-r li a{display:block;overflow: hidden;}
.index-list-r li .i{background: #cbcbcb;color:#fff;padding:2px 2px;margin-right:5px;}
.index-list-r li .i4{background:#0785D4;}
.topiclist li{float:left;}
.topiclist .img{position: relative;overflow: hidden;}
.topiclist .img img{width:100%;height:auto;}
.topiclist .bg{position: absolute;left:0;bottom:0;width:100%;height:45px;background: url(bg1.png) repeat-x;}
.topiclist .text{position: absolute;left:0;bottom:0;width:100%;height:24px;line-height:24px;overflow:hidden;text-align:center;color:#fff;}
.topiclist .tplay{position: absolute;display:block;}
/*channel*/
.list-tab{background: #f4f4f4;line-height:40px;}
.list-tab li{float:left;border-right:2px solid #fff;}
.list-tab li a{display:block;padding:0 20px;}
.list-tab li a.on{border-top:2px solid #0785D4;color:#0785D4;}
/*content*/
.content .pic img{width:100%;height:auto;}
.content .info b{font-weight:400;color:#999;}
.content .info dl{color:#333;}
.content .info dt.name{font-size:130%;}
.content .info dt.name,.content .info dd{overflow: hidden;}
.content dt.desd{cursor: pointer;}
.content .desd .aa{color:#0785D4;padding:0 5px;}
.content .desd .des1 .sjbgs{background-position: -240px -13px;display:inline-block;margin-bottom:2px;*margin-bottom:3px;}
.content .desd .des2 .sjbgx{background-position: -191px -13px;display:inline-block;margin-bottom:2px;*margin-bottom:3px;}
.content .desd .des2,.content .desd .cur .des1{display:none;}
.content .desd .cur .des2{display:block;}
.content .desd .aa{color:#0785D4;padding:0 5px;}
.content .c-r{overflow: hidden;}
.pfrom{height:30px;background: #f4f4f4;border-top:3px solid #e5e5e5;}
.pfrom li{float:left;cursor:pointer;padding:0 10px;height:30px;line-height:27px;color:#333;}
.pfrom li.on,.pfrom li:hover{position: relative;margin-top:-3px;border-top:3px solid #0785D4;height:30px;line-height:27px;background: #fff;color:#333;font-weight:600;}
.pfrom li.g{float:left;padding:0;display:block;position: relative;margin-top:-3px;height:33px;width:0;overflow: hidden;border-right:2px solid #fff;}
.pfrom li:hover{background: #E8F5FB;color:#0785D4;font-weight:400;}
.pfrom li.on:hover{font-weight:600;background:#fff;color:#333;}
.urlli li{float:left;text-align:center;}
.urlli li a{display:block;height:32px;line-height:32px;border:1px solid #dfdfdf;color:#0785d4;overflow: hidden;}
.urlli li a:hover{background:#DEEDF5;}
.plist .coll{margin-top:10px;}
.plist .coll li{float:left;border:1px solid #dfdfdf;cursor: pointer;padding:0 15px;color:#333;margin-right:10px;line-height:24px;}
.plist .coll li.on{background:#DEEDF5;}
.plist .info{line-height:22px;margin-top:10px;}
.cxg .text{background: none;padding:0;}
.cxg .text p{padding:0;}
.ncu li{cursor: default;}
/*play*/
.player{background: #000 url(pload.gif) no-repeat center center;height:100%;}
.playding{background: #000;color:#fff;}
.playding li{text-align: center;float:left;line-height:30px;}
.playding .aa{padding-left:5%;}
.playding .bc{float:right;padding-right:5px;}
.playding li a{color:#fff;font-size:110%;}
.playding li a:hover{color: #8cde5c;}
.playding .fx{padding-left:5px;width:30%;}
.playding #digg_num,.playding #tread_num{font-weight:800;padding-right:2px;}
.pbf{margin-top:2%;}
/*sy*/
.sy-title{height:40px;line-height:40px;}
.sy-title .key{color:#0785D4;padding:0 2px;}
.sy-title .text em{font-style: normal;}
.sy-title .text{float:left;color:#333;font-size:110%;font-weight:600;}
.sy-title .more{float:right;cursor: pointer;color:#333;}
.sy-title .more .name{float:left;display:inline-block;font-style: normal;}
.sy-title .sbtn .sybg1{float:left;background-position: -191px -13px;margin:18px 0 0 3px;display:inline-block;width:7px;height:5px;}
.sy-title .sbtn .sybg2{float:left;background-position: -240px -13px;margin:18px 0 0 3px;display:inline-block;width:7px;height:5px;}
.sy-title .sbtn .more2{display:none;}
.sy-title .cur .more1{display:none;}
.sy-title .cur .more2{display:inline;}
.sy{padding:1% 0;border-top:1px solid #e4e4e4;}
.sy dl{padding:2px 0 6px 0;border-bottom:1px dotted #e4e4e4;}
.sy dl.area{border-bottom:0 none;}
.sy dt{float:left;width:65px;line-height:24px;margin-top:5px;font-weight:600;color:#333;}
.sy dd{margin-left:65px;}
.sy dd a{display:block;border-radius: 3px;text-align:center;float:left;line-height:24px;height:24px;padding:0 10px;overflow;hidden;margin-top:5px;}
.sy dd a:hover{border-color: #0785D4;}
.sy dd a.on{border-color:#0785D4;background:#079BF3;color:#fff;}
/*topic*/
.ztlist .img{position: relative;height:0;padding-bottom:30%;overflow: hidden;}
.ztlist .img img{width:100%;height:auto;}
.ztlist .bg{position: absolute;left:0;bottom:0;height:45px;width:100%;background: url(bg1.png) repeat-x;}
.ztlist .name{position: absolute;left:0;bottom:0;height:30px;line-height:30px;width:100%;text-align:center;overflow: hidden;}
.ztlist .name p{padding:0 2%;color:#fff;font-size:120%;}
/*newsindex*/
.n-index{border-bottom:1px dotted #e4e4e4;padding-bottom:10px;}
.n-index .ntitle {line-height:30px;}
.n-index .ntitle .more{float:right;}
.n-index li{float:left;width:50%;}
.n-index em{font-style: normal;padding-right:5px;}
/*n-content*/
.n-content span.name{font-size:120%;color:#333;}
.n-content span.time{color:#999;padding-left:10px;}
.n-content .des{padding:2% 0;}
/*n-list*/
.n-list li{padding:2% 0;border-bottom:1px dotted #e4e4e4;}
.n-list .img{float:left;width:30%;}
.n-list .img img{width:100%;height:auto;}
.n-list .img,.n-list .text{height:0;padding-bottom:20%;overflow: hidden;}
.n-list .text{margin-left:32%;position: relative;}
.n-list .tit{height:20px;overflow: hidden;}
.n-list .text .time{position: absolute;right:0;bottom:0;height:20px;line-height:20px;overflow: hidden;}
/*news-map*/
.news-map li{float:left;width:50%;line-height:30px;height:30px;overflow: hidden;}
/*map*/
.letter{padding-top:2%;}
.letter li{float:left;width:10%;text-align: center;}
.letter .zi9{width:20%;}
.letter li a{display:block;line-height:40px;border-style: solid;border-width: 1px;border-color: #F5F5F5 #e4e4e4 #e4e4e4 #F5F5F5;}
.letter li a:hover{background:#DEEDF5;}
.vmap{position: relative;padding-top:30px;}
.vmap .zm{position: absolute;top:15px;left:0;height:0;width:100%;overflow: hidden;border-bottom:3px solid #0785d4;}
.vmap .zm1{position: absolute;top:0px;left:0;padding:2px 0px;width:40px;text-align:center;font-size:30px;height:30px;line-height:30px;background: #0785D4;color:#fff;border-radius: 6px;}
.vmap li{float:left;width:32%;margin-right:2%;}
.vmap li a{display:block;height:34px;line-height:34px;border-bottom:1px dotted #e4e4e4;overflow: hidden;}
.vmap li a:hover{background: #f6f6f6;}
.vmap li .vbz{color:#999;float:right;}
.vmap .m3{margin-right:0;}
/*page*/
.page{text-align: center;}
.page a,.page span,.page em{display:inline-block;font-style: normal;padding:5px 12px;border:1px solid #e4e4e4;margin:0 10px 10px 0;}
.page em{border-color: #0785D4;background:#079BF3;color:#fff;}
.page a:hover{border-color:#0785D4;}
/*ylink*/
.ylink{padding-top:20px;text-align: center;}
.ylink a{display:inline-block;padding:2px 5px;}
.nylink{padding:0;width:100%;background: #f6f6f6;}
/*footer*/
.footer{background: #f6f6f6;width:100%;margin:0 auto;text-align:center;padding:20px 0;}
.gotop{position: fixed;_position:absolute;z-index:10;bottom:100px;right:10px;width:42px;height:42px;display:none;}
.gotop a.gotopbg{display:block;width:42px;height:42px;background:transparent url("ttop.png") no-repeat;cursor: pointer;}


text:
import os
import sys
import config_util as util

OS_DIR = os.path.dirname(__file__) + '/..'
TOOL_DIR = OS_DIR + '/tools/'

############################################################################
#
# This script generates samsung binary header for kernel.
#
# Kernel binary header information :
#
# total header size is (16 + #)bytes.
# +----------------------------------------------------------------------------------------------
# |  CRC32   | Header size | Binary Version |  Binary Size | Secure Header Size | Secure Header |
# | (4bytes) |   (2bytes)  |    (4bytes)    |   (4bytes)   |      (2bytes)      |    (#bytes)   |
# +----------------------------------------------------------------------------------------------
#  * A CRC32 is checksum value for the entire binary from Header size to the end of binary.
#  * A size of Secure Header depends on board.
#
# parameter information :
#
# argv[1] is file path of binary file.
# argv[2] is a type of binary, kernel or user.
# argv[3] is a size of secure header which is board-specific.
#
############################################################################
binary_path = OS_DIR + '/../build/output/bin/' + util.get_binname_from_bininfo("KERNEL")
binary_type = sys.argv[1]
secure_header_size = sys.argv[2]

mkbinheader_path = TOOL_DIR + 'mkbinheader.py'
mkchecksum_path = TOOL_DIR + 'mkchecksum.py'

############################################################################
# Generate Samsung headers
############################################################################
os.system('python %s %s %s %s' % (mkbinheader_path, binary_path, binary_type, secure_header_size))
os.system('python %s %s' % (mkchecksum_path, binary_path))

redpajama_set_name: RedPajamaGithub


text:
\hypertarget{class_my_type}{}\section{My\+Type Class Reference}
\label{class_my_type}\index{My\+Type@{My\+Type}}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item
\hyperlink{class_my_type_a74d6f29a06e298321a6e5f0b91b020e7}{My\+Type} (const std\+::string \&a\+\_\+value)
\item
const std\+::string \& \hyperlink{class_my_type_a2c8074a0ef1f1c5e19490b9e118d69ca}{value} () const
\end{DoxyCompactItemize}

\subsection{Detailed Description}

Definition at line 79 of file gtest\+\_\+list\+\_\+tests\+\_\+unittest\+\_\+.\+cc.

\subsection{Constructor \& Destructor Documentation}
\index{My\+Type@{My\+Type}!My\+Type@{My\+Type}}
\index{My\+Type@{My\+Type}!My\+Type@{My\+Type}}
\subsubsection[{\texorpdfstring{My\+Type(const std\+::string \&a\+\_\+value)}{MyType(const std::string &a_value)}}]{\setlength{\rightskip}{0pt plus 5cm}My\+Type\+::\+My\+Type (
\begin{DoxyParamCaption}
\item[{const std\+::string \&}]{a\+\_\+value}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [explicit]}}\hypertarget{class_my_type_a74d6f29a06e298321a6e5f0b91b020e7}{}\label{class_my_type_a74d6f29a06e298321a6e5f0b91b020e7}

Definition at line 81 of file gtest\+\_\+list\+\_\+tests\+\_\+unittest\+\_\+.\+cc.

\subsection{Member Function Documentation}
\index{My\+Type@{My\+Type}!value@{value}}
\index{value@{value}!My\+Type@{My\+Type}}
\subsubsection[{\texorpdfstring{value() const }{value() const }}]{\setlength{\rightskip}{0pt plus 5cm}const std\+::string\& My\+Type\+::value (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}}\hypertarget{class_my_type_a2c8074a0ef1f1c5e19490b9e118d69ca}{}\label{class_my_type_a2c8074a0ef1f1c5e19490b9e118d69ca}

Definition at line 83 of file gtest\+\_\+list\+\_\+tests\+\_\+unittest\+\_\+.\+cc.

The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item
/home/bhargavi/\+Documents/\+S\+D\+R/\+Copy\+\_\+\+Exam\+\_\+808\+X/vendor/googletest/googletest/test/\hyperlink{gtest__list__tests__unittest___8cc}{gtest\+\_\+list\+\_\+tests\+\_\+unittest\+\_\+.\+cc}\end{DoxyCompactItemize}


text:
<?php

namespace MainlyCode\DateTimeGenerator;

interface DateTimeGenerator
{
    /**
     * @return DateTimeInterface
     */
    public function generate();
}


text:
package com.google.inject;

import junit.framework.TestCase;

import com.github.ruediste.salta.core.SaltaException;

/**
 * Tests for {@link Binder#requireAtInjectOnConstructors()}
 *
 * @author sameb@google.com (Sam Berlin)
 */
public class RequireAtInjectOnConstructorsTest extends TestCase {

    public void testNoCxtors_explicitBinding() {
        try {
            Guice.createInjector(new AbstractModule() {
                @Override
                protected void configure() {
                    bind(NoCxtors.class);
                    binder().requireAtInjectOnConstructors();
                }
            }).getInstance(NoCxtors.class);
            fail();
        } catch (SaltaException ce) {
            if (!ce.getMessage().contains("Cannot find construction recipe"))
                throw ce;
        }
    }

    public void testNoCxtors_jitBinding() {
        Injector injector = Guice.createInjector(new AbstractModule() {
            @Override
            protected void configure() {
                binder().requireAtInjectOnConstructors();
            }
        });
        try {
            injector.getInstance(NoCxtors.class);
            fail();
        } catch (SaltaException ce) {
            if (!ce.getMessage().contains("inner class"))
                throw ce;
        }
    }

    public void testNoCxtors_implicitBinding() {
        try {
            Guice.createInjector(new AbstractModule() {
                @Override
                protected void configure() {
                    bind(Interface.class).to(NoCxtors.class);
                    binder().requireAtInjectOnConstructors();
                }
            }).getInstance(Interface.class);
            fail();
        } catch (SaltaException ce) {
            if (!ce.getMessage().contains("Cannot find construction recipe"))
                throw ce;
        }
    }

    public void testNoCxtors_inheritedByPrivateModules() {
        try {
            Guice.createInjector(new AbstractModule() {
                @Override
                protected void configure() {
                    binder().requireAtInjectOnConstructors();
                    install(new AbstractModule() {
                        @Override
                        protected void configure() {
                            bind(NoCxtors.class);
                        }
                    });
                }
            }).getInstance(NoCxtors.class);
            fail();
        } catch (SaltaException ce) {
            if (!ce.getMessage().contains("Cannot find construction recipe"))
                throw ce;
        }
    }

    public void testManyConstructorsButNoneWithAtInject() {
        try {
            Guice.createInjector(new AbstractModule() {
                @Override
                protected void configure() {
                    bind(ManyConstructors.class);
                    binder().requireAtInjectOnConstructors();
                }
            }).getInstance(ManyConstructors.class);
            fail();
        } catch (SaltaException ce) {
            if (!ce.getMessage().contains("Cannot find construction recipe"))
                throw ce;
        }
    }

    public void testRequireAtInjectStillAllowsToConstructorBindings() {
        Injector injector = Guice.createInjector(new AbstractModule() {
            @Override
            protected void configure() {
                try {
                    bind(ManyConstructors.class).toConstructor(
                            ManyConstructors.class.getDeclaredConstructor());
                } catch (Exception e) {
                    throw new RuntimeException(e);
                }
                binder().requireAtInjectOnConstructors();
            }
        });
        injector.getInstance(ManyConstructors.class);
    }

    private static interface Interface {
    }

    private static class NoCxtors implements Interface {
    }

    private static class AnotherNoCxtors {
    }

    private static class ManyConstructors {
        @SuppressWarnings("unused")
        ManyConstructors() {
        }

        @SuppressWarnings("unused")
        ManyConstructors(String a) {
        }

        @SuppressWarnings("unused")
        ManyConstructors(int a) {
        }
    }
}


text:
package de.haw.rnp.component.transport.accesslayer;

import de.haw.rnp.adapter.outgoingclient.dataaccesslayer.UserDTO;
import de.haw.rnp.adapter.outgoingpeer.accesslayer.IOutgoingPeerAdapterServices;
import de.haw.rnp.component.transport.businesslogiclayer.TransportBusinessLogic;
import de.haw.rnp.component.transport.dataaccesslayer.entities.Frame;
import de.haw.rnp.util.AddressType;

import java.util.Collection;

/**
 * Facade pattern delegating all methods used for the actual Message Transport.
 */
public class TransportFacade implements ITransportServices, ITransportServicesForIncomingPeerAdapter {

    private TransportBusinessLogic transportBusinessLogic;

    public TransportFacade(IOutgoingPeerAdapterServices outgoingPeerAdapterServices) {
        transportBusinessLogic = new TransportBusinessLogic(outgoingPeerAdapterServices);
    }

    @Override
    public void sendMessage(Frame frame, boolean isTCP) {
        transportBusinessLogic.sendMessage(frame, isTCP);
    }

    @Override
    public void sendLogin(Frame frame, boolean isTCP) {
        transportBusinessLogic.sendLogin(frame, isTCP);
    }

    @Override
    public void sendLogout(Frame frame, boolean isTCP) {
        transportBusinessLogic.sendLogout(frame, isTCP);
    }

    @Override
    public void sendUsername(Frame frame, boolean isTCP) {
        transportBusinessLogic.sendUsername(frame, isTCP);
    }

    @Override
    public void setLocal(AddressType address, String name) {
        transportBusinessLogic.setLocal(address, name);
    }

    @Override
    public Frame receiveFrameAsBytes(byte[] bytes) {
        return transportBusinessLogic.receiveFrameAsBytes(bytes);
    }

    @Override
    public void propagatePeer(Frame frame, Collection<UserDTO> recipients, boolean isTCP) {
        transportBusinessLogic.propagatePeer(frame, recipients, isTCP);
    }

    @Override
    public void propagateLogout(Frame frame, Collection<UserDTO> recipients, boolean isTCP) {
        transportBusinessLogic.propagateLogout(frame, recipients, isTCP);
    }

    @Override
    public boolean checkLocal(Frame frame) {
        return transportBusinessLogic.checkLocal(frame);
    }
}


text:
package client

import "encoding/json"

// UserResponse ...
type UserResponse struct {
	Version  string `json:"version"`
	Response []User `json:"response"`
}

// User contains information about a given user in Traffic Ops.
type User struct {
	Username     string `json:"username,omitempty"`
	PublicSSHKey string `json:"publicSshKey,omitempty"`
	Role         string `json:"role,omitempty"`
	RoleName     string `json:"rolename,omitempty"`
	UID          string `json:"uid,omitempty"`
	GID          string `json:"gid,omitempty"`
	Company      string `json:"company,omitempty"`
	Email        string `json:"email,omitempty"`
	FullName     string `json:"fullName,omitempty"`
	NewUser      bool   `json:"newUser,omitempty"`
	LastUpdated  string `json:"lastUpdated,omitempty"`
}

// Users gets an array of Users.
func (to *Session) Users() ([]User, error) {
	url := "/api/1.2/users.json"
	resp, err := to.request(url, nil)
	if err != nil {
		return nil, err
	}

	var data UserResponse
	if err := json.NewDecoder(resp.Body).Decode(&data.Response); err != nil {
		return nil, err
	}

	return data.Response, nil
}


text:
package org.apache.hc.core5.http2.impl.nio;

import java.nio.ByteBuffer;

import org.apache.hc.core5.http.ConnectionClosedException;
import org.apache.hc.core5.http2.H2ConnectionException;
import org.apache.hc.core5.http2.H2CorruptFrameException;
import org.apache.hc.core5.http2.ReadableByteChannelMock;
import org.apache.hc.core5.http2.WritableByteChannelMock;
import org.apache.hc.core5.http2.frame.FrameConsts;
import org.apache.hc.core5.http2.frame.FrameFlag;
import org.apache.hc.core5.http2.frame.FrameType;
import org.apache.hc.core5.http2.frame.RawFrame;
import org.apache.hc.core5.http2.impl.BasicH2TransportMetrics;
import org.junit.Assert;
import org.junit.Test;

public class TestFrameInOutBuffers {

    @Test
    public void testReadWriteFrame() throws Exception {
        final WritableByteChannelMock writableChannel = new WritableByteChannelMock(1024);
        final FrameOutputBuffer outbuffer = new FrameOutputBuffer(16 * 1024);

        final RawFrame frame = new RawFrame(FrameType.DATA.getValue(), 0, 1,
                ByteBuffer.wrap(new byte[]{1,2,3,4,5}));
        outbuffer.write(frame, writableChannel);

        final FrameInputBuffer inBuffer = new FrameInputBuffer(16 * 1024);
        final byte[] bytes = writableChannel.toByteArray();
        Assert.assertEquals(FrameConsts.HEAD_LEN + 5, bytes.length);

        Assert.assertEquals(1, outbuffer.getMetrics().getFramesTransferred());
        Assert.assertEquals(bytes.length, outbuffer.getMetrics().getBytesTransferred());

        final ReadableByteChannelMock readableChannel = new ReadableByteChannelMock(bytes);
        final RawFrame frame2 = inBuffer.read(readableChannel);
        Assert.assertEquals(FrameType.DATA.getValue(), frame2.getType());
        Assert.assertEquals(0, frame2.getFlags());
        Assert.assertEquals(1L, frame2.getStreamId());
        final ByteBuffer payload2 = frame2.getPayloadContent();
        Assert.assertNotNull(payload2);
        Assert.assertEquals(5, payload2.remaining());
        Assert.assertEquals(1, payload2.get());
        Assert.assertEquals(2, payload2.get());
        Assert.assertEquals(3, payload2.get());
        Assert.assertEquals(4, payload2.get());
        Assert.assertEquals(5, payload2.get());
        Assert.assertEquals(-1, readableChannel.read(ByteBuffer.allocate(1024)));

        Assert.assertEquals(1, inBuffer.getMetrics().getFramesTransferred());
        Assert.assertEquals(bytes.length, inBuffer.getMetrics().getBytesTransferred());
    }

    @Test
    public void testPartialFrameWrite() throws Exception {
        final WritableByteChannelMock writableChannel = new WritableByteChannelMock(1024, FrameConsts.HEAD_LEN + 10);
        final FrameOutputBuffer outbuffer = new FrameOutputBuffer(16 * 1024);
        final RawFrame frame = new RawFrame(FrameType.DATA.getValue(), FrameFlag.END_STREAM.getValue(), 5,
                ByteBuffer.wrap(new byte[]{'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'}));

        outbuffer.write(frame, writableChannel);
        Assert.assertArrayEquals(new byte[] {0,0,16,0,1,0,0,0,5,48,49,50,51,52,53,54,55,56,57},
                writableChannel.toByteArray());

        Assert.assertFalse(outbuffer.isEmpty());
        outbuffer.flush(writableChannel);
        Assert.assertArrayEquals(new byte[] {0,0,16,0,1,0,0,0,5,48,49,50,51,52,53,54,55,56,57},
                writableChannel.toByteArray());

        writableChannel.flush();
        outbuffer.flush(writableChannel);
        Assert.assertArrayEquals(new byte[] {0,0,16,0,1,0,0,0,5,48,49,50,51,52,53,54,55,56,57,97,98,99,100,101,102},
                writableChannel.toByteArray());
    }

    @Test
    public void testReadFrameMultiple() throws Exception {
        final FrameInputBuffer inBuffer = new FrameInputBuffer(16 * 1024);
        final ReadableByteChannelMock readableChannel = new ReadableByteChannelMock(
                new byte[] {
                        0,0,10,0,8,0,0,0,8,4,0,1,2,3,4,0,0,0,0,
                        0,0,10,0,9,0,0,0,8,4,5,6,7,8,9,0,0,0,0
                });

        final RawFrame frame1 = inBuffer.read(readableChannel);
        Assert.assertEquals(FrameType.DATA, FrameType.valueOf(frame1.getType()));
        Assert.assertEquals(8, frame1.getFlags());
        Assert.assertEquals(8, frame1.getStreamId());
        final ByteBuffer payload1 = frame1.getPayloadContent();
        Assert.assertNotNull(payload1);
        Assert.assertEquals(5, payload1.remaining());
        Assert.assertEquals(0, payload1.get());
        Assert.assertEquals(1, payload1.get());
        Assert.assertEquals(2, payload1.get());
        Assert.assertEquals(3, payload1.get());
        Assert.assertEquals(4, payload1.get());

        final RawFrame frame2 = inBuffer.read(readableChannel);
        Assert.assertEquals(FrameType.DATA, FrameType.valueOf(frame2.getType()));
        Assert.assertEquals(FrameFlag.of(FrameFlag.END_STREAM, FrameFlag.PADDED), frame2.getFlags());
        Assert.assertEquals(8, frame2.getStreamId());
        final ByteBuffer payload2 = frame2.getPayloadContent();
        Assert.assertNotNull(payload2);
        Assert.assertEquals(5, payload2.remaining());
        Assert.assertEquals(5, payload2.get());
        Assert.assertEquals(6, payload2.get());
        Assert.assertEquals(7, payload2.get());
        Assert.assertEquals(8, payload2.get());
        Assert.assertEquals(9, payload2.get());

        Assert.assertEquals(-1, readableChannel.read(ByteBuffer.allocate(1024)));
    }

    @Test
    public void testReadFrameMultipleSmallBuffer() throws Exception {
        final FrameInputBuffer inBuffer = new FrameInputBuffer(new BasicH2TransportMetrics(), 20, 10);
        final ReadableByteChannelMock readableChannel = new ReadableByteChannelMock(
                new byte[] {
                        0,0,10,0,8,0,0,0,8,4,1,1,1,1,1,0,0,0,0,
                        0,0,5,0,0,0,0,0,8,2,2,2,2,2,
                        0,0,10,0,9,0,0,0,8,4,3,3,3,3,3,0,0,0,0
                });

        final RawFrame frame1 = inBuffer.read(readableChannel);
        Assert.assertEquals(FrameType.DATA, FrameType.valueOf(frame1.getType()));
        Assert.assertEquals(8, frame1.getFlags());
        Assert.assertEquals(8, frame1.getStreamId());
        final ByteBuffer payload1 = frame1.getPayloadContent();
        Assert.assertNotNull(payload1);
        Assert.assertEquals(5, payload1.remaining());
        Assert.assertEquals(1, payload1.get());
        Assert.assertEquals(1, payload1.get());
        Assert.assertEquals(1, payload1.get());
        Assert.assertEquals(1, payload1.get());
        Assert.assertEquals(1, payload1.get());

        final RawFrame frame2 = inBuffer.read(readableChannel);
        Assert.assertEquals(FrameType.DATA, FrameType.valueOf(frame2.getType()));
        Assert.assertEquals(0, frame2.getFlags());
        Assert.assertEquals(8, frame2.getStreamId());
        final ByteBuffer payload2 = frame2.getPayloadContent();
        Assert.assertNotNull(payload2);
        Assert.assertEquals(5, payload2.remaining());
        Assert.assertEquals(2, payload2.get());
        Assert.assertEquals(2, payload2.get());
        Assert.assertEquals(2, payload2.get());
        Assert.assertEquals(2, payload2.get());
        Assert.assertEquals(2, payload2.get());

        final RawFrame frame3 = inBuffer.read(readableChannel);
        Assert.assertEquals(FrameType.DATA, FrameType.valueOf(frame3.getType()));
        Assert.assertEquals(FrameFlag.of(FrameFlag.END_STREAM, FrameFlag.PADDED), frame3.getFlags());
        Assert.assertEquals(8, frame3.getStreamId());
        final ByteBuffer payload3 = frame3.getPayloadContent();
        Assert.assertNotNull(payload3);
        Assert.assertEquals(5, payload3.remaining());
        Assert.assertEquals(3, payload3.get());
        Assert.assertEquals(3, payload3.get());
        Assert.assertEquals(3, payload3.get());
        Assert.assertEquals(3, payload3.get());
        Assert.assertEquals(3, payload3.get());

        Assert.assertEquals(-1, readableChannel.read(ByteBuffer.allocate(1024)));
    }

    @Test
    public void testReadFramePartialReads() throws Exception {
        final FrameInputBuffer inBuffer = new FrameInputBuffer(16 * 1024);
        final ReadableByteChannelMock readableChannel = new ReadableByteChannelMock(
                new byte[] {0,0},
                new byte[] {10,0,9,0},
                new byte[] {0,0,8},
                new byte[] {4},
                new byte[] {1,2,3,4},
                new byte[] {5,0},
                new byte[] {0,0,0});

        final RawFrame frame = inBuffer.read(readableChannel);
        Assert.assertEquals(FrameType.DATA, FrameType.valueOf(frame.getType()));
        Assert.assertEquals(FrameFlag.of(FrameFlag.END_STREAM, FrameFlag.PADDED), frame.getFlags());
        Assert.assertEquals(8, frame.getStreamId());
        final ByteBuffer payload = frame.getPayloadContent();
        Assert.assertNotNull(payload);
        Assert.assertEquals(5, payload.remaining());
        Assert.assertEquals(1, payload.get());
        Assert.assertEquals(2, payload.get());
        Assert.assertEquals(3, payload.get());
        Assert.assertEquals(4, payload.get());
        Assert.assertEquals(5, payload.get());

        Assert.assertEquals(-1, readableChannel.read(ByteBuffer.allocate(1024)));
    }

    @Test
    public void testReadEmptyFrame() throws Exception {
        final FrameInputBuffer inBuffer = new FrameInputBuffer(16 * 1024);
        final ReadableByteChannelMock readableChannel = new ReadableByteChannelMock(
                new byte[] {0,0,0,0,0,0,0,0,0});

        final RawFrame frame = inBuffer.read(readableChannel);
        Assert.assertEquals(FrameType.DATA, FrameType.valueOf(frame.getType()));
        Assert.assertEquals(0, frame.getFlags());
        Assert.assertEquals(0, frame.getStreamId());
        final ByteBuffer payload = frame.getPayloadContent();
        Assert.assertNull(payload);
    }

    @Test(expected = ConnectionClosedException.class)
    public void testReadFrameConnectionClosed() throws Exception {
        final FrameInputBuffer inBuffer = new FrameInputBuffer(16 * 1024);
        final ReadableByteChannelMock readableChannel = new ReadableByteChannelMock(new byte[] {});

        Assert.assertEquals(null, inBuffer.read(readableChannel));
        inBuffer.read(readableChannel);
    }

    @Test(expected = H2CorruptFrameException.class)
    public void testReadFrameCorruptFrame() throws Exception {
        final FrameInputBuffer inBuffer = new FrameInputBuffer(16 * 1024);
        final ReadableByteChannelMock readableChannel = new ReadableByteChannelMock(new byte[] {0,0});

        Assert.assertEquals(null, inBuffer.read(readableChannel));
        inBuffer.read(readableChannel);
    }

    @Test(expected = H2ConnectionException.class)
    public void testWriteFrameExceedingLimit() throws Exception {
        final WritableByteChannelMock writableChannel = new WritableByteChannelMock(1024);
        final FrameOutputBuffer outbuffer = new FrameOutputBuffer(1024);

        final RawFrame frame = new RawFrame(FrameType.DATA.getValue(), 0, 1,
                ByteBuffer.wrap(new byte[2048]));
        outbuffer.write(frame, writableChannel);
    }

    @Test(expected = H2ConnectionException.class)
    public void testReadFrameExceedingLimit() throws Exception {
        final FrameInputBuffer inBuffer = new FrameInputBuffer(16 * 1024);
        final ReadableByteChannelMock readableChannel = new ReadableByteChannelMock(
                new byte[] {0,-128,-128,0,0,0,0,0,1});

        Assert.assertEquals(null, inBuffer.read(readableChannel));
        inBuffer.read(readableChannel);
    }

}


text:
set -e

. /opt/kolla/config-neutron.sh

: ${NEUTRON_FLAT_NETWORK_NAME:=physnet1}
: ${NEUTRON_FLAT_NETWORK_INTERFACE:=eth1}

check_required_vars KEYSTONE_ADMIN_TOKEN KEYSTONE_ADMIN_SERVICE_HOST \
                    KEYSTONE_AUTH_PROTOCOL NOVA_API_SERVICE_HOST \
                    NOVA_KEYSTONE_USER NOVA_KEYSTONE_PASSWORD \
                    NEUTRON_DB_NAME NEUTRON_DB_USER NEUTRON_DB_PASSWORD \
                    NEUTRON_KEYSTONE_USER NEUTRON_KEYSTONE_PASSWORD \
                    ADMIN_TENANT_NAME NEUTRON_SERVER_SERVICE_HOST \
                    PUBLIC_IP NEUTRON_DB_PASSWORD
fail_unless_os_service_running keystone
fail_unless_db

mysql -h ${MARIADB_SERVICE_HOST} -u root -p${DB_ROOT_PASSWORD} mysql <<EOF
CREATE DATABASE IF NOT EXISTS ${NEUTRON_DB_NAME} DEFAULT CHARACTER SET utf8;
GRANT ALL PRIVILEGES ON ${NEUTRON_DB_NAME}.* TO
       '${NEUTRON_DB_USER}'@'%' IDENTIFIED BY '${NEUTRON_DB_PASSWORD}'

EOF

export SERVICE_TOKEN="${KEYSTONE_ADMIN_TOKEN}"
export SERVICE_ENDPOINT="${KEYSTONE_AUTH_PROTOCOL}://${KEYSTONE_ADMIN_SERVICE_HOST}:${KEYSTONE_ADMIN_SERVICE_PORT}/v2.0"

# Configure Keystone Service Catalog
crux user-create -n "${NEUTRON_KEYSTONE_USER}" \
    -p "${NEUTRON_KEYSTONE_PASSWORD}" \
    -t "${ADMIN_TENANT_NAME}" \
    -r admin

crux endpoint-create -n neutron -t network \
    -I "${KEYSTONE_AUTH_PROTOCOL}://${NEUTRON_SERVER_SERVICE_HOST}:${NEUTRON_SERVER_SERVICE_PORT}" \
    -P "${KEYSTONE_AUTH_PROTOCOL}://${NEUTRON_SERVER_SERVICE_HOST}:${NEUTRON_SERVER_SERVICE_PORT}" \
    -A "${KEYSTONE_AUTH_PROTOCOL}://${NEUTRON_SERVER_SERVICE_HOST}:${NEUTRON_SERVER_SERVICE_PORT}"

core_cfg=/etc/neutron/neutron.conf
ml2_cfg=/etc/neutron/plugins/ml2/ml2_conf.ini

# Logging
crudini --set /etc/neutron/neutron.conf \
        DEFAULT \
        log_file \
        "${NEUTRON_SERVER_LOG_FILE}"

# Database
crudini --set $core_cfg \
        database \
        connection \
        "mysql://${NEUTRON_DB_USER}:${NEUTRON_DB_PASSWORD}@${MARIADB_SERVICE_HOST}/${NEUTRON_DB_NAME}"
# Nova
crudini --set $core_cfg \
        DEFAULT \
        notify_nova_on_port_status_changes \
        "True"
crudini --set $core_cfg \
        DEFAULT \
        notify_nova_on_port_data_changes \
        "True"
crudini --set $core_cfg \
        DEFAULT \
        nova_url \
        "http://${NOVA_API_SERVICE_HOST}:${NOVA_API_SERVICE_PORT}/v2"
crudini --set $core_cfg \
        DEFAULT \
        nova_admin_auth_url \
        "${KEYSTONE_AUTH_PROTOCOL}://${KEYSTONE_ADMIN_SERVICE_HOST}:${KEYSTONE_ADMIN_SERVICE_PORT}/v2.0"
crudini --set $core_cfg \
        DEFAULT \
        nova_region_name \
        "${KEYSTONE_REGION}"
crudini --set $core_cfg \
        DEFAULT \
        nova_admin_username \
        "${NOVA_KEYSTONE_USER}"
crudini --set $core_cfg \
        DEFAULT \
        nova_admin_tenant_id \
        "$(keystone tenant-list | grep $ADMIN_TENANT_NAME | awk '{print $2;}')"
crudini --set $core_cfg \
        DEFAULT \
        nova_admin_password \
        "${NOVA_KEYSTONE_PASSWORD}"

if [[ ${MECHANISM_DRIVERS} =~ linuxbridge ]]; then
  crudini --set $ml2_cfg \
          linux_bridge \
          physical_interface_mappings \
          "${NEUTRON_FLAT_NETWORK_NAME}:${NEUTRON_FLAT_NETWORK_INTERFACE}"
fi

su -s /bin/bash -c "neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head" neutron

exec /usr/bin/neutron-server --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini


text:
require 'spec_helper'

module RailsBestPractices::Core
  describe Error do
    it "should have highlight with false by default" do
      Error.new.highlight.should == false
    end

    it "should return error with filename, line number and message" do
      Error.new(
        filename: "app/models/user.rb",
        line_number: "100",
        message: "not good",
        type: "BogusReview").to_s.should == "app/models/user.rb:100 - not good"
    end

    it "should return short filename" do
      Runner.base_path = "../rails-bestpractices.com"
      Error.new(
        filename: "../rails-bestpractices.com/app/models/user.rb",
        line_number: "100",
        message: "not good",
        type: "BogusReview").short_filename.should == "app/models/user.rb"
    end

    it "should return first line number" do
      Error.new(
        filename: "app/models/user.rb",
        line_number: "50,70,100",
        message: "not good",
        type: "BogusReview").first_line_number.should == "50"
    end
  end
end


text:
package com.toscaruntime.docker.nodes;

import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.TimeUnit;

import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import org.mockito.Mockito;

import com.google.common.collect.ImmutableMap;
import com.toscaruntime.deployment.DeploymentPersister;
import com.toscaruntime.docker.DockerProviderHook;
import com.toscaruntime.util.ClassLoaderUtil;
import com.toscaruntime.util.DockerDaemonConfig;
import com.toscaruntime.util.DockerUtil;

@RunWith(JUnit4.class)
public class DockerNodesTest {

    @Test
    public void testDocker() throws Throwable {
        DockerTestDeployment testDeployment = new DockerTestDeployment();
        DockerProviderHook providerHook = new DockerProviderHook();
        DockerDaemonConfig dockerDaemonConfig = DockerUtil.getDefaultDockerDaemonConfig();

        Map<String, String> providerProperties = ImmutableMap.<String, String>builder()
                .put(DockerUtil.DOCKER_URL_KEY, dockerDaemonConfig.getUrl())
                .put(DockerUtil.DOCKER_CERT_PATH_KEY, dockerDaemonConfig.getCertPath())
                .build();
        testDeployment.initializeConfig("testDeployment", ClassLoaderUtil.getPathForResource("recipe/"), new HashMap<>(), providerProperties, new HashMap<>(), providerHook, Mockito.mock(DeploymentPersister.class), true);
        try {
            testDeployment.run(testDeployment.install()).waitForCompletion(15, TimeUnit.MINUTES);
            Container compute = testDeployment.getNodeInstancesByType(Container.class).iterator().next();
            Assert.assertNotNull(compute.getAttributeAsString("public_ip_address"));
            Assert.assertNotNull(compute.getAttributeAsString("ip_address"));
            Assert.assertNotNull(compute.getAttributeAsString("provider_resource_id"));
            Assert.assertNotNull(compute.getAttributeAsString("provider_resource_name"));
            Assert.assertEquals("Compute_1", compute.getAttributeAsString("tosca_id"));
            Assert.assertEquals("Compute", compute.getAttributeAsString("tosca_name"));

            Network network = testDeployment.getNodeInstancesByType(Network.class).iterator().next();
            Assert.assertNotNull(network.getAttributeAsString("provider_resource_id"));
            Assert.assertEquals("dockerNet", network.getAttributeAsString("provider_resource_name"));
            Assert.assertEquals("Network_1", network.getAttributeAsString("tosca_id"));
            Assert.assertEquals("Network", network.getAttributeAsString("tosca_name"));

            DeletableVolume volume = testDeployment.getNodeInstancesByType(DeletableVolume.class).iterator().next();
            Assert.assertEquals("toscaruntimeTestVolume", volume.getAttributeAsString("provider_resource_id"));
            Assert.assertEquals("toscaruntimeTestVolume", volume.getAttributeAsString("provider_resource_name"));
            Assert.assertEquals("Volume_1_1", volume.getAttributeAsString("tosca_id"));
            Assert.assertEquals("Volume", volume.getAttributeAsString("tosca_name"));

            Map<String, String> outputs = compute.execute("testWriteToVolume", "testWriteToVolume.sh", ImmutableMap.<String, Object>builder().put("FILE_CONTENT", "A great content").build(), new HashMap<>());
            Assert.assertEquals("A great content", outputs.get("WRITTEN"));
        } finally {
            testDeployment.run(testDeployment.uninstall()).waitForCompletion(15, TimeUnit.MINUTES);
        }
    }
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;

namespace Weather
{
    public class StartUp
    {
        public static void Main()
        {
            string pattern = @"(?<city>[A-Z][A-Z])(?<temp>[0-9]+\.[0-9]+)(?<type>[A-Za-z]+)(?=\|)";

            Dictionary<string, Tuple<double, string>> dict = new Dictionary<string, Tuple<double, string>>();

            string input = Console.ReadLine();
            while (input != "end")
            {
                Match m = Regex.Match(input, pattern);

                if (m.Success)
                {
                    string city = m.Groups["city"].Value;
                    double temp = double.Parse(m.Groups["temp"].Value);
                    string type = m.Groups["type"].Value;
                    var tup = Tuple.Create(temp, type);
                    if (!dict.ContainsKey(city))
                    {
                        dict.Add(city, tup);
                    }
                    dict[city] = tup;
                }

                input = Console.ReadLine();
            }

            foreach (var city in dict.OrderBy(x => x.Value.Item1))
            {
                Console.WriteLine($"{city.Key} => {city.Value.Item1:f2} => {city.Value.Item2}");
            }
        }
    }
}


text:
class AddEnableTestToAssignment < ActiveRecord::Migration[4.2]
  def self.up
    add_column :assignments, :enable_test, :boolean, :default => false, :null =>false
  end

  def self.down
    remove_column :assignments, :enable_test
  end
end


text:
package cloud

import (
	"context"
	"encoding/json"
	"fmt"
	"time"

	"github.com/golang/glog"

	"k8s.io/api/core/v1"

	"k8s.io/apimachinery/pkg/api/errors"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/apimachinery/pkg/runtime"
	"k8s.io/apimachinery/pkg/types"
	utilruntime "k8s.io/apimachinery/pkg/util/runtime"
	"k8s.io/apimachinery/pkg/util/strategicpatch"
	"k8s.io/apimachinery/pkg/util/wait"
	"k8s.io/apimachinery/pkg/watch"
	utilfeature "k8s.io/apiserver/pkg/util/feature"
	v1helper "k8s.io/kubernetes/pkg/apis/core/v1/helper"
	"k8s.io/kubernetes/pkg/features"
	kubeletapis "k8s.io/kubernetes/pkg/kubelet/apis"
	volumeutil "k8s.io/kubernetes/pkg/volume/util"

	"k8s.io/client-go/kubernetes"
	corelisters "k8s.io/client-go/listers/core/v1"
	"k8s.io/client-go/tools/cache"
	"k8s.io/client-go/util/workqueue"

	"k8s.io/kubernetes/pkg/cloudprovider"
	"k8s.io/kubernetes/pkg/controller"
)

const initializerName = "pvlabel.kubernetes.io"

// PersistentVolumeLabelController handles adding labels to persistent volumes when they are created
type PersistentVolumeLabelController struct {
	cloud         cloudprovider.Interface
	kubeClient    kubernetes.Interface
	pvlController cache.Controller
	pvlIndexer    cache.Indexer
	volumeLister  corelisters.PersistentVolumeLister

	syncHandler func(key string) error

	// queue is where incoming work is placed to de-dup and to allow "easy" rate limited requeues on errors
	queue workqueue.RateLimitingInterface
}

// NewPersistentVolumeLabelController creates a PersistentVolumeLabelController object
func NewPersistentVolumeLabelController(
	kubeClient kubernetes.Interface,
	cloud cloudprovider.Interface) *PersistentVolumeLabelController {

	pvlc := &PersistentVolumeLabelController{
		cloud:      cloud,
		kubeClient: kubeClient,
		queue:      workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), "pvLabels"),
	}
	pvlc.syncHandler = pvlc.addLabelsAndAffinity
	pvlc.pvlIndexer, pvlc.pvlController = cache.NewIndexerInformer(
		&cache.ListWatch{
			ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {
				options.IncludeUninitialized = true
				return kubeClient.CoreV1().PersistentVolumes().List(options)
			},
			WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
				options.IncludeUninitialized = true
				return kubeClient.CoreV1().PersistentVolumes().Watch(options)
			},
		},
		&v1.PersistentVolume{},
		0,
		cache.ResourceEventHandlerFuncs{
			AddFunc: func(obj interface{}) {
				key, err := cache.MetaNamespaceKeyFunc(obj)
				if err == nil {
					pvlc.queue.Add(key)
				}
			},
		},
		cache.Indexers{},
	)
	pvlc.volumeLister = corelisters.NewPersistentVolumeLister(pvlc.pvlIndexer)

	return pvlc
}

// Run starts a controller that adds labels to persistent volumes
func (pvlc *PersistentVolumeLabelController) Run(threadiness int, stopCh <-chan struct{}) {
	defer utilruntime.HandleCrash()
	defer pvlc.queue.ShutDown()

	glog.Infof("Starting PersistentVolumeLabelController")
	defer glog.Infof("Shutting down PersistentVolumeLabelController")

	go pvlc.pvlController.Run(stopCh)

	if !controller.WaitForCacheSync("persistent volume label", stopCh, pvlc.pvlController.HasSynced) {
		return
	}

	// start up your worker threads based on threadiness.  Some controllers have multiple kinds of workers
	for i := 0; i < threadiness; i++ {
		// runWorker will loop until "something bad" happens.  The .Until will then rekick the worker
		// after one second
		go wait.Until(pvlc.runWorker, time.Second, stopCh)
	}

	// wait until we're told to stop
	<-stopCh
}

func (pvlc *PersistentVolumeLabelController) runWorker() {
	// hot loop until we're told to stop.  processNextWorkItem will automatically wait until there's work
	// available, so we don't worry about secondary waits
	for pvlc.processNextWorkItem() {
	}
}

// processNextWorkItem deals with one key off the queue.  It returns false when it's time to quit.
func (pvlc *PersistentVolumeLabelController) processNextWorkItem() bool {
	// pull the next work item from queue.  It should be a key we use to lookup something in a cache
	keyObj, quit := pvlc.queue.Get()
	if quit {
		return false
	}
	// you always have to indicate to the queue that you've completed a piece of work
	defer pvlc.queue.Done(keyObj)

	key := keyObj.(string)
	// do your work on the key.  This method will contains your "do stuff" logic
	err := pvlc.syncHandler(key)
	if err == nil {
		// if you had no error, tell the queue to stop tracking history for your key.  This will
		// reset things like failure counts for per-item rate limiting
		pvlc.queue.Forget(key)
		return true
	}

	// there was a failure so be sure to report it.  This method allows for pluggable error handling
	// which can be used for things like cluster-monitoring
	utilruntime.HandleError(fmt.Errorf("%v failed with : %v", key, err))

	// since we failed, we should requeue the item to work on later.  This method will add a backoff
	// to avoid hotlooping on particular items (they're probably still not going to work right away)
	// and overall controller protection (everything I've done is broken, this controller needs to
	// calm down or it can starve other useful work) cases.
	pvlc.queue.AddRateLimited(key)

	return true
}

// AddLabels adds appropriate labels to persistent volumes and sets the
// volume as available if successful.
func (pvlc *PersistentVolumeLabelController) addLabelsAndAffinity(key string) error {
	_, name, err := cache.SplitMetaNamespaceKey(key)
	if err != nil {
		return fmt.Errorf("error getting name of volume %q to get volume from informer: %v", key, err)
	}
	volume, err := pvlc.volumeLister.Get(name)
	if errors.IsNotFound(err) {
		return nil
	} else if err != nil {
		return fmt.Errorf("error getting volume %s from informer: %v", name, err)
	}

	return pvlc.addLabelsAndAffinityToVolume(volume)
}

func (pvlc *PersistentVolumeLabelController) addLabelsAndAffinityToVolume(vol *v1.PersistentVolume) error {
	var volumeLabels map[string]string
	// Only add labels if the next pending initializer.
	if needsInitialization(vol.Initializers, initializerName) {
		if labeler, ok := (pvlc.cloud).(cloudprovider.PVLabeler); ok {
			labels, err := labeler.GetLabelsForVolume(context.TODO(), vol)
			if err != nil {
				return fmt.Errorf("error querying volume %v: %v", vol.Spec, err)
			}
			volumeLabels = labels
		} else {
			glog.V(4).Info("cloud provider does not support PVLabeler")
		}
		return pvlc.updateVolume(vol, volumeLabels)
	}
	return nil
}

func (pvlc *PersistentVolumeLabelController) createPatch(vol *v1.PersistentVolume, volLabels map[string]string) ([]byte, error) {
	volName := vol.Name
	newVolume := vol.DeepCopyObject().(*v1.PersistentVolume)
	populateAffinity := utilfeature.DefaultFeatureGate.Enabled(features.VolumeScheduling) && len(volLabels) != 0

	if newVolume.Labels == nil {
		newVolume.Labels = make(map[string]string)
	}

	requirements := make([]v1.NodeSelectorRequirement, 0)
	for k, v := range volLabels {
		newVolume.Labels[k] = v
		// Set NodeSelectorRequirements based on the labels
		if populateAffinity {
			var values []string
			if k == kubeletapis.LabelZoneFailureDomain {
				zones, err := volumeutil.LabelZonesToSet(v)
				if err != nil {
					return nil, fmt.Errorf("failed to convert label string for Zone: %s to a Set", v)
				}
				values = zones.List()
			} else {
				values = []string{v}
			}
			requirements = append(requirements, v1.NodeSelectorRequirement{Key: k, Operator: v1.NodeSelectorOpIn, Values: values})
		}
	}
	if populateAffinity {
		if newVolume.Spec.NodeAffinity == nil {
			newVolume.Spec.NodeAffinity = new(v1.VolumeNodeAffinity)
		}
		if newVolume.Spec.NodeAffinity.Required == nil {
			newVolume.Spec.NodeAffinity.Required = new(v1.NodeSelector)
		}
		if len(newVolume.Spec.NodeAffinity.Required.NodeSelectorTerms) == 0 {
			// Need atleast one term pre-allocated whose MatchExpressions can be appended to
			newVolume.Spec.NodeAffinity.Required.NodeSelectorTerms = make([]v1.NodeSelectorTerm, 1)
		}
		// Populate NodeAffinity with requirements if there are no conflicting keys found
		if v1helper.NodeSelectorRequirementKeysExistInNodeSelectorTerms(requirements, newVolume.Spec.NodeAffinity.Required.NodeSelectorTerms) {
			glog.V(4).Infof("NodeSelectorRequirements for cloud labels %v conflict with existing NodeAffinity %v. Skipping addition of NodeSelectorRequirements for cloud labels.",
				requirements, newVolume.Spec.NodeAffinity)
		} else {
			for _, req := range requirements {
				for i := range newVolume.Spec.NodeAffinity.Required.NodeSelectorTerms {
					newVolume.Spec.NodeAffinity.Required.NodeSelectorTerms[i].MatchExpressions = append(newVolume.Spec.NodeAffinity.Required.NodeSelectorTerms[i].MatchExpressions, req)
				}
			}
		}
	}
	newVolume.Initializers = removeInitializer(newVolume.Initializers, initializerName)
	glog.V(4).Infof("removed initializer on PersistentVolume %s", newVolume.Name)

	oldData, err := json.Marshal(vol)
	if err != nil {
		return nil, fmt.Errorf("failed to marshal old persistentvolume %#v for persistentvolume %q: %v", vol, volName, err)
	}

	newData, err := json.Marshal(newVolume)
	if err != nil {
		return nil, fmt.Errorf("failed to marshal new persistentvolume %#v for persistentvolume %q: %v", newVolume, volName, err)
	}

	patch, err := strategicpatch.CreateTwoWayMergePatch(oldData, newData, v1.PersistentVolume{})
	if err != nil {
		return nil, fmt.Errorf("failed to create patch for persistentvolume %q: %v", volName, err)
	}
	return patch, nil
}

func (pvlc *PersistentVolumeLabelController) updateVolume(vol *v1.PersistentVolume, volLabels map[string]string) error {
	volName := vol.Name
	glog.V(4).Infof("updating PersistentVolume %s", volName)
	patchBytes, err := pvlc.createPatch(vol, volLabels)
	if err != nil {
		return err
	}

	_, err = pvlc.kubeClient.CoreV1().PersistentVolumes().Patch(string(volName), types.StrategicMergePatchType, patchBytes)
	if err != nil {
		return fmt.Errorf("failed to update PersistentVolume %s: %v", volName, err)
	}
	glog.V(4).Infof("updated PersistentVolume %s", volName)

	return nil
}

func removeInitializer(initializers *metav1.Initializers, name string) *metav1.Initializers {
	if initializers == nil {
		return nil
	}

	var updated []metav1.Initializer
	for _, pending := range initializers.Pending {
		if pending.Name != name {
			updated = append(updated, pending)
		}
	}
	if len(updated) == len(initializers.Pending) {
		return initializers
	}
	if len(updated) == 0 {
		return nil
	}

	return &metav1.Initializers{Pending: updated}
}

// needsInitialization checks whether or not the PVL is the next pending initializer.
func needsInitialization(initializers *metav1.Initializers, name string) bool {
	if initializers == nil {
		return false
	}

	if len(initializers.Pending) == 0 {
		return false
	}

	// There is at least one initializer still pending so check to
	// see if the PVL is the next in line.
	return initializers.Pending[0].Name == name
}


text:
package GameUI;

import java.util.List;
import java.util.Scanner;

import aurelienribon.slidinglayout.SLAnimator;
import GameLogic.*;

import jp.vdmtools.VDM.CGException;

public class Main {
	public static void main(String[] args) {
		System.out.println("Starting game!");
		SLAnimator.start();
		new UIGame();

//		Main self = new Main();
//		Scanner in = new Scanner(System.in);
//		int initialX, initialY, finalX, finalY;
//
//		try {
//			Stratego stratego = new Stratego();
//			stratego.placeInitialPieces();
//
//			while(true) {
//				System.out.println("Current player: "+stratego.getCurrentPlayer().getName());
//				self.printBoard(stratego.getBoard());
//
//				System.out.println("Enter move coordinates <initialX> <initialY> <finalX> <finalY>");
//				initialX = in.nextInt();
//				initialY = in.nextInt();
//				finalX = in.nextInt();
//				finalY = in.nextInt();
//
//				System.out.printf("Making move from (%d %d) to (%d %d)\n", initialX, initialY, finalX, finalY);
//				Number moveResult = stratego.makeMove(new Coord(initialX, initialY), new Coord(finalX, finalY));
//
//				if(moveResult.intValue() == 0) {
//					if(stratego.isGameOver()) {
//						break;
//					} else {
//						stratego.updateTurn();
//					}
//				} else {
//					System.out.printf("Invalid Move: %d\n", moveResult.intValue());
//				}
//			}
//		} catch (CGException e) {
//			e.printStackTrace();
//		}
	}

	private void printBoard(Board b) throws CGException {
		List gameBoard = b.getBoard();

		System.out.printf("    %3d%3d%3d%3d%3d%3d%3d%3d%3d%3d\n", 1,2,3,4,5,6,7,8,9,10);
		System.out.println("------------------------------------");

		for(int rowIndex = 0; rowIndex < gameBoard.size(); rowIndex++) {
			List row = ((List)gameBoard.get(rowIndex));
			System.out.printf("%2d |", rowIndex+1);

			for(int i = 0; i < row.size(); i++) {
				Object piece = row.get(i);
				if(piece != null) {
					System.out.printf("%3d", ((Piece)piece).getRank());
				} else {
					System.out.printf("%3s", "X");
				}
			}
			System.out.println("");
		}
	}
}


text:
package org.h2.bnf.context;

import org.h2.util.New;

import java.sql.DatabaseMetaData;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;

/**
 * Contains meta data information about a procedure.
 * This class is used by the H2 Console.
 */
public class DbProcedure {

    private final DbSchema schema;
    private final String name;
    private final String quotedName;
    private boolean returnsResult;
    private DbColumn[] parameters;

    public DbProcedure(DbSchema schema, ResultSet rs) throws SQLException {
        this.schema = schema;
        name = rs.getString("PROCEDURE_NAME");
        returnsResult = rs.getShort("PROCEDURE_TYPE") ==
                DatabaseMetaData.procedureReturnsResult;
        quotedName = schema.getContents().quoteIdentifier(name);
    }

    /**
     * @return The schema this table belongs to.
     */
    public DbSchema getSchema() {
        return schema;
    }

    /**
     * @return The column list.
     */
    public DbColumn[] getParameters() {
        return parameters;
    }

    /**
     * @return The table name.
     */
    public String getName() {
        return name;
    }

    /**
     * @return The quoted table name.
     */
    public String getQuotedName() {
        return quotedName;
    }

    /**
     * @return True if this function return a value
     */
    public boolean isReturnsResult() {
        return returnsResult;
    }

    /**
     * Read the column for this table from the database meta data.
     *
     * @param meta the database meta data
     */
    void readParameters(DatabaseMetaData meta) throws SQLException {
        ResultSet rs = meta.getProcedureColumns(null, schema.name, name, null);
        ArrayList<DbColumn> list = New.arrayList();
        while (rs.next()) {
            DbColumn column = DbColumn.getProcedureColumn(schema.getContents(), rs);
            if (column.getPosition() > 0) {
                // Not the return type
                list.add(column);
            }
        }
        rs.close();
        parameters = new DbColumn[list.size()];
        // Store the parameter in the good position [1-n]
        for (int i = 0; i < parameters.length; i++) {
            DbColumn column = list.get(i);
            if (column.getPosition() > 0
                    && column.getPosition() <= parameters.length) {
                parameters[column.getPosition() - 1] = column;
            }
        }
    }

}


text:
module.exports.basename = require('./basename');
module.exports.dirname = require('./dirname');
module.exports.fclose = require('./fclose');
module.exports.feof = require('./feof');
module.exports.fgetc = require('./fgetc');
module.exports.fgetcsv = require('./fgetcsv');
module.exports.fgets = require('./fgets');
module.exports.fgetss = require('./fgetss');
module.exports.file = require('./file');
module.exports.file_exists = require('./file_exists');
module.exports.file_get_contents = require('./file_get_contents');
module.exports.filemtime = require('./filemtime');
module.exports.filesize = require('./filesize');
module.exports.fopen = require('./fopen');
module.exports.fpassthru = require('./fpassthru');
module.exports.fread = require('./fread');
module.exports.fscanf = require('./fscanf');
module.exports.fseek = require('./fseek');
module.exports.ftell = require('./ftell');
module.exports.pathinfo = require('./pathinfo');
module.exports.pclose = require('./pclose');
module.exports.popen = require('./popen');
module.exports.readfile = require('./readfile');
module.exports.realpath = require('./realpath');
module.exports.rewind = require('./rewind');


text:
from kubernetes_py.models.unversioned.BaseModel import BaseModel
from kubernetes_py.models.v1.EventSource import EventSource
from kubernetes_py.models.v1.ObjectReference import ObjectReference
from kubernetes_py.utils import is_valid_date_time, is_valid_string

class Event(BaseModel):
    """
    https://kubernetes.io/docs/api-reference/v1.5/#event-v1
    """

    def __init__(self, model=None):
        super(Event, self).__init__(model=model)

        self._count = None
        self._first_timestamp = None
        self._involved_object = ObjectReference()
        self._last_timestamp = None
        self._message = None
        self._reason = None
        self._source = EventSource()
        self._type = None

        if model is not None:
            self._build_with_model(model)

    def _build_with_model(self, model=None):
        super(Event, self).build_with_model(model)

        if "count" in model:
            self.count = model["count"]
        if "firstTimestamp" in model:
            self.first_timestamp = model["firstTimestamp"]
        if "involvedObject" in model:
            self.involved_object = ObjectReference(model["involvedObject"])
        if "lastTimestamp" in model:
            self.last_timestamp = model["lastTimestamp"]
        if "message" in model:
            self.message = model["message"]
        if "reason" in model:
            self.reason = model["reason"]
        if "source" in model:
            self.source = EventSource(model["source"])
        if "type" in model:
            self.type = model["type"]

    # ------------------------------------------------------------------------------------- count

    @property
    def count(self):
        return self._count

    @count.setter
    def count(self, c=None):
        if not isinstance(c, int):
            raise SyntaxError("Event: count: [ {} ] is invalid.".format(c))
        self._count = c

    # ------------------------------------------------------------------------------------- firstTimestamp

    @property
    def first_timestamp(self):
        return self._first_timestamp

    @first_timestamp.setter
    def first_timestamp(self, t=None):
        if not is_valid_date_time(t):
            raise SyntaxError("Event: first_timestamp: [ {} ] is invalid.".format(t))
        self._first_timestamp = t

    # ------------------------------------------------------------------------------------- involvedObject

    @property
    def involved_object(self):
        return self._involved_object

    @involved_object.setter
    def involved_object(self, o=None):
        if not isinstance(o, ObjectReference):
            raise SyntaxError("Event: involved_object: [ {} ] is invalid.".format(o))
        self._involved_object = o

    # ------------------------------------------------------------------------------------- lastTimestamp

    @property
    def last_timestamp(self):
        return self._last_timestamp

    @last_timestamp.setter
    def last_timestamp(self, t=None):
        if not is_valid_date_time(t):
            raise SyntaxError("Event: last_timestamp: [ {} ] is invalid.".format(t))
        self._last_timestamp = t

    # ------------------------------------------------------------------------------------- message

    @property
    def message(self):
        return self._message

    @message.setter
    def message(self, m=None):
        if not is_valid_string(m):
            raise SyntaxError("Event: message: [ {} ] is invalid.".format(m))
        self._message = m

    # ------------------------------------------------------------------------------------- reason

    @property
    def reason(self):
        return self._reason

    @reason.setter
    def reason(self, r=None):
        if not is_valid_string(r):
            raise SyntaxError("Event: reason: [ {} ] is invalid.".format(r))
        self._reason = r

    # ------------------------------------------------------------------------------------- source

    @property
    def source(self):
        return self._source

    @source.setter
    def source(self, s=None):
        if not isinstance(s, EventSource):
            raise SyntaxError("Event: source: [ {} ] is invalid.".format(s))
        self._source = s

    # ------------------------------------------------------------------------------------- type

    @property
    def type(self):
        return self._type

    @type.setter
    def type(self, t=None):
        if not is_valid_string(t):
            raise SyntaxError("Event: type: [ {} ] is invalid.".format(t))
        self._type = t

    # ------------------------------------------------------------------------------------- serialize

    def serialize(self):
        data = super(Event, self).serialize()

        if self.count is not None:
            data["count"] = self.count
        if self.first_timestamp is not None:
            data["firstTimestamp"] = self.first_timestamp
        if self.involved_object is not None:
            data["involvedObject"] = self.involved_object.serialize()
        if self.last_timestamp is not None:
            data["lastTimestamp"] = self.last_timestamp
        if self.message is not None:
            data["message"] = self.message
        if self.reason is not None:
            data["reason"] = self.reason
        if self.source is not None:
            data["source"] = self.source.serialize()
        if self.type is not None:
            data["type"] = self.type
        return data


text:
<?php

namespace Daiquiri\AdminBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Circuit
 *
 * @ORM\Table(name="circuit")
 * @ORM\Entity(repositoryClass="Daiquiri\AdminBundle\Entity\CircuitRepository")
 */
class Circuit extends Product {

    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var integer
     *
     * @ORM\Column(name="days", type="integer", nullable=true)
     */
    private $days;

    /**
     * @var integer
     *
     * @ORM\Column(name="nights", type="integer", nullable=true)
     */
    private $nights;

    /**
     * @ORM\ManyToMany(targetEntity="Daiquiri\AdminBundle\Entity\CircuitAvailability", inversedBy="circuits", cascade={"all"},)
     * @ORM\JoinTable(name="circuit_circuitavailabilitys")
     */
    private $circuit_availabilitys;

    /**
     * @var \Doctrine\Common\Collections\Collection
     *
     * @ORM\OneToMany(targetEntity="Daiquiri\AdminBundle\Entity\CircuitDay", mappedBy="circuit", cascade={"persist", "remove", "merge"}, orphanRemoval=true)
     */
    private $circuit_days;

    /**
     * @ORM\OneToMany(targetEntity="Daiquiri\AdminBundle\Entity\CircuitSeason", mappedBy="circuit", cascade={"persist", "remove", "merge"}, orphanRemoval=true)
     */
    private $circuit_seasons;

    /**
     * @ORM\ManyToOne(targetEntity="Daiquiri\AdminBundle\Entity\Polo", inversedBy="circuits")
     * @ORM\JoinColumn(name="polofromid", referencedColumnName="id")
     */
    private $polofrom;

    /**
     * @ORM\OneToMany(targetEntity="CampaignCircuit", mappedBy="circuit")
     */
    private $campaigns;

    /**
     * @var boolean
     *
     * @ORM\Column(name="allow_kid", type="boolean",options={"default"=false})
     */
    private $allowkid;

    /**
     * Set circuitDays
     *
     * @param \Doctrine\Common\Collections\Collection $circuitDays
     */
    public function setCircuitDays(\Doctrine\Common\Collections\Collection $circuitDays = null) {
        $new = new \Doctrine\Common\Collections\ArrayCollection();
        foreach ($circuitDays as $c) {
            $this->addCircuitDay($c);
            $new->add($c);
        }
        $this->circuit_days = $new;
        return $this;
    }

    /**
     * Add circuitDay
     *
     * @param \Daiquiri\AdminBundle\Entity\CircuitDay $circuitDay
     *
     * @return Circuit
     */
    public function addCircuitDay(\Daiquiri\AdminBundle\Entity\CircuitDay $circuitDay) {
        $circuitDay->setCircuit($this);
        $this->circuit_days->add($circuitDay);
        return $this->sortCircuitsDays();
    }

    public function sortCircuitsDays() {

//        for ($i = 0; $i < $this->circuit_days->count(); $i++) {
//            for ($j = 0; $j < $this->circuit_days->count(); $j++) {
//
//                if ($this->circuit_days->get($i)->getDay() > $this->circuit_days->get($j)->getDay()) {
//                    $aux = $this->circuit_days->get($j);
//                    $this->circuit_days->set($j, $this->circuit_days->get($i));
//                    $this->circuit_days->set($i, $aux);
//                }
//            }
//        }
//        return $this;
    }

    /**
     * Remove circuitDay
     *
     * @param \Daiquiri\AdminBundle\Entity\CircuitDay $circuitDay
     */
    public function removeCircuitDay(\Daiquiri\AdminBundle\Entity\CircuitDay $circuitDay) {
        $circuitDay->setCircuit(null);
        $this->circuit_days->removeElement($circuitDay);
        $this->sortCircuitsDays();
    }

    /**
     * Get circuitDays
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getCircuitDays() {
        return $this->circuit_days;
    }

    /**
     * Set days
     *
     * @param integer $days
     *
     * @return Circuit
     */
    public function setDays($days) {
        $this->days = $days;

        return $this;
    }

    /**
     * Get days
     *
     * @return integer
     */
    public function getDays() {
        return $this->days;
    }

    /**
     * Add circuitAvailability
     *
     * @param \Daiquiri\AdminBundle\Entity\CircuitAvailability $circuitAvailability
     *
     * @return Circuit
     */
    public function addCircuitAvailability(\Daiquiri\AdminBundle\Entity\CircuitAvailability $circuitAvailability) {
        $circuitAvailability->addCircuit($this);
        $this->circuit_availabilitys[] = $circuitAvailability;

        return $this;
    }

    /**
     * Remove circuitAvailability
     *
     * @param \Daiquiri\AdminBundle\Entity\CircuitAvailability $circuitAvailability
     */
    public function removeCircuitAvailability(\Daiquiri\AdminBundle\Entity\CircuitAvailability $circuitAvailability) {
        $circuitAvailability->removeCircuit($this);
        $this->circuit_availabilitys->removeElement($circuitAvailability);
    }

    /**
     * Get circuitAvailabilitys
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getCircuitAvailabilitys() {
        return $this->circuit_availabilitys;
    }

    public function __construct() {
        parent::__construct();
        $this->circuit_availabilitys = new \Doctrine\Common\Collections\ArrayCollection();
        $this->circuit_days = new \Doctrine\Common\Collections\ArrayCollection();
        $this->circuit_seasons = new \Doctrine\Common\Collections\ArrayCollection();
        $this->campaigns = new \Doctrine\Common\Collections\ArrayCollection();
    }

    /**
     * Add circuitSeason
     *
     * @param \Daiquiri\AdminBundle\Entity\CircuitSeason $circuitSeason
     *
     * @return Circuit
     */
    public function addCircuitSeason(\Daiquiri\AdminBundle\Entity\CircuitSeason $circuitSeason) {
        $circuitSeason->setCircuit($this);
        $this->circuit_seasons->add($circuitSeason);
        return $this;
    }

    /**
     * Remove circuitSeason
     *
     * @param \Daiquiri\AdminBundle\Entity\CircuitSeason $circuitSeason
     */
    public function removeCircuitSeason(\Daiquiri\AdminBundle\Entity\CircuitSeason $circuitSeason) {
        $circuitSeason->setCircuit(null);
        $this->circuit_seasons->removeElement($circuitSeason);
    }

    public function setCircuitSeasons(\Doctrine\Common\Collections\Collection $circuitSeason) {
        $new = new \Doctrine\Common\Collections\ArrayCollection();
        foreach ($circuitSeason as $c) {
            $this->addCircuitSeason($c);
            $new->add($c);
        }
        $this->circuit_seasons = $new;
        return $this;
    }

    /**
     * Get circuitSeasons
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getCircuitSeasons() {
        return $this->circuit_seasons;
    }

    public function constainPlace(Place $place) {
        if (count($this->circuit_days) > 0) {
            foreach ($this->circuit_days as $cd) {
                if ($cd->constainPlace($place)) {
                    return true;
                }
            }
            return FALSE;
        }
        return FALSE;
    }

    public function getCampaignForDate(\DateTime $date, Market $market) {
        foreach ($this->campaigns as $c) {
            if ($c->getStartdate() <= $date && $c->getEnddate() >= $date && $c->getMarkets()->contains($market)) {
                return $c;
            }
        }
        return null;
    }

    public $current_offert;

    public function getTotalPrice(\DateTime $date, $adults, $kids, Market $market, $ocupation = 1) {
        $increment = 0;
        if ($this->getProductIncrement()) {
            $increment = $this->getProductIncrement()->getIncrement();
        }
        $c = $this->getCampaignForDate($date, $market);
        if (count($this->circuit_seasons) > 0) {
            foreach ($this->circuit_seasons as $s) {
                if ($s->constainDate($date)) {
                    if ($c) {

                        $this->current_offert = $c;
                        if ($ocupation == 1) {
                            //dump($c->getAdultdiscount());die;
                            return (($adults * ($s->getAdultPrice() - $c->getAdultdiscount())) + ($kids * ($s->getKidPrice() - $c->getKiddiscount()))) * (1 + $increment);
                        } else {
                            return (($adults * ($s->getAdultPriceDoble() - $c->getAdultdiscount())) + ($kids * ($s->getKidPriceDoble() - $c->getKiddiscount()))) * (1 + $increment);
                        }
                    }
                    if ($ocupation == 1) {
                        return (($adults * $s->getAdultPrice()) + ($kids * $s->getKidPrice())) * (1 + $increment);
                    } else {
                        return (($adults * $s->getAdultPriceDoble()) + ($kids * $s->getKidPriceDoble())) * (1 + $increment);
                    }
                    break;
                }
            }
        }
        return null;
    }

    public function getCurrentPrice() {
        if (count($this->circuit_seasons) > 0) {
            foreach ($this->circuit_seasons as $s) {
                if ($s->constainDate(new \DateTime('now'))) {
                    return ($s->getAdultPrice());
                }
            }
        }
        return null;
    }

    public function getPrice(\Daiquiri\ReservationBundle\Entity\CircuitItem $item, Market $m) {
        $price = $this->getTotalPrice($item->getStartdate(), $item->getAdults(), $item->getKids(), $m, $item->getOcupation());
        return $price;
    }

    public function isDepartureDate(\DateTime $date) {

        if (!$date || !Validate::isMoreThanMinDate($date)) {
            return false;
        }
        foreach ($this->circuit_availabilitys as $ca) {
            if ($ca->getDate()->format('M j, Y') == $date->format('M j, Y')) {
                return true;
            }
        }
        return false;
    }

    public function constainPlaces($places) {

        if ($places->count() == 0) {
            return false;
        }
        foreach ($places as $p) {
            if (!$this->constainPlace($p)) {
                return false;
            }
        }
        return true;
    }

    public function containPlace($place = null) {
        if (!$place || $this->circuit_days->count() == 0) {
            return false;
        }
        foreach ($this->circuit_days as $d) {
            if ($d->constainPlace($place)) {
                return true;
            }
        }
        return false;
    }

    /**
     * Set nights
     *
     * @param integer $nights
     *
     * @return Circuit
     */
    public function setNights($nights) {
        $this->nights = $nights;

        return $this;
    }

    /**
     * Get nights
     *
     * @return integer
     */
    public function getNights() {
        return $this->nights;
    }

    public function isDepartureInDateRange(\DateTime $startdate, \DateTime $enddate) {
        if ($startdate && $enddate) {
            if (Validate::startAndEndDate($startdate, $enddate)) {
                foreach ($this->circuit_availabilitys as $ca) {
                    if (Validate::inRangeDate($ca->getDate(), $startdate, $enddate)) {
                        return TRUE;
                    }
                }
                return false;
            }
            return false;
        }
        return false;
    }

    public function constainPolofrom($polo) {
        return $this->polofrom->getTitle() == $polo;
    }

    public function deleteDateDeparture($date) {
        foreach ($this->circuit_availabilitys as $ca) {
            if ($ca->getDate()->format('M j Y') == $date->format(' M j Y')) {
                $this->removeCircuitAvailability($ca);
            }
        }
    }

    /**
     * Add campaign
     *
     * @param \Daiquiri\AdminBundle\Entity\CampaignCircuit $campaign
     *
     * @return Circuit
     */
    public function addCampaign(\Daiquiri\AdminBundle\Entity\CampaignCircuit $campaign) {
        $this->campaigns[] = $campaign;

        return $this;
    }

    /**
     * Remove campaign
     *
     * @param \Daiquiri\AdminBundle\Entity\CampaignCircuit $campaign
     */
    public function removeCampaign(\Daiquiri\AdminBundle\Entity\CampaignCircuit $campaign) {
        $this->campaigns->removeElement($campaign);
    }

    /**
     * Get campaigns
     *
     * @return \Doctrine\Common\Collections\Collection
     */
    public function getCampaigns() {
        return $this->campaigns;
    }

    public function getFromprice() {
        $price = 70000000;
        foreach ($this->circuit_seasons as $s) {
            if ($price > $s->getAdultPrice()) {
                $price = $s->getAdultPrice();
            }
        }
        return $price;
    }

    public function hasGoogleLocation() {
        foreach ($this->circuit_days as $d) {
            foreach ($d->getPlaces() as $p) {
                if (!$p->hasGoogleLocation()) {
                    return false;
                }
            }
        }
        return TRUE;
    }

    /**
     * Set polofrom
     *
     * @param \Daiquiri\AdminBundle\Entity\Polo $polofrom
     *
     * @return Circuit
     */
    public function setPolofrom(\Daiquiri\AdminBundle\Entity\Polo $polofrom = null) {
        $this->polofrom = $polofrom;

        return $this;
    }

    /**
     * Get polofrom
     *
     * @return \Daiquiri\AdminBundle\Entity\Polo
     */
    public function getPolofrom() {
        return $this->polofrom;
    }

    /**
     * Set allowkid
     *
     * @param boolean $allowkid
     *
     * @return CircuitSeason
     */
    public function setAllowkid($allowkid) {
        $this->allowkid = $allowkid;

        return $this;
    }

    /**
     * Get allowkid
     *
     * @return
     *
     * \booblean
     */
    public function getAllowkid() {
        return $this->allowkid;
    }

}


text:
class Clothes{
public:
	Clothes();
	virtual ~Clothes();
};
#endif


text:
@interface HomeTableUIViewCell : UITableViewCell

@property (weak, nonatomic) IBOutlet UILabel *cellTitle;
@property (weak, nonatomic) IBOutlet UILabel *cellContent;
@property (weak, nonatomic) IBOutlet UILabel *cellDate;

@end


text:
package feri.mazgon.auction.core;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.googlecode.genericdao.search.Search;

import feri.mazgon.auction.core.domain.Auction;
import feri.mazgon.auction.core.domain.AuctionCategory;
import feri.mazgon.auction.core.domain.Bid;
import feri.mazgon.auction.core.domain.User;
import feri.mazgon.auction.core.repository.*;

@Service
@Transactional
public class AuctionService {
	@Autowired
	private AuctionCategoryRepository auctionCategoryRepository;
	@Autowired
	private AuctionRepository auctionRepository;
	@Autowired
	private UserRepository userRepository;

	public Auction getAuction(long id) {
		return auctionRepository.find(id);
	}

	public List<Auction> getAuctions(AuctionCategory auctionCategory) {
		Search search = new Search(Auction.class);

		if (auctionCategory != null)
			search.addFilterEqual("auctionCategory.id", auctionCategory.getId());

		search.addFilterGreaterThan("endTime", System.currentTimeMillis());
		search.addSort("endTime", false);

		return auctionRepository.search(search);
	}

	public List<AuctionCategory> getAuctionCategories() {
		return auctionCategoryRepository.findAll();
	}

	public AuctionCategory getAuctionCategory(long id) {
		return auctionCategoryRepository.find(id);
	}

	public void addAuction(Auction a) {
		a.saveAndStart();
	}

	public User getUser(String email) {
		Search search = new Search(User.class);

		search.addFilterEqual("email", email);

		return userRepository.searchUnique(search);
	}

	public void endAuction(Auction a) {
		a.end();
	}

	public synchronized Bid bid(User bidder, Auction auction, long amount) {
		Bid bid = new Bid(amount, bidder);
		auction.bid(bid);
		return bid;
	}
}


text:
package org.kie.internal.builder;

/**
 * <p>
 * Specifies the type of decision table resource.
 * Currently either XLS or CSV.
 * </p>
 */
public enum DecisionTableInputType {
    XLS, XLSX, CSV;
}