code_text
stringlengths
604
999k
repo_name
stringlengths
4
100
file_path
stringlengths
4
873
language
stringclasses
23 values
license
stringclasses
15 values
size
int32
1.02k
999k
// Package conf defines config structs with struct tags as expected // by https://github.com/kelseyhightower/envconfig package conf var ( // DB is current database config DB DBSpec // Cache is current cache config Cache CacheSpec // API is the current API config API APISpec // Loader is the current loader config Loader LoaderSpec // Partner is the current partner config Partner PartnerSpec ) // CacheSpec is our redis config, used by busprecache and busapi type CacheSpec struct { // RedisAddr is the "host:port" we use for connecting to redis // Default: "localhost:6379" // Environment variable: $BUS_REDIS_ADDR RedisAddr string `envconfig:"redis_addr" default:"localhost:6379"` // RedisTTL is the number of seconds we save things in Redis // Default: "90" // Environment variable: $BUS_REDIS_TTL RedisTTL int `envconfig:"redis_ttl" default:"90"` } // PartnerSpec includes config values specific to certain live partner // APIs, used by busprecache and busapi type PartnerSpec struct { // BustimeAPIKey is the API key for accessing http://bustime.mta.info/ // Default: None // Environment variable: $BUS_MTA_BUSTIME_API_KEY BustimeAPIKey string `envconfig:"mta_bustime_api_key" required:"true"` // DatamineAPIKey is the API key for accessing http://datamine.mta.info/ // Default: None // Environment variable: $BUS_MTA_DATAMINE_API_KEY DatamineAPIKey string `envconfig:"mta_datamine_api_key" required:"true"` // AgencyIDs is a comma-delimited list of agencies that // precacher should be hitting // Default: "MTA NYCT,MTABC,NYC DOT,MTA MNR,LI,PATH,NJT" // Environment variable: $BUS_AGENCY_IDS (comma-delimited list) AgencyIDs []string `envconfig:"agency_ids" default:"MTA NYCT,MTABC,NYC DOT,MTA MNR,LI,PATH,NJT"` } // DBSpec is our database config used by both busapi and busloader type DBSpec struct { // DBAddr is the "host:port" we use for connecting to postgres // Default: "localhost:5432" // Environment variable: $BUS_DB_ADDR Addr string `envconfig:"db_addr" default:"localhost:5432"` // DBUser is the username we use for connecting to postgres // Default: postgres // Environment variable: $BUS_DB_USER User string `envconfig:"db_user" default:"postgres"` // DBPassword is the password we use for connecting to postgres // Default: None // Environment variable: $BUS_DB_PASSWORD Password string `envconfig:"db_password" default:""` // DBName is the database name we use in postgres // Default: postgres // Environment variable: $BUS_DB_NAME Name string `envconfig:"db_name" default:"postgres"` } // APISpec is our config spec used by busapi type APISpec struct { // APIAddr is the "host:port" we listen to for incoming HTTP connections // Default: "0.0.0.0:8000" // Environment variable: $BUS_API_ADDR Addr string `envconfig:"api_addr" default:"0.0.0.0:8000"` // WebDir is the location of the static web assets // Default: ../../web/dist // Environment variable: $BUS_WEB_DIR WebDir string `envconfig:"web_dir" default:"../../web/dist"` // BuildTimestamp is the UNIX timestamp when static assets were last built. // Default: 0 (API will use current timestamp) // Environment variable: $BUS_BUILD_TIMESTAMP BuildTimestamp int64 `envconfig:"build_timestamp"` // LogTiming will log timing info of some core operations / queries // Default: false // Environment variable: $BUS_LOG_TIMING LogTiming bool `envconfig:"log_timing" default:"false"` } // LoaderSpec is our config spec used by busloader type LoaderSpec struct { // TmpDir is the root directory we use for creating temporary // files when loading new data // Default: None (use system default) // Environment variable: $BUS_TMP_DIR TmpDir string `envconfig:"tmp_dir"` // RouteFilter is a comma-delimited list of route_ids we want to // specifically extract from the transit files // Default: None (no filter) // Environment variable: $BUS_ROUTE_FILTER (comma-delimited list) RouteFilter []string `envconfig:"route_filter"` // GTFSURLs is a comma-delimited list of URLs that have zipped GTFS // feeds, see: https://developers.google.com/transit/gtfs/ // Default: None // Environment variable: $BUS_GTFS_URLS (comma-delimited list) GTFSURLs []string `envconfig:"gtfs_urls"` // LoadForever is a boolean that determines whether we just load // the GTFS URLs once and exit or whether we continually load them (every // 24 hours) // Default: true // Environment variable: $BUS_LOAD_FOREVER LoadForever bool `envconfig:"load_forever" default:"false"` // njtransit_feed_username: is the username for accessing: // https://www.njtransit.com/mt/mt_servlet.srv?hdnPageAction=MTDevLoginTo // Default: None // Environment variable: $BUS_NJTRANSIT_FEED_USERNAME NJTransitFeedUsername string `envconfig:"njtransit_feed_username"` // njtransit_feed_password: is the password for accessing: // https://www.njtransit.com/mt/mt_servlet.srv?hdnPageAction=MTDevLoginTo // Default: None // Environment variable: $BUS_NJTRANSIT_FEED_PASSWORD NJTransitFeedPassword string `envconfig:"njtransit_feed_password"` }
brnstz/bus
internal/conf/conf.go
GO
mit
5,083
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (1.8.0_31) on Wed Dec 17 20:48:30 PST 2014 --> <title>Uses of Class javax.print.event.PrintJobEvent (Java Platform SE 8 )</title> <meta name="date" content="2014-12-17"> <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> <script type="text/javascript" src="../../../../script.js"></script> </head> <body> <script type="text/javascript"><!-- try { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Uses of Class javax.print.event.PrintJobEvent (Java Platform SE 8 )"; } } catch(err) { } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar.top"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.top.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../overview-summary.html">Overview</a></li> <li><a href="../package-summary.html">Package</a></li> <li><a href="../../../../javax/print/event/PrintJobEvent.html" title="class in javax.print.event">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../package-tree.html">Tree</a></li> <li><a href="../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../index-files/index-1.html">Index</a></li> <li><a href="../../../../help-doc.html">Help</a></li> </ul> <div class="aboutLanguage"><strong>Java&trade;&nbsp;Platform<br>Standard&nbsp;Ed.&nbsp;8</strong></div> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../index.html?javax/print/event/class-use/PrintJobEvent.html" target="_top">Frames</a></li> <li><a href="PrintJobEvent.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip.navbar.top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <div class="header"> <h2 title="Uses of Class javax.print.event.PrintJobEvent" class="title">Uses of Class<br>javax.print.event.PrintJobEvent</h2> </div> <div class="classUseContainer"> <ul class="blockList"> <li class="blockList"> <table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation"> <caption><span>Packages that use <a href="../../../../javax/print/event/PrintJobEvent.html" title="class in javax.print.event">PrintJobEvent</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Package</th> <th class="colLast" scope="col">Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><a href="#javax.print.event">javax.print.event</a></td> <td class="colLast"> <div class="block">Package javax.print.event contains event classes and listener interfaces.</div> </td> </tr> </tbody> </table> </li> <li class="blockList"> <ul class="blockList"> <li class="blockList"><a name="javax.print.event"> <!-- --> </a> <h3>Uses of <a href="../../../../javax/print/event/PrintJobEvent.html" title="class in javax.print.event">PrintJobEvent</a> in <a href="../../../../javax/print/event/package-summary.html">javax.print.event</a></h3> <table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> <caption><span>Methods in <a href="../../../../javax/print/event/package-summary.html">javax.print.event</a> with parameters of type <a href="../../../../javax/print/event/PrintJobEvent.html" title="class in javax.print.event">PrintJobEvent</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><span class="typeNameLabel">PrintJobListener.</span><code><span class="memberNameLink"><a href="../../../../javax/print/event/PrintJobListener.html#printDataTransferCompleted-javax.print.event.PrintJobEvent-">printDataTransferCompleted</a></span>(<a href="../../../../javax/print/event/PrintJobEvent.html" title="class in javax.print.event">PrintJobEvent</a>&nbsp;pje)</code> <div class="block">Called to notify the client that data has been successfully transferred to the print service, and the client may free local resources allocated for that data.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><span class="typeNameLabel">PrintJobAdapter.</span><code><span class="memberNameLink"><a href="../../../../javax/print/event/PrintJobAdapter.html#printDataTransferCompleted-javax.print.event.PrintJobEvent-">printDataTransferCompleted</a></span>(<a href="../../../../javax/print/event/PrintJobEvent.html" title="class in javax.print.event">PrintJobEvent</a>&nbsp;pje)</code> <div class="block">Called to notify the client that data has been successfully transferred to the print service, and the client may free local resources allocated for that data.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><span class="typeNameLabel">PrintJobListener.</span><code><span class="memberNameLink"><a href="../../../../javax/print/event/PrintJobListener.html#printJobCanceled-javax.print.event.PrintJobEvent-">printJobCanceled</a></span>(<a href="../../../../javax/print/event/PrintJobEvent.html" title="class in javax.print.event">PrintJobEvent</a>&nbsp;pje)</code> <div class="block">Called to notify the client that the job was canceled by a user or a program.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><span class="typeNameLabel">PrintJobAdapter.</span><code><span class="memberNameLink"><a href="../../../../javax/print/event/PrintJobAdapter.html#printJobCanceled-javax.print.event.PrintJobEvent-">printJobCanceled</a></span>(<a href="../../../../javax/print/event/PrintJobEvent.html" title="class in javax.print.event">PrintJobEvent</a>&nbsp;pje)</code> <div class="block">Called to notify the client that the job was canceled by user or program.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><span class="typeNameLabel">PrintJobListener.</span><code><span class="memberNameLink"><a href="../../../../javax/print/event/PrintJobListener.html#printJobCompleted-javax.print.event.PrintJobEvent-">printJobCompleted</a></span>(<a href="../../../../javax/print/event/PrintJobEvent.html" title="class in javax.print.event">PrintJobEvent</a>&nbsp;pje)</code> <div class="block">Called to notify the client that the job completed successfully.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><span class="typeNameLabel">PrintJobAdapter.</span><code><span class="memberNameLink"><a href="../../../../javax/print/event/PrintJobAdapter.html#printJobCompleted-javax.print.event.PrintJobEvent-">printJobCompleted</a></span>(<a href="../../../../javax/print/event/PrintJobEvent.html" title="class in javax.print.event">PrintJobEvent</a>&nbsp;pje)</code> <div class="block">Called to notify the client that the job completed successfully.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><span class="typeNameLabel">PrintJobListener.</span><code><span class="memberNameLink"><a href="../../../../javax/print/event/PrintJobListener.html#printJobFailed-javax.print.event.PrintJobEvent-">printJobFailed</a></span>(<a href="../../../../javax/print/event/PrintJobEvent.html" title="class in javax.print.event">PrintJobEvent</a>&nbsp;pje)</code> <div class="block">Called to notify the client that the job failed to complete successfully and will have to be resubmitted.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><span class="typeNameLabel">PrintJobAdapter.</span><code><span class="memberNameLink"><a href="../../../../javax/print/event/PrintJobAdapter.html#printJobFailed-javax.print.event.PrintJobEvent-">printJobFailed</a></span>(<a href="../../../../javax/print/event/PrintJobEvent.html" title="class in javax.print.event">PrintJobEvent</a>&nbsp;pje)</code> <div class="block">Called to notify the client that the job failed to complete successfully and will have to be resubmitted.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><span class="typeNameLabel">PrintJobListener.</span><code><span class="memberNameLink"><a href="../../../../javax/print/event/PrintJobListener.html#printJobNoMoreEvents-javax.print.event.PrintJobEvent-">printJobNoMoreEvents</a></span>(<a href="../../../../javax/print/event/PrintJobEvent.html" title="class in javax.print.event">PrintJobEvent</a>&nbsp;pje)</code> <div class="block">Called to notify the client that no more events will be delivered.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><span class="typeNameLabel">PrintJobAdapter.</span><code><span class="memberNameLink"><a href="../../../../javax/print/event/PrintJobAdapter.html#printJobNoMoreEvents-javax.print.event.PrintJobEvent-">printJobNoMoreEvents</a></span>(<a href="../../../../javax/print/event/PrintJobEvent.html" title="class in javax.print.event">PrintJobEvent</a>&nbsp;pje)</code> <div class="block">Called to notify the client that no more events will be delivered.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><span class="typeNameLabel">PrintJobListener.</span><code><span class="memberNameLink"><a href="../../../../javax/print/event/PrintJobListener.html#printJobRequiresAttention-javax.print.event.PrintJobEvent-">printJobRequiresAttention</a></span>(<a href="../../../../javax/print/event/PrintJobEvent.html" title="class in javax.print.event">PrintJobEvent</a>&nbsp;pje)</code> <div class="block">Called to notify the client that an error has occurred that the user might be able to fix.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><span class="typeNameLabel">PrintJobAdapter.</span><code><span class="memberNameLink"><a href="../../../../javax/print/event/PrintJobAdapter.html#printJobRequiresAttention-javax.print.event.PrintJobEvent-">printJobRequiresAttention</a></span>(<a href="../../../../javax/print/event/PrintJobEvent.html" title="class in javax.print.event">PrintJobEvent</a>&nbsp;pje)</code> <div class="block">Called to notify the client that some possibly user rectifiable problem occurs (eg printer out of paper).</div> </td> </tr> </tbody> </table> </li> </ul> </li> </ul> </div> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar.bottom"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.bottom.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../overview-summary.html">Overview</a></li> <li><a href="../package-summary.html">Package</a></li> <li><a href="../../../../javax/print/event/PrintJobEvent.html" title="class in javax.print.event">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../package-tree.html">Tree</a></li> <li><a href="../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../index-files/index-1.html">Index</a></li> <li><a href="../../../../help-doc.html">Help</a></li> </ul> <div class="aboutLanguage"><strong>Java&trade;&nbsp;Platform<br>Standard&nbsp;Ed.&nbsp;8</strong></div> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../index.html?javax/print/event/class-use/PrintJobEvent.html" target="_top">Frames</a></li> <li><a href="PrintJobEvent.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip.navbar.bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> <p class="legalCopy"><small><font size="-1"> <a href="http://bugreport.sun.com/bugreport/">Submit a bug or feature</a> <br>For further API reference and developer documentation, see <a href="http://download.oracle.com/javase/8/docs/index.html" target="_blank">Java SE Documentation</a>. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.<br> <a href="../../../../../legal/cpyr.html">Copyright</a> &#x00a9; 1993, 2015, Oracle and/or its affiliates. All rights reserved. </font></small></p> </body> </html>
fbiville/annotation-processing-ftw
doc/java/jdk8/javax/print/event/class-use/PrintJobEvent.html
HTML
mit
13,732
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.stackedBar=n():(t.britecharts=t.britecharts||{},t.britecharts.stackedBar=n())}(window,function(){return function(t){var n={};function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var i in t)e.d(r,i,function(n){return t[n]}.bind(null,i));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=100)}([function(t,n,e){"use strict";var r=new Date,i=new Date;function o(t,n,e,u){function a(n){return t(n=new Date(+n)),n}return a.floor=a,a.ceil=function(e){return t(e=new Date(e-1)),n(e,1),t(e),e},a.round=function(t){var n=a(t),e=a.ceil(t);return t-n<e-t?n:e},a.offset=function(t,e){return n(t=new Date(+t),null==e?1:Math.floor(e)),t},a.range=function(e,r,i){var o=[];if(e=a.ceil(e),i=null==i?1:Math.floor(i),!(e<r&&i>0))return o;do{o.push(new Date(+e))}while(n(e,i),t(e),e<r);return o},a.filter=function(e){return o(function(n){if(n>=n)for(;t(n),!e(n);)n.setTime(n-1)},function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;n(t,-1),!e(t););else for(;--r>=0;)for(;n(t,1),!e(t););})},e&&(a.count=function(n,o){return r.setTime(+n),i.setTime(+o),t(r),t(i),Math.floor(e(r,i))},a.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?a.filter(u?function(n){return u(n)%t==0}:function(n){return a.count(0,n)%t==0}):a:null}),a}var u=o(function(){},function(t,n){t.setTime(+t+n)},function(t,n){return n-t});u.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?o(function(n){n.setTime(Math.floor(n/t)*t)},function(n,e){n.setTime(+n+e*t)},function(n,e){return(e-n)/t}):u:null};var a=u,c=(u.range,6e4),s=6048e5,l=o(function(t){t.setTime(1e3*Math.floor(t/1e3))},function(t,n){t.setTime(+t+1e3*n)},function(t,n){return(n-t)/1e3},function(t){return t.getUTCSeconds()}),f=l,h=(l.range,o(function(t){t.setTime(Math.floor(t/c)*c)},function(t,n){t.setTime(+t+n*c)},function(t,n){return(n-t)/c},function(t){return t.getMinutes()})),p=h,_=(h.range,o(function(t){var n=t.getTimezoneOffset()*c%36e5;n<0&&(n+=36e5),t.setTime(36e5*Math.floor((+t-n)/36e5)+n)},function(t,n){t.setTime(+t+36e5*n)},function(t,n){return(n-t)/36e5},function(t){return t.getHours()})),d=_,y=(_.range,o(function(t){t.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+n)},function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*c)/864e5},function(t){return t.getDate()-1})),g=y;y.range;function v(t){return o(function(n){n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+7*n)},function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*c)/s})}var x=v(0),m=v(1),b=v(2),w=v(3),M=v(4),T=v(5),A=v(6),k=(x.range,m.range,b.range,w.range,M.range,T.range,A.range,o(function(t){t.setDate(1),t.setHours(0,0,0,0)},function(t,n){t.setMonth(t.getMonth()+n)},function(t,n){return n.getMonth()-t.getMonth()+12*(n.getFullYear()-t.getFullYear())},function(t){return t.getMonth()})),O=k,C=(k.range,o(function(t){t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n)},function(t,n){return n.getFullYear()-t.getFullYear()},function(t){return t.getFullYear()}));C.every=function(t){return isFinite(t=Math.floor(t))&&t>0?o(function(n){n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)},function(n,e){n.setFullYear(n.getFullYear()+e*t)}):null};var S=C,j=(C.range,o(function(t){t.setUTCSeconds(0,0)},function(t,n){t.setTime(+t+n*c)},function(t,n){return(n-t)/c},function(t){return t.getUTCMinutes()})),E=j,N=(j.range,o(function(t){t.setUTCMinutes(0,0,0)},function(t,n){t.setTime(+t+36e5*n)},function(t,n){return(n-t)/36e5},function(t){return t.getUTCHours()})),D=N,P=(N.range,o(function(t){t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+n)},function(t,n){return(n-t)/864e5},function(t){return t.getUTCDate()-1})),F=P;P.range;function U(t){return o(function(n){n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+7*n)},function(t,n){return(n-t)/s})}var L=U(0),I=U(1),R=U(2),B=U(3),H=U(4),Y=U(5),z=U(6),q=(L.range,I.range,R.range,B.range,H.range,Y.range,z.range,o(function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCMonth(t.getUTCMonth()+n)},function(t,n){return n.getUTCMonth()-t.getUTCMonth()+12*(n.getUTCFullYear()-t.getUTCFullYear())},function(t){return t.getUTCMonth()})),G=q,$=(q.range,o(function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n)},function(t,n){return n.getUTCFullYear()-t.getUTCFullYear()},function(t){return t.getUTCFullYear()}));$.every=function(t){return isFinite(t=Math.floor(t))&&t>0?o(function(n){n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)},function(n,e){n.setUTCFullYear(n.getUTCFullYear()+e*t)}):null};var X=$;$.range;e.d(n,"d",function(){return a}),e.d(n,"s",function(){return a}),e.d(n,"i",function(){return f}),e.d(n,"x",function(){return f}),e.d(n,"e",function(){return p}),e.d(n,"c",function(){return d}),e.d(n,"a",function(){return g}),e.d(n,"n",function(){return x}),e.d(n,"j",function(){return x}),e.d(n,"f",function(){return m}),e.d(n,"l",function(){return b}),e.d(n,"m",function(){return w}),e.d(n,"k",function(){return M}),e.d(n,"b",function(){return T}),e.d(n,"h",function(){return A}),e.d(n,"g",function(){return O}),e.d(n,"o",function(){return S}),e.d(n,"t",function(){return E}),e.d(n,"r",function(){return D}),e.d(n,"p",function(){return F}),e.d(n,"C",function(){return L}),e.d(n,"y",function(){return L}),e.d(n,"u",function(){return I}),e.d(n,"A",function(){return R}),e.d(n,"B",function(){return B}),e.d(n,"z",function(){return H}),e.d(n,"q",function(){return Y}),e.d(n,"w",function(){return z}),e.d(n,"v",function(){return G}),e.d(n,"D",function(){return X})},function(t,n,e){"use strict";var r="http://www.w3.org/1999/xhtml",i={svg:"http://www.w3.org/2000/svg",xhtml:r,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},o=function(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),i.hasOwnProperty(n)?{space:i[n],local:t}:t};var u=function(t){var n=o(t);return(n.local?function(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}:function(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===r&&n.documentElement.namespaceURI===r?n.createElement(t):n.createElementNS(e,t)}})(n)},a=0;function c(){this._="@"+(++a).toString(36)}c.prototype=function(){return new c}.prototype={constructor:c,get:function(t){for(var n=this._;!(n in t);)if(!(t=t.parentNode))return;return t[n]},set:function(t,n){return t[this._]=n},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};var s=function(t){return function(){return this.matches(t)}};if("undefined"!=typeof document){var l=document.documentElement;if(!l.matches){var f=l.webkitMatchesSelector||l.msMatchesSelector||l.mozMatchesSelector||l.oMatchesSelector;s=function(t){return function(){return f.call(this,t)}}}}var h=s,p={},_=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(p={mouseenter:"mouseover",mouseleave:"mouseout"}));function d(t,n,e){return t=y(t,n,e),function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t.call(this,n)}}function y(t,n,e){return function(r){var i=_;_=r;try{t.call(this,this.__data__,n,e)}finally{_=i}}}function g(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,o=n.length;r<o;++r)e=n[r],t.type&&e.type!==t.type||e.name!==t.name?n[++i]=e:this.removeEventListener(e.type,e.listener,e.capture);++i?n.length=i:delete this.__on}}}function v(t,n,e){var r=p.hasOwnProperty(t.type)?d:y;return function(i,o,u){var a,c=this.__on,s=r(n,o,u);if(c)for(var l=0,f=c.length;l<f;++l)if((a=c[l]).type===t.type&&a.name===t.name)return this.removeEventListener(a.type,a.listener,a.capture),this.addEventListener(a.type,a.listener=s,a.capture=e),void(a.value=n);this.addEventListener(t.type,s,e),a={type:t.type,name:t.name,value:n,listener:s,capture:e},c?c.push(a):this.__on=[a]}}function x(t,n,e,r){var i=_;t.sourceEvent=_,_=t;try{return n.apply(e,r)}finally{_=i}}var m=function(){for(var t,n=_;t=n.sourceEvent;)n=t;return n},b=function(t,n){var e=t.ownerSVGElement||t;if(e.createSVGPoint){var r=e.createSVGPoint();return r.x=n.clientX,r.y=n.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}var i=t.getBoundingClientRect();return[n.clientX-i.left-t.clientLeft,n.clientY-i.top-t.clientTop]},w=function(t){var n=m();return n.changedTouches&&(n=n.changedTouches[0]),b(t,n)};function M(){}var T=function(t){return null==t?M:function(){return this.querySelector(t)}};function A(){return[]}var k=function(t){return null==t?A:function(){return this.querySelectorAll(t)}},O=function(t){return new Array(t.length)};function C(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}C.prototype={constructor:C,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var S="$";function j(t,n,e,r,i,o){for(var u,a=0,c=n.length,s=o.length;a<s;++a)(u=n[a])?(u.__data__=o[a],r[a]=u):e[a]=new C(t,o[a]);for(;a<c;++a)(u=n[a])&&(i[a]=u)}function E(t,n,e,r,i,o,u){var a,c,s,l={},f=n.length,h=o.length,p=new Array(f);for(a=0;a<f;++a)(c=n[a])&&(p[a]=s=S+u.call(c,c.__data__,a,n),s in l?i[a]=c:l[s]=c);for(a=0;a<h;++a)(c=l[s=S+u.call(t,o[a],a,o)])?(r[a]=c,c.__data__=o[a],l[s]=null):e[a]=new C(t,o[a]);for(a=0;a<f;++a)(c=n[a])&&l[p[a]]===c&&(i[a]=c)}function N(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}var D=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function P(t,n){return t.style.getPropertyValue(n)||D(t).getComputedStyle(t,null).getPropertyValue(n)}function F(t){return t.trim().split(/^|\s+/)}function U(t){return t.classList||new L(t)}function L(t){this._node=t,this._names=F(t.getAttribute("class")||"")}function I(t,n){for(var e=U(t),r=-1,i=n.length;++r<i;)e.add(n[r])}function R(t,n){for(var e=U(t),r=-1,i=n.length;++r<i;)e.remove(n[r])}L.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function B(){this.textContent=""}function H(){this.innerHTML=""}function Y(){this.nextSibling&&this.parentNode.appendChild(this)}function z(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function q(){return null}function G(){var t=this.parentNode;t&&t.removeChild(this)}function $(t,n,e){var r=D(t),i=r.CustomEvent;"function"==typeof i?i=new i(n,e):(i=r.document.createEvent("Event"),e?(i.initEvent(n,e.bubbles,e.cancelable),i.detail=e.detail):i.initEvent(n,!1,!1)),t.dispatchEvent(i)}var X=[null];function V(t,n){this._groups=t,this._parents=n}function Z(){return new V([[document.documentElement]],X)}V.prototype=Z.prototype={constructor:V,select:function(t){"function"!=typeof t&&(t=T(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,u,a=n[i],c=a.length,s=r[i]=new Array(c),l=0;l<c;++l)(o=a[l])&&(u=t.call(o,o.__data__,l,a))&&("__data__"in o&&(u.__data__=o.__data__),s[l]=u);return new V(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=k(t));for(var n=this._groups,e=n.length,r=[],i=[],o=0;o<e;++o)for(var u,a=n[o],c=a.length,s=0;s<c;++s)(u=a[s])&&(r.push(t.call(u,u.__data__,s,a)),i.push(u));return new V(r,i)},filter:function(t){"function"!=typeof t&&(t=h(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,u=n[i],a=u.length,c=r[i]=[],s=0;s<a;++s)(o=u[s])&&t.call(o,o.__data__,s,u)&&c.push(o);return new V(r,this._parents)},data:function(t,n){if(!t)return _=new Array(this.size()),l=-1,this.each(function(t){_[++l]=t}),_;var e,r=n?E:j,i=this._parents,o=this._groups;"function"!=typeof t&&(e=t,t=function(){return e});for(var u=o.length,a=new Array(u),c=new Array(u),s=new Array(u),l=0;l<u;++l){var f=i[l],h=o[l],p=h.length,_=t.call(f,f&&f.__data__,l,i),d=_.length,y=c[l]=new Array(d),g=a[l]=new Array(d);r(f,h,y,g,s[l]=new Array(p),_,n);for(var v,x,m=0,b=0;m<d;++m)if(v=y[m]){for(m>=b&&(b=m+1);!(x=g[b])&&++b<d;);v._next=x||null}}return(a=new V(a,i))._enter=c,a._exit=s,a},enter:function(){return new V(this._enter||this._groups.map(O),this._parents)},exit:function(){return new V(this._exit||this._groups.map(O),this._parents)},merge:function(t){for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),u=new Array(r),a=0;a<o;++a)for(var c,s=n[a],l=e[a],f=s.length,h=u[a]=new Array(f),p=0;p<f;++p)(c=s[p]||l[p])&&(h[p]=c);for(;a<r;++a)u[a]=n[a];return new V(u,this._parents)},order:function(){for(var t=this._groups,n=-1,e=t.length;++n<e;)for(var r,i=t[n],o=i.length-1,u=i[o];--o>=0;)(r=i[o])&&(u&&u!==r.nextSibling&&u.parentNode.insertBefore(r,u),u=r);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=N);for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o){for(var u,a=e[o],c=a.length,s=i[o]=new Array(c),l=0;l<c;++l)(u=a[l])&&(s[l]=u);s.sort(n)}return new V(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),n=-1;return this.each(function(){t[++n]=this}),t},node:function(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r=t[n],i=0,o=r.length;i<o;++i){var u=r[i];if(u)return u}return null},size:function(){var t=0;return this.each(function(){++t}),t},empty:function(){return!this.node()},each:function(t){for(var n=this._groups,e=0,r=n.length;e<r;++e)for(var i,o=n[e],u=0,a=o.length;u<a;++u)(i=o[u])&&t.call(i,i.__data__,u,o);return this},attr:function(t,n){var e=o(t);if(arguments.length<2){var r=this.node();return e.local?r.getAttributeNS(e.space,e.local):r.getAttribute(e)}return this.each((null==n?e.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}}:"function"==typeof n?e.local?function(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}:function(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}:e.local?function(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}:function(t,n){return function(){this.setAttribute(t,n)}})(e,n))},style:function(t,n,e){return arguments.length>1?this.each((null==n?function(t){return function(){this.style.removeProperty(t)}}:"function"==typeof n?function(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}:function(t,n,e){return function(){this.style.setProperty(t,n,e)}})(t,n,null==e?"":e)):P(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?function(t){return function(){delete this[t]}}:"function"==typeof n?function(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}:function(t,n){return function(){this[t]=n}})(t,n)):this.node()[t]},classed:function(t,n){var e=F(t+"");if(arguments.length<2){for(var r=U(this.node()),i=-1,o=e.length;++i<o;)if(!r.contains(e[i]))return!1;return!0}return this.each(("function"==typeof n?function(t,n){return function(){(n.apply(this,arguments)?I:R)(this,t)}}:n?function(t){return function(){I(this,t)}}:function(t){return function(){R(this,t)}})(e,n))},text:function(t){return arguments.length?this.each(null==t?B:("function"==typeof t?function(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}:function(t){return function(){this.textContent=t}})(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?H:("function"==typeof t?function(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}:function(t){return function(){this.innerHTML=t}})(t)):this.node().innerHTML},raise:function(){return this.each(Y)},lower:function(){return this.each(z)},append:function(t){var n="function"==typeof t?t:u(t);return this.select(function(){return this.appendChild(n.apply(this,arguments))})},insert:function(t,n){var e="function"==typeof t?t:u(t),r=null==n?q:"function"==typeof n?n:T(n);return this.select(function(){return this.insertBefore(e.apply(this,arguments),r.apply(this,arguments)||null)})},remove:function(){return this.each(G)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,n,e){var r,i,o=function(t){return t.trim().split(/^|\s+/).map(function(t){var n="",e=t.indexOf(".");return e>=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}})}(t+""),u=o.length;if(!(arguments.length<2)){for(a=n?v:g,null==e&&(e=!1),r=0;r<u;++r)this.each(a(o[r],n,e));return this}var a=this.node().__on;if(a)for(var c,s=0,l=a.length;s<l;++s)for(r=0,c=a[s];r<u;++r)if((i=o[r]).type===c.type&&i.name===c.name)return c.value},dispatch:function(t,n){return this.each(("function"==typeof n?function(t,n){return function(){return $(this,t,n.apply(this,arguments))}}:function(t,n){return function(){return $(this,t,n)}})(t,n))}};var W=Z,J=function(t){return"string"==typeof t?new V([[document.querySelector(t)]],[document.documentElement]):new V([[t]],X)},K=function(t,n,e){arguments.length<3&&(e=n,n=m().changedTouches);for(var r,i=0,o=n?n.length:0;i<o;++i)if((r=n[i]).identifier===e)return b(t,r);return null};e.d(n,"c",function(){return h}),e.d(n,"d",function(){return w}),e.d(n,"e",function(){return o}),e.d(n,"f",function(){return J}),e.d(n,"g",function(){return W}),e.d(n,"h",function(){return T}),e.d(n,"i",function(){return k}),e.d(n,"j",function(){return P}),e.d(n,"k",function(){return K}),e.d(n,"b",function(){return _}),e.d(n,"a",function(){return x})},function(t,n,e){"use strict";var r=function(t,n){return t<n?-1:t>n?1:t>=n?0:NaN},i=function(t){var n;return 1===t.length&&(n=t,t=function(t,e){return r(n(t),e)}),{left:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length);r<i;){var o=r+i>>>1;t(n[o],e)<0?r=o+1:i=o}return r},right:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length);r<i;){var o=r+i>>>1;t(n[o],e)>0?i=o:r=o+1}return r}}};var o=i(r),u=o.right,a=(o.left,u);var c=function(t){return null===t?NaN:+t},s=function(t,n){var e,r,i,o=t.length,u=-1;if(null==n){for(;++u<o;)if(null!=(e=t[u])&&e>=e)for(r=i=e;++u<o;)null!=(e=t[u])&&(r>e&&(r=e),i<e&&(i=e))}else for(;++u<o;)if(null!=(e=n(t[u],u,t))&&e>=e)for(r=i=e;++u<o;)null!=(e=n(t[u],u,t))&&(r>e&&(r=e),i<e&&(i=e));return[r,i]},l=Array.prototype,f=(l.slice,l.map,function(t,n,e){t=+t,n=+n,e=(i=arguments.length)<2?(n=t,t=0,1):i<3?1:+e;for(var r=-1,i=0|Math.max(0,Math.ceil((n-t)/e)),o=new Array(i);++r<i;)o[r]=t+r*e;return o}),h=Math.sqrt(50),p=Math.sqrt(10),_=Math.sqrt(2),d=function(t,n,e){var r,i,o,u=n<t,a=-1;if(u&&(r=t,t=n,n=r),0===(o=y(t,n,e))||!isFinite(o))return[];if(o>0)for(t=Math.ceil(t/o),n=Math.floor(n/o),i=new Array(r=Math.ceil(n-t+1));++a<r;)i[a]=(t+a)*o;else for(t=Math.floor(t*o),n=Math.ceil(n*o),i=new Array(r=Math.ceil(t-n+1));++a<r;)i[a]=(t-a)/o;return u&&i.reverse(),i};function y(t,n,e){var r=(n-t)/Math.max(0,e),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=h?10:o>=p?5:o>=_?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=h?10:o>=p?5:o>=_?2:1)}function g(t,n,e){var r=Math.abs(n-t)/Math.max(0,e),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=h?i*=10:o>=p?i*=5:o>=_&&(i*=2),n<t?-i:i}var v=function(t,n,e){if(null==e&&(e=c),r=t.length){if((n=+n)<=0||r<2)return+e(t[0],0,t);if(n>=1)return+e(t[r-1],r-1,t);var r,i=(r-1)*n,o=Math.floor(i),u=+e(t[o],o,t);return u+(+e(t[o+1],o+1,t)-u)*(i-o)}},x=function(t,n){var e,r,i=t.length,o=-1;if(null==n){for(;++o<i;)if(null!=(e=t[o])&&e>=e)for(r=e;++o<i;)null!=(e=t[o])&&e>r&&(r=e)}else for(;++o<i;)if(null!=(e=n(t[o],o,t))&&e>=e)for(r=e;++o<i;)null!=(e=n(t[o],o,t))&&e>r&&(r=e);return r},m=function(t,n){var e,r,i=t.length,o=-1;if(null==n){for(;++o<i;)if(null!=(e=t[o])&&e>=e)for(r=e;++o<i;)null!=(e=t[o])&&r>e&&(r=e)}else for(;++o<i;)if(null!=(e=n(t[o],o,t))&&e>=e)for(r=e;++o<i;)null!=(e=n(t[o],o,t))&&r>e&&(r=e);return r},b=function(t,n){for(var e=n.length,r=new Array(e);e--;)r[e]=t[n[e]];return r},w=function(t,n){var e,r=t.length,i=-1,o=0;if(null==n)for(;++i<r;)(e=+t[i])&&(o+=e);else for(;++i<r;)(e=+n(t[i],i,t))&&(o+=e);return o};e.d(n,"b",function(){return a}),e.d(n,"a",function(){return r}),e.d(n,"c",function(){return i}),e.d(n,"d",function(){return s}),e.d(n,"e",function(){return x}),e.d(n,"f",function(){return m}),e.d(n,"g",function(){return b}),e.d(n,"h",function(){return v}),e.d(n,"i",function(){return f}),e.d(n,"j",function(){return w}),e.d(n,"m",function(){return d}),e.d(n,"k",function(){return y}),e.d(n,"l",function(){return g})},function(t,n,e){"use strict";var r=function(t,n,e){t.prototype=n.prototype=e,e.constructor=t};function i(t,n){var e=Object.create(t.prototype);for(var r in n)e[r]=n[r];return e}function o(){}var u="\\s*([+-]?\\d+)\\s*",a="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",c="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",s=/^#([0-9a-f]{3})$/,l=/^#([0-9a-f]{6})$/,f=new RegExp("^rgb\\("+[u,u,u]+"\\)$"),h=new RegExp("^rgb\\("+[c,c,c]+"\\)$"),p=new RegExp("^rgba\\("+[u,u,u,a]+"\\)$"),_=new RegExp("^rgba\\("+[c,c,c,a]+"\\)$"),d=new RegExp("^hsl\\("+[a,c,c]+"\\)$"),y=new RegExp("^hsla\\("+[a,c,c,a]+"\\)$"),g={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function v(t){var n;return t=(t+"").trim().toLowerCase(),(n=s.exec(t))?new M((n=parseInt(n[1],16))>>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):(n=l.exec(t))?x(parseInt(n[1],16)):(n=f.exec(t))?new M(n[1],n[2],n[3],1):(n=h.exec(t))?new M(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=p.exec(t))?m(n[1],n[2],n[3],n[4]):(n=_.exec(t))?m(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=d.exec(t))?T(n[1],n[2]/100,n[3]/100,1):(n=y.exec(t))?T(n[1],n[2]/100,n[3]/100,n[4]):g.hasOwnProperty(t)?x(g[t]):"transparent"===t?new M(NaN,NaN,NaN,0):null}function x(t){return new M(t>>16&255,t>>8&255,255&t,1)}function m(t,n,e,r){return r<=0&&(t=n=e=NaN),new M(t,n,e,r)}function b(t){return t instanceof o||(t=v(t)),t?new M((t=t.rgb()).r,t.g,t.b,t.opacity):new M}function w(t,n,e,r){return 1===arguments.length?b(t):new M(t,n,e,null==r?1:r)}function M(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function T(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new k(t,n,e,r)}function A(t,n,e,r){return 1===arguments.length?function(t){if(t instanceof k)return new k(t.h,t.s,t.l,t.opacity);if(t instanceof o||(t=v(t)),!t)return new k;if(t instanceof k)return t;var n=(t=t.rgb()).r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),u=Math.max(n,e,r),a=NaN,c=u-i,s=(u+i)/2;return c?(a=n===u?(e-r)/c+6*(e<r):e===u?(r-n)/c+2:(n-e)/c+4,c/=s<.5?u+i:2-u-i,a*=60):c=s>0&&s<1?0:a,new k(a,c,s,t.opacity)}(t):new k(t,n,e,null==r?1:r)}function k(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function O(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}r(o,v,{displayable:function(){return this.rgb().displayable()},toString:function(){return this.rgb()+""}}),r(M,w,i(o,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new M(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new M(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},toString:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}})),r(k,A,i(o,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new k(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new k(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*n,i=2*e-r;return new M(O(t>=240?t-240:t+120,i,r),O(t,i,r),O(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var C=Math.PI/180,S=180/Math.PI,j=.95047,E=1,N=1.08883,D=4/29,P=6/29,F=3*P*P,U=P*P*P;function L(t){if(t instanceof R)return new R(t.l,t.a,t.b,t.opacity);if(t instanceof G){var n=t.h*C;return new R(t.l,Math.cos(n)*t.c,Math.sin(n)*t.c,t.opacity)}t instanceof M||(t=b(t));var e=z(t.r),r=z(t.g),i=z(t.b),o=B((.4124564*e+.3575761*r+.1804375*i)/j),u=B((.2126729*e+.7151522*r+.072175*i)/E);return new R(116*u-16,500*(o-u),200*(u-B((.0193339*e+.119192*r+.9503041*i)/N)),t.opacity)}function I(t,n,e,r){return 1===arguments.length?L(t):new R(t,n,e,null==r?1:r)}function R(t,n,e,r){this.l=+t,this.a=+n,this.b=+e,this.opacity=+r}function B(t){return t>U?Math.pow(t,1/3):t/F+D}function H(t){return t>P?t*t*t:F*(t-D)}function Y(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function z(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function q(t,n,e,r){return 1===arguments.length?function(t){if(t instanceof G)return new G(t.h,t.c,t.l,t.opacity);t instanceof R||(t=L(t));var n=Math.atan2(t.b,t.a)*S;return new G(n<0?n+360:n,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}(t):new G(t,n,e,null==r?1:r)}function G(t,n,e,r){this.h=+t,this.c=+n,this.l=+e,this.opacity=+r}r(R,I,i(o,{brighter:function(t){return new R(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new R(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,n=isNaN(this.a)?t:t+this.a/500,e=isNaN(this.b)?t:t-this.b/200;return t=E*H(t),new M(Y(3.2404542*(n=j*H(n))-1.5371385*t-.4985314*(e=N*H(e))),Y(-.969266*n+1.8760108*t+.041556*e),Y(.0556434*n-.2040259*t+1.0572252*e),this.opacity)}})),r(G,q,i(o,{brighter:function(t){return new G(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new G(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return L(this).rgb()}}));var $=-.14861,X=1.78277,V=-.29227,Z=-.90649,W=1.97294,J=W*Z,K=W*X,Q=X*V-Z*$;function tt(t,n,e,r){return 1===arguments.length?function(t){if(t instanceof nt)return new nt(t.h,t.s,t.l,t.opacity);t instanceof M||(t=b(t));var n=t.r/255,e=t.g/255,r=t.b/255,i=(Q*r+J*n-K*e)/(Q+J-K),o=r-i,u=(W*(e-i)-V*o)/Z,a=Math.sqrt(u*u+o*o)/(W*i*(1-i)),c=a?Math.atan2(u,o)*S-120:NaN;return new nt(c<0?c+360:c,a,i,t.opacity)}(t):new nt(t,n,e,null==r?1:r)}function nt(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}r(nt,tt,i(o,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new nt(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new nt(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*C,n=+this.l,e=isNaN(this.s)?0:this.s*n*(1-n),r=Math.cos(t),i=Math.sin(t);return new M(255*(n+e*($*r+X*i)),255*(n+e*(V*r+Z*i)),255*(n+e*(W*r)),this.opacity)}})),e.d(n,"a",function(){return v}),e.d(n,"f",function(){return w}),e.d(n,"d",function(){return A}),e.d(n,"e",function(){return I}),e.d(n,"c",function(){return q}),e.d(n,"b",function(){return tt})},function(t,n,e){"use strict";var r=e(3);function i(t,n,e,r,i){var o=t*t,u=o*t;return((1-3*t+3*o-u)*n+(4-6*o+3*u)*e+(1+3*t+3*o-3*u)*r+u*i)/6}var o=function(t){return function(){return t}};function u(t,n){return function(e){return t+e*n}}function a(t,n){var e=n-t;return e?u(t,e>180||e<-180?e-360*Math.round(e/360):e):o(isNaN(t)?n:t)}function c(t){return 1==(t=+t)?s:function(n,e){return e-n?function(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(r){return Math.pow(t+r*n,e)}}(n,e,t):o(isNaN(n)?e:n)}}function s(t,n){var e=n-t;return e?u(t,e):o(isNaN(t)?n:t)}var l=function t(n){var e=c(n);function i(t,n){var i=e((t=Object(r.f)(t)).r,(n=Object(r.f)(n)).r),o=e(t.g,n.g),u=e(t.b,n.b),a=s(t.opacity,n.opacity);return function(n){return t.r=i(n),t.g=o(n),t.b=u(n),t.opacity=a(n),t+""}}return i.gamma=t,i}(1);function f(t){return function(n){var e,i,o=n.length,u=new Array(o),a=new Array(o),c=new Array(o);for(e=0;e<o;++e)i=Object(r.f)(n[e]),u[e]=i.r||0,a[e]=i.g||0,c[e]=i.b||0;return u=t(u),a=t(a),c=t(c),i.opacity=1,function(t){return i.r=u(t),i.g=a(t),i.b=c(t),i+""}}}f(function(t){var n=t.length-1;return function(e){var r=e<=0?e=0:e>=1?(e=1,n-1):Math.floor(e*n),o=t[r],u=t[r+1],a=r>0?t[r-1]:2*o-u,c=r<n-1?t[r+2]:2*u-o;return i((e-r/n)*n,a,o,u,c)}}),f(function(t){var n=t.length;return function(e){var r=Math.floor(((e%=1)<0?++e:e)*n),o=t[(r+n-1)%n],u=t[r%n],a=t[(r+1)%n],c=t[(r+2)%n];return i((e-r/n)*n,o,u,a,c)}});var h=function(t,n){return n-=t=+t,function(e){return t+n*e}},p=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,_=new RegExp(p.source,"g");var d,y,g,v,x=function(t,n){var e,r,i,o=p.lastIndex=_.lastIndex=0,u=-1,a=[],c=[];for(t+="",n+="";(e=p.exec(t))&&(r=_.exec(n));)(i=r.index)>o&&(i=n.slice(o,i),a[u]?a[u]+=i:a[++u]=i),(e=e[0])===(r=r[0])?a[u]?a[u]+=r:a[++u]=r:(a[++u]=null,c.push({i:u,x:h(e,r)})),o=_.lastIndex;return o<n.length&&(i=n.slice(o),a[u]?a[u]+=i:a[++u]=i),a.length<2?c[0]?function(t){return function(n){return t(n)+""}}(c[0].x):function(t){return function(){return t}}(n):(n=c.length,function(t){for(var e,r=0;r<n;++r)a[(e=c[r]).i]=e.x(t);return a.join("")})},m=function(t,n){var e,i=typeof n;return null==n||"boolean"===i?o(n):("number"===i?h:"string"===i?(e=Object(r.a)(n))?(n=e,l):x:n instanceof r.a?l:n instanceof Date?function(t,n){var e=new Date;return n-=t=+t,function(r){return e.setTime(t+n*r),e}}:Array.isArray(n)?function(t,n){var e,r=n?n.length:0,i=t?Math.min(r,t.length):0,o=new Array(r),u=new Array(r);for(e=0;e<i;++e)o[e]=m(t[e],n[e]);for(;e<r;++e)u[e]=n[e];return function(t){for(e=0;e<i;++e)u[e]=o[e](t);return u}}:"function"!=typeof n.valueOf&&"function"!=typeof n.toString||isNaN(n)?function(t,n){var e,r={},i={};for(e in null!==t&&"object"==typeof t||(t={}),null!==n&&"object"==typeof n||(n={}),n)e in t?r[e]=m(t[e],n[e]):i[e]=n[e];return function(t){for(e in r)i[e]=r[e](t);return i}}:h)(t,n)},b=function(t,n){return n-=t=+t,function(e){return Math.round(t+n*e)}},w=180/Math.PI,M={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},T=function(t,n,e,r,i,o){var u,a,c;return(u=Math.sqrt(t*t+n*n))&&(t/=u,n/=u),(c=t*e+n*r)&&(e-=t*c,r-=n*c),(a=Math.sqrt(e*e+r*r))&&(e/=a,r/=a,c/=a),t*r<n*e&&(t=-t,n=-n,c=-c,u=-u),{translateX:i,translateY:o,rotate:Math.atan2(n,t)*w,skewX:Math.atan(c)*w,scaleX:u,scaleY:a}};function A(t,n,e,r){function i(t){return t.length?t.pop()+" ":""}return function(o,u){var a=[],c=[];return o=t(o),u=t(u),function(t,r,i,o,u,a){if(t!==i||r!==o){var c=u.push("translate(",null,n,null,e);a.push({i:c-4,x:h(t,i)},{i:c-2,x:h(r,o)})}else(i||o)&&u.push("translate("+i+n+o+e)}(o.translateX,o.translateY,u.translateX,u.translateY,a,c),function(t,n,e,o){t!==n?(t-n>180?n+=360:n-t>180&&(t+=360),o.push({i:e.push(i(e)+"rotate(",null,r)-2,x:h(t,n)})):n&&e.push(i(e)+"rotate("+n+r)}(o.rotate,u.rotate,a,c),function(t,n,e,o){t!==n?o.push({i:e.push(i(e)+"skewX(",null,r)-2,x:h(t,n)}):n&&e.push(i(e)+"skewX("+n+r)}(o.skewX,u.skewX,a,c),function(t,n,e,r,o,u){if(t!==e||n!==r){var a=o.push(i(o)+"scale(",null,",",null,")");u.push({i:a-4,x:h(t,e)},{i:a-2,x:h(n,r)})}else 1===e&&1===r||o.push(i(o)+"scale("+e+","+r+")")}(o.scaleX,o.scaleY,u.scaleX,u.scaleY,a,c),o=u=null,function(t){for(var n,e=-1,r=c.length;++e<r;)a[(n=c[e]).i]=n.x(t);return a.join("")}}}var k=A(function(t){return"none"===t?M:(d||(d=document.createElement("DIV"),y=document.documentElement,g=document.defaultView),d.style.transform=t,t=g.getComputedStyle(y.appendChild(d),null).getPropertyValue("transform"),y.removeChild(d),t=t.slice(7,-1).split(","),T(+t[0],+t[1],+t[2],+t[3],+t[4],+t[5]))},"px, ","px)","deg)"),O=A(function(t){return null==t?M:(v||(v=document.createElementNS("http://www.w3.org/2000/svg","g")),v.setAttribute("transform",t),(t=v.transform.baseVal.consolidate())?(t=t.matrix,T(t.a,t.b,t.c,t.d,t.e,t.f)):M)},", ",")",")");Math.SQRT2;function C(t){return function(n,e){var i=t((n=Object(r.d)(n)).h,(e=Object(r.d)(e)).h),o=s(n.s,e.s),u=s(n.l,e.l),a=s(n.opacity,e.opacity);return function(t){return n.h=i(t),n.s=o(t),n.l=u(t),n.opacity=a(t),n+""}}}C(a),C(s);function S(t){return function(n,e){var i=t((n=Object(r.c)(n)).h,(e=Object(r.c)(e)).h),o=s(n.c,e.c),u=s(n.l,e.l),a=s(n.opacity,e.opacity);return function(t){return n.h=i(t),n.c=o(t),n.l=u(t),n.opacity=a(t),n+""}}}var j=S(a);S(s);function E(t){return function n(e){function i(n,i){var o=t((n=Object(r.b)(n)).h,(i=Object(r.b)(i)).h),u=s(n.s,i.s),a=s(n.l,i.l),c=s(n.opacity,i.opacity);return function(t){return n.h=o(t),n.s=u(t),n.l=a(Math.pow(t,e)),n.opacity=c(t),n+""}}return e=+e,i.gamma=n,i}(1)}E(a),E(s);e.d(n,"a",function(){return m}),e.d(n,"c",function(){return h}),e.d(n,"e",function(){return b}),e.d(n,"f",function(){return x}),e.d(n,"g",function(){return k}),e.d(n,"h",function(){return O}),e.d(n,"d",function(){return l}),e.d(n,"b",function(){return j})},function(t,n,e){"use strict";var r,i=function(t,n){if((e=(t=n?t.toExponential(n-1):t.toExponential()).indexOf("e"))<0)return null;var e,r=t.slice(0,e);return[r.length>1?r[0]+r.slice(2):r,+t.slice(e+1)]},o=function(t){return(t=i(Math.abs(t)))?t[1]:NaN},u=function(t,n){var e=i(t,n);if(!e)return t+"";var r=e[0],o=e[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")},a={"":function(t,n){t:for(var e,r=(t=t.toPrecision(n)).length,i=1,o=-1;i<r;++i)switch(t[i]){case".":o=e=i;break;case"0":0===o&&(o=i),e=i;break;case"e":break t;default:o>0&&(o=0)}return o>0?t.slice(0,o)+t.slice(e+1):t},"%":function(t,n){return(100*t).toFixed(n)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,n){return t.toExponential(n)},f:function(t,n){return t.toFixed(n)},g:function(t,n){return t.toPrecision(n)},o:function(t){return Math.round(t).toString(8)},p:function(t,n){return u(100*t,n)},r:u,s:function(t,n){var e=i(t,n);if(!e)return t+"";var o=e[0],u=e[1],a=u-(r=3*Math.max(-8,Math.min(8,Math.floor(u/3))))+1,c=o.length;return a===c?o:a>c?o+new Array(a-c+1).join("0"):a>0?o.slice(0,a)+"."+o.slice(a):"0."+new Array(1-a).join("0")+i(t,Math.max(0,n+a-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},c=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?([a-z%])?$/i;function s(t){return new l(t)}function l(t){if(!(n=c.exec(t)))throw new Error("invalid format: "+t);var n,e=n[1]||" ",r=n[2]||">",i=n[3]||"-",o=n[4]||"",u=!!n[5],s=n[6]&&+n[6],l=!!n[7],f=n[8]&&+n[8].slice(1),h=n[9]||"";"n"===h?(l=!0,h="g"):a[h]||(h=""),(u||"0"===e&&"="===r)&&(u=!0,e="0",r="="),this.fill=e,this.align=r,this.sign=i,this.symbol=o,this.zero=u,this.width=s,this.comma=l,this.precision=f,this.type=h}s.prototype=l.prototype,l.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+this.type};var f,h,p,_=function(t){return t},d=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];f=function(t){var n,e,i=t.grouping&&t.thousands?(n=t.grouping,e=t.thousands,function(t,r){for(var i=t.length,o=[],u=0,a=n[0],c=0;i>0&&a>0&&(c+a+1>r&&(a=Math.max(1,r-c)),o.push(t.substring(i-=a,i+a)),!((c+=a+1)>r));)a=n[u=(u+1)%n.length];return o.reverse().join(e)}):_,u=t.currency,c=t.decimal,l=t.numerals?function(t){return function(n){return n.replace(/[0-9]/g,function(n){return t[+n]})}}(t.numerals):_,f=t.percent||"%";function h(t){var n=(t=s(t)).fill,e=t.align,o=t.sign,h=t.symbol,p=t.zero,_=t.width,y=t.comma,g=t.precision,v=t.type,x="$"===h?u[0]:"#"===h&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",m="$"===h?u[1]:/[%p]/.test(v)?f:"",b=a[v],w=!v||/[defgprs%]/.test(v);function M(t){var u,a,s,f=x,h=m;if("c"===v)h=b(t)+h,t="";else{var M=(t=+t)<0;if(t=b(Math.abs(t),g),M&&0==+t&&(M=!1),f=(M?"("===o?o:"-":"-"===o||"("===o?"":o)+f,h=h+("s"===v?d[8+r/3]:"")+(M&&"("===o?")":""),w)for(u=-1,a=t.length;++u<a;)if(48>(s=t.charCodeAt(u))||s>57){h=(46===s?c+t.slice(u+1):t.slice(u))+h,t=t.slice(0,u);break}}y&&!p&&(t=i(t,1/0));var T=f.length+t.length+h.length,A=T<_?new Array(_-T+1).join(n):"";switch(y&&p&&(t=i(A+t,A.length?_-h.length:1/0),A=""),e){case"<":t=f+t+h+A;break;case"=":t=f+A+t+h;break;case"^":t=A.slice(0,T=A.length>>1)+f+t+h+A.slice(T);break;default:t=A+f+t+h}return l(t)}return g=null==g?v?6:12:/[gprs]/.test(v)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),M.toString=function(){return t+""},M}return{format:h,formatPrefix:function(t,n){var e=h(((t=s(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(o(n)/3))),i=Math.pow(10,-r),u=d[8+r/3];return function(t){return e(i*t)+u}}}}({decimal:".",thousands:",",grouping:[3],currency:["$",""]}),h=f.format,p=f.formatPrefix;var y=function(t){return Math.max(0,-o(Math.abs(t)))},g=function(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(o(n)/3)))-o(Math.abs(t)))},v=function(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,o(n)-o(t))+1};e.d(n,"a",function(){return h}),e.d(n,"b",function(){return p}),e.d(n,"c",function(){return s}),e.d(n,"d",function(){return y}),e.d(n,"e",function(){return g}),e.d(n,"f",function(){return v})},function(t,n,e){"use strict";var r=e(0);function i(t){if(0<=t.y&&t.y<100){var n=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return n.setFullYear(t.y),n}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function o(t){if(0<=t.y&&t.y<100){var n=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return n.setUTCFullYear(t.y),n}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function u(t){return{y:t,m:0,d:1,H:0,M:0,S:0,L:0}}var a,c,s,l,f={"-":"",_:" ",0:"0"},h=/^\s*\d+/,p=/^%/,_=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;function d(t,n,e){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o<e?new Array(e-o+1).join(n)+i:i)}function y(t){return t.replace(_,"\\$&")}function g(t){return new RegExp("^(?:"+t.map(y).join("|")+")","i")}function v(t){for(var n={},e=-1,r=t.length;++e<r;)n[t[e].toLowerCase()]=e;return n}function x(t,n,e){var r=h.exec(n.slice(e,e+1));return r?(t.w=+r[0],e+r[0].length):-1}function m(t,n,e){var r=h.exec(n.slice(e));return r?(t.U=+r[0],e+r[0].length):-1}function b(t,n,e){var r=h.exec(n.slice(e));return r?(t.W=+r[0],e+r[0].length):-1}function w(t,n,e){var r=h.exec(n.slice(e,e+4));return r?(t.y=+r[0],e+r[0].length):-1}function M(t,n,e){var r=h.exec(n.slice(e,e+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),e+r[0].length):-1}function T(t,n,e){var r=/^(Z)|([+-]\d\d)(?:\:?(\d\d))?/.exec(n.slice(e,e+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),e+r[0].length):-1}function A(t,n,e){var r=h.exec(n.slice(e,e+2));return r?(t.m=r[0]-1,e+r[0].length):-1}function k(t,n,e){var r=h.exec(n.slice(e,e+2));return r?(t.d=+r[0],e+r[0].length):-1}function O(t,n,e){var r=h.exec(n.slice(e,e+3));return r?(t.m=0,t.d=+r[0],e+r[0].length):-1}function C(t,n,e){var r=h.exec(n.slice(e,e+2));return r?(t.H=+r[0],e+r[0].length):-1}function S(t,n,e){var r=h.exec(n.slice(e,e+2));return r?(t.M=+r[0],e+r[0].length):-1}function j(t,n,e){var r=h.exec(n.slice(e,e+2));return r?(t.S=+r[0],e+r[0].length):-1}function E(t,n,e){var r=h.exec(n.slice(e,e+3));return r?(t.L=+r[0],e+r[0].length):-1}function N(t,n,e){var r=p.exec(n.slice(e,e+1));return r?e+r[0].length:-1}function D(t,n){return d(t.getDate(),n,2)}function P(t,n){return d(t.getHours(),n,2)}function F(t,n){return d(t.getHours()%12||12,n,2)}function U(t,n){return d(1+r.a.count(Object(r.o)(t),t),n,3)}function L(t,n){return d(t.getMilliseconds(),n,3)}function I(t,n){return d(t.getMonth()+1,n,2)}function R(t,n){return d(t.getMinutes(),n,2)}function B(t,n){return d(t.getSeconds(),n,2)}function H(t,n){return d(r.j.count(Object(r.o)(t),t),n,2)}function Y(t){return t.getDay()}function z(t,n){return d(r.f.count(Object(r.o)(t),t),n,2)}function q(t,n){return d(t.getFullYear()%100,n,2)}function G(t,n){return d(t.getFullYear()%1e4,n,4)}function $(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+d(n/60|0,"0",2)+d(n%60,"0",2)}function X(t,n){return d(t.getUTCDate(),n,2)}function V(t,n){return d(t.getUTCHours(),n,2)}function Z(t,n){return d(t.getUTCHours()%12||12,n,2)}function W(t,n){return d(1+r.p.count(Object(r.D)(t),t),n,3)}function J(t,n){return d(t.getUTCMilliseconds(),n,3)}function K(t,n){return d(t.getUTCMonth()+1,n,2)}function Q(t,n){return d(t.getUTCMinutes(),n,2)}function tt(t,n){return d(t.getUTCSeconds(),n,2)}function nt(t,n){return d(r.y.count(Object(r.D)(t),t),n,2)}function et(t){return t.getUTCDay()}function rt(t,n){return d(r.u.count(Object(r.D)(t),t),n,2)}function it(t,n){return d(t.getUTCFullYear()%100,n,2)}function ot(t,n){return d(t.getUTCFullYear()%1e4,n,4)}function ut(){return"+0000"}function at(){return"%"}a=function(t){var n=t.dateTime,e=t.date,r=t.time,a=t.periods,c=t.days,s=t.shortDays,l=t.months,h=t.shortMonths,p=g(a),_=v(a),d=g(c),y=v(c),ct=g(s),st=v(s),lt=g(l),ft=v(l),ht=g(h),pt=v(h),_t={a:function(t){return s[t.getDay()]},A:function(t){return c[t.getDay()]},b:function(t){return h[t.getMonth()]},B:function(t){return l[t.getMonth()]},c:null,d:D,e:D,H:P,I:F,j:U,L:L,m:I,M:R,p:function(t){return a[+(t.getHours()>=12)]},S:B,U:H,w:Y,W:z,x:null,X:null,y:q,Y:G,Z:$,"%":at},dt={a:function(t){return s[t.getUTCDay()]},A:function(t){return c[t.getUTCDay()]},b:function(t){return h[t.getUTCMonth()]},B:function(t){return l[t.getUTCMonth()]},c:null,d:X,e:X,H:V,I:Z,j:W,L:J,m:K,M:Q,p:function(t){return a[+(t.getUTCHours()>=12)]},S:tt,U:nt,w:et,W:rt,x:null,X:null,y:it,Y:ot,Z:ut,"%":at},yt={a:function(t,n,e){var r=ct.exec(n.slice(e));return r?(t.w=st[r[0].toLowerCase()],e+r[0].length):-1},A:function(t,n,e){var r=d.exec(n.slice(e));return r?(t.w=y[r[0].toLowerCase()],e+r[0].length):-1},b:function(t,n,e){var r=ht.exec(n.slice(e));return r?(t.m=pt[r[0].toLowerCase()],e+r[0].length):-1},B:function(t,n,e){var r=lt.exec(n.slice(e));return r?(t.m=ft[r[0].toLowerCase()],e+r[0].length):-1},c:function(t,e,r){return xt(t,n,e,r)},d:k,e:k,H:C,I:C,j:O,L:E,m:A,M:S,p:function(t,n,e){var r=p.exec(n.slice(e));return r?(t.p=_[r[0].toLowerCase()],e+r[0].length):-1},S:j,U:m,w:x,W:b,x:function(t,n,r){return xt(t,e,n,r)},X:function(t,n,e){return xt(t,r,n,e)},y:M,Y:w,Z:T,"%":N};function gt(t,n){return function(e){var r,i,o,u=[],a=-1,c=0,s=t.length;for(e instanceof Date||(e=new Date(+e));++a<s;)37===t.charCodeAt(a)&&(u.push(t.slice(c,a)),null!=(i=f[r=t.charAt(++a)])?r=t.charAt(++a):i="e"===r?" ":"0",(o=n[r])&&(r=o(e,i)),u.push(r),c=a+1);return u.push(t.slice(c,a)),u.join("")}}function vt(t,n){return function(e){var r=u(1900);if(xt(r,t,e+="",0)!=e.length)return null;if("p"in r&&(r.H=r.H%12+12*r.p),"W"in r||"U"in r){"w"in r||(r.w="W"in r?1:0);var i="Z"in r?o(u(r.y)).getUTCDay():n(u(r.y)).getDay();r.m=0,r.d="W"in r?(r.w+6)%7+7*r.W-(i+5)%7:r.w+7*r.U-(i+6)%7}return"Z"in r?(r.H+=r.Z/100|0,r.M+=r.Z%100,o(r)):n(r)}}function xt(t,n,e,r){for(var i,o,u=0,a=n.length,c=e.length;u<a;){if(r>=c)return-1;if(37===(i=n.charCodeAt(u++))){if(i=n.charAt(u++),!(o=yt[i in f?n.charAt(u++):i])||(r=o(t,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}return _t.x=gt(e,_t),_t.X=gt(r,_t),_t.c=gt(n,_t),dt.x=gt(e,dt),dt.X=gt(r,dt),dt.c=gt(n,dt),{format:function(t){var n=gt(t+="",_t);return n.toString=function(){return t},n},parse:function(t){var n=vt(t+="",i);return n.toString=function(){return t},n},utcFormat:function(t){var n=gt(t+="",dt);return n.toString=function(){return t},n},utcParse:function(t){var n=vt(t,o);return n.toString=function(){return t},n}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),c=a.format,a.parse,s=a.utcFormat,l=a.utcParse;Date.prototype.toISOString||s("%Y-%m-%dT%H:%M:%S.%LZ");+new Date("2000-01-01T00:00:00.000Z")||l("%Y-%m-%dT%H:%M:%S.%LZ");e.d(n,"a",function(){return c}),e.d(n,"b",function(){return s})},function(t,n,e){"use strict";var r=Math.PI,i=2*r,o=i-1e-6;function u(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function a(){return new u}u.prototype=a.prototype={constructor:u,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,e,r){this._+="Q"+ +t+","+ +n+","+(this._x1=+e)+","+(this._y1=+r)},bezierCurveTo:function(t,n,e,r,i,o){this._+="C"+ +t+","+ +n+","+ +e+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(t,n,e,i,o){t=+t,n=+n,e=+e,i=+i,o=+o;var u=this._x1,a=this._y1,c=e-t,s=i-n,l=u-t,f=a-n,h=l*l+f*f;if(o<0)throw new Error("negative radius: "+o);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(h>1e-6)if(Math.abs(f*c-s*l)>1e-6&&o){var p=e-u,_=i-a,d=c*c+s*s,y=p*p+_*_,g=Math.sqrt(d),v=Math.sqrt(h),x=o*Math.tan((r-Math.acos((d+h-y)/(2*g*v)))/2),m=x/v,b=x/g;Math.abs(m-1)>1e-6&&(this._+="L"+(t+m*l)+","+(n+m*f)),this._+="A"+o+","+o+",0,0,"+ +(f*p>l*_)+","+(this._x1=t+b*c)+","+(this._y1=n+b*s)}else this._+="L"+(this._x1=t)+","+(this._y1=n);else;},arc:function(t,n,e,u,a,c){t=+t,n=+n;var s=(e=+e)*Math.cos(u),l=e*Math.sin(u),f=t+s,h=n+l,p=1^c,_=c?u-a:a-u;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+f+","+h:(Math.abs(this._x1-f)>1e-6||Math.abs(this._y1-h)>1e-6)&&(this._+="L"+f+","+h),e&&(_<0&&(_=_%i+i),_>o?this._+="A"+e+","+e+",0,1,"+p+","+(t-s)+","+(n-l)+"A"+e+","+e+",0,1,"+p+","+(this._x1=f)+","+(this._y1=h):_>1e-6&&(this._+="A"+e+","+e+",0,"+ +(_>=r)+","+p+","+(this._x1=t+e*Math.cos(a))+","+(this._y1=n+e*Math.sin(a))))},rect:function(t,n,e,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +r+"h"+-e+"Z"},toString:function(){return this._}};var c=a,s=function(t){return function(){return t}},l=Math.abs,f=Math.atan2,h=Math.cos,p=Math.max,_=Math.min,d=Math.sin,y=Math.sqrt,g=1e-12,v=Math.PI,x=v/2,m=2*v;function b(t){return t>=1?x:t<=-1?-x:Math.asin(t)}function w(t){return t.innerRadius}function M(t){return t.outerRadius}function T(t){return t.startAngle}function A(t){return t.endAngle}function k(t){return t&&t.padAngle}function O(t,n,e,r,i,o,u){var a=t-e,c=n-r,s=(u?o:-o)/y(a*a+c*c),l=s*c,f=-s*a,h=t+l,_=n+f,d=e+l,g=r+f,v=(h+d)/2,x=(_+g)/2,m=d-h,b=g-_,w=m*m+b*b,M=i-o,T=h*g-d*_,A=(b<0?-1:1)*y(p(0,M*M*w-T*T)),k=(T*b-m*A)/w,O=(-T*m-b*A)/w,C=(T*b+m*A)/w,S=(-T*m+b*A)/w,j=k-v,E=O-x,N=C-v,D=S-x;return j*j+E*E>N*N+D*D&&(k=C,O=S),{cx:k,cy:O,x01:-l,y01:-f,x11:k*(i/M-1),y11:O*(i/M-1)}}var C=function(){var t=w,n=M,e=s(0),r=null,i=T,o=A,u=k,a=null;function p(){var s,p,w,M=+t.apply(this,arguments),T=+n.apply(this,arguments),A=i.apply(this,arguments)-x,k=o.apply(this,arguments)-x,C=l(k-A),S=k>A;if(a||(a=s=c()),T<M&&(p=T,T=M,M=p),T>g)if(C>m-g)a.moveTo(T*h(A),T*d(A)),a.arc(0,0,T,A,k,!S),M>g&&(a.moveTo(M*h(k),M*d(k)),a.arc(0,0,M,k,A,S));else{var j,E,N=A,D=k,P=A,F=k,U=C,L=C,I=u.apply(this,arguments)/2,R=I>g&&(r?+r.apply(this,arguments):y(M*M+T*T)),B=_(l(T-M)/2,+e.apply(this,arguments)),H=B,Y=B;if(R>g){var z=b(R/M*d(I)),q=b(R/T*d(I));(U-=2*z)>g?(P+=z*=S?1:-1,F-=z):(U=0,P=F=(A+k)/2),(L-=2*q)>g?(N+=q*=S?1:-1,D-=q):(L=0,N=D=(A+k)/2)}var G=T*h(N),$=T*d(N),X=M*h(F),V=M*d(F);if(B>g){var Z=T*h(D),W=T*d(D),J=M*h(P),K=M*d(P);if(C<v){var Q=U>g?function(t,n,e,r,i,o,u,a){var c=e-t,s=r-n,l=u-i,f=a-o,h=(l*(n-o)-f*(t-i))/(f*c-l*s);return[t+h*c,n+h*s]}(G,$,J,K,Z,W,X,V):[X,V],tt=G-Q[0],nt=$-Q[1],et=Z-Q[0],rt=W-Q[1],it=1/d(((w=(tt*et+nt*rt)/(y(tt*tt+nt*nt)*y(et*et+rt*rt)))>1?0:w<-1?v:Math.acos(w))/2),ot=y(Q[0]*Q[0]+Q[1]*Q[1]);H=_(B,(M-ot)/(it-1)),Y=_(B,(T-ot)/(it+1))}}L>g?Y>g?(j=O(J,K,G,$,T,Y,S),E=O(Z,W,X,V,T,Y,S),a.moveTo(j.cx+j.x01,j.cy+j.y01),Y<B?a.arc(j.cx,j.cy,Y,f(j.y01,j.x01),f(E.y01,E.x01),!S):(a.arc(j.cx,j.cy,Y,f(j.y01,j.x01),f(j.y11,j.x11),!S),a.arc(0,0,T,f(j.cy+j.y11,j.cx+j.x11),f(E.cy+E.y11,E.cx+E.x11),!S),a.arc(E.cx,E.cy,Y,f(E.y11,E.x11),f(E.y01,E.x01),!S))):(a.moveTo(G,$),a.arc(0,0,T,N,D,!S)):a.moveTo(G,$),M>g&&U>g?H>g?(j=O(X,V,Z,W,M,-H,S),E=O(G,$,J,K,M,-H,S),a.lineTo(j.cx+j.x01,j.cy+j.y01),H<B?a.arc(j.cx,j.cy,H,f(j.y01,j.x01),f(E.y01,E.x01),!S):(a.arc(j.cx,j.cy,H,f(j.y01,j.x01),f(j.y11,j.x11),!S),a.arc(0,0,M,f(j.cy+j.y11,j.cx+j.x11),f(E.cy+E.y11,E.cx+E.x11),S),a.arc(E.cx,E.cy,H,f(E.y11,E.x11),f(E.y01,E.x01),!S))):a.arc(0,0,M,F,P,S):a.lineTo(X,V)}else a.moveTo(0,0);if(a.closePath(),s)return a=null,s+""||null}return p.centroid=function(){var e=(+t.apply(this,arguments)+ +n.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-v/2;return[h(r)*e,d(r)*e]},p.innerRadius=function(n){return arguments.length?(t="function"==typeof n?n:s(+n),p):t},p.outerRadius=function(t){return arguments.length?(n="function"==typeof t?t:s(+t),p):n},p.cornerRadius=function(t){return arguments.length?(e="function"==typeof t?t:s(+t),p):e},p.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:s(+t),p):r},p.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:s(+t),p):i},p.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:s(+t),p):o},p.padAngle=function(t){return arguments.length?(u="function"==typeof t?t:s(+t),p):u},p.context=function(t){return arguments.length?(a=null==t?null:t,p):a},p};function S(t){this._context=t}S.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._context.lineTo(t,n)}}};var j=function(t){return new S(t)};function E(t){return t[0]}function N(t){return t[1]}var D=function(){var t=E,n=N,e=s(!0),r=null,i=j,o=null;function u(u){var a,s,l,f=u.length,h=!1;for(null==r&&(o=i(l=c())),a=0;a<=f;++a)!(a<f&&e(s=u[a],a,u))===h&&((h=!h)?o.lineStart():o.lineEnd()),h&&o.point(+t(s,a,u),+n(s,a,u));if(l)return o=null,l+""||null}return u.x=function(n){return arguments.length?(t="function"==typeof n?n:s(+n),u):t},u.y=function(t){return arguments.length?(n="function"==typeof t?t:s(+t),u):n},u.defined=function(t){return arguments.length?(e="function"==typeof t?t:s(!!t),u):e},u.curve=function(t){return arguments.length?(i=t,null!=r&&(o=i(r)),u):i},u.context=function(t){return arguments.length?(null==t?r=o=null:o=i(r=t),u):r},u},P=function(){var t=E,n=null,e=s(0),r=N,i=s(!0),o=null,u=j,a=null;function l(s){var l,f,h,p,_,d=s.length,y=!1,g=new Array(d),v=new Array(d);for(null==o&&(a=u(_=c())),l=0;l<=d;++l){if(!(l<d&&i(p=s[l],l,s))===y)if(y=!y)f=l,a.areaStart(),a.lineStart();else{for(a.lineEnd(),a.lineStart(),h=l-1;h>=f;--h)a.point(g[h],v[h]);a.lineEnd(),a.areaEnd()}y&&(g[l]=+t(p,l,s),v[l]=+e(p,l,s),a.point(n?+n(p,l,s):g[l],r?+r(p,l,s):v[l]))}if(_)return a=null,_+""||null}function f(){return D().defined(i).curve(u).context(o)}return l.x=function(e){return arguments.length?(t="function"==typeof e?e:s(+e),n=null,l):t},l.x0=function(n){return arguments.length?(t="function"==typeof n?n:s(+n),l):t},l.x1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:s(+t),l):n},l.y=function(t){return arguments.length?(e="function"==typeof t?t:s(+t),r=null,l):e},l.y0=function(t){return arguments.length?(e="function"==typeof t?t:s(+t),l):e},l.y1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:s(+t),l):r},l.lineX0=l.lineY0=function(){return f().x(t).y(e)},l.lineY1=function(){return f().x(t).y(r)},l.lineX1=function(){return f().x(n).y(e)},l.defined=function(t){return arguments.length?(i="function"==typeof t?t:s(!!t),l):i},l.curve=function(t){return arguments.length?(u=t,null!=o&&(a=u(o)),l):u},l.context=function(t){return arguments.length?(null==t?o=a=null:a=u(o=t),l):o},l},F=function(t,n){return n<t?-1:n>t?1:n>=t?0:NaN},U=function(t){return t},L=function(){var t=U,n=F,e=null,r=s(0),i=s(m),o=s(0);function u(u){var a,c,s,l,f,h=u.length,p=0,_=new Array(h),d=new Array(h),y=+r.apply(this,arguments),g=Math.min(m,Math.max(-m,i.apply(this,arguments)-y)),v=Math.min(Math.abs(g)/h,o.apply(this,arguments)),x=v*(g<0?-1:1);for(a=0;a<h;++a)(f=d[_[a]=a]=+t(u[a],a,u))>0&&(p+=f);for(null!=n?_.sort(function(t,e){return n(d[t],d[e])}):null!=e&&_.sort(function(t,n){return e(u[t],u[n])}),a=0,s=p?(g-h*x)/p:0;a<h;++a,y=l)c=_[a],l=y+((f=d[c])>0?f*s:0)+x,d[c]={data:u[c],index:a,value:f,startAngle:y,endAngle:l,padAngle:v};return d}return u.value=function(n){return arguments.length?(t="function"==typeof n?n:s(+n),u):t},u.sortValues=function(t){return arguments.length?(n=t,e=null,u):n},u.sort=function(t){return arguments.length?(e=t,n=null,u):e},u.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:s(+t),u):r},u.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:s(+t),u):i},u.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:s(+t),u):o},u};R(j);function I(t){this._curve=t}function R(t){function n(n){return new I(t(n))}return n._curve=t,n}I.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,n){this._curve.point(n*Math.sin(t),n*-Math.cos(t))}};var B=Array.prototype.slice;Math.sqrt(1/3);var H=Math.sin(v/10)/Math.sin(7*v/10),Y=(Math.sin(m/10),Math.cos(m/10),Math.sqrt(3),Math.sqrt(3),Math.sqrt(12),function(){});function z(t,n,e){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+n)/6,(t._y0+4*t._y1+e)/6)}function q(t){this._context=t}q.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:z(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:z(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};var G=function(t){return new q(t)};function $(t){this._context=t}$.prototype={areaStart:Y,areaEnd:Y,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x2=t,this._y2=n;break;case 1:this._point=2,this._x3=t,this._y3=n;break;case 2:this._point=3,this._x4=t,this._y4=n,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+n)/6);break;default:z(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};function X(t){this._context=t}X.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var e=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+n)/6;this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break;case 3:this._point=4;default:z(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};function V(t,n){this._basis=new q(t),this._beta=n}V.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,n=this._y,e=t.length-1;if(e>0)for(var r,i=t[0],o=n[0],u=t[e]-i,a=n[e]-o,c=-1;++c<=e;)r=c/e,this._basis.point(this._beta*t[c]+(1-this._beta)*(i+r*u),this._beta*n[c]+(1-this._beta)*(o+r*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,n){this._x.push(+t),this._y.push(+n)}};(function t(n){function e(t){return 1===n?new q(t):new V(t,n)}return e.beta=function(n){return t(+n)},e})(.85);function Z(t,n,e){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-e),t._x2,t._y2)}function W(t,n){this._context=t,this._k=(1-n)/6}W.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Z(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:Z(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var J=function t(n){function e(t){return new W(t,n)}return e.tension=function(n){return t(+n)},e}(0);function K(t,n){this._context=t,this._k=(1-n)/6}K.prototype={areaStart:Y,areaEnd:Y,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:Z(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};(function t(n){function e(t){return new K(t,n)}return e.tension=function(n){return t(+n)},e})(0);function Q(t,n){this._context=t,this._k=(1-n)/6}Q.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Z(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};(function t(n){function e(t){return new Q(t,n)}return e.tension=function(n){return t(+n)},e})(0);function tt(t,n,e){var r=t._x1,i=t._y1,o=t._x2,u=t._y2;if(t._l01_a>g){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>g){var s=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,l=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*s+t._x1*t._l23_2a-n*t._l12_2a)/l,u=(u*s+t._y1*t._l23_2a-e*t._l12_2a)/l}t._context.bezierCurveTo(r,i,o,u,t._x2,t._y2)}function nt(t,n){this._context=t,this._alpha=n}nt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3;default:tt(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var et=function t(n){function e(t){return n?new nt(t,n):new W(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function rt(t,n){this._context=t,this._alpha=n}rt.prototype={areaStart:Y,areaEnd:Y,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:tt(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};(function t(n){function e(t){return n?new rt(t,n):new K(t,0)}return e.alpha=function(n){return t(+n)},e})(.5);function it(t,n){this._context=t,this._alpha=n}it.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:tt(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};(function t(n){function e(t){return n?new it(t,n):new Q(t,0)}return e.alpha=function(n){return t(+n)},e})(.5);function ot(t){this._context=t}ot.prototype={areaStart:Y,areaEnd:Y,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,n){t=+t,n=+n,this._point?this._context.lineTo(t,n):(this._point=1,this._context.moveTo(t,n))}};function ut(t){return t<0?-1:1}function at(t,n,e){var r=t._x1-t._x0,i=n-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),u=(e-t._y1)/(i||r<0&&-0),a=(o*i+u*r)/(r+i);return(ut(o)+ut(u))*Math.min(Math.abs(o),Math.abs(u),.5*Math.abs(a))||0}function ct(t,n){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-n)/2:n}function st(t,n,e){var r=t._x0,i=t._y0,o=t._x1,u=t._y1,a=(o-r)/3;t._context.bezierCurveTo(r+a,i+a*n,o-a,u-a*e,o,u)}function lt(t){this._context=t}function ft(t){this._context=new ht(t)}function ht(t){this._context=t}function pt(t){return new lt(t)}function _t(t){return new ft(t)}function dt(t){this._context=t}function yt(t){var n,e,r=t.length-1,i=new Array(r),o=new Array(r),u=new Array(r);for(i[0]=0,o[0]=2,u[0]=t[0]+2*t[1],n=1;n<r-1;++n)i[n]=1,o[n]=4,u[n]=4*t[n]+2*t[n+1];for(i[r-1]=2,o[r-1]=7,u[r-1]=8*t[r-1]+t[r],n=1;n<r;++n)e=i[n]/o[n-1],o[n]-=e,u[n]-=e*u[n-1];for(i[r-1]=u[r-1]/o[r-1],n=r-2;n>=0;--n)i[n]=(u[n]-i[n+1])/o[n];for(o[r-1]=(t[r]+i[r-1])/2,n=0;n<r-1;++n)o[n]=2*t[n+1]-i[n+1];return[i,o]}lt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:st(this,this._t0,ct(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){var e=NaN;if(n=+n,(t=+t)!==this._x1||n!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,st(this,ct(this,e=at(this,t,n)),e);break;default:st(this,this._t0,e=at(this,t,n))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n,this._t0=e}}},(ft.prototype=Object.create(lt.prototype)).point=function(t,n){lt.prototype.point.call(this,n,t)},ht.prototype={moveTo:function(t,n){this._context.moveTo(n,t)},closePath:function(){this._context.closePath()},lineTo:function(t,n){this._context.lineTo(n,t)},bezierCurveTo:function(t,n,e,r,i,o){this._context.bezierCurveTo(n,t,r,e,o,i)}},dt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,n=this._y,e=t.length;if(e)if(this._line?this._context.lineTo(t[0],n[0]):this._context.moveTo(t[0],n[0]),2===e)this._context.lineTo(t[1],n[1]);else for(var r=yt(t),i=yt(n),o=0,u=1;u<e;++o,++u)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],t[u],n[u]);(this._line||0!==this._line&&1===e)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,n){this._x.push(+t),this._y.push(+n)}};var gt=function(t){return new dt(t)};function vt(t,n){this._context=t,this._t=n}vt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(t,n);else{var e=this._x*(1-this._t)+t*this._t;this._context.lineTo(e,this._y),this._context.lineTo(e,n)}}this._x=t,this._y=n}};var xt=function(t){return new vt(t,.5)};function mt(t){return new vt(t,0)}function bt(t){return new vt(t,1)}var wt=function(t,n){if((i=t.length)>1)for(var e,r,i,o=1,u=t[n[0]],a=u.length;o<i;++o)for(r=u,u=t[n[o]],e=0;e<a;++e)u[e][1]+=u[e][0]=isNaN(r[e][1])?r[e][0]:r[e][1]},Mt=function(t){for(var n=t.length,e=new Array(n);--n>=0;)e[n]=n;return e};function Tt(t,n){return t[n]}var At=function(){var t=s([]),n=Mt,e=wt,r=Tt;function i(i){var o,u,a=t.apply(this,arguments),c=i.length,s=a.length,l=new Array(s);for(o=0;o<s;++o){for(var f,h=a[o],p=l[o]=new Array(c),_=0;_<c;++_)p[_]=f=[0,+r(i[_],h,_,i)],f.data=i[_];p.key=h}for(o=0,u=n(l);o<s;++o)l[u[o]].index=o;return e(l,u),l}return i.keys=function(n){return arguments.length?(t="function"==typeof n?n:s(B.call(n)),i):t},i.value=function(t){return arguments.length?(r="function"==typeof t?t:s(+t),i):r},i.order=function(t){return arguments.length?(n=null==t?Mt:"function"==typeof t?t:s(B.call(t)),i):n},i.offset=function(t){return arguments.length?(e=null==t?wt:t,i):e},i};e.d(n,"a",function(){return C}),e.d(n,"b",function(){return P}),e.d(n,"m",function(){return D}),e.d(n,"n",function(){return L}),e.d(n,"c",function(){return G}),e.d(n,"d",function(){return J}),e.d(n,"e",function(){return et}),e.d(n,"f",function(){return j}),e.d(n,"g",function(){return pt}),e.d(n,"h",function(){return _t}),e.d(n,"i",function(){return gt}),e.d(n,"j",function(){return xt}),e.d(n,"k",function(){return bt}),e.d(n,"l",function(){return mt}),e.d(n,"o",function(){return At}),e.d(n,"p",function(){return wt}),e.d(n,"q",function(){return Mt})},function(t,n,e){"use strict";function r(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function i(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}(function t(n){function e(t){return Math.pow(t,n)}return n=+n,e.exponent=t,e})(3),function t(n){function e(t){return 1-Math.pow(1-t,n)}return n=+n,e.exponent=t,e}(3),function t(n){function e(t){return((t*=2)<=1?Math.pow(t,n):2-Math.pow(2-t,n))/2}return n=+n,e.exponent=t,e}(3),Math.PI;function o(t){return 1-Math.sqrt(1-t*t)}(function t(n){function e(t){return t*t*((n+1)*t-n)}return n=+n,e.overshoot=t,e})(1.70158),function t(n){function e(t){return--t*t*((n+1)*t+n)+1}return n=+n,e.overshoot=t,e}(1.70158),function t(n){function e(t){return((t*=2)<1?t*t*((n+1)*t-n):(t-=2)*t*((n+1)*t+n)+2)/2}return n=+n,e.overshoot=t,e}(1.70158);var u=2*Math.PI;(function t(n,e){var r=Math.asin(1/(n=Math.max(1,n)))*(e/=u);function i(t){return n*Math.pow(2,10*--t)*Math.sin((r-t)/e)}return i.amplitude=function(n){return t(n,e*u)},i.period=function(e){return t(n,e)},i})(1,.3),function t(n,e){var r=Math.asin(1/(n=Math.max(1,n)))*(e/=u);function i(t){return 1-n*Math.pow(2,-10*(t=+t))*Math.sin((t+r)/e)}return i.amplitude=function(n){return t(n,e*u)},i.period=function(e){return t(n,e)},i}(1,.3),function t(n,e){var r=Math.asin(1/(n=Math.max(1,n)))*(e/=u);function i(t){return((t=2*t-1)<0?n*Math.pow(2,10*t)*Math.sin((r-t)/e):2-n*Math.pow(2,-10*t)*Math.sin((r+t)/e))/2}return i.amplitude=function(n){return t(n,e*u)},i.period=function(e){return t(n,e)},i}(1,.3);e.d(n,"c",function(){return r}),e.d(n,"b",function(){return i}),e.d(n,"a",function(){return o})},function(t,n,e){"use strict";var r={value:function(){}};function i(){for(var t,n=0,e=arguments.length,r={};n<e;++n){if(!(t=arguments[n]+"")||t in r)throw new Error("illegal type: "+t);r[t]=[]}return new o(r)}function o(t){this._=t}function u(t,n){for(var e,r=0,i=t.length;r<i;++r)if((e=t[r]).name===n)return e.value}function a(t,n,e){for(var i=0,o=t.length;i<o;++i)if(t[i].name===n){t[i]=r,t=t.slice(0,i).concat(t.slice(i+1));break}return null!=e&&t.push({name:n,value:e}),t}o.prototype=i.prototype={constructor:o,on:function(t,n){var e,r,i=this._,o=(r=i,(t+"").trim().split(/^|\s+/).map(function(t){var n="",e=t.indexOf(".");if(e>=0&&(n=t.slice(e+1),t=t.slice(0,e)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}})),c=-1,s=o.length;if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++c<s;)if(e=(t=o[c]).type)i[e]=a(i[e],t.name,n);else if(null==n)for(e in i)i[e]=a(i[e],t.name,null);return this}for(;++c<s;)if((e=(t=o[c]).type)&&(e=u(i[e],t.name)))return e},copy:function(){var t={},n=this._;for(var e in n)t[e]=n[e].slice();return new o(t)},call:function(t,n){if((e=arguments.length-2)>0)for(var e,r,i=new Array(e),o=0;o<e;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,e=(r=this._[t]).length;o<e;++o)r[o].value.apply(n,i)},apply:function(t,n,e){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(n,e)}};var c=i;e.d(n,"a",function(){return c})},function(t,n,e){"use strict";e.r(n),e.d(n,"colorGradients",function(){return r}),e.d(n,"colorGradientsHuman",function(){return i}),e.d(n,"britecharts",function(){return o}),e.d(n,"grey",function(){return u}),e.d(n,"orange",function(){return a}),e.d(n,"blueGreen",function(){return c}),e.d(n,"teal",function(){return s}),e.d(n,"green",function(){return l}),e.d(n,"yellow",function(){return f}),e.d(n,"pink",function(){return h}),e.d(n,"purple",function(){return p}),e.d(n,"red",function(){return _}),e.d(n,"colorSchemas",function(){return d}),e.d(n,"colorSchemasHuman",function(){return y}),e.d(n,"aloeGreen",function(){return g}),e.d(n,"greenColor",function(){return v}),e.d(n,"blueColor",function(){return x}),e.d(n,"yellowColor",function(){return m}),e.d(n,"orangeColor",function(){return b});var r={greenBlue:["#39C7EA","#4CDCBA"],orangePink:["#FBC670","#F766B8"],bluePurple:["#3DC3C9","#824a9e"]},i={greenBlue:"Green to Blue",orangePink:"Orange to Pink",bluePurple:"Blue to Purple"},o=["#6aedc7","#39c2c9","#ffce00","#ffa71a","#f866b9","#998ce3"],u=["#F8F8FA","#EFF2F5","#D2D6DF","#C3C6CF","#ADB0B6","#666A73","#45494E","#363A43","#282C35"],a=["#fcc870","#ffa71a","#fb8825","#f6682f","#db5a2c","#bf4c28","#a43b1c","#892a10","#f9e9c5"],c=["#ccf7f6","#70e4e0","#00d8d2","#00acaf","#007f8c","#005e66","#003c3f","#002d2f","#0d2223"],s=["#ccfffe","#94f7f4","#00fff8","#1de1e1","#39c2c9","#2e9a9d","#227270","#1a5957","#133f3e"],l=["#edfff7","#d7ffef","#c0ffe7","#95f5d7","#6aedc7","#59c3a3","#479980","#34816a","#206953"],f=["#f9f2b3","#fbe986","#fce05a","#fed72d","#ffce00","#fcc11c","#f9b438","#eda629","#e09819"],h=["#fdd1ea","#fb9cd2","#f866b9","#fc40b6","#ff1ab3","#e3239d","#c62c86","#a62073","#85135f"],p=["#ddd6fc","#bbb1f0","#998ce3","#8e6bc1","#824a9e","#77337f","#6b1c60","#591650","#470f3f"],_=["#ffd8d4","#ffb5b0","#ff938c","#ff766c","#ff584c","#f04b42","#e03d38","#be2e29","#9c1e19"],d={britecharts:o,grey:u,orange:a,blueGreen:c,teal:s,green:l,yellow:f,pink:h,purple:p,red:_},y={britecharts:"Britecharts Default",grey:"Britecharts Grey",orange:"Orange",blueGreen:"Blue",teal:"Light Blue",green:"Green",yellow:"Yellow",pink:"Pink",purple:"Purple",red:"Red"},g=["#7bdcc0"],v=["#6aedc7"],x=["#39c2c9"],m=["#ffce00"],b=["#ffa71a"],w={aloeGreen:g,greenColor:v,blueColor:x,yellowColor:m,orangeColor:b,pinkColor:["#f866b9"],purpleColor:["#998ce3"]};n.default={colorSchemas:d,colorSchemasHuman:y,colorGradients:r,colorGradientsHuman:i,singleColors:w,singleColorsHuman:{aloeGreen:"Aloe Green",greenColor:"Green",blueColor:"Blue",yellowColor:"Yellow",orangeColor:"Orange",pinkColor:"Pink",purpleColor:"Purple"}}},function(t,n,e){"use strict";function r(){}function i(t,n){var e=new r;if(t instanceof r)t.each(function(t,n){e.set(n,t)});else if(Array.isArray(t)){var i,o=-1,u=t.length;if(null==n)for(;++o<u;)e.set(o,t[o]);else for(;++o<u;)e.set(n(i=t[o],o,t),i)}else if(t)for(var a in t)e.set(a,t[a]);return e}r.prototype=i.prototype={constructor:r,has:function(t){return"$"+t in this},get:function(t){return this["$"+t]},set:function(t,n){return this["$"+t]=n,this},remove:function(t){var n="$"+t;return n in this&&delete this[n]},clear:function(){for(var t in this)"$"===t[0]&&delete this[t]},keys:function(){var t=[];for(var n in this)"$"===n[0]&&t.push(n.slice(1));return t},values:function(){var t=[];for(var n in this)"$"===n[0]&&t.push(this[n]);return t},entries:function(){var t=[];for(var n in this)"$"===n[0]&&t.push({key:n.slice(1),value:this[n]});return t},size:function(){var t=0;for(var n in this)"$"===n[0]&&++t;return t},empty:function(){for(var t in this)if("$"===t[0])return!1;return!0},each:function(t){for(var n in this)"$"===n[0]&&t(this[n],n.slice(1),this)}};var o=i,u=function(){var t,n,e,r=[],i=[];function u(e,i,a,c){if(i>=r.length)return null!=t&&e.sort(t),null!=n?n(e):e;for(var s,l,f,h=-1,p=e.length,_=r[i++],d=o(),y=a();++h<p;)(f=d.get(s=_(l=e[h])+""))?f.push(l):d.set(s,[l]);return d.each(function(t,n){c(y,n,u(t,i,a,c))}),y}return e={object:function(t){return u(t,0,a,c)},map:function(t){return u(t,0,s,l)},entries:function(t){return function t(e,o){if(++o>r.length)return e;var u,a=i[o-1];return null!=n&&o>=r.length?u=e.entries():(u=[],e.each(function(n,e){u.push({key:e,values:t(n,o)})})),null!=a?u.sort(function(t,n){return a(t.key,n.key)}):u}(u(t,0,s,l),0)},key:function(t){return r.push(t),e},sortKeys:function(t){return i[r.length-1]=t,e},sortValues:function(n){return t=n,e},rollup:function(t){return n=t,e}}};function a(){return{}}function c(t,n,e){t[n]=e}function s(){return o()}function l(t,n,e){t.set(n,e)}function f(){}var h=o.prototype;function p(t,n){var e=new f;if(t instanceof f)t.each(function(t){e.add(t)});else if(t){var r=-1,i=t.length;if(null==n)for(;++r<i;)e.add(t[r]);else for(;++r<i;)e.add(n(t[r],r,t))}return e}f.prototype=p.prototype={constructor:f,has:h.has,add:function(t){return this["$"+(t+="")]=t,this},remove:h.remove,clear:h.clear,values:h.keys,size:h.size,empty:h.empty,each:h.each};e.d(n,"b",function(){return u}),e.d(n,"a",function(){return o})},function(t,n,e){"use strict";var r=e(2),i=e(11),o=Array.prototype,u=o.map,a=o.slice,c={name:"implicit"};function s(t){var n=Object(i.a)(),e=[],r=c;function o(i){var o=i+"",u=n.get(o);if(!u){if(r!==c)return r;n.set(o,u=e.push(i))}return t[(u-1)%t.length]}return t=null==t?[]:a.call(t),o.domain=function(t){if(!arguments.length)return e.slice();e=[],n=Object(i.a)();for(var r,u,a=-1,c=t.length;++a<c;)n.has(u=(r=t[a])+"")||n.set(u,e.push(r));return o},o.range=function(n){return arguments.length?(t=a.call(n),o):t.slice()},o.unknown=function(t){return arguments.length?(r=t,o):r},o.copy=function(){return s().domain(e).range(t).unknown(r)},o}function l(){var t,n,e=s().unknown(void 0),i=e.domain,o=e.range,u=[0,1],a=!1,c=0,f=0,h=.5;function p(){var e=i().length,s=u[1]<u[0],l=u[s-0],p=u[1-s];t=(p-l)/Math.max(1,e-c+2*f),a&&(t=Math.floor(t)),l+=(p-l-t*(e-c))*h,n=t*(1-c),a&&(l=Math.round(l),n=Math.round(n));var _=Object(r.i)(e).map(function(n){return l+t*n});return o(s?_.reverse():_)}return delete e.unknown,e.domain=function(t){return arguments.length?(i(t),p()):i()},e.range=function(t){return arguments.length?(u=[+t[0],+t[1]],p()):u.slice()},e.rangeRound=function(t){return u=[+t[0],+t[1]],a=!0,p()},e.bandwidth=function(){return n},e.step=function(){return t},e.round=function(t){return arguments.length?(a=!!t,p()):a},e.padding=function(t){return arguments.length?(c=f=Math.max(0,Math.min(1,t)),p()):c},e.paddingInner=function(t){return arguments.length?(c=Math.max(0,Math.min(1,t)),p()):c},e.paddingOuter=function(t){return arguments.length?(f=Math.max(0,Math.min(1,t)),p()):f},e.align=function(t){return arguments.length?(h=Math.max(0,Math.min(1,t)),p()):h},e.copy=function(){return l().domain(i()).range(u).round(a).paddingInner(c).paddingOuter(f).align(h)},p()}var f=e(4),h=function(t){return function(){return t}},p=function(t){return+t},_=[0,1];function d(t,n){return(n-=t=+t)?function(e){return(e-t)/n}:h(n)}function y(t,n,e,r){var i=t[0],o=t[1],u=n[0],a=n[1];return o<i?(i=e(o,i),u=r(a,u)):(i=e(i,o),u=r(u,a)),function(t){return u(i(t))}}function g(t,n,e,i){var o=Math.min(t.length,n.length)-1,u=new Array(o),a=new Array(o),c=-1;for(t[o]<t[0]&&(t=t.slice().reverse(),n=n.slice().reverse());++c<o;)u[c]=e(t[c],t[c+1]),a[c]=i(n[c],n[c+1]);return function(n){var e=Object(r.b)(t,n,1,o)-1;return a[e](u[e](n))}}function v(t,n){return n.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp())}function x(t,n){var e,r,i,o=_,c=_,s=f.a,l=!1;function h(){return e=Math.min(o.length,c.length)>2?g:y,r=i=null,v}function v(n){return(r||(r=e(o,c,l?function(t){return function(n,e){var r=t(n=+n,e=+e);return function(t){return t<=n?0:t>=e?1:r(t)}}}(t):t,s)))(+n)}return v.invert=function(t){return(i||(i=e(c,o,d,l?function(t){return function(n,e){var r=t(n=+n,e=+e);return function(t){return t<=0?n:t>=1?e:r(t)}}}(n):n)))(+t)},v.domain=function(t){return arguments.length?(o=u.call(t,p),h()):o.slice()},v.range=function(t){return arguments.length?(c=a.call(t),h()):c.slice()},v.rangeRound=function(t){return c=a.call(t),s=f.e,h()},v.clamp=function(t){return arguments.length?(l=!!t,h()):l},v.interpolate=function(t){return arguments.length?(s=t,h()):s},h()}var m=e(5),b=function(t,n,e){var i,o=t[0],u=t[t.length-1],a=Object(r.l)(o,u,null==n?10:n);switch((e=Object(m.c)(null==e?",f":e)).type){case"s":var c=Math.max(Math.abs(o),Math.abs(u));return null!=e.precision||isNaN(i=Object(m.e)(a,c))||(e.precision=i),Object(m.b)(e,c);case"":case"e":case"g":case"p":case"r":null!=e.precision||isNaN(i=Object(m.f)(a,Math.max(Math.abs(o),Math.abs(u))))||(e.precision=i-("e"===e.type));break;case"f":case"%":null!=e.precision||isNaN(i=Object(m.d)(a))||(e.precision=i-2*("%"===e.type))}return Object(m.a)(e)};function w(t){var n=t.domain;return t.ticks=function(t){var e=n();return Object(r.m)(e[0],e[e.length-1],null==t?10:t)},t.tickFormat=function(t,e){return b(n(),t,e)},t.nice=function(e){null==e&&(e=10);var i,o=n(),u=0,a=o.length-1,c=o[u],s=o[a];return s<c&&(i=c,c=s,s=i,i=u,u=a,a=i),(i=Object(r.k)(c,s,e))>0?(c=Math.floor(c/i)*i,s=Math.ceil(s/i)*i,i=Object(r.k)(c,s,e)):i<0&&(c=Math.ceil(c*i)/i,s=Math.floor(s*i)/i,i=Object(r.k)(c,s,e)),i>0?(o[u]=Math.floor(c/i)*i,o[a]=Math.ceil(s/i)*i,n(o)):i<0&&(o[u]=Math.ceil(c*i)/i,o[a]=Math.floor(s*i)/i,n(o)),t},t}function M(){var t=x(d,f.c);return t.copy=function(){return v(t,M())},w(t)}var T=function(t,n){var e,r=0,i=(t=t.slice()).length-1,o=t[r],u=t[i];return u<o&&(e=r,r=i,i=e,e=o,o=u,u=e),t[r]=n.floor(o),t[i]=n.ceil(u),t};function A(t,n){return t<0?-Math.pow(-t,n):Math.pow(t,n)}function k(){return function t(){var n=1,e=x(function(t,e){return(e=A(e,n)-(t=A(t,n)))?function(r){return(A(r,n)-t)/e}:h(e)},function(t,e){return e=A(e,n)-(t=A(t,n)),function(r){return A(t+e*r,1/n)}}),r=e.domain;return e.exponent=function(t){return arguments.length?(n=+t,r(r())):n},e.copy=function(){return v(e,t().exponent(n))},w(e)}().exponent(.5)}var O=e(0),C=e(6),S=1e3,j=60*S,E=60*j,N=24*E,D=7*N,P=30*N,F=365*N;function U(t){return new Date(t)}function L(t){return t instanceof Date?+t:+new Date(+t)}function I(t,n,e,i,o,a,c,s,l){var h=x(d,f.c),p=h.invert,_=h.domain,y=l(".%L"),g=l(":%S"),m=l("%I:%M"),b=l("%I %p"),w=l("%a %d"),M=l("%b %d"),A=l("%B"),k=l("%Y"),O=[[c,1,S],[c,5,5*S],[c,15,15*S],[c,30,30*S],[a,1,j],[a,5,5*j],[a,15,15*j],[a,30,30*j],[o,1,E],[o,3,3*E],[o,6,6*E],[o,12,12*E],[i,1,N],[i,2,2*N],[e,1,D],[n,1,P],[n,3,3*P],[t,1,F]];function C(r){return(c(r)<r?y:a(r)<r?g:o(r)<r?m:i(r)<r?b:n(r)<r?e(r)<r?w:M:t(r)<r?A:k)(r)}function R(n,e,i,o){if(null==n&&(n=10),"number"==typeof n){var u=Math.abs(i-e)/n,a=Object(r.c)(function(t){return t[2]}).right(O,u);a===O.length?(o=Object(r.l)(e/F,i/F,n),n=t):a?(o=(a=O[u/O[a-1][2]<O[a][2]/u?a-1:a])[1],n=a[0]):(o=Math.max(Object(r.l)(e,i,n),1),n=s)}return null==o?n:n.every(o)}return h.invert=function(t){return new Date(p(t))},h.domain=function(t){return arguments.length?_(u.call(t,L)):_().map(U)},h.ticks=function(t,n){var e,r=_(),i=r[0],o=r[r.length-1],u=o<i;return u&&(e=i,i=o,o=e),e=(e=R(t,i,o,n))?e.range(i,o+1):[],u?e.reverse():e},h.tickFormat=function(t,n){return null==n?C:l(n)},h.nice=function(t,n){var e=_();return(t=R(t,e[0],e[e.length-1],n))?_(T(e,t)):h},h.copy=function(){return v(h,I(t,n,e,i,o,a,c,s,l))},h}var R=function(){return I(O.o,O.g,O.n,O.a,O.c,O.e,O.i,O.d,C.a).domain([new Date(2e3,0,1),new Date(2e3,0,2)])};e.d(n,"a",function(){return l}),e.d(n,"b",function(){return M}),e.d(n,"c",function(){return s}),e.d(n,"d",function(){return k}),e.d(n,"e",function(){return R})},,function(t,n){t.exports=function(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}},function(t,n,e){"use strict";var r=Array.prototype.slice,i=function(t){return t},o=1,u=2,a=3,c=4,s=1e-6;function l(t){return"translate("+(t+.5)+",0)"}function f(t){return"translate(0,"+(t+.5)+")"}function h(){return!this.__axis}function p(t,n){var e=[],p=null,_=null,d=6,y=6,g=3,v=t===o||t===c?-1:1,x=t===c||t===u?"x":"y",m=t===o||t===a?l:f;function b(r){var l=null==p?n.ticks?n.ticks.apply(n,e):n.domain():p,f=null==_?n.tickFormat?n.tickFormat.apply(n,e):i:_,b=Math.max(d,0)+g,w=n.range(),M=+w[0]+.5,T=+w[w.length-1]+.5,A=(n.bandwidth?function(t){var n=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(n=Math.round(n)),function(e){return+t(e)+n}}:function(t){return function(n){return+t(n)}})(n.copy()),k=r.selection?r.selection():r,O=k.selectAll(".domain").data([null]),C=k.selectAll(".tick").data(l,n).order(),S=C.exit(),j=C.enter().append("g").attr("class","tick"),E=C.select("line"),N=C.select("text");O=O.merge(O.enter().insert("path",".tick").attr("class","domain").attr("stroke","#000")),C=C.merge(j),E=E.merge(j.append("line").attr("stroke","#000").attr(x+"2",v*d)),N=N.merge(j.append("text").attr("fill","#000").attr(x,v*b).attr("dy",t===o?"0em":t===a?"0.71em":"0.32em")),r!==k&&(O=O.transition(r),C=C.transition(r),E=E.transition(r),N=N.transition(r),S=S.transition(r).attr("opacity",s).attr("transform",function(t){return isFinite(t=A(t))?m(t):this.getAttribute("transform")}),j.attr("opacity",s).attr("transform",function(t){var n=this.parentNode.__axis;return m(n&&isFinite(n=n(t))?n:A(t))})),S.remove(),O.attr("d",t===c||t==u?"M"+v*y+","+M+"H0.5V"+T+"H"+v*y:"M"+M+","+v*y+"V0.5H"+T+"V"+v*y),C.attr("opacity",1).attr("transform",function(t){return m(A(t))}),E.attr(x+"2",v*d),N.attr(x,v*b).text(f),k.filter(h).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===u?"start":t===c?"end":"middle"),k.each(function(){this.__axis=A})}return b.scale=function(t){return arguments.length?(n=t,b):n},b.ticks=function(){return e=r.call(arguments),b},b.tickArguments=function(t){return arguments.length?(e=null==t?[]:r.call(t),b):e.slice()},b.tickValues=function(t){return arguments.length?(p=null==t?null:r.call(t),b):p&&p.slice()},b.tickFormat=function(t){return arguments.length?(_=t,b):_},b.tickSize=function(t){return arguments.length?(d=y=+t,b):d},b.tickSizeInner=function(t){return arguments.length?(d=+t,b):d},b.tickSizeOuter=function(t){return arguments.length?(y=+t,b):y},b.tickPadding=function(t){return arguments.length?(g=+t,b):g},b}function _(t){return p(u,t)}function d(t){return p(a,t)}function y(t){return p(c,t)}e.d(n,"c",function(){return _}),e.d(n,"a",function(){return d}),e.d(n,"b",function(){return y})},function(t,n,e){var r=e(27),i=e(28),o=e(29);t.exports=function(t){return r(t)||i(t)||o()}},function(t,n,e){var r=e(14);t.exports=function(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{},i=Object.keys(e);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(e).filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.forEach(function(n){r(t,n,e[n])})}return t}},function(t,n,e){"use strict";var r,i,o=e(1),u=e(9),a=0,c=0,s=0,l=1e3,f=0,h=0,p=0,_="object"==typeof performance&&performance.now?performance:Date,d="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function y(){return h||(d(g),h=_.now()+p)}function g(){h=0}function v(){this._call=this._time=this._next=null}function x(t,n,e){var r=new v;return r.restart(t,n,e),r}function m(){h=(f=_.now())+p,a=c=0;try{!function(){y(),++a;for(var t,n=r;n;)(t=h-n._time)>=0&&n._call.call(null,t),n=n._next;--a}()}finally{a=0,function(){var t,n,e=r,o=1/0;for(;e;)e._call?(o>e._time&&(o=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:r=n);i=t,w(o)}(),h=0}}function b(){var t=_.now(),n=t-f;n>l&&(p-=n,f=t)}function w(t){if(!a){c&&(c=clearTimeout(c));var n=t-h;n>24?(t<1/0&&(c=setTimeout(m,n)),s&&(s=clearInterval(s))):(s||(f=h,s=setInterval(b,l)),a=1,d(m))}}v.prototype=x.prototype={constructor:v,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?y():+e)+(null==n?0:+n),this._next||i===this||(i?i._next=this:r=this,i=this),this._call=t,this._time=e,w()},stop:function(){this._call&&(this._call=null,this._time=1/0,w())}};var M=function(t,n,e){var r=new v;return n=null==n?0:+n,r.restart(function(e){r.stop(),t(e+n)},n,e),r},T=Object(u.a)("start","end","interrupt"),A=[],k=0,O=1,C=2,S=3,j=4,E=5,N=6,D=function(t,n,e,r,i,o){var u=t.__transition;if(u){if(e in u)return}else t.__transition={};!function(t,n,e){var r,i=t.__transition;function o(c){var s,l,f,h;if(e.state!==O)return a();for(s in i)if((h=i[s]).name===e.name){if(h.state===S)return M(o);h.state===j?(h.state=N,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[s]):+s<n&&(h.state=N,h.timer.stop(),delete i[s])}if(M(function(){e.state===S&&(e.state=j,e.timer.restart(u,e.delay,e.time),u(c))}),e.state=C,e.on.call("start",t,t.__data__,e.index,e.group),e.state===C){for(e.state=S,r=new Array(f=e.tween.length),s=0,l=-1;s<f;++s)(h=e.tween[s].value.call(t,t.__data__,e.index,e.group))&&(r[++l]=h);r.length=l+1}}function u(n){for(var i=n<e.duration?e.ease.call(null,n/e.duration):(e.timer.restart(a),e.state=E,1),o=-1,u=r.length;++o<u;)r[o].call(null,i);e.state===E&&(e.on.call("end",t,t.__data__,e.index,e.group),a())}function a(){for(var r in e.state=N,e.timer.stop(),delete i[n],i)return;delete t.__transition}i[n]=e,e.timer=x(function(t){e.state=O,e.timer.restart(o,e.delay,e.time),e.delay<=t&&o(t-e.delay)},0,e.time)}(t,e,{name:n,index:r,group:i,on:T,tween:A,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:k})};function P(t,n){var e=t.__transition;if(!e||!(e=e[n])||e.state>k)throw new Error("too late");return e}function F(t,n){var e=t.__transition;if(!e||!(e=e[n])||e.state>C)throw new Error("too late");return e}function U(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("too late");return e}var L=function(t,n){var e,r,i,o=t.__transition,u=!0;if(o){for(i in n=null==n?null:n+"",o)(e=o[i]).name===n?(r=e.state>C&&e.state<E,e.state=N,e.timer.stop(),r&&e.on.call("interrupt",t,t.__data__,e.index,e.group),delete o[i]):u=!1;u&&delete t.__transition}},I=e(4);function R(t,n,e){var r=t._id;return t.each(function(){var t=F(this,r);(t.value||(t.value={}))[n]=e.apply(this,arguments)}),function(t){return U(t,r).value[n]}}var B=e(3),H=function(t,n){var e;return("number"==typeof n?I.c:n instanceof B.a?I.d:(e=Object(B.a)(n))?(n=e,I.d):I.f)(t,n)};var Y=o.g.prototype.constructor;var z=0;function q(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}function G(){return++z}var $=o.g.prototype;q.prototype=function(t){return Object(o.g)().transition(t)}.prototype={constructor:q,select:function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=Object(o.h)(t));for(var r=this._groups,i=r.length,u=new Array(i),a=0;a<i;++a)for(var c,s,l=r[a],f=l.length,h=u[a]=new Array(f),p=0;p<f;++p)(c=l[p])&&(s=t.call(c,c.__data__,p,l))&&("__data__"in c&&(s.__data__=c.__data__),h[p]=s,D(h[p],n,e,p,h,U(c,e)));return new q(u,this._parents,n,e)},selectAll:function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=Object(o.i)(t));for(var r=this._groups,i=r.length,u=[],a=[],c=0;c<i;++c)for(var s,l=r[c],f=l.length,h=0;h<f;++h)if(s=l[h]){for(var p,_=t.call(s,s.__data__,h,l),d=U(s,e),y=0,g=_.length;y<g;++y)(p=_[y])&&D(p,n,e,y,_,d);u.push(_),a.push(s)}return new q(u,a,n,e)},filter:function(t){"function"!=typeof t&&(t=Object(o.c)(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var u,a=n[i],c=a.length,s=r[i]=[],l=0;l<c;++l)(u=a[l])&&t.call(u,u.__data__,l,a)&&s.push(u);return new q(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),u=new Array(r),a=0;a<o;++a)for(var c,s=n[a],l=e[a],f=s.length,h=u[a]=new Array(f),p=0;p<f;++p)(c=s[p]||l[p])&&(h[p]=c);for(;a<r;++a)u[a]=n[a];return new q(u,this._parents,this._name,this._id)},selection:function(){return new Y(this._groups,this._parents)},transition:function(){for(var t=this._name,n=this._id,e=G(),r=this._groups,i=r.length,o=0;o<i;++o)for(var u,a=r[o],c=a.length,s=0;s<c;++s)if(u=a[s]){var l=U(u,n);D(u,t,e,s,a,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new q(r,this._parents,t,e)},call:$.call,nodes:$.nodes,node:$.node,size:$.size,empty:$.empty,each:$.each,on:function(t,n){var e=this._id;return arguments.length<2?U(this.node(),e).on.on(t):this.each(function(t,n,e){var r,i,o=function(t){return(t+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||"start"===t})}(n)?P:F;return function(){var u=o(this,t),a=u.on;a!==r&&(i=(r=a).copy()).on(n,e),u.on=i}}(e,t,n))},attr:function(t,n){var e=Object(o.e)(t),r="transform"===e?I.h:H;return this.attrTween(t,"function"==typeof n?(e.local?function(t,n,e){var r,i,o;return function(){var u,a=e(this);if(null!=a)return(u=this.getAttributeNS(t.space,t.local))===a?null:u===r&&a===i?o:o=n(r=u,i=a);this.removeAttributeNS(t.space,t.local)}}:function(t,n,e){var r,i,o;return function(){var u,a=e(this);if(null!=a)return(u=this.getAttribute(t))===a?null:u===r&&a===i?o:o=n(r=u,i=a);this.removeAttribute(t)}})(e,r,R(this,"attr."+t,n)):null==n?(e.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}})(e):(e.local?function(t,n,e){var r,i;return function(){var o=this.getAttributeNS(t.space,t.local);return o===e?null:o===r?i:i=n(r=o,e)}}:function(t,n,e){var r,i;return function(){var o=this.getAttribute(t);return o===e?null:o===r?i:i=n(r=o,e)}})(e,r,n+""))},attrTween:function(t,n){var e="attr."+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(null==n)return this.tween(e,null);if("function"!=typeof n)throw new Error;var r=Object(o.e)(t);return this.tween(e,(r.local?function(t,n){function e(){var e=this,r=n.apply(e,arguments);return r&&function(n){e.setAttributeNS(t.space,t.local,r(n))}}return e._value=n,e}:function(t,n){function e(){var e=this,r=n.apply(e,arguments);return r&&function(n){e.setAttribute(t,r(n))}}return e._value=n,e})(r,n))},style:function(t,n,e){var r="transform"==(t+="")?I.g:H;return null==n?this.styleTween(t,function(t,n){var e,r,i;return function(){var u=Object(o.j)(this,t),a=(this.style.removeProperty(t),Object(o.j)(this,t));return u===a?null:u===e&&a===r?i:i=n(e=u,r=a)}}(t,r)).on("end.style."+t,function(t){return function(){this.style.removeProperty(t)}}(t)):this.styleTween(t,"function"==typeof n?function(t,n,e){var r,i,u;return function(){var a=Object(o.j)(this,t),c=e(this);return null==c&&(this.style.removeProperty(t),c=Object(o.j)(this,t)),a===c?null:a===r&&c===i?u:u=n(r=a,i=c)}}(t,r,R(this,"style."+t,n)):function(t,n,e){var r,i;return function(){var u=Object(o.j)(this,t);return u===e?null:u===r?i:i=n(r=u,e)}}(t,r,n+""),e)},styleTween:function(t,n,e){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==n)return this.tween(r,null);if("function"!=typeof n)throw new Error;return this.tween(r,function(t,n,e){function r(){var r=this,i=n.apply(r,arguments);return i&&function(n){r.style.setProperty(t,i(n),e)}}return r._value=n,r}(t,n,null==e?"":e))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var n=t(this);this.textContent=null==n?"":n}}(R(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},remove:function(){return this.on("end.remove",(t=this._id,function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}));var t},tween:function(t,n){var e=this._id;if(t+="",arguments.length<2){for(var r,i=U(this.node(),e).tween,o=0,u=i.length;o<u;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==n?function(t,n){var e,r;return function(){var i=F(this,t),o=i.tween;if(o!==e)for(var u=0,a=(r=e=o).length;u<a;++u)if(r[u].name===n){(r=r.slice()).splice(u,1);break}i.tween=r}}:function(t,n,e){var r,i;if("function"!=typeof e)throw new Error;return function(){var o=F(this,t),u=o.tween;if(u!==r){i=(r=u).slice();for(var a={name:n,value:e},c=0,s=i.length;c<s;++c)if(i[c].name===n){i[c]=a;break}c===s&&i.push(a)}o.tween=i}})(e,t,n))},delay:function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?function(t,n){return function(){P(this,t).delay=+n.apply(this,arguments)}}:function(t,n){return n=+n,function(){P(this,t).delay=n}})(n,t)):U(this.node(),n).delay},duration:function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?function(t,n){return function(){F(this,t).duration=+n.apply(this,arguments)}}:function(t,n){return n=+n,function(){F(this,t).duration=n}})(n,t)):U(this.node(),n).duration},ease:function(t){var n=this._id;return arguments.length?this.each(function(t,n){if("function"!=typeof n)throw new Error;return function(){F(this,t).ease=n}}(n,t)):U(this.node(),n).ease}};var X={time:null,delay:0,duration:250,ease:e(8).b};function V(t,n){for(var e;!(e=t.__transition)||!(e=e[n]);)if(!(t=t.parentNode))return X.time=y(),X;return e}o.g.prototype.interrupt=function(t){return this.each(function(){L(this,t)})},o.g.prototype.transition=function(t){var n,e;t instanceof q?(n=t._id,t=t._name):(n=G(),(e=X).time=y(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var u,a=r[o],c=a.length,s=0;s<c;++s)(u=a[s])&&D(u,t,n,s,a,e||V(u,n));return new q(r,this._parents,t,n)};e.d(n,"a",function(){return L})},function(t,n,e){"use strict";e.d(n,"a",function(){return _});var r=e(20),i=e.n(r),o=e(10),u=e(21),a=e.n(u),c="undefined"!=typeof window,s=navigator.msSaveOrOpenBlob,l="Sorry, this feature is not available for IE. If you require this to work, check this issue https://github.com/eventbrite/britecharts/pull/652",f=c&&window.btoa;f||(f=i.a.encode);var h=function(t){return f(encodeURIComponent(t).replace(/%([0-9A-F]{2})/g,function(t,n){return String.fromCharCode("0x"+n)}))},p={styleClass:"britechartStyle",defaultFilename:"britechart.png",chartBackground:"white",imageSourceBase:"data:image/svg+xml;base64,",titleFontSize:"15px",titleFontFamily:"'Benton Sans', sans-serif",titleTopOffset:15,get styleBackgroundString(){return"<style>svg{background:".concat(this.chartBackground,";}</style>")}};function _(t,n,e){if(s)return console.error(l),!1;var r,i,o,u=y(d.call(this,t,e));u.onload=function(t,n,e){e.preventDefault(),function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.defaultFilename,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"image/png",r=t.toDataURL(e),i=document.createElement("a");i.href=r,i.download=n,document.body.appendChild(i),i.click(),document.body.removeChild(i)}(g(this,t),n)}.bind(u,(r=this.width(),i=this.height(),(o=document.createElement("canvas")).height=i,o.width=r,o),n)}function d(t,n){if(t){t.attr("version",1.1).attr("xmlns","http://www.w3.org/2000/svg");var e=a.a.initializeSerializer()(t.node());return e=function(t){if(navigator.userAgent.search("FireFox")>-1)return t.replace(/url.*&quot;\)/,'url(&quot;linearGradient[id*="-gradient-"]&quot;);');return t}(e),e=function(t){return t.replace(">",">".concat(p.styleBackgroundString))}(e=function(t,n,e){if(!n||!e)return t;var r=o.colorSchemas.grey;return t=t.replace(/<g/,'<text x="'.concat(this.margin().left,'" y="').concat(p.titleTopOffset,'" font-family="').concat(p.titleFontFamily,'" font-size="').concat(p.titleFontSize,'" fill="').concat(r[6],'"> ').concat(n," </text><g "))}.call(this,e,n,parseInt(t.attr("width"),10)))}}function y(t){var n=new Image;return n.src="".concat(p.imageSourceBase).concat(h(t)),n}function g(t,n){return n.getContext("2d").drawImage(t,0,0),n}},function(t,n,e){(function(t,r){var i;/*! http://mths.be/base64 v0.1.0 by @mathias | MIT license */!function(o){var u=n,a=(t&&t.exports,"object"==typeof r&&r);a.global!==a&&a.window;var c=function(t){this.message=t};(c.prototype=new Error).name="InvalidCharacterError";var s=function(t){throw new c(t)},l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=/[\t\n\f\r ]/g,h={encode:function(t){t=String(t),/[^\0-\xFF]/.test(t)&&s("The string to be encoded contains characters outside of the Latin1 range.");for(var n,e,r,i,o=t.length%3,u="",a=-1,c=t.length-o;++a<c;)n=t.charCodeAt(a)<<16,e=t.charCodeAt(++a)<<8,r=t.charCodeAt(++a),u+=l.charAt((i=n+e+r)>>18&63)+l.charAt(i>>12&63)+l.charAt(i>>6&63)+l.charAt(63&i);return 2==o?(n=t.charCodeAt(a)<<8,e=t.charCodeAt(++a),u+=l.charAt((i=n+e)>>10)+l.charAt(i>>4&63)+l.charAt(i<<2&63)+"="):1==o&&(i=t.charCodeAt(a),u+=l.charAt(i>>2)+l.charAt(i<<4&63)+"=="),u},decode:function(t){var n=(t=String(t).replace(f,"")).length;n%4==0&&(n=(t=t.replace(/==?$/,"")).length),(n%4==1||/[^+a-zA-Z0-9\/]/.test(t))&&s("Invalid character: the string to be decoded is not correctly encoded.");for(var e,r,i=0,o="",u=-1;++u<n;)r=l.indexOf(t.charAt(u)),e=i%4?64*e+r:r,i++%4&&(o+=String.fromCharCode(255&e>>(-2*i&6)));return o},version:"0.1.0"};void 0===(i=function(){return h}.call(n,e,n,t))||(t.exports=i)}()}).call(this,e(25)(t),e(26))},function(t,n){t.exports=function(){"use strict";var t={BASE:!0,HEAD:!0,HTML:!0,META:!0,NOFRAME:!0,NOSCRIPT:!0,PARAM:!0,SCRIPT:!0,STYLE:!0,TITLE:!0},n=["A","ABBR","ADDRESS","AREA","ARTICLE","ASIDE","AUDIO","B","BASE","BDI","BDO","BLOCKQUOTE","BODY","BR","BUTTON","CANVAS","CAPTION","CENTER","CITE","CODE","COL","COLGROUP","COMMAND","DATALIST","DD","DEL","DETAILS","DFN","DIV","DL","DT","EM","EMBED","FIELDSET","FIGCAPTION","FIGURE","FONT","FOOTER","FORM","H1","H2","H3","H4","H5","H6","HEAD","HEADER","HGROUP","HR","HTML","I","IFRAME","IMG","INPUT","INS","KBD","LABEL","LEGEND","LI","LINK","MAP","MARK","MATH","MENU","META","METER","NAV","NOBR","NOSCRIPT","OBJECT","OL","OPTION","OPTGROUP","OUTPUT","P","PARAM","PRE","PROGRESS","Q","RP","RT","RUBY","S","SAMP","SCRIPT","SECTION","SELECT","SMALL","SOURCE","SPAN","STRONG","STYLE","SUB","SUMMARY","SUP","SVG","TABLE","TBODY","TD","TEXTAREA","TFOOT","TH","THEAD","TIME","TITLE","TR","TRACK","U","UL","VAR","VIDEO","WBR"],e=function(t){var n={},e=document.body.appendChild(document.createElement(t)),r=window.getComputedStyle(e);return[].forEach.call(r,function(t){n[t]=r[t]}),document.body.removeChild(e),n};return{initializeSerializer:function(){var r={};return[].forEach.call(n,function(n){t[n]||(r[n]=e(n))}),function(n){var i,o,u,a,c=[];if(n&&n.nodeType===Node.ELEMENT_NODE)return c=[],i=n.querySelectorAll("*"),[].forEach.call(i,function(n,i){var a;t[n.tagName]||(o=window.getComputedStyle(n),a=(a=n.tagName).toUpperCase(),r[a]||(r[a]=e(a)),u=r[a],c[i]=n.style.cssText,[].forEach.call(o,function(t){o[t]!==u[t]&&(n.style[t]=o[t])}))}),a=n.outerHTML,i=[].map.call(i,function(t,n){return t.style.cssText=c[n],t}),a}}}}()},function(t,n,e){var r=e(33),i=e(34),o=e(35);t.exports=function(t,n){return r(t)||i(t,n)||o()}},,function(t,n,e){"use strict";e.r(n),e.d(n,"linearGradient",function(){return r}),e.d(n,"bar",function(){return i}),e.d(n,"donut",function(){return o}),e.d(n,"line",function(){return u}),e.d(n,"stackedArea",function(){return a});var r='\n <defs>\n <linearGradient id="lgrad" x1="0%" y1="50%" x2="100%" y2="50%" >\n <stop offset="0" stop-color="#ffffff" stop-opacity="0.8" />\n <stop offset="33.33%" stop-color="#ffffff" stop-opacity="0.8" />\n <stop offset="50%" stop-color="#ffffff" stop-opacity="0" />\n <stop offset="66.66%" stop-color="#ffffff" stop-opacity="0.8" />\n <stop offset="100%" stop-color="#ffffff" stop-opacity="0.8" />\n </linearGradient>\n </defs>\n ',i='\n <svg class="load-state bar-load-state" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 711 325">\n '.concat(r,'\n <g fill="none" fill-rule="evenodd">\n <g transform="translate(0 29)">\n <g stroke="#EFF2F5" stroke-dasharray="4 4">\n <path d="M.400592911 200.302477L710.674315 200.302477M.400592884 131.172748L710.674315 131.172748M.324410282 64.2071321L710.621499 64.2071321M.291004517.563888874L709.82431.563888889"/>\n </g>\n <g fill="#D2D6DF" transform="translate(63.08 11)">\n <polygon points="-.08 176 23.92 176 23.92 255 -.08 255"/>\n <polygon points="50.829 147 74.829 147 74.829 255 50.829 255"/>\n <polygon points="254.465 0 278.465 0 278.465 255 254.465 255"/>\n <polygon points="458.102 169 482.102 169 482.102 255 458.102 255"/>\n <polygon points="152.647 82 176.647 82 176.647 255 152.647 255"/>\n <polygon points="356.283 66 380.283 66 380.283 255 356.283 255"/>\n <polygon points="559.92 229 583.92 229 583.92 255 559.92 255"/>\n <polygon points="101.738 115 125.738 115 125.738 255 101.738 255"/>\n <polygon points="305.374 42 329.374 42 329.374 255 305.374 255"/>\n <polygon points="509.011 201 533.011 201 533.011 255 509.011 255"/>\n <polygon points="203.556 19 227.556 19 227.556 255 203.556 255"/>\n <polygon points="407.192 115 431.192 115 431.192 255 407.192 255"/>\n </g>\n </g>\n <polygon fill="#D2D6DF" fill-rule="nonzero" points="0 295 711 295 711 294 0 294"/>\n </g>\n <rect class="chart-filter" fill="url(#lgrad)" x="-100%" y="0" width="300%" height="100%"></rect>\n </svg>\n '),o='\n <svg class="load-state donut-load-state" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 376 331">\n '.concat(r,'\n <g fill="none" fill-rule="evenodd">\n <g transform="translate(116 107)">\n <circle cx="72" cy="72" r="72" stroke="#EFF2F5" stroke-linecap="round" stroke-width="9.6"/>\n <path stroke="#D2D6DF" stroke-width="19.2" d="M126.153559,119.524055 C137.264629,106.845712 144,90.2321371 144,72.0444604 C144,32.2554036 111.764502,0 72,0"/>\n <circle cx="72" cy="72" r="67.2" fill="#FFF"/>\n </g>\n </g>\n <rect class="chart-filter" fill="url(#lgrad)" x="-100%" y="0" width="300%" height="100%"></rect>\n </svg>\n '),u='\n <svg\n class="load-state line-load-state"\n xmlns="http://www.w3.org/2000/svg"\n viewBox="0 0 711 325"\n >\n '.concat(r,'\n <path\n id="chart-bg"\n class="chart-bg"\n style="stroke:#C3C6CF;"\n d="M3.4,216.5h707.3 M3.4,160.5h707.3 M3.3,103.5h707.3 M3.3,48.5h707.6 M0.4,276.6H710H0.4z"\n />\n <polyline\n id="chart-line"\n class="chart-line"\n style="stroke:#C3C6CF;stroke-width:4;fill:none;"\n points="8.8,175.8 62.4,237.7 116.1,184.7 169.7,175.8 223.3,57 277,176.8 330.6,176.8 384.3,122.5 437.9,176.8 491.6,176.8 545.2,218.4 598.8,122.5 652.5,184.7 706.1,135.1 "\n />\n <rect class="chart-filter" fill="url(#lgrad)" x="-100%" y="0" width="300%" height="100%"></rect>\n </svg>\n '),a='\n <svg\n class="load-state stacked-area-load-state"\n xmlns="http://www.w3.org/2000/svg"\n viewBox="0 0 711 325"\n >\n '.concat(r,'\n <path\n id="chart-bg"\n class="chart-bg"\n style="stroke:#C3C6CF;"\n d="M3.4,216.5h707.3 M3.4,160.5h707.3 M3.3,103.5h707.3 M3.3,48.5h707.6 M0.4,276.6H710H0.4z"\n />\n <g transform="translate(20 50)">\n <path\n id="chart-area"\n strokeLinecap="square"\n d="M0.34233103,0.593688165 L709.977885,0.593688189"\n transform="translate(.01 227.976)"\n />\n <path fill="#C3C6CF" d="M0.528124801,224.014648 L0.528124801,177.734375 L53.3834796,177.734375 C71.5390789,177.734375 86.8277373,168.972754 101.240241,151.662202 C112.578335,138.044258 121.139826,123.110227 136.974507,91.596773 C137.343842,90.8617404 139.300293,86.9654028 139.856735,85.8583549 C155.041692,55.6476711 163.354313,41.0906306 174.319873,27.7179171 C188.951312,9.87459412 204.885845,0.5 223.830634,0.5 C242.123071,0.5 257.291724,8.27027858 270.907992,23.1359289 C281.228683,34.4036118 289.135925,47.1272372 302.542017,72.085092 C303.275893,73.4513345 306.289669,79.0766612 307.063369,80.5168656 C321.41025,107.222876 330.088083,120.97663 341.470704,132.92446 C355.88994,148.05969 371.908861,155.792969 391.654853,155.792969 C412.142049,155.792969 428.763593,152.325614 442.880698,145.765582 C454.197328,140.506893 463.373931,133.679865 473.786035,123.626931 C476.528659,120.978915 486.44777,110.911455 488.791866,108.6483 C502.907223,95.0203436 514.194325,88.9355469 530.135322,88.9355469 C546.532652,88.9355469 559.505909,97.338499 575.973261,115.41103 C579.723508,119.526837 593.103621,135.086814 592.915496,134.871799 C605.09738,148.794859 614.368835,157.635549 625.072091,164.58539 C638.386599,173.230769 652.701021,177.734375 669.279853,177.734375 L673.779853,177.734375 L673.779853,224.014648 L0.528124801,224.014648 Z" />\n </g>\n <rect class="chart-filter" fill="url(#lgrad)" x="-100%" y="0" width="300%" height="100%"></rect>\n </svg>\n ');n.default={linearGradient:r,bar:i,donut:o,line:u,stackedArea:a}},function(t,n){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,n){var e;e=function(){return this}();try{e=e||new Function("return this")()}catch(t){"object"==typeof window&&(e=window)}t.exports=e},function(t,n){t.exports=function(t){if(Array.isArray(t)){for(var n=0,e=new Array(t.length);n<t.length;n++)e[n]=t[n];return e}}},function(t,n){t.exports=function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}},function(t,n){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},,function(t,n,e){var r=e(43),i=e(63),o=e(64),u=e(39),a=e(53),c=e(73),s=Object.prototype.hasOwnProperty,l=o(function(t,n){if(a(n)||u(n))i(n,c(n),t);else for(var e in n)s.call(n,e)&&r(t,e,n[e])});t.exports=l},,function(t,n){t.exports=function(t){if(Array.isArray(t))return t}},function(t,n){t.exports=function(t,n){var e=[],r=!0,i=!1,o=void 0;try{for(var u,a=t[Symbol.iterator]();!(r=(u=a.next()).done)&&(e.push(u.value),!n||e.length!==n);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==a.return||a.return()}finally{if(i)throw o}}return e}},function(t,n){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(t,n,e){var r=e(47),i=e(57),o=e(58),u="[object Null]",a="[object Undefined]",c=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?a:u:c&&c in Object(t)?i(t):o(t)}},function(t,n,e){var r=e(48),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();t.exports=o},function(t,n){t.exports=function(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)}},function(t,n,e){var r=e(46),i=e(51);t.exports=function(t){return null!=t&&i(t.length)&&!r(t)}},function(t,n){t.exports=function(t){return null!=t&&"object"==typeof t}},,,function(t,n,e){var r=e(44),i=e(49),o=Object.prototype.hasOwnProperty;t.exports=function(t,n,e){var u=t[n];o.call(t,n)&&i(u,e)&&(void 0!==e||n in t)||r(t,n,e)}},function(t,n,e){var r=e(45);t.exports=function(t,n,e){"__proto__"==n&&r?r(t,n,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[n]=e}},function(t,n,e){var r=e(55),i=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=i},function(t,n,e){var r=e(36),i=e(38),o="[object AsyncFunction]",u="[object Function]",a="[object GeneratorFunction]",c="[object Proxy]";t.exports=function(t){if(!i(t))return!1;var n=r(t);return n==u||n==a||n==o||n==c}},function(t,n,e){var r=e(37).Symbol;t.exports=r},function(t,n,e){(function(n){var e="object"==typeof n&&n&&n.Object===Object&&n;t.exports=e}).call(this,e(26))},function(t,n){t.exports=function(t,n){return t===n||t!=t&&n!=n}},function(t,n){t.exports=function(t){return t}},function(t,n){var e=9007199254740991;t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=e}},function(t,n){var e=9007199254740991,r=/^(?:0|[1-9]\d*)$/;t.exports=function(t,n){var i=typeof t;return!!(n=null==n?e:n)&&("number"==i||"symbol"!=i&&r.test(t))&&t>-1&&t%1==0&&t<n}},function(t,n){var e=Object.prototype;t.exports=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}},,function(t,n,e){var r=e(56),i=e(62);t.exports=function(t,n){var e=i(t,n);return r(e)?e:void 0}},function(t,n,e){var r=e(46),i=e(59),o=e(38),u=e(61),a=/^\[object .+?Constructor\]$/,c=Function.prototype,s=Object.prototype,l=c.toString,f=s.hasOwnProperty,h=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!o(t)||i(t))&&(r(t)?h:a).test(u(t))}},function(t,n,e){var r=e(47),i=Object.prototype,o=i.hasOwnProperty,u=i.toString,a=r?r.toStringTag:void 0;t.exports=function(t){var n=o.call(t,a),e=t[a];try{t[a]=void 0;var r=!0}catch(t){}var i=u.call(t);return r&&(n?t[a]=e:delete t[a]),i}},function(t,n){var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},function(t,n,e){var r,i=e(60),o=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!o&&o in t}},function(t,n,e){var r=e(37)["__core-js_shared__"];t.exports=r},function(t,n){var e=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return e.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},function(t,n){t.exports=function(t,n){return null==t?void 0:t[n]}},function(t,n,e){var r=e(43),i=e(44);t.exports=function(t,n,e,o){var u=!e;e||(e={});for(var a=-1,c=n.length;++a<c;){var s=n[a],l=o?o(e[s],t[s],s,e,t):void 0;void 0===l&&(l=t[s]),u?i(e,s,l):r(e,s,l)}return e}},function(t,n,e){var r=e(65),i=e(72);t.exports=function(t){return r(function(n,e){var r=-1,o=e.length,u=o>1?e[o-1]:void 0,a=o>2?e[2]:void 0;for(u=t.length>3&&"function"==typeof u?(o--,u):void 0,a&&i(e[0],e[1],a)&&(u=o<3?void 0:u,o=1),n=Object(n);++r<o;){var c=e[r];c&&t(n,c,r,u)}return n})}},function(t,n,e){var r=e(50),i=e(66),o=e(68);t.exports=function(t,n){return o(i(t,n,r),t+"")}},function(t,n,e){var r=e(67),i=Math.max;t.exports=function(t,n,e){return n=i(void 0===n?t.length-1:n,0),function(){for(var o=arguments,u=-1,a=i(o.length-n,0),c=Array(a);++u<a;)c[u]=o[n+u];u=-1;for(var s=Array(n+1);++u<n;)s[u]=o[u];return s[n]=e(c),r(t,this,s)}}},function(t,n){t.exports=function(t,n,e){switch(e.length){case 0:return t.call(n);case 1:return t.call(n,e[0]);case 2:return t.call(n,e[0],e[1]);case 3:return t.call(n,e[0],e[1],e[2])}return t.apply(n,e)}},function(t,n,e){var r=e(69),i=e(71)(r);t.exports=i},function(t,n,e){var r=e(70),i=e(45),o=e(50),u=i?function(t,n){return i(t,"toString",{configurable:!0,enumerable:!1,value:r(n),writable:!0})}:o;t.exports=u},function(t,n){t.exports=function(t){return function(){return t}}},function(t,n){var e=800,r=16,i=Date.now;t.exports=function(t){var n=0,o=0;return function(){var u=i(),a=r-(u-o);if(o=u,a>0){if(++n>=e)return arguments[0]}else n=0;return t.apply(void 0,arguments)}}},function(t,n,e){var r=e(49),i=e(39),o=e(52),u=e(38);t.exports=function(t,n,e){if(!u(e))return!1;var a=typeof n;return!!("number"==a?i(e)&&o(n,e.length):"string"==a&&n in e)&&r(e[n],t)}},function(t,n,e){var r=e(74),i=e(85),o=e(39);t.exports=function(t){return o(t)?r(t):i(t)}},function(t,n,e){var r=e(75),i=e(76),o=e(78),u=e(79),a=e(52),c=e(81),s=Object.prototype.hasOwnProperty;t.exports=function(t,n){var e=o(t),l=!e&&i(t),f=!e&&!l&&u(t),h=!e&&!l&&!f&&c(t),p=e||l||f||h,_=p?r(t.length,String):[],d=_.length;for(var y in t)!n&&!s.call(t,y)||p&&("length"==y||f&&("offset"==y||"parent"==y)||h&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||a(y,d))||_.push(y);return _}},function(t,n){t.exports=function(t,n){for(var e=-1,r=Array(t);++e<t;)r[e]=n(e);return r}},function(t,n,e){var r=e(77),i=e(40),o=Object.prototype,u=o.hasOwnProperty,a=o.propertyIsEnumerable,c=r(function(){return arguments}())?r:function(t){return i(t)&&u.call(t,"callee")&&!a.call(t,"callee")};t.exports=c},function(t,n,e){var r=e(36),i=e(40),o="[object Arguments]";t.exports=function(t){return i(t)&&r(t)==o}},function(t,n){var e=Array.isArray;t.exports=e},function(t,n,e){(function(t){var r=e(37),i=e(80),o=n&&!n.nodeType&&n,u=o&&"object"==typeof t&&t&&!t.nodeType&&t,a=u&&u.exports===o?r.Buffer:void 0,c=(a?a.isBuffer:void 0)||i;t.exports=c}).call(this,e(25)(t))},function(t,n){t.exports=function(){return!1}},function(t,n,e){var r=e(82),i=e(83),o=e(84),u=o&&o.isTypedArray,a=u?i(u):r;t.exports=a},function(t,n,e){var r=e(36),i=e(51),o=e(40),u={};u["[object Float32Array]"]=u["[object Float64Array]"]=u["[object Int8Array]"]=u["[object Int16Array]"]=u["[object Int32Array]"]=u["[object Uint8Array]"]=u["[object Uint8ClampedArray]"]=u["[object Uint16Array]"]=u["[object Uint32Array]"]=!0,u["[object Arguments]"]=u["[object Array]"]=u["[object ArrayBuffer]"]=u["[object Boolean]"]=u["[object DataView]"]=u["[object Date]"]=u["[object Error]"]=u["[object Function]"]=u["[object Map]"]=u["[object Number]"]=u["[object Object]"]=u["[object RegExp]"]=u["[object Set]"]=u["[object String]"]=u["[object WeakMap]"]=!1,t.exports=function(t){return o(t)&&i(t.length)&&!!u[r(t)]}},function(t,n){t.exports=function(t){return function(n){return t(n)}}},function(t,n,e){(function(t){var r=e(48),i=n&&!n.nodeType&&n,o=i&&"object"==typeof t&&t&&!t.nodeType&&t,u=o&&o.exports===i&&r.process,a=function(){try{var t=o&&o.require&&o.require("util").types;return t||u&&u.binding&&u.binding("util")}catch(t){}}();t.exports=a}).call(this,e(25)(t))},function(t,n,e){var r=e(53),i=e(86),o=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return i(t);var n=[];for(var e in Object(t))o.call(t,e)&&"constructor"!=e&&n.push(e);return n}},function(t,n,e){var r=e(87)(Object.keys,Object);t.exports=r},function(t,n){t.exports=function(t,n){return function(e){return t(n(e))}}},,,,,,,,,,,,,function(t,n,e){"use strict";e.r(n),e.d(n,"default",function(){return t});var r=e(17),i=e.n(r),o=e(22),u=e.n(o),a=e(16),c=e.n(a),s=e(2),l=e(15),f=e(3),h=e(11),p=e(9),_=e(8),d=e(4),y=e(12),g=e(7),v=e(1),x=(e(18),e(31)),m=e.n(x),b=e(19),w=e(10),M=e(24),T="%",A=",f",k=function(t){return t.filter(function(t,n,e){return e.indexOf(t)==n})};function t(){var t,n,e,r,o,a,x,O,C,S,j,E,N,D,P,F,U,L,I={top:40,right:30,bottom:60,left:70},R=960,B=500,H=M.bar,Y=null,z=.1,q=-8,G=-20,$=5,X=5,V=1,Z=w.default.colorSchemas.britecharts,W=_.c,J=!1,K=!1,Q=480,tt=-60,nt={top:0,left:0,bottom:0,right:0},et=.24,rt=20,it=1e3,ot=null,ut="name",at="value",ct="stack",st=A,lt=function(t){return t[ut]},ft=function(t){return t[at]},ht=function(t){return t[ct]},pt=function(t){return isNaN(t)||t<0?0:t},_t=!1,dt=Object(p.a)("customMouseOver","customMouseOut","customMouseMove","customClick");function yt(i){i.each(function(i){var o,f;S=R-I.left-I.right,j=B-I.top-I.bottom,function(t){D=k(t.map(function(t){return t.stack})),K&&(D=D.reverse());N=Object(h.b)().key(lt).rollup(function(t){var n={};return t.forEach(function(t){t&&t[ct]&&(n[t[ct]]=ft(t))}),n.values=t,n}).entries(t).map(function(t){return m()({},{total:Object(s.j)(Object(s.g)(t.value,D)),key:t.key},t.value)})}(E=i.reduce(function(t,n){return n.value=+n[at],n.stack=n[ct],n.topicName=ht(n),n.name=n[ut],[].concat(c()(t),[n])},[])),function(){var n=Object(s.e)(N.map(function(t){return t.total}));J?(t=Object(y.b)().domain([0,n]).rangeRound([0,S-1]),e=Object(y.a)().domain(E.map(lt)).rangeRound([j,0]).padding(z)):(t=Object(y.a)().domain(E.map(lt)).rangeRound([0,S]).padding(z),e=Object(y.b)().domain([0,n]).rangeRound([j,0]).nice());a=Object(y.c)().range(Z).domain(E.map(ht)),x=a.domain(E.map(ht)).domain().reduce(function(t,n){return t[n]=a(n),t},{})}(),o=Object(g.o)().keys(D),f=N.map(function(t){var n={};return D.forEach(function(e){n[e]=t[e]}),m()({},t,n)}),O=o(f),function(t){C||(C=Object(v.f)(t).append("svg").classed("britechart stacked-bar",!0),function(){var t=C.append("g").classed("container-group",!0).attr("transform","translate(".concat(I.left,",").concat(I.top,")"));t.append("g").classed("x-axis-group",!0).append("g").classed("x axis",!0),t.selectAll(".x-axis-group").append("g").classed("month-axis",!0),t.append("g").classed("y-axis-group axis",!0),t.append("g").classed("grid-lines-group",!0),t.append("g").classed("chart-group",!0),t.append("g").classed("y-axis-label",!0),t.append("g").classed("metadata-group",!0)}());C.attr("width",R).attr("height",B)}(this),function(){var n=J?t:e;C.select(".grid-lines-group").selectAll("line").remove(),("horizontal"===ot||"full"===ot)&&C.select(".grid-lines-group").selectAll("line.horizontal-grid-line").data(n.ticks($).slice(1)).enter().append("line").attr("class","horizontal-grid-line").attr("x1",1-nt.left).attr("x2",S).attr("y1",function(t){return e(t)}).attr("y2",function(t){return e(t)});"vertical"!==ot&&"full"!==ot||C.select(".grid-lines-group").selectAll("line.vertical-grid-line").data(n.ticks(X).slice(1)).enter().append("line").attr("class","vertical-grid-line").attr("y1",0).attr("y2",j).attr("x1",function(n){return t(n)}).attr("x2",function(n){return t(n)});J?C.select(".grid-lines-group").selectAll("line.extended-y-line").data([0]).enter().append("line").attr("class","extended-y-line").attr("y1",nt.bottom).attr("y2",j).attr("x1",0).attr("x2",0):C.select(".grid-lines-group").selectAll("line.extended-x-line").data([0]).enter().append("line").attr("class","extended-x-line").attr("x1",nt.left).attr("x2",S).attr("y1",j).attr("y2",j)}(),J?(n=Object(l.a)(t).ticks(X,st),r=Object(l.b)(e)):(n=Object(l.a)(t),r=Object(l.b)(e).ticks($,st)),function(){J?(C.select(".x-axis-group .axis.x").attr("transform","translate( 0, ".concat(j," )")).call(n),C.select(".y-axis-group.axis").attr("transform","translate( ".concat(-nt.left,", 0)")).call(r)):(C.select(".x-axis-group .axis.x").attr("transform","translate( 0, ".concat(j," )")).call(n),C.select(".y-axis-group.axis").attr("transform","translate( ".concat(-nt.left,", 0)")).call(r).call(gt));F&&(U&&C.selectAll(".y-axis-label-text").remove(),U=C.select(".y-axis-label").append("text").classed("y-axis-label-text",!0).attr("x",-j/2).attr("y",tt).attr("text-anchor","middle").attr("transform","rotate(270 0 0)").text(F))}(),function(){P&&C.selectAll(".layer").remove();var n=C.select(".chart-group").selectAll(".layer");L=Object(s.i)(rt,(O[0].length+1)*rt,rt),J?(r=n.data(O),i=(P=r.enter().append("g").attr("fill",function(t){var n=t.key;return x[n]}).classed("layer",!0)).selectAll(".bar").data(function(t){return vt(t)}).enter().append("rect").classed("bar",!0).attr("x",function(n){return t(n[0])}).attr("y",function(t){return e(t.data.key)}).attr("height",e.bandwidth()),_t?i.style("opacity",et).transition().delay(function(t,n){return L[n]}).duration(it).ease(W).tween("attr.width",Tt):i.attr("width",function(n){return t(n[1]-n[0])})):function(n){var r=n.data(O),i=(P=r.enter().append("g").attr("fill",function(t){var n=t.key;return x[n]}).classed("layer",!0)).selectAll(".bar").data(function(t){return vt(t)}).enter().append("rect").classed("bar",!0).attr("x",function(n){return t(n.data.key)}).attr("y",function(t){return e(t[1])}).attr("width",t.bandwidth);_t?i.style("opacity",et).transition().delay(function(t,n){return L[n]}).duration(it).ease(W).tween("attr.height",At):i.attr("height",function(t){return e(t[0])-e(t[1])})}(n);var r,i;n.exit().transition().style("opacity",0).remove()}(),function(){R>Q&&C.on("mouseover",function(t){!function(t,n){dt.call("customMouseOver",t,n,Object(v.d)(t))}(this,t)}).on("mouseout",function(t){!function(t,n){C.select(".metadata-group").attr("transform","translate(9999, 0)"),dt.call("customMouseOut",t,n,Object(v.d)(t))}(this,t)}).on("mousemove",function(n){var r,i,o,a,c,s,l,f,h,p;a=xt(r=this),c=u()(a,2),s=c[0],l=c[1],(f=J?bt(l):mt(s))&&(J?(i=s-I.left,o=e(f.key)+e.bandwidth()/2):(i=t(f.key)+I.left,o=l-I.bottom),h=i,p=o,C.select(".metadata-group").attr("transform","translate(".concat(h,",").concat(p,")")),dt.call("customMouseMove",r,f,x,i,o))}).on("click",function(t){var n,e,r,i,o,a;e=xt(n=this),r=u()(e,2),i=r[0],o=r[1],a=J?bt(o):mt(i),dt.call("customClick",n,a,Object(v.d)(n))});C.selectAll(".bar").on("mouseover",wt).on("mouseout",Mt)}()})}function gt(t){t.selectAll(".tick text").attr("transform","translate(".concat(G,", ").concat(q,")"))}function vt(t){return t.map(function(t){for(var n=0;n<t.length;n++)t[n]=pt(t[n]);return t})}function xt(t){return Object(v.d)(t)}function mt(n){var e=n-I.left;return N.find(function(n){var r=n.key,i=t(r),o=i+t.bandwidth();return e>=i&&e<o})}function bt(t){var n=t-I.top;return N.find(function(t){var r=t.key,i=e(r),o=i+e.bandwidth();return n>=i&&n<o})}function wt(){var t=this;Object(v.f)(this).attr("fill",function(){return Object(f.a)(Object(v.f)(t.parentNode).attr("fill")).darker()})}function Mt(){var t=this;Object(v.f)(this).attr("fill",function(){return Object(v.f)(t.parentNode).attr("fill")})}function Tt(n){var e=Object(v.f)(this),r=Object(d.e)(0,t(n[1]-n[0])),i=Object(d.c)(0,1);return function(t){e.attr("width",r(t)).style("opacity",i(t))}}function At(t){var n=e(t[0])-e(t[1]),r=Object(v.f)(this),i=Object(d.e)(0,pt(n)),o=Object(d.c)(0,1);return function(t){r.attr("height",i(t)).style("opacity",o(t))}}return yt.aspectRatio=function(t){return arguments.length?(Y=t,this):Y},yt.betweenBarsPadding=function(t){return arguments.length?(z=t,this):z},yt.colorSchema=function(t){return arguments.length?(Z=t,this):Z},yt.exportChart=function(t,n){b.a.call(yt,C,t,n)},yt.grid=function(t){return arguments.length?(ot=t,this):ot},yt.hasPercentage=function(t){return arguments.length?(st=t?T:A,this):st===T},yt.height=function(t){return arguments.length?(Y&&(R=Math.ceil(t/Y)),B=t,this):B},yt.isHorizontal=function(t){return arguments.length?(J=t,this):J},yt.hasReversedStacks=function(t){return arguments.length?(K=t,this):K},yt.isAnimated=function(t){return arguments.length?(_t=t,this):_t},yt.locale=function(t){return arguments.length?(o=t,this):o},yt.margin=function(t){return arguments.length?(I=i()({},I,t),this):I},yt.nameLabel=function(t){return arguments.length?(ut=t,this):ut},yt.xTicks=function(t){return arguments.length?(X=t,this):X},yt.yTicks=function(t){return arguments.length?($=t,this):$},yt.loadingState=function(t){return arguments.length?(H=t,this):H},yt.on=function(){var t=dt.on.apply(dt,arguments);return t===dt?yt:t},yt.percentageAxisToMaxRatio=function(t){return arguments.length?(V=t,this):V},yt.stackLabel=function(t){return arguments.length?(ct=t,this):ct},yt.tooltipThreshold=function(t){return arguments.length?(Q=t,this):Q},yt.valueLabel=function(t){return arguments.length?(at=t,this):at},yt.valueLabelFormat=function(t){return arguments.length?(st=t,this):st},yt.width=function(t){return arguments.length?(Y&&(B=Math.ceil(t*Y)),R=t,this):R},yt.yAxisLabel=function(t){return arguments.length?(F=t,this):F},yt.yAxisLabelOffset=function(t){return arguments.length?(tt=t,this):tt},yt}}])}); //# sourceMappingURL=stackedBar.min.js.map
cdnjs/cdnjs
ajax/libs/britecharts/2.13.0/umd/stackedBar.min.js
JavaScript
mit
131,655
<?php return [ /* |-------------------------------------------------------------------------- | Default Processors for Synthesizer |-------------------------------------------------------------------------- | | Here are the default processors that are registered by the service provider. | You may add, modify or remove processors here. The processors are lazy | loaded if you register them with the class namespaces. This means that they | are not instantiated until they are called. | */ 'processors' => [ 'markdown' => 'Kenarkose\Synthesizer\Processor\MarkdownProcessor', 'markdownExtra' => 'Kenarkose\Synthesizer\Processor\MarkdownExtraProcessor', 'markdownGithub' => 'Kenarkose\Synthesizer\Processor\GithubMarkdownProcessor', 'markdownParagraph' => 'Kenarkose\Synthesizer\Processor\MarkdownParagraphProcessor', 'htmlspecialchars' => 'Kenarkose\Synthesizer\Processor\HTMLSpecialCharsProcessor', 'striptags' => 'Kenarkose\Synthesizer\Processor\StripTagsProcessor' ], /* |-------------------------------------------------------------------------- | Default Macros for Synthesizer |-------------------------------------------------------------------------- | | Here are the default macros that are registered by the service provider. | You may remove any or add further macros here. | */ 'macros' => [ 'markdown' => ['htmlspecialchars', 'markdown'], 'markdownExtra' => ['htmlspecialchars', 'markdownExtra'], 'markdownInline' => ['htmlspecialchars', 'markdownParagraph'], 'markdownGithub' => ['htmlspecialchars', 'markdownGithub'], 'textOnlyMarkdown' => ['markdownExtra', 'striptags', 'htmlspecialchars'] ] ];
kenarkose/Synthesizer
src/Provider/Laravel/config.php
PHP
mit
1,819
// // GTDiffPatch.m // ObjectiveGitFramework // // Created by Justin Spahr-Summers on 2014-02-27. // Copyright (c) 2014 GitHub, Inc. All rights reserved. // #import "GTDiffPatch.h" #import "GTDiffHunk.h" @interface GTDiffPatch () @property (nonatomic, assign, readonly) git_patch *git_patch; @end @implementation GTDiffPatch #pragma mark Lifecycle - (instancetype)initWithGitPatch:(git_patch *)patch delta:(GTDiffDelta *)delta { NSParameterAssert(patch != NULL); NSParameterAssert(delta != nil); self = [super init]; if (self == nil) return nil; _git_patch = patch; _delta = delta; size_t adds = 0; size_t deletes = 0; size_t contexts = 0; git_patch_line_stats(&contexts, &adds, &deletes, _git_patch); _addedLinesCount = adds; _deletedLinesCount = deletes; _contextLinesCount = contexts; return self; } - (void)dealloc { if (_git_patch != NULL) { git_patch_free(_git_patch); _git_patch = NULL; } } #pragma mark Patch Information - (NSUInteger)hunkCount { return git_patch_num_hunks(self.git_patch); } - (NSUInteger)sizeWithContext:(BOOL)includeContext hunkHeaders:(BOOL)includeHunkHeaders fileHeaders:(BOOL)includeFileHeaders { return git_patch_size(self.git_patch, includeContext, includeHunkHeaders, includeFileHeaders); } - (NSData *)patchData { git_buf buf = GIT_BUF_INIT_CONST(0, NULL); git_patch_to_buf(&buf, self.git_patch); NSData *buffer = [[NSData alloc] initWithBytes:buf.ptr length:buf.size]; git_buf_free(&buf); return buffer; } #pragma mark Hunks - (BOOL)enumerateHunksUsingBlock:(void (^)(GTDiffHunk *hunk, BOOL *stop))block { NSParameterAssert(block != nil); for (NSUInteger idx = 0; idx < self.hunkCount; idx ++) { GTDiffHunk *hunk = [[GTDiffHunk alloc] initWithPatch:self hunkIndex:idx]; if (hunk == nil) return NO; BOOL shouldStop = NO; block(hunk, &shouldStop); if (shouldStop) break; } return YES; } @end
c9s/objective-git
ObjectiveGit/GTDiffPatch.m
Matlab
mit
1,898
module Slatan module Mouth module Im @category = 'im' class << self ## @see https://api.slack.com/methods/im.close def close(channel, options={}) send('close', { channel: channel }.merge(options)) end ## @see https://api.slack.com/methods/im.history def history(channel, options={}) send('history', { channel: channel }.merge(options)) end ## @see https://api.slack.com/methods/im.list def list(options={}) send('list', options) end ## @see https://api.slack.com/methods/im.mark def mark(channel, ts, options={}) send('mark', { channel: channel, ts: ts }.merge(options)) end ## @see https://api.slack.com/methods/im.open def open(user, options={}) send('open', { user: user }.merge(options)) end private def send(method, msg) Mouth.send(@category, method, msg) end end end end end
kudohamu/slatan
lib/slatan/mouth/im.rb
Ruby
mit
1,121
package com.jonasgerdes.schauburgr.usecase.movie_detail; import android.annotation.SuppressLint; import android.app.Activity; import android.app.ActivityOptions; import android.content.Context; import android.content.Intent; import android.content.res.ColorStateList; import android.graphics.Color; import android.net.Uri; import android.os.Bundle; import android.os.Handler; import android.support.annotation.ColorInt; import android.support.annotation.ColorRes; import android.support.design.widget.AppBarLayout; import android.support.design.widget.CollapsingToolbarLayout; import android.support.design.widget.CoordinatorLayout; import android.support.v4.content.ContextCompat; import android.support.v4.widget.NestedScrollView; import android.support.v7.app.AppCompatActivity; import android.support.v7.graphics.Palette; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.support.v7.widget.Toolbar; import android.text.Html; import android.transition.Slide; import android.view.Gravity; import android.view.MenuItem; import android.view.View; import android.widget.ImageView; import android.widget.TextView; import com.bumptech.glide.Glide; import com.f2prateek.dart.Dart; import com.f2prateek.dart.InjectExtra; import com.jonasgerdes.schauburgr.App; import com.jonasgerdes.schauburgr.R; import com.jonasgerdes.schauburgr.model.UrlProvider; import com.jonasgerdes.schauburgr.model.schauburg.entity.Movie; import com.jonasgerdes.schauburgr.model.schauburg.entity.Screening; import com.jonasgerdes.schauburgr.usecase.movie_detail.screening_list.ScreeningListAdapter; import com.jonasgerdes.schauburgr.usecase.movie_detail.screening_list.ScreeningSelectedListener; import com.jonasgerdes.schauburgr.util.ChromeCustomTabWrapper; import com.jonasgerdes.schauburgr.util.ColorUtil; import com.jonasgerdes.schauburgr.util.GlideListener; import com.jonasgerdes.schauburgr.util.StringUtil; import com.jonasgerdes.schauburgr.util.ViewUtils; import com.jonasgerdes.schauburgr.view.SwipeBackLayout; import com.jonasgerdes.schauburgr.view.behavior.NestedScrollViewBehavior; import javax.inject.Inject; import butterknife.BindView; import butterknife.ButterKnife; import io.realm.RealmResults; /** * @author Jonas Gerdes <dev@jonasgerdes.com> * @since 29.03.2017 */ public class MovieDetailActivity extends AppCompatActivity implements MovieDetailContract.View, SwipeBackLayout.SwipeListener, ScreeningSelectedListener, NestedScrollView.OnScrollChangeListener { /** * maximum delay (in ms) to wait for finish loading until activity is opened without transition */ public static final int MAX_DELAY_FOR_TRANSITION = 500; @BindView(R.id.swipe_back_layout) SwipeBackLayout mSwipeBackLayout; @BindView(R.id.toolbar) Toolbar mToolbar; @BindView(R.id.collapsing_toolbar_layout) CollapsingToolbarLayout mCollapsingToolbarLayout; @BindView(R.id.title) TextView mTitleView; @BindView(R.id.genre) TextView mGenreView; @BindView(R.id.duration) TextView mDurationView; @BindView(R.id.contentRating) TextView mContentRating; @BindView(R.id.director) TextView mDirector; @BindView(R.id.cast) TextView mCast; @BindView(R.id.description) TextView mDescriptionView; @BindView(R.id.screeningList) RecyclerView mScreeningList; @BindView(R.id.next_screenings_title) TextView mNextScreeningsTitle; @BindView(R.id.poster) ImageView mPosterView; @BindView(R.id.cover) ImageView mCoverView; @BindView(R.id.trailer_button) ImageView mTrailerButton; @BindView(R.id.loading_indicator) ImageView mLoadingIndicator; @BindView(R.id.nested_scroll_view) NestedScrollView mScrollView; @Inject UrlProvider mUrlProvider; @Inject ChromeCustomTabWrapper mChromeTab; @InjectExtra String movieId; private MovieDetailContract.Presenter mPresenter; private ScreeningListAdapter mScreeningsAdapter; @SuppressLint("RtlHardcoded") @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_movie_detail); setTitle(""); App.getAppComponent().inject(this); ButterKnife.bind(this); Dart.inject(this); mToolbar.setNavigationIcon(R.drawable.ic_arrow_back_white_24dp); mToolbar.setNavigationOnClickListener(v -> onBackPressed()); mScrollView.setOnScrollChangeListener(this); mSwipeBackLayout.setSwipeListener(this); fixNestedScrollFlingBehavior(); initScreeningList(); new MovieDetailPresenter().attachView(this); Slide slide = new Slide(); slide.setSlideEdge(Gravity.RIGHT); getWindow().setEnterTransition(slide); postponeEnterTransition(); //if loading takes longer then 500ms, screw shared element transition and start anyway new Handler().postDelayed(this::startPostponedEnterTransition, MAX_DELAY_FOR_TRANSITION); } private void fixNestedScrollFlingBehavior() { AppBarLayout appBarLayout = ButterKnife.findById(this, R.id.appBarLayout); CoordinatorLayout.LayoutParams params = (CoordinatorLayout.LayoutParams) appBarLayout.getLayoutParams(); params.setBehavior(new NestedScrollViewBehavior()); } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case android.R.id.home: onBackPressed(); return true; } return super.onOptionsItemSelected(item); } @Override protected void onDestroy() { mPresenter.detachView(); super.onDestroy(); } @Override public void setPresenter(MovieDetailContract.Presenter presenter) { mPresenter = presenter; mPresenter.onStartWithMovieId(movieId); } @Override public void showMovie(Movie movie) { mTitleView.setText(movie.getTitle()); mGenreView.setText( StringUtil.concat(movie.getGenres(), getString(R.string.separator_genre)) ); mDurationView.setText(getString(R.string.movie_detail_duration_minutes, movie.getDuration())); @ColorInt int color = getContentRatingColor(this, movie.getContentRating()); mContentRating.setBackgroundTintList(ColorStateList.valueOf(color)); mContentRating.setText(getString(R.string.movie_detail_content_rating, movie.getContentRating())); if (movie.getDirectors().isEmpty()) { mDirector.setVisibility(View.GONE); } else { mDirector.setText(StringUtil.concat(movie.getDirectors(), getString(R.string.separator_directors)) ); } if (movie.getCast().isEmpty()) { mCast.setVisibility(View.GONE); } else { mCast.setText(StringUtil.concat(movie.getCast(), getString(R.string.separator_cast))); } mDescriptionView.setText(Html.fromHtml(movie.getDescription())); ViewUtils.loadAnimationAndStart(mLoadingIndicator, R.drawable.anim_loading_rotation_white_24dp); mLoadingIndicator.setVisibility(View.VISIBLE); Glide.with(this) .load(mUrlProvider.getPosterImageUrl(movie)) .asBitmap() .listener(new GlideListener(bitmap -> { Palette palette = Palette.from(bitmap).generate(); applyColors(palette); mLoadingIndicator.setVisibility(View.GONE); //start transition startPostponedEnterTransition(); }, exception -> { mLoadingIndicator.setImageResource(R.drawable.ic_signal_wifi_off_white_24dp); //start transition startPostponedEnterTransition(); })) .into(mPosterView); if (movie.getCoverUrl() != null) { Glide.with(this) .load(movie.getCoverUrl()) .into(mCoverView); } } @Override public void showScreenings(RealmResults<Screening> screenings) { mScreeningsAdapter.setScreenings(screenings); //hide "next screenings" title if there are no next screenings mNextScreeningsTitle.setVisibility(screenings.size() == 0 ? View.GONE : View.VISIBLE); } @Override public void openWebpage(String url) { mChromeTab.open(this, url); } @Override public void displayTrailerLink() { mTrailerButton.setVisibility(View.VISIBLE); mTrailerButton.setOnClickListener(v -> mPresenter.onTrailerLinkClicked()); } @Override public void enableCoverScrim(boolean enabled) { if (enabled) { mTrailerButton.setBackgroundResource(R.color.colorBackgroundDark50); } else { mTrailerButton.setBackgroundColor(Color.TRANSPARENT); } } @Override public void showTrailer(String url) { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse(url)); startActivity(intent); } private void initScreeningList() { mScreeningList.setLayoutManager( new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false) ); mScreeningsAdapter = new ScreeningListAdapter(); mScreeningsAdapter.setScreeningSelectedListener(this); mScreeningList.setAdapter(mScreeningsAdapter); } private void applyColors(Palette palette) { @ColorInt final int defaultColor = ContextCompat.getColor(MovieDetailActivity.this, R.color.colorPrimaryDark); @ColorInt int background = palette.getVibrantColor( palette.getDominantColor(defaultColor) ); mCollapsingToolbarLayout.setBackgroundColor(background); mCollapsingToolbarLayout.setContentScrimColor(background); int darkColor = palette.getDarkVibrantColor( palette.getDominantColor(defaultColor) ); darkColor = ColorUtil.maxBrightness(darkColor, 0.6f); getWindow().setStatusBarColor(darkColor); getWindow().setNavigationBarColor(darkColor); } @Override public void onFullSwipeBack() { finishAfterTransition(); } @Override public void onSwipe(float progress) { //ignore } @Override public void onScreeningSelected(Screening screening) { mPresenter.onScreeningSelected(screening); } private @ColorInt int getContentRatingColor(Context context, int contentRating) { @ColorRes int colorRes; switch (contentRating) { case 6: colorRes = R.color.colorContentRating6; break; case 12: colorRes = R.color.colorContentRating12; break; case 16: colorRes = R.color.colorContentRating16; break; case 18: colorRes = R.color.colorContentRating18; break; default: colorRes = R.color.colorContentRating0; break; } return ContextCompat.getColor(context, colorRes); } public static void start(Activity activity, Movie movie, ImageView posterThumbnail) { Intent detailsIntent = Henson.with(activity) .gotoMovieDetailActivity() .movieId(movie.getResourceId()) .build(); String transitionName = activity.getString(R.string.transition_movie_poster); posterThumbnail.setTransitionName(transitionName); ActivityOptions options = ActivityOptions .makeSceneTransitionAnimation(activity, posterThumbnail, transitionName); activity.startActivity(detailsIntent, options.toBundle()); } @Override public void onScrollChange(NestedScrollView v, int scrollX, int scrollY, int oldScrollX, int oldScrollY) { if (mTitleView.getTop() + mTitleView.getHeight() / 2 < scrollY) { mCollapsingToolbarLayout.setTitle(mTitleView.getText()); } else { mCollapsingToolbarLayout.setTitle(null); } } }
JGerdes/Schauburgr
app/src/main/java/com/jonasgerdes/schauburgr/usecase/movie_detail/MovieDetailActivity.java
Java
mit
12,428
<?php function ReadEmployees() { include 'dbConnect.php'; $query = "SELECT * FROM employee"; $result = $db -> query($query); $n = 1000; if($n > 0) { echo "<thead><tr><th>ID</th><th>Role</th> <th>Title</th><th>Forename</th><th>Surname</th><th>Street</th> <th>County</th><th>City</th><th>Postcode</th><th>Phone Number Region</th><th>Phone Number</th> <th>Email Address</th> <th>Holiday Entitlement</th></tr></thead>"; while($row=$result->fetch_assoc()){ echo "<tbody> <td>".$row["employee_id"]."</td> <td>".$row["role"]."</td> <td>".$row["title"]."</td> <td>".$row["forename"]."</td> <td>".$row["surname"]."</td> <td>".$row["street"]."</td> <td>".$row["county"]."</td> <td>".$row["city"]."</td> <td>".$row["post_code"]."</td> <td>".$row["contact_phone_region"]."</td> <td>".$row["contact_phone"]."</td> <td>".$row["contact_email"]."</td> <td>".$row["holiday_entitlement"]."</td> </tbody>"; } } } ?> <?php ReadEmployees(); ?>
Team11-AC32006-AC52001/delivrhyno
DBMSReadEmployees.php
PHP
mit
1,280
<?php return array( /* |-------------------------------------------------------------------------- | Application Debug Mode |-------------------------------------------------------------------------- | | When your application is in debug mode, detailed error messages with | stack traces will be shown on every error that occurs within your | application. If disabled, a simple generic error page is shown. | */ 'debug' => true, /* |-------------------------------------------------------------------------- | Application URL |-------------------------------------------------------------------------- | | This URL is used by the console to properly generate URLs when using | the Artisan command line tool. You should set this to the root of | your application so that it is used when running Artisan tasks. | */ 'url' => 'http://localhost', /* |-------------------------------------------------------------------------- | Application Timezone |-------------------------------------------------------------------------- | | Here you may specify the default timezone for your application, which | will be used by the PHP date and date-time functions. We have gone | ahead and set this to a sensible default for you out of the box. | */ 'timezone' => 'UTC', /* |-------------------------------------------------------------------------- | Application Locale Configuration |-------------------------------------------------------------------------- | | The application locale determines the default locale that will be used | by the translation service provider. You are free to set this value | to any of the locales which will be supported by the application. | */ 'locale' => 'en', /* |-------------------------------------------------------------------------- | Application Fallback Locale |-------------------------------------------------------------------------- | | The fallback locale determines the locale to use when the current one | is not available. You may change the value to correspond to any of | the language folders that are provided through your application. | */ 'fallback_locale' => 'en', /* |-------------------------------------------------------------------------- | Encryption Key |-------------------------------------------------------------------------- | | This key is used by the Illuminate encrypter service and should be set | to a random, 32 character string, otherwise these encrypted strings | will not be safe. Please do this before deploying an application! | */ 'key' => 'KLrfEQFf3V2B0tAxWDZyrkqcGqpHZsol', 'cipher' => MCRYPT_RIJNDAEL_128, /* |-------------------------------------------------------------------------- | Autoloaded Service Providers |-------------------------------------------------------------------------- | | The service providers listed here will be automatically loaded on the | request to your application. Feel free to add your own services to | this array to grant expanded functionality to your applications. | */ 'providers' => array( 'Illuminate\Foundation\Providers\ArtisanServiceProvider', 'Illuminate\Auth\AuthServiceProvider', 'Illuminate\Cache\CacheServiceProvider', 'Illuminate\Session\CommandsServiceProvider', 'Illuminate\Foundation\Providers\ConsoleSupportServiceProvider', 'Illuminate\Routing\ControllerServiceProvider', 'Illuminate\Cookie\CookieServiceProvider', 'Illuminate\Database\DatabaseServiceProvider', 'Illuminate\Encryption\EncryptionServiceProvider', 'Illuminate\Filesystem\FilesystemServiceProvider', 'Illuminate\Hashing\HashServiceProvider', 'Illuminate\Html\HtmlServiceProvider', 'Illuminate\Log\LogServiceProvider', 'Illuminate\Mail\MailServiceProvider', 'Illuminate\Database\MigrationServiceProvider', 'Illuminate\Pagination\PaginationServiceProvider', 'Illuminate\Queue\QueueServiceProvider', 'Illuminate\Redis\RedisServiceProvider', 'Illuminate\Remote\RemoteServiceProvider', 'Illuminate\Auth\Reminders\ReminderServiceProvider', 'Illuminate\Database\SeedServiceProvider', 'Illuminate\Session\SessionServiceProvider', 'Illuminate\Translation\TranslationServiceProvider', 'Illuminate\Validation\ValidationServiceProvider', 'Illuminate\View\ViewServiceProvider', 'Illuminate\Workbench\WorkbenchServiceProvider', ), /* |-------------------------------------------------------------------------- | Service Provider Manifest |-------------------------------------------------------------------------- | | The service provider manifest is used by Laravel to lazy load service | providers which are not needed for each request, as well to keep a | list of all of the services. Here, you may set its storage spot. | */ 'manifest' => storage_path().'/meta', /* |-------------------------------------------------------------------------- | Class Aliases |-------------------------------------------------------------------------- | | This array of class aliases will be registered when this application | is started. However, feel free to register as many as you wish as | the aliases are "lazy" loaded so they don't hinder performance. | */ 'aliases' => array( 'App' => 'Illuminate\Support\Facades\App', 'Artisan' => 'Illuminate\Support\Facades\Artisan', 'Auth' => 'Illuminate\Support\Facades\Auth', 'Blade' => 'Illuminate\Support\Facades\Blade', 'Cache' => 'Illuminate\Support\Facades\Cache', 'ClassLoader' => 'Illuminate\Support\ClassLoader', 'Config' => 'Illuminate\Support\Facades\Config', 'Controller' => 'Illuminate\Routing\Controller', 'Cookie' => 'Illuminate\Support\Facades\Cookie', 'Crypt' => 'Illuminate\Support\Facades\Crypt', 'DB' => 'Illuminate\Support\Facades\DB', 'Eloquent' => 'Illuminate\Database\Eloquent\Model', 'Event' => 'Illuminate\Support\Facades\Event', 'File' => 'Illuminate\Support\Facades\File', 'Form' => 'Illuminate\Support\Facades\Form', 'Hash' => 'Illuminate\Support\Facades\Hash', 'HTML' => 'Illuminate\Support\Facades\HTML', 'Input' => 'Illuminate\Support\Facades\Input', 'Lang' => 'Illuminate\Support\Facades\Lang', 'Log' => 'Illuminate\Support\Facades\Log', 'Mail' => 'Illuminate\Support\Facades\Mail', 'Paginator' => 'Illuminate\Support\Facades\Paginator', 'Password' => 'Illuminate\Support\Facades\Password', 'Queue' => 'Illuminate\Support\Facades\Queue', 'Redirect' => 'Illuminate\Support\Facades\Redirect', 'Redis' => 'Illuminate\Support\Facades\Redis', 'Request' => 'Illuminate\Support\Facades\Request', 'Response' => 'Illuminate\Support\Facades\Response', 'Route' => 'Illuminate\Support\Facades\Route', 'Schema' => 'Illuminate\Support\Facades\Schema', 'Seeder' => 'Illuminate\Database\Seeder', 'Session' => 'Illuminate\Support\Facades\Session', 'SoftDeletingTrait' => 'Illuminate\Database\Eloquent\SoftDeletingTrait', 'SSH' => 'Illuminate\Support\Facades\SSH', 'Str' => 'Illuminate\Support\Str', 'URL' => 'Illuminate\Support\Facades\URL', 'Validator' => 'Illuminate\Support\Facades\Validator', 'View' => 'Illuminate\Support\Facades\View', ), );
thatericsmith/laravel-foxycart
app/config/app.php
PHP
mit
7,551
<!DOCTYPE html> <html> <head> <title>A basic example of AJAX (getting a number)</title> <meta name="robots" content="noindex,nofollow" /> <meta name="description" content=" A basic example of a chart created using AJAX to fetch a number." /> <meta name="googlebot" content="NOODP"> <link rel="stylesheet" href="demos.css" type="text/css" media="screen" /> <!-- Include the RGraph libraries --> <script src="../libraries/RGraph.common.core.js" ></script> <script src="../libraries/RGraph.common.effects.js" ></script> <script src="../libraries/RGraph.vprogress.js" ></script> </head> <body> <h1>A basic example of AJAX (getting a number)</h1> <p> This is a basic example of using AJAX to request the data from the server to fetch a number. The window.onload function initiates the AJAX request and then the callback function - drawGraph() - takes the response and creates the chart. </p> <canvas id="cvs" width="100" height="300">[No canvas support]</canvas><br /> <button onclick="window.onload()">Rfresh data</button> <script> /** * Ths window.onload function initiates the AJAX request. The AJAX page is: http://www.rgraph.net/getdata.html * If you view this in your browser you'll see that all it does is output a sequence of numbers. */ window.onload = function () { RGraph.AJAX.getNumber('/getdata.html', function (num) { drawGraph(num); }); }; /** * This is the AJAX callback function. It splits up the response, converts it to numbers and then creates the chart. */ function drawGraph (num) { // The num variable is the output of the AJAX request var data = num; // Draw the progress bar // A global on purpose if (typeof progress === 'undefined') { progress = new RGraph.VProgress({ id: 'cvs', min: 0, max: 100, value: num, options: { margin: 10, gutterRight: 35 } }) } else { progress.value = num; } progress.grow(); } </script> <p> <b>Note:</b> In October 2013 a new CSV reader was added to RGraph. It makes reading CSV files much easier. You can read about <a href="/docs/csv-file-reader.html">the new CSV reader</a> here. </p> <p></p> This goes in the documents header: <pre class="code"> &lt;script src="RGraph.common.core.js"&gt;&lt;/script&gt; &lt;script src="RGraph.common.effects.js"&gt;&lt;/script&gt; &lt;script src="RGraph.vprogress.js"&gt;&lt;/script&gt; </pre> Put this where you want the chart to show up: <pre class="code"> &lt;canvas id="cvs" width="600" height="250"&gt;[No canvas support]&lt;/canvas&gt; &lt;button onclick="window.onload()"&gt;Refresh data&lt;/button&gt; </pre> This is the code that generates the chart: <pre class="code"> &lt;script&gt; <span>/** * Ths window.onload function initiates the AJAX request. The AJAX page is: http://www.rgraph.net/getdata.html * If you view this in your browser you'll see that all it does is output a sequence of numbers. */</span> window.onload = function () { RGraph.AJAX.getNumber('/getdata.html', function (num) { drawGraph(num); }); }; <span>/** * This is the AJAX callback function. It splits up the response, converts it to numbers and then creates the chart. */</span> function drawGraph (num) { <span>// The num variable is the output of the AJAX request</span> var data = num; <span>// Draw the progress bar // A global on purpose</span> if (typeof progress === 'undefined') { progress = new RGraph.VProgress({ id: 'cvs', min: 0, max: 100, value: num, options: { margin: 10, gutterRight: 35 } }) } else { progress.value = num; } progress.grow(); } &lt;/script&gt; </pre> <p> <a href="https://www.facebook.com/sharer/sharer.php?u=http://www.rgraph.net" target="_blank" onclick="window.open('https://www.facebook.com/sharer/sharer.php?u=http://www.rgraph.net', null, 'top=50,left=50,width=600,height=368'); return false"><img src="../images/facebook-large.png" width="200" height="43" alt="Share on Facebook" border="0" title="Visit the RGraph Facebook page" /></a> <a href="https://twitter.com/_rgraph" target="_blank" onclick="window.open('https://twitter.com/_rgraph', null, 'top=50,left=50,width=700,height=400'); return false"><img src="../images/twitter-large.png" width="200" height="43" alt="Share on Twitter" border="0" title="Mention RGraph on Twitter" /></a> </p> </body> </html>
LinkItONEDevGroup/LASS
IASS/IASS_BASIC/IASS_Server/html/RGraph/demos/basic-ajax-number.html
HTML
mit
5,242
package sintax; import java.io.IOException; import java.util.ArrayList; import com.hp.hpl.jena.graph.Node; import com.hp.hpl.jena.graph.Triple; import lexic.Token; /* * PropertyListNotEmpty ::= Verb ObjectList ( ';' ( Verb ObjectList )? )* */ public class PropertyListNotEmpty extends Production{ public ArrayList<Triple> triples = new ArrayList<Triple>(); public Node subject = null; @Override public boolean process() throws IOException { Verb v = (Verb) $.get("Verb"); if(v.analize()){ ObjectList ol = (ObjectList) $.get("ObjectList"); if(ol.analize()){ for(int i = 0;i<ol.objects.size();i++){ triples.add(new Triple(subject,v.node, ol.objects.get(i))); } } v = (Verb) $.get("Verb"); ol = (ObjectList) $.get("ObjectList"); while($.current.token == Token.SEMI){ v = (Verb) $.get("Verb"); ol = (ObjectList) $.get("ObjectList"); $.next(); if(v.analize()){ if(ol.analize()){ for(int i = 0;i<ol.objects.size();i++){ triples.add(new Triple(subject,v.node, ol.objects.get(i))); } }else{ return false; } } } return true; } return false; } @Override public ArrayList<Token> FIRSTS() throws IOException { return get("Verb").FIRSTS(); } @Override public ArrayList<Token> FOLLOWS() throws IOException { ArrayList<Token> ans = new ArrayList<Token>(); for ( Token t : get("TriplesSameSubject").FOLLOWS() ) ans.add(t); for ( Token t : get("PropertyList").FOLLOWS() ) ans.add(t); return ans; } }
esteban67/sparql
src/sintax/PropertyListNotEmpty.java
Java
mit
1,549
const DBHelpers = require('../../../../common/databaseHelpers.js'); const Assert = require('chai').assert; module.exports = function() { it('return empty strings without data', function() { const queryData = DBHelpers.getUpdateQueryData(); Assert.equal(queryData.updateQuery, ''); Assert.deepEqual(queryData.vars, []); }); it('return query parts with one item', function() { const queryData = DBHelpers.getUpdateQueryData([ { field: 'email', input: 'ralph@lauren.com', rules: { notEmpty: true, type: 'string' } } ]); Assert.equal(queryData.updateQuery, 'email=?'); Assert.deepEqual(queryData.vars, [ 'ralph@lauren.com' ]); }); it('return query parts with multiple items', function() { const queryData = DBHelpers.getUpdateQueryData([ { field: 'full_name', input: 'Peter Pan', rules: { notEmpty: true, type: 'string' } }, { field: 'counter', input: 9, rules: { notEmpty: true, type: 'number' } }, { field: 'username', input: 'pan99', rules: { notEmpty: true, type: 'string' } } ]); Assert.equal(queryData.updateQuery, 'full_name=?,counter=?,username=?'); Assert.deepEqual(queryData.vars, [ 'Peter Pan', 9, 'pan99' ]); }); };
waiterio/api
test/unit/common/databaseHelpers/testGetUpdateQueryData.js
JavaScript
mit
1,168
<section class="section" id="products"><section class="section-heading has-text-centered"><h1>We make...</h1><p>Explore our previous builds.</p></section><!--+glide( "./images/showcase/pumpinbill/side.jpg", "./images/showcase/coorabell/house-night.jpg", "./images/showcase/6-2_lennox/night-ext.jpg", "./images/showcase/6_suffolk/house.jpg" )--><div class="glide"><div class="glide__track" data-glide-el="track"><ul class="glide__slides"><li class="glide__slide"><img class="glide__image" src="./images/thumbs/coorabel_vid-thumb.png"/><button class="video-launcher glide__arrow glide__arrow--play" data-video="./videos/141_NEWES_RD_Coorabell.mp4"><img src="./images/icon_triangle__white.png"/></button><div class="glide__caption">Coorabell drone footage<a href="/showcase">See more details &raquo;</a></div></li><li class="glide__slide"><img class="glide__image" src="./images/showcase/pumpinbill/side.jpg"/><div class="glide__caption">Pumpinbil Bush Pavilion<a href="/showcase">View the showcase &raquo;</a></div></li><li class="glide__slide"><img class="glide__image" src="./images/showcase/coorabell/house-night.jpg"/><div class="glide__caption">Coorabell Bush Pavilion<a href="/showcase">View the showcase &raquo;</a></div></li></ul></div><div class="glide__bullets" data-glide-el="controls[nav]"><button class="glide__bullet" data-glide-dir="0"></button><button class="glide__bullet" data-glide-dir="1"></button><button class="glide__bullet" data-glide-dir="2"></button></div><div data-glide-el="controls"><button class="glide__arrow glide__arrow--left" data-glide-dir="&lt;"><img src="./images/icon_more-than__white.png" style="transform:rotateY(180deg)"/></button><button class="glide__arrow glide__arrow--right" data-glide-dir="&gt;"><img src="./images/icon_more-than__white.png"/></button></div></div></section>
Zaggamok/zaggamok.github.io
sections/prev-builds.html
HTML
mit
1,819
<?php require_once("_head.php"); ?> <script src="http://api-maps.yandex.ru/1.1/index.xml?key=ADzw600BAAAAnOQ8NQIAxBFbuoPzi14fQXTpnbMudNRqTVEAAAAAAAAAAAA9JEyR6NjLBemwhkInmnzXQBeRQw==" type="text/javascript"></script> <script type="text/javascript" src="<?= base_url() ?>js/maps.js"></script> <?php require_once("_header.php"); ?> <script type="text/javascript"> function action_map(id, action) { if (action == 'show') { $('#' + id).show(); // var link = '<a href="#" onclick="javacript:action_map(\''+ id +'\', \'hide\');return false;">Скрыть карту</a>'; // $('#link_'+id).html(link); } else if (action == 'hide') { $('#' + id).hide(); // var link = '<a href="#" onclick="javacript:action_map(\''+ id +'\', \'show\');return false;">Показать на карте</a>'; // $('#link_'+id).html(link); } if (id == 'office1') { YMaps.load(init1); } else if (id == 'office2') { YMaps.load(init2); } } $(document).ready(function(){ action_map('office2', 'show'); action_map('office1', 'show'); }); </script> <div class="content"> <!-- Содержание --> <?php $address1 = null; if (! empty($contacts->contact_address)) { $contacts->contact_address = json_decode($contacts->contact_address, true); $address1 = (isset($contacts->contact_address[0]) && empty($contacts->contact_address[0]['contact_address'])) ? null : $contacts->contact_address[0]['contact_address']; } $map1 = null; if (! empty($contacts->contact_maps)) { $contacts->contact_maps = json_decode($contacts->contact_maps, true); $map1 = isset($contacts->contact_maps['contact_map1']) ? $contacts->contact_maps['contact_map1'] : null; } $photo1 = null; if (! empty($contacts->contact_photos)) { $contacts->contact_photos = json_decode($contacts->contact_photos, true); $photo1 = isset($contacts->contact_photos['contact_photo1']) ? $contacts->contact_photos['contact_photo1'] : null; } $time1 = null; if (! empty($contacts->contact_times)) { $contacts->contact_times = json_decode($contacts->contact_times, true); $time1 = isset($contacts->contact_times[0]) ? $contacts->contact_times[0] : null; } ?> <div class="about"> <div class="data"> <h1>Контакты</h1> <!-- Разделитель --> <div class="line_separator"> <div class="line_separator_left">&nbsp;</div> <div class="line_separator_right">&nbsp;</div> </div> <?php if (isset($contacts)){ ?> <div class="part"> <div style="float:left; margin-right:20px; margin-top:5px;"> Телефон: </div> <div style="float:left;"> <?php if (! empty($contacts->contact_phones)) : foreach ($contacts->contact_phones as $phone) { ?> <div> <p class="phone1" style="font-size:20px;"><?= $phone['contact_kode'] ?></p> <p class="phone2" style="font-size:30px;"><?= $phone['contact_phone'] ?></p> </div> <?php } endif; ?> </div> <div style="float:left; margin-right:10px; margin-top:5px;"> Электронная почта: </div> <div style="float:left; margin-top:5px;"> <?php if (! empty($contacts->contact_emails)) : foreach ($contacts->contact_emails as $email) { ?> <a href="mailto:<?= $email ?>"><?= $email ?></a> <?php } endif; ?> </div> </div> <!-- Разделитель --> <div class="line_separator"> <div class="line_separator_left">&nbsp;</div> <div class="line_separator_right">&nbsp;</div> </div> <div class="part"> <?php $time_work1 = null; $timeout1 = null; if ($time1) { $time_work1 = "с " . $time1['time_from_h'] . ":" . $time1['time_from_m']; $time_work1 .= " до " . $time1['time_to_h'] . ":" . $time1['time_to_m']; $timeout2 = "с " . $time1['time_tm_from_h'] . ":" . $time1['time_tm_from_m']; $timeout2 .= " до " . $time1['time_tm_to_h'] . ":" . $time1['time_tm_to_m']; } ?> <div style="float:left; margin-top:9px;"> <h3>Офис:</h3> </div> <div class="office_address"> <?php if (!empty($photo1)) { ?> <div class="contact_line"><img src="<?= base_url() . $photo1 ?>" style="max-height:370px;max-width:370px;"></div> <?php } ?> <div class="contact_line"><span>Адрес: </span><span><?= $address1 ?></span></div> <div class="contact_line"><span>Время работы: </span><span><?= $time_work1 ?></span></div> <div class="contact_line"><span>Суббота: </span><span>10:00 - 15:00</span></div> <div class="contact_line"><span>Воскресенье: </span><span>выходной</span></div> <div> <div id="office2" style="width:380px;height:400px;display:none;margin-bottom:10px;"></div> </div> </div> </div> </div> <div class="floatL data"> </div> <?php } ?> </div> <div style="clear:both;">&nbsp;</div> </div> <?php require_once('_footer.php'); ?>
popovdenis/bezopasnost
system/application/views/_contacts.php
PHP
mit
6,125
<?php namespace mcanan\app\models; class %Modelo% extends \mcanan\framework\Model { public function getAll(%contextoParms%, $cntPorPagina, $offset) { $consulta = "select * from %modelo% order by id limit $cntPorPagina offset $offset"; return $this->db->consulta($consulta); } public function getCnt(%contextoParms%) { $consulta = "select count(*) from %modelo%"; $ret=$this->db->consulta($consulta); return $ret[0][0]; } public function getById(%keyParms%) { $consulta = "select * from %modelo% where %keyWhere%"; $ret = $this->db->consulta($consulta); return $ret[0]; } public function insert(%contextoParmsInsert%$descripcion) { $consulta = "insert into %modelo%(descripcion) values ('$descripcion')"; $res = $this->db->update($consulta); if (!$res){ $this->error = $this->db->getError(); } return $res; } public function update(%keyParms%, $descripcion) { $consulta = "update %modelo% set descripcion='$descripcion' where %keyWhere%"; $res = $this->db->update($consulta); if (!$res){ $this->error = $this->db->getError(); } return $res; } public function delete(%keyParms%) { $consulta = "delete from %modelo% where %keyWhere%"; $res = $this->db->update($consulta); if (!$res){ $this->error = $this->db->getError(); } return $res; } } ?>
mcanan/php-project-starter
templates/models/model.php
PHP
mit
1,543
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE78_OS_Command_Injection__wchar_t_environment_execlp_17.c Label Definition File: CWE78_OS_Command_Injection.strings.label.xml Template File: sources-sink-17.tmpl.c */ /* * @description * CWE: 78 OS Command Injection * BadSource: environment Read input from an environment variable * GoodSource: Fixed string * Sink: execlp * BadSink : execute command with wexeclp * Flow Variant: 17 Control flow: for loops * * */ #include "std_testcase.h" #include <wchar.h> #ifdef _WIN32 #define COMMAND_INT_PATH L"%WINDIR%\\system32\\cmd.exe" #define COMMAND_INT L"cmd.exe" #define COMMAND_ARG1 L"/c" #define COMMAND_ARG2 L"dir" #define COMMAND_ARG3 data #else /* NOT _WIN32 */ #include <unistd.h> #define COMMAND_INT_PATH L"/bin/sh" #define COMMAND_INT L"sh" #define COMMAND_ARG1 L"ls" #define COMMAND_ARG2 L"-la" #define COMMAND_ARG3 data #endif #define ENV_VARIABLE L"ADD" #ifdef _WIN32 #define GETENV _wgetenv #else #define GETENV getenv #endif #ifdef _WIN32 #include <process.h> #define EXECLP _wexeclp #else /* NOT _WIN32 */ #define EXECLP execlp #endif #ifndef OMITBAD void CWE78_OS_Command_Injection__wchar_t_environment_execlp_17_bad() { int i; wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; for(i = 0; i < 1; i++) { { /* Append input from an environment variable to data */ size_t dataLen = wcslen(data); wchar_t * environment = GETENV(ENV_VARIABLE); /* If there is data in the environment variable */ if (environment != NULL) { /* POTENTIAL FLAW: Read data from an environment variable */ wcsncat(data+dataLen, environment, 100-dataLen-1); } } } /* wexeclp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); } #endif /* OMITBAD */ #ifndef OMITGOOD /* goodG2B() - use goodsource and badsink by changing the conditions on the for statements */ static void goodG2B() { int h; wchar_t * data; wchar_t dataBuffer[100] = L""; data = dataBuffer; for(h = 0; h < 1; h++) { /* FIX: Append a fixed string to data (not user / external input) */ wcscat(data, L"*.*"); } /* wexeclp - searches for the location of the command among * the directories specified by the PATH environment variable */ /* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */ EXECLP(COMMAND_INT, COMMAND_INT, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL); } void CWE78_OS_Command_Injection__wchar_t_environment_execlp_17_good() { goodG2B(); } #endif /* OMITGOOD */ /* Below is the main(). It is only used when building this testcase on * its own for testing or for building a binary to use in testing binary * analysis tools. It is not used when compiling all the testcases as one * application, which is how source code analysis tools are tested. */ #ifdef INCLUDEMAIN int main(int argc, char * argv[]) { /* seed randomness */ srand( (unsigned)time(NULL) ); #ifndef OMITGOOD printLine("Calling good()..."); CWE78_OS_Command_Injection__wchar_t_environment_execlp_17_good(); printLine("Finished good()"); #endif /* OMITGOOD */ #ifndef OMITBAD printLine("Calling bad()..."); CWE78_OS_Command_Injection__wchar_t_environment_execlp_17_bad(); printLine("Finished bad()"); #endif /* OMITBAD */ return 0; } #endif
maurer/tiamat
samples/Juliet/testcases/CWE78_OS_Command_Injection/s06/CWE78_OS_Command_Injection__wchar_t_environment_execlp_17.c
C
mit
3,868
using System; using System.Collections.Generic; using System.Data.SQLite; using System.IO; namespace MediaManager.MediaManagement { class MediaDB { private SQLiteConnection m_dbConnection; public MediaDB() { m_dbConnection = Init(); ValidityCheck(); } private SQLiteConnection Init() { return new SQLiteConnection("Data Source=MediaDB.sqlite;Version=3"); } public void Write(string sql) { ValidityCheck(); m_dbConnection.Open(); SQLiteCommand command = new SQLiteCommand(sql, m_dbConnection); command.ExecuteNonQuery(); m_dbConnection.Close(); } public List<MediaItem> Fetch(string sql) { m_dbConnection.Open(); SQLiteCommand command = new SQLiteCommand(sql, m_dbConnection); SQLiteDataReader reader = command.ExecuteReader(); List<MediaItem> Media = new List<MediaItem>(); while (reader.Read()) { Media.Add(new MediaItem() { Title = reader["Title"].ToString(), Type = reader["Type"].ToString(), //CurrentEpisode = Convert.ToInt32(reader["CurrentEpisode"]), //TotalEpisodes = Convert.ToInt32(reader["TotalEpisodes"]), //CurrentSeason = Convert.ToInt32(reader["CurrentSeason"]), //TotalSeasons = Convert.ToInt32(reader["TotalSeason"]), Score = Convert.ToInt32(reader["Score"]), }); } m_dbConnection.Close(); return Media; } public void Delete() { m_dbConnection.Close(); GC.Collect(); GC.WaitForPendingFinalizers(); File.Delete("MediaDB.sqlite"); } public void ValidityCheck() { if (!File.Exists("MediaDB.sqlite")) SQLiteConnection.CreateFile("MediaDB.sqlite"); m_dbConnection.Open(); string sql = "CREATE TABLE IF NOT EXISTS Shows (Title VARCHAR(20), Type VARCHAR(20), Score INT)"; SQLiteCommand command = new SQLiteCommand(sql, m_dbConnection); command.ExecuteNonQuery(); m_dbConnection.Close(); } } }
iDrinkTooMuchCoffee/MediaManager
MediaManager/MediaManager/MediaManagement/MediaDB.cs
C#
mit
1,912
<?php // Namespace overhead namespace onassar\Tapfiliate; /** * Factory * * Operates as a factory for returning Tapfiliate clients. * * @author Oliver Nassar <onassar@gmail.com> * @link https://github.com/onassar/PHP-Tapfiliate * @link https://tapfiliate.com/docs/rest/ */ class Factory { /** * _apiKey * * @access protected * @var null|string (default: null) */ protected $_apiKey = null; /** * _clients * * @access protected * @var array (default: array()) */ protected $_clients = array(); /** * __construct * * @access public * @param string $apiKey * @return void */ public function __construct(string $apiKey) { $this->_apiKey = $apiKey; } /** * affiliates * * @access public * @return Affiliates */ public function affiliates(): Affiliates { $this->_clients['affiliates'] = $this->_clients['affiliates'] ?? new Affiliates($this); $client = $this->_clients['affiliates']; return $client; } /** * balances * * @access public * @return Balances */ public function balances(): Balances { $this->_clients['balances'] = $this->_clients['balances'] ?? new Balances($this); $client = $this->_clients['balances']; return $client; } /** * commissions * * @access public * @return Commissions */ public function commissions(): Commissions { $this->_clients['commissions'] = $this->_clients['commissions'] ?? new Commissions($this); $client = $this->_clients['commissions']; return $client; } /** * conversions * * @access public * @return Conversions */ public function conversions(): Conversions { $this->_clients['conversions'] = $this->_clients['conversions'] ?? new Conversions($this); $client = $this->_clients['conversions']; return $client; } /** * getAPIKey * * @access public * @return string */ public function getAPIKey(): string { $apiKey = $this->_apiKey; return $apiKey; } /** * payments * * @access public * @return Payments */ public function payments(): Payments { $this->_clients['payments'] = $this->_clients['payments'] ?? new Payments($this); $client = $this->_clients['payments']; return $client; } /** * programs * * @access public * @return Programs */ public function programs(): Programs { $this->_clients['programs'] = $this->_clients['programs'] ?? new Programs($this); $client = $this->_clients['programs']; return $client; } }
onassar/PHP-Tapfiliate
src/Factory.class.php
PHP
mit
3,374
import React from 'react'; import ReactTestUtils from 'react-dom/test-utils'; import { getDOMNode } from './utils'; import Cell from '../src/Cell'; import TableContext from '../src/TableContext'; import { LAYER_WIDTH } from '../src/constants'; describe('Cell', () => { it('Should output a cell', () => { const Title = 'Title'; const instance = getDOMNode(<Cell>Title</Cell>); assert.equal(instance.className, 'rs-cell'); assert.equal(instance.style.height, '36px'); assert.equal(instance.innerText, Title); }); it('Should The text be `right` aligned', () => { const instance = getDOMNode(<Cell align="right" />).querySelector('.rs-cell-content'); assert.equal(instance.style.textAlign, 'right'); }); it('Should The text be `middle` aligned', () => { const instance = getDOMNode(<Cell verticalAlign="middle" />).querySelector('.rs-cell-content'); assert.equal(instance.style.display, 'table-cell'); assert.equal(instance.style.verticalAlign, 'middle'); }); it('Should have a children is `abc`', () => { const instance = getDOMNode(<Cell rowData={{ name: 'abc' }} dataKey="name" />); assert.equal(instance.innerText, 'abc'); }); it('Should be 100 the width', () => { const instance = getDOMNode(<Cell width={100} />).querySelector('.rs-cell-content'); assert.equal(instance.style.width, '100px'); }); it('Should be 100 the height', () => { const instance = getDOMNode(<Cell height={100} />); assert.equal(instance.style.height, '100px'); }); it('Should be 100 the left', () => { const instance = getDOMNode(<Cell left={100} />); assert.equal(instance.style.left, '100px'); }); it('Should be 100 the height when set isHeaderCell', () => { const instance = getDOMNode(<Cell headerHeight={100} height={20} isHeaderCell />); assert.equal(instance.style.height, '100px'); }); it('Should hava a `first` className ', () => { const instance = getDOMNode(<Cell firstColumn />); assert.ok(instance.className.match(/\bfirst\b/)); }); it('Should hava a `last` className ', () => { const instance = getDOMNode(<Cell lastColumn />); assert.ok(instance.className.match(/\blast\b/)); }); it('Should call `renderCell`', () => { const instance = getDOMNode( <Cell renderCell={cell => { return <div className="abc">{cell}</div>; }} > ABC </Cell> ); assert.equal(instance.querySelector('.abc').innerText, 'ABC'); }); it('Should have a expand icon', () => { const instance = getDOMNode( <div> <TableContext.Provider value={{ isTree: true }}> <Cell hasChildren firstColumn /> </TableContext.Provider> </div> ); assert.ok(instance.querySelector('.rs-cell-expand-icon')); }); it('Should have a expanded icon', () => { const instance = getDOMNode( <div> <TableContext.Provider value={{ isTree: true }}> <Cell hasChildren firstColumn expanded /> </TableContext.Provider> </div> ); assert.ok(instance.querySelector('[aria-label="arrow down"]')); }); it('Should be 60 the left', () => { const layer = 2; const instance = getDOMNode(<Cell layer={layer} firstColumn />); assert.ok(instance.style.left, LAYER_WIDTH * layer); }); it('Should call onTreeToggle callback', done => { const doneOp = (rowKey, rowIndex, rowData, event) => { if (rowData[rowKey] === 'a' && rowIndex === 1 && event) { done(); } }; const instance = getDOMNode( <div> <TableContext.Provider value={{ isTree: true }}> <Cell hasChildren firstColumn onTreeToggle={doneOp} rowData={{ name: 'a' }} rowIndex={1} rowKey="name" /> </TableContext.Provider> </div> ); ReactTestUtils.Simulate.click(instance.querySelector('.rs-cell-expand-icon')); }); it('Should have a custom className', () => { const instance = getDOMNode(<Cell className="custom" />); assert.ok(instance.className.match(/\bcustom\b/)); }); it('Should have a custom style', () => { const instance = getDOMNode(<Cell style={{ fontSize: 14, padding: 20 }} />); assert.equal(instance.querySelector('.rs-cell-content').style.fontSize, '14px'); assert.equal(instance.querySelector('.rs-cell-content').style.padding, '20px'); }); it('Should render custom children', () => { const instance1 = getDOMNode(<Cell rowData={{ id: 1 }}>{rowData => rowData.id}</Cell>); const instance2 = getDOMNode(<Cell>1</Cell>); assert.ok(instance1.innerText, 1); assert.ok(instance2.innerText, 1); }); it('Should render nested values', () => { const instance = getDOMNode( <Cell rowData={{ user: { name: 'foobar' } }} dataKey="user.name" /> ); const instance2 = getDOMNode( <Cell rowData={{ user: { name: ['foo', 'bar'] } }} dataKey="user.name.1" /> ); assert.equal(instance.innerText, 'foobar'); assert.equal(instance2.innerText, 'bar'); }); });
rsuite/rsuite-table
test/CellSpec.js
JavaScript
mit
5,131
package ca.qc.johnabbott.cs603.Controllers; import ca.qc.johnabbott.cs603.Tools.*; import ca.qc.johnabbott.cs603.Views.DrawingView; import ca.qc.johnabbott.cs603.Views.PreviewView; import android.graphics.Color; public class ToolBox { private DrawingView drawing; private PreviewView preview; private Tool currentTool; private int strokeWidth; private int strokeColor; private int fillColor; public ToolBox(DrawingView drawing) { super(); this.drawing = drawing; this.strokeWidth = 2; this.strokeColor = Color.BLACK; this.fillColor = Color.TRANSPARENT; } public ToolBox(PreviewView preview) { super(); this.preview = preview; this.strokeWidth = 2; this.strokeColor = Color.BLACK; this.fillColor = Color.TRANSPARENT; } public void changeTool(ToolName name) { if (currentTool == null || currentTool.getName() != name) { switch (name) { case LINE: currentTool = new LineTool(this); break; case SQUARE: currentTool = new SquareTool(this, ToolName.SQUARE); break; case RECTANGLE: currentTool = new RectangleTool(this, ToolName.RECTANGLE); break; case CIRCLE: currentTool = new CircleTool(this, ToolName.CIRCLE); break; case OVAL: currentTool = new OvalTool(this, ToolName.OVAL); break; default: currentTool = new LineTool(this); break; } } } public Tool getCurrentTool() { return currentTool; } public ToolName getCurrentToolName() { return currentTool.getName(); } public int getStrokeWidth() { return strokeWidth; } public void setStrokeWidth(int strokeWidth) { this.strokeWidth = strokeWidth; } public int getStrokeColor() { return strokeColor; } public void setStrokeColor(int color) { this.strokeColor = color; } public int getFillColor() { return fillColor; } public void setFillColor(int color) { this.fillColor = color; } public DrawingView getDrawingView() { return drawing; } }
benrs/OOProject
AndroidCode/app/src/main/java/ca/qc/johnabbott/cs603/Controllers/ToolBox.java
Java
mit
2,446
--- layout: default --- <div class="posts"> <article class="post"> <h1>About Me</h1> <p>My name is Kamal Bin Mustafa, mostly people will just call me Kamal. I am a Malaysian living in the southern State of Johor, near Singapore. Online, I mostly know through my handle k4ml.</p> <p>I have been a web developer since early 2000 where my first professional experience was in building PHP web applications. We build numerous applications for government agencies such as JKR, KKR, JPN, JPM etc. My next job was with a software agency in Singapore where we build e-commerce websites for our clients using Drupal CMS. Since 2010, I have worked at Xoxzo Inc building web telephony API and managed to grow the company from 2 people into a team of 10 engineers working fully remotely spanning multiple cities from Tokyo to Seoul, Manila, KL, Jakarta, Ufa and Kolkatta. Xoxzo Inc was acquired by a public listed company in Tokyo, Accrete Inc. in 2021.</p> <p>I'm currently a CTO at LaLokalabs where we're focusing on our next adventure in building services that can help software developers in making their life easier.</p> <p>I love writing about technologies especially in software development and also giving talks through various platforms. Among the talks I have presented before:-</p> <ul> <li>Python/Django Web Development for PHP Developers at Pycon APAC 2012 in Singapore</li> <li>Mastering Python Ecosystem at PyconMY 2015</li> <li>Django From Scratch at Pycon APAC 2017 in Kuala Lumpur, Malaysia</li> <li>Mastering Python Ecosystem at PyconID 2018 in Jakarta, Indonesia</li> </ul> <p>Other than that I have also been invited to participate in student’s program at local universities such Universiti Teknologi Malaysia (UTM) and Universiti Tun Hussein Onn Malaysia (UTHM) and conducting Python/Django workshop with IT staff at Hospital Universiti Sains Malaysia (HUSM).</p> <p>The postings on this site are my own and not necessarily represent my employer's positions, strategies or opinions. I can be reached via Twitter <a href="https://twitter.com/k4ml">@k4ml</a> or <a href="http://dev.to/k4ml">dev.to/k4ml</a>.</p> </article> </div> <div class="notes"> <p>This site currently use <a href="https://jekyllrb.com/">Jekyll</a> but previously I'm using Nikola. Most of the content still in format generated by Nikola and I'm too lazy to migrate it to Jekyll. But since it just all HTML, you can still browse the <a href="/index-old.html">old site</a>. </div> <div></div>
k4ml/k4ml.github.io
index.html
HTML
mit
2,546
# -*- encoding: utf-8 -*- # vim: sw=2 ts=2 require 'spec_helper' require 'qiniu/auth' require 'qiniu' require 'qiniu/fop' module Qiniu module Fop module Persistance describe Persistance do before :all do @bucket = 'rubysdk' pic_fname = "image_logo_for_test.png" @key = make_unique_key_in_bucket(pic_fname) local_file = File.expand_path('../' + pic_fname, __FILE__) ### 检查测试文件存在性 code, body, headers = Qiniu::Storage.stat(@bucket, @key) if code == 404 || code == 612 then # 文件不存在,尝试上传 pp = Qiniu::Auth::PutPolicy.new(@bucket, @key) code, body, headers = Qiniu::Storage.upload_with_put_policy( pp, local_file, nil, nil, bucket: @bucket ) puts "Put a test file for Persistance cases" puts code.inspect puts body.inspect puts headers.inspect end end context ".pfop" do it "should works" do pp = Persistance::PfopPolicy.new( @bucket, @key, 'imageView2/1/w/80/h/80', # fops 'www.baidu.com' # notify_url ) code, data, headers = Qiniu::Fop::Persistance.pfop(pp) code.should == 200 puts data.inspect end end context ".prefop" do it "should works" do code, data, headers = Qiniu::Fop::Persistance.prefop('fakePersistentId') code.should == 404 puts code.inspect puts data.inspect puts headers.inspect end end context ".p1" do it "should works" do url = 'http://fake.qiniudn.com/fake.jpg' fop = 'imageView2/1/w/80/h/80' target_url = "#{url}?p/1/#{CGI.escape(fop).gsub('+', '%20')}" p1_url = Qiniu::Fop::Persistance.generate_p1_url(url, fop) p1_url.should == target_url puts p1_url.inspect end end end end # module Persistance end # module Fop end # module Qiniu
qiniu/ruby-sdk
spec/qiniu/pfop_spec.rb
Ruby
mit
2,255
package routes; import com.google.gson.Gson; import org.json.JSONObject; import java.util.HashMap; import java.util.Map; import java.util.Date; import static spark.Spark.get; import static spark.Spark.post; public class SignIn { Gson gson=new Gson(); public SignIn(){ userSignin(); } public void userSignin(){ System.out.println("sign up success"); post("/SignUp",(req,res)->{ System.out.println("get to java success"); Map<String,Object> user=new HashMap<>(); String email=req.queryParams("email"); String password=req.queryParams("password"); String First_name=req.queryParams("First_name"); String Last_name=req.queryParams("Last_name"); String zipcode=req.queryParams("zipcode"); System.out.println("dataget success"); user.put("First_name",First_name); user.put("Last_name",Last_name); user.put("email",email); user.put("password", password); user.put("zipcode",zipcode); System.out.println("sign up success"); return user; },gson::toJson); get("/signin",(req,res)->{ try{ Map<String,Object> user=new HashMap<>(); String email=req.queryParams("email"); String password=req.queryParams("password"); user.put("email", email); user.put("password", password); System.out.println("User Authenticated"); return user; }catch(Exception e){ System.out.println("Exception:"+e); return res;} },gson::toJson); } }
infsci2560sp16/full-stack-web-project-yundanangel
src/main/java/routes/SignIn.java
Java
mit
1,404
import astropy.io.fits as pyfits from matplotlib import pyplot import numpy import glob import Graffity datadir = '/home/cdeen/Data/GRAVITY/Calibration/reduced/' fig0 = pyplot.figure(0) fig0.clear() ax0 = fig0.add_axes([0.1 ,0.1 , 0.8, 0.8]) fig1 = pyplot.figure(1) fig1.clear() ax1 = fig1.add_axes([0.1 ,0.1 , 0.8, 0.8]) fig2 = pyplot.figure(2) fig2.clear() ax2 = fig2.add_axes([0.1 ,0.1 , 0.8, 0.8]) fig3 = pyplot.figure(3) fig3.clear() ax3 = fig3.add_axes([0.1 ,0.1 , 0.8, 0.8]) source = "Fringe Tracker" #source = "Science Camera" size = 20 telescopes = [1, 2, 3, 4] colors = ['b', 'g', 'r', 'y'] Perfect = Graffity.PSF(sizeInPix=40) Perfect.generateOTF() #dark = pyfits.open(datadir+'GRAVI.2017-07-13T07:12:51.032.fits') #dark_AcqCam = dark["IMAGING_DATA_ACQ"].data[0] #dark_SC = numpy.median(dark["IMAGING_DATA_SC"].data, axis=0) #dark_FT = numpy.median(dark["IMAGING_DATA_FT"].data.field("PIX"), axis=0) AcqCamFlux = {} FT_table = [] SC_table = [] Acq_FT_table = [] Acq_SC_table = [] for j, f in enumerate(glob.glob(datadir+'*singlescip2vmred.fits')): print f HDU = pyfits.open(f) primary = HDU["PRIMARY"].header resolution = primary.get('ESO INS SPEC RES') polarization = primary.get('ESO INS POLA MODE') indices = [] extnames = [] for i, h in enumerate(HDU): extnames.append(h.name) indices.append(i) indices = numpy.array(indices) extnames = numpy.array(extnames) AcqCamIndices = indices[extnames == 'IMAGING_DATA_ACQ'] if (len(AcqCamIndices > 0) and resolution == "MEDIUM"): for a in AcqCamIndices: if HDU[a].data.shape[2] != 1: break AcqCam = HDU[a].data[0] OIFluxIndices = indices[extnames == 'OI_FLUX'] SC = None FT = None if polarization == 'SPLIT': for oi in OIFluxIndices: if ("TOTALFLUX_FT" in HDU[oi].data.names): if SC == None: SC = HDU[oi].data.field("TOTALFLUX_SC") FT = HDU[oi].data.field("TOTALFLUX_FT") else: SC = SC + HDU[oi].data.field("TOTALFLUX_SC") FT = FT + HDU[oi].data.field("TOTALFLUX_FT") elif polarization == 'COMBINED': for oi in OIFluxIndices: if ("TOTALFUX_FT" in HDU[oi].data.names): SC = HDU[oi].data.field("TOTALFLUX_SC") FT = HDU[oi].data.field("TOTALFLUX_FT") if (SC != None and (primary.get('ESO ACQ FIBER FT1X') != None)): FT_entry = [] SC_entry = [] Acq_FT_entry = [] Acq_SC_entry = [] for i in telescopes: startX = primary.get("ESO DET1 FRAM%d STRX" %i) startY = primary.get("ESO DET1 FRAM%d STRY" %i) xcoord_FT = primary.get("ESO ACQ FIBER FT%dX" % i) - startX + (i-1)*250 ycoord_FT = primary.get("ESO ACQ FIBER FT%dY" % i) - startY xcoord_SC = primary.get("ESO ACQ FIBER SC%dX" % i) - startX + (i-1)*250 ycoord_SC = primary.get("ESO ACQ FIBER SC%dY" % i) - startY print ("Telescope %d : Fringe Tracker Flux = %f, Science Camera Flux = %f" % (i, numpy.mean(FT[i-1::4]), numpy.mean(SC[i-1::4]))) FT_entry.append(numpy.mean(FT[i-1::4])) SC_entry.append(numpy.mean(SC[i-1::4])) Acq_FT_entry.append(numpy.sum(AcqCam[int(ycoord_FT-3):int(ycoord_FT+3), int(xcoord_FT-3):int(xcoord_FT+3)])) Acq_SC_entry.append(numpy.sum(AcqCam[int(ycoord_SC-3):int(ycoord_SC+3), int(xcoord_SC-3):int(xcoord_SC+3)])) #B_entry.append(numpy.sum(AcqCam[int(ycoord_SC-3):int(ycoord_SC+3), int(xcoord_SC-3):int(xcoord_SC+3)])) """ if AcqCam[int(ycoord_FT), int(xcoord_FT)] > 1000.0: FT_PostageStamp = AcqCam[int(ycoord_FT-size):int(ycoord_FT+size), int(xcoord_FT-size):int(xcoord_FT+size)] FT_Strehl = Perfect.calcStrehl(FT_PostageStamp) SC_PostageStamp = AcqCam[int(ycoord_SC-size):int(ycoord_SC+size), int(xcoord_SC-size):int(xcoord_SC+size)] SC_Strehl = Perfect.calcStrehl(SC_PostageStamp) FTFlux = numpy.sum(AcqCam[int(ycoord_FT-3):int(ycoord_FT+3), int(xcoord_FT-3):int(xcoord_FT+3)]) SCFlux = numpy.sum(AcqCam[int(ycoord_SC-3):int(ycoord_SC+3), int(xcoord_SC-3):int(xcoord_SC+3)]) print "Telescope", i, numpy.max(FT_PostageStamp), numpy.max(SC_PostageStamp) print ("Telescope %d Fringe Tracking Strehl = %.3f, Science Camera Strehl = %.3f" % (i, FT_Strehl, SC_Strehl)) ax0.plot(numpy.sum(FT_PostageStamp, axis=0), color = colors[i-1], label="Tel %d SR = %.3f, Flux = %d" % (i, FT_Strehl, FTFlux)) ax0.set_xlabel("AcqCam FT Object" % FT_Strehl) ax1.plot(numpy.sum(SC_PostageStamp, axis=0), color = colors[i-1], label="Tel %d SR = %.3f, Flux = %d" % (i, SC_Strehl, SCFlux)) ax1.set_xlabel("AcqCam SC Object" % SC_Strehl) #""" #if not (j in [4, 7, 8]): if True: SC_table.append(numpy.array(SC_entry)) FT_table.append(numpy.array(FT_entry)) Acq_FT_table.append(numpy.array(Acq_FT_entry)) Acq_SC_table.append(numpy.array(Acq_SC_entry)) """else: if(primary.get('ESO ACQ FIBER FT1X') == None): print "Blah!" print "Haa" else: print "Hoo" #""" SC_table = numpy.array(SC_table) Acq_SC_table = numpy.array(Acq_SC_table) FT_table = numpy.array(FT_table) Acq_FT_table = numpy.array(Acq_FT_table) x_FT = numpy.linalg.pinv(Acq_FT_table) x_SC = numpy.linalg.pinv(Acq_SC_table) ans_FT = x_FT.dot(FT_table) ans_SC = x_SC.dot(SC_table) if source == 'Fringe Tracker': aqft = ax0.matshow(Acq_FT_table) fig0.colorbar(aqft) cov = ax1.matshow(ans_FT) fig1.colorbar(cov) ft = ax2.matshow(FT_table) fig2.colorbar(cov) fitft = ax3.matshow(Acq_FT_table.dot(ans_FT)) fig3.colorbar(fitft) elif source == 'Science Camera': aqsc = ax0.matshow(Acq_SC_table) fig0.colorbar(aqsc) cov = ax1.matshow(ans_SC) fig1.colorbar(cov) sc = ax2.matshow(SC_table) fig2.colorbar(sc) fitsc = ax3.matshow(Acq_SC_table.dot(ans_SC)) fig3.colorbar(fitsc) ax0.set_title("AcqCamera %s - Max Pixel" % source) ax0.set_xlabel("TEL channel") ax0.set_ylabel("Trial") ax1.set_title("%s Covariance Matrix" % source) ax2.set_title("%s Pipeline Flux" % source) ax2.set_xlabel("TOTALFLUX channel") ax2.set_ylabel("Trial") ax3.set_title("%s Fit" % source) ax3.set_xlabel("TOTALFLUX channel") ax3.set_ylabel("Trial") fig0.show() fig1.show() fig2.show() fig3.show() print "Science Camera: ", ans_SC.diagonal() print "Fringe Tracker: ", ans_FT.diagonal() #fig0.savefig("AcqCam_%s_MaxPix.png" % source.replace(' ', '_')) #fig1.savefig("%s_CovMat.png" % source.replace(' ', '_')) #fig2.savefig("%s_Pipeline_Flux.png" % source.replace(' ', '_')) #fig3.savefig("%s_fit.png" % source.replace(' ', '_')) """ #ax2.plot(numpy.sum(FT, axis=0)) #ax2.set_xlabel("Fringe Tracker") #ax3.plot(numpy.sum(SC, axis=1)) #ax3.set_xlabel("Science Object") #print asddf ax1.legend() ax0.legend() fig0.show() fig1.show() #fig2.show() #fig3.show() decision = raw_input("Save? ") if decision== 'Y': baseName = raw_input("Enter base filename: ") fig0.savefig(baseName+"_FT_AcqCam.png") fig1.savefig(baseName+"_SC_AcqCam.png") fig2.savefig(baseName+"_FT_Trace.png") fig3.savefig(baseName+"_SC_Trace.png") #"""
soylentdeen/Graffity
src/AcqCamTester/checkCalibs.py
Python
mit
7,686
body { padding-top: 50px; padding-bottom: 20px; } /* Set padding to keep content from hitting the edges */ .body-content { background-color: #f3f3f4; } /* Override the default bootstrap behavior where horizontal description lists will truncate terms that are too long to fit in the left column */ .dl-horizontal dt { white-space: normal; } /* Set width on the form input elements since they're 100% wide by default */ input, select, textarea { max-width: 280px; } @media(min-width: 1450px) { .container { max-width: 1350px; } } body { background-color: lightgrey; padding-top: 10px; font-family: Corbel, Verdana, "Bitstream Vera Sans", sans-serif; } .navbar-inverse { background-color: lightgrey; border: none; } .navbar-inverse .container { background-color: #222222; border-color: #080808; } .navbar { margin-bottom: 0px; } .white-bg { background-color: #ffffff; } .page-heading { border-top: 0; padding: 0px 10px 20px 10px; } .wrapper { padding: 0 10px; margin-top: 10px; } .border-bottom { border-bottom: 1px solid #e7eaec !important; } .breadcrumb { background-color: #ffffff; padding: 0; margin-bottom: 0; } .p-md { padding: 25px; } .ibox { clear: both; margin-bottom: 25px; margin-top: 10px; padding: 0; } .ibox-title h5 { display: inline-block; font-size: 14px; margin: 0 0 7px; padding: 0; text-overflow: ellipsis; float: left; } .ibox-content { clear: both; padding-top: 10px; } .ibox-content { background-color: #ffffff; color: inherit; padding: 15px 20px 20px 20px; border-color: #e7eaec; border-image: none; border-style: solid solid none; border-width: 1px 0px; } .ibox-title { -moz-border-bottom-colors: none; -moz-border-left-colors: none; -moz-border-right-colors: none; -moz-border-top-colors: none; background-color: #ffffff; border-color: #e7eaec; border-image: none; border-style: solid solid none; border-width: 3px 0 0; color: inherit; margin-bottom: 0; padding: 14px 15px 7px; min-height: 48px; } .dd-option-image, .dd-selected-image { width: 40px; height: 40px; } h2, .h2 { font-size: 25px; } .table.borderless td, .table.borderless th { border: none; } .p-lg { padding: 30px; } .navy-bg, .bg-success { background-color: #1ab394; color: #ffffff; } .red-bg, .bg-danger { background-color: #ed5565; color: #ffffff; } .yellow-bg, .bg-warning { background-color: #f8ac59; color: #ffffff; } .lazur-bg, .bg-info { background-color: #23c6c8; color: #ffffff; } .widget { border-radius: 5px; padding: 14px 20px; margin-bottom: 10px; margin-top: 10px; width: 170px; height: 170px; } .widget2 { border-radius: 5px; padding: 14px 20px; margin-bottom: 10px; margin-top: 10px; } .no-padding { padding: 0 !important; } .p-m { padding: 20px; } .flot-chart-content { width: 100%; height: 100%; } .widget .flot-chart { height: 100px; } .flot-chart { display: block; height: 200px; } #shiva { width: 100px; height: 100px; background-color: red; -moz-border-radius: 50px; -webkit-border-radius: 50px; border-radius: 50px; float:left; margin:5px; } .count { line-height: 100px; color:white; margin-left:30px; font-size:25px; }
JM89/personalfinancemanager
PFM.Website/PersonalFinanceManager/Content/Site.css
CSS
mit
3,462
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ .monaco-workbench > .part.panel .title { padding-right: 0px; } .monaco-workbench > .part.panel > .title { border-top: 1px solid rgba(128, 128, 128, 0.35); } .monaco-workbench > .part.panel > .title > .title-label > span { vertical-align: top; } .monaco-workbench > .part.panel { z-index: initial; } .monaco-workbench .hide-panel-action { background: url('hide.svg') center center no-repeat; } .vs-dark .monaco-workbench .hide-panel-action, .hc-black .monaco-workbench .hide-panel-action { background: url('hide-inverse.svg') center center no-repeat; } /* High Contrast Theming */ .hc-black .monaco-workbench > .part.panel > .title { border-top-color: #6FC3DF; }
williamcspace/vscode
src/vs/workbench/browser/parts/panel/media/panelpart.css
CSS
mit
1,027
// // ReactiveMavlink.swift // ReactiveMavlink // // Created by Michael Koukoullis on 13/11/2015. // Copyright © 2015 Michael Koukoullis. All rights reserved. // import Mavlink import ReactiveCocoa public class ReactiveMavlink { // MARK: Public properties public let heartbeat: Signal<Heartbeat, NSError> public let attitude: Signal<Attitude, NSError> public let headUpDisplay: Signal<HeadUpDisplay, NSError> public let unidentified: Signal<Unidentified, NSError> // MARK: Private properties let adapter = ReactiveMavlinkAdapter() // MARK: Public methods public init() { heartbeat = adapter.message.extract() attitude = adapter.message.extract() headUpDisplay = adapter.message.extract() unidentified = adapter.message.extract() } public func receiveData(data: NSData) { adapter.processData(data) } deinit { adapter.dispose() } } class ReactiveMavlinkAdapter { let message: Signal<MessageType, NSError> private let mavlink: Signal<mavlink_message_t, NSError> private let mavlinkObserver: Observer<mavlink_message_t, NSError> init() { (mavlink, mavlinkObserver) = Signal<mavlink_message_t, NSError>.pipe() message = mavlink.map { DecoderMap.decoderForMessageId($0.msgid)($0) } } func processData(data: NSData) { var bytes = [UInt8](count: data.length, repeatedValue: 0) data.getBytes(&bytes, length: data.length) for byte in bytes { var message = mavlink_message_t() var status = mavlink_status_t() let channel = UInt8(MAVLINK_COMM_1.rawValue) if mavlink_parse_char(channel, byte, &message, &status) != 0 { mavlinkObserver.sendNext(message) } } } func dispose() { mavlinkObserver.sendCompleted() } } struct DecoderMap { static func decoderForMessageId(id: UInt8) -> mavlink_message_t -> MessageType { switch id { case 0: return HeartbeatDecoder.decode case 30: return AttitudeDecoder.decode case 74: return HeadUpDisplayDecoder.decode default: return UnidentifiedDecoder.decode } } } extension Signal { func extract<T>() -> Signal<T, Error> { return self.filter { $0 is T }.map { $0 as! T } } }
kouky/ReactiveMavlink
Sources/ReactiveMavlink.swift
Swift
mit
2,404
<?php /** * @author tshirtecommerce - www.tshirtecommerce.com * @date: 2015-01-10 * * @copyright Copyright (C) 2015 tshirtecommerce.com. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE * */ if ( ! defined('BASEPATH')) exit('No direct script access allowed'); ?> <script src="<?php echo base_url('assets/plugins/validate/validate.js'); ?>"></script> <form id="fr-edit" class="form-horizontal" method="post" action="<?php echo site_url().'admin/users/edit/'.$id;?>"> <div class="row"> <div class="col-sm-12"> <p class="pull-right"> <button type="submit" class="btn btn-primary" ><?php echo lang('save'); ?></button> <a href="<?php echo site_url().'admin/users'?>" class="btn btn-danger" ><?php echo lang('cancel'); ?></a> </p> </div> </div> <div class="panel panel-default"> <div class="panel-heading"> <i class="fa fa-external-link-square icon-external-link-sign"></i> <?php if($id != '') echo lang('user_shop_edit'); else echo lang('user_shop_add');?> </div> <div class="modal-body" style="display: table; width: 100%;"> <?php if($error != ''){?> <div class="alert alert-danger"><?php echo $error;?></div> <?php } ?> <?php echo validation_errors('<p class="alert alert-danger">'); ?> <div class="col-sm-6"> <div class="form-group"> <label class="control-label col-md-4"><?php echo lang('user_name');?><span class="symbol required"></span></label> <div class="col-md-8"> <input class="form-control validate required" type="text" data-msg="<?php echo lang('user_edit_msg_validate_name');?>" data-maxlength="255" data-minlength="2" placeholder="<?php echo lang('user_edit_name_place')?>" value="<?php echo $user->name;?>" name="data[name]"> </div> </div> <div class="form-group"> <label class="control-label col-md-4"><?php echo lang('user_user_name');?><span class="symbol required"></span></label> <div class="col-md-8"> <?php if($id == ''){?> <input class="form-control validate required" type="text" data-msg="<?php echo lang('user_edit_msg_validate_username');?>" data-maxlength="150" data-minlength="2" placeholder="<?php echo lang('user_edit_username_place');?>" value="<?php echo $user->username;?>" name="data[username]"> <?php }else{ echo $user->username;}?> </div> </div> <div class="form-group"> <label class="control-label col-md-4"><?php echo lang('user_email');?><span class="symbol required"></span></label> <div class="col-md-8"> <?php if($id == ''){?> <input autocomplete="off" class="form-control validate required" type="text" data-msg="<?php echo lang('user_edit_msg_validate_email');?>" data-type="email" placeholder="<?php echo lang('user_edit_email_place');?>" value="<?php echo $user->email;?>" name="data[email]"> <?php }else{ echo $user->email;}?> </div> </div> <div class="form-group"> <label class="control-label col-md-4"><?php echo lang('user_add_group');?></label> <div class="col-md-8"> <?php $gr = array(); $default = ''; foreach($groups as $group) { $gr[$group->id] = $group->title; if($group->default == 1) $default = $group->id; } if($user->group != '') $default = $user->group; echo form_dropdown('data[group]', $gr, $default, 'class="form-control"'); ?> </div> </div> <div class="form-group"> <label class="control-label col-md-4"><?php if($id == ''){echo lang('user_password'); echo '<span class="symbol required"></span>';}else{ echo lang('user_new_password');}?></label> <div class="col-md-8"> <input class="form-control <?php if($id == '') echo 'validate required'; ?>" type="password" data-msg="<?php echo lang('user_edit_msg_validate_password');?>" data-maxlength="128" data-minlength="6" name="data[password]"> </div> </div> <div class="form-group"> <label class="control-label col-md-4"><?php if($id == ''){ echo lang('user_confirm_password'); echo '<span class="symbol required"></span>'; }else{echo lang('user_confirm_password');}?></label> <div class="col-md-8"> <input class="form-control <?php if($id == '') echo 'validate required'; ?>" type="password" data-msg="<?php echo lang('user_edit_msg_validate_confirm_password');?>" data-maxlength="128" data-minlength="6" name="cf_password"> </div> </div> </div> <div class="col-sm-6"> <?php if(count($forms) > 0) { foreach($forms as $form) { ?> <div class="form-group"> <?php if($form->title != '') echo '<label class="control-label col-md-4">'.$form->title.'</label>'; $params = json_decode($form->params); if($form->type == 'text'){ echo '<div class="col-md-8">'; if($form->edit == 0) { if($form->validate == 1) echo '<input class="form-control validate required" type="text" name="'.$form->name.'" placeholder="'.$form->title.'" data-minlength="2" data-maxlength="200" data-msg="'.$form->title.' must be at least 2 to 200 characters." value="'.set_value($form->name, $form->value).'">'; else echo '<input class="form-control" type="text" name="'.$form->name.'" value="'.set_value($form->name, $form->value).'">'; } else { if(!isset($data_fields[$form->id])) $data_fields[$form->id] = ''; if($form->validate == 1) echo '<input class="form-control validate required" type="text" name="fields['.$form->id.']" placeholder="'.$form->title.'" data-minlength="2" data-maxlength="200" data-msg="'.$form->title.' must be at least 2 to 200 characters." value="'.$data_fields[$form->id].'">'; else echo '<input class="form-control" type="text" name="'.$form->name.'" value="'.$data_fields('fields')[$form->id].'">'; } echo '</div>'; }else if($form->type == 'email'){ echo '<div class="col-md-8">'; if($form->validate == 1) echo '<input class="form-control validate required" type="text" name="'.$form->name.'" placeholder="'.$form->title.'" data-type="email" data-msg="Email format is incorrect" value="'.set_value($form->name, $form->value).'">'; else echo '<input class="form-control" type="text" name="'.$form->name.'" value="'.set_value($form->name, $form->value).'">'; echo '</div>'; }else if($form->type == 'password'){ echo '<div class="col-md-8">'; if($form->validate == 1) echo '<input class="form-control validate required" type="password" name="'.$form->name.'" placeholder="'.$form->title.'" data-minlength="6" data-maxlength="128" data-msg="'.$form->title.' must be at least 6 to 128 characters." value="'.set_value($form->name, $form->value).'">'; else echo '<input class="form-control" type="password" name="'.$form->name.'" value="'.set_value($form->name, $form->value).'">'; echo '</div>'; }else if($form->type == 'radio'){ echo '<div class="col-md-8">'; $value = json_decode($form->value, true); if(is_array($value)) { foreach($value as $key=>$val) { echo '<input id="'.str_replace(" ", "", $key).'" type="radio" name="'.$form->name.'" value="'.$val.'">'; echo '<label for="'.str_replace(" ", "", $key).'" ></label>'; } } echo '</div>'; } } } ?> </div> </div> </div> </div> </form> <script type="text/javascript"> jQuery('#fr-edit').validate(); </script>
Nnamso/tbox
application/views/admin/users/edit.php
PHP
mit
7,547
import logging import os import requests import json import csv from .twxthing import TWX_Thing, TWX_Property,TWX_Template from .twxexcelparser import parseSimulatorConfig from .helper import setup_log,parse_commandline from .thingworx import ThingworxServer def get_server(args): configurationpath = args.config_path configurationfile = args.config testServer = ThingworxServer.fromConfigurationFile(os.path.join(configurationpath, configurationfile)) testServer.validateSSL = args.sslvalidation #print("sslvalidation:{}".format(testServer.validateSSL)) testServer.otherConfigs['export_path'] = args.export_path testServer.otherConfigs['export_config'] = args.export_config testServer.simulatorConfigurationFile = os.path.join(configurationpath,'simulatorconfig.xlsx') return testServer def get_template_outgoingdepencies(testServer, templateName): url = testServer.get_thingtemplate_dependency_url(templateName) ret = requests.request("POST", url, headers=testServer.get_headers(),verify=testServer.validateSSL) oneleveldependencies = {} if ret.status_code == 200 and ret.text : jsondata = json.loads(ret.text) logging.info("Export List:{}".format(json.dumps(jsondata, indent = 2))) for row in jsondata['rows']: oneleveldependencies[row['name']] = row['type'] logging.info("found:{}, type:{}".format(row['name'],row['type'])) else: logging.info("Status Code:{} with message:{}".format(ret.status_code,ret.text)) return oneleveldependencies def downloadtodefaultname(testServer, twxType, twxName): url = testServer.get_twx_download_url(twxType, twxName) headers = testServer.get_headers() headers['Accept'] = 'text/xml' ret = requests.request("GET", url, headers=headers, verify=testServer.validateSSL) filename = os.path.join(testServer.otherConfigs['export_path'],twxName+".xml") ret.raise_for_status() with open(filename,'wb') as handle: for block in ret.iter_content(1024): handle.write(block) return filename def collections(testServer): ''' parser template name and value stream name from configuration file :param testServer: :return: ''' dependencies = get_template_outgoingdepencies(testServer,testServer.otherConfigs['ThingTemplate']) with open(os.path.join(testServer.otherConfigs['export_path'], testServer.otherConfigs['export_config']), "w") as exportfile: writer = csv.writer(exportfile) writer.writerow(["Action","Entity","Comment"]) #download dependencies for twxName, twxType in dependencies.items(): fileName = downloadtodefaultname(testServer, twxType, twxName) logging.info("{} has been downloaded".format(fileName)) writer.writerow(["Import",fileName,""]) #download value stream if testServer.otherConfigs['ValueStream']: fileName = downloadtodefaultname(testServer, 'Thing', testServer.otherConfigs['ValueStream']) writer.writerow(["Import", fileName, ""]) #download template fileName = downloadtodefaultname(testServer,'ThingTemplate',testServer.otherConfigs['ThingTemplate']) writer.writerow(["Import", fileName, ""]) logging.info("CSV file has been written to:{}".format( os.path.join(testServer.otherConfigs['export_path'], testServer.otherConfigs['export_config']) )) #print(testServer.otherConfigs['export_path']) #print(testServer.otherConfigs['export_config']) #for key, value in testServer.otherConfigs.items(): # print("Key:{}".format(key)) # print("Value:{}".format(value)) def main(): setup_log() testServer = get_server(parse_commandline()) collections(testServer) if __name__ == '__main__': main()
arproio/kpitest
kpitest/thingworxexporter.py
Python
mit
3,867
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>TimeMap JSUnit Tests</title> <link rel="stylesheet" type="text/css" href="../../jsUnit/css/jsUnitStyle.css"> <script language="JavaScript" type="text/javascript" src="../../jsunit/app/jsUnitCore.js"></script> <script type="text/javascript" src="../lib/jquery-1.8.3.min.js"></script> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script><script type="text/javascript" src="../lib/mxn/mxn.js?(googlev3)"></script><script type="text/javascript" src="../lib/timeline-2.3.0.js"></script><script type="text/javascript" src="../src/timemap.js"></script><script type="text/javascript" src="../src/manipulation.js"></script><script type="text/javascript" src="../src/param.js"></script><script type="text/javascript" src="../src/state.js"></script><script type="text/javascript" src="../src/loaders/json.js"></script><script type="text/javascript" src="../src/loaders/xml.js"></script><script type="text/javascript" src="../src/loaders/flickr.js"></script><script type="text/javascript" src="../src/loaders/georss.js"></script><script type="text/javascript" src="../src/loaders/google_spreadsheet.js"></script><script type="text/javascript" src="../src/loaders/kml.js"></script><script type="text/javascript" src="../src/loaders/metaweb.js"></script><script type="text/javascript" src="../src/loaders/progressive.js"></script><script type="text/javascript" src="placemarkTests.js"></script><script type="text/javascript" src="kmlPlacemarkTests.js"></script><!--SCRIPTS--> <style type="text/css"> div.timemap { padding: 1em; width: 100%; } div.timelinediv { height: 300px; font-size: 12px; background: #CCCCCC; } div.mapdiv { height: 300px; background: #EEEEEE; } </style> </head> <body> <h1>TimeMap JSUnit Tests</h1> <p>This page contains tests for the jsUnit unit testing framework. It assumes that you have the jsunit directory in the same directory as timemap - change the path to jsunit if necessary.</p> <div class="timemap"> <div id="timeline" class="timelinediv"></div> <div id="map" class="mapdiv"></div> </div> <!-- for tests that need multiple calls to TimeMap.init() --> <div class="timemap"> <div id="timeline2" class="timelinediv"></div> <div id="map2" class="mapdiv"></div> </div> <div class="timemap"> <div id="timeline3" class="timelinediv"></div> <div id="map3" class="mapdiv"></div> </div> <div class="timemap"> <div id="timeline4" class="timelinediv"></div> <div id="map4" class="mapdiv"></div> </div> <div class="timemap"> <div id="timeline5" class="timelinediv"></div> <div id="map5" class="mapdiv"></div> </div> </body> </html>
rpoisel/timemap-history
tests/kmlPlacemarkTests_googlev3_tl230_bld.html
HTML
mit
2,937
package com.java.a35.newsapp.api; import android.util.Log; import com.java.a35.newsapp.CachedLoader; import com.java.a35.newsapp.Utils; import org.json.*; import java.io.IOException; import java.net.URL; import java.net.URLConnection; import java.net.URLEncoder; import java.util.HashMap; import java.util.Map; /** * Created by twd2 on 17/8/27. */ public class NewsAPI { public static final int CATEGORY_TECHNOLOGY = 1; public static final int CATEGORY_EDUCATION = 2; public static final int CATEGORY_MILITARY = 3; public static final int CATEGORY_CHINA = 4; public static final int CATEGORY_SOCIAL = 5; public static final int CATEGORY_CULTURE = 6; public static final int CATEGORY_AUTOMOBILE = 7; public static final int CATEGORY_INTERNATIONAL = 8; public static final int CATEGORY_SPORTS = 9; public static final int CATEGORY_FINANCIAL = 10; public static final int CATEGORY_HEALTH = 11; public static final int CATEGORY_ENTERTAINMENT = 12; public static final int CATEGORY_MIN = 1; public static final int CATEGORY_MAX = 12; public static final String SERVER_URL = "http://166.111.68.66:2042"; public static final int DEFAULT_PAGE_SIZE = 20; private final String server; private CachedLoader cachedLoader; private Map<String, String> headers; public NewsAPI(String server, CachedLoader cachedLoader) { this.server = server; this.cachedLoader = cachedLoader; headers = new HashMap<>(); headers.put("User-Agent", "NewsApp/0.0"); } private JSONObject get(String action, String queryString) throws IOException, JSONException { StringBuilder sb = new StringBuilder(); sb.append(server); sb.append(action); if (queryString != null && queryString.length() > 0) { sb.append("?"); sb.append(queryString); } URL url = new URL(sb.toString()); URLConnection conn = url.openConnection(); for (Map.Entry<String, String> entry : headers.entrySet()) { conn.setRequestProperty(entry.getKey(), entry.getValue()); } String jsonString = Utils.readAllString(conn.getInputStream()); Log.d("NewsAPI", jsonString); return new JSONObject(jsonString); } private JSONObject cachedGet(String action, String queryString) throws IOException, JSONException { StringBuilder sb = new StringBuilder(); sb.append(server); sb.append(action); if (queryString != null && queryString.length() > 0) { sb.append("?"); sb.append(queryString); } String jsonString = cachedLoader.fetch(sb.toString(), "", headers, true); Log.d("NewsAPI", "from cache: " + jsonString); return new JSONObject(jsonString); } public JSONObject getListNews(int category, int page, int pageSize) throws IOException, JSONException { String queryString = String.format("category=%d&pageNo=%d&pageSize=%d", category, page, pageSize); return get("/news/action/query/latest", queryString); } public JSONObject getListNews(int category, int page) throws IOException, JSONException { return getListNews(category, page, DEFAULT_PAGE_SIZE); } public JSONObject getListNews(int category) throws IOException, JSONException { return getListNews(category, 1, DEFAULT_PAGE_SIZE); } public JSONObject getNews(String newsId) throws IOException, JSONException { String queryString = String.format("newsId=%s", newsId); if (cachedLoader == null) { return get("/news/action/query/detail", queryString); } else { return cachedGet("/news/action/query/detail", queryString); } } public JSONObject searchNews(int category, String query, int page, int pageSize) throws IOException, JSONException { String queryString = String.format("keyword=%s&category=%d&pageNo=%d&pageSize=%d", URLEncoder.encode(query, "UTF-8"), category, page, pageSize); return get("/news/action/query/search", queryString); } public JSONObject searchNews(int category, String query, int page) throws IOException, JSONException { return searchNews(category, query, page, DEFAULT_PAGE_SIZE); } public JSONObject searchNews(int category, String query) throws IOException, JSONException { return searchNews(category, query, 1, DEFAULT_PAGE_SIZE); } public JSONObject searchAllNews(String query, int page, int pageSize) throws IOException, JSONException { String queryString = String.format("keyword=%s&pageNo=%d&pageSize=%d", URLEncoder.encode(query, "UTF-8"), page, pageSize); return get("/news/action/query/search", queryString); } public JSONObject searchAllNews(String query, int page) throws IOException, JSONException { return searchAllNews(query, page, DEFAULT_PAGE_SIZE); } public JSONObject searchAllNews(String query) throws IOException, JSONException { return searchAllNews(query, 1, DEFAULT_PAGE_SIZE); } }
twd2/newsapp
NewsApp/app/src/main/java/com/java/a35/newsapp/api/NewsAPI.java
Java
mit
5,421
<?php namespace App\Http\Controllers\Web; use App\Auth\Registrar; use App\Http\Controllers\Controller; use App\Models\User; use GuzzleHttp\Exception\ClientException; use GuzzleHttp\Exception\RequestException; use Illuminate\Support\Facades\Auth; use Laravel\Socialite\Facades\Socialite; use Laravel\Socialite\Two\InvalidStateException; class FacebookController extends Controller { /** * The registrar. * * @var Registrar */ protected $registrar; /** * Make a new FacebookController, inject dependencies, * and set middleware for this controller's methods. * * @param Registrar $registrar */ public function __construct(Registrar $registrar) { $this->registrar = $registrar; } /** * Redirect the user to the Facebook authentication page. * * @return Response */ public function redirectToProvider() { return Socialite::driver('facebook') ->scopes(['user_birthday']) ->redirect(); } /** * Obtain the user information from Facebook. * * @return Response */ public function handleProviderCallback() { // Grab the user's profile using their Facebook OAuth token. try { $requestUser = Socialite::driver('facebook')->user(); $facebookUser = Socialite::driver('facebook') ->fields(['email', 'first_name', 'last_name', 'birthday']) ->userFromToken($requestUser->token); } catch (RequestException | ClientException | InvalidStateException $e) { logger()->warning('facebook_token_mismatch'); return redirect('/register')->with( 'flash', 'Unable to verify Facebook account.', ); } $email = $facebookUser->email; // If we were denied access to read email, do not log them in. if (empty($email)) { logger()->info('facebook_email_hidden'); return redirect('/register')->with( 'flash', 'We need your email to contact you if you win a scholarship.', ); } // Aggregate public profile fields $fields = [ 'facebook_id' => $facebookUser->id, 'first_name' => $facebookUser->user['first_name'], 'last_name' => $facebookUser->user['last_name'], ]; // Aggregate scoped fields if (isset($facebookUser->user['birthday'])) { $fields['birthdate'] = format_birthdate( $facebookUser->user['birthday'], ); } $northstarUser = $this->registrar->resolve(['email' => $email]); if ($northstarUser) { $northstarUser->updateIfNotSet($fields); $northstarUser->save(); Auth::login($northstarUser, true); logger()->info('facebook_authentication'); return redirect()->intended('/'); } else { $fields['email'] = $email; $northstarUser = $this->registrar->registerViaWeb( $fields, 'facebook', ); Auth::login($northstarUser, true); logger()->info('facebook_authentication'); return redirect('profile/about'); } } }
DoSomething/northstar
app/Http/Controllers/Web/FacebookController.php
PHP
mit
3,346
// // MMProgressHUDOverlayView.m // MMProgressHUDDemo // // Created by Lars Anderson on 7/5/12. // Copyright (c) 2012 Mutual Mobile. All rights reserved. // #import "MMProgressHUDOverlayView.h" #import "UIView+MMSnapshot.h" #import "UIImage+ImageEffects.h" #import "MMProgressHUDWindow.h" @interface MMProgressHUDOverlayView() @property (nonatomic) CGGradientRef gradientRef; @end @implementation MMProgressHUDOverlayView - (instancetype)init { self = [self initWithFrame:CGRectZero]; if (self) { //do more stuff } return self; } - (instancetype)initWithFrame:(CGRect)frame { self = [self initWithFrame:frame overlayMode:MMProgressHUDWindowOverlayModeGradient]; if (self) { //do stuff } return self; } - (instancetype)initWithFrame:(CGRect)frame overlayMode:(MMProgressHUDWindowOverlayMode)overlayMode { self = [super initWithFrame:frame]; if (self) { [self setOverlayMode:overlayMode]; CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); CGFloat r = 0/255.0; CGFloat g = 0/255.0; CGFloat b = 0/255.0; CGFloat a = 0/255.0; CGFloat components[4] = {r,g,b,a}; _overlayColor = CGColorCreate(colorSpace, components); CGColorSpaceRelease(colorSpace); self.opaque = NO; [self _buildGradient]; } return self; } - (void)drawRect:(CGRect)rect { [super drawRect:rect]; switch (self.overlayMode) { case MMProgressHUDWindowOverlayModeGradient: [self _drawRadialGradientInRect:rect]; break; case MMProgressHUDWindowOverlayModeLinear: [self _drawLinearOverlayInRect:rect]; break; case MMProgressHUDWindowOverlayModeBlur: [self _renderBlurInRect:rect]; break; default: break; } } - (void)_buildGradient { #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdirect-ivar-access" if (_gradientRef) { CGGradientRelease(_gradientRef); } NSAssert(self.overlayColor, @"Overlay color is nil!"); CGColorRef firstColor = CGColorCreateCopyWithAlpha(self.overlayColor, 0.f); CGColorRef secondColor = CGColorCreateCopyWithAlpha(self.overlayColor, 0.4f); CGColorRef thirdColor = CGColorCreateCopyWithAlpha(self.overlayColor, 0.5f); CGColorSpaceRef rgb = CGColorSpaceCreateDeviceRGB(); CGColorRef colorsArray[] = { firstColor, secondColor, thirdColor }; CFArrayRef colors = CFArrayCreate(NULL, (const void**)colorsArray, sizeof(colorsArray)/sizeof(CGColorRef), &kCFTypeArrayCallBacks); CGFloat locationList[] = {0.0,0.5,1.0}; _gradientRef = CGGradientCreateWithColors(rgb, colors, locationList); CGColorRelease(firstColor); CGColorRelease(secondColor); CGColorRelease(thirdColor); CFRelease(colors); CGColorSpaceRelease(rgb); #pragma clang diagnostic pop } - (void)_drawRadialGradientInRect:(CGRect)rect { CGContextRef context = UIGraphicsGetCurrentContext(); CGContextSaveGState(context); CGPoint center = CGPointMake(CGRectGetMidX(rect), CGRectGetMidY(rect)); float startRadius = 50.0f; float endRadius = rect.size.height*0.66f; NSAssert(self.gradientRef != nil, @"Gradient is nil!"); CGContextDrawRadialGradient(context, self.gradientRef, center, startRadius, center, endRadius, kCGGradientDrawsBeforeStartLocation | kCGGradientDrawsAfterEndLocation); CGContextRestoreGState(context); } - (void)_drawLinearOverlayInRect:(CGRect)rect { CGContextRef context = UIGraphicsGetCurrentContext(); CGContextSaveGState(context); //create copy of overlay color CGColorRef linearColor = CGColorCreateCopyWithAlpha(self.overlayColor, 0.3f); CGContextSetFillColorWithColor(context, linearColor); CGContextFillRect(context, rect); CGColorRelease(linearColor); CGContextRestoreGState(context); } - (void)_renderBlurInRect:(CGRect)rect { MMProgressHUDWindow *window = (MMProgressHUDWindow *)self.window; NSParameterAssert([window isKindOfClass:MMProgressHUDWindow.class]); UIImage *snapshot = [window.oldWindow mm_snapshot]; UIImage *bluredSnapshot = [snapshot mm_applyBlurWithRadius:5.f tintColor:[UIColor colorWithCGColor:_overlayColor] saturationDeltaFactor:1.8 maskImage:nil]; [bluredSnapshot drawInRect:rect]; } - (void)setOverlayMode:(MMProgressHUDWindowOverlayMode)overlayMode { if (_overlayMode != overlayMode) { _overlayMode = overlayMode; } [self setNeedsDisplay]; } - (void)setOverlayColor:(CGColorRef)overlayColor { CGColorRelease(_overlayColor); _overlayColor = CGColorCreateCopy(overlayColor); [self _buildGradient]; [self setNeedsDisplay]; } - (void)dealloc { CGGradientRelease(_gradientRef); CGColorRelease(_overlayColor); } @end
0359xiaodong/MMProgressHUD-Fork
Source/MMProgressHUDOverlayView.m
Matlab
mit
5,436
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="author" content="Dicas de Front End"> <meta name="description" content="Newsletter periódica com uma lista de links curados manualmente e insights sobre o universo front end."> <meta name="generator" content="Hugo 0.25.1" /> <title>Podcast &middot; Dicas de Front End</title> <link rel="shortcut icon" href="http://dicasdefrontend.com.br/images/favicon.ico"> <link href="https://fonts.googleapis.com/css?family=PT+Mono" rel="stylesheet"> <link rel="stylesheet" href="http://dicasdefrontend.com.br/css/style.css"> <link rel="stylesheet" href="http://dicasdefrontend.com.br/css/highlight.css"> <link rel="stylesheet" href="http://dicasdefrontend.com.br//css/typography.css"> <link rel="stylesheet" href="http://dicasdefrontend.com.br//css/header.css"> <link rel="stylesheet" href="http://dicasdefrontend.com.br//css/nav.css"> <link rel="stylesheet" href="http://dicasdefrontend.com.br/css/font-awesome.min.css"> <link href="http://dicasdefrontend.com.br/index.xml" rel="alternate" type="application/rss+xml" title="Dicas de Front End" /> </head> <body> <nav class="main-nav"> <a href='http://dicasdefrontend.com.br/'> <span class="arrow">←</span>Home</a> <a href='http://dicasdefrontend.com.br/post'>Dicas passadas</a> <a href='http://dicasdefrontend.com.br/tags'>Tags</a> <a href='http://dicasdefrontend.com.br/about'>Contribua!</a> </nav> <div class="profile"> <section id="wrapper"> <header class="header-banner"> <h1>Dicas de Front End</h1> <h2>Uma newsletter sobre desenvolvimento front end mantida pela comunidade.</h2> <div id="mc_embed_signup"> <form action="//dicasdefrontend.us8.list-manage.com/subscribe/post?u=5783e7b87cf9ae15fb9dfb6be&amp;id=d041ba35b0" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate> <div id="mc_embed_signup_scroll"> <div class="mc-field-group"> <input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL" placeholder="Digite aqui seu email"> </div> <div id="mce-responses" class="clear"> <div class="response" id="mce-error-response" style="display:none"></div> <div class="response" id="mce-success-response" style="display:none"></div> </div> <div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_5783e7b87cf9ae15fb9dfb6be_d041ba35b0" tabindex="-1" value=""></div> <div class="clear mc-submit"><input type="submit" value="Receber dicas!" name="subscribe" id="mc-embedded-subscribe" class="mc-button"></div> </div> </form> </div> </header> </section> </div> <section id="wrapper" class="home"> <div class="archive"> <h3>2015</h3> <ul> <div class="post-item"> <div class="post-time">Feb 24</div> <a href="http://dicasdefrontend.com.br/post/dica-19-jekyll-extracao-de-requisitos-2/" class="post-link"> Dica #19 </a> </div> </ul> </div> <footer id="footer"> <div id="social"> <a class="symbol" href="http://github.com/anarute/dicas-de-frontend"> <i class="fa fa-github-square"></i> </a> <a class="symbol" href="http://twitter.com/ana_rute"> <i class="fa fa-twitter-square"></i> </a> </div> <p class="small"> <i class="fa fa-creative-commons"></i> <a href="https://creativecommons.org/licenses/by/4.0/">CC By 4.0</a> <i class="fa fa-heart" aria-hidden="true"></i> Dicas de Front End <br/> Pode copiar tudo, tá liberado! Só mantém os créditos, please. </p> <p class="small"> Powered by <a href="http://www.gohugo.io/">Hugo</a> | Tema baseado no <a href="https://github.com/nodejh/hugo-theme-cactus-plus">Cactus Plus</a> </p> </footer> </section> <div class="dd"> </div> <script src="http://dicasdefrontend.com.br/js/jquery-2.2.4.min.js"></script> <script src="http://dicasdefrontend.com.br/js/main.js"></script> <script src="http://dicasdefrontend.com.br/js/highlight.min.js"></script> <script>hljs.initHighlightingOnLoad();</script> </body> </html>
anarute/dicasdefrontend
docs/tags/podcast/index.html
HTML
mit
4,472
<ts language="es_uy" version="2.1"> <context> <name>addressbookpage</name> <message> <source>create a new address</source> <translation>crear una nueva direcci贸n </translation> </message> <message> <source>copy the currently selected address to the system clipboard</source> <translation>copia la direcci贸n seleccionada al portapapeles del sistema</translation> </message> <message> <source>&amp;delete</source> <translation>&amp;borrar</translation> </message> <message> <source>comma separated file (*.csv)</source> <translation>archivos separados por coma (*.csv)</translation> </message> </context> <context> <name>addresstablemodel</name> <message> <source>label</source> <translation>etiqueta</translation> </message> <message> <source>address</source> <translation>direccion </translation> </message> <message> <source>(no label)</source> <translation>(sin etiqueta)</translation> </message> </context> <context> <name>askpassphrasedialog</name> <message> <source>enter passphrase</source> <translation>escriba la contrase帽a</translation> </message> <message> <source>new passphrase</source> <translation>nueva contrase帽a</translation> </message> <message> <source>repeat new passphrase</source> <translation>repetir nueva contrase帽a</translation> </message> <message> <source>encrypt wallet</source> <translation>monedero cifrado</translation> </message> <message> <source>this operation needs your wallet passphrase to unlock the wallet.</source> <translation>esta operacion necesita la contrase帽a del monedero para desbloquear el mismo</translation> </message> <message> <source>unlock wallet</source> <translation>monedero destrabado</translation> </message> <message> <source>this operation needs your wallet passphrase to decrypt the wallet.</source> <translation>esta operacion necesita la contrase帽a del monedero para descifrar el mismo</translation> </message> <message> <source>decrypt wallet</source> <translation>monedero descifrado</translation> </message> <message> <source>change passphrase</source> <translation>cambiar contrase帽a</translation> </message> <message> <source>confirm wallet encryption</source> <translation>confirme el cifrado del monedero</translation> </message> <message> <source>wallet encrypted</source> <translation>monedero cifrado</translation> </message> <message> <source>wallet encryption failed</source> <translation>fallo en el cifrado del monedero</translation> </message> <message> <source>wallet encryption failed due to an internal error. your wallet was not encrypted.</source> <translation>fallo en el cifrado del monedero a causa de un error interno. su monedero no esta cifrado</translation> </message> <message> <source>the supplied passphrases do not match.</source> <translation>las contrase帽as suministradas no coinciden.</translation> </message> <message> <source>wallet unlock failed</source> <translation>fallo en el desbloqueo del mondero</translation> </message> <message> <source>the passphrase entered for the wallet decryption was incorrect.</source> <translation>la contrase帽a introducida para el descifrado del monedero es incorrecta.</translation> </message> <message> <source>wallet decryption failed</source> <translation>fallo en el descifrado del monedero</translation> </message> </context> <context> <name>bitcoingui</name> <message> <source>synchronizing with network...</source> <translation>sincronizando con la red...</translation> </message> <message> <source>&amp;overview</source> <translation>&amp;vista previa</translation> </message> <message> <source>show general overview of wallet</source> <translation>mostrar descripci贸n general del monedero</translation> </message> <message> <source>&amp;transactions</source> <translation>&amp;transaciones </translation> </message> <message> <source>browse transaction history</source> <translation>buscar en el historial de transacciones</translation> </message> <message> <source>quit application</source> <translation>salir de la aplicacion </translation> </message> <message> <source>&amp;options...</source> <translation>&amp;opciones...</translation> </message> <message> <source>change the passphrase used for wallet encryption</source> <translation>cambie la clave utilizada para el cifrado del monedero</translation> </message> <message> <source>&amp;file</source> <translation>&amp;archivo</translation> </message> <message> <source>&amp;settings</source> <translation>&amp;configuracion </translation> </message> <message> <source>&amp;help</source> <translation>&amp;ayuda</translation> </message> <message> <source>tabs toolbar</source> <translation>barra de herramientas</translation> </message> <message> <source>up to date</source> <translation>a la fecha</translation> </message> <message> <source>catching up...</source> <translation>ponerse al dia...</translation> </message> <message> <source>sent transaction</source> <translation>transaccion enviada</translation> </message> <message> <source>incoming transaction</source> <translation>transacci贸n entrante</translation> </message> <message> <source>wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source> <translation>el monedero esta &lt;b&gt;cifrado&lt;/b&gt; y actualmente &lt;b&gt;desbloqueado&lt;/b&gt;</translation> </message> <message> <source>wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source> <translation>el monedero esta &lt;b&gt;cifrado&lt;/b&gt; y actualmente &lt;b&gt;bloqueado&lt;/b&gt;</translation> </message> </context> <context> <name>clientmodel</name> </context> <context> <name>coincontroldialog</name> <message> <source>date</source> <translation>fecha</translation> </message> <message> <source>(no label)</source> <translation>(sin etiqueta)</translation> </message> </context> <context> <name>editaddressdialog</name> <message> <source>edit address</source> <translation>editar direcci贸n</translation> </message> <message> <source>&amp;label</source> <translation>&amp;etiqueta</translation> </message> <message> <source>&amp;address</source> <translation>&amp;direccion </translation> </message> <message> <source>new receiving address</source> <translation>nueva direcci贸n de recepci贸n </translation> </message> <message> <source>new sending address</source> <translation>nueva direcci贸n de env铆o </translation> </message> <message> <source>edit receiving address</source> <translation>editar direcci贸n de recepcion </translation> </message> <message> <source>edit sending address</source> <translation>editar direcci贸n de env铆o </translation> </message> <message> <source>could not unlock wallet.</source> <translation>no se puede abrir el monedero.</translation> </message> <message> <source>new key generation failed.</source> <translation>fallo en la nueva clave generada.</translation> </message> </context> <context> <name>freespacechecker</name> </context> <context> <name>helpmessagedialog</name> </context> <context> <name>intro</name> </context> <context> <name>openuridialog</name> </context> <context> <name>optionsdialog</name> <message> <source>options</source> <translation>opciones</translation> </message> </context> <context> <name>overviewpage</name> <message> <source>form</source> <translation>formulario</translation> </message> </context> <context> <name>paymentserver</name> </context> <context> <name>peertablemodel</name> </context> <context> <name>qobject</name> </context> <context> <name>qrimagewidget</name> </context> <context> <name>rpcconsole</name> </context> <context> <name>receivecoinsdialog</name> <message> <source>&amp;label:</source> <translation>&amp;etiqueta:</translation> </message> </context> <context> <name>receiverequestdialog</name> <message> <source>address</source> <translation>direccion </translation> </message> <message> <source>label</source> <translation>etiqueta</translation> </message> </context> <context> <name>recentrequeststablemodel</name> <message> <source>date</source> <translation>fecha</translation> </message> <message> <source>label</source> <translation>etiqueta</translation> </message> <message> <source>(no label)</source> <translation>(sin etiqueta)</translation> </message> </context> <context> <name>sendcoinsdialog</name> <message> <source>send coins</source> <translation>enviar monedas</translation> </message> <message> <source>send to multiple recipients at once</source> <translation>enviar a varios destinatarios a la vez</translation> </message> <message> <source>balance:</source> <translation>balance:</translation> </message> <message> <source>confirm the send action</source> <translation>confirmar el env铆o</translation> </message> <message> <source>confirm send coins</source> <translation>confirmar el envio de monedas</translation> </message> <message> <source>the amount to pay must be larger than 0.</source> <translation>la cantidad a pagar debe ser mayor que 0.</translation> </message> <message> <source>(no label)</source> <translation>(sin etiqueta)</translation> </message> </context> <context> <name>sendcoinsentry</name> <message> <source>a&amp;mount:</source> <translation>a&amp;monto:</translation> </message> <message> <source>pay &amp;to:</source> <translation>pagar &amp;a:</translation> </message> <message> <source>enter a label for this address to add it to your address book</source> <translation>introduzca una etiqueta para esta direcci贸n para a帽adirla a su libreta de direcciones</translation> </message> <message> <source>&amp;label:</source> <translation>&amp;etiqueta:</translation> </message> <message> <source>alt+a</source> <translation>alt+a</translation> </message> <message> <source>paste address from clipboard</source> <translation>pegar la direcci贸n desde el portapapeles</translation> </message> <message> <source>alt+p</source> <translation>alt+p</translation> </message> </context> <context> <name>shutdownwindow</name> </context> <context> <name>signverifymessagedialog</name> <message> <source>alt+a</source> <translation>alt+a</translation> </message> <message> <source>paste address from clipboard</source> <translation>pegar la direcci贸n desde el portapapeles</translation> </message> <message> <source>alt+p</source> <translation>alt+p</translation> </message> </context> <context> <name>splashscreen</name> <message> <source>[testnet]</source> <translation>[prueba_de_red]</translation> </message> </context> <context> <name>trafficgraphwidget</name> </context> <context> <name>transactiondesc</name> <message> <source>open until %1</source> <translation>abrir hasta %1</translation> </message> <message> <source>date</source> <translation>fecha</translation> </message> <message> <source>unknown</source> <translation>desconocido</translation> </message> </context> <context> <name>transactiondescdialog</name> </context> <context> <name>transactiontablemodel</name> <message> <source>date</source> <translation>fecha</translation> </message> <message> <source>open until %1</source> <translation>abrir hasta %1</translation> </message> <message> <source>label</source> <translation>etiqueta</translation> </message> </context> <context> <name>transactionview</name> <message> <source>comma separated file (*.csv)</source> <translation>archivos separados por coma (*.csv)</translation> </message> <message> <source>date</source> <translation>fecha</translation> </message> <message> <source>label</source> <translation>etiqueta</translation> </message> <message> <source>address</source> <translation>direccion </translation> </message> </context> <context> <name>unitdisplaystatusbarcontrol</name> </context> <context> <name>walletframe</name> </context> <context> <name>walletmodel</name> <message> <source>send coins</source> <translation>enviar monedas</translation> </message> </context> <context> <name>walletview</name> </context> <context> <name>bitcoin-core</name> </context> </ts>
moorecoin/MooreCoinMiningAlgorithm
src/qt/locale/moorecoin_es_uy.ts
TypeScript
mit
14,309
(function () { "use strict"; function ContentRightsController($scope, $timeout, contentResource, localizationService, angularHelper, navigationService, overlayService) { var vm = this; var currentForm; vm.availableUserGroups = []; vm.selectedUserGroups = []; vm.removedUserGroups = []; vm.viewState = "manageGroups"; vm.labels = {}; vm.setViewSate = setViewSate; vm.editPermissions = editPermissions; vm.setPermissions = setPermissions; vm.save = save; vm.removePermissions = removePermissions; vm.cancelManagePermissions = cancelManagePermissions; vm.closeDialog = closeDialog; vm.discardChanges = discardChanges; function onInit() { vm.loading = true; contentResource.getDetailedPermissions($scope.currentNode.id).then(function (userGroups) { initData(userGroups); vm.loading = false; currentForm = angularHelper.getCurrentForm($scope); }); } /** * This will initialize the data and set the correct selectedUserGroups based on the default permissions and explicit permissions assigned * @param {any} userGroups */ function initData(userGroups) { //reset this vm.selectedUserGroups = []; vm.availableUserGroups = userGroups; vm.availableUserGroups.forEach(function (group) { if (group.permissions) { //if there's explicit permissions assigned than it's selected assignGroupPermissions(group); } }); } function setViewSate(state) { vm.viewState = state; } function editPermissions(group) { vm.selectedUserGroup = group; if (!vm.selectedUserGroup.permissions) { //if no permissions are explicitly set this means we need to show the defaults vm.selectedUserGroup.permissions = vm.selectedUserGroup.defaultPermissions; } localizationService.localize("defaultdialogs_permissionsSetForGroup", [$scope.currentNode.name, vm.selectedUserGroup.name]).then(function (value) { vm.labels.permissionsSetForGroup = value; }); setViewSate("managePermissions"); // hide dropdown vm.groupsDropdownOpen = false; } function assignGroupPermissions(group) { // clear allowed permissions before we make the list so we don't have duplicates group.allowedPermissions = []; // get list of checked permissions Object.values(group.permissions).forEach(function (permissionGroup) { permissionGroup.forEach(function (permission) { if (permission.checked) { //the `allowedPermissions` is what will get sent up to the server for saving group.allowedPermissions.push(permission); } }); }); if (!group.selected) { // set to selected so we can remove from the dropdown easily group.selected = true; vm.selectedUserGroups.push(group); //remove from the removed groups if it's been re-added vm.removedUserGroups = _.reject(vm.removedUserGroups, function (g) { return g.id == group.id; }); } } function setPermissions(group) { assignGroupPermissions(group); setViewSate("manageGroups"); $scope.dialog.confirmDiscardChanges = true; } /** * This essentially resets the permissions for a group for this content item, it will remove it from the selected list * @param {any} index */ function removePermissions(index) { // remove as selected so we can select it from the dropdown again var group = vm.selectedUserGroups[index]; group.selected = false; //reset assigned permissions - so it will default back to default permissions group.permissions = []; group.allowedPermissions = []; vm.selectedUserGroups.splice(index, 1); //track it in the removed so this gets pushed to the server vm.removedUserGroups.push(group); } function cancelManagePermissions() { setViewSate("manageGroups"); } function formatSaveModel(permissionsSave, groupCollection) { groupCollection.forEach(function (g) { permissionsSave[g.id] = []; g.allowedPermissions.forEach(function (p) { permissionsSave[g.id].push(p.permissionCode); }); }); } function save() { vm.saveState = "busy"; vm.saveError = false; vm.saveSuccces = false; //this is a dictionary that we need to populate var permissionsSave = {}; //format the selectedUserGroups, then the removedUserGroups since we want to pass data from both collections up formatSaveModel(permissionsSave, vm.selectedUserGroups); formatSaveModel(permissionsSave, vm.removedUserGroups); var saveModel = { contentId: $scope.currentNode.id, permissions: permissionsSave }; contentResource.savePermissions(saveModel).then(function (userGroups) { //re-assign model from server since it could have changed initData(userGroups); // clear dirty state on the form so we don't see the discard changes notification // we use a timeout here because in some cases the initData reformats the userGroups model and triggers a change after the form state was changed $timeout(function() { if(currentForm) { currentForm.$dirty = false; } }); $scope.dialog.confirmDiscardChanges = false; vm.saveState = "success"; vm.saveSuccces = true; }, function(error){ vm.saveState = "error"; vm.saveError = error; }); } function closeDialog() { // check if form has been changed. If it has show discard changes notification if (currentForm && currentForm.$dirty) { localizationService.localizeMany(["prompt_unsavedChanges", "prompt_unsavedChangesWarning", "prompt_discardChanges", "prompt_stay"]).then( function(values) { var overlay = { "view": "default", "title": values[0], "content": values[1], "disableBackdropClick": true, "disableEscKey": true, "submitButtonLabel": values[2], "closeButtonLabel": values[3], submit: function () { overlayService.close(); navigationService.hideDialog(); }, close: function () { overlayService.close(); } }; overlayService.open(overlay); } ); } else { navigationService.hideDialog(); } } function discardChanges() { navigationService.hideDialog(); } onInit(); } angular.module("umbraco").controller("Umbraco.Editors.Content.RightsController", ContentRightsController); })();
bjarnef/Umbraco-CMS
src/Umbraco.Web.UI.Client/src/views/content/content.rights.controller.js
JavaScript
mit
7,886
<div id="status-bar"> <span class="icon">+</span> <?php if (isset($new)): ?>New Member<?php else: ?> Member: <?php if (isset($first_name) && isset($last_name)): ?> <?php print $first_name.' '.$last_name ?> <?php else: ?> <?php print $name ?><?php endif ?> <?php endif ?> </div> <form method="post" action="member?name=<?php print $name ?>"> <input type="hidden" name="member[original_name]" value="<?php print $original_name ?>" /> <?php if (isset($new)): ?> <input type="hidden" name="member[new]" value="1" /> <?php endif ?> <div id="screen"> <?php if (isset($errors) && (sizeof($errors) > 0)): ?> <div class="panel topo"> <p>Sorry an error prevented the form submission</p> <ul class="errors"> <?php foreach ($errors as $field => $error): ?> <li><span class="field"><?php print $field ?></span> <span class="error"><?php print $error ?></span></li> <?php endforeach ?> </ul> </div> <?php endif ?> <div class="input-block input-text"> <label for="member-username">Username</label> <input type="text" id="member-username" name="member[name]" value="<?php print $name ?>" /> </div> <div class="input-block input-text"> <label for="member-first-name">First name</label> <input type="text" name="member[yaml][first_name]" class="text title" id="gaa" value="<?php print $first_name; ?>" /> </div> <div class="input-block input-text"> <label for="member-last-name">Last name</label> <input type="text" name="member[yaml][last_name]" id="member-last-name" value="<?php print $last_name; ?>" /> </div> <div class="input-block input-text input-password"> <label for="member-password">Password</label> <input type="password" name="member[yaml][password]" id="member-password" value="" placeholder="Enter to change password" /> </div> <div class="input-block input-text input-password"> <label for="member-password-confirmation">Password Confirmation</label> <input type="password" name="member[yaml][password_confirmation]" id="member-password-confirmation" value="" placeholder="Type it again, please" /> </div> <?php if ($is_password_encrypted !== true): ?> <div class="input-block input-checkbox input"> <div class="checkbox-block"> <input type="checkbox" name="member[yaml][password_encrypted]" id="member-password-encrypted" value="true" checked /> <label for="member-password-encrypted">Encrypt Password?</label> </div> </div> <?php else: ?> <input type="hidden" name="member[yaml][password_encrypted]" value="true" /> <?php endif; ?> <div class="input-block input-checkbox input"> <div class="checkbox-block"> <input type="checkbox" name="member[yaml][roles]" id="member-roles" value="admin" <?php if ($roles) print "checked" ?> /> <label for="member-roles">Admin</label> </div> </div> <div class="input-block input-textarea markitup"> <label for="member-bio">Biography</label> <textarea name="member[biography]" id="member-bio"><?php print $biography; ?></textarea> </div> <div id="publish-action" class="footer-controls"> <input type="submit" class="btn btn-submit" value="Save" id="member-submit"> </div> </div> </form>
pinfinity/pinfinity_co
admin/themes/trailhead/templates/member.php
PHP
mit
3,352
package com.tungnui.abccomputer.models /** * Created by thanh on 22/10/2017. */ import com.google.gson.annotations.Expose import com.google.gson.annotations.SerializedName data class Customer ( @SerializedName("id") @Expose var id: Int? = null, @SerializedName("date_created") @Expose var dateCreated: String? = null, @SerializedName("date_created_gmt") @Expose var dateCreatedGmt: String? = null, @SerializedName("date_modified") @Expose var dateModified: String? = null, @SerializedName("date_modified_gmt") @Expose var dateModifiedGmt: String? = null, @SerializedName("email") @Expose var email: String? = null, @SerializedName("first_name") @Expose var firstName: String? = null, @SerializedName("last_name") @Expose var lastName: String? = null, @SerializedName("role") @Expose var role: String? = null, @SerializedName("username") @Expose var username: String? = null, @SerializedName("password") @Expose var password:String?=null, @SerializedName("billing") @Expose var billing: Billing? = null, @SerializedName("shipping") @Expose var shipping: Shipping? = null, @SerializedName("is_paying_customer") @Expose var isPayingCustomer: Boolean? = null, @SerializedName("orders_count") @Expose var ordersCount: Int? = null, @SerializedName("total_spent") @Expose var totalSpent: String? = null, @SerializedName("avatar_url") @Expose var avatarUrl: String? = null, var code: String?=null )
ngthtung2805/dalatlaptop
app/src/main/java/com/tungnui/abccomputer/models/Customer.kt
Kotlin
mit
1,609
'use strict'; /** * Module dependencies. */ var mongoose = require('mongoose'), Schema = mongoose.Schema; // var travelInsurance = new Schema({ // hasInsurance: { type: Boolean, default:false }, // name: { type: String, default:'', trim: true }, // }); // // var reviews = new Schema({ // author: { type: String, default:'', trim: true }, // comment: { type: String, default:'', trim: true }, // email: { type: String, default:'', trim: true }, // rate: { type: Number }, // }); // // var contact = new Schema({ // name: { type: String, default:'', trim: true }, // lastName: { type: String, default:'', trim: true }, // jobTitle: { type: String, default:'', trim: true }, // phone: { type: String, default:'', trim: true }, // email: { type: String, default:'', trim: true }, // notice: { type: String, default:'', trim: true }, // facebook: { type: String, default:'', trim: true }, // linkedin: { type: String, default:'', trim: true }, // twitter: { type: String, default:'', trim: true }, // googlePlus: { type: String, default:'', trim: true }, // skype: { type: String, default:'', trim: true }, // languages: [{ type: String, default:'', trim: true }] , // activityRate: { type: Number, default: 100 }, // }); // // var siteSharing = new Schema({ // travelAgency: { type: Schema.ObjectId, ref: 'TravelAgency' }, // name: { type: String, default:'', trim: true } // }); // // var travelGroup = new Schema({ // belongsToGroup: { type: Boolean }, // isHeadquaters: { type:Boolean }, // headquater: { type: Schema.ObjectId, ref: 'TravelAgency'}, // branches: [{ type: Schema.ObjectId, ref: 'TravelAgency'}] // }); /** * Travel agency Schema */ var TravelAgencySchema = new Schema({ name: { type: String, default: '', required: 'Please fill Travel agency name', trim: true }, logoURL: { type: String, default: 'modules/users/img/profile/default.png' }, description:{ type: String, default:'', trim: true }, address: { type: String, default:'', trim: true }, postalCode: { type: String, default:'', trim: true }, city: { type: String, default:'', trim: true }, state: { type: String, default:'', trim: true }, country: { type: String, default:'', trim: true }, phone: { type: String, default:'', trim: true }, fax: { type: String, default:'', trim: true }, email: { type: String, default:'', trim: true }, website: { type: String, default:'', trim: true }, skype: { type: String, default:'', trim: true }, facebook: { type: String, default:'', trim: true }, twitter: { type: String, default:'', trim: true }, googlePlus: { type: String, default:'', trim: true }, linkedin: { type: String, default:'', trim: true }, youtube: { type: String, default:'', trim: true }, vimeo: { type: String, default:'', trim: true }, instagram: { type: String, default:'', trim: true }, pinterest: { type: String, default:'', trim: true }, flickr: { type: String, default:'', trim: true }, pixabay: { type: String, default:'', trim: true }, goal: { type: String, default:'', trim: true }, notice: { type: String, default:'', trim: true }, language: { type: String, default:'', trim: true }, yellowPages: { type: String, default:'', trim: true }, onlineSales: { type: Boolean, default:false }, travelInsurance: { hasInsurance: { type: Boolean, default:false }, name: { type: String, default:'', trim: true }, }, companyRegisterNumber: { type: String, default:'', trim: true }, companyRegisterWebsite: { type: String, default:'', trim: true }, creationDate: { type: Date }, closingDate: { type: Date }, bankrupty: { type: Boolean, default:false }, // // //reviews: [ reviews ], // //contact: [ contact ], // worldRegions: [ { type: String, default:'', trim: true } ], activities: [ { type: String, default:'', trim: true } ], clientType: [ { type: String, default:'', trim: true } ], // productsAPI: { type: String, default:'', trim: true }, aboutAPI: { type: String, default:'', trim: true }, googleID: { type: String, default:'', trim: true }, // //coordonates: { type: [ Number ], index: '2dSphere' }, // site: { type: String, default:'', trim: true }, siteSharing: { travelAgency: { type: Schema.ObjectId, ref: 'TravelAgency' }, name: { type: String, default:'', trim: true } }, //travelGroup: { // belongsToGroup: { type: Boolean }, // isHeadquaters: { type:Boolean }, // headquater: { type: Schema.ObjectId, ref: 'TravelAgency'}, // branches: [{ type: Schema.ObjectId, ref: 'TravelAgency'}] // }, created: { type: Date, default: Date.now }, user: { type: Schema.ObjectId, ref: 'User' } }); mongoose.model('TravelAgency', TravelAgencySchema);
gabzon/listo-mean
modules/travel-agencies/server/models/travel-agency.server.model.js
JavaScript
mit
4,752
#!/bin/bash ########################################################################################## # # ########################################################################################## export OCCT_VERSION=7.2.0 export OCCT_PACKAGE=occt-${OCCT_VERSION} if [ `uname` == "Darwin" ];then export OCCT_TARFILE=${OCCT_PACKAGE}-osx.tgz else export OCCT_TARFILE=${OCCT_PACKAGE}-linux.tgz fi export OCCT_TARFILE_URL="https://github.com/OpenWebCAD/occt_builder/releases/download/${OCCT_VERSION}/${OCCT_TARFILE}" echo " OCCT_TARFILE = " ${OCCT_TARFILE} echo " OCCT_TARFILE_URL = " ${OCCT_TARFILE_URL} echo "-------------------------- OCCT TAR FILE ${OCCT_TARFILE}" if [ ! -f "${OCCT_TARFILE}" ]; then echo "Getting ${OCCT_TARFILE}" wget --continue -O "${OCCT_TARFILE}.downloading" ${OCCT_TARFILE_URL} --progress=bar:force 2>&1 | tail -f -n +6 mv "${OCCT_TARFILE}.downloading" ${OCCT_TARFILE} fi if [ ! -d "${OCCT_PACKAGE}" ]; then echo "extracting package ${OCCT_TARFILE}" tar -xf ${OCCT_TARFILE} fi export LD_LIBRARY_PATH=`pwd`/${OCCT_PACKAGE}/lib:$LD_LIBRARY_PATH export VERSION_FILE=`pwd`/${OCCT_PACKAGE}/include/opencascade/Standard_Version.hxx grep -i "#define OCC_VERSION_COMPLETE" ${VERSION_FILE} ; lscpu ; cmake --version ; #set NPROC=`nproc` # on linux: # NPROC=$(grep "^core id" /proc/cpuinfo | sort -u | wc -l) # on MacOS # NPROC=$(sysctl -n hw.ncpu) # on both NPROC=$(node -p "os.cpus().length") echo "Number of processors =" ${NPROC} PATH=$PATH:`pwd`/node_modules/.bin uname -a echo "NODE PATH = `which node`" echo "NODE VERSION = `node --version`" echo "NODE = `node -p 'process.platform + "@" + process.arch'`" echo "NPM VERSION = `npm --version`" # figure out if we should publish PUBLISH_BINARY=false # if we are building a tag then publish echo $TRAVIS_BRANCH export CURRENT BRANCH=`git describe --tags --always HEAD` echo "CURRENT BRANCH = $CURRENT_BRANCH" if [[ "$TRAVIS_BRANCH" == "$CURRENT_BRANCH" ]]; then PUBLISH_BINARY=true; fi; echo "Publishing native platform Binary Package? ->" $PUBLISH_BINARY # Cleanup the output of npm npm config set progress false npm config set spin false if [[ ! -z $TRAVIS_ELECTRON_VERSION ]]; then if [[ $TRAVIS_OS_NAME == "linux" ]]; then export DISPLAY=:99.0 sh -e /etc/init.d/xvfb start fi export npm_config_target=$TRAVIS_ELECTRON_VERSION export npm_config_arch=$ARCH export npm_config_disturl=https://atom.io/download/atom-shell export npm_config_runtime=electron npm install --arch=$ARCH electron@$TRAVIS_ELECTRON_VERSION npm install electron-mocha echo "installed Electron $TRAVIS_ELECTRON_VERSION" fi # git submodule update --depth 50 --init --recursive [[ ${1:-} = "--only-prepare" ]] || npm install --build-from-source
erossignon/node-occ
build.sh
Shell
mit
2,769
/** * 客服账号管理 * https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421140547&token=&lang=zh_CN#1 * */ import crypto from 'crypto' const customerServiceUrlPrefix = "https://api.weixin.qq.com/customservice/kfaccount/" /** * 添加客服账号 * https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421140547&token=&lang=zh_CN#1.1 * @param account 客服账号 * @param nickname 昵称 * @param password 密码,传入经过md5加密的密文时需要将encrypted设为true * @param encrypted 是否需要对密码进行加密 */ function add(account,nickname,password,encrypted) { if(!encrypted) { const hash = crypto.createHash('md5') password = hash.update(password).digest('hex') } return { "url":`${customerServiceUrlPrefix}add`, "method" : "post", "body": { "kf_account" : account, "nickname" : nickname, "password" : password } } } /** * 修改客服账号 * https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421140547&token=&lang=zh_CN#1.2 * @param account 客服账号 * @param nickname 昵称 * @param password 密码,传入经过md5加密的密文时需要将encrypted设为true * @param encrypted 是否需要对密码进行加密 */ function update(account,nickname,password,encrypted) { if(!encrypted) { const hash = crypto.createHash('md5') password = hash.update(password).digest('hex') } return { "url":`${customerServiceUrlPrefix}update`, "method" : "post", "body": { "kf_account" : account, "nickname" : nickname, "password" : password, } } } /** * 删除客服账号 * https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421140547&token=&lang=zh_CN#1.3 * @param account 客服账号 * @param nickname 昵称 * @param password 密码,传入经过md5加密的密文时需要将encrypted设为true * @param encrypted 是否需要对密码进行加密 */ function del(account,nickname,password,encrypted) { if(!encrypted) { const hash = crypto.createHash('md5') password = hash.update(password).digest('hex') } return { "url":`${customerServiceUrlPrefix}del`, "method" : "post", "body": { "kf_account" : account, "nickname" : nickname, "password" : password, } } } /** * 设置客服帐号的头像 * https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421140547&token=&lang=zh_CN#1.4 * @param account 客服账号 * @param file 要上传的文件 */ function headImg(account,file) { return { "url":`${customerServiceUrlPrefix}uploadheadimg`, "method" : "upload", "parameters": { "kf_account": account }, "media" : file } } /** * 获取所有客服账号 * 官方文档: * https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421141014&token=&lang=zh_CN#1.5 * */ function list() { return { "url":`${customerServiceUrlPrefix}getkflist`, "method" : "get" } } export default { add,update,del,headImg,list }
wuhaixing/wechat-es
src/managers/customer_service_manager.js
JavaScript
mit
2,924
package profiler // AUTOGENERATED. DO NOT EDIT. import ( cdp "github.com/knq/chromedp/cdp" "github.com/knq/chromedp/cdp/debugger" ) // EventConsoleProfileStarted sent when new profile recodring is started // using console.profile() call. type EventConsoleProfileStarted struct { ID string `json:"id,omitempty"` Location *debugger.Location `json:"location,omitempty"` // Location of console.profile(). Title string `json:"title,omitempty"` // Profile title passed as an argument to console.profile(). } // EventConsoleProfileFinished [no description]. type EventConsoleProfileFinished struct { ID string `json:"id,omitempty"` Location *debugger.Location `json:"location,omitempty"` // Location of console.profileEnd(). Profile *Profile `json:"profile,omitempty"` Title string `json:"title,omitempty"` // Profile title passed as an argument to console.profile(). } // EventTypes all event types in the domain. var EventTypes = []cdp.MethodType{ cdp.EventProfilerConsoleProfileStarted, cdp.EventProfilerConsoleProfileFinished, }
crackcomm/chromedp
cdp/profiler/events.go
GO
mit
1,122
const ProtoBuf = require('protobufjs'); const url = require('url'); const validUrl = require('valid-url'); module.exports = class ProtoHelper { constructor(builder) { this.types = require('./types'); if (typeof builder === 'string') { this.builder = ProtoBuf.protoFromFile(builder); } else { this.builder = builder; } } validateCall(call) { let method = this.builder.lookup(call.fqn); if (!method) { throw new Error(`Procedure "${call.fqn}" not found.`); } if (!(method instanceof ProtoBuf.Reflect.Service.Method)) { throw new Error(`"${call.fqn}" is no procedure.`); } return this.validateMessage(method.resolvedRequestType.fqn(), call.request); } validateMessage(messageFqn, value) { if (typeof value !== 'object') { throw new Error(`Message "${messageFqn}" needs to be specified as an object but is a ${typeof value}`); } if (value instanceof Array) { throw new Error(`Message "${messageFqn}" needs to be specified as an object but is an array`); } var message = this.builder.lookup(messageFqn); if (!message) { throw new Error(`No Definition found for the message: ${messageFqn}`); } var fields = message.getChildren(ProtoBuf.Reflect.Message.Field); let omissions = []; Object.keys(value).forEach(key => { let field = fields.find(f => f.name === key); if (!field) { throw new Error(`"${key}" is not a defined field of ${messageFqn}.`); } }); fields.forEach(field => { // in proto3 every field is optional .. skip not existing ones but add them to omissions if (value[field.name]) { let providedField = value[field.name]; // for repeated fields: one value can be passed as usual, multiple as array if (field.repeated && providedField instanceof Array) { // check for every element of the array providedField.forEach(fieldItem => { let recursiveOmissions = this.checkField(messageFqn, field, fieldItem); omissions = omissions.concat(recursiveOmissions); }); } else { // just check the single provided value let recursiveOmissions = this.checkField(messageFqn, field, providedField); omissions = omissions.concat(recursiveOmissions); } } else { omissions.push(`${message.fqn()}#${field.name}`); } }); return omissions; } checkField(messageFqn, field, providedField, recursiveCallForMap) { // Need this optional parameter to stop the recursion into the map case -> but is ugly recursiveCallForMap = recursiveCallForMap || false; let omissions = []; // Handle maps separately if (field.map && !recursiveCallForMap) { for (let key in providedField) { // First try to validate the key // Hack -> try to mock a field to the recursive call (works because its a scalar for sure) this.checkField(messageFqn, { type: field.keyType }, key); // validate the value type omissions = omissions.concat(this.checkField(messageFqn, field, providedField[key], true)); } // No map here.. } else { switch (field.type.name) { // recursively check nested messages case 'message': let fqn = field.resolvedType.fqn(); // Should be an object if (typeof providedField !== 'object') { throw new Error(`Field "${field.name}" (type: ${fqn}) needs to be specified as an object but is a ${typeof providedField}`); } if (providedField instanceof Array) { throw new Error(`Field "${field.name}" (type: ${fqn}) needs to be specified as an object but is an array`); } omissions = this.validateMessage(fqn, providedField); break; // check enum usage case 'enum': let possibleValues = field.resolvedType.getChildren(ProtoBuf.Reflect.Enum.Value).map(value => value.name); if (!possibleValues.find(value => value === providedField)) { throw new Error(`Field "${field.name}" (enumtype: ${field.resolvedType.fqn()}) has possible values ["${possibleValues.join('", "')}"] but "${providedField}" provided`); } break; // only primitive types (or not supported ones) should come up default: // Check the primitive type definitions for requested type if (field.type.name in this.types) { // Check if the type matches if (!this.types[field.type.name](providedField)) { throw new Error(`Provided field "${field.name}" of "${messageFqn}" must be of type ${field.type.name} but found ${typeof providedField}.`); } // if we have a bytes field provided by an url, check if the url is valid if (field.type.name === "bytes" && providedField && providedField instanceof url.Url && !validUrl.isUri(providedField.href)) { throw new Error(`Provided URL "${providedField.href}" for field "${field.name}" is not a valid URL.`) } } else { // This is something we didn't yet thought of.. Might be Maps or different things throw new Error(`Unknown field type for field ${field.name}: ${field.type.name} (not yet implemented)`); } } } return omissions; } getAllMethods() { let rawMethods = getRawMethods(this.builder); let methods = rawMethods.map(rawMethod => { let method = { name: '', parameters: [] }; method.name = rawMethod.fqn(); let requestParameters = rawMethod.resolvedRequestType.getChildren(ProtoBuf.Reflect.Message.Field); requestParameters.forEach(field => { let parameter = {}; if (field.resolvedType) { // non-primitive type parameter.type = field.resolvedType.name; } else { // primitive type parameter.type = field.type.name; } parameter.repeated = field.repeated; parameter.name = field.name; method.parameters.push(parameter); }); return method; }); return methods; } }; function getRawMethods(builder) { let services = getAllServices(builder); let serviceFqns = services.map(service => service.fqn()); let methods = []; serviceFqns.forEach(fqn => methods = methods.concat(getMethodsForService(fqn, builder)) ); return methods; } function getMethodsForService(serviceFqn, builder) { let methods = []; builder.lookup(serviceFqn).getChildren(ProtoBuf.Reflect.Service.Method).forEach(method => { methods = methods.concat(method); }); return methods; } function getAllServices(builder, fqn) { fqn = fqn || ''; let services = []; builder.lookup(fqn).getChildren(ProtoBuf.Reflect.Service).forEach(service => { services.push(service); }); builder.lookup(fqn).getChildren(ProtoBuf.Reflect.Namespace).forEach(service => { services = services.concat(getAllServices(builder, service.fqn())); }); return services; }
hubot-grpc/hubot-grpc
hubot/modules/proto-helper/proto-helper.js
JavaScript
mit
7,094
<html> <head> <title>Sample Waveforms for Test_Line.v </title> </head> <body> <h2><CENTER>Sample behavioral waveforms for design file Test_Line.v </CENTER></h2> <P>The following waveforms show the behavior of altsyncram megafunction for the chosen set of parameters in design Test_Line.v. For the purpose of this simulation, the contents of the memory at the start of the sample waveforms is assumed to be ( F0, XX, F0, XX, ...). The design Test_Line.v has one read port. The read port has 1 words of 8 bits each. The output of the read port is registered by clock. </P> <CENTER><img src=Test_Line_wave0.jpg> </CENTER> <P><CENTER><FONT size=2>Fig. 1 : Wave showing read operation. </CENTER></P> <P><FONT size=3>The above waveform shows the behavior of the design under normal read conditions. The read happens at the rising edge of the enabled clock cycle. The output from the RAM is undefined until after the first rising edge of the read clock. The clock enable on the read side input registers are disabled. The clock enable on the output registers are disabled. </P> <P></P> </body> </html>
takeshineshiro/fpga_linear_128
Test_Line_waveforms.html
HTML
mit
1,108
package com.amshali.garage_park_assistant; import android.content.Intent; import android.content.SharedPreferences; import android.graphics.Color; import android.os.AsyncTask; import android.os.Bundle; import android.os.Handler; import android.os.StrictMode; import android.preference.PreferenceManager; import android.support.v7.app.AppCompatActivity; import android.util.TypedValue; import android.view.Menu; import android.view.MenuItem; import android.widget.TextView; import com.google.api.client.http.GenericUrl; import com.google.api.client.http.HttpRequest; import com.google.api.client.http.HttpRequestFactory; import com.google.api.client.http.HttpRequestInitializer; import com.google.api.client.http.HttpTransport; import com.google.api.client.http.javanet.NetHttpTransport; import com.google.api.client.json.GenericJson; import com.google.api.client.json.JsonFactory; import com.google.api.client.json.JsonObjectParser; import com.google.api.client.json.jackson2.JacksonFactory; import java.io.IOException; public class MainActivity extends AppCompatActivity { static final HttpTransport HTTP_TRANSPORT = new NetHttpTransport(); static final JsonFactory JSON_FACTORY = new JacksonFactory(); private TextView mTextView; private Handler mHandler = new Handler(); private Runnable mHandlerTask = new Runnable() { @Override public void run() { new PollDuration().execute(""); } }; private State state = State.UNKNOWN; private SharedPreferences sharedPreferences; enum State { FORWARD, G_BACK, GOOD, UNKNOWN } private class PollDuration extends AsyncTask<String, Void, String> { int duration = -1; @Override protected String doInBackground(String... args) { // params comes from the execute() call: params[0] is the url. HttpRequestFactory requestFactory = HTTP_TRANSPORT.createRequestFactory(new HttpRequestInitializer() { @Override public void initialize(HttpRequest request) { request.setParser(new JsonObjectParser(JSON_FACTORY)); } }); try { String deviceId = sharedPreferences.getString("device_id", ""); String accessToken = sharedPreferences.getString("access_token", ""); String url = "https://api.particle.io/v1/devices/" + deviceId + "/duration?access_token=" + accessToken; HttpRequest request = requestFactory.buildGetRequest(new GenericUrl(url)); request.setConnectTimeout(20000); request.setReadTimeout(20000); GenericJson data = request.execute().parseAs(GenericJson.class); duration = Integer.parseInt(data.get("result").toString()); } catch (IOException e) { e.printStackTrace(); } return null; } // onPostExecute displays the results of the AsyncTask. @Override protected void onPostExecute(String result) { int cm = (int) (duration * (340.29 / 20000)); int min = Integer.parseInt(sharedPreferences.getString("min_distance_to_wall", "80")); int max = Integer.parseInt(sharedPreferences.getString("max_distance_from_wall", "95")); int refreshRate = Integer.parseInt(sharedPreferences.getString("refresh_rate", "750")); if (cm < 10 || cm > 600 && state != State.UNKNOWN) { mTextView.setText(Integer.toString(cm)); mTextView.setTextColor(Color.WHITE); mTextView.setBackgroundColor(Color.DKGRAY); state = State.UNKNOWN; } else if (cm > min && cm < max && state != State.GOOD) { mTextView.setText(R.string.good_state); mTextView.setTextColor(Color.BLACK); mTextView.setBackgroundColor(Color.GREEN); state = State.GOOD; } else if (cm < min && state != State.G_BACK) { mTextView.setText(R.string.go_back_state); mTextView.setTextColor(Color.WHITE); mTextView.setBackgroundColor(Color.RED); state = State.G_BACK; } else if (cm > max && state != State.FORWARD) { mTextView.setText(R.string.forward_state); mTextView.setTextColor(Color.BLACK); mTextView.setBackgroundColor(Color.YELLOW); state = State.FORWARD; } mHandler.postDelayed(mHandlerTask, refreshRate); } } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); mTextView = (TextView) findViewById(R.id.textView); mTextView.setTextSize(TypedValue.COMPLEX_UNIT_SP, 150); mTextView.setTextColor(Color.WHITE); if (android.os.Build.VERSION.SDK_INT > 9) { StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build(); StrictMode.setThreadPolicy(policy); } } @Override protected void onResume() { super.onResume(); sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this); mHandler.post(mHandlerTask); } @Override protected void onStop() { super.onStop(); mHandler.removeCallbacks(mHandlerTask); } private static final String TAG = MainActivity.class.getSimpleName(); @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case R.id.action_settings: Intent i = new Intent(this, SettingsActivity.class); startActivity(i); break; default: return super.onOptionsItemSelected(item); } return true; } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.settings, menu); return true; } }
amshali/garage-park-assistant
app/src/main/java/com/amshali/garage_park_assistant/MainActivity.java
Java
mit
5,358
<html> <head> <title>医療用医薬品 検索結果 | 独立行政法人 医薬品医療機器総合機構</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="keywords" content="PMDA,pmda,医薬品,副作用,被害救済,薬,医療,機器,医薬"> <meta name="description" content="独立行政法人 医薬品医療機器総合機構:医薬品副作用被害救済や稀少病認定薬の研究振興調査などの業務案内。"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-TextLayoutMetrics" content="gdi"> <meta name="robots" content="none"> <link rel="stylesheet" type="text/css" href="/PmdaSearch/files/common/css/import.css" /> <link rel="stylesheet" type="text/css" href="/PmdaSearch/files/common/css/print.css" /> <script type="text/javascript" src="/PmdaSearch/files/common/js/jquery_1.7.1.min.js"></script> <script type="text/javascript" src="/PmdaSearch/files/common/js/jquery_cookie.js"></script> <script type="text/javascript" src="/PmdaSearch/files/common/js/main.js"></script> <script type="text/javascript" src="/PmdaSearch/js/pmdaCommon.js"></script> <link rel="stylesheet" type="text/css" href="/PmdaSearch/files/css/search.css" /> </head> <body onload="FontSizeInit();"> <!-- Google Tag Manager --> <noscript><iframe title="GoogleTagManager" src="//www.googletagmanager.com/ns.html?id=GTM-MHGKV3" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= '//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-MHGKV3');</script> <!-- End Google Tag Manager --> <div id="layoutBody"> <!-- 2018-08-15 add 改修No3 新記載要領に対応した添付文書のバージョン比較機能 Start --> <style type="text/css"> hr{ border-width: 1px 0px 0px 0px; border-style: 1px; border-color: black; height: 1px; width: 90%; } .doubles { margin-top: 1em; } .divCol{ display: table-cell ; } </style> <!-- 2018-08-15 add 改修No3 新記載要領に対応した添付文書のバージョン比較機能 End --> <!-- ++++ local-js ++++ --> <script> var userAgent = window.navigator.userAgent.toLowerCase(); var uag = "0"; if (userAgent.indexOf('opera') != -1) { uag = "1"; } else if (userAgent.indexOf('msie') != -1) { uag = "1"; } else if (userAgent.indexOf('chrome') != -1) { uag = "2"; } else if (userAgent.indexOf('safari') != -1) { uag = "2"; } else if (userAgent.indexOf('firefox') != -1) { uag = "2"; } else { uag = "1"; } function FontSizeInit() { // 20140509 Font Size Default Set var fs = window.localStorage.getItem("iyakufsizeValue"); if(!fs){ window.localStorage.setItem("iyakufsizeValue", 100); fs = window.localStorage.getItem("iyakufsizeValue"); } document.body.style.fontSize = Math.floor(fs) + '%'; } function bigger() { var fs = window.localStorage.getItem("iyakufsizeValue"); fs *= 1.2; // if(fs <= (100 * 1.2) * 1.2){ if(fs <= (93 * 1.2) * 1.2){ window.localStorage.setItem("iyakufsizeValue", fs); document.body.style.fontSize = Math.floor(fs) + '%'; } } function smaller() { var fs = window.localStorage.getItem("iyakufsizeValue"); fs /= 1.2; // if(fs >= (100 / 1.2) / 1.2){ if(fs >= (93 / 1.2) / 1.2){ window.localStorage.setItem("iyakufsizeValue", fs); document.body.style.fontSize = Math.floor(fs) + '%'; } } // 項目の表示/非表示 var resultTableColArr = [ ["0","添付文書"], ["0","患者向医薬品ガイド/ワクチン接種を受ける人へのガイド"], ["0","インタビューフォーム"], ["0","医薬品リスク管理計画(RMP)"], ["0","改訂指示反映履歴および根拠症例"], ["0","審査報告書/再審査報告書/最適使用推進ガイドライン等"], ["0","重篤副作用疾患別対応マニュアル"], ["0","くすりのしおり"], ["0","緊急安全性情報/安全性速報"], ["0","医薬品の適正使用等に関するお知らせ"], ["0","厚生労働省発表資料(医薬品関連)"], ["0","医薬品に関する評価中のリスク等の情報"], ["0","医薬品添付文書改訂相談に基づく添付文書改訂"], ["0","DSU(医薬品安全対策情報)"], ["0","PMDA医療安全情報"], ["0","医療用医薬品問合せ先"] ]; // add 2.00: 検索結果出力機能追加 // 常に表示する項目(検索結果出力項目選択用) var resultTableDefaultDispColArr = { "BOOK" : [ ["1", "一般名"], ["1", "販売名"], ["1", "製造販売業者等"] ], "RD" : [ ["1", "種類"], ["1", "文書の名称"], ["1", "日付"], ["1", "一般名"], ["1", "販売名"], ["1", "製造販売業者等"] ] }; //表示している項目にフラグをつける $(function () { var dispColumnsList = [ "1", "2", "3", "", "", "", "", "", "", "", "", "", "", "", "", "" ]; $(dispColumnsList).each(function(i, v){ resultTableColArr[i][0] = (v) ? '1': '0'; }); // トグル $(document).on('click', '.toggles', function(){ $(this).next().toggle(); $(this).toggle(); }); $(document).on('click', '.togglec', function(){ $(this).parent().prev().toggle(); $(this).parent().toggle(); }); }); // ページング処理 function changePg(pages) { popOldVersionClose(); $.ajax({ url: '/PmdaSearch/iyakuSearch/PageChangeRequest/' + pages, // mod 2.01: POSTに変更 // type: 'GET', type: 'POST', // add 2.01: Form情報を送信 data: $('form').serialize(), dataType: 'json', cache: false, //ブラウザにキャッシュさせません。 error: function(err){ alert("jsonの読み込みに失敗しました"); }, success: function(json){ //alert("jsonの読み込みが完了しました"); // mod 2.00: ページリンクをページ上部だけでなくページ下部にも追加 // $("#PageNavi").html(json.PageNavi).html() $(".PageNavi").each(function(i) { $(this).html(json.PageNavi).html(); }); $("#ResultList").html(json.ResultList).html(); // add 2.01: ページ情報を更新 document.getElementById("pages").value = pages; } }); } var chnBtnObj_y; var tblLnkObj_y; var svScrollTop = 0; var svTblSclTop = 0; //WINDOWスクロール発生時の処理 window.onscroll = function() { if(uag == "1"){ scrollTop = document.documentElement.scrollTop; // IE、Opera } else { scrollTop = document.body.scrollTop; // Chrome、Safari、Firefox } var calcTop = scrollTop - svScrollTop; svScrollTop = scrollTop; // pageScroll(calcTop); // 表示項目選択ポップアップのスクロール移動制御をコール divScroll(calcTop); // 過去版ポップアップのスクロール移動制御 } //WINDOW内要素(DIV)スクロール発生時の処理 function elmScrool(scElm) { var scrollTop = scElm.scrollTop; var calcTop = scrollTop - svTblSclTop; svTblSclTop = scrollTop; // pageScroll(calcTop); // 表示項目選択ポップアップのスクロール移動制御をコール divScroll(calcTop); // 過去版ポップアップのスクロール移動制御 } //表示項目選択ポップアップのスクロール移動制御 function pageScroll(scVal) { var popObj = document.getElementById("popDiv"); var popTarget = popObj.style; if(popObj.innerHTML.length != 0){ var targTopVal = popTarget.top.replace("px", ""); targTopVal = targTopVal - scVal; popTarget.top = targTopVal + "px"; } } // 過去版ポップアップのスクロール移動制御 function divScroll(scVal) { var popObj = document.getElementById("popDiv2"); var popTarget = popObj.style; if(popObj.innerHTML.length != 0){ var targTopVal = popTarget.top.replace("px", ""); targTopVal = targTopVal - scVal; popTarget.top = targTopVal + "px"; } } var chk_pdf = "0"; var chk_xml = "0"; //2018-08-15 add 改修No3 新記載要領に対応した添付文書のバージョン比較機能 Start var chk_yoshiki = ""; //2018-08-15 add 改修No3 新記載要領に対応した添付文書のバージョン比較機能 End //過去版ポップアップの表示 function popOldVersion(event, service, p1, p2, p3, minVer) { var lnkStrPDF = ""; var lnkStrHTML = p2 + "_" + p3 + '_'; var temp_msg = ""; var oldCnt = 0; //2018-08-15 add 改修No3 新記載要領に対応した添付文書のバージョン比較機能 Start var tableOLD = ""; var OLDVer = ""; var tableNew = ""; var NewVer = ""; var tableHdr = ""; var genyoshiki = "SGML"; //2018-08-15 add 改修No3 新記載要領に対応した添付文書のバージョン比較機能 End //2018-08-15 mod 改修No3 新記載要領に対応した添付文書のバージョン比較機能 Start // var msg = "<div style=\"background-color: #d0f0f0; padding: 15px; border-style: solid; border-width: 1px; border-color: #404040;\">\n"; // msg += "<table>\n"; //2018-08-15 mod 改修No3 新記載要領に対応した添付文書のバージョン比較機能 End for(var j = p1; j >= minVer; j--) { var v1 = ("000" + j).slice(-2); var v2 = v1; if(j == p1){ v2 = v1 + "*"; checkOldVer(p2, p3, v1, service, "CUR"); lnkStrPDF = "/" + service + "/iyakuDetail/ResultDataSetPDF/" + p2 + "_" + p3 + "_"; } if(j != p1){ v2 = v1 + " "; checkOldVer(p2, p3, v1, service, "OLD"); lnkStrPDF = "/" + service + "/iyakuDetail/ResultDataSetOldPDF/" + p2 + "_" + p3 + "_"; } //2018-08-15 mod 改修No3 新記載要領に対応した添付文書のバージョン比較機能 Start // if(chk_pdf == "1" && chk_xml == "1"){ //// temp_msg += "<tr><td>Ver." + j + "&nbsp;&nbsp;<a href=\"" + lnkStrPDF + v1 + "\" target='_blank'>PDF</a> / <a href='javascript:void(0)' onclick='detailDisp(\"" + service + "\", \"" + lnkStrHTML + v1 + "\");' " + " target='_blank'>HTML</a></td></tr>\n"; // temp_msg += "<tr><td>Ver." + v2 + "&nbsp;&nbsp;<a href='javascript:void(0);' onclick='javascript:detailDispPDF(\"" + lnkStrPDF + v1 + "\"); return false;'" + ">PDF</a> / <a href='javascript:void(0);' onclick='javascript:detailDisp(\"" + service + "\", \"" + lnkStrHTML + v1 + "\"); return false;' " + ">HTML</a></td></tr>\n"; // oldCnt++; // } else if(chk_pdf == "1" && chk_xml == "0"){ //// temp_msg += "<tr><td>Ver." + j + "&nbsp;&nbsp;<a href=\"" + lnkStrPDF + v1 + "\" target='_blank'>PDF</a> / HTML</td></tr>\n"; // temp_msg += "<tr><td>Ver." + v2 + "&nbsp;&nbsp;<a href='javascript:void(0);' onclick='javascript:detailDispPDF(\"" + lnkStrPDF + v1 + "\");'" + ">PDF</a> / HTML</td></tr>\n"; // oldCnt++; // } else if(chk_pdf == "0" && chk_xml == "1") { // temp_msg += "<tr><td>Ver." + v2 + "&nbsp;&nbsp;PDF&nbsp;/&nbsp;<a href='javascript:void(0);' onclick='javascript:detailDisp(\"" + service + "\", \"" + lnkStrHTML + v1 + "\");' " + ">HTML</a></td></tr>\n"; // oldCnt++; // } else { // temp_msg += "<tr><td>Ver." + v2 + "&nbsp;&nbsp;PDF&nbsp;/&nbsp;HTML</td></tr>\n"; // oldCnt++; // } if(chk_yoshiki != "noTbook") { genyoshiki = chk_yoshiki; } if(genyoshiki == "SGML"){ if( chk_pdf == "1" && chk_xml == "1" ){ OLDVer +="<tr><td>Ver." + v2 + "&nbsp;&nbsp;<a href='javascript:void(0);' onclick='javascript:detailDispPDF(\"" + lnkStrPDF + v1 + "\"); return false;'" + ">PDF</a> / <a href='javascript:void(0);' onclick='javascript:detailDisp(\"" + service + "\", \"" + lnkStrHTML + v1 + "\"); return false;' " + ">HTML</a></td></tr>\n"; } else if( chk_pdf == "1" && chk_xml == "0" ){ OLDVer += "<tr><td>Ver." + v2 + "&nbsp;&nbsp;<a href='javascript:void(0);' onclick='javascript:detailDispPDF(\"" + lnkStrPDF + v1 + "\");'" + ">PDF</a> / HTML</td></tr>\n"; oldCnt++; } else if( chk_pdf == "0" && chk_xml == "1" ) { OLDVer += "<tr><td>Ver." + v2 + "&nbsp;&nbsp;PDF&nbsp;/&nbsp;<a href='javascript:void(0);' onclick='javascript:detailDisp(\"" + service + "\", \"" + lnkStrHTML + v1 + "\");' " + ">HTML</a></td></tr>\n"; } else { OLDVer += "<tr><td>Ver." + v2 + "&nbsp;&nbsp;PDF&nbsp;/&nbsp;HTML</td></tr>\n"; } oldCnt++; } if(genyoshiki == "XML"){ if( chk_pdf == "1" && chk_xml == "1" ){ NewVer +="<tr><td>Ver." + v2 + "&nbsp;&nbsp;<a href='javascript:void(0);' onclick='javascript:detailDispPDF(\"" + lnkStrPDF + v1 + "\"); return false;'" + ">PDF</a> / <a href='javascript:void(0);' onclick='javascript:detailDisp(\"" + service + "\", \"" + lnkStrHTML + v1 + "\"); return false;' " + ">HTML</a></td></tr>\n"; } else if( chk_pdf == "1" && chk_xml == "0" ){ NewVer += "<tr><td>Ver." + v2 + "&nbsp;&nbsp;<a href='javascript:void(0);' onclick='javascript:detailDispPDF(\"" + lnkStrPDF + v1 + "\");'" + ">PDF</a> / HTML</td></tr>\n"; } else if( chk_pdf == "0" && chk_xml == "1" ) { NewVer += "<tr><td>Ver." + v2 + "&nbsp;&nbsp;PDF&nbsp;/&nbsp;<a href='javascript:void(0);' onclick='javascript:detailDisp(\"" + service + "\", \"" + lnkStrHTML + v1 + "\");' " + ">HTML</a></td></tr>\n"; } else { NewVer += "<tr><td>Ver." + v2 + "&nbsp;&nbsp;PDF&nbsp;/&nbsp;HTML</td></tr>\n"; } oldCnt++; } //2018-08-15 mod 改修No3 新記載要領に対応した添付文書のバージョン比較機能 End chk_pdf = "0"; chk_xml = "0"; //2018-08-15 add 改修No3 新記載要領に対応した添付文書のバージョン比較機能 Start chk_yoshiki = ""; //2018-08-15 add 改修No3 新記載要領に対応した添付文書のバージョン比較機能 End } //2018-08-15 mod 改修No3 新記載要領に対応した添付文書のバージョン比較機能 Start var msg = "<div style=\"background-color: #d0f0f0; padding: 0px; border-style: solid; border-width: 1px; border-color: #404040;\">\n"; tableHdr +="<div>\n"; tableHdr +="<div class=\"divCol\" style=\"width: 12em; padding-top: 1em;\">\n"; tableHdr +="<table style=\"width: 100%;\">\n"; tableHdr +="<thead>\n"; tableHdr +="<tr><th style=\"border: 0;\">旧様式</th></tr>\n"; tableHdr +="</thead>\n"; tableHdr +="</table>\n"; tableHdr +="</div>\n"; tableHdr +="<div class=\"divCol\" style=\"width: 12em;\">\n"; tableHdr +="<table style=\"width: 100%;\">\n"; tableHdr +="<thead>\n"; tableHdr +="<tr><th style=\"border: 0;\">新様式</th></tr>\n"; tableHdr +="</thead>\n"; tableHdr +="</table>\n"; tableHdr +="</div>\n"; tableHdr +="</div>\n"; tableOLD +="<div style=\"height: 183px;overflow-y: scroll;border-top: 1px solid black;border-bottom: 1px solid black;\">\n"; tableOLD +="<div class=\"divCol\" style=\"height: 11.44em;border-right: 1px solid black; width: 12em;\">\n"; tableOLD +="<table>\n"; tableOLD +="<tbody>\n"; tableOLD += OLDVer; tableOLD +="</tbody>\n"; tableOLD +="</table>\n"; tableOLD +="</div>\n"; tableNew +="<div class=\"divCol\" style=\"height: 11.44em; width: 12em;\">\n"; tableNew +="<table>\n"; tableNew +="<tbody>\n"; tableNew += NewVer; tableNew +="</tbody>\n"; tableNew +="</table>\n"; tableNew +="</div>\n"; tableNew +="</div>\n"; temp_msg = tableHdr + tableOLD + tableNew ; temp_msg +="<div style=\"padding: 8px;\">\n"; temp_msg +="<input type=\"button\" onclick=\"popOldVersionClose();\" value=\"閉じる\">\n"; temp_msg +="</div>\n"; //2018-08-15 add 改修No3 新記載要領に対応した添付文書のバージョン比較機能 End if(temp_msg != ""){ msg += temp_msg; } //2018-08-15 mod 改修No3 新記載要領に対応した添付文書のバージョン比較機能 Start // msg += "<tr><td align=\"center\"><input type=\"button\" onclick=\"popOldVersionClose();\" value=\"閉じる\"></td></tr>\n"; // msg += "</table>"; //2018-08-15 mod 改修No3 新記載要領に対応した添付文書のバージョン比較機能 End msg += "</div >"; var userAgent = window.navigator.userAgent.toLowerCase(); var uag = "0"; if (userAgent.indexOf('opera') != -1) { uag = "1"; } else if (userAgent.indexOf('msie') != -1) { uag = "1"; } else if (userAgent.indexOf('chrome') != -1) { uag = "2"; } else if (userAgent.indexOf('safari') != -1) { uag = "2"; } else if (userAgent.indexOf('firefox') != -1) { uag = "2"; } else if (userAgent.indexOf('gecko') != -1) { uag = "1"; } else { alert("other"); } var popTarget = document.getElementById("popDiv2").style; var o1 = getMousePosition(event); tblLnkObj_y = o1.sy; if(uag == "1"){ o1.sy = event.clientY; } if(popDiv2.innerHTML != ""){ popOldVersionClose(); } if(temp_msg != ""){ popTarget.left = (o1.sx) + "px"; //2018-11-08 mod 改修No3 バージョン比較ダイアログの上部表示位置 Start // if((oldCnt - 1) == 0){ // popTarget.top = (o1.sy - 30) + "px"; // } else { popTarget.top = (o1.sy - 27 - (18 * 10)) + "px"; // } //2018-11-08 mod 改修No3 バージョン比較ダイアログの上部表示位置 End popDiv2.innerHTML = msg; } } //過去版ポップアップのクローズ function popOldVersionClose() { popDiv2.innerHTML = ""; } //過去版ファイルの存在を確認する function checkOldVer(code, bkno, ver, service, cflg){ var url = "/" + service + "/iyakuDetail/FileExsist/" + code + "_" + bkno + "_" + ver + "_" + cflg; $.ajax({ url: url, type: 'GET', async:false, dataType: 'json', cache: false, //ブラウザにキャッシュさせません。 error: function(err){ alert("jsonの読み込みに失敗しました"); }, success: function(json){ //alert("jsonの読み込みが完了しました "); chk_pdf = json.pdfExsist; chk_xml = json.xmlExsist; //2018-08-15 add 改修No3 新記載要領に対応した添付文書のバージョン比較機能 Start chk_yoshiki = json.yoshikiKbn; //2018-08-15 add 改修No3 新記載要領に対応した添付文書のバージョン比較機能 End } }); } //表示項目選択ポップアップの表示 function displaySelect(event) { popOldVersionClose(); var msg = "<div style=\"background-color: #d0f0f0; padding: 15px; border-style: solid; border-width: 1px; border-color: #404040;\">\n"; msg += "<div class=\"popScrollInr\"><table>\n"; for(var j = 0; j < resultTableColArr.length; j++) { var v1 = ("000" + j).slice(-3); var checkStr = (resultTableColArr[j][0] == "1") ? " checked=\"checked\"" : ""; msg += "<tr><td><input type=\"checkbox\" id=\"dispCtrl" + v1 + "\"" + checkStr + ">" + resultTableColArr[j][1] + "</td></tr>\n"; } msg += "</table></div>"; msg += "<input onclick=\"JavaScript:popClose();\" type=\"button\" value=\"閉じる\">&nbsp;&nbsp;&nbsp;"; msg += "<input onclick=\"JavaScript:dispCtrlCheck(1);\" type=\"button\" value=\"全チェック\">&nbsp;&nbsp;&nbsp;"; msg += "<input onclick=\"JavaScript:dispCtrlCheck(0);\" type=\"button\" value=\"全クリア\">"; msg += "</div >"; var o1 = getMousePosition(event); chnBtnObj_y = o1.y; var popObj = document.getElementById("popDiv"); var popTarget = popObj.style; popTarget.left = "5px"; popTarget.top = "5px"; popObj.innerHTML = msg; } //表示項目選択ポップアップの全選択・全解除の制御 function dispCtrlCheck(p1) { // mod 2.00: 検索結果出力対応により、チェックボックスの指定方法を変更 // for(var j = 0; j<resultTableColArr.length; j++) { // var v1 = "dispCtrl" + ("000" + j).slice(-3); // var obj1 = document.getElementById(v1); // obj1.checked = (p1 == 1); // } $('#popDiv input[type="checkbox"]').prop('checked', p1 == 1).change(); } //add 2.00: くすりのしおり マウスオーバーで全文表示対応 //ツールチップ表示 function tooltip(event, str) { if (!str) { return false; } popOldVersionClose(); var userAgent = window.navigator.userAgent.toLowerCase(); var uag = "0"; if (userAgent.indexOf('opera') != -1) { uag = "1"; } else if (userAgent.indexOf('msie') != -1) { uag = "1"; } else if (userAgent.indexOf('chrome') != -1) { uag = "2"; } else if (userAgent.indexOf('safari') != -1) { uag = "2"; } else if (userAgent.indexOf('firefox') != -1) { uag = "2"; } else if (userAgent.indexOf('gecko') != -1) { uag = "1"; } else { alert("other"); } // 過去版ポップアップの領域を流用 var popTarget = document.getElementById("popDiv2").style; var o1 = getMousePosition(event); if(uag == "1") { o1.sy = event.clientY; } popDiv2.innerHTML = "<div style=\"background-color: #d0f0f0; padding: 15px; border-style: solid; border-width: 1px; border-color: #404040;\">\n" + str + "</div>"; popTarget.left = (o1.x - popDiv2.clientWidth - 5) + "px"; popTarget.top = (o1.y - popDiv2.clientHeight - 5) + "px"; } //ツールチップのクローズ function tooltipClose() { // 過去版ポップアップの領域を流用しているため、過去版ポップアップのクローズ処理を実行 popOldVersionClose(); } //表示項目選択ポップアップのクローズ(選択項目で再表示を行う) function popClose() { // チェックされた値で配列を書き換え、パラメータを作成 var clmAry = []; for(var j = 0; j<resultTableColArr.length; j++) { var v1 = "dispCtrl" + ("000" + j).slice(-3); var obj1 = document.getElementById(v1); resultTableColArr[j][0] = (obj1.checked) ? "1" : "0"; if (obj1.checked) { clmAry.push(j); } } popDiv.innerHTML = ""; if(clmAry == null || clmAry.length == 0){ clmAry.push(-1); } colDisp(clmAry); } // 列の表示非表示を制御する function colDisp(cAry){ $.ajax({ url: '/PmdaSearch/iyakuSearch/CulumChangeRequest/'+cAry, // mod 2.01: POSTに変更 // type: 'GET', type: 'POST', // add 2.01: Form情報を送信 data: $('form').serialize(), dataType: 'json', cache: false, //ブラウザにキャッシュさせません。 error: function(err){ alert("jsonの読み込みに失敗しました"); }, success: function(json){ //alert("jsonの読み込みが完了しました"); // mod 2.00: ページリンクをページ上部だけでなくページ下部にも追加 // $("#PageNavi").html(json.PageNavi).html() $(".PageNavi").each(function(i) { $(this).html(json.PageNavi).html(); }); $("#ResultList").html(json.ResultList).html(); // add 2.01: 表示する文書を更新 document.getElementById("changeColumnsList").value = cAry; for (var j = 0; j < resultTableColArr.length; j++) { document.getElementById("dispColumns" + j).value = ""; } for (var k = 0; k < cAry.length; k++) { document.getElementById("dispColumns" + cAry[k]).value = cAry[k]; } } }); } // add 2.00: 検索結果画面で表示件数変更対応 // 表示件数を変更する function listRowsChange(listRows){ $.ajax({ url: '/PmdaSearch/iyakuSearch/listRowsChangeRequest/' + listRows, // mod 2.01: POSTに変更 // type: 'GET', type: 'POST', // add 2.01: Form情報を送信 data: $('form').serialize(), dataType: 'json', cache: false, //ブラウザにキャッシュさせません。 error: function(err){ alert("jsonの読み込みに失敗しました"); }, success: function(json){ //alert("jsonの読み込みが完了しました"); // mod 2.00: ページリンクをページ上部だけでなくページ下部にも追加 // $("#PageNavi").html(json.PageNavi).html() $(".PageNavi").each(function(i) { $(this).html(json.PageNavi).html(); }); $("#ResultList").html(json.ResultList).html(); // add 2.01: ページ情報の初期化及び表示件数の更新 document.getElementById("pages").value = 1; document.getElementById("listRows").value = listRows; } }); } var dWin = null; //詳細(HTML)ページを別ウィンドウで表示する function detailDisp(service, fname){ var url = "/" + service + "/iyakuDetail/" + fname; popOldVersionClose(); // if(dWin != null) dWin.close(); dWin = window.open(url, ""); // dWin = window.open(url, "_blank"); dWin.active(); } //添付文書(PDF)ページを別ウィンドウで表示する function detailDispPDF(linkStr){ var url = linkStr; popOldVersionClose(); // if(dWin != null) dWin.close(); dWin = window.open(url, ""); // dWin = window.open(url, "_blank"); dWin.active(); } // 検索種別を Action より取得 var listCategory = 'BOOK'; // add 2.00: 検索結果出力処理追加 /** * 出力項目選択ポップアップの表示 * * @param exportType 出力形式 */ function exportSelect(event, exportType) { if (!exportType) { alert('出力形式が指定されていません。'); return false; } popOldVersionClose(); // ポップアップ生成 var msg = "<div style=\"background-color: #d0f0f0; padding: 15px; border-style: solid; border-width: 1px; border-color: #404040;\">\n"; msg += "<p class=\"mb_10\">" + "PDF出力する項目を選択してください。" + "</p>\n"; msg += "<p class=\"mb_10\" id=\"exportWarning\" style=\"color: #FF0000; font-weight: bold; text-decoration: underline; height: 1em;\">WARNING</p>" msg += "<div class=\"popScrollInr\"><table>\n"; var wkResultTableColArr = (listCategory === 'BOOK') ? resultTableDefaultDispColArr[listCategory].concat(resultTableColArr) : resultTableDefaultDispColArr[listCategory]; var checkCnt = 0; for(var j = 0; j < wkResultTableColArr.length; j++) { var checkStr = ""; if (wkResultTableColArr[j][0] == "1") { checkStr = " checked=\"checked\""; checkCnt++; } msg += "<tr><td><input type=\"checkbox\" name=\"exportCtrl[" + j + "]\"" + checkStr + ">" + wkResultTableColArr[j][1] + "</td></tr>\n"; } var exportWarning = document.getElementById('exportWarning'); var disabledStr = ""; if (checkCnt > 6) { msg = msg.replace("WARNING", "※選択項目は6項目以内としてください。"); disabledStr = " disabled=\"disabled\""; } msg = msg.replace("WARNING", ""); msg += "</table></div>"; msg += "<input onclick=\"JavaScript:document.getElementById('popDiv').innerHTML='';\" type=\"button\" value=\"閉じる\">&nbsp;&nbsp;&nbsp;"; msg += "<input onclick=\"JavaScript:dispCtrlCheck(0);\" type=\"button\" value=\"全クリア\">&nbsp;&nbsp;&nbsp;"; msg += "<input name=\"export\" type=\"button\" value=\"出力する\" " + disabledStr + ">"; msg += "</div >"; var o1 = getMousePosition(event); chnBtnObj_y = o1.y; // ポップアップ var popObj = document.getElementById('popDiv'); var popTarget = popObj.style; popObj.innerHTML = msg; // 画面中央に出す // innerWidth(Heigth)は IE 8 非対応 var pageWidth = window.innerWidth ? window.innerWidth : $(window).width(); var pageHeight = window.innerHeight ? window.innerHeight : $(window).height(); popTarget.left = (pageWidth / 2 - popObj.offsetWidth / 2) + 'px'; popTarget.top = (pageHeight / 2 - popObj.offsetHeight / 2) + 'px'; // チェックボックスのイベント $('input[name^="exportCtrl"]').on('change', function() { var checkCnt = $('input[name^="exportCtrl"]:checked').length; // 7項目以上、1項目未満のチェックで出力させない var exportInvalidFlg = checkCnt > 6 || checkCnt < 1; // エラー文言の表示制御 var $exportWarning = $('#exportWarning'); $exportWarning.text(exportInvalidFlg ? checkCnt > 6 ? '※選択項目は6項目以内としてください。' : '※項目が選択されていません。' : ''); // 出力ボタンの実行制御 $('input[name="export"]').prop('disabled', exportInvalidFlg); }); // 出力ボタンのイベント $('input[name="export"]').on('click', function() { exportSearchResult(exportType); }); return false; } /** * 検索結果出力 * * @param exportType 出力形式 */ function exportSearchResult(exportType) { var exportCols = []; if (exportType === 'csv') { // CSV は表示されている項目を全件出力 // (関連文書検索時はすべて出力するため、検索結果出力列は空のまま) var wkResultTableColArr = (listCategory === 'BOOK') ? resultTableDefaultDispColArr[listCategory].concat(resultTableColArr) : resultTableDefaultDispColArr[listCategory]; $.each(wkResultTableColArr, function(i, v) { if (v[0] == '1') { exportCols.push(i); } }); } else { // PDF はポップアップで選択されている項目を表示件数分出力 $('input[name^="exportCtrl"]').each(function(i, v) { if ($(this).prop('checked')) { exportCols.push(i); } }); // 選択ポップアップを閉じる document.getElementById('popDiv').innerHTML=''; } // XXX: $.ajax 等ではブラウザによってバイナリファイルを扱う仕組みがない場合があるため、仮想の form にて POST する // mod 2.01: 仮想の form にForm情報を追加 // var $tmpForm = $('<form></form>', { // action: '/PmdaSearch/iyakuSearch/exportSearchResult/' + exportType, // method: 'POST', // target: (exportType === 'csv') ? '_self' : '_blank', // style: 'display: none;'}) // .append($('<input>', {type: 'text', name: 'searchNameTitle', value: $('#SearchHd strong').text()})) // .append($('<input>', {type: 'text', name: 'leftSearchName', value: $('#bookSearchTitle').text()})) // .append($('<input>', {type: 'text', name: 'leftSearchCondition', value: $('#bookSearchCond').text().replace(/\s*\n\s*/g, '')})) // .append($('<input>', {type: 'text', name: 'rightSearchName', value: $('#rdSearchTitle').text()})) // .append($('<input>', {type: 'text', name: 'logicalOperators', value: $('#howtoRdSearchSel').text()})) // .append($('<input>', {type: 'text', name: 'rightSearchCondition', value: $('#rdSearchCond').text().replace(/\s*\n\s*/g, '')})) // .append($('<input>', {type: 'text', name: 'exportCols', value: exportCols.join(',')})) // .appendTo('body').submit().remove(); // ; var $tmpForm = $('<form></form>', {action: '/PmdaSearch/iyakuSearch/exportSearchResult/' + exportType, method: 'POST', target: (exportType === 'csv') ? '_self' : '_blank', style: 'display: none;'}); $tmpForm.append($('<input>', {type: 'text', name: 'searchNameTitle', value: $('#SearchHd strong').text()})); $tmpForm.append($('<input>', {type: 'text', name: 'leftSearchName', value: $('#bookSearchTitle').text()})); $tmpForm.append($('<input>', {type: 'text', name: 'leftSearchCondition', value: $('#bookSearchCond').text().replace(/\s*\n\s*/g, '')})); $tmpForm.append($('<input>', {type: 'text', name: 'rightSearchName', value: $('#rdSearchTitle').text()})); $tmpForm.append($('<input>', {type: 'text', name: 'logicalOperators', value: $('#howtoRdSearchSel')[0].value})); $tmpForm.append($('<input>', {type: 'text', name: 'rightSearchCondition', value: $('#rdSearchCond').text().replace(/\s*\n\s*/g, '')})); $tmpForm.append($('<input>', {type: 'text', name: 'exportCols', value: exportCols.join(',')})); $tmpForm.append($('<input>', {type: 'hidden', name: 'nameWord', value: $('#nameWord')[0].value})); $tmpForm.append($('<input>', {type: 'hidden', name: 'iyakuHowtoNameSearchRadioValue', value: $('#iyakuHowtoNameSearchRadioValue')[0].value})); $tmpForm.append($('<input>', {type: 'hidden', name: 'howtoMatchRadioValue', value: $('#howtoMatchRadioValue')[0].value})); $tmpForm.append($('<input>', {type: 'hidden', name: 'effectValue', value: $('#effectValue')[0].value})); $tmpForm.append($('<input>', {type: 'hidden', name: 'infoindicationsorefficacy', value: $('#infoindicationsorefficacy')[0].value})); $tmpForm.append($('<input>', {type: 'hidden', name: 'infoindicationsorefficacyHowtoSearch', value: $('#infoindicationsorefficacyHowtoSearch')[0].value})); $tmpForm.append($('<input>', {type: 'hidden', name: 'warnings', value: $('#warnings')[0].value})); $tmpForm.append($('<input>', {type: 'hidden', name: 'warningsHowtoSearch', value: $('#warningsHowtoSearch')[0].value})); $tmpForm.append($('<input>', {type: 'hidden', name: 'contraindicationsAvoidedadministration', value: $('#contraindicationsAvoidedadministration')[0].value})); $tmpForm.append($('<input>', {type: 'hidden', name: 'contraindicationsAvoidedadministrationHowtoSearch', value: $('#contraindicationsAvoidedadministrationHowtoSearch')[0].value})); $tmpForm.append($('<input>', {type: 'hidden', name: 'contraindicatedcombinationPrecautionsforcombination', value: $('#contraindicatedcombinationPrecautionsforcombination')[0].value})); $tmpForm.append($('<input>', {type: 'hidden', name: 'contraindicatedcombinationPrecautionsforcombinationHowtoSearch', value: $('#contraindicatedcombinationPrecautionsforcombinationHowtoSearch')[0].value})); for(var j = 0; j<resultTableColArr.length; j++){ $tmpForm.append($('<input>', {type: 'hidden', name: 'dispColumnsList[' + j + ']', value: $('#dispColumns' + j)[0].value})); } $tmpForm.append($('<input>', {type: 'hidden', name: 'changeColumnsList', value: $('#changeColumnsList')[0].value})); $tmpForm.append($('<input>', {type: 'hidden', name: 'updateDocFrDt', value: $('#updateDocFrDt')[0].value})); $tmpForm.append($('<input>', {type: 'hidden', name: 'updateDocToDt', value: $('#updateDocToDt')[0].value})); $tmpForm.append($('<input>', {type: 'hidden', name: 'tglOpFlg', value: $('#tglOpFlg')[0].value})); $tmpForm.append($('<input>', {type: 'hidden', name: 'compNameWord', value: $('#compNameWord')[0].value})); $tmpForm.append($('<input>', {type: 'hidden', name: 'koumoku1Value', value: $('#koumoku1Value')[0].value})); $tmpForm.append($('<input>', {type: 'hidden', name: 'koumoku2Value', value: $('#koumoku2Value')[0].value})); $tmpForm.append($('<input>', {type: 'hidden', name: 'koumoku3Value', value: $('#koumoku3Value')[0].value})); $tmpForm.append($('<input>', {type: 'hidden', name: 'koumoku1Word', value: $('#koumoku1Word')[0].value})); $tmpForm.append($('<input>', {type: 'hidden', name: 'koumoku2Word', value: $('#koumoku2Word')[0].value})); $tmpForm.append($('<input>', {type: 'hidden', name: 'koumoku3Word', value: $('#koumoku3Word')[0].value})); $tmpForm.append($('<input>', {type: 'hidden', name: 'koumoku1HowtoSearch', value: $('#koumoku1HowtoSearch')[0].value})); $tmpForm.append($('<input>', {type: 'hidden', name: 'koumoku2HowtoSearch', value: $('#koumoku2HowtoSearch')[0].value})); $tmpForm.append($('<input>', {type: 'hidden', name: 'koumoku3HowtoSearch', value: $('#koumoku3HowtoSearch')[0].value})); $tmpForm.append($('<input>', {type: 'hidden', name: 'howtoRdSearchSel', value: $('#howtoRdSearchSel')[0].value})); $tmpForm.append($('<input>', {type: 'hidden', name: 'relationDoc1Sel', value: $('#relationDoc1Sel')[0].value})); $tmpForm.append($('<input>', {type: 'hidden', name: 'relationDoc2Sel', value: $('#relationDoc2Sel')[0].value})); $tmpForm.append($('<input>', {type: 'hidden', name: 'relationDoc3Sel', value: $('#relationDoc3Sel')[0].value})); $tmpForm.append($('<input>', {type: 'hidden', name: 'relationDoc1check1', value: $('#relationDoc1check1')[0].value})); $tmpForm.append($('<input>', {type: 'hidden', name: 'relationDoc1check2', value: $('#relationDoc1check2')[0].value})); $tmpForm.append($('<input>', {type: 'hidden', name: 'relationDoc2check1', value: $('#relationDoc2check1')[0].value})); $tmpForm.append($('<input>', {type: 'hidden', name: 'relationDoc2check2', value: $('#relationDoc2check2')[0].value})); $tmpForm.append($('<input>', {type: 'hidden', name: 'relationDoc3check1', value: $('#relationDoc3check1')[0].value})); $tmpForm.append($('<input>', {type: 'hidden', name: 'relationDoc3check2', value: $('#relationDoc3check2')[0].value})); $tmpForm.append($('<input>', {type: 'hidden', name: 'relationDoc1Word', value: $('#relationDoc1Word')[0].value})); $tmpForm.append($('<input>', {type: 'hidden', name: 'relationDoc2Word', value: $('#relationDoc2Word')[0].value})); $tmpForm.append($('<input>', {type: 'hidden', name: 'relationDoc3Word', value: $('#relationDoc3Word')[0].value})); $tmpForm.append($('<input>', {type: 'hidden', name: 'relationDoc1HowtoSearch', value: $('#relationDoc1HowtoSearch')[0].value})); $tmpForm.append($('<input>', {type: 'hidden', name: 'relationDoc2HowtoSearch', value: $('#relationDoc2HowtoSearch')[0].value})); $tmpForm.append($('<input>', {type: 'hidden', name: 'relationDoc3HowtoSearch', value: $('#relationDoc3HowtoSearch')[0].value})); $tmpForm.append($('<input>', {type: 'hidden', name: 'relationDoc1FrDt', value: $('#relationDoc1FrDt')[0].value})); $tmpForm.append($('<input>', {type: 'hidden', name: 'relationDoc1ToDt', value: $('#relationDoc1ToDt')[0].value})); $tmpForm.append($('<input>', {type: 'hidden', name: 'relationDoc2FrDt', value: $('#relationDoc2FrDt')[0].value})); $tmpForm.append($('<input>', {type: 'hidden', name: 'relationDoc2ToDt', value: $('#relationDoc2ToDt')[0].value})); $tmpForm.append($('<input>', {type: 'hidden', name: 'relationDoc3FrDt', value: $('#relationDoc3FrDt')[0].value})); $tmpForm.append($('<input>', {type: 'hidden', name: 'relationDoc3ToDt', value: $('#relationDoc3ToDt')[0].value})); $tmpForm.append($('<input>', {type: 'hidden', name: 'relationDocHowtoSearchBetween12', value: $('#relationDocHowtoSearchBetween12')[0].value})); $tmpForm.append($('<input>', {type: 'hidden', name: 'relationDocHowtoSearchBetween23', value: $('#relationDocHowtoSearchBetween23')[0].value})); $tmpForm.append($('<input>', {type: 'hidden', name: 'ListRows', value: $('#listRows')[0].value})); $tmpForm.append($('<input>', {type: 'hidden', name: 'searchCnt', value: $('#searchCnt')[0].value})); $tmpForm.append($('<input>', {type: 'hidden', name: 'totalPages', value: $('#totalPages')[0].value})); $tmpForm.append($('<input>', {type: 'hidden', name: 'pages', value: $('#pages')[0].value})); $tmpForm.append($('<input>', {type: 'hidden', name: 'listCategory', value: $('#listCategory')[0].value})); $tmpForm.append($('<input>', {type: 'hidden', name: 'iyakuKoumokuSelectSwitchRadio', value: $('#iyakuKoumokuSelectSwitchRadio')[0].value})); $tmpForm.append($('<input>', {type: 'hidden', name: 'gs1code', value: $('#gs1code')[0].value})); $tmpForm.appendTo('body').submit().remove(); return false; } </script> <!-- ++++ /local-js ++++ --> <div id="ContentWrap" class="SearchResult"> <noscript><p id="NoScriptWarning">当ウェブサイトを快適にご覧いただくには、ブラウザのJavaScript設定を有効(オン)にしていただく必要がございます。</p></noscript> <div id="HeaderPopArea" class="HTML5_header"> <div id="HeaderPopAreaInner"> <a href="/" id="LogoArea" target="_blank"> <span>Pmda 独立行政法人 医薬品医療機器総合機構</span> </a><!--/LogoArea--> <div id="LinkArea01" class="clearfix"> <ul> <li class="mr_00"><a href="javascript:window.close()"><img class="imglink" src="/PmdaSearch/files/common/img/ComHeaderAreaBtnClose.png" alt="画面を閉じる" width="118" height="24"></a></li> </ul> </div><!--/LinkArea01--> <div id="LinkArea02"> <img class="float_l mr_10" src="/PmdaSearch/files/common/img/ComHeaderAreaTxtSizettl.png" alt="文字サイズの変更" width="29" height="22"> <span id="FontSizeSelect"><a href="javascript:void(0);" id="TextBtnNormal" class="mr_05 "><span>標準</span></a> <a href="javascript:void(0);" id="TextBtnL" class="mr_05"><span>大</span></a> <a href="javascript:void(0);" id="TextBtnLl"><span>特大</span></a></span> </div><!--/LinkArea02--> </div><!--/HeaderAreaInner--> </div><!--/HeaderArea--> <div id="ContentArea" class="HTML5_section"> <div id="MainContents" class="clearfix"> <div id="ContentMainArea" class="ComOneCulumn"> <div class="PopupArea"> <div class="PopupInner"> <h1 id="SearchHd"> <strong>医療用医薬品 情報検索</strong> <span><a target="searchhelp_iyaku" href="/searchhelp_009.pdf"><img class="imglink" src="/PmdaSearch/files/img/search/SearchBtn10.gif" alt="情報検索機能の使い方" height="36"></a></span> <span class="ExportBtnArea"> <p>検索結果の出力</p> <a href="javascript:void(0);" onclick="return exportSearchResult('csv');"><img class="imglink" src="/PmdaSearch/files/img/search/ExportBtn01.gif" alt="CSV出力" height="35"></a> <a href="javascript:void(0);" onclick="return exportSelect(event, 'pdf');" target="_blank"><img class="imglink" src="/PmdaSearch/files/img/search/ExportBtn02.gif" alt="PDF出力" height="35"></a> </span> </h1> <form name="iyakuSearchActionForm" method="POST" action="/PmdaSearch/iyakuSearch/"> <!-- add 2.00: 検索条件を表示 --> <div class="dispSearchCondArea"> <h2>検索条件</h2> <h3 id="bookSearchTitle">医薬品の添付文書等を調べる</h3> <span id="bookSearchCond"> 更新年月日: 20200622&nbsp;~&nbsp;20200622 &nbsp;/&nbsp; </span> </div><!-- /dispSearchCondArea --> <div onscroll='javascript:elmScrool(this); return false;'> <div id='SearchWrap02' class='clearfix'> <h2 class='SearchTit01'>検索結果</h2> <div class='SearchResultMenu mb_15 first'> <p class='col23 PageNavi'><strong>検索結果49件/全1ページ</strong><BR><BR> <span>1</span></p> <p class='col1'><input value='表示する文書を変更' type='image' src='/PmdaSearch/iyakuSearch/../files/img/search/SearchBtn08.gif' onClick='JavaScript:displaySelect(event); return false;'></p> <p> <strong>表示件数を選ぶ</strong><BR> <select name='ListRows' onchange='javascript:listRowsChange($(this).val());' class='SearchSlct'> <option value='10'>10件</option><option value='20'>20件</option><option value='30'>30件</option><option value='50'>50件</option><option value='100'>100件</option></select> </p> </div><!-- / #SearchResultMenu --> <!-- 検索結果表示領域 --> <table class='SearchResultTable' id='ResultList'> <tr> <th scope='col' style='width:15em' nowrap>一般名</th> <th scope='col' style='width:15em' nowrap>販売名</th> <th scope='col' style='width:15em' nowrap>製造販売業者等</th> <th scope='col' style='width:13em' nowrap>添付文書</th> <th scope='col' style='width:12em' nowrap>患者向医薬品ガイド/<BR>ワクチン接種を受ける人<BR>へのガイド</th> <th scope='col' style='width:12em' nowrap>インタビュー<BR>フォーム</th> </tr> <tr class='TrColor01'> <td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/GeneralList/2189018'>エゼチミブ</a></div></td><td><div>エゼチミブ錠10mg「日新」</div></td><td><div>製造販売元/日新製薬株式会社</div></td><td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/ResultDataSetPDF/530113_2189018F1183_1_01'>PDF(2020年06月22日)</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='javascript:void(0);' onclick='javascript:detailDisp("PmdaSearch", "530113_2189018F1183_1_01"); return false;'>HTML</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='/PmdaSearch/iyakuDetail/ResultDataSetSGM/530113_2189018F1183_1_01'>SGML</a></div></td><td></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/go/interview/1/530113_2189018F1183_1_001_1F.pdf'>エゼチミブ錠10mg「日新」</a></div></td></tr> <tr class='TrColor02'> <td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/GeneralList/2144002'>エナラプリルマレイン酸塩</a></div></td><td><div>エナラプリルマレイン酸塩錠2.5mg「サンド」/エナラプリルマレイン酸塩錠5mg「サンド」/エナラプリルマレイン酸塩錠10mg「サンド」</div></td><td><div>製造販売/サンド株式会社</div></td><td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/ResultDataSetPDF/270428_2144002F1407_1_01'>PDF(2020年06月22日)</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='javascript:void(0);' onclick='javascript:detailDisp("PmdaSearch", "270428_2144002F1407_1_01"); return false;'>HTML</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='/PmdaSearch/iyakuDetail/ResultDataSetSGM/270428_2144002F1407_1_01'>SGML</a></div></td><td></td><td></td></tr> <tr class='TrColor01'> <td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/GeneralList/1149034'>塩酸ペンタゾシン</a></div></td><td><div>ソセゴン錠25mg</div></td><td><div>製造販売元/丸石製薬株式会社</div><div>提携/SANOFI</div></td><td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/ResultDataSetPDF/730119_1149034F1026_2_03'>PDF(2020年06月22日)</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='javascript:void(0);' onclick='javascript:detailDisp("PmdaSearch", "730119_1149034F1026_2_03"); return false;'>HTML</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='/PmdaSearch/iyakuDetail/ResultDataSetSGM/730119_1149034F1026_2_03'>SGML</a></div></td><td></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/go/interview/2/730119_1149034F1026_2_002_1F.pdf'>ソセゴン錠25mg</a></div></td></tr> <tr class='TrColor02'> <td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/GeneralList/3999411'>オザグレルナトリウム</a></div></td><td><div>オザグレルNa点滴静注20mg「FY」/オザグレルNa点滴静注40mg「FY」/オザグレルNa点滴静注80mg「FY」</div></td><td><div>販売/武田薬品工業株式会社</div><div>発売元/武田テバファーマ株式会社</div><div>製造販売元/株式会社富士薬品</div></td><td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/ResultDataSetPDF/670242_3999411A1076_1_01'>PDF(2020年06月22日)</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='javascript:void(0);' onclick='javascript:detailDisp("PmdaSearch", "670242_3999411A1076_1_01"); return false;'>HTML</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='/PmdaSearch/iyakuDetail/ResultDataSetSGM/670242_3999411A1076_1_01'>SGML</a></div></td><td></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/go/interview/1/670242_3999411A1076_1_008_1F.pdf'>F1_オザグレルNa点滴静注20mg「FY」/オザグレルNa点滴静注40mg「FY」/オザグレルNa点滴静注80mg「FY」</a></div></td></tr> <tr class='TrColor01'> <td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/GeneralList/3999411'>オザグレルナトリウム</a></div></td><td><div>オザグレルNa点滴静注80mg/200mLバッグ「FY」</div></td><td><div>販売/武田薬品工業株式会社</div><div>発売元/武田テバファーマ株式会社</div><div>製造販売元/株式会社富士薬品</div></td><td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/ResultDataSetPDF/670242_3999411G5082_1_01'>PDF(2020年06月22日)</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='javascript:void(0);' onclick='javascript:detailDisp("PmdaSearch", "670242_3999411G5082_1_01"); return false;'>HTML</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='/PmdaSearch/iyakuDetail/ResultDataSetSGM/670242_3999411G5082_1_01'>SGML</a></div></td><td></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/go/interview/1/670242_3999411G5082_1_008_1F.pdf'>F1_オザグレルNa点滴静注80mg/200mLバッグ「FY」</a></div></td></tr> <tr class='TrColor02'> <td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/GeneralList/1319722'>オフロキサシン</a></div></td><td><div>オフロキサシン点眼液0.3%「わかもと」</div></td><td><div>販売元/わかもと製薬株式会社</div><div>製造販売元/株式会社 富士薬品</div></td><td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/ResultDataSetPDF/670242_1319722Q1295_1_01'>PDF(2020年06月22日)</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='javascript:void(0);' onclick='javascript:detailDisp("PmdaSearch", "670242_1319722Q1295_1_01"); return false;'>HTML</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='/PmdaSearch/iyakuDetail/ResultDataSetSGM/670242_1319722Q1295_1_01'>SGML</a></div></td><td></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/go/interview/1/670242_1319722Q1295_1_001_1F.pdf'>F1_オフロキサシン点眼液0.3%「わかもと」</a></div></td></tr> <tr class='TrColor01'> <td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/GeneralList/4490025'>オロパタジン塩酸塩</a></div></td><td><div>オロパタジン塩酸塩ドライシロップ1%「日本臓器」</div></td><td><div>製造販売元/日本臓器製薬株式会社</div></td><td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/ResultDataSetPDF/530288_4490025R1020_1_04'>PDF(2020年06月22日)</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='javascript:void(0);' onclick='javascript:detailDisp("PmdaSearch", "530288_4490025R1020_1_04"); return false;'>HTML</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='/PmdaSearch/iyakuDetail/ResultDataSetSGM/530288_4490025R1020_1_04'>SGML</a></div></td><td></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/go/interview/1/530288_4490025R1020_1_043_1F.pdf'>オロパタジン塩酸塩ドライシロップ1%「日本臓器」IF</a></div></td></tr> <tr class='TrColor02'> <td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/GeneralList/2413403'>下垂体性性腺刺激ホルモン</a></div></td><td><div>uFSH注用75単位「あすか」/uFSH注用150単位「あすか」</div></td><td><div>製造販売元/あすか製薬株式会社</div><div>販売/武田薬品工業株式会社</div></td><td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/ResultDataSetPDF/470007_2413403A1067_1_02'>PDF(2020年06月22日)</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='javascript:void(0);' onclick='javascript:detailDisp("PmdaSearch", "470007_2413403A1067_1_02"); return false;'>HTML</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='/PmdaSearch/iyakuDetail/ResultDataSetSGM/470007_2413403A1067_1_02'>SGML</a></div></td><td></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/go/interview/1/470007_2413403A1067_1_V03_1F.pdf'>F1_uFSH注用75単位「あすか」/uFSH注用150単位「あすか」</a></div></td></tr> <tr class='TrColor01'> <td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/GeneralList/2491001'>カリジノゲナーゼ</a></div></td><td><div>カリジノゲナーゼ錠50単位「三笠」</div></td><td><div>発売元/株式会社陽進堂</div><div>製造販売元/三笠製薬株式会社</div></td><td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/ResultDataSetPDF/750007_2491001F6257_1_01'>PDF(2020年06月22日)</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='javascript:void(0);' onclick='javascript:detailDisp("PmdaSearch", "750007_2491001F6257_1_01"); return false;'>HTML</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='/PmdaSearch/iyakuDetail/ResultDataSetSGM/750007_2491001F6257_1_01'>SGML</a></div></td><td></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/go/interview/1/750007_2491001F6257_1_1F.pdf'>カリジノゲナーゼ錠50単位「三笠」</a></div></td></tr> <tr class='TrColor02'> <td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/GeneralList/7290411'>ガドテル酸メグルミン</a></div></td><td><div>ガドテル酸メグルミン静注38%シリンジ10mL「GE」/ガドテル酸メグルミン静注38%シリンジ11mL「GE」/ガドテル酸メグルミン静注38%シリンジ13mL「GE」/ガドテル酸メグルミン静注38%シリンジ15mL「GE」/ガドテル酸メグルミン静注38%シリンジ20mL「GE」</div></td><td><div>製造販売元/GEヘルスケアファーマ株式会社</div></td><td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/ResultDataSetPDF/343048_7290411G1049_1_01'>PDF(2020年06月22日)</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='javascript:void(0);' onclick='javascript:detailDisp("PmdaSearch", "343048_7290411G1049_1_01"); return false;'>HTML</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='/PmdaSearch/iyakuDetail/ResultDataSetSGM/343048_7290411G1049_1_01'>SGML</a></div></td><td></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/go/interview/1/343048_7290411G1049_1_CLA_1F.pdf'>F1_ガドテル酸メグルミン静注38%シリンジ10mL「GE」/ガドテル酸メグルミン静注38%シリンジ11mL「GE」/ガドテル酸メグルミン静注38%シリンジ13mL「GE」/ガドテル酸メグルミン静注3</a></div></td></tr> <tr class='TrColor01'> <td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/GeneralList/4419008'>クレマスチンフマル酸塩</a></div></td><td><div>クレマスチンドライシロップ0.1%「あゆみ」</div></td><td><div>製造販売元/あゆみ製薬株式会社</div></td><td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/ResultDataSetPDF/172190_4419008R1128_1_01'>PDF(2020年06月22日)</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='javascript:void(0);' onclick='javascript:detailDisp("PmdaSearch", "172190_4419008R1128_1_01"); return false;'>HTML</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='/PmdaSearch/iyakuDetail/ResultDataSetSGM/172190_4419008R1128_1_01'>SGML</a></div></td><td></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/go/interview/1/172190_4419008R1128_1_20A_2F.pdf'>172190_4419008R1128_1_20A_1F.pdf</a></div></td></tr> <tr class='TrColor02'> <td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/GeneralList/2646713'>クロベタゾールプロピオン酸エステル</a></div></td><td><div>クロベタゾールプロピオン酸エステル軟膏0.05%「ラクール」/クロベタゾールプロピオン酸エステルクリーム0.05%「ラクール」</div></td><td><div>発売元/ラクール薬品販売株式会社</div><div>製造販売元/東光薬品工業株式会社</div></td><td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/ResultDataSetPDF/480114_2646713M1233_1_01'>PDF(2020年06月22日)</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='javascript:void(0);' onclick='javascript:detailDisp("PmdaSearch", "480114_2646713M1233_1_01"); return false;'>HTML</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='/PmdaSearch/iyakuDetail/ResultDataSetSGM/480114_2646713M1233_1_01'>SGML</a></div></td><td></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/go/interview/1/480114_2646713M1233_1_A01_1F.pdf'>**クロベタゾールプロピオン酸エステル軟膏0.05%「ラクール」/**クロベタゾールプロピオン酸エステルクリーム0.05%「ラクール」</a></div></td></tr> <tr class='TrColor01'> <td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/GeneralList/2646713'>クロベタゾールプロピオン酸エステル</a></div></td><td><div>クロベタゾールプロピオン酸エステルローション0.05%「ラクール」</div></td><td><div>発売元/ラクール薬品販売株式会社</div><div>製造販売元/東光薬品工業株式会社</div></td><td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/ResultDataSetPDF/480114_2646713Q1154_1_01'>PDF(2020年06月22日)</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='javascript:void(0);' onclick='javascript:detailDisp("PmdaSearch", "480114_2646713Q1154_1_01"); return false;'>HTML</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='/PmdaSearch/iyakuDetail/ResultDataSetSGM/480114_2646713Q1154_1_01'>SGML</a></div></td><td></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/go/interview/1/480114_2646713Q1154_1_A01_1F.pdf'>**クロベタゾールプロピオン酸エステルローション0.05%「ラクール」</a></div></td></tr> <tr class='TrColor02'> <td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/GeneralList/2391400'>グラニセトロン塩酸塩</a></div></td><td><div>グラニセトロン静注液1mg「アイロム」/グラニセトロン静注液3mg「アイロム」</div></td><td><div>製造販売元/共和クリティケア株式会社</div></td><td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/ResultDataSetPDF/270173_2391400A3075_1_10'>PDF(2020年06月22日)</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='javascript:void(0);' onclick='javascript:detailDisp("PmdaSearch", "270173_2391400A3075_1_10"); return false;'>HTML</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='/PmdaSearch/iyakuDetail/ResultDataSetSGM/270173_2391400A3075_1_10'>SGML</a></div></td><td></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/go/interview/1/270173_2391400A3075_1_004_1F.pdf'>F1_グラニセトロン静注液1mg「アイロム」/グラニセトロン静注液3mg「アイロム」</a></div></td></tr> <tr class='TrColor01'> <td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/GeneralList/2357701'>グリセリン</a></div></td><td><div>グリセリン浣腸液50%「ケンエー」 30mL/グリセリン浣腸液50%「ケンエー」 40mL/グリセリン浣腸液50%「ケンエー」 50mL/グリセリン浣腸液50%「ケンエー」 60mL/グリセリン浣腸液50%「ケンエー」 90mL/グリセリン浣腸液50%「ケンエー」 120mL/グリセリン浣腸液50%「ケンエー」 150mL/グリセリン浣腸液50%「ケンエー」 500mL</div></td><td><div>製造販売元/健栄製薬株式会社</div></td><td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/ResultDataSetPDF/260024_2357701K1121_1_01'>PDF(2020年06月22日)</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='javascript:void(0);' onclick='javascript:detailDisp("PmdaSearch", "260024_2357701K1121_1_01"); return false;'>HTML</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='/PmdaSearch/iyakuDetail/ResultDataSetSGM/260024_2357701K1121_1_01'>SGML</a></div></td><td></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/go/interview/1/260024_2357701K1121_1_001_1F.pdf'>F1_グリセリン浣腸液「ケンエー」</a></div></td></tr> <tr class='TrColor02'> <td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/GeneralList/1147700'>ジクロフェナクナトリウム</a></div></td><td><div>ジクロフェナクナトリウム坐剤12.5mg「ゼリア」/ジクロフェナクナトリウム坐剤25mg「ゼリア」/ジクロフェナクナトリウム坐剤50mg「ゼリア」</div></td><td><div>発売元/ゼリア新薬工業株式会社</div><div>製造販売元/京都薬品工業株式会社</div></td><td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/ResultDataSetPDF/230099_1147700J1219_1_02'>PDF(2020年06月22日)</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='javascript:void(0);' onclick='javascript:detailDisp("PmdaSearch", "230099_1147700J1219_1_02"); return false;'>HTML</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='/PmdaSearch/iyakuDetail/ResultDataSetSGM/230099_1147700J1219_1_02'>SGML</a></div></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/downfiles/ph/GUI/230099_1147700J1219_1_01G.pdf'>ジクロフェナクナトリウム坐剤12.5mg「ゼリア」/ジクロフェナクナトリウム坐剤25mg「ゼリア」/ジクロフェナクナトリウム坐剤50mg「ゼリア」</a></div></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/go/interview/1/230099_1147700J1219_1_2F.pdf'>ジクロフェナクナトリウム坐剤12.5mg「ゼリア」/ジクロフェナクナトリウム坐剤25mg「ゼリア」/ジクロフェナクナトリウム坐剤50mg「ゼリア」</a></div></td></tr> <tr class='TrColor01'> <td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/GeneralList/5200103'>猪苓湯エキス</a></div></td><td><div>三和猪苓湯エキス細粒</div></td><td><div>製造販売元/三和生薬株式会社</div></td><td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/ResultDataSetPDF/300303_5200103C1041_1_08'>PDF(2020年06月22日)</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='javascript:void(0);' onclick='javascript:detailDisp("PmdaSearch", "300303_5200103C1041_1_08"); return false;'>HTML</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='/PmdaSearch/iyakuDetail/ResultDataSetSGM/300303_5200103C1041_1_08'>SGML</a></div></td><td></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/go/interview/1/300303_5200103C1041_1_004_1F.pdf'>F1_三和猪苓湯エキス細粒</a></div></td></tr> <tr class='TrColor02'> <td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/GeneralList/2251001'>テオフィリン</a></div></td><td><div>テオフィリン徐放カプセル100mg「サンド」/テオフィリン徐放カプセル200mg「サンド」</div></td><td><div>製造販売/サンド株式会社</div></td><td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/ResultDataSetPDF/270428_2251001M1061_1_01'>PDF(2020年06月22日)</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='javascript:void(0);' onclick='javascript:detailDisp("PmdaSearch", "270428_2251001M1061_1_01"); return false;'>HTML</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='/PmdaSearch/iyakuDetail/ResultDataSetSGM/270428_2251001M1061_1_01'>SGML</a></div></td><td></td><td></td></tr> <tr class='TrColor01'> <td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/GeneralList/2251001'>テオフィリン</a></div></td><td><div>テオフィリン徐放カプセル50mg「サンド」</div></td><td><div>製造販売/サンド株式会社</div></td><td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/ResultDataSetPDF/270428_2251001M3030_1_01'>PDF(2020年06月22日)</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='javascript:void(0);' onclick='javascript:detailDisp("PmdaSearch", "270428_2251001M3030_1_01"); return false;'>HTML</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='/PmdaSearch/iyakuDetail/ResultDataSetSGM/270428_2251001M3030_1_01'>SGML</a></div></td><td></td><td></td></tr> <tr class='TrColor02'> <td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/GeneralList/1149038'>トラマドール塩酸塩</a></div></td><td><div>トラマールOD錠25mg/トラマールOD錠50mg</div></td><td><div>製造販売元/日本新薬株式会社</div><div>販売提携先/ファイザー株式会社</div><div>提携/Grünenthal GmbH</div></td><td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/ResultDataSetPDF/530263_1149038F1024_1_10'>PDF(2020年06月22日)</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='javascript:void(0);' onclick='javascript:detailDisp("PmdaSearch", "530263_1149038F1024_1_10"); return false;'>HTML</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='/PmdaSearch/iyakuDetail/ResultDataSetXML/530263_1149038F1024_1_10'>XML</a></div></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/downfiles/ph/GUI/530263_1149038F1024_1_00G.pdf'>G_トラマールOD錠25mg/トラマールOD錠50mg</a></div></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/go/interview/1/530263_1149038F1024_1_06F_1F.pdf'>F1_トラマールOD錠25mg/トラマールOD錠50mg</a></div></td></tr> <tr class='TrColor01'> <td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/GeneralList/1149038'>トラマドール塩酸塩</a></div></td><td><div>ワントラム錠100mg</div></td><td><div>製造販売元/日本新薬株式会社</div><div>販売提携先/ファイザー株式会社</div><div>提携/Endo Ventures Limited</div></td><td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/ResultDataSetPDF/530263_1149038G1020_1_11'>PDF(2020年06月22日)</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='javascript:void(0);' onclick='javascript:detailDisp("PmdaSearch", "530263_1149038G1020_1_11"); return false;'>HTML</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='/PmdaSearch/iyakuDetail/ResultDataSetXML/530263_1149038G1020_1_11'>XML</a></div></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/downfiles/ph/GUI/530263_1149038G1020_1_00G.pdf'>G_ワントラム錠100mg</a></div></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/go/interview/1/530263_1149038G1020_1_11F_1F.pdf'>F1_ワントラム錠100mg</a></div></td></tr> <tr class='TrColor02'> <td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/GeneralList/1149400'>トラマドール塩酸塩</a></div></td><td><div>トラマール注100</div></td><td><div>製造販売元/日本新薬株式会社</div><div>提携/Grünenthal GmbH</div></td><td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/ResultDataSetPDF/530263_1149400A1049_1_15'>PDF(2020年06月22日)</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='javascript:void(0);' onclick='javascript:detailDisp("PmdaSearch", "530263_1149400A1049_1_15"); return false;'>HTML</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='/PmdaSearch/iyakuDetail/ResultDataSetXML/530263_1149400A1049_1_15'>XML</a></div></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/downfiles/ph/GUI/530263_1149400A1049_1_00G.pdf'>G_トラマール注100</a></div></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/go/interview/1/530263_1149400A1049_1_11F_1F.pdf'>F1_トラマール注100</a></div></td></tr> <tr class='TrColor01'> <td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/GeneralList/2482009'>ノルエチステロン・エチニルエストラジオール</a></div></td><td><div>ルナベル配合錠LD/ルナベル配合錠ULD</div></td><td><div>製造販売元/ノーベルファーマ株式会社</div><div>販売元/富士製薬工業株式会社</div></td><td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/ResultDataSetPDF/620095_2482009F1031_2_14'>PDF(2020年06月22日)</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='javascript:void(0);' onclick='javascript:detailDisp("PmdaSearch", "620095_2482009F1031_2_14"); return false;'>HTML</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='/PmdaSearch/iyakuDetail/ResultDataSetXML/620095_2482009F1031_2_14'>XML</a></div></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/downfiles/ph/GUI/620095_2482009F1031_2_00G.pdf'>ルナベル配合錠 患者向医薬品ガイド</a></div></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/go/interview/2/620095_2482009F1031_2_F10_1F.pdf'>F1_ルナベル配合錠LD/ルナベル配合錠ULD</a></div></td></tr> <tr class='TrColor02'> <td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/GeneralList/2482009'>ノルエチステロン・エチニルエストラジオール</a></div></td><td><div>ルナベル配合錠LD/ルナベル配合錠ULD</div></td><td><div>製造販売元/ノーベルファーマ株式会社</div><div>販売/日本新薬株式会社</div></td><td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/ResultDataSetPDF/620095_2482009F1031_1_15'>PDF(2020年06月22日)</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='javascript:void(0);' onclick='javascript:detailDisp("PmdaSearch", "620095_2482009F1031_1_15"); return false;'>HTML</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='/PmdaSearch/iyakuDetail/ResultDataSetXML/620095_2482009F1031_1_15'>XML</a></div></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/downfiles/ph/GUI/620095_2482009F1031_1_00G.pdf'>ルナベル配合錠 患者向医薬品ガイド</a></div></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/go/interview/1/620095_2482009F1031_1_N09_1F.pdf'>F1_ルナベル配合錠LD/ルナベル配合錠ULD</a></div></td></tr> <tr class='TrColor01'> <td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/GeneralList/2482009'>ノルエチステロン・エチニルエストラジオール</a></div></td><td><div>フリウェル配合錠LD「あすか」/フリウェル配合錠ULD「あすか」</div></td><td><div>製造販売元/あすか製薬株式会社</div><div>販売/武田薬品工業株式会社</div></td><td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/ResultDataSetPDF/470007_2482009F1066_1_03'>PDF(2020年06月22日)</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='javascript:void(0);' onclick='javascript:detailDisp("PmdaSearch", "470007_2482009F1066_1_03"); return false;'>HTML</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='/PmdaSearch/iyakuDetail/ResultDataSetSGM/470007_2482009F1066_1_03'>SGML</a></div></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/downfiles/ph/GUI/470007_2482009F1066_1_00G.pdf'>G_フリウェル配合錠LD「あすか」/フリウェル配合錠ULD「あすか」</a></div></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/go/interview/1/470007_2482009F1066_1_V04_1F.pdf'>F1_フリウェル配合錠LD「あすか」/フリウェル配合錠ULD「あすか」</a></div></td></tr> <tr class='TrColor02'> <td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/GeneralList/2482009'>ノルエチステロン・エチニルエストラジオール</a></div></td><td><div>フリウェル配合錠LD「サワイ」/フリウェル配合錠ULD「サワイ」</div></td><td><div>製造販売元/沢井製薬株式会社</div></td><td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/ResultDataSetPDF/300119_2482009F1074_1_04'>PDF(2020年06月22日)</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='javascript:void(0);' onclick='javascript:detailDisp("PmdaSearch", "300119_2482009F1074_1_04"); return false;'>HTML</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='/PmdaSearch/iyakuDetail/ResultDataSetSGM/300119_2482009F1074_1_04'>SGML</a></div></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/downfiles/ph/GUI/300119_2482009F1074_1_00G.pdf'>G_フリウェル配合錠LD「サワイ」/フリウェル配合錠ULD「サワイ」</a></div></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/go/interview/1/300119_2482009F1074_1_021_1F.pdf'>F1_フリウェル配合錠LD「サワイ」/フリウェル配合錠ULD「サワイ」</a></div></td></tr> <tr class='TrColor01'> <td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/GeneralList/2482009'>ノルエチステロン・エチニルエストラジオール</a></div></td><td><div>フリウェル配合錠LD「トーワ」/フリウェル配合錠ULD「トーワ」</div></td><td><div>製造販売元/東和薬品株式会社</div></td><td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/ResultDataSetPDF/480235_2482009F1082_1_03'>PDF(2020年06月22日)</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='javascript:void(0);' onclick='javascript:detailDisp("PmdaSearch", "480235_2482009F1082_1_03"); return false;'>HTML</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='/PmdaSearch/iyakuDetail/ResultDataSetSGM/480235_2482009F1082_1_03'>SGML</a></div></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/downfiles/ph/GUI/480235_2482009F1082_1_00G.pdf'>G_フリウェル配合錠LD「トーワ」/フリウェル配合錠ULD「トーワ」</a></div></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/go/interview/1/480235_2482009F1082_1_031_1F.pdf'>F1_フリウェル配合錠LD「トーワ」/フリウェル配合錠ULD「トーワ」</a></div></td></tr> <tr class='TrColor02'> <td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/GeneralList/2482009'>ノルエチステロン・エチニルエストラジオール</a></div></td><td><div>フリウェル配合錠LD「モチダ」/フリウェル配合錠ULD「モチダ」</div></td><td><div>販売/持田製薬株式会社</div><div>製造販売元/持田製薬販売株式会社</div></td><td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/ResultDataSetPDF/790250_2482009F1058_1_11'>PDF(2020年06月22日)</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='javascript:void(0);' onclick='javascript:detailDisp("PmdaSearch", "790250_2482009F1058_1_11"); return false;'>HTML</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='/PmdaSearch/iyakuDetail/ResultDataSetSGM/790250_2482009F1058_1_11'>SGML</a></div></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/downfiles/ph/GUI/790250_2482009F1058_1_11G.pdf'>G_フリウェル配合錠LD「モチダ」/フリウェル配合錠ULD「モチダ」</a></div></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/go/interview/1/790250_2482009F1058_1_M04_1F.pdf'>F1_フリウェル配合錠LD「モチダ」/フリウェル配合錠ULD「モチダ」</a></div></td></tr> <tr class='TrColor01'> <td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/GeneralList/1149401'>ペンタゾシン</a></div></td><td><div>ペンタゾシン注30mg「KN」</div></td><td><div>製造販売元/小林化工株式会社</div></td><td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/ResultDataSetPDF/270161_1149401A2074_1_02'>PDF(2020年06月22日)</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='javascript:void(0);' onclick='javascript:detailDisp("PmdaSearch", "270161_1149401A2074_1_02"); return false;'>HTML</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='/PmdaSearch/iyakuDetail/ResultDataSetSGM/270161_1149401A2074_1_02'>SGML</a></div></td><td></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/go/interview/1/270161_1149401A2074_1_013_1F.pdf'>F1_*ペンタゾシン注30mg「KN」</a></div></td></tr> <tr class='TrColor02'> <td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/GeneralList/1149401'>ペンタゾシン</a></div></td><td><div>ソセゴン注射液15mg</div></td><td><div>製造販売元/丸石製薬株式会社</div><div>提携/SANOFI</div></td><td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/ResultDataSetPDF/730119_1149401A1027_2_02'>PDF(2020年06月22日)</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='javascript:void(0);' onclick='javascript:detailDisp("PmdaSearch", "730119_1149401A1027_2_02"); return false;'>HTML</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='/PmdaSearch/iyakuDetail/ResultDataSetSGM/730119_1149401A1027_2_02'>SGML</a></div></td><td></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/go/interview/2/730119_1149401A1027_2_002_1F.pdf'>ソセゴン注射液15mg</a></div></td></tr> <tr class='TrColor01'> <td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/GeneralList/1149401'>ペンタゾシン</a></div></td><td><div>ソセゴン注射液30mg</div></td><td><div>製造販売元/丸石製薬株式会社</div><div>提携/SANOFI</div></td><td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/ResultDataSetPDF/730119_1149401A2023_2_02'>PDF(2020年06月22日)</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='javascript:void(0);' onclick='javascript:detailDisp("PmdaSearch", "730119_1149401A2023_2_02"); return false;'>HTML</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='/PmdaSearch/iyakuDetail/ResultDataSetSGM/730119_1149401A2023_2_02'>SGML</a></div></td><td></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/go/interview/2/730119_1149401A2023_2_002_1F.pdf'>ソセゴン注射液30mg</a></div></td></tr> <tr class='TrColor02'> <td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/GeneralList/1179051'>ミルタザピン</a></div></td><td><div>ミルタザピンOD錠15mg「アメル」/ミルタザピンOD錠30mg「アメル」</div></td><td><div>販売元/高田製薬株式会社</div><div>製造販売元/共和薬品工業株式会社</div></td><td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/ResultDataSetPDF/672173_1179051F3030_3_02'>PDF(2020年06月22日)</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='javascript:void(0);' onclick='javascript:detailDisp("PmdaSearch", "672173_1179051F3030_3_02"); return false;'>HTML</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='/PmdaSearch/iyakuDetail/ResultDataSetSGM/672173_1179051F3030_3_02'>SGML</a></div></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/downfiles/ph/GUI/672173_1179051F3030_3_02G.pdf'>ミルタザピンOD錠15mg「アメル」/ミルタザピンOD錠30mg「アメル」</a></div></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/go/interview/3/672173_1179051F3030_3_001_1F.pdf'>ミルタザピンOD錠15mg「アメル」/ミルタザピンOD錠30mg「アメル」</a></div></td></tr> <tr class='TrColor01'> <td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/GeneralList/1179051'>ミルタザピン</a></div></td><td><div>ミルタザピンOD錠15mg「サワイ」/ミルタザピンOD錠30mg「サワイ」</div></td><td><div>製造販売元/沢井製薬株式会社</div></td><td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/ResultDataSetPDF/300119_1179051F3048_1_04'>PDF(2020年06月22日)</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='javascript:void(0);' onclick='javascript:detailDisp("PmdaSearch", "300119_1179051F3048_1_04"); return false;'>HTML</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='/PmdaSearch/iyakuDetail/ResultDataSetSGM/300119_1179051F3048_1_04'>SGML</a></div></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/downfiles/ph/GUI/300119_1179051F3048_1_00G.pdf'>G_ミルタザピンOD錠15mg「サワイ」/ミルタザピンOD錠30mg「サワイ」</a></div></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/go/interview/1/300119_1179051F3048_1_021_1F.pdf'>F1_ミルタザピンOD錠15mg「サワイ」/ミルタザピンOD錠30mg「サワイ」</a></div></td></tr> <tr class='TrColor02'> <td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/GeneralList/1179051'>ミルタザピン</a></div></td><td><div>ミルタザピン錠15mg「サワイ」/ミルタザピン錠30mg「サワイ」</div></td><td><div>製造販売元/沢井製薬株式会社</div></td><td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/ResultDataSetPDF/300119_1179051F1126_1_04'>PDF(2020年06月22日)</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='javascript:void(0);' onclick='javascript:detailDisp("PmdaSearch", "300119_1179051F1126_1_04"); return false;'>HTML</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='/PmdaSearch/iyakuDetail/ResultDataSetSGM/300119_1179051F1126_1_04'>SGML</a></div></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/downfiles/ph/GUI/300119_1179051F1126_1_00G.pdf'>G_ミルタザピン錠15mg「サワイ」/ミルタザピン錠30mg「サワイ」</a></div></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/go/interview/1/300119_1179051F1126_1_021_1F.pdf'>F1_ミルタザピン錠15mg「サワイ」/ミルタザピン錠30mg「サワイ」</a></div></td></tr> <tr class='TrColor01'> <td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/GeneralList/3999016'>メトトレキサート</a></div></td><td><div>メトトレキサート錠2mg「あゆみ」</div></td><td><div>製造販売元/あゆみ製薬株式会社</div></td><td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/ResultDataSetPDF/172190_3999016F1073_3_01'>PDF(2020年06月22日)</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='javascript:void(0);' onclick='javascript:detailDisp("PmdaSearch", "172190_3999016F1073_3_01"); return false;'>HTML</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='/PmdaSearch/iyakuDetail/ResultDataSetSGM/172190_3999016F1073_3_01'>SGML</a></div></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/downfiles/ph/GUI/172190_3999016F1073_3_01G.pdf'>G_メトトレキサート錠2mg「あゆみ」</a></div></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/go/interview/3/172190_3999016F1073_3_20A_IF.pdf'>F1_*メトトレキサート錠2mg「あゆみ」</a></div></td></tr> <tr class='TrColor02'> <td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/GeneralList/1169101'>レボドパ・カルビドパ水和物</a></div></td><td><div>デュオドーパ配合経腸用液</div></td><td><div>製造販売元/アッヴィ合同会社</div></td><td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/ResultDataSetPDF/112130_1169101S1020_1_06'>PDF(2020年06月22日)</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='javascript:void(0);' onclick='javascript:detailDisp("PmdaSearch", "112130_1169101S1020_1_06"); return false;'>HTML</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='/PmdaSearch/iyakuDetail/ResultDataSetSGM/112130_1169101S1020_1_06'>SGML</a></div></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/downfiles/ph/GUI/112130_1169101S1020_1_06G.pdf'>デュオドーパ配合経腸用液患者向医薬品ガイド</a></div></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/go/interview/1/112130_1169101S1020_1_060_1F.pdf'>F1_デュオドーパ配合経腸用液</a></div></td></tr> <tr class='TrColor01'> <td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/GeneralList/2482012'>レボノルゲストレル・エチニルエストラジオール</a></div></td><td><div>ジェミーナ配合錠</div></td><td><div>製造販売元/ノーベルファーマ株式会社</div><div>提携/あすか製薬株式会社</div></td><td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/ResultDataSetPDF/620095_2482012F1025_1_07'>PDF(2020年06月22日)</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='javascript:void(0);' onclick='javascript:detailDisp("PmdaSearch", "620095_2482012F1025_1_07"); return false;'>HTML</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='/PmdaSearch/iyakuDetail/ResultDataSetXML/620095_2482012F1025_1_07'>XML</a></div></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/downfiles/ph/GUI/620095_2482012F1025_1_00G.pdf'>ジェミーナ配合錠 患者向医薬品ガイド</a></div></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/go/interview/1/620095_2482012F1025_1_009_1F.pdf'>F1_ジェミーナ配合錠</a></div></td></tr> <tr class='TrColor02'> <td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/GeneralList/254910B'>レボノルゲストレル・エチニルエストラジオール</a></div></td><td><div>ラベルフィーユ21錠/ラベルフィーユ28錠</div></td><td><div>製造販売元/富士製薬工業株式会社</div></td><td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/ResultDataSetPDF/670109_254910BF1055_1_10'>PDF(2020年06月22日)</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='javascript:void(0);' onclick='javascript:detailDisp("PmdaSearch", "670109_254910BF1055_1_10"); return false;'>HTML</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='/PmdaSearch/iyakuDetail/ResultDataSetSGM/670109_254910BF1055_1_10'>SGML</a></div></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/downfiles/ph/GUI/670109_254910BF1055_1_02G.pdf'>G_ラベルフィーユ21錠/ラベルフィーユ28錠</a></div></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/go/interview/1/670109_254910BF1055_1_006_1F.pdf'>F1_ラベルフィーユ21錠/ラベルフィーユ28錠</a></div></td></tr> <tr class='TrColor01'> <td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/GeneralList/2649735'>ロキソプロフェンナトリウム水和物</a></div></td><td><div>ロキソプロフェンNaパップ100mg「ラクール」</div></td><td><div>発売元/ラクール薬品販売株式会社</div><div>製造販売元/東光薬品工業株式会社</div></td><td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/ResultDataSetPDF/480114_2649735S1176_1_01'>PDF(2020年06月22日)</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='javascript:void(0);' onclick='javascript:detailDisp("PmdaSearch", "480114_2649735S1176_1_01"); return false;'>HTML</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='/PmdaSearch/iyakuDetail/ResultDataSetSGM/480114_2649735S1176_1_01'>SGML</a></div></td><td></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/go/interview/1/480114_2649735S1176_1_A01_1F.pdf'>ロキソプロフェンNaパップ100mg「ラクール」</a></div></td></tr> <tr class='TrColor02'> <td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/GeneralList/2189017'>ロスバスタチンカルシウム</a></div></td><td><div>ロスバスタチンOD錠2.5mg「JG」/ロスバスタチンOD錠5mg「JG」</div></td><td><div>製造販売元/日本ジェネリック株式会社</div></td><td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/ResultDataSetPDF/580591_2189017F3050_1_05'>PDF(2020年06月22日)</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='javascript:void(0);' onclick='javascript:detailDisp("PmdaSearch", "580591_2189017F3050_1_05"); return false;'>HTML</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='/PmdaSearch/iyakuDetail/ResultDataSetSGM/580591_2189017F3050_1_05'>SGML</a></div></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/downfiles/ph/GUI/580591_2189017F3050_1_01G.pdf'>G_ロスバスタチンOD錠2.5mg「JG」/ロスバスタチンOD錠5mg「JG」</a></div></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/go/interview/1/580591_2189017F3050_1_004_1F.pdf'>F1_ロスバスタチンOD錠2.5mg「JG」/ロスバスタチンOD錠5mg「JG」</a></div></td></tr> <tr class='TrColor01'> <td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/GeneralList/2189017'>ロスバスタチンカルシウム</a></div></td><td><div>ロスバスタチン錠2.5mg「JG」/ロスバスタチン錠5mg「JG」</div></td><td><div>製造販売元/日本ジェネリック株式会社</div></td><td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/ResultDataSetPDF/580591_2189017F1057_1_05'>PDF(2020年06月22日)</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='javascript:void(0);' onclick='javascript:detailDisp("PmdaSearch", "580591_2189017F1057_1_05"); return false;'>HTML</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='/PmdaSearch/iyakuDetail/ResultDataSetSGM/580591_2189017F1057_1_05'>SGML</a></div></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/downfiles/ph/GUI/580591_2189017F1057_1_01G.pdf'>G_ロスバスタチン錠2.5mg「JG」/ロスバスタチン錠5mg「JG」</a></div></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/go/interview/1/580591_2189017F1057_1_004_1F.pdf'>F1_ロスバスタチン錠2.5mg「JG」/ロスバスタチン錠5mg「JG」</a></div></td></tr> <tr class='TrColor02'> <td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/GeneralList/2189017'>ロスバスタチンカルシウム</a></div></td><td><div>ロスバスタチン錠2.5mg「サワイ」/ロスバスタチン錠5mg「サワイ」/ロスバスタチンOD錠2.5mg「サワイ」/ロスバスタチンOD錠5mg「サワイ」</div></td><td><div>製造販売元/沢井製薬株式会社</div></td><td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/ResultDataSetPDF/300119_2189017F1154_1_04'>PDF(2020年06月22日)</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='javascript:void(0);' onclick='javascript:detailDisp("PmdaSearch", "300119_2189017F1154_1_04"); return false;'>HTML</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='/PmdaSearch/iyakuDetail/ResultDataSetSGM/300119_2189017F1154_1_04'>SGML</a></div></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/downfiles/ph/GUI/300119_2189017F1154_1_00G.pdf'>G_ロスバスタチン錠2.5mg「サワイ」/ロスバスタチン錠5mg「サワイ」/ロスバスタチンOD錠2.5mg「サワイ」/ロスバスタチンOD錠5mg「サワイ」</a></div></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/go/interview/1/300119_2189017F1154_1_051_1F.pdf'>F1_ロスバスタチン錠2.5mg「サワイ」/ロスバスタチン錠5mg「サワイ」/ロスバスタチンOD錠2.5mg「サワイ」/ロスバスタチンOD錠5mg「サワイ」</a></div></td></tr> <tr class='TrColor01'> <td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/GeneralList/2189017'>ロスバスタチンカルシウム</a></div></td><td><div>ロスバスタチンOD錠2.5mg「日医工」/ロスバスタチンOD錠5mg「日医工」</div></td><td><div>製造販売元/日医工株式会社</div></td><td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/ResultDataSetPDF/530169_2189017F3181_1_07'>PDF(2020年06月22日)</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='javascript:void(0);' onclick='javascript:detailDisp("PmdaSearch", "530169_2189017F3181_1_07"); return false;'>HTML</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='/PmdaSearch/iyakuDetail/ResultDataSetSGM/530169_2189017F3181_1_07'>SGML</a></div></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/downfiles/ph/GUI/530169_2189017F3181_1_00G.pdf'>G_ロスバスタチンOD錠2.5mg「日医工」/ロスバスタチンOD錠5mg「日医工」</a></div></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/go/interview/1/530169_2189017F3181_1_008_1F.pdf'>F1_ロスバスタチンOD錠2.5mg「日医工」/ロスバスタチンOD錠5mg「日医工」</a></div></td></tr> <tr class='TrColor02'> <td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/GeneralList/2189017'>ロスバスタチンカルシウム</a></div></td><td><div>ロスバスタチン錠2.5mg「ニプロ」/ロスバスタチン錠5mg「ニプロ」/ロスバスタチンOD錠2.5mg「ニプロ」/ロスバスタチンOD錠5mg「ニプロ」</div></td><td><div>製造販売/ニプロ株式会社</div></td><td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/ResultDataSetPDF/530100_2189017F1243_1_08'>PDF(2020年06月22日)</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='javascript:void(0);' onclick='javascript:detailDisp("PmdaSearch", "530100_2189017F1243_1_08"); return false;'>HTML</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='/PmdaSearch/iyakuDetail/ResultDataSetSGM/530100_2189017F1243_1_08'>SGML</a></div></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/downfiles/ph/GUI/530100_2189017F1243_1_00G.pdf'>G_ロスバスタチン錠2.5mg「ニプロ」/ロスバスタチン錠5mg「ニプロ」</a></div></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/go/interview/1/530100_2189017F1243_1_09I_1F.pdf'>ロスバスタチン錠2.5mg「ニプロ」/ロスバスタチン錠5mg「ニプロ」/*ロスバスタチンOD錠2.5mg「ニプロ」/*ロスバスタチンOD錠5mg「ニプロ」</a></div></td></tr> <tr class='TrColor01'> <td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/GeneralList/2189017'>ロスバスタチンカルシウム</a></div></td><td><div>ロスバスタチンOD錠2.5mg「EE」/ロスバスタチンOD錠5mg「EE」</div></td><td><div>製造販売元/エルメッド株式会社</div><div>販売元/日医工株式会社</div></td><td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/ResultDataSetPDF/170329_2189017F3041_1_05'>PDF(2020年06月22日)</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='javascript:void(0);' onclick='javascript:detailDisp("PmdaSearch", "170329_2189017F3041_1_05"); return false;'>HTML</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='/PmdaSearch/iyakuDetail/ResultDataSetSGM/170329_2189017F3041_1_05'>SGML</a></div></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/downfiles/ph/GUI/170329_2189017F3041_1_04G.pdf'>G_ロスバスタチンOD錠2.5mg「EE」/ロスバスタチンOD錠5mg「EE」</a></div></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/go/interview/1/170329_2189017F3041_1_006_1F.pdf'>IF_ロスバスタチンOD錠2.5mg「EE」/ロスバスタチンOD錠5mg「EE」</a></div></td></tr> <tr class='TrColor02'> <td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/GeneralList/2189017'>ロスバスタチンカルシウム</a></div></td><td><div>ロスバスタチンOD錠2.5mg「MEEK」/ロスバスタチンOD錠5mg「MEEK」</div></td><td><div>製造販売元/小林化工株式会社</div></td><td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/ResultDataSetPDF/270161_2189017F3068_1_04'>PDF(2020年06月22日)</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='javascript:void(0);' onclick='javascript:detailDisp("PmdaSearch", "270161_2189017F3068_1_04"); return false;'>HTML</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='/PmdaSearch/iyakuDetail/ResultDataSetSGM/270161_2189017F3068_1_04'>SGML</a></div></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/downfiles/ph/GUI/270161_2189017F3068_1_00G.pdf'>G_ロスバスタチンOD錠2.5mg「MEEK」/ロスバスタチンOD錠5mg「MEEK」</a></div></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/go/interview/1/270161_2189017F3068_1_006_1F.pdf'>F1_ロスバスタチンOD錠2.5mg「MEEK」/ロスバスタチンOD錠5mg「MEEK」</a></div></td></tr> <tr class='TrColor01'> <td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/GeneralList/2189017'>ロスバスタチンカルシウム</a></div></td><td><div>ロスバスタチン錠2.5mg「日医工」/ロスバスタチン錠5mg「日医工」</div></td><td><div>製造販売元/日医工株式会社</div></td><td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/ResultDataSetPDF/530169_2189017F1227_1_07'>PDF(2020年06月22日)</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='javascript:void(0);' onclick='javascript:detailDisp("PmdaSearch", "530169_2189017F1227_1_07"); return false;'>HTML</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='/PmdaSearch/iyakuDetail/ResultDataSetSGM/530169_2189017F1227_1_07'>SGML</a></div></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/downfiles/ph/GUI/530169_2189017F1227_1_00G.pdf'>G_ロスバスタチン錠2.5mg「日医工」/ロスバスタチン錠5mg「日医工」</a></div></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/go/interview/1/530169_2189017F1227_1_008_1F.pdf'>F1_ロスバスタチン錠2.5mg「日医工」/ロスバスタチン錠5mg「日医工」</a></div></td></tr> <tr class='TrColor02'> <td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/GeneralList/2189017'>ロスバスタチンカルシウム</a></div></td><td><div>ロスバスタチン錠2.5mg「EE」/ロスバスタチン錠5mg「EE」</div></td><td><div>製造販売元/エルメッド株式会社</div><div>販売元/日医工株式会社</div></td><td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/ResultDataSetPDF/170329_2189017F1049_1_05'>PDF(2020年06月22日)</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='javascript:void(0);' onclick='javascript:detailDisp("PmdaSearch", "170329_2189017F1049_1_05"); return false;'>HTML</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='/PmdaSearch/iyakuDetail/ResultDataSetSGM/170329_2189017F1049_1_05'>SGML</a></div></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/downfiles/ph/GUI/170329_2189017F1049_1_04G.pdf'>G_ロスバスタチン錠2.5mg「EE」/ロスバスタチン錠5mg「EE」</a></div></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/go/interview/1/170329_2189017F1049_1_006_1F.pdf'>IF_ロスバスタチン錠2.5mg「EE」/ロスバスタチン錠5mg「EE」</a></div></td></tr> <tr class='TrColor01'> <td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/GeneralList/2189017'>ロスバスタチンカルシウム</a></div></td><td><div>ロスバスタチン錠2.5mg「MEEK」/ロスバスタチン錠5mg「MEEK」</div></td><td><div>製造販売元/小林化工株式会社</div></td><td><div><a target='_blank' href='/PmdaSearch/iyakuDetail/ResultDataSetPDF/270161_2189017F1065_1_04'>PDF(2020年06月22日)</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='javascript:void(0);' onclick='javascript:detailDisp("PmdaSearch", "270161_2189017F1065_1_04"); return false;'>HTML</a>&nbsp;&nbsp;/&nbsp;&nbsp;<a href='/PmdaSearch/iyakuDetail/ResultDataSetSGM/270161_2189017F1065_1_04'>SGML</a></div></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/downfiles/ph/GUI/270161_2189017F1065_1_00G.pdf'>G_ロスバスタチン錠2.5mg「MEEK」/ロスバスタチン錠5mg「MEEK」</a></div></td><td><div class='singles'><a target='_blank' href='https://www.info.pmda.go.jp/go/interview/1/270161_2189017F1065_1_006_1F.pdf'>F1_ロスバスタチン錠2.5mg「MEEK」/ロスバスタチン錠5mg「MEEK」</a></div></td></tr> </table> <div class='SearchResultMenu mt_15'> <p class='col23 PageNavi'><strong>検索結果49件/全1ページ</strong><BR><BR> <span>1</span></p> </div><!-- / #SearchResultMenu --> </div><!-- / #SearchWrap02 --> </div><!--- / .SearchScrollInr --> <!-- add 2.01: Form情報を画面に保持する --> <input type="hidden" name="nameWord" value="" id="nameWord"> <input type="hidden" name="iyakuHowtoNameSearchRadioValue" value="1" id="iyakuHowtoNameSearchRadioValue"> <input type="hidden" name="howtoMatchRadioValue" value="1" id="howtoMatchRadioValue"> <input type="hidden" name="effectValue" value="" id="effectValue"> <input type="hidden" name="infoindicationsorefficacy" value="" id="infoindicationsorefficacy"> <input type="hidden" name="infoindicationsorefficacyHowtoSearch" value="and" id="infoindicationsorefficacyHowtoSearch"> <input type="hidden" name="warnings" value="" id="warnings"> <input type="hidden" name="warningsHowtoSearch" value="and" id="warningsHowtoSearch"> <input type="hidden" name="contraindicationsAvoidedadministration" value="" id="contraindicationsAvoidedadministration"> <input type="hidden" name="contraindicationsAvoidedadministrationHowtoSearch" value="and" id="contraindicationsAvoidedadministrationHowtoSearch"> <input type="hidden" name="contraindicatedcombinationPrecautionsforcombination" value="" id="contraindicatedcombinationPrecautionsforcombination"> <input type="hidden" name="contraindicatedcombinationPrecautionsforcombinationHowtoSearch" value="and" id="contraindicatedcombinationPrecautionsforcombinationHowtoSearch"> <input type="hidden" name="dispColumnsList[0]" value="1" id="dispColumns0"> <input type="hidden" name="dispColumnsList[1]" value="2" id="dispColumns1"> <input type="hidden" name="dispColumnsList[2]" value="3" id="dispColumns2"> <input type="hidden" name="dispColumnsList[3]" value="" id="dispColumns3"> <input type="hidden" name="dispColumnsList[4]" value="" id="dispColumns4"> <input type="hidden" name="dispColumnsList[5]" value="" id="dispColumns5"> <input type="hidden" name="dispColumnsList[6]" value="" id="dispColumns6"> <input type="hidden" name="dispColumnsList[7]" value="" id="dispColumns7"> <input type="hidden" name="dispColumnsList[8]" value="" id="dispColumns8"> <input type="hidden" name="dispColumnsList[9]" value="" id="dispColumns9"> <input type="hidden" name="dispColumnsList[10]" value="" id="dispColumns10"> <input type="hidden" name="dispColumnsList[11]" value="" id="dispColumns11"> <input type="hidden" name="dispColumnsList[12]" value="" id="dispColumns12"> <input type="hidden" name="dispColumnsList[13]" value="" id="dispColumns13"> <input type="hidden" name="dispColumnsList[14]" value="" id="dispColumns14"> <input type="hidden" name="dispColumnsList[15]" value="" id="dispColumns15"> <input type="hidden" name="changeColumnsList" value="" id="changeColumnsList"> <input type="hidden" name="updateDocFrDt" value="20200622" id="updateDocFrDt"> <input type="hidden" name="updateDocToDt" value="20200622" id="updateDocToDt"> <input type="hidden" name="tglOpFlg" value="" id="tglOpFlg"> <input type="hidden" name="compNameWord" value="" id="compNameWord"> <input type="hidden" name="koumoku1Value" value="" id="koumoku1Value"> <input type="hidden" name="koumoku2Value" value="" id="koumoku2Value"> <input type="hidden" name="koumoku3Value" value="" id="koumoku3Value"> <input type="hidden" name="koumoku1Word" value="" id="koumoku1Word"> <input type="hidden" name="koumoku2Word" value="" id="koumoku2Word"> <input type="hidden" name="koumoku3Word" value="" id="koumoku3Word"> <input type="hidden" name="koumoku1HowtoSearch" value="and" id="koumoku1HowtoSearch"> <input type="hidden" name="koumoku2HowtoSearch" value="and" id="koumoku2HowtoSearch"> <input type="hidden" name="koumoku3HowtoSearch" value="and" id="koumoku3HowtoSearch"> <input type="hidden" name="howtoRdSearchSel" value="or" id="howtoRdSearchSel"> <input type="hidden" name="relationDoc1Sel" value="" id="relationDoc1Sel"> <input type="hidden" name="relationDoc2Sel" value="" id="relationDoc2Sel"> <input type="hidden" name="relationDoc3Sel" value="" id="relationDoc3Sel"> <input type="hidden" name="relationDoc1check1" value="on" id="relationDoc1check1"> <input type="hidden" name="relationDoc1check2" value="on" id="relationDoc1check2"> <input type="hidden" name="relationDoc2check1" value="on" id="relationDoc2check1"> <input type="hidden" name="relationDoc2check2" value="on" id="relationDoc2check2"> <input type="hidden" name="relationDoc3check1" value="on" id="relationDoc3check1"> <input type="hidden" name="relationDoc3check2" value="on" id="relationDoc3check2"> <input type="hidden" name="relationDoc1Word" value="検索語を入力" id="relationDoc1Word"> <input type="hidden" name="relationDoc2Word" value="検索語を入力" id="relationDoc2Word"> <input type="hidden" name="relationDoc3Word" value="検索語を入力" id="relationDoc3Word"> <input type="hidden" name="relationDoc1HowtoSearch" value="and" id="relationDoc1HowtoSearch"> <input type="hidden" name="relationDoc2HowtoSearch" value="and" id="relationDoc2HowtoSearch"> <input type="hidden" name="relationDoc3HowtoSearch" value="and" id="relationDoc3HowtoSearch"> <input type="hidden" name="relationDoc1FrDt" value="年月 [YYYYMM]" id="relationDoc1FrDt"> <input type="hidden" name="relationDoc1ToDt" value="年月 [YYYYMM]" id="relationDoc1ToDt"> <input type="hidden" name="relationDoc2FrDt" value="年月 [YYYYMM]" id="relationDoc2FrDt"> <input type="hidden" name="relationDoc2ToDt" value="年月 [YYYYMM]" id="relationDoc2ToDt"> <input type="hidden" name="relationDoc3FrDt" value="年月 [YYYYMM]" id="relationDoc3FrDt"> <input type="hidden" name="relationDoc3ToDt" value="年月 [YYYYMM]" id="relationDoc3ToDt"> <input type="hidden" name="relationDocHowtoSearchBetween12" value="and" id="relationDocHowtoSearchBetween12"> <input type="hidden" name="relationDocHowtoSearchBetween23" value="and" id="relationDocHowtoSearchBetween23"> <input type="hidden" name="ListRows" value="1000" id="listRows"> <input type="hidden" name="searchCnt" value="49" id="searchCnt"> <input type="hidden" name="totalPages" value="1" id="totalPages"> <input type="hidden" name="pages" value="1" id="pages"> <input type="hidden" name="listCategory" value="BOOK" id="listCategory"> <!-- add 2.01: 職員識別フラグを追加 --> <input type="hidden" name="personFlg" value="false" id="personFlg"> <input type="hidden" name="gs1code" value="" id="gs1code"> <input type="hidden" name="iyakuKoumokuSelectSwitchRadio" value="2" id="iyakuKoumokuSelectSwitchRadio"> </form> </div><!-- / .PopupInner--> </div><!-- / .PopupArea--> </div><!-- / #ContentMainArea--> </div><!-- / #MainContents --> </div><!-- / #ContentArea .HTML5_section --> </div><!--/ContentWrap--> <div id="popDiv" style="position: fixed; visibility: show; left: 10px; top:10px; z-index: 5;"></div > <div id="popDiv2" style="position: fixed; visibility:show; z-index: 5;"></div > </div> </body> </html>
kokardy/medmst
searchresult/20200622.html
HTML
mit
103,951
import { grey400, grey200 } from 'material-ui/styles/colors' import dashboardTile from '../dashboard/DashboardStyles' import drawer from '../AppDrawer/components/DrawerStyles' import pageLayout from '../PageLayout/PageLayoutStyles' import docList from '../documents/DocumentStyles' import search from '../documents/SearchStyles' export default (theme) => { const { spacing, palette, typography, colorManipulator, raisedButton } = theme const dialogTitle = { paddingTop: spacing.desktopGutterLess, paddingLeft: spacing.desktopGutter, padding: `${spacing.desktopGutterLess}px ${spacing.desktopGutter}px`, fontSize: theme.dialog.titleFontSize, } return ({ ...dashboardTile(theme), ...docList(theme), ...drawer(theme), ...pageLayout(theme), ...search(theme), app: { container: { color: palette.bodyTextColor, backgroundColor: palette.bodyColor, }, bar: { backgroundColor: palette.primary1Color, position: 'fixed', top: 0, }, }, connectionStatus: { backgroundColor: palette.darkSecondary1Color, textColor: palette.errorText, clickColor: palette.alternateTextColor, }, docStatefulIcon: { disabledColor: grey200, }, docDropDownMenu: { iconColor: grey400, }, headerBar: { color: palette.alternateTextColor, backgroundColor: palette.primary1Color, disabledColor: palette.disabledColor, disabledBackgroundColor: palette.borderColor, }, raisedButton: { primaryColor: raisedButton.secondaryColor, primaryTextColor: raisedButton.secondaryTextColor, secondaryColor: raisedButton.primaryColor, secondaryTextColor: raisedButton.primaryTextColor, }, version: { color: colorManipulator.emphasize(palette.darkSecondary1Color, 0.25), textAlign: 'center', }, dialog: { title: { ...dialogTitle, color: palette.alternateTextColor, backgroundColor: palette.primary1Color, }, root: { body: { padding: `${spacing.desktopGutterLess}px ${spacing.desktopGutter}px ${spacing.desktopGutter}px`, marginTop: `${spacing.desktopGutterLess}px`, }, buttons: { marginTop: spacing.desktopGutter, textAlign: 'right', position: 'relative', }, content: { width: '350px', maxWidth: 'none', }, description: { fontWeight: 'bold', }, }, titleDisabled: { ...dialogTitle, color: palette.disabledColor, backgroundColor: palette.borderColor, }, closeColor: palette.borderColor, closeHoverColor: palette.negativeColor, }, }) }
mindhivenz/mui-components
src/theme/components.js
JavaScript
mit
2,796
// Copyright 2004-2010 Castle Project - http://www.castleproject.org/ // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. namespace Castle.Core.Logging { using System; /// <summary> /// Manages the instantiation of <see cref = "ILogger" />s. /// </summary> public interface ILoggerFactory { /// <summary> /// Creates a new logger, getting the logger name from the specified type. /// </summary> ILogger Create(Type type); /// <summary> /// Creates a new logger. /// </summary> ILogger Create(String name); /// <summary> /// Creates a new logger, getting the logger name from the specified type. /// </summary> ILogger Create(Type type, LoggerLevel level); /// <summary> /// Creates a new logger. /// </summary> ILogger Create(String name, LoggerLevel level); } }
mzxgiant/CryptInject
CryptInject/castle/core/Logging/ILoggerFactory.cs
C#
mit
1,325
<?php use Jaculus\RouteDispatcher; use Jaculus\UserPermissions; use Jaculus\Template\TextTemplate; use Jaculus\DI; use Jaculus\ModuleHelper; use Jaculus\TwigNode\Permission as NodePermissions; use DI\ContainerBuilder; use DI\Container; use FastRoute\Dispatcher as FastD; use PHPUnit\Framework\TestCase; class RouteDispatcherTest extends TestCase { public function testGetFound() { $d = $this->makeDispatcher('GET'); $this->assertEquals($d->dispatch('GET', '/index')[0], FastD::FOUND); } public function testGetNotFound() { $d = $this->makeDispatcher('GET'); $this->assertEquals($d->dispatch('GET', '/not_exists')[0], FastD::NOT_FOUND); } public function testPostFound() { $d = $this->makeDispatcher('POST'); $this->assertEquals($d->dispatch('POST', '/index')[0], FastD::FOUND); } public function testPostNotFound() { $d = $this->makeDispatcher('POST'); $this->assertEquals($d->dispatch('POST', '/not_exists')[0], FastD::NOT_FOUND); } public function testAddRouteGroup() { $dispatcher = new RouteDispatcher(); $dispatcher->route_group('/group', function(RouteDispatcher $r) { $r->get('/index', '/index'); $r->route_group('/group2', function(RouteDispatcher $r) { $r->get('/index', '/index'); }); }); $result = $dispatcher->dispatch('GET', '/group/index'); $this->assertEquals(FastD::FOUND, $result[0]); $result = $dispatcher->dispatch('GET', '/group/group2/index'); $this->assertEquals(FastD::FOUND, $result[0]); } public function testAddModuleGroup() { $dispatcher = new RouteDispatcher(); $mh = new ModuleHelper(); $dispatcher->module_group([ $mh->random_module() ], function(RouteDispatcher $r) use($mh) { $r->get('/index', '/index'); $r->module_group([ $mh->random_module_2() ], function(RouteDispatcher $r) { $r->get('/index2', '/index2'); }); }); $dispatcher->get('/index3', '/index3'); $result = $dispatcher->dispatch('GET', '/index'); $this->assertEquals(FastD::FOUND, $result[0]); $module_instructions = $result[1]()->moduleInstructions(); $this->assertEquals(1, count($module_instructions)); $this->assertEquals('random_module', $module_instructions[0]->name()); $result = $dispatcher->dispatch('GET', '/index2'); $this->assertEquals(FastD::FOUND, $result[0]); $module_instructions = $result[1]()->moduleInstructions(); $this->assertEquals(2, count($module_instructions)); $this->assertEquals('random_module', $module_instructions[0]->name()); $this->assertEquals('random_module_2', $module_instructions[1]->name()); $result = $dispatcher->dispatch('GET', '/index3'); $this->assertEquals(FastD::FOUND, $result[0]); $module_instructions = $result[1]()->moduleInstructions(); $this->assertEquals(0, count($module_instructions)); } public function testRender() { self::setupDI(); $dispatcher = $this->makeDispatcher('GET'); $dispatch = $dispatcher->dispatch('GET', '/index'); $this->assertEquals($dispatch[0], FastRoute\Dispatcher::FOUND); $dispatch_result = $dispatch[1](); $twig = DI::get(Twig_Environment::class); $text = $twig->render($dispatch_result->templateName(), []); $this->assertEquals('content', $text); } private function setupDI() { $c = new ContainerBuilder(); $c->addDefinitions([ Twig_LoaderInterface::class => function(Container $c) { return new Twig_Loader_Array(['/index' => 'content']); }, Twig_Environment::class => function(Container $c) { return new Twig_Environment($c->get(Twig_LoaderInterface::class)); } ]); DI::setContainer($c->build()); } private function makeDispatcher($method) { $dispatcher = new RouteDispatcher(); call_user_func([$dispatcher, $method], '/index', '/index', []); return $dispatcher; } }
PHPJaculus/backend
tests/RouteDispatcherTest.php
PHP
mit
4,307
//------------------------------------------------------------------------------------------------------- // VSTGUI Test View plugin // Copyright (c) 2004 Arne Scheffler. All rights reserved. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. //------------------------------------------------------------------------------------------------------- #include "pdrawtesteffect.h" #if VST_2_4_EXTENSIONS AudioEffect* createEffectInstance (audioMasterCallback audioMaster) { return new DrawTestEffect (audioMaster); } #else bool oome = false; #if MAC #pragma export on #endif //------------------------------------------------------------------------ // Prototype of the export function main //------------------------------------------------------------------------ #if BEOS #define main main_plugin extern "C" __declspec(dllexport) AEffect *main_plugin (audioMasterCallback audioMaster); #elif MACX #define main main_macho extern "C" AEffect *main_macho (audioMasterCallback audioMaster); #else AEffect *main (audioMasterCallback audioMaster); #endif //------------------------------------------------------------------------ AEffect *main (audioMasterCallback audioMaster) { // Get VST Version if (!audioMaster (0, audioMasterVersion, 0, 0, 0, 0)) return 0; // old version // Create the AudioEffect DrawTestEffect* effect = new DrawTestEffect (audioMaster); if (!effect) return 0; // Check if no problem in constructor of AGain if (oome) { delete effect; return 0; } return effect->getAeffect (); } #if MAC #pragma export off #endif #if WIN32 #include <windows.h> void* hInstance; BOOL WINAPI DllMain (HINSTANCE hInst, DWORD dwReason, LPVOID lpvReserved) { hInstance = hInst; return 1; } #endif #endif // VST_2_4_EXTENSIONS
rcgilbert/csc344-wi14
SDKs/VST3 SDK/vstgui.sf/drawtest/source/pdrawtestmain.cpp
C++
mit
2,423
<?php // prevent this file from being called directly if(!defined('LIVE')) { exit(); }; // define the public application root define('APP_ROOT', '/app/'); define('APP_THEME', 'gentelella'); define('APP_NAME', 'Secure Area'); // OTP Configuration define('OTP_COMPANY', 'ACME'); // company name define('OTP_MAX_TRIES', 3); // maximum attempts before preventing use of the current timeblock define('OTP_LENGTH', 6); // length of digits a code should be define('OTP_ALGORITHM', 'sha256'); // the hashing algorithm used (sha256, sha1, sha512) // session control define('SESSION_TIMEOUT', 30); // how many minutes a logged in session should last // user control. acl's between these values are granted control to modify // users that are lower acl. for example, a user with acl 9999 can modify // users with acl 0 to 9998, but can not modify users with acl of 9997, and // can't add a user with an acl value higher than 9998 define('ACL_ADMIN_MAX', 9999); // maximum acl to grant control over modifying users with lower acl define('ACL_ADMIN_MIN', 9994); // users with an acl below this value do not get control over other users // maximum notifications to show on Notifications page define('MAX_NOTIFICATIONS', 50); // Database Credentials used for user authentication define('SQL_SERVER', 'localhost'); define('SQL_USERNAME', 'root'); define('SQL_PASSWORD', ''); define('SQL_DATA', 'test'); define('SQL_PREFIX', ''); // Smarty define('SMARTY_DEBUGGING', false); define('SMARTY_CACHING', false); define('SMARTY_CACHE_LIFETIME', 120); define('SMARTY_FORCE_COMPILE', false); define('SMARTY_DIR_TEMPLATES', './templates'); define('SMARTY_DIR_TEMPLATES_C','./templates_c'); define('SMARTY_DIR_CACHE', './cache');
microvb/otp-thing
app/config.inc.php
PHP
mit
1,728
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>coqprime: Not compatible 👼</title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / released</a></li> <li class="active"><a href="">8.12.1 / coqprime - 1.0.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> coqprime <small> 1.0.0 <span class="label label-info">Not compatible 👼</span> </small> </h1> <p>📅 <em><script>document.write(moment("2022-01-11 21:45:50 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-01-11 21:45:50 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-threads base base-unix base conf-findutils 1 Virtual package relying on findutils coq 8.12.1 Formal proof management system num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic ocaml 4.09.1 The OCaml compiler (virtual package) ocaml-base-compiler 4.09.1 Official release 4.09.1 ocaml-config 1 OCaml Switch Configuration ocamlfind 1.9.1 A library manager for OCaml # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;thery@sophia.inria.fr&quot; homepage: &quot;https://github.com/thery/coqprime&quot; bug-reports: &quot;https://github.com/thery/coqprime/issues&quot; dev-repo: &quot;git+https://github.com/thery/coqprime.git&quot; license: &quot;MIT&quot; authors: [&quot;Laurent Théry&quot;] build: [ [&quot;./configure.sh&quot;] [make &quot;-j%{jobs}%&quot;] ] install: [make &quot;install&quot;] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.5~&quot; &amp; &lt; &quot;8.6~&quot;} ] tags: [ &quot;logpath:Coqprime&quot; ] synopsis: &quot;Certifying prime numbers in Coq&quot; url { src: &quot;https://github.com/thery/coqprime/releases/download/oldversions/coqprime_8.5b.zip&quot; checksum: &quot;md5=fea727b4ca765c1408d92baa0c98ce22&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install 🏜️</h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action coq-coqprime.1.0.0 coq.8.12.1</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.12.1). The following dependencies couldn&#39;t be met: - coq-coqprime -&gt; coq &lt; 8.6~ -&gt; ocaml &lt; 4.06.0 base of this switch (use `--unlock-base&#39; to force) No solution found, exiting </pre></dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-coqprime.1.0.0</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Install 🚀</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Installation size</h2> <p>No files were installed.</p> <h2>Uninstall 🧹</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> Sources are on <a href="https://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣 </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
coq-bench/coq-bench.github.io
clean/Linux-x86_64-4.09.1-2.0.6/released/8.12.1/coqprime/1.0.0.html
HTML
mit
6,363
Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # Code is not reloaded between requests. config.cache_classes = true # Eager load code on boot. This eager loads most of Rails and # your application in memory, allowing both threaded web servers # and those relying on copy on write to perform better. # Rake tasks automatically ignore this option for performance. config.eager_load = true # Full error reports are disabled and caching is turned on. config.consider_all_requests_local = false config.action_controller.perform_caching = true # Enable Rack::Cache to put a simple HTTP cache in front of your application # Add `rack-cache` to your Gemfile before enabling this. # For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid. # config.action_dispatch.rack_cache = true # Disable Rails's static asset server (Apache or nginx will already do this). config.serve_static_assets = false # Compress JavaScripts and CSS. config.assets.js_compressor = :uglifier # config.assets.css_compressor = :sass # Do not fallback to assets pipeline if a precompiled asset is missed. config.assets.compile = false # Generate digests for assets URLs. config.assets.digest = true # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb # Specifies the header that your server uses for sending files. # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. # config.force_ssl = true # Set to :debug to see everything in the log. config.log_level = :info # Prepend all log lines with the following tags. # config.log_tags = [ :subdomain, :uuid ] # Use a different logger for distributed setups. # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new) # Use a different cache store in production. # config.cache_store = :mem_cache_store # Set default host for ActionMailer links config.action_mailer.default_url_options = { host: ENV['ERRBIT_HOST'] } if ENV['ERRBIT_HOST'] # Enable serving of images, stylesheets, and JavaScripts from an asset server. # config.action_controller.asset_host = "http://assets.example.com" # Ignore bad email addresses and do not raise email delivery errors. # Set this to true and configure the email server for immediate delivery to raise delivery errors. # config.action_mailer.raise_delivery_errors = false # Enable locale fallbacks for I18n (makes lookups for any locale fall back to # the I18n.default_locale when a translation cannot be found). config.i18n.fallbacks = true # Send deprecation notices to registered listeners. config.active_support.deprecation = :notify # Disable automatic flushing of the log to improve performance. # config.autoflush_log = false # Use default logging formatter so that PID and timestamp are not suppressed. config.log_formatter = ::Logger::Formatter.new # Do not dump schema after migrations. config.active_record.dump_schema_after_migration = false end
arrowcircle/errbit
config/environments/production.rb
Ruby
mit
3,304
package collection.mutable; import collection.mutable.SinglyLinkedList.Node; public class CircularLinkedList<E> { private Node<E> tail = null; private int size = 0; public CircularLinkedList() { } public int size() { return size; } public boolean isEmpty() { return size == 0; } public E first() { if (isEmpty()) return null; return tail.getNext().getElement(); } public E last() { if (isEmpty()) return null; return tail.getElement(); } public void rotate() { if (!isEmpty()) tail = tail.getNext(); } public void addFirst(E e) { if (isEmpty()) { tail = new Node<E>(e, null); tail.setNext(tail); } else { Node<E> newest = new Node<E>(e, tail.getNext()); tail.setNext(newest); } size++; } public void addLast(E e) { addFirst(e); tail = tail.getNext(); } public E removeFirst() { if (isEmpty()) return null; Node<E> head = tail.getNext(); if (head == tail) tail = null; else tail.setNext(head.getNext()); size--; return head.getElement(); } }
zitudu/scala-like-collection-and-sort
src/main/java/collection/mutable/CircularLinkedList.java
Java
mit
1,207
html body { margin:0; height: 450px; background:#98B8CF; background-image: -webkit-linear-gradient(left , rgb(84,116,137) 0%, rgb(133,160,177) 50%, rgb(84,116,137) 100%); } #text { margin-top:-150px; margin-left:-120px; width:120px; top:50%; left:50%; text-transform:uppercase; color:#BE3E1B; font-size:100%; font-weight:bold; text-shadow:-1px 1px 3px #DBC558, -1px 1px 1px #FFF38F; text-align:center; } div { position:absolute; -webkit-transform-style:preserve-3d; } #page { height:100%; width:100%; -moz-perspective:700px; background-image: -moz-linear-gradient(left , rgb(84,116,137) 0%, rgb(133,160,177) 50%, rgb(84,116,137) 100%); } #container { height:300px; width:300px; top:50%; left:50%; margin-top:-150px; margin-left:-150px; -webkit-box-reflect: below -7px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(10%, transparent), to(rgba(255,255,255,0.2))); } #foot { bottom:0; width:32px; height:20px; } .left {left:90px; -webkit-animation:foot1 6s ease-in-out infinite; -moz-animation:foot1 10s ease-in-out infinite;} .right {right:90px; -webkit-animation:foot2 6s ease-in-out infinite; -moz-animation:foot2 10s ease-in-out infinite;} #leg1 { height:20px; width:12px; background:#FF0; bottom:20%; -webkit-animation:leg1 6s ease-in-out infinite; -moz-animation:leg1 6s ease-in-out infinite; background:#7AA6C1; border:1px solid #000; border-radius:5px; z-index:3; } .first { left:10px; } .next1 { left:-1px; } .next2 { right:-1px; } #leg2 { height:20px; width:12px; background:#7AA6C1; border:1px solid #000; bottom:20%; z-index:3; border-radius:5px; -webkit-animation:leg2 6s ease-in-out infinite; -moz-animation:leg2 6s ease-in-out infinite; } @-webkit-keyframes leg1 { from {-webkit-transform:rotateZ( 0deg) translateY(-50%);} 05% {-webkit-transform:rotateZ(10deg) translateY(-50%);} 10% {-webkit-transform:rotateZ( 0deg) translateY(-50%);} 15% {-webkit-transform:rotateZ(10deg) translateY(-50%);} 20% {-webkit-transform:rotateZ( 0deg) translateY(-50%);} 25% {-webkit-transform:rotateZ( 0deg) translateY(-50%);} 30% {-webkit-transform:rotateZ( 0deg) translateY(-50%);} 35% {-webkit-transform:rotateZ(10deg) translateY(-50%);} 40% {-webkit-transform:rotateZ( 0deg) translateY(-50%);} 45% {-webkit-transform:rotateZ( 0deg) translateY(-50%);} 50% {-webkit-transform:rotateZ(10deg) translateY(-50%);} 55% {-webkit-transform:rotateZ( 0deg) translateY(-50%);} 60% {-webkit-transform:rotateZ(10deg) translateY(-50%);} 65% {-webkit-transform:rotateZ( 0deg) translateY(-50%);} 70% {-webkit-transform:rotateZ(10deg) translateY(-50%);} 80% {-webkit-transform:rotateZ(-10deg) translateY(-50%);} 90% {-webkit-transform:rotateZ(10deg) translateY(-50%);} to {-webkit-transform:rotateZ( 0deg) translateY(-50%);} } @-moz-keyframes leg1 { from {-moz-transform:rotateZ( 0deg) translateY(-50%);} 05% {-moz-transform:rotateZ(10deg) translateY(-50%);} 10% {-moz-transform:rotateZ( 0deg) translateY(-50%);} 15% {-moz-transform:rotateZ(10deg) translateY(-50%);} 20% {-moz-transform:rotateZ( 0deg) translateY(-50%);} 25% {-moz-transform:rotateZ( 0deg) translateY(-50%);} 30% {-moz-transform:rotateZ( 0deg) translateY(-50%);} 35% {-moz-transform:rotateZ(10deg) translateY(-50%);} 40% {-moz-transform:rotateZ( 0deg) translateY(-50%);} 45% {-moz-transform:rotateZ( 0deg) translateY(-50%);} 50% {-moz-transform:rotateZ(10deg) translateY(-50%);} 55% {-moz-transform:rotateZ( 0deg) translateY(-50%);} 60% {-moz-transform:rotateZ(10deg) translateY(-50%);} 65% {-moz-transform:rotateZ( 0deg) translateY(-50%);} 70% {-moz-transform:rotateZ(10deg) translateY(-50%);} 80% {-moz-transform:rotateZ(-10deg) translateY(-50%);} 90% {-moz-transform:rotateZ(10deg) translateY(-50%);} to {-moz-transform:rotateZ( 0deg) translateY(-50%);} } @-webkit-keyframes leg2 { from {-webkit-transform:rotateZ( 0deg) translateY(-50%);} 05% {-webkit-transform:rotateZ(-10deg) translateY(-50%);} 10% {-webkit-transform:rotateZ( 0deg) translateY(-50%);} 15% {-webkit-transform:rotateZ(-10deg) translateY(-50%);} 20% {-webkit-transform:rotateZ( 0deg) translateY(-50%);} 25% {-webkit-transform:rotateZ(-10deg) translateY(-50%);} 30% {-webkit-transform:rotateZ( 0deg) translateY(-50%);} 40% {-webkit-transform:rotateZ( 0deg) translateY(-50%);} 45% {-webkit-transform:rotateZ(-10deg) translateY(-50%);} 50% {-webkit-transform:rotateZ( 0deg) translateY(-50%);} 55% {-webkit-transform:rotateZ(-10deg) translateY(-50%);} 60% {-webkit-transform:rotateZ( 0deg) translateY(-50%);} 65% {-webkit-transform:rotateZ( 0deg) translateY(-50%);} 70% {-webkit-transform:rotateZ( 10deg) translateY(-50%);} 80% {-webkit-transform:rotateZ(-10deg) translateY(-50%);} 90% {-webkit-transform:rotateZ( 10deg) translateY(-50%);} to {-webkit-transform:rotateZ( 0deg) translateY(-50%);} } @-moz-keyframes leg2 { from {-moz-transform:rotateZ( 0deg) translateY(-50%);} 05% {-moz-transform:rotateZ(-10deg) translateY(-50%);} 10% {-moz-transform:rotateZ( 0deg) translateY(-50%);} 15% {-moz-transform:rotateZ(-10deg) translateY(-50%);} 20% {-moz-transform:rotateZ( 0deg) translateY(-50%);} 25% {-moz-transform:rotateZ(-10deg) translateY(-50%);} 30% {-moz-transform:rotateZ( 0deg) translateY(-50%);} 40% {-moz-transform:rotateZ( 0deg) translateY(-50%);} 45% {-moz-transform:rotateZ(-10deg) translateY(-50%);} 50% {-moz-transform:rotateZ( 0deg) translateY(-50%);} 55% {-moz-transform:rotateZ(-10deg) translateY(-50%);} 60% {-moz-transform:rotateZ( 0deg) translateY(-50%);} 65% {-moz-transform:rotateZ( 0deg) translateY(-50%);} 70% {-moz-transform:rotateZ( 10deg) translateY(-50%);} 80% {-moz-transform:rotateZ(-10deg) translateY(-50%);} 90% {-moz-transform:rotateZ( 10deg) translateY(-50%);} to {-moz-transform:rotateZ( 0deg) translateY(-50%);} } @-webkit-keyframes foot1 { from {left:116px;} 05% {left:80px;} 10% {left:116px;} 15% {left:80px;} 20% {left:116px;} 25% {left:116px;} 30% {left:116px;} 35% {left:84px;} 40% {left:116px;} 45% {left:116px;} 50% {left:84px;} 55% {left:116px;} 60% {left:84px;} 65% {left:116px;} to {left:116px;} } @-moz-keyframes foot1 { from {left:116px;} 05% {left:80px;} 10% {left:116px;} 15% {left:80px;} 20% {left:116px;} 25% {left:116px;} 30% {left:116px;} 35% {left:84px;} 40% {left:116px;} 45% {left:116px;} 50% {left:84px;} 55% {left:116px;} 60% {left:84px;} 65% {left:116px;} to {left:116px;} } @-webkit-keyframes foot2 { from {right:116px;} 05% {right:80px;} 10% {right:116px;} 15% {right:80px;} 20% {right:116px;} 25% {right:84px;} 30% {right:116px;} 40% {right:116px;} 45% {right:84px;} 50% {right:116px;} 55% {right:84px;} 60% {right:116px;} to {right:116px;} } @-moz-keyframes foot2 { from {right:116px;} 05% {right:80px;} 10% {right:116px;} 15% {right:80px;} 20% {right:116px;} 25% {right:84px;} 30% {right:116px;} 40% {right:116px;} 45% {right:84px;} 50% {right:116px;} 55% {right:84px;} 60% {right:116px;} to {right:116px;} } #body { height:66px; width:56px; background:#A7C6DB; left:120px; top:140px; z-index:10; -webkit-animation:body 6s ease-in-out infinite; -moz-animation:body 6s ease-in-out infinite; -webkit-perspective:300; } #body:before, #body:after { content: ''; position: absolute; top: 0; left: 0; width: 100%; bottom: 0; z-index: -1; background-color: #A7C6DB; } #body:before { -webkit-transform: skew(-5deg); -moz-transform: skew(-5deg); left: 5px; border-right:1px solid #000; } #body:after { -webkit-transform: skew(5deg); -moz-transform: skew(5deg); left: -5px; border-left:1px solid #000; } @-webkit-keyframes body { from {top:135px; left:122px; -webkit-transform:rotateZ( 0deg);} 05% {top:150px; left:122px; -webkit-transform:rotateZ( 0deg);} 10% {top:135px; left:122px; -webkit-transform:rotateZ( 0deg);} 15% {top:150px; left:122px; -webkit-transform:rotateZ( 0deg);} 20% {top:135px; left:122px; -webkit-transform:rotateZ( 0deg);} 25% {top:148px; left:118px; -webkit-transform:rotateZ( 0deg);} 30% {top:135px; left:122px; -webkit-transform:rotateZ( 0deg);} 35% {top:148px; left:126px; -webkit-transform:rotateZ( 0deg);} 40% {top:135px; left:122px; -webkit-transform:rotateZ( 0deg);} 45% {top:148px; left:118px; -webkit-transform:rotateZ( 0deg);} 50% {top:148px; left:126px; -webkit-transform:rotateZ( 0deg);} 55% {top:148px; left:118px; -webkit-transform:rotateZ( 0deg);} 60% {top:148px; left:126px; -webkit-transform:rotateZ( 0deg);} 65% {top:135px; left:122px; -webkit-transform:rotateZ( 0deg);} 70% {top:142px; left:129px; -webkit-transform:rotateZ( 10deg) translateX(75%);} 80% {top:142px; left:115px; -webkit-transform:rotateZ(-10deg) translateX(-75%);} 90% {top:142px; left:129px; -webkit-transform:rotateZ( 10deg) translateX(75%);} to {top:135px; left:122px; -webkit-transform:rotateZ( 0deg);} } @-moz-keyframes body { from {top:135px; left:122px; -moz-transform:rotateZ( 0deg);} 05% {top:150px; left:122px; -moz-transform:rotateZ( 0deg);} 10% {top:135px; left:122px; -moz-transform:rotateZ( 0deg);} 15% {top:150px; left:122px; -moz-transform:rotateZ( 0deg);} 20% {top:135px; left:122px; -moz-transform:rotateZ( 0deg);} 25% {top:148px; left:118px; -moz-transform:rotateZ( 0deg);} 30% {top:135px; left:122px; -moz-transform:rotateZ( 0deg);} 35% {top:148px; left:126px; -moz-transform:rotateZ( 0deg);} 40% {top:135px; left:122px; -moz-transform:rotateZ( 0deg);} 45% {top:148px; left:118px; -moz-transform:rotateZ( 0deg);} 50% {top:148px; left:126px; -moz-transform:rotateZ( 0deg);} 55% {top:148px; left:118px; -moz-transform:rotateZ( 0deg);} 60% {top:148px; left:126px; -moz-transform:rotateZ( 0deg);} 65% {top:135px; left:122px; -moz-transform:rotateZ( 0deg);} 70% {top:142px; left:129px; -moz-transform:rotateZ( 10deg) translateX(75%);} 80% {top:142px; left:115px; -moz-transform:rotateZ(-10deg) translateX(-75%);} 90% {top:142px; left:129px; -moz-transform:rotateZ( 10deg) translateX(75%);} to {top:135px; left:122px; -moz-transform:rotateZ( 0deg);} } #f1 { bottom:5px; height:15px; width:100%; border:1px solid #000; border-bottom:none; background:#A7C6DB; border-radius:150px 150px 0 0; z-index:2; } #f2 { height:10px; width:100%; border:1px solid #000; background:#A7C6DB; bottom:0; border-radius:100%; z-index:1; } #b1 { width:102%; height:14px; left:-1px; background-color: #A7C6DB; border:1px solid #000; bottom:-8px; z-index:-2; border-radius:100%; } #b2 { width:60%; bottom:100%; height:28%; left:20%; background-color: #C8DFED; z-index:2; } #b2:before, #b2:after { content: ''; position: absolute; top: 0; left: 0; width: 100%; bottom: 0; z-index: -1; background-color: #C9E0EE; } #b2:before { -webkit-transform: skew(45deg); -moz-transform: skew(45deg); left: 11px; border-right:1px solid #000; } #b2:after { -webkit-transform: skew(-45deg); -moz-transform: skew(-45deg); left: -10px; border-left:1px solid #000; } #b3 { background-color: #C8DFED; border:1px solid #000; border-radius:100%; width:124%; left:-13%; height:12px; z-index:1; top:-6px; } #head { width:36px; height:40px; top:-56px; left:9px; z-index:5; } #h2 { width:100%; height:8px; bottom:-4px; left:1px; background:#A7C6DB; border:1px solid #000; border-radius:100%; z-index:0; } #h1 { width:100%; height:46px; bottom:0; left:1px; background:#A7C6DB; border-left:1px solid #000; border-right:1px solid #000; z-index:1; } #h3 { width:100%; height:38px; bottom:62%; left:1px; background:#A7C6DB; border:1px solid #000; border-radius:100%; z-index:0; } #h4 { height:10px; width:12px; bottom:56px; border:1px solid #000; background:#C4E0EE; z-index:-1; border-radius:100%; left:13px; } #h5 { bottom:64px; background:#76A3C4; border:1px solid #000; width:2px; height:20px; left:18px; z-index:-2; -webkit-animation:h5 4s ease-in-out infinite; -moz-animation:h5 4s ease-in-out infinite; } @-webkit-keyframes h5 { from {bottom:64px;} 25% {bottom:45px;} 50% {bottom:64px;} 60% {bottom:58px;} 70% {bottom:64px;} to {bottom:64px;} } @-moz-keyframes h5 { from {bottom:64px;} 25% {bottom:45px;} 50% {bottom:64px;} 60% {bottom:58px;} 70% {bottom:64px;} to {bottom:64px;} } #h5 span { position:absolute; left:-3px; top:-5px; height:6px; width:6px; background:#CEE9FA; border:1px solid #000; border-radius:100%; } #eyes { width:49px; height:22px; background:#CAE1F1; border:1px solid #000; border-radius:10px; z-index:5; left:-5px; top:-4px; } #e { top:2px; left:2px; right:2px; bottom:2px; background:#231F20; border-radius:10px; overflow:hidden; } #e1 { height:14px; width:16px; background:#FFF; border-radius:100%; top:2px; left:4px; } #e2 { height:14px; width:16px; background:#FFF; border-radius:100%; top:2px; right:4px; } #eye { height:4px; width:4px; border-radius:100%; background:#231F20; top:5px; left:2px; -webkit-animation:eye 5s ease-in-out infinite; -moz-animation:eye 8s ease-in-out infinite; } @-webkit-keyframes eye { from {top:5px; left:2px;} 10% {top:5px; left:10px;} 20% {top:5px; left:2px;} 30% {top:5px; left:2px;} 40% {top:9px; left:9px;} 45% {top:5px; left:6px;} 60% {top:5px; left:6px;} 70% {top:3px; left:2px;} 80% {top:8px; left:2px;} 90% {top:7px; left:10px;} to {top:5px; left:2px;} } @-moz-keyframes eye { from {top:5px; left:2px;} 10% {top:5px; left:10px;} 20% {top:5px; left:2px;} 30% {top:5px; left:2px;} 40% {top:9px; left:9px;} 45% {top:5px; left:6px;} 60% {top:5px; left:6px;} 70% {top:3px; left:2px;} 80% {top:8px; left:2px;} 90% {top:7px; left:10px;} } #e1 span { position:absolute; width:100%; height:4px; background:#231F20; -webkit-animation:eye1 8s ease-in-out infinite; -moz-animation:eye1 8s ease-in-out infinite; } @-webkit-keyframes eye1 { from {height:1px; -webkit-transform:rotateZ( 0deg); left:0px; top:0;} 10% {height:4px; -webkit-transform:rotateZ( 0deg); left:0px; top:0;} 20% {height:2px; -webkit-transform:rotateZ( 0deg); left:0px; top:-1px;} 30% {height:5px; -webkit-transform:rotateZ(30deg); left:5px; top:-1px;} 40% {height:7px; -webkit-transform:rotateZ(30deg); left:5px; top:-1px;} 50% {height:4px; -webkit-transform:rotateZ( 0deg); left:0px; top:-1px;} 70% {height:0px; -webkit-transform:rotateZ( 0deg); left:0px; top:-1px;} 80% {height:8px; -webkit-transform:rotateZ(30deg); left:5px; top:-2px;} 90% {height:5px; -webkit-transform:rotateZ( 0deg); left:0px; top:-1px;} to {height:1px; -webkit-transform:rotateZ( 0deg); left:0px; top:0px;} } @-moz-keyframes eye1 { from {height:1px; -moz-transform:rotateZ( 0deg); left:0px; top:0;} 10% {height:4px; -moz-transform:rotateZ( 0deg); left:0px; top:0;} 20% {height:2px; -moz-transform:rotateZ( 0deg); left:0px; top:-1px;} 30% {height:5px; -moz-transform:rotateZ(30deg); left:5px; top:-1px;} 40% {height:7px; -moz-transform:rotateZ(30deg); left:5px; top:-1px;} 50% {height:4px; -moz-transform:rotateZ( 0deg); left:0px; top:-1px;} 70% {height:0px; -moz-transform:rotateZ( 0deg); left:0px; top:-1px;} 80% {height:8px; -moz-transform:rotateZ(30deg); left:5px; top:-2px;} 90% {height:5px; -moz-transform:rotateZ( 0deg); left:0px; top:-1px;} to {height:1px; -moz-transform:rotateZ( 0deg); left:0px; top:0px;} } #e2 span { position:absolute; width:100%; height:4px; background:#231F20; -webkit-animation:eye2 8s ease-in-out infinite; -moz-animation:eye2 8s ease-in-out infinite; } @-webkit-keyframes eye2 { from {height:1px; -webkit-transform:rotateZ( 0deg); right:0px; top:0;} 10% {height:4px; -webkit-transform:rotateZ( 0deg); right:0px; top:0;} 20% {height:2px; -webkit-transform:rotateZ( 0deg); right:0px; top:-1px;} 30% {height:5px; -webkit-transform:rotateZ(-30deg); right:5px; top:-1px;} 40% {height:7px; -webkit-transform:rotateZ(-30deg); right:5px; top:-1px;} 50% {height:4px; -webkit-transform:rotateZ( 0deg); right:0px; top:-1px;} 70% {height:0px; -webkit-transform:rotateZ( 0deg); right:0px; top:-1px;} 80% {height:8px; -webkit-transform:rotateZ(-30deg); right:5px; top:-2px;} 90% {height:5px; -webkit-transform:rotateZ( 0deg); right:0px; top:-1px;} to {height:1px; -webkit-transform:rotateZ( 0deg); right:0px; top:0px;} } @-moz-keyframes eye2 { from {height:1px; -moz-transform:rotateZ( 0deg); right:0px; top:0;} 10% {height:4px; -moz-transform:rotateZ( 0deg); right:0px; top:0;} 20% {height:2px; -moz-transform:rotateZ( 0deg); right:0px; top:-1px;} 30% {height:5px; -moz-transform:rotateZ(-30deg); right:5px; top:-1px;} 40% {height:7px; -moz-transform:rotateZ(-30deg); right:5px; top:-1px;} 50% {height:4px; -moz-transform:rotateZ( 0deg); right:0px; top:-1px;} 70% {height:0px; -moz-transform:rotateZ( 0deg); right:0px; top:-1px;} 80% {height:8px; -moz-transform:rotateZ(-30deg); right:5px; top:-2px;} 90% {height:5px; -moz-transform:rotateZ( 0deg); right:0px; top:-1px;} to {height:1px; -moz-transform:rotateZ( 0deg); right:0px; top:0px;} } #mouth { top:23px; left:3px; height:14px; width:32px; background:#FFF; border:1px solid #000; z-index:5; border-radius:7px; overflow:hidden; } #mouth span { display:block; float:left; width:1px; height:14px; background:#150B13; margin-left:5px; } #mouth span:first-child { margin-left:3px; } #m1 { top:9px; width:100%; height:20px; border-top:1px solid #000; border-radius:100%; -webkit-animation:m1 4s ease-in-out infinite; -moz-animation:m1 4s ease-in-out infinite; } @-webkit-keyframes m1 { from {border-radius:0%; width:100%; left:0;} 25% {border-radius:40%; width:200%; left:0;} 50% {border-radius:0%; width:100%; left:0;} 75% {border-radius:100%; width:200%; left:-50%;} to {border-radius:0%; width:100%; left:0;} } @-moz-keyframes m1 { from {border-radius:0%; width:100%; left:0;} 25% {border-radius:40%; width:200%; left:0;} 50% {border-radius:0%; width:100%; left:0;} 75% {border-radius:100%; width:200%; left:-50%;} to {border-radius:0%; width:100%; left:0;} } #m2 { bottom:8px; width:100%; height:20px; border-bottom:1px solid #000; border-radius:100%; -webkit-animation:m1 4s ease-in-out infinite; -moz-animation:m1 4s ease-in-out infinite; } #b4 { height:20px; width:10px; background:#AAC6DE; border:1px solid #000; border-radius:100%; left:-12px; top:2px; z-index:-5; } #ab { right:50%; top:-5px; height:20px; width:14px; } #ab #a1 { right:2px; background:#A7C6DB; border:1px solid #000; height:20px; width:8px; border-radius:0 50px 50px 0; z-index:1; border-left:none; } #ab #a2 { right:8px; background:#A7C6DB; border:1px solid #000; height:20px; width:4px; border-radius:100%; z-index:0; } #ab #a3 { height:4px; width:14px; background:#A7C6DB; border:1px solid #000; z-index:-1; border-radius:5px; } #ab .a31 {right:5px; top:1px; -webkit-transform:rotateZ(20deg);} #ab .a32 {right:6px; top:8px;} #ab .a33 {right:5px; top:15px; -webkit-transform:rotateZ(-20deg);} #b6 { height:20px; width:10px; background:#AAC6DE; border:1px solid #000; border-radius:100%; right:-12px; top:2px; z-index:-5; } #b5 { height:10px; width:16px; background:#82A6BC; border:1px solid #000; left:-16px; top:8px; z-index:-7; -webkit-transform:rotateZ(-60deg) translateX(-50%); -webkit-animation:b5 6s ease-in-out infinite; -moz-animation:b5 6s ease-in-out infinite; } #b51 { height:10px; width:18px; background:#82A6BC; border:1px solid #000; border-radius:5px; right:20%; top:-1px; z-index:1; -webkit-transform:rotateZ(-10deg) translateX(-50%); -webkit-animation:b51 6s ease-in-out infinite; -moz-animation:b51 6s ease-in-out infinite; } @-webkit-keyframes b5 { from {-webkit-transform:rotateZ(-60deg) translateX(-50%);} 10% {-webkit-transform:rotateZ(50deg) translateX(-50%);} 20% {-webkit-transform:rotateZ(50deg) translateX(-50%);} 30% {-webkit-transform:rotateZ(50deg) translateX(-50%);} 40% {-webkit-transform:rotateZ(-50deg) translateX(-50%);} 50% {-webkit-transform:rotateZ(60deg) translateX(-50%);} 60% {-webkit-transform:rotateZ(-60deg) translateX(-50%);} 70% {-webkit-transform:rotateZ(30deg) translateX(-50%);} 80% {-webkit-transform:rotateZ(-60deg) translateX(-50%);} 90% {-webkit-transform:rotateZ(70deg) translateX(-50%);} to {-webkit-transform:rotateZ(-60deg) translateX(-50%);} } @-moz-keyframes b5 { from {-moz-transform:rotateZ(-60deg) translateX(-50%);} 10% {-moz-transform:rotateZ(50deg) translateX(-50%);} 20% {-moz-transform:rotateZ(50deg) translateX(-50%);} 30% {-moz-transform:rotateZ(50deg) translateX(-50%);} 40% {-moz-transform:rotateZ(-50deg) translateX(-50%);} 50% {-moz-transform:rotateZ(60deg) translateX(-50%);} 60% {-moz-transform:rotateZ(-60deg) translateX(-50%);} 70% {-moz-transform:rotateZ(30deg) translateX(-50%);} 80% {-moz-transform:rotateZ(-60deg) translateX(-50%);} 90% {-moz-transform:rotateZ(70deg) translateX(-50%);} to {-moz-transform:rotateZ(-60deg) translateX(-50%);} } @-webkit-keyframes b51 { from {-webkit-transform:rotateZ(-10deg) translateX(-50%);} 10% {-webkit-transform:rotateZ(10deg) translateX(-50%);} 15% {-webkit-transform:rotateZ(0deg) translateX(-50%);} 20% {-webkit-transform:rotateZ(10deg) translateX(-50%);} 25% {-webkit-transform:rotateZ( 0deg) translateX(-50%);} 30% {-webkit-transform:rotateZ(10deg) translateX(-50%);} 40% {-webkit-transform:rotateZ(-10deg) translateX(-50%);} 50% {-webkit-transform:rotateZ(10deg) translateX(-50%);} 60% {-webkit-transform:rotateZ(-5deg) translateX(-50%);} 70% {-webkit-transform:rotateZ(10deg) translateX(-50%);} 80% {-webkit-transform:rotateZ(-10deg) translateX(-50%);} 90% {-webkit-transform:rotateZ(5deg) translateX(-50%);} to {-webkit-transform:rotateZ(-10deg) translateX(-50%);} } @-moz-keyframes b51 { from {-moz-transform:rotateZ(-10deg) translateX(-50%);} 10% {-moz-transform:rotateZ(10deg) translateX(-50%);} 15% {-moz-transform:rotateZ(0deg) translateX(-50%);} 20% {-moz-transform:rotateZ(10deg) translateX(-50%);} 25% {-moz-transform:rotateZ( 0deg) translateX(-50%);} 30% {-moz-transform:rotateZ(10deg) translateX(-50%);} 40% {-moz-transform:rotateZ(-10deg) translateX(-50%);} 50% {-moz-transform:rotateZ(10deg) translateX(-50%);} 60% {-moz-transform:rotateZ(-5deg) translateX(-50%);} 70% {-moz-transform:rotateZ(10deg) translateX(-50%);} 80% {-moz-transform:rotateZ(-10deg) translateX(-50%);} 90% {-moz-transform:rotateZ(5deg) translateX(-50%);} to {-moz-transform:rotateZ(-10deg) translateX(-50%);} } @-webkit-keyframes b7 { from {-webkit-transform:rotateZ(60deg) translateX(50%);} 30% {-webkit-transform:rotateZ(60deg) translateX(50%);} 40% {-webkit-transform:rotateZ(-60deg) translateX(50%);} 50% {-webkit-transform:rotateZ(-60deg) translateX(50%);} 60% {-webkit-transform:rotateZ(60deg) translateX(50%);} 70% {-webkit-transform:rotateZ(-30deg) translateX(50%);} 80% {-webkit-transform:rotateZ(60deg) translateX(50%);} 90% {-webkit-transform:rotateZ(-70deg) translateX(50%);} to {-webkit-transform:rotateZ(60deg) translateX(50%);} } @-moz-keyframes b7 { from {-moz-transform:rotateZ(60deg) translateX(50%);} 30% {-moz-transform:rotateZ(60deg) translateX(50%);} 40% {-moz-transform:rotateZ(-60deg) translateX(50%);} 50% {-moz-transform:rotateZ(-60deg) translateX(50%);} 60% {-moz-transform:rotateZ(60deg) translateX(50%);} 70% {-moz-transform:rotateZ(-30deg) translateX(50%);} 80% {-moz-transform:rotateZ(60deg) translateX(50%);} 90% {-moz-transform:rotateZ(-70deg) translateX(50%);} to {-moz-transform:rotateZ(60deg) translateX(50%);} } @-webkit-keyframes b71 { from {-webkit-transform:rotateZ(10deg) translateX(50%);} 10% {-webkit-transform:rotateZ(15deg) translateX(50%);} 20% {-webkit-transform:rotateZ(5deg) translateX(50%);} 30% {-webkit-transform:rotateZ(15deg) translateX(50%);} 40% {-webkit-transform:rotateZ(-10deg) translateX(50%);} 50% {-webkit-transform:rotateZ(-10deg) translateX(50%);} 60% {-webkit-transform:rotateZ(5deg) translateX(50%);} 70% {-webkit-transform:rotateZ(-10deg) translateX(50%);} 80% {-webkit-transform:rotateZ(10deg) translateX(50%);} 90% {-webkit-transform:rotateZ(-5deg) translateX(50%);} to {-webkit-transform:rotateZ(10deg) translateX(50%);} } @-moz-keyframes b71 { from {-moz-transform:rotateZ(10deg) translateX(50%);} 10% {-moz-transform:rotateZ(15deg) translateX(50%);} 20% {-moz-transform:rotateZ(5deg) translateX(50%);} 30% {-moz-transform:rotateZ(15deg) translateX(50%);} 40% {-moz-transform:rotateZ(-10deg) translateX(50%);} 50% {-moz-transform:rotateZ(-10deg) translateX(50%);} 60% {-moz-transform:rotateZ(5deg) translateX(50%);} 70% {-moz-transform:rotateZ(-10deg) translateX(50%);} 80% {-moz-transform:rotateZ(10deg) translateX(50%);} 90% {-moz-transform:rotateZ(-5deg) translateX(50%);} to {-moz-transform:rotateZ(10deg) translateX(50%);} } #b7 { height:10px; width:16px; background:#82A6BC; border:1px solid #000; right:-16px; top:8px; z-index:-7; -webkit-transform:rotateZ(60deg) translateX(50%); -webkit-animation:b7 6s ease-in-out infinite; -moz-animation:b7 6s ease-in-out infinite; } #b71 { height:10px; width:18px; background:#82A6BC; border:1px solid #000; border-radius:5px; left:20%; top:-1px; z-index:1; -webkit-transform:rotateZ(10deg) translateX(50%); -webkit-animation:b71 6s ease-in-out infinite; -moz-animation:b71 6s ease-in-out infinite; } #ac { left:50%; bottom:-4px; height:20px; width:14px; } #ac #a1 { left:2px; background:#A7C6DB; border:1px solid #000; height:20px; width:8px; border-radius:50px 0 0 50px; z-index:1; border-right:none; } #ac #a2 { left:8px; background:#A7C6DB; border:1px solid #000; height:20px; width:4px; border-radius:100%; z-index:0; } #ac #a3 { height:4px; width:14px; background:#A7C6DB; border:1px solid #000; z-index:-1; border-radius:5px; } #ac .a31 {left:5px; top:1px; -webkit-transform:rotateZ(-20deg);} #ac .a32 {left:6px; top:8px;} #ac .a33 {left:5px; top:15px; -webkit-transform:rotateZ(20deg);} #b8 { left:10px; top:14px; height:46px; width:36px; background:#A7C6DB; z-index:2; } #b8 span { top:20px; right:0; position:absolute; border:1px solid #000; height:4px; width:4px; border-radius:50%; } #b8:before, #b8:after { content: ''; position: absolute; top: 0; left: 0; width: 100%; bottom: 0; z-index: -1; background:#A7C6DB; } #b8:before { -webkit-transform: skew(-5deg); -moz-transform: skew(-5deg); left: 2px; border:1px solid #000; border-left:none; } #b8:after { -webkit-transform: skew(5deg); -moz-transform: skew(5deg); left: -2px; border:1px solid #000; border-right:none; } #text { margin-top:-150px; margin-left:-120px; width:120px; top:50%; left:50%; text-transform:uppercase; color:#BE3E1B; font-size:100%; font-weight:bold; text-shadow:-1px 1px 3px #DBC558, -1px 1px 1px #FFF38F; text-align:center; } div { position:absolute; -webkit-transform-style:preserve-3d; } #page { height:100%; width:100%; -moz-perspective:700px; background-image: -moz-linear-gradient(left , rgb(84,116,137) 0%, rgb(133,160,177) 50%, rgb(84,116,137) 100%); } #container { height:300px; width:300px; top:50%; left:50%; margin-top:-150px; margin-left:-150px; -webkit-box-reflect: below -7px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(10%, transparent), to(rgba(255,255,255,0.2))); } #foot { bottom:0; width:32px; height:20px; } .left {left:90px; -webkit-animation:foot1 6s ease-in-out infinite; -moz-animation:foot1 10s ease-in-out infinite;} .right {right:90px; -webkit-animation:foot2 6s ease-in-out infinite; -moz-animation:foot2 10s ease-in-out infinite;} #leg1 { height:20px; width:12px; background:#FF0; bottom:20%; -webkit-animation:leg1 6s ease-in-out infinite; -moz-animation:leg1 6s ease-in-out infinite; background:#7AA6C1; border:1px solid #000; border-radius:5px; z-index:3; } .first { left:10px; } .next1 { left:-1px; } .next2 { right:-1px; } #leg2 { height:20px; width:12px; background:#7AA6C1; border:1px solid #000; bottom:20%; z-index:3; border-radius:5px; -webkit-animation:leg2 6s ease-in-out infinite; -moz-animation:leg2 6s ease-in-out infinite; } @-webkit-keyframes leg1 { from {-webkit-transform:rotateZ( 0deg) translateY(-50%);} 05% {-webkit-transform:rotateZ(10deg) translateY(-50%);} 10% {-webkit-transform:rotateZ( 0deg) translateY(-50%);} 15% {-webkit-transform:rotateZ(10deg) translateY(-50%);} 20% {-webkit-transform:rotateZ( 0deg) translateY(-50%);} 25% {-webkit-transform:rotateZ( 0deg) translateY(-50%);} 30% {-webkit-transform:rotateZ( 0deg) translateY(-50%);} 35% {-webkit-transform:rotateZ(10deg) translateY(-50%);} 40% {-webkit-transform:rotateZ( 0deg) translateY(-50%);} 45% {-webkit-transform:rotateZ( 0deg) translateY(-50%);} 50% {-webkit-transform:rotateZ(10deg) translateY(-50%);} 55% {-webkit-transform:rotateZ( 0deg) translateY(-50%);} 60% {-webkit-transform:rotateZ(10deg) translateY(-50%);} 65% {-webkit-transform:rotateZ( 0deg) translateY(-50%);} 70% {-webkit-transform:rotateZ(10deg) translateY(-50%);} 80% {-webkit-transform:rotateZ(-10deg) translateY(-50%);} 90% {-webkit-transform:rotateZ(10deg) translateY(-50%);} to {-webkit-transform:rotateZ( 0deg) translateY(-50%);} } @-moz-keyframes leg1 { from {-moz-transform:rotateZ( 0deg) translateY(-50%);} 05% {-moz-transform:rotateZ(10deg) translateY(-50%);} 10% {-moz-transform:rotateZ( 0deg) translateY(-50%);} 15% {-moz-transform:rotateZ(10deg) translateY(-50%);} 20% {-moz-transform:rotateZ( 0deg) translateY(-50%);} 25% {-moz-transform:rotateZ( 0deg) translateY(-50%);} 30% {-moz-transform:rotateZ( 0deg) translateY(-50%);} 35% {-moz-transform:rotateZ(10deg) translateY(-50%);} 40% {-moz-transform:rotateZ( 0deg) translateY(-50%);} 45% {-moz-transform:rotateZ( 0deg) translateY(-50%);} 50% {-moz-transform:rotateZ(10deg) translateY(-50%);} 55% {-moz-transform:rotateZ( 0deg) translateY(-50%);} 60% {-moz-transform:rotateZ(10deg) translateY(-50%);} 65% {-moz-transform:rotateZ( 0deg) translateY(-50%);} 70% {-moz-transform:rotateZ(10deg) translateY(-50%);} 80% {-moz-transform:rotateZ(-10deg) translateY(-50%);} 90% {-moz-transform:rotateZ(10deg) translateY(-50%);} to {-moz-transform:rotateZ( 0deg) translateY(-50%);} } @-webkit-keyframes leg2 { from {-webkit-transform:rotateZ( 0deg) translateY(-50%);} 05% {-webkit-transform:rotateZ(-10deg) translateY(-50%);} 10% {-webkit-transform:rotateZ( 0deg) translateY(-50%);} 15% {-webkit-transform:rotateZ(-10deg) translateY(-50%);} 20% {-webkit-transform:rotateZ( 0deg) translateY(-50%);} 25% {-webkit-transform:rotateZ(-10deg) translateY(-50%);} 30% {-webkit-transform:rotateZ( 0deg) translateY(-50%);} 40% {-webkit-transform:rotateZ( 0deg) translateY(-50%);} 45% {-webkit-transform:rotateZ(-10deg) translateY(-50%);} 50% {-webkit-transform:rotateZ( 0deg) translateY(-50%);} 55% {-webkit-transform:rotateZ(-10deg) translateY(-50%);} 60% {-webkit-transform:rotateZ( 0deg) translateY(-50%);} 65% {-webkit-transform:rotateZ( 0deg) translateY(-50%);} 70% {-webkit-transform:rotateZ( 10deg) translateY(-50%);} 80% {-webkit-transform:rotateZ(-10deg) translateY(-50%);} 90% {-webkit-transform:rotateZ( 10deg) translateY(-50%);} to {-webkit-transform:rotateZ( 0deg) translateY(-50%);} } @-moz-keyframes leg2 { from {-moz-transform:rotateZ( 0deg) translateY(-50%);} 05% {-moz-transform:rotateZ(-10deg) translateY(-50%);} 10% {-moz-transform:rotateZ( 0deg) translateY(-50%);} 15% {-moz-transform:rotateZ(-10deg) translateY(-50%);} 20% {-moz-transform:rotateZ( 0deg) translateY(-50%);} 25% {-moz-transform:rotateZ(-10deg) translateY(-50%);} 30% {-moz-transform:rotateZ( 0deg) translateY(-50%);} 40% {-moz-transform:rotateZ( 0deg) translateY(-50%);} 45% {-moz-transform:rotateZ(-10deg) translateY(-50%);} 50% {-moz-transform:rotateZ( 0deg) translateY(-50%);} 55% {-moz-transform:rotateZ(-10deg) translateY(-50%);} 60% {-moz-transform:rotateZ( 0deg) translateY(-50%);} 65% {-moz-transform:rotateZ( 0deg) translateY(-50%);} 70% {-moz-transform:rotateZ( 10deg) translateY(-50%);} 80% {-moz-transform:rotateZ(-10deg) translateY(-50%);} 90% {-moz-transform:rotateZ( 10deg) translateY(-50%);} to {-moz-transform:rotateZ( 0deg) translateY(-50%);} } @-webkit-keyframes foot1 { from {left:116px;} 05% {left:80px;} 10% {left:116px;} 15% {left:80px;} 20% {left:116px;} 25% {left:116px;} 30% {left:116px;} 35% {left:84px;} 40% {left:116px;} 45% {left:116px;} 50% {left:84px;} 55% {left:116px;} 60% {left:84px;} 65% {left:116px;} to {left:116px;} } @-moz-keyframes foot1 { from {left:116px;} 05% {left:80px;} 10% {left:116px;} 15% {left:80px;} 20% {left:116px;} 25% {left:116px;} 30% {left:116px;} 35% {left:84px;} 40% {left:116px;} 45% {left:116px;} 50% {left:84px;} 55% {left:116px;} 60% {left:84px;} 65% {left:116px;} to {left:116px;} } @-webkit-keyframes foot2 { from {right:116px;} 05% {right:80px;} 10% {right:116px;} 15% {right:80px;} 20% {right:116px;} 25% {right:84px;} 30% {right:116px;} 40% {right:116px;} 45% {right:84px;} 50% {right:116px;} 55% {right:84px;} 60% {right:116px;} to {right:116px;} } @-moz-keyframes foot2 { from {right:116px;} 05% {right:80px;} 10% {right:116px;} 15% {right:80px;} 20% {right:116px;} 25% {right:84px;} 30% {right:116px;} 40% {right:116px;} 45% {right:84px;} 50% {right:116px;} 55% {right:84px;} 60% {right:116px;} to {right:116px;} } #body { height:66px; width:56px; background:#A7C6DB; left:120px; top:140px; z-index:10; -webkit-animation:body 6s ease-in-out infinite; -moz-animation:body 6s ease-in-out infinite; -webkit-perspective:300; } #body:before, #body:after { content: ''; position: absolute; top: 0; left: 0; width: 100%; bottom: 0; z-index: -1; background-color: #A7C6DB; } #body:before { -webkit-transform: skew(-5deg); -moz-transform: skew(-5deg); left: 5px; border-right:1px solid #000; } #body:after { -webkit-transform: skew(5deg); -moz-transform: skew(5deg); left: -5px; border-left:1px solid #000; } @-webkit-keyframes body { from {top:135px; left:122px; -webkit-transform:rotateZ( 0deg);} 05% {top:150px; left:122px; -webkit-transform:rotateZ( 0deg);} 10% {top:135px; left:122px; -webkit-transform:rotateZ( 0deg);} 15% {top:150px; left:122px; -webkit-transform:rotateZ( 0deg);} 20% {top:135px; left:122px; -webkit-transform:rotateZ( 0deg);} 25% {top:148px; left:118px; -webkit-transform:rotateZ( 0deg);} 30% {top:135px; left:122px; -webkit-transform:rotateZ( 0deg);} 35% {top:148px; left:126px; -webkit-transform:rotateZ( 0deg);} 40% {top:135px; left:122px; -webkit-transform:rotateZ( 0deg);} 45% {top:148px; left:118px; -webkit-transform:rotateZ( 0deg);} 50% {top:148px; left:126px; -webkit-transform:rotateZ( 0deg);} 55% {top:148px; left:118px; -webkit-transform:rotateZ( 0deg);} 60% {top:148px; left:126px; -webkit-transform:rotateZ( 0deg);} 65% {top:135px; left:122px; -webkit-transform:rotateZ( 0deg);} 70% {top:142px; left:129px; -webkit-transform:rotateZ( 10deg) translateX(75%);} 80% {top:142px; left:115px; -webkit-transform:rotateZ(-10deg) translateX(-75%);} 90% {top:142px; left:129px; -webkit-transform:rotateZ( 10deg) translateX(75%);} to {top:135px; left:122px; -webkit-transform:rotateZ( 0deg);} } @-moz-keyframes body { from {top:135px; left:122px; -moz-transform:rotateZ( 0deg);} 05% {top:150px; left:122px; -moz-transform:rotateZ( 0deg);} 10% {top:135px; left:122px; -moz-transform:rotateZ( 0deg);} 15% {top:150px; left:122px; -moz-transform:rotateZ( 0deg);} 20% {top:135px; left:122px; -moz-transform:rotateZ( 0deg);} 25% {top:148px; left:118px; -moz-transform:rotateZ( 0deg);} 30% {top:135px; left:122px; -moz-transform:rotateZ( 0deg);} 35% {top:148px; left:126px; -moz-transform:rotateZ( 0deg);} 40% {top:135px; left:122px; -moz-transform:rotateZ( 0deg);} 45% {top:148px; left:118px; -moz-transform:rotateZ( 0deg);} 50% {top:148px; left:126px; -moz-transform:rotateZ( 0deg);} 55% {top:148px; left:118px; -moz-transform:rotateZ( 0deg);} 60% {top:148px; left:126px; -moz-transform:rotateZ( 0deg);} 65% {top:135px; left:122px; -moz-transform:rotateZ( 0deg);} 70% {top:142px; left:129px; -moz-transform:rotateZ( 10deg) translateX(75%);} 80% {top:142px; left:115px; -moz-transform:rotateZ(-10deg) translateX(-75%);} 90% {top:142px; left:129px; -moz-transform:rotateZ( 10deg) translateX(75%);} to {top:135px; left:122px; -moz-transform:rotateZ( 0deg);} } #f1 { bottom:5px; height:15px; width:100%; border:1px solid #000; border-bottom:none; background:#A7C6DB; border-radius:150px 150px 0 0; z-index:2; } #f2 { height:10px; width:100%; border:1px solid #000; background:#A7C6DB; bottom:0; border-radius:100%; z-index:1; } #b1 { width:102%; height:14px; left:-1px; background-color: #A7C6DB; border:1px solid #000; bottom:-8px; z-index:-2; border-radius:100%; } #b2 { width:60%; bottom:100%; height:28%; left:20%; background-color: #C8DFED; z-index:2; } #b2:before, #b2:after { content: ''; position: absolute; top: 0; left: 0; width: 100%; bottom: 0; z-index: -1; background-color: #C9E0EE; } #b2:before { -webkit-transform: skew(45deg); -moz-transform: skew(45deg); left: 11px; border-right:1px solid #000; } #b2:after { -webkit-transform: skew(-45deg); -moz-transform: skew(-45deg); left: -10px; border-left:1px solid #000; } #b3 { background-color: #C8DFED; border:1px solid #000; border-radius:100%; width:124%; left:-13%; height:12px; z-index:1; top:-6px; } #head { width:36px; height:40px; top:-56px; left:9px; z-index:5; } #h2 { width:100%; height:8px; bottom:-4px; left:1px; background:#A7C6DB; border:1px solid #000; border-radius:100%; z-index:0; } #h1 { width:100%; height:46px; bottom:0; left:1px; background:#A7C6DB; border-left:1px solid #000; border-right:1px solid #000; z-index:1; } #h3 { width:100%; height:38px; bottom:62%; left:1px; background:#A7C6DB; border:1px solid #000; border-radius:100%; z-index:0; } #h4 { height:10px; width:12px; bottom:56px; border:1px solid #000; background:#C4E0EE; z-index:-1; border-radius:100%; left:13px; } #h5 { bottom:64px; background:#76A3C4; border:1px solid #000; width:2px; height:20px; left:18px; z-index:-2; -webkit-animation:h5 4s ease-in-out infinite; -moz-animation:h5 4s ease-in-out infinite; } @-webkit-keyframes h5 { from {bottom:64px;} 25% {bottom:45px;} 50% {bottom:64px;} 60% {bottom:58px;} 70% {bottom:64px;} to {bottom:64px;} } @-moz-keyframes h5 { from {bottom:64px;} 25% {bottom:45px;} 50% {bottom:64px;} 60% {bottom:58px;} 70% {bottom:64px;} to {bottom:64px;} } #h5 span { position:absolute; left:-3px; top:-5px; height:6px; width:6px; background:#CEE9FA; border:1px solid #000; border-radius:100%; } #eyes { width:49px; height:22px; background:#CAE1F1; border:1px solid #000; border-radius:10px; z-index:5; left:-5px; top:-4px; } #e { top:2px; left:2px; right:2px; bottom:2px; background:#231F20; border-radius:10px; overflow:hidden; } #e1 { height:14px; width:16px; background:#FFF; border-radius:100%; top:2px; left:4px; } #e2 { height:14px; width:16px; background:#FFF; border-radius:100%; top:2px; right:4px; } #eye { height:4px; width:4px; border-radius:100%; background:#231F20; top:5px; left:2px; -webkit-animation:eye 5s ease-in-out infinite; -moz-animation:eye 8s ease-in-out infinite; } @-webkit-keyframes eye { from {top:5px; left:2px;} 10% {top:5px; left:10px;} 20% {top:5px; left:2px;} 30% {top:5px; left:2px;} 40% {top:9px; left:9px;} 45% {top:5px; left:6px;} 60% {top:5px; left:6px;} 70% {top:3px; left:2px;} 80% {top:8px; left:2px;} 90% {top:7px; left:10px;} to {top:5px; left:2px;} } @-moz-keyframes eye { from {top:5px; left:2px;} 10% {top:5px; left:10px;} 20% {top:5px; left:2px;} 30% {top:5px; left:2px;} 40% {top:9px; left:9px;} 45% {top:5px; left:6px;} 60% {top:5px; left:6px;} 70% {top:3px; left:2px;} 80% {top:8px; left:2px;} 90% {top:7px; left:10px;} } #e1 span { position:absolute; width:100%; height:4px; background:#231F20; -webkit-animation:eye1 8s ease-in-out infinite; -moz-animation:eye1 8s ease-in-out infinite; } @-webkit-keyframes eye1 { from {height:1px; -webkit-transform:rotateZ( 0deg); left:0px; top:0;} 10% {height:4px; -webkit-transform:rotateZ( 0deg); left:0px; top:0;} 20% {height:2px; -webkit-transform:rotateZ( 0deg); left:0px; top:-1px;} 30% {height:5px; -webkit-transform:rotateZ(30deg); left:5px; top:-1px;} 40% {height:7px; -webkit-transform:rotateZ(30deg); left:5px; top:-1px;} 50% {height:4px; -webkit-transform:rotateZ( 0deg); left:0px; top:-1px;} 70% {height:0px; -webkit-transform:rotateZ( 0deg); left:0px; top:-1px;} 80% {height:8px; -webkit-transform:rotateZ(30deg); left:5px; top:-2px;} 90% {height:5px; -webkit-transform:rotateZ( 0deg); left:0px; top:-1px;} to {height:1px; -webkit-transform:rotateZ( 0deg); left:0px; top:0px;} } @-moz-keyframes eye1 { from {height:1px; -moz-transform:rotateZ( 0deg); left:0px; top:0;} 10% {height:4px; -moz-transform:rotateZ( 0deg); left:0px; top:0;} 20% {height:2px; -moz-transform:rotateZ( 0deg); left:0px; top:-1px;} 30% {height:5px; -moz-transform:rotateZ(30deg); left:5px; top:-1px;} 40% {height:7px; -moz-transform:rotateZ(30deg); left:5px; top:-1px;} 50% {height:4px; -moz-transform:rotateZ( 0deg); left:0px; top:-1px;} 70% {height:0px; -moz-transform:rotateZ( 0deg); left:0px; top:-1px;} 80% {height:8px; -moz-transform:rotateZ(30deg); left:5px; top:-2px;} 90% {height:5px; -moz-transform:rotateZ( 0deg); left:0px; top:-1px;} to {height:1px; -moz-transform:rotateZ( 0deg); left:0px; top:0px;} } #e2 span { position:absolute; width:100%; height:4px; background:#231F20; -webkit-animation:eye2 8s ease-in-out infinite; -moz-animation:eye2 8s ease-in-out infinite; } @-webkit-keyframes eye2 { from {height:1px; -webkit-transform:rotateZ( 0deg); right:0px; top:0;} 10% {height:4px; -webkit-transform:rotateZ( 0deg); right:0px; top:0;} 20% {height:2px; -webkit-transform:rotateZ( 0deg); right:0px; top:-1px;} 30% {height:5px; -webkit-transform:rotateZ(-30deg); right:5px; top:-1px;} 40% {height:7px; -webkit-transform:rotateZ(-30deg); right:5px; top:-1px;} 50% {height:4px; -webkit-transform:rotateZ( 0deg); right:0px; top:-1px;} 70% {height:0px; -webkit-transform:rotateZ( 0deg); right:0px; top:-1px;} 80% {height:8px; -webkit-transform:rotateZ(-30deg); right:5px; top:-2px;} 90% {height:5px; -webkit-transform:rotateZ( 0deg); right:0px; top:-1px;} to {height:1px; -webkit-transform:rotateZ( 0deg); right:0px; top:0px;} } @-moz-keyframes eye2 { from {height:1px; -moz-transform:rotateZ( 0deg); right:0px; top:0;} 10% {height:4px; -moz-transform:rotateZ( 0deg); right:0px; top:0;} 20% {height:2px; -moz-transform:rotateZ( 0deg); right:0px; top:-1px;} 30% {height:5px; -moz-transform:rotateZ(-30deg); right:5px; top:-1px;} 40% {height:7px; -moz-transform:rotateZ(-30deg); right:5px; top:-1px;} 50% {height:4px; -moz-transform:rotateZ( 0deg); right:0px; top:-1px;} 70% {height:0px; -moz-transform:rotateZ( 0deg); right:0px; top:-1px;} 80% {height:8px; -moz-transform:rotateZ(-30deg); right:5px; top:-2px;} 90% {height:5px; -moz-transform:rotateZ( 0deg); right:0px; top:-1px;} to {height:1px; -moz-transform:rotateZ( 0deg); right:0px; top:0px;} } #mouth { top:23px; left:3px; height:14px; width:32px; background:#FFF; border:1px solid #000; z-index:5; border-radius:7px; overflow:hidden; } #mouth span { display:block; float:left; width:1px; height:14px; background:#150B13; margin-left:5px; } #mouth span:first-child { margin-left:3px; } #m1 { top:9px; width:100%; height:20px; border-top:1px solid #000; border-radius:100%; -webkit-animation:m1 4s ease-in-out infinite; -moz-animation:m1 4s ease-in-out infinite; } @-webkit-keyframes m1 { from {border-radius:0%; width:100%; left:0;} 25% {border-radius:40%; width:200%; left:0;} 50% {border-radius:0%; width:100%; left:0;} 75% {border-radius:100%; width:200%; left:-50%;} to {border-radius:0%; width:100%; left:0;} } @-moz-keyframes m1 { from {border-radius:0%; width:100%; left:0;} 25% {border-radius:40%; width:200%; left:0;} 50% {border-radius:0%; width:100%; left:0;} 75% {border-radius:100%; width:200%; left:-50%;} to {border-radius:0%; width:100%; left:0;} } #m2 { bottom:8px; width:100%; height:20px; border-bottom:1px solid #000; border-radius:100%; -webkit-animation:m1 4s ease-in-out infinite; -moz-animation:m1 4s ease-in-out infinite; } #b4 { height:20px; width:10px; background:#AAC6DE; border:1px solid #000; border-radius:100%; left:-12px; top:2px; z-index:-5; } #ab { right:50%; top:-5px; height:20px; width:14px; } #ab #a1 { right:2px; background:#A7C6DB; border:1px solid #000; height:20px; width:8px; border-radius:0 50px 50px 0; z-index:1; border-left:none; } #ab #a2 { right:8px; background:#A7C6DB; border:1px solid #000; height:20px; width:4px; border-radius:100%; z-index:0; } #ab #a3 { height:4px; width:14px; background:#A7C6DB; border:1px solid #000; z-index:-1; border-radius:5px; } #ab .a31 {right:5px; top:1px; -webkit-transform:rotateZ(20deg);} #ab .a32 {right:6px; top:8px;} #ab .a33 {right:5px; top:15px; -webkit-transform:rotateZ(-20deg);} #b6 { height:20px; width:10px; background:#AAC6DE; border:1px solid #000; border-radius:100%; right:-12px; top:2px; z-index:-5; } #b5 { height:10px; width:16px; background:#82A6BC; border:1px solid #000; left:-16px; top:8px; z-index:-7; -webkit-transform:rotateZ(-60deg) translateX(-50%); -webkit-animation:b5 6s ease-in-out infinite; -moz-animation:b5 6s ease-in-out infinite; } #b51 { height:10px; width:18px; background:#82A6BC; border:1px solid #000; border-radius:5px; right:20%; top:-1px; z-index:1; -webkit-transform:rotateZ(-10deg) translateX(-50%); -webkit-animation:b51 6s ease-in-out infinite; -moz-animation:b51 6s ease-in-out infinite; } @-webkit-keyframes b5 { from {-webkit-transform:rotateZ(-60deg) translateX(-50%);} 10% {-webkit-transform:rotateZ(50deg) translateX(-50%);} 20% {-webkit-transform:rotateZ(50deg) translateX(-50%);} 30% {-webkit-transform:rotateZ(50deg) translateX(-50%);} 40% {-webkit-transform:rotateZ(-50deg) translateX(-50%);} 50% {-webkit-transform:rotateZ(60deg) translateX(-50%);} 60% {-webkit-transform:rotateZ(-60deg) translateX(-50%);} 70% {-webkit-transform:rotateZ(30deg) translateX(-50%);} 80% {-webkit-transform:rotateZ(-60deg) translateX(-50%);} 90% {-webkit-transform:rotateZ(70deg) translateX(-50%);} to {-webkit-transform:rotateZ(-60deg) translateX(-50%);} } @-moz-keyframes b5 { from {-moz-transform:rotateZ(-60deg) translateX(-50%);} 10% {-moz-transform:rotateZ(50deg) translateX(-50%);} 20% {-moz-transform:rotateZ(50deg) translateX(-50%);} 30% {-moz-transform:rotateZ(50deg) translateX(-50%);} 40% {-moz-transform:rotateZ(-50deg) translateX(-50%);} 50% {-moz-transform:rotateZ(60deg) translateX(-50%);} 60% {-moz-transform:rotateZ(-60deg) translateX(-50%);} 70% {-moz-transform:rotateZ(30deg) translateX(-50%);} 80% {-moz-transform:rotateZ(-60deg) translateX(-50%);} 90% {-moz-transform:rotateZ(70deg) translateX(-50%);} to {-moz-transform:rotateZ(-60deg) translateX(-50%);} } @-webkit-keyframes b51 { from {-webkit-transform:rotateZ(-10deg) translateX(-50%);} 10% {-webkit-transform:rotateZ(10deg) translateX(-50%);} 15% {-webkit-transform:rotateZ(0deg) translateX(-50%);} 20% {-webkit-transform:rotateZ(10deg) translateX(-50%);} 25% {-webkit-transform:rotateZ( 0deg) translateX(-50%);} 30% {-webkit-transform:rotateZ(10deg) translateX(-50%);} 40% {-webkit-transform:rotateZ(-10deg) translateX(-50%);} 50% {-webkit-transform:rotateZ(10deg) translateX(-50%);} 60% {-webkit-transform:rotateZ(-5deg) translateX(-50%);} 70% {-webkit-transform:rotateZ(10deg) translateX(-50%);} 80% {-webkit-transform:rotateZ(-10deg) translateX(-50%);} 90% {-webkit-transform:rotateZ(5deg) translateX(-50%);} to {-webkit-transform:rotateZ(-10deg) translateX(-50%);} } @-moz-keyframes b51 { from {-moz-transform:rotateZ(-10deg) translateX(-50%);} 10% {-moz-transform:rotateZ(10deg) translateX(-50%);} 15% {-moz-transform:rotateZ(0deg) translateX(-50%);} 20% {-moz-transform:rotateZ(10deg) translateX(-50%);} 25% {-moz-transform:rotateZ( 0deg) translateX(-50%);} 30% {-moz-transform:rotateZ(10deg) translateX(-50%);} 40% {-moz-transform:rotateZ(-10deg) translateX(-50%);} 50% {-moz-transform:rotateZ(10deg) translateX(-50%);} 60% {-moz-transform:rotateZ(-5deg) translateX(-50%);} 70% {-moz-transform:rotateZ(10deg) translateX(-50%);} 80% {-moz-transform:rotateZ(-10deg) translateX(-50%);} 90% {-moz-transform:rotateZ(5deg) translateX(-50%);} to {-moz-transform:rotateZ(-10deg) translateX(-50%);} } @-webkit-keyframes b7 { from {-webkit-transform:rotateZ(60deg) translateX(50%);} 30% {-webkit-transform:rotateZ(60deg) translateX(50%);} 40% {-webkit-transform:rotateZ(-60deg) translateX(50%);} 50% {-webkit-transform:rotateZ(-60deg) translateX(50%);} 60% {-webkit-transform:rotateZ(60deg) translateX(50%);} 70% {-webkit-transform:rotateZ(-30deg) translateX(50%);} 80% {-webkit-transform:rotateZ(60deg) translateX(50%);} 90% {-webkit-transform:rotateZ(-70deg) translateX(50%);} to {-webkit-transform:rotateZ(60deg) translateX(50%);} } @-moz-keyframes b7 { from {-moz-transform:rotateZ(60deg) translateX(50%);} 30% {-moz-transform:rotateZ(60deg) translateX(50%);} 40% {-moz-transform:rotateZ(-60deg) translateX(50%);} 50% {-moz-transform:rotateZ(-60deg) translateX(50%);} 60% {-moz-transform:rotateZ(60deg) translateX(50%);} 70% {-moz-transform:rotateZ(-30deg) translateX(50%);} 80% {-moz-transform:rotateZ(60deg) translateX(50%);} 90% {-moz-transform:rotateZ(-70deg) translateX(50%);} to {-moz-transform:rotateZ(60deg) translateX(50%);} } @-webkit-keyframes b71 { from {-webkit-transform:rotateZ(10deg) translateX(50%);} 10% {-webkit-transform:rotateZ(15deg) translateX(50%);} 20% {-webkit-transform:rotateZ(5deg) translateX(50%);} 30% {-webkit-transform:rotateZ(15deg) translateX(50%);} 40% {-webkit-transform:rotateZ(-10deg) translateX(50%);} 50% {-webkit-transform:rotateZ(-10deg) translateX(50%);} 60% {-webkit-transform:rotateZ(5deg) translateX(50%);} 70% {-webkit-transform:rotateZ(-10deg) translateX(50%);} 80% {-webkit-transform:rotateZ(10deg) translateX(50%);} 90% {-webkit-transform:rotateZ(-5deg) translateX(50%);} to {-webkit-transform:rotateZ(10deg) translateX(50%);} } @-moz-keyframes b71 { from {-moz-transform:rotateZ(10deg) translateX(50%);} 10% {-moz-transform:rotateZ(15deg) translateX(50%);} 20% {-moz-transform:rotateZ(5deg) translateX(50%);} 30% {-moz-transform:rotateZ(15deg) translateX(50%);} 40% {-moz-transform:rotateZ(-10deg) translateX(50%);} 50% {-moz-transform:rotateZ(-10deg) translateX(50%);} 60% {-moz-transform:rotateZ(5deg) translateX(50%);} 70% {-moz-transform:rotateZ(-10deg) translateX(50%);} 80% {-moz-transform:rotateZ(10deg) translateX(50%);} 90% {-moz-transform:rotateZ(-5deg) translateX(50%);} to {-moz-transform:rotateZ(10deg) translateX(50%);} } #b7 { height:10px; width:16px; background:#82A6BC; border:1px solid #000; right:-16px; top:8px; z-index:-7; -webkit-transform:rotateZ(60deg) translateX(50%); -webkit-animation:b7 6s ease-in-out infinite; -moz-animation:b7 6s ease-in-out infinite; } #b71 { height:10px; width:18px; background:#82A6BC; border:1px solid #000; border-radius:5px; left:20%; top:-1px; z-index:1; -webkit-transform:rotateZ(10deg) translateX(50%); -webkit-animation:b71 6s ease-in-out infinite; -moz-animation:b71 6s ease-in-out infinite; } #ac { left:50%; bottom:-4px; height:20px; width:14px; } #ac #a1 { left:2px; background:#A7C6DB; border:1px solid #000; height:20px; width:8px; border-radius:50px 0 0 50px; z-index:1; border-right:none; } #ac #a2 { left:8px; background:#A7C6DB; border:1px solid #000; height:20px; width:4px; border-radius:100%; z-index:0; } #ac #a3 { height:4px; width:14px; background:#A7C6DB; border:1px solid #000; z-index:-1; border-radius:5px; } #ac .a31 {left:5px; top:1px; -webkit-transform:rotateZ(-20deg);} #ac .a32 {left:6px; top:8px;} #ac .a33 {left:5px; top:15px; -webkit-transform:rotateZ(20deg);} #b8 { left:10px; top:14px; height:46px; width:36px; background:#A7C6DB; z-index:2; } #b8 span { top:20px; right:0; position:absolute; border:1px solid #000; height:4px; width:4px; border-radius:50%; } #b8:before, #b8:after { content: ''; position: absolute; top: 0; left: 0; width: 100%; bottom: 0; z-index: -1; background:#A7C6DB; } #b8:before { -webkit-transform: skew(-5deg); -moz-transform: skew(-5deg); left: 2px; border:1px solid #000; border-left:none; } #b8:after { -webkit-transform: skew(5deg); -moz-transform: skew(5deg); left: -2px; border:1px solid #000; border-right:none; }
willCode2Surf/bender
_site/css/style.css
CSS
mit
53,622
<?php namespace App\Model\Table; use Cake\ORM\Query; use Cake\ORM\RulesChecker; use Cake\ORM\Table; use Cake\Validation\Validator; /** * Games Model * * @property \Cake\ORM\Association\HasMany $Wrestlers * @property \Cake\ORM\Association\BelongsToMany $Abilities * @property \Cake\ORM\Association\BelongsToMany $Attributes * @property \Cake\ORM\Association\BelongsToMany $Platforms * * @method \App\Model\Entity\Game get($primaryKey, $options = []) * @method \App\Model\Entity\Game newEntity($data = null, array $options = []) * @method \App\Model\Entity\Game[] newEntities(array $data, array $options = []) * @method \App\Model\Entity\Game|bool save(\Cake\Datasource\EntityInterface $entity, $options = []) * @method \App\Model\Entity\Game patchEntity(\Cake\Datasource\EntityInterface $entity, array $data, array $options = []) * @method \App\Model\Entity\Game[] patchEntities($entities, array $data, array $options = []) * @method \App\Model\Entity\Game findOrCreate($search, callable $callback = null, $options = []) */ class GamesTable extends Table { /** * Initialize method * * @param array $config The configuration for the Table. * @return void */ public function initialize(array $config) { parent::initialize($config); $this->setTable('games'); $this->setDisplayField('game_name'); $this->setPrimaryKey('id'); $this->hasMany('Wrestlers', [ 'foreignKey' => 'game_id' ]); $this->belongsToMany('Abilities', [ 'foreignKey' => 'game_id', 'targetForeignKey' => 'ability_id', 'joinTable' => 'abilities_games' ]); $this->belongsToMany('Attributes', [ 'foreignKey' => 'game_id', 'targetForeignKey' => 'attribute_id', 'joinTable' => 'attributes_games' ]); $this->belongsToMany('Platforms', [ 'foreignKey' => 'game_id', 'targetForeignKey' => 'platform_id', 'joinTable' => 'games_platforms' ]); $this->belongsTo('WeightClasses', [ 'foreignKey' => 'game_id', 'targetForeignKey' => 'weight_class_id', 'joinType' => 'weight_classes' ]); $this->belongsTo('Reactions', [ 'foreignKey' => 'game_id', 'targetForeignKey' => 'reaction_id', 'joinType' => 'reactions' ]); } /** * Default validation rules. * * @param \Cake\Validation\Validator $validator Validator instance. * @return \Cake\Validation\Validator */ public function validationDefault(Validator $validator) { $validator ->integer('id') ->allowEmpty('id', 'create'); $validator ->requirePresence('game_name', 'create') ->notEmpty('game_name'); $validator ->requirePresence('release_year', 'create') ->notEmpty('release_year'); return $validator; } }
spskeen/wgdb
src/Model/Table/GamesTable.php
PHP
mit
3,029
import Kanna public final class WebPageParser: Operation { public enum SearchType { case feeds case links case `default` var acceptableTypes: [String] { switch self { case .feeds: return [ "application/rss+xml", "application/rdf+xml", "application/atom+xml", "application/xml", "text/xml" ] case .links, .default: return [] } } } private let webPage: String private let callback: ([URL]) -> Void private var urls = [URL]() public var searchType: SearchType = .default public init(string: String, callback: @escaping ([URL]) -> Void) { self.webPage = string self.callback = callback super.init() } public override func main() { if let doc = try? Kanna.HTML(html: self.webPage, encoding: String.Encoding.utf8) { switch self.searchType { case .feeds: for link in doc.xpath("//link") where link["rel"] == "alternate" && self.searchType.acceptableTypes.contains(link["type"] ?? "") { if let urlString = link["href"], let url = URL(string: urlString) { self.urls.append(url as URL) } } case .links: for link in doc.xpath("//a") { if let urlString = link["href"], let url = URL(string: urlString) { self.urls.append(url as URL) } } default: break } } self.callback(self.urls) } }
younata/RSSClient
TethysKit/WebPageParser.swift
Swift
mit
1,804
//--------------------------------------------------------------------------- // // File: TextEditorCharacters.cs // // Copyright (C) Microsoft Corporation. All rights reserved. // // Description: A component of TextEditor supporting character formatting commands // //--------------------------------------------------------------------------- namespace System.Windows.Documents { using MS.Internal; using System.Globalization; using System.Threading; using System.ComponentModel; using System.Text; using System.Collections; // ArrayList using System.Runtime.InteropServices; using System.Windows.Threading; using System.Windows.Input; using System.Windows.Controls; // ScrollChangedEventArgs using System.Windows.Controls.Primitives; // CharacterCasing, TextBoxBase using System.Windows.Media; using System.Windows.Markup; using MS.Utility; using MS.Win32; using MS.Internal.Documents; using MS.Internal.Commands; // CommandHelpers /// <summary> /// Text editing service for controls. /// </summary> internal static class TextEditorCharacters { //------------------------------------------------------ // // Class Internal Methods // //------------------------------------------------------ #region Class Internal Methods // Registers all text editing command handlers for a given control type internal static void _RegisterClassHandlers(Type controlType, bool registerEventListeners) { var onQueryStatusNYI = new CanExecuteRoutedEventHandler(OnQueryStatusNYI); // Editing Commands: Character Editing // ----------------------------------- CommandHelpers.RegisterCommandHandler(controlType, EditingCommands.ResetFormat , new ExecutedRoutedEventHandler(OnResetFormat) , onQueryStatusNYI, SRID.KeyResetFormat, SRID.KeyResetFormatDisplayString); CommandHelpers.RegisterCommandHandler(controlType, EditingCommands.ToggleBold , new ExecutedRoutedEventHandler(OnToggleBold) , onQueryStatusNYI, SRID.KeyToggleBold, SRID.KeyToggleBoldDisplayString); CommandHelpers.RegisterCommandHandler(controlType, EditingCommands.ToggleItalic , new ExecutedRoutedEventHandler(OnToggleItalic) , onQueryStatusNYI, SRID.KeyToggleItalic, SRID.KeyToggleItalicDisplayString); CommandHelpers.RegisterCommandHandler(controlType, EditingCommands.ToggleUnderline , new ExecutedRoutedEventHandler(OnToggleUnderline) , onQueryStatusNYI, SRID.KeyToggleUnderline, SRID.KeyToggleUnderlineDisplayString); CommandHelpers.RegisterCommandHandler(controlType, EditingCommands.ToggleSubscript , new ExecutedRoutedEventHandler(OnToggleSubscript) , onQueryStatusNYI, SRID.KeyToggleSubscript, SRID.KeyToggleSubscriptDisplayString); CommandHelpers.RegisterCommandHandler(controlType, EditingCommands.ToggleSuperscript , new ExecutedRoutedEventHandler(OnToggleSuperscript) , onQueryStatusNYI, SRID.KeyToggleSuperscript, SRID.KeyToggleSuperscriptDisplayString); CommandHelpers.RegisterCommandHandler(controlType, EditingCommands.IncreaseFontSize , new ExecutedRoutedEventHandler(OnIncreaseFontSize) , onQueryStatusNYI, SRID.KeyIncreaseFontSize, SRID.KeyIncreaseFontSizeDisplayString); CommandHelpers.RegisterCommandHandler(controlType, EditingCommands.DecreaseFontSize , new ExecutedRoutedEventHandler(OnDecreaseFontSize) , onQueryStatusNYI, SRID.KeyDecreaseFontSize, SRID.KeyDecreaseFontSizeDisplayString); CommandHelpers.RegisterCommandHandler(controlType, EditingCommands.ApplyFontSize , new ExecutedRoutedEventHandler(OnApplyFontSize) , onQueryStatusNYI, SRID.KeyApplyFontSize, SRID.KeyApplyFontSizeDisplayString); CommandHelpers.RegisterCommandHandler(controlType, EditingCommands.ApplyFontFamily , new ExecutedRoutedEventHandler(OnApplyFontFamily) , onQueryStatusNYI, SRID.KeyApplyFontFamily, SRID.KeyApplyFontFamilyDisplayString); CommandHelpers.RegisterCommandHandler(controlType, EditingCommands.ApplyForeground , new ExecutedRoutedEventHandler(OnApplyForeground) , onQueryStatusNYI, SRID.KeyApplyForeground, SRID.KeyApplyForegroundDisplayString); CommandHelpers.RegisterCommandHandler(controlType, EditingCommands.ApplyBackground , new ExecutedRoutedEventHandler(OnApplyBackground) , onQueryStatusNYI, SRID.KeyApplyBackground, SRID.KeyApplyBackgroundDisplayString); CommandHelpers.RegisterCommandHandler(controlType, EditingCommands.ToggleSpellCheck , new ExecutedRoutedEventHandler(OnToggleSpellCheck) , onQueryStatusNYI, SRID.KeyToggleSpellCheck, SRID.KeyToggleSpellCheckDisplayString); CommandHelpers.RegisterCommandHandler(controlType, EditingCommands.ApplyInlineFlowDirectionRTL , new ExecutedRoutedEventHandler(OnApplyInlineFlowDirectionRTL), new CanExecuteRoutedEventHandler(OnQueryStatusNYI)); CommandHelpers.RegisterCommandHandler(controlType, EditingCommands.ApplyInlineFlowDirectionLTR , new ExecutedRoutedEventHandler(OnApplyInlineFlowDirectionLTR), new CanExecuteRoutedEventHandler(OnQueryStatusNYI)); } // A common method for all formatting commands. // Applies a property to current selection. // Takes care of toggling operations (like bold/italic). // Creates undo unit for this action. internal static void _OnApplyProperty(TextEditor This, DependencyProperty formattingProperty, object propertyValue) { _OnApplyProperty(This, formattingProperty, propertyValue, /*applyToParagraphs*/false, PropertyValueAction.SetValue); } internal static void _OnApplyProperty(TextEditor This, DependencyProperty formattingProperty, object propertyValue, bool applyToParagraphs) { _OnApplyProperty(This, formattingProperty, propertyValue, applyToParagraphs, PropertyValueAction.SetValue); } internal static void _OnApplyProperty(TextEditor This, DependencyProperty formattingProperty, object propertyValue, bool applyToParagraphs, PropertyValueAction propertyValueAction) { if (This == null || !This._IsEnabled || This.IsReadOnly || !This.AcceptsRichContent || !(This.Selection is TextSelection)) { return; } // Check whether the property is known if (!TextSchema.IsParagraphProperty(formattingProperty) && !TextSchema.IsCharacterProperty(formattingProperty)) { Invariant.Assert(false, "The property '" + formattingProperty.Name + "' is unknown to TextEditor"); return; } TextSelection selection = (TextSelection)This.Selection; if (TextSchema.IsStructuralCharacterProperty(formattingProperty) && !TextRangeEdit.CanApplyStructuralInlineProperty(selection.Start, selection.End)) { // Ignore structural commands fires in inappropriate context. return; } TextEditorTyping._FlushPendingInputItems(This); // Forget previously suggested horizontal position TextEditorSelection._ClearSuggestedX(This); // Break merged typing sequence TextEditorTyping._BreakTypingSequence(This); // Apply property selection.ApplyPropertyValue(formattingProperty, propertyValue, applyToParagraphs, propertyValueAction); } #endregion Class Internal Methods //------------------------------------------------------ // // Private Methods // //------------------------------------------------------ #region Private Methods // ................................................................ // // Editing Commands: Character Editing // // ................................................................ private static void OnResetFormat(object target, ExecutedRoutedEventArgs args) { TextEditor This = TextEditor._GetTextEditor(target); if (This == null || !This._IsEnabled || This.IsReadOnly || !This.AcceptsRichContent || !(This.Selection.Start is TextPointer)) { return; } TextEditorTyping._FlushPendingInputItems(This); using (This.Selection.DeclareChangeBlock()) { // Positions to clear all inline formatting properties TextPointer startResetFormatPosition = (TextPointer)This.Selection.Start; TextPointer endResetFormatPosition = (TextPointer)This.Selection.End; if (This.Selection.IsEmpty) { TextSegment autoWordRange = TextRangeBase.GetAutoWord(This.Selection); if (autoWordRange.IsNull) { // Clear springloaded formatting ((TextSelection)This.Selection).ClearSpringloadFormatting(); return; } else { // If we have a word, apply reset format to it startResetFormatPosition = (TextPointer)autoWordRange.Start; endResetFormatPosition = (TextPointer)autoWordRange.End; } } // Forget previously suggested horizontal position TextEditorSelection._ClearSuggestedX(This); // Clear all inline formattings TextRangeEdit.CharacterResetFormatting(startResetFormatPosition, endResetFormatPosition); } } /// <summary> /// ToggleBold command event handler. /// </summary> private static void OnToggleBold(object target, ExecutedRoutedEventArgs args) { TextEditor This = TextEditor._GetTextEditor(target); if (This == null || !This._IsEnabled || This.IsReadOnly || !This.AcceptsRichContent || !(This.Selection is TextSelection)) { return; } TextEditorTyping._FlushPendingInputItems(This); object propertyValue = ((TextSelection)This.Selection).GetCurrentValue(TextElement.FontWeightProperty); FontWeight fontWeight = (propertyValue != DependencyProperty.UnsetValue && (FontWeight)propertyValue == FontWeights.Bold) ? FontWeights.Normal : FontWeights.Bold; TextEditorCharacters._OnApplyProperty(This, TextElement.FontWeightProperty, fontWeight); } /// <summary> /// ToggleItalic command event handler. /// </summary> private static void OnToggleItalic(object target, ExecutedRoutedEventArgs args) { TextEditor This = TextEditor._GetTextEditor(target); if (This == null || !This._IsEnabled || This.IsReadOnly || !This.AcceptsRichContent || !(This.Selection is TextSelection)) { return; } TextEditorTyping._FlushPendingInputItems(This); object propertyValue = ((TextSelection)This.Selection).GetCurrentValue(TextElement.FontStyleProperty); FontStyle fontStyle = (propertyValue != DependencyProperty.UnsetValue && (FontStyle)propertyValue == FontStyles.Italic) ? FontStyles.Normal : FontStyles.Italic; TextEditorCharacters._OnApplyProperty(This, TextElement.FontStyleProperty, fontStyle); // Update the caret to show it as italic or normal caret. This.Selection.RefreshCaret(); } /// <summary> /// ToggleUnderline command event handler. /// </summary> private static void OnToggleUnderline(object target, ExecutedRoutedEventArgs args) { TextEditor This = TextEditor._GetTextEditor(target); if (This == null || !This._IsEnabled || This.IsReadOnly || !This.AcceptsRichContent || !(This.Selection is TextSelection)) { return; } TextEditorTyping._FlushPendingInputItems(This); object propertyValue = ((TextSelection)This.Selection).GetCurrentValue(Inline.TextDecorationsProperty); TextDecorationCollection textDecorations = propertyValue != DependencyProperty.UnsetValue ? (TextDecorationCollection)propertyValue : null; if (!TextSchema.HasTextDecorations(textDecorations)) { textDecorations = TextDecorations.Underline; } else { textDecorations = new TextDecorationCollection(); // empty collection - no underline } TextEditorCharacters._OnApplyProperty(This, Inline.TextDecorationsProperty, textDecorations); } // Command handler for Ctrl+"+" key (non-numpad) private static void OnToggleSubscript(object sender, ExecutedRoutedEventArgs args) { TextEditor This = TextEditor._GetTextEditor(sender); if (This == null || !This._IsEnabled || This.IsReadOnly || !This.AcceptsRichContent || !(This.Selection is TextSelection)) { return; } TextEditorTyping._FlushPendingInputItems(This); FontVariants fontVariants = (FontVariants)((TextSelection)This.Selection).GetCurrentValue(Typography.VariantsProperty); fontVariants = fontVariants == FontVariants.Subscript ? FontVariants.Normal : FontVariants.Subscript; TextEditorCharacters._OnApplyProperty(This, Typography.VariantsProperty, fontVariants); } // Command handler fro Ctrl+Shift+"+" (non-numpad) private static void OnToggleSuperscript(object sender, ExecutedRoutedEventArgs args) { TextEditor This = TextEditor._GetTextEditor(sender); if (This == null || !This._IsEnabled || This.IsReadOnly || !This.AcceptsRichContent || !(This.Selection is TextSelection)) { return; } TextEditorTyping._FlushPendingInputItems(This); FontVariants fontVariants = (FontVariants)((TextSelection)This.Selection).GetCurrentValue(Typography.VariantsProperty); fontVariants = fontVariants == FontVariants.Superscript ? FontVariants.Normal : FontVariants.Superscript; TextEditorCharacters._OnApplyProperty(This, Typography.VariantsProperty, fontVariants); } // Used in IncreaseFontSize and DecreaseFontSize commands internal const double OneFontPoint = 72.0 / 96.0; // The limiting constant is taken from Word UI - it suggests to choose font size from a range between 1 and 1638. // internal const double MaxFontPoint = 1638.0; /// <summary> /// IncreaseFontSize command event handler /// </summary> private static void OnIncreaseFontSize(object target, ExecutedRoutedEventArgs args) { TextEditor This = TextEditor._GetTextEditor(target); if (This == null || !This._IsEnabled || This.IsReadOnly || !This.AcceptsRichContent || !(This.Selection is TextSelection)) { return; } TextEditorTyping._FlushPendingInputItems(This); if (This.Selection.IsEmpty) { // Springload an increased font size double fontSize = (double)((TextSelection)This.Selection).GetCurrentValue(TextElement.FontSizeProperty); if (fontSize == 0.0) { return; // no characters available for font operation } if (fontSize < TextEditorCharacters.MaxFontPoint) { fontSize += TextEditorCharacters.OneFontPoint; if (fontSize > TextEditorCharacters.MaxFontPoint) { fontSize = TextEditorCharacters.MaxFontPoint; } // The limiting constant is taken from Word UI - it suggests to choose font size from a range between 1 and 1638. TextEditorCharacters._OnApplyProperty(This, TextElement.FontSizeProperty, fontSize); } } else { // Apply font size in incremental mode to a nonempty selection TextEditorCharacters._OnApplyProperty(This, TextElement.FontSizeProperty, OneFontPoint, /*applyToParagraphs:*/false, PropertyValueAction.IncreaseByAbsoluteValue); } } /// <summary> /// DecreaseFontSize command event handler /// </summary> private static void OnDecreaseFontSize(object target, ExecutedRoutedEventArgs args) { TextEditor This = TextEditor._GetTextEditor(target); if (This == null || !This._IsEnabled || This.IsReadOnly || !This.AcceptsRichContent || !(This.Selection is TextSelection)) { return; } TextEditorTyping._FlushPendingInputItems(This); if (This.Selection.IsEmpty) { // Springload a decreased font size double fontSize = (double)((TextSelection)This.Selection).GetCurrentValue(TextElement.FontSizeProperty); if (fontSize == 0.0) { return; // no characters available for font operation } if (fontSize > TextEditorCharacters.OneFontPoint) { fontSize -= TextEditorCharacters.OneFontPoint; if (fontSize < TextEditorCharacters.OneFontPoint) { fontSize = TextEditorCharacters.OneFontPoint; } TextEditorCharacters._OnApplyProperty(This, TextElement.FontSizeProperty, fontSize); } } else { // Apply font size in decremental mode to a nonempty selection TextEditorCharacters._OnApplyProperty(This, TextElement.FontSizeProperty, OneFontPoint, /*applyToParagraphs:*/false, PropertyValueAction.DecreaseByAbsoluteValue); } } /// <summary> /// ApplyFontSize command event handler. /// </summary> private static void OnApplyFontSize(object target, ExecutedRoutedEventArgs args) { if (args.Parameter == null) { return; // Ignore the command if no argument provided } TextEditor This = TextEditor._GetTextEditor(target); TextEditorCharacters._OnApplyProperty(This, TextElement.FontSizeProperty, args.Parameter); } /// <summary> /// ApplyFontFamily command event handler. /// </summary> private static void OnApplyFontFamily(object target, ExecutedRoutedEventArgs args) { if (args.Parameter == null) { return; // Ignore the command if no argument provided } TextEditor This = TextEditor._GetTextEditor(target); TextEditorCharacters._OnApplyProperty(This, TextElement.FontFamilyProperty, args.Parameter); } /// <summary> /// ApplyForeground command event handler. /// </summary> private static void OnApplyForeground(object target, ExecutedRoutedEventArgs args) { if (args.Parameter == null) { return; // Ignore the command if no argument provided } TextEditor This = TextEditor._GetTextEditor(target); TextEditorCharacters._OnApplyProperty(This, TextElement.ForegroundProperty, args.Parameter); } /// <summary> /// ApplyBackground command event handler. /// </summary> private static void OnApplyBackground(object target, ExecutedRoutedEventArgs args) { if (args.Parameter == null) { return; // Ignore the command if no argument provided } TextEditor This = TextEditor._GetTextEditor(target); TextEditorCharacters._OnApplyProperty(This, TextElement.BackgroundProperty, args.Parameter); } /// <summary> /// ToggleSpellCheck command event handler. /// </summary> private static void OnToggleSpellCheck(object target, ExecutedRoutedEventArgs args) { TextEditor This = TextEditor._GetTextEditor(target); if (This == null || !This._IsEnabled || This.IsReadOnly) { return; } This.IsSpellCheckEnabled = !This.IsSpellCheckEnabled; } /// <summary> /// ApplyInlineFlowDirectionRTL command event handler. /// </summary> private static void OnApplyInlineFlowDirectionRTL(object target, ExecutedRoutedEventArgs args) { TextEditor This = TextEditor._GetTextEditor(target); TextEditorCharacters._OnApplyProperty(This, Inline.FlowDirectionProperty, FlowDirection.RightToLeft); } /// <summary> /// ApplyInlineFlowDirectionLTR command event handler. /// </summary> private static void OnApplyInlineFlowDirectionLTR(object target, ExecutedRoutedEventArgs args) { TextEditor This = TextEditor._GetTextEditor(target); TextEditorCharacters._OnApplyProperty(This, Inline.FlowDirectionProperty, FlowDirection.LeftToRight); } // ---------------------------------------------------------- // // Misceleneous Commands // // ---------------------------------------------------------- #region Misceleneous Commands /// <summary> /// StartInputCorrection command QueryStatus handler /// </summary> private static void OnQueryStatusNYI(object target, CanExecuteRoutedEventArgs args) { TextEditor This = TextEditor._GetTextEditor(target); if (This == null) { return; } args.CanExecute = true; } #endregion Misceleneous Commands #endregion Private Methods } }
mind0n/hive
Cache/Libs/net46/wpf/src/Framework/System/Windows/Documents/TextEditorCharacters.cs
C#
mit
22,649
#include <cstdio> #include <cstring> #include <cstdlib> #include <algorithm> #include <cmath> #include <set> #include <map> #include <cctype> #include <vector> #include <queue> #include <stack> #include <deque> #include <string> #include <iostream> using namespace std; typedef long long ll; typedef unsigned long long ull; #define foR for #define for9 for #define retunr return #define reutrn return #define reutnr return #define retrun return const int inf = 1000000000; const ll INF = (1ll << 63) - 1; const double PI = acos(-1.0); const double eps = 1e-7; const ll MOD = 1000000007ll; const int maxn = 500000 + 100; const int maxm = 5000 + 100; int N, M; int ar[maxn]; char s[20]; deque<int> Q; stack<int> L; stack<int> R; int main() { int i, j, k, CAS, cas, a, begin, end; while (scanf("%d", &CAS) != EOF) { for (cas = 1; cas <= CAS; cas++) { while (!Q.empty()) Q.pop_front(); while (!L.empty()) L.pop(); while (!R.empty()) R.pop(); scanf("%d", &N); for (i = 1; i <= N; i++) { scanf("%d", &ar[i]); } scanf("%d %d", &begin, &end); for (i = 1; i < begin; i++) L.push(ar[i]); for (i = begin; i <= end; i++) Q.push_back(ar[i]); for (i = N; i >= end + 1; i--) R.push(ar[i]); scanf("%d", &M); int doudou = 0; for (i = 1; i <= M; i++) { scanf("%s", s); if (strcmp(s, "Reverse") == 0) { doudou ^= 1; } else if (strcmp(s, "MoveLeft") == 0) { scanf("%s", s); if (s[0] == 'L') { if (!doudou) { Q.push_front(L.top()); L.pop(); } else { Q.push_back(L.top()); L.pop(); } } else { if (!doudou) { R.push(Q.back()); Q.pop_back(); } else { R.push(Q.front()); Q.pop_front(); } } } else if (strcmp(s, "MoveRight") == 0) { scanf("%s", s); if (s[0] == 'L') { if (!doudou) { L.push(Q.front()); Q.pop_front(); } else { L.push(Q.back()); Q.pop_back(); } } else { if (!doudou) { Q.push_back(R.top()); R.pop(); } else { Q.push_front(R.top()); R.pop(); } } } else if (strcmp(s, "Insert") == 0) { scanf("%s", s); scanf("%d", &a); if (s[0] == 'L') { if (!doudou) { Q.push_front(a); } else { Q.push_back(a); } } else { if (!doudou) { Q.push_back(a); } else { Q.push_front(a); } } } else if (strcmp(s, "Delete") == 0) { scanf("%s", s); if (s[0] == 'L') { if (!doudou) { Q.pop_front(); } else { Q.pop_back(); } } else { if (!doudou) { Q.pop_back(); } else { Q.pop_front(); } } } } int l = L.size(); for (i = L.size(); i >= 1; i--) { ar[i] = L.top(); L.pop(); } int flag = 0; for (i = 1; i <= l; i++) { if (flag) printf(" "); flag = 1; printf("%d", ar[i]); } while (!Q.empty()) { if (flag) printf(" "); flag = 1; if (!doudou) { printf("%d", Q.front()); Q.pop_front(); } else { printf("%d", Q.back()); Q.pop_back(); } } while (!R.empty()) { if (flag) printf(" "); flag = 1; printf("%d", R.top()); R.pop(); } printf("\n"); } } return 0; }
Hyyyyyyyyyy/acm
uhk/acm4286.cpp
C++
mit
3,612
package com.pg85.otg.spigot.commands; import com.sk89q.worldedit.IncompleteRegionException; import com.sk89q.worldedit.WorldEdit; import com.sk89q.worldedit.bukkit.BukkitAdapter; import com.sk89q.worldedit.math.BlockVector3; import net.minecraft.server.v1_16_R3.BlockPosition; import org.bukkit.entity.Player; public class WorldEditUtil { public static RegionCommand.Region getRegionFromPlayer(Player source) { if (!WorldEdit.getInstance().getSessionManager().contains(BukkitAdapter.adapt(source))) { return null; } try { com.sk89q.worldedit.regions.Region weRegion = WorldEdit.getInstance().getSessionManager() .get(BukkitAdapter.adapt(source)) .getSelection(BukkitAdapter.adapt(source.getWorld())); RegionCommand.Region region = new RegionCommand.Region(); region.setPos(getPosFromVector3(weRegion.getMinimumPoint())); region.setPos(getPosFromVector3(weRegion.getMaximumPoint())); return region; } catch (IncompleteRegionException e) { return null; } } private static BlockPosition getPosFromVector3(BlockVector3 vector) { return new BlockPosition(vector.getBlockX(), vector.getBlockY(), vector.getBlockZ()); } }
PG85/OpenTerrainGenerator
platforms/spigot/src/main/java/com/pg85/otg/spigot/commands/WorldEditUtil.java
Java
mit
1,173
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>W28790_text</title> <link rel="stylesheet" type="text/css" href="style.css" /> </head> <body> <div style="margin-left: auto; margin-right: auto; width: 800px; overflow: hidden;"> <div style="float: left;"> <a href="page19.html">&laquo;</a> </div> <div style="float: right;"> </div> </div> <hr/> <div style="position: absolute; margin-left: 192px; margin-top: 192px;"> <p class="styleSans695.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>">HORIZONTAL SECTION PLAT CONTINENTAL RESOURCES INC. BRATLIEN 3—26H SECTION 35, T161N, R95W DIVIDE COUNTY, NORTH DAKOTA <br/> <br/>.,__06g'.58_,'.. : 1315.3 <br/>ALL CORNERS SHOWN ON THIS PLAT WERE FOUND IN THE FIELD DISTANCES TO ALL OTHERS ARE CALCULATED. ALL BE4RINGS SHOWN ARE ASSUMED. <br/>CORRECTLY REPRESENTS 0R UNDER MY RESPONSIBLE BROS! INCIATIWIATC [1V6 <br/> t .w A BOX 357 MY 3 - BOWMAN, MD. 58623 <br/>A PHONE: 701-523—3340 "4“. . ~ FAX: 7014234243 .5 n . . PROJECT NO. 12—10 <br/> </p> </div> <div style="position: absolute; margin-left: 2530px; margin-top: 1100px;"> <p class="styleSans12000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>"></p> </div> </body> </html>
datamade/elpc_bakken
ocr_extracted/W28790_text/page20.html
HTML
mit
1,479
(function (global, factory) { if (typeof define === "function" && define.amd) define(["lodash"], factory); else if (typeof module === "object") module.exports = factory; else { // lodash expected as global "_" global.ClassDefinition = factory(_); } }(this, function(_) { var _alreadyInArray = function(list, test) { return _.find(list, function(existing) { return test === existing; }); }; var ClassDefinition = function(registry, name) { // if Registry string -> assume first param is name and undeclare registry if(typeof registry === 'string') { // maybe check registry is an object with definition()? name = registry; registry = null; } var _constructors = []; var _body = {}; var _parents = []; var _types = []; var _builder; var _registry = function(name, value) { // register change in def if(!registry) { if(!value) { throw new Error('Registry not available. Cannot load definition for ' + name); } // updates die silently when registry not available return; } return registry.definition(name, value); }; return { getName : function() { return name; }, addConstructor : function(func, isInherited) { if(!func) { return this; } // reject existing constructor if already added // -> this moves the constructor to correct place based on inheritance order _constructors = _.reject(_constructors, function(n) { return n === func; }); if(isInherited) { _constructors.unshift(func); } else { _constructors.push(func); } // register change in def _registry(this.getName(), this); return this; }, getConstructors : function() { return _constructors; }, addType : function(type) { if(_alreadyInArray(_types, type)) { return this; } _types.push(type); // register change in def _registry(this.getName(), this); if(registry) { // register as typed definition registry.type(type, this); } return this; }, getTypes: function() { return _types; }, getProperties: function() { return _body; }, addProperty : function(name, value, isInherited) { if(!_body[name] || !isInherited) { _body[name] = value; // register change in def _registry(this.getName(), this); } return this; }, getParents : function() { return _parents; }, inherit : function(parent, obj) { var me = obj || this; // get parent definition var def = _registry(parent); if(!def) { // TODO: also check for circular reference? return this; } _parents.push(parent); var isInherited = true; /* console.log(me.getName() + ' inheriting ' + def.getName() + ' with contructor count of ' + def.getConstructors().length); */ _.each(def.getConstructors(), function(func) { me.addConstructor(func, isInherited); }); _.each(def.getTypes(), function(func) { me.addType(func, isInherited); }); _.forIn(def.getProperties(), function(value, key) { me.addProperty(key, value, isInherited); }); // this might not be necessary... _.each(def.getParents(), function(elder) { me.inherit(elder, me); }); // register change in def _registry(me.getName(), me); return this; }, create : function() { var def = this, instance = _builder; if(_builder) { return new _builder(arguments); } _builder = function() { var me = this, constArgs = arguments; //me.__name = def.getName(); _.each(def.getConstructors(), function(func) { //try { func.apply(me, constArgs); //} catch(e) { console.log(e) } }); // maybe give properties for prototype? _.forIn(def.getProperties(), function(value, key) { me[key] = value; }); }; return new _builder(arguments); } }; }; return ClassDefinition; }));
ZakarFin/random-scripts
class-system/src/class-definition.js
JavaScript
mit
5,497
<?php /* * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * This software consists of voluntary contributions made by many individuals * and is licensed under the MIT license. For more information, see * <http://www.doctrine-project.org>. */ namespace Doctrine\ODM\MongoDB; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; use Doctrine\Common\EventManager; use Doctrine\Common\NotifyPropertyChanged; use Doctrine\Common\PropertyChangedListener; use Doctrine\MongoDB\GridFSFile; use Doctrine\ODM\MongoDB\Event\LifecycleEventArgs; use Doctrine\ODM\MongoDB\Hydrator\HydratorFactory; use Doctrine\ODM\MongoDB\Mapping\ClassMetadata; use Doctrine\ODM\MongoDB\PersistentCollection; use Doctrine\ODM\MongoDB\Persisters\PersistenceBuilder; use Doctrine\ODM\MongoDB\Proxy\Proxy; use Doctrine\ODM\MongoDB\Query\Query; use Doctrine\ODM\MongoDB\Types\Type; use Doctrine\ODM\MongoDB\Utility\CollectionHelper; /** * The UnitOfWork is responsible for tracking changes to objects during an * "object-level" transaction and for writing out changes to the database * in the correct order. * * @since 1.0 * @author Jonathan H. Wage <jonwage@gmail.com> * @author Roman Borschel <roman@code-factory.org> */ class UnitOfWork implements PropertyChangedListener { /** * A document is in MANAGED state when its persistence is managed by a DocumentManager. */ const STATE_MANAGED = 1; /** * A document is new if it has just been instantiated (i.e. using the "new" operator) * and is not (yet) managed by a DocumentManager. */ const STATE_NEW = 2; /** * A detached document is an instance with a persistent identity that is not * (or no longer) associated with a DocumentManager (and a UnitOfWork). */ const STATE_DETACHED = 3; /** * A removed document instance is an instance with a persistent identity, * associated with a DocumentManager, whose persistent state has been * deleted (or is scheduled for deletion). */ const STATE_REMOVED = 4; /** * The identity map holds references to all managed documents. * * Documents are grouped by their class name, and then indexed by the * serialized string of their database identifier field or, if the class * has no identifier, the SPL object hash. Serializing the identifier allows * differentiation of values that may be equal (via type juggling) but not * identical. * * Since all classes in a hierarchy must share the same identifier set, * we always take the root class name of the hierarchy. * * @var array */ private $identityMap = array(); /** * Map of all identifiers of managed documents. * Keys are object ids (spl_object_hash). * * @var array */ private $documentIdentifiers = array(); /** * Map of the original document data of managed documents. * Keys are object ids (spl_object_hash). This is used for calculating changesets * at commit time. * * @var array * @internal Note that PHPs "copy-on-write" behavior helps a lot with memory usage. * A value will only really be copied if the value in the document is modified * by the user. */ private $originalDocumentData = array(); /** * Map of document changes. Keys are object ids (spl_object_hash). * Filled at the beginning of a commit of the UnitOfWork and cleaned at the end. * * @var array */ private $documentChangeSets = array(); /** * The (cached) states of any known documents. * Keys are object ids (spl_object_hash). * * @var array */ private $documentStates = array(); /** * Map of documents that are scheduled for dirty checking at commit time. * * Documents are grouped by their class name, and then indexed by their SPL * object hash. This is only used for documents with a change tracking * policy of DEFERRED_EXPLICIT. * * @var array * @todo rename: scheduledForSynchronization */ private $scheduledForDirtyCheck = array(); /** * A list of all pending document insertions. * * @var array */ private $documentInsertions = array(); /** * A list of all pending document updates. * * @var array */ private $documentUpdates = array(); /** * A list of all pending document upserts. * * @var array */ private $documentUpserts = array(); /** * A list of all pending document deletions. * * @var array */ private $documentDeletions = array(); /** * All pending collection deletions. * * @var array */ private $collectionDeletions = array(); /** * All pending collection updates. * * @var array */ private $collectionUpdates = array(); /** * A list of documents related to collections scheduled for update or deletion * * @var array */ private $hasScheduledCollections = array(); /** * List of collections visited during changeset calculation on a commit-phase of a UnitOfWork. * At the end of the UnitOfWork all these collections will make new snapshots * of their data. * * @var array */ private $visitedCollections = array(); /** * The DocumentManager that "owns" this UnitOfWork instance. * * @var DocumentManager */ private $dm; /** * The EventManager used for dispatching events. * * @var EventManager */ private $evm; /** * Embedded documents that are scheduled for removal. * * @var array */ private $orphanRemovals = array(); /** * The HydratorFactory used for hydrating array Mongo documents to Doctrine object documents. * * @var HydratorFactory */ private $hydratorFactory; /** * The document persister instances used to persist document instances. * * @var array */ private $persisters = array(); /** * The collection persister instance used to persist changes to collections. * * @var Persisters\CollectionPersister */ private $collectionPersister; /** * The persistence builder instance used in DocumentPersisters. * * @var PersistenceBuilder */ private $persistenceBuilder; /** * Array of parent associations between embedded documents * * @todo We might need to clean up this array in clear(), doDetach(), etc. * @var array */ private $parentAssociations = array(); /** * Initializes a new UnitOfWork instance, bound to the given DocumentManager. * * @param DocumentManager $dm * @param EventManager $evm * @param HydratorFactory $hydratorFactory */ public function __construct(DocumentManager $dm, EventManager $evm, HydratorFactory $hydratorFactory) { $this->dm = $dm; $this->evm = $evm; $this->hydratorFactory = $hydratorFactory; } /** * Factory for returning new PersistenceBuilder instances used for preparing data into * queries for insert persistence. * * @return PersistenceBuilder $pb */ public function getPersistenceBuilder() { if ( ! $this->persistenceBuilder) { $this->persistenceBuilder = new PersistenceBuilder($this->dm, $this); } return $this->persistenceBuilder; } /** * Sets the parent association for a given embedded document. * * @param object $document * @param array $mapping * @param object $parent * @param string $propertyPath */ public function setParentAssociation($document, $mapping, $parent, $propertyPath) { $oid = spl_object_hash($document); $this->parentAssociations[$oid] = array($mapping, $parent, $propertyPath); } /** * Gets the parent association for a given embedded document. * * <code> * list($mapping, $parent, $propertyPath) = $this->getParentAssociation($embeddedDocument); * </code> * * @param object $document * @return array $association */ public function getParentAssociation($document) { $oid = spl_object_hash($document); if ( ! isset($this->parentAssociations[$oid])) { return null; } return $this->parentAssociations[$oid]; } /** * Get the document persister instance for the given document name * * @param string $documentName * @return Persisters\DocumentPersister */ public function getDocumentPersister($documentName) { if ( ! isset($this->persisters[$documentName])) { $class = $this->dm->getClassMetadata($documentName); $pb = $this->getPersistenceBuilder(); $this->persisters[$documentName] = new Persisters\DocumentPersister($pb, $this->dm, $this->evm, $this, $this->hydratorFactory, $class); } return $this->persisters[$documentName]; } /** * Get the collection persister instance. * * @return \Doctrine\ODM\MongoDB\Persisters\CollectionPersister */ public function getCollectionPersister() { if ( ! isset($this->collectionPersister)) { $pb = $this->getPersistenceBuilder(); $this->collectionPersister = new Persisters\CollectionPersister($this->dm, $pb, $this); } return $this->collectionPersister; } /** * Set the document persister instance to use for the given document name * * @param string $documentName * @param Persisters\DocumentPersister $persister */ public function setDocumentPersister($documentName, Persisters\DocumentPersister $persister) { $this->persisters[$documentName] = $persister; } /** * Commits the UnitOfWork, executing all operations that have been postponed * up to this point. The state of all managed documents will be synchronized with * the database. * * The operations are executed in the following order: * * 1) All document insertions * 2) All document updates * 3) All document deletions * * @param object $document * @param array $options Array of options to be used with batchInsert(), update() and remove() */ public function commit($document = null, array $options = array()) { // Raise preFlush if ($this->evm->hasListeners(Events::preFlush)) { $this->evm->dispatchEvent(Events::preFlush, new Event\PreFlushEventArgs($this->dm)); } $defaultOptions = $this->dm->getConfiguration()->getDefaultCommitOptions(); if ($options) { $options = array_merge($defaultOptions, $options); } else { $options = $defaultOptions; } // Compute changes done since last commit. if ($document === null) { $this->computeChangeSets(); } elseif (is_object($document)) { $this->computeSingleDocumentChangeSet($document); } elseif (is_array($document)) { foreach ($document as $object) { $this->computeSingleDocumentChangeSet($object); } } if ( ! ($this->documentInsertions || $this->documentUpserts || $this->documentDeletions || $this->documentUpdates || $this->collectionUpdates || $this->collectionDeletions || $this->orphanRemovals) ) { return; // Nothing to do. } if ($this->orphanRemovals) { foreach ($this->orphanRemovals as $removal) { $this->remove($removal); } } // Raise onFlush if ($this->evm->hasListeners(Events::onFlush)) { $this->evm->dispatchEvent(Events::onFlush, new Event\OnFlushEventArgs($this->dm)); } foreach ($this->getClassesForCommitAction($this->documentUpserts) as $classAndDocuments) { list($class, $documents) = $classAndDocuments; $this->executeUpserts($class, $documents, $options); } foreach ($this->getClassesForCommitAction($this->documentInsertions) as $classAndDocuments) { list($class, $documents) = $classAndDocuments; $this->executeInserts($class, $documents, $options); } foreach ($this->getClassesForCommitAction($this->documentUpdates) as $classAndDocuments) { list($class, $documents) = $classAndDocuments; $this->executeUpdates($class, $documents, $options); } foreach ($this->getClassesForCommitAction($this->documentDeletions, true) as $classAndDocuments) { list($class, $documents) = $classAndDocuments; $this->executeDeletions($class, $documents, $options); } // Raise postFlush if ($this->evm->hasListeners(Events::postFlush)) { $this->evm->dispatchEvent(Events::postFlush, new Event\PostFlushEventArgs($this->dm)); } // Clear up $this->documentInsertions = $this->documentUpserts = $this->documentUpdates = $this->documentDeletions = $this->documentChangeSets = $this->collectionUpdates = $this->collectionDeletions = $this->visitedCollections = $this->scheduledForDirtyCheck = $this->orphanRemovals = $this->hasScheduledCollections = array(); } /** * Groups a list of scheduled documents by their class. * * @param array $documents Scheduled documents (e.g. $this->documentInsertions) * @param bool $includeEmbedded * @return array Tuples of ClassMetadata and a corresponding array of objects */ private function getClassesForCommitAction($documents, $includeEmbedded = false) { if (empty($documents)) { return array(); } $divided = array(); $embeds = array(); foreach ($documents as $oid => $d) { $className = get_class($d); if (isset($embeds[$className])) { continue; } if (isset($divided[$className])) { $divided[$className][1][$oid] = $d; continue; } $class = $this->dm->getClassMetadata($className); if ($class->isEmbeddedDocument && ! $includeEmbedded) { $embeds[$className] = true; continue; } if (empty($divided[$class->name])) { $divided[$class->name] = array($class, array($oid => $d)); } else { $divided[$class->name][1][$oid] = $d; } } return $divided; } /** * Compute changesets of all documents scheduled for insertion. * * Embedded documents will not be processed. */ private function computeScheduleInsertsChangeSets() { foreach ($this->documentInsertions as $document) { $class = $this->dm->getClassMetadata(get_class($document)); if ( ! $class->isEmbeddedDocument) { $this->computeChangeSet($class, $document); } } } /** * Compute changesets of all documents scheduled for upsert. * * Embedded documents will not be processed. */ private function computeScheduleUpsertsChangeSets() { foreach ($this->documentUpserts as $document) { $class = $this->dm->getClassMetadata(get_class($document)); if ( ! $class->isEmbeddedDocument) { $this->computeChangeSet($class, $document); } } } /** * Only flush the given document according to a ruleset that keeps the UoW consistent. * * 1. All documents scheduled for insertion and (orphan) removals are processed as well! * 2. Proxies are skipped. * 3. Only if document is properly managed. * * @param object $document * @throws \InvalidArgumentException If the document is not STATE_MANAGED * @return void */ private function computeSingleDocumentChangeSet($document) { $state = $this->getDocumentState($document); if ($state !== self::STATE_MANAGED && $state !== self::STATE_REMOVED) { throw new \InvalidArgumentException("Document has to be managed or scheduled for removal for single computation " . self::objToStr($document)); } $class = $this->dm->getClassMetadata(get_class($document)); if ($state === self::STATE_MANAGED && $class->isChangeTrackingDeferredImplicit()) { $this->persist($document); } // Compute changes for INSERTed and UPSERTed documents first. This must always happen even in this case. $this->computeScheduleInsertsChangeSets(); $this->computeScheduleUpsertsChangeSets(); // Ignore uninitialized proxy objects if ($document instanceof Proxy && ! $document->__isInitialized__) { return; } // Only MANAGED documents that are NOT SCHEDULED FOR INSERTION, UPSERT OR DELETION are processed here. $oid = spl_object_hash($document); if ( ! isset($this->documentInsertions[$oid]) && ! isset($this->documentUpserts[$oid]) && ! isset($this->documentDeletions[$oid]) && isset($this->documentStates[$oid]) ) { $this->computeChangeSet($class, $document); } } /** * Gets the changeset for a document. * * @param object $document * @return array array('property' => array(0 => mixed|null, 1 => mixed|null)) */ public function getDocumentChangeSet($document) { $oid = spl_object_hash($document); if (isset($this->documentChangeSets[$oid])) { return $this->documentChangeSets[$oid]; } return array(); } /** * Get a documents actual data, flattening all the objects to arrays. * * @param object $document * @return array */ public function getDocumentActualData($document) { $class = $this->dm->getClassMetadata(get_class($document)); $actualData = array(); foreach ($class->reflFields as $name => $refProp) { $mapping = $class->fieldMappings[$name]; // skip not saved fields if (isset($mapping['notSaved']) && $mapping['notSaved'] === true) { continue; } $value = $refProp->getValue($document); if (isset($mapping['file']) && ! $value instanceof GridFSFile) { $value = new GridFSFile($value); $class->reflFields[$name]->setValue($document, $value); $actualData[$name] = $value; } elseif ((isset($mapping['association']) && $mapping['type'] === 'many') && $value !== null && ! ($value instanceof PersistentCollection)) { // If $actualData[$name] is not a Collection then use an ArrayCollection. if ( ! $value instanceof Collection) { $value = new ArrayCollection($value); } // Inject PersistentCollection $coll = new PersistentCollection($value, $this->dm, $this); $coll->setOwner($document, $mapping); $coll->setDirty( ! $value->isEmpty()); $class->reflFields[$name]->setValue($document, $coll); $actualData[$name] = $coll; } else { $actualData[$name] = $value; } } return $actualData; } /** * Computes the changes that happened to a single document. * * Modifies/populates the following properties: * * {@link originalDocumentData} * If the document is NEW or MANAGED but not yet fully persisted (only has an id) * then it was not fetched from the database and therefore we have no original * document data yet. All of the current document data is stored as the original document data. * * {@link documentChangeSets} * The changes detected on all properties of the document are stored there. * A change is a tuple array where the first entry is the old value and the second * entry is the new value of the property. Changesets are used by persisters * to INSERT/UPDATE the persistent document state. * * {@link documentUpdates} * If the document is already fully MANAGED (has been fetched from the database before) * and any changes to its properties are detected, then a reference to the document is stored * there to mark it for an update. * * @param ClassMetadata $class The class descriptor of the document. * @param object $document The document for which to compute the changes. */ public function computeChangeSet(ClassMetadata $class, $document) { if ( ! $class->isInheritanceTypeNone()) { $class = $this->dm->getClassMetadata(get_class($document)); } // Fire PreFlush lifecycle callbacks if ( ! empty($class->lifecycleCallbacks[Events::preFlush])) { $class->invokeLifecycleCallbacks(Events::preFlush, $document); } $this->computeOrRecomputeChangeSet($class, $document); } /** * Used to do the common work of computeChangeSet and recomputeSingleDocumentChangeSet * * @param \Doctrine\ODM\MongoDB\Mapping\ClassMetadata $class * @param object $document * @param boolean $recompute */ private function computeOrRecomputeChangeSet(ClassMetadata $class, $document, $recompute = false) { $oid = spl_object_hash($document); $actualData = $this->getDocumentActualData($document); $isNewDocument = ! isset($this->originalDocumentData[$oid]); if ($isNewDocument) { // Document is either NEW or MANAGED but not yet fully persisted (only has an id). // These result in an INSERT. $this->originalDocumentData[$oid] = $actualData; $changeSet = array(); foreach ($actualData as $propName => $actualValue) { /* At this PersistentCollection shouldn't be here, probably it * was cloned and its ownership must be fixed */ if ($actualValue instanceof PersistentCollection && $actualValue->getOwner() !== $document) { $actualData[$propName] = $this->fixPersistentCollectionOwnership($actualValue, $document, $class, $propName); $actualValue = $actualData[$propName]; } $changeSet[$propName] = array(null, $actualValue); } $this->documentChangeSets[$oid] = $changeSet; } else { // Document is "fully" MANAGED: it was already fully persisted before // and we have a copy of the original data $originalData = $this->originalDocumentData[$oid]; $isChangeTrackingNotify = $class->isChangeTrackingNotify(); if ($isChangeTrackingNotify && ! $recompute && isset($this->documentChangeSets[$oid])) { $changeSet = $this->documentChangeSets[$oid]; } else { $changeSet = array(); } foreach ($actualData as $propName => $actualValue) { // skip not saved fields if (isset($class->fieldMappings[$propName]['notSaved']) && $class->fieldMappings[$propName]['notSaved'] === true) { continue; } $orgValue = isset($originalData[$propName]) ? $originalData[$propName] : null; // skip if value has not changed if ($orgValue === $actualValue) { // but consider dirty GridFSFile instances as changed if ( ! (isset($class->fieldMappings[$propName]['file']) && $actualValue->isDirty())) { continue; } } // if relationship is a embed-one, schedule orphan removal to trigger cascade remove operations if (isset($class->fieldMappings[$propName]['embedded']) && $class->fieldMappings[$propName]['type'] === 'one') { if ($orgValue !== null) { $this->scheduleOrphanRemoval($orgValue); } $changeSet[$propName] = array($orgValue, $actualValue); continue; } // if owning side of reference-one relationship if (isset($class->fieldMappings[$propName]['reference']) && $class->fieldMappings[$propName]['type'] === 'one' && $class->fieldMappings[$propName]['isOwningSide']) { if ($orgValue !== null && $class->fieldMappings[$propName]['orphanRemoval']) { $this->scheduleOrphanRemoval($orgValue); } $changeSet[$propName] = array($orgValue, $actualValue); continue; } if ($isChangeTrackingNotify) { continue; } // ignore inverse side of reference-many relationship if (isset($class->fieldMappings[$propName]['reference']) && $class->fieldMappings[$propName]['type'] === 'many' && $class->fieldMappings[$propName]['isInverseSide']) { continue; } // Persistent collection was exchanged with the "originally" // created one. This can only mean it was cloned and replaced // on another document. if ($actualValue instanceof PersistentCollection && $actualValue->getOwner() !== $document) { $actualValue = $this->fixPersistentCollectionOwnership($actualValue, $document, $class, $propName); } // if embed-many or reference-many relationship if (isset($class->fieldMappings[$propName]['type']) && $class->fieldMappings[$propName]['type'] === 'many') { $changeSet[$propName] = array($orgValue, $actualValue); /* If original collection was exchanged with a non-empty value * and $set will be issued, there is no need to $unset it first */ if ($actualValue && $actualValue->isDirty() && CollectionHelper::usesSet($class->fieldMappings[$propName]['strategy'])) { continue; } if ($orgValue instanceof PersistentCollection) { $this->scheduleCollectionDeletion($orgValue); } continue; } // skip equivalent date values if (isset($class->fieldMappings[$propName]['type']) && $class->fieldMappings[$propName]['type'] === 'date') { $dateType = Type::getType('date'); $dbOrgValue = $dateType->convertToDatabaseValue($orgValue); $dbActualValue = $dateType->convertToDatabaseValue($actualValue); if ($dbOrgValue instanceof \MongoDate && $dbActualValue instanceof \MongoDate && $dbOrgValue == $dbActualValue) { continue; } } // regular field $changeSet[$propName] = array($orgValue, $actualValue); } if ($changeSet) { $this->documentChangeSets[$oid] = ($recompute && isset($this->documentChangeSets[$oid])) ? $changeSet + $this->documentChangeSets[$oid] : $changeSet; $this->originalDocumentData[$oid] = $actualData; $this->scheduleForUpdate($document); } } // Look for changes in associations of the document $associationMappings = array_filter( $class->associationMappings, function ($assoc) { return empty($assoc['notSaved']); } ); foreach ($associationMappings as $mapping) { $value = $class->reflFields[$mapping['fieldName']]->getValue($document); if ($value === null) { continue; } $this->computeAssociationChanges($document, $mapping, $value); if (isset($mapping['reference'])) { continue; } $values = $mapping['type'] === ClassMetadata::ONE ? array($value) : $value->unwrap(); foreach ($values as $obj) { $oid2 = spl_object_hash($obj); if (isset($this->documentChangeSets[$oid2])) { $this->documentChangeSets[$oid][$mapping['fieldName']] = array($value, $value); if ( ! $isNewDocument) { $this->scheduleForUpdate($document); } break; } } } } /** * Computes all the changes that have been done to documents and collections * since the last commit and stores these changes in the _documentChangeSet map * temporarily for access by the persisters, until the UoW commit is finished. */ public function computeChangeSets() { $this->computeScheduleInsertsChangeSets(); $this->computeScheduleUpsertsChangeSets(); // Compute changes for other MANAGED documents. Change tracking policies take effect here. foreach ($this->identityMap as $className => $documents) { $class = $this->dm->getClassMetadata($className); if ($class->isEmbeddedDocument) { /* we do not want to compute changes to embedded documents up front * in case embedded document was replaced and its changeset * would corrupt data. Embedded documents' change set will * be calculated by reachability from owning document. */ continue; } // If change tracking is explicit or happens through notification, then only compute // changes on document of that type that are explicitly marked for synchronization. switch (true) { case ($class->isChangeTrackingDeferredImplicit()): $documentsToProcess = $documents; break; case (isset($this->scheduledForDirtyCheck[$className])): $documentsToProcess = $this->scheduledForDirtyCheck[$className]; break; default: $documentsToProcess = array(); } foreach ($documentsToProcess as $document) { // Ignore uninitialized proxy objects if ($document instanceof Proxy && ! $document->__isInitialized__) { continue; } // Only MANAGED documents that are NOT SCHEDULED FOR INSERTION, UPSERT OR DELETION are processed here. $oid = spl_object_hash($document); if ( ! isset($this->documentInsertions[$oid]) && ! isset($this->documentUpserts[$oid]) && ! isset($this->documentDeletions[$oid]) && isset($this->documentStates[$oid]) ) { $this->computeChangeSet($class, $document); } } } } /** * Computes the changes of an association. * * @param object $parentDocument * @param array $assoc * @param mixed $value The value of the association. * @throws \InvalidArgumentException */ private function computeAssociationChanges($parentDocument, array $assoc, $value) { $isNewParentDocument = isset($this->documentInsertions[spl_object_hash($parentDocument)]); $class = $this->dm->getClassMetadata(get_class($parentDocument)); $topOrExistingDocument = ( ! $isNewParentDocument || ! $class->isEmbeddedDocument); if ($value instanceof Proxy && ! $value->__isInitialized__) { return; } if ($value instanceof PersistentCollection && $value->isDirty() && $assoc['isOwningSide']) { if ($topOrExistingDocument || CollectionHelper::usesSet($assoc['strategy'])) { $this->scheduleCollectionUpdate($value); } $topmostOwner = $this->getOwningDocument($value->getOwner()); $this->visitedCollections[spl_object_hash($topmostOwner)][] = $value; } // Look through the documents, and in any of their associations, // for transient (new) documents, recursively. ("Persistence by reachability") // Unwrap. Uninitialized collections will simply be empty. $unwrappedValue = ($assoc['type'] === ClassMetadata::ONE) ? array($value) : $value->unwrap(); $count = 0; foreach ($unwrappedValue as $key => $entry) { if ( ! is_object($entry)) { throw new \InvalidArgumentException( sprintf('Expected object, found "%s" in %s::%s', $entry, get_class($parentDocument), $assoc['name']) ); } $targetClass = $this->dm->getClassMetadata(get_class($entry)); $state = $this->getDocumentState($entry, self::STATE_NEW); // Handle "set" strategy for multi-level hierarchy $pathKey = ! isset($assoc['strategy']) || CollectionHelper::isList($assoc['strategy']) ? $count : $key; $path = $assoc['type'] === 'many' ? $assoc['name'] . '.' . $pathKey : $assoc['name']; $count++; switch ($state) { case self::STATE_NEW: if ( ! $assoc['isCascadePersist']) { throw new \InvalidArgumentException("A new document was found through a relationship that was not" . " configured to cascade persist operations: " . self::objToStr($entry) . "." . " Explicitly persist the new document or configure cascading persist operations" . " on the relationship."); } $this->persistNew($targetClass, $entry); $this->setParentAssociation($entry, $assoc, $parentDocument, $path); $this->computeChangeSet($targetClass, $entry); break; case self::STATE_MANAGED: if ($targetClass->isEmbeddedDocument) { list(, $knownParent, ) = $this->getParentAssociation($entry); if ($knownParent && $knownParent !== $parentDocument) { $entry = clone $entry; if ($assoc['type'] === ClassMetadata::ONE) { $class->setFieldValue($parentDocument, $assoc['name'], $entry); $this->setOriginalDocumentProperty(spl_object_hash($parentDocument), $assoc['name'], $entry); } else { // must use unwrapped value to not trigger orphan removal $unwrappedValue[$key] = $entry; } $this->persistNew($targetClass, $entry); } $this->setParentAssociation($entry, $assoc, $parentDocument, $path); $this->computeChangeSet($targetClass, $entry); } break; case self::STATE_REMOVED: // Consume the $value as array (it's either an array or an ArrayAccess) // and remove the element from Collection. if ($assoc['type'] === ClassMetadata::MANY) { unset($value[$key]); } break; case self::STATE_DETACHED: // Can actually not happen right now as we assume STATE_NEW, // so the exception will be raised from the DBAL layer (constraint violation). throw new \InvalidArgumentException("A detached document was found through a " . "relationship during cascading a persist operation."); break; default: // MANAGED associated documents are already taken into account // during changeset calculation anyway, since they are in the identity map. } } } /** * INTERNAL: * Computes the changeset of an individual document, independently of the * computeChangeSets() routine that is used at the beginning of a UnitOfWork#commit(). * * The passed document must be a managed document. If the document already has a change set * because this method is invoked during a commit cycle then the change sets are added. * whereby changes detected in this method prevail. * * @ignore * @param ClassMetadata $class The class descriptor of the document. * @param object $document The document for which to (re)calculate the change set. * @throws \InvalidArgumentException If the passed document is not MANAGED. */ public function recomputeSingleDocumentChangeSet(ClassMetadata $class, $document) { // Ignore uninitialized proxy objects if ($document instanceof Proxy && ! $document->__isInitialized__) { return; } $oid = spl_object_hash($document); if ( ! isset($this->documentStates[$oid]) || $this->documentStates[$oid] != self::STATE_MANAGED) { throw new \InvalidArgumentException('Document must be managed.'); } if ( ! $class->isInheritanceTypeNone()) { $class = $this->dm->getClassMetadata(get_class($document)); } $this->computeOrRecomputeChangeSet($class, $document, true); } /** * @param ClassMetadata $class * @param object $document * @throws \InvalidArgumentException If there is something wrong with document's identifier. */ private function persistNew(ClassMetadata $class, $document) { $oid = spl_object_hash($document); if ( ! empty($class->lifecycleCallbacks[Events::prePersist])) { $class->invokeLifecycleCallbacks(Events::prePersist, $document); } if ($this->evm->hasListeners(Events::prePersist)) { $this->evm->dispatchEvent(Events::prePersist, new LifecycleEventArgs($document, $this->dm)); } $upsert = false; if ($class->identifier) { $idValue = $class->getIdentifierValue($document); $upsert = ! $class->isEmbeddedDocument && $idValue !== null; if ($class->generatorType === ClassMetadata::GENERATOR_TYPE_NONE && $idValue === null) { throw new \InvalidArgumentException(sprintf( "%s uses NONE identifier generation strategy but no identifier was provided when persisting.", get_class($document) )); } // \MongoId::isValid($idValue) was introduced in 1.5.0 so it's no good if ($class->generatorType === ClassMetadata::GENERATOR_TYPE_AUTO && $idValue !== null && ! preg_match('/^[0-9a-f]{24}$/', $idValue)) { throw new \InvalidArgumentException(sprintf( "%s uses AUTO identifier generation strategy but provided identifier is not valid MongoId.", get_class($document) )); } if ($class->generatorType !== ClassMetadata::GENERATOR_TYPE_NONE && $idValue === null) { $idValue = $class->idGenerator->generate($this->dm, $document); $idValue = $class->getPHPIdentifierValue($class->getDatabaseIdentifierValue($idValue)); $class->setIdentifierValue($document, $idValue); } $this->documentIdentifiers[$oid] = $idValue; } else { // this is for embedded documents without identifiers $this->documentIdentifiers[$oid] = $oid; } $this->documentStates[$oid] = self::STATE_MANAGED; if ($upsert) { $this->scheduleForUpsert($class, $document); } else { $this->scheduleForInsert($class, $document); } } /** * Cascades the postPersist events to embedded documents. * * @param ClassMetadata $class * @param object $document */ private function cascadePostPersist(ClassMetadata $class, $document) { $hasPostPersistListeners = $this->evm->hasListeners(Events::postPersist); $embeddedMappings = array_filter( $class->associationMappings, function($assoc) { return ! empty($assoc['embedded']); } ); foreach ($embeddedMappings as $mapping) { $value = $class->reflFields[$mapping['fieldName']]->getValue($document); if ($value === null) { continue; } $values = $mapping['type'] === ClassMetadata::ONE ? array($value) : $value; if (isset($mapping['targetDocument'])) { $embeddedClass = $this->dm->getClassMetadata($mapping['targetDocument']); } foreach ($values as $embeddedDocument) { if ( ! isset($mapping['targetDocument'])) { $embeddedClass = $this->dm->getClassMetadata(get_class($embeddedDocument)); } if ( ! empty($embeddedClass->lifecycleCallbacks[Events::postPersist])) { $embeddedClass->invokeLifecycleCallbacks(Events::postPersist, $embeddedDocument); } if ($hasPostPersistListeners) { $this->evm->dispatchEvent(Events::postPersist, new LifecycleEventArgs($embeddedDocument, $this->dm)); } $this->cascadePostPersist($embeddedClass, $embeddedDocument); } } } /** * Executes all document insertions for documents of the specified type. * * @param ClassMetadata $class * @param array $documents Array of documents to insert * @param array $options Array of options to be used with batchInsert() */ private function executeInserts(ClassMetadata $class, array $documents, array $options = array()) { $persister = $this->getDocumentPersister($class->name); foreach ($documents as $oid => $document) { $persister->addInsert($document); unset($this->documentInsertions[$oid]); } $persister->executeInserts($options); $hasPostPersistLifecycleCallbacks = ! empty($class->lifecycleCallbacks[Events::postPersist]); $hasPostPersistListeners = $this->evm->hasListeners(Events::postPersist); foreach ($documents as $document) { if ($hasPostPersistLifecycleCallbacks) { $class->invokeLifecycleCallbacks(Events::postPersist, $document); } if ($hasPostPersistListeners) { $this->evm->dispatchEvent(Events::postPersist, new LifecycleEventArgs($document, $this->dm)); } $this->cascadePostPersist($class, $document); } } /** * Executes all document upserts for documents of the specified type. * * @param ClassMetadata $class * @param array $documents Array of documents to upsert * @param array $options Array of options to be used with batchInsert() */ private function executeUpserts(ClassMetadata $class, array $documents, array $options = array()) { $persister = $this->getDocumentPersister($class->name); foreach ($documents as $oid => $document) { $persister->addUpsert($document); unset($this->documentUpserts[$oid]); } $persister->executeUpserts($options); $hasLifecycleCallbacks = isset($class->lifecycleCallbacks[Events::postPersist]); $hasListeners = $this->evm->hasListeners(Events::postPersist); foreach ($documents as $document) { if ($hasLifecycleCallbacks) { $class->invokeLifecycleCallbacks(Events::postPersist, $document); } if ($hasListeners) { $this->evm->dispatchEvent(Events::postPersist, new LifecycleEventArgs($document, $this->dm)); } $this->cascadePostPersist($class, $document); } } /** * Executes all document updates for documents of the specified type. * * @param Mapping\ClassMetadata $class * @param array $documents Array of documents to update * @param array $options Array of options to be used with update() */ private function executeUpdates(ClassMetadata $class, array $documents, array $options = array()) { $className = $class->name; $persister = $this->getDocumentPersister($className); $hasPreUpdateLifecycleCallbacks = ! empty($class->lifecycleCallbacks[Events::preUpdate]); $hasPreUpdateListeners = $this->evm->hasListeners(Events::preUpdate); $hasPostUpdateLifecycleCallbacks = ! empty($class->lifecycleCallbacks[Events::postUpdate]); $hasPostUpdateListeners = $this->evm->hasListeners(Events::postUpdate); foreach ($documents as $oid => $document) { if ($hasPreUpdateLifecycleCallbacks) { $class->invokeLifecycleCallbacks(Events::preUpdate, $document); $this->recomputeSingleDocumentChangeSet($class, $document); } if ($hasPreUpdateListeners) { if ( ! isset($this->documentChangeSets[$oid])) { // only ReferenceMany collection is scheduled for update $this->documentChangeSets[$oid] = array(); } $this->evm->dispatchEvent(Events::preUpdate, new Event\PreUpdateEventArgs( $document, $this->dm, $this->documentChangeSets[$oid]) ); } $this->cascadePreUpdate($class, $document); if ( ! empty($this->documentChangeSets[$oid]) || $this->hasScheduledCollections($document)) { $persister->update($document, $options); } unset($this->documentUpdates[$oid]); if ($hasPostUpdateLifecycleCallbacks) { $class->invokeLifecycleCallbacks(Events::postUpdate, $document); } if ($hasPostUpdateListeners) { $this->evm->dispatchEvent(Events::postUpdate, new LifecycleEventArgs($document, $this->dm)); } $this->cascadePostUpdate($class, $document); } } /** * Cascades the preUpdate event to embedded documents. * * @param ClassMetadata $class * @param object $document */ private function cascadePreUpdate(ClassMetadata $class, $document) { $hasPreUpdateListeners = $this->evm->hasListeners(Events::preUpdate); $embeddedMappings = array_filter( $class->associationMappings, function ($assoc) { return ! empty($assoc['embedded']); } ); foreach ($embeddedMappings as $mapping) { $value = $class->reflFields[$mapping['fieldName']]->getValue($document); if ($value === null) { continue; } $values = $mapping['type'] === ClassMetadata::ONE ? array($value) : $value; foreach ($values as $entry) { $entryOid = spl_object_hash($entry); $entryClass = $this->dm->getClassMetadata(get_class($entry)); if ( ! isset($this->documentChangeSets[$entryOid])) { continue; } if (isset($this->documentInsertions[$entryOid])) { continue; } if ( ! empty($entryClass->lifecycleCallbacks[Events::preUpdate])) { $entryClass->invokeLifecycleCallbacks(Events::preUpdate, $entry); $this->recomputeSingleDocumentChangeSet($entryClass, $entry); } if ($hasPreUpdateListeners) { $this->evm->dispatchEvent(Events::preUpdate, new Event\PreUpdateEventArgs( $entry, $this->dm, $this->documentChangeSets[$entryOid]) ); } $this->cascadePreUpdate($entryClass, $entry); } } } /** * Cascades the postUpdate and postPersist events to embedded documents. * * @param ClassMetadata $class * @param object $document */ private function cascadePostUpdate(ClassMetadata $class, $document) { $hasPostPersistListeners = $this->evm->hasListeners(Events::postPersist); $hasPostUpdateListeners = $this->evm->hasListeners(Events::postUpdate); $embeddedMappings = array_filter( $class->associationMappings, function($assoc) { return ! empty($assoc['embedded']); } ); foreach ($embeddedMappings as $mapping) { $value = $class->reflFields[$mapping['fieldName']]->getValue($document); if ($value === null) { continue; } $values = $mapping['type'] === ClassMetadata::ONE ? array($value) : $value; foreach ($values as $entry) { $entryOid = spl_object_hash($entry); $entryClass = $this->dm->getClassMetadata(get_class($entry)); if ( ! isset($this->documentChangeSets[$entryOid])) { continue; } if (isset($this->documentInsertions[$entryOid])) { if ( ! empty($entryClass->lifecycleCallbacks[Events::postPersist])) { $entryClass->invokeLifecycleCallbacks(Events::postPersist, $entry); } if ($hasPostPersistListeners) { $this->evm->dispatchEvent(Events::postPersist, new LifecycleEventArgs($entry, $this->dm)); } } else { if ( ! empty($entryClass->lifecycleCallbacks[Events::postUpdate])) { $entryClass->invokeLifecycleCallbacks(Events::postUpdate, $entry); } if ($hasPostUpdateListeners) { $this->evm->dispatchEvent(Events::postUpdate, new LifecycleEventArgs($entry, $this->dm)); } } $this->cascadePostUpdate($entryClass, $entry); } } } /** * Executes all document deletions for documents of the specified type. * * @param ClassMetadata $class * @param array $documents Array of documents to delete * @param array $options Array of options to be used with remove() */ private function executeDeletions(ClassMetadata $class, array $documents, array $options = array()) { $hasPostRemoveLifecycleCallbacks = ! empty($class->lifecycleCallbacks[Events::postRemove]); $hasPostRemoveListeners = $this->evm->hasListeners(Events::postRemove); $persister = $this->getDocumentPersister($class->name); foreach ($documents as $oid => $document) { if ( ! $class->isEmbeddedDocument) { $persister->delete($document, $options); } unset( $this->documentDeletions[$oid], $this->documentIdentifiers[$oid], $this->originalDocumentData[$oid] ); // Clear snapshot information for any referenced PersistentCollection // http://www.doctrine-project.org/jira/browse/MODM-95 foreach ($class->associationMappings as $fieldMapping) { if (isset($fieldMapping['type']) && $fieldMapping['type'] === ClassMetadata::MANY) { $value = $class->reflFields[$fieldMapping['fieldName']]->getValue($document); if ($value instanceof PersistentCollection) { $value->clearSnapshot(); } } } // Document with this $oid after deletion treated as NEW, even if the $oid // is obtained by a new document because the old one went out of scope. $this->documentStates[$oid] = self::STATE_NEW; if ($hasPostRemoveLifecycleCallbacks) { $class->invokeLifecycleCallbacks(Events::postRemove, $document); } if ($hasPostRemoveListeners) { $this->evm->dispatchEvent(Events::postRemove, new LifecycleEventArgs($document, $this->dm)); } } } /** * Schedules a document for insertion into the database. * If the document already has an identifier, it will be added to the * identity map. * * @param ClassMetadata $class * @param object $document The document to schedule for insertion. * @throws \InvalidArgumentException */ public function scheduleForInsert(ClassMetadata $class, $document) { $oid = spl_object_hash($document); if (isset($this->documentUpdates[$oid])) { throw new \InvalidArgumentException("Dirty document can not be scheduled for insertion."); } if (isset($this->documentDeletions[$oid])) { throw new \InvalidArgumentException("Removed document can not be scheduled for insertion."); } if (isset($this->documentInsertions[$oid])) { throw new \InvalidArgumentException("Document can not be scheduled for insertion twice."); } $this->documentInsertions[$oid] = $document; if (isset($this->documentIdentifiers[$oid])) { $this->addToIdentityMap($document); } } /** * Schedules a document for upsert into the database and adds it to the * identity map * * @param ClassMetadata $class * @param object $document The document to schedule for upsert. * @throws \InvalidArgumentException */ public function scheduleForUpsert(ClassMetadata $class, $document) { $oid = spl_object_hash($document); if ($class->isEmbeddedDocument) { throw new \InvalidArgumentException("Embedded document can not be scheduled for upsert."); } if (isset($this->documentUpdates[$oid])) { throw new \InvalidArgumentException("Dirty document can not be scheduled for upsert."); } if (isset($this->documentDeletions[$oid])) { throw new \InvalidArgumentException("Removed document can not be scheduled for upsert."); } if (isset($this->documentUpserts[$oid])) { throw new \InvalidArgumentException("Document can not be scheduled for upsert twice."); } $this->documentUpserts[$oid] = $document; $this->documentIdentifiers[$oid] = $class->getIdentifierValue($document); $this->addToIdentityMap($document); } /** * Checks whether a document is scheduled for insertion. * * @param object $document * @return boolean */ public function isScheduledForInsert($document) { return isset($this->documentInsertions[spl_object_hash($document)]); } /** * Checks whether a document is scheduled for upsert. * * @param object $document * @return boolean */ public function isScheduledForUpsert($document) { return isset($this->documentUpserts[spl_object_hash($document)]); } /** * Schedules a document for being updated. * * @param object $document The document to schedule for being updated. * @throws \InvalidArgumentException */ public function scheduleForUpdate($document) { $oid = spl_object_hash($document); if ( ! isset($this->documentIdentifiers[$oid])) { throw new \InvalidArgumentException("Document has no identity."); } if (isset($this->documentDeletions[$oid])) { throw new \InvalidArgumentException("Document is removed."); } if ( ! isset($this->documentUpdates[$oid]) && ! isset($this->documentInsertions[$oid]) && ! isset($this->documentUpserts[$oid])) { $this->documentUpdates[$oid] = $document; } } /** * Checks whether a document is registered as dirty in the unit of work. * Note: Is not very useful currently as dirty documents are only registered * at commit time. * * @param object $document * @return boolean */ public function isScheduledForUpdate($document) { return isset($this->documentUpdates[spl_object_hash($document)]); } public function isScheduledForDirtyCheck($document) { $class = $this->dm->getClassMetadata(get_class($document)); return isset($this->scheduledForDirtyCheck[$class->name][spl_object_hash($document)]); } /** * INTERNAL: * Schedules a document for deletion. * * @param object $document */ public function scheduleForDelete($document) { $oid = spl_object_hash($document); if (isset($this->documentInsertions[$oid])) { if ($this->isInIdentityMap($document)) { $this->removeFromIdentityMap($document); } unset($this->documentInsertions[$oid]); return; // document has not been persisted yet, so nothing more to do. } if ( ! $this->isInIdentityMap($document)) { return; // ignore } $this->removeFromIdentityMap($document); $this->documentStates[$oid] = self::STATE_REMOVED; if (isset($this->documentUpdates[$oid])) { unset($this->documentUpdates[$oid]); } if ( ! isset($this->documentDeletions[$oid])) { $this->documentDeletions[$oid] = $document; } } /** * Checks whether a document is registered as removed/deleted with the unit * of work. * * @param object $document * @return boolean */ public function isScheduledForDelete($document) { return isset($this->documentDeletions[spl_object_hash($document)]); } /** * Checks whether a document is scheduled for insertion, update or deletion. * * @param $document * @return boolean */ public function isDocumentScheduled($document) { $oid = spl_object_hash($document); return isset($this->documentInsertions[$oid]) || isset($this->documentUpserts[$oid]) || isset($this->documentUpdates[$oid]) || isset($this->documentDeletions[$oid]); } /** * INTERNAL: * Registers a document in the identity map. * * Note that documents in a hierarchy are registered with the class name of * the root document. Identifiers are serialized before being used as array * keys to allow differentiation of equal, but not identical, values. * * @ignore * @param object $document The document to register. * @return boolean TRUE if the registration was successful, FALSE if the identity of * the document in question is already managed. */ public function addToIdentityMap($document) { $class = $this->dm->getClassMetadata(get_class($document)); $id = $this->getIdForIdentityMap($document); if (isset($this->identityMap[$class->name][$id])) { return false; } $this->identityMap[$class->name][$id] = $document; if ($document instanceof NotifyPropertyChanged && ( ! $document instanceof Proxy || $document->__isInitialized())) { $document->addPropertyChangedListener($this); } return true; } /** * Gets the state of a document with regard to the current unit of work. * * @param object $document * @param int|null $assume The state to assume if the state is not yet known (not MANAGED or REMOVED). * This parameter can be set to improve performance of document state detection * by potentially avoiding a database lookup if the distinction between NEW and DETACHED * is either known or does not matter for the caller of the method. * @return int The document state. */ public function getDocumentState($document, $assume = null) { $oid = spl_object_hash($document); if (isset($this->documentStates[$oid])) { return $this->documentStates[$oid]; } $class = $this->dm->getClassMetadata(get_class($document)); if ($class->isEmbeddedDocument) { return self::STATE_NEW; } if ($assume !== null) { return $assume; } /* State can only be NEW or DETACHED, because MANAGED/REMOVED states are * known. Note that you cannot remember the NEW or DETACHED state in * _documentStates since the UoW does not hold references to such * objects and the object hash can be reused. More generally, because * the state may "change" between NEW/DETACHED without the UoW being * aware of it. */ $id = $class->getIdentifierObject($document); if ($id === null) { return self::STATE_NEW; } // Check for a version field, if available, to avoid a DB lookup. if ($class->isVersioned) { return ($class->getFieldValue($document, $class->versionField)) ? self::STATE_DETACHED : self::STATE_NEW; } // Last try before DB lookup: check the identity map. if ($this->tryGetById($id, $class)) { return self::STATE_DETACHED; } // DB lookup if ($this->getDocumentPersister($class->name)->exists($document)) { return self::STATE_DETACHED; } return self::STATE_NEW; } /** * INTERNAL: * Removes a document from the identity map. This effectively detaches the * document from the persistence management of Doctrine. * * @ignore * @param object $document * @throws \InvalidArgumentException * @return boolean */ public function removeFromIdentityMap($document) { $oid = spl_object_hash($document); // Check if id is registered first if ( ! isset($this->documentIdentifiers[$oid])) { return false; } $class = $this->dm->getClassMetadata(get_class($document)); $id = $this->getIdForIdentityMap($document); if (isset($this->identityMap[$class->name][$id])) { unset($this->identityMap[$class->name][$id]); $this->documentStates[$oid] = self::STATE_DETACHED; return true; } return false; } /** * INTERNAL: * Gets a document in the identity map by its identifier hash. * * @ignore * @param mixed $id Document identifier * @param ClassMetadata $class Document class * @return object * @throws InvalidArgumentException if the class does not have an identifier */ public function getById($id, ClassMetadata $class) { if ( ! $class->identifier) { throw new \InvalidArgumentException(sprintf('Class "%s" does not have an identifier', $class->name)); } $serializedId = serialize($class->getDatabaseIdentifierValue($id)); return $this->identityMap[$class->name][$serializedId]; } /** * INTERNAL: * Tries to get a document by its identifier hash. If no document is found * for the given hash, FALSE is returned. * * @ignore * @param mixed $id Document identifier * @param ClassMetadata $class Document class * @return mixed The found document or FALSE. * @throws InvalidArgumentException if the class does not have an identifier */ public function tryGetById($id, ClassMetadata $class) { if ( ! $class->identifier) { throw new \InvalidArgumentException(sprintf('Class "%s" does not have an identifier', $class->name)); } $serializedId = serialize($class->getDatabaseIdentifierValue($id)); return isset($this->identityMap[$class->name][$serializedId]) ? $this->identityMap[$class->name][$serializedId] : false; } /** * Schedules a document for dirty-checking at commit-time. * * @param object $document The document to schedule for dirty-checking. * @todo Rename: scheduleForSynchronization */ public function scheduleForDirtyCheck($document) { $class = $this->dm->getClassMetadata(get_class($document)); $this->scheduledForDirtyCheck[$class->name][spl_object_hash($document)] = $document; } /** * Checks whether a document is registered in the identity map. * * @param object $document * @return boolean */ public function isInIdentityMap($document) { $oid = spl_object_hash($document); if ( ! isset($this->documentIdentifiers[$oid])) { return false; } $class = $this->dm->getClassMetadata(get_class($document)); $id = $this->getIdForIdentityMap($document); return isset($this->identityMap[$class->name][$id]); } /** * @param object $document * @return string */ private function getIdForIdentityMap($document) { $class = $this->dm->getClassMetadata(get_class($document)); if ( ! $class->identifier) { $id = spl_object_hash($document); } else { $id = $this->documentIdentifiers[spl_object_hash($document)]; $id = serialize($class->getDatabaseIdentifierValue($id)); } return $id; } /** * INTERNAL: * Checks whether an identifier exists in the identity map. * * @ignore * @param string $id * @param string $rootClassName * @return boolean */ public function containsId($id, $rootClassName) { return isset($this->identityMap[$rootClassName][serialize($id)]); } /** * Persists a document as part of the current unit of work. * * @param object $document The document to persist. * @throws MongoDBException If trying to persist MappedSuperclass. * @throws \InvalidArgumentException If there is something wrong with document's identifier. */ public function persist($document) { $class = $this->dm->getClassMetadata(get_class($document)); if ($class->isMappedSuperclass) { throw MongoDBException::cannotPersistMappedSuperclass($class->name); } $visited = array(); $this->doPersist($document, $visited); } /** * Saves a document as part of the current unit of work. * This method is internally called during save() cascades as it tracks * the already visited documents to prevent infinite recursions. * * NOTE: This method always considers documents that are not yet known to * this UnitOfWork as NEW. * * @param object $document The document to persist. * @param array $visited The already visited documents. * @throws \InvalidArgumentException * @throws MongoDBException */ private function doPersist($document, array &$visited) { $oid = spl_object_hash($document); if (isset($visited[$oid])) { return; // Prevent infinite recursion } $visited[$oid] = $document; // Mark visited $class = $this->dm->getClassMetadata(get_class($document)); $documentState = $this->getDocumentState($document, self::STATE_NEW); switch ($documentState) { case self::STATE_MANAGED: // Nothing to do, except if policy is "deferred explicit" if ($class->isChangeTrackingDeferredExplicit()) { $this->scheduleForDirtyCheck($document); } break; case self::STATE_NEW: $this->persistNew($class, $document); break; case self::STATE_REMOVED: // Document becomes managed again unset($this->documentDeletions[$oid]); $this->documentStates[$oid] = self::STATE_MANAGED; break; case self::STATE_DETACHED: throw new \InvalidArgumentException( "Behavior of persist() for a detached document is not yet defined."); break; default: throw MongoDBException::invalidDocumentState($documentState); } $this->cascadePersist($document, $visited); } /** * Deletes a document as part of the current unit of work. * * @param object $document The document to remove. */ public function remove($document) { $visited = array(); $this->doRemove($document, $visited); } /** * Deletes a document as part of the current unit of work. * * This method is internally called during delete() cascades as it tracks * the already visited documents to prevent infinite recursions. * * @param object $document The document to delete. * @param array $visited The map of the already visited documents. * @throws MongoDBException */ private function doRemove($document, array &$visited) { $oid = spl_object_hash($document); if (isset($visited[$oid])) { return; // Prevent infinite recursion } $visited[$oid] = $document; // mark visited /* Cascade first, because scheduleForDelete() removes the entity from * the identity map, which can cause problems when a lazy Proxy has to * be initialized for the cascade operation. */ $this->cascadeRemove($document, $visited); $class = $this->dm->getClassMetadata(get_class($document)); $documentState = $this->getDocumentState($document); switch ($documentState) { case self::STATE_NEW: case self::STATE_REMOVED: // nothing to do break; case self::STATE_MANAGED: if ( ! empty($class->lifecycleCallbacks[Events::preRemove])) { $class->invokeLifecycleCallbacks(Events::preRemove, $document); } if ($this->evm->hasListeners(Events::preRemove)) { $this->evm->dispatchEvent(Events::preRemove, new LifecycleEventArgs($document, $this->dm)); } $this->scheduleForDelete($document); break; case self::STATE_DETACHED: throw MongoDBException::detachedDocumentCannotBeRemoved(); default: throw MongoDBException::invalidDocumentState($documentState); } } /** * Merges the state of the given detached document into this UnitOfWork. * * @param object $document * @return object The managed copy of the document. */ public function merge($document) { $visited = array(); return $this->doMerge($document, $visited); } /** * Executes a merge operation on a document. * * @param object $document * @param array $visited * @param object|null $prevManagedCopy * @param array|null $assoc * * @return object The managed copy of the document. * * @throws InvalidArgumentException If the entity instance is NEW. * @throws LockException If the document uses optimistic locking through a * version attribute and the version check against the * managed copy fails. */ private function doMerge($document, array &$visited, $prevManagedCopy = null, $assoc = null) { $oid = spl_object_hash($document); if (isset($visited[$oid])) { return $visited[$oid]; // Prevent infinite recursion } $visited[$oid] = $document; // mark visited $class = $this->dm->getClassMetadata(get_class($document)); /* First we assume DETACHED, although it can still be NEW but we can * avoid an extra DB round trip this way. If it is not MANAGED but has * an identity, we need to fetch it from the DB anyway in order to * merge. MANAGED documents are ignored by the merge operation. */ $managedCopy = $document; if ($this->getDocumentState($document, self::STATE_DETACHED) !== self::STATE_MANAGED) { if ($document instanceof Proxy && ! $document->__isInitialized()) { $document->__load(); } // Try to look the document up in the identity map. $id = $class->isEmbeddedDocument ? null : $class->getIdentifierObject($document); if ($id === null) { // If there is no identifier, it is actually NEW. $managedCopy = $class->newInstance(); $this->persistNew($class, $managedCopy); } else { $managedCopy = $this->tryGetById($id, $class); if ($managedCopy) { // We have the document in memory already, just make sure it is not removed. if ($this->getDocumentState($managedCopy) === self::STATE_REMOVED) { throw new \InvalidArgumentException('Removed entity detected during merge. Cannot merge with a removed entity.'); } } else { // We need to fetch the managed copy in order to merge. $managedCopy = $this->dm->find($class->name, $id); } if ($managedCopy === null) { // If the identifier is ASSIGNED, it is NEW $managedCopy = $class->newInstance(); $class->setIdentifierValue($managedCopy, $id); $this->persistNew($class, $managedCopy); } else { if ($managedCopy instanceof Proxy && ! $managedCopy->__isInitialized__) { $managedCopy->__load(); } } } if ($class->isVersioned) { $managedCopyVersion = $class->reflFields[$class->versionField]->getValue($managedCopy); $documentVersion = $class->reflFields[$class->versionField]->getValue($document); // Throw exception if versions don't match if ($managedCopyVersion != $documentVersion) { throw LockException::lockFailedVersionMissmatch($document, $documentVersion, $managedCopyVersion); } } // Merge state of $document into existing (managed) document foreach ($class->reflClass->getProperties() as $prop) { $name = $prop->name; $prop->setAccessible(true); if ( ! isset($class->associationMappings[$name])) { if ( ! $class->isIdentifier($name)) { $prop->setValue($managedCopy, $prop->getValue($document)); } } else { $assoc2 = $class->associationMappings[$name]; if ($assoc2['type'] === 'one') { $other = $prop->getValue($document); if ($other === null) { $prop->setValue($managedCopy, null); } elseif ($other instanceof Proxy && ! $other->__isInitialized__) { // Do not merge fields marked lazy that have not been fetched continue; } elseif ( ! $assoc2['isCascadeMerge']) { if ($this->getDocumentState($other) === self::STATE_DETACHED) { $targetDocument = isset($assoc2['targetDocument']) ? $assoc2['targetDocument'] : get_class($other); /* @var $targetClass \Doctrine\ODM\MongoDB\Mapping\ClassMetadataInfo */ $targetClass = $this->dm->getClassMetadata($targetDocument); $relatedId = $targetClass->getIdentifierObject($other); if ($targetClass->subClasses) { $other = $this->dm->find($targetClass->name, $relatedId); } else { $other = $this ->dm ->getProxyFactory() ->getProxy($assoc2['targetDocument'], array($targetClass->identifier => $relatedId)); $this->registerManaged($other, $relatedId, array()); } } $prop->setValue($managedCopy, $other); } } else { $mergeCol = $prop->getValue($document); if ($mergeCol instanceof PersistentCollection && ! $mergeCol->isInitialized()) { /* Do not merge fields marked lazy that have not * been fetched. Keep the lazy persistent collection * of the managed copy. */ continue; } $managedCol = $prop->getValue($managedCopy); if ( ! $managedCol) { $managedCol = new PersistentCollection(new ArrayCollection(), $this->dm, $this); $managedCol->setOwner($managedCopy, $assoc2); $prop->setValue($managedCopy, $managedCol); $this->originalDocumentData[$oid][$name] = $managedCol; } /* Note: do not process association's target documents. * They will be handled during the cascade. Initialize * and, if necessary, clear $managedCol for now. */ if ($assoc2['isCascadeMerge']) { $managedCol->initialize(); // If $managedCol differs from the merged collection, clear and set dirty if ( ! $managedCol->isEmpty() && $managedCol !== $mergeCol) { $managedCol->unwrap()->clear(); $managedCol->setDirty(true); if ($assoc2['isOwningSide'] && $class->isChangeTrackingNotify()) { $this->scheduleForDirtyCheck($managedCopy); } } } } } if ($class->isChangeTrackingNotify()) { // Just treat all properties as changed, there is no other choice. $this->propertyChanged($managedCopy, $name, null, $prop->getValue($managedCopy)); } } if ($class->isChangeTrackingDeferredExplicit()) { $this->scheduleForDirtyCheck($document); } } if ($prevManagedCopy !== null) { $assocField = $assoc['fieldName']; $prevClass = $this->dm->getClassMetadata(get_class($prevManagedCopy)); if ($assoc['type'] === 'one') { $prevClass->reflFields[$assocField]->setValue($prevManagedCopy, $managedCopy); } else { $prevClass->reflFields[$assocField]->getValue($prevManagedCopy)->add($managedCopy); if ($assoc['type'] === 'many' && isset($assoc['mappedBy'])) { $class->reflFields[$assoc['mappedBy']]->setValue($managedCopy, $prevManagedCopy); } } } // Mark the managed copy visited as well $visited[spl_object_hash($managedCopy)] = true; $this->cascadeMerge($document, $managedCopy, $visited); return $managedCopy; } /** * Detaches a document from the persistence management. It's persistence will * no longer be managed by Doctrine. * * @param object $document The document to detach. */ public function detach($document) { $visited = array(); $this->doDetach($document, $visited); } /** * Executes a detach operation on the given document. * * @param object $document * @param array $visited * @internal This method always considers documents with an assigned identifier as DETACHED. */ private function doDetach($document, array &$visited) { $oid = spl_object_hash($document); if (isset($visited[$oid])) { return; // Prevent infinite recursion } $visited[$oid] = $document; // mark visited switch ($this->getDocumentState($document, self::STATE_DETACHED)) { case self::STATE_MANAGED: $this->removeFromIdentityMap($document); unset($this->documentInsertions[$oid], $this->documentUpdates[$oid], $this->documentDeletions[$oid], $this->documentIdentifiers[$oid], $this->documentStates[$oid], $this->originalDocumentData[$oid], $this->parentAssociations[$oid], $this->documentUpserts[$oid], $this->hasScheduledCollections[$oid]); break; case self::STATE_NEW: case self::STATE_DETACHED: return; } $this->cascadeDetach($document, $visited); } /** * Refreshes the state of the given document from the database, overwriting * any local, unpersisted changes. * * @param object $document The document to refresh. * @throws \InvalidArgumentException If the document is not MANAGED. */ public function refresh($document) { $visited = array(); $this->doRefresh($document, $visited); } /** * Executes a refresh operation on a document. * * @param object $document The document to refresh. * @param array $visited The already visited documents during cascades. * @throws \InvalidArgumentException If the document is not MANAGED. */ private function doRefresh($document, array &$visited) { $oid = spl_object_hash($document); if (isset($visited[$oid])) { return; // Prevent infinite recursion } $visited[$oid] = $document; // mark visited $class = $this->dm->getClassMetadata(get_class($document)); if ( ! $class->isEmbeddedDocument) { if ($this->getDocumentState($document) == self::STATE_MANAGED) { $id = $class->getDatabaseIdentifierValue($this->documentIdentifiers[$oid]); $this->getDocumentPersister($class->name)->refresh($id, $document); } else { throw new \InvalidArgumentException("Document is not MANAGED."); } } $this->cascadeRefresh($document, $visited); } /** * Cascades a refresh operation to associated documents. * * @param object $document * @param array $visited */ private function cascadeRefresh($document, array &$visited) { $class = $this->dm->getClassMetadata(get_class($document)); $associationMappings = array_filter( $class->associationMappings, function ($assoc) { return $assoc['isCascadeRefresh']; } ); foreach ($associationMappings as $mapping) { $relatedDocuments = $class->reflFields[$mapping['fieldName']]->getValue($document); if ($relatedDocuments instanceof Collection || is_array($relatedDocuments)) { if ($relatedDocuments instanceof PersistentCollection) { // Unwrap so that foreach() does not initialize $relatedDocuments = $relatedDocuments->unwrap(); } foreach ($relatedDocuments as $relatedDocument) { $this->doRefresh($relatedDocument, $visited); } } elseif ($relatedDocuments !== null) { $this->doRefresh($relatedDocuments, $visited); } } } /** * Cascades a detach operation to associated documents. * * @param object $document * @param array $visited */ private function cascadeDetach($document, array &$visited) { $class = $this->dm->getClassMetadata(get_class($document)); foreach ($class->fieldMappings as $mapping) { if ( ! $mapping['isCascadeDetach']) { continue; } $relatedDocuments = $class->reflFields[$mapping['fieldName']]->getValue($document); if (($relatedDocuments instanceof Collection || is_array($relatedDocuments))) { if ($relatedDocuments instanceof PersistentCollection) { // Unwrap so that foreach() does not initialize $relatedDocuments = $relatedDocuments->unwrap(); } foreach ($relatedDocuments as $relatedDocument) { $this->doDetach($relatedDocument, $visited); } } elseif ($relatedDocuments !== null) { $this->doDetach($relatedDocuments, $visited); } } } /** * Cascades a merge operation to associated documents. * * @param object $document * @param object $managedCopy * @param array $visited */ private function cascadeMerge($document, $managedCopy, array &$visited) { $class = $this->dm->getClassMetadata(get_class($document)); $associationMappings = array_filter( $class->associationMappings, function ($assoc) { return $assoc['isCascadeMerge']; } ); foreach ($associationMappings as $assoc) { $relatedDocuments = $class->reflFields[$assoc['fieldName']]->getValue($document); if ($relatedDocuments instanceof Collection || is_array($relatedDocuments)) { if ($relatedDocuments === $class->reflFields[$assoc['fieldName']]->getValue($managedCopy)) { // Collections are the same, so there is nothing to do continue; } if ($relatedDocuments instanceof PersistentCollection) { // Unwrap so that foreach() does not initialize $relatedDocuments = $relatedDocuments->unwrap(); } foreach ($relatedDocuments as $relatedDocument) { $this->doMerge($relatedDocument, $visited, $managedCopy, $assoc); } } elseif ($relatedDocuments !== null) { $this->doMerge($relatedDocuments, $visited, $managedCopy, $assoc); } } } /** * Cascades the save operation to associated documents. * * @param object $document * @param array $visited */ private function cascadePersist($document, array &$visited) { $class = $this->dm->getClassMetadata(get_class($document)); $associationMappings = array_filter( $class->associationMappings, function ($assoc) { return $assoc['isCascadePersist']; } ); foreach ($associationMappings as $fieldName => $mapping) { $relatedDocuments = $class->reflFields[$fieldName]->getValue($document); if ($relatedDocuments instanceof Collection || is_array($relatedDocuments)) { if ($relatedDocuments instanceof PersistentCollection) { if ($relatedDocuments->getOwner() !== $document) { $relatedDocuments = $this->fixPersistentCollectionOwnership($relatedDocuments, $document, $class, $mapping['name']); } // Unwrap so that foreach() does not initialize $relatedDocuments = $relatedDocuments->unwrap(); } $count = 0; foreach ($relatedDocuments as $relatedKey => $relatedDocument) { if ( ! empty($mapping['embedded'])) { list(, $knownParent, ) = $this->getParentAssociation($relatedDocument); if ($knownParent && $knownParent !== $document) { $relatedDocument = clone $relatedDocument; $relatedDocuments[$relatedKey] = $relatedDocument; } $pathKey = ! isset($mapping['strategy']) || CollectionHelper::isList($mapping['strategy']) ? $count++ : $relatedKey; $this->setParentAssociation($relatedDocument, $mapping, $document, $mapping['name'] . '.' . $pathKey); } $this->doPersist($relatedDocument, $visited); } } elseif ($relatedDocuments !== null) { if ( ! empty($mapping['embedded'])) { list(, $knownParent, ) = $this->getParentAssociation($relatedDocuments); if ($knownParent && $knownParent !== $document) { $relatedDocuments = clone $relatedDocuments; $class->setFieldValue($document, $mapping['name'], $relatedDocuments); } $this->setParentAssociation($relatedDocuments, $mapping, $document, $mapping['name']); } $this->doPersist($relatedDocuments, $visited); } } } /** * Cascades the delete operation to associated documents. * * @param object $document * @param array $visited */ private function cascadeRemove($document, array &$visited) { $class = $this->dm->getClassMetadata(get_class($document)); foreach ($class->fieldMappings as $mapping) { if ( ! $mapping['isCascadeRemove']) { continue; } if ($document instanceof Proxy && ! $document->__isInitialized__) { $document->__load(); } $relatedDocuments = $class->reflFields[$mapping['fieldName']]->getValue($document); if (($relatedDocuments instanceof Collection || is_array($relatedDocuments))) { // If its a PersistentCollection initialization is intended! No unwrap! foreach ($relatedDocuments as $relatedDocument) { $this->doRemove($relatedDocument, $visited); } } elseif ($relatedDocuments !== null) { $this->doRemove($relatedDocuments, $visited); } } } /** * Acquire a lock on the given document. * * @param object $document * @param int $lockMode * @param int $lockVersion * @throws LockException * @throws \InvalidArgumentException */ public function lock($document, $lockMode, $lockVersion = null) { if ($this->getDocumentState($document) != self::STATE_MANAGED) { throw new \InvalidArgumentException("Document is not MANAGED."); } $documentName = get_class($document); $class = $this->dm->getClassMetadata($documentName); if ($lockMode == LockMode::OPTIMISTIC) { if ( ! $class->isVersioned) { throw LockException::notVersioned($documentName); } if ($lockVersion != null) { $documentVersion = $class->reflFields[$class->versionField]->getValue($document); if ($documentVersion != $lockVersion) { throw LockException::lockFailedVersionMissmatch($document, $lockVersion, $documentVersion); } } } elseif (in_array($lockMode, array(LockMode::PESSIMISTIC_READ, LockMode::PESSIMISTIC_WRITE))) { $this->getDocumentPersister($class->name)->lock($document, $lockMode); } } /** * Releases a lock on the given document. * * @param object $document * @throws \InvalidArgumentException */ public function unlock($document) { if ($this->getDocumentState($document) != self::STATE_MANAGED) { throw new \InvalidArgumentException("Document is not MANAGED."); } $documentName = get_class($document); $this->getDocumentPersister($documentName)->unlock($document); } /** * Clears the UnitOfWork. * * @param string|null $documentName if given, only documents of this type will get detached. */ public function clear($documentName = null) { if ($documentName === null) { $this->identityMap = $this->documentIdentifiers = $this->originalDocumentData = $this->documentChangeSets = $this->documentStates = $this->scheduledForDirtyCheck = $this->documentInsertions = $this->documentUpserts = $this->documentUpdates = $this->documentDeletions = $this->collectionUpdates = $this->collectionDeletions = $this->parentAssociations = $this->orphanRemovals = $this->hasScheduledCollections = array(); } else { $visited = array(); foreach ($this->identityMap as $className => $documents) { if ($className === $documentName) { foreach ($documents as $document) { $this->doDetach($document, $visited, true); } } } } if ($this->evm->hasListeners(Events::onClear)) { $this->evm->dispatchEvent(Events::onClear, new Event\OnClearEventArgs($this->dm, $documentName)); } } /** * INTERNAL: * Schedules an embedded document for removal. The remove() operation will be * invoked on that document at the beginning of the next commit of this * UnitOfWork. * * @ignore * @param object $document */ public function scheduleOrphanRemoval($document) { $this->orphanRemovals[spl_object_hash($document)] = $document; } /** * INTERNAL: * Unschedules an embedded or referenced object for removal. * * @ignore * @param object $document */ public function unscheduleOrphanRemoval($document) { $oid = spl_object_hash($document); if (isset($this->orphanRemovals[$oid])) { unset($this->orphanRemovals[$oid]); } } /** * Fixes PersistentCollection state if it wasn't used exactly as we had in mind: * 1) sets owner if it was cloned * 2) clones collection, sets owner, updates document's property and, if necessary, updates originalData * 3) NOP if state is OK * Returned collection should be used from now on (only important with 2nd point) * * @param PersistentCollection $coll * @param object $document * @param ClassMetadata $class * @param string $propName * @return PersistentCollection */ private function fixPersistentCollectionOwnership(PersistentCollection $coll, $document, ClassMetadata $class, $propName) { $owner = $coll->getOwner(); if ($owner === null) { // cloned $coll->setOwner($document, $class->fieldMappings[$propName]); } elseif ($owner !== $document) { // no clone, we have to fix if ( ! $coll->isInitialized()) { $coll->initialize(); // we have to do this otherwise the cols share state } $newValue = clone $coll; $newValue->setOwner($document, $class->fieldMappings[$propName]); $class->reflFields[$propName]->setValue($document, $newValue); if ($this->isScheduledForUpdate($document)) { // @todo following line should be superfluous once collections are stored in change sets $this->setOriginalDocumentProperty(spl_object_hash($document), $propName, $newValue); } return $newValue; } return $coll; } /** * INTERNAL: * Schedules a complete collection for removal when this UnitOfWork commits. * * @param PersistentCollection $coll */ public function scheduleCollectionDeletion(PersistentCollection $coll) { $oid = spl_object_hash($coll); unset($this->collectionUpdates[$oid]); if ( ! isset($this->collectionDeletions[$oid])) { $this->collectionDeletions[$oid] = $coll; $this->scheduleCollectionOwner($coll); } } /** * Checks whether a PersistentCollection is scheduled for deletion. * * @param PersistentCollection $coll * @return boolean */ public function isCollectionScheduledForDeletion(PersistentCollection $coll) { return isset($this->collectionDeletions[spl_object_hash($coll)]); } /** * INTERNAL: * Unschedules a collection from being deleted when this UnitOfWork commits. * * @param \Doctrine\ODM\MongoDB\PersistentCollection $coll */ public function unscheduleCollectionDeletion(PersistentCollection $coll) { $oid = spl_object_hash($coll); if (isset($this->collectionDeletions[$oid])) { $topmostOwner = $this->getOwningDocument($coll->getOwner()); unset($this->collectionDeletions[$oid]); unset($this->hasScheduledCollections[spl_object_hash($topmostOwner)][$oid]); } } /** * INTERNAL: * Schedules a collection for update when this UnitOfWork commits. * * @param PersistentCollection $coll */ public function scheduleCollectionUpdate(PersistentCollection $coll) { $mapping = $coll->getMapping(); if (CollectionHelper::usesSet($mapping['strategy'])) { /* There is no need to $unset collection if it will be $set later * This is NOP if collection is not scheduled for deletion */ $this->unscheduleCollectionDeletion($coll); } $oid = spl_object_hash($coll); if ( ! isset($this->collectionUpdates[$oid])) { $this->collectionUpdates[$oid] = $coll; $this->scheduleCollectionOwner($coll); } } /** * INTERNAL: * Unschedules a collection from being updated when this UnitOfWork commits. * * @param \Doctrine\ODM\MongoDB\PersistentCollection $coll */ public function unscheduleCollectionUpdate(PersistentCollection $coll) { $oid = spl_object_hash($coll); if (isset($this->collectionUpdates[$oid])) { $topmostOwner = $this->getOwningDocument($coll->getOwner()); unset($this->collectionUpdates[$oid]); unset($this->hasScheduledCollections[spl_object_hash($topmostOwner)][$oid]); } } /** * Checks whether a PersistentCollection is scheduled for update. * * @param PersistentCollection $coll * @return boolean */ public function isCollectionScheduledForUpdate(PersistentCollection $coll) { return isset($this->collectionUpdates[spl_object_hash($coll)]); } /** * INTERNAL: * Gets PersistentCollections that have been visited during computing change * set of $document * * @param object $document * @return PersistentCollection[] */ public function getVisitedCollections($document) { $oid = spl_object_hash($document); return isset($this->visitedCollections[$oid]) ? $this->visitedCollections[$oid] : array(); } /** * INTERNAL: * Gets PersistentCollections that are scheduled to update and related to $document * * @param object $document * @return array */ public function getScheduledCollections($document) { $oid = spl_object_hash($document); return isset($this->hasScheduledCollections[$oid]) ? $this->hasScheduledCollections[$oid] : array(); } /** * Checks whether the document is related to a PersistentCollection * scheduled for update or deletion. * * @param object $document * @return boolean */ public function hasScheduledCollections($document) { return isset($this->hasScheduledCollections[spl_object_hash($document)]); } /** * Marks the PersistentCollection's top-level owner as having a relation to * a collection scheduled for update or deletion. * * If the owner is not scheduled for any lifecycle action, it will be * scheduled for update to ensure that versioning takes place if necessary. * * If the collection is nested within atomic collection, it is immediately * unscheduled and atomic one is scheduled for update instead. This makes * calculating update data way easier. * * @param PersistentCollection $coll */ private function scheduleCollectionOwner(PersistentCollection $coll) { $document = $this->getOwningDocument($coll->getOwner()); $this->hasScheduledCollections[spl_object_hash($document)][spl_object_hash($coll)] = $coll; if ($document !== $coll->getOwner()) { $parent = $coll->getOwner(); while (null !== ($parentAssoc = $this->getParentAssociation($parent))) { list($mapping, $parent, ) = $parentAssoc; } if (isset($mapping['strategy']) && CollectionHelper::isAtomic($mapping['strategy'])) { $class = $this->dm->getClassMetadata(get_class($document)); $atomicCollection = $class->getFieldValue($document, $mapping['fieldName']); $this->scheduleCollectionUpdate($atomicCollection); $this->unscheduleCollectionDeletion($coll); $this->unscheduleCollectionUpdate($coll); } } if ( ! $this->isDocumentScheduled($document)) { $this->scheduleForUpdate($document); } } /** * Get the top-most owning document of a given document * * If a top-level document is provided, that same document will be returned. * For an embedded document, we will walk through parent associations until * we find a top-level document. * * @param object $document * @throws \UnexpectedValueException when a top-level document could not be found * @return object */ public function getOwningDocument($document) { $class = $this->dm->getClassMetadata(get_class($document)); while ($class->isEmbeddedDocument) { $parentAssociation = $this->getParentAssociation($document); if ( ! $parentAssociation) { throw new \UnexpectedValueException("Could not determine parent association for " . get_class($document)); } list(, $document, ) = $parentAssociation; $class = $this->dm->getClassMetadata(get_class($document)); } return $document; } /** * Gets the class name for an association (embed or reference) with respect * to any discriminator value. * * @param array $mapping Field mapping for the association * @param array|null $data Data for the embedded document or reference */ public function getClassNameForAssociation(array $mapping, $data) { $discriminatorField = isset($mapping['discriminatorField']) ? $mapping['discriminatorField'] : null; $discriminatorValue = null; if (isset($discriminatorField, $data[$discriminatorField])) { $discriminatorValue = $data[$discriminatorField]; } elseif (isset($mapping['defaultDiscriminatorValue'])) { $discriminatorValue = $mapping['defaultDiscriminatorValue']; } if ($discriminatorValue !== null) { return isset($mapping['discriminatorMap'][$discriminatorValue]) ? $mapping['discriminatorMap'][$discriminatorValue] : $discriminatorValue; } $class = $this->dm->getClassMetadata($mapping['targetDocument']); if (isset($class->discriminatorField, $data[$class->discriminatorField])) { $discriminatorValue = $data[$class->discriminatorField]; } elseif ($class->defaultDiscriminatorValue !== null) { $discriminatorValue = $class->defaultDiscriminatorValue; } if ($discriminatorValue !== null) { return isset($class->discriminatorMap[$discriminatorValue]) ? $class->discriminatorMap[$discriminatorValue] : $discriminatorValue; } return $mapping['targetDocument']; } /** * INTERNAL: * Creates a document. Used for reconstitution of documents during hydration. * * @ignore * @param string $className The name of the document class. * @param array $data The data for the document. * @param array $hints Any hints to account for during reconstitution/lookup of the document. * @param object The document to be hydrated into in case of creation * @return object The document instance. * @internal Highly performance-sensitive method. */ public function getOrCreateDocument($className, $data, &$hints = array(), $document = null) { $class = $this->dm->getClassMetadata($className); // @TODO figure out how to remove this $discriminatorValue = null; if (isset($class->discriminatorField, $data[$class->discriminatorField])) { $discriminatorValue = $data[$class->discriminatorField]; } elseif (isset($class->defaultDiscriminatorValue)) { $discriminatorValue = $class->defaultDiscriminatorValue; } if ($discriminatorValue !== null) { $className = isset($class->discriminatorMap[$discriminatorValue]) ? $class->discriminatorMap[$discriminatorValue] : $discriminatorValue; $class = $this->dm->getClassMetadata($className); unset($data[$class->discriminatorField]); } $id = $class->getDatabaseIdentifierValue($data['_id']); $serializedId = serialize($id); if (isset($this->identityMap[$class->name][$serializedId])) { $document = $this->identityMap[$class->name][$serializedId]; $oid = spl_object_hash($document); if ($document instanceof Proxy && ! $document->__isInitialized__) { $document->__isInitialized__ = true; $overrideLocalValues = true; if ($document instanceof NotifyPropertyChanged) { $document->addPropertyChangedListener($this); } } else { $overrideLocalValues = ! empty($hints[Query::HINT_REFRESH]); } if ($overrideLocalValues) { $data = $this->hydratorFactory->hydrate($document, $data, $hints); $this->originalDocumentData[$oid] = $data; } } else { if ($document === null) { $document = $class->newInstance(); } $this->registerManaged($document, $id, $data); $oid = spl_object_hash($document); $this->documentStates[$oid] = self::STATE_MANAGED; $this->identityMap[$class->name][$serializedId] = $document; $data = $this->hydratorFactory->hydrate($document, $data, $hints); $this->originalDocumentData[$oid] = $data; } return $document; } /** * Initializes (loads) an uninitialized persistent collection of a document. * * @param PersistentCollection $collection The collection to initialize. */ public function loadCollection(PersistentCollection $collection) { $this->getDocumentPersister(get_class($collection->getOwner()))->loadCollection($collection); } /** * Gets the identity map of the UnitOfWork. * * @return array */ public function getIdentityMap() { return $this->identityMap; } /** * Gets the original data of a document. The original data is the data that was * present at the time the document was reconstituted from the database. * * @param object $document * @return array */ public function getOriginalDocumentData($document) { $oid = spl_object_hash($document); if (isset($this->originalDocumentData[$oid])) { return $this->originalDocumentData[$oid]; } return array(); } /** * @ignore */ public function setOriginalDocumentData($document, array $data) { $this->originalDocumentData[spl_object_hash($document)] = $data; } /** * INTERNAL: * Sets a property value of the original data array of a document. * * @ignore * @param string $oid * @param string $property * @param mixed $value */ public function setOriginalDocumentProperty($oid, $property, $value) { $this->originalDocumentData[$oid][$property] = $value; } /** * Gets the identifier of a document. * * @param object $document * @return mixed The identifier value */ public function getDocumentIdentifier($document) { return isset($this->documentIdentifiers[spl_object_hash($document)]) ? $this->documentIdentifiers[spl_object_hash($document)] : null; } /** * Checks whether the UnitOfWork has any pending insertions. * * @return boolean TRUE if this UnitOfWork has pending insertions, FALSE otherwise. */ public function hasPendingInsertions() { return ! empty($this->documentInsertions); } /** * Calculates the size of the UnitOfWork. The size of the UnitOfWork is the * number of documents in the identity map. * * @return integer */ public function size() { $count = 0; foreach ($this->identityMap as $documentSet) { $count += count($documentSet); } return $count; } /** * INTERNAL: * Registers a document as managed. * * TODO: This method assumes that $id is a valid PHP identifier for the * document class. If the class expects its database identifier to be a * MongoId, and an incompatible $id is registered (e.g. an integer), the * document identifiers map will become inconsistent with the identity map. * In the future, we may want to round-trip $id through a PHP and database * conversion and throw an exception if it's inconsistent. * * @param object $document The document. * @param array $id The identifier values. * @param array $data The original document data. */ public function registerManaged($document, $id, array $data) { $oid = spl_object_hash($document); $class = $this->dm->getClassMetadata(get_class($document)); if ( ! $class->identifier || $id === null) { $this->documentIdentifiers[$oid] = $oid; } else { $this->documentIdentifiers[$oid] = $class->getPHPIdentifierValue($id); } $this->documentStates[$oid] = self::STATE_MANAGED; $this->originalDocumentData[$oid] = $data; $this->addToIdentityMap($document); } /** * INTERNAL: * Clears the property changeset of the document with the given OID. * * @param string $oid The document's OID. */ public function clearDocumentChangeSet($oid) { $this->documentChangeSets[$oid] = array(); } /* PropertyChangedListener implementation */ /** * Notifies this UnitOfWork of a property change in a document. * * @param object $document The document that owns the property. * @param string $propertyName The name of the property that changed. * @param mixed $oldValue The old value of the property. * @param mixed $newValue The new value of the property. */ public function propertyChanged($document, $propertyName, $oldValue, $newValue) { $oid = spl_object_hash($document); $class = $this->dm->getClassMetadata(get_class($document)); if ( ! isset($class->fieldMappings[$propertyName])) { return; // ignore non-persistent fields } // Update changeset and mark document for synchronization $this->documentChangeSets[$oid][$propertyName] = array($oldValue, $newValue); if ( ! isset($this->scheduledForDirtyCheck[$class->name][$oid])) { $this->scheduleForDirtyCheck($document); } } /** * Gets the currently scheduled document insertions in this UnitOfWork. * * @return array */ public function getScheduledDocumentInsertions() { return $this->documentInsertions; } /** * Gets the currently scheduled document upserts in this UnitOfWork. * * @return array */ public function getScheduledDocumentUpserts() { return $this->documentUpserts; } /** * Gets the currently scheduled document updates in this UnitOfWork. * * @return array */ public function getScheduledDocumentUpdates() { return $this->documentUpdates; } /** * Gets the currently scheduled document deletions in this UnitOfWork. * * @return array */ public function getScheduledDocumentDeletions() { return $this->documentDeletions; } /** * Get the currently scheduled complete collection deletions * * @return array */ public function getScheduledCollectionDeletions() { return $this->collectionDeletions; } /** * Gets the currently scheduled collection inserts, updates and deletes. * * @return array */ public function getScheduledCollectionUpdates() { return $this->collectionUpdates; } /** * Helper method to initialize a lazy loading proxy or persistent collection. * * @param object * @return void */ public function initializeObject($obj) { if ($obj instanceof Proxy) { $obj->__load(); } elseif ($obj instanceof PersistentCollection) { $obj->initialize(); } } private static function objToStr($obj) { return method_exists($obj, '__toString') ? (string)$obj : get_class($obj) . '@' . spl_object_hash($obj); } }
solocommand/mongodb-odm
lib/Doctrine/ODM/MongoDB/UnitOfWork.php
PHP
mit
117,026
/*global define: false */ define([ // Application. 'app', // Libraries. 'backbone', 'debug', // Modules. 'modules/session', 'modules/alert', 'modules/header', 'modules/meta' ], function(app, Backbone, debug, Session, Alert, Header, Meta) { 'use strict'; var Thing = app.module(); // Thing Router // ----------- Thing.Router = Backbone.SubRoute.extend({ routes: { 'list': 'list' // #accounts/list }, initialize: function(options) { debug.info('Entering Thing.Router.initialize()...'); this.session = options.session; this.account = options.account; this.alerts = options.alerts; }, before: function( route ) { debug.info('Entering Thing.Router.before(' + route + ')...'); }, list: function() { debug.info('Entering Thing.Router.profile()...'); // Set layout and views, then render. app.useLayout('onecolumn').setViews({ '#container-nav': new Header.Views.Nav({ model: this.session, alerts: this.alerts }), '#container-alert': new Alert.Views.List({ collection: this.alerts }), '#container-content': new Thing.Views.List(), '#container-footer': new Meta.Views.Footer() }).render(); } }); Thing.Views.List = Backbone.View.extend({ template: 'thing/list', initialize: function() { debug.info('Entering Thing.Views.List.initialize()...'); } }); // Required, return the module for AMD compliance. return Thing; });
vovantics/backbone-modulebone
app/scripts/modules/thing.js
JavaScript
mit
1,793
/** * The Fires layer module. * * @return FiresLayer class (extends CartoDBLayerClass) */ define( [ 'underscore', 'moment', 'uri', 'abstract/layer/CartoDBLayerClass', 'map/presenters/layers/FiresLayerPresenter', 'text!map/cartocss/global_7d.cartocss' ], function( _, moment, UriTemplate, CartoDBLayerClass, Presenter, global7dCartoCSS ) { 'use strict'; var FiresLayer = CartoDBLayerClass.extend({ options: { sql: "SELECT the_geom_webmercator, acq_time, COALESCE(to_char(acq_date, 'DD Mon, YYYY')) as acq_date, confidence, brightness, longitude, latitude FROM global_7d WHERE acq_date > '{year}-{month}-{day}' AND CAST(confidence AS INT) > 30", cartocss: global7dCartoCSS, interactivity: 'acq_time, acq_date, confidence, brightness, longitude, latitude', infowindow: true }, init: function(layer, options, map) { _.bindAll(this, 'setCurrentDate'); this.presenter = new Presenter(this); // Default to 48 hours this.setCurrentDate( options.currentDate || [ moment().subtract(48, 'hours'), moment().subtract(24, 'hours') ] ); this._super(layer, options, map); }, getQuery: function() { var query = new UriTemplate(this.options.sql).fillFromObject({ tableName: this.layer.table_name, year: moment(this.currentDate[0]).year(), month: moment(this.currentDate[0]).format('MM'), day: moment(this.currentDate[0]).format('DD') }); return query; }, /** * Used by FiresLayerPresenter to set the dates for the tile. * * @param {Array} date 2D array of moment dates [begin, end] */ setCurrentDate: function(date) { this.currentDate = date; } }); return FiresLayer; } );
Vizzuality/gfw-climate
app/assets/javascripts/map/views/layers/FiresLayer.js
JavaScript
mit
1,940
package worker import ( "context" "fmt" "syscall" "time" cmdutil "github.com/ohsu-comp-bio/funnel/cmd/util" "github.com/ohsu-comp-bio/funnel/config" "github.com/ohsu-comp-bio/funnel/logger" "github.com/ohsu-comp-bio/funnel/util" "github.com/spf13/cobra" ) // Options holds a few CLI options for worker entrypoints. type Options struct { TaskID string TaskFile string TaskBase64 string } // NewCommand returns the worker command func NewCommand() *cobra.Command { cmd, _ := newCommandHooks() return cmd } type hooks struct { Run func(ctx context.Context, conf config.Config, log *logger.Logger, opts *Options) error } func newCommandHooks() (*cobra.Command, *hooks) { hooks := &hooks{ Run: Run, } var ( configFile string conf config.Config flagConf config.Config ) opts := &Options{} cmd := &cobra.Command{ Use: "worker", Short: "Funnel worker commands.", PersistentPreRunE: func(cmd *cobra.Command, args []string) error { var err error conf, err = cmdutil.MergeConfigFileWithFlags(configFile, flagConf) if err != nil { return fmt.Errorf("error processing config: %v", err) } return nil }, } workerFlags := cmdutil.WorkerFlags(&flagConf, &configFile) cmd.SetGlobalNormalizationFunc(cmdutil.NormalizeFlags) f := cmd.PersistentFlags() f.AddFlagSet(workerFlags) run := &cobra.Command{ Use: "run", Short: "Run a task directly, bypassing the server.", Args: cobra.NoArgs, RunE: func(cmd *cobra.Command, args []string) error { if opts.TaskID == "" && opts.TaskFile == "" && opts.TaskBase64 == "" { return fmt.Errorf("no task was provided") } log := logger.NewLogger("worker", conf.Logger) logger.SetGRPCLogger(log.Sub("worker-grpc")) ctx, cancel := context.WithCancel(context.Background()) ctx = util.SignalContext(ctx, time.Millisecond*500, syscall.SIGINT, syscall.SIGTERM) defer cancel() return hooks.Run(ctx, conf, log, opts) }, } f = run.Flags() f.StringVarP(&opts.TaskID, "taskID", "t", opts.TaskID, "Task ID") f.StringVarP(&opts.TaskFile, "taskFile", "f", opts.TaskFile, "Task file") f.StringVarP(&opts.TaskBase64, "taskBase64", "b", opts.TaskBase64, "Task base64") cmd.AddCommand(run) return cmd, hooks }
ohsu-comp-bio/funnel
cmd/worker/worker.go
GO
mit
2,245
/** * |---------------------------------------------------------------------- * | Copyright (c) 2016 Tilen Majerle * | * | Permission is hereby granted, free of charge, to any person * | obtaining a copy of this software and associated documentation * | files (the "Software"), to deal in the Software without restriction, * | including without limitation the rights to use, copy, modify, merge, * | publish, distribute, sublicense, and/or sell copies of the Software, * | and to permit persons to whom the Software is furnished to do so, * | subject to the following conditions: * | * | The above copyright notice and this permission notice shall be * | included in all copies or substantial portions of the Software. * | * | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE * | AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * | OTHER DEALINGS IN THE SOFTWARE. * |---------------------------------------------------------------------- */ #include "tm_stm32_button.h" /* Button states */ #define BUTTON_STATE_START 0 #define BUTTON_STATE_DEBOUNCE 1 #define BUTTON_STATE_PRESSED 2 #define BUTTON_STATE_WAITRELEASE 3 /* Internal structure */ typedef struct { TM_BUTTON_t* Buttons[BUTTON_MAX_BUTTONS]; uint16_t ButtonsCount; } TM_BUTTON_INT_t; static TM_BUTTON_INT_t Buttons; /* Internal functions */ static void TM_BUTTON_INT_CheckButton(TM_BUTTON_t* ButtonStruct); TM_BUTTON_t* TM_BUTTON_Init(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin, uint8_t ButtonState, void (*ButtonHandler)(TM_BUTTON_t*, TM_BUTTON_PressType_t)) { TM_BUTTON_t* ButtonStruct; TM_GPIO_PuPd_t P; /* Init delay function */ TM_DELAY_Init(); /* Check if available */ if (Buttons.ButtonsCount >= BUTTON_MAX_BUTTONS) { return NULL; } /* Allocate memory for button */ ButtonStruct = (TM_BUTTON_t *) malloc(sizeof(TM_BUTTON_t)); /* Check if allocated */ if (ButtonStruct == NULL) { return NULL; } /* Save settings */ ButtonStruct->GPIOx = GPIOx; ButtonStruct->GPIO_Pin = GPIO_Pin; ButtonStruct->GPIO_State = ButtonState ? 1 : 0; ButtonStruct->ButtonHandler = ButtonHandler; ButtonStruct->State = BUTTON_STATE_START; /* Set default values */ ButtonStruct->PressNormalTime = BUTTON_NORMAL_PRESS_TIME; ButtonStruct->PressLongTime = BUTTON_LONG_PRESS_TIME; ButtonStruct->PressDebounceTime = BUTTON_DEBOUNCE_TIME; /* Init pin with pull resistor */ if (ButtonStruct->GPIO_State) { /* Pulldown */ P = TM_GPIO_PuPd_DOWN; } else { /* Pullup */ P = TM_GPIO_PuPd_UP; } /* Init GPIO pin as input with proper pull resistor */ TM_GPIO_Init(GPIOx, GPIO_Pin, TM_GPIO_Mode_IN, TM_GPIO_OType_PP, P, TM_GPIO_Speed_Low); /* Save button */ Buttons.Buttons[Buttons.ButtonsCount++] = ButtonStruct; /* Return button pointer */ return ButtonStruct; } TM_BUTTON_t* TM_BUTTON_SetPressTime(TM_BUTTON_t* ButtonStruct, uint16_t Normal, uint16_t Long) { /* Set values */ ButtonStruct->PressNormalTime = Normal; ButtonStruct->PressLongTime = Long; /* Return pointer */ return ButtonStruct; } void TM_BUTTON_Update(void) { uint16_t i; /* Go through all buttons */ for (i = 0; i < Buttons.ButtonsCount; i++) { /* Check button */ TM_BUTTON_INT_CheckButton(Buttons.Buttons[i]); } } /* Internal functions */ static void TM_BUTTON_INT_CheckButton(TM_BUTTON_t* ButtonStruct) { uint32_t now, status; /* Read values */ now = TM_DELAY_Time(); status = TM_GPIO_GetInputPinValue(ButtonStruct->GPIOx, ButtonStruct->GPIO_Pin); /* First stage */ if (ButtonStruct->State == BUTTON_STATE_START) { /* Check if pressed */ if (status == ButtonStruct->GPIO_State) { /* Button pressed, go to stage BUTTON_STATE_START */ ButtonStruct->State = BUTTON_STATE_DEBOUNCE; /* Save pressed time */ ButtonStruct->StartTime = now; } } if (ButtonStruct->State == BUTTON_STATE_DEBOUNCE) { /* Button still pressed */ /* Check for debounce */ if (status == ButtonStruct->GPIO_State) { if ((now - ButtonStruct->StartTime) > ButtonStruct->PressDebounceTime) { /* Button debounce OK, Goto Normal Press */ ButtonStruct->State = BUTTON_STATE_PRESSED; /* Try to call user function */ if (ButtonStruct->ButtonHandler) { /* Call function callback */ ButtonStruct->ButtonHandler(ButtonStruct, TM_BUTTON_PressType_OnPressed); } } } else if (status != ButtonStruct->GPIO_State) { /* Not pressed */ /* It was bounce, start over */ /* Go to state BUTTON_STATE_START */ ButtonStruct->State = BUTTON_STATE_START; } } if (ButtonStruct->State == BUTTON_STATE_PRESSED) { /* Button still pressed */ /* Check for long press */ if (status == ButtonStruct->GPIO_State) { if ((now - ButtonStruct->StartTime) > ButtonStruct->PressLongTime) { /* Button pressed OK, call function */ if (ButtonStruct->ButtonHandler) { /* Call function callback */ ButtonStruct->ButtonHandler(ButtonStruct, TM_BUTTON_PressType_Long); } /* Go to stage BUTTON_STATE_WAITRELEASE */ ButtonStruct->State = BUTTON_STATE_WAITRELEASE; } } else if (status != ButtonStruct->GPIO_State) { /* Not pressed */ if ((now - ButtonStruct->StartTime) > ButtonStruct->PressNormalTime) { /* Button pressed OK, call function */ if (ButtonStruct->ButtonHandler) { /* Call function callback */ ButtonStruct->ButtonHandler(ButtonStruct, TM_BUTTON_PressType_Normal); } /* Go to stage BUTTON_STATE_WAITRELEASE */ ButtonStruct->State = BUTTON_STATE_WAITRELEASE; } else { /* Go to state BUTTON_STATE_START */ ButtonStruct->State = BUTTON_STATE_START; } } else { /* Go to state BUTTON_STATE_START */ ButtonStruct->State = BUTTON_STATE_START; } } if (ButtonStruct->State == BUTTON_STATE_WAITRELEASE) { /* Wait till button released */ if (status != ButtonStruct->GPIO_State) { /* Go to stage 0 again */ ButtonStruct->State = BUTTON_STATE_START; } } /* Save current status */ ButtonStruct->LastStatus = status; }
jibonaronno/UTouchSTM32
Inc/STM32_LIBRARIES/tm_stm32_button.c
C
mit
6,551
var Backbone = require('backbone'); var $ = require('jquery'); Backbone.$ = $; /* Templates */ var shellTemplate = require('../templates/shell.hbs'); var topBarTemplate = require('../templates/top-bar-nav.hbs'); var sidebarTemplate = require('../templates/sidebar.hbs'); /* Views */ var DashboardView = require('../views/dashboard'); var SongListView = require('../views/songList'); var SongDetailView = require('../views/songDetail'); var AlbumListView = require('../views/albumList'); var AlbumDetailView = require('../views/albumDetail'); var ArtistListView = require('../views/artistList'); var RecentEventsView = require('../views/recentEvents'); require('underscore'); require('lunr'); /* Collections */ //var SongCollection = require('../collections/songs'); module.exports = Backbone.View.extend({ el: $('body'), /* This is crucial */ initialize: function(router){ console.log('appView::initialize()'); var self = this; //this.router = router; if (!this.dashboardView) { this.dashboardView = new DashboardView(); } else { console.log('reusing dashboard view'); //this.dashboardView.delegateEvents(); // delegate events when the view is recycled } this.recentEventsView = new RecentEventsView(); this.render(); }, events: { "click a#artistsLink": "viewArtists", "click a#albumsLink": "viewAlbums", "click a#songsLink": "viewSongs", "click .song": "viewSong", "click .album": "viewAlbum" }, render: function() { console.log('-- rendering app view --'); $('#wrapper').html(shellTemplate()); $('#_shell').append(topBarTemplate()); $('#_shell').append(sidebarTemplate()); //$('#wrapper').append("<div id='page-wrapper'></div>"); //this.$el.html(template()); console.log('app::render() - Going to render dashboard template'); this.dashboardView.render(); this.recentEventsView.render(); return this; }, viewSong: function(event) { console.log(event.target.parentElement.id); this.songDetailView = new SongDetailView(event.target.parentElement.id); }, viewAlbum: function(event) { console.log(event.target.parentElement.id); this.albumDetailView = new AlbumDetailView(event.target.parentElement.id); }, viewArtists: function(e) { e.preventDefault(); console.log('****** shell::viewArtists *****'); e.stopPropagation(); if (!this.artistListView) { this.artistListView = new ArtistListView(); } else { console.log('reusing artist view'); } this.artistListView.render(); }, viewAlbums: function(e) { e.preventDefault(); console.log('****** shell::viewAlbums *****'); e.stopPropagation(); if (!this.albumListView) { this.albumListView = new AlbumListView(); } else { console.log('reusing album view'); } this.albumListView.render(); }, viewSongs: function(e) { e.preventDefault(); console.log('****** shell::viewSongs *****'); e.stopPropagation(); if (!this.songListView) { this.songListView = new SongListView(); } else { console.log('reusing song view'); } this.songListView.render(); } });
jtemplet/beets-web
app/js/views/app.js
JavaScript
mit
3,212
var imageValidator = (function () { var validFileExtensions = [".jpg", ".jpeg", ".bmp", ".gif", ".png"], imageValidator = Object.create({}); Object.defineProperty(imageValidator, 'init', { value: function () { return this; } }); Object.defineProperty(imageValidator, 'checkImageSize', { value: function (inputId, maxSize) { var input = document.getElementById(inputId); if (input.files && input.files.length == 1) { if (input.files[0].size > maxSize) { alert("Picture must be less than 2MB."); return false; } } return true; } }); Object.defineProperty(imageValidator, 'checkFileExtension', { value: function (inputId) { var input = document.getElementById(inputId); if (input.type == "file") { var fileName = input.value; if (fileName.length > 0) { var isValid = false; for (var j = 0; j < validFileExtensions.length; j++) { var currentExtension = validFileExtensions[j]; if (fileName.substr(fileName.length - currentExtension.length, currentExtension.length).toLowerCase() == currentExtension.toLowerCase()) { isValid = true; break; } } if (!isValid) { alert("Sorry, " + fileName + " is invalid, allowed extensions are: " + validFileExtensions.join(", ")); return false; } } } return true; } }); return Object.create(imageValidator).init();; }());
bstaykov/WebBase
Web/WebBaseSystem.Web/Scripts/custom/imagesValidations.js
JavaScript
mit
1,850
<?php declare(strict_types=1); namespace Churn\Command; use Churn\Assessor\CyclomaticComplexityAssessor; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; /** * @internal */ class AssessComplexityCommand extends Command { /** * Configure the command */ protected function configure(): void { $this->setName('assess-complexity') ->addArgument('file', InputArgument::REQUIRED, 'Path to file to analyze.') ->setDescription('Calculate the Cyclomatic Complexity'); } /** * Execute the command * * @param InputInterface $input Input. * @param OutputInterface $output Output. */ protected function execute(InputInterface $input, OutputInterface $output): int { $file = (string) $input->getArgument('file'); $assessor = new CyclomaticComplexityAssessor(); $output->writeln((string) $assessor->assess($file)); return 0; } }
bmitch/churn-php
src/Command/AssessComplexityCommand.php
PHP
mit
1,108
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package SA120974_MH110184; /** * * @author Usuario */ import java.sql.*; import java.util.ArrayList; import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; public class database { Connection con; PreparedStatement pst; ResultSet rs; public database() { try{ Class.forName("com.mysql.jdbc.Driver"); con=DriverManager.getConnection("jdbc:mysql://localhost:3306/sa120974_mh110184","root",""); } catch (Exception e) { System.out.println(e); } } public Boolean checkLogin(String uname,String pwd) { try { pst=con.prepareStatement("select * from estudiantes where username=? and password=?"); pst.setString(1, uname); pst.setString(2, pwd); rs=pst.executeQuery(); if(rs.next()) { return true; } else { return false; } } catch (Exception ex) { // TODO Auto-generated catch block Logger.getLogger(database.class.getName()).log(Level.SEVERE, null, ex); return false; } } public String getNotas(String username) { try { pst = con.prepareStatement("select t5.nombre, t1.porcentaje, t2.nota from actividadesAEvaluar t1" + " inner join notas t2 on t1.id = t2.idActividadesAEvaluar" + " inner join estudiantes t3 on t2.idEstudiante = t3.id" + " inner join actividadesaevaluar_materias t4 on t2.idActividadesAEvaluar = t4.idActividadesAEvaluar" + " inner join materias t5 on t4.idMateria = t5.id" + " where t3.username = '" + username + "'"); rs = pst.executeQuery(); String salida = ""; String materia = "EstaEsLaClaveNoRepitanUnaMateriaConEsteN0mbre"; int i = 0; while (rs.next()) { if (!materia.equals(rs.getString("nombre"))) { if (materia != "EstaEsLaClaveNoRepitanUnaMateriaConEsteN0mbre") salida += "</tbody></table><br />"; materia = rs.getString("nombre"); salida += "<h2>" + materia + "</h2>" + "<table class=\"table table-hover\">" + "<thead><tr>" + "<td>Activad</td>" + "<td>Porcentaje</td>" + "<td>Nota</td>" + "</tr></thead>" + "<tbody>"; i = 1; } salida += "<tr>" + "<td>" + i + "</td>" + "<td>" + rs.getString("porcentaje") + "</td>" + "<td>" + rs.getString("nota") + "</bt>" + "</tr>"; i++; } salida += "</tbody>" + "</table>"; return salida; } catch (SQLException ex) { Logger.getLogger(database.class.getName()).log(Level.SEVERE, null, ex); } return null; } }
sancas/JAVA-UDB
SA120974_MH110184/Web/src/java/SA120974_MH110184/database.java
Java
mit
3,464
'use strict'; module.exports = { // Testsuite name name: 'Size - DalekJS guinea pig', 'Can read height of an element (OK, jQuery style, no message)': function (test) { test .open('http://dalekjs.com/guineapig/') .assert.height('#fixed-dimensions', 100) .done(); }, 'Can read width of an element (OK, jQuery style, no message)': function (test) { test .open('http://dalekjs.com/guineapig/') .assert.width('#fixed-dimensions', 100) .done(); }, 'Can read width of an element (OK, TDD style, no message)': function (test) { test .open('http://dalekjs.com/guineapig/') .assert.width('#fixed-dimensions').is(100) .done(); }, 'Can read height of an element (OK, TDD style, no message)': function (test) { test .open('http://dalekjs.com/guineapig/') .assert.height('#fixed-dimensions').is(100) .done(); }, 'Can read !width of an element (OK, TDD style, no message)': function (test) { test .open('http://dalekjs.com/guineapig/') .assert.width('#fixed-dimensions').is.not(120) .done(); }, 'Can read !height of an element (OK, TDD style, no message)': function (test) { test .open('http://dalekjs.com/guineapig/') .assert.height('#fixed-dimensions').is.not(120) .done(); }, 'Can read width of an element (OK, TDD style, no message, between)': function (test) { test .open('http://dalekjs.com/guineapig/') .assert.width('#fixed-dimensions').is.between([90, 120]) .done(); }, 'Can read height of an element (OK, TDD style, no message, between)': function (test) { test .open('http://dalekjs.com/guineapig/') .assert.height('#fixed-dimensions').is.between([90, 120]) .done(); }, 'Can read width of an element (OK, TDD style, no message, gt)': function (test) { test .open('http://dalekjs.com/guineapig/') .assert.width('#fixed-dimensions').is.gt(90) .done(); }, 'Can read height of an element (OK, TDD style, no message, gt)': function (test) { test .open('http://dalekjs.com/guineapig/') .assert.height('#fixed-dimensions').is.gt(90) .done(); }, 'Can read width of an element (OK, TDD style, no message, gte)': function (test) { test .open('http://dalekjs.com/guineapig/') .assert.width('#fixed-dimensions').is.gte(90) .done(); }, 'Can read height of an element (OK, TDD style, no message, gte)': function (test) { test .open('http://dalekjs.com/guineapig/') .assert.height('#fixed-dimensions').is.gte(90) .done(); }, 'Can read width of an element (OK, TDD style, no message, lt)': function (test) { test .open('http://dalekjs.com/guineapig/') .assert.width('#fixed-dimensions').is.lt(120) .done(); }, 'Can read height of an element (OK, TDD style, no message, lt)': function (test) { test .open('http://dalekjs.com/guineapig/') .assert.height('#fixed-dimensions').is.lt(120) .done(); }, 'Can read width of an element (OK, TDD style, no message, lte)': function (test) { test .open('http://dalekjs.com/guineapig/') .assert.width('#fixed-dimensions').is.lte(120) .done(); }, 'Can read height of an element (OK, TDD style, no message, lte)': function (test) { test .open('http://dalekjs.com/guineapig/') .assert.height('#fixed-dimensions').is.lte(120) .done(); }, }
dalekjs/guineapig
test/elementSize.js
JavaScript
mit
3,908
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("04.AddVAT")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("04.AddVAT")] [assembly: AssemblyCopyright("Copyright © 2017")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("9106856b-0434-4dbb-aa49-46499882f5a1")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")]
sevdalin/Software-University-SoftUni
C-sharp-Web-Developer/C# Advanced/FunctionalProgramming - Lab/04.AddVAT/Properties/AssemblyInfo.cs
C#
mit
1,389
<?php /** * Created by PhpStorm. * User: alex * Date: 29/01/15 * Time: 15:46 */ namespace At21\EBoxOfficeBundle; use Ratchet\MessageComponentInterface; use Ratchet\ConnectionInterface; use Doctrine\DBAL\LockMode; use Doctrine\ORM\OptimisticLockException; class BoxOffice implements MessageComponentInterface { /** * @var \Doctrine\ORM\EntityManager */ protected $em; protected $clients; /** * Constructor * * @param \Doctrine\ORM\EntityManager $em */ public function __construct($em) { $this->em = $em; $this->clients = new \SplObjectStorage; } // onOpen, onMessage, onClose, onError ... /** * When a new connection is opened it will be passed to this method * * @param ConnectionInterface $conn The socket/connection that just connected to your application * * @throws \Exception */ function onOpen(ConnectionInterface $conn) { // Store the new connection to send messages to later $this->clients->attach($conn); echo "New connection! ({$conn->resourceId})\n"; } /** * This is called before or after a socket is closed (depends on how it's closed). SendMessage to $conn will not result in an error if it has already been closed. * * @param ConnectionInterface $conn The socket/connection that is closing/closed * * @throws \Exception */ function onClose(ConnectionInterface $conn) { // The connection is closed, remove it, as we can no longer send it messages $this->clients->detach($conn); echo "Connection {$conn->resourceId} has disconnected\n"; } /** * If there is an error with one of the sockets, or somewhere in the application where an Exception is thrown, * the Exception is sent back down the stack, handled by the Server and bubbled back up the application through this method * * @param ConnectionInterface $conn * @param \Exception $e * * @throws \Exception */ function onError(ConnectionInterface $conn, \Exception $e) { echo "An error has occurred: {$e->getMessage()}\n"; $conn->close(); } /** * Triggered when a client sends data through the socket * * @param \Ratchet\ConnectionInterface $from The socket/connection that sent the message to your application * @param string $msg The message received * * @throws \Exception */ function onMessage(ConnectionInterface $from, $msg) { $numRecv = count($this->clients) - 1; echo sprintf('Connection %d sending message "%s" to %d other connection%s' . "\n" , $from->resourceId, $msg, $numRecv, $numRecv == 1 ? '' : 's'); $seats = json_decode($msg, true); try { foreach($seats as $s){ $seat = $this->em->getRepository('At21EBoxOfficeBundle:Seat')->find($s['id']); $user = $this->em->getRepository('At21EBoxOfficeBundle:User')->find($s['user']); $seat->setUser($user); $this->em->persist($seat); $seat = $this->em->find('At21EBoxOfficeBundle:Seat', $s['id'], LockMode::OPTIMISTIC, $s['version']); $user = $this->em->getRepository('At21EBoxOfficeBundle:User')->find($s['user']); $seat->setUser($user); $this->em->persist($seat); } $this->em->flush(); } catch(OptimisticLockException $e) { echo "Sorry, but someone else has already changed this entity. Please apply the changes again!"; } foreach ($this->clients as $client) { //if ($from !== $client) { // The sender is not the receiver, send to each client connected $client->send($msg); //} } } }
alexthe21/e-boxoffice
src/At21/EBoxOfficeBundle/BoxOffice.php
PHP
mit
3,975
<?php namespace Tengxunai\Helper; class Helper { /** * UTF-8编码 GBK编码相互转换/(支持数组) * * @param array/string $str 字符串,支持数组传递 * @param string $in_charset 原字符串编码 * @param string $out_charset 输出的字符串编码 * @return array/string */ public static function arrayIconv($str, $in_charset="gbk", $out_charset="utf-8") { if(is_array($str)) { foreach($str as $k => $v) { $str[$k] = self::arrayIconv($v , $in_charset , $out_charset); } return $str; } else { if(is_string($str)) { return iconv($in_charset, $out_charset, $str); } else { return $str; } } } /** * 快速获取文件Base64编码数据 * @param string $path * @param bool $http * @return null|string */ public static function fileBase64Str($path='' , $http = false) { if (empty($path)) return null; if (!$http) { if (!is_file($path)) return null; } //返回 return base64_encode( file_get_contents($path) ); } /** * 获取base64大小[字节] * @param $base64 * @return float|int */ public static function getBase64FileSize($base64) { $slen = strlen($base64); return $slen - ($slen/8)*2; } }
wxbool/test001
src/Helper/Helper.php
PHP
mit
1,463
package postgresql import ( "testing" . "github.com/smartystreets/goconvey/convey" ) func TestReplacePlaceholders(t *testing.T) { Convey("Given a SQL string containing placeholders", t, func() { sql := "SELECT id, dummy FROM dummies WHERE id > ? AND id < ?" Convey("ReplacePlaceholders change all placeholders with $xx", func() { sqlWithNewPlaceholders := Adapter.ReplacePlaceholders("?", sql) So(sqlWithNewPlaceholders, ShouldEqual, "SELECT id, dummy FROM dummies WHERE id > $1 AND id < $2") }) }) } func TestReturningBuild(t *testing.T) { Convey("Given list of columns", t, func() { columns := []string{"id", "other_stuff"} Convey("ReturningBuild build a RETURNING clause with the given columns", func() { returningClause := Adapter.ReturningBuild(columns) So(returningClause, ShouldEqual, "RETURNING id, other_stuff") }) }) } func TestFormatForNewValues(t *testing.T) { Convey("Given list of columns", t, func() { columns := []string{"id", "other_stuff"} Convey("FormatForNewValues returns a list of all given columns quoted ", func() { formatedColumns := Adapter.FormatForNewValues(columns) So(len(formatedColumns), ShouldEqual, len(columns)) for i, column := range columns { So(formatedColumns[i], ShouldEqual, "\""+column+"\"") } }) }) }
samonzeweb/godb
adapters/postgresql/postgresql_test.go
GO
mit
1,303
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>interval: Not compatible 👼</title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / released</a></li> <li class="active"><a href="">8.7.1+1 / interval - 4.1.1</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> interval <small> 4.1.1 <span class="label label-info">Not compatible 👼</span> </small> </h1> <p>📅 <em><script>document.write(moment("2021-10-13 17:49:56 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-10-13 17:49:56 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-threads base base-unix base camlp5 7.14 Preprocessor-pretty-printer of OCaml conf-findutils 1 Virtual package relying on findutils conf-perl 1 Virtual package relying on perl coq 8.7.1+1 Formal proof management system num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic ocaml 4.08.1 The OCaml compiler (virtual package) ocaml-base-compiler 4.08.1 Official release 4.08.1 ocaml-config 1 OCaml Switch Configuration ocamlfind 1.9.1 A library manager for OCaml # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;guillaume.melquiond@inria.fr&quot; homepage: &quot;https://coqinterval.gitlabpages.inria.fr/&quot; dev-repo: &quot;git+https://gitlab.inria.fr/coqinterval/interval.git&quot; bug-reports: &quot;https://gitlab.inria.fr/coqinterval/interval/issues&quot; license: &quot;CeCILL-C&quot; build: [ [&quot;autoconf&quot;] {dev} [&quot;./configure&quot;] [&quot;./remake&quot; &quot;-j%{jobs}%&quot;] ] install: [&quot;./remake&quot; &quot;install&quot;] depends: [ &quot;coq&quot; {&gt;= &quot;8.8&quot;} &quot;coq-bignums&quot; &quot;coq-flocq&quot; {&gt;= &quot;3.1&quot;} &quot;coq-mathcomp-ssreflect&quot; {&gt;= &quot;1.6&quot;} &quot;coq-coquelicot&quot; {&gt;= &quot;3.0&quot;} &quot;conf-autoconf&quot; {build &amp; dev} (&quot;conf-g++&quot; {build} | &quot;conf-clang&quot; {build}) ] tags: [ &quot;keyword:interval arithmetic&quot; &quot;keyword:decision procedure&quot; &quot;keyword:floating-point arithmetic&quot; &quot;keyword:reflexive tactic&quot; &quot;keyword:Taylor models&quot; &quot;category:Mathematics/Real Calculus and Topology&quot; &quot;category:Computer Science/Decision Procedures and Certified Algorithms/Decision procedures&quot; &quot;logpath:Interval&quot; &quot;date:2020-12-28&quot; ] authors: [ &quot;Guillaume Melquiond &lt;guillaume.melquiond@inria.fr&gt;&quot; &quot;Érik Martin-Dorel &lt;erik.martin-dorel@irit.fr&gt;&quot; &quot;Pierre Roux &lt;pierre.roux@onera.fr&gt;&quot; &quot;Thomas Sibut-Pinote &lt;thomas.sibut-pinote@inria.fr&gt;&quot; ] synopsis: &quot;A Coq tactic for proving bounds on real-valued expressions automatically&quot; url { src: &quot;https://coqinterval.gitlabpages.inria.fr/releases/interval-4.1.1.tar.gz&quot; checksum: &quot;sha512=7a09b2d95eff5b95f2ccf5041dd3103fbf455246fe4f62e90af08933d7349bd73a8f69a285b63bc6c214fdc7d94cfd4c4b94a651fcbfbef4057c05b80c00cdf1&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install 🏜️</h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action coq-interval.4.1.1 coq.8.7.1+1</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.7.1+1). The following dependencies couldn&#39;t be met: - coq-interval -&gt; coq &gt;= 8.8 Your request can&#39;t be satisfied: - No available version of coq satisfies the constraints No solution found, exiting </pre></dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-interval.4.1.1</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Install 🚀</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Installation size</h2> <p>No files were installed.</p> <h2>Uninstall 🧹</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> Sources are on <a href="https://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣 </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
coq-bench/coq-bench.github.io
clean/Linux-x86_64-4.08.1-2.0.5/released/8.7.1+1/interval/4.1.1.html
HTML
mit
7,630
""" Modified version of patterns.py found here: https://github.com/decalage2/balbuzard Info: balbuzard patterns - v0.07 2014-02-13 Philippe Lagadec For more info and updates: http://www.decalage.info/balbuzard """ # LICENSE: # # balbuzard is copyright (c) 2007-2014, Philippe Lagadec (http://www.decalage.info) # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this # list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright notice, # this list of conditions and the following disclaimer in the documentation # and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import re from os import path from .balbuzard import Pattern, Pattern_re from xml.etree import ElementTree from fuzzywuzzy import process class PatternMatch(object): def __init__(self): # Curated list to avoid false positives. self.tlds = {'ac', 'aco', 'ad', 'adac', 'ads','ae', 'aeg', 'aero', 'af', 'afl', 'ag', 'agakhan','ai', 'aig', 'akdn', 'al', 'am', 'amica', 'anz', 'ao', 'apple', 'aq', 'ar', 'army', 'arpa', 'at', 'au', 'aw', 'aws', 'ax', 'axa', 'az', 'ba', 'baidu', 'bbc', 'bbva', 'bcg', 'bcn', 'bd', 'be', 'bf', 'bg', 'bh', 'bharti', 'bi', 'bing', 'biz', 'bj', 'blog', 'bm', 'bms', 'bn', 'bnl', 'bo', 'bom', 'bot', 'br', 'bs', 'bt', 'bv', 'bw', 'by', 'bz', 'bzh', 'ca', 'cba', 'cbn', 'cbre', 'ceb', 'cf', 'cfa', 'cfd', 'cg', 'ch', 'ci', 'ck', 'cl', 'cm', 'cn', 'co', 'com', 'cr', 'crs', 'csc', 'cu', 'cv', 'cw', 'cx', 'cy', 'cz', 'dclk', 'dds', 'de', 'dev', 'dhl', 'dj', 'dk', 'dm', 'dnp', 'do', 'docs', 'doha', 'domains', 'download', 'drive','dtv', 'dubai', 'dvag', 'dz', 'ec', 'edu', 'er', 'erni', 'es', 'esq', 'et', 'eu', 'eurovision', 'eus', 'fi', 'fj', 'fk', 'flickr', 'flir', 'flsmidth', 'fly', 'fm', 'fo', 'foo', 'fr', 'frl','ftr', 'ga', 'gb','gbiz', 'gd', 'gdn', 'ge', 'gea', 'gl', 'gle', 'gm', 'gmail', 'gmbh', 'gmo', 'gmx', 'gn', 'goog', 'google', 'gop','got', 'gov', 'gp', 'gq', 'gr', 'gs', 'gt', 'gu', 'guru', 'gw', 'gy', 'hk', 'hkt', 'hm', 'hn', 'host', 'hotmail', 'hr', 'ht', 'htc', 'hu', 'icu', 'ie', 'ifm', 'iinet', 'ikano', 'il', 'im', 'imamat', 'imdb', 'immo', 'immobilien', 'in','info', 'ing', 'ink', 'int', 'io', 'ipiranga', 'iq', 'ir', 'is', 'ist', 'istanbul', 'it', 'itau', 'itv', 'iwc', 'jaguar', 'jcb','jcp', 'je', 'jlc', 'jll', 'jm', 'jmp', 'jnj', 'jo', 'jot', 'jp', 'ke', 'kfh', 'kg', 'kh', 'ki', 'kia', 'kindle', 'km', 'kn', 'kp', 'kpmg', 'kpn', 'kr', 'krd', 'kw', 'ky', 'kyoto', 'kz', 'la', 'lat', 'lb', 'lc', 'lds', 'li', 'link', 'lk', 'lol', 'lr', 'ls', 'lt', 'ltd', 'ltda', 'lu', 'lv', 'ly', 'ma', 'madrid', 'mba', 'mc', 'md', 'me', 'med', 'meme', 'meo', 'mg', 'mh', 'microsoft', 'mil', 'mk', 'ml', 'mlb', 'mls', 'mma', 'mn', 'mo', 'mobi', 'mobily', 'mov', 'mp', 'mq', 'mr', 'ms', 'mt', 'mtn', 'mtpc', 'mtr', 'mu', 'mv', 'mw', 'mx', 'my', 'mz', 'na', 'navy', 'nc', 'ne', 'nec', 'net', 'netbank', 'neustar', 'nexus', 'nf', 'ng', 'ngo', 'nhk', 'ni', 'nico', 'nl', 'nowruz', 'nowtv', 'np', 'nr', 'nra', 'nrw', 'ntt', 'nu', 'nyc', 'nz', 'obi', 'ollo', 'om', 'ong', 'onl', 'org', 'ott', 'ovh', 'pa', 'pccw', 'pe', 'pet', 'pf', 'pg', 'ph', 'pid', 'pin', 'ping', 'pk', 'pl', 'pm', 'pn', 'pnc', 'pohl', 'porn', 'post', 'pr', 'pro', 'prod', 'ps', 'pt', 'pub', 'pw', 'pwc', 'py', 'qa', 'qpon', 'quebec', 're', 'ren', 'rio', 'ro', 'rocher', 'rs', 'rsvp', 'ru', 'ruhr', 'rw', 'rwe', 'ryukyu', 'sa', 'sap', 'sapo', 'sarl', 'sas', 'saxo', 'sb', 'sbi', 'sbs', 'sc', 'sca', 'scb', 'sd', 'se', 'sew', 'sex', 'sfr', 'sg', 'sh', 'si', 'sina', 'site', 'sj', 'sk', 'skype', 'sl', 'sm', 'sn', 'sncf', 'so', 'sr', 'srl', 'st', 'stc', 'stcgroup', 'su', 'sv', 'sx', 'sy', 'sydney', 'symantec', 'systems', 'sz', 'tab', 'taipei', 'taobao', 'tc', 'tci', 'td', 'tdk', 'tel', 'teva', 'tf', 'tg', 'th', 'thd', 'tj', 'tk', 'tl', 'tm', 'tmall', 'tn', 'to', 'tokyo', 'tr', 'trv', 'tt', 'tube', 'tui', 'tunes', 'tushu', 'tv', 'tw', 'tz', 'ua', 'ubs', 'ug', 'uk', 'uno', 'uol', 'ups', 'us', 'uy', 'uz', 'va', 'vc', 've', 'vet', 'vg', 'vi', 'vig', 'vin', 'vip', 'vista', 'vistaprint', 'vn', 'vu', 'wed', 'weibo', 'weir', 'wf', 'whoswho', 'wien', 'wiki','win', 'windows', 'wme', 'ws', 'wtc', 'wtf', 'xbox', 'xerox', 'xihuan', 'xin', 'xn--11b4c3d', 'xn--1ck2e1b', 'xn--1qqw23a', 'xn--30rr7y', 'xn--3bst00m', 'xn--3ds443g', 'xn--3e0b707e', 'xn--3pxu8k', 'xn--42c2d9a', 'xn--45brj9c', 'xn--45q11c', 'xn--4gbrim', 'xn--55qw42g', 'xn--55qx5d', 'xn--5su34j936bgsg', 'xn--5tzm5g', 'xn--6frz82g', 'xn--6qq986b3xl', 'xn--80adxhks', 'xn--80ao21a', 'xn--80asehdb', 'xn--80aswg', 'xn--8y0a063a', 'xn--90a3ac', 'xn--90ae', 'xn--90ais', 'xn--9dbq2a', 'xn--9et52u', 'xn--9krt00a', 'xn--b4w605ferd', 'xn--bck1b9a5dre4c', 'xn--c1avg', 'xn--c2br7g', 'xn--cck2b3b', 'xn--cg4bki', 'xn--clchc0ea0b2g2a9gcd', 'xn--czr694b', 'xn--czrs0t', 'xn--czru2d', 'xn--d1acj3b', 'xn--d1alf', 'xn--e1a4c', 'xn--eckvdtc9d', 'xn--efvy88h', 'xn--estv75g', 'xn--fct429k', 'xn--fhbei', 'xn--fiq228c5hs', 'xn--fiq64b', 'xn--fiqs8s', 'xn--fiqz9s', 'xn--fjq720a', 'xn--flw351e', 'xn--fpcrj9c3d', 'xn--fzc2c9e2c', 'xn--fzys8d69uvgm', 'xn--g2xx48c', 'xn--gckr3f0f', 'xn--gecrj9c', 'xn--h2brj9c', 'xn--hxt814e', 'xn--i1b6b1a6a2e', 'xn--imr513n', 'xn--io0a7i', 'xn--j1aef', 'xn--j1amh', 'xn--j6w193g', 'xn--jlq61u9w7b', 'xn--jvr189m', 'xn--kcrx77d1x4a', 'xn--kprw13d', 'xn--kpry57d', 'xn--kpu716f', 'xn--kput3i', 'xn--l1acc', 'xn--lgbbat1ad8j', 'xn--mgb9awbf', 'xn--mgba3a3ejt', 'xn--mgba3a4f16a', 'xn--mgba7c0bbn0a', 'xn--mgbaam7a8h', 'xn--mgbab2bd', 'xn--mgbayh7gpa', 'xn--mgbb9fbpob', 'xn--mgbbh1a71e', 'xn--mgbc0a9azcg', 'xn--mgbca7dzdo', 'xn--mgberp4a5d4ar', 'xn--mgbpl2fh', 'xn--mgbt3dhd', 'xn--mgbtx2b', 'xn--mgbx4cd0ab', 'xn--mix891f', 'xn--mk1bu44c', 'xn--mxtq1m', 'xn--ngbc5azd', 'xn--ngbe9e0a', 'xn--node', 'xn--nqv7f', 'xn--nqv7fs00ema', 'xn--nyqy26a', 'xn--o3cw4h', 'xn--ogbpf8fl', 'xn--p1acf', 'xn--p1ai', 'xn--pbt977c', 'xn--pgbs0dh', 'xn--pssy2u', 'xn--q9jyb4c', 'xn--qcka1pmc', 'xn--qxam', 'xn--rhqv96g', 'xn--rovu88b', 'xn--s9brj9c', 'xn--ses554g', 'xn--t60b56a', 'xn--tckwe', 'xn--unup4y', 'xn--vermgensberater-ctb', 'xn--vermgensberatung-pwb', 'xn--vhquv', 'xn--vuq861b', 'xn--w4r85el8fhu5dnra', 'xn--w4rs40l', 'xn--wgbh1c', 'xn--wgbl6a', 'xn--xhq521b', 'xn--xkc2al3hye2a', 'xn--xkc2dl3a5ee0h', 'xn--y9a3aq', 'xn--yfro4i67o', 'xn--ygbi2ammx', 'xn--zfr164b', 'xperia', 'xyz', 'yahoo', 'yamaxun', 'yandex', 'ye', 'yokohama', 'you', 'youtube', 'yt', 'yun', 'za', 'zappos', 'zara', 'zero', 'zippo', 'zm', 'zone', 'zuerich', 'zw'} # --- PEStudio Patterns ------------------------------------------------------------------------------------------------ with open(path.join(path.dirname(__file__), "../pestudio/xml/strings.xml"), 'rt') as f: tree = ElementTree.parse(f) # Adding a min length for less FPs pest_minlen = 6 self.pest_blacklist = {} self.pest_api = {} for ag in tree.findall('.//agent'): if len(ag.text) > pest_minlen: self.pest_blacklist.setdefault('agent', set()).add(ag.text) for av in tree.findall('.//av'): if len(av.text) > pest_minlen: self.pest_blacklist.setdefault('av', set()).add(av.text) for ev in tree.findall('.//event'): if len(ev.text) > pest_minlen: self.pest_blacklist.setdefault('event', set()).add(ev.text) for gu in tree.findall('.//guid'): if len(gu.text) > pest_minlen: self.pest_blacklist.setdefault('guid', set()).add(gu.text) for ins in tree.findall('.//insult'): if len(ins.text) > pest_minlen: self.pest_blacklist.setdefault('insult', set()).add(ins.text) for ke in tree.findall('.//key'): if len(ke.text) > pest_minlen: self.pest_blacklist.setdefault('key', set()).add(ke.text) for oi in tree.findall('.//oid'): if len(oi.text) > pest_minlen: self.pest_blacklist.setdefault('oid', set()).add(oi.text) for os in tree.findall('.//os'): if len(os.text) > pest_minlen: self.pest_blacklist.setdefault('os', set()).add(os.text) for pr in tree.findall('.//priv'): if len(pr.text) > pest_minlen: self.pest_blacklist.setdefault('priv', set()).add(pr.text) for pro in tree.findall('.//product'): if len(pro.text) > pest_minlen: self.pest_blacklist.setdefault('product', set()).add(pro.text) for proto in tree.findall('.//protocol'): self.pest_blacklist.setdefault('protocol', set()).add(proto.text) for reg in tree.findall('.//reg'): if len(reg.text) > pest_minlen: self.pest_blacklist.setdefault('reg', set()).add(reg.text) for si in tree.findall('.//sid'): if len(si.text) > pest_minlen: self.pest_blacklist.setdefault('sid', set()).add(si.text) for st in tree.findall('.//string'): if len(st.text) > pest_minlen: self.pest_blacklist.setdefault('string', set()).add(st.text) # Adding Popular API with open(path.join(path.dirname(__file__), '../pestudio/xml/functions.xml'), 'rt') as f: tree = ElementTree.parse(f) for fun in tree.findall(".//fct"): if fun.text is not None: if len(fun.text) > pest_minlen and fun.text is not None: self.pest_api.setdefault('fct', set()).add(fun.text.split('::', 1)[0]) for li in tree.findall(".//lib"): if hasattr(li, 'name') and li.name is not None: if len(li.name) > pest_minlen: self.pest_api.setdefault('lib', set()).add(li.get("name")) for tapi in tree.findall('.//topapi'): if tapi.text is not None: if len(tapi.text) > pest_minlen: self.pest_api.setdefault('topapi', set()).add(tapi.text) # --- Regex Patterns --------------------------------------------------------------------------------------------------- self.pat_domain = r'(?i)\b(?:[A-Z0-9-]+\.)+(?:XN--[A-Z0-9]{4,18}|[A-Z]{2,12})\b' self.pat_filecom = r'(?i)(?:\b[- _A-Z0-9.\\]{0,75}[%]?' \ r'(?:ALLUSERPROFILE|APPDATA|commonappdata|CommonProgramFiles|HOMEPATH|LOCALAPPDATA|' \ r'ProgramData|ProgramFiles|PUBLIC|SystemDrive|SystemRoot|\\TEMP|USERPROFILE|' \ r'windir|system32|syswow64|\\user)[%]?\\[-_A-Z0-9\.\\]{1,200}\b|' \ r'/home/[-_A-Z0-9\./]{0,50}|/usr/local[-_A-Z0-9\./]{0,50}|/usr/bin[-_A-Z0-9\./]{0,50}|' \ r'/var/log[-_A-Z0-9\./]{0,50}|/etc/(?:shadow|group|passwd))' self.pat_fileext = r'(?i)\b[a-z]?[:]?[-_A-Z0-9.\\]{0,200}\w\.' \ r'(?:7Z|APK|APP|BAT|BIN|CLASS|CMD|DAT|DOC|DOCX|DLL|EML|EXE|JAR|JPEG|JPG|JS|JSE|LNK|LOG|MSI|' \ r'OSX|PAF|PDF|PNG|PPT|PPTX|PS1|RAR|RTF|SCR|SWF|SYS|[T]?BZ[2]?|TXT|TMP|VBE|VBS|WSF|WSH|XLS' \ r'|XLSX|ZIP)\b' self.pat_filepdb = r'(?i)\b[-_A-Z0-9.\\]{0,200}\w\.PDB\b' self.pat_email = r'(?i)\b[A-Z0-9._%+-]{3,}@(?:[A-Z0-9-]+\.)+(?:XN--[A-Z0-9]{4,18}|[A-Z]{2,12})\b' self.pat_ip = r'\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b' self.pat_regis = r'(?i)\b[- _A-Z0-9.\\]{0,25}' \ r'(?:controlset001|controlset002|currentcontrolset|currentversion|HKCC|HKCR|HKCU|HKDD|' \ r'hkey_classes_root|hkey_current_config|hkey_current_user|hkey_dyn_data|hkey_local_machine|' \ r'HKLM|hkey_performance_data|hkey_users|HKPD|internet settings|\\sam|\\software|\\system|' \ r'\\userinit)' \ r'\\[-_A-Z0-9.\\ ]{1,200}\b' self.pat_url = '(?i)(?:ftp|http|https)://' \ '[A-Z0-9.-]{1,}\.(?:XN--[A-Z0-9]{4,18}|[a-z]{2,12}|[0-9]{1,3})' \ '(?::[0-9]{1,5})?' \ '(?:/[A-Z0-9/\-\.&%\$#=~\?_]{3,200}){0,1}' self.pat_anyhttp = r'(?i)http://' \ r'[A-Z0-9.-]{6,}\.' \ r'(?:XN--[A-Z0-9]{4,18}|[a-z]{2,12}|[0-9]{1,3})' \ r'(?::[0-9]{1,5})?' \ r'/[A-Z0-9/\-\.&%\$#=~\?_]{5,}[\r\n]*' self.pat_anyhttps = r'(?i)https://' \ r'[A-Z0-9.-]{6,}\.' \ r'(?:XN--[A-Z0-9]{4,18}|[a-z]{2,12}|[0-9]{1,3})' \ r'(?::[0-9]{1,5})?' \ r'/[A-Z0-9/\-\.&%\$#=~\?_]{5,}[\r\n]*' self.pat_anyftp = r'(?i)ftp://' \ r'[A-Z0-9.-]{6,}\.' \ r'(?:XN--[A-Z0-9]{4,18}|[a-z]{2,12}|[0-9]{1,3})' \ r'(?::[0-9]{1,5})?' \ r'/[A-Z0-9/\-\.&%\$#=~\?_]{5,}[\r\n]*' self.pat_exedos = r'This program cannot be run in DOS mode' self.pat_exeheader = r'(?s)MZ.{32,1024}PE\000\000' # --- Find Match for IOC Regex, Return Dictionary: {[AL Tag Type:(Match Values)]} -------------------------------------- def ioc_match(self, value, bogon_ip=None, just_network=None): # NOTES: # '(?i)' makes a regex case-insensitive # \b matches a word boundary, it can help speeding up regex search and avoiding some false positives. # See http://www.regular-expressions.info/wordboundaries.html value_extract = {} # ------------------------------------------------------------------------------ # IP ADDRESSES # Pattern_re("IP addresses", r"\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}", weight=10), # Here I use \b to make sure there is no other digit around and to speedup search #print("ips") final_values = "" find_ip = re.findall(self.pat_ip, value) if len(find_ip) > 0: longeststring = max(find_ip, key=len) if len(longeststring) == len(value): not_filtered = self.ipv4_filter(value, bogon=bogon_ip) if not_filtered: value_extract.setdefault('NET_IP', set()).add(value) # If the complete value matches the IP regex, not interested in other regex values return value_extract if len(find_ip) == 1: for val in find_ip: not_filtered = self.ipv4_filter(val, bogon=bogon_ip) if not_filtered: value_extract.setdefault('NET_IP', set()).add(val) else: like_ls = process.extract(longeststring, find_ip, limit=50) final_values = filter(lambda ls: ls[1] < 99, like_ls) final_values.append((longeststring, 100)) for val in final_values: not_filtered = self.ipv4_filter(val[0], bogon=bogon_ip) if not_filtered: value_extract.setdefault('NET_IP', set()).add(val[0]) # ------------------------------------------------------------------------------ # URLs #print("urls") final_values = "" find_url = re.findall(self.pat_url, value) if len(find_url) > 0: ret = False longeststring = max(find_url, key=len) if len(longeststring) == len(value): ret = True final_values = [(value, 100)] elif len(find_url) == 1: final_values = [(find_url[0], 100)] else: like_ls = process.extract(longeststring, find_url, limit=50) final_values = filter(lambda ls: ls[1] < 95, like_ls) final_values.append((longeststring, 100)) for val in final_values: value_extract.setdefault('NET_FULL_URI', set()).add(val[0]) # Extract domain from URL find_domain = re.findall(self.pat_domain, val[0]) if len(find_domain) != 0: longeststring = max(find_domain, key=len) not_filtered = self.domain_filter(longeststring) if not_filtered: value_extract.setdefault('NET_DOMAIN_NAME', set()).add(longeststring) if ret: return value_extract # ------------------------------------------------------------------------------ # E-MAIL ADDRESSES # r'(?i)\b[A-Z0-9._%+-]+@(?:[A-Z0-9-]+\.)+(?:[A-Z]{2}|com|org|net|edu|gov|mil|int|biz|info|mobi|name|aero|asia|jobs|museum)\b', # changed to catch all current TLDs registered at IANA (in combination with filter function): # TLD = either only chars from 2 to 12, or 'XN--' followed by up to 18 chars and digits #print("emails") final_values = "" find_email = re.findall(self.pat_email, value) if len(find_email) > 0: longeststring = max(find_email, key=len) if len(longeststring) == len(value): not_filtered = self.email_filter(value) if not_filtered: value_extract.setdefault('NET_EMAIL', set()).add(value) return value_extract if len(find_email) == 1: for val in find_email: not_filtered = self.email_filter(val) if not_filtered: value_extract.setdefault('NET_EMAIL', set()).add(val) else: like_ls = process.extract(longeststring, find_email, limit=50) final_values = filter(lambda ls: ls[1] < 95, like_ls) final_values.append((longeststring, 100)) for val in final_values: not_filtered = self.email_filter(val[0]) if not_filtered: value_extract.setdefault('NET_EMAIL', set()).add(val[0]) # ------------------------------------------------------------------------------ # DOMAIN NAMES # Old: r'(?=^.{1,254}$)(^(?:(?!\d+\.|-)[a-zA-Z0-9_\-]{1,63}(?<!-)\.?)+(?:[a-zA-Z]{2,})$)' # Below is taken from email regex above #print("domains") final_values = "" find_domain = re.findall(self.pat_domain, value) if len(find_domain) > 0 and len(max(find_domain, key=len)) > 11: longeststring = max(find_domain, key=len) if len(longeststring) == len(value): not_filtered = self.domain_filter(value) if not_filtered: value_extract.setdefault('NET_DOMAIN_NAME', set()).add(value) return value_extract if len(find_domain) == 1: for val in find_domain: not_filtered = self.domain_filter(val) if not_filtered: value_extract.setdefault('NET_DOMAIN_NAME', set()).add(val) else: like_ls = process.extract(longeststring, find_domain, limit=50) final_values = filter(lambda ls: ls[1] < 95, like_ls) final_values.append((longeststring, 100)) for val in final_values: not_filtered = self.domain_filter(val[0]) if not_filtered: value_extract.setdefault('NET_DOMAIN_NAME', set()).add(val[0]) if just_network: return value_extract # ------------------------------------------------------------------------------ # FILENAMES # Check length # Ends with extension of interest or contains strings of interest #print("files") final_values = "" filefind_pdb = re.findall(self.pat_filepdb, value) if len(filefind_pdb) > 0: if len(max(filefind_pdb, key=len)) > 6: longeststring = max(filefind_pdb, key=len) if len(longeststring) == len(value): value_extract.setdefault('FILE_PDB_STRING', set()).add(value) return value_extract if len(filefind_pdb) == 1: for val in filefind_pdb: value_extract.setdefault('FILE_PDB_STRING', set()).add(val) else: like_ls = process.extract(longeststring, filefind_pdb, limit=50) final_values = filter(lambda ls: ls[1] < 95, like_ls) final_values.append((longeststring, 100)) for val in final_values: value_extract.setdefault('FILE_PDB_STRING', set()).add(val[0]) filefind_ext = re.findall(self.pat_fileext, value) if len(filefind_ext) > 0: if len(max(filefind_ext, key=len)) > 6: longeststring = max(filefind_ext, key=len) if len(longeststring) == len(value): value_extract.setdefault('FILE_NAME', set()).add(value) return value_extract if len(filefind_ext) == 1: for val in filefind_ext: value_extract.setdefault('FILE_NAME', set()).add(val) else: like_ls = process.extract(longeststring, filefind_ext, limit=50) final_values = filter(lambda ls: ls[1] < 95, like_ls) final_values.append((longeststring, 100)) for val in final_values: value_extract.setdefault('FILE_NAME', set()).add(val[0]) filefind_com = re.findall(self.pat_filecom, value) if len(filefind_com) > 0 and len(max(filefind_com, key=len)) > 6: longeststring = max(filefind_com, key=len) if len(longeststring) == len(value): value_extract.setdefault('FILE_NAME', set()).add(value) return value_extract if len(filefind_com) == 1: for val in filefind_com: value_extract.setdefault('FILE_NAME', set()).add(val) else: like_ls = process.extract(longeststring, filefind_com, limit=50) final_values = filter(lambda ls: ls[1] < 95, like_ls) final_values.append((longeststring, 100)) for val in final_values: value_extract.setdefault('FILE_NAME', set()).add(val[0]) # ------------------------------------------------------------------------------ # REGISTRYKEYS # Looks for alpha numeric characters seperated by at least two sets of '\'s #print("reg") final_values = "" regfind = re.findall(self.pat_regis, value) if len(regfind) > 0 and len(max(regfind, key=len)) > 15: longeststring = max(regfind, key=len) if len(longeststring) == len(value): value_extract.setdefault('REGISTRY_KEY', set()).add(value) return value_extract if len(regfind) == 1: for val in regfind: value_extract.setdefault('REGISTRY_KEY', set()).add(val) else: like_ls = process.extract(longeststring, regfind, limit=50) final_values = filter(lambda ls: ls[1] < 90, like_ls) final_values.append((longeststring, 100)) for val in final_values: value_extract.setdefault('REGISTRY_KEY', set()).add(val[0]) # ------------------------------------------------------------------------------ # PEStudio Blacklist # Flags strings from PEStudio's Blacklist final_values = "" for k, i in self.pest_blacklist.iteritems(): for e in i: psblfind = [] if e in value: psblfind.append(e) if len(psblfind) > 0: longeststring = max(psblfind, key=len) if len(longeststring) == len(value): value_extract.setdefault('PESTUDIO_BLACKLIST_STRING', set()).add(value) return value_extract if len(psblfind) == 1: for val in psblfind: value_extract.setdefault('PESTUDIO_BLACKLIST_STRING', set()).add(val) else: like_ls = process.extract(longeststring, psblfind, limit=50) final_values = filter(lambda ls: ls[1] < 95, like_ls) final_values.append((longeststring, 100)) for val in final_values: value_extract.setdefault('PESTUDIO_BLACKLIST_STRING', set()).add(val[0]) # ----------------------------------------------------------------------------- # Function/Library Strings # Win API strings from PEStudio's Blacklist final_values = "" for k, i in self.pest_api.iteritems(): for e in i: pswinfind = [] if e in value: pswinfind.append(e) if len(pswinfind) > 0: longeststring = max(pswinfind, key=len) if len(longeststring) == len(value): value_extract.setdefault('WIN_API_STRING', set()).add(value) return value_extract if len(pswinfind) == 1: for val in pswinfind: value_extract.setdefault('WIN_API_STRING', set()).add(val) else: like_ls = process.extract(longeststring, pswinfind, limit=50) final_values = filter(lambda ls: ls[1] < 95, like_ls) final_values.append((longeststring, 100)) for val in final_values: value_extract.setdefault('WIN_API_STRING', set()).add(val[0]) return value_extract # --- Filters ---------------------------------------------------------------------------------------------------------- @staticmethod def ipv4_filter(value, index=0, pattern=None, bogon=None): """ IPv4 address filter: - check if string length is >7 (e.g. not just 4 digits and 3 dots) - check if not in list of bogon IP addresses return True if OK, False otherwise. """ ip = value # check if string length is >7 (e.g. not just 4 digits and 3 dots) #if len(ip) < 8: #return False # 0.0.0.0 255.0.0.0e if ip.startswith('0'): return False if int(ip.split(".", 1)[0]) > 255: return False # also reject IPs ending with .0 or .255 if ip.endswith('.0') or ip.endswith('.255'): return False # BOGON IP ADDRESS RANGES: # source: http://www.team-cymru.org/Services/Bogons/bogon-dd.html if bogon is not None: # extract 1st and 2nd decimal number from IP as int: ip_bytes = ip.split('.') byte1 = int(ip_bytes[0]) byte2 = int(ip_bytes[1]) # print 'ip=%s byte1=%d byte2=%d' % (ip, byte1, byte2) # actually we might want to see the following bogon IPs if malware uses them # => this should be an option # 10.0.0.0 255.0.0.0 if ip.startswith('10.'): return False # 100.64.0.0 255.192.0.0 if ip.startswith('100.') and (byte2&192 == 64): return False # 127.0.0.0 255.0.0.0 if ip.startswith('127.'): return False # 169.254.0.0 255.255.0.0 if ip.startswith('169.254.'): return False # 172.16.0.0 255.240.0.0 if ip.startswith('172.') and (byte2&240 == 16): return False # 192.0.0.0 255.255.255.0 if ip.startswith('192.0.0.'): return False # 192.0.2.0 255.255.255.0 if ip.startswith('192.0.2.'): return False # 192.168.0.0 255.255.0.0 if ip.startswith('192.168.'): return False # 198.18.0.0 255.254.0.0 if ip.startswith('198.') and (byte2&254 == 18): return False # 198.51.100.0 255.255.255.0 if ip.startswith('198.51.100.'): return False # 203.0.113.0 255.255.255.0 if ip.startswith('203.0.113.'): return False # 224.0.0.0 240.0.0.0 if byte1&240 == 224: return False # 240.0.0.0 240.0.0.0 if byte1&240 == 240: return False # otherwise it's a valid IP adress return True def email_filter(self, value, index=0, pattern=None): # check length, e.g. longer than xy@hp.fr # check case? e.g. either lower, upper, or capital (but CamelCase covers # almost everything... the only rejected case would be starting with lower # and containing upper?) # or reject mixed case in last part of domain name? (might filter 50% of # false positives) # optionally, DNS MX query with caching? user, domain = value.split('@', 1) if len(user) < 3: return False if len(domain) < 5: return False tld = domain.rsplit('.', 1)[1].lower() if tld not in self.tlds: return False return True def domain_filter(self, value, index=0, pattern=None): # check length # check match again tlds set if len(value) < 10: return False # No more than 3 domain names if value.count('.') > 3: return False uniq_char = ''.join(set(value)) if len(uniq_char) < 6: return False fld = value.split('.') tld = value.rsplit('.', 1)[1].lower() # If only two domain levels and either second level < 6 char or tld <= 2 char, or top-level not in list if (len(fld) <= 2 and len(fld[0]) < 6) or tld not in self.tlds: return False return True @staticmethod def str_filter(value, index=0, pattern=None): """ String filter: avoid false positives with random case. A typical string should be either: - all UPPERCASE - all lowercase - or Capitalized return True if OK, False otherwise. Usage: This filter is meant to be used with string patterns that catch words with the option nocase=True, but where random case is not likely. Note 1: It is assumed the string only contains alphabetical characters (a-z) Note 2: this filter does not cover CamelCase strings. """ # case 1: all UPPERCASE # case 2: all lowercase except 1st character which can be uppercase (Capitalized) if value.isupper() or value[1:].islower(): return True #Note: we could also use istitle() if strings are not only alphabetical. @staticmethod def len_filter(value, index=0, pattern=None, bogon=None): if len(value) < 10: return False return True # --- BBCrack Patterns ------------------------------------------------------------------------------------------------- def bbcr(self, level=1): if level == 'small_string': bbcrack_patterns = [ Pattern_re("FTP://_NET_FULL_URI", self.pat_anyftp, weight=100), Pattern_re("HTTP://_NET_FULL_URI", self.pat_anyhttp, weight=100), Pattern_re("HTTPS://_NET_FULL_URI", self.pat_anyhttps, weight=100), ] return bbcrack_patterns bbcrack_patterns = [ Pattern_re("EXE_HEAD", self.pat_exeheader, weight=100), Pattern_re("EXE_DOS", self.pat_exedos, weight=100), Pattern_re("NET_FULL_URI", self.pat_url, weight=100), ] if level == 2: # Add PEStudio's API String list, weight will default to 1: for k, i in self.pest_api.iteritems(): if k == "topapi" or k == "lib": for e in i: if len(e) > 6: bbcrack_patterns.append(Pattern('WIN_API_STRING', e, nocase=True, weight=1000)) return bbcrack_patterns
maliceio/malice-pdf
pdfparser/balbuzard/patterns.py
Python
mit
34,874
// Copyright (c) 2019 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <test/fuzz/FuzzedDataProvider.h> #include <test/fuzz/fuzz.h> #include <util/time.h> #include <cassert> #include <cstdint> #include <string> #include <vector> void test_one_input(const std::vector<uint8_t> &buffer) { FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size()); const int64_t random_time = fuzzed_data_provider.ConsumeIntegral<int64_t>(); const std::string random_string = fuzzed_data_provider.ConsumeRemainingBytesAsString(); const std::string iso8601_datetime = FormatISO8601DateTime(random_time); const int64_t parsed_time_1 = ParseISO8601DateTime(iso8601_datetime); if (random_time >= 0) { assert(parsed_time_1 >= 0); if (iso8601_datetime.length() == 20) { assert(parsed_time_1 == random_time); } } const int64_t parsed_time_2 = ParseISO8601DateTime(random_string); assert(parsed_time_2 >= 0); }
Bitcoin-ABC/bitcoin-abc
src/test/fuzz/parse_iso8601.cpp
C++
mit
1,109
module Settler module ORM module Activerecord # The Setting class is an AR model that encapsulates a Settler setting. The key of the setting is the only required attribute. class Setting < ::ActiveRecord::Base include Settler::AbstractSetting self.table_name = 'settings' attr_readonly :key alias :read_setting_attribute :read_attribute alias :write_setting_attribute :write_attribute serialize :value validates :key, :presence => true validate :setting_validations validate :ensure_editable, :on => :update default_scope { where(['deleted = ? or deleted IS NULL', false]) } scope :editable, lambda{ where(:editable => true) } scope :deletable, lambda{ where(:deletable => true) } # Performs a soft delete of the setting if this setting is deletable. This ensures this setting is not recreated from the configuraiton file. # Returns false if the setting could not be destroyed. def destroy if deletable? self.deleted = true if Setting.where(:id => self).update_all(:deleted => true) deleted? else false end end # Overrides the delete methods to ensure the default scope is not passed in the query def delete *args; Setting.unscoped{ super } end def self.delete_all *args; Setting.unscoped{ super } end # Resets this setting to the default stored in the settler configuration def reset! defaults = Settler.config[self.key] self.label = defaults['label'] self.value = defaults['value'] self.editable = defaults['editable'] self.deletable = defaults['deletable'] self.deleted = false save(:validate => false) end # Deleted scope is specified as a method as it needs to be an exclusive scope def self.deleted unscoped { Setting.where(:deleted => true) } end def self.all_keys options = {} Setting.order(options[:order]).select(:key).map(&:key) end def self.build_settings! config Setting.unscoped do config.each do |key, attributes| if Setting.where(:key => key).none? setting = Setting.new setting.key = key setting.label = attributes['label'] setting.value = attributes['value'] setting.editable = attributes['editable'] setting.deletable = attributes['deletable'] setting.save p "[Settler] Validation failed for setting '#{setting.key}': #{setting.errors.full_messages.to_sentence}" if !setting.valid? end end end end private # Performs instance validations as defined in the settler configuration. def setting_validations if errors.empty? errors.add(:value, :blank) if validators['presence'] && ['1','true',true].include?(validators['presence']) && self.value.nil? errors.add(:value, :inclusion) if valid_values && !valid_values.include?(self.value) errors.add(:value, :invalid) if validators['format'] && !(Regexp.new(validators['format']) =~ self.value) end end # Ensures uneditable settings cannot be updated. def ensure_editable errors.add(:base, I18n.t('settler.errors.editable', :default => 'Setting cannot be changed')) if changed? && !editable? end end end end end
moiristo/settler
lib/settler/orm/activerecord/setting.rb
Ruby
mit
3,655
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using Emgu.CV.UI; using Emgu.CV; using Emgu.CV.Structure; using Emgu.CV.CvEnum; using System.IO; using System.Xml; using System.Runtime.InteropServices; using System.Threading; using System.Security.Principal; using System.Threading.Tasks; using Microsoft.Win32.SafeHandles; using System.IO.Ports; using MyoSharp.Device; using MyoSharp.Communication; using MyoSharp.Exceptions; using MyoSharp.Poses; using System.Speech.Synthesis; using Microsoft.CognitiveServices.SpeechRecognition; using System.Net; using WeatherAssignment; using Emgu.CV.Util; using TTSSample; using Microsoft.ProjectOxford.SpeakerRecognition; using Microsoft.ProjectOxford.SpeakerRecognition.Contract.Identification; namespace Jarvis { public partial class frmMain : Form { #region InitialLoad SpeechSynthesizer synthesizer; public frmMain() { InitializeComponent(); } private void frmMain_Load(object sender, EventArgs e) { faceClassifier = new CascadeClassifier(Application.StartupPath + "/Cascades/haarcascade_frontalface_default.xml"); eigenRecognition = new ClassifierTrain(); faceRecognition = false; ballRecognition = false; synthesizer = new SpeechSynthesizer(); synthesizer.Volume = 100; // 0...100 synthesizer.Rate = -2; // -10...10 if (eigenRecognition.IsTrained) { labelMessage.Text = "Training Data loaded"; } else { labelMessage.Text = "No training data found, please train program using Train menu option"; } InitializeMyo(); for (int i = 0; i < 5; i++) { maxedOut[i] = new bool[2]; } resetMaxedOut(); boxApiKey.Text = "04473eab9ed146139f04fc5d9b6bf724"; } private void frmMain_FormClosing(object sender, FormClosingEventArgs e) { StopMyo(); } #endregion #region Video Mat currentFrame; //current image aquired from webcam for display Mat grayFrame; Image<Gray, byte> result; VideoCapture grabber; //This is our capture variable public CascadeClassifier faceClassifier; ClassifierTrain eigenRecognition; bool faceRecognition; bool ballRecognition; bool trackFace = true; string trackName = "Andrei"; bool foundFace = false; bool foundBall = false; bool trackBall = true; int middleX; int middleY; double maxDist; int framePause; int frameLimit = 3; int hueRed = 160; int hueBlue = 110; bool blueBallMode = false; #region GuiInteraction private void imgBoxFace_Click(object sender, EventArgs e) { } private void btnTrain_Click(object sender, EventArgs e) { stopCapture(); //OpenForm frmTrain TF = new frmTrain(this); TF.Show(); } private void btnFaceRecognition_Click(object sender, EventArgs e) { if (faceRecognition) { faceRecognition = false; btnFaceRecognition.Enabled = true; stopCapture(); } else { faceRecognition = true; btnFaceRecognition.Enabled = false; if (ballRecognition) { ballRecognition = false; btnBallRecognition.Enabled = true; stopCaptureBall(); } initialiseCapture(); } } private void btnBallRecognition_Click(object sender, EventArgs e) { if (ballRecognition) { ballRecognition = false; btnBallRecognition.Enabled = true; stopCaptureBall(); } else { ballRecognition = true; btnBallRecognition.Enabled = false; if (faceRecognition) { faceRecognition = false; btnFaceRecognition.Enabled = true; stopCapture(); } initialiseCaptureBall(); } } #endregion #region FaceRecognition public void initialiseCapture() { grabber = new VideoCapture(); grabber.QueryFrame(); framePause = 0; //Initialize the FrameGraber event Application.Idle += new EventHandler(FrameGrabber_Parrellel); sendCode(RESET, RESET, RESET_BALL, RESET); } private void stopCapture() { Application.Idle -= new EventHandler(FrameGrabber_Parrellel); if (grabber != null) { grabber.Dispose(); } } void FrameGrabber_Parrellel(object sender, EventArgs e) { //Get the current frame form capture device currentFrame = grabber.QueryFrame(); grayFrame = new Mat(currentFrame.Size, DepthType.Cv8U, 3); //Convert it to Grayscale //Clear_Faces_Found(); if (currentFrame != null) { CvInvoke.CvtColor(currentFrame, grayFrame, ColorConversion.Bgr2Gray); //Face Detector Rectangle[] facesDetected = faceClassifier.DetectMultiScale(grayFrame, 1.2, 10); //Rectangle[] facesDetected = Face.DetectMultiScale(gray_frame, 1.2, 10, new Size(50, 50), Size.Empty); if (trackFace && !foundFace && !maxedOut[0][0] && !maxedOut[0][1]) { sendCode(MOVE_LEFT, PAUSE, PAUSE, PAUSE); } //Action for each element detected Parallel.For(0, facesDetected.Length, i => { try { facesDetected[i].X += (int)(facesDetected[i].Height * 0.15); facesDetected[i].Y += (int)(facesDetected[i].Width * 0.22); facesDetected[i].Height -= (int)(facesDetected[i].Height * 0.3); facesDetected[i].Width -= (int)(facesDetected[i].Width * 0.35); result = new Mat(currentFrame, facesDetected[i]).ToImage<Gray, byte>(); result._EqualizeHist(); //draw the face detected in the 0th (gray) channel with blue color CvInvoke.Rectangle(currentFrame, facesDetected[i], new MCvScalar(255, 0, 0), 2); // reset foundface //foundFace = false; if (eigenRecognition.IsTrained) { string name = eigenRecognition.Recognise(result); int match_value = (int)eigenRecognition.Get_Eigen_Distance; //Draw the label for each face detected and recognized CvInvoke.PutText(currentFrame, name + " ", new Point(facesDetected[i].X, facesDetected[i].Y), FontFace.HersheyComplex, 1, new MCvScalar(0, 255, 0), 1); Console.WriteLine(name); if (trackFace && name.Equals(trackName)) { foundFace = true; middleX = facesDetected[i].X + facesDetected[i].Width / 2; middleY = facesDetected[i].Y + facesDetected[i].Height / 2; CvInvoke.Circle(currentFrame, new Point((int)middleX, (int)middleY), 3, new MCvScalar(0, 255, 0), -1); if (framePause++ == frameLimit) { rotateHand(middleX, middleY); framePause = 0; } } else { if (framePause++ == frameLimit) { sendCode(MOVE_LEFT, PAUSE, PAUSE, PAUSE); framePause = 0; } } } } catch { //do nothing as parrellel loop buggy //No action as the error is useless, it is simply an error in //no data being there to process and this occurss sporadically } }); //Show the faces procesed and recognized imgBoxFace.Image = currentFrame; } } public void retrain() { eigenRecognition = new ClassifierTrain(); if (eigenRecognition.IsTrained) { labelMessage.Text = "Training Data loaded"; } else { labelMessage.Text = "No training data found, please train program using Train menu option"; } } #endregion #region BallRecognition public void initialiseCaptureBall() { grabber = new VideoCapture(); grabber.QueryFrame(); //Initialize the FrameGraber event Application.Idle += new EventHandler(processFrameAndUpdateGUI); sendCode(RESET, RESET, RESET_BALL, RESET); } public void stopCaptureBall() { Application.Idle -= new EventHandler(processFrameAndUpdateGUI); if (grabber != null) { grabber.Dispose(); } } void processFrameAndUpdateGUI(object sender, EventArgs arg) { currentFrame = grabber.QueryFrame(); if (currentFrame == null) { MessageBox.Show("unable to read from webcam" + Environment.NewLine + Environment.NewLine + "exiting program"); Environment.Exit(0); return; } Mat imgHSV = new Mat(currentFrame.Size, DepthType.Cv8U, 3); Mat imgThreshLow = new Mat(currentFrame.Size, DepthType.Cv8U, 1); Mat imgThreshHigh = new Mat(currentFrame.Size, DepthType.Cv8U, 1); Mat imgThresh = new Mat(currentFrame.Size, DepthType.Cv8U, 1); CvInvoke.CvtColor(currentFrame, imgHSV, ColorConversion.Bgr2Hsv); //CvInvoke.InRange(imgHSV, new ScalarArray(new MCvScalar(0, 155, 155)), new ScalarArray(new MCvScalar(18, 255, 255)), imgThreshLow); //CvInvoke.InRange(imgHSV, new ScalarArray(new MCvScalar(165, 155, 155)), new ScalarArray(new MCvScalar(179, 255, 255)), imgThreshHigh); //CvInvoke.Add(imgThreshLow, imgThreshHigh, imgThresh); //CvInvoke.InRange(imgHSV, new ScalarArray(new MCvScalar(int.Parse(boxHue.Text) - 10, 100, 100)), new ScalarArray(new MCvScalar(int.Parse(boxHue.Text) + 10, 255, 255)), imgThresh); CvInvoke.InRange(imgHSV, new ScalarArray(new MCvScalar(getHue()-10, 130, 130)), new ScalarArray(new MCvScalar(getHue()+10, 255, 255)), imgThresh); CvInvoke.GaussianBlur(imgThresh, imgThresh, new Size(3, 3), 0); Mat structuringElement = CvInvoke.GetStructuringElement(ElementShape.Rectangle, new Size(3, 3), new Point(-1, -1)); CvInvoke.Dilate(imgThresh, imgThresh, structuringElement, new Point(-1, -1), 1, BorderType.Default, new MCvScalar(0, 0, 0)); CvInvoke.Erode(imgThresh, imgThresh, structuringElement, new Point(-1, -1), 1, BorderType.Default, new MCvScalar(0, 0, 0)); // circles way //CircleF[] circles = CvInvoke.HoughCircles(imgThresh, HoughType.Gradient, 2.0, imgThresh.Rows / 4, 100, 50, 20, 200); ////CvInvoke.FindContours() //float max = 0; //CircleF f = new CircleF(new PointF(0,0), -1); //foreach (CircleF circle in circles) //{ // if (circle.Radius > max) // { // max = circle.Radius; // f = circle; // } //} ////foreach (CircleF circle in circles) ////{ //// if (boxBallPosition.Text != "") //// { // if we are not on the first line in the text box //// boxBallPosition.AppendText(Environment.NewLine); // then insert a new line char //// } //// boxBallPosition.AppendText("ball position x = " + circle.Center.X.ToString().PadLeft(4) + ", y = " + circle.Center.Y.ToString().PadLeft(4) + ", radius = " + circle.Radius.ToString("###.000").PadLeft(7)); //// boxBallPosition.ScrollToCaret(); // scroll down in text box so most recent line added (at the bottom) will be shown //// CvInvoke.Circle(currentFrame, new Point((int)circle.Center.X, (int)circle.Center.Y), (int)circle.Radius, new MCvScalar(0, 0, 255), 2); //// CvInvoke.Circle(currentFrame, new Point((int)circle.Center.X, (int)circle.Center.Y), 3, new MCvScalar(0, 255, 0), -1); ////} //if (f.Radius > 0) //{ // if (boxBallPosition.Text != "") // { // if we are not on the first line in the text box // boxBallPosition.AppendText(Environment.NewLine); // then insert a new line char // } // boxBallPosition.AppendText("ball position x = " + f.Center.X.ToString().PadLeft(4) + ", y = " + f.Center.Y.ToString().PadLeft(4) + ", radius = " + f.Radius.ToString("###.000").PadLeft(7)); // boxBallPosition.ScrollToCaret(); // scroll down in text box so most recent line added (at the bottom) will be shown // CvInvoke.Circle(currentFrame, new Point((int)f.Center.X, (int)f.Center.Y), (int)f.Radius, new MCvScalar(0, 0, 255), 2); // CvInvoke.Circle(currentFrame, new Point((int)f.Center.X, (int)f.Center.Y), 3, new MCvScalar(0, 255, 0), -1); // if (trackBall) // { // foundBall = true; // rotateHand((int)f.Center.X, (int)f.Center.Y); // } //} if (trackBall && !foundBall && !maxedOut[0][0] && !maxedOut[0][1]) { if (framePause++ == frameLimit) { sendCode(MOVE_LEFT, PAUSE, PAUSE, PAUSE); framePause = 0; } } VectorOfVectorOfPoint contours = new VectorOfVectorOfPoint(); IOutputArray hierarchy = null; CvInvoke.FindContours(imgThresh, contours, hierarchy, RetrType.External, ChainApproxMethod.ChainApproxSimple); double largest_area = 30; int largest_contour_index = 0; foundBall = false; int count = contours.Size; for (int i = 0; i < count; i++) { double a = CvInvoke.ContourArea(contours[i], false); // Find the area of contour if (a > largest_area) { largest_area = a; largest_contour_index = i; //Store the index of largest contour foundBall = true; } } if (trackBall && foundBall) { middleX = 0; middleY = 0; maxDist = 0; double newDist; int x1, x2, y1, y2; int size = contours[largest_contour_index].Size; for (int i = 0; i < size; i++) { middleX += contours[largest_contour_index][i].X; middleY += contours[largest_contour_index][i].Y; } for (int i = 0; i < size / 2; i++) { x1 = contours[largest_contour_index][i].X; x2 = contours[largest_contour_index][i + size / 2].X; y1 = contours[largest_contour_index][i].Y; y2 = contours[largest_contour_index][i + size / 2].Y; newDist = Math.Sqrt(Math.Pow((x2 - x1), 2) + Math.Pow((y2 - y1), 2)); if (maxDist < newDist) { maxDist = newDist; } } middleX = middleX / contours[largest_contour_index].Size; middleY = middleY / contours[largest_contour_index].Size; CvInvoke.Circle(currentFrame, new Point((int)middleX, (int)middleY), 3, new MCvScalar(0, 255, 0), -1); CvInvoke.Circle(currentFrame, new Point((int)middleX, (int)middleY), (int)maxDist / 2, new MCvScalar(0, 255, 0), 2); boxBallPosition.AppendText("maxDist = " + maxDist + " largest Area: " + largest_area); boxBallPosition.ScrollToCaret(); if (framePause++ == frameLimit) { rotateHand(middleX, middleY); framePause = 0; } } CvInvoke.DrawContours(imgThresh, contours, largest_contour_index, new MCvScalar(255, 0, 0)); CvInvoke.DrawContours(currentFrame, contours, largest_contour_index, new MCvScalar(255, 0, 0)); if (boxChangeImg.Checked) { imgBoxFace.Image = imgThresh; } else { imgBoxFace.Image = currentFrame; } } private int getHue() { if (boxManualHue.Checked) { return (int)boxHue.Value; } else { if (blueBallMode) { return hueBlue; } else { return hueRed; } } } #endregion #endregion #region SerialPort SerialPort port = new SerialPort(); const byte MOVE_LEFT = '0' - 0; const byte MOVE_DOWN = '0' - 0; const byte PAUSE = '1' - 0; const byte MOVE_RIGHT = '2' - 0; const byte MOVE_UP = '2' - 0; const byte RESET = '3' - 0; const byte RESET_BALL = '4' - 0; bool[][] maxedOut = new bool[5][]; private void btnConnect_Click(object sender, EventArgs e) { btnConnect.Enabled = false; //incercam sa evitam dublu apel if (!comboBoxCOM.Enabled) { //este conectat -> exc. deconectare //trecem - vizual - in starea deconectat port.Close(); btnConnect.Text = "Connect"; comboBoxCOM.Enabled = true; } else { try { port = new SerialPort((string)comboBoxCOM.SelectedItem, 9600); port.Open(); port.DataReceived += new SerialDataReceivedEventHandler(port_DataReceived); btnConnect.Text = "Disconnect"; comboBoxCOM.Enabled = false; } catch (Exception ex) { MessageBox.Show(ex.Message, "Error at port opening", MessageBoxButtons.OK, MessageBoxIcon.Error); } } btnConnect.Enabled = true; } private void btnRefresh_Click(object sender, EventArgs e) { LoadPorts(); } private void LoadPorts() { comboBoxCOM.DataSource = SerialPort.GetPortNames(); } void port_DataReceived(object sender, SerialDataReceivedEventArgs e) { //acest artificiu este necesar pt. cross thread call - o prostie nu-ti bate capul cu el if (this.InvokeRequired) { Invoke(new MethodInvoker(() => { process(port.ReadLine()); })); } else { process(port.ReadLine()); } } private void process(string data) { //MessageBox.Show("Am primit ceva pe seriala"); switch (data) { case "a": maxedOut[0][0] = true; break; case "b": maxedOut[0][1] = true; break; case "c": maxedOut[1][0] = true; break; case "d": maxedOut[1][1] = true; break; case "e": maxedOut[2][0] = true; break; case "f": maxedOut[2][1] = true; break; case "g": maxedOut[3][0] = true; break; case "h": maxedOut[3][1] = true; break; default: break; } } private void rotateHand(int x, int y) { int centerX = 320; int centerY = 180; int error = 50; int errorX = (x - centerX); int errorY = (y - centerY); if (Math.Abs(errorX) < error) { if (Math.Abs(errorY) < error) { Console.WriteLine("you rock"); } else { if (errorY > 0) { sendCode(PAUSE, PAUSE, MOVE_DOWN, PAUSE); } else { sendCode(PAUSE, PAUSE, MOVE_UP, PAUSE); } } } else { if (Math.Abs(errorY) < error) { if (errorX > 0) { sendCode(MOVE_RIGHT, PAUSE, PAUSE, PAUSE); } else { sendCode(MOVE_LEFT, PAUSE, PAUSE, PAUSE); } } else { if (errorY > 0) { if (errorX > 0) { sendCode(MOVE_RIGHT, PAUSE, MOVE_DOWN, PAUSE); } else { sendCode(MOVE_LEFT, PAUSE, MOVE_DOWN, PAUSE); } } else { if (errorX > 0) { sendCode(MOVE_RIGHT, PAUSE, MOVE_UP, PAUSE); } else { sendCode(MOVE_LEFT, PAUSE, MOVE_UP, PAUSE); } } } } } private void sendCode(byte servo1, byte servo2, byte servo3, byte servo4) { Console.WriteLine("send code"); Console.WriteLine(port.IsOpen + " aici"); if (port.IsOpen) { byte[] command = new byte[8]; command[0] = 'A' - 0; command[1] = servo1; command[2] = 'B' - 0; command[3] = servo2; command[4] = 'C' - 0; command[5] = servo3; command[6] = 'D' - 0; command[7] = servo4; port.Write(command, 0, 8); } } private void resetMaxedOut() { for (int i = 0; i < 5; i++) { maxedOut[i][0] = false; maxedOut[i][1] = false; } } #endregion #region Myo IChannel myoChannel; IHub myoHub; #region InitializeMyo private void InitializeMyo() { myoChannel = Channel.Create(ChannelDriver.Create(ChannelBridge.Create(), MyoErrorHandlerDriver.Create(MyoErrorHandlerBridge.Create()))); myoHub = Hub.Create(myoChannel); myoHub.MyoConnected += myoHub_MyoConnected; myoHub.MyoDisconnected += myoHub_MyoDisconnected; myoChannel.StartListening(); } private void StopMyo() { myoChannel.StopListening(); myoChannel.Dispose(); } void myoHub_MyoConnected(object sender, MyoEventArgs e) { //throw new NotImplementedException(); MessageBox.Show("Myo connected"); e.Myo.Vibrate(VibrationType.Long); //1. Poses e.Myo.Unlock(UnlockType.Hold); var pose = HeldPose.Create(e.Myo, Pose.FingersSpread, Pose.DoubleTap, Pose.Fist, Pose.WaveIn, Pose.WaveOut); pose.Interval = TimeSpan.FromSeconds(0.5); pose.Start(); pose.Triggered += pose_Triggered; //2. Angles and Quaternions e.Myo.OrientationDataAcquired += Myo_OrientationDataAcquired; } void myoHub_MyoDisconnected(object sender, MyoEventArgs e) { e.Myo.OrientationDataAcquired -= Myo_OrientationDataAcquired; MessageBox.Show("Myo disconnected"); } #endregion #region Myo event handlers void Myo_OrientationDataAcquired(object sender, OrientationDataEventArgs e) { //Invoke Roll, Pitch, Yaw var roll = (e.Roll + 3.14) / (3.14 + 2.0f) * 100; var pitch = (e.Pitch + 3.14) / (3.14 + 2.0f) * 100; var yaw = (e.Yaw + 3.14) / (3.14 + 2.0f) * 100; string data = "Roll: " + roll.ToString() + Environment.NewLine + "Pitch: " + pitch.ToString() + Environment.NewLine + "Yaw: " + yaw.ToString() + Environment.NewLine; InvokeData(data); } void pose_Triggered(object sender, PoseEventArgs e) { InvokeData(e.Pose.ToString()); } private void InvokeData(string data) { if (InvokeRequired) { this.Invoke(new Action<string>(InvokeData), new object[] { data }); return; } boxDebugMyo.Text = ""; boxDebugMyo.AppendText(data + Environment.NewLine); } #endregion #endregion #region Speech private DataRecognitionClient dataClient; private MicrophoneRecognitionClient micClient = null; private const string DefaultSubscriptionKeyPromptMessage = "Paste your subscription key here to start"; private SpeechRecognitionMode speechMode = SpeechRecognitionMode.LongDictation; private string DefaultLocale = "en-US"; private SpeechRecognitionMode Mode = SpeechRecognitionMode.LongDictation; private string subscriptionKey = ""; private string authenticationUri = ""; NAudio.Wave.WaveFileWriter waveWriter = null; NAudio.Wave.DirectSoundOut waveOut = null; NAudio.Wave.WaveIn sourceStream = null; private void btnSpeech_Click(object sender, EventArgs e) { if (this.checkSubscriptionKey()) { this.btnSpeech.Enabled = false; if (this.micClient == null) { this.CreateMicrophoneRecoClient(); } this.micClient.StartMicAndRecognition(); //if (identify) //{ string fileName = "C:\\Users\\Mac\\Desktop\\check.wav"; int deviceNumber = 0; sourceStream = new NAudio.Wave.WaveIn(); sourceStream.DeviceNumber = deviceNumber; sourceStream.WaveFormat = new NAudio.Wave.WaveFormat(16000, 1); sourceStream.DataAvailable += new EventHandler<NAudio.Wave.WaveInEventArgs>(sourceStream_DataAvailable); waveWriter = new NAudio.Wave.WaveFileWriter(fileName, sourceStream.WaveFormat); sourceStream.StartRecording(); //} } } private void sourceStream_DataAvailable(object sender, NAudio.Wave.WaveInEventArgs e) { if (waveWriter == null) return; waveWriter.WriteData(e.Buffer, 0, e.BytesRecorded); waveWriter.Flush(); } private void CreateMicrophoneRecoClient() { this.micClient = SpeechRecognitionServiceFactory.CreateMicrophoneClient( this.Mode, this.DefaultLocale, this.subscriptionKey); this.micClient.AuthenticationUri = this.authenticationUri; // Event handlers for speech recognition results this.micClient.OnMicrophoneStatus += this.OnMicrophoneStatus; this.micClient.OnPartialResponseReceived += this.OnPartialResponseReceivedHandler; this.micClient.OnResponseReceived += this.OnMicDictationResponseReceivedHandler; this.micClient.OnConversationError += this.OnConversationErrorHandler; } private bool checkSubscriptionKey() { if (this.subscriptionKey.Length == 0) { if (boxApiKey.TextLength == 0) { MessageBox.Show(DefaultSubscriptionKeyPromptMessage); return false; } else { this.subscriptionKey = boxApiKey.Text; return true; } } return true; } private void btnUpdateKey_Click(object sender, EventArgs e) { this.subscriptionKey = boxApiKey.Text; } private void WriteLine(string format, params object[] args) { var formattedStr = string.Format(format, args); if (boxSpeech.InvokeRequired) { boxSpeech.Invoke((MethodInvoker)delegate { boxSpeech.AppendText(formattedStr); }); } else { boxSpeech.AppendText(formattedStr); }; } private void OnMicrophoneStatus(object sender, MicrophoneEventArgs e) { WriteLine("--- Microphone status change received by OnMicrophoneStatus() ---"); WriteLine("********* Microphone status: {0} *********", e.Recording); if (e.Recording) { WriteLine("Please start speaking."); } WriteLine("\n"); } private void OnPartialResponseReceivedHandler(object sender, PartialSpeechResponseEventArgs e) { this.WriteLine("--- Partial result received by OnPartialResponseReceivedHandler() ---"); this.WriteLine("{0}", e.PartialResult); this.WriteLine("\n"); } private void OnMicDictationResponseReceivedHandler(object sender, SpeechResponseEventArgs e) { this.WriteLine("--- OnMicDictationResponseReceivedHandler ---"); if (e.PhraseResponse.RecognitionStatus == RecognitionStatus.EndOfDictation || e.PhraseResponse.RecognitionStatus == RecognitionStatus.DictationEndSilenceTimeout) { // we got the final result, so it we can end the mic reco. No need to do this // for dataReco, since we already called endAudio() on it as soon as we were done // sending all the data. this.micClient.EndMicAndRecognition(); if (btnSpeech.InvokeRequired) { boxSpeech.Invoke((MethodInvoker)delegate { btnSpeech.Enabled = true; }); } else { btnSpeech.Enabled = true; }; } this.WriteResponseResult(e); if (e.PhraseResponse.Results.Length > 0) { this.checkSpeechCommand(e.PhraseResponse.Results[0].DisplayText); } } private void WriteResponseResult(SpeechResponseEventArgs e) { if (e.PhraseResponse.Results.Length == 0) { this.WriteLine("No phrase response is available."); } else { this.WriteLine("********* Final n-BEST Results *********"); for (int i = 0; i < e.PhraseResponse.Results.Length; i++) { this.WriteLine( "[{0}] Confidence={1}, Text=\"{2}\"", i, e.PhraseResponse.Results[i].Confidence, e.PhraseResponse.Results[i].DisplayText); } this.WriteLine("\n"); } } private void OnConversationErrorHandler(object sender, SpeechErrorEventArgs e) { if (btnSpeech.InvokeRequired) { boxSpeech.Invoke((MethodInvoker)delegate { btnSpeech.Enabled = true; }); } else { btnSpeech.Enabled = true; }; this.WriteLine("--- Error received by OnConversationErrorHandler() ---"); this.WriteLine("Error code: {0}", e.SpeechErrorCode.ToString()); this.WriteLine("Error text: {0}", e.SpeechErrorText); this.WriteLine("\n"); } private void btnStopSpeech_Click(object sender, EventArgs e) { this.micClient.EndMicAndRecognition(); //this.micClient = null; boxSpeech.Text = ""; btnSpeech.Enabled = true; if (waveOut != null) { waveOut.Stop(); waveOut.Dispose(); waveOut = null; } if (sourceStream != null) { sourceStream.StopRecording(); sourceStream.Dispose(); sourceStream = null; } if (waveWriter != null) { waveWriter.Dispose(); waveWriter = null; } string _selectedFile = "C:\\Users\\Mac\\Desktop\\check.wav"; if (identify) { identifySpeaker(_selectedFile); } } #endregion #region Speech Commands private void checkSpeechCommand(string command) { switch (command) { case "Say hello to the jury.": writeCommand("Say hello to the jury"); TextToSpeech.Speak("Hello everyone"); identify = false; break; case "Pick up the blue ball.": blueBallMode = true; identify = false; writeCommand("Pick up the blue ball"); initialiseCaptureBall(); break; case "Pick up the red ball.": blueBallMode = false; identify = false; writeCommand("Pick up the red ball"); initialiseCaptureBall(); break; case "Give me the ball.": identify = false; writeCommand("Give me the ball"); break; case "Give the ball to Andrei.": identify = false; writeCommand("Give Andrei the ball"); break; case "Give the ball to Andre.": identify = false; writeCommand("Give Andrei the ball"); break; case "Give the ball to Vlad.": identify = false; writeCommand("Give Vlad the ball"); break; case "Drop the ball.": identify = false; writeCommand("Drop the ball"); break; case "Play Shakira.": identify = false; writeCommand("Play Shakira"); break; case "Who am I?": writeCommand("Who am I?"); identify = true; break; default: identify = false; writeCommand("Command not recognised"); break; } } bool identify = false; private async void identifySpeaker(string _selectedFile) { SpeakerIdentificationServiceClient _serviceClient; OperationLocation processPollingLocation; _serviceClient = new SpeakerIdentificationServiceClient("e5404f463d1242ad8ce61c5422afc4bf"); Profile[] allProfiles = await _serviceClient.GetProfilesAsync(); Guid[] testProfileIds = new Guid[allProfiles.Length]; for (int i = 0; i < testProfileIds.Length; i++) { testProfileIds[i] = allProfiles[i].ProfileId; } using (Stream audioStream = File.OpenRead(_selectedFile)) { _selectedFile = ""; processPollingLocation = await _serviceClient.IdentifyAsync(audioStream, testProfileIds, true); } IdentificationOperation identificationResponse = null; int numOfRetries = 10; TimeSpan timeBetweenRetries = TimeSpan.FromSeconds(5.0); while (numOfRetries > 0) { await Task.Delay(timeBetweenRetries); identificationResponse = await _serviceClient.CheckIdentificationStatusAsync(processPollingLocation); if (identificationResponse.Status == Status.Succeeded) { writeUser("User: " + getUser(identificationResponse.ProcessingResult.IdentifiedProfileId.ToString())); break; } else if (identificationResponse.Status == Status.Failed) { writeUser("User: unknown"); break; } numOfRetries--; } if (numOfRetries <= 0) { writeUser("User: unknown"); } } private string getUser(string id) { if (id.Equals("33d3a04c-88a2-4dfd-bb96-772e73ed49f9")) { return "Andrei"; } else { return "unknown"; } } private void writeCommand(string command) { Invoke(new MethodInvoker(() => { boxCommand.Text = command; })); } private void writeUser(string user) { Invoke(new MethodInvoker(() => { labelUser.Text = user; })); } #endregion #region ManualMode private void btnWeb_Click(object sender, EventArgs e) { frmWeb MM = new frmWeb(this); MM.Show(); btnWeb.Enabled = false; } private void btnWeather_Click(object sender, EventArgs e) { WeatherDataServiceFactory obj = WeatherDataServiceFactory.Instance; //get instance of weather data service factory Location location = new Location(); //create location object location.city = "Boston"; var tmp = obj.GetWeatherDataService(location); System.Console.WriteLine("Country: " + tmp.Sys.Country.ToString() + "\nCity: " + tmp.Name.ToString() + "\nTempreture: " + tmp.Main.Temp.ToString() + " (Kelvin)" + "\nWind Speed: " + tmp.Wind.Speed.ToString() + "\nPressure: " + tmp.Main.Pressure.ToString() + " (Kelvin)" + "\nHumidity: " + tmp.Main.Humidity.ToString()); synthesizer.Speak("The temperature in " + location.city + " is " + KelvinToCelsius((int)tmp.Main.Temp).ToString() + " degrees Celsius"); } private int KelvinToCelsius(int kelvin) { int celsius = (int)(kelvin - 273); return celsius; } #endregion private void label1_Click(object sender, EventArgs e) { } private void timerFollowFace_Tick(object sender, EventArgs e) { } } }
isacandrei/Jarvis-Rocket
Jarvis/frmMain.cs
C#
mit
43,377
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Sets socket options for the socket</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.socket-set-nonblock.html">socket_set_nonblock</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.socket-shutdown.html">socket_shutdown</a></div> <div class="up"><a href="ref.sockets.html">Socket Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="function.socket-set-option" class="refentry"> <div class="refnamediv"> <h1 class="refname">socket_set_option</h1> <p class="verinfo">(PHP 4 &gt;= 4.3.0, PHP 5)</p><p class="refpurpose"><span class="refname">socket_set_option</span> &mdash; <span class="dc-title">Sets socket options for the socket</span></p> </div> <div class="refsect1 description" id="refsect1-function.socket-set-option-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="type">bool</span> <span class="methodname"><strong>socket_set_option</strong></span> ( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$socket</code></span> , <span class="methodparam"><span class="type">int</span> <code class="parameter">$level</code></span> , <span class="methodparam"><span class="type">int</span> <code class="parameter">$optname</code></span> , <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$optval</code></span> )</div> <p class="para rdfs-comment"> The <span class="function"><strong>socket_set_option()</strong></span> function sets the option specified by the <code class="parameter">optname</code> parameter, at the specified protocol <code class="parameter">level</code>, to the value pointed to by the <code class="parameter">optval</code> parameter for the <code class="parameter">socket</code>. </p> </div> <div class="refsect1 parameters" id="refsect1-function.socket-set-option-parameters"> <h3 class="title">Parameters</h3> <p class="para"> <dl> <dt> <code class="parameter">socket</code></dt> <dd> <p class="para"> A valid socket resource created with <span class="function"><a href="function.socket-create.html" class="function">socket_create()</a></span> or <span class="function"><a href="function.socket-accept.html" class="function">socket_accept()</a></span>. </p> </dd> <dt> <code class="parameter">level</code></dt> <dd> <p class="para"> The <code class="parameter">level</code> parameter specifies the protocol level at which the option resides. For example, to retrieve options at the socket level, a <code class="parameter">level</code> parameter of <strong><code>SOL_SOCKET</code></strong> would be used. Other levels, such as TCP, can be used by specifying the protocol number of that level. Protocol numbers can be found by using the <span class="function"><a href="function.getprotobyname.html" class="function">getprotobyname()</a></span> function. </p> </dd> <dt> <code class="parameter">optname</code></dt> <dd> <p class="para"> The available socket options are the same as those for the <span class="function"><a href="function.socket-get-option.html" class="function">socket_get_option()</a></span> function. </p> </dd> <dt> <code class="parameter">optval</code></dt> <dd> <p class="para"> The option value. </p> </dd> </dl> </p> </div> <div class="refsect1 returnvalues" id="refsect1-function.socket-set-option-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> Returns <strong><code>TRUE</code></strong> on success or <strong><code>FALSE</code></strong> on failure. </p> </div> <div class="refsect1 examples" id="refsect1-function.socket-set-option-examples"> <h3 class="title">Examples</h3> <p class="para"> <div class="example" id="example-4717"> <p><strong>Example #1 <span class="function"><strong>socket_set_option()</strong></span> example</strong></p> <div class="example-contents"> <div class="phpcode"><code><span style="color: #000000"> <span style="color: #0000BB">&lt;?php<br />$socket&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">socket_create</span><span style="color: #007700">(</span><span style="color: #0000BB">AF_INET</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">SOCK_STREAM</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">SOL_TCP</span><span style="color: #007700">);<br /><br />if&nbsp;(!</span><span style="color: #0000BB">is_resource</span><span style="color: #007700">(</span><span style="color: #0000BB">$socket</span><span style="color: #007700">))&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">'Unable&nbsp;to&nbsp;create&nbsp;socket:&nbsp;'</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">socket_strerror</span><span style="color: #007700">(</span><span style="color: #0000BB">socket_last_error</span><span style="color: #007700">())&nbsp;.&nbsp;</span><span style="color: #0000BB">PHP_EOL</span><span style="color: #007700">;<br />}<br /><br />if&nbsp;(!</span><span style="color: #0000BB">socket_set_option</span><span style="color: #007700">(</span><span style="color: #0000BB">$socket</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">SOL_SOCKET</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">SO_REUSEADDR</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1</span><span style="color: #007700">))&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">'Unable&nbsp;to&nbsp;set&nbsp;option&nbsp;on&nbsp;socket:&nbsp;'</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">socket_strerror</span><span style="color: #007700">(</span><span style="color: #0000BB">socket_last_error</span><span style="color: #007700">())&nbsp;.&nbsp;</span><span style="color: #0000BB">PHP_EOL</span><span style="color: #007700">;<br />}<br /><br />if&nbsp;(!</span><span style="color: #0000BB">socket_bind</span><span style="color: #007700">(</span><span style="color: #0000BB">$socket</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'127.0.0.1'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">1223</span><span style="color: #007700">))&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">'Unable&nbsp;to&nbsp;bind&nbsp;socket:&nbsp;'</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">socket_strerror</span><span style="color: #007700">(</span><span style="color: #0000BB">socket_last_error</span><span style="color: #007700">())&nbsp;.&nbsp;</span><span style="color: #0000BB">PHP_EOL</span><span style="color: #007700">;<br />}<br /><br /></span><span style="color: #0000BB">$rval&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">socket_get_option</span><span style="color: #007700">(</span><span style="color: #0000BB">$socket</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">SOL_SOCKET</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">SO_REUSEADDR</span><span style="color: #007700">);<br /><br />if&nbsp;(</span><span style="color: #0000BB">$rval&nbsp;</span><span style="color: #007700">===&nbsp;</span><span style="color: #0000BB">false</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">'Unable&nbsp;to&nbsp;get&nbsp;socket&nbsp;option:&nbsp;'</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">socket_strerror</span><span style="color: #007700">(</span><span style="color: #0000BB">socket_last_error</span><span style="color: #007700">())&nbsp;.&nbsp;</span><span style="color: #0000BB">PHP_EOL</span><span style="color: #007700">;<br />}&nbsp;else&nbsp;if&nbsp;(</span><span style="color: #0000BB">$rval&nbsp;</span><span style="color: #007700">!==&nbsp;</span><span style="color: #0000BB">0</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">'SO_REUSEADDR&nbsp;is&nbsp;set&nbsp;on&nbsp;socket&nbsp;!'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">PHP_EOL</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">?&gt;</span> </span> </code></div> </div> </div> </p> </div> <div class="refsect1 changelog" id="refsect1-function.socket-set-option-changelog"> <h3 class="title">Changelog</h3> <p class="para"> <table class="doctable informaltable"> <thead> <tr> <th>Version</th> <th>Description</th> </tr> </thead> <tbody class="tbody"> <tr> <td>4.3.0</td> <td> This function was renamed. It used to be called <span class="function"><strong>socket_setopt()</strong></span>. </td> </tr> </tbody> </table> </p> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.socket-set-nonblock.html">socket_set_nonblock</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.socket-shutdown.html">socket_shutdown</a></div> <div class="up"><a href="ref.sockets.html">Socket Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>
dpkshrma/phpdox
functions/function.socket-set-option.html
HTML
mit
10,194
$(document).ready(function(){ //valores necesarios y funciones necesarias $("#add").click(function(){ var enti = additionalIdSel('#sel_enti','id'); var paq = additionalIdSel('#sel_paq','id'); var form='enti='+encodeURI(enti)+'&paq='+encodeURI(paq); ajaxRqst(form,route+'sys_adm/Sys_pakenti/savePaq','POST','text',function(r){ if(r!='2'){ alertMsg('Paquete agregado.'); setTimeout(function(){$("#sel_enti").change()},600); } else alertMsg('Imposible agregar verifique si paquete ya existe en paquete.'); }); }); $('#sel_enti').on('change', function(){ var enti = additionalIdSel('#sel_enti','id'); var form = 'enti='+encodeURI(enti); ajaxRqst(form,route+'sys_adm/Sys_pakenti/getDetalles','POST','text',function(r){ if(r!='2'){ $(".tableData_show").html(r); } else alertMsg('Error en proceso.'); }); }); $(".tableData").on('click','.elibtn',function (){ var id=$(this).closest('tr').data('id'); var enti = additionalIdSel('#sel_enti','id'); ajaxRqst("id="+encodeURI(id)+"&enti="+encodeURI(enti),route+'sys_adm/Sys_pakenti/deletePaq','POST','text',function(r){ if(r!='2'){ alertMsg('eliminado paquete.'); setTimeout(function(){$('#sel_enti').change();},600); } else alertMsg('Error en proceso.'); }); }); // -- inicio de cargar -- });
diegoacs/cdig
assets/public/js/sys_adm/functions_pakenti.js
JavaScript
mit
1,649
import fs from 'fs'; import path from 'path'; import os from 'os'; import mkdirp from 'mkdirp'; import md5 from 'md5'; import randomPort from 'random-port'; import tar from 'tar-fs'; import rimraf from 'rimraf'; import magic from './whiten'; function cleanup(directory) { rimraf(directory, (error) => { if (error) { console.error(error); } }); } export default function whiten(modules, registry, cb) { if (!registry || typeof registry !== 'string') { cb = typeof registry === 'function' ? registry : undefined; registry = "npm"; } let tempDir = path.join(os.tmpdir(), "whiten-" + md5(new Date().toString())); console.log("Downloading to " + tempDir); let storageDir = path.join(tempDir, "storage"); mkdirp.sync(storageDir); mkdirp.sync(path.join(tempDir, "temp")); if (registry === "apm") { mkdirp.sync(path.join(tempDir, "atom")); } randomPort(port => { magic(registry, modules, tempDir, port, (err, stdout, stderr) => { if (err) { console.error(err); cb(err); } else { rimraf.sync(path.join(storageDir, '.sinopia-db.json')); let packedFolders = ['storage']; if (registry === "apm") { packedFolders.push("atom"); } cb(undefined, tar.pack(tempDir, { entries: packedFolders }), () => { cleanup(tempDir); }); } }); }); }
corevo/whiten
src/index.js
JavaScript
mit
1,581
package caches import ( "fmt" gocache "github.com/patrickmn/go-cache" "github.com/topfreegames/khan/models" ) // ClansSummaries represents a cache for the RetrieveClansSummaries operation. type ClansSummaries struct { // Cache points to an instance of gocache.Cache used as the backend cache object. Cache *gocache.Cache } // GetClansSummaries is a cache in front of models.GetClansSummaries() with the exact same interface. // Like models.GetClansSummaries(), this function may return partial results + CouldNotFindAllClansError. // The map[string]interface{} return type represents a summary of one clan with the following keys/values: // "membershipCount": int // "publicID": string // "metadata": map[string]interface{} (user-defined arbitrary JSON object with clan metadata) // "name": string // "allowApplication": bool // "autoJoin": bool // TODO(matheuscscp): replace this map with a richer type func (c *ClansSummaries) GetClansSummaries(db models.DB, gameID string, publicIDs []string) ([]map[string]interface{}, error) { // first, assemble a result map with cached payloads. also assemble a missingPublicIDs string slice idToPayload := make(map[string]map[string]interface{}) var missingPublicIDs []string for _, publicID := range publicIDs { if clanPayload, present := c.Cache.Get(c.getClanSummaryCacheKey(gameID, publicID)); present { idToPayload[publicID] = clanPayload.(map[string]interface{}) } else { missingPublicIDs = append(missingPublicIDs, publicID) } } // fetch and cache missing clans var err error if len(missingPublicIDs) > 0 { // fetch var clans []map[string]interface{} clans, err = models.GetClansSummaries(db, gameID, missingPublicIDs) if err != nil { if _, ok := err.(*models.CouldNotFindAllClansError); !ok { return nil, err } } // cache for _, clanPayload := range clans { publicID := clanPayload["publicID"].(string) idToPayload[publicID] = clanPayload c.Cache.Set(c.getClanSummaryCacheKey(gameID, publicID), clanPayload, gocache.DefaultExpiration) } } // assemble final result with input order var result []map[string]interface{} for _, publicID := range publicIDs { if summary, ok := idToPayload[publicID]; ok { result = append(result, summary) } } return result, err } func (c *ClansSummaries) getClanSummaryCacheKey(gameID, publicID string) string { return fmt.Sprintf("%s/%s", gameID, publicID) }
topfreegames/khan
caches/clan.go
GO
mit
2,455
.top{ background-color: #1C9CD8; height: 30px; font-family: "Quick Sand",sans-serif; border-top-left-radius: 10px; margin-top:10px; } .post{ border-top-left-radius: 0px; } .container-post { background-color: #F1F1F1; height: auto; min-height: 110px; border-left: 1px dotted #6e6e6e; border-bottom: 1px solid #6e6e6e; } .top .date{ font-family: inherit; margin-left: 40px; margin-top:5px; } .top .numbering{ float: right; margin-top: 5px; margin-right: 20px; } .top-thanks{ background-color: #F72E2E; height: 30px; font-family: "Quick Sand",sans-serif; border-top-right-radius: 10px; margin-top:10px; } .top-thanks2{ background-color: #F72E2E; height: 30px; font-family: "Quick Sand",sans-serif; margin-top:10px; } .thanks{ margin-top: 7px; margin-left: 10px; } .id-container{ background-color: #F1F1F1; height: auto; min-height: 400px; } .judul-thread{ margin: 30px; color:black; font-size: 30px; font-weight: 700; font-family: "Quicksand",sans-serif; border-bottom-style: dotted; border-bottom-color: #42dca3; } .isi-thread{ color: black; margin:40px; font-family: "Quicksand",sans-serif; text-align: justify; } .footer-thread{ background-color: #2E363A; height: 30px; } .footer-thread .quote{ float: right; } .container-thanks{ background-color: #F1F1F1; height: 400px; border-left: 1px dotted #42dca3 ; color:black; font-family: "Quicksand",sans-serif; border-bottom-right-radius: 10px; } .container-thanks-2{ background-color: #F1F1F1; height: 140px; border-left: 1px dotted #42dca3 ; color:black; font-family: "Quicksand",sans-serif; border-bottom-right-radius: 0px; } .profile-pic{ background-color: black; height: 140px; width: 140px; margin-left: 40px; margin-top: 40px; } .nama-id{ margin-left: 40px; margin-top: 10px; font-weight: 800; font-size: 18px; } .joindate{ margin-left: 40px; margin-top: 10px; font-weight: 500; font-size: 14px; } .content{ margin-left: 40px; margin-top: 5px; font-weight: 500; font-size: 14px; } .rate{ float: right; margin-right: 10px; margin-top:10px; padding-top: 20px; padding-bottom: 10px; } .profile-pic-2{ height: 50px; width: 50px; margin-left: 10px; margin-top: 10px; } .nama-id-2{ margin-left: 10px; margin-top: 10px; font-weight: 800; font-size: 14px; } .joindate-2{ margin-left: 10px; margin-top: 5px; font-weight: 500; font-size: 11px; } .content-2{ margin-left: 10px; margin-top: 2px; font-weight: 500; font-size: 11px; } .rate-2{ float: left; margin-left: 1px; } .bg-atas{ background-color: #222; width: 100%; min-height: 100%; height: auto; padding-bottom: 0px; overflow: hidden; margin-top: 90px; padding-bottom: 30px; }
tpratama/warkop-TC
assets/forum/css/thread_2.css
CSS
mit
3,029
html.mm-slide .mm-menu{-webkit-transition:-webkit-transform 0.4s ease;-moz-transition:-moz-transform 0.4s ease;-o-transition:-o-transform 0.4s ease;transition:transform 0.4s ease}html.mm-slide.mm-opened .mm-menu{-webkit-transform:translateX(-40%);-moz-transform:translateX(-40%);-ms-transform:translateX(-40%);-o-transform:translateX(-40%);transform:translateX(-40%)}html.mm-slide.mm-opening .mm-menu{-webkit-transform:translateX(0%);-moz-transform:translateX(0%);-ms-transform:translateX(0%);-o-transform:translateX(0%);transform:translateX(0%)}html.mm-slide.mm-right.mm-opened .mm-menu{-webkit-transform:translateX(40%);-moz-transform:translateX(40%);-ms-transform:translateX(40%);-o-transform:translateX(40%);transform:translateX(40%)}html.mm-slide.mm-right.mm-opening .mm-menu{-webkit-transform:translateX(0%);-moz-transform:translateX(0%);-ms-transform:translateX(0%);-o-transform:translateX(0%);transform:translateX(0%)}html.mm-slide.mm-top.mm-opened .mm-menu{-webkit-transform:translateY(-40%);-moz-transform:translateY(-40%);-ms-transform:translateY(-40%);-o-transform:translateY(-40%);transform:translateY(-40%)}html.mm-slide.mm-top.mm-opening .mm-menu{-webkit-transform:translateY(0%);-moz-transform:translateY(0%);-ms-transform:translateY(0%);-o-transform:translateY(0%);transform:translateY(0%)}html.mm-slide.mm-bottom.mm-opened .mm-menu{-webkit-transform:translateY(40%);-moz-transform:translateY(40%);-ms-transform:translateY(40%);-o-transform:translateY(40%);transform:translateY(40%)}html.mm-slide.mm-bottom.mm-opening .mm-menu{-webkit-transform:translateY(0%);-moz-transform:translateY(0%);-ms-transform:translateY(0%);-o-transform:translateY(0%);transform:translateY(0%)}html.mm-zoom-menu .mm-menu{-webkit-transition:-webkit-transform 0.4s ease;-moz-transition:-moz-transform 0.4s ease;-o-transition:-o-transform 0.4s ease;transition:transform 0.4s ease}html.mm-zoom-menu.mm-opened .mm-menu{-webkit-transform:scale(0.7, 0.7) translateX(-40%);-moz-transform:scale(0.7, 0.7) translateX(-40%);-ms-transform:scale(0.7, 0.7) translateX(-40%);-o-transform:scale(0.7, 0.7) translateX(-40%);transform:scale(0.7, 0.7) translateX(-40%);-webkit-transform-origin:left center;-moz-transform-origin:left center;-ms-transform-origin:left center;-o-transform-origin:left center;transform-origin:left center}html.mm-zoom-menu.mm-opening .mm-menu{-webkit-transform:scale(1, 1) translateX(0%);-moz-transform:scale(1, 1) translateX(0%);-ms-transform:scale(1, 1) translateX(0%);-o-transform:scale(1, 1) translateX(0%);transform:scale(1, 1) translateX(0%)}html.mm-zoom-menu.mm-right.mm-opened .mm-menu{-webkit-transform:scale(0.7, 0.7) translateX(40%);-moz-transform:scale(0.7, 0.7) translateX(40%);-ms-transform:scale(0.7, 0.7) translateX(40%);-o-transform:scale(0.7, 0.7) translateX(40%);transform:scale(0.7, 0.7) translateX(40%);-webkit-transform-origin:right center;-moz-transform-origin:right center;-ms-transform-origin:right center;-o-transform-origin:right center;transform-origin:right center}html.mm-zoom-menu.mm-right.mm-opening .mm-menu{-webkit-transform:scale(1, 1) translateX(0%);-moz-transform:scale(1, 1) translateX(0%);-ms-transform:scale(1, 1) translateX(0%);-o-transform:scale(1, 1) translateX(0%);transform:scale(1, 1) translateX(0%)}html.mm-zoom-menu.mm-top.mm-opened .mm-menu{-webkit-transform:scale(0.7, 0.7) translateY(-40%);-moz-transform:scale(0.7, 0.7) translateY(-40%);-ms-transform:scale(0.7, 0.7) translateY(-40%);-o-transform:scale(0.7, 0.7) translateY(-40%);transform:scale(0.7, 0.7) translateY(-40%);-webkit-transform-origin:center top;-moz-transform-origin:center top;-ms-transform-origin:center top;-o-transform-origin:center top;transform-origin:center top}html.mm-zoom-menu.mm-top.mm-opening .mm-menu{-webkit-transform:scale(1, 1) translateY(0%);-moz-transform:scale(1, 1) translateY(0%);-ms-transform:scale(1, 1) translateY(0%);-o-transform:scale(1, 1) translateY(0%);transform:scale(1, 1) translateY(0%)}html.mm-zoom-menu.mm-bottom.mm-opened .mm-menu{-webkit-transform:scale(0.7, 0.7) translateY(40%);-moz-transform:scale(0.7, 0.7) translateY(40%);-ms-transform:scale(0.7, 0.7) translateY(40%);-o-transform:scale(0.7, 0.7) translateY(40%);transform:scale(0.7, 0.7) translateY(40%);-webkit-transform-origin:center bottom;-moz-transform-origin:center bottom;-ms-transform-origin:center bottom;-o-transform-origin:center bottom;transform-origin:center bottom}html.mm-zoom-menu.mm-bottom.mm-opening .mm-menu{-webkit-transform:scale(1, 1) translateY(0%);-moz-transform:scale(1, 1) translateY(0%);-ms-transform:scale(1, 1) translateY(0%);-o-transform:scale(1, 1) translateY(0%);transform:scale(1, 1) translateY(0%)}html.mm-zoom-page .mm-page{-webkit-transition-property:-webkit-transform, top, right, bottom, left, border;-moz-transition-property:-moz-transform, top, right, bottom, left, border;-ms-transition-property:-ms-transform, top, right, bottom, left, border;-o-transition-property:-o-transform, top, right, bottom, left, border;transition-property:transform, top, right, bottom, left, border}html.mm-zoom-page.mm-opened .mm-page{-webkit-transform:scale(1, 1);-moz-transform:scale(1, 1);-ms-transform:scale(1, 1);-o-transform:scale(1, 1);transform:scale(1, 1);-webkit-transform-origin:left center;-moz-transform-origin:left center;-ms-transform-origin:left center;-o-transform-origin:left center;transform-origin:left center}html.mm-zoom-page.mm-opening .mm-page{-webkit-transform:scale(1.5, 1.5);-moz-transform:scale(1.5, 1.5);-ms-transform:scale(1.5, 1.5);-o-transform:scale(1.5, 1.5);transform:scale(1.5, 1.5)}html.mm-zoom-page.mm-right.mm-opened .mm-page{-webkit-transform-origin:right center;-moz-transform-origin:right center;-ms-transform-origin:right center;-o-transform-origin:right center;transform-origin:right center}html.mm-zoom-page.mm-top.mm-opened .mm-page{-webkit-transform-origin:center top;-moz-transform-origin:center top;-ms-transform-origin:center top;-o-transform-origin:center top;transform-origin:center top}html.mm-zoom-page.mm-bottom.mm-opened .mm-page{-webkit-transform-origin:center bottom;-moz-transform-origin:center bottom;-ms-transform-origin:center bottom;-o-transform-origin:center bottom;transform-origin:center bottom}html.mm-zoom-panels .mm-menu.mm-horizontal>.mm-panel{-webkit-transform:scale(1.5, 1.5);-moz-transform:scale(1.5, 1.5);-ms-transform:scale(1.5, 1.5);-o-transform:scale(1.5, 1.5);transform:scale(1.5, 1.5);-webkit-transform-origin:left center;-moz-transform-origin:left center;-ms-transform-origin:left center;-o-transform-origin:left center;transform-origin:left center;-webkit-transition-property:-webkit-transform, left;-moz-transition-property:-moz-transform, left;-ms-transition-property:-ms-transform, left;-o-transition-property:-o-transform, left;transition-property:transform, left}html.mm-zoom-panels .mm-menu.mm-horizontal>.mm-panel.mm-opened{-webkit-transform:scale(1, 1);-moz-transform:scale(1, 1);-ms-transform:scale(1, 1);-o-transform:scale(1, 1);transform:scale(1, 1)}html.mm-zoom-panels .mm-menu.mm-horizontal>.mm-panel.mm-opened.mm-subopened{-webkit-transform:scale(0.7, 0.7);-moz-transform:scale(0.7, 0.7);-ms-transform:scale(0.7, 0.7);-o-transform:scale(0.7, 0.7);transform:scale(0.7, 0.7)}
jroeckle/Debris-Short-Film
public/css/components/mmenu/extensions/jquery.mmenu.effects.css
CSS
mit
7,201
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <meta name="renderer" content="webkit"> <meta http-equiv="Cache-Control" content="no-siteapp" /> <meta name="description" content="you are funny"/> <meta name="keywords" content="fuckyou"/> <meta name="author" content="ginny, gny315@163.com"/> <meta name="robots" content="index"/> <meta name="viewport" content="initial-scale=1, maximum-scale=3, minimum-scale=1, user-scalable=no"> <meta name="apple-mobile-web-app-capable" content="yes"/> <meta name="apple-mobile-web-app-status-bar-style" content="blank"/> <meta name="format-detection" content="telephone=no"/> <link rel="stylesheet" type="text/css" href="css/reset.css"> <link rel="stylesheet" type="text/css" href="css/head.css"> <link rel="stylesheet" type="text/css" href="css/index.css"> <link rel="stylesheet" type="text/css" href="css/register.css"> <script type="text/javascript" src='js/lib/react.js'></script> <script type="text/javascript" src='js/lib/react-dom.js'></script> <script type="text/javascript" src='js/lib/browser.min.js'></script> <script type="text/javascript" src='js/lib/jquery.min.js'></script> <script type="text/javascript" src='js/index_app.js'></script> <!--[if lt IE9]> <script src="http://css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js"></script> <![endif]--> <title>pen man box</title> </head> <body> <div id="container" class="container"> <header> <ul class='index_head'> <li class='index_head_pen'><a href="index.html">PenManBox</a></li> <li class='index_head_theme'><a href="theme.html">theme</a></li> <li class='index_head_comeon'><a href="comeon.html">来一发</a></li> <li class='index_head_home'><a href="home.html">home</a></li> <li class="index_log" id="index_log"></li> </ul> </header> <div class="index_container"> <!-- 轮播图 --> <div class="index_container_turn"> <!-- 温度计 --> <div class="index_container_turn_thermograph"> <div class="index_container_turn_grayround"></div> <div class="index_container_turn_greenrect"> <ul class="index_choose"> <li>1</li> <li>2</li> <li>3</li> <li>4</li> </ul> </div> <div class="index_container_turn_greenround"></div> </div> <!-- 图片 --> <div class="index_container_turn_picture" id='turnPic'> <ul > <li><img src="img/lunbo_1.jpg"></li> <li><img src="img/lunbo_2.jpg"></li> <li><img src="img/lunbo_3.jpg"></li> <li><img src="img/lunbo_4.jpg"></li> </ul> </div> </div> <!-- 热度区 --> <div class="index_hot" id="index_hot"> </div> </div> <footer> <ul> <li> <div>站长:<a href="">@ginny小胖子要当个梦想家</a></div> <div>特别鸣谢:<a href="">@少侠不是令狐</a></div> </li> <li> <div class="index_foot">copyright © 2016-1 penmanbox.com</div> <div class="index_foot"><a href="http://www.miitbeian.gov.cn/">鄂ICP备15020385号</a></div> </li> <li> <img src="img/penmanbox3_03.png"> </li> </ul> </footer> </div> <script type="text/babel" src="js/index.js"></script> <script type="text/babel" src="js/register.js"></script> </body> </html>
fuckyouweb/fuckyouWeb
public/index.html
HTML
mit
3,230
package com.bornstone.stonehenge.spring.manager; import com.bornstone.stonehenge.dao.IDAO; import com.bornstone.stonehenge.manager.IManager; import com.bornstone.stonehenge.manager.binding.ManagerProxyBuilder; import org.springframework.beans.factory.FactoryBean; import org.springframework.context.ApplicationContext; /** * Created with IntelliJ IDEA. * User: king * Date: 14-10-14 * Time: 下午4:56 * To change this template use File | Settings | File Templates. */ public class ManagerFactoryBean<T extends IManager> implements FactoryBean<T> { private Class<T> manager; private IDAO dao; private ApplicationContext applicationContext; public T getObject() throws Exception { ManagerProxyBuilder builder = new ManagerProxyBuilder(); T managerProxyBean = (T) builder.newInstance(new ManagerProxyBean(dao, applicationContext), manager); return managerProxyBean; } @Override public Class<?> getObjectType() { return this.manager; } @Override public boolean isSingleton() { return true; } public void setManager(Class<T> manager) { this.manager = manager; } public void setDao(IDAO dao) { this.dao = dao; } public void setApplicationContext(ApplicationContext applicationContext) { this.applicationContext = applicationContext; } }
AdonisTang/stonehenge
stonehenge-spring/src/main/java/com/bornstone/stonehenge/spring/manager/ManagerFactoryBean.java
Java
mit
1,378
var express = require('express'); var router = express.Router(); var isAuthenticated = require('../server.js').isAuthenticated; var list = require('../controllers/users/list'); var list_by_institute = require('../controllers/users/list_by_institute'); var post = require('../controllers/users/post'); var get = require('../controllers/users/get'); var put = require('../controllers/users/put'); var del = require('../controllers/users/delete'); var find_by_email = require('../controllers/users/find_by_email'); // LIST (ONLY FOR MEMBERS) router.get('/users', isAuthenticated, list.request); // LIST (ONLY FOR MEMBERS) router.get('/institutes/:institute_id/users', isAuthenticated, list_by_institute.request); // POST router.post('/users', post.request); // GET router.get('/users/:user_id', isAuthenticated, get.request); // PUT router.put('/users/:user_id', isAuthenticated, put.request); // DELETE (ONLY FOR MEMBERS) router.delete('/users/:user_id', isAuthenticated, del.request); // FIND BY EMAIL router.get('/user/:email_address', find_by_email.request); module.exports = router;
sitcomlab/Ethics-app
routes/users.js
JavaScript
mit
1,096
import React from 'react'; import Folders from './Folders/Folders'; import Tags from './Tags/Tags'; import Paper from 'material-ui/lib/paper'; const styles = { root: { minHeight: screen.height - 240, maxWidth: screen.width * 0.2, marginLeft: 10, marginTop: -10, paddingTop: 20, backgroundColor: '#FFFFFF', }, }; class CollectionInfo extends React.Component { constructor(props) { super(props); this.populateCurrentCollection = this.populateCurrentCollection.bind(this); } populateCurrentCollection(imageIds) { var newList = new List(); imageIds.map((val, key) => { newList = newList.push(key); }); return state.set('currentCollection', newList); } render() { return ( <Paper style={styles.root} zDepth={1}> <Folders populateCurrentCollection={this.populateCurrentCollection} folders={ this.props.folders } /> <Tags populateCurrentCollection={this.populateCurrentCollection} tags={this.props.tags}/> </Paper> ); } } export default CollectionInfo;
PicDrop/PicDrop
client/Main/Content/Images/Collection/CollectionInfo/CollectionInfo.js
JavaScript
mit
1,084
<!doctype html> <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]--> <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]--> <!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]--> <!--[if gt IE 8]><!--> <!--<![endif]--> <html class="no-js" lang="en"><!-- InstanceBegin template="/Templates/wfbext_template.dwt.cfm" codeOutsideHTMLIsLocked="false" --> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <!-- InstanceBeginEditable name="doctitle" --> <title>The World Factbook</title> <!-- InstanceEndEditable --> <meta name="description" content=""> <meta name="viewport" content="width=device-width"> <link href="../css/fullscreen-external.css" rel="stylesheet" type="text/css"> <script src="../js/modernizr-latest.js"></script><!--developers version - switch to specific production http://modernizr.com/download/--> <script type="text/javascript" src="../js/jquery-1.8.3.min.js"></script> <script type="text/javascript" src="../js/jquery.main.js"></script> <link rel="stylesheet" type="text/css" href="../styles/jquery.ui.core.css"> <link rel="stylesheet" type="text/css" href="../styles/jquery.qtip.css"> <link rel="stylesheet" type="text/css" href="../styles/listnav.css"/> <link rel="stylesheet" type="text/css" href="../styles/navigation.css"> <link rel="stylesheet" type="text/css" href="../styles/wfb_styles.css"> <link rel="stylesheet" type="text/css" href="../scripts/galleria/themes/classic/galleria.classic.css"> <script type="text/javascript" src="../scripts/jquery.idTabs.min.js" charset="utf-8"></script> <script type="text/javascript" src="../scripts/jquery.listmenu.js"></script> <script type="text/javascript" src="../scripts/jquery.listnav.pack.2.1.js" charset="utf-8"></script> <script src="../scripts/jquery-ui-1.9.2.custom.js" type="text/javascript"></script> <script type="text/javascript" src="../scripts/jquery.qtip-2.0.js"></script> <script type="text/javascript" src="../scripts/jquery.qtip.min.js"></script> <script src="../scripts/imgscale.js"></script> <script type="text/javascript" src="../scripts/wfb_scripts.js" charset="utf-8"></script> <!--[if IE]><script type="text/javascript" src="../js/ie.js"></script><![endif]--> <!-- InstanceBeginEditable name="head" --> <!-- load Galleria --> <link rel="stylesheet" type="text/css" href="../scripts/galleria/themes/classic/galleria.classic.css"> <script src="../scripts/galleria/galleria-1.2.9.min.js"></script> <!-- InstanceEndEditable --> </head> <body> <noscript>Javascript must be enabled for the correct page display</noscript> <div id="wrapper"> <header id="header"> <div class="header-holder"> <a class="skip" accesskey="S" href="#main-content">skip to content</a> <span class="bg-globe"></span> <div class="header-panel"> <hgroup> <h1 class="logo"><a href="/"><img src="../images/logo.png" alt="Central Intelligence Agency"><span>Central Intelligence Agency</span></a></h1> <h2 class="work-text">The Work Of A Nation. The Center of Intelligence.</h2> </hgroup> <div class="search-form"> <div class="row"> <div class="add-nav"> <ul> <li><a class="active" href="/contact-cia/report-threats.html">Report Threats</a></li> <li><a href="/about-cia/iraqi-rewards-program.html">رعربيعربي</a></li> <li><a href="/contact-cia/index.html" title="A single point of contact for all CIA inquiries.">Contact</a></li> </ul> </div> </div> <div class="row"> <form id="ciaSearchForm" method="get" action="/search"> <fieldset> <legend class="visuallyhidden">Search CIA.gov</legend> <label class="visuallyhidden" for="q">Search</label> <input name="q" type="text" class="text" id="q" maxlength="2047" placeholder="Search CIA.gov..."/> <input type="hidden" name="site" value="CIA" /> <input type="hidden" name="output" value="xml_no_dtd" /> <input type="hidden" name="client" value="CIA" /> <input type="hidden" name="myAction" value="/search" /> <input type="hidden" name="proxystylesheet" value="CIA" /> <input type="hidden" name="submitMethod" value="get" /> <input type="submit" value="Search" class="submit" /> </fieldset> </form> </div> <div class="row"> <ul class="lang-list"> <li lang="ar" xml:lang="ar"><a href="/ar/index.html">عربي</a></li> <li lang="zh-cn" xml:lang="zh-cn"><a href="/zh/index.html">中文</a></li> <li lang="en" xml:lang="en"><a href="/index.html">English</a></li> <li lang="fr" xml:lang="fr"><a href="/fr/index.html">Français</a></li> <li lang="ru" xml:lang="ru"><a href="/ru/index.html">Русский</a></li> <li lang="es" xml:lang="es"><a href="/es/index.html">Español</a></li> <li lang="en" xml:lang="en"><a title="additional-info" class="more" href="/foreign-languages/index.html">More<span class="visuallyhidden"> Languages</span></a></li> </ul> </div> </div> </div> <nav id="nav"> <h3 class="visuallyhidden">Navigation</h3> <ul> <li> <a href="/">Home</a> <span class="arrow"></span> </li> <li> <a href="/about-cia/">About CIA</a> <span class="arrow"></span> <div class="drop"> <ul> <li><a href="/about-cia/todays-cia/index.html">Today's CIA</a></li> <li><a href="/about-cia/leadership/index.html">Leadership</a></li> <li><a href="/about-cia/cia-vision-mission-values/index.html">CIA Vision, Mission &amp; Values</a></li> <li><a href="/about-cia/headquarters-tour/index.html">Tour Headquarters</a></li> <li><a href="/about-cia/cia-museum/index.html">CIA Museum</a></li> <li><a href="/about-cia/history-of-the-cia/index.html">History of the CIA</a></li> <li><a href="/about-cia/faqs/index.html">FAQs</a></li> <li><a href="/about-cia/no-fear-act/index.html">NoFEAR Act</a></li> <li><a href="/about-cia/site-policies/index.html">Site Policies</a></li> </ul> <div class="info-box"> <img src="../images/navthumb-about.jpg" alt="About CIA" /> <h4>About CIA</h4> <p>Discover the CIA <a href="/about-cia/">history, mission, vision and values</a>. </p> </div> </div> </li> <li> <a href="/careers/">Careers &amp; Internships</a> <span class="arrow"></span> <div class="drop"> <ul> <li class="plain "> <a class="" href="/careers/opportunities" title="This is an overview of all career opportunities at the CIA. "> <span>Career Opportunities </span> </a> </li> <li class="plain "> <a class="" href="/careers/student-opportunities" title="This is the student profile page for candidates looking for jobs/ job listings at the CIA. Student Opportunities - Student Profiles"> <span>Student Opportunities</span> </a> </li> <li class="plain "> <a class="" href="/careers/application-process" title="How to apply to the CIA."> <span>Application Process</span> </a> </li> <li class="plain "> <a class="" href="/careers/life-at-cia" title="This is the about CIA section of the Careers Site"> <span>Life at CIA</span> </a> </li> <li class="plain "> <a class="" href="/careers/diversity" title="This is the diversity information for the Careers Site"> <span>Diversity</span> </a> </li> <li class="plain "> <a class="" href="/careers/military-transition" title="Your prior military service could qualify you to continue to serve your nation at the Central Intelligence Agency. Opportunities for qualified applicants are available in the U.S. and abroad."> <span>Military Transition</span> </a> </li> <li class="plain "> <a class="" href="/careers/games-information" title=""> <span>Diversions &amp; Information</span> </a> </li> <li class="plain "> <a class="" href="/careers/faq" title="Frequently Asked Questions/ FAQ for a Career at the CIA in the Careers Section"> <span>FAQs</span> </a> </li> </ul> <div class="info-box"> <img src="../images/navthumb-careers.jpg" alt="Careers &amp; Internships" /> <h4>Careers &amp; Internships</h4> <p>Your talent. Your diverse skills. Our mission. Learn more about <a href="/careers/">Careers Opportunities at CIA</a>.</p> </div> </div> </li> <li> <a href="/offices-of-cia/">Offices of CIA</a> <span class="arrow"></span> <div class="drop"> <ul> <li class="plain "> <a class="" href="/offices-of-cia/intelligence-analysis" title=""> <span>Intelligence &amp; Analysis</span> </a> </li> <li class="plain "> <a class="" href="/offices-of-cia/clandestine-service" title=""> <span>Clandestine Service</span> </a> </li> <li class="plain "> <a class="" href="/offices-of-cia/science-technology" title=""> <span>Science &amp; Technology</span> </a> </li> <li class="plain "> <a class="" href="/offices-of-cia/mission-support" title=""> <span>Support to Mission</span> </a> </li> <li class="plain "> <a class="" href="/offices-of-cia/human-resources" title=""> <span>Human Resources</span> </a> </li> <li class="plain "> <a class="" href="/offices-of-cia/public-affairs" title="Public Affairs"> <span>Public Affairs</span> </a> </li> <li class="plain "> <a class="" href="/offices-of-cia/general-counsel" title=""> <span>General Counsel</span> </a> </li> <li class="plain "> <a class="" href="/offices-of-cia/equal-employment-opportunity" title=""> <span>Equal Employment Opportunity</span> </a> </li> <li class="plain "> <a class="" href="/offices-of-cia/congressional-affairs" title="Office of Congressional Affairs"> <span>Congressional Affairs</span> </a> </li> <li class="plain "> <a class="" href="/offices-of-cia/inspector-general" title="Inspector General"> <span>Inspector General</span> </a> </li> <li class="plain "> <a class="" href="/offices-of-cia/military-affairs" title="Military Affairs"> <span>Military Affairs</span> </a> </li> </ul> <div class="info-box"> <img src="../images/navthumb-offices.jpg" alt="Offices of CIA" /> <h4>Offices of CIA</h4> <p><a href="/offices-of-cia/">Learn how the CIA is organized</a> into directorates and key offices, responsible for securing our nation.</p> </div> </div> </li> <li> <a href="/news-information/">News &amp; Information</a> <span class="arrow"></span> <div class="drop"> <ul> <li class="plain "> <a class="" href="/news-information/press-releases-statements" title=""> <span>Press Releases &amp; Statements</span> </a> </li> <li class="plain "> <a class="" href="/news-information/speeches-testimony" title=""> <span>Speeches &amp; Testimony</span> </a> </li> <li class="plain "> <a class="" href="/news-information/cia-the-war-on-terrorism" title=""> <span>CIA &amp; the War on Terrorism</span> </a> </li> <li class="plain "> <a class="" href="/news-information/featured-story-archive" title="index for featured story"> <span>Featured Story Archive</span> </a> </li> <li class="plain "> <a class="" href="/news-information/Whats-New-on-CIAgov" title=""> <span>What&#8217;s New Archive</span> </a> </li> <li class="plain "> <a class="" href="/news-information/your-news" title=""> <span>Your News</span> </a> </li> </ul> <div class="info-box"> <img src="../images/navthumb-news.jpg" alt="News &amp; Information" /> <h4>News & Information</h4> <p>The most up-to-date CIA <a href="/news-information/">news, press releases, information and more</a>.</p> </div> </div> </li> <li class="active"> <a href="/library/">Library</a> <span class="arrow"></span> <div class="drop right"> <ul> <li class="plain "> <a class="" href="/library/publications" title=""> <span>Publications</span> </a> </li> <li class="plain "> <a class="" href="/library/center-for-the-study-of-intelligence" title="CSI section"> <span>Center for the Study of Intelligence</span> </a> </li> <li class="plain "> <a class="" href="/library/foia" title=""> <span>Freedom of Information Act Electronic Reading Room</span> </a> </li> <li class="plain "> <a class="" href="/library/kent-center-occasional-papers" title=""> <span>Kent Center Occasional Papers</span> </a> </li> <li class="plain "> <a class="" href="/library/intelligence-literature" title=""> <span>Intelligence Literature</span> </a> </li> <li class="plain "> <a class="" href="/library/reports" title="Reports"> <span>Reports</span> </a> </li> <li class="plain "> <a class="" href="/library/related-links.html" title="Related Links"> <span>Related Links</span> </a> </li> <li class="plain "> <a class="" href="/library/video-center" title="Repository of CIA videos"> <span>Video Center</span> </a> </li> </ul> <div class="info-box"> <img src="../images/navthumb-library.jpg" alt="Library" /> <h4>Library</h4> <p>Our <a href="/library/">open-source library</a> houses the thousands of documents, periodicals, maps and reports released to the public.</p> </div> </div> </li> <li class="last"> <a href="/kids-page/">Kids' Zone</a> <span class="arrow"></span> <div class="drop right"> <ul> <li class="plain "> <a class="" href="/kids-page/k-5th-grade" title="K-5th Grade"> <span>K-5th Grade</span> </a> </li> <li class="plain "> <a class="" href="/kids-page/6-12th-grade" title=""> <span>6-12th Grade</span> </a> </li> <li class="plain "> <a class="" href="/kids-page/parents-teachers" title=""> <span>Parents &amp; Teachers</span> </a> </li> <li class="plain "> <a class="" href="/kids-page/games" title=""> <span>Games</span> </a> </li> <li class="plain "> <a class="" href="/kids-page/related-links" title=""> <span>Related Links</span> </a> </li> <li class="plain "> <a class="" href="/kids-page/privacy-statement" title=""> <span>Privacy Statement</span> </a> </li> </ul> <div class="info-box"> <img src="../images/navthumb-kids.jpg" alt="Kids' Zone" /> <h4>Kids' Zone</h4> <p><a href="/kids-page/">Learn more about the Agency</a> – and find some top secret things you won't see anywhere else.</p> </div> </div> </li> </ul> </nav> </div> </header> <div class="main-block"> <section id="main"> <div class="heading-panel"> <h1>Library</h1> </div> <div class="main-holder"> <div id="sidebar"> <nav class="sidebar-nav"> <h2 class="visuallyhidden">Secondary Navigation</h2> <ul> <li><a class="active" href="/library/">Library</a></li> <li> <a href="/library/publications/">Publications</a> <ul> <li class="mark"><a class="active" href="/library/publications/the-world-factbook/">The World Factbook</a></li> <li><a href="/library/publications/world-leaders-1/">World Leaders</a></li> <li><a href="/library/publications/cia-maps-publications/">CIA Maps</a></li> <li><a href="/library/publications/historical-collection-publications/">Historical Collection Publications</a></li> <li><a href="/library/publications/additional-publications/">Additional Publications</a></li> </ul> </li> <li><a href="/library/center-for-the-study-of-intelligence/">Center for the Study of Intelligence</a></li> <li><a href="http://www.foia.cia.gov/">Freedom of Information Act Electronic Reading Room</a></li> <li><a href="/library/kent-center-occasional-papers/">Kent Center Occasional Papers</a></li> <li><a href="/library/intelligence-literature/">Intelligence Literature: Suggested Reading List</a></li> <li><a href="/library/reports/">Reports</a></li> <li><a href="/library/video-center/">Video Center</a></li> <li><a href="/library/related-links.html">Related Links</a></li> </ul> </nav> </div> <div id="content"> <ul class="breadcrumbs"> <li><a href="/">Home</a></li> <li><a href="/library/">Library </a></li> <li><a href="/library/publications/">Publications</a></li> <li>The World Factbook</li> </ul> <article class="description-box"> <a id="main-content" tabindex="-1">&nbsp;</a> <div class="text-holder-full"> <a name="wfbtop"></a> <div class="text-box" style="width: 770px; float: left;" id="wfb_data"> <table width="100%" border="0" cellpadding="0" cellspacing="0" > <tr> <td> <table width="100%" border="0" cellspacing="0" cellpadding="0" style="padding-top: 10px;height: 50px;"> <tr> <td valign="top"><img src="../graphics/banner_ext2.png" border="0" title="World Factbook Title" width="770" usemap="#Map" style="padding-bottom: 5px;"/></td> </tr> <tr style="height:2px;"> <td></td> </tr> </table> <map name="Map" id="Map"> <area shape="poly" coords="478,17,624,17,615,0,490,0" href="https://www.cia.gov/library/publications/cia-maps-publications/index.html" target="_blank" /> </map> </td> </tr> <tr> <td align="right" style="padding-top: 5px; padding-bottom: 10px; background-image:url(../graphics/country_gradiant_back.jpg); background-position: top; background-repeat: repeat-x;"> <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no"> <meta http-equiv="X-UA-Compatible" content="IE=Edge" /> <script> $(document).ready(function() { // $(".selecter_links").selecter({ // defaultLabel: "Please Select a Country to View", // links: true // }); $( ".selecter_links" ).change(function(e) { if (this.form.selecter_links.selectedIndex > 0) { window.location = this.form.selecter_links.options[this.form.selecter_links.selectedIndex].value; } }); }); </script> <div class="option_table_wrapper"> <form action="#" method="GET"> <select name="selecter_links" class="selecter_links"> <option value="">Please select a country to view</option> <option value="../geos/xx.html"> World </option> <option value="../geos/af.html"> Afghanistan </option> <option value="../geos/ax.html"> Akrotiri </option> <option value="../geos/al.html"> Albania </option> <option value="../geos/ag.html"> Algeria </option> <option value="../geos/aq.html"> American Samoa </option> <option value="../geos/an.html"> Andorra </option> <option value="../geos/ao.html"> Angola </option> <option value="../geos/av.html"> Anguilla </option> <option value="../geos/ay.html"> Antarctica </option> <option value="../geos/ac.html"> Antigua and Barbuda </option> <option value="../geos/xq.html"> Arctic Ocean </option> <option value="../geos/ar.html"> Argentina </option> <option value="../geos/am.html"> Armenia </option> <option value="../geos/aa.html"> Aruba </option> <option value="../geos/at.html"> Ashmore and Cartier Islands </option> <option value="../geos/zh.html"> Atlantic Ocean </option> <option value="../geos/as.html"> Australia </option> <option value="../geos/au.html"> Austria </option> <option value="../geos/aj.html"> Azerbaijan </option> <option value="../geos/bf.html"> Bahamas, The </option> <option value="../geos/ba.html"> Bahrain </option> <option value="../geos/um.html"> Baker Island </option> <option value="../geos/bg.html"> Bangladesh </option> <option value="../geos/bb.html"> Barbados </option> <option value="../geos/bo.html"> Belarus </option> <option value="../geos/be.html"> Belgium </option> <option value="../geos/bh.html"> Belize </option> <option value="../geos/bn.html"> Benin </option> <option value="../geos/bd.html"> Bermuda </option> <option value="../geos/bt.html"> Bhutan </option> <option value="../geos/bl.html"> Bolivia </option> <option value="../geos/bk.html"> Bosnia and Herzegovina </option> <option value="../geos/bc.html"> Botswana </option> <option value="../geos/bv.html"> Bouvet Island </option> <option value="../geos/br.html"> Brazil </option> <option value="../geos/io.html"> British Indian Ocean Territory </option> <option value="../geos/vi.html"> British Virgin Islands </option> <option value="../geos/bx.html"> Brunei </option> <option value="../geos/bu.html"> Bulgaria </option> <option value="../geos/uv.html"> Burkina Faso </option> <option value="../geos/bm.html"> Burma </option> <option value="../geos/by.html"> Burundi </option> <option value="../geos/cv.html"> Cabo Verde </option> <option value="../geos/cb.html"> Cambodia </option> <option value="../geos/cm.html"> Cameroon </option> <option value="../geos/ca.html"> Canada </option> <option value="../geos/cj.html"> Cayman Islands </option> <option value="../geos/ct.html"> Central African Republic </option> <option value="../geos/cd.html"> Chad </option> <option value="../geos/ci.html"> Chile </option> <option value="../geos/ch.html"> China </option> <option value="../geos/kt.html"> Christmas Island </option> <option value="../geos/ip.html"> Clipperton Island </option> <option value="../geos/ck.html"> Cocos (Keeling) Islands </option> <option value="../geos/co.html"> Colombia </option> <option value="../geos/cn.html"> Comoros </option> <option value="../geos/cg.html"> Congo, Democratic Republic of the </option> <option value="../geos/cf.html"> Congo, Republic of the </option> <option value="../geos/cw.html"> Cook Islands </option> <option value="../geos/cr.html"> Coral Sea Islands </option> <option value="../geos/cs.html"> Costa Rica </option> <option value="../geos/iv.html"> Cote d'Ivoire </option> <option value="../geos/hr.html"> Croatia </option> <option value="../geos/cu.html"> Cuba </option> <option value="../geos/cc.html"> Curacao </option> <option value="../geos/cy.html"> Cyprus </option> <option value="../geos/ez.html"> Czech Republic </option> <option value="../geos/da.html"> Denmark </option> <option value="../geos/dx.html"> Dhekelia </option> <option value="../geos/dj.html"> Djibouti </option> <option value="../geos/do.html"> Dominica </option> <option value="../geos/dr.html"> Dominican Republic </option> <option value="../geos/ec.html"> Ecuador </option> <option value="../geos/eg.html"> Egypt </option> <option value="../geos/es.html"> El Salvador </option> <option value="../geos/ek.html"> Equatorial Guinea </option> <option value="../geos/er.html"> Eritrea </option> <option value="../geos/en.html"> Estonia </option> <option value="../geos/et.html"> Ethiopia </option> <option value="../geos/fk.html"> Falkland Islands (Islas Malvinas) </option> <option value="../geos/fo.html"> Faroe Islands </option> <option value="../geos/fj.html"> Fiji </option> <option value="../geos/fi.html"> Finland </option> <option value="../geos/fr.html"> France </option> <option value="../geos/fp.html"> French Polynesia </option> <option value="../geos/fs.html"> French Southern and Antarctic Lands </option> <option value="../geos/gb.html"> Gabon </option> <option value="../geos/ga.html"> Gambia, The </option> <option value="../geos/gz.html"> Gaza Strip </option> <option value="../geos/gg.html"> Georgia </option> <option value="../geos/gm.html"> Germany </option> <option value="../geos/gh.html"> Ghana </option> <option value="../geos/gi.html"> Gibraltar </option> <option value="../geos/gr.html"> Greece </option> <option value="../geos/gl.html"> Greenland </option> <option value="../geos/gj.html"> Grenada </option> <option value="../geos/gq.html"> Guam </option> <option value="../geos/gt.html"> Guatemala </option> <option value="../geos/gk.html"> Guernsey </option> <option value="../geos/gv.html"> Guinea </option> <option value="../geos/pu.html"> Guinea-Bissau </option> <option value="../geos/gy.html"> Guyana </option> <option value="../geos/ha.html"> Haiti </option> <option value="../geos/hm.html"> Heard Island and McDonald Islands </option> <option value="../geos/vt.html"> Holy See (Vatican City) </option> <option value="../geos/ho.html"> Honduras </option> <option value="../geos/hk.html"> Hong Kong </option> <option value="../geos/um.html"> Howland Island </option> <option value="../geos/hu.html"> Hungary </option> <option value="../geos/ic.html"> Iceland </option> <option value="../geos/in.html"> India </option> <option value="../geos/xo.html"> Indian Ocean </option> <option value="../geos/id.html"> Indonesia </option> <option value="../geos/ir.html"> Iran </option> <option value="../geos/iz.html"> Iraq </option> <option value="../geos/ei.html"> Ireland </option> <option value="../geos/im.html"> Isle of Man </option> <option value="../geos/is.html"> Israel </option> <option value="../geos/it.html"> Italy </option> <option value="../geos/jm.html"> Jamaica </option> <option value="../geos/jn.html"> Jan Mayen </option> <option value="../geos/ja.html"> Japan </option> <option value="../geos/um.html"> Jarvis Island </option> <option value="../geos/je.html"> Jersey </option> <option value="../geos/um.html"> Johnston Atoll </option> <option value="../geos/jo.html"> Jordan </option> <option value="../geos/kz.html"> Kazakhstan </option> <option value="../geos/ke.html"> Kenya </option> <option value="../geos/um.html"> Kingman Reef </option> <option value="../geos/kr.html"> Kiribati </option> <option value="../geos/kn.html"> Korea, North </option> <option value="../geos/ks.html"> Korea, South </option> <option value="../geos/kv.html"> Kosovo </option> <option value="../geos/ku.html"> Kuwait </option> <option value="../geos/kg.html"> Kyrgyzstan </option> <option value="../geos/la.html"> Laos </option> <option value="../geos/lg.html"> Latvia </option> <option value="../geos/le.html"> Lebanon </option> <option value="../geos/lt.html"> Lesotho </option> <option value="../geos/li.html"> Liberia </option> <option value="../geos/ly.html"> Libya </option> <option value="../geos/ls.html"> Liechtenstein </option> <option value="../geos/lh.html"> Lithuania </option> <option value="../geos/lu.html"> Luxembourg </option> <option value="../geos/mc.html"> Macau </option> <option value="../geos/mk.html"> Macedonia </option> <option value="../geos/ma.html"> Madagascar </option> <option value="../geos/mi.html"> Malawi </option> <option value="../geos/my.html"> Malaysia </option> <option value="../geos/mv.html"> Maldives </option> <option value="../geos/ml.html"> Mali </option> <option value="../geos/mt.html"> Malta </option> <option value="../geos/rm.html"> Marshall Islands </option> <option value="../geos/mr.html"> Mauritania </option> <option value="../geos/mp.html"> Mauritius </option> <option value="../geos/mx.html"> Mexico </option> <option value="../geos/fm.html"> Micronesia, Federated States of </option> <option value="../geos/um.html"> Midway Islands </option> <option value="../geos/md.html"> Moldova </option> <option value="../geos/mn.html"> Monaco </option> <option value="../geos/mg.html"> Mongolia </option> <option value="../geos/mj.html"> Montenegro </option> <option value="../geos/mh.html"> Montserrat </option> <option value="../geos/mo.html"> Morocco </option> <option value="../geos/mz.html"> Mozambique </option> <option value="../geos/wa.html"> Namibia </option> <option value="../geos/nr.html"> Nauru </option> <option value="../geos/bq.html"> Navassa Island </option> <option value="../geos/np.html"> Nepal </option> <option value="../geos/nl.html"> Netherlands </option> <option value="../geos/nc.html"> New Caledonia </option> <option value="../geos/nz.html"> New Zealand </option> <option value="../geos/nu.html"> Nicaragua </option> <option value="../geos/ng.html"> Niger </option> <option value="../geos/ni.html"> Nigeria </option> <option value="../geos/ne.html"> Niue </option> <option value="../geos/nf.html"> Norfolk Island </option> <option value="../geos/cq.html"> Northern Mariana Islands </option> <option value="../geos/no.html"> Norway </option> <option value="../geos/mu.html"> Oman </option> <option value="../geos/zn.html"> Pacific Ocean </option> <option value="../geos/pk.html"> Pakistan </option> <option value="../geos/ps.html"> Palau </option> <option value="../geos/um.html"> Palmyra Atoll </option> <option value="../geos/pm.html"> Panama </option> <option value="../geos/pp.html"> Papua New Guinea </option> <option value="../geos/pf.html"> Paracel Islands </option> <option value="../geos/pa.html"> Paraguay </option> <option value="../geos/pe.html"> Peru </option> <option value="../geos/rp.html"> Philippines </option> <option value="../geos/pc.html"> Pitcairn Islands </option> <option value="../geos/pl.html"> Poland </option> <option value="../geos/po.html"> Portugal </option> <option value="../geos/rq.html"> Puerto Rico </option> <option value="../geos/qa.html"> Qatar </option> <option value="../geos/ro.html"> Romania </option> <option value="../geos/rs.html"> Russia </option> <option value="../geos/rw.html"> Rwanda </option> <option value="../geos/tb.html"> Saint Barthelemy </option> <option value="../geos/sh.html"> Saint Helena, Ascension, and Tristan da Cunha </option> <option value="../geos/sc.html"> Saint Kitts and Nevis </option> <option value="../geos/st.html"> Saint Lucia </option> <option value="../geos/rn.html"> Saint Martin </option> <option value="../geos/sb.html"> Saint Pierre and Miquelon </option> <option value="../geos/vc.html"> Saint Vincent and the Grenadines </option> <option value="../geos/ws.html"> Samoa </option> <option value="../geos/sm.html"> San Marino </option> <option value="../geos/tp.html"> Sao Tome and Principe </option> <option value="../geos/sa.html"> Saudi Arabia </option> <option value="../geos/sg.html"> Senegal </option> <option value="../geos/ri.html"> Serbia </option> <option value="../geos/se.html"> Seychelles </option> <option value="../geos/sl.html"> Sierra Leone </option> <option value="../geos/sn.html"> Singapore </option> <option value="../geos/sk.html"> Sint Maarten </option> <option value="../geos/lo.html"> Slovakia </option> <option value="../geos/si.html"> Slovenia </option> <option value="../geos/bp.html"> Solomon Islands </option> <option value="../geos/so.html"> Somalia </option> <option value="../geos/sf.html"> South Africa </option> <option value="../geos/oo.html"> Southern Ocean </option> <option value="../geos/sx.html"> South Georgia and South Sandwich Islands </option> <option value="../geos/od.html"> South Sudan </option> <option value="../geos/sp.html"> Spain </option> <option value="../geos/pg.html"> Spratly Islands </option> <option value="../geos/ce.html"> Sri Lanka </option> <option value="../geos/su.html"> Sudan </option> <option value="../geos/ns.html"> Suriname </option> <option value="../geos/sv.html"> Svalbard </option> <option value="../geos/wz.html"> Swaziland </option> <option value="../geos/sw.html"> Sweden </option> <option value="../geos/sz.html"> Switzerland </option> <option value="../geos/sy.html"> Syria </option> <option value="../geos/tw.html"> Taiwan </option> <option value="../geos/ti.html"> Tajikistan </option> <option value="../geos/tz.html"> Tanzania </option> <option value="../geos/th.html"> Thailand </option> <option value="../geos/tt.html"> Timor-Leste </option> <option value="../geos/to.html"> Togo </option> <option value="../geos/tl.html"> Tokelau </option> <option value="../geos/tn.html"> Tonga </option> <option value="../geos/td.html"> Trinidad and Tobago </option> <option value="../geos/ts.html"> Tunisia </option> <option value="../geos/tu.html"> Turkey </option> <option value="../geos/tx.html"> Turkmenistan </option> <option value="../geos/tk.html"> Turks and Caicos Islands </option> <option value="../geos/tv.html"> Tuvalu </option> <option value="../geos/ug.html"> Uganda </option> <option value="../geos/up.html"> Ukraine </option> <option value="../geos/ae.html"> United Arab Emirates </option> <option value="../geos/uk.html"> United Kingdom </option> <option value="../geos/us.html"> United States </option> <option value="../geos/um.html"> United States Pacific Island Wildlife Refuges </option> <option value="../geos/uy.html"> Uruguay </option> <option value="../geos/uz.html"> Uzbekistan </option> <option value="../geos/nh.html"> Vanuatu </option> <option value="../geos/ve.html"> Venezuela </option> <option value="../geos/vm.html"> Vietnam </option> <option value="../geos/vq.html"> Virgin Islands </option> <option value="../geos/wq.html"> Wake Island </option> <option value="../geos/wf.html"> Wallis and Futuna </option> <option value="../geos/we.html"> West Bank </option> <option value="../geos/wi.html"> Western Sahara </option> <option value="../geos/ym.html"> Yemen </option> <option value="../geos/za.html"> Zambia </option> <option value="../geos/zi.html"> Zimbabwe </option> <option value="../geos/ee.html"> European Union </option> </select> </form> </div> </td> </tr> <tr> <td> <style> .description-box .text-holder-full .text-box { line-height: 12px; } </style> <link rel="stylesheet" type="text/css" href="../styles/navigation.css"> <script type="text/javascript"> var timeout = 500; var closetimer = 0; var ddmenuitem = 0; function wfbNav_open() { wfbNav_canceltimer(); wfbNav_close(); ddmenuitem = $(this).find('ul').eq(0).css('visibility', 'visible');} function wfbNav_close() { if(ddmenuitem) ddmenuitem.css('visibility', 'hidden');} function wfbNav_timer() { closetimer = window.setTimeout(wfbNav_close, timeout);} function wfbNav_canceltimer() { if(closetimer) { window.clearTimeout(closetimer); closetimer = null;}} $(document).ready(function() { $('#wfbNav > li').bind('mouseover', wfbNav_open); $('#wfbNav > li').bind('mouseout', wfbNav_timer);}); document.onclick = wfbNav_close; </script> <div> <ul id="wfbNav" style="z-index: 9999;"> <li style="border-bottom: 2px solid #CCCCCC; "><a href="../index.html" style="width:20px; height: 12px;" title="The World Factbook Home"><img src="../graphics/home_on.png" border="0"></a></li> <li style="border-bottom: 2px solid #CCCCCC; "><a href="javascript:void(0);" style="width:65px;" title="About">ABOUT</a> <ul class="sub_menu"> <li><a href="../docs/history.html">&nbsp;&nbsp;History</a></li> <li><a href="../docs/contributor_copyright.html">&nbsp;&nbsp;Copyright and Contributors</a></li> <li><a href="../docs/purchase_info.html">&nbsp;&nbsp;Purchasing</a></li> <li><a href="../docs/didyouknow.html">&nbsp;&nbsp;Did You Know?</a></li> </ul> </li> <li style="border-bottom: 2px solid #CCCCCC; "><a href="javascript:void(0);" style="width:95px;" title="References">REFERENCES</a> <ul class="sub_menu"> <li><a href="../docs/refmaps.html">&nbsp;&nbsp;Regional and World Maps</a></li> <li><a href="../docs/flagsoftheworld.html">&nbsp;&nbsp;Flags of the World</a></li> <li><a href="../docs/gallery.html">&nbsp;&nbsp;Gallery of Covers</a></li> <li><a href="../docs/notesanddefs.html">&nbsp;&nbsp;Definitions and Notes</a></li> <li><a href="../docs/profileguide.html">&nbsp;&nbsp;Guide to Country Profiles</a></li> <li><a href="../rankorder/rankorderguide.html">&nbsp;&nbsp;Guide to Country Comparisons</a></li> <li><a href="../docs/guidetowfbook.html">&nbsp;&nbsp;The World Factbook Users Guide</a></li> </ul> </li> <li style="border-bottom: 2px solid #CCCCCC; "><a href="javascript:void(0);" title="Appendices">APPENDICES</a> <ul class="sub_menu"> <li><a href="../appendix/appendix-a.html">&nbsp;&nbsp;A: abbreviations</a></li> <li><a href="../appendix/appendix-b.html">&nbsp;&nbsp;B: international organizations and groups</a></li> <li><a href="../appendix/appendix-c.html">&nbsp;&nbsp;C: selected international environmental agreements</a></li> <li><a href="../appendix/appendix-d.html">&nbsp;&nbsp;D: cross-reference list of country data codes</a></li> <li><a href="../appendix/appendix-e.html">&nbsp;&nbsp;E: cross-reference list of hydrographic data codes</a></li> <li><a href="../appendix/appendix-f.html">&nbsp;&nbsp;F: cross-reference list of geographic names</a></li> <li><a href="../appendix/appendix-g.html">&nbsp;&nbsp;G: weights and measures</a></li> </ul> </li> <li id="faqs" style="border-bottom: 2px solid #CCCCCC; "><a href="../docs/faqs.html" style="cursor:pointer;width:50px;">FAQ<span style="text-transform:lowercase;">s</span></a></li> <li id="contact" style="border-bottom: 2px solid #CCCCCC; "> <a href="../docs/contact.html" title="Contact" style="cursor:pointer;width:73px;"> CONTACT </a> </li> </ul> </div> <div class="smalltext_nav" align="right" valign="bottom" style="border-bottom: 2px solid #CCCCCC; height: 22px;"> <a href="../print/textversion.html"><img src="../graphics/bandwidth_btn_off.gif" alt="View Text Low Bandwidth Version" title="View Text Low Bandwidth Version" width="173" height="8" border="0" /></a><br> <a href="https://www.cia.gov/library/publications/download/"><img src="../graphics/download_btn_off.gif" alt="Download Publication" title="Download Publication" border="0" id="Download Publication" /></a> </div> <div class="clear"> </div> </div> </td> </tr> <tr> <td> <!-- InstanceBeginEditable name="mainContent" --> <script src="../scripts/imgscale.js"></script> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr class="aus_dark"> <td valign="middle"> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td height="25" valign="middle"> <div class="region1"> <a href=" ../wfbExt/region_aus.html" style="color: #FFFFFF;">Australia-Oceania</a> <strong>:: </strong><span class="region_name1">Marshall Islands</span> </div> </td> </tr> </table> </td> <td width="20" align="right" valign="middle" class="aus_dark"><a href="print/country/countrypdf_rm.pdf"><img src="../graphics/print.gif" style="padding: 3px;"></a></td> </tr> </table> <table width="100%" border="0" cellspacing="0" cellpadding="0" style="background-image:url(../graphics/aus_lgmap_bkgrnd.jpg); background-repeat: repeat-x; background-position: top ;"> <tr> <td width="323" align="center" valign="top" style=" "><table width="100%" align="center" style="border: 1px solid #ccc; height: 195px;" > <tr> <td colspan="2" align="left" valign="middle" class="smalltext_nav" style="height: 12px;" >Page last updated on June 20, 2014 </td> </tr> <tr> <td height="230" align="center" valign="middle" class="area" style="width: 50%; height: 120px;"> <a href="javascript:void(0);" title="Click flag for description"> <img src="../graphics/flags/large/rm-lgflag.gif" border="0" style="cursor:pointer; border: 1px solid #CCC; " id="flagDialog2_rm" name="rm" regioncode="aus" countrycode="rm" countryname="Marshall Islands" flagsubfield="" countryaffiliation="" flagdescription="blue with two stripes radiating from the lower hoist-side corner - orange (top) and white; a white star with four large rays and 20 small rays appears on the hoist side above the two stripes; blue represents the Pacific Ocean, the orange stripe signifies the Ralik Chain or sunset and courage, while the white stripe signifies the Ratak Chain or sunrise and peace; the star symbolizes the cross of Christianity, each of the 24 rays designates one of the electoral districts in the country and the four larger rays highlight the principal cultural centers of Majuro, Jaluit, Wotje, and Ebeye; the rising diagonal band can also be interpreted as representing the equator, with the star showing the archipelago's position just to the north " flagdescriptionnote="" region="Australia-Oceania" class="flagFit aus_lgflagborder" typeimage = "flag"></a> </td> <td align="center" valign="middle" class="area" style="width: 50%; height: 120px;"><a href="javascript:void(0);" title="Click locator to enlarge"> <img src="../graphics/locator/aus/rm_large_locator.gif" border="0" style="cursor:pointer; border: 1px solid #CCC;" id="locatorDialog2_rm" name="rm" regioncode="aus" countrycode="rm" countryname="Marshall Islands" flagsubfield="" countryaffiliation="" flagdescription="" flagdescriptionnote="" region="Australia-Oceania" class="locatorFit aus_lgflagborder" typeimage = "locator"></a></td> </tr> </table></td> <td width="1%" rowspan="2" align="center" valign="middle" bgcolor="#FFFFFF" style="border: 1px solid #fff;">&nbsp;</td> <td rowspan="2" align="center" valign="middle" style="border: 1px solid #E4D4D4;"> <div align="center" valign="middle" > <a href="javascript:void(0);" title="Click map to enlarge"> <img src="../graphics/maps/rm-map.gif" border="0" style="cursor:pointer; border: 1px solid #CCC; display: block; " id="mapDialog2_rm" name="rm" regioncode="aus" countrycode="rm" countryname="Marshall Islands" flagsubfield="" countryaffiliation="" flagdescription="" flagdescriptionnote="" region="Australia-Oceania" class="mapFit aus_lgflagborder" typeimage = "map"></a> </div></td> </tr> <tr> <td height="140" align="center" valign="top" class="photo_bkgrnd_static" bgcolor="#FFFFFF"> <table width="100%" border="0" align="left" cellpadding="0" cellspacing="0"> <tr> <td height="10" colspan="3"></td> </tr> <tr> <td width="100%" rowspan="3" align="center" valign="middle" class="smalltext_nav" > <a href= "javascript:void(0);" title="Photos of Marshall Islands" > <img src="../graphics/photo_on.gif" name="rm" regioncode="aus" countrycode="rm" countryname="Marshall Islands" region="Australia-Oceania" width="123" height="81" border="0" id="photoDialog" style="padding-top:10px;" /></a> <div class="smalltext_nav"> view <span style="color: #006699;; letter-spacing:1px;"> <a href="javascript:void(0);" name="rm" regioncode="aus" countrycode="rm" countryname="Marshall Islands" region="Australia-Oceania" width="123" height="81" border="0" class="photoDialog" ><strong>3 photos </strong></a> </span> of <br>Marshall Islands </div> </td> </tr> <tr> <td height="50%" align="center" valign="top" ></td> </tr> </table> </td> </tr> </table> <div id="countryInfo" style="display: none;"> <div class="wrapper"> <div style="float:right" class="expand_all"> <a href="javascript:void(0)" class="expand">EXPAND ALL</a><a href="javascript:void(0)" class="collapse" style="display: none;">COLLAPSE ALL</a> </div> </div> <script src="jClocksGMT-master/js/jClocksGMT.js"></script> <script src="jClocksGMT-master/js/jquery.rotate.js"></script> <link rel="stylesheet" href="jClocksGMT-master/css/jClocksGMT.css"> <script> $(document).ready(function() { $('[id^="CollapsiblePanel1"] h2').css({'background-color':'#cce0eb',"border-bottom":"2px solid white","cursor":"pointer"}); // aus }); </script> <div id="CollapsiblePanel1_Intro" class="CollapsiblePanel" style="width:100%; "> <div class="wrapper"> <h2 class="question question-back" ccode="rm" sectiontitle="Introduction"><a href="javascript:void();">Introduction</span> ::</span><span class="region">Marshall Islands</span></a></h2> <div class="answer" align="left"> <div class="box" style="padding: 0px; margin: 0px;"> <ul style="text-align: left;padding: 0px;margin: 0px;width: 100%;"> <table border="0" cellspacing="0" cellpadding="0" style="width: 100%;"> <tr class="aus_light" > <td width="450" height="20"><div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2028&alphaletter=B&term=Background" title="Notes and Definitions: Background"> Background</a>: </div></td> <td align="right"> <a href="../fields/2028.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"> <img src="../graphics/field_listing_on.gif" border="0" style="text-decoration:none;"> </a> </tr> <tr> <td id="data" colspan="2" style="vertical-align:middle;"> <div class="category_data">After almost four decades under US administration as the easternmost part of the UN Trust Territory of the Pacific Islands, the Marshall Islands attained independence in 1986 under a Compact of Free Association. Compensation claims continue as a result of US nuclear testing on some of the atolls between 1947 and 1962. The Marshall Islands hosts the US Army Kwajalein Atoll (USAKA) Reagan Missile Test Site, a key installation in the US missile defense network.</div> <tr> <td class="category_data" style="padding-bottom: 5px;"></td> </tr> </table> </ul> </div> </div> <script src="jClocksGMT-master/js/jClocksGMT.js"></script> <script src="jClocksGMT-master/js/jquery.rotate.js"></script> <link rel="stylesheet" href="jClocksGMT-master/css/jClocksGMT.css"> <script> $(document).ready(function() { $('[id^="CollapsiblePanel1"] h2').css({'background-color':'#cce0eb',"border-bottom":"2px solid white","cursor":"pointer"}); // aus }); </script> <div id="CollapsiblePanel1_Geo" class="CollapsiblePanel" style="width:100%; "> <div class="wrapper"> <h2 class="question question-back" ccode="rm" sectiontitle="Geography"><a href="javascript:void();">Geography</span> ::</span><span class="region">Marshall Islands</span></a></h2> <div class="answer" align="left"> <div class="box" style="padding: 0px; margin: 0px;"> <ul style="text-align: left;padding: 0px;margin: 0px;width: 100%;"> <table border="0" cellspacing="0" cellpadding="0" style="width: 100%;"> <tr class="aus_light" > <td width="450" height="20"><div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2144&alphaletter=L&term=Location" title="Notes and Definitions: Location"> Location</a>: </div></td> <td align="right"> <a href="../fields/2144.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"> <img src="../graphics/field_listing_on.gif" border="0" style="text-decoration:none;"> </a> </tr> <tr> <td id="data" colspan="2" style="vertical-align:middle;"> <div class="category_data">Oceania, two archipelagic island chains of 29 atolls, each made up of many small islets, and five single islands in the North Pacific Ocean, about half way between Hawaii and Australia</div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2011&alphaletter=G&term=Geographic coordinates" title="Notes and Definitions: Geographic coordinates"> Geographic coordinates:</a> </div></td> <td align="right"> <a href="../fields/2011.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">9 00 N, 168 00 E</div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2145&alphaletter=M&term=Map references" title="Notes and Definitions: Map references"> Map references:</a> </div></td> <td align="right"> <a href="../fields/2145.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data"> <a href="../graphics/ref_maps/physical/pdf/oceania.pdf" target="_blank" class="category_data">Oceania</a> </div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2147&alphaletter=A&term=Area" title="Notes and Definitions: Area"> Area:</a> </div></td> <td align="right"> <a href="../fields/2147.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category" style="padding-top: 2px;"> total: <span class="category_data" style="font-weight:normal; vertical-align:bottom;">181 sq km</span></div> <span class="category" style="padding-left:7px;">country comparison to the world:</span> <span class="category_data"> <a href="../rankorder/2147rank.html?countryname=Marshall Islands&countrycode=rm&regionCode=aus&rank=217#rm" onMouseDown="" title="Country comparison to the world" alt="Country comparison to the world"> 217 </a> </span> <div class="category" style="padding-top: 2px;"> land: <span class="category_data" style="font-weight:normal; vertical-align:top;">181 sq km </span></div> <div class="category" style="padding-top: 2px;"> water: <span class="category_data" style="font-weight:normal; vertical-align:top;">0 sq km </span></div> <div class="category" style="padding-top: 2px;"> <em>note:</em> <span class="category_data" style="font-weight:normal; vertical-align:top;">the archipelago includes 11,673 sq km of lagoon waters and encompasses the atolls of Bikini, Enewetak, Kwajalein, Majuro, Rongelap, and Utirik </span></div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2023&alphaletter=A&term=Area - comparative" title="Notes and Definitions: Area - comparative"> Area - comparative:</a> </div></td> <td align="right"> <a href="../fields/2023.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">about the size of Washington, DC</div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2096&alphaletter=L&term=Land boundaries" title="Notes and Definitions: Land boundaries"> Land boundaries:</a> </div></td> <td align="right"> <a href="../fields/2096.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">0 km</div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2060&alphaletter=C&term=Coastline" title="Notes and Definitions: Coastline"> Coastline:</a> </div></td> <td align="right"> <a href="../fields/2060.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">370.4 km</div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2106&alphaletter=M&term=Maritime claims" title="Notes and Definitions: Maritime claims"> Maritime claims:</a> </div></td> <td align="right"> <a href="../fields/2106.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category" style="padding-top: 2px;"> territorial sea: <span class="category_data" style="font-weight:normal; vertical-align:bottom;">12 nm</span></div> <div class="category" style="padding-top: 2px;"> contiguous zone: <span class="category_data" style="font-weight:normal; vertical-align:top;">24 nm </span></div> <div class="category" style="padding-top: 2px;"> exclusive economic zone: <span class="category_data" style="font-weight:normal; vertical-align:top;">200 nm </span></div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2059&alphaletter=C&term=Climate" title="Notes and Definitions: Climate"> Climate:</a> </div></td> <td align="right"> <a href="../fields/2059.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">tropical; hot and humid; wet season May to November; islands border typhoon belt</div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2125&alphaletter=T&term=Terrain" title="Notes and Definitions: Terrain"> Terrain:</a> </div></td> <td align="right"> <a href="../fields/2125.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">low coral limestone and sand islands</div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2020&alphaletter=E&term=Elevation extremes" title="Notes and Definitions: Elevation extremes"> Elevation extremes:</a> </div></td> <td align="right"> <a href="../fields/2020.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category" style="padding-top: 2px;"> lowest point: <span class="category_data" style="font-weight:normal; vertical-align:bottom;">Pacific Ocean 0 m</span></div> <div class="category" style="padding-top: 2px;"> highest point: <span class="category_data" style="font-weight:normal; vertical-align:top;">unnamed location on Likiep 10 m </span></div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2111&alphaletter=N&term=Natural resources" title="Notes and Definitions: Natural resources"> Natural resources:</a> </div></td> <td align="right"> <a href="../fields/2111.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">coconut products, marine products, deep seabed minerals</div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2097&alphaletter=L&term=Land use" title="Notes and Definitions: Land use"> Land use:</a> </div></td> <td align="right"> <a href="../fields/2097.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category" style="padding-top: 2px;"> arable land: <span class="category_data" style="font-weight:normal; vertical-align:bottom;">11.11%</span></div> <div class="category" style="padding-top: 2px;"> permanent crops: <span class="category_data" style="font-weight:normal; vertical-align:top;">44.44% </span></div> <div class="category" style="padding-top: 2px;"> other: <span class="category_data" style="font-weight:normal; vertical-align:top;">44.44% (2011) </span></div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2146&alphaletter=I&term=Irrigated land" title="Notes and Definitions: Irrigated land"> Irrigated land:</a> </div></td> <td align="right"> <a href="../fields/2146.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">0 sq km (2011)</div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2021&alphaletter=N&term=Natural hazards" title="Notes and Definitions: Natural hazards"> Natural hazards:</a> </div></td> <td align="right"> <a href="../fields/2021.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">infrequent typhoons</div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2032&alphaletter=E&term=Environment - current issues" title="Notes and Definitions: Environment - current issues"> Environment - current issues:</a> </div></td> <td align="right"> <a href="../fields/2032.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">inadequate supplies of potable water; pollution of Majuro lagoon from household waste and discharges from fishing vessels</div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2033&alphaletter=E&term=Environment - international agreements" title="Notes and Definitions: Environment - international agreements"> Environment - international agreements:</a> </div></td> <td align="right"> <a href="../fields/2033.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category" style="padding-top: 2px;"> party to: <span class="category_data" style="font-weight:normal; vertical-align:bottom;">Biodiversity, Climate Change, Climate Change-Kyoto Protocol, Desertification, Hazardous Wastes, Law of the Sea, Ozone Layer Protection, Ship Pollution, Wetlands, Whaling</span></div> <div class="category" style="padding-top: 2px;"> signed, but not ratified: <span class="category_data" style="font-weight:normal; vertical-align:top;">none of the selected agreements </span></div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2113&alphaletter=G&term=Geography - note" title="Notes and Definitions: Geography - note"> Geography - note:</a> </div></td> <td align="right"> <a href="../fields/2113.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">the islands of Bikini and Enewetak are former US nuclear test sites; Kwajalein atoll, famous as a World War II battleground, surrounds the world's largest lagoon and is used as a US missile test range; the island city of Ebeye is the second largest settlement in the Marshall Islands, after the capital of Majuro, and one of the most densely populated locations in the Pacific</div> <tr> <td class="category_data" style="padding-bottom: 5px;"></td> </tr> </table> </ul> </div> </div> <script src="jClocksGMT-master/js/jClocksGMT.js"></script> <script src="jClocksGMT-master/js/jquery.rotate.js"></script> <link rel="stylesheet" href="jClocksGMT-master/css/jClocksGMT.css"> <script> $(document).ready(function() { $('[id^="CollapsiblePanel1"] h2').css({'background-color':'#cce0eb',"border-bottom":"2px solid white","cursor":"pointer"}); // aus }); </script> <div id="CollapsiblePanel1_People" class="CollapsiblePanel" style="width:100%; "> <div class="wrapper"> <h2 class="question question-back" ccode="rm" sectiontitle="People and Society"><a href="javascript:void();">People and Society</span> ::</span><span class="region">Marshall Islands</span></a></h2> <div class="answer" align="left"> <div class="box" style="padding: 0px; margin: 0px;"> <ul style="text-align: left;padding: 0px;margin: 0px;width: 100%;"> <table border="0" cellspacing="0" cellpadding="0" style="width: 100%;"> <tr class="aus_light" > <td width="450" height="20"><div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2110&alphaletter=N&term=Nationality" title="Notes and Definitions: Nationality"> Nationality</a>: </div></td> <td align="right"> <a href="../fields/2110.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"> <img src="../graphics/field_listing_on.gif" border="0" style="text-decoration:none;"> </a> </tr> <tr> <td id="data" colspan="2" style="vertical-align:middle;"> <div class="category">noun: <span class="category_data" style="font-weight:normal;">Marshallese (singular and plural)</span> </div> <div class="category" style="padding-top: 2px;"> adjective: <span class="category_data" style="font-weight:normal; vertical-align:top;">Marshallese </span></div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2075&alphaletter=E&term=Ethnic groups" title="Notes and Definitions: Ethnic groups"> Ethnic groups:</a> </div></td> <td align="right"> <a href="../fields/2075.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">Marshallese 92.1%, mixed Marshallese 5.9%, other 2% (2006)</div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2098&alphaletter=L&term=Languages" title="Notes and Definitions: Languages"> Languages:</a> </div></td> <td align="right"> <a href="../fields/2098.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">Marshallese (official) 98.2%, other languages 1.8% (1999 census)</div> <div class="category" style="padding-top: 2px;"> <em>note:</em> <span class="category_data" style="font-weight:normal; vertical-align:top;">English (official), widely spoken as a second language </span></div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2122&alphaletter=R&term=Religions" title="Notes and Definitions: Religions"> Religions:</a> </div></td> <td align="right"> <a href="../fields/2122.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">Protestant 54.8%, Assembly of God 25.8%, Roman Catholic 8.4%, Bukot nan Jesus 2.8%, Mormon 2.1%, other Christian 3.6%, other 1%, none 1.5% (1999 census)</div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2119&alphaletter=P&term=Population" title="Notes and Definitions: Population"> Population:</a> </div></td> <td align="right"> <a href="../fields/2119.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">70,983 (July 2014 est.)</div> <span class="category" style="padding-left:7px;">country comparison to the world:</span> <span class="category_data"> <a href="../rankorder/2119rank.html?countryname=Marshall Islands&countrycode=rm&regionCode=aus&rank=203#rm" onMouseDown="" title="Country comparison to the world" alt="Country comparison to the world"> 203 </a> </span> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2010&alphaletter=A&term=Age structure" title="Notes and Definitions: Age structure"> Age structure:</a> </div></td> <td align="right"> <a href="../fields/2010.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category" style="padding-top: 2px;"> 0-14 years: <span class="category_data" style="font-weight:normal; vertical-align:bottom;">36.6% (male 13,244/female 12,741)</span></div> <div class="category" style="padding-top: 2px;"> 15-24 years: <span class="category_data" style="font-weight:normal; vertical-align:top;">17.5% (male 6,305/female 6,087) </span></div> <div class="category" style="padding-top: 2px;"> 25-54 years: <span class="category_data" style="font-weight:normal; vertical-align:top;">36.9% (male 13,308/female 12,856) </span></div> <div class="category" style="padding-top: 2px;"> 55-64 years: <span class="category_data" style="font-weight:normal; vertical-align:top;">5.7% (male 2,078/female 1,938) </span></div> <div class="category" style="padding-top: 2px;"> 65 years and over: <span class="category_data" style="font-weight:normal; vertical-align:top;">3.3% (male 1,187/female 1,239) (2014 est.) </span></div> <div class="category"> <span style="margin-bottom:0px; vertical-align:bottom;">population pyramid:</span> <a href="javascript:void();" title="<img src = '../graphics/populationpyramid_tooltip.gif'>"> <img src="../graphics/poppyramid_icon.jpg" border="0" style="cursor:pointer; border: 0px solid #CCC;" id="flagDialog2_rm" name="rm" regioncode="aus" countrycode="rm" countryname="Marshall Islands" flagsubfield="" countryaffiliation="" flagdescription="blue with two stripes radiating from the lower hoist-side corner - orange (top) and white; a white star with four large rays and 20 small rays appears on the hoist side above the two stripes; blue represents the Pacific Ocean, the orange stripe signifies the Ralik Chain or sunset and courage, while the white stripe signifies the Ratak Chain or sunrise and peace; the star symbolizes the cross of Christianity, each of the 24 rays designates one of the electoral districts in the country and the four larger rays highlight the principal cultural centers of Majuro, Jaluit, Wotje, and Ebeye; the rising diagonal band can also be interpreted as representing the equator, with the star showing the archipelago's position just to the north" flagdescriptionnote="" region="Australia-Oceania" typeimage="population" > </a> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2177&alphaletter=M&term=Median age" title="Notes and Definitions: Median age"> Median age:</a> </div></td> <td align="right"> <a href="../fields/2177.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category" style="padding-top: 2px;"> total: <span class="category_data" style="font-weight:normal; vertical-align:bottom;">22.5 years</span></div> <div class="category" style="padding-top: 2px;"> male: <span class="category_data" style="font-weight:normal; vertical-align:top;">22.5 years </span></div> <div class="category" style="padding-top: 2px;"> female: <span class="category_data" style="font-weight:normal; vertical-align:top;">22.6 years (2014 est.) </span></div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2002&alphaletter=P&term=Population growth rate" title="Notes and Definitions: Population growth rate"> Population growth rate:</a> </div></td> <td align="right"> <a href="../fields/2002.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">1.72% (2014 est.)</div> <span class="category" style="padding-left:7px;">country comparison to the world:</span> <span class="category_data"> <a href="../rankorder/2002rank.html?countryname=Marshall Islands&countrycode=rm&regionCode=aus&rank=72#rm" onMouseDown="" title="Country comparison to the world" alt="Country comparison to the world"> 72 </a> </span> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2054&alphaletter=B&term=Birth rate" title="Notes and Definitions: Birth rate"> Birth rate:</a> </div></td> <td align="right"> <a href="../fields/2054.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">26.36 births/1,000 population (2014 est.)</div> <span class="category" style="padding-left:7px;">country comparison to the world:</span> <span class="category_data"> <a href="../rankorder/2054rank.html?countryname=Marshall Islands&countrycode=rm&regionCode=aus&rank=47#rm" onMouseDown="" title="Country comparison to the world" alt="Country comparison to the world"> 47 </a> </span> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2066&alphaletter=D&term=Death rate" title="Notes and Definitions: Death rate"> Death rate:</a> </div></td> <td align="right"> <a href="../fields/2066.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">4.24 deaths/1,000 population (2014 est.)</div> <span class="category" style="padding-left:7px;">country comparison to the world:</span> <span class="category_data"> <a href="../rankorder/2066rank.html?countryname=Marshall Islands&countrycode=rm&regionCode=aus&rank=207#rm" onMouseDown="" title="Country comparison to the world" alt="Country comparison to the world"> 207 </a> </span> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2112&alphaletter=N&term=Net migration rate" title="Notes and Definitions: Net migration rate"> Net migration rate:</a> </div></td> <td align="right"> <a href="../fields/2112.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">-4.92 migrant(s)/1,000 population (2014 est.)</div> <span class="category" style="padding-left:7px;">country comparison to the world:</span> <span class="category_data"> <a href="../rankorder/2112rank.html?countryname=Marshall Islands&countrycode=rm&regionCode=aus&rank=194#rm" onMouseDown="" title="Country comparison to the world" alt="Country comparison to the world"> 194 </a> </span> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2212&alphaletter=U&term=Urbanization" title="Notes and Definitions: Urbanization"> Urbanization:</a> </div></td> <td align="right"> <a href="../fields/2212.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category" style="padding-top: 2px;"> urban population: <span class="category_data" style="font-weight:normal; vertical-align:bottom;">71.8% of total population (2011)</span></div> <div class="category" style="padding-top: 2px;"> rate of urbanization: <span class="category_data" style="font-weight:normal; vertical-align:top;">2.03% annual rate of change (2010-15 est.) </span></div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2219&alphaletter=M&term=Major urban areas - population" title="Notes and Definitions: Major urban areas - population"> Major urban areas - population:</a> </div></td> <td align="right"> <a href="../fields/2219.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">MAJURO (capital) 31,000 (2011)</div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2018&alphaletter=S&term=Sex ratio" title="Notes and Definitions: Sex ratio"> Sex ratio:</a> </div></td> <td align="right"> <a href="../fields/2018.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category" style="padding-top: 2px;"> at birth: <span class="category_data" style="font-weight:normal; vertical-align:bottom;">1.05 male(s)/female</span></div> <div class="category" style="padding-top: 2px;"> 0-14 years: <span class="category_data" style="font-weight:normal; vertical-align:top;">1.04 male(s)/female </span></div> <div class="category" style="padding-top: 2px;"> 15-24 years: <span class="category_data" style="font-weight:normal; vertical-align:top;">1.04 male(s)/female </span></div> <div class="category" style="padding-top: 2px;"> 25-54 years: <span class="category_data" style="font-weight:normal; vertical-align:top;">1.04 male(s)/female </span></div> <div class="category" style="padding-top: 2px;"> 55-64 years: <span class="category_data" style="font-weight:normal; vertical-align:top;">1.04 male(s)/female </span></div> <div class="category" style="padding-top: 2px;"> 65 years and over: <span class="category_data" style="font-weight:normal; vertical-align:top;">0.95 male(s)/female </span></div> <div class="category" style="padding-top: 2px;"> total population: <span class="category_data" style="font-weight:normal; vertical-align:top;">1.04 male(s)/female (2014 est.) </span></div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2256&alphaletter=M&term=Mother's mean age at first birth" title="Notes and Definitions: Mother's mean age at first birth"> Mother's mean age at first birth:</a> </div></td> <td align="right"> <a href="../fields/2256.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">20.7</div> <div class="category" style="padding-top: 2px;"> <em>note:</em> <span class="category_data" style="font-weight:normal; vertical-align:top;">median age at first birth among women 25-29 (2007 est.) </span></div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2091&alphaletter=I&term=Infant mortality rate" title="Notes and Definitions: Infant mortality rate"> Infant mortality rate:</a> </div></td> <td align="right"> <a href="../fields/2091.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category" style="padding-top: 2px;"> total: <span class="category_data" style="font-weight:normal; vertical-align:bottom;">21.39 deaths/1,000 live births</span></div> <span class="category" style="padding-left:7px;">country comparison to the world:</span> <span class="category_data"> <a href="../rankorder/2091rank.html?countryname=Marshall Islands&countrycode=rm&regionCode=aus&rank=85#rm" onMouseDown="" title="Country comparison to the world" alt="Country comparison to the world"> 85 </a> </span> <div class="category" style="padding-top: 2px;"> male: <span class="category_data" style="font-weight:normal; vertical-align:top;">24.09 deaths/1,000 live births </span></div> <div class="category" style="padding-top: 2px;"> female: <span class="category_data" style="font-weight:normal; vertical-align:top;">18.55 deaths/1,000 live births (2014 est.) </span></div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2102&alphaletter=L&term=Life expectancy at birth" title="Notes and Definitions: Life expectancy at birth"> Life expectancy at birth:</a> </div></td> <td align="right"> <a href="../fields/2102.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category" style="padding-top: 2px;"> total population: <span class="category_data" style="font-weight:normal; vertical-align:bottom;">72.58 years</span></div> <span class="category" style="padding-left:7px;">country comparison to the world:</span> <span class="category_data"> <a href="../rankorder/2102rank.html?countryname=Marshall Islands&countrycode=rm&regionCode=aus&rank=133#rm" onMouseDown="" title="Country comparison to the world" alt="Country comparison to the world"> 133 </a> </span> <div class="category" style="padding-top: 2px;"> male: <span class="category_data" style="font-weight:normal; vertical-align:top;">70.42 years </span></div> <div class="category" style="padding-top: 2px;"> female: <span class="category_data" style="font-weight:normal; vertical-align:top;">74.84 years (2014 est.) </span></div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2127&alphaletter=T&term=Total fertility rate" title="Notes and Definitions: Total fertility rate"> Total fertility rate:</a> </div></td> <td align="right"> <a href="../fields/2127.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">3.22 children born/woman (2014 est.)</div> <span class="category" style="padding-left:7px;">country comparison to the world:</span> <span class="category_data"> <a href="../rankorder/2127rank.html?countryname=Marshall Islands&countrycode=rm&regionCode=aus&rank=51#rm" onMouseDown="" title="Country comparison to the world" alt="Country comparison to the world"> 51 </a> </span> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2258&alphaletter=C&term=Contraceptive prevalence rate" title="Notes and Definitions: Contraceptive prevalence rate"> Contraceptive prevalence rate:</a> </div></td> <td align="right"> <a href="../fields/2258.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">44.6% (2007)</div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2225&alphaletter=H&term=Health expenditures" title="Notes and Definitions: Health expenditures"> Health expenditures:</a> </div></td> <td align="right"> <a href="../fields/2225.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">16.5% of GDP (2011)</div> <span class="category" style="padding-left:7px;">country comparison to the world:</span> <span class="category_data"> <a href="../rankorder/2225rank.html?countryname=Marshall Islands&countrycode=rm&regionCode=aus&rank=5#rm" onMouseDown="" title="Country comparison to the world" alt="Country comparison to the world"> 5 </a> </span> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2226&alphaletter=P&term=Physicians density" title="Notes and Definitions: Physicians density"> Physicians density:</a> </div></td> <td align="right"> <a href="../fields/2226.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">0.44 physicians/1,000 population (2010)</div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2227&alphaletter=H&term=Hospital bed density" title="Notes and Definitions: Hospital bed density"> Hospital bed density:</a> </div></td> <td align="right"> <a href="../fields/2227.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">2.7 beds/1,000 population (2010)</div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2216&alphaletter=D&term=Drinking water source" title="Notes and Definitions: Drinking water source"> Drinking water source:</a> </div></td> <td align="right"> <a href="../fields/2216.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category" style="padding-top: 2px;"> improved: <span class="category_data" style="font-weight:normal; vertical-align:bottom;"></span></div> <div class="category_data" style="padding-top: 3px;">urban: 93.4% of population </div> <div class="category_data" style="padding-top: 3px;">rural: 97.5% of population </div> <div class="category_data" style="padding-top: 3px;">total: 94.5% of population </div> <div class="category" style="padding-top: 2px;"> unimproved: <span class="category_data" style="font-weight:normal; vertical-align:top;"> </span></div> <div class="category_data" style="padding-top: 3px;">urban: 6.6% of population </div> <div class="category_data" style="padding-top: 3px;">rural: 2.5% of population </div> <div class="category_data" style="padding-top: 3px;">total: 5.5% of population (2012 est.) </div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2217&alphaletter=S&term=Sanitation facility access" title="Notes and Definitions: Sanitation facility access"> Sanitation facility access:</a> </div></td> <td align="right"> <a href="../fields/2217.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category" style="padding-top: 2px;"> improved: <span class="category_data" style="font-weight:normal; vertical-align:bottom;"></span></div> <div class="category_data" style="padding-top: 3px;">urban: 84.2% of population </div> <div class="category_data" style="padding-top: 3px;">rural: 55.5% of population </div> <div class="category_data" style="padding-top: 3px;">total: 76.2% of population </div> <div class="category" style="padding-top: 2px;"> unimproved: <span class="category_data" style="font-weight:normal; vertical-align:top;"> </span></div> <div class="category_data" style="padding-top: 3px;">urban: 15.8% of population </div> <div class="category_data" style="padding-top: 3px;">rural: 44.5% of population </div> <div class="category_data" style="padding-top: 3px;">total: 23.8% of population (2012 est.) </div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2155&alphaletter=H&term=HIV/AIDS - adult prevalence rate" title="Notes and Definitions: HIV/AIDS - adult prevalence rate"> HIV/AIDS - adult prevalence rate:</a> </div></td> <td align="right"> <a href="../fields/2155.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">NA</div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2156&alphaletter=H&term=HIV/AIDS - people living with HIV/AIDS" title="Notes and Definitions: HIV/AIDS - people living with HIV/AIDS"> HIV/AIDS - people living with HIV/AIDS:</a> </div></td> <td align="right"> <a href="../fields/2156.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">NA</div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2157&alphaletter=H&term=HIV/AIDS - deaths" title="Notes and Definitions: HIV/AIDS - deaths"> HIV/AIDS - deaths:</a> </div></td> <td align="right"> <a href="../fields/2157.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">NA</div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2228&alphaletter=O&term=Obesity - adult prevalence rate" title="Notes and Definitions: Obesity - adult prevalence rate"> Obesity - adult prevalence rate:</a> </div></td> <td align="right"> <a href="../fields/2228.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">45.4% (2008)</div> <span class="category" style="padding-left:7px;">country comparison to the world:</span> <span class="category_data"> <a href="../rankorder/2228rank.html?countryname=Marshall Islands&countrycode=rm&regionCode=aus&rank=9#rm" onMouseDown="" title="Country comparison to the world" alt="Country comparison to the world"> 9 </a> </span> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2206&alphaletter=E&term=Education expenditures" title="Notes and Definitions: Education expenditures"> Education expenditures:</a> </div></td> <td align="right"> <a href="../fields/2206.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">12.2% of GDP (2003)</div> <span class="category" style="padding-left:7px;">country comparison to the world:</span> <span class="category_data"> <a href="../rankorder/2206rank.html?countryname=Marshall Islands&countrycode=rm&regionCode=aus&rank=3#rm" onMouseDown="" title="Country comparison to the world" alt="Country comparison to the world"> 3 </a> </span> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2103&alphaletter=L&term=Literacy" title="Notes and Definitions: Literacy"> Literacy:</a> </div></td> <td align="right"> <a href="../fields/2103.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category" style="padding-top: 2px;"> definition: <span class="category_data" style="font-weight:normal; vertical-align:bottom;">age 15 and over can read and write</span></div> <div class="category" style="padding-top: 2px;"> total population: <span class="category_data" style="font-weight:normal; vertical-align:top;">93.7% </span></div> <div class="category" style="padding-top: 2px;"> male: <span class="category_data" style="font-weight:normal; vertical-align:top;">93.6% </span></div> <div class="category" style="padding-top: 2px;"> female: <span class="category_data" style="font-weight:normal; vertical-align:top;">93.7% (1999) </span></div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2205&alphaletter=S&term=School life expectancy (primary to tertiary education)" title="Notes and Definitions: School life expectancy (primary to tertiary education)"> School life expectancy (primary to tertiary education):</a> </div></td> <td align="right"> <a href="../fields/2205.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category" style="padding-top: 2px;"> total: <span class="category_data" style="font-weight:normal; vertical-align:bottom;">12 years</span></div> <div class="category" style="padding-top: 2px;"> male: <span class="category_data" style="font-weight:normal; vertical-align:top;">11 years </span></div> <div class="category" style="padding-top: 2px;"> female: <span class="category_data" style="font-weight:normal; vertical-align:top;">12 years (2003) </span></div> <tr> <td class="category_data" style="padding-bottom: 5px;"></td> </tr> </table> </ul> </div> </div> <script src="jClocksGMT-master/js/jClocksGMT.js"></script> <script src="jClocksGMT-master/js/jquery.rotate.js"></script> <link rel="stylesheet" href="jClocksGMT-master/css/jClocksGMT.css"> <script> $(document).ready(function() { $('[id^="CollapsiblePanel1"] h2').css({'background-color':'#cce0eb',"border-bottom":"2px solid white","cursor":"pointer"}); // aus }); </script> <div id="CollapsiblePanel1_Govt" class="CollapsiblePanel" style="width:100%; "> <div class="wrapper"> <h2 class="question question-back" ccode="rm" sectiontitle="Government"><a href="javascript:void();">Government</span> ::</span><span class="region">Marshall Islands</span></a></h2> <div class="answer" align="left"> <div class="box" style="padding: 0px; margin: 0px;"> <ul style="text-align: left;padding: 0px;margin: 0px;width: 100%;"> <table border="0" cellspacing="0" cellpadding="0" style="width: 100%;"> <tr class="aus_light" > <td width="450" height="20"><div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2142&alphaletter=C&term=Country name" title="Notes and Definitions: Country name"> Country name</a>: </div></td> <td align="right"> <a href="../fields/2142.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"> <img src="../graphics/field_listing_on.gif" border="0" style="text-decoration:none;"> </a> </tr> <tr> <td id="data" colspan="2" style="vertical-align:middle;"> <div class="category">conventional long form: <span class="category_data" style="font-weight:normal;">Republic of the Marshall Islands</span> </div> <div class="category" style="padding-top: 2px;"> conventional short form: <span class="category_data" style="font-weight:normal; vertical-align:top;">Marshall Islands </span></div> <div class="category" style="padding-top: 2px;"> local long form: <span class="category_data" style="font-weight:normal; vertical-align:top;">Republic of the Marshall Islands </span></div> <div class="category" style="padding-top: 2px;"> local short form: <span class="category_data" style="font-weight:normal; vertical-align:top;">Marshall Islands </span></div> <div class="category" style="padding-top: 2px;"> abbreviation: <span class="category_data" style="font-weight:normal; vertical-align:top;">RMI </span></div> <div class="category" style="padding-top: 2px;"> former: <span class="category_data" style="font-weight:normal; vertical-align:top;">Trust Territory of the Pacific Islands, Marshall Islands District </span></div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2128&alphaletter=G&term=Government type" title="Notes and Definitions: Government type"> Government type:</a> </div></td> <td align="right"> <a href="../fields/2128.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">constitutional government in free association with the US; the Compact of Free Association entered into force on 21 October 1986 and the Amended Compact entered into force in May 2004</div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2057&alphaletter=C&term=Capital" title="Notes and Definitions: Capital"> Capital:</a> </div></td> <td align="right"> <a href="../fields/2057.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category" style="padding-top: 2px;"> name: <span class="category_data" style="font-weight:normal; vertical-align:bottom;">Majuro</span></div> <div class="category" style="padding-top: 2px;"> geographic coordinates: <span class="category_data" style="font-weight:normal; vertical-align:top;">7 06 N, 171 23 E </span></div> <div class="category" style="padding-top: 2px;"> time difference: <span class="category_data" style="font-weight:normal; vertical-align:top;">UTC+12 (17 hours ahead of Washington, DC, during Standard Time) </span></div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2051&alphaletter=A&term=Administrative divisions" title="Notes and Definitions: Administrative divisions"> Administrative divisions:</a> </div></td> <td align="right"> <a href="../fields/2051.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">24 municipalities; Ailinglaplap, Ailuk, Arno, Aur, Bikini & Kili, Ebon, Enewetak & Ujelang, Jabat, Jaluit, Kwajalein, Lae, Lib, Likiep, Majuro, Maloelap, Mejit, Mili, Namdrik, Namu, Rongelap, Ujae, Utrik, Wotho, Wotje</div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2088&alphaletter=I&term=Independence" title="Notes and Definitions: Independence"> Independence:</a> </div></td> <td align="right"> <a href="../fields/2088.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">21 October 1986 (from the US-administered UN trusteeship)</div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2109&alphaletter=N&term=National holiday" title="Notes and Definitions: National holiday"> National holiday:</a> </div></td> <td align="right"> <a href="../fields/2109.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">Constitution Day, 1 May (1979)</div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2063&alphaletter=C&term=Constitution" title="Notes and Definitions: Constitution"> Constitution:</a> </div></td> <td align="right"> <a href="../fields/2063.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">effective 1 May 1979; amended several times, last in 1990 (2005)</div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2100&alphaletter=L&term=Legal system" title="Notes and Definitions: Legal system"> Legal system:</a> </div></td> <td align="right"> <a href="../fields/2100.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">mixed legal system of US and English common law, customary law, and local statutes</div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2220&alphaletter=I&term=International law organization participation" title="Notes and Definitions: International law organization participation"> International law organization participation:</a> </div></td> <td align="right"> <a href="../fields/2220.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">accepts compulsory ICJ jurisdiction with reservations; accepts ICCt jurisdiction</div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2123&alphaletter=S&term=Suffrage" title="Notes and Definitions: Suffrage"> Suffrage:</a> </div></td> <td align="right"> <a href="../fields/2123.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">18 years of age; universal</div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2077&alphaletter=E&term=Executive branch" title="Notes and Definitions: Executive branch"> Executive branch:</a> </div></td> <td align="right"> <a href="../fields/2077.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category" style="padding-top: 2px;"> chief of state: <span class="category_data" style="font-weight:normal; vertical-align:bottom;">President Christopher J. LOEAK (since 17 January 2012); note - the president is both chief of state and head of government</span></div> <div class="category" style="padding-top: 2px;"> head of government: <span class="category_data" style="font-weight:normal; vertical-align:top;">President Christopher J. LOEAK (since 17 January 2012) </span></div> <div class="category" style="padding-top: 2px;"> cabinet: <span class="category_data" style="font-weight:normal; vertical-align:top;">Cabinet selected by the president from among the members of the legislature </span></div> <span class="category" style="padding-left:7px;font-weight: normal;">(For more information visit the <a href="/library/publications/world-leaders-1/RM.html" target="_blank">World Leaders website</a>&nbsp;<img src="../graphics/aus_newwindow.gif" alt="Opens in New Window" title="Opens in New Window" border="0"/>)</span> <div class="category" style="padding-top: 2px;"> elections: <span class="category_data" style="font-weight:normal; vertical-align:top;">president elected by Nitijela (legislature) from among its members for a four-year term; election last held on 3 January 2012 (next to be held in 2016) </span></div> <div class="category" style="padding-top: 2px;"> election results: <span class="category_data" style="font-weight:normal; vertical-align:top;">Christopher J. LOEAK elected president; Nitijela vote - NA </span></div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2101&alphaletter=L&term=Legislative branch" title="Notes and Definitions: Legislative branch"> Legislative branch:</a> </div></td> <td align="right"> <a href="../fields/2101.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">unicameral legislature or Nitijela (33 seats; members elected by popular vote to serve four-year terms)</div> <div class="category" style="padding-top: 2px;"> elections: <span class="category_data" style="font-weight:normal; vertical-align:top;">last held on 21 November 2011 (next to be held by November 2015) </span></div> <div class="category" style="padding-top: 2px;"> election results: <span class="category_data" style="font-weight:normal; vertical-align:top;">percent of vote by party - NA; seats by party - independents 33 </span></div> <div class="category" style="padding-top: 2px;"> <em>note:</em> <span class="category_data" style="font-weight:normal; vertical-align:top;">the Council of Chiefs or Ironij is a 12-member body comprised of tribal chiefs that advises on matters affecting customary law and practice </span></div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2094&alphaletter=J&term=Judicial branch" title="Notes and Definitions: Judicial branch"> Judicial branch:</a> </div></td> <td align="right"> <a href="../fields/2094.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category" style="padding-top: 2px;"> highest court(s): <span class="category_data" style="font-weight:normal; vertical-align:bottom;">Supreme Court (consists of the chief justice and other judges as prescribed by law)</span></div> <div class="category" style="padding-top: 2px;"> judge selection and term of office: <span class="category_data" style="font-weight:normal; vertical-align:top;">judges appointed by the Cabinet on the recommendation of the Judicial Service Commission and upon the approval of the Nitijela; judges appointed until retirement, normally at age 72 </span></div> <div class="category" style="padding-top: 2px;"> subordinate courts: <span class="category_data" style="font-weight:normal; vertical-align:top;">High Court; District Courts; Traditional Rights Court; Community Courts </span></div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2118&alphaletter=P&term=Political parties and leaders" title="Notes and Definitions: Political parties and leaders"> Political parties and leaders:</a> </div></td> <td align="right"> <a href="../fields/2118.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">traditionally there have been no formally organized political parties; what has existed more closely resembles factions or interest groups because they do not have party headquarters, formal platforms, or party structures; the following two "groupings" have competed in legislative balloting in recent years - Aelon Kein Ad Party [Michael KABUA] and United Democratic Party or UDP [Litokwa TOMEING]</div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2115&alphaletter=P&term=Political pressure groups and leaders" title="Notes and Definitions: Political pressure groups and leaders"> Political pressure groups and leaders:</a> </div></td> <td align="right"> <a href="../fields/2115.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">NA</div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2107&alphaletter=I&term=International organization participation" title="Notes and Definitions: International organization participation"> International organization participation:</a> </div></td> <td align="right"> <a href="../fields/2107.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">ACP, ADB, AOSIS, FAO, G-77, IAEA, IBRD, ICAO, IDA, IFAD, IFC, ILO, IMF, IMO, IMSO, Interpol, IOC, ITU, OPCW, PIF, Sparteca, SPC, UN, UNCTAD, UNESCO, WHO</div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2149&alphaletter=D&term=Diplomatic representation in the US" title="Notes and Definitions: Diplomatic representation in the US"> Diplomatic representation in the US:</a> </div></td> <td align="right"> <a href="../fields/2149.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category" style="padding-top: 2px;"> chief of mission: <span class="category_data" style="font-weight:normal; vertical-align:bottom;">Ambassador Charles R. PAUL (since 6 September 2011)</span></div> <div class="category" style="padding-top: 2px;"> chancery: <span class="category_data" style="font-weight:normal; vertical-align:top;">2433 Massachusetts Avenue NW, Washington, DC 20008 </span></div> <div class="category" style="padding-top: 2px;"> telephone: <span class="category_data" style="font-weight:normal; vertical-align:top;">[1] (202) 234-5414 </span></div> <div class="category" style="padding-top: 2px;"> FAX: <span class="category_data" style="font-weight:normal; vertical-align:top;">[1] (202) 232-3236 </span></div> <div class="category" style="padding-top: 2px;"> consulate(s) general: <span class="category_data" style="font-weight:normal; vertical-align:top;">Honolulu, Springdale (AR) </span></div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2007&alphaletter=D&term=Diplomatic representation from the US" title="Notes and Definitions: Diplomatic representation from the US"> Diplomatic representation from the US:</a> </div></td> <td align="right"> <a href="../fields/2007.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category" style="padding-top: 2px;"> chief of mission: <span class="category_data" style="font-weight:normal; vertical-align:bottom;">Ambassador Thomas H. ARMBRUSTER (since 16 August 2012)</span></div> <div class="category" style="padding-top: 2px;"> embassy: <span class="category_data" style="font-weight:normal; vertical-align:top;">Oceanside, Mejen Weto, Long Island, Majuro </span></div> <div class="category" style="padding-top: 2px;"> mailing address: <span class="category_data" style="font-weight:normal; vertical-align:top;">P. O. Box 1379, Majuro, Republic of the Marshall Islands 96960-1379 </span></div> <div class="category" style="padding-top: 2px;"> telephone: <span class="category_data" style="font-weight:normal; vertical-align:top;">[692] 247-4011 </span></div> <div class="category" style="padding-top: 2px;"> FAX: <span class="category_data" style="font-weight:normal; vertical-align:top;">[692] 247-4012 </span></div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2081&alphaletter=F&term=Flag description" title="Notes and Definitions: Flag description"> Flag description:</a> </div></td> <td align="right"> <a href="../fields/2081.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">blue with two stripes radiating from the lower hoist-side corner - orange (top) and white; a white star with four large rays and 20 small rays appears on the hoist side above the two stripes; blue represents the Pacific Ocean, the orange stripe signifies the Ralik Chain or sunset and courage, while the white stripe signifies the Ratak Chain or sunrise and peace; the star symbolizes the cross of Christianity, each of the 24 rays designates one of the electoral districts in the country and the four larger rays highlight the principal cultural centers of Majuro, Jaluit, Wotje, and Ebeye; the rising diagonal band can also be interpreted as representing the equator, with the star showing the archipelago's position just to the north</div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2218&alphaletter=N&term=National anthem" title="Notes and Definitions: National anthem"> National anthem:</a> </div></td> <td align="right"> <a href="../fields/2218.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category" style="padding-top: 2px;"> name: <span class="category_data" style="font-weight:normal; vertical-align:bottom;">"Forever Marshall Islands"</span></div> <link rel="stylesheet" type="text/css" href="../styles/jquery.ui.core.css"/> <p><a href="../anthems/RM.mp3" class="playAnthem" name="Marshall Islands" target="_new"><img src="../graphics/play_anthem.png"></a></p> <div class="category" style="padding-top: 2px;"> lyrics/music: <span class="category_data" style="font-weight:normal; vertical-align:top;">Amata KABUA </span></div> <div class="category" style="padding-top: 2px;"> <em>note:</em> <span class="category_data" style="font-weight:normal; vertical-align:top;">adopted 1981 </span></div> <tr> <td class="category_data" style="padding-bottom: 5px;"></td> </tr> </table> </ul> </div> </div> <script src="jClocksGMT-master/js/jClocksGMT.js"></script> <script src="jClocksGMT-master/js/jquery.rotate.js"></script> <link rel="stylesheet" href="jClocksGMT-master/css/jClocksGMT.css"> <script> $(document).ready(function() { $('[id^="CollapsiblePanel1"] h2').css({'background-color':'#cce0eb',"border-bottom":"2px solid white","cursor":"pointer"}); // aus }); </script> <div id="CollapsiblePanel1_Econ" class="CollapsiblePanel" style="width:100%; "> <div class="wrapper"> <h2 class="question question-back" ccode="rm" sectiontitle="Economy"><a href="javascript:void();">Economy</span> ::</span><span class="region">Marshall Islands</span></a></h2> <div class="answer" align="left"> <div class="box" style="padding: 0px; margin: 0px;"> <ul style="text-align: left;padding: 0px;margin: 0px;width: 100%;"> <table border="0" cellspacing="0" cellpadding="0" style="width: 100%;"> <tr class="aus_light" > <td width="450" height="20"><div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2116&alphaletter=E&term=Economy - overview" title="Notes and Definitions: Economy - overview"> Economy - overview</a>: </div></td> <td align="right"> <a href="../fields/2116.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"> <img src="../graphics/field_listing_on.gif" border="0" style="text-decoration:none;"> </a> </tr> <tr> <td id="data" colspan="2" style="vertical-align:middle;"> <div class="category_data">US assistance and lease payments for the use of Kwajalein Atoll as a US military base are the mainstay of this small island country. The Marshall Islands received roughly $1 billion in aid from the US during 1986-2001 under the original Compact of Free Association (Compact). In 2002 and 2003, the US and the Marshall Islands renegotiated the Compact's financial package for a 20-year period, from 2004 to 2024. Under the amended Compact, the Marshall Islands will receive roughly $1.5 billion in direct US assistance. Agricultural production, primarily subsistence, is concentrated on small farms; the most important commercial crops are coconuts and breadfruit. Industry is limited to handicrafts, tuna processing, and copra. Tourism holds some potential. The islands and atolls have few natural resources, and imports exceed exports. Under the amended Compact, the US is also funding, jointly with the Marshall Islands, a Trust Fund for the people of the Marshall Islands that will provide an income stream beyond 2024 when direct Compact aid is to end.</div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2001&alphaletter=G&term=GDP (purchasing power parity)" title="Notes and Definitions: GDP (purchasing power parity)"> GDP (purchasing power parity):</a> </div></td> <td align="right"> <a href="../fields/2001.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">$486 million (2013 est.)</div> <span class="category" style="padding-left:7px;">country comparison to the world:</span> <span class="category_data"> <a href="../rankorder/2001rank.html?countryname=Marshall Islands&countrycode=rm&regionCode=aus&rank=216#rm" onMouseDown="" title="Country comparison to the world" alt="Country comparison to the world"> 216 </a> </span> <div class="category_data" style="padding-top: 3px;">$475.4 million (2012 est.) </div> <div class="category_data" style="padding-top: 3px;">$467.2 million (2011 est.) </div> <div class="category" style="padding-top: 2px;"> <em>note:</em> <span class="category_data" style="font-weight:normal; vertical-align:top;">data are in 2013 US dollars </span></div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2195&alphaletter=G&term=GDP (official exchange rate)" title="Notes and Definitions: GDP (official exchange rate)"> GDP (official exchange rate):</a> </div></td> <td align="right"> <a href="../fields/2195.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">$193 million (2013 est.)</div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2003&alphaletter=G&term=GDP - real growth rate" title="Notes and Definitions: GDP - real growth rate"> GDP - real growth rate:</a> </div></td> <td align="right"> <a href="../fields/2003.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">2.3% (2013 est.)</div> <span class="category" style="padding-left:7px;">country comparison to the world:</span> <span class="category_data"> <a href="../rankorder/2003rank.html?countryname=Marshall Islands&countrycode=rm&regionCode=aus&rank=136#rm" onMouseDown="" title="Country comparison to the world" alt="Country comparison to the world"> 136 </a> </span> <div class="category_data" style="padding-top: 3px;">1.9% (2012 est.) </div> <div class="category_data" style="padding-top: 3px;">0.8% (2011 est.) </div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2004&alphaletter=G&term=GDP - per capita (PPP)" title="Notes and Definitions: GDP - per capita (PPP)"> GDP - per capita (PPP):</a> </div></td> <td align="right"> <a href="../fields/2004.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">$8,700 (2013 est.)</div> <span class="category" style="padding-left:7px;">country comparison to the world:</span> <span class="category_data"> <a href="../rankorder/2004rank.html?countryname=Marshall Islands&countrycode=rm&regionCode=aus&rank=128#rm" onMouseDown="" title="Country comparison to the world" alt="Country comparison to the world"> 128 </a> </span> <div class="category_data" style="padding-top: 3px;">$8,700 (2012 est.) </div> <div class="category_data" style="padding-top: 3px;">$8,800 (2011 est.) </div> <div class="category" style="padding-top: 2px;"> <em>note:</em> <span class="category_data" style="font-weight:normal; vertical-align:top;">data are in 2013 US dollars </span></div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2012&alphaletter=G&term=GDP - composition, by sector of origin" title="Notes and Definitions: GDP - composition, by sector of origin"> GDP - composition, by sector of origin:</a> </div></td> <td align="right"> <a href="../fields/2012.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category" style="padding-top: 2px;"> agriculture: <span class="category_data" style="font-weight:normal; vertical-align:bottom;">14.3%</span></div> <div class="category" style="padding-top: 2px;"> industry: <span class="category_data" style="font-weight:normal; vertical-align:top;">13.9% </span></div> <div class="category" style="padding-top: 2px;"> services: <span class="category_data" style="font-weight:normal; vertical-align:top;">71.8% (2011 est.) </span></div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2052&alphaletter=A&term=Agriculture - products" title="Notes and Definitions: Agriculture - products"> Agriculture - products:</a> </div></td> <td align="right"> <a href="../fields/2052.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">coconuts, tomatoes, melons, taro, breadfruit, fruits; pigs, chickens</div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2090&alphaletter=I&term=Industries" title="Notes and Definitions: Industries"> Industries:</a> </div></td> <td align="right"> <a href="../fields/2090.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">copra, tuna processing, tourism, craft items (from seashells, wood, and pearls)</div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2089&alphaletter=I&term=Industrial production growth rate" title="Notes and Definitions: Industrial production growth rate"> Industrial production growth rate:</a> </div></td> <td align="right"> <a href="../fields/2089.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">NA%</div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2095&alphaletter=L&term=Labor force" title="Notes and Definitions: Labor force"> Labor force:</a> </div></td> <td align="right"> <a href="../fields/2095.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">10,480 (2011 est.)</div> <span class="category" style="padding-left:7px;">country comparison to the world:</span> <span class="category_data"> <a href="../rankorder/2095rank.html?countryname=Marshall Islands&countrycode=rm&regionCode=aus&rank=216#rm" onMouseDown="" title="Country comparison to the world" alt="Country comparison to the world"> 216 </a> </span> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2048&alphaletter=L&term=Labor force - by occupation" title="Notes and Definitions: Labor force - by occupation"> Labor force - by occupation:</a> </div></td> <td align="right"> <a href="../fields/2048.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category" style="padding-top: 2px;"> agriculture: <span class="category_data" style="font-weight:normal; vertical-align:bottom;">11%</span></div> <div class="category" style="padding-top: 2px;"> industry: <span class="category_data" style="font-weight:normal; vertical-align:top;">16.3% </span></div> <div class="category" style="padding-top: 2px;"> services: <span class="category_data" style="font-weight:normal; vertical-align:top;">72.7% (2011 est.) </span></div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2129&alphaletter=U&term=Unemployment rate" title="Notes and Definitions: Unemployment rate"> Unemployment rate:</a> </div></td> <td align="right"> <a href="../fields/2129.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">36% (2006 est.)</div> <span class="category" style="padding-left:7px;">country comparison to the world:</span> <span class="category_data"> <a href="../rankorder/2129rank.html?countryname=Marshall Islands&countrycode=rm&regionCode=aus&rank=189#rm" onMouseDown="" title="Country comparison to the world" alt="Country comparison to the world"> 189 </a> </span> <div class="category_data" style="padding-top: 3px;">30.9% (2000 est.) </div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2046&alphaletter=P&term=Population below poverty line" title="Notes and Definitions: Population below poverty line"> Population below poverty line:</a> </div></td> <td align="right"> <a href="../fields/2046.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">NA%</div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2047&alphaletter=H&term=Household income or consumption by percentage share" title="Notes and Definitions: Household income or consumption by percentage share"> Household income or consumption by percentage share:</a> </div></td> <td align="right"> <a href="../fields/2047.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category" style="padding-top: 2px;"> lowest 10%: <span class="category_data" style="font-weight:normal; vertical-align:bottom;">NA%</span></div> <div class="category" style="padding-top: 2px;"> highest 10%: <span class="category_data" style="font-weight:normal; vertical-align:top;">NA% </span></div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2056&alphaletter=B&term=Budget" title="Notes and Definitions: Budget"> Budget:</a> </div></td> <td align="right"> <a href="../fields/2056.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category" style="padding-top: 2px;"> revenues: <span class="category_data" style="font-weight:normal; vertical-align:bottom;">$105.4 million</span></div> <div class="category" style="padding-top: 2px;"> expenditures: <span class="category_data" style="font-weight:normal; vertical-align:top;">$104.7 million (FY09 est.) </span></div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2221&alphaletter=T&term=Taxes and other revenues" title="Notes and Definitions: Taxes and other revenues"> Taxes and other revenues:</a> </div></td> <td align="right"> <a href="../fields/2221.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">54.6% of GDP (FY09 est.)</div> <span class="category" style="padding-left:7px;">country comparison to the world:</span> <span class="category_data"> <a href="../rankorder/2221rank.html?countryname=Marshall Islands&countrycode=rm&regionCode=aus&rank=9#rm" onMouseDown="" title="Country comparison to the world" alt="Country comparison to the world"> 9 </a> </span> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2222&alphaletter=B&term=Budget surplus (+) or deficit (-)" title="Notes and Definitions: Budget surplus (+) or deficit (-)"> Budget surplus (+) or deficit (-):</a> </div></td> <td align="right"> <a href="../fields/2222.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">0.4% of GDP (FY09 est.)</div> <span class="category" style="padding-left:7px;">country comparison to the world:</span> <span class="category_data"> <a href="../rankorder/2222rank.html?countryname=Marshall Islands&countrycode=rm&regionCode=aus&rank=35#rm" onMouseDown="" title="Country comparison to the world" alt="Country comparison to the world"> 35 </a> </span> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2080&alphaletter=F&term=Fiscal year" title="Notes and Definitions: Fiscal year"> Fiscal year:</a> </div></td> <td align="right"> <a href="../fields/2080.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">1 October - 30 September</div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2092&alphaletter=I&term=Inflation rate (consumer prices)" title="Notes and Definitions: Inflation rate (consumer prices)"> Inflation rate (consumer prices):</a> </div></td> <td align="right"> <a href="../fields/2092.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">12.9% (2008 est.)</div> <span class="category" style="padding-left:7px;">country comparison to the world:</span> <span class="category_data"> <a href="../rankorder/2092rank.html?countryname=Marshall Islands&countrycode=rm&regionCode=aus&rank=215#rm" onMouseDown="" title="Country comparison to the world" alt="Country comparison to the world"> 215 </a> </span> <div class="category_data" style="padding-top: 3px;">3% (2005 est.) </div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2078&alphaletter=E&term=Exports" title="Notes and Definitions: Exports"> Exports:</a> </div></td> <td align="right"> <a href="../fields/2078.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">$50.14 million (2011 est.)</div> <span class="category" style="padding-left:7px;">country comparison to the world:</span> <span class="category_data"> <a href="../rankorder/2078rank.html?countryname=Marshall Islands&countrycode=rm&regionCode=aus&rank=196#rm" onMouseDown="" title="Country comparison to the world" alt="Country comparison to the world"> 196 </a> </span> <div class="category_data" style="padding-top: 3px;">$9.1 million (2000 est.) </div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2049&alphaletter=E&term=Exports - commodities" title="Notes and Definitions: Exports - commodities"> Exports - commodities:</a> </div></td> <td align="right"> <a href="../fields/2049.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">copra cake, coconut oil, handicrafts, fish</div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2087&alphaletter=I&term=Imports" title="Notes and Definitions: Imports"> Imports:</a> </div></td> <td align="right"> <a href="../fields/2087.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">$118.7 million (2011 est.)</div> <span class="category" style="padding-left:7px;">country comparison to the world:</span> <span class="category_data"> <a href="../rankorder/2087rank.html?countryname=Marshall Islands&countrycode=rm&regionCode=aus&rank=210#rm" onMouseDown="" title="Country comparison to the world" alt="Country comparison to the world"> 210 </a> </span> <div class="category_data" style="padding-top: 3px;">$54.7 million (2000 est.) </div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2058&alphaletter=I&term=Imports - commodities" title="Notes and Definitions: Imports - commodities"> Imports - commodities:</a> </div></td> <td align="right"> <a href="../fields/2058.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">foodstuffs, machinery and equipment, fuels, beverages, tobacco</div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2079&alphaletter=D&term=Debt - external" title="Notes and Definitions: Debt - external"> Debt - external:</a> </div></td> <td align="right"> <a href="../fields/2079.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">$87 million (2008 est.)</div> <span class="category" style="padding-left:7px;">country comparison to the world:</span> <span class="category_data"> <a href="../rankorder/2079rank.html?countryname=Marshall Islands&countrycode=rm&regionCode=aus&rank=190#rm" onMouseDown="" title="Country comparison to the world" alt="Country comparison to the world"> 190 </a> </span> <div class="category_data" style="padding-top: 3px;">$86.5 million (FY99/00 est.) </div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2076&alphaletter=E&term=Exchange rates" title="Notes and Definitions: Exchange rates"> Exchange rates:</a> </div></td> <td align="right"> <a href="../fields/2076.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">the US dollar is used</div> <tr> <td class="category_data" style="padding-bottom: 5px;"></td> </tr> </table> </ul> </div> </div> <script src="jClocksGMT-master/js/jClocksGMT.js"></script> <script src="jClocksGMT-master/js/jquery.rotate.js"></script> <link rel="stylesheet" href="jClocksGMT-master/css/jClocksGMT.css"> </div> <script src="jClocksGMT-master/js/jClocksGMT.js"></script> <script src="jClocksGMT-master/js/jquery.rotate.js"></script> <link rel="stylesheet" href="jClocksGMT-master/css/jClocksGMT.css"> <script> $(document).ready(function() { $('[id^="CollapsiblePanel1"] h2').css({'background-color':'#cce0eb',"border-bottom":"2px solid white","cursor":"pointer"}); // aus }); </script> <div id="CollapsiblePanel1_Comm" class="CollapsiblePanel" style="width:100%; "> <div class="wrapper"> <h2 class="question question-back" ccode="rm" sectiontitle="Communications"><a href="javascript:void();">Communications</span> ::</span><span class="region">Marshall Islands</span></a></h2> <div class="answer" align="left"> <div class="box" style="padding: 0px; margin: 0px;"> <ul style="text-align: left;padding: 0px;margin: 0px;width: 100%;"> <table border="0" cellspacing="0" cellpadding="0" style="width: 100%;"> <tr class="aus_light" > <td width="450" height="20"><div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2150&alphaletter=T&term=Telephones - main lines in use" title="Notes and Definitions: Telephones - main lines in use"> Telephones - main lines in use</a>: </div></td> <td align="right"> <a href="../fields/2150.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"> <img src="../graphics/field_listing_on.gif" border="0" style="text-decoration:none;"> </a> </tr> <tr> <td id="data" colspan="2" style="vertical-align:middle;"> <div class="category_data">4,400 (2010)</div> <span class="category" style="padding-left:7px;">country comparison to the world:</span> <span class="category_data"> <a href="../rankorder/2150rank.html?countryname=Marshall Islands&countrycode=rm&regionCode=aus&rank=212#rm212" onMouseDown="" title="Country comparison to the world" alt="Country comparison to the world">212</a> </span> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2151&alphaletter=T&term=Telephones - mobile cellular" title="Notes and Definitions: Telephones - mobile cellular"> Telephones - mobile cellular:</a> </div></td> <td align="right"> <a href="../fields/2151.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">3,800 (2010)</div> <span class="category" style="padding-left:7px;">country comparison to the world:</span> <span class="category_data"> <a href="../rankorder/2151rank.html?countryname=Marshall Islands&countrycode=rm&regionCode=aus&rank=215#rm" onMouseDown="" title="Country comparison to the world" alt="Country comparison to the world"> 215 </a> </span> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2124&alphaletter=T&term=Telephone system" title="Notes and Definitions: Telephone system"> Telephone system:</a> </div></td> <td align="right"> <a href="../fields/2124.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category" style="padding-top: 2px;"> general assessment: <span class="category_data" style="font-weight:normal; vertical-align:bottom;">digital switching equipment; modern services include telex, cellular, Internet, international calling, caller ID, and leased data circuits</span></div> <div class="category" style="padding-top: 2px;"> domestic: <span class="category_data" style="font-weight:normal; vertical-align:top;">Majuro Atoll and Ebeye and Kwajalein islands have regular, seven-digit, direct-dial telephones; other islands interconnected by high frequency radiotelephone (used mostly for government purposes) and mini-satellite telephones </span></div> <div class="category" style="padding-top: 2px;"> international: <span class="category_data" style="font-weight:normal; vertical-align:top;">country code - 692; satellite earth stations - 2 Intelsat (Pacific Ocean); US Government satellite communications system on Kwajalein (2005) </span></div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2213&alphaletter=B&term=Broadcast media" title="Notes and Definitions: Broadcast media"> Broadcast media:</a> </div></td> <td align="right"> <a href="../fields/2213.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">no TV broadcast station; a cable network is available on Majuro with programming via videotape replay and satellite relays; 4 radio broadcast stations; American Armed Forces Radio and Television Service (AFRTS) provides satellite radio and television service to Kwajalein Atoll (2009)</div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2154&alphaletter=I&term=Internet country code" title="Notes and Definitions: Internet country code"> Internet country code:</a> </div></td> <td align="right"> <a href="../fields/2154.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">.mh</div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2184&alphaletter=I&term=Internet hosts" title="Notes and Definitions: Internet hosts"> Internet hosts:</a> </div></td> <td align="right"> <a href="../fields/2184.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">3 (2012)</div> <span class="category" style="padding-left:7px;">country comparison to the world:</span> <span class="category_data"> <a href="../rankorder/2184rank.html?countryname=Marshall Islands&countrycode=rm&regionCode=aus&rank=232#rm" onMouseDown="" title="Country comparison to the world" alt="Country comparison to the world"> 232 </a> </span> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2153&alphaletter=I&term=Internet users" title="Notes and Definitions: Internet users"> Internet users:</a> </div></td> <td align="right"> <a href="../fields/2153.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">2,200 (2009)</div> <span class="category" style="padding-left:7px;">country comparison to the world:</span> <span class="category_data"> <a href="../rankorder/2153rank.html?countryname=Marshall Islands&countrycode=rm&regionCode=aus&rank=210#rm" onMouseDown="" title="Country comparison to the world" alt="Country comparison to the world"> 210 </a> </span> <tr> <td class="category_data" style="padding-bottom: 5px;"></td> </tr> </table> </ul> </div> </div> <script src="jClocksGMT-master/js/jClocksGMT.js"></script> <script src="jClocksGMT-master/js/jquery.rotate.js"></script> <link rel="stylesheet" href="jClocksGMT-master/css/jClocksGMT.css"> <script> $(document).ready(function() { $('[id^="CollapsiblePanel1"] h2').css({'background-color':'#cce0eb',"border-bottom":"2px solid white","cursor":"pointer"}); // aus }); </script> <div id="CollapsiblePanel1_Trans" class="CollapsiblePanel" style="width:100%; "> <div class="wrapper"> <h2 class="question question-back" ccode="rm" sectiontitle="Transportation"><a href="javascript:void();">Transportation</span> ::</span><span class="region">Marshall Islands</span></a></h2> <div class="answer" align="left"> <div class="box" style="padding: 0px; margin: 0px;"> <ul style="text-align: left;padding: 0px;margin: 0px;width: 100%;"> <table border="0" cellspacing="0" cellpadding="0" style="width: 100%;"> <tr class="aus_light" > <td width="450" height="20"><div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2053&alphaletter=A&term=Airports" title="Notes and Definitions: Airports"> Airports</a>: </div></td> <td align="right"> <a href="../fields/2053.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"> <img src="../graphics/field_listing_on.gif" border="0" style="text-decoration:none;"> </a> </tr> <tr> <td id="data" colspan="2" style="vertical-align:middle;"> <div class="category_data">15 (2013)</div> <span class="category" style="padding-left:7px;">country comparison to the world:</span> <span class="category_data"> <a href="../rankorder/2053rank.html?countryname=Marshall Islands&countrycode=rm&regionCode=aus&rank=146#rm146" onMouseDown="" title="Country comparison to the world" alt="Country comparison to the world">146</a> </span> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2030&alphaletter=A&term=Airports - with paved runways" title="Notes and Definitions: Airports - with paved runways"> Airports - with paved runways:</a> </div></td> <td align="right"> <a href="../fields/2030.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category" style="padding-top: 2px;"> total: <span class="category_data" style="font-weight:normal; vertical-align:bottom;">4</span></div> <div class="category" style="padding-top: 2px;"> 1,524 to 2,437 m: <span class="category_data" style="font-weight:normal; vertical-align:top;">3 </span></div> <div class="category" style="padding-top: 2px;"> 914 to 1,523 m: <span class="category_data" style="font-weight:normal; vertical-align:top;">1 (2013) </span></div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2031&alphaletter=A&term=Airports - with unpaved runways" title="Notes and Definitions: Airports - with unpaved runways"> Airports - with unpaved runways:</a> </div></td> <td align="right"> <a href="../fields/2031.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category" style="padding-top: 2px;"> total: <span class="category_data" style="font-weight:normal; vertical-align:bottom;">11</span></div> <div class="category" style="padding-top: 2px;"> 914 to 1,523 m: <span class="category_data" style="font-weight:normal; vertical-align:top;">10 </span></div> <div class="category" style="padding-top: 2px;"> under 914 m: <span class="category_data" style="font-weight:normal; vertical-align:top;"> </span></div> <div class="category_data" style="padding-top: 3px;">1 (2013) </div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2085&alphaletter=R&term=Roadways" title="Notes and Definitions: Roadways"> Roadways:</a> </div></td> <td align="right"> <a href="../fields/2085.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category" style="padding-top: 2px;"> total: <span class="category_data" style="font-weight:normal; vertical-align:bottom;">2,028 km (includes 75 km of expressways) (2007)</span></div> <span class="category" style="padding-left:7px;">country comparison to the world:</span> <span class="category_data"> <a href="../rankorder/2085rank.html?countryname=Marshall Islands&countrycode=rm&regionCode=aus&rank=175#rm" onMouseDown="" title="Country comparison to the world" alt="Country comparison to the world"> 175 </a> </span> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2108&alphaletter=M&term=Merchant marine" title="Notes and Definitions: Merchant marine"> Merchant marine:</a> </div></td> <td align="right"> <a href="../fields/2108.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category" style="padding-top: 2px;"> total: <span class="category_data" style="font-weight:normal; vertical-align:bottom;">1,593</span></div> <span class="category" style="padding-left:7px;">country comparison to the world:</span> <span class="category_data"> <a href="../rankorder/2108rank.html?countryname=Marshall Islands&countrycode=rm&regionCode=aus&rank=7#rm" onMouseDown="" title="Country comparison to the world" alt="Country comparison to the world"> 7 </a> </span> <div class="category" style="padding-top: 2px;"> by type: <span class="category_data" style="font-weight:normal; vertical-align:top;">barge carrier 1, bulk carrier 524, cargo 65, carrier 1, chemical tanker 351, container 226, liquefied gas 88, passenger 7, passenger/cargo 1, petroleum tanker 297, refrigerated cargo 13, roll on/roll off 9, vehicle carrier 10 </span></div> <div class="category" style="padding-top: 2px;"> foreign-owned: <span class="category_data" style="font-weight:normal; vertical-align:top;">1,468 (Belgium 1, Bermuda 35, Brazil 1, Canada 8, China 14, Croatia 12, Cyprus 40, Denmark 7, Egypt 1, France 7, Germany 248, Greece 408, Hong Kong 3, India 10, Indonesia 1, Iraq 2, Ireland 6, Italy 1, Japan 59, Jersey 11, Kuwait 2, Latvia 19, Malaysia 11, Mexico 2, Monaco 30, Netherlands 21, Norway 75, Pakistan 1, Qatar 29, Romania 2, Russia 5, Singapore 30, Slovenia 6, South Korea 41, Sweden 1, Switzerland 12, Taiwan 8, Turkey 70, UAE 12, UK 12, Ukraine 1, US 200) (2010) </span></div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2120&alphaletter=P&term=Ports and terminals" title="Notes and Definitions: Ports and terminals"> Ports and terminals:</a> </div></td> <td align="right"> <a href="../fields/2120.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category" style="padding-top: 2px;"> major seaport(s): <span class="category_data" style="font-weight:normal; vertical-align:bottom;">Enitwetak Island, Kwajalein, Majuro</span></div> <tr> <td class="category_data" style="padding-bottom: 5px;"></td> </tr> </table> </ul> </div> </div> <script src="jClocksGMT-master/js/jClocksGMT.js"></script> <script src="jClocksGMT-master/js/jquery.rotate.js"></script> <link rel="stylesheet" href="jClocksGMT-master/css/jClocksGMT.css"> <script> $(document).ready(function() { $('[id^="CollapsiblePanel1"] h2').css({'background-color':'#cce0eb',"border-bottom":"2px solid white","cursor":"pointer"}); // aus }); </script> <div id="CollapsiblePanel1_Military" class="CollapsiblePanel" style="width:100%; "> <div class="wrapper"> <h2 class="question question-back" ccode="rm" sectiontitle="Military"><a href="javascript:void();">Military</span> ::</span><span class="region">Marshall Islands</span></a></h2> <div class="answer" align="left"> <div class="box" style="padding: 0px; margin: 0px;"> <ul style="text-align: left;padding: 0px;margin: 0px;width: 100%;"> <table border="0" cellspacing="0" cellpadding="0" style="width: 100%;"> <tr class="aus_light" > <td width="450" height="20"><div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2055&alphaletter=M&term=Military branches" title="Notes and Definitions: Military branches"> Military branches</a>: </div></td> <td align="right"> <a href="../fields/2055.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"> <img src="../graphics/field_listing_on.gif" border="0" style="text-decoration:none;"> </a> </tr> <tr> <td id="data" colspan="2" style="vertical-align:middle;"> <div class="category_data">no regular military forces; Marshall Islands Police (2012)</div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2105&alphaletter=M&term=Manpower available for military service" title="Notes and Definitions: Manpower available for military service"> Manpower available for military service:</a> </div></td> <td align="right"> <a href="../fields/2105.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category" style="padding-top: 2px;"> males age 16-49: <span class="category_data" style="font-weight:normal; vertical-align:bottom;">16,446 (2010 est.)</span></div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2025&alphaletter=M&term=Manpower fit for military service" title="Notes and Definitions: Manpower fit for military service"> Manpower fit for military service:</a> </div></td> <td align="right"> <a href="../fields/2025.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category" style="padding-top: 2px;"> males age 16-49: <span class="category_data" style="font-weight:normal; vertical-align:bottom;">13,568</span></div> <div class="category" style="padding-top: 2px;"> females age 16-49: <span class="category_data" style="font-weight:normal; vertical-align:top;">13,606 (2010 est.) </span></div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2026&alphaletter=M&term=Manpower reaching militarily significant age annually" title="Notes and Definitions: Manpower reaching militarily significant age annually"> Manpower reaching militarily significant age annually:</a> </div></td> <td align="right"> <a href="../fields/2026.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category" style="padding-top: 2px;"> male: <span class="category_data" style="font-weight:normal; vertical-align:bottom;">653</span></div> <div class="category" style="padding-top: 2px;"> female: <span class="category_data" style="font-weight:normal; vertical-align:top;">631 (2010 est.) </span></div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2137&alphaletter=M&term=Military - note" title="Notes and Definitions: Military - note"> Military - note:</a> </div></td> <td align="right"> <a href="../fields/2137.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category_data">defense is the responsibility of the US</div> <tr> <td class="category_data" style="padding-bottom: 5px;"></td> </tr> </table> </ul> </div> </div> <script src="jClocksGMT-master/js/jClocksGMT.js"></script> <script src="jClocksGMT-master/js/jquery.rotate.js"></script> <link rel="stylesheet" href="jClocksGMT-master/css/jClocksGMT.css"> <script> $(document).ready(function() { $('[id^="CollapsiblePanel1"] h2').css({'background-color':'#cce0eb',"border-bottom":"2px solid white","cursor":"pointer"}); // aus }); </script> <div id="CollapsiblePanel1_Issues" class="CollapsiblePanel" style="width:100%; "> <div class="wrapper"> <h2 class="question question-back" ccode="rm" sectiontitle="Transnational Issues"><a href="javascript:void();">Transnational Issues</span> ::</span><span class="region">Marshall Islands</span></a></h2> <div class="answer" align="left"> <div class="box" style="padding: 0px; margin: 0px;"> <ul style="text-align: left;padding: 0px;margin: 0px;width: 100%;"> <table border="0" cellspacing="0" cellpadding="0" style="width: 100%;"> <tr class="aus_light" > <td width="450" height="20"><div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2070&alphaletter=D&term=Disputes - international" title="Notes and Definitions: Disputes - international"> Disputes - international</a>: </div></td> <td align="right"> <a href="../fields/2070.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"> <img src="../graphics/field_listing_on.gif" border="0" style="text-decoration:none;"> </a> </tr> <tr> <td id="data" colspan="2" style="vertical-align:middle;"> <div class="category_data">claims US territory of Wake Island</div> </td> </tr> <tr> <td height="10"></td> </tr> <tr class="aus_light"> <td width="450" height="20"> <div class="category" style="padding-left:5px;" id="field"> <a href="../docs/notesanddefs.html?fieldkey=2196&alphaletter=T&term=Trafficking in persons" title="Notes and Definitions: Trafficking in persons"> Trafficking in persons:</a> </div></td> <td align="right"> <a href="../fields/2196.html#rm" title="<img src = '../graphics/field_listing_tooltip.gif'>"><img src="../graphics/field_listing_on.gif" border="0" ></a> </td> </tr> <tr height="22"> <td colspan="2" id="data"> <div class="category" style="padding-top: 2px;"> current situation: <span class="category_data" style="font-weight:normal; vertical-align:bottom;">The Marshall Islands are a destination country for women from East Asia subjected to sex trafficking; foreign women are reportedly forced into prostitution in bars frequented by crew members of fishing vessels; some Chinese women are recruited to the Marshall Islands with promises of legitimate work and are subsequently forced into prostitution</span></div> <div class="category" style="padding-top: 2px;"> tier rating: <span class="category_data" style="font-weight:normal; vertical-align:top;">Tier 2 Watch List - The Marshall Islands do not fully comply with the minimum standards for the elimination of trafficking; however, it is making significant efforts to do so; the government has not identified any victims, investigated any trafficking cases, or prosecuted any offenders under the country's 2011 anti-trafficking law; the government also has no mechanism in place to ensure that trafficking victims receive access to legal, medical, or psychological services; no public awareness campaigns on the dangers of human trafficking have been undertaken (2013) </span></div> <tr> <td class="category_data" style="padding-bottom: 5px;"></td> </tr> </table> </ul> </div> </div> <div class="wrapper"> <div style="float:right; margin-top: 0px;" class="expand_all"> <a href="javascript:void(0)" class="expand">EXPAND ALL</a><a href="javascript:void(0)" class="collapse" style="display: none;">COLLAPSE ALL</a> </div> </div> <div id="flagDialog" style="display: none" title="The World Factbook"></div> <div id="photoDialogWindow" style="display:none;" title="The World Factbook"> </div> <!-- InstanceEndEditable --> </td> </tr> <tr> <td style="height:75px;">&nbsp;</td> </tr> </table> </div> </div> </article> </div> </div> </section> <footer id="footer"><span class="divider"></span> <a href="#" class="logo-2"><img src="../images/logo-2.png" alt="Central Intelligence Agency"></a> <div class="footer-holder"> <div class="footer-frame"> <nav class="footer-nav"><div class="info-block"> <h3><a href="/about-cia">About CIA</a></h3> <ul><li> <a href="/about-cia/todays-cia">Today's CIA</a> </li> <li> <a href="/about-cia/leadership">Leadership</a> </li> <li> <a href="/about-cia/cia-vision-mission-values">CIA Vision, Mission &amp; Values</a> </li> <li> <a href="/about-cia/headquarters-tour">Headquarters Tour</a> </li> <li> <a href="/about-cia/cia-museum">CIA Museum</a> </li> <li> <a href="/about-cia/history-of-the-cia">History of the CIA</a> </li> <li> <a href="/about-cia/faqs">FAQs</a> </li> <li> <a href="/about-cia/no-fear-act">NoFEAR Act</a> </li> <li> <a href="/about-cia/site-policies">Site Policies</a> </li> </ul></div> <div class="info-block"> <h3><a href="/careers">Careers &amp; Internships</a></h3> <ul><li> <a href="/careers/opportunities">Career Opportunities </a> </li> <li> <a href="/careers/student-opportunities">Student Opportunities</a> </li> <li> <a href="/careers/application-process">Application Process</a> </li> <li> <a href="/careers/life-at-cia">Life at CIA</a> </li> <li> <a href="/careers/diversity">Diversity</a> </li> <li> <a href="/careers/military-transition">Military Transition</a> </li> <li> <a href="/careers/games-information">Diversions &amp; Information</a> </li> <li> <a href="/careers/faq">FAQs</a> </li> </ul><h3><a href="/offices-of-cia">Offices of CIA</a></h3> <ul><li> <a href="/offices-of-cia/intelligence-analysis">Intelligence &amp; Analysis</a> </li> <li> <a href="/offices-of-cia/clandestine-service">Clandestine Service</a> </li> <li> <a href="/offices-of-cia/science-technology">Science &amp; Technology</a> </li> <li> <a href="/offices-of-cia/mission-support">Support to Mission</a> </li> <li> <a href="/offices-of-cia/human-resources">Human Resources</a> </li> <li> <a href="/offices-of-cia/public-affairs">Public Affairs</a> </li> <li> <a href="/offices-of-cia/general-counsel">General Counsel</a> </li> <li> <a href="/offices-of-cia/equal-employment-opportunity">Equal Employment Opportunity</a> </li> <li> <a href="/offices-of-cia/congressional-affairs">Congressional Affairs</a> </li> <li> <a href="/offices-of-cia/inspector-general">Inspector General</a> </li> <li> <a href="/offices-of-cia/military-affairs">Military Affairs</a> </li> </ul></div> <div class="info-block"> <h3><a href="/news-information">News &amp; Information</a></h3> <ul><li> <a href="/news-information/press-releases-statements">Press Releases &amp; Statements</a> </li> <li> <a href="/news-information/speeches-testimony">Speeches &amp; Testimony</a> </li> <li> <a href="/news-information/cia-the-war-on-terrorism">CIA &amp; the War on Terrorism</a> </li> <li> <a href="/news-information/featured-story-archive">Featured Story Archive</a> </li> <li> <a href="/news-information/Whats-New-on-CIAgov">What&#8217;s New Archive</a> </li> <li> <a href="/news-information/your-news">Your News</a> </li> </ul><h3><a href="/library">Library</a></h3> <ul><li> <a href="/library/publications">Publications</a> </li> <li> <a href="/library/center-for-the-study-of-intelligence">Center for the Study of Intelligence</a> </li> <li> <a href="/library/foia">Freedom of Information Act Electronic Reading Room</a> </li> <li> <a href="/library/kent-center-occasional-papers">Kent Center Occasional Papers</a> </li> <li> <a href="/library/intelligence-literature">Intelligence Literature</a> </li> <li> <a href="/library/reports">Reports</a> </li> <li> <a href="/library/related-links.html">Related Links</a> </li> <li> <a href="/library/video-center">Video Center</a> </li> </ul></div> <div class="info-block add"> <h3><a href="/kids-page">Kids' Zone</a></h3> <ul><li> <a href="/kids-page/k-5th-grade">K-5th Grade</a> </li> <li> <a href="/kids-page/6-12th-grade">6-12th Grade</a> </li> <li> <a href="/kids-page/parents-teachers">Parents &amp; Teachers</a> </li> <li> <a href="/kids-page/games">Games</a> </li> <li> <a href="/kids-page/related-links">Related Links</a> </li> <li> <a href="/kids-page/privacy-statement">Privacy Statement</a> </li> </ul><h3><a href="/contact-cia">Connect with CIA</a></h3> <ul class="socials-list"><li><a href="http://www.youtube.com/user/ciagov">CIA YouTube</a></li> <li><a class="social-2" href="http://www.flickr.com/photos/ciagov">CIA Flickr PhotoStream</a></li> <li><a class="social-3" href="/news-information/your-news">RSS</a></li> <li><a class="social-4" href="/contact-cia">Contact Us</a></li> </ul></div> </nav><div id="plugins" class="info-panel"> <h4>* Required plugins</h4> <ul><li data-plugin="swf"><a href="http://get.adobe.com/flashplayer/">Adobe&#174; Flash Player</a></li> <li data-plugin="pdf"><a href="http://get.adobe.com/reader/">Adobe&#174; Reader&#174;</a></li> <li data-plugin="doc"><a href="http://www.microsoft.com/en-us/download/details.aspx?id=4">MS Word Viewer</a></li> </ul></div> </div> </div> </footer> </div> <div class="footer-panel" style="width: 990px;" align="center"> <nav class="sub-nav" style="width: 100%; text-align: center;" > <h3 class="visuallyhidden">Footer Navigation</h3> <ul> <li><a href="/about-cia/site-policies/#privacy-notice" title="Site Policies">Privacy</a></li> <li><a href="/about-cia/site-policies/#copy" title="Site Policies">Copyright</a></li> <li><a href="/about-cia/site-policies/" title="Site Policies">Site Policies</a></li> <li><a href="http://www.usa.gov/">USA.gov</a></li> <li><a href="http://www.foia.cia.gov/">FOIA</a></li> <li><a href="http://www.dni.gov/">DNI.gov</a></li> <li><a href="/about-cia/no-fear-act/" title="No FEAR Act">NoFEAR Act</a></li> <li><a href="/offices-of-cia/inspector-general/">Inspector General</a></li> <li><a href="/mobile/">Mobile Site</a></li> <li><a href="/contact-cia/">Contact CIA</a></li> <li><a href="/sitemap.html">Site Map</a></li> </ul> <div style="width: 100%;" align="center"><a href="/open/" ><img src="../images/ico-06.png" width="101" height="24" alt="open gov"></a></div> </nav> </div> <a href="#" class="go-top">GO TOP</a> <script> $(document).ready(function() { // Show or hide the sticky footer button $(window).scroll(function() { if ($(this).scrollTop() > 350) { $('.go-top').fadeIn(100); } else { $('.go-top').fadeOut(100); } }); // Animate the scroll to top $('.go-top').click(function(event) { event.preventDefault(); $('html, body').animate({scrollTop: 350}, 300); }) }); </script> </body> <!-- InstanceEnd --></html>
Focom/NLPWork1
Part1/factbook/geos/rm.html
HTML
mit
218,452
# Research Methods # I spent [] hours on this challenge. i_want_pets = ["I", "want", 3, "pets", "but", "only", "have", 2] my_family_pets_ages = {"Evi" => 6, "Ditto" => 3, "Hoobie" => 3, "George" => 12, "Bogart" => 4, "Poly" => 4, "Annabelle" => 0} # Person 1's solution def my_array_finding_method(source, thing_to_find) source # This line is here to make sure all tests initially fail. Delete it when you begin coding. end def my_hash_finding_method(source, thing_to_find) source # This line is here to make sure all tests initially fail. Delete it when you begin coding. end # Identify and describe the Ruby method(s) you implemented. # # # # Person 2 # Input: source array, change to make # Output: permanently changed source array # Steps # 1. find location of integers in array # 2. IF element (at a location in array) is an integer # 3. (THEN) add change to element (at that location) # 4. return array def my_array_modification_method!(source, thing_to_modify) source.each_index do |x| if source.at(x).is_a?(Integer) source[x] = source[x] + thing_to_modify end end source end # Input: source hash, change to make # Output: permanently changed source array # Steps # 1. access values in hash # 2. apply change to each value in hash # 3. return hash def my_hash_modification_method!(source, thing_to_modify) source.each_pair { |key, value| source[key] = value + thing_to_modify} return source end # Identify and describe the Ruby method(s) you implemented. # For the array method: # I iterated through the indices of the array using `.at(index)`, # and used the `.is_a?(ObjectType)` to determine if the array # element at each index was an Integer. (You can also use # `is_a?()` on other objects, Strings, Arrays, Hashes.) # For the hash method: # I used the iterator `.each_pair` (just like `.each`, but # takes two parameters— one for the key and one for value) # to access each key-value pair in the pets hash, and added # the modifying argument to the value (using the parameter # for value). # For reading through the Ruby Docs: # GOOD LUCK. Ugh. Seriously, the docs are so dense and # unhelpfully arranged/explained. It took me a good hour into # this challenge to remember/figure out that you can use all the # Object methods on Arrays, Hashes, Strings, whatever, so the # toolbox widened considerably. (Link just in case: # http://ruby-doc.org/core-2.2.3/Object.html) I also had better # luck understanding how other built-in methods work when bloggers # explained it. Here are a few blogs I learned from: # http://www.globalnerdy.com/tag/enumerating-enumerable/ & # http://www.eriktrautman.com/posts?tag_filter=Ruby+Explained # Person 3 def my_array_sorting_method(source) source # This line is here to make sure all tests initially fail. Delete it when you begin coding. end def my_hash_sorting_method(source) source # This line is here to make sure all tests initially fail. Delete it when you begin coding. end # Identify and describe the Ruby method(s) you implemented. # # # # Person 4 def my_array_deletion_method!(source, thing_to_delete) source.dup # This line is here to make sure all tests initially fail. Delete it when you begin coding. end def my_hash_deletion_method!(source, thing_to_delete) source.dup # This line is here to make sure all tests initially fail. Delete it when you begin coding. end # Identify and describe the Ruby method(s) you implemented. # # # # Person 5 def my_array_splitting_method(source) source # This line is here to make sure all tests initially fail. Delete it when you begin coding. end def my_hash_splitting_method(source, age) source # This line is here to make sure all tests initially fail. Delete it when you begin coding. end # Identify and describe the Ruby method(s) you implemented. # # # # Release 1: Identify and describe the Ruby method you implemented. Teach your # accountability group how to use the methods. # # # # Release 3: Reflect! # What did you learn about researching and explaining your research to others? # # # #
kenworthyc/phase-0
week-5/group-research-methods/my_solution.rb
Ruby
mit
4,078
@extends('layouts.master') @section('content') <div id="wrapper" class="toggled"> <div id="sidebar-wrapper"> <div class="profile"> @if (Storage::disk('local')->has($user_id . '.jpg')) <img src="{{ route('account.image', ['filename' => $user_id . '.jpg']) }}" alt="" class="img-profile"> @else <img src="{{ route('account.image', ['filename' => 'no-pic.jpg']) }}" alt="" class="img-profile"> @endif <br /> <h1> {{ $user_name = DB::table('users')->where('id', $user_id)->first()->first_name }} </h1> </div> </div> <div id="page-content-wrapper"> @include('includes.message-block') @if(Auth::user()->id == $user_id) <section class="row new-post"> <div class="col-md-8 col-md-offset-1"> <header><h3>What do you have to say?</h3></header> <form action="{{ route('post.create') }}" method="post"> <div class="form-group"> <textarea class="form-control" name="body" id="new-post" rows="3" placeholder="Your Post"></textarea> </div> <button type="submit" class="btn btn-primary">Create Post</button> <input type="hidden" value="{{ Session::token() }}" name="_token"> </form> </div> </section> @endif <section class="row posts"> <div class="col-md-8 col-md-offset-1"> @if($posts->count() != 0) <header><h3>Posts</h3></header> @foreach($posts as $post) <article class="post" data-postid="{{ $post->id }}"> @if (Storage::disk('local')->has($post->user->id . '.jpg')) <img src="{{ route('account.image', ['filename' => $post->user->id . '.jpg']) }}" alt="" class="img-post"> @else <img src="{{ route('account.image', ['filename' => 'no-pic.jpg']) }}" alt="" class="img-post"> @endif <div class="margin60"> <p>{{ $post->body }}</p> <div class="info"> Posted by {{ $post->user->first_name }} on {{ $post->created_at }} </div> <div class="interaction"> <div> {{ DB::table('likes')->where([['post_id', $post->id],['like', 1]])->count() }} likes this post.<br /> </div> <a href="#" class="like">{{ Auth::user()->likes()->where('post_id', $post->id)->first() ? Auth::user()->likes()->where('post_id', $post->id)->first()->like == 1 ? 'Dislike' : 'Like' : 'Like' }}</a> @if(Auth::user() == $post->user) | <a href="#" class="edit">Edit</a> | <a href="{{ route('post.delete', ['post_id' => $post->id]) }}">Delete</a> @endif </div> <hr /> <div class="comments"> @foreach ($comments as $comment) @if($post->id == $comment->post_id) <div class="comment"> @if (Storage::disk('local')->has($comment->user->id . '.jpg')) <img src="{{ route('account.image', ['filename' => $comment->user->id . '.jpg']) }}" alt="" class="img-comment"> @else <img src="{{ route('account.image', ['filename' => 'no-pic.jpg']) }}" alt="" class="img-comment"> @endif <a href="{{ route('userpage', ['user_id' => $comment->user->id]) }}">{{ $comment->user->first_name }}</a> <p>{{ $comment->comment}}</p> <div class="info"> at {{ $comment->created_at }} </div> </div> @endif @endforeach </div> <form action="{{ route('comment.create') }}" method="post"> <div class="input-group"> <input class="form-control" type="text" name="comment" id="new-comment" /> <span class="input-group-btn"><button type="submit" class="btn btn-primary">Comment</button></span> </div> <input type="hidden" value="{{ $post->id}}" name="c_post_id"/> <input type="hidden" value="{{ Session::token() }}" name="_token"> </form> </div> </article> @endforeach @else <header><h3>No posts yet..</h3></header> @endif </div> </section> </div> <div class="modal fade" tabindex="-1" role="dialog" id="edit-modal"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button> <h4 class="modal-title">Edit Post</h4> </div> <div class="modal-body"> <form> <div class="form-group"> <label for="post-body">Edit the Post</label> <textarea class="form-control" name="post-body" id="post-body" rows="5"></textarea> </div> </form> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> <button type="button" class="btn btn-primary" id="modal-save">Save changes</button> </div> </div><!-- /.modal-content --> </div><!-- /.modal-dialog --> </div><!-- /.modal --> <script> var urlEdit = '{{ route('edit') }}'; var urlLike = '{{ route('like') }}'; </script> </div> @endsection
AshrafAlAskari/SocialNetwork
resources/views/userpage.blade.php
PHP
mit
6,781
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>Get With Git - Refresh Wichita Falls - refreshwichitafalls.com</title> <meta name="description" content="RefreshWF May 21, 2012 Presentation - Get With Git by Jorin Slaybaugh."> <meta name="author" content="Jorin Slaybaugh"> <meta name="apple-mobile-web-app-capable" content="yes" /> <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" /> <link href='http://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic' rel='stylesheet' type='text/css'> <link rel="stylesheet" href="css/reset.css"> <link rel="stylesheet" href="css/main.css"> <link rel="stylesheet" href="css/print.css" type="text/css" media="print"> <link rel="stylesheet" href="lib/zenburn.css"> <link rel="stylesheet" href="css/show.css" /> </head> <body> <div id="reveal"> <!-- Used to fade in a background when a specific slide state is reached --> <div class="state-background"></div> <!-- Any section element inside of this container is displayed as a slide --> <div class="slides"> <section> <h1>Get with Git</h1> <h2>An Intro to Distributed Version Control and why you should use it.</h2> <p class="fragment">- or -<br />&nbsp;</p> <h2 class="fragment">How I learned to stop worrying and love branching.</h2> <i><small>Jorin Slaybaugh - Refresh Wichita Falls - May 21, 2012</small></i> </section> <section> <h2>Who am I</h2> <ul> <li class="fragment">VP of Technology at E-vent Software</li> <li class="fragment">Live and work in Wichita Falls</li> <li class="fragment">Graduated from MSU in 2002</li> <li class="fragment">.NET | SQL | Windows</li> <li class="fragment">HTML | CSS | JavaScript</li> <li class="fragment">Twitter: <a href="http://twitter.com/jslaybaugh" target="_blank">@jslaybaugh</a></li> <li class="fragment">Email: <a href="mailto:jslaybaugh@gmail.com" target="_blank">jslaybaugh@gmail.com</a></li> <li class="fragment">Blog: <a href="http://cacheandquery.com" target="_blank">cacheandquery.com</a></li> <li class="fragment">All the rest: <a href="http://flavors.me/jslaybaugh" target="_blank">flavors.me/jslaybaugh</a></li> </ul> </section> <section> <h2>Disclaimers</h2> <p class="fragment"><img src="http://d.pr/i/lU5+" height="230" /></p> <p class="fragment">Just a brief introduction</p> <p class="fragment">First (and most common) commands/concepts are simple</p> <p class="fragment">Steep learning curve after that</p> <p class="fragment">I am NOT an expert</p> </section> <!-- Example of nested vertical slides --> <section> <section> <h2>Brief History of Git</h2> <p class="fragment">Created in 2005 by Linus Torvalds</p> <img class="fragment" src="assets/img/linus.jpg" /> <img class="fragment" src="assets/img/penguin.jpg" /> </section> <section> <h2>Why?</h2> <p class="fragment">Working on Linux kernel and needed better version control system than what they were using (BitKeeper). So, if it doesn't exist (and you're Linus Torvalds), you create it yourself.</p> <p class="fragment">Had been using tarballs and patches so he built the system around a similar concept: snapshots of a point in time stored as binary objects in directory.</p> <p class="fragment">Finished the code in less than a month and 1.0 was released later that year (only on version 1.7 in 2012)</p> </section> <section> <h2>Purposes</h2> <h3 class="fragment">Need to be able to incrementally advance<br />(and roll back) projects</h3> <p class="fragment">Good ol' Copy & Paste</p> <p class="fragment">Subversion, SourceSafe, TFS</p> <p>&nbsp;</p> <h3 class="fragment">Need to work with a team</h3> <p class="fragment">Every person has full copy of repository</p> <p class="fragment">Mercurial (Hg) is similar to Git</p> </section> <section> <h2>Is this really that important?</h2> <p>&nbsp;</p> <div class="fragment"> <blockquote>This is too important to miss out on. This is possibly the biggest advance in software development technology in ten years...</blockquote> <small><br />- Joel Spolsky, Co-founder of StackOverflow, 2010</small> </div> <p>&nbsp;</p> <h3 class="fragment">Oh... OK. Where do we start?</h3> </section> <section data-state="rainbow"> <p><img src="assets/img/mostinteresting.png" /></p> <p>Don't be afraid of the command line!</p> </section> <section> <h2>A few more things:</h2> <p>&nbsp;</p> <p>Not going to go through the git installation procedure becuase its slightly different for each OS and there really isn't time in this presentation, but there are very good directions <a href="http://help.github.com/win-set-up-git/" target="_blank">here</a> (for Windows) and <a href="http://help.github.com/mac-set-up-git/" target="_blank">here</a> (for Mac).</p> <p>&nbsp;</p> <ul> <li>Unix-style BASH</li> <li>GUI Shell Extensions</li> <li>TortoiseGit</li> </ul> </section> <section> <h2>It's <del>Peanut Butter Jelly</del><br />Example Time!</h2> <p>&nbsp;</p> <p><img src="http://i0.kym-cdn.com/entries/icons/original/000/000/188/DancingBannana.gif" /></p> </section> </section> <section> <section> <h2>GitHub</h2> <p><a href="http://octodex.github.com" target="_blank"><img src="http://octodex.github.com/images/original.jpg" height="400" /></a></p> </section> <section> <h2>So, Git is cool! But, what is GitHub?</h2> <ul class="fragment"> <li>Hosted git repositories for everyone!</li> <li>Original Slogan: <q>Git hosting: no longer a pain in the ass</q></li> <li><a href="https://github.com/plans" target="_blank">Free for open source, affordable for closed projects</a></li> <li>Founded in 2008. As of February 2012, 1.3+ million users and 2+ million repositories</li> <li>3 founders in 2008. 8 employees in 2010. 70+ employees right now. NO venture capital.</li> <li><a href="https://gist.github.com/" target="_blank">Gists</a>, <a href="http://pages.github.com/" target="_blank">Project Pages</a>, Issues, <a href="http://mac.github.com/" target="_blank">GitHub for Mac</a>, <a href="http://windows.github.com/" target="_blank">GitHub for Windows</a>, Watching Repo's, and more...</li> </ul> </section> <section> <h2>It's <del>Peanut Butter Jelly</del><br />Example Time!</h2> <p>&nbsp;</p> <p><img src="http://i0.kym-cdn.com/entries/icons/original/000/000/188/DancingBannana.gif" /></p> </section> <section> <h2>Cool Open Source Projects<br />Available on GitHub</h2> <ul class="fragment"> <li><a href="https://github.com/jquery/jquery" target="_blank">jQuery</a></li> <li><a href="https://github.com/twitter/bootstrap/" target="_blank">Twitter Bootstrap</a></li> <li><a href="https://github.com/mirrors/linux" target="_blank">Linux</a></li> <li><a href="https://github.com/rails/rails" target="_blank">Rails</a></li> <li><a href="https://github.com/git/git" target="_blank">Git</a></li> <li><a href="https://github.com/refreshwf" target="_blank">Refresh Wichita Falls</a></li> <li><a href="https://github.com/hakimel/reveal.js" target="_blank">reveal.js</a></li> <li><a href="https://github.com/repositories" target="_blank">So many more...</a></li> </ul> </section> <section> <h2>Should I/my code be on GitHub?</h2> <p class="fragment">Do you like having complete, versioned, accessible code automatically backed up to the cloud?</p> <p class="fragment">Do you work on multiple machines?</p> <p class="fragment">Do you work with anyone else?</p> <p class="fragment">Do you want a job?<br /><img src="http://d.pr/i/y97o+" /></p> </section> <section> <h2>The future & Applications</h2> <blockquote>Ryan Blair, a technologist with the New York State Senate, thinks it could even give citizens a way to fork the law &#151; proposing their own amendments to elected officials. A tool like GitHub could also make it easier for constituents to track and even voice their opinions on changes to complex legal code. <q>When you really think about it, a bill is a branch of the law,</q> he says. <q>I'm just in love with the idea of a constituent being able to send their state senator a pull request.</q></blockquote> <small> - <a href="http://www.wired.com/wiredenterprise/2012/02/github/all/1" target="_blank"><q>Lord of the Files</q>, Wired Magazine 2012</a></small> </section> </section> <section> <h2>Personal Experience - Stripe.net</h2> <ul class="fragment"> <li>Found an <a href="https://github.com/jaymedavis/stripe.net" target="_blank">awesome library</a></li> <li>Needed to be finished, so I forked and submitted pull request</li> <li>Needed my own bit of <a href="https://github.com/jslaybaugh/stripe.net/tree/live-test" target="_blank">personal awesome</a></li> <li>Jayme rejected my suggestion :-(</li> <li>Can still pull in upstream changes from original repo!</li> </ul> </section> <section> <h2>Fun</h2> <p>&nbsp;</p> <h2><a href="http://www.heroku.com/" target="_blank">Heroku</a> + <a href="http://hubot.github.com/" target="_blank">Hubot</a> + <a href="http://hipchat.com" target="_blank">HipChat</a></h2> </section> <section> <h2>Want to Learn More?</h2> <ul> <li><a href="http://help.github.com/" target="_blank">GitHub Help</a> - FREE</li> <li><a href="http://git-scm.com/" target="_blank">Git Project Homepage</a> - FREE</li> <li><a href="http://www.amazon.com/gp/product/1430218339?ie=UTF8&tag=prgi-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=1430218339" target="_blank">Pro Git</a> - Book By Scott Chacon (CIO of GitHub) - $20</li> <li><a href="http://tekpub.com/productions/git" target="_blank">Tekpub</a> - 3 hours video $15</li> <li><a href="https://github.com/crane-west/cwGuides/blob/master/git-standards.md#git-resources" target="_blank">Git Standards/Resources</a> - Crane | West - FREE</li> </ul> </section> <section data-state="thats-all-folks"> <h3 class="final">Thanks for your time!<br />Questions? Comments?</h3> </section> </div> <aside class="logo"></aside> <!-- The navigational controls UI --> <aside class="controls"> <a class="left" href="#">&#x25C4;</a> <a class="right" href="#">&#x25BA;</a> <a class="up" href="#">&#x25B2;</a> <a class="down" href="#">&#x25BC;</a> </aside> <!-- Displays presentation progress, max value changes via JS to reflect # of slides --> <div class="progress"><span></span></div> </div> <script src="js/reveal.js"></script> <!-- Optional libraries for code syntax highlighting and classList support in IE9 --> <script src="lib/highlight.js"></script> <script src="lib/classList.js"></script> <script> // Parse the query string into a key/value object var query = {}; location.search.replace( /[A-Z0-9]+?=(\w*)/gi, function(a) { query[ a.split( '=' ).shift() ] = a.split( '=' ).pop(); } ); // Fires when a slide with data-state=customevent is activated Reveal.addEventListener( 'customevent', function() { alert( '"customevent" has fired' ); } ); // Fires each time a new slide is activated Reveal.addEventListener( 'slidechanged', function( event ) { // event.indexh & event.indexv } ); Reveal.initialize({ // Display controls in the bottom right corner controls: true, // Display a presentation progress bar progress: true, // If true; each slide will be pushed to the browser history history: true, // Loops the presentation, defaults to false loop: false, // Flags if mouse wheel navigation should be enabled mouseWheel: true, // Apply a 3D roll to links on hover rollingLinks: true, // UI style theme: query.theme || 'default', // default/neon // Transition style transition: query.transition || 'default' // default/cube/page/concave/linear(2d) }); hljs.initHighlightingOnLoad(); </script> </body> </html>
refreshwf/GetWithGitShow
index.html
HTML
mit
12,578
package br.gov.servicos.servico.publicoAlvo; import br.gov.servicos.busca.Buscador; import br.gov.servicos.cms.Conteudo; import lombok.experimental.FieldDefaults; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.runners.MockitoJUnitRunner; import static br.gov.servicos.fixtures.TestData.SERVICO; import static java.util.Arrays.asList; import static java.util.Collections.singletonList; import static java.util.Optional.of; import static lombok.AccessLevel.PRIVATE; import static org.mockito.Mockito.doReturn; import static org.springframework.test.web.ModelAndViewAssert.assertModelAttributeValue; import static org.springframework.test.web.ModelAndViewAssert.assertViewName; @RunWith(MockitoJUnitRunner.class) @FieldDefaults(level = PRIVATE) public class PublicoAlvoControllerTest { @Mock Buscador buscador; PublicoAlvoController publicosAlvo; @Before public void setUp() { doReturn(asList( SERVICO.withTitulo("XXXX"), SERVICO.withTitulo("AAAA") )).when(buscador) .buscaServicosPor("publicosAlvo.id", of("servicos-aos-cidadaos")); publicosAlvo = new PublicoAlvoController(buscador); } @Test public void deveRedirecionarParaPaginaDePublicosAlvo() { assertViewName(publicosAlvo.publicoAlvo("servicos-aos-cidadaos", null), "publico-alvo"); } @Test public void deveRetornarOsServicosRelacionadosAoPublicoAlvo() { assertModelAttributeValue(publicosAlvo.publicoAlvo("servicos-aos-cidadaos", null), "servicos", singletonList(Conteudo.fromServico(SERVICO.withTitulo("AAAA")))); } @Test public void deveRetornarOPublicoAlvoPesquisado() { assertModelAttributeValue(publicosAlvo.publicoAlvo("servicos-aos-cidadaos", null), "publicoAlvo", new PublicoAlvo().withId("servicos-aos-cidadaos").withTitulo("Serviços aos Cidadãos")); } @Test public void deveRetornarAsLetrasDisponiveis() { assertModelAttributeValue(publicosAlvo.publicoAlvo("servicos-aos-cidadaos", null), "letras", asList('A', 'X')); } @Test public void deveRetornarALetraAtiva() { assertModelAttributeValue(publicosAlvo.publicoAlvo("servicos-aos-cidadaos", null), "letraAtiva", 'A'); assertModelAttributeValue(publicosAlvo.publicoAlvo("servicos-aos-cidadaos", 'x'), "letraAtiva", 'X'); } @Test public void deveFiltrarPelaLetraInformada() { assertModelAttributeValue(publicosAlvo.publicoAlvo("servicos-aos-cidadaos", 'X'), "servicos", singletonList(Conteudo.fromServico(SERVICO.withTitulo("XXXX")))); } }
rodrigomaia17/guia-de-servicos
src/test/java/br/gov/servicos/servico/publicoAlvo/PublicoAlvoControllerTest.java
Java
mit
2,719
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>W28633_text</title> <link rel="stylesheet" type="text/css" href="style.css" /> </head> <body> <div style="margin-left: auto; margin-right: auto; width: 800px; overflow: hidden;"> <div style="float: left;"> </div> <div style="float: right;"> <a href="page2.html">&raquo;</a> </div> </div> <hr/> <div style="position: absolute; margin-left: 0px; margin-top: 0px;"> <p class="styleSans172.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>"></p> </div> <div style="position: absolute; margin-left: 109px; margin-top: 0px;"> <p class="styleSans235.0000<enum PANGO_WEIGHT_NORMAL of type PangoWeight><enum PANGO_STYLE_NORMAL of type PangoStyle>"> <br/>SUNDRY NOTICES AND REPORTS ON WELLS - FOR INDUSTRIAL COMMISSION OF NORTH DAKOTA OIL AND GAS DIVISION <br/>600 EAST BOULEVARD DEPT 405 <br/>BISMARCK, ND 58505-0840 <br/>SFN 5749 (09-2006) <br/> <br/>Well File No. 28633 <br/> <br/>PLEASE READ INSTRUCTIONS BEFORE FILLING OUT FORM. PLEASE SUBMIT THE ORIGINAL AND ONE COPY. <br/> <br/>Notice of Intent Approximate Start Date Drilling Prognosis Spill Report Ju' 29’ 2°14 Redrilling or Repair Shooting Casing or Liner Acidizing <br/>[I Report of Work Done Date Work Completed <br/>El Notice of Intent to Begin a Workover Project that may Qualify for a Tax Exemption Pursuant to NDCC Section 57-51.1-03. <br/>Approximate Start Date <br/>Well Name and Number Chalmers 5300 21-19 5T Footages Qtr-Qtr Section Township Range 1925 F N L 286 F W L SWNW 19 153 N 100 WPool County Bakken McKenzie h <br/>DETAILS OF WORK Oasis Petroleum respectfully requests permission to make the following changes to the above referenced well: <br/>Plug Well Fracture Treatment <br/>Supplemental History Change Production Method <br/>Temporarily Abandon Reclamation <br/>Other Change casing <br/>BUDDIES <br/> <br/> <br/> <br/>- Surface casing changed to 13 3I ” - Contingency 9 5/8" casing added ' 7’ casing changed to all 32# <br/>Attached are revised drill plan, we" summary, directional plan and plot <br/> <br/>Company Telephone Number Oasis Petroleum North America LLC 281404-9563 FOR STATE USE ONLY <br/>Address . <br/>1oo1 Fannin, Suite 1500 D “We've” IX] “"me State Zip Code TX 77002 <br/>Date <br/>454% <br/>Printed Name Heather McCowan Date <br/>Re ulato Assistant Jul 29, 2014 <br/>Email Address <br/>hmccowan oasispetroieum.com <br/>/ <br/>.J‘ <br/>Title Petroleum Resource Specialist <br/> </p> </div> </body> </html>
datamade/elpc_bakken
ocr_extracted/W28633_text/index.html
HTML
mit
2,777
/* * This code is licensed under "The MIT License" * Copyright (c) 2015 by Alberto Gonzalez * * Please see the included 'LICENSE.txt' file for the full text of the license. */ package com.nomscon.lib.ranges; import java.time.LocalDate; import java.util.Iterator; import java.util.NoSuchElementException; public class DateRange extends AbstractRange<LocalDate> implements Iterable<LocalDate> { // creates and exclusive or half-open range public static DateRange create(LocalDate startDate, LocalDate endDate) { return new DateRange(startDate, endDate, false); } // creates and inclusive or closed range public static DateRange createInclusive(LocalDate startDate, LocalDate endDate) { return new DateRange(startDate, endDate, true); } private DateRange(LocalDate minDate, LocalDate maxDate, boolean inclusive) { super(minDate, maxDate, inclusive); } @Override public Iterator<LocalDate> iterator() { return new DateRangeIterator(); } private class DateRangeIterator implements Iterator<LocalDate> { private LocalDate nextDate; private final LocalDate lastDate; public DateRangeIterator() { nextDate = getMinValue(); lastDate = getMaxValue().plusDays(isInclusive() ? 1 : 0); } @Override public boolean hasNext() { return nextDate.isBefore(lastDate); } @Override public LocalDate next() { if (hasNext()) { LocalDate currentDate = nextDate; nextDate = nextDate.plusDays(1); return currentDate; } throw new NoSuchElementException(); } } }
algonzalez/nomscon-java-lib
src/main/java/com/nomscon/lib/ranges/DateRange.java
Java
mit
1,819
<?php namespace App\Http\Controllers; use App\Http\Controllers\Controller; use Carbon\carbon; use App\Article; use App\Http\Requests\CreateArticleRequest; class ArticlesController extends Controller { /** * Display a listing of the resource. * * @return Response */ public function index() { $articles=\App\Article::latest('published_at')->published()->get(); return view('articles.list',compact('articles')); } /** * Show the form for creating a new resource. * * @return Response */ public function create() { return view('articles.create'); } /** * Store a newly created resource in storage. * * @param Request $request * @return Response */ public function store(CreateArticleRequest $request) { Article::create($request->all()); return redirect('articles'); } /** * Display the specified resource. * * @param int $id * @return Response */ public function show($id) { $article = \App\Article::find($id); return view('articles.show',compact('article')); } /** * Show the form for editing the specified resource. * * @param int $id * @return Response */ public function edit($id) { // } /** * Update the specified resource in storage. * * @param Request $request * @param int $id * @return Response */ public function update(Request $request, $id) { // } /** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function destroy($id) { // } }
manaseer/Laravel5KendoUI
app/Http/Controllers/ArticlesController.php
PHP
mit
1,761
<?php /** * Xml Generator/Reader Bundle * * @author Desperado <desperado@minsk-info.ru> */ namespace Desperado\XmlBundle\Model; use SimpleXmlIterator; /** * Class for converting XML into a PHP array * Convert only "simple" XML (without attributes, namespaces, etc.) * * @author Масюкевич Максим (Desperado) * @link http://dengionline.com/ */ class XmlReader extends XmlAbstract { /** * Convert XML to PHP array * * @param string $xmlString * * @return array */ public function processConvert($xmlString) { $result = []; if(true === $this->isXml($xmlString)) { $iterator = new SimpleXmlIterator($xmlString); $result = $this->getArrayFromXml($iterator); } return $result; } /** * Convert XML to PHP array * * @param SimpleXmlIterator $iterator * * @return array */ protected function getArrayFromXml(SimpleXmlIterator $iterator) { $result = []; for($iterator->rewind(); $iterator->valid(); $iterator->next()) { if($iterator->hasChildren()) { foreach($iterator->getChildren() as $key => $value) { if(1 <= $value->count()) { $result[$iterator->key()][][$key] = $this->getArrayFromXml($value); } else { if(true === $value->hasChildren()) { $result[$iterator->key()][$key] = $this->getArrayFromXml($value); } else { $result[$iterator->key()] = $this->getArrayFromXml($iterator->current()); } } } } else { $result[$iterator->key()] = $this->convertToStringOrBoolean($iterator->current()); } } return $result; } /** * Cast to string or to a boolean value if the string contains a true or false * * @param mixed $string * * @return boolean|string */ protected function convertToStringOrBoolean($string) { $result = (string) $string; $lowerString = strtolower($result); if('true' === $lowerString) { $result = true; } elseif('false' === $lowerString) { $result = false; } return $result; } }
pravednik/xmlBundle
Model/XmlReader.php
PHP
mit
2,645