text:
<link href='http://fonts.googleapis.com/css?family=Alegreya+Sans:100,300,400,500,700,800,900,100italic,300italic,400italic,500italic,700italic,800italic,900italic' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Arvo:400,700,400italic' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=PT+Mono' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Shadows+Into+Light' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Nixie+One' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Raleway:400,200,800,500' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Muli:300,400,300italic,400italic' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Roboto:400,400italic,700,900' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700,800' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Istok+Web:400,700,400italic' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=PT+Sans:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
<style>

@font-face {
    font-family: "Computer Modern";
    src: url('http://mirrors.ctan.org/fonts/cm-unicode/fonts/otf/cmunss.otf');
}

#notebook_panel { /* main background */
	background: #FFFFFF;
}

div.cell { /* set cell width to about 80 chars */
    width: 800px;
	margin-left: 10% !important;
	margin-right: 10% !important;
}

div #notebook { /* centre the content */
    background: #FFFFFF; /* white background for content */
    width: 1200px;
    margin: auto;
    padding-left: 0%;
    padding-right: 50%;
}

#notebook li { /* More space between bullet points */
margin-top:0.8em;
}

/* draw border around running cells */
div.cell.border-box-sizing.code_cell.running {
    border: 1px solid #003366;
}

/* Put a solid color box around each cell and its output, visually linking them*/
div.cell.code_cell {
    background-color: #FFFFFF;
    border-radius: 0px;
    padding: 0.5em;
    margin-top: 1em;
}

div.text_cell_render{
    font-family: 'PT Sans', sans-serif;
    line-height: 160%;
    font-size: 120%;
    font-weight: 400;
    width: 700px;
    margin-left: auto;
    margin-right:auto;
}

/* Formatting for header cells */
.text_cell_render h1 {
    font-family: 'Nixie One', serif;
    font-style: regular;
    font-weight: 800;
    font-size: 40pt;
    line-height: 100%;
    color: #003366;
    margin-bottom: 0.5em;
    margin-top: 0.5em;
    display: block;
}
.text_cell_render h2 {
    font-family: 'Nixie One', serif;
	font-style: regular;
    font-weight: 800;
    font-size: 30pt;
    line-height: 100%;
    color: #003366;
    margin-bottom: 0.1em;
    margin-top: 0.4em;
    display: block;
}

.text_cell_render h3 {
    font-family: 'Nixie One', serif;
	font-style: regular;
	font-size: 20pt;
    font-weight: 800;
	line-height: 100%;
	color: #003366;
    margin-bottom: 0.1em;
	margin-top: 0.4em;
    display: block;
}

.text_cell_render h4 {
    font-family: 'Nixie One', serif;
	font-style: italic;
	font-size: 20pt;
	font-weight: 800;
	line-height: 100%;
	color: #003366;
	margin-bottom: 0.1em;
	margin-top: 0.4em;
	display: block;
}

.text_cell_render h5 {
    font-family: 'Arvo', sans-serif;
    font-weight: 400;
    font-size: 16pt;
    color: grey;
    font-style: italic;
    margin-bottom: .1em;
    margin-top: 0.1em;
    display: block;
}

.text_cell_render h6 {
    font-family: 'PT Mono', sans-serif;
    font-weight: 300;
    font-size: 9pt;
    line-height: 100%;
    color: grey;
    margin-bottom: 1px;
    margin-top: 1px;
}

.CodeMirror{
        font-family: "PT Mono";
        font-size: 90%;
}

</style>


text:
package com.organic.maynard.outliner;

import java.awt.*;
import javax.swing.*;

/**
 * @author  $Author: maynardd $
 * @version $Revision: 1.5 $, $Date: 2004/01/30 00:12:42 $
 */

public abstract class AbstractOutlinerJDialog extends JDialog {

	// Fields
	private WindowSizeManager windowSizeManager = null;

	private boolean alwaysCenter = true;
	private boolean hasBeenShown = false;

	// The Constructors
	public AbstractOutlinerJDialog(boolean resizeOnShow, boolean alwaysCenter, boolean modal, int initialWidth, int initialHeight, int minimumWidth, int minimumHeight) {
		super(Outliner.outliner, "", modal);

		this.alwaysCenter = alwaysCenter;

		setSize(initialWidth, initialHeight);
		addComponentListener(new WindowSizeManager(resizeOnShow, initialWidth, initialHeight, minimumWidth, minimumHeight));
	}

        @Override
	public void show() {
		if (alwaysCenter || !hasBeenShown) {
			hasBeenShown = true;

			Rectangle r = Outliner.outliner.getBounds();
			setLocation((int) (r.getCenterX() - getWidth()/2), (int) (r.getCenterY() - getHeight()/2));
		}

		super.show();
	}
}

redpajama_set_name: RedPajamaGithub


text:
var expect = require('unexpected');
var pipetteur = require('../pipetteur');

describe('Error handling', function () {
    it('should throw on invalid input', function (done) {
        var types = [
            undefined,
            null,
            true,
            0,
            [],
            {},
            function () { return; }
        ];
        expect(types, 'to be an array whose items satisfy', function (type) {
            expect(pipetteur.bind(null, type), 'to throw');
        });

        done();
    });
});


text:
"""
A public API for DProtocol
"""
from NetCatKS.DProtocol.api.implementors.subscribers import DProtocolSubscriber

from NetCatKS.DProtocol.api.public.dynamic import DynamicProtocol
from NetCatKS.DProtocol.api.public.storage import ProtocolStorage
from NetCatKS.DProtocol.api.public.actions import BaseProtocolActions

__author__ = 'dimd'

__all__ = [

    'DynamicProtocol',
    'ProtocolStorage',
    'BaseProtocolActions',
    'DProtocolSubscriber'
]


text:
package com.reyansh.audio.audioplayer.free.Dialogs;

import android.app.AlertDialog;
import android.app.Dialog;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.provider.Settings;
import android.support.annotation.NonNull;
import android.support.v4.app.DialogFragment;

import com.reyansh.audio.audioplayer.free.R;

/**
 * Created by REYANSH on 3/23/2017.
 */

public class PopupWritePermission extends DialogFragment {

    @NonNull
    @Override
    public Dialog onCreateDialog(Bundle savedInstanceState) {
        AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());

        builder.setTitle(R.string.set_ringtone);
        builder.setMessage(R.string.write_settings_desc);

        builder.setPositiveButton(R.string.ok, (dialog, which) -> {
            Intent intent = new Intent(Settings.ACTION_MANAGE_WRITE_SETTINGS);
            intent.setData(Uri.parse("package:" + getActivity().getPackageName()));
            getActivity().startActivity(intent);
            dismiss();
        });

        builder.setNegativeButton(R.string.cancel, (dialog, which) -> dismiss());

        return builder.create();
    }
}


text:
<!DOCTYPE html>

    <meta http-equiv="refresh" content="0;URL=../../byteorder/trait.ReadBytesExt.html">

Redirecting to ../../byteorder/trait.ReadBytesExt.html...


text:
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;

using Google.Apis.Auth.OAuth2.Requests;
using Google.Apis.Auth.OAuth2.Responses;
using Google.Apis.Json;

namespace Google.Apis.Auth.OAuth2.Flows
{
    ///
    /// Google specific authorization code flow which inherits from <see cref="AuthorizationCodeFlow"/>.
    ///
    public class GoogleAuthorizationCodeFlow : AuthorizationCodeFlow
    {
        ///
        /// The project ID associated with the credential using this flow.
        ///
        public string ProjectId { get; private set; }

        private readonly string revokeTokenUrl;

        /// Gets the token revocation URL.
        public string RevokeTokenUrl { get { return revokeTokenUrl; } }

        /// Gets or sets the include granted scopes indicator.
        /// Do not use, use <see cref="IncludeGrantedScopes"/> instead.
        public readonly bool? includeGrantedScopes;

        /// Gets or sets the include granted scopes indicator.
        public bool? IncludeGrantedScopes { get { return includeGrantedScopes; } }

        /// Gets the login_hint.
        public string LoginHint { get; private set; }

        ///
        /// Gets the prompt for consent behaviour.
        /// Value can be <c>null</c>, <c>"none"</c>, <c>"consent"</c>, or <c>"select_account"</c>.
        /// See OpenIDConnect documentation
        /// for details.
        ///
        public string Prompt { get; private set; }

        private readonly IEnumerable<KeyValuePair<string, string>> userDefinedQueryParams;

        /// Gets the user defined query parameters.
        public IEnumerable<KeyValuePair<string, string>> UserDefinedQueryParams
        {
            get { return userDefinedQueryParams; }
        }

        /// Constructs a new Google authorization code flow.
        public GoogleAuthorizationCodeFlow(Initializer initializer)
            : base(initializer)
        {
            ProjectId = initializer.ProjectId;
            revokeTokenUrl = initializer.RevokeTokenUrl;
            includeGrantedScopes = initializer.IncludeGrantedScopes;
            LoginHint = initializer.LoginHint;
            Prompt = initializer.Prompt;
            userDefinedQueryParams = initializer.UserDefinedQueryParams;
        }

        /// <inheritdoc/>
        public override AuthorizationCodeRequestUrl CreateAuthorizationCodeRequest(string redirectUri)
        {
            return new GoogleAuthorizationCodeRequestUrl(new Uri(AuthorizationServerUrl))
            {
                ClientId = ClientSecrets.ClientId,
                Scope = string.Join(" ", Scopes),
                RedirectUri = redirectUri,
                IncludeGrantedScopes = IncludeGrantedScopes.HasValue
                    ? IncludeGrantedScopes.Value.ToString().ToLower() : null,
                LoginHint = LoginHint,
                Prompt = Prompt,
                UserDefinedQueryParams = UserDefinedQueryParams
            };
        }

        /// <inheritdoc/>
        public override async Task RevokeTokenAsync(string userId, string token,
            CancellationToken taskCancellationToken)
        {
            GoogleRevokeTokenRequest request = new GoogleRevokeTokenRequest(new Uri(RevokeTokenUrl))
            {
                Token = token
            };
            var httpRequest = new HttpRequestMessage(HttpMethod.Post, request.Build());

            var response = await HttpClient.SendAsync(httpRequest, taskCancellationToken).ConfigureAwait(false);
            if (!response.IsSuccessStatusCode)
            {
                var content = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
                var error = NewtonsoftJsonSerializer.Instance.Deserialize<TokenErrorResponse>(content);
                throw new TokenResponseException(error, response.StatusCode);
            }

            await DeleteTokenAsync(userId, taskCancellationToken).ConfigureAwait(false);
        }

        /// <inheritdoc/>
        public override bool ShouldForceTokenRetrieval()
        {
            return IncludeGrantedScopes.HasValue && IncludeGrantedScopes.Value;
        }

        /// An initializer class for Google authorization code flow.
        public new class Initializer : AuthorizationCodeFlow.Initializer
        {
            ///
            /// The project ID associated with the credential using this flow.
            ///
            public string ProjectId { get; set; }

            /// Gets or sets the token revocation URL.
            public string RevokeTokenUrl { get; set; }

            ///
            /// Gets or sets the optional indicator for including granted scopes for incremental authorization.
            ///
            public bool? IncludeGrantedScopes { get; set; }

            /// Gets or sets the login_hint.
            public string LoginHint { get; set; }

            ///
            /// Gets or sets the prompt for consent behaviour.
            /// Value can be <c>null</c>, <c>"none"</c>, <c>"consent"</c>, or <c>"select_account"</c>.
            /// See OpenIDConnect documentation
            /// for details.
            ///
            public string Prompt { get; set; }

            /// Gets or sets the optional user defined query parameters.
            public IEnumerable<KeyValuePair<string, string>> UserDefinedQueryParams { get; set; }

            ///
            /// Constructs a new initializer. Sets Authorization server URL to
            /// <see cref="Google.Apis.Auth.OAuth2.GoogleAuthConsts.OidcAuthorizationUrl"/>, and Token server URL to
            /// <see cref="Google.Apis.Auth.OAuth2.GoogleAuthConsts.OidcTokenUrl"/>.
            ///
            public Initializer() : this(
                GoogleAuthConsts.OidcAuthorizationUrl, GoogleAuthConsts.OidcTokenUrl, GoogleAuthConsts.RevokeTokenUrl)
            {
            }

            /// Constructs a new initializer.
            /// <param name="authorizationServerUrl">Authorization server URL</param>
            /// <param name="tokenServerUrl">Token server URL</param>
            /// <param name="revokeTokenUrl">Revocation server URL</param>
            /// <remarks>
            /// This is mainly for internal testing at Google, where we occasionally need
            /// to use alternative oauth endpoints. This is not for general use.
            /// </remarks>
            protected Initializer(string authorizationServerUrl, string tokenServerUrl, string revokeTokenUrl)
                : base(authorizationServerUrl, tokenServerUrl)
            {
                RevokeTokenUrl = revokeTokenUrl;
            }
        }
    }
}


text:
//*****************************************************************************
//
// dma.h - Driver for the DMA Module.
//
//*****************************************************************************

#ifndef __MSP430WARE_DMA_H__
#define __MSP430WARE_DMA_H__

#include "inc/hw_memmap.h"

#if defined(__MSP430_HAS_DMAX_3__) || defined(__MSP430_HAS_DMAX_6__)

//*****************************************************************************
//
// If building with a C++ compiler, make all of the definitions in this header
// have a C binding.
//
//*****************************************************************************
#ifdef __cplusplus
extern "C"
{
#endif

//******************************************************************************
//
// The following is a struct that is passed to DMA_initialize()
//
//******************************************************************************
typedef struct DMA_initializeParam {
    uint8_t channelSelect;
    uint16_t transferModeSelect;
    uint16_t transferSize;
    uint8_t triggerSourceSelect;
    uint8_t transferUnitSelect;
    uint8_t triggerTypeSelect;
} DMA_initializeParam;

//*****************************************************************************
//
// The following are values that can be passed to the triggerSourceSelect
// parameter for functions: DMA_init().
//
//*****************************************************************************
#define DMA_TRIGGERSOURCE_0                                              (0x00)
#define DMA_TRIGGERSOURCE_1                                              (0x01)
#define DMA_TRIGGERSOURCE_2                                              (0x02)
#define DMA_TRIGGERSOURCE_3                                              (0x03)
#define DMA_TRIGGERSOURCE_4                                              (0x04)
#define DMA_TRIGGERSOURCE_5                                              (0x05)
#define DMA_TRIGGERSOURCE_6                                              (0x06)
#define DMA_TRIGGERSOURCE_7                                              (0x07)
#define DMA_TRIGGERSOURCE_8                                              (0x08)
#define DMA_TRIGGERSOURCE_9                                              (0x09)
#define DMA_TRIGGERSOURCE_10                                             (0x0A)
#define DMA_TRIGGERSOURCE_11                                             (0x0B)
#define DMA_TRIGGERSOURCE_12                                             (0x0C)
#define DMA_TRIGGERSOURCE_13                                             (0x0D)
#define DMA_TRIGGERSOURCE_14                                             (0x0E)
#define DMA_TRIGGERSOURCE_15                                             (0x0F)
#define DMA_TRIGGERSOURCE_16                                             (0x10)
#define DMA_TRIGGERSOURCE_17                                             (0x11)
#define DMA_TRIGGERSOURCE_18                                             (0x12)
#define DMA_TRIGGERSOURCE_19                                             (0x13)
#define DMA_TRIGGERSOURCE_20                                             (0x14)
#define DMA_TRIGGERSOURCE_21                                             (0x15)
#define DMA_TRIGGERSOURCE_22                                             (0x16)
#define DMA_TRIGGERSOURCE_23                                             (0x17)
#define DMA_TRIGGERSOURCE_24                                             (0x18)
#define DMA_TRIGGERSOURCE_25                                             (0x19)
#define DMA_TRIGGERSOURCE_26                                             (0x1A)
#define DMA_TRIGGERSOURCE_27                                             (0x1B)
#define DMA_TRIGGERSOURCE_28                                             (0x1C)
#define DMA_TRIGGERSOURCE_29                                             (0x1D)
#define DMA_TRIGGERSOURCE_30                                             (0x1E)
#define DMA_TRIGGERSOURCE_31                                             (0x1F)

//*****************************************************************************
//
// The following are values that can be passed to the transferModeSelect
// parameter for functions: DMA_init().
//
//*****************************************************************************
#define DMA_TRANSFER_SINGLE                                           (DMADT_0)
#define DMA_TRANSFER_BLOCK                                            (DMADT_1)
#define DMA_TRANSFER_BURSTBLOCK                                       (DMADT_2)
#define DMA_TRANSFER_REPEATED_SINGLE                                  (DMADT_4)
#define DMA_TRANSFER_REPEATED_BLOCK                                   (DMADT_5)
#define DMA_TRANSFER_REPEATED_BURSTBLOCK                              (DMADT_6)

//*****************************************************************************
//
// The following are values that can be passed to the channelSelect parameter
// for functions: DMA_init(), DMA_setTransferSize(), DMA_setSrcAddress(),
// DMA_setDstAddress(), DMA_enableTransfers(), DMA_disableTransfers(),
// DMA_startTransfer(), DMA_enableInterrupt(), DMA_disableInterrupt(),
// DMA_getInterruptStatus(), DMA_clearInterrupt(), DMA_NMIAbortStatus(), and
// DMA_clearNMIAbort().
//
//*****************************************************************************
#define DMA_CHANNEL_0                                                    (0x00)
#define DMA_CHANNEL_1                                                    (0x10)
#define DMA_CHANNEL_2                                                    (0x20)
#define DMA_CHANNEL_3                                                    (0x30)
#define DMA_CHANNEL_4                                                    (0x40)
#define DMA_CHANNEL_5                                                    (0x50)
#define DMA_CHANNEL_6                                                    (0x60)
#define DMA_CHANNEL_7                                                    (0x70)

//*****************************************************************************
//
// The following are values that can be passed to the triggerTypeSelect
// parameter for functions: DMA_init().
//
//*****************************************************************************
#define DMA_TRIGGER_RISINGEDGE                                    (!(DMALEVEL))
#define DMA_TRIGGER_HIGH                                             (DMALEVEL)

//*****************************************************************************
//
// The following are values that can be passed to the transferUnitSelect
// parameter for functions: DMA_init().
//
//*****************************************************************************
#define DMA_SIZE_SRCWORD_DSTWORD                   (!(DMASRCBYTE + DMADSTBYTE))
#define DMA_SIZE_SRCBYTE_DSTWORD                                   (DMASRCBYTE)
#define DMA_SIZE_SRCWORD_DSTBYTE                                   (DMADSTBYTE)
#define DMA_SIZE_SRCBYTE_DSTBYTE                      (DMASRCBYTE + DMADSTBYTE)

//*****************************************************************************
//
// The following are values that can be passed to the directionSelect parameter
// for functions: DMA_setSrcAddress(), and DMA_setDstAddress().
//
//*****************************************************************************
#define DMA_DIRECTION_UNCHANGED                                  (DMASRCINCR_0)
#define DMA_DIRECTION_DECREMENT                                  (DMASRCINCR_2)
#define DMA_DIRECTION_INCREMENT                                  (DMASRCINCR_3)

//*****************************************************************************
//
// The following are values that can be passed toThe following are values that
// can be returned by the DMA_getInterruptStatus() function.
//
//*****************************************************************************
#define DMA_INT_INACTIVE                                                  (0x0)
#define DMA_INT_ACTIVE                                                 (DMAIFG)

//*****************************************************************************
//
// The following are values that can be passed toThe following are values that
// can be returned by the DMA_NMIAbortStatus() function.
//
//*****************************************************************************
#define DMA_NOTABORTED                                                    (0x0)
#define DMA_ABORTED                                                  (DMAABORT)

//*****************************************************************************
//
// Prototypes for the APIs.
//
//*****************************************************************************
extern bool DMA_initialize(DMA_initializeParam *param);

extern void DMA_setTransferSize(uint8_t channelSelect,
                                uint16_t transferSize);

extern void DMA_setSrcAddress(uint8_t channelSelect,
                              uint32_t srcAddress,
                              uint16_t directionSelect);

extern void DMA_setDstAddress(uint8_t channelSelect,
                              uint32_t dstAddress,
                              uint16_t directionSelect);

extern void DMA_enableTransfers(uint8_t channelSelect);

extern void DMA_disableTransfers(uint8_t channelSelect);

extern void DMA_startTransfer(uint8_t channelSelect);

extern void DMA_enableInterrupt(uint8_t channelSelect);

extern void DMA_disableInterrupt(uint8_t channelSelect);

extern uint16_t DMA_getInterruptStatus(uint8_t channelSelect);

extern void DMA_clearInterrupt(uint8_t channelSelect);

extern uint16_t DMA_NMIAbortStatus(uint8_t channelSelect);

extern void DMA_clearNMIAbort(uint8_t channelSelect);

extern void DMA_disableTransferDuringReadModifyWrite(void);

extern void DMA_enableTransferDuringReadModifyWrite(void);

extern void DMA_enableRoundRobinPriority(void);

extern void DMA_disableRoundRobinPriority(void);

extern void DMA_enableNMIAbort(void);

extern void DMA_disableNMIAbort(void);

//*****************************************************************************
//
// The following are deprecated APIs.
//
//*****************************************************************************
extern bool DMA_init(uint8_t channelSelect,
                     uint16_t transferModeSelect,
                     uint16_t transferSize,
                     uint8_t triggerSourceSelect,
                     uint8_t transferUnitSelect,
                     uint8_t triggerTypeSelect);

//*****************************************************************************
//
// Mark the end of the C bindings section for C++ compilers.
//
//*****************************************************************************
#ifdef __cplusplus
}
#endif

#endif
#endif // __MSP430WARE_DMA_H__


text:
package cn.cerc.mis.tools;

import cn.cerc.db.core.ServiceException;

public class DataUpdateException extends ServiceException {
    private static final long serialVersionUID = -8184184817999373005L;

    public DataUpdateException(Exception e) {
        super(e.getMessage());
        this.addSuppressed(e);
    }

    public DataUpdateException(String message) {
        super(message);
    }
}


text:
<!DOCTYPE html>

    <meta charset="UTF-8">
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Axxon & Rowela Engagement Session – Carter Binarao</title>
    <meta name="description" content="This is one of the my favorite photo taken during the engagement session with Axxon and Rowela.  I love the way this couple got so candid with me in front of my lens after they loosened up. They are soo adorable. As you can see!  I spent the whole day with Axxon and Rowela for their engagement photoshoot. Axxon is a friend and colleague at work.">
    <meta name="keywords" content="">
    <link rel="canonical" href="http://localhost:4000/Axxon-Ela-Engagement-Session/">

    <meta name="twitter:title" content="Axxon & Rowela Engagement Session">
    <meta name="twitter:description" content="This is one of the my favorite photo taken during the engagement session with Axxon and Rowela.  I love the way this couple got so candid with me in front of my lens after they loosened up. They are soo adorable. As you can see!  I spent the whole day with Axxon and Rowela for their engagement photoshoot. Axxon is a friend and colleague at work.">
    <meta name="twitter:site" content="@carterbinarao">
    <meta name="twitter:creator" content="@carterbinarao">
    <meta name="twitter:card" content="summary">
    <meta name="twitter:image" content="http://localhost:4000/assets/img/profile.png">

    <meta property="og:locale" content="en_US">
    <meta property="og:type" content="article">
    <meta property="og:title" content="Axxon & Rowela Engagement Session">
    <meta property="og:description" content="This is one of the my favorite photo taken during the engagement session with Axxon and Rowela.  I love the way this couple got so candid with me in front of my lens after they loosened up. They are soo adorable. As you can see!  I spent the whole day with Axxon and Rowela for their engagement photoshoot. Axxon is a friend and colleague at work.">
    <meta property="og:url" content="http://localhost:4000/Axxon-Ela-Engagement-Session/">
    <meta property="og:site_name" content="Carter Binarao">
    <meta property="og:image" content="http://localhost:4000/assets/img/profile.png">

    <meta name="HandheldFriendly" content="True">
    <meta name="MobileOptimized" content="320">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <link rel="apple-touch-icon-precomposed" sizes="57x57" href="http://localhost:4000/assets/img/favicon/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="http://localhost:4000/assets/img/favicon/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="http://localhost:4000/assets/img/favicon/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="http://localhost:4000/assets/img/favicon/apple-touch-icon-144x144.png">
<link rel="icon" type="image/png" href="http://localhost:4000/assets/img/favicon/favicon.png">
<link rel="shortcut icon" href="http://localhost:4000/assets/img/favicon/favicon.ico">

    <link rel="alternate" type="application/rss+xml" title="Carter Binarao" href="http://localhost:4000/feed.xml">

    <link rel="stylesheet" type="text/css" href="http://localhost:4000/assets/css/main.css">

Home

Blog

Projects

About

          Carter Binarao

Home

Blog

Projects

About

Axxon & Rowela Engagement Session

              28 Mar 2015

This is one of the my favorite photo taken during the engagement session with Axxon and Rowela.  I love the way this couple got so candid with me in front of my lens after they loosened up. They are soo adorable. As you can see!  I spent the whole day with Axxon and Rowela for their engagement photoshoot. Axxon is a friend and colleague at work.

This photo was taken at the roof deck of the building where we work at.  We've gone to beautiful spots here in Cebu for their engagement session like Temple of Leah in Busay and the Marcelo Fernan Bridge in Mactan.

We made it through the day with the help of our friends for the preparations and props for the engagement session.

Congratulations Rowela and Axxon!  They will be married this coming May 8.

  Please enable JavaScript to view the comments powered by Disqus.

          Carter Binarao © 2018


text:
ALTER TABLE /*$wgDBprefix*/revision
  ADD rev_content_format varbinary(64) DEFAULT NULL;


text:
"""cococomments URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.9/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url, include, patterns
from django.contrib import admin
from django.conf import settings
from rest_framework.routers import DefaultRouter
from comments import views

router = DefaultRouter()
router.register(r'comments', views.CommentViewSet)
router.register(r'users', views.UserViewSet)

urlpatterns = [
    url(r'^', include(router.urls)),
    url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')),
]

if settings.DEBUG:
    import debug_toolbar
    urlpatterns += patterns(
        '',
        url(r'^__debug__/', include(debug_toolbar.urls)),
    )


text:
//
//  UIViewController+Find.m
//  OBJKitTool
//
//  Created by Lawrence on 2017/3/12.
//  Copyright © 2017年 Lawrence. All rights reserved.
//

#import "UIViewController+Find.h"

@implementation UIViewController (Find)

/**
获取顶级控制器

@return 控制器
*/
- (nullable UIViewController *)getMostController {
    UIViewController *topViewController = [UIApplication sharedApplication].keyWindow.rootViewController;
    while (topViewController.parentViewController) {
        topViewController = topViewController.parentViewController;
    }

    return topViewController;
}

/**
 获取当前控制器

 @return 当前控制器
 */
- (nullable UIViewController *)getCurrentViewController {
    UIViewController *result = nil;

    UIWindow *window = [UIApplication sharedApplication].keyWindow;
    if (window.windowLevel == UIWindowLevelNormal) {
        NSArray *windows = [UIApplication sharedApplication].windows;
        for (UIWindow *tmpWin in windows) {
            if (tmpWin.windowLevel == UIWindowLevelNormal) {
                window = tmpWin;
                break;
            }
        }
    }

    UIView *frontView = [[window subviews] objectAtIndex:0];
    id nextResponder = [frontView nextResponder];

    if ([nextResponder isKindOfClass:[UIViewController class]]) {
        result = nextResponder;
    } else {
        result = window.rootViewController;
    }

    return result;
}

/**
 视图是否加载

 @return 是否加载
 */
- (BOOL)m_isVisible {
    return (self.isViewLoaded && (self.view.window != nil));
}

@end


text:
namespace EnterNumbers
{
    using System;

    /*•	Write a method ReadNumber(int start, int end) that enters an integer number in a given
             * range [start…end].
                o	If an invalid number or non-number text is entered, the method should throw an exception.
              •	Using this method write a program that enters 10 numbers: a1, a2, … a10, such that
             * 1 < a1 < … < a10 < 100*/

    class EnterNumbers
    {
        static void Main()
        {
            //ReadNumber(5, 15);
            Read10Numbers(0, 100);
        }

        static void Read10Numbers(int start, int end)
        {
            int[] array = new int[10];
            for (int i = 0; i < array.Length; i++)
            {

                try
                {
                    array[i] = int.Parse(Console.ReadLine());
                }
                catch (FormatException)
                {
                    throw new FormatException();
                }
            }
            bool forPrint = true;
            for (int a = 0; a < array.Length - 1; a++)
            {
                if (array[a] < start || array[a] > end || array[a] > array[a + 1])
                {
                    forPrint = false;
                    //throw new Exception();
                    Console.WriteLine("Exception");
                    break;
                }
            }
            if (forPrint)
            {
                Console.Write("1 < ");
                for (int b = 0; b < array.Length; b++)
                {

                        Console.Write(array[b] + " < ");

                }
                Console.Write("100");
            }
        }
    }
}


text:
package com.policat.LA.repositories;

import com.policat.LA.entities.Option;
import org.springframework.data.repository.CrudRepository;

public interface OptionRepository extends CrudRepository<Option, Long> {
}


text:
Okdoki
----------

A POL/DSL for micro-web apps to
make for your friends and enemies.

Common Tasks
-----------------

    # === Creating model file:
    # === Creating route files:
    # === Create test/spec files:
    bin/template examples

    # === Create migration files:
    bin/migrate create My\_Model table

Architecture
------------

* Customer and Screen Name oriented
* No Computer generated code. Just settings and "subscriptions".
* Limit the creation of tables as much as possible.
  Forcing the use of Consume, you will sooner or later see a better solution.
  Example: Banning and exceptions. When you ban a customer,
  screen name, or customer, you still want to see their content
  occasionally. It's easy to just create tables.
    banning options: Ban as editor/author, ban all content,
    ban from sending me messages
    + 5 page exception limit
    + (exceptions as settings)

Complexity
----------

* Permissions w/complex logic. Example:
     These people in this group of mine can see it,
     but not this group OR this one either.
     And esp. not my ex-bfs/ex-gfs who I have
     not talked to in the past 2 years.

  This is not going to be implemented any time soon.
  Instead, privacy will be simple for now:
    centered around "lifes" (ie screen names) which
    an account can have multiple.
  Privacy is further implemented in secret messages that only
  specified individuals can read.
  More privacy can be created by creating a special screen name
  meant only for a small circle of friends.

  I associate complex privacy/permissions with office/producitivty,
  not with friendship fun.

  The reason for the lack of complex permissions is the cost
  in implementing them for feeds/streams.  Right now Okdoki
  is a simple Ruby app with a couple of functions and SQL calls.

* Authorization (aka Permission):
  * "Consumer" -> "Multi. Producers" (inbox)
  * "Consumer" -> "Producer"         (screen name homepage)

  Temp answer: Screen name orientation, sub-queries

* One Customer, Multi. Screen Names

  Temp answer:
    Unique ids, same table for SN, sub-SNs.
    <br />
    Different table for group based permission.

F.A.Q.
------

* How are authorization for actions done at the model level?

  The USER is obtained from the session and validations
  are used to ensure USER is allowed to do the intended
  action.

* How do I create a `:initialize` method on a model class?

  Initialize all values other than `@data`. Then, call `super(@data)`
  Doing it any other way increases the chance that you create
  an instance with `@data = nil`.

        def initialize *args
          @screen_name = if args.size == 2
                           args.pop
                         else
                           nil
                         end
          super(*args)
        end

* How do I create a `:read` method on a model class?

        class Screen_Name
          class << self
            def read_by_something something
              new TABLE.limit(1)[:something=>something], "Screen name not found."
            end
          end
        end

* How do I create an `:update` method on a model class?

  Update the record, then `:merge!` w/ @data
        def update data
          # Whatever you want.
          # Then update @data
          @data.merge!(
             TABLE.returning.where(...).update(...).
             first || {}
          )
        end


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Uses of Class txml.interpreter.model.Instruction (TXml 1.0.0 API)</title>
<meta name="date" content="2016-05-11">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Uses of Class
txml.interpreter.model.Instruction

Packages that use Instruction

Package
Description

txml.interpreter

Contains interpreter for instructions (commands) in package txml.interpreter.command.

Uses of Instruction in txml.interpreter

Methods in txml.interpreter with parameters of type Instruction

Modifier and Type
Method and Description

void
InstructionsInterpreter.add(Instruction instruction)

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Copyright © 2016. All rights reserved.


text:
var db = require('../dbconn');
var product = {
	getAllProducts : function(callback) {
		return db.query("SELECT * FROM products", callback);
	},

	getProductById :  function(id, callback) {
		return db.query("SELECT * FROM products WHERE id = ?",[id], callback);
	},

	addProduct : function(prod, callback) {
		console.log(prod.id);
		return db.query("INSERT INTO products values(?, ?, ?, ?, ?, ?, ?)", [prod[0].product_barcode, prod[0].product_brand, prod[0].product_name, prod[0].product_unit, prod[0].product_price], prod[0].date_created, prod[0].date_updated, callback);
	},

	deleteProduct : function(id, callback) {
		return db.query("DELETE FROM products WHERE id = ?", [id], callback);
	},

	updateProduct : function(id, prod, callback) {
		return db.query("UPDATE products SET product_barcode = ?, product_brand = ?, product_name = ?, product_unit = ?, product_price = ?, date_updated = ? WHERE id = ?", [prod.product_barcode, prod.product_brand, prod.product_name, prod.product_unit, prod.product_price, date_updated], callback);
	},

	deleteAll : function(item, callback) {
		var prods = [];
		for(i=0; i<item.length; i++) {
			prods[i] = item[i].id;
		}
		return dn.query("DELETE FROM products WHERE id IN (?)", [prods], callback);
	}
};

module.exports = product;


text:
<?php

namespace app\models;

use app\helpers\MonthLogic;
use Yii;
use \app\core\models\Model;
use \yii\behaviors\TimestampBehavior;
/**
 * This is the model class for table "{{%api_month_detail}}".
 *
 * @property string $id
 * @property string $time
 * @property string $status
 * @property string $updated_count
 * @property string $selected_count
 * @property string $created_at
 * @property string $updated_at
 */
class ApiMonthSetting extends Model
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%api_month_setting}}';
    }

     /*
      * 更新时间
      */
     public function behaviors()
     {
         return [
             [
                 'class' => TimestampBehavior::className(),
             ],
         ];
     }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [[ 'status', 'updated_count', 'selected_count', 'created_at', 'updated_at'], 'integer'],
            ['time','validateTime','on'=>['create']],
            ['time','unique','message'=>'该月份已存在']
        ];
    }

    public function scenarios()
    {
        return [
            'create' => ['time'],
            'updating' => ['status'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'time' => 'Time',
            'viewTime' => '月份',
            'viewIsUpdating' => '状态',
            'status' => '状态',
            'updatedCount' => '更新量',
            'allCount' => '总量',
            'created_at' => '创建时间',
            'updated_at' => '更新时间',
        ];
    }

    public function validateTime($attribute, $params)
    {
        if (!$this->hasErrors()) {
            $cyear = date('Y',CURRENT_TIMESTAMP);
            $cMonth = date('m',CURRENT_TIMESTAMP);
            $maxTime = mktime(0,0,0,$cMonth + 1,1,$cyear);

            list($y,$m) = explode('-',$this->$attribute);
            $createTime = mktime(0,0,0,$m,1,$y);

            if($createTime > $maxTime){
                $this->addError($attribute,'还为到可更新的月份');
            }
            $this->$attribute = $createTime;
        }
    }

    public function getViewTime(){
        return date('Y-m',$this->time);
    }

    public function getUpdating(){
        return self::find()->where('status > 0')->one();
    }
    public function getViewIsUpdating(){
        return $this->status ? ' [正在更新]' : '';
    }
    public function updateTheMonth($id , $tip = true){
        if($this->updating > 0){
            if($tip){
                \yii::$app->session->setFlash('success',"还有数据尚未更新完成,请稍后");
            }
        }else{
           $model = self::findOne($id);
           $model->setScenario('updating');
           $model->status = $model->time;
           $model->update();

           $m = new MonthLogic();
           $m->reset();
        }
    }

    public function getUpdatedCount(){
        return ApiMonthDetail::find()->where([
            'mtime'=>$this->time
        ])->count();
    }

    public function getAllCount(){
        $fromTime = intval($this->time);

        $y = date('Y',$this->time);
        $m = date('m',$this->time);

        $toTime = mktime(0,0,0,$m + 1,1,$y);

        return ApiVisitorDetail::find()->where(['between','visitor_regtime', $fromTime,$toTime])->count();

    }
}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>com.hp.hpl.jena.graph.compose (Apache Jena)</title>
<meta name="date" content="2013-05-11">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">

com.hp.hpl.jena.graph.compose

Classes

CompositionBase

Delta

Difference

DisjointUnion

Dyadic

Intersection

MultiUnion

MultiUnion.MultiUnionStatisticsHandler

Polyadic

PolyadicPrefixMappingImpl

Union


text:
<?php
namespace Chamilo\Application\Survey\Export\Component;

use Chamilo\Application\Survey\Export\Form\ExportTemplateForm;
use Chamilo\Application\Survey\Export\Manager;
use Chamilo\Application\Survey\Export\Storage\DataClass\ExportTemplate;
use Chamilo\Application\Survey\Service\RightsService;
use Chamilo\Libraries\Architecture\Exceptions\NotAllowedException;
use Chamilo\Libraries\Format\Structure\Breadcrumb;
use Chamilo\Libraries\Format\Structure\BreadcrumbTrail;
use Chamilo\Libraries\Format\Tabs\DynamicTabsRenderer;
use Chamilo\Libraries\Platform\Session\Request;
use Chamilo\Libraries\Platform\Translation;

class CreatorComponent extends Manager
{

    /**
     * Runs this component and displays its output.
     */
    function run()
    {
        $publication_id = Request::get(Manager::PARAM_PUBLICATION_ID);
        $id = Request::get(self::PARAM_EXPORT_REGISTRATION_ID);

        if (RightsService::getInstance())
        {

            $export_template = new ExportTemplate();
            $export_template->set_publication_id($publication_id);
            $export_template->set_export_registration_id($id);
            $export_template->set_owner_id($this->get_user_id());

            $form = new ExportTemplateForm(ExportTemplateForm::TYPE_CREATE, $this->get_url(), $export_template);

            if ($form->validate())
            {
                $success = $form->create();

                if ($success)
                {
                    $message = 'SelectedExportRegistrationActivated';
                    $tab = BrowserComponent::TAB_EXPORT_TEMPLATES;
                }
                else
                {
                    $message = 'SelectedExportRegistrationNotActivated';
                    $tab = BrowserComponent::TAB_EXPORT_REGISTRATIONS;
                }

                $this->redirect(
                    Translation::get($message),
                    ! $success,
                    array(
                        self::PARAM_ACTION => self::ACTION_BROWSE,
                        Manager::PARAM_PUBLICATION_ID => $publication_id,
                        DynamicTabsRenderer::PARAM_SELECTED_TAB => $tab));
            }
            else
            {

                $html = array();

                $html[] = $this->render_header();
                $html[] = $form->toHtml();
                $html[] = $this->render_footer();

                return implode(PHP_EOL, $html);
            }
        }
        else
        {
            throw new NotAllowedException();
        }
    }

    function add_additional_breadcrumbs(BreadcrumbTrail $breadcrumbtrail)
    {
        $breadcrumbtrail->add(
            new Breadcrumb(
                $this->get_url(
                    array(
                        Manager::PARAM_ACTION => Manager::ACTION_BROWSE,
                        DynamicTabsRenderer::PARAM_SELECTED_TAB => BrowserComponent::TAB_REPORT)),
                Translation::get('BrowserComponent')));

        $breadcrumbtrail->add(
            new Breadcrumb(
                $this->get_url(
                    array(
                        self::PARAM_ACTION => self::ACTION_BROWSE,
                        Manager::PARAM_PUBLICATION_ID => Request::get(Manager::PARAM_PUBLICATION_ID),
                        DynamicTabsRenderer::PARAM_SELECTED_TAB => BrowserComponent::TAB_EXPORT_REGISTRATIONS)),
                Translation::get('BrowserComponent')));
    }

    function get_parameters()
    {
        return array(Manager::PARAM_PUBLICATION_ID, self::PARAM_EXPORT_REGISTRATION_ID);
    }
}
?>


text:
/**
 * @class SPaginator component
 * @param {Object} list Object of the list tha is paginated
 * @param {string} selector Selector of the paginator
 * @param {number} total Total of items
 * @callback  callBack Function to call when is cliked on a page to refresh the list
 * @param {Object} options Configurable options
 */
function SPaginator(list, selector, total, callBack, options){
    this.list = list;
    this.$container = null;
    this.current = 1;
    this.total = parseInt(total, 10);
    this._pages = null;
    this._options =$.extend({
        items_per_page: 10,
        labelNext: 'Next >',
        labelPrevious: '< Prev',
        page: 1,
        display: 5
    },options);
    this._options.halfDisplay = Math.floor(this._options.display/2);

    this._callBack = callBack;

    this._init(selector);
}

SPaginator.prototype = {

    _init: function(container) {
        this.$container = $(container);
        this.current = this._options.page;
        this._pages =  Math.ceil(this.total/this._options.items_per_page);
        this.print();
        this._initClickEvent();
    },

    getCurrentPage: function() {
        return this.current;
    },

    empty: function() {
        this.$container.empty();
    },

    _getInterval: function() {
        return {
            start: Math.ceil(this.current > this._options.halfDisplay ? Math.max(Math.min(this.current - this._options.halfDisplay, (this._pages - this._options.display)), 1) : 1),
            end: Math.ceil(this.current > this._options.halfDisplay ? Math.min(this.current + this._options.halfDisplay, this._pages) : Math.min(this._options.display, this._pages))
        };
    },

    print: function() {
        var $list = $('

'),
            i = 1,
            interval = this._getInterval();

        this.$container.empty();

        if(this._pages > 0) {
            $list.append(this.printShortcut('previous'));
        }

        if (interval.start > 1 && this._options.halfDisplay > 0) {
            var end = Math.min(this._options.halfDisplay, interval.start-1);
            for (i = 1; i <= end; i++) {
                $list.append(this.printPage(i));
            }
            if (this._options.halfDisplay < interval.start && (interval.start - this._options.halfDisplay > 1)) {
                $list.append(this.printText('...'));
            }
        }

        for(i=interval.start; i<=interval.end; i++)
        {
            $list.append(this.printPage(i));
        }

        if (interval.end < this._pages && this._options.halfDisplay > 0) {
            if ((this._pages - this._options.halfDisplay > interval.end) && (this._pages - this._options.halfDisplay - interval.end > 0)) {
                $list.append(this.printText('...'));
            }
            var begin = Math.max(this._pages - this._options.halfDisplay, interval.end)+1;
            for (i = begin; i <= this._pages; i++) {
                $list.append(this.printPage(i));
            }
        }

        if(this._pages > 0) {
            $list.append(this.printShortcut('next'));
        }

        this.$container.html($list);
        this.$container.append('

');
    },

    printPage: function(num)
    {
        if(num===this.current)
        {
            return '
'+num+'
';
        }
        else
        {
            return '
'+num+'
';
        }

    },

    printText: function(text)
    {
        return '
'+text+'
';
    },

    printShortcut: function(type)
    {
        var limit = (type==="next")?
                        (this.current===this._pages):
                        (this.current===1),
            label = 'label'+type.charAt(0).toUpperCase()+type.slice(1);
        if(limit)
        {
            return '
'+this._options[label]+'
';
        }
        else
        {
            return '
'+this._options[label]+'
';
        }
    },

    /*jslint evil: true */
    _initClickEvent: function() {
        var _self = this;

        this.$container.off().on('click','a',function(e) {
            var page = $(this).data('page');

            e.preventDefault();

            if (page==='next')
            {
                _self.current++;
            }
            else if (page==="previous") {
                _self.current--;
            }
            else
            {
                _self.current = page;
            }
            if(typeof _self._callBack==='string')
            {
                eval(_self._callBack+'('+_self.current+')');
            }
            else
            {
                _self._callBack.apply(_self.list, [_self.current]);
            }
            _self.print();
        });
    }
};


text:
using Orleans.Core;

namespace Orleans.Runtime
{
    public interface IPersistentState<TState> : IStorage<TState>
    {
    }
}


text:
package spi

// Defaults
const (
	DEFAULT_HARDWARE_ADDR = 0
	DEFAULT_BUS           = 0
	DEFAULT_CHIP          = 0
)


text:
Coding social network that displays total lines of code written

# Devpost
Check out codeometer on Devpost here: https://devpost.com/software/codeometer-f8omxh or at our website: codeometer.com

# awards
Codeometer recieved the Domain.com 'Best Domain' award and honerable mension for Microsoft's 'Best use of Microsoft Technologies'


text:
CREATE TABLE `sline_tuan_booking` (
  `id` int(3) NOT NULL AUTO_INCREMENT,
  `webid` int(3) unsigned NOT NULL DEFAULT '0',
  `tuanid` int(11) DEFAULT NULL,
  `dingnum` varchar(100) DEFAULT NULL COMMENT '预订数量',
  `price` varchar(255) DEFAULT NULL,
  `info` varchar(255) DEFAULT NULL COMMENT '其它备注信息',
  `dingname` varchar(255) DEFAULT NULL,
  `sex` varchar(255) DEFAULT NULL COMMENT '性别',
  `dingtel` varchar(255) DEFAULT NULL COMMENT '预订联系人电话',
  `addtime` int(10) unsigned DEFAULT NULL COMMENT '添加时间',
  `modtime` int(10) unsigned DEFAULT NULL COMMENT '处理时间',
  `status` int(1) unsigned DEFAULT '0' COMMENT '处理状态',
  `ordersn` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `qq` varchar(255) DEFAULT NULL,
  `memberid` int(11) DEFAULT NULL COMMENT '会员ID',
  `validdate` varchar(255) DEFAULT NULL COMMENT '有效期',
  `ispay` int(1) unsigned DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC


text:
import { UPDATE_ISSUE, CREATE_ISSUE_SUCCESS } from '../actions/issue'

const initalState = {
    issueName: null,
    Topic: null,
    Summary: null,
    Tags: null,
}

export default issue = (state = initalState, action) => {
    switch (action.type) {
        case UPDATE_ISSUE:
            return {
                ...state,
                ...action.issue
            }
            break;
        case CREATE_ISSUE_SUCCESS:
            return initalState
            break;
        default:
            return state;
    }
}


text:
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreatePermissionAccountTable extends Migration {

	public function up()
	{
		Schema::create('permission_account', function(Blueprint $table) {
			$table->increments('id');
			$table->integer('account_id')->unsigned();
			$table->integer('permission_id')->unsigned();
			$table->timestamps();
		});
	}

	public function down()
	{
		Schema::drop('permission_account');
	}
}


text:
We are primarily using Django and AngularJS, so there is no direct compilation. However, there are several packages that need to be installed in order to get the system up and running. We **heavily recommend** Linux (Ubuntu) to install the necessary packages.
###### Step Zero: Clone the Repository
In the terminal, clone our git repository with the command `git clone https://github.com/CombustibleLemons/rss-reader.git`

###### Step One: Install PostgreSQL v.9.3 (if it is not installed already)
  1. Install postgresql
    * Run `[your favourite package manager] install postgresql`
  2. Initialize the postgres database and user

    ######Ubuntu
    * The root folder contains the initialization script. Run `./postgres-setup.sh`

    ######Arch
    * Run `systemctl start postgresql` and then `sudo -i -u postgres` and enter your password when prompted.
    * Enter these commands in order:
        * `createdb feeddb`
        * `createuser -P combustible`
        * `psql -c 'GRANT ALL PRIVILEGES ON DATABASE feeddb TO combustible;'`
        * `exit`

    ######OSX or other
    * Run `sudo su - postgres` and enter the password for your computer. Access the postgres shell with `. ./pg_env.sh`.
        * Run `createdb feeddb;` to make a database named feeddb
        * Run `createuser -P combustible;` to make a user named combustible
        * Run `psql -c 'GRANT ALL PRIVILEGES ON DATABASE feeddb TO combustible;'`
        * Run `exit` to exit the postgres shell.

    Note: If you would like to change username or password, you can do so in the `~/rss_reader/rss_reader/conf/settings.py` file

###### Step Two: Install virtualenv and other packages
  1. Install pip, virtualenv, and virtualenvwrapper (if they are not otherwise installed)
  2. It is easiest to set up a virtualenv by following [this tutorial](https://virtualenvwrapper.readthedocs.org/en/latest/).
  3. After adding the `source` command to your shell startup file, use `mkvirtualenv YOUR_ENV_NAME` to make a new virtualenv.
  4. Access your virtual environment with `workon YOUR_ENV_NAME`
  4. Navigate to the repository `~/rss_reader/` and run `pip install -r requirements.txt` to install the required packages.

###### Step Three: Install karma
 1. Install npm
  2. Run `npm install -g karma`
  3. Run `npm install -g jasmine`
  4. Run `npm install -g karma-jasmine`
  5. Run `npm install -g karma-chrome-launcher`
  6. Run `npm install -g karma-cli` This is not strictly necessary, but makes things much easier.

    *Note:* the `-g` is a global install. You can install locally to a project with `--save-dev`. The official
guidelines recommend you do both if you have trouble.

###### Step Four: Start the RSS-reader

  1. Navigate to `~/rss-reader/rss_reader/` and run `./manage.py migrate` to set up the database.
  3. In the terminal, run `./manage.py installwatson`, then `./manage.py buildwatson`. These commands initialize watson, a Django search application.

And you've started an instance of the RSS-reader!

###### Flushing the Database

If the database is mistakenly edited when creating Feed objects, you will need to flush the database.
######  Ubuntu:
1. Navigate to `~/rss-reader/rss_reader/`
2. Run `./flush_database.sh` to flush the database
3. Run `./postgres-setup.sh` to reset the database (see Step 1.2 of the installation)

###### Arch:
1. `sudo -i -u postgres`
2. `dropdb feeddb`
3. `dropuser combustible`
4. `exit`
5. Follow the intructions of Step 1.2 to reinitialize the database

###### OSX / Other:
* `sudo su - postgresql`, and enter the password if prompted
* `. ./pg_env.sh`
* `psql`, and enter the postgresql user password if prompted
* `drop database feeddb;`
* `drop user combustible;`
* `sudo -u postgres -H sh -c "createdb feeddb"`
* `sudo -u postgres -H sh -c "createuser -P combustible"`
* `sudo -u postgres -H sh -c "psql -c 'GRANT ALL PRIVILEGES ON DATABASE feeddb TO combustible;'"`

After remaking the database, do Step Four of installation to make migrations and reinitialize watson.

### Functionality

######  Main functionality
Curatr basically allows you to subscribe to feeds and group them within particular topic categories. The user can add and remove topics to put feeds in. The user can search for feeds, using either an rss url or a string. Once subscribed to a feed, the user selects a topic to add the feed to, with a default Uncategorized topic. Each feed can only belong under one topic, but feeds can be moved from one topic to another. The user can also unsubscribe from feeds.

Regarding posts in one feed, the user can sort the posts alphabetically, by date, by length, and by read/unread status. The user can expand posts to read them as well as mark them as read or unread. The user can also filter the posts to only view unread posts.

The user has the ability to queue feeds at their pleasure, which releases a certain number of posts to the user in a specified time interval. This allows the user to read fewer or more posts of a feed than usual, access old posts that are stored in the database, and set a convenient time interval for receiving new posts.

**Queue Scenario 1**: Say that the user wants to read 1 post per week of the comic **xkcd**. The user would be able to set the **xkcd** feed to be a queue and could choose the time interval of 1 week for which he or she receives 1 post. Every week, then, the user would receive one **xkcd** post rather than the daily post that a normal, unqueued **xkcd** feed would give.

**Queue Scenario 2**: Conversely, if the user chose to get 5 posts of **xkcd** per day, old posts that are stored in the database will be pulled to give the user these additional posts, starting from the oldest and converging to the newest.

######  Settings functionality
The user can change their password in the user settings and can measure their reading speed in the Reading Test section.

### Usage Tutorial
#### Automatic initialization (if you want to start with a user and some topics/feeds already initialized)
1. Run our intitalization script from `~/rss_reader/rss_reader` with `./manage.py shell < init_script.py`
2. Access `localhost:8000` via web browser, log in with the credentials Username: **lemon** and Password: **lemon**
3. You should see several Topics (Comics, Science, and Uncategorized) along with a few feeds in each topic

#### Manual initialization

######  Register a user
1. Access `localhost:8000` via web browser and click on 'Register Here'
2. Enter a username and password
3. You're done!

######  Add a Topic
1. Click on "Add a topic" in the sidebar
2. You should see a popup. Enter the name of your topic in the field and click on "Add Topic"

######  Search for a feed
1. Enter keywords or an rss url in the searchbar
2. If you enter keywords, the results shown will be the search results from our database of feeds (and therefore it is possible that the feed you expect may not show up). If you entered a url, Curatr will fetch the feed for you

######  Subscribe to feeds
1. Search for a feed (as above)
2. Click on the add icon to the right of your desired feed
3. A popup should open asking you to choose a topic
4. Choose your desired topic and click "Subscribe"

######  View a feed
1. Expand one of your topics in the sidebar
2. Click on the feed you wish to view

######  Unsubscribe from a feed
1. Click on "Edit" in the sidebar
2. Click the "X" next to the feed you wish to unsubscribe from
3. Click on "Save changes"

######  Rename a topic
1. Click on "Edit" in the sidebar
2. Click on the edit icon to the right of the topic. The icon is a diagonal pencil
3. Enter the new name of the topic in the field that appears
4. Click on "Submit"
5. If you wish to not rename the topic after you click the icon, just leave the field blank and click "submit"

######  Rearrange feeds within topics
1. Click on "Edit" in the sidebar
2. Drag and drop the feeds as you please
3. You can drag and drop the feeds among different topics
4. Click on "Save changes"

######  Delete a topic
1. Click on "Edit" in the sidebar
2. Click on the "X" to the right of the topic you wish to delete
3. Click on "Save changes"

######  Expand a post
1. View a feed (instructions above)
2. Click on a post to expand it

######  Mark a post as read/unread
1. View a feed (instructions above)
2. Click on the read/unread switch to the right of the post you wish to mark

######  Sort posts
1. View a feed (instructions above)
2. Click on "Sort by" in the top-right corner
3. Choose to sort by alphabet, time, length or unread status

###### Only see unread posts
1. View a feed (instructions above)
2. Click on "View only unread" at the top-right
3. You can reverse this by clicking on "View all posts"

######  Change password
1. Click on the gear icon to the right of the searchbar
2. Click on user settings
3. Enter your new password in the field and click "Submit"

### Known Issues

1. Adding a non-rss style URL to the search bar and pressing enter will result in a 400 error.
2. If a post contains no words inside of its content, no read time will show up for it.
3. Queuing and then dequeuing can sometimes cause the old (queued) feed to remain on the topic's list of feeds. We did not find a consistent pattern for which feeds this fails on, but it seems to generally work.
4. When changing passwords, the password change will occur, but the user needs to log out and relog in before everything will work properly afterwards. If the user does not log out, when trying access posts, 404 errors will occur and authentication will be requested.


text:
<?php

namespace Nova\Packages\Support\Providers;

use Nova\Auth\Contracts\Access\GateInterface as Gate;
use Nova\Support\ServiceProvider;

class PackageServiceProvider extends ServiceProvider
{
    /**
     * The provider class names.
     *
     * @var array
     */
    protected $providers = array();

    /**
     * Register the service provider.
     *
     * @return void
     */
    public function register()
    {
        foreach ($this->providers as $provider) {
            $this->app->register($provider);
        }
    }

    protected function bootstrapFrom($path)
    {
        $app = $this->app;

        return require $path;
    }
}


text:
package zutil.struct;

import java.lang.reflect.InvocationTargetException;
import java.util.*;

/**
 * A Map wrapping object that allows supports for multiple values per key.
 *
 * @param <K> – the type of keys maintained by this map
 * @param <V> – the type of mapped values
 */
public class MultiMap<K,V> implements Map<K,V> {

    private Map<K, LinkedList<V>> internalMap;

    /**
     * Creates a MultiMap
     */
    public MultiMap() {
         this.internalMap = new HashMap<>();
    }

    /**
     * Creates a MultiMap
     *
     * @param internalMapClass   Provide the type of the internal map.
     */
    public MultiMap(Class<? extends Map> internalMapClass) throws IllegalAccessException, InstantiationException, NoSuchMethodException, InvocationTargetException {
        this.internalMap = internalMapClass.getDeclaredConstructor().newInstance();
    }

    /**
     * @return the number of keys registered in the Map. Note that the number
     *          of values contained might be more than the value returned here.
     */
    @Override
    public int size() {
        return internalMap.size();
    }

    @Override
    public boolean isEmpty() {
        return internalMap.isEmpty();
    }

    @Override
    public boolean containsKey(Object key) {
        return internalMap.containsKey(key);
    }

    @Override
    public boolean containsValue(Object value) {
        for (K key : internalMap.keySet()) {
            for (V keyValue : internalMap.get(key)) {
                if (Objects.equals(value, keyValue))
                    return true;
            }
        }

        return false;
    }

    @Override
    public V put(K key, V value) {
        if (value == null) {
            remove(key);
            return null;
        }

        LinkedList<V> valueList = internalMap.get(key);

        if (valueList == null) {
            valueList = new LinkedList<V>();
            internalMap.put(key, valueList);
        }

        V prevValue = (valueList.isEmpty() ? null : valueList.getLast());
        valueList.add(value);

        return prevValue;
    }

    @Override
    public void putAll(Map<? extends K, ? extends V> m) {
        if (m instanceof MultiMap) {
            for (K key : m.keySet()) {
                for (V value : ((MultiMap<? extends K, ? extends V>) m).getAll(key)) {
                    put(key, value);
                }
            }
        } else {
            for (Entry<? extends K, ? extends V> e : m.entrySet()) {
                put(e.getKey(), e.getValue());
            }
        }
    }

    @Override
    public V remove(Object key) {
        if (key == null) {
            return null;
        }

        LinkedList<V> valueList = internalMap.remove(key);

        if (valueList != null)
            return valueList.getFirst();
        else
            return null;
    }

    @Override
    public void clear() {
        internalMap.clear();
    }

    @Override
    public V get(Object key) {
        LinkedList<V> valueList = internalMap.get(key);

        if (valueList != null)
            return valueList.getLast();
        else
            return null;
    }

    /**
     * @return a list of all values associated with the specified key. A empty list will be returned if the key does not exist.
     */
    public List<V> getAll(Object key) {
        LinkedList<V> valueList = internalMap.get(key);

        if (valueList != null)
            return Collections.unmodifiableList(valueList);
        else
            return Collections.emptyList();
    }

    @Override
    public Set<K> keySet() {
        return internalMap.keySet();
    }

    @Override
    public Collection<V> values() {
        LinkedList<V> list = new LinkedList<>();

        for (List<V> valueList : internalMap.values()) {
            list.addAll(valueList);
        }

        return list;
    }

    @Override
    public Set<Entry<K, V>> entrySet() {
        throw new UnsupportedOperationException();
    }

}


text:
package fi.csc.microarray.client.visualisation.methods.gbrowser.message;

/**
 * Listens to results of an data request. Data requests are sent from the processing layer
 * to the view layer.
 *
 * @author Petri Klemelä
 *
 */
public interface DataResultListener {

	public void processDataResult(DataResult dataResult);

}


text:
@charset "utf-8";
/* CSS Document */
.comment-main{padding-bottom:10px ;}
.item-pic {width: 90px;height: 90px;border: 1px solid #EEE;float: left;overflow: hidden; margin-left:5px;margin-right: 10px;}
textarea {width:100%;margin:10px 5px;min-height:80px;border: 0px none;resize: none;outline: 0px none;overflow: hidden;}
.filePic {width:100px;padding:10px 10px;position: relative;overflow: hidden;}
.filePic .inputPic {cursor: pointer;opacity: 0;width: 100%;height: 100%;position: absolute;top: 0;left: 0;}
.filePic span{display: none;}

img{width:100% ;}
.item-opinion{border-top: 1px solid #F5F8FA;width: 100%;overflow: hidden;padding:10px 0px ;}
.item-opinion li{float:left;width: 33.33%;text-align: center;font-size:14px ;cursor: pointer;}
.item-opinion li i{display:inline-block;width:16px;height:16px;margin-right: 5px;}
.item-opinion li i.op1,.item-opinion li i.op2{background:url(../images/iconfont-evaluate.png);background-size:16px 16px;}
.item-opinion li i.op3{background:url(../images/iconfont-bad.png);background-size:16px 16px;}

.item-opinion li i.op1.active{background:url(../images/iconfont-good.png);background-size:16px 16px;}
.item-opinion li i.op2.active{background:url(../images/iconfont-middle.png);background-size:16px 16px;}
.item-opinion li i.op3.active{background:url(../images/iconfont-badon.png);background-size:16px 16px;}

.info-btn{text-align: center;}

@media only screen and (min-width: 640px){

/*多个商品评价*/
.comment-list{position: relative;margin:0px 5px ;padding-bottom:10px ;}
.item-pic{width: 150px;height: auto;float: none;}
.item-title{width:150px ;overflow: hidden;}
.item-pay-logis{display: none;}
.item-name p,.comment-list .info-little span{height: 18px;line-height: 18px;overflow: hidden;}
.item-opinion{position: absolute;left:200px;top: 0px;right:0px;width: auto;max-width:600px ;}
.item-comment{position: absolute;left:200px;top: 40px;right:0px;max-width:600px ;}
textarea{min-height:120px ;border: 1px solid #F5F8FA;;padding:10px ;margin: 0px 0px;}
.filePic{position: absolute;left:200px;bottom: 10px;width:120px;}
.filePic span{display: block;cursor: pointer;}
.filePic img{display: none;}
.user-comment{max-width:1000px;margin:0px auto;}
}


text:
Please contribute your examples, submit a pull request!

## Turn restrictions as a list

File: `turn_restriction_relations_as_list.py`

This example requests a CSV response from an Overpass query for turn restrictions within the Toronto city limits.

The result is then converted to a Python list and printed to stdout.

Sample output:

```python
['6809605', 'hoream_telenav', '2016-12-21T15:05:42Z', '', 'no_left_turn'],
...
```

## Plot state border

File: `plot_state_border/main.py`

This example requests the boundary of a state of Germany called Saxony. The overpass response contains points that will be connected with each other to draw the outer border of the state. The lines are drawn using `matplotlib`.
Since the response is quite big (~2 MB) the response will be saved in a XML file.

Overpass query:
```osm
area[name="Sachsen"][type="boundary"]->.saxony;
rel(area.saxony)[admin_level=4][type="boundary"][boundary="administrative"];
out geom;
```

Output:
![Border of Saxony (Germany)](plot_state_border/output.png)


text:
namespace blink {

class PLATFORM_EXPORT MemoryCacheDumpClient : public GarbageCollectedMixin {
 public:
  virtual ~MemoryCacheDumpClient() = default;
  virtual bool OnMemoryDump(WebMemoryDumpLevelOfDetail,
                            WebProcessMemoryDump*) = 0;

  void Trace(Visitor*) const override;
};

// This class is wrapper around MemoryCache to take memory snapshots. It dumps
// the stats of cache only after the cache is created.
class PLATFORM_EXPORT MemoryCacheDumpProvider final
    : public base::trace_event::MemoryDumpProvider {
  USING_FAST_MALLOC(MemoryCacheDumpProvider);

 public:
  // This class is singleton since there is a global MemoryCache object.
  static MemoryCacheDumpProvider* Instance();
  MemoryCacheDumpProvider(const MemoryCacheDumpProvider&) = delete;
  MemoryCacheDumpProvider& operator=(const MemoryCacheDumpProvider&) = delete;
  ~MemoryCacheDumpProvider() override;

  // base::trace_event::MemoryDumpProvider implementation.
  bool OnMemoryDump(const base::trace_event::MemoryDumpArgs&,
                    base::trace_event::ProcessMemoryDump*) override;

  void SetMemoryCache(MemoryCacheDumpClient* client) {
    DCHECK(IsMainThread());
    client_ = client;
  }

 private:
  MemoryCacheDumpProvider();

  WeakPersistent<MemoryCacheDumpClient> client_;
};

}  // namespace blink

#endif  // THIRD_PARTY_BLINK_RENDERER_PLATFORM_INSTRUMENTATION_TRACING_MEMORY_CACHE_DUMP_PROVIDER_H_


text:
<?xml version="1.0" encoding="UTF-8"?>

<resource oid="10000000-0000-0000-0000-000000000003"
	xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
	xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
	xmlns:t="http://prism.evolveum.com/xml/ns/public/types-3" xmlns:q="http://prism.evolveum.com/xml/ns/public/query-3"
	xmlns:mr="http://prism.evolveum.com/xml/ns/public/matching-rule-3"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:ri="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3"
	xmlns:icfs="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/resource-schema-3"
	xmlns:icfc="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/connector-schema-3"
	xmlns:func="http://midpoint.evolveum.com/xml/ns/public/function/basic-3"
	xmlns:ext="http://midpoint.evolveum.com/xml/ns/story/orgsync/ext">

	<name>Embedded Test OpenDJ</name>

	<connectorRef type="ConnectorType">
		<description>Dummy description, just for the test</description>
		<filter>
			<q:equal>
				<q:path>c:connectorType</q:path>
				<q:value>com.evolveum.polygon.connector.ldap.LdapConnector</q:value>
			</q:equal>
		</filter>
	</connectorRef>

	<connectorConfiguration
		xmlns:icfcldap="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/bundle/com.evolveum.polygon.connector-ldap/com.evolveum.polygon.connector.ldap.LdapConnector">

		<icfc:configurationProperties>
			<icfcldap:port>10389</icfcldap:port>
			<icfcldap:host>localhost</icfcldap:host>
			<icfcldap:baseContext>dc=example,dc=com</icfcldap:baseContext>
			<icfcldap:bindDn>cn=directory manager</icfcldap:bindDn>
			<icfcldap:bindPassword>
				<t:clearValue>secret</t:clearValue>
			</icfcldap:bindPassword>
			<icfcldap:pagingStrategy>auto</icfcldap:pagingStrategy>
			<icfcldap:vlvSortAttribute>entryUUID</icfcldap:vlvSortAttribute>
			<icfcldap:operationalAttributes>ds-pwp-account-disabled</icfcldap:operationalAttributes>
			<icfcldap:operationalAttributes>isMemberOf</icfcldap:operationalAttributes>
			<icfcldap:operationalAttributes>uniqueMember</icfcldap:operationalAttributes>
		</icfc:configurationProperties>

		<icfc:resultsHandlerConfiguration>
			<icfc:enableNormalizingResultsHandler>false
			</icfc:enableNormalizingResultsHandler>
			<icfc:enableFilteredResultsHandler>false
			</icfc:enableFilteredResultsHandler>
			<icfc:enableAttributesToGetSearchResultsHandler>false
			</icfc:enableAttributesToGetSearchResultsHandler>
		</icfc:resultsHandlerConfiguration>

	</connectorConfiguration>

	<schema xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
        xmlns:icfs="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/resource-schema-3"
        xmlns:t="http://prism.evolveum.com/xml/ns/public/types-3"
        xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
        xmlns:q="http://prism.evolveum.com/xml/ns/public/query-3"
        xmlns:ri="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3">
   <generationConstraints>
      <generateObjectClass>ri:groupOfUniqueNames</generateObjectClass>
      <generateObjectClass>ri:organizationalUnit</generateObjectClass>
      <generateObjectClass>ri:groupOfURLs</generateObjectClass>
      <generateObjectClass>ri:ds-virtual-static-group</generateObjectClass>
      <generateObjectClass>ri:inetOrgPerson</generateObjectClass>
      <generateObjectClass>ri:organizationalPerson</generateObjectClass>
      <generateObjectClass>ri:person</generateObjectClass>
      <generateObjectClass>ri:top</generateObjectClass>
   </generationConstraints>
   </schema>

 	<schemaHandling>

		<objectType>
			<kind>account</kind>
			<intent>default</intent>
			<displayName>Default Account</displayName>
			<default>true</default>
			<objectClass>ri:inetOrgPerson</objectClass>
			<attribute>
				<ref>ri:dn</ref>
				<displayName>Distinguished Name</displayName>
				<outbound>
					Name cannot be weak. Changes in name trigger object rename.
					<source>
						<path>$user/name</path>
					</source>
					<expression>

					</expression>
				</outbound>
			</attribute>

			<attribute>
				<ref>ri:cn</ref>
				<displayName>Common Name</displayName>
				<outbound>
					<source>
						<path>fullName</path>
					</source>
				</outbound>
			</attribute>

			<attribute>
				<ref>ri:sn</ref>
				<outbound>
					<source>
						<path>familyName</path>
					</source>
				</outbound>
			</attribute>

			<attribute>
				<ref>ri:givenName</ref>
				<outbound>
					<source>
						<path>givenName</path>
					</source>
				</outbound>
			</attribute>

			<attribute>
				<ref>ri:isMemberOf</ref>
			</attribute>

			<protected>
       			<filter>
	       			<q:equal>
	       				<q:matching>http://prism.evolveum.com/xml/ns/public/matching-rule-3#stringIgnoreCase</q:matching>
		            	<q:path>attributes/ri:dn</q:path>
		                <q:value>cn=Directory Manager</q:value>
		            </q:equal>
	            </filter>
			</protected>

			<activation>
				<administrativeStatus>
					<outbound />
					<inbound />
				</administrativeStatus>
			</activation>

			<credentials>
				<password>
					<outbound />
				</password>
			</credentials>

		</objectType>

		<objectType>
			<kind>entitlement</kind>
			<intent>virtualstatic</intent>
			<description>virtual-static-group</description>
			<objectClass>ri:groupOfUniqueNames</objectClass>
			<auxiliaryObjectClass>ri:ds-virtual-static-group</auxiliaryObjectClass>
			<attribute>
				<ref>ri:entryUUID</ref>
				<limitations>
					<access>
						<read>true</read>
						<add>false</add>
						<modify>false</modify>
					</access>
				</limitations>
			</attribute>
			<attribute>
				<ref>ri:dn</ref>
				<outbound>
					<strength>strong</strength>
					<source>
						<path>name</path>
					</source>
					<expression>

					</expression>
				</outbound>
			</attribute>

			<attribute>
				<ref>ri:uniqueMember</ref>

			</attribute>
			<attribute>
				<ref>ri:ds-target-group-dn</ref>
				<outbound>
					<strength>strong</strength>
					<source>
						<path>name</path>
					</source>
					<expression>

					</expression>
				</outbound>
			</attribute>
		</objectType>
		<objectType>
			<kind>generic</kind>
			<intent>dynamic</intent>
			<description>dynamic group </description>
			<objectClass>ri:groupOfURLs</objectClass>
			<attribute>
				<ref>ri:entryUUID</ref>
				<limitations>
					<access>
						<read>true</read>
						<add>false</add>
						<modify>false</modify>
					</access>
				</limitations>
			</attribute>
			<attribute>
				<ref>ri:dn</ref>
				<displayName>Distinguished Name</displayName>
				<limitations>
					<minOccurs>0</minOccurs>
					<maxOccurs>1</maxOccurs>
					<access>
                        <read>true</read>
						<add>true</add>
						<modify>true</modify>
					</access>
				</limitations>
				<outbound>
					<strength>strong</strength>
					<source>
						<path>name</path>
					</source>
					<expression>

					</expression>
				</outbound>
			</attribute>
			<attribute>
				<ref>ri:memberURL</ref>
				<outbound>
					<strength>strong</strength>
					<source>
						<path>name</path>
					</source>
					<expression>

					</expression>
				</outbound>
			</attribute>
		</objectType>

	</schemaHandling>

	<capabilities>
		<configured
			xmlns:cap="http://midpoint.evolveum.com/xml/ns/public/resource/capabilities-3">
			<cap:activation>
				<cap:status>
					<cap:attribute>ri:ds-pwp-account-disabled</cap:attribute>
					<cap:enableValue />
					<cap:disableValue>true</cap:disableValue>
				</cap:status>
			</cap:activation>
		</configured>
	</capabilities>

</resource>


text:
package eu.ydp.empiria.player.client.gin.module;

import com.google.gwt.inject.client.AbstractGinModule;
import eu.ydp.empiria.player.client.module.img.picture.player.view.PicturePlayerView;
import eu.ydp.empiria.player.client.module.img.picture.player.view.PicturePlayerViewImpl;

public class PicturePlayerGinModule extends AbstractGinModule {

    @Override
    protected void configure() {
        bind(PicturePlayerView.class).to(PicturePlayerViewImpl.class);
    }
}


text: This directory contains the tables and templates for generating instruction lookups


text:
title: "Things to know - Amazon Aurora DB"

date: 24-02-2020

link: https://medium.com/@deepaksood619/things-to-know-amazon-aurora-db-b170ee067f06

categories:
  - Technology

tags:
  - Databases
  - Amazon Aurora
  - AWS
---


text:
from .PoolBasedBinaryClassification import *
from .Info import *


text:
module Azure::ARM::ServiceBus
  module Models
    #
    # Parameters supplied to the Create Or Update Subscription operation.
    #
    class SubscriptionCreateOrUpdateParameters

      include MsRestAzure

      # @return [String] Subscription data center location.
      attr_accessor :location

      # @return [String] Resource manager type of the resource.
      attr_accessor :type

      # @return [DateTime] Last time there was a receive request to this
      # subscription.
      attr_accessor :accessed_at

      # @return [String] TimeSpan idle interval after which the topic is
      # automatically deleted. The minimum duration is 5 minutes.
      attr_accessor :auto_delete_on_idle

      # @return [MessageCountDetails]
      attr_accessor :count_details

      # @return [DateTime] Exact time the message was created.
      attr_accessor :created_at

      # @return [String] Default message time to live value. This is the
      # duration after which the message expires, starting from when the
      # message is sent to Service Bus. This is the default value used when
      # TimeToLive is not set on a message itself.
      attr_accessor :default_message_time_to_live

      # @return [Boolean] Value that indicates whether a subscription has dead
      # letter support on filter evaluation exceptions.
      attr_accessor :dead_lettering_on_filter_evaluation_exceptions

      # @return [Boolean] Value that indicates whether a subscription has dead
      # letter support when a message expires.
      attr_accessor :dead_lettering_on_message_expiration

      # @return [Boolean] Value that indicates whether server-side batched
      # operations are enabled.
      attr_accessor :enable_batched_operations

      # @return [EntityAvailabilityStatus] Entity availability status for the
      # topic. Possible values include: 'Available', 'Limited', 'Renaming',
      # 'Restoring', 'Unknown'
      attr_accessor :entity_availability_status

      # @return [Boolean] Value that indicates whether the entity description
      # is read-only.
      attr_accessor :is_read_only

      # @return [String] The lock duration time span for the subscription.
      attr_accessor :lock_duration

      # @return [Integer] Number of maximum deliveries.
      attr_accessor :max_delivery_count

      # @return [Integer] Number of messages.
      attr_accessor :message_count

      # @return [Boolean] Value indicating if a subscription supports the
      # concept of sessions.
      attr_accessor :requires_session

      # @return [EntityStatus] Enumerates the possible values for the status of
      # a messaging entity. Possible values include: 'Active', 'Creating',
      # 'Deleting', 'Disabled', 'ReceiveDisabled', 'Renaming', 'Restoring',
      # 'SendDisabled', 'Unknown'
      attr_accessor :status

      # @return [DateTime] The exact time the message was updated.
      attr_accessor :updated_at

      #
      # Mapper for SubscriptionCreateOrUpdateParameters class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          required: false,
          serialized_name: 'SubscriptionCreateOrUpdateParameters',
          type: {
            name: 'Composite',
            class_name: 'SubscriptionCreateOrUpdateParameters',
            model_properties: {
              location: {
                required: true,
                serialized_name: 'location',
                type: {
                  name: 'String'
                }
              },
              type: {
                required: false,
                serialized_name: 'type',
                type: {
                  name: 'String'
                }
              },
              accessed_at: {
                required: false,
                serialized_name: 'properties.accessedAt',
                type: {
                  name: 'DateTime'
                }
              },
              auto_delete_on_idle: {
                required: false,
                serialized_name: 'properties.autoDeleteOnIdle',
                type: {
                  name: 'String'
                }
              },
              count_details: {
                required: false,
                serialized_name: 'properties.countDetails',
                type: {
                  name: 'Composite',
                  class_name: 'MessageCountDetails'
                }
              },
              created_at: {
                required: false,
                serialized_name: 'properties.createdAt',
                type: {
                  name: 'DateTime'
                }
              },
              default_message_time_to_live: {
                required: false,
                serialized_name: 'properties.defaultMessageTimeToLive',
                type: {
                  name: 'String'
                }
              },
              dead_lettering_on_filter_evaluation_exceptions: {
                required: false,
                serialized_name: 'properties.deadLetteringOnFilterEvaluationExceptions',
                type: {
                  name: 'Boolean'
                }
              },
              dead_lettering_on_message_expiration: {
                required: false,
                serialized_name: 'properties.deadLetteringOnMessageExpiration',
                type: {
                  name: 'Boolean'
                }
              },
              enable_batched_operations: {
                required: false,
                serialized_name: 'properties.enableBatchedOperations',
                type: {
                  name: 'Boolean'
                }
              },
              entity_availability_status: {
                required: false,
                serialized_name: 'properties.entityAvailabilityStatus',
                type: {
                  name: 'Enum',
                  module: 'EntityAvailabilityStatus'
                }
              },
              is_read_only: {
                required: false,
                serialized_name: 'properties.isReadOnly',
                type: {
                  name: 'Boolean'
                }
              },
              lock_duration: {
                required: false,
                serialized_name: 'properties.lockDuration',
                type: {
                  name: 'String'
                }
              },
              max_delivery_count: {
                required: false,
                serialized_name: 'properties.maxDeliveryCount',
                type: {
                  name: 'Number'
                }
              },
              message_count: {
                required: false,
                serialized_name: 'properties.messageCount',
                type: {
                  name: 'Number'
                }
              },
              requires_session: {
                required: false,
                serialized_name: 'properties.requiresSession',
                type: {
                  name: 'Boolean'
                }
              },
              status: {
                required: false,
                serialized_name: 'properties.status',
                type: {
                  name: 'Enum',
                  module: 'EntityStatus'
                }
              },
              updated_at: {
                required: false,
                serialized_name: 'properties.updatedAt',
                type: {
                  name: 'DateTime'
                }
              }
            }
          }
        }
      end
    end
  end
end


text:
from django.test import TestCase, Client
from django.shortcuts import reverse
import faker
from . import factories

class ProfileTest(TestCase):
    def setUp(self):
        client = Client()
        self.user = factories.HousingUserFactory()
        self.listings = factories.ListingFactory.create_batch(listing_owner=self.user, size=5)

        client.force_login(self.user)

        self.profile_url = reverse('listings:profile')
        self.response = client.get(self.profile_url)

    def get_edit_listing_url(self, listing):
        return reverse('listings:edit', kwargs={"listing_id": listing.pk})

    def test_get_listings(self):
        for listing in self.user.get_listings:
            self.assertIn(listing, self.listings)

    def test_return_status_is_successful(self):
        self.assertEquals(self.response.status_code, 200)

    def test_edit_listing_url_renders(self):
        for listing in self.listings:
            url = self.get_edit_listing_url(listing)
            content = str(self.response.content)

            self.assertIn(url, content)


text:
PATH := ./node_modules/.bin:${PATH}
SRC = src
DOCS = docs
COVERAGE_FILE = $(DOCS)/coverage.html
TESTS = test/*.coffee
REPORTER = dot

all: build

init:
	npm install

lint:
	@NODE_ENV=lint coffeelint $(SRC)/*.coffee

lint-tests:
	@NODE_ENV=lint coffeelint $(TESTS)

test:
	@NODE_ENV=test mocha \
		--compilers coffee:coffee-script/register \
		--reporter $(REPORTER) \
		--timeout 5000 \
		--growl \
		$(TESTS)

test-cov:
	@mkdir -p $(DOCS)
	@NODE_ENV=test mocha \
		--require blanket \
		--compilers coffee:coffee-script/register \
		--reporter html-cov \
		--timeout 5000 \
		--growl \
		$(TESTS) > $(COVERAGE_FILE)

docs:
	@NODE_ENV=docs codo $(SRC) --output=$(DOCS)

clean-docs:
	rm -rf $(DOCS)

clean: clean-docs
	rm -rf lib/ test/*.js

build:
	coffee --bare --compile --output lib src/ && \
	coffee --bare --compile test/

dist: clean init docs build lint test

publish: dist
	npm publish

.PHONY: test-cov test docs init clean-docs clean build dist publish \
		lint lint-tests


text:
<template name="css">
  <style>

      {{elementColors}}

      body, textarea, input, button, input[type="submit"], input[type="button"]{
        font-family: {{getSetting 'fontFamily'}};
      }

      body{
        background: {{getSetting "backgroundCSS"}};
      }

      .logo-image a{
        max-height:{{getSetting "logoHeight"}}px;
        max-width:{{getSetting "logoWidth"}}px;
      }

      {{hideAuthClass}}

      @media screen and (max-width: 600px) {
        /* find a way to get rid of this */
        .post-discuss .icon, .post-discuss .action-count{
          color: {{getSetting "buttonColor"}};
        }
      }

  </style>
  <link href='{{getSetting 'fontUrl'}}' rel='stylesheet' type='text/css'>
</template>


text:
<?php

require_once( 'Light/Database/Selector.php' );
require_once( 'CTM/Test/Suite/Plan.php' );

class CTM_Test_Suite_Plan_Selector extends Light_Database_Selector
{
   public function init()
   {
      $this->setDbObject('CTM_Test_Suite_Plan');
   }
}


text:
#ifndef PCL_FPFH_OMP_H_
#define PCL_FPFH_OMP_H_

#include <pcl/features/feature.h>
#include <pcl/features/fpfh.h>

namespace pcl
{
  /** \brief FPFHEstimationOMP estimates the Fast Point Feature Histogram (FPFH) descriptor for a given point cloud
    * dataset containing points and normals, in parallel, using the OpenMP standard.
    *
    * \note If you use this code in any academic work, please cite:
    *
    *   - R.B. Rusu, N. Blodow, M. Beetz.
    *     Fast Point Feature Histograms (FPFH) for 3D Registration.
    *     In Proceedings of the IEEE International Conference on Robotics and Automation (ICRA),
    *     Kobe, Japan, May 12-17 2009.
    *   - R.B. Rusu, A. Holzbach, N. Blodow, M. Beetz.
    *     Fast Geometric Point Labeling using Conditional Random Fields.
    *     In Proceedings of the 22nd IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS),
    *     St. Louis, MO, USA, October 11-15 2009.
    *
    * \attention
    * The convention for FPFH features is:
    *   - if a query point's nearest neighbors cannot be estimated, the FPFH feature will be set to NaN
    *     (not a number)
    *   - it is impossible to estimate a FPFH descriptor for a point that
    *     doesn't have finite 3D coordinates. Therefore, any point that contains
    *     NaN data on x, y, or z, will have its FPFH feature property set to NaN.
    *
    * \author Radu B. Rusu
    * \ingroup features
    */
  template <typename PointInT, typename PointNT, typename PointOutT>
  class FPFHEstimationOMP : public FPFHEstimation<PointInT, PointNT, PointOutT>
  {
    public:
      using Feature<PointInT, PointOutT>::feature_name_;
      using Feature<PointInT, PointOutT>::getClassName;
      using Feature<PointInT, PointOutT>::indices_;
      using Feature<PointInT, PointOutT>::k_;
      using Feature<PointInT, PointOutT>::search_parameter_;
      using Feature<PointInT, PointOutT>::input_;
      using Feature<PointInT, PointOutT>::surface_;
      using FeatureFromNormals<PointInT, PointNT, PointOutT>::normals_;
      using FPFHEstimation<PointInT, PointNT, PointOutT>::hist_f1_;
      using FPFHEstimation<PointInT, PointNT, PointOutT>::hist_f2_;
      using FPFHEstimation<PointInT, PointNT, PointOutT>::hist_f3_;
      using FPFHEstimation<PointInT, PointNT, PointOutT>::weightPointSPFHSignature;

      typedef typename Feature<PointInT, PointOutT>::PointCloudOut PointCloudOut;

      /** \brief Empty constructor. */
      FPFHEstimationOMP () : nr_bins_f1_ (11), nr_bins_f2_ (11), nr_bins_f3_ (11), threads_ (1)
      {
        feature_name_ = "FPFHEstimationOMP";
      };

      /** \brief Initialize the scheduler and set the number of threads to use.
        * \param[in] nr_threads the number of hardware threads to use (-1 sets the value back to automatic)
        */
      FPFHEstimationOMP (unsigned int nr_threads) : nr_bins_f1_ (11), nr_bins_f2_ (11), nr_bins_f3_ (11), threads_ (0)
      {
        setNumberOfThreads (nr_threads);
      }

      /** \brief Initialize the scheduler and set the number of threads to use.
        * \param[in] nr_threads the number of hardware threads to use (-1 sets the value back to automatic)
        */
      inline void
      setNumberOfThreads (unsigned int nr_threads)
      {
        if (nr_threads == 0)
          nr_threads = 1;
        threads_ = nr_threads;
      }

    private:
      /** \brief Estimate the Fast Point Feature Histograms (FPFH) descriptors at a set of points given by
        * <setInputCloud (), setIndices ()> using the surface in setSearchSurface () and the spatial locator in
        * setSearchMethod ()
        * \param[out] output the resultant point cloud model dataset that contains the FPFH feature estimates
        */
      void
      computeFeature (PointCloudOut &output);

    public:
      /** \brief The number of subdivisions for each angular feature interval. */
      int nr_bins_f1_, nr_bins_f2_, nr_bins_f3_;
    private:
      /** \brief The number of threads the scheduler should use. */
      unsigned int threads_;

      /** \brief Make the computeFeature (&Eigen::MatrixXf); inaccessible from outside the class
        * \param[out] output the output point cloud
        */
      void
      computeFeatureEigen (pcl::PointCloud<Eigen::MatrixXf> &) {}
  };
}

#endif  //#ifndef PCL_FPFH_OMP_H_