text:
// Copyright 2014 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.

package org.chromium.content_public.browser;

import org.chromium.base.VisibleForTesting;

/**
 * The WebContents Java wrapper to allow communicating with the native WebContents object.
 */
public interface WebContents {
    /**
     * Deletes the Web Contents object.
     */
    void destroy();

    /**
     * @return The navigation controller associated with this WebContents.
     */
    NavigationController getNavigationController();

    /**
     * @return The title for the current visible page.
     */
    String getTitle();

    /**
     * @return The URL for the current visible page.
     */
    String getVisibleUrl();

    /**
     * @return Whether this WebContents is loading a resource.
     */
    boolean isLoading();

    /**
     * @return Whether this WebContents is loading and and the load is to a different top-level
     *         document (rather than being a navigation within the same document).
     */
    boolean isLoadingToDifferentDocument();

    /**
     * Stop any pending navigation.
     */
    void stop();

    /**
     * Inserts css into main frame's document.
     */
    void insertCSS(String css);

    /**
     * To be called when the ContentView is hidden.
     */
    public void onHide();

    /**
     * To be called when the ContentView is shown.
     */
    public void onShow();

    /**
     * Stops all media players for this WebContents.
     */
    public void releaseMediaPlayers();

    /**
     * Get the Background color from underlying RenderWidgetHost for this WebContent.
     */
    public int getBackgroundColor();

    /**
     * Requests the renderer insert a link to the specified stylesheet in the
     * main frame's document.
     */
    void addStyleSheetByURL(String url);

    /**
     * Shows an interstitial page driven by the passed in delegate.
     *
     * @param url The URL being blocked by the interstitial.
     * @param delegate The delegate handling the interstitial.
     */
    @VisibleForTesting
    public void showInterstitialPage(
            String url, long interstitialPageDelegateAndroid);

    /**
     * @return Whether the page is currently showing an interstitial, such as a bad HTTPS page.
     */
    public boolean isShowingInterstitialPage();

    /**
     * If the view is ready to draw contents to the screen. In hardware mode,
     * the initialization of the surface texture may not occur until after the
     * view has been added to the layout. This method will return {@code true}
     * once the texture is actually ready.
     */
    public boolean isReady();

     /**
     * Inform WebKit that Fullscreen mode has been exited by the user.
     */
    public void exitFullscreen();

    /**
     * Changes whether hiding the top controls is enabled.
     *
     * @param enableHiding Whether hiding the top controls should be enabled or not.
     * @param enableShowing Whether showing the top controls should be enabled or not.
     * @param animate Whether the transition should be animated or not.
     */
    public void updateTopControlsState(boolean enableHiding, boolean enableShowing,
            boolean animate);

    /**
     * Shows the IME if the focused widget could accept text input.
     */
    public void showImeIfNeeded();

    /**
     * Brings the Editable to the visible area while IME is up to make easier for inputing text.
     */
    public void scrollFocusedEditableNodeIntoView();

    /**
     * Selects the word around the caret, if any.
     * The caller can check if selection actually occurred by listening to OnSelectionChanged.
     */
    public void selectWordAroundCaret();

    /**
     * Get the URL of the current page.
     *
     * @return The URL of the current page.
     */
    public String getUrl();

    /**
     * Gets the last committed URL. It represents the current page that is
     * displayed in this WebContents. It represents the current security context.
     *
     * @return The last committed URL.
     */
    public String getLastCommittedUrl();

    /**
     * Get the InCognito state of WebContents.
     *
     * @return whether this WebContents is in InCognito mode or not
     */
    public boolean isIncognito();

    /**
     * Resumes the response which is deferred during start.
     */
    public void resumeResponseDeferredAtStart();

    /**
     * Set pending Navigation for transition testing on this WebContents.
     */
    public void setHasPendingNavigationTransitionForTesting();

    /**
     * Set delegate for notifying navigation transition.
     */
    public void setNavigationTransitionDelegate(NavigationTransitionDelegate delegate);

    /**
     * Inserts the provided markup sandboxed into the frame.
     */
    public void setupTransitionView(String markup);

    /**
     * Hides transition elements specified by the selector, and activates any
     * exiting-transition stylesheets.
     */
    public void beginExitTransition(String cssSelector, boolean exitToNativeApp);

    /**
     * Revert the effect of exit transition after it transitions to activity.
     */
    public void revertExitTransition();

    /**
     * Hide transition elements.
     */
    public void hideTransitionElements(String cssSelector);

    /**
     * Show transition elements.
     */
    public void showTransitionElements(String cssSelector);

    /**
     * Clear the navigation transition data.
     */
    public void clearNavigationTransitionData();

    /**
     * Fetch transition elements.
     */
    public void fetchTransitionElements(String url);

    /**
     * Injects the passed Javascript code in the current page and evaluates it.
     * If a result is required, pass in a callback.
     *
     * @param script The Javascript to execute.
     * @param callback The callback to be fired off when a result is ready. The script's
     *                 result will be json encoded and passed as the parameter, and the call
     *                 will be made on the main thread.
     *                 If no result is required, pass null.
     */
    public void evaluateJavaScript(String script, JavaScriptCallback callback);

    /**
     * Adds a log message to dev tools console. |level| must be a value of
     * org.chromium.content_public.common.ConsoleMessageLevel.
     */
    public void addMessageToDevToolsConsole(int level, String message);

    /**
     * Returns whether the initial empty page has been accessed by a script from another
     * page. Always false after the first commit.
     *
     * @return Whether the initial empty page has been accessed by a script.
     */
    public boolean hasAccessedInitialDocument();

    /**
     * This returns the theme color as set by the theme-color meta tag after getting rid of the
     * alpha.
     * @param The default color to be returned if the cached color is not valid.
     * @return The theme color for the content as set by the theme-color meta tag.
     */
    public int getThemeColor(int defaultColor);

    /**
     * Add an observer to the WebContents
     *
     * @param observer The observer to add.
     */
    void addObserver(WebContentsObserver observer);

    /**
     * Remove an observer from the WebContents
     *
     * @param observer The observer to remove.
     */
    void removeObserver(WebContentsObserver observer);
}


text:
package com.communote.server.core.vo.query;

import java.util.Date;

/**
 * The instance for {@link TaggingCoreItemTimeLimitsQuery}. It is a simple implementation of
 * abstract parent class.
 *
 * @author Communote GmbH - http://www.communote.com/
 */
public class TaggingCoreItemTimeLimitsQueryParameters extends TimelineQueryParameters {

    /**
     * @return null because date restrictions should not be in the query to get actual time limits.
     */
    @Override
    public Date getLowerTagDate() {
        return null;
    }

    /**
     * @return null because date restrictions should not be in the query to get actual time limits.
     */
    @Override
    public Date getUpperTagDate() {
        return null;
    }

    /**
     * Initiates the query instance with data copied from another query instance object.
     *
     * @param queryInstance
     *            the query instance
     */
    public void populateFromQueryInstance(TimelineQueryParameters queryInstance) {
        setTypeSpecificExtension(queryInstance.getTypeSpecificExtension());
        setResourceId(queryInstance.getResourceId());
        setTagPrefix(queryInstance.getTagPrefix());
        setLogicalTags(queryInstance.getLogicalTags());
        setUserIds(queryInstance.getUserIds());
        setUserIdsToIgnore(queryInstance.getUserIdsToIgnore());
        setNoteId(queryInstance.getNoteId());
        setUserSearchFilters(queryInstance.getUserSearchFilters(),
                !queryInstance.isIgnoreEmailField());
    }
}

redpajama_set_name: RedPajamaGithub


text:
/*------------------------------------------------------------------------------

    Table of contents

     1. Include headers
     2. External compiler flags
     3. Module defines
     4. Local function prototypes
     5. Functions
          h264bsdDecodeNalUnit

------------------------------------------------------------------------------*/

/*------------------------------------------------------------------------------
    1. Include headers
------------------------------------------------------------------------------*/

#include "h264bsd_nal_unit.h"
#include "h264bsd_util.h"

/*------------------------------------------------------------------------------
    2. External compiler flags
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
    3. Module defines
------------------------------------------------------------------------------*/

/*------------------------------------------------------------------------------
    4. Local function prototypes
------------------------------------------------------------------------------*/

/*------------------------------------------------------------------------------

    Function name: h264bsdDecodeNalUnit

        Functional description:
            Decode NAL unit header information

        Inputs:
            pStrmData       pointer to stream data structure

        Outputs:
            pNalUnit        NAL unit header information is stored here

        Returns:
            HANTRO_OK       success
            HANTRO_NOK      invalid NAL unit header information

------------------------------------------------------------------------------*/

u32 h264bsdDecodeNalUnit(strmData_t *pStrmData, nalUnit_t *pNalUnit)
{

/* Variables */

    u32 tmp;

/* Code */

    ASSERT(pStrmData);
    ASSERT(pNalUnit);
    ASSERT(pStrmData->bitPosInWord == 0);

    /* forbidden_zero_bit (not checked to be zero, errors ignored) */
    tmp = h264bsdGetBits(pStrmData, 1);
    /* Assuming that NAL unit starts from byte boundary > don't have to check
     * following 7 bits for END_OF_STREAM */
    if (tmp == END_OF_STREAM)
        return(HANTRO_NOK);

    tmp = h264bsdGetBits(pStrmData, 2);
    pNalUnit->nalRefIdc = tmp;

    tmp = h264bsdGetBits(pStrmData, 5);
    pNalUnit->nalUnitType = (nalUnitType_e)tmp;

    /* data partitioning NAL units not supported */
    if ( (tmp == 2) || (tmp == 3) || (tmp == 4) )
    {
        return(HANTRO_NOK);
    }

    /* nal_ref_idc shall not be zero for these nal_unit_types */
    if ( ( (tmp == NAL_SEQ_PARAM_SET) || (tmp == NAL_PIC_PARAM_SET) ||
           (tmp == NAL_CODED_SLICE_IDR) ) && (pNalUnit->nalRefIdc == 0) )
    {
        return(HANTRO_NOK);
    }
    /* nal_ref_idc shall be zero for these nal_unit_types */
    else if ( ( (tmp == NAL_SEI) || (tmp == NAL_ACCESS_UNIT_DELIMITER) ||
                (tmp == NAL_END_OF_SEQUENCE) || (tmp == NAL_END_OF_STREAM) ||
                (tmp == NAL_FILLER_DATA) ) && (pNalUnit->nalRefIdc != 0) )
    {
        return(HANTRO_NOK);
    }

    return(HANTRO_OK);

}


text:
#import "DDSuperAPI.h"

@interface DDHistoryMessageAPI : DDSuperAPI

@end


text:
declare namespace java {
  namespace nio {
    namespace charset {

      class IllegalCharsetNameException extends java.lang.IllegalArgumentException {
        public constructor(arg0: java.lang.String | string)
        public getCharsetName(): java.lang.String
      }

    }
  }
}


text:
/*!
** @file VREF.h
** @version 01.04
** @brief
**          This file implements the VREF (VREF) module initialization
**          according to the Peripheral Initialization settings, and
**          defines interrupt service routines prototypes.
*/
/*!
**  @addtogroup VREF_module VREF module documentation
**  @{
*/

#ifndef VREF_H_
#define VREF_H_

/* MODULE VREF. */

#include "VREF_Init.h"

#ifdef __cplusplus
extern "C" {
#endif

/* Initialization method user name */
#define VREF_Init VREF_Init
/* PDD macros peripheral base address parameter */
#define VREF_DEVICE VREF_BASE_PTR

#ifdef __cplusplus
}
#endif

/* END VREF. */
#endif /* #ifndef __VREF_H_ */
/*!
** @}
*/
/*
** ###################################################################
**
**     This file was created by Processor Expert 10.5 [05.21]
**     for the Freescale Kinetis series of microcontrollers.
**
** ###################################################################
*/


text:
package main

import (
	"github.com/hoisie/redis"
	"net/http"
	"runtime"
)

var client *redis.Client

func init() {
	client = &redis.Client{
		Addr:        "127.0.0.1:6379",
		Db:          0, // default db is 0
		MaxPoolSize: 10000,
	}
	runtime.GOMAXPROCS(runtime.NumCPU())
}
func main() {

	http.HandleFunc("/put", PutHandler)
	http.HandleFunc("/get", GetHandler)
	http.HandleFunc("/", HomeHandler)
	if err := http.ListenAndServe(":1988", nil); err != nil {
		panic("ListenAndServe: " + err.Error())
	}

}

func HomeHandler(w http.ResponseWriter, req *http.Request) {
	w.Write([]byte("welcome to use GoMq!"))
}

func PutHandler(w http.ResponseWriter, req *http.Request) {
	req.ParseForm()
	if err := client.Lpush("queue", []byte(req.FormValue("data"))); err != nil {
		w.Write([]byte("error"))
		return
	}
	w.Write([]byte("ok"))
	return
}
func GetHandler(w http.ResponseWriter, req *http.Request) {
	req.ParseForm()
	value, err := client.Rpop("queue")
	if err == nil {
		w.Write([]byte(value))
		return
	}
	w.Write([]byte("end"))
	return
}


text:
<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/ads/googleads/v10/enums/conversion_origin.proto

namespace Google\Ads\GoogleAds\V10\Enums;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * Container for enum describing possible conversion origins.
 *
 * Generated from protobuf message google.ads.googleads.v10.enums.ConversionOriginEnum
 */
class ConversionOriginEnum extends \Google\Protobuf\Internal\Message
{

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V10\Enums\ConversionOrigin::initOnce();
        parent::__construct($data);
    }

}


text:
import json
from os.path import isfile, join

from platformio import __version__
from platformio.exception import InvalidSettingName, InvalidSettingValue
from platformio.util import get_home_dir

DEFAULT_SETTINGS = {
    "check_platformio_interval": {
        "description": "Check for the new PlatformIO interval (days)",
        "value": 3
    },
    "check_platforms_interval": {
        "description": "Check for the platform updates interval (days)",
        "value": 7
    },
    "check_libraries_interval": {
        "description": "Check for the library updates interval (days)",
        "value": 7
    },
    "auto_update_platforms": {
        "description": "Automatically update platforms (Yes/No)",
        "value": True
    },
    "auto_update_libraries": {
        "description": "Automatically update libraries (Yes/No)",
        "value": True
    },
    "enable_telemetry": {
        "description": ("Shares commands, platforms and libraries usage"
                        " to help us make PlatformIO better (Yes/No)"),
        "value": True
    },
    "enable_prompts": {
        "description": (
            "Can PlatformIO communicate with you via prompts: "
            "propose to install platforms which aren't installed yet, "
            "paginate over library search results and etc.)? ATTENTION!!! "
            "If you call PlatformIO like subprocess, "
            "please disable prompts to avoid blocking (Yes/No)"),
        "value": True
    }
}

class State(object):

    def __init__(self, path=None):
        self.path = path
        if not self.path:
            self.path = join(get_home_dir(), "appstate.json")
        self._state = {}

    def __enter__(self):
        try:
            if isfile(self.path):
                with open(self.path, "r") as fp:
                    self._state = json.load(fp)
        except ValueError:
            self._state = {}
        return self._state

    def __exit__(self, type_, value, traceback):
        with open(self.path, "w") as fp:
            if "dev" in __version__:
                json.dump(self._state, fp, indent=4)
            else:
                json.dump(self._state, fp)

def get_state_item(name, default=None):
    with State() as data:
        return data.get(name, default)

def set_state_item(name, value):
    with State() as data:
        data[name] = value

def get_setting(name):
    if name not in DEFAULT_SETTINGS:
        raise InvalidSettingName(name)

    with State() as data:
        if "settings" in data and name in data['settings']:
            return data['settings'][name]

    return DEFAULT_SETTINGS[name]['value']

def set_setting(name, value):
    if name not in DEFAULT_SETTINGS:
        raise InvalidSettingName(name)

    defdata = DEFAULT_SETTINGS[name]
    try:
        if "validator" in defdata:
            value = defdata['validator']()
        elif (isinstance(defdata['value'], bool)
              and not isinstance(value, bool)):
            value = str(value).lower() in ("yes", "y", "1")
        elif isinstance(defdata['value'], int):
            value = int(value)
    except Exception:
        raise InvalidSettingValue(value, name)

    with State() as data:
        if "settings" not in data:
            data['settings'] = {}
        data['settings'][name] = value

def reset_settings():
    with State() as data:
        if "settings" in data:
            del data['settings']


text:
import { GraphQLList, GraphQLNonNull, GraphQLID, GraphQLInt, GraphQLString } from 'graphql'
import _debug from 'debug'
import { GraphQLUUID } from '../scalars'
import Tag from '../../models/tag'
import User from '../../models/user'
import Article from '../../models/article'
import ArticleTag from './../../models/join/article_tag'
import ArticleType, { CreateArticleInput, EditArticleInput } from './articleType'

const debug = _debug('bear:server:articleMutation')

export default {
  createArticle: {
    type: ArticleType,
    description: 'Adds a new article to the database.',
    args: {
      input: {
        type: new GraphQLNonNull(CreateArticleInput),
      },
    },
    async resolve(_, args, context) {
      const newArticle = await Article.query().insert({
        title: args.input.title,
        slug: slugIt(args.input.title),
        excerpt: args.input.excerpt,
        content: args.input.content,
        rawContent: args.input.rawContent,
        featureImage: args.input.featureImage,
        backgroundImage: args.input.backgroundImage,
        meta: args.input.meta,
        attachments: args.input.attachments,
        published: args.input.published,
        userId: context.user.id,
      })

      args.input.tags.map(async (tag) => {
        console.log(tag)
        const existingTag = await Tag.query().where('name', tag).first().skipUndefined()
        if (existingTag) {
          await ArticleTag.query().insert({
            tagId: existingTag.id,
            articleId: newArticle.id,
          })
        } else {
          await newArticle.$relatedQuery('tags').insert({ name: tag }).skipUndefined()
        }
      })
      const relatedFeatureImg = await Media.query()
        .where('url', args.input.featureImage)
        .first()
        .skipUndefined()
      await ArticleMedia.query()
        .insert({
          mediaId: relatedFeatureImg.id,
          articleId: createArticle.id,
        })
        .skipUndefined()
      return newArticle
    },
  },
  editArticle: {
    type: ArticleType,
    description: 'Edit an existing article',
    args: {
      id: {
        type: new GraphQLNonNull(GraphQLUUID),
        description: 'The article ID',
      },
      input: {
        type: new GraphQLNonNull(EditArticleInput),
        description: 'The required fields for creating an article.',
      },
    },
    async resolve(_, args, context) {
      debug(args)
      const updatedArticle = await Article.query().patchAndFetchById(args.id, {
        title: args.input.title,
        slug: slugIt(args.input.title),
        excerpt: args.input.excerpt,
        content: args.input.content,
        rawContent: args.input.rawContent,
        featureImage: args.input.featureImage,
        backgroundImage: args.input.backgroundImage,
        meta: args.input.meta,
        attachments: args.input.attachments,
        published: args.input.published,
      })
      return updatedArticle
    },
  },
}


text:
go-sysfs
========

Go package for Linux sysfs


text:
void CTagGroupPickDlg::InitGroupTree(BOOL bAssoc)
{
	if (bAssoc)
	{
		CNode* pNode = FindMatchNode(m_pRootNode, m_bstrAssocGroup);
		if (pNode == NULL)
			return;

		CSimpleArray<CNode *>& apChildNodes = pNode->GetChildNodes();
		for (int i = 0; i < apChildNodes.GetSize(); i++)
		{
			CNode* pChildNode = apChildNodes[i];
			HTREEITEM hChildItem = InsertNode(NULL, pChildNode);

	//		//ÓÅÏÈÕ¹¿ª±¾µØ½Úµã
	//		if (pChildNode->GetNodeType() == CNode::nodeNet && pChildNode->m_bstrName == L"ThisNode")
	//			m_tree.Expand(hChildItem);

			if (pChildNode->GetNodeType() > CNode::nodeRoot)
				ExpandNode(hChildItem);
		}
	}
	else
	{
		HTREEITEM hRoot = InsertNode(NULL, m_pRootNode);
		m_tree.Expand(hRoot);
	}
}

HTREEITEM CTagGroupPickDlg::InsertNode(HTREEITEM hParent, CNode* pNode)
{
	USES_CONVERSION;

	TV_INSERTSTRUCT tvis;
	tvis.hParent = hParent;
	tvis.hInsertAfter = TVI_SORT;
	tvis.item.mask = TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_PARAM;
	tvis.item.pszText = OLE2T(pNode->m_bstrName);

	BOOL bInsertVirtual = FALSE;

	switch (pNode->GetNodeType())
	{
	case CNode::nodeRoot:
		tvis.item.iImage = 0;
		tvis.item.iSelectedImage = 1;
		bInsertVirtual = TRUE;
		break;
	case CNode::nodeNet:
		if (pNode->m_bstrName == L"ThisNode")
		{
			tvis.item.iImage = 2;
			tvis.item.iSelectedImage = 3;
		}
		else
		{
			tvis.item.iImage = 4;
			tvis.item.iSelectedImage = 5;
		}
		tvis.hInsertAfter = TVI_LAST;
		bInsertVirtual = TRUE;
		break;
	case CNode::nodeTag:
		tvis.item.iImage = 6;
		tvis.item.iSelectedImage = 7;
		break;
	default:
		ATLASSERT(FALSE);
	}

	tvis.item.lParam = (long)pNode;

	HTREEITEM hItem = m_tree.InsertItem(&tvis);

	if (bInsertVirtual)
	{
		//ÒòΪÍøÂç½ÚµãûÓдò¿ª£¬ÏȼÙÉèÓÐÒ»¸öÏîÄ¿
		HTREEITEM hVirtuleItem = m_tree.InsertItem(_T("subitem"), hItem, TVI_LAST);
		m_tree.SetItemData(hVirtuleItem, 0);
	}

	return hItem;
}

////////////////////////////////////////////////////////////////////
//¹¦ ÄÜ£ºÉ¾³ýËùÓÐ×Ó½Úµã
////////////////////////////////////////////////////////////////////
void CTagGroupPickDlg::DeleteAllChildItem(HTREEITEM hItem)
{
	HTREEITEM hItemChild, hItemChildNext ;
	ATLASSERT(hItem);

	hItemChild = m_tree.GetChildItem(hItem);
	while (hItemChild)
	{
		hItemChildNext = m_tree.GetNextSiblingItem(hItemChild);
		m_tree.DeleteItem(hItemChild);
		hItemChild = hItemChildNext;
	}
}

void CTagGroupPickDlg::ExpandNode(HTREEITEM hItem)
{
	//ɾ³ý×Ó½Úµã
	DeleteAllChildItem(hItem);

	CNode* pNode = (CNode *)m_tree.GetItemData(hItem);

	CSimpleArray<CNode *>& apChildNodes = pNode->GetChildNodes();
	for (int i = 0; i < apChildNodes.GetSize(); i++)
	{
		CNode* pChildNode = apChildNodes[i];
		HTREEITEM hChildItem = InsertNode(hItem, pChildNode);

//		//ÓÅÏÈÕ¹¿ª±¾µØ½Úµã
//		if (pChildNode->GetNodeType() == CNode::nodeNet && pChildNode->m_bstrName == L"ThisNode")
//			m_tree.Expand(hChildItem);

		if (pChildNode->GetNodeType() > CNode::nodeNet)
			ExpandNode(hChildItem);
	}
}

LRESULT CTagGroupPickDlg::OnItemexpandingGroup(int idCtrl, LPNMHDR pnmh, BOOL& bHandled)
{
	NM_TREEVIEW* pnmtv = (NM_TREEVIEW*)pnmh;

	HTREEITEM hItem = pnmtv->itemNew.hItem;

	//½ÚµãÒѾ±»Õ¹¿ª¹ý·µ»Ø£¬ÓÉ×ÓÏîÄ¿ÊÇ·ñÊÇÕýʽ½ÚµãÅжÏ
	HTREEITEM hChildItem = m_tree.GetChildItem(hItem);
	if (hChildItem != NULL && m_tree.GetItemData(hChildItem) != 0)
		return 0;

	ExpandNode(hItem);

	return 0;
}

CString CTagGroupPickDlg::GetTagGroup(HTREEITEM hItem)
{
	CString strTagGroup;

	//È¡½ÚµãÃû³Æ
	TV_ITEM tvi;
	memset(&tvi, 0, sizeof(TV_ITEM));
	TCHAR szBuf[128];
	tvi.mask = TVIF_TEXT;
	tvi.pszText = szBuf;
	tvi.cchTextMax = 80;

	while (hItem)
	{
		tvi.hItem = hItem;
		m_tree.GetItem(&tvi);

		strTagGroup.Insert(0, szBuf);
		hItem = m_tree.GetParentItem(hItem);
		if (hItem)
			strTagGroup.Insert(0, _T('.'));
	}

	return strTagGroup;
}

LRESULT CTagGroupPickDlg::OnSelchangedGroup(int idCtrl, LPNMHDR pnmh, BOOL& bHandled)
{
	NM_TREEVIEW* pnmtv = (NM_TREEVIEW*)pnmh;

	HTREEITEM hItem = pnmtv->itemNew.hItem;

	m_strPickGroup = GetTagGroup(hItem);
	m_editSel.SetWindowText(m_strPickGroup);

	return 0;
}

LRESULT CTagGroupPickDlg::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
	m_tree.Attach(GetDlgItem(IDC_GROUP));
	m_btnAssoc.Attach(GetDlgItem(IDC_ASSOC));
	m_editSel.Attach(GetDlgItem(IDC_SELECT));
	m_editSel.SetWindowText(m_strPickGroup);
	m_editSel.SetSel(0, -1);

	m_ImageList.Create(IDB_TAGTREE, 16, 1, RGB(255, 255, 255));
	m_tree.SetImageList((HIMAGELIST)m_ImageList, TVSIL_NORMAL);

	if (m_pRootNode == NULL)
		m_pRootNode = new CRootNode;

	BOOL bAssoc = (m_bstrAssocGroup != NULL && !(m_bstrAssocGroup == L""));
	if (!bAssoc || m_bDisableAssoc)
		m_btnAssoc.EnableWindow(FALSE);
	m_btnAssoc.SetCheck(bAssoc ? BST_CHECKED : BST_UNCHECKED);
	UpdateGroupTree();

	return 1;
}

void CTagGroupPickDlg::UpdateGroupTree()
{
	//ɾ³ýËùÓиù½Úµã
	HTREEITEM hRoot, hRootNext;
	hRoot = m_tree.GetRootItem();
	while (hRoot)
	{
		hRootNext = m_tree.GetNextSiblingItem(hRoot);
		m_tree.DeleteItem(hRoot);
		hRoot = hRootNext;
	}

	BOOL bAssoc = m_btnAssoc.GetCheck() == BST_CHECKED;
	InitGroupTree(bAssoc);
}

LRESULT CTagGroupPickDlg::OnOK(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
{
	int nLen = m_editSel.GetWindowTextLength();
	m_editSel.GetWindowText(m_strPickGroup.GetBufferSetLength(nLen), nLen+1);
	m_strPickGroup.ReleaseBuffer();

	EndDialog(wID);
	return 0;
}

LRESULT CTagGroupPickDlg::OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
{
	EndDialog(wID);
	return 0;
}

void CTagGroupPickDlg::OnFinalMessage(HWND hWnd)
{
	if (m_pRootNode)
	{
		m_pRootNode->RemoveAll();
		delete m_pRootNode;
		m_pRootNode = NULL;
	}
}

LRESULT CTagGroupPickDlg::OnClickedAssoc(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
{
	UpdateGroupTree();

	return 0;
}


text:
package org.gradle.internal.hash;

/**
 * Hasher abstraction that can be fed different kinds of primitives.
 * Inspired by the Google Guava project – https://github.com/google/guava.
 */
public interface Hasher {
    void putBytes(byte[] bytes);
    void putBytes(byte[] bytes, int off, int len);
    void putByte(byte value);
    void putInt(int value);
    void putLong(long value);
    void putDouble(double value);
    void putBoolean(boolean value);
    void putString(CharSequence value);
    void putHash(HashCode hashCode);
    HashCode hash();
}


text:
name             'git_better'
version          '1.0.4'

license          'MIT'
maintainer       'James M. Greene'
maintainer_email 'james.m.greene@gmail.com'
description      'Provide a selection of better Git Provider(s) for Chef `deploy` resources'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
source_url       'https://github.com/JamesMGreene/chef-git-better'        if respond_to?(:source_url)
issues_url       'https://github.com/JamesMGreene/chef-git-better/issues' if respond_to?(:issues_url)

####################################################################################################
#
# List of known platforms for Chef Supermarket:
#   https://github.com/chef/supermarket/blob/master/app/helpers/supported_platforms_helper.rb
#
# List of known platforms for Chef Client (look for "PROVIDERS" object):
#   https://github.com/chef/chef/blob/master/spec/unit/provider_resolver_spec.rb#L541-L827
#
####################################################################################################

# Linux: 'rhel' platform_family
supports 'amazon'
supports 'redhat'
supports 'centos'
supports 'scientific'
supports 'oracle'

# Linux: 'fedora' platform_family (basically 'rhel')
supports 'fedora'

# Linux: 'debian' platform_family
supports 'debian'
supports 'ubuntu'
supports 'linuxmint'

# Mac: 'mac_os_x'/'darwin' platform_family
supports 'mac_os_x'
supports 'mac_os_x_server'

# Windows: 'windows' platform_family
supports 'windows'
supports 'mingw32'
supports 'mswin'

# Solaris & Friends
supports 'solaris'
supports 'solaris2'
supports 'opensolaris'
supports 'omnios'
supports 'smartos'


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:background="#fff">

    <View
        android:layout_width="match_parent"
        android:layout_height="180dp"
        android:background="#9ED5E4"/>

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginBottom="@dimen/activity_vertical_margin"
        android:layout_marginLeft="@dimen/activity_horizontal_margin"
        android:layout_marginTop="40dp"
        android:gravity="center_vertical"
        android:orientation="horizontal">

        <ImageView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:src="@drawable/milk"/>

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textSize="@dimen/menu_text_size"
            android:layout_marginLeft="@dimen/activity_horizontal_margin"
            android:text="@string/menu_milk_text"
            android:textColor="@color/menu_text_color"/>
    </LinearLayout>

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginBottom="@dimen/activity_vertical_margin"
        android:layout_marginLeft="@dimen/activity_horizontal_margin"
        android:gravity="center_vertical"
        android:orientation="horizontal">

        <ImageView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:src="@drawable/basketball"/>

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginLeft="@dimen/activity_horizontal_margin"
            android:textSize="@dimen/menu_text_size"
            android:textColor="@color/menu_text_color"
            android:text="@string/menu_basketball_text"/>
    </LinearLayout>

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginBottom="@dimen/activity_vertical_margin"
        android:layout_marginLeft="@dimen/activity_horizontal_margin"
        android:gravity="center_vertical"
        android:orientation="horizontal">

        <ImageView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:src="@drawable/book"/>

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginLeft="@dimen/activity_horizontal_margin"
            android:text="@string/menu_book_text"
            android:textColor="@color/menu_text_color"
            android:textSize="@dimen/menu_text_size"/>
    </LinearLayout>

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginBottom="@dimen/activity_vertical_margin"
        android:layout_marginLeft="@dimen/activity_horizontal_margin"
        android:gravity="center_vertical"
        android:orientation="horizontal">

        <ImageView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:src="@drawable/game"/>

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginLeft="@dimen/activity_horizontal_margin"
            android:textSize="@dimen/menu_text_size"
            android:textColor="@color/menu_text_color"
            android:text="@string/menu_game_text"/>
    </LinearLayout>

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginBottom="@dimen/activity_vertical_margin"
        android:layout_marginLeft="@dimen/activity_horizontal_margin"
        android:gravity="center_vertical"
        android:orientation="horizontal">

        <ImageView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:src="@drawable/mouse"/>

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textColor="@color/menu_text_color"
            android:layout_marginLeft="@dimen/activity_horizontal_margin"
            android:textSize="@dimen/menu_text_size"
            android:text="@string/menu_mouse_text"/>
    </LinearLayout>

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginBottom="@dimen/activity_vertical_margin"
        android:layout_marginLeft="@dimen/activity_horizontal_margin"
        android:gravity="center_vertical"
        android:orientation="horizontal">

        <ImageView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:src="@drawable/rocket"/>

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textColor="@color/menu_text_color"
            android:layout_marginLeft="@dimen/activity_horizontal_margin"
            android:textSize="@dimen/menu_text_size"
            android:text="@string/menu_rocket_text"/>
    </LinearLayout>

</LinearLayout>


text:
#include "chipmunk_private.h"
#include "constraints/util.h"

cpContact*
cpContactInit(cpContact *con, cpVect p, cpVect n, cpFloat dist, cpHashValue hash)
{
	con->p = p;
	con->n = n;
	con->dist = dist;

	con->jnAcc = 0.0f;
	con->jtAcc = 0.0f;
	con->jBias = 0.0f;

	con->hash = hash;

	return con;
}

// TODO make this generic so I can reuse it for constraints also.
static inline void
unthreadHelper(cpArbiter *arb, cpBody *body)
{
	struct cpArbiterThread *thread = cpArbiterThreadForBody(arb, body);
	cpArbiter *prev = thread->prev;
	cpArbiter *next = thread->next;

	if(prev){
		cpArbiterThreadForBody(prev, body)->next = next;
	} else if(body->arbiterList == arb) {
		// IFF prev is NULL and body->arbiterList == arb, is arb at the head of the list.
		// This function may be called for an arbiter that was never in a list.
		// In that case, we need to protect it from wiping out the body->arbiterList pointer.
		body->arbiterList = next;
	}

	if(next) cpArbiterThreadForBody(next, body)->prev = prev;

	thread->prev = NULL;
	thread->next = NULL;
}

void
cpArbiterUnthread(cpArbiter *arb)
{
	unthreadHelper(arb, arb->body_a);
	unthreadHelper(arb, arb->body_b);
}

cpBool cpArbiterIsFirstContact(const cpArbiter *arb)
{
	return arb->CP_PRIVATE(state) == cpArbiterStateFirstColl;
}

int cpArbiterGetCount(const cpArbiter *arb)
{
	// Return 0 contacts if we are in a separate callback.
	return (arb->CP_PRIVATE(state) != cpArbiterStateCached ? arb->CP_PRIVATE(numContacts) : 0);
}

cpVect
cpArbiterGetNormal(const cpArbiter *arb, int i)
{
	cpAssertHard(0 <= i && i < cpArbiterGetCount(arb), "Index error: The specified contact index is invalid for this arbiter");

	cpVect n = arb->contacts[i].n;
	return arb->swappedColl ? cpvneg(n) : n;
}

cpVect
cpArbiterGetPoint(const cpArbiter *arb, int i)
{
	cpAssertHard(0 <= i && i < cpArbiterGetCount(arb), "Index error: The specified contact index is invalid for this arbiter");

	return arb->CP_PRIVATE(contacts)[i].CP_PRIVATE(p);
}

cpFloat
cpArbiterGetDepth(const cpArbiter *arb, int i)
{
	cpAssertHard(0 <= i && i < cpArbiterGetCount(arb), "Index error: The specified contact index is invalid for this arbiter");

	return arb->CP_PRIVATE(contacts)[i].CP_PRIVATE(dist);
}

cpContactPointSet
cpArbiterGetContactPointSet(const cpArbiter *arb)
{
	cpContactPointSet set;
	set.count = cpArbiterGetCount(arb);

	for(int i=0; i<set.count; i++){
		set.points[i].point = arb->CP_PRIVATE(contacts)[i].CP_PRIVATE(p);
		set.points[i].normal = arb->CP_PRIVATE(contacts)[i].CP_PRIVATE(n);
		set.points[i].dist = arb->CP_PRIVATE(contacts)[i].CP_PRIVATE(dist);
	}

	return set;
}

void
cpArbiterSetContactPointSet(cpArbiter *arb, cpContactPointSet *set)
{
	int count = set->count;
	cpAssertHard(count == arb->numContacts, "The number of contact points cannot be changed.");

	for(int i=0; i<count; i++){
		arb->contacts[i].p = set->points[i].point;
		arb->contacts[i].n = set->points[i].normal;
		arb->contacts[i].dist = set->points[i].dist;
	}
}

cpVect
cpArbiterTotalImpulse(const cpArbiter *arb)
{
	cpContact *contacts = arb->contacts;
	cpVect sum = cpvzero;

	for(int i=0, count=cpArbiterGetCount(arb); i<count; i++){
		cpContact *con = &contacts[i];
		sum = cpvadd(sum, cpvmult(con->n, con->jnAcc));
	}

	return (arb->swappedColl ? sum : cpvneg(sum));
}

cpVect
cpArbiterTotalImpulseWithFriction(const cpArbiter *arb)
{
	cpContact *contacts = arb->contacts;
	cpVect sum = cpvzero;

	for(int i=0, count=cpArbiterGetCount(arb); i<count; i++){
		cpContact *con = &contacts[i];
		sum = cpvadd(sum, cpvrotate(con->n, cpv(con->jnAcc, con->jtAcc)));
	}

	return (arb->swappedColl ? sum : cpvneg(sum));
}

cpFloat
cpArbiterTotalKE(const cpArbiter *arb)
{
	cpFloat eCoef = (1 - arb->e)/(1 + arb->e);
	cpFloat sum = 0.0;

	cpContact *contacts = arb->contacts;
	for(int i=0, count=cpArbiterGetCount(arb); i<count; i++){
		cpContact *con = &contacts[i];
		cpFloat jnAcc = con->jnAcc;
		cpFloat jtAcc = con->jtAcc;

		sum += eCoef*jnAcc*jnAcc/con->nMass + jtAcc*jtAcc/con->tMass;
	}

	return sum;
}

void
cpArbiterIgnore(cpArbiter *arb)
{
	arb->state = cpArbiterStateIgnore;
}

cpVect
cpArbiterGetSurfaceVelocity(cpArbiter *arb)
{
	return cpvmult(arb->surface_vr, arb->swappedColl ? -1.0f : 1.0);
}

void
cpArbiterSetSurfaceVelocity(cpArbiter *arb, cpVect vr)
{
	arb->surface_vr = cpvmult(vr, arb->swappedColl ? -1.0f : 1.0);
}

cpArbiter*
cpArbiterInit(cpArbiter *arb, cpShape *a, cpShape *b)
{
	arb->handler = NULL;
	arb->swappedColl = cpFalse;

	arb->e = 0.0f;
	arb->u = 0.0f;
	arb->surface_vr = cpvzero;

	arb->numContacts = 0;
	arb->contacts = NULL;

	arb->a = a; arb->body_a = a->body;
	arb->b = b; arb->body_b = b->body;

	arb->thread_a.next = NULL;
	arb->thread_b.next = NULL;
	arb->thread_a.prev = NULL;
	arb->thread_b.prev = NULL;

	arb->stamp = 0;
	arb->state = cpArbiterStateFirstColl;

	arb->data = NULL;

	return arb;
}

void
cpArbiterUpdate(cpArbiter *arb, cpContact *contacts, int numContacts, cpCollisionHandler *handler, cpShape *a, cpShape *b)
{
	// Iterate over the possible pairs to look for hash value matches.
	for(int i=0; i<numContacts; i++){
		cpContact *con = &contacts[i];

		for(int j=0; j<arb->numContacts; j++){
			cpContact *old = &arb->contacts[j];

			// This could trigger false positives, but is fairly unlikely nor serious if it does.
			if(con->hash == old->hash){
				// Copy the persistant contact information.
				con->jnAcc = old->jnAcc;
				con->jtAcc = old->jtAcc;
			}
		}
	}

	arb->contacts = contacts;
	arb->numContacts = numContacts;

	arb->handler = handler;
	arb->swappedColl = (a->collision_type != handler->a);

	arb->e = a->e * b->e;
	arb->u = a->u * b->u;

	// Currently all contacts will have the same normal.
	// This may change in the future.
	cpVect n = (numContacts ? contacts[0].n : cpvzero);
	cpVect surface_vr = cpvsub(a->surface_v, b->surface_v);
	arb->surface_vr = cpvsub(surface_vr, cpvmult(n, cpvdot(surface_vr, n)));

	// For collisions between two similar primitive types, the order could have been swapped.
	arb->a = a; arb->body_a = a->body;
	arb->b = b; arb->body_b = b->body;

	// mark it as new if it's been cached
	if(arb->state == cpArbiterStateCached) arb->state = cpArbiterStateFirstColl;
}

void
cpArbiterPreStep(cpArbiter *arb, cpFloat dt, cpFloat slop, cpFloat bias)
{
	cpBody *a = arb->body_a;
	cpBody *b = arb->body_b;

	for(int i=0; i<arb->numContacts; i++){
		cpContact *con = &arb->contacts[i];

		// Calculate the offsets.
		con->r1 = cpvsub(con->p, a->p);
		con->r2 = cpvsub(con->p, b->p);

		// Calculate the mass normal and mass tangent.
		con->nMass = 1.0f/k_scalar(a, b, con->r1, con->r2, con->n);
		con->tMass = 1.0f/k_scalar(a, b, con->r1, con->r2, cpvperp(con->n));

		// Calculate the target bias velocity.
		con->bias = -bias*cpfmin(0.0f, con->dist + slop)/dt;
		con->jBias = 0.0f;

		// Calculate the target bounce velocity.
		con->bounce = normal_relative_velocity(a, b, con->r1, con->r2, con->n)*arb->e;
	}
}

void
cpArbiterApplyCachedImpulse(cpArbiter *arb, cpFloat dt_coef)
{
	if(cpArbiterIsFirstContact(arb)) return;

	cpBody *a = arb->body_a;
	cpBody *b = arb->body_b;

	for(int i=0; i<arb->numContacts; i++){
		cpContact *con = &arb->contacts[i];
		cpVect j = cpvrotate(con->n, cpv(con->jnAcc, con->jtAcc));
		apply_impulses(a, b, con->r1, con->r2, cpvmult(j, dt_coef));
	}
}

// TODO is it worth splitting velocity/position correction?

void
cpArbiterApplyImpulse(cpArbiter *arb)
{
	cpBody *a = arb->body_a;
	cpBody *b = arb->body_b;
	cpVect surface_vr = arb->surface_vr;
	cpFloat friction = arb->u;

	for(int i=0; i<arb->numContacts; i++){
		cpContact *con = &arb->contacts[i];
		cpFloat nMass = con->nMass;
		cpVect n = con->n;
		cpVect r1 = con->r1;
		cpVect r2 = con->r2;

		cpVect vb1 = cpvadd(a->v_bias, cpvmult(cpvperp(r1), a->w_bias));
		cpVect vb2 = cpvadd(b->v_bias, cpvmult(cpvperp(r2), b->w_bias));
		cpVect vr = cpvadd(relative_velocity(a, b, r1, r2), surface_vr);

		cpFloat vbn = cpvdot(cpvsub(vb2, vb1), n);
		cpFloat vrn = cpvdot(vr, n);
		cpFloat vrt = cpvdot(vr, cpvperp(n));

		cpFloat jbn = (con->bias - vbn)*nMass;
		cpFloat jbnOld = con->jBias;
		con->jBias = cpfmax(jbnOld + jbn, 0.0f);

		cpFloat jn = -(con->bounce + vrn)*nMass;
		cpFloat jnOld = con->jnAcc;
		con->jnAcc = cpfmax(jnOld + jn, 0.0f);

		cpFloat jtMax = friction*con->jnAcc;
		cpFloat jt = -vrt*con->tMass;
		cpFloat jtOld = con->jtAcc;
		con->jtAcc = cpfclamp(jtOld + jt, -jtMax, jtMax);

		apply_bias_impulses(a, b, r1, r2, cpvmult(n, con->jBias - jbnOld));
		apply_impulses(a, b, r1, r2, cpvrotate(n, cpv(con->jnAcc - jnOld, con->jtAcc - jtOld)));
	}
}


text:
void
SysTickEnable(void)
{
    //
    // Enable SysTick.
    //
    HWREG(NVIC_ST_CTRL) |= NVIC_ST_CTRL_CLK_SRC | NVIC_ST_CTRL_ENABLE;
}

//*****************************************************************************
//
//! Disables the SysTick counter.
//!
//! This function stops the SysTick counter.  If an interrupt handler has been
//! registered, it is not called until SysTick is restarted.
//!
//! \return None.
//
//*****************************************************************************
void
SysTickDisable(void)
{
    //
    // Disable SysTick.
    //
    HWREG(NVIC_ST_CTRL) &= ~(NVIC_ST_CTRL_ENABLE);
}

//*****************************************************************************
//
//! Registers an interrupt handler for the SysTick interrupt.
//!
//! \param pfnHandler is a pointer to the function to be called when the
//! SysTick interrupt occurs.
//!
//! This function registers the handler to be called when a SysTick interrupt
//! occurs.
//!
//! \sa IntRegister() for important information about registering interrupt
//! handlers.
//!
//! \return None.
//
//*****************************************************************************
void
SysTickIntRegister(void (*pfnHandler)(void))
{
    //
    // Register the interrupt handler, returning an error if an error occurs.
    //
    IntRegister(FAULT_SYSTICK, pfnHandler);

    //
    // Enable the SysTick interrupt.
    //
    HWREG(NVIC_ST_CTRL) |= NVIC_ST_CTRL_INTEN;
}

//*****************************************************************************
//
//! Unregisters the interrupt handler for the SysTick interrupt.
//!
//! This function unregisters the handler to be called when a SysTick interrupt
//! occurs.
//!
//! \sa IntRegister() for important information about registering interrupt
//! handlers.
//!
//! \return None.
//
//*****************************************************************************
void
SysTickIntUnregister(void)
{
    //
    // Disable the SysTick interrupt.
    //
    HWREG(NVIC_ST_CTRL) &= ~(NVIC_ST_CTRL_INTEN);

    //
    // Unregister the interrupt handler.
    //
    IntUnregister(FAULT_SYSTICK);
}

//*****************************************************************************
//
//! Enables the SysTick interrupt.
//!
//! This function enables the SysTick interrupt, allowing it to be
//! reflected to the processor.
//!
//! \note The SysTick interrupt handler is not required to clear the SysTick
//! interrupt source because it is cleared automatically by the NVIC when the
//! interrupt handler is called.
//!
//! \return None.
//
//*****************************************************************************
void
SysTickIntEnable(void)
{
    //
    // Enable the SysTick interrupt.
    //
    HWREG(NVIC_ST_CTRL) |= NVIC_ST_CTRL_INTEN;
}

//*****************************************************************************
//
//! Disables the SysTick interrupt.
//!
//! This function disables the SysTick interrupt, preventing it from being
//! reflected to the processor.
//!
//! \return None.
//
//*****************************************************************************
void
SysTickIntDisable(void)
{
    //
    // Disable the SysTick interrupt.
    //
    HWREG(NVIC_ST_CTRL) &= ~(NVIC_ST_CTRL_INTEN);
}

//*****************************************************************************
//
//! Sets the period of the SysTick counter.
//!
//! \param ulPeriod is the number of clock ticks in each period of the SysTick
//! counter and must be between 1 and 16,777,216, inclusive.
//!
//! This function sets the rate at which the SysTick counter wraps, which
//! equates to the number of processor clocks between interrupts.
//!
//! \note Calling this function does not cause the SysTick counter to reload
//! immediately.  If an immediate reload is required, the \b NVIC_ST_CURRENT
//! register must be written.  Any write to this register clears the SysTick
//! counter to 0 and causes a reload with the \e ulPeriod supplied here on
//! the next clock after SysTick is enabled.
//!
//! \return None.
//
//*****************************************************************************
void
SysTickPeriodSet(unsigned long ulPeriod)
{
    //
    // Check the arguments.
    //
    ASSERT((ulPeriod > 0) && (ulPeriod <= 16777216));

    //
    // Set the period of the SysTick counter.
    //
    HWREG(NVIC_ST_RELOAD) = ulPeriod - 1;
}

//*****************************************************************************
//
//! Gets the period of the SysTick counter.
//!
//! This function returns the rate at which the SysTick counter wraps, which
//! equates to the number of processor clocks between interrupts.
//!
//! \return Returns the period of the SysTick counter.
//
//*****************************************************************************
unsigned long
SysTickPeriodGet(void)
{
    //
    // Return the period of the SysTick counter.
    //
    return(HWREG(NVIC_ST_RELOAD) + 1);
}

//*****************************************************************************
//
//! Gets the current value of the SysTick counter.
//!
//! This function returns the current value of the SysTick counter, which is
//! a value between the period - 1 and zero, inclusive.
//!
//! \return Returns the current value of the SysTick counter.
//
//*****************************************************************************
unsigned long
SysTickValueGet(void)
{
    //
    // Return the current value of the SysTick counter.
    //
    return(HWREG(NVIC_ST_CURRENT));
}

//*****************************************************************************
//
// Close the Doxygen group.
//! @}
//
//*****************************************************************************


text: - Added validation of all API requests and improved Swagger/OpenAPI description


text:
package br.com.wfcreations.craftduino.block;

import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;

public abstract class BlockContainerBase<T extends TileEntity> extends BlockContainer {

	public BlockContainerBase(int id, Material material) {
		super(id, material);
	}

	@Override
	public abstract T createNewTileEntity(World world);

}


text:
package net.rptools.parser.functions;

import java.util.Collection;
import java.util.Map;

import net.rptools.lib.datavalue.DataType;
import net.rptools.lib.datavalue.DataValue;
import net.rptools.lib.permissions.PermissionLevel;
import net.rptools.parser.ScriptContext;

/**
 * Aliases a script function so that it can be used by calling it with a different name.
 */
public class FunctionAlias implements ScriptFunction {

	/** The function that is aliased. */
	private final ScriptFunction aliasedFunction;

	/** The definition of the alias. */
	private final FunctionDefinition definition;

	/**
	 * Creates a new FunctionAlias object.
	 *
	 * @param aliasName The name of the alias.
	 * @param function The function to alias.
	 *
	 * @throws NullPointerException if either argument is null.
	 */
	public FunctionAlias(final String aliasName, final ScriptFunction function) {

		if (aliasName == null) {
			throw new NullPointerException("Alias name can not be null");
		}

		if (function == null) {
			throw new NullPointerException("Function to be aliased can not be null");
		}

		// Decorate the aliased script function definition with an anonymous class which returns the aliased name
		definition = new FunctionDefinition() {

			@Override
			public Collection<FunctionParameter> parameters() {
				return function.getDefinition().parameters();
			}

			@Override
			public String name() {
				return aliasName;
			}

			@Override
			public boolean isValidParameterName(String name) {
				return function.getDefinition().isValidParameterName(name);
			}

			@Override
			public boolean hasPositionalArgumentConsumer() {
				return function.getDefinition().hasPositionalArgumentConsumer();
			}

			@Override
			public boolean hasParameters() {
				return function.getDefinition().hasParameters();
			}

			@Override
			public boolean hasNamedArgumentConsumer() {
				return function.getDefinition().hasNamedArgumentConsumer();
			}

			@Override
			public FunctionParameter getPositionalArgumentConsumer() {
				return function.getDefinition().getPositionalArgumentConsumer();
			}

			@Override
			public FunctionParameter getParameter(String paramName) {
				return function.getDefinition().getParameter(paramName);
			}

			@Override
			public FunctionParameter getNamedArgumentConsumer() {
				return function.getDefinition().getNamedArgumentConsumer();
			}

			@Override
			public PermissionLevel defaultRequiredPermissionLevel() {
				return function.getDefinition().defaultRequiredPermissionLevel();
			}

            @Override
            public DataType getReturnType() {
                return function.getDefinition().getReturnType();
            }
        };
		aliasedFunction = function;
	}

	@Override
	public FunctionDefinition getDefinition() {
		return definition;
	}

	@Override
	public DataValue call(ScriptContext context, Map<String, DataValue> args) throws ScriptFunctionException {
		return aliasedFunction.call(context, args);
	}

}


text:
#ifndef SSTMAC_COMMON_STATS_EVENT_TRACE_H_
#define SSTMAC_COMMON_STATS_EVENT_TRACE_H_

#include <sstmac/common/stats/stat_collector.h>
#include <sstmac/common/node_address.h>

namespace sstmac {

class event_trace :
  public stat_collector
{
  FactoryRegister("event_trace", stat_collector, event_trace)
 public:
  event_trace(sprockit::sim_parameters* params);

  std::string
  to_string() const override {
    return "event trace";
  }

  virtual void
  simulation_finished(timestamp end) override;

  void
  collect(int key_typeid,
          const std::string& name,
          node_id addr,
          long threadid,
          int aid, int tid,
          long ticks_begin,
          long num_ticks);

  void
  reduce(stat_collector *coll) override;

  void
  dump_local_data() override;

  void
  dump_global_data() override;

  void
  global_reduce(parallel_runtime *rt) override;

  void
  clear() override;

  virtual
  ~event_trace() {
  }

  stat_collector*
  do_clone(sprockit::sim_parameters* params) const override {
    return new event_trace(params);
  }

 protected:
  long start_;
  long stop_;

};

}

#endif /* EVENT_TRACE_H_ */


text:
const FS = require('fs');
const PATH = require('path');
const STORAGE_PATH = PATH.join(__dirname, '/storage.json');

let storage = {};

function isKeyStringValidation(key) {
    if (typeof key !== 'string') {
        throw new TypeError('Key must be a string!');
    }
}

function isKeyExist(key) {
    if (!storage.hasOwnProperty(key)) {
        throw new Error('Key does not exist in the storage!');
    }
}

function isKeyAlreadyExist(key) {
    if (storage.hasOwnProperty(key)) {
        throw new Error('Key already exists in the storage!');
    }
}

function put(key, value) {
    isKeyStringValidation(key);
    isKeyAlreadyExist(key);

    storage[key] = value;
}

function update(key, newValue) {
    isKeyStringValidation(key);
    isKeyExist(key);

    storage[key] = newValue;
}

function remove(key) {
    isKeyStringValidation(key);
    isKeyExist(key);

    delete storage[key];
}

function get(key) {
    isKeyStringValidation(key);
    isKeyExist(key);

    return storage[key];
}

function getAll() {
    if (Object.keys(storage).length === 0) {
        return 'There are no items in the storage';
    }

    return storage;
}

function clear() {
    storage = {};
}

function removeStorageFile() {
    if (FS.existsSync(STORAGE_PATH)) {
        FS.unlinkSync(STORAGE_PATH);
    }
}

function save() {
    let json = JSON.stringify(storage);
    FS.writeFileSync(STORAGE_PATH, json, 'utf-8');
}

function load() {
    if (FS.existsSync(STORAGE_PATH) === false) {
        return;
    }

    let json = FS.readFileSync(STORAGE_PATH, 'utf-8').toString();
    storage = JSON.parse(json);
    return storage;
}

module.exports = {
    put,
    update,
    remove,
    get,
    getAll,
    clear,
    save,
    load,
    removeStorageFile
};


text:
RSpec.describe TTY::Plugins, '#load_from' do
  it "loads gems with a specific pattern" do
    plugins = TTY::Plugins.new
    gemspec_path = fixtures_path('foo-0.0.1.gemspec')
    plugins.load_from(gemspec_path, /^tty-(.*)/)

    expect(plugins.to_a.map(&:name)).to eq([
      'tty-command',
      'tty-prompt',
      'tty-spinner'
    ])
  end

  it "allows for complex pattern" do
    plugins = TTY::Plugins.new
    gemspec_path = fixtures_path('foo-0.0.1.gemspec')
    plugins.load_from(gemspec_path, /^tty-(.*)|pastel/)

    expect(plugins.to_a.map(&:name)).to eq([
      'pastel',
      'tty-command',
      'tty-prompt',
      'tty-spinner'
    ])
  end
end


text:
<?php

namespace Doctrine\Common\Cli;

/**
 * Generic CLI Controller of Tasks execution
 *
 * To include a new Task support, create a task:
 *
 *     [php]
 *     class MyProject\Tools\Cli\Tasks\MyTask extends Doctrine\ORM\Tools\Cli\Tasks\AbstractTask
 *     {
 *         public function run();
 *         public function basicHelp();
 *         public function extendedHelp();
 *         public function validate();
 *     }
 *
 * And then, load the namespace assoaicated an include the support to it in your command-line script:
 *
 *     [php]
 *     $cli = new Doctrine\Common\Cli\CliController();
 *     $cliNS = $cli->getNamespace('custom');
 *     $cliNS->addTask('myTask', 'MyProject\Tools\Cli\Tasks\MyTask');
 *
 * To execute, just type any classify-able name:
 *
 *     $ cli.php custom:my-task
 *
 * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
 * @link    www.doctrine-project.org
 * @since   2.0
 * @version $Revision$
 * @author  Benjamin Eberlei <kontakt@beberlei.de>
 * @author  Guilherme Blanco <guilhermeblanco@hotmail.com>
 * @author  Jonathan Wage <jonwage@gmail.com>
 * @author  Roman Borschel <roman@code-factory.org>
 */
class CliController extends AbstractNamespace
{
    /**
     * The CLI processor of tasks
     *
     * @param Configuration $config
     * @param AbstractPrinter $printer CLI Output printer
     */
    public function __construct(Configuration $config, AbstractPrinter $printer = null)
    {
        $this->setPrinter($printer);
        $this->setConfiguration($config);

        // Include core namespaces of tasks
        $ns = 'Doctrine\Common\Cli\Tasks';
        $this->addNamespace('Core')
             ->addTask('help', $ns . '\HelpTask');

        $ns = 'Doctrine\ORM\Tools\Cli\Tasks';
        $this->addNamespace('Orm')
             ->addTask('clear-cache', $ns . '\ClearCacheTask')
             ->addTask('convert-mapping', $ns . '\ConvertMappingTask')
             ->addTask('ensure-production-settings', $ns . '\EnsureProductionSettingsTask')
             ->addTask('generate-proxies', $ns . '\GenerateProxiesTask')
             ->addTask('run-dql', $ns . '\RunDqlTask')
             ->addTask('schema-tool', $ns . '\SchemaToolTask')
             ->addTask('version', $ns . '\VersionTask');

        $ns = 'Doctrine\DBAL\Tools\Cli\Tasks';
        $this->addNamespace('Dbal')
             ->addTask('run-sql', $ns . '\RunSqlTask');
    }

    /**
     * Add a single task to CLI Core Namespace. This method acts as a delegate.
     * Example of inclusion support to a single task:
     *
     *     [php]
     *     $cli->addTask('my-custom-task', 'MyProject\Cli\Tasks\MyCustomTask');
     *
     * @param string $name CLI Task name
     * @param string $class CLI Task class (FQCN - Fully Qualified Class Name)
     *
     * @return CliController This object instance
     */
    public function addTask($name, $class)
    {
        $this->getNamespace('Core')->addTask($name, $class);

        return $this;
    }

    /**
     * Processor of CLI Tasks. Handles multiple task calls, instantiate
     * respective classes and run them.
     *
     * @param array $args CLI Arguments
     */
    public function run($args = array())
    {
        // Remove script file argument
        $scriptFile = array_shift($args);

        // If not arguments are defined, include "help"
        if (empty($args)) {
            array_unshift($args, 'Core:Help');
        }

        // Process all sent arguments
        $args = $this->_processArguments($args);

        try {
            $this->getPrinter()->writeln('Doctrine Command Line Interface' . PHP_EOL, 'HEADER');

            // Handle possible multiple tasks on a single command
            foreach($args as $taskData) {
                $taskName = $taskData['name'];
                $taskArguments = $taskData['args'];

                $this->runTask($taskName, $taskArguments);
            }
        } catch (\Exception $e) {
            $message = $taskName . ' => ' . $e->getMessage();

            if (isset($taskArguments['trace']) && $taskArguments['trace']) {
                $message .= PHP_EOL . PHP_EOL . $e->getTraceAsString();
            }

            $this->getPrinter()->writeln($message, 'ERROR');
        }

    }

    /**
     * Executes a given CLI Task
     *
     * @param atring $name CLI Task name
     * @param array $args CLI Arguments
     */
    public function runTask($name, $args = array())
    {
        // Retrieve namespace name, task name and arguments
        $taskPath = explode(':', $name);

        // Find the correct namespace where the task is defined
        $taskName = array_pop($taskPath);
        $taskNamespace = $this->_retrieveTaskNamespace($taskPath);

        $taskNamespace->runTask($taskName, $args);
    }

    /**
     * Processes arguments and returns a structured hierachy.
     * Example:
     *
     * cli.php foo -abc --option=value bar --option -a=value --optArr=value1,value2
     *
     * Returns:
     *
     * array(
     *     0 => array(
     *         'name' => 'foo',
     *         'args' => array(
     *             'a' => true,
     *             'b' => true,
     *             'c' => true,
     *             'option' => 'value',
     *         ),
     *     ),
     *     1 => array(
     *         'name' => 'bar',
     *         'args' => array(
     *             'option' => true,
     *             'a' => 'value',
     *             'optArr' => array(
     *                 'value1', 'value2'
     *             ),
     *         ),
     *     ),
     * )
     *
     * Based on implementation of Patrick Fisher <patrick@pwfisher.com> available at:
     * http://pwfisher.com/nucleus/index.php?itemid=45
     *
     * @param array $args
     *
     * @return array
     */
    private function _processArguments($args = array())
    {
        $flags = PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE;
        $regex = '/\s*[,]?\s*"([^"]*)"|\s*[,]?\s*([^,]*)/i';
        $preparedArgs = array();
        $out = & $preparedArgs;

        foreach ($args as $arg){
            // --foo --bar=baz
            if (substr($arg, 0, 2) == '--'){
                $eqPos = strpos($arg, '=');

                // --foo
                if ($eqPos === false){
                    $key = substr($arg, 2);
                    $out[$key] = isset($out[$key]) ? $out[$key] : true;
                // --bar=baz
                } else {
                    $key = substr($arg, 2, $eqPos - 2);
                    $value = substr($arg, $eqPos + 1);
                    $value = (strpos($value, ' ') !== false) ? $value : array_values(array_filter(
                        explode(',', $value), function ($v) { return trim($v) != ''; }
                    ));
                    $out[$key] = ( ! is_array($value) || (is_array($value) && count($value) > 1))
                        ? $value : $value[0];
                }
            // -k=value -abc
            } else if (substr($arg, 0, 1) == '-'){
                // -k=value
                if (substr($arg, 2, 1) == '='){
                    $key = substr($arg, 1, 1);
                    $value = substr($arg, 3);
                    $value = (strpos($value, ' ') !== false) ? $value : array_values(array_filter(
                        explode(',', $value), function ($v) { return trim($v) != ''; }
                    ));
                    $out[$key] = ( ! is_array($value) || (is_array($value) && count($value) > 1))
                        ? $value : $value[0];
                // -abc
                } else {
                    $chars = str_split(substr($arg, 1));

                    foreach ($chars as $char){
                        $key = $char;
                        $out[$key] = isset($out[$key]) ? $out[$key] : true;
                    }
                }
            // plain-arg
            } else {
                $key = count($preparedArgs);
                $preparedArgs[$key] = array(
                    'name' => $arg,
                    'args' => array()
                );
                $out = & $preparedArgs[$key]['args'];
            }
        }

        return $preparedArgs;
    }

    /**
     * Retrieve the correct namespace given a namespace path
     *
     * @param array $namespacePath CLI Namespace path
     *
     * @return AbstractNamespace
     */
    private function _retrieveTaskNamespace($namespacePath)
    {
        $taskNamespace = $this;
        $currentNamespacePath = '';

        // Consider possible missing namespace (ie. "help") and forward to "core"
        if (count($namespacePath) == 0) {
            $namespacePath = array('Core');
        }

        // Loop through each namespace
        foreach ($namespacePath as $namespaceName) {
            $taskNamespace = $taskNamespace->getNamespace($namespaceName);

            // If the given namespace returned "null", throw exception
            if ($taskNamespace === null) {
                throw CliException::namespaceDoesNotExist($namespaceName, $currentNamespacePath);
            }

            $currentNamespacePath = (( ! empty($currentNamespacePath)) ? ':' : '')
                                  . $taskNamespace->getName();
        }

        return $taskNamespace;
    }
}


text:
<?php
namespace Jy_Test\Controller;
use Think\Controller;
use Think\Model;
class ChannelDataController extends Controller {
    public function index(){
        //统计时间
        $time = strtotime('2017-12-18',time());
        $day  = 24*60*60;
        $model = new Model();
        //渠道列表
        $ChannelInfo = D('Jy_script/ChannelInfo');
        $ChannelList = $ChannelInfo->ChannelList();
        if(!$ChannelList){
            die('不存在渠道');
        }
        while (true){
            $EndTime   = date('Y-m-d H:i:s',$time+$day);
            $StartTime = date('Y-m-d H:i:s',$time);
            $DateTime = date('Y-m-d',$time);
            if($DateTime == '2017-10-01'){
                break;
            }

            $ChannelIn   = $ChannelList['ChannelIn'] ;
            $ChannelData = D('Jy_script/ChannelData');
            $gameLoginActionSort  = $ChannelData->gameLoginAction($ChannelIn,$StartTime,$EndTime);
            $UsersOrderSort       = $ChannelData->UsersOrder($ChannelIn,$StartTime,$EndTime);
            $GameAccountOldSort   = $ChannelData->GameAccountOld($ChannelIn,$StartTime,$EndTime);
            $EquipmentAndroidSort = $ChannelData->EquipmentAndroid($ChannelIn,$StartTime,$EndTime);
            $EquipmentIosSort     = $ChannelData->EquipmentIos($ChannelIn,$StartTime,$EndTime);
            $info = array();
            foreach ($ChannelList['ChannelList'] as $k=>$v){
                $info[$k]['Channel']       = $v['GroupChannel'];
                //活跃 ios
                if($gameLoginActionSort[$v['GroupChannel']]){
                    $info[$k]['ActiveNum'] = $gameLoginActionSort[$v['GroupChannel']]['ActiveNum'] ;
                }else{
                    $info[$k]['ActiveNum'] = 0;
                }
                //注册 ios
                $EquipmentRegNum = 0;
                $RegNum          = 0;
                if($EquipmentIosSort[$v['GroupChannel']]){
                    $EquipmentRegNum =  $EquipmentIosSort[$v['GroupChannel']]['ios']+$EquipmentRegNum;
                    $RegNum =  $EquipmentIosSort[$v['GroupChannel']]['RegNum']+$RegNum;
                }
                //注册 android
                if($EquipmentAndroidSort[$v['GroupChannel']]){
                    $EquipmentRegNum =  $EquipmentAndroidSort[$v['GroupChannel']]['android']+$EquipmentRegNum;
                    $RegNum =  $EquipmentAndroidSort[$v['GroupChannel']]['RegNum']+$RegNum;
                }
                $info[$k]['RegNum'] = $RegNum;
                $info[$k]['EquipmentRegNum'] = $EquipmentRegNum;
                //支付
                if($UsersOrderSort[$v['GroupChannel']]){
                    $info[$k]['Success']         =    $UsersOrderSort[$v['GroupChannel']]['Success'] ;
                    $info[$k]['OrderTotal']      =    $UsersOrderSort[$v['GroupChannel']]['OrderTotal'] ;
                    $info[$k]['TotalMoney']      =    $UsersOrderSort[$v['GroupChannel']]['TotalMoney'] ;
                    $info[$k]['PayNum']          =    $UsersOrderSort[$v['GroupChannel']]['PayNum'] ;
                    $info[$k]['UserPayNum']      =    $UsersOrderSort[$v['GroupChannel']]['UserPayNum'] ;
                    $info[$k]['alipay']          =    $UsersOrderSort[$v['GroupChannel']]['alipay'] ;
                    $info[$k]['weixin']          =    $UsersOrderSort[$v['GroupChannel']]['weixin'] ;
                    $info[$k]['iappay']          =    $UsersOrderSort[$v['GroupChannel']]['iappay'] ;
                    $info[$k]['JinPay']          =    $UsersOrderSort[$v['GroupChannel']]['JinPay'] ;
                    $info[$k]['First']           =    $UsersOrderSort[$v['GroupChannel']]['First'] ;
                    $info[$k]['FirstMoney']      =    $UsersOrderSort[$v['GroupChannel']]['FirstMoney'] ;
                }else{
                    $info[$k]['Success'] = 0 ;
                    $info[$k]['OrderTotal'] = 0 ;
                    $info[$k]['TotalMoney'] = 0 ;
                    $info[$k]['PayNum'] = 0 ;
                    $info[$k]['UserPayNum'] = 0 ;
                    $info[$k]['alipay'] = 0 ;
                    $info[$k]['weixin'] = 0 ;
                    $info[$k]['iappay'] = 0 ;
                    $info[$k]['JinPay'] = 0 ;
                    $info[$k]['First'] = 0 ;
                    $info[$k]['FirstMoney'] = 0 ;
                }
                if($GameAccountOldSort[$v['GroupChannel']]){
                    $info[$k]['UserPayNumOld'] = $GameAccountOldSort[$v['GroupChannel']]['UserPayNumOld'] ;
                    $info[$k]['OrderTotalOld'] = $GameAccountOldSort[$v['GroupChannel']]['OrderTotalOld'] ;
                }else{
                    $info[$k]['UserPayNumOld'] = 0;
                    $info[$k]['OrderTotalOld'] = 0;
                }
                $info[$k]['UsersOneNum'] = 0.00;
                $info[$k]['UsersTowNum'] = 0.00;
                $info[$k]['UsersThreeNum'] = 0.00;
                $info[$k]['UsersSevenNum'] = 0.00;
                $info[$k]['UsersFifteenNum'] = 0.00;
                $info[$k]['UsersThirtyNum'] = 0.00;
                $info[$k]['DateTime'] = $StartTime;
            }
            print_r($info);die;
            //添加数据
            $addStatisticsUsersPay = $model
                ->table('jy_statistics_users_pay')
                ->addAll($info);
            $time = $time-$day;

        }
        exit();
    }
   //

}


text:
function usage(){
echo "
Written by Brian Bushnell
Last modified February 20, 2015

Description:  Prints the most common kmers in each sequence.
This is intended for short kmers only!

Usage:  commonkmers.sh in=<file> out=<file>

Parameters:
k=2                     Kmer length, 0-12.
display=3               Print this many kmers per sequence.
count=f                 Print the kmer counts as well.

ow=f                    (overwrite) Overwrites files that already exist.
app=f                   (append) Append to files that already exist.
zl=4                    (ziplevel) Set compression level, 1 (low) to 9 (max).
qin=auto                ASCII offset for input quality.  May be 33 (Sanger), 64 (Illumina), or auto.

Java Parameters:
-Xmx                    This will be passed to Java to set memory usage, overriding the program's automatic memory detection.
                        -Xmx20g will specify 20 gigs of RAM, and -Xmx200m will specify 200 megs.  The max is typically 85% of physical memory.

Please contact Brian Bushnell at bbushnell@lbl.gov if you encounter any problems.
"
}

pushd . > /dev/null
DIR="${BASH_SOURCE[0]}"
while [ -h "$DIR" ]; do
  cd "$(dirname "$DIR")"
  DIR="$(readlink "$(basename "$DIR")")"
done
cd "$(dirname "$DIR")"
DIR="$(pwd)/"
popd > /dev/null

#DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/"
CP="$DIR""current/"

z="-Xmx800m"
EA="-ea"
set=0

if [ -z "$1" ] || [[ $1 == -h ]] || [[ $1 == --help ]]; then
	usage
	exit
fi

calcXmx () {
	source "$DIR""/calcmem.sh"
	parseXmx "$@"
}
calcXmx "$@"

function commonkmers() {
	#module unload oracle-jdk
	#module load oracle-jdk/1.7_64bit
	#module load pigz
	local CMD="java $EA $z -cp $CP jgi.SmallKmerFrequency $@"
	echo $CMD >&2
	eval $CMD
}

commonkmers "$@"


text:
<?= form_open('localizacao/update') ?>
	<?php $this->load->view('localizacao/_formulario'); ?>
	<input type="hidden" value="<?= $id ?>" name="id">

	<div>
		<button type="submit" onclick="change_location()">Editar</button>
	</div>
<?= form_close() ?>


text:
// Copyright (c) 2012 The Chromium Embedded Framework Authors.
// Portions copyright (c) 2011 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.

// IPC messages for CEF.
// Multiply-included message file, hence no include guard.

#include "libcef/common/upload_data.h"

#include "base/memory/shared_memory.h"
#include "base/values.h"
#include "content/public/common/common_param_traits.h"
#include "content/public/common/referrer.h"
#include "ui/gfx/ipc/gfx_param_traits.h"
#include "ipc/ipc_message_macros.h"

// TODO(cef): Re-using the message start for extensions may be problematic in
// the future. It would be better if ipc_message_utils.h contained a value
// reserved for consumers of the content API.
// See: http://crbug.com/110911
#define IPC_MESSAGE_START ExtensionMsgStart

// Common types.

// Parameters structure for a request.
IPC_STRUCT_BEGIN(Cef_Request_Params)
  // Unique request id to match requests and responses.
  IPC_STRUCT_MEMBER(int, request_id)

  // Unique id of the target frame. -1 if unknown / invalid.
  IPC_STRUCT_MEMBER(int64, frame_id)

  // True if the request is user-initiated instead of internal.
  IPC_STRUCT_MEMBER(bool, user_initiated)

  // True if a response is expected.
  IPC_STRUCT_MEMBER(bool, expect_response)

  // Message name.
  IPC_STRUCT_MEMBER(std::string, name)

  // List of message arguments.
  IPC_STRUCT_MEMBER(base::ListValue, arguments)
IPC_STRUCT_END()

// Parameters structure for a response.
IPC_STRUCT_BEGIN(Cef_Response_Params)
  // Unique request id to match requests and responses.
  IPC_STRUCT_MEMBER(int, request_id)

  // True if a response ack is expected.
  IPC_STRUCT_MEMBER(bool, expect_response_ack)

  // True on success.
  IPC_STRUCT_MEMBER(bool, success)

  // Response or error string depending on the value of |success|.
  IPC_STRUCT_MEMBER(std::string, response)
IPC_STRUCT_END()

// Parameters structure for a cross-origin white list entry.
IPC_STRUCT_BEGIN(Cef_CrossOriginWhiteListEntry_Params)
  IPC_STRUCT_MEMBER(std::string, source_origin)
  IPC_STRUCT_MEMBER(std::string, target_protocol)
  IPC_STRUCT_MEMBER(std::string, target_domain)
  IPC_STRUCT_MEMBER(bool, allow_target_subdomains)
IPC_STRUCT_END()

// Messages sent from the browser to the renderer.

// Parameters for a resource request.
IPC_STRUCT_BEGIN(CefMsg_LoadRequest_Params)
  // The request method: GET, POST, etc.
  IPC_STRUCT_MEMBER(std::string, method)

  // The requested URL.
  IPC_STRUCT_MEMBER(GURL, url)

  // The URL to send in the "Referer" header field. Can be empty if there is
  // no referrer.
  IPC_STRUCT_MEMBER(GURL, referrer)
  // One of the blink::WebReferrerPolicy values.
  IPC_STRUCT_MEMBER(int, referrer_policy)

  // Identifies the frame within the RenderView that sent the request.
  // -1 if unknown / invalid.
  IPC_STRUCT_MEMBER(int64, frame_id)

  // Usually the URL of the document in the top-level window, which may be
  // checked by the third-party cookie blocking policy. Leaving it empty may
  // lead to undesired cookie blocking. Third-party cookie blocking can be
  // bypassed by setting first_party_for_cookies = url, but this should ideally
  // only be done if there really is no way to determine the correct value.
  IPC_STRUCT_MEMBER(GURL, first_party_for_cookies)

  // Additional HTTP request headers.
  IPC_STRUCT_MEMBER(std::string, headers)

  // net::URLRequest load flags (0 by default).
  IPC_STRUCT_MEMBER(int, load_flags)

  // Optional upload data (may be null).
  IPC_STRUCT_MEMBER(scoped_refptr<net::UploadData>, upload_data)
IPC_STRUCT_END()

// Tell the renderer to load a request.
IPC_MESSAGE_ROUTED1(CefMsg_LoadRequest,
                    CefMsg_LoadRequest_Params)

// Sent when the browser has a request for the renderer. The renderer may
// respond with a CefHostMsg_Response.
IPC_MESSAGE_ROUTED1(CefMsg_Request,
                    Cef_Request_Params)

// Optional message sent in response to a CefHostMsg_Request.
IPC_MESSAGE_ROUTED1(CefMsg_Response,
                    Cef_Response_Params)

// Optional Ack message sent to the browser to notify that a CefHostMsg_Response
// has been processed.
IPC_MESSAGE_ROUTED1(CefMsg_ResponseAck,
                    int /* request_id */)

// Sent to child processes to add or remove a cross-origin whitelist entry.
IPC_MESSAGE_CONTROL2(CefProcessMsg_ModifyCrossOriginWhitelistEntry,
                     bool /* add */,
                     Cef_CrossOriginWhiteListEntry_Params /* params */)

// Sent to child processes to clear the cross-origin whitelist.
IPC_MESSAGE_CONTROL0(CefProcessMsg_ClearCrossOriginWhitelist)

// Messages sent from the renderer to the browser.

// Parameters for a newly created render thread.
IPC_STRUCT_BEGIN(CefProcessHostMsg_GetNewRenderThreadInfo_Params)
  IPC_STRUCT_MEMBER(std::vector<Cef_CrossOriginWhiteListEntry_Params>,
                    cross_origin_whitelist_entries)

  IPC_STRUCT_MEMBER(base::ListValue, extra_info)
IPC_STRUCT_END()

// Retrieve information about a newly created render thread.
IPC_SYNC_MESSAGE_CONTROL0_1(
    CefProcessHostMsg_GetNewRenderThreadInfo,
    CefProcessHostMsg_GetNewRenderThreadInfo_Params /* params*/)

// Parameters for a newly created browser window.
IPC_STRUCT_BEGIN(CefProcessHostMsg_GetNewBrowserInfo_Params)
  IPC_STRUCT_MEMBER(int, browser_id)
  IPC_STRUCT_MEMBER(bool, is_popup)
  IPC_STRUCT_MEMBER(bool, is_windowless)
IPC_STRUCT_END()

// Retrieve information about a newly created browser.
IPC_SYNC_MESSAGE_CONTROL2_1(
    CefProcessHostMsg_GetNewBrowserInfo,
    int /* render_view_routing_id */,
    int /* render_frame_routing_id */,
    CefProcessHostMsg_GetNewBrowserInfo_Params /* params*/)

// Sent when a frame is identified for the first time.
IPC_MESSAGE_ROUTED3(CefHostMsg_FrameIdentified,
                    int64 /* frame_id */,
                    int64 /* parent_frame_id */,
                    base::string16 /* frame_name */)

// Sent when a frame has finished loading. Based on ViewHostMsg_DidFinishLoad.
IPC_MESSAGE_ROUTED4(CefHostMsg_DidFinishLoad,
                    int64 /* frame_id */,
                    GURL /* validated_url */,
                    bool /* is_main_frame */,
                    int /* http_status_code */)

// Sent when a new URL is about to be loaded in the main frame. Used for the
// cookie manager.
IPC_MESSAGE_ROUTED1(CefHostMsg_LoadingURLChange,
                    GURL /* loading_url */)

// Sent when the renderer has a request for the browser. The browser may respond
// with a CefMsg_Response.
IPC_MESSAGE_ROUTED1(CefHostMsg_Request,
                    Cef_Request_Params)

// Optional message sent in response to a CefMsg_Request.
IPC_MESSAGE_ROUTED1(CefHostMsg_Response,
                    Cef_Response_Params)

// Optional Ack message sent to the browser to notify that a CefMsg_Response
// has been processed.
IPC_MESSAGE_ROUTED1(CefHostMsg_ResponseAck,
                    int /* request_id */)

// Singly-included section for struct and custom IPC traits.
#ifndef CEF_LIBCEF_COMMON_CEF_MESSAGES_H_
#define CEF_LIBCEF_COMMON_CEF_MESSAGES_H_

namespace IPC {

// Extracted from chrome/common/automation_messages.h.
template <>
struct ParamTraits<scoped_refptr<net::UploadData> > {
  typedef scoped_refptr<net::UploadData> param_type;
  static void Write(Message* m, const param_type& p);
  static bool Read(const Message* m, PickleIterator* iter, param_type* r);
  static void Log(const param_type& p, std::string* l);
};

}  // namespace IPC

#endif  // CEF_LIBCEF_COMMON_CEF_MESSAGES_H_

#include "chrome/common/spellcheck_messages.h"

#if defined(OS_WIN)
#include "chrome/common/chrome_utility_printing_messages.h"
#endif


text:
From the First question

Save the Complete MAP to the disk when ever the
map is updated or deleted.
Convert the MAP into JSON before storing to Disk.

Also when your program starts it needs to load back this data from the disk file. In case the file does not exist write the new file.


text:
"""This example updates the display name of each custom targeting key up to the
first 500. To determine which custom targeting keys exist, run
get_all_custom_targeting_keys_and_values.py."""

__author__ = 'api.shamjeff@gmail.com (Jeff Sham)'

# Locate the client library. If module was installed via "setup.py" script, then
# the following two lines are not needed.
import os
import sys
sys.path.insert(0, os.path.join('..', '..', '..', '..'))

# Import appropriate classes from the client library.
from adspygoogle import DfpClient

# Initialize client object.
client = DfpClient(path=os.path.join('..', '..', '..', '..'))

# Initialize appropriate service.
custom_targeting_service = client.GetService(
    'CustomTargetingService', 'https://www.google.com', 'v201203')

filter_statement = {'query': 'LIMIT 500'}

# Get custom targeting keys by statement.
response = custom_targeting_service.GetCustomTargetingKeysByStatement(
    filter_statement)[0]
keys = []
if 'results' in response:
  keys = response['results']

# Update each local custom targeting key object by changing its display name.
if keys:
  for key in keys:
    if not key['displayName']:
      key['displayName'] = key['name']
    key['displayName'] += ' (Deprecated)'
  keys = custom_targeting_service.UpdateCustomTargetingKeys(keys)

  # Display results.
  if keys:
    for key in keys:
      print ('Custom targeting key with id \'%s\', name \'%s\', display name '
             '\'%s\', and type \'%s\' was updated.'
             % (key['id'], key['name'], key['displayName'], key['type']))
  else:
    print 'No custom targeting keys were updated.'
else:
  print 'No custom targeting keys were found to update.'


text:
{-# LANGUAGE Haskell98 #-}
{-# LINE 1 "Data/IntMap.hs" #-}

{-# LANGUAGE CPP #-}
{-# LANGUAGE Safe #-}

-----------------------------------------------------------------------------
-- |
-- Module      :  Data.IntMap
-- Copyright   :  (c) Daan Leijen 2002
--                (c) Andriy Palamarchuk 2008
-- License     :  BSD-style
-- Maintainer  :  libraries@haskell.org
-- Stability   :  provisional
-- Portability :  portable
--
-- An efficient implementation of maps from integer keys to values
-- (dictionaries).
--
-- This module re-exports the value lazy "Data.IntMap.Lazy" API, plus
-- several deprecated value strict functions. Please note that these functions
-- have different strictness properties than those in "Data.IntMap.Strict":
-- they only evaluate the result of the combining function. For example, the
-- default value to 'insertWith'' is only evaluated if the combining function
-- is called and uses it.
--
-- These modules are intended to be imported qualified, to avoid name
-- clashes with Prelude functions, e.g.
--
-- >  import Data.IntMap (IntMap)
-- >  import qualified Data.IntMap as IntMap
--
-- The implementation is based on /big-endian patricia trees/.  This data
-- structure performs especially well on binary operations like 'union'
-- and 'intersection'.  However, my benchmarks show that it is also
-- (much) faster on insertions and deletions when compared to a generic
-- size-balanced map implementation (see "Data.Map").
--
--    * Chris Okasaki and Andy Gill,  \"/Fast Mergeable Integer Maps/\",
--      Workshop on ML, September 1998, pages 77-86,
--      <http://citeseer.ist.psu.edu/okasaki98fast.html>
--
--    * D.R. Morrison, \"/PATRICIA -- Practical Algorithm To Retrieve
--      Information Coded In Alphanumeric/\", Journal of the ACM, 15(4),
--      October 1968, pages 514-534.
--
-- Operation comments contain the operation time complexity in
-- the Big-O notation <http://en.wikipedia.org/wiki/Big_O_notation>.
-- Many operations have a worst-case complexity of /O(min(n,W))/.
-- This means that the operation can become linear in the number of
-- elements with a maximum of /W/ -- the number of bits in an 'Int'
-- (32 or 64).
-----------------------------------------------------------------------------

module Data.IntMap
    ( module Data.IntMap.Lazy
    , insertWith'
    , insertWithKey'
    , fold
    , foldWithKey
    ) where

import Prelude ()  -- hide foldr
import qualified Data.IntMap.Strict as Strict
import Data.IntMap.Lazy

-- | /Deprecated./ As of version 0.5, replaced by
-- 'Data.IntMap.Strict.insertWith'.
--
-- /O(log n)/. Same as 'insertWith', but the result of the combining function
-- is evaluated to WHNF before inserted to the map.

insertWith' :: (a -> a -> a) -> Key -> a -> IntMap a -> IntMap a
insertWith' = Strict.insertWith

-- | /Deprecated./ As of version 0.5, replaced by
-- 'Data.IntMap.Strict.insertWithKey'.
--
-- /O(log n)/. Same as 'insertWithKey', but the result of the combining
-- function is evaluated to WHNF before inserted to the map.

insertWithKey' :: (Key -> a -> a -> a) -> Key -> a -> IntMap a -> IntMap a
insertWithKey' = Strict.insertWithKey

-- | /Deprecated./ As of version 0.5, replaced by 'foldr'.
--
-- /O(n)/. Fold the values in the map using the given
-- right-associative binary operator. This function is an equivalent
-- of 'foldr' and is present for compatibility only.
fold :: (a -> b -> b) -> b -> IntMap a -> b
fold = foldr
{-# INLINE fold #-}

-- | /Deprecated./ As of version 0.5, replaced by 'foldrWithKey'.
--
-- /O(n)/. Fold the keys and values in the map using the given
-- right-associative binary operator. This function is an equivalent
-- of 'foldrWithKey' and is present for compatibility only.
foldWithKey :: (Key -> a -> b -> b) -> b -> IntMap a -> b
foldWithKey = foldrWithKey
{-# INLINE foldWithKey #-}


text:
package com.elogiclab.guardbee.core

/**
 * @author Marco Sarti
 *
 */
case class Password(provider:String, password: String, salt: Option[String])


text:
<?php

namespace App\Http\Middleware;

use Closure;

use App\Models\ModulePage;
use App\Models\Role;

class CheckSpecialRoles
{
    /**
     * Handle an incoming request.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \Closure  $next
     * @return mixed
     */
    public function handle($request, Closure $next, $moduleCode, $roleCode)
    {
        $userData = $request->get('userData');
        if(!empty($userData->is_suspended)) {
            return response()->forbidden();
        }

        if($moduleCode != 'null') {
            try {
                $modulePage = ModulePage::with('module')->whereNotNull('is_active')->where('code', $moduleCode)->firstOrFail();
            } catch(ModelNotFoundException $ex) {
                return response()->forbidden();
            }

            if(!empty($modulePage->module_id) && empty($modulePage->module->is_active)) {
                return response()->forbidden();
            }
        }

        if($userData->is_superadmin == 1) {
            // User is superadmin.. can access any module..
            return $next($request);
        }

        // Else we need to check if user has a role which allows him to access it..
        $canAccess = Role::join('user_roles', 'roles.id', '=', 'user_roles.role_id')
                            ->where('roles.code', $roleCode)
                            ->where('user_roles.user_id', $userData->id)
                            ->whereNull('roles.is_disabled')
                            ->count();

        if($canAccess == 0) {
            return response()->forbidden();
        }

        return $next($request);
    }
}


text:
ACCEPTED

#### According to
International Plant Names Index

#### Published in
Beih. Bot. Centralbl. , Abt. 2, 36:58. 1918

#### Original name
null

### Remarks
null


text:
package smartpool

import (
	"github.com/ethereum/go-ethereum/common"
	"math/big"
	"time"
)

type Input struct {
	rpcEndPoint     string
	keystorePath    string
	shareThreshold  int
	claimThreshold  int
	shareDifficulty *big.Int
	submitInterval  time.Duration
	contractAddr    string
	minerAddr       string
	extraData       string
	hotStop         bool
}

func (i *Input) RPCEndpoint() string           { return i.rpcEndPoint }
func (i *Input) KeystorePath() string          { return i.keystorePath }
func (i *Input) ShareThreshold() int           { return i.shareThreshold }
func (i *Input) ClaimThreshold() int           { return i.claimThreshold }
func (i *Input) ShareDifficulty() *big.Int     { return i.shareDifficulty }
func (i *Input) SubmitInterval() time.Duration { return i.submitInterval }
func (i *Input) ContractAddress() string       { return i.contractAddr }
func (i *Input) MinerAddress() string          { return i.minerAddr }
func (i *Input) ExtraData() string             { return i.extraData }
func (i *Input) HotStop() bool                 { return i.hotStop }
func (i *Input) SetMinerAddress(addr common.Address) {
	i.minerAddr = addr.Hex()
}
func (i *Input) SetExtraData(extra string) {
	i.extraData = extra
}
func (i *Input) SetContractAddress(addr common.Address) {
	i.contractAddr = addr.Hex()
}

func NewInput(
	rpcEndPoint string,
	keystorePath string,
	shareThreshold int,
	claimThreshold int,
	shareDifficulty *big.Int,
	submitInterval time.Duration,
	contractAddr string,
	minerAddr string,
	extraData string,
	hotStop bool,
) *Input {
	return &Input{
		rpcEndPoint, keystorePath, shareThreshold, claimThreshold, shareDifficulty,
		submitInterval, contractAddr, minerAddr, extraData, hotStop,
	}
}


text:
<?php declare(strict_types=1);

namespace Demontpx\RigidSearchBundle\Repository;

use Demontpx\RigidSearchBundle\Entity\Document;
use Demontpx\UtilBundle\Repository\AbstractEntityRepository;

class DocumentRepository extends AbstractEntityRepository
{
    protected function getClassName(): string
    {
        return Document::class;
    }

    public function find(int $id): ?Document
    {
        return $this->repository->find($id);
    }

    public function delete(string $type, int $typeId): void
    {
        $queryBuilder = $this->repository->createQueryBuilder('d');
        $queryBuilder->delete()
            ->where('d.type = :type AND d.typeId = :type_id');

        $queryBuilder->getQuery()->execute([
            'type' => $type,
            'type_id' => $typeId,
        ]);
    }

    public function truncateType(string $type): void
    {
        $queryBuilder = $this->repository->createQueryBuilder('d');
        $queryBuilder->delete()
            ->where('d.type = :type');

        $queryBuilder->getQuery()->execute(['type' => $type]);
    }

    public function truncate(): void
    {
        $queryBuilder = $this->repository->createQueryBuilder('d');
        $queryBuilder->delete();

        $queryBuilder->getQuery()->execute();
    }
}


text:
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Verbosity of the logs</title>
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../../index.html" title="Boost.Test">
<link rel="up" href="../test_output.html" title="Controlling outputs">
<link rel="prev" href="test_log_output.html" title="Test log output">
<link rel="next" href="testing_tool_output_disable.html" title="Disabling automatic printing for specific types">

Home
Libraries
People
FAQ
More

Verbosity
      of the logs

        The active log level threshold can be configured at runtime using the parameter
        log_level. The test log output format
        can be selected using either parameter log_format or the parameter output_format.

Copyright © 2001-2016 Boost.Test contributors

        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)


text:
'use strict';

const chalk = require('chalk');
const plur = require('plur');

/* eslint max-statements: 'off' */

class Reporter {

  /**
   * Writes to console
   *
   * @static
   * @param {Array} errors An array of PermissionError objects
   * @return {Undefined} No return
   * @memberof Reporter
   */
  static write(errors) {
    const errorCount = errors.length;

    if (errorCount) {
      for (const error of errors) {
        console.log(error.getMessage());
      }

      console.log(`${chalk.red.bold(errorCount)} permission ${plur('error', errorCount)} found.`);
    } else {
      console.log(chalk.green.bold('No permission errors found!'));
    }
  }

}

module.exports = Reporter;


text:
using System;
using Eto.Forms;
using Eto.Drawing;
#if XAMMAC2
using AppKit;
using Foundation;
using CoreGraphics;
using ObjCRuntime;
using CoreAnimation;
#else
using MonoMac.AppKit;
using MonoMac.Foundation;
using MonoMac.CoreGraphics;
using MonoMac.ObjCRuntime;
using MonoMac.CoreAnimation;
#endif

namespace Eto.Mac.Forms
{
	public class ScreenHandler : WidgetHandler<NSScreen, Screen>, Screen.IHandler
	{
		public ScreenHandler (NSScreen screen)
		{
			this.Control = screen;
		}

		static readonly Selector selBackingScaleFactor = new Selector ("backingScaleFactor");

#pragma warning disable 612, 618
		public float RealScale
		{
			get
			{
				if (Control.RespondsToSelector(selBackingScaleFactor))
					return (float)Control.BackingScaleFactor;
				return (float)Control.UserSpaceScaleFactor;
			}
		}
#pragma warning restore 612, 618

		public float Scale
		{
			get { return 1f; }
		}

		public RectangleF Bounds
		{
			get
			{
				var bounds = Control.Frame;
				var origin = NSScreen.Screens[0].Frame.Bottom;
				bounds.Y = origin - bounds.Height - bounds.Y;
				return bounds.ToEto();

			}
		}

		public RectangleF WorkingArea
		{
			get
			{
				var workingArea = Control.VisibleFrame;
				var origin = NSScreen.Screens[0].Frame.Bottom;
				workingArea.Y = origin - workingArea.Height - workingArea.Y;
				return workingArea.ToEto();
			}
		}

		public int BitsPerPixel
		{
			get { return (int)NSGraphics.BitsPerPixelFromDepth (Control.Depth); }
		}

		public bool IsPrimary
		{
			get { return Control == NSScreen.Screens[0]; }
		}
	}
}


text:
(function(root) {
  root.patterns=require("patterns");
  root.patterns.Parser=require("pat-parser");
  root.patterns.logging=require("pat-logger");
  root.patterns.utils=require("pat-utils");
  root.patterns.logger=require("pat-logger");
})(window);
window.define=undefined;