text:
******
Tracks
******

.. module:: spotify
    :noindex:

.. autoclass:: Track

.. autoclass:: TrackAvailability
    :no-inherited-members:

.. autoclass:: TrackOfflineStatus
    :no-inherited-members:


text:
from .auto_rest_long_running_operation_test_service import AutoRestLongRunningOperationTestService
from .version import VERSION

__all__ = ['AutoRestLongRunningOperationTestService']

__version__ = VERSION

redpajama_set_name: RedPajamaGithub


text:
angular.module('starter', ['ionic', 'starter.controllers'])

.run(function($ionicPlatform) {
  $ionicPlatform.ready(function() {
    // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
    // for form inputs).
    // The reason we default this to hidden is that native apps don't usually show an accessory bar, at
    // least on iOS. It's a dead giveaway that an app is using a Web View. However, it's sometimes
    // useful especially with forms, though we would prefer giving the user a little more room
    // to interact with the app.
    if (window.cordova && window.Keyboard) {
      window.Keyboard.hideKeyboardAccessoryBar(true);
    }

    if (window.StatusBar) {
      // Set the statusbar to use the default style, tweak this to
      // remove the status bar on iOS or change it to use white instead of dark colors.
      StatusBar.styleDefault();
    }
  });
})

.config(function($stateProvider, $urlRouterProvider) {
  $stateProvider

    .state('app', {
    url: '/app',
    abstract: true,
    templateUrl: 'templates/menu.html',
    controller: 'AppCtrl'
  })

  .state('app.search', {
    url: '/search',
    views: {
      'menuContent': {
        templateUrl: 'templates/search.html'
      }
    }
  })

  .state('app.browse', {
      url: '/browse',
      views: {
        'menuContent': {
          templateUrl: 'templates/browse.html'
        }
      }
    })
    .state('app.playlists', {
      url: '/playlists',
      views: {
        'menuContent': {
          templateUrl: 'templates/playlists.html',
          controller: 'PlaylistsCtrl'
        }
      }
    })

  .state('app.single', {
    url: '/playlists/:playlistId',
    views: {
      'menuContent': {
        templateUrl: 'templates/playlist.html',
        controller: 'PlaylistCtrl'
      }
    }
  });
  // if none of the above states are matched, use this as the fallback
  $urlRouterProvider.otherwise('/app/playlists');
});


text:
<!doctype html>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">

    <title>Frans Chaniago</title>

            Frans Chaniago
            <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav">

            </button>

                        About Me

                        Education

                        Experience

                        Skills

                        Linkedin

Frans Chaniago

@Backend Developer

Tangerang, Banten

Few words about me,

                    Full time Software Engineer  (Back-End Developer). Always interested in learning new technologies. Loves to solve programming/algorithmic problems and write useful code.

                    Amd.kom from BSI University.

                    As a software engineer, though my primary focus is on  Back-end development. I have professional expertise on PHP & Laravel Framework and Back-end Service development.

                    Writing code as a full time software engineer from 2016, I have completed several projects in Laravel Framework.

EDUCATION

Information System

                    BSI University

                    3.50

Tangerang, Banten

                        https://www.bsi.ac.id/

EXPERIENCE

Backend Programmer

                    PT Web Architect Indonesia

Slipi, Jakarta Barat

                    November 2018 - Ongoing

Uses: Laravel Framework

A few words on what I am doing here

I work as a Laravel backend engineer.

I write RESTful API and solve hard problem solving tasks.

Discuss requirements with other team and design system.

Staff IT

                    PT Victoria Care Indonesia, Tbk.

Kembangan, Jakarta Barat

                    April 2017 - October 2018

Uses: Codeigniter Framework

A few words on what I am doing here

I work as a CI backend engineer.

Discuss requirements with other team and design system.

Fullstack Programmer

                    CV ACTdisain

Kalideres, Jakarta Barat

                    February 2016 - March 2017

Uses: Codeigniter Framework

A few words on what I am doing here

I work as a Fullstack programmer use PHP Native.

Discuss requirements with other team and design system.

SKILLS

                                PHP
                                Javascript
                                Laravel
                                Codeiginiter

                                Mysql
                              Git
                                Mysql


text:
using System;
using System.Security.Cryptography;
using System.Text;

namespace OmnitureApiConsumer.Utils
{
    /// <summary>
    /// This utility class provides helper methods to authenticate with Omniture Analytics Reporting API 1.4.
    ///
    /// Sample test data generated using the Omniture API explorer:
    /// https://developer.omniture.com/en_US/get-started/api-explorer
    /// Username: randomName:RandomCompany
    /// Secret: 92cc3685bd9b9f5c9d141fa241aa747e
    /// Generated Header: X-WSSE: UsernameToken Username="randomName:RandomCompany", PasswordDigest="e2fSxqZDVgAQEI9OCvY/vho4C2k=", Nonce="MTRkZTJhMGNiNGMwYWZlOWU5YmRmYzhk", Created="2014-03-16T04:10:43Z"
    /// </summary>
    internal class OmnitureAuthUtils
    {
        #region Private Properties

        private const string HeadersFormatString =
            "X-WSSE: UsernameToken Username=\"{0}\", PasswordDigest=\"{1}\", Nonce=\"{2}\", Created=\"{3}\"";

        private static readonly RNGCryptoServiceProvider Random = new RNGCryptoServiceProvider();

        #endregion

        /// <summary>
        /// Given a username and secret key, generates the Omniture API authentication headers.
        /// </summary>
        /// <param name="username">Username string</param>
        /// <param name="secret">Secret key string</param>
        /// <returns>X-WSSE Header string</returns>
        public static string GetAuthenticationHeaders(string username, string secret)
        {
            var nonce = GenerateNonce(24);
            var timestamp = GenerateTimestamp();
            var digest = GetBase64Digest(nonce, timestamp, secret);
            return string.Format(HeadersFormatString, username, digest, EncodeToBase64(nonce), timestamp);
        }

        #region Private Helper Methods

        /// <summary>
        /// Encripts secret key with base-64 SHA1 digest as specified by the Omniture API.
        /// </summary>
        /// <param name="nonce">Nonce string</param>
        /// <param name="timeCreated">ISO8601 time string in "yyyy-MM-ddTHH:mm:ssZ" format</param>
        /// <param name="secret">Secret key string</param>
        /// <returns>SHA1 digest encoded to base-64</returns>
        private static string GetBase64Digest(string nonce, string timeCreated, string secret)
        {
            var input = nonce + timeCreated + secret;
            var sha = new SHA1Managed();
            var asciiEncoding = new ASCIIEncoding();
            var byteData = asciiEncoding.GetBytes(input);
            var digest = sha.ComputeHash(byteData);
            return Convert.ToBase64String(digest);
        }

        /// <summary>
        /// Generates an arbitrary number of specified length to be used only once for authentication.
        /// The number is base-64 encoded as per the Omniture API specification.
        /// </summary>
        /// <param name="length">Length of the generated nonce</param>
        /// <returns>Nonce of specified length</returns>
        private static string GenerateNonce(int length)
        {
            var data = new byte[length];
            Random.GetNonZeroBytes(data);
            return EncodeToBase16(MD5.Create().ComputeHash(data));
        }

        /// <summary>
        /// Generates the timestamp in ISO8601 format ("yyyy-MM-ddTHH:mm:ssZ") as specified by the Omniture API.
        /// </summary>
        /// <returns>ISO8601 formatted timestamp</returns>
        private static string GenerateTimestamp()
        {
            return DateTime.UtcNow.ToString("yyyy-MM-ddTHH:mm:ssZ");
        }

        /// <summary>
        /// Converts the given string data to its equivalent base-64 representation.
        /// </summary>
        /// <param name="data">Data string to encode</param>
        /// <returns>Encoded string</returns>
        private static string EncodeToBase64(string data)
        {
            return Convert.ToBase64String(Encoding.UTF8.GetBytes(data));
        }

        /// <summary>
        /// Converts the given byte array to its equivalent base-16 (hex) representation.
        /// </summary>
        /// <param name="data">Byte array to encode</param>
        /// <returns>Encoded string</returns>
        private static string EncodeToBase16(byte[] data)
        {
            var hex = BitConverter.ToString(data);
            return hex.Replace("-", "");
        }

        #endregion

    }
}


text:
//SERVEUR:

#include <stdlib.h>
#include <stdio.h>
#include <dos.h>
#include <conio.h>
#include <winsock2.h>
#pragma comment(lib, "ws2_32.lib" )

int main()
{
 WSADATA WSAData;
 WSAStartup(MAKEWORD(2,0), &WSAData);

 SOCKET sock;
 SOCKADDR_IN sin;
 SOCKADDR_IN csin;

 sock = socket(AF_INET, SOCK_STREAM, 0);
 sin.sin_addr.s_addr = INADDR_ANY;
 sin.sin_family     = AF_INET;
 sin.sin_port     = htons(4444);

        bind(sock, (SOCKADDR *)&sin, sizeof(sin));
 listen(sock, 0);
        printf("Attente d'une connection...\n" );
 int sinsize = sizeof(csin);

 sock = accept(sock, (SOCKADDR *)&csin, &sinsize);
 printf("connection etablie\n\n" );
 u_long argp=1;     /*mode non bloquant*/
 ioctlsocket(sock, FIONBIO, &argp);

 do
 {

/*dialogue entre les untilisateurs avec "recv()" et "send()" */

 bind(sock, (SOCKADDR *)&sin, sizeof(sin));
 listen(sock, 0);
 int sinsize = sizeof(csin);

 sock = accept(sock, (SOCKADDR *)&csin, &sinsize);
 printf("OK" ); /*J'ai ajouté ca dans la boucle pour rendre le serveur dispo nimporte quant*/

 Sleep(10);/*pour pas bloquer le CPU*/
 }while(!quit);

//CLIENT :Je le lance 2 fois ce prog pour avoir 3personnes connectés
//(2 Clients + 1 Serveur)

#include <stdlib.h>
#include <stdio.h>
#include <conio.h>
#include <dos.h>
#include <winsock2.h>
#pragma comment (lib,"ws2_32.lib" )

int main()
{
 WSADATA WSAData;
 WSAStartup(MAKEWORD(2,0), &WSAData);

 SOCKET sock;
 SOCKADDR_IN sin;
 char ip[16];

 textcolor(10);
 cprintf("Entrer l'adresse IP du serveur\r\n" );
 gets(ip);

 sock = socket(AF_INET, SOCK_STREAM, 0);
 sin.sin_addr.s_addr = inet_addr(ip);
 sin.sin_family     = AF_INET;
 sin.sin_port     = htons(4444);

 connect(sock, (SOCKADDR *)&sin, sizeof(sin));
 u_long argp=1; /* pour passer en mode non bloquant */
 ioctlsocket(sock, FIONBIO, &argp);

 	do
 	{

 /*dialogue entre les untilisateurs avec "recv()" et "send()" */
 	Sleep(10);/*pour pas bloquer le CPU*/
 	}while(!quit);

 closesocket(sock);/*fermeture*/
 WSACleanup();
 return(0);
}


text:
<!DOCTYPE html>

<title>Icons Bootstrap</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="UTF-8">
<link rel="stylesheet" href="normalize.css">
<link rel="stylesheet" href="GGF.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">

Using Bootstrap Icons

    Welcome!

    Welcome!

 Home

 Home

 Home

 Home

 Home

 Home

<button class="ggf-btn ggf-gradient-sunrise ggf-xlarge">Button</button>

<link rel="stylesheet" href="GGF.css">


text:
/**
 * Returns a boolean telling us if a given object is an array
 *
 * @name isArray
 * @method
 * @memberof Frampton.Utils
 * @param {Object} arr
 * @returns {Boolean}
 */
export default function is_array(arr: any): boolean {
  return ((Array.isArray) ?
    Array.isArray(arr) :
    Object.prototype.toString.call(arr) === "[object Array]");
}


text:
package parcel

import (
	"context"
	"testing"
)

func TestTracking(t *testing.T) {
	client := ApiClient{}
	trackResp, err := client.Tracking(context.Background(), "3SBPB0000094346")
	if err != nil {
		t.Fatalf("Unexpected error: '%v", err)
	}

	if len(trackResp.Events) == 0 {
		t.Fatalf("Expected tracking event but got nothing")
	}
}


text:
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

/** @typedef {{eventName: string, uid: number}} */
// eslint-disable-next-line no-var
var WebUIListener;

/** Platform, package, object property, and Event support. **/
// eslint-disable-next-line no-var
var cr = cr || function(global) {
  'use strict';

  /**
   * Builds an object structure for the provided namespace path,
   * ensuring that names that already exist are not overwritten. For
   * example:
   * "a.b.c" -> a = {};a.b={};a.b.c={};
   * @param {string} name Name of the object that this file defines.
   * @return {!Object} The last object exported (i.e. exportPath('cr.ui')
   *     returns a reference to the ui property of window.cr).
   * @private
   */
  function exportPath(name) {
    const parts = name.split('.');
    let cur = global;

    for (let part; parts.length && (part = parts.shift());) {
      if (part in cur) {
        cur = cur[part];
      } else {
        cur = cur[part] = {};
      }
    }
    return cur;
  }

  /**
   * Fires a property change event on the target.
   * @param {EventTarget} target The target to dispatch the event on.
   * @param {string} propertyName The name of the property that changed.
   * @param {*} newValue The new value for the property.
   * @param {*} oldValue The old value for the property.
   */
  function dispatchPropertyChange(target, propertyName, newValue, oldValue) {
    const e = new Event(propertyName + 'Change');
    e.propertyName = propertyName;
    e.newValue = newValue;
    e.oldValue = oldValue;
    target.dispatchEvent(e);
  }

  /**
   * Converts a camelCase javascript property name to a hyphenated-lower-case
   * attribute name.
   * @param {string} jsName The javascript camelCase property name.
   * @return {string} The equivalent hyphenated-lower-case attribute name.
   */
  function getAttributeName(jsName) {
    return jsName.replace(/([A-Z])/g, '-$1').toLowerCase();
  }

  /**
   * The kind of property to define in {@code Object.defineProperty}.
   * @enum {string}
   * @const
   */
  const PropertyKind = {
    /**
     * Plain old JS property where the backing data is stored as a "private"
     * field on the object.
     * Use for properties of any type. Type will not be checked.
     */
    JS: 'js',

    /**
     * The property backing data is stored as an attribute on an element.
     * Use only for properties of type {string}.
     */
    ATTR: 'attr',

    /**
     * The property backing data is stored as an attribute on an element. If the
     * element has the attribute then the value is true.
     * Use only for properties of type {boolean}.
     */
    BOOL_ATTR: 'boolAttr',
  };

  /**
   * Helper function for defineProperty that returns the getter to use for the
   * property.
   * @param {string} name The name of the property.
   * @param {PropertyKind} kind The kind of the property.
   * @return {function():*} The getter for the property.
   */
  function getGetter(name, kind) {
    let attributeName;
    switch (kind) {
      case PropertyKind.JS:
        const privateName = name + '_';
        return function() {
          return this[privateName];
        };
      case PropertyKind.ATTR:
        attributeName = getAttributeName(name);
        return function() {
          return this.getAttribute(attributeName);
        };
      case PropertyKind.BOOL_ATTR:
        attributeName = getAttributeName(name);
        return function() {
          return this.hasAttribute(attributeName);
        };
    }

    // TODO(dbeam): replace with assertNotReached() in assert.js when I can coax
    // the browser/unit tests to preprocess this file through grit.
    throw new Error('not reached');
  }

  /**
   * Helper function for defineProperty that returns the setter of the right
   * kind.
   * @param {string} name The name of the property we are defining the setter
   *     for.
   * @param {PropertyKind} kind The kind of property we are getting the
   *     setter for.
   * @param {function(*, *):void=} setHook A function to run after the
   *     property is set, but before the propertyChange event is fired.
   * @return {function(*):void} The function to use as a setter.
   */
  function getSetter(name, kind, setHook) {
    let attributeName;
    switch (kind) {
      case PropertyKind.JS:
        const privateName = name + '_';
        return function(value) {
          const oldValue = this[name];
          if (value !== oldValue) {
            this[privateName] = value;
            if (setHook) {
              setHook.call(this, value, oldValue);
            }
            dispatchPropertyChange(this, name, value, oldValue);
          }
        };

      case PropertyKind.ATTR:
        attributeName = getAttributeName(name);
        return function(value) {
          const oldValue = this[name];
          if (value !== oldValue) {
            if (value === undefined) {
              this.removeAttribute(attributeName);
            } else {
              this.setAttribute(attributeName, value);
            }
            if (setHook) {
              setHook.call(this, value, oldValue);
            }
            dispatchPropertyChange(this, name, value, oldValue);
          }
        };

      case PropertyKind.BOOL_ATTR:
        attributeName = getAttributeName(name);
        return function(value) {
          const oldValue = this[name];
          if (value !== oldValue) {
            if (value) {
              this.setAttribute(attributeName, name);
            } else {
              this.removeAttribute(attributeName);
            }
            if (setHook) {
              setHook.call(this, value, oldValue);
            }
            dispatchPropertyChange(this, name, value, oldValue);
          }
        };
    }

    // TODO(dbeam): replace with assertNotReached() in assert.js when I can coax
    // the browser/unit tests to preprocess this file through grit.
    throw new Error('not reached');
  }

  /**
   * Returns a getter and setter to be used as property descriptor in
   * Object.defineProperty(). When the setter changes the value a property
   * change event with the type {@code name + 'Change'} is fired.
   * @param {string} name The name of the property.
   * @param {PropertyKind=} kind What kind of underlying storage to use.
   * @param {function(*, *):void=} setHook A function to run after the
   *     property is set, but before the propertyChange event is fired.
   */
  function getPropertyDescriptor(name, kind = PropertyKind.JS, setHook) {
    const desc = {
      get: getGetter(name, kind),
      set: getSetter(name, kind, setHook),
    };
    return desc;
  }

  /**
   * Counter for use with createUid
   */
  let uidCounter = 1;

  /**
   * @return {number} A new unique ID.
   */
  function createUid() {
    return uidCounter++;
  }

  /**
   * Dispatches a simple event on an event target.
   * @param {!EventTarget} target The event target to dispatch the event on.
   * @param {string} type The type of the event.
   * @param {boolean=} bubbles Whether the event bubbles or not.
   * @param {boolean=} cancelable Whether the default action of the event
   *     can be prevented. Default is true.
   * @return {boolean} If any of the listeners called {@code preventDefault}
   *     during the dispatch this will return false.
   */
  function dispatchSimpleEvent(target, type, bubbles, cancelable) {
    const e = new Event(
        type,
        {bubbles: bubbles, cancelable: cancelable === undefined || cancelable});
    return target.dispatchEvent(e);
  }

  /**
   * Calls |fun| and adds all the fields of the returned object to the object
   * named by |name|. For example, cr.define('cr.ui', function() {
   *   function List() {
   *     ...
   *   }
   *   function ListItem() {
   *     ...
   *   }
   *   return {
   *     List: List,
   *     ListItem: ListItem,
   *   };
   * });
   * defines the functions cr.ui.List and cr.ui.ListItem.
   * @param {string} name The name of the object that we are adding fields to.
   * @param {!Function} fun The function that will return an object containing
   *     the names and values of the new fields.
   */
  function define(name, fun) {
    const obj = exportPath(name);
    const exports = fun();
    for (const propertyName in exports) {
      // Maybe we should check the prototype chain here? The current usage
      // pattern is always using an object literal so we only care about own
      // properties.
      const propertyDescriptor =
          Object.getOwnPropertyDescriptor(exports, propertyName);
      if (propertyDescriptor) {
        Object.defineProperty(obj, propertyName, propertyDescriptor);
      }
    }
  }

  /**
   * Adds a {@code getInstance} static method that always return the same
   * instance object.
   * @param {!Function} ctor The constructor for the class to add the static
   *     method to.
   */
  function addSingletonGetter(ctor) {
    ctor.getInstance = function() {
      return ctor.instance_ || (ctor.instance_ = new ctor());
    };
  }

  /**
   * The mapping used by the sendWithPromise mechanism to tie the Promise
   * returned to callers with the corresponding WebUI response. The mapping is
   * from ID to the PromiseResolver helper; the ID is generated by
   * sendWithPromise and is unique across all invocations of said method.
   * @type {!Object<!PromiseResolver>}
   */
  const chromeSendResolverMap = {};

  /**
   * The named method the WebUI handler calls directly in response to a
   * chrome.send call that expects a response. The handler requires no knowledge
   * of the specific name of this method, as the name is passed to the handler
   * as the first argument in the arguments list of chrome.send. The handler
   * must pass the ID, also sent via the chrome.send arguments list, as the
   * first argument of the JS invocation; additionally, the handler may
   * supply any number of other arguments that will be included in the response.
   * @param {string} id The unique ID identifying the Promise this response is
   *     tied to.
   * @param {boolean} isSuccess Whether the request was successful.
   * @param {*} response The response as sent from C++.
   */
  function webUIResponse(id, isSuccess, response) {
    const resolver = chromeSendResolverMap[id];
    delete chromeSendResolverMap[id];

    if (isSuccess) {
      resolver.resolve(response);
    } else {
      resolver.reject(response);
    }
  }

  /**
   * A variation of chrome.send, suitable for messages that expect a single
   * response from C++.
   * @param {string} methodName The name of the WebUI handler API.
   * @param {...*} var_args Variable number of arguments to be forwarded to the
   *     C++ call.
   * @return {!Promise}
   */
  function sendWithPromise(methodName, var_args) {
    const args = Array.prototype.slice.call(arguments, 1);
    const promiseResolver = new PromiseResolver();
    const id = methodName + '_' + createUid();
    chromeSendResolverMap[id] = promiseResolver;
    chrome.send(methodName, [id].concat(args));
    return promiseResolver.promise;
  }

  /**
   * A map of maps associating event names with listeners. The 2nd level map
   * associates a listener ID with the callback function, such that individual
   * listeners can be removed from an event without affecting other listeners of
   * the same event.
   * @type {!Object<!Object<!Function>>}
   */
  const webUIListenerMap = {};

  /**
   * The named method the WebUI handler calls directly when an event occurs.
   * The WebUI handler must supply the name of the event as the first argument
   * of the JS invocation; additionally, the handler may supply any number of
   * other arguments that will be forwarded to the listener callbacks.
   * @param {string} event The name of the event that has occurred.
   * @param {...*} var_args Additional arguments passed from C++.
   */
  function webUIListenerCallback(event, var_args) {
    const eventListenersMap = webUIListenerMap[event];
    if (!eventListenersMap) {
      // C++ event sent for an event that has no listeners.
      // TODO(dpapad): Should a warning be displayed here?
      return;
    }

    const args = Array.prototype.slice.call(arguments, 1);
    for (const listenerId in eventListenersMap) {
      eventListenersMap[listenerId].apply(null, args);
    }
  }

  /**
   * Registers a listener for an event fired from WebUI handlers. Any number of
   * listeners may register for a single event.
   * @param {string} eventName The event to listen to.
   * @param {!Function} callback The callback run when the event is fired.
   * @return {!WebUIListener} An object to be used for removing a listener via
   *     cr.removeWebUIListener. Should be treated as read-only.
   */
  function addWebUIListener(eventName, callback) {
    webUIListenerMap[eventName] = webUIListenerMap[eventName] || {};
    const uid = createUid();
    webUIListenerMap[eventName][uid] = callback;
    return {eventName: eventName, uid: uid};
  }

  /**
   * Removes a listener. Does nothing if the specified listener is not found.
   * @param {!WebUIListener} listener The listener to be removed (as returned by
   *     addWebUIListener).
   * @return {boolean} Whether the given listener was found and actually
   *     removed.
   */
  function removeWebUIListener(listener) {
    const listenerExists = webUIListenerMap[listener.eventName] &&
        webUIListenerMap[listener.eventName][listener.uid];
    if (listenerExists) {
      delete webUIListenerMap[listener.eventName][listener.uid];
      return true;
    }
    return false;
  }

  return {
    addSingletonGetter: addSingletonGetter,
    define: define,
    getPropertyDescriptor: getPropertyDescriptor,
    dispatchPropertyChange: dispatchPropertyChange,
    dispatchSimpleEvent: dispatchSimpleEvent,
    PropertyKind: PropertyKind,

    // C++ <-> JS communication related methods.
    addWebUIListener: addWebUIListener,
    removeWebUIListener: removeWebUIListener,
    sendWithPromise: sendWithPromise,
    webUIListenerCallback: webUIListenerCallback,
    webUIResponse: webUIResponse,

    /** Whether we are using a Mac or not. */
    get isMac() {
      return /Mac/.test(navigator.platform);
    },

    /** Whether this is on the Windows platform or not. */
    get isWindows() {
      return /Win/.test(navigator.platform);
    },

    /** Whether this is the ChromeOS/ash web browser. */
    get isChromeOS() {
      let returnValue = false;
      // TODO(https://crbug.com/1118190): grit conditionals do not work in many
      // WebUI tests.
      // <if expr="chromeos_ash">
      returnValue = true;
      // </if>
      return returnValue;
    },

    /** Whether this is the ChromeOS/Lacros web browser. */
    get isLacros() {
      let returnValue = false;
      // TODO(https://crbug.com/1118190): grit conditionals do not work in many
      // WebUI tests.
      // <if expr="chromeos_lacros">
      returnValue = true;
      // </if>
      return returnValue;
    },

    /** Whether this is on vanilla Linux (not chromeOS). */
    get isLinux() {
      return /Linux/.test(navigator.userAgent);
    },

    /** Whether this is on Android. */
    get isAndroid() {
      return /Android/.test(navigator.userAgent);
    },

    /** Whether this is on iOS. */
    get isIOS() {
      return /CriOS/.test(navigator.userAgent);
    },
  };
}(this);


text: define("dojox/atom/widget/nls/it/FeedViewerEntry",({deleteButton:"[Cancella]"}));


text:
<title>Berkeley DB: db join</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">

db join

<tt>

db join
	db.cX
	db.cY
	db.cZ
	...

Description(db join)

The db join command joins the specified cursors and returns a
cursor handle that can be used to iterate through the joined {key data}
pairs.  The returned cursor handle is bound to a Tcl command of the form
dbN.cX, where X is an integer starting at 0 (for example,
db0.c0 and db0.c1).  It is through this Tcl command that the script
accesses the cursor methods.

The returned join cursor has limited cursor functionality, and only the
dbc get and dbc close commands will succeed.

See Equality join for more information on
the underlying requirements for joining.

In a transaction-protected environment, all the cursors listed must have
been created within the same transaction.

In the case of error, a Tcl error is thrown.

</tt>

Copyright (c) 1996,2008 Oracle.  All rights reserved.


text:
package com.commafeed.backend.task;

import java.util.concurrent.TimeUnit;

import javax.inject.Inject;
import javax.inject.Singleton;

import lombok.RequiredArgsConstructor;

import com.commafeed.backend.service.DatabaseCleaningService;

@RequiredArgsConstructor(onConstructor = @__({ @Inject }))
@Singleton
public class OrphanedContentsCleanupTask extends ScheduledTask {

	private final DatabaseCleaningService cleaner;

	@Override
	public void run() {
		cleaner.cleanContentsWithoutEntries();
	}

	@Override
	public long getInitialDelay() {
		return 20;
	}

	@Override
	public long getPeriod() {
		return 60;
	}

	@Override
	public TimeUnit getTimeUnit() {
		return TimeUnit.MINUTES;
	}

}


text:
<?php
// Copyright (c) 2012 The President and Fellows of Harvard College
// Use of this source code is governed by the LICENSE file found in the root of this project.
?>
<?php
App::uses('AppModel', 'Model');
/**
 * RBACL Behavior
 *
 * Enables automatic ACL updates whenever a model's role is changed.
 *
 * Models must implement a getDefaultRole() method so that any time a
 * role isn't specified, a default role is assigned.
 *
 * @package       app.Model.Behavior
 */
class RBACLBehavior extends ModelBehavior {

/**
 * Saves the old role for updating ACL.
 * @var array
 */
	protected $oldRole = array();

/**
 * The name of the role model.
 * @var string
 */
	public $roleModel = 'Role';

/**
 * Setup this behavior with the specified configuration settings.
 *
 * @param Model $Model Model using this behavior
 * @param array $config Configuration settings for $model
 * @return void
 */
	public function setup(Model $Model, $config = array()) {
		if(isset($config['roleModel'])) {
			$this->roleModel = $config['roleModel'];
		}

		App::uses($this->roleModel, 'Model');
	}

/**
 * beforeSave callback
 *
 * @param Model $Model Model using this behavior
 * @param array $options
 * @return boolean
 */
	public function beforeSave(Model $Model, $options = array()) {
		$this->oldRole[$Model->alias] = null;
		if(isset($Model->data[$Model->alias]['id'])) {
			$current = $this->getCurrentRole($Model);
			if($current !== false && !empty($current[$Model->alias]['role_id'])) {
				$this->oldRole[$Model->alias] = array(
					'model' => $this->roleModel,
					'foreign_key' => $current[$Model->alias]['role_id']
				);
			}
		}

		return true;
	}

/**
 * afterSave callback
 *
 * @param Model $Model Model using this behavior
 * @param boolean $created True if this save created a new record
 * @return void
 */
	public function afterSave(Model $Model, $created) {
		if($created) {
			$default = $Model->getDefaultRole();
			$role_id = $default[$this->roleModel]['id'];
			$Model->saveField('role_id', $role_id);

			$this->syncAclRole($Model, array(
				'model' => $this->roleModel,
				'foreign_key' => $role_id
			));
		} else {
			$new_role = array(
				'model' => $this->roleModel,
				'foreign_key' => $Model->field('role_id'),
			);
			$this->syncAclRole($Model, $new_role, $this->oldRole[$Model->alias]);
		}

		return true;
	}

/**
 * syncAclRole method
 *
 * Called by the afterSave model callback.
 * Grants access to the model's new role.
 *
 * @param Model $Model Model using this behavior
 * @param array $new_role
 * @param mixed $old_role
 * @return void
 */
	public function syncAclRole(Model $Model, $new_role, $old_role = null) {
		$aclAdapter = $this->loadAclAdapter();
		if(isset($old_role)) {
			$aclAdapter->inherit($Model, $old_role);
		}
		$aclAdapter->allow($Model, $new_role);
	}

/**
 * loadAclAdapter method
 *
 * @return instance of Acl.classname
 */
	protected function loadAclAdapter() {
		$aclClass = Configure::read('Acl.classname');
		App::uses($aclClass, 'Controller/Component/Acl');

		$aclAdapter = new $aclClass();
		if(!$aclAdapter instanceof AclInterface) {
			throw new CakeException(__d('cake_dev', 'Acl adapters must implement AclInterface'));
		}

		return $aclAdapter;
	}

/**
 * getCurrentRole
 *
 * @param Model $Model Model using this behavior
 * @return array
 */
	public function getCurrentRole(Model $Model) {
		return $Model->find('first', array(
			'recursive' => -1,
			'conditions' => array("{$Model->alias}.id" => $Model->data[$Model->alias]['id'])
		));
	}
}


text:
{% load hq_shared_tags %}

    {{ control_name }}

            <select class="form-control"
                    data-bind="options: children,
                               optionsText: 'display_name',
                               value: selected_child"></select>

        <input name="fixture_id" type="hidden" data-bind="value: selected_fixtid" />


text:
package com.orcs.boomshakalaka.activity.library;

import android.os.Bundle;
import android.support.v7.app.AlertDialog;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;

import com.orcs.boomshakalaka.R;
import com.orcs.boomshakalaka.activity.BaseActivity;
import com.orcs.boomshakalaka.ui.WheelView;

import java.util.Arrays;

/**
 * Created by Administrator on 2016/6/27.
 * WheelView DEMO
 */
public class WheelViewDemoActivity extends BaseActivity
        implements View.OnClickListener {

    private static final String TAG = WheelViewDemoActivity.class.getSimpleName();

    private static final String[] PLANETS =
            new String[]{"Mercury", "Venus", "Earth", "Mars", "Jupiter", "Uranus", "Neptune", "Pluto"};

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_wheelview_demo);

        findViewById(R.id.wheelview_show_dialog_btn).setOnClickListener(this);

    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.wheelview_show_dialog_btn:
                View outerView = LayoutInflater.from(this).inflate(R.layout.view_wheel, null);
                WheelView wv = (WheelView) outerView.findViewById(R.id.wheel_view_wv);
                wv.setOffset(1);
                wv.setItems(Arrays.asList(PLANETS));
                wv.setSeletion(1);
                wv.setOnWheelViewListener(new WheelView.OnWheelViewListener() {
                    @Override
                    public void onSelected(int selectedIndex, String item) {
                        super.onSelected(selectedIndex, item);
                        Log.d(TAG, "selectedIndex: " + selectedIndex + ",------item:" + item);
                    }
                });

                new AlertDialog.Builder(this)
                        .setTitle("WheelView in Dialog")
                        .setView(outerView)
                        .setPositiveButton("确定", null)
                        .setNegativeButton("取消", null)
                        .setCancelable(false)
                        .show();
                break;
            default:
                break;
        }
    }

}


text:
from appconf import AppConf
from django.conf import settings  # noqa

class ConnectedAccountsAppConf(AppConf):
    TWITTER_CONSUMER_KEY = None
    TWITTER_CONSUMER_SECRET = None

    FACEBOOK_CONSUMER_SECRET = None
    FACEBOOK_CONSUMER_KEY = None
    FACEBOOK_SCOPE = ['email', 'public_profile', 'user_friends']
    FACEBOOK_AUTH_PARAMS = {}

    GOOGLE_CONSUMER_SECRET = None
    GOOGLE_CONSUMER_KEY = None
    GOOGLE_SCOPE = ['https://www.googleapis.com/auth/plus.login', 'email']
    GOOGLE_AUTH_PARAMS = {
        'access_type': 'offline',
        'approval_prompt': 'force',
    }

    INSTAGRAM_CONSUMER_KEY = None
    INSTAGRAM_CONSUMER_SECRET = None
    INSTAGRAM_SCOPE = ['basic']

    BITLY_CONSUMER_KEY = None
    BITLY_CONSUMER_SECRET = None

    MAILCHIMP_CONSUMER_KEY = None
    MAILCHIMP_CONSUMER_SECRET = None

    DISQUS_CONSUMER_KEY = None
    DISQUS_CONSUMER_SECRET = None
    DISQUS_SCOPE = ['read', 'write', ]

    class Meta:
        prefix = 'connected_accounts'


text:
/**
 *     This code was auto-generated by a Codezu.
 *
 *     Changes to this file may cause incorrect behavior and will be lost if
 *     the code is regenerated.
 */
package com.mozu.api.contracts.appdev;

import org.joda.time.DateTime;
import java.io.Serializable;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import org.joda.time.DateTime;

/**
 *	Mozu.AppDev.Contracts.PackageSummary ApiType DOCUMENT_HERE
 */
@JsonIgnoreProperties(ignoreUnknown = true)
public class PackageSummary implements Serializable
{
	// Default Serial Version UID
	private static final long serialVersionUID = 1L;

	/**
	 * Application Name
	 */
	protected String applicationName;

	public String getApplicationName() {
		return this.applicationName;
	}

	public void setApplicationName(String applicationName) {
		this.applicationName = applicationName;
	}

	/**
	 * Application Type Id
	 */
	protected Integer applicationTypeId;

	public Integer getApplicationTypeId() {
		return this.applicationTypeId;
	}

	public void setApplicationTypeId(Integer applicationTypeId) {
		this.applicationTypeId = applicationTypeId;
	}

	/**
	 * Unique identifier of the source product property. For a product field it will be the name of the field. For a product attribute it will be the Attribute FQN.
	 */
	protected Integer id;

	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	/**
	 * Application Major Version
	 */
	protected Integer majorVersion;

	public Integer getMajorVersion() {
		return this.majorVersion;
	}

	public void setMajorVersion(Integer majorVersion) {
		this.majorVersion = majorVersion;
	}

	/**
	 * Application Minor Version
	 */
	protected Integer minorVersion;

	public Integer getMinorVersion() {
		return this.minorVersion;
	}

	public void setMinorVersion(Integer minorVersion) {
		this.minorVersion = minorVersion;
	}

	/**
	 * The display name of the source product property. For a product field it will be the display name of the field. For a product attribute it will be the Attribute Name.
	 */
	protected String name;

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	/**
	 * Application Revision
	 */
	protected Integer revision;

	public Integer getRevision() {
		return this.revision;
	}

	public void setRevision(Integer revision) {
		this.revision = revision;
	}

}


text:
/**
* \file Reverberation.cpp
*/

#include <gsl/gsl>

#include <pybind11/pybind11.h>
#include <pybind11/numpy.h>

#include <ATK/Reverberation/AllPassReverbFilter.h>
#include <ATK/Reverberation/LowPassReverbFilter.h>

namespace py = pybind11;

using namespace ATK;

namespace
{
  template<typename Filter, typename T>
  void populate_ReverbFilter(py::module& m, const char* type, T& parent)
  {
    py::class_<Filter>(m, type, parent)
    .def(py::init<gsl::index>(), py::arg("max_delay"))
    .def_property("delay", &Filter::get_delay, &Filter::set_delay)
    .def_property("feedback", &Filter::get_feedback, &Filter::set_feedback);
  }
}

PYBIND11_MODULE(PythonReverberation, m)
{
  m.doc() = "Audio ToolKit Reverberation module";

#if ATK_ENABLE_INSTANTIATION
  py::object f1 = (py::object) py::module::import("ATK.Core").attr("FloatTypedBaseFilter");
#endif
  py::object f2 = (py::object) py::module::import("ATK.Core").attr("DoubleTypedBaseFilter");

#if ATK_ENABLE_INSTANTIATION
  populate_ReverbFilter<AllPassReverbFilter<float>>(m, "FloatAllPassReverbFilter", f1);
  populate_ReverbFilter<LowPassReverbFilter<float>>(m, "FloatLowPassReverbFilter", f1);
#endif
  populate_ReverbFilter<AllPassReverbFilter<double>>(m, "DoubleAllPassReverbFilter", f2);
  populate_ReverbFilter<LowPassReverbFilter<double>>(m, "DoubleLowPassReverbFilter", f2);
}


text:
'use strict';

var mongoose = require('mongoose');
var Schema   = mongoose.Schema;

var postSchema = new Schema({
  title: String,
  subtitle: String,
  content: String,
  createdAt:{ type: Date, default: Date.now },
  user: {
    type: Schema.Types.ObjectId,
    ref: 'User'
  }
});

module.exports = mongoose.model('Post', postSchema);


text:
/**
 * @license
 * file.js: File transport
 *
 * Liberal inspiration taken from https://github.com/flatiron/winston
 *
 * (c) 2012 Panther Development
 * MIT LICENSE
 *
 */

//////////
// Required Includes
///////////////////////////
var util = require('util'),
fs = require('fs'),
path = require('path'),
lumber = require('../../lumber');

/**
 * File Transport
 * @constructor
 * @implements {Transport}
 */
var File = exports.File = function(options) {
    var self = this;

    lumber.Transport.call(self);

    options = options || {};

    self.encoder = lumber.util.checkOption(options.encoder, 'json');
    self.level = lumber.util.checkOption(options.level, 'info');
    self.filename = lumber.util.checkOption(options.filename, path.resolve('app.log'));
    self.filemode = lumber.util.checkOption(options.filemode, '0666');
    self.maxsize = lumber.util.checkOption(options.maxsize, 52428800); //50MB
    self.rotate = lumber.util.checkOption(options.rotate, 10);

    self._size = 0;
    self._buffer = [];

    self.name = 'file';

    if(typeof(self.encoder) == 'string') {
        var e = lumber.util.titleCase(self.encoder);

        if(lumber.encoders[e]) {
            self.encoder = new lumber.encoders[e]();
        } else {
            throw new Error('Unknown encoder passed: ' + self.encoder);
        }
    }

    self.encoding = self.encoder.encoding;
};

//////////
// Inherits from EventEmitter
///////////////////////////
util.inherits(File, lumber.Transport);

//////////
// Public Methods
///////////////////////////
/**
 * Logs the string to the specified file
 * @param {object} args The arguments for the log
 * @param {function} cb The callback to call when completed
 */
File.prototype.log = function(args, cb) {
    var self = this,
    msg = self.encoder.encode(args.level, args.msg, args.meta);

    self._open(function(buff) {
        if(buff) {
            self._buffer.push([msg, args, cb]);
        } else {
            self._write(msg + '\n', function(err) {
                if(cb) cb(err, msg, args.level, self.name, self.filename);
            });
        }
    });
};

//////////
// Public Methods
///////////////////////////
File.prototype._write = function(data, cb) {
    var self = this;

    //add size of this new message
    self._size += data.length;

    //write to stream
    var flushed = self._stream.write(data, self.encoding);

    if(flushed) {
        //check if logs need to be rotated
        if(self.maxsize && self._size >= self.maxsize) {
            self._rotateLogs(function(err) {
                self._size = 0;
                if(cb) cb(err);
            });
        } else {
            if(cb) cb(null);
        }
    } else {
        //after msg is drained
        self._drain(function() {
            //check if logs need to be rotated
            if(self.maxsize && self._size >= self.maxsize) {
                self._rotateLogs(function(err) {
                    self._size = 0;
                    if(cb) cb(err);
                });
            } else {
                if(cb) cb(null);
            }
        });
    }
};

File.prototype._open = function(cb) {
    var self = this;

    if(self._opening) {
        if(cb) cb(true);
    } else if(self._stream) {
        //already have an open stream
        if(cb) cb(false);
    } else {
        //need to open new stream, buffer msg
        if(cb) cb(true);

        //check file sizes for rotation
        self._checkSize(function(err) {
            //after rotation create stream
            self._stream = fs.createWriteStream(self.filename, {
                flags: 'a',
                encoding: self.encoding,
                mode: self.fileMode
            });

            self._stream.setMaxListeners(Infinity);

            self.once('flush', function() {
                self._opening = false;
                self.emit('open', self.filename);
            });

            self._flush();
        });
    }
};

File.prototype._close = function(cb) {
    var self = this;

    if(self._stream) {
        self._stream.end();
        self._stream.destroySoon();

        self.on('close', function() {
            self.emit('closed');
            if(cb) cb(null);
        });
        self._stream = null;
    } else {
        self._stream = null;
        if(cb) cb(null);
    }
};

File.prototype._drain = function(cb) {
    var self = this;

    //easy way to handle drain callback
    self._stream.once('drain', function() {
        self.emit('drain');
        if(cb) cb();
    });
};

File.prototype._flush = function(cb) {
    var self = this;

    if(self._buffer.length === 0) {
	self.emit('flush');
	if(cb) cb(null);
	return;
    }

    //start a write for each one
    self._buffer.forEach(function(log) {
        (function(msg, args, cb) {
            process.nextTick(function() {
                self._write(msg + '\n', function(err) {
                    if(cb) cb(err, msg, args.level, self.name, self.filename);
                });
            });
        }).apply(self, log);
    });

    //after writes are started clear buffer
    self._buffer.length = 0;

    //emit flush after the stream drains
    self._drain(function() {
        self.emit('flush');
        if(cb) cb(null);
    });
};

File.prototype._checkSize = function(cb) {
    var self = this;

    //check size of file
    fs.stat(self.filename, function(err, stats) {
        //if err and error isnt that it doesnt exist
        if(err && err.code !== 'ENOENT') {
            if(cb) cb(err);
            return;
        }

        self._size = (stats ? stats.size : 0);

        //if the size is >= maxsize, rotate files
        if(self._size >= self.maxsize) {
            self._size = 0;
            self._rotateLogs(cb);
        } else {
            cb(null);
        }
    });
};

File.prototype._rotateLogs = function(cb) {
    var self = this,
    max = 1, exists = false;

    //keep going until we find max number that doesn't exist
    do {
        try {
            fs.lstatSync(self.filename + '.' + max);
            exists = true;
            max++;
        } catch(e) {
            exists = false;
        }
    } while(exists);

    self._close(function() {
        //loop through each file and move their numbers up
        self._doLogRotate(max, function(err) {
            if(err) { if(cb) cb(err); return; }

            self.emit('rotate');

            //if the max file is more than how many we keep remove it
            if(max > self.rotate) {
                fs.unlink(self.filename + '.' + max, function(err) {
                    if(cb) cb(err);
                });
            } else {
                if(cb) cb(null);
            }
        });
    });
};

File.prototype._doLogRotate = function(num, cb) {
    var self = this;

    //if we at 0 we are done
    if(!num) { if(cb) cb(null); return; }

    //setup filenames to move
    var from = self.filename + (num > 1 ? '.' + (num - 1) : ''),
    to = self.filename + '.'  + num;

    //move files
    fs.rename(from, to, function(err) {
        if(err) { if(cb) cb(err); return; }

        //move the next one
        num--;
        self._doLogRotate(num, cb);
    });
};


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <color name="color2">#00000000</color>
</resources>


text:
function foo(){
    var x = 99;
    console.log(x);
    };

function resetKnockoutMenu(){
        console.log("resetKnockoutMenu");
        $("#knockoutByCarrierMenuItems").hide();
        $("#knockoutByPropertiesMenuItems").hide();
        $("#knockoutWithPropertyMenuItems").hide();
        $("#knockoutByCarrierMenuItems").hide();
        $("#knockoutMenuItems").hide();
};

function resetReactivateMenu (){
        console.log("resetReactivateMenu");
        $("#reactivateByCarrierMenuItems").hide();
        $("#reactivateByPropertiesMenuItems").hide();
        $("#reactivateWithPropertyMenuItems").hide();
        $("#reactivateByCarrierMenuItems").hide();
        $("#reactivateMenuItems").hide();
};

module.exports = {

    init: function(){

     $("#cyDiv").on("click", function(e) {
        if($("#knockoutMenuItems").is(":visible") || $("#reactivateMenuItems").is(":visible")) {
          $("#knockoutMenuItems").hide();
	  $("#reactivateMenuItems").hide();
	  }  // hide the menus if visible
        e.stopPropagation();
	e.preventDefault(); // propagation still occurs, but it seems inconsequential in this context
        });

     $("#knockoutMainMenuButton").on("click", function(e){
        console.log("main menu button: knockout");
        $("#knockoutMenuItems").toggle();
          // whether showing or hiding the first level menu
          // we always want the submenus hidden
        $("#knockoutByPropertiesMenuItems").hide();
        $("#knockoutByCarrierMenuItems").hide();
          // if another menu is up, hide it
        $("#reactivateMenuItems").hide()
        });

     $("#knockoutWithoutPropertyMenuHead").on("click", function(e){
        console.log("  phones without");
        $(this).next('ul').toggle();
        $("#knockoutWithPropertyMenuItems").hide();
        });

     $("#knockoutWithPropertyMenuHead").on("click", function(e){
        console.log("  phones with");
        $(this).next('ul').toggle();
        $("#knockoutWithoutPropertyMenuItems").hide();
        });

     $('#knockoutSelectedPhonesMenuItem').on("click", function(e){
        console.log("knockoutSelectedPhones");
        var selectedNodes = cy.nodes(":selected")
        selectedNodes.connectedEdges().hide();
        resetKnockoutMenu();
        });

     $("#knockoutByPropertiesMenuHead").on("click", function(e){
        console.log("knockoutByPropertiesMenuHead click");
          // toggle the "Phones with, Phones without submenu
        $('#knockoutByPropertiesMenuItems').toggle()
          // make sure the "By Carrier" menu is hidden
        $("#knockoutByCarrierMenuItems").hide()
          // make sure the sub-sub menus are both hidden
        $("#knockoutWithPropertyMenuHead").next("ul").hide()
        $("#knockoutWithoutPropertyMenuHead").next("ul").hide()
        });

     $('#knockoutByCarrierMenuHead').on("click", function(e){
        console.log("knockoutByCarrierMenuHead click");
        $("#knockoutByCarrierMenuItems").toggle()
        $('#knockoutByPropertiesMenuItems').hide()
        });

     $("#knockoutSprintPhonesMenuItem").on("click", function(e){
        console.log("knockout sprint phones");
        var carrierNodes = cy.nodes("[carrier='Sprint']");
        carrierNodes.connectedEdges().hide()
        resetKnockoutMenu();
        });

     $("#reactivateSprintPhonesMenuItem").on("click", function(e){
        console.log("reactivate sprint phones");
        var carrierNodes = cy.nodes("[carrier='Sprint']");
        carrierNodes.connectedEdges().show();
        resetReactivateMenu();
        });

     $("#knockoutTMobilePhonesMenuItem").on("click", function(e){
        console.log("knockout t-mobile phones");
        var carrierNodes = cy.nodes("[carrier='T-Mobile']");
        carrierNodes.connectedEdges().hide()
        resetKnockoutMenu();
        });

      $("#knockoutATTPhonesMenuItem").on("click", function(e){
         console.log("knockout ATT phones");
         var carrierNodes = cy.nodes("[carrier='ATT']");
         carrierNodes.connectedEdges().hide()
         resetKnockoutMenu();
         });

      $("#knockoutNextelPhonesMenuItem").on("click", function(e){
         console.log("knockout nextel phones");
         var carrierNodes = cy.nodes("[carrier='Nextel']");
         carrierNodes.connectedEdges().hide()
         resetKnockoutMenu();
         });

      $("#knockoutVerizonPhonesMenuItem").on("click", function(e){
         console.log("knockout Verizon phones");
         var carrierNodes = cy.nodes("[carrier='Verizon Wireless']");
         carrierNodes.connectedEdges().hide()
         resetKnockoutMenu();
         });

      $("#knockoutCellularOnePhonesMenuItem").on("click", function(e){
         console.log("knockout cellular one phones");
         var carrierNodes = cy.nodes("[carrier='CellularOne']");
         carrierNodes.connectedEdges().hide()
         resetKnockoutMenu();
         });

      $("#knockoutUSCellularPhonesMenuItem").on("click", function(e){
         console.log("knockout us cellular phones");
         var carrierNodes = cy.nodes("[carrier='US Cellular']");
         carrierNodes.connectedEdges().hide()
         resetKnockoutMenu();
         });

      $("#reactivateNextelPhonesMenuItem").on("click", function(e){
         console.log("reactivate nextel phones");
         var carrierNodes = cy.nodes("[carrier='Nextel']");
         carrierNodes.connectedEdges().show();
         resetReactivateMenu();
         });

      $("#reactivateVerizonPhonesMenuItem").on("click", function(e){
         console.log("reactivate Verizon phones");
         var carrierNodes = cy.nodes("[carrier='Verizon Wireless']");
         carrierNodes.connectedEdges().show();
         resetReactivateMenu();
         });

      $("#reactivateCellularOnePhonesMenuItem").on("click", function(e){
         console.log("reactivate cellular one phones");
         var carrierNodes = cy.nodes("[carrier='US Cellular']");
         carrierNodes.connectedEdges().show();
         resetReactivateMenu();
         });

      $("#reactivateUSCellularPhonesMenuItem").on("click", function(e){
         console.log("reactivate us cellular phones");
         var carrierNodes = cy.nodes("[carrier='US Cellular']");
         carrierNodes.connectedEdges().show();
         resetReactivateMenu();
         });

     $('a.leafMenuItem').on("click", function(e){
        console.log("leafMenuItem click");
        console.log(e);
        $(this).next('ul').toggle();
        e.stopPropagation();
        e.preventDefault();
        });

     $("#knockoutWithoutEmailMenuItem").on("click", function(e){
        console.log("w/o email");
        var propertiedNodes = cy.filter(function(e){return (e.isNode() && !e.data("email"))});
        propertiedNodes.connectedEdges().hide();
        resetKnockoutMenu();
        });

     $("#knockoutWithoutRoamingMenuItem").on("click", function(e){
        console.log("w/o roaming");
        var propertiedNodes = cy.filter(function(e){return (e.isNode() && !e.data("roaming"))});
        propertiedNodes.connectedEdges().hide();
        resetKnockoutMenu();
        });

     $("#knockoutWithoutPhotoMenuItem").on("click", function(e){
        console.log("w/o camera");
        var propertiedNodes = cy.filter(function(e){return (e.isNode() && !e.data("camera"))});
         propertiedNodes.connectedEdges().hide();
        resetKnockoutMenu();
        });

     $("#knockoutWithEmailMenuItem").on("click", function(e){
        var propertiedNodes = cy.filter(function(e){return (e.isNode() && e.data("email"))});
        propertiedNodes.connectedEdges().hide();
        resetKnockoutMenu();
        });

     $("#knockoutWithRoamingMenuItem").on("click", function(e){
        console.log("with roaming");
        var propertiedNodes = cy.filter(function(e){return (e.isNode() && e.data("roaming"))});
        propertiedNodes.connectedEdges().hide();
        resetKnockoutMenu();
        });

     $("#knockoutWithCameraMenuItem").on("click", function(e){
        console.log("with camera");
        var propertiedNodes = cy.filter(function(e){return (e.isNode() && e.data("camera"))});
        propertiedNodes.connectedEdges().hide();
        resetKnockoutMenu();
        });

     // reactivate menu code starts here

     $("#reactivateMainMenuButton").on("click", function(e){
        console.log("main menu button: reactivate");
        $("#reactivateMenuItems").toggle();
          // whether showing or hiding the first level menu
          // we always want the submenus hidden
        $("#reactivateByPropertiesMenuItems").hide();
        $("#reactivateByCarrierMenuItems").hide();
          // if another menu is up, hide it
        $("#knockoutMenuItems").hide()

        });

     $("#reactivateWithoutPropertyMenuHead").on("click", function(e){
        console.log("  phones without");
        $(this).next('ul').toggle();
        $("#reactivateWithPropertyMenuItems").hide();
        });

     $("#reactivateWithPropertyMenuHead").on("click", function(e){
        console.log("  phones with");
        $(this).next('ul').toggle();
        $("#reactivateWithoutPropertyMenuItems").hide();
        });

     $('#reactivateSelectedPhonesMenuItem').on("click", function(e){
        console.log("reactivateSelectedPhones");
        var selectedNodes = cy.nodes(":selected")
         selectedNodes.connectedEdges().show();
        });

     $('#reactivateByCarrierMenuHead').on("click", function(e){
        console.log("reactivateByCarrier");
        $("#reactivateByCarrierMenuItems").toggle()
        $('#reactivateByPropertiesMenuItems').hide()
        //resetReactivateMenu();
        });

     $("#reactivateByPropertiesMenuHead").on("click", function(e){
        console.log("reactivateByPropertiesMenuHead click");
          // toggle the "Phones with, Phones without submenu
        $('#reactivateByPropertiesMenuItems').toggle()
          // make sure the "By Carrier" menu is hidden
        $("#reactivateByCarrierMenuItems").hide()
          // make sure the sub-sub menus are both hidden
        $("#reactivateWithPropertyMenuHead").next("ul").hide()
        $("#reactivateWithoutPropertyMenuHead").next("ul").hide()
        });

     $("#reactivateTMobilePhonesMenuItem").on("click", function(e){
        console.log("reactivate t-mobile phones");
        var carrierNodes = cy.nodes("[carrier='T-Mobile']");
        carrierNodes.connectedEdges().show();
        resetReactivateMenu();
        });

     $("#reactivateATTPhonesMenuItem").on("click", function(e){
         var carrierNodes = cy.nodes("[carrier='ATT']");
         carrierNodes.connectedEdges().show();
         resetReactivateMenu();
        });

     $('a.leafMenuItem').on("click", function(e){
        console.log("leafMenuItem click");
        console.log(e);
        $(this).next('ul').toggle();
        e.stopPropagation();
        e.preventDefault();
        });

     $("#reactivateWithoutEmailMenuItem").on("click", function(e){
        console.log("w/o email");
        var propertiedNodes = cy.filter(function(e){return (e.isNode() && e.data("email"))});
        propertiedNodes.connectedEdges().show()
        resetReactivateMenu();
        });

     $("#reactivateWithoutRoamingMenuItem").on("click", function(e){
        console.log("w/o roaming");
        var propertiedNodes = cy.filter(function(e){return (e.isNode() && !e.data("roaming"))});
        propertiedNodes.connectedEdges().show()
        resetReactivateMenu();
        });

     $("#reactivateWithoutPhotoMenuItem").on("click", function(e){
        console.log("w/o camera");
        var propertiedNodes = cy.filter(function(e){return (e.isNode() && !e.data("camera"))});
        propertiedNodes.connectedEdges().show()
        resetReactivateMenu();
        });

     $("#reactivateWithEmailMenuItem").on("click", function(e){
        console.log("with email");
        var propertiedNodes = cy.filter(function(e){return (e.isNode() && e.data("email"))});
        propertiedNodes.connectedEdges().show()
        resetReactivateMenu();
        });

     $("#reactivateWithRoamingMenuItem").on("click", function(e){
        console.log("with roaming");
        var propertiedNodes = cy.filter(function(e){return (e.isNode() && e.data("roaming"))});
        propertiedNodes.connectedEdges().show()
        resetReactivateMenu();
        });

     $("#reactivateWithCameraMenuItem").on("click", function(e){
        console.log("with camera");
        var propertiedNodes = cy.filter(function(e){return (e.isNode() && e.data("camera"))});
        propertiedNodes.connectedEdges().show()
        resetReactivateMenu();
        });

    }

} // module.exports


text:
package com.job.util;

import java.io.BufferedOutputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;

import android.graphics.Bitmap;
import android.graphics.Bitmap.Config;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.PorterDuff.Mode;
import android.graphics.PorterDuffXfermode;
import android.graphics.Rect;
import android.graphics.RectF;

public class BitmapUtils {

	public static final int RAW_SIZE = 128;

	private static int sWidth = 128;
	private static int sHeight = 128;

	public static void setSize(int width, int height) {
		int size = width > height ? width : height;
		sWidth = size;
		sHeight = size;
	}

	public static void reset() {
		sWidth = RAW_SIZE;
		sHeight = RAW_SIZE;
	}

	public static Bitmap getBitmap(byte[] coverByte) {
		try {
			if (coverByte == null)
				return null;

			BitmapFactory.Options opts = new BitmapFactory.Options();
			opts.inJustDecodeBounds = true;
			BitmapFactory.decodeByteArray(coverByte, 0, coverByte.length, opts);
			opts.inSampleSize = BitmapUtils.computeSampleSize(opts, -1, sWidth
					* sHeight);

			opts.inJustDecodeBounds = false;
			return BitmapFactory.decodeByteArray(coverByte, 0,
					coverByte.length, opts);
		} catch (Exception ex) {
			ex.printStackTrace();
		}

		return null;
	}

	public static Bitmap getBitmap(InputStream is) {
		try {
			if (is == null)
				return null;

			int size = is.available();
			byte[] bs = new byte[size];
			is.read(bs, 0, bs.length);

			return getBitmap(bs);
		} catch (Exception ex) {
			ex.printStackTrace();
		}

		return null;
	}

	public static Bitmap getBitmap(String path, PackageUtils.FilePosition pos) {
		if (StringUtils.isEmpty(path))
			return null;
		else if (pos == null)
			return null;

		byte[] buffer = FileUtils.getBuffer(path, pos.getOffset(),
				pos.getSize());

		return getBitmap(buffer);
	}

	public static Bitmap getBitmap(String path) {
		if (StringUtils.isEmpty(path))
			return null;

		byte[] buffer = FileUtils.getBuffer(path);

		return getBitmap(buffer);
	}

	public static int computeSampleSize(BitmapFactory.Options options,
			int minSideLength, int maxNumOfPixels) {
		int initialSize = computeInitialSampleSize(options, minSideLength,
				maxNumOfPixels);
		int roundedSize;
		if (initialSize <= 8) {
			roundedSize = 1;
			while (roundedSize < initialSize) {
				roundedSize <<= 1;
			}
		} else {
			roundedSize = (initialSize + 7) / 8 * 8;
		}

		return roundedSize;
	}

	private static int computeInitialSampleSize(BitmapFactory.Options options,
			int minSideLength, int maxNumOfPixels) {
		double w = options.outWidth;
		double h = options.outHeight;

		int lowerBound = (maxNumOfPixels == -1) ? 1 : (int) Math.ceil(Math
				.sqrt(w * h / maxNumOfPixels));
		int upperBound = (minSideLength == -1) ? 128 : (int) Math.min(
				Math.floor(w / minSideLength), Math.floor(h / minSideLength));

		if (upperBound < lowerBound) {
			// return the larger one when there is no overlapping zone.
			return lowerBound;
		}

		if ((maxNumOfPixels == -1) && (minSideLength == -1)) {
			return 1;
		} else if (minSideLength == -1) {
			return lowerBound;
		} else {
			return upperBound;

		}
	}

	/**
	 * 默认以jpg格式保存图片到指定路径
	 *
	 * @param bm
	 * @param path
	 * @return
	 */
	public static boolean saveFile(Bitmap bm, String path) {
		if (bm == null || path == null)
			return false;
		File myCaptureFile = new File(path);
		if (myCaptureFile.exists()) {
			myCaptureFile.delete();
		}
		try {
			BufferedOutputStream bos = new BufferedOutputStream(
					new FileOutputStream(myCaptureFile));
			bm.compress(Bitmap.CompressFormat.JPEG, 80, bos);
			bos.flush();
			bos.close();
			return true;
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
		return false;
	}

	/**
	 * 以指定格式保存图片到指定路径
	 *
	 * @param bm
	 * @param path
	 * @param format
	 * @return
	 */
	public static boolean saveFile(Bitmap bm, String path,
			Bitmap.CompressFormat format) {
		if (bm == null || path == null)
			return false;
		File myCaptureFile = new File(path);
		if (myCaptureFile.exists()) {
			myCaptureFile.delete();
		}
		try {
			BufferedOutputStream bos = new BufferedOutputStream(
					new FileOutputStream(myCaptureFile));
			bm.compress(format, 80, bos);
			bos.flush();
			bos.close();
			return true;
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
		return false;
	}

	// Bitmap转byte[]
	public static byte[] Bitmap2Bytes(Bitmap bm, Bitmap.CompressFormat format) {
		if (bm == null) {
			return null;
		}
		ByteArrayOutputStream baos = new ByteArrayOutputStream();
		bm.compress(format, 100, baos);
		return baos.toByteArray();
	}

	// byte[]转Bitmap
	public static Bitmap Bytes2Bimap(byte[] b) {
		if (b.length != 0) {
			return BitmapFactory.decodeByteArray(b, 0, b.length);
		} else {
			return null;
		}
	}

	public static Bitmap toRoundBitmap(Bitmap bitmap, int round) {
		if (bitmap == null)
			return null;
		int width = bitmap.getWidth();
		int height = bitmap.getHeight();
		float roundPx;
		float left, top, right, bottom, dst_left, dst_top, dst_right, dst_bottom;
		if (width <= height) {
			if (round != 0)
				roundPx = round;
			else
				roundPx = width / 2;
			top = 0;
			bottom = width;
			left = 0;
			right = width;
			height = width;
			dst_left = 0;
			dst_top = 0;
			dst_right = width;
			dst_bottom = width;
		} else {
			if (round != 0)
				roundPx = round;
			else
				roundPx = height / 2;
			float clip = (width - height) / 2;
			left = clip;
			right = width - clip;
			top = 0;
			bottom = height;
			width = height;
			dst_left = 0;
			dst_top = 0;
			dst_right = height;
			dst_bottom = height;
		}

		Bitmap output = Bitmap.createBitmap(width, height, Config.ARGB_8888);
		Canvas canvas = new Canvas(output);

		final int color = 0xff424242;
		final Paint paint = new Paint();

		final Rect src = new Rect((int) left, (int) top, (int) right,
				(int) bottom);
		final Rect dst = new Rect((int) dst_left, (int) dst_top,
				(int) dst_right, (int) dst_bottom);
		final RectF rectF = new RectF(dst);

		paint.setAntiAlias(true);
		canvas.drawARGB(0, 0, 0, 0);
		paint.setColor(color);
		canvas.drawRoundRect(rectF, roundPx, roundPx, paint);
		paint.setXfermode(new PorterDuffXfermode(Mode.SRC_IN));
		canvas.drawBitmap(bitmap, src, dst, paint);
		return output;
	}

	public static Bitmap getBitmap(Bitmap bitMap, int w, int h) {
		int width = bitMap.getWidth();
		int height = bitMap.getHeight();
		// 设置想要的大小
		int newWidth = w;
		int newHeight = h;
		// 计算缩放比例
		float scaleWidth = ((float) newWidth) / width;
		float scaleHeight = ((float) newHeight) / height;
		// 取得想要缩放的matrix参数
		Matrix matrix = new Matrix();
		matrix.postScale(scaleWidth, scaleHeight);
		// 得到新的图片
		bitMap = Bitmap.createBitmap(bitMap, 0, 0, width, height, matrix, true);

		return bitMap;
	}

}


text:
#ifndef VIRTUALSERIALPORT_H
#define VIRTUALSERIALPORT_H

#include <QtCore/QIODevice>
#include <QtCore/QString>
#include <QtCore/QMutex>

QT_BEGIN_NAMESPACE
class QWaitCondition;
QT_END_NAMESPACE

#include "symbianutils_global.h"

namespace SymbianUtils {

class VirtualSerialDevicePrivate;

class SYMBIANUTILS_EXPORT VirtualSerialDevice : public QIODevice
{
    Q_OBJECT
public:
    explicit VirtualSerialDevice(const QString &name, QObject *parent = 0);
    ~VirtualSerialDevice();

    bool open(OpenMode mode);
    void close();
    const QString &getPortName() const;
    void flush();

    qint64 bytesAvailable() const;
    bool isSequential() const;
    bool waitForBytesWritten(int msecs);
    bool waitForReadyRead(int msecs);

protected:
    qint64 readData(char *data, qint64 maxSize);
    qint64 writeData(const char *data, qint64 maxSize);

private:
    Q_DISABLE_COPY(VirtualSerialDevice)
    void platInit();
    void platClose();
    void emitBytesWrittenIfNeeded(QMutexLocker &locker, qint64 len);

private:
    QString portName;
    mutable QMutex lock;
    QList<QByteArray> pendingWrites;
    bool emittingBytesWritten;
    QWaitCondition* waiterForBytesWritten;
    VirtualSerialDevicePrivate *d;

// Platform-specific stuff
#ifdef Q_OS_WIN
private:
    qint64 writeNextBuffer(QMutexLocker &locker);
    void doWriteCompleted(QMutexLocker &locker);
private slots:
    void writeCompleted();
    void commEventOccurred();
#endif

#ifdef Q_OS_UNIX
private:
    bool tryWrite(const char *data, qint64 maxSize, qint64 &bytesWritten);
    enum FlushPendingOption {
        NothingSpecial = 0,
        StopAfterWritingOneBuffer = 1,
        EmitBytesWrittenAsync = 2, // Needed so we don't emit bytesWritten signal directly from writeBytes
    };
    Q_DECLARE_FLAGS(FlushPendingOptions, FlushPendingOption)
    bool tryFlushPendingBuffers(QMutexLocker& locker, FlushPendingOptions flags = NothingSpecial);

private slots:
    void writeHasUnblocked(int fileHandle);

signals:
    void AsyncCall_emitBytesWrittenIfNeeded(qint64 len);

#endif

};

} // namespace SymbianUtils

#endif // VIRTUALSERIALPORT_H


text:
<?php

declare(strict_types=1);

namespace Sylius\Bundle\UserBundle\Provider;

use Symfony\Component\Security\Core\User\UserProviderInterface as BaseUserProviderInterface;

/**
 * @author Łukasz Chruściel <lukasz.chrusciel@lakion.com>
 */
interface UserProviderInterface extends BaseUserProviderInterface
{
}


text:
package io.springside.springtime.examples.helloservice.idl;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

@Api("Greeting Service")
public interface GreetingService {

	public static class HelloRequest {
		public String name;
	}

	public static class HelloResponse {
		public String message;
	}

	public static class WeatherRequest {
		public City city;
	}

	public static class WeatherResponse {
		public String weather;
	}

	@ApiOperation(value = "hello")
	public HelloResponse hello(HelloRequest helloRequest);

	@ApiOperation(value = "weather")
	public WeatherResponse weather(WeatherRequest weatherRequest);

}


text:
class Android::Layout

  attr_accessor :file_path

  def initialize file_path
    @file_path = file_path
  end

  def file_name
    File.basename file_path
  end
  alias name file_name

  def render stylesheets
    layout_xml = get_xml
    layout_xml = apply_css(layout_xml, stylesheets)
    layout_xml = androidify_xml_attributes(layout_xml)
  end

  # get the xml for the layout ... if not .xml, we have to convert -> xml
  def get_xml
    if file_path[/\.xml$/]
      File.read file_path
    elsif file_path[/\.haml$/]
      require 'haml'
      Haml::Engine.new(File.read(file_path)).to_html
    else
      raise "Don't know how to get XML for #{ file_path }"
    end
  end

  def read_css_file css_file
    if css_file[/\.sass$/]
      require 'sass'
      Sass::Engine.new(File.read(css_file)).to_css
    elsif css_file[/\.css$/]
      File.read css_file
    else
      ""
    end
  end

  def apply_css xml, css_files
    return xml if css_files.empty?

    require 'css_parser'
    parser = CssParser::Parser.new
    css_files.each do |css_file|
      parser.add_block! read_css_file(css_file)
    end

    require 'hpricot'
    doc = Hpricot(xml)
    parser.each_selector do |selector, declarations, specificity|
      doc.search(selector.downcase).each do |element|
        if element.is_a? Hpricot::Elem
          rules = declarations.split(';').map {|r| r.split(':').map {|x| x.strip }}
          rules.each do |attribute, value|
            element.set_attribute attribute, value
          end
        end
      end
    end

    doc.to_s
  end

  def androidify_xml_attributes xml
    require 'hpricot'
    doc = Hpricot(xml)

    # make sure that something has xmlns:android="http://schemas.android.com/apk/res/android"
    doc.traverse_element do |first_element|
      if first_element.is_a?Hpricot::Elem
        unless first_element.attributes.keys.include?'xmlns:android'
          first_element.set_attribute 'xmlns:android', 'http://schemas.android.com/apk/res/android'
        end
        break
      end
    end

    doc.traverse_element {|e|
      if e.is_a?Hpricot::Elem

        # fix ID
        if e.attributes.keys.include?'id'
          id = e[:id]
          unless id.include? '@+id/'
            e.set_attribute 'id', "@+id/#{id}"
          end
        end

        # if there's innerText and no text attribute, innerText => text
        if e.respond_to?:inner_text
          unless e.inner_text.strip.empty? or e.attributes.keys.include?'text'
            # e.set_attribute 'text', e.inner_text.strip
            # e.inner_text = '' # no way to easily get rid of it?  :/
          end
        end

        # fix attributes (prepend 'android:')
        e.attributes.each do |k, v|
          unless k.include?':'
            value = e.remove_attribute k
            e.set_attribute "android:#{k}", "#{value}"
          end
        end

      end
    }
    fix_case_sensitive_tags(doc.to_s)
  end

  def fix_case_sensitive_tags xml
    {
      'textcolor='     => 'textColor=',
      '<linearlayout'  => '<LinearLayout',
      '<textview'      => '<TextView',
      '<button'        => '<Button',

      # fix these ... should use regexp?
      '</linearlayout'  => '</LinearLayout',
      '</textview'      => '</TextView',
      '</button'        => '</Button'

    }.each do  |k, v|
      xml.gsub! k, v
    end
    xml
  end

  def self.find_all directory
    # find directories with 'layout' in the name ... really, we should just do directly to res/layout
    Dir[ File.join(directory, '**', '*layout*') ].directories.inject([]) do |layouts, dir|
      layout_xml_files = Dir[ File.join(dir, '**', '*.xml') ] + Dir[ File.join(dir, '**', '*.haml') ]
      layouts += layout_xml_files.map { |file_path| Android::Layout.new file_path }
      layouts
    end
  end

end


text:
#include "musca_b1_scc_drv.h"

/* The first pin of the upper pins (out of 64) */
#define GPIO_UPPER_PINS_MIN_VALUE          32U

struct musca_b1_scc_reg_map_t {
    volatile uint32_t clk_ctrl_sel;                    /* 0x00 RW Clock Control Select */
    volatile uint32_t clk_pll_prediv_ctrl;             /* 0x04 RW clk_pll_prediv_ctrl */
    volatile uint32_t reserved1;                       /* 0x08 Reserved */
    volatile uint32_t clk_postdiv_ctrl_flash;          /* 0x0C RW clk_postdiv_ctrl_flash */
    volatile uint32_t clk_postdiv_qspi;                /* 0x10 RW clk_postdiv_qspi */
    volatile uint32_t clk_postdiv_rtc;                 /* 0x14 RW clk_postdiv_rtc */
    volatile uint32_t clk_postdiv_sd;                  /* 0x18 RW clk_postdiv_sd */
    volatile uint32_t clk_postdiv_test;                /* 0x1C RW clk_postdiv_test */
    volatile uint32_t ctrl_bypass_div;                 /* 0x20 RW ctrl_bypass_div */
    volatile uint32_t pll_ctrl_pll0_clk;               /* 0x24 RW pll_ctrl_pll0_clk */
    volatile uint32_t pll_postdiv_ctrl_pll0_clk;       /* 0x28 RW pll_postdiv_ctrl_pll0_clk */
    volatile uint32_t pll_ctrl_mult_pll0_clk;          /* 0x2C RW pll_ctrl_mult_pll0_clk */
    volatile uint32_t clk_ctrl_enable;                 /* 0x30 RW Clock Control Enable */
    volatile uint32_t clk_status;                      /* 0x34 RO Clock Status */
    volatile uint32_t reserved2[2];                    /* 0x38 Reserved */
    volatile uint32_t reset_ctrl;                      /* 0x40 RW Reset Control Register */
    volatile uint32_t reserved3;                       /* 0x44 Reserved */
    volatile uint32_t dbg_ctrl;                        /* 0x48 RW Debug Control Register */
    volatile uint32_t sram_ctrl;                       /* 0x4C RW SRAM Control Register */
    volatile uint32_t intr_ctrl;                       /* 0x50 RW Interupt Control Register */
    volatile uint32_t clk_test_ctrl;                   /* 0x54 RW Clock Test Control Register */
    volatile uint32_t cpu0_vtor;                       /* 0x58 RW Reset vector for CPU0 */
    volatile uint32_t reserved4;                       /* 0x5C RW Reset vector for KX CPU */
    volatile uint32_t cpu1_vtor;                       /* 0x60 Reserved */
    volatile uint32_t az_cpu_vtor;                     /* 0x64 RW Reset vector for AZ CPU */
    volatile uint32_t iomux_main_insel_0;              /* 0x68 RW Main function in data select */
    volatile uint32_t iomux_main_insel_1;              /* 0x6C RW Main function in data select */
    volatile uint32_t iomux_main_outsel_0;             /* 0x70 RW Main function out data select */
    volatile uint32_t iomux_main_outsel_1;             /* 0x74 RW Main function out data select */
    volatile uint32_t iomux_main_oensel_0;             /* 0x78 RW Main function out enable select */
    volatile uint32_t iomux_main_oensel_1;             /* 0x7C RW Main function out enable select */
    volatile uint32_t iomux_main_default_in_0;         /* 0x80 RW Main function default in select */
    volatile uint32_t iomux_main_default_in_1;         /* 0x84 RW Main function default in select */
    volatile uint32_t iomux_altf1_insel_0;             /* 0x88 RW Alt function 1 in data select */
    volatile uint32_t iomux_altf1_insel_1;             /* 0x8C RW Alt function 1 in data select */
    volatile uint32_t iomux_altf1_outsel_0;            /* 0x90 RW Alt function 1 out data select */
    volatile uint32_t iomux_altf1_outsel_1;            /* 0x94 RW Alt function 1 out data select */
    volatile uint32_t iomux_altf1_oensel_0;            /* 0x98 RW Alt function 1 out enable select */
    volatile uint32_t iomux_altf1_oensel_1;            /* 0x9C RW Alt function 1 out enable select */
    volatile uint32_t iomux_altf1_default_in_0;        /* 0xA0 RW Alt function 1 default in select */
    volatile uint32_t iomux_altf1_default_in_1;        /* 0xA4 RW Alt function 1 default in select */
    volatile uint32_t iomux_altf2_insel_0;             /* 0xA8 RW Alt function 2 in data select */
    volatile uint32_t iomux_altf2_insel_1;             /* 0xAC RW Alt function 2 in data select */
    volatile uint32_t iomux_altf2_outsel_0;            /* 0xB0 RW Alt function 2 out data select */
    volatile uint32_t iomux_altf2_outsel_1;            /* 0xB4 RW Alt function 2 out data select */
    volatile uint32_t iomux_altf2_oensel_0;            /* 0xB8 RW Alt function 2 out enable select */
    volatile uint32_t iomux_altf2_oensel_1;            /* 0xBC RW Alt function 2 out enable select */
    volatile uint32_t iomux_altf2_default_in_0;        /* 0xC0 RW Alt function 2 default in select */
    volatile uint32_t iomux_altf2_default_in_1;        /* 0xC4 RW Alt function 2 default in select */
    volatile uint32_t reserved5[8];                    /* 0xC8 Reserved */
    volatile uint32_t iopad_ds0_0;                     /* 0xE8 RW Drive Select 0 */
    volatile uint32_t iopad_ds0_1;                     /* 0xEC RW Drive Select 0 */
    volatile uint32_t iopad_ds1_0;                     /* 0xF0 RW Drive Select 1 */
    volatile uint32_t iopad_ds1_1;                     /* 0xF4 RW Drive Select 1 */
    volatile uint32_t iopad_pe_0;                      /* 0xF8 RW Pull Enable */
    volatile uint32_t iopad_pe_1;                      /* 0xFC RW Pull Enable */
    volatile uint32_t iopad_ps_0;                      /* 0x100 RW Pull Select */
    volatile uint32_t iopad_ps_1;                      /* 0x104 RW Pull Select */
    volatile uint32_t iopad_sr_0;                      /* 0x108 RW Slew Select */
    volatile uint32_t iopad_sr_1;                      /* 0x10C RW Slew Select */
    volatile uint32_t iopad_is_0;                      /* 0x110 RW Input Select */
    volatile uint32_t iopad_is_1;                      /* 0x114 RW Input Select */
    volatile uint32_t pvt_ctrl;                        /* 0x118 RW PVT control register */
    volatile uint32_t reserved6[5];                    /* 0x11C Reserved */
    volatile uint32_t spare0;                          /* 0x130 RW spare0 */
    volatile uint32_t reserved7[2];                    /* 0x134 Reserved */
    volatile uint32_t static_conf_sig1;                /* 0x13C RW static_conf_sig1 */
    volatile uint32_t reserved8[24];                   /* 0x140 Reserved */
    volatile uint32_t flash0_din_0;                    /* 0x1A0 RW flash0_or 1 din_0 */
    volatile uint32_t flash0_din_1;                    /* 0x1A4 RW flash0 or 1 din_1 */
    volatile uint32_t flash0_din_2;                    /* 0x1A8 RW flash0_or 1 din_2 */
    volatile uint32_t flash0_din_3;                    /* 0x1AC RW flash0_or 1 din_3 */
    volatile uint32_t reserved9[4];                    /* 0x1B0 Reserved */
    volatile uint32_t flash0_dout_0;                   /* 0x1C0 RO flash0_dout_0 */
    volatile uint32_t flash0_dout_1;                   /* 0x1C4 RO flash0_dout_1 */
    volatile uint32_t flash0_dout_2;                   /* 0x1C8 RO flash0_dout_2 */
    volatile uint32_t flash0_dout_3;                   /* 0x1CC RO flash0_dout_3 */
    volatile uint32_t flash1_dout_0;                   /* 0x1D0 RO flash1_dout_0 */
    volatile uint32_t flash1_dout_1;                   /* 0x1D4 RO flash1_dout_1 */
    volatile uint32_t flash1_dout_2;                   /* 0x1D8 RO flash1_dout_2 */
    volatile uint32_t flash1_dout_3;                   /* 0x1DC RO flash1_dout_2 */
    volatile uint32_t selection_control_reg;           /* 0x1E0 RW Selection Control Register */
    volatile uint32_t az_rom_remap_mask;               /* 0x1E4 RW az_rom_remap_mask */
    volatile uint32_t az_rom_remap_offset;             /* 0x1E8 RW az_rom_remap_offset */
    volatile uint32_t az_code_remap_mask;              /* 0x1EC RW az_code_remap_mask */
    volatile uint32_t az_code_remap_offset;            /* 0x1F0 RW az_code_remap_offset */
    volatile uint32_t az_sys_remap_mask;               /* 0x1F4 RW az_sys_remap_mask */
    volatile uint32_t az_sys_remap_offset;             /* 0x1F8 RW az_sys_remap_offset */
    volatile uint32_t reserved10;                      /* 0x1FC RW Kalix Control */
    volatile uint32_t az_ctrl;                         /* 0x200 RW  Alcatraz Control */
    volatile uint32_t reserved11;                      /* 0x204 Reserved */
    volatile uint32_t sse200_otp_rd_data;              /* 0x208 RO SSE200_otp_ctrl */
    volatile uint32_t reserved12;                      /* 0x20C Reserved */
    volatile uint32_t az_otp_rd_data;                  /* 0x210 RO az_otp_rd_data */
    volatile uint32_t reserved13[2];                   /* 0x214 Reserved */
    volatile uint32_t spare_ctrl0;                     /* 0x21C RW spare_ctrl0 */
    volatile uint32_t spare_ctrl1;                     /* 0x220 RW spare_ctrl1 */
    volatile uint32_t reserved[119];                   /* 0x224 Reserved */
    volatile uint32_t chip_id;                         /* 0x400 RO Chip ID 0x07D00477 */
};

/**
 * \brief Clears selected alternate functions for selected pins
 *
 * \param[in] scc_regs   SCC register map pointer \ref musca_b1_scc_reg_map_t
 * \param[in] func_mask  Bitmask of alternate functions to clear
 *                       \ref gpio_altfunc_mask_t
 * \param[in] pin_mask   Pin mask for the alternate functions
 * \param[in] upper_pins True if pin_mask represents the upper 32 pins
 */
static void scc_clear_alt_func(struct musca_b1_scc_reg_map_t* scc_regs,
                               enum gpio_altfunc_mask_t func_mask,
                               uint32_t pin_mask, bool upper_pins)
{
    /* The pin select pointers are pointing to the registers
     * which control the lower 32 pins of the whole 64. If we need to reach
     * the upper 32 pins, the pointers need to be incremented.
     * Registers are 32 bites wide so offset is in 4 byte steps.
     */
    uint32_t reg_offset = (upper_pins ? 1U : 0U);

    if (func_mask & GPIO_MAIN_FUNC_MASK) {
        *(&scc_regs->iomux_main_insel_0 + reg_offset) &= (~pin_mask);
        *(&scc_regs->iomux_main_outsel_0 + reg_offset) &= (~pin_mask);
        *(&scc_regs->iomux_main_oensel_0 + reg_offset) &= (~pin_mask);
    }
    if (func_mask & GPIO_ALTFUNC_1_MASK) {
        *(&scc_regs->iomux_altf1_insel_0 + reg_offset) &= (~pin_mask);
        *(&scc_regs->iomux_altf1_outsel_0 + reg_offset) &= (~pin_mask);
        *(&scc_regs->iomux_altf1_oensel_0 + reg_offset) &= (~pin_mask);
    }
    if (func_mask & GPIO_ALTFUNC_2_MASK) {
        *(&scc_regs->iomux_altf2_insel_0 + reg_offset) &= (~pin_mask);
        *(&scc_regs->iomux_altf2_outsel_0 + reg_offset) &= (~pin_mask);
        *(&scc_regs->iomux_altf2_oensel_0 + reg_offset) &= (~pin_mask);
    }
}

/**
 * \brief Sets selected alternate functions for selected (max 32) pins
 *
 * \param[in] scc_regs   SCC register map pointer \ref musca_b1_scc_reg_map_t
 * \param[in] altfunc    Alternate function to set \ref gpio_altfunc_t
 * \param[in] pin_mask   Pin mask for the alternate functions
 * \param[in] upper_pins True if pin_mask represents the upper 32 pins
 *
 * \note This function doesn't check if scc dev is NULL.
 * \note If no alternate function is selected then this API won't do anything
 */
static void scc_set_alt_func(struct musca_b1_scc_reg_map_t* scc_regs,
                             enum gpio_altfunc_t altfunc, uint32_t pin_mask,
                             bool upper_pins)
{
    enum gpio_altfunc_mask_t altfunc_to_clear = GPIO_ALTFUNC_NONE;
    volatile uint32_t *insel = NULL;
    volatile uint32_t *outse = NULL;
    volatile uint32_t *oense = NULL;

    switch (altfunc) {
        case GPIO_MAIN_FUNC:
            insel = &scc_regs->iomux_main_insel_0;
            outse = &scc_regs->iomux_main_outsel_0;
            oense = &scc_regs->iomux_main_oensel_0;
            altfunc_to_clear = GPIO_MAIN_FUNC_NEG_MASK;
            break;

        case GPIO_ALTFUNC_1:
            insel = &scc_regs->iomux_altf1_insel_0;
            outse = &scc_regs->iomux_altf1_outsel_0;
            oense = &scc_regs->iomux_altf1_oensel_0;
            altfunc_to_clear = GPIO_ALTFUNC_1_NEG_MASK;
            break;

        case GPIO_ALTFUNC_2:
            insel = &scc_regs->iomux_altf2_insel_0;
            outse = &scc_regs->iomux_altf2_outsel_0;
            oense = &scc_regs->iomux_altf2_oensel_0;
            altfunc_to_clear = GPIO_ALTFUNC_2_NEG_MASK;
            break;

        case GPIO_ALTFUNC_3:
            /* Nothing to do, clearing the other functions enables ALTFUNC 3 */
            altfunc_to_clear = GPIO_ALTFUNC_3_NEG_MASK;
            scc_clear_alt_func(scc_regs, altfunc_to_clear, pin_mask, upper_pins);
            return;
        default:
            return;
    }

    if (upper_pins == true) {
        /* All the pin select pointers are pointing to the registers
         * which control the lower 32 pins of the whole 64. If we need to reach
         * the upper 32 pins, the pointers need to be incremented.
         */
        insel++;
        outse++;
        oense++;
    }

    /* Select the wanted function's output enable bit first.
     * This way the output won't be disabled which is desired
     * if we switch from output to output function
     */
    *oense |= pin_mask;

    /* Clear all alternate function registers which are not selected */
    scc_clear_alt_func(scc_regs, altfunc_to_clear, pin_mask, upper_pins);

    /* Enable input and output data line */
    *insel |= pin_mask;
    *outse |= pin_mask;
}

enum musca_b1_scc_error_t
musca_b1_scc_set_alt_func(struct musca_b1_scc_dev_t* dev,
                          enum gpio_altfunc_t altfunc, uint64_t pin_mask)
{
    struct musca_b1_scc_reg_map_t* scc_regs =
                                (struct musca_b1_scc_reg_map_t*) dev->cfg->base;
    uint32_t pin_mask_lo = (uint32_t)pin_mask;
    uint32_t pin_mask_hi = (uint32_t)(pin_mask >> GPIO_UPPER_PINS_MIN_VALUE);

    if (altfunc >= GPIO_ALTFUNC_MAX) {
        /* Invalid input */
        return SCC_INVALID_ARG;
    }

    /* Set alternate functions for the lower 32 pins - if needed */
    if (pin_mask_lo != 0U) {
        scc_set_alt_func(scc_regs, altfunc, pin_mask_lo, false);
    }

    /* Set alternate functions for the upper 32 pins - if needed */
    if (pin_mask_hi != 0U) {
        scc_set_alt_func(scc_regs, altfunc, pin_mask_hi, true);
    }

    return SCC_ERR_NONE;
}

/**
 * \brief Sets pinmode for the given pins
 *
 * \param[in] scc_regs   SCC register map pointer \ref musca_b1_scc_reg_map_t
 * \param[in] pin_mask   Pin mask for the alternate functions
 * \param[in] mode       Pin mode to set \ref pinmode_select_t
 * \param[in] upper_pins True if the pinmask is for the upper 32 pins,
 *                       false otherwise
 */
static void scc_set_pinmode(struct musca_b1_scc_reg_map_t* scc_regs,
                            uint32_t pin_mask,
                            enum pinmode_select_t mode, bool upper_pins)
{
    /* The pin select pointers are pointing to the registers
     * which control the lower 32 pins of the whole 64. If we need to reach
     * the upper 32 pins, the pointers need to be incremented.
     * Registers are 32 bites wide so offset is in 4 byte steps.
     */
    uint32_t reg_offset = (upper_pins ? 1U : 0U);

    switch (mode) {
        case PINMODE_NONE:
            *(&scc_regs->iopad_pe_0 + reg_offset) &= (~pin_mask);
            break;
        case PINMODE_PULL_DOWN:
            /* If the pull select bit is set to 0 it means pull down */
            *(&scc_regs->iopad_ps_0 + reg_offset) &= (~pin_mask);
            *(&scc_regs->iopad_pe_0 + reg_offset) |= pin_mask;
            break;
        case PINMODE_PULL_UP:
            /* If the pull select bit is set to 1 it means pull up */
            *(&scc_regs->iopad_ps_0 + reg_offset) |= pin_mask;
            *(&scc_regs->iopad_pe_0 + reg_offset) |= pin_mask;
            break;
        default:
            break;
    }
}

enum musca_b1_scc_error_t
musca_b1_scc_set_pinmode(struct musca_b1_scc_dev_t* dev, uint64_t pin_mask,
                         enum pinmode_select_t mode)
{
    struct musca_b1_scc_reg_map_t* scc_regs =
                                (struct musca_b1_scc_reg_map_t*) dev->cfg->base;
    uint32_t pin_mask_lo = (uint32_t)pin_mask;
    uint32_t pin_mask_hi = (uint32_t)(pin_mask >> 32);

    if (mode >= PINMODE_MAX) {
        /* Invalid input */
        return SCC_INVALID_ARG;
    }

    /* Set pin mode for the lower 32 pins - if needed */
    if (pin_mask_lo != 0U) {
        scc_set_pinmode(scc_regs, pin_mask_lo, mode, false);
    }

    /* Set pin mode for the lower 32 pins - if needed */
    if (pin_mask_hi != 0U) {
        scc_set_pinmode(scc_regs, pin_mask_hi, mode, true);
    }

    return SCC_ERR_NONE;
}

enum musca_b1_scc_error_t
musca_b1_scc_set_default_in(struct musca_b1_scc_dev_t* dev,
                            enum gpio_altfunc_t altfunc,
                            uint32_t pin_num,
                            bool default_in_value)
{
    struct musca_b1_scc_reg_map_t* scc_regs =
                                (struct musca_b1_scc_reg_map_t*) dev->cfg->base;
    uint32_t iomux_value = 0U;
    uint32_t pin_mask = 0U;
    uint32_t default_in_mask = 0U;
    uint32_t reg_offset = 0U;

    if ((altfunc >= GPIO_ALTFUNC_MAX) || (pin_num >= GPIO_ALTFUNC_MAX_PINS)) {
        /* Invalid input */
        return SCC_INVALID_ARG;
    }

    /* Check if pin is the upper section */
    if (pin_num >= GPIO_UPPER_PINS_MIN_VALUE) {
        pin_num -= GPIO_UPPER_PINS_MIN_VALUE;
        /* The pin select pointers are pointing to the registers
         * which control the lower 32 pins of the whole 64. If we need
         * to reach the upper 32 pins, the pointers need to be incremented.
         * Registers are 32 bites wide so offset is in 4 byte steps.
         */
        reg_offset = 1U;
    }

    pin_mask = (1U << pin_num);
    default_in_mask = ((default_in_value ? 1U : 0U) << pin_num);

    switch (altfunc) {
        case GPIO_MAIN_FUNC:
            iomux_value =
               *(&scc_regs->iomux_main_default_in_0 + reg_offset) & (~pin_mask);
            *(&scc_regs->iomux_main_default_in_0 + reg_offset) =
                                                (iomux_value | default_in_mask);
            *(&scc_regs->iomux_main_insel_0 + reg_offset) =
                  (*(&scc_regs->iomux_main_insel_0 + reg_offset) & (~pin_mask));
            break;
        case GPIO_ALTFUNC_1:
            iomux_value =
              *(&scc_regs->iomux_altf1_default_in_0 + reg_offset) & (~pin_mask);
            *(&scc_regs->iomux_altf1_default_in_0 + reg_offset) =
                                                (iomux_value | default_in_mask);
            *(&scc_regs->iomux_altf1_insel_0 + reg_offset) =
                 (*(&scc_regs->iomux_altf1_insel_0 + reg_offset) & (~pin_mask));
            break;
        case GPIO_ALTFUNC_2:
            iomux_value =
              *(&scc_regs->iomux_altf2_default_in_0 + reg_offset) & (~pin_mask);
            *(&scc_regs->iomux_altf2_default_in_0 + reg_offset) =
                                                (iomux_value | default_in_mask);
            *(&scc_regs->iomux_altf2_insel_0 + reg_offset) =
                 (*(&scc_regs->iomux_altf2_insel_0 + reg_offset) & (~pin_mask));
            break;
        case GPIO_ALTFUNC_3:
            /* Reserved */
            break;
        default:
            /* Code should already returned error but just to be safe
             * return here as well
             */
            return SCC_INVALID_ARG;
    }

    return SCC_ERR_NONE;
}


text:
"""
Turns your complex OpenFlow switches into stupid hubs.
"""

from pox.core import core
import pox.openflow.libopenflow_01 as of
from pox.lib.util import dpidToStr

log = core.getLogger()

def _handle_ConnectionUp (event):
  msg = of.ofp_flow_mod()
  msg.actions.append(of.ofp_action_output(port = of.OFPP_FLOOD))

  event.connection.send(msg)
  log.info("Hubifying %s", dpidToStr(event.dpid))

def _handle_PacketIn (event):
  pkt = event.parsed
  msg = of.ofp_packet_out()
  msg.data = pkt
  action = of.ofp_action_output(port = of.OFPP_ALL)
  msg.actions.append(action)
  event.connection.send(msg)

def launch ():
  core.openflow.addListenerByName("ConnectionUp", _handle_ConnectionUp)
  core.openflow.addListenerByName("PacketIn", _handle_PacketIn)
  log.info("Hub running.")


text:
using System;
using System.Windows.Input;

namespace Devkoes.Core.MVVM
{
    public class RelayCommand : ICommand
    {
        private readonly Action _execute;
        private readonly Func<bool> _canExecute;

        public RelayCommand(Action execute) : this(execute, null) { }

        public RelayCommand(Action execute, Func<bool> canExecute)
        {
            if (execute == null)
            {
                throw new ArgumentNullException("execute");
            }

            _execute = execute;
            _canExecute = canExecute;
        }

        /// <summary>
        /// Occurs when changes occur that affect whether the command should execute.
        /// </summary>
        public event EventHandler CanExecuteChanged
        {
            add
            {
                if (_canExecute != null)
                {
                    CommandManager.RequerySuggested += value;
                }
            }

            remove
            {
                if (_canExecute != null)
                {
                    CommandManager.RequerySuggested -= value;
                }
            }
        }

        public void RaiseCanExecuteChanged()
        {
            CommandManager.InvalidateRequerySuggested();
        }

        public bool CanExecute(object parameter)
        {
            return _canExecute == null ? true : _canExecute();
        }

        public void Execute(object parameter)
        {
            _execute();
        }
    }

}


text:
require("coffee-script");
require("./newsroom");


text:
#include <aws/databrew/model/ExcelOptions.h>
#include <aws/core/utils/json/JsonSerializer.h>

#include <utility>

using namespace Aws::Utils::Json;
using namespace Aws::Utils;

namespace Aws
{
namespace GlueDataBrew
{
namespace Model
{

ExcelOptions::ExcelOptions() :
    m_sheetNamesHasBeenSet(false),
    m_sheetIndexesHasBeenSet(false)
{
}

ExcelOptions::ExcelOptions(JsonView jsonValue) :
    m_sheetNamesHasBeenSet(false),
    m_sheetIndexesHasBeenSet(false)
{
  *this = jsonValue;
}

ExcelOptions& ExcelOptions::operator =(JsonView jsonValue)
{
  if(jsonValue.ValueExists("SheetNames"))
  {
    Array<JsonView> sheetNamesJsonList = jsonValue.GetArray("SheetNames");
    for(unsigned sheetNamesIndex = 0; sheetNamesIndex < sheetNamesJsonList.GetLength(); ++sheetNamesIndex)
    {
      m_sheetNames.push_back(sheetNamesJsonList[sheetNamesIndex].AsString());
    }
    m_sheetNamesHasBeenSet = true;
  }

  if(jsonValue.ValueExists("SheetIndexes"))
  {
    Array<JsonView> sheetIndexesJsonList = jsonValue.GetArray("SheetIndexes");
    for(unsigned sheetIndexesIndex = 0; sheetIndexesIndex < sheetIndexesJsonList.GetLength(); ++sheetIndexesIndex)
    {
      m_sheetIndexes.push_back(sheetIndexesJsonList[sheetIndexesIndex].AsInteger());
    }
    m_sheetIndexesHasBeenSet = true;
  }

  return *this;
}

JsonValue ExcelOptions::Jsonize() const
{
  JsonValue payload;

  if(m_sheetNamesHasBeenSet)
  {
   Array<JsonValue> sheetNamesJsonList(m_sheetNames.size());
   for(unsigned sheetNamesIndex = 0; sheetNamesIndex < sheetNamesJsonList.GetLength(); ++sheetNamesIndex)
   {
     sheetNamesJsonList[sheetNamesIndex].AsString(m_sheetNames[sheetNamesIndex]);
   }
   payload.WithArray("SheetNames", std::move(sheetNamesJsonList));

  }

  if(m_sheetIndexesHasBeenSet)
  {
   Array<JsonValue> sheetIndexesJsonList(m_sheetIndexes.size());
   for(unsigned sheetIndexesIndex = 0; sheetIndexesIndex < sheetIndexesJsonList.GetLength(); ++sheetIndexesIndex)
   {
     sheetIndexesJsonList[sheetIndexesIndex].AsInteger(m_sheetIndexes[sheetIndexesIndex]);
   }
   payload.WithArray("SheetIndexes", std::move(sheetIndexesJsonList));

  }

  return payload;
}

} // namespace Model
} // namespace GlueDataBrew
} // namespace Aws