text:
/**
 * Spanish translation
 * Angel Sullon <asullom@gmail.com>
 */
;(function($){
	$.fn.dwGrid.translation['es-pe'] = {

        "SEARCH":"BUSCAR",
        "word or text":"Palabra o texto",
        "COLUMNS":"COLUMNAS",
        "Ascending":"Ascendente",
        "Descending":"Descendente",

	};

	$.KumbiaPHP.translation.trans['es-pe'] = {

        "In what format you want to see this report?." : "En qué formato deseas ver este reporte?.",
        "Remember to recycle paper.":"Recuerda reciclar el papel.",
        "CANCEL":"CANCELAR",
        "ACEPT":"ACEPTAR",
    };

    $.FormsValidation.translation.trans['es-pe'] = {

        "You is sure to continue the operation?.":"Está seguro de continuar con la operación?.",
        "Errors found while processing the form. Please check the data and try again.":"Se han encontrado errores al procesar el formulario. Por favor verifique los datos e intente nuevamente.",
        "Required field.":"Campo requerido.",
        "Select an item from the list.":"Seleccione un elemento de la lista.",
        "Enter only alphanumeric values.":"Introduzca solo valores alfanuméricos.",
        "Enter only numeric values.":"Introduzca solo valores numéricos.",
        "Passwords do not match.":"Las contraseñas no coincide.",
        "You have entered an invalid character.":"Haz introducido un caracter no válido.",

        "The user must have between %s and %s characters.":"El usuario debe tener entre %s y %s caracteres.",
        "The password must be at min %s characters.":"La contraseña debe tener como mínimo %s caracteres ",

    };

}(jQuery));


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

<com.polito.sismic.Presenters.CustomLayout.FragmentScrollableCanvas
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/base_fragment_scroll_view"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:fillViewport="true"
    android:orientation="vertical"  >

</com.polito.sismic.Presenters.CustomLayout.FragmentScrollableCanvas>

redpajama_set_name: RedPajamaGithub


text:
require 'lolfaker/ability'
require 'lolfaker/character'
require 'lolfaker/item'
require 'lolfaker/location'
require 'lolfaker/mastery'
require 'lolfaker/role'
require 'lolfaker/spell'


text:
/* $Id: guid.c 4208 2012-07-18 07:52:33Z ming $ */
/*
 * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
 * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
#include <pj/ctype.h>
#include <pj/guid.h>
#include <pj/pool.h>

PJ_DEF(pj_str_t*) pj_generate_unique_string_lower(pj_str_t *str)
{
    int i;

    pj_generate_unique_string(str);
    for (i = 0; i < str->slen; i++)
	str->ptr[i] = (char)pj_tolower(str->ptr[i]);

    return str;
}

PJ_DEF(void) pj_create_unique_string(pj_pool_t *pool, pj_str_t *str)
{
    str->ptr = (char*)pj_pool_alloc(pool, PJ_GUID_STRING_LENGTH);
    pj_generate_unique_string(str);
}

PJ_DEF(void) pj_create_unique_string_lower(pj_pool_t *pool, pj_str_t *str)
{
    int i;

    pj_create_unique_string(pool, str);
    for (i = 0; i < str->slen; i++)
	str->ptr[i] = (char)pj_tolower(str->ptr[i]);
}


text:
Step-by-step instructions for installing an Ubuntu workstation with standard [cryo-EM](https://en.wikipedia.org/wiki/Cryo-electron_microscopy) software.
The installed software should provide tools for post-processing and analyzing experiment data from a [Titan TEM](https://www.fei.com/products/tem/titan/).
The ultimate goal is to have the installation fully automatic by just running a script.

## Software to be installed

* Ubuntu 16.04 LTS desktop (right now 16.04.3 is the latest)
* [relion](http://www2.mrc-lmb.cam.ac.uk/relion/index.php/Main_Page)
* [chimera](https://www.cgl.ucsf.edu/chimera/)
* [Xmipp](http://xmipp.cnb.csic.es/twiki/bin/view/Xmipp/WebHome)
* [EMAM](http://blake.bcm.edu/emanwiki/EMAN2)
* [ctffind4](http://grigoriefflab.janelia.org/ctffind4)
* [Gctf](http://www.mrc-lmb.cam.ac.uk/kzhang/Gctf/)
* [Gautomatch](http://www.mrc-lmb.cam.ac.uk/kzhang/Gautomatch/)
* [cuda 8](https://en.wikipedia.org/wiki/CUDA)
* [motioncor2](http://msg.ucsf.edu/em/software/motioncor2.html)
* [localrec](https://github.com/OPIC-Oxford/localrec)

## Hardware requirements

The computer is expected to have
* at least one recent NVidia card (e.g. GTX 1080, GTX 1070, GTX 1060).

## Step-by-step instructions

A lot of instructions are missing as of now, but let us start writing them.

### Install Ubuntu 16.04 Desktop

Follow the [tutorial](https://tutorials.ubuntu.com/tutorial/tutorial-install-ubuntu-desktop) of how to install an Ubuntu desktop.

### Install Cuda and the nVidia kernel drivers

Cuda and nVidia kernel drivers can be installed in different ways.
Investigate, Which one works best?....

#### graphics-drivers PPA
```
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update

```


text:
<?php
class Amasty_Customerattr_Model_Rewrite_Customer_Entity_Attribute extends Mage_Customer_Model_Entity_Attribute
{
    public function saveAttributeConfiguration($attributeId, $configuration)
    {
        $this->_getWriteAdapter()->update($this->getTable('customer/eav_attribute'), $configuration, 'attribute_id = "' . $attributeId . '"');
    }

    protected function _saveOption(Mage_Core_Model_Abstract $object)
    {
        $option = $object->getOption();
        if (!isset($option['parent'])&&!isset($option['group_id']))
        {
            return parent::_saveOption($object);
        }
        if (is_array($option)) {
            $write = $this->_getWriteAdapter();
            $optionTable        = $this->getTable('attribute_option');
            $optionValueTable   = $this->getTable('attribute_option_value');
            $stores = Mage::getModel('core/store')
                ->getResourceCollection()
                ->setLoadDefault(true)
                ->load();

            if (isset($option['value'])) {
                $attributeDefaultValue = array();
                if (!is_array($object->getDefault())) {
                    $object->setDefault(array());
                }

                foreach ($option['value'] as $optionId => $values) {
                    $intOptionId = (int) $optionId;
                    if (!empty($option['delete'][$optionId])) {
                        if ($intOptionId) {
                            $condition = $write->quoteInto('option_id=?', $intOptionId);
                            $write->delete($optionTable, $condition);
                        }

                        continue;
                    }

                    if (!$intOptionId) {
                        $data = array(
                           'attribute_id'     => $object->getId(),
                           'sort_order'          => isset($option['order'][$optionId]) ? $option['order'][$optionId] : 0,
                        );
                        if (isset($option['parent']))
                        {
                           $data['parent_option_id'] = isset($option['parent'][$optionId]) ? $option['parent'][$optionId] : 0;
                        }
                        else if(isset($option['group_id']))
                        {
                           $data['group_id'] = isset($option['group_id'][$optionId]) ? $option['group_id'][$optionId] : 0;
                        }
                        $write->insert($optionTable, $data);
                        $intOptionId = $write->lastInsertId();
                    }
                    else {
                        $data = array(
                           'sort_order'    => isset($option['order'][$optionId]) ? $option['order'][$optionId] : 0,
                        );
                        if (isset($option['parent']))
                        {
                           $data['parent_option_id'] = isset($option['parent'][$optionId]) ? $option['parent'][$optionId] : 0;
                        }
                        else if(isset($option['group_id']))
                        {
                           $data['group_id'] = isset($option['group_id'][$optionId]) ? $option['group_id'][$optionId] : 0;
                        }
                        $write->update($optionTable, $data, $write->quoteInto('option_id=?', $intOptionId));
                    }

                    if (in_array($optionId, $object->getDefault())) {
                        if ($object->getFrontendInput() == 'multiselect') {
                            $attributeDefaultValue[] = $intOptionId;
                        } else if ($object->getFrontendInput() == 'select') {
                            $attributeDefaultValue = array($intOptionId);
                        }
                    }

                    // Default value
                    if (!isset($values[0])) {
                        Mage::throwException(Mage::helper('eav')->__('Default option value is not defined.'));
                    }

                    $write->delete($optionValueTable, $write->quoteInto('option_id=?', $intOptionId));
                    foreach ($stores as $store) {
                        if (isset($values[$store->getId()]) && (!empty($values[$store->getId()]) || $values[$store->getId()] == "0")) {
                            $data = array(
                                'option_id' => $intOptionId,
                                'store_id'  => $store->getId(),
                                'value'     => $values[$store->getId()],
                            );
                            $write->insert($optionValueTable, $data);
                        }
                    }
                }

                $write->update($this->getMainTable(), array(
                    'default_value' => implode(',', $attributeDefaultValue)
                ), $write->quoteInto($this->getIdFieldName() . '=?', $object->getId()));
            }
        }
        return $this;
    }
}


text:
#define _RWSTD_LIB_SRC

#if    3 == __GNUG__ && 3 > __GNUC_MINOR__ \
    || 3 == __GNUC_MINOR__ && 1 >__GNUC_PATCHLEVEL__

  // working around a gcc bug (PR #29570)
#  include <rw/_config.h>
#  ifndef _RWSTD_NO_EXTERN_TEMPLATE
#    define _RWSTD_NO_EXTERN_TEMPLATE
#  endif
#endif   // gcc >= 3.0 && gcc < 3.3.1

#include <rw/_defs.h>

#ifdef _WIN32
#  include <io.h>
#  ifndef STDIN_FILENO
#    define STDIN_FILENO  0
#    define STDOUT_FILENO 1
#    define STDERR_FILENO 2
#  endif   // STDIN_FILENO
#else
   // unistd.h must preceed other headers to avoid a namespace issue
   // ("time_t" vrs "std::time_t") on SunPro 5.3/SunOS 5.8
#  include <unistd.h>
#endif

#include <iosfwd>
#include <istream>
#include <ostream>
#include <fstream>
#include <memory>
#include <new>

#include <rw/_error.h>

#include "iosdata.h"
#include "podarray.h"

#include <stdio.h>    // fprintf(), stderr
#include <stdlib.h>   // abort()

#ifdef _MSC_VER
   // force early intitalization of Standard Iostream Objects
   // gives warning C4073: initializers put in library initialization
   // area; disable it
#  pragma warning (disable: 4073)
#  pragma init_seg (lib)
#endif   // _MSC_VER

// #defined  below
#undef _INIT

// stream objects are initialized with static basic_filebuf objects
// based on static data buffers to avoid dynamic memory allocation
// at library initialization time

#ifndef _RWSTD_NO_STATIC_IOSTREAM_INIT

// iostream objects and buffers are (re)constructed in ios_base::Init()
// via calls to placement new after being zero-initialized (not constructed)
// at definition time (by the means of the __rw_aligned_buffer trick)

#  ifndef _RWSTD_NO_IOSTREAM_OBJECT_REFS

// cin, cout, and the other Standard iostream objects are references to
// these objects which of caurse violates 27.3 but avoids the potential
// for destruction prior to any other objects with static storage duration
// and is undetectable

#define _RWSTD_DEFINE_STREAM_OBJECT(buftype, stream, name, ign1, ign2)        \
  _RWSTD_NAMESPACE (__rw) {                                                   \
    /* static character buffer to prevent dynamic allocation */               \
    static _STD::stream::char_type __rw_##name##_databuf [512];               \
    /* static indestructible `basic_filebuf<>' object */                      \
    static __rw_aligned_buffer<_STD::buftype> __rw_##name##_buffer;           \
    /* static indestructible `basic_[i|o]stream<>' object */                  \
    static __rw_aligned_buffer<_STD::stream> __rw_indestructible_##name;      \
  }   /* namespace __rw */                                                    \
  _RWSTD_NAMESPACE (std) {                                                    \
    /* reference (not object) to a basic_[i|o]stream<> object */              \
    _RWSTD_EXPORT stream &name                                                \
        = _RWSTD_REINTERPRET_CAST (stream&, _RW::__rw_indestructible_##name); \
  }   /* namespace std */                                                     \
  typedef void __rw_unused_typedef

#define _OBJECT(ignore, name)   name

#  else   // if defined (_RWSTD_NO_IOSTREAM_OBJECT_REFS)

// cin, cout, and the other Standard iostream objects are defined to be
// specializations of the POD type __rw::__rw_aligned_buffer<[i|o]stream>
// but declared in <iostream> to be extern [i|o]stream
// since the type information isn't encoded (mangled) in data names this
// lie is transparent to the compiler/linker as neither ever sees both
// declarations

#define _RWSTD_DEFINE_STREAM_OBJECT(buftype, stream, name, ign1, ign2)      \
  _RWSTD_NAMESPACE (__rw) {                                                 \
    /* static character buffer to prevent dynamic allocation */             \
    static _STD::stream::char_type __rw_##name##_databuf [512];             \
    /* static indestructible `basic_filebuf<>' object */                    \
    static __rw_aligned_buffer<_STD::buftype> __rw_##name##_buffer;         \
  }   /* namespace __rw */                                                  \
  _RWSTD_NAMESPACE (std) {                                                  \
    /* extern  indestructible `basic_[i|o]stream<>' object */               \
    _RWSTD_EXPORT _RW::__rw_aligned_buffer<stream> name;                    \
  }   /* namespace std */                                                   \
  _RWSTD_NAMESPACE (__rw) {                                                 \
    /* reference to the actual object for convenience */                    \
    static __rw_aligned_buffer<_STD::stream>&                               \
        __rw_indestructible_##name = _STD::name;                            \
  }   /* namespace __rw */                                                  \
  typedef void __rw_unused_typedef

#define _OBJECT(type, name)   _RWSTD_REINTERPRET_CAST (type&, name)

#  endif   // _RWSTD_NO_IOSTREAM_OBJECT_REFS

// expression returning the address of the initialized object
#define _INIT(buftype, stream, name, buf, f)                                  \
  /* construct basic_[i|o]stream object backed by a filebuf object */         \
  /* backed by a static characater array                           */         \
  new (&_RW::__rw_indestructible_##name) stream                               \
          (new (&_RW::__rw_##name##_buffer) buftype                           \
              (f, _RW::__rw_##name##_databuf,                                 \
     sizeof _RW::__rw_##name##_databuf / sizeof *_RW::__rw_##name##_databuf)) \

#else   // if defined (_RWSTD_NO_STATIC_IOSTREAM_INIT)

// iostream objects and buffers are constructed at definition time

#define _RWSTD_DEFINE_STREAM_OBJECT(buftype, stream, name, buf, f)           \
  _RWSTD_NAMESPACE (__rw) {                                                  \
    /* static character buffer to prevent dynamic allocation */              \
    static _STD::stream::char_type __rw_##name##_databuf [512];              \
    /* static `basic_filebuf<>' object, destroyed at program termination */  \
    static _STD::buftype __rw_##name##_buffer (f,                            \
        __rw_##name##_databuf,                                               \
        sizeof __rw_##name##_databuf / sizeof *__rw_##name##_databuf);       \
  }   /* namespace __rw */                                                   \
  _RWSTD_NAMESPACE (std) {                                                   \
    /* extern `basic_[i|o]stream<>' object, destroyed at termination */      \
    _RWSTD_EXPORT stream name (&_RW::__rw_##buf##_buffer);                   \
  }   /* namespace std */                                                    \
  typedef void __rw_unused_typedef

#define _INIT(ign1, stream, ign3, ign4, ign5)   ((stream*)0)

#endif   // _RWSTD_NO_STATIC_IOSTREAM_INIT

// define iostream objects and their corresponding "buffers"
_RWSTD_DEFINE_STREAM_OBJECT (filebuf, istream, cin,  cin,  STDIN_FILENO);
_RWSTD_DEFINE_STREAM_OBJECT (filebuf, ostream, cout, cout, STDOUT_FILENO);
_RWSTD_DEFINE_STREAM_OBJECT (filebuf, ostream, cerr, cerr, STDERR_FILENO);
_RWSTD_DEFINE_STREAM_OBJECT (filebuf, ostream, clog, cerr, STDERR_FILENO);

#ifndef _RWSTD_NO_WCHAR_T

_RWSTD_DEFINE_STREAM_OBJECT (wfilebuf, wistream, wcin,  wcin,  STDIN_FILENO);
_RWSTD_DEFINE_STREAM_OBJECT (wfilebuf, wostream, wcout, wcout, STDOUT_FILENO);
_RWSTD_DEFINE_STREAM_OBJECT (wfilebuf, wostream, wcerr, wcerr, STDERR_FILENO);
_RWSTD_DEFINE_STREAM_OBJECT (wfilebuf, wostream, wclog, wcerr, STDERR_FILENO);

#endif   // _RWSTD_NO_WCHAR_T

// allow basic_ostream<> inline member functions to refer to the standard
// iostream objects without making those objects visible to user code (so
// that they can safely be dereferenced only after #including <iostream>
// which is the only header where they are declared and by the means of
// which they are initialized - through the static initialization object)

_RWSTD_NAMESPACE (__rw) {

#ifdef _RWSTD_NO_STATIC_IOSTREAM_INIT

// a single (library-wide) iostream initializer object - must be defined
// after the definition of the iostream objects (above) so that when
// its dtor manipulates the objects they have not been destroyed
ios_base::Init __rw_stream_initializer;

#endif   // _RWSTD_NO_STATIC_IOSTREAM_INIT

// array of pointers to the 8 standard iostream objects
extern const void* __rw_std_streams [];

// iostream initialization counter
static int __rw_ios_initcnt /* = 0 */;

}   // namespace __rw

_RWSTD_NAMESPACE (std) {

ios_base::Init::Init ()
{
    // only the first thread initializes
    if (1 != _RWSTD_ATOMIC_PREINCREMENT (_RW::__rw_ios_initcnt, false))
        return;

    // since references need not be initialzied statically, cin, et al
    // may not be initialized at this time (i.e., &cin == 0 may hold,
    // and does with MSVC 6.0), obtain and use pointers to the objects
    istream *pcin =  _INIT (filebuf, istream, cin,  cin,  STDIN_FILENO);
    ostream *pcout = _INIT (filebuf, ostream, cout, cout, STDOUT_FILENO);
    ostream *pcerr = _INIT (filebuf, ostream, cerr, cerr, STDERR_FILENO);
    ostream *pclog = _INIT (filebuf, ostream, clog, cerr, STDERR_FILENO);

    // stream objects expected to be arranged in this order
    // must be initialized dynamically (as opposed to statically)
    _RW::__rw_std_streams[0] = _RWSTD_STATIC_CAST (ios_base*, pcin);
    _RW::__rw_std_streams[1] = _RWSTD_STATIC_CAST (ios_base*, pcout);
    _RW::__rw_std_streams[2] = _RWSTD_STATIC_CAST (ios_base*, pcerr);
    _RW::__rw_std_streams[3] = _RWSTD_STATIC_CAST (ios_base*, pclog);

    // 27.3.1, p2
    pcin->_C_usr = &_C_usr_data::_C_std_usr_data [0];
    pcin->_C_usr->_C_tie = pcout;

    // 27.3.1, p5
    pcerr->_C_fmtfl |= _RW::__rw_unitbuf;

    pcin->_C_fmtfl  |= _RW::__rw_sync_stdio;
    pcout->_C_fmtfl |= _RW::__rw_sync_stdio;
    pcerr->_C_fmtfl |= _RW::__rw_sync_stdio;
    pclog->_C_fmtfl |= _RW::__rw_sync_stdio;

#if     defined (_RWSTD_REENTRANT)             \
    && !defined (_RWSTD_NO_EXT_REENTRANT_IO)   \
    && !defined (_RWSTD_NO_REENTRANT_IO_DEFAULT)

    // override MT-safety setting done in basic_ios<>::init()
    pcin->_C_fmtfl  &= ~(nolock | nolockbuf);
    pcout->_C_fmtfl &= ~(nolock | nolockbuf);
    pcerr->_C_fmtfl &= ~(nolock | nolockbuf);
    pclog->_C_fmtfl &= ~(nolock | nolockbuf);

#endif   // _RWSTD_REENTRANT && !_RWSTD_NO_EXT_REENTRANT_IO && ...

#ifndef _RWSTD_NO_WCHAR_T

    wistream *pwcin =  _INIT (wfilebuf, wistream, wcin,  wcin,  STDIN_FILENO);
    wostream *pwcout = _INIT (wfilebuf, wostream, wcout, wcout, STDOUT_FILENO);
    wostream *pwcerr = _INIT (wfilebuf, wostream, wcerr, wcerr, STDERR_FILENO);
    wostream *pwclog = _INIT (wfilebuf, wostream, wclog, wcerr, STDERR_FILENO);

    // stream objects expected to be arranged in this order
    // must be initialized dynamically (as opposed to statically)
    _RW::__rw_std_streams[4] = _RWSTD_STATIC_CAST (ios_base*, pwcin);
    _RW::__rw_std_streams[5] = _RWSTD_STATIC_CAST (ios_base*, pwcout);
    _RW::__rw_std_streams[6] = _RWSTD_STATIC_CAST (ios_base*, pwcerr);
    _RW::__rw_std_streams[7] = _RWSTD_STATIC_CAST (ios_base*, pwclog);

    // 27.3.2, p2
    pwcin->_C_usr = &_C_usr_data::_C_std_usr_data [1];
    pwcin->_C_usr->_C_tie = pwcout;

    // 27.3.2, p5
    pwcerr->_C_fmtfl |= _RW::__rw_unitbuf;

    pwcin->_C_fmtfl  |= _RW::__rw_sync_stdio;
    pwcout->_C_fmtfl |= _RW::__rw_sync_stdio;
    pwcerr->_C_fmtfl |= _RW::__rw_sync_stdio;
    pwclog->_C_fmtfl |= _RW::__rw_sync_stdio;

#  if     defined (_RWSTD_REENTRANT)             \
      && !defined (_RWSTD_NO_EXT_REENTRANT_IO)   \
      && !defined (_RWSTD_NO_REENTRANT_IO_DEFAULT)

    // override MT-safety setting done in basic_ios<>::init()
    pwcin->_C_fmtfl  &= ~(nolock | nolockbuf);
    pwcout->_C_fmtfl &= ~(nolock | nolockbuf);
    pwcerr->_C_fmtfl &= ~(nolock | nolockbuf);
    pwclog->_C_fmtfl &= ~(nolock | nolockbuf);

#  endif   // _RWSTD_REENTRANT && !_RWSTD_NO_EXT_REENTRANT_IO && ...

#endif   // _RWSTD_NO_WCHAR_T
}

ios_base::Init::~Init ()
{
    if (_RWSTD_ATOMIC_PREDECREMENT (_RW::__rw_ios_initcnt, false))
        return;

    // put all standard iostream objects in unbuffered mode so that
    // output made from dtors of user objects with static storage
    // duration destroyed from this point on (i.e., after the destruction
    // of *this, the last initializer object) is not lost

    // references must not be destroyed
    _RWSTD_ASSERT (&cout && &cerr && &clog);

    const char fmt[] = "exception during std::%s cleanup\n";

    int caught = 0;

    _TRY {
        _OBJECT (ostream, cout).rdbuf ()->pubsetbuf (0, 0);
    }
    _CATCH (...) {
        fprintf (stderr, fmt, "cout");
        ++caught;
    }
    _TRY {
        _OBJECT (ostream, cerr).rdbuf ()->pubsetbuf (0, 0);
    }
    _CATCH (...) {
        fprintf (stderr, fmt, "cerr");
        ++caught;
    }
    _TRY {
        _OBJECT (ostream, clog).rdbuf ()->pubsetbuf (0, 0);
    }
    _CATCH (...) {
        fprintf (stderr, fmt, "clog");
        ++caught;
    }

#ifndef _RWSTD_NO_WCHAR_T

    _RWSTD_ASSERT (&wcout && &wcerr && &wclog);

    _TRY {
        _OBJECT (wostream, wcout).rdbuf ()->pubsetbuf (0, 0);
    }
    _CATCH (...) {
        fprintf (stderr, fmt, "wcout");
        ++caught;
    }
    _TRY {
        _OBJECT (wostream, wcerr).rdbuf ()->pubsetbuf (0, 0);
    }
    _CATCH (...) {
        fprintf (stderr, fmt, "wcerr");
        ++caught;
    }
    _TRY {
        _OBJECT (wostream, wclog).rdbuf ()->pubsetbuf (0, 0);
    }
    _CATCH (...) {
        fprintf (stderr, fmt, "wclog");
        ++caught;
    }

#endif   // _RWSTD_NO_WCHAR_T

    if (caught)
        abort ();
}

}   // namespace std


text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>de.iterable</groupId>
	<artifactId>teavm-console</artifactId>
	<version>0.1.2-SNAPSHOT</version>

	<name>${project.groupId}:${project.artifactId}</name>
	<description>teavm-console provides a statically typed java interface to the browser's debugging Console API for the teavm.</description>
	<url>https://github.com/leobm/teavm-console</url>

	<licenses>
		<license>
			<name>Apache License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<developers>
		<developer>
			<name>Jan-Felix Wittmann</name>
			<email>jfwittmann7@gmail.com</email>
		</developer>
	</developers>

	<scm>
		<url>https://github.com/leobm/teavm-console</url>
		<developerConnection>scm:git:git@github.com:leobm/teavm-console.git</developerConnection>
		<connection>scm:git:git@github.com:leobm/teavm-console.git</connection>
		<tag>HEAD</tag>
	</scm>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<java.version>1.8</java.version>
		<teavm.version>0.4.3</teavm.version>
	</properties>

	<dependencies>
		<dependency>
			<groupId>org.teavm</groupId>
			<artifactId>teavm-jso</artifactId>
			<version>${teavm.version}</version>
		</dependency>
		<dependency>
			<groupId>org.teavm</groupId>
			<artifactId>teavm-jso-apis</artifactId>
			<version>${teavm.version}</version>
		</dependency>
	</dependencies>

	<distributionManagement>
		<snapshotRepository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
		<repository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
		</repository>
	</distributionManagement>

	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-release-plugin</artifactId>
					<version>2.5.3</version>
					<configuration>
						<useReleaseProfile>false</useReleaseProfile>
						<releaseProfiles>release</releaseProfiles>
						<goals>deploy</goals>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>

		<plugins>
			<plugin>
				<groupId>org.sonatype.plugins</groupId>
				<artifactId>nexus-staging-maven-plugin</artifactId>
				<version>1.6.6</version>
				<extensions>true</extensions>
				<configuration>
					<serverId>ossrh</serverId>
					<nexusUrl>https://oss.sonatype.org/</nexusUrl>
					<autoReleaseAfterClose>true</autoReleaseAfterClose>
				</configuration>
			</plugin>

			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.1</version>
				<configuration>
					<source>${java.version}</source>
					<target>${java.version}</target>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-gpg-plugin</artifactId>
				<version>1.6</version>
				<executions>
					<execution>
						<id>sign-artifacts</id>
						<phase>verify</phase>
						<goals>
							<goal>sign</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<artifactId>maven-release-plugin</artifactId>
			</plugin>

		</plugins>
	</build>

	<profiles>
		<profile>
			<id>release</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<version>2.2.1</version>
						<executions>
							<execution>
								<id>attach-sources</id>
								<goals>
									<goal>jar-no-fork</goal>
								</goals>
							</execution>
						</executions>
					</plugin>

					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<version>2.9.1</version>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>

					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>1.6</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>


text:
/* jslint node: true */
'use strict';

module.exports = exports = require( './lib/the-wall-file-handler-disk' );


text:
package RSSModule

import (
	"context"
	"github.com/SlyMarbo/rss"
	"github.com/bwmarrin/discordgo"
	"github.com/gendonl/genbot/Bot"
	"go.mongodb.org/mongo-driver/bson"
	"go.mongodb.org/mongo-driver/mongo/options"
	"strings"
	"time"
)

func initUnfollowRSSCommand() (cc RSSCommand) {
	cc = RSSCommand{
		name:        "unfollow",
		description: "Unfollows an RSS feed.",
		usage:       "`%sfollow <feed_url>`",
		aliases:     []string{"rmfeed", "delfeed"},
		permission:  discordgo.PermissionManageServer,
		execute:     (*RSSModule).UnfollowRSS,
	}
	return
}

func (c *RSSModule) UnfollowRSS(cmd RSSCommand, s *discordgo.Session, m *discordgo.MessageCreate, data *Bot.ServerData) {
	input := strings.SplitN(m.Content, " ", 2)

	if len(input) > 2 {
		result := c.Bot.Usage(cmd, s, m, data)
		s.ChannelMessageSendEmbed(m.ChannelID, result.MessageEmbed)
		return
	}

	feed, err := rss.Fetch(input[1])
	if err != nil {
		s.ChannelMessageSend(m.ChannelID, "Something went wrong while retrieving feed.")
		return
	}

	err = c.rmRSSFollow(feed.UpdateURL, m.ChannelID)
	if err != nil {
		s.ChannelMessageSend(m.ChannelID, "Something went wrong while retrieving feed.")
		return
	}

	e := Bot.NewEmbed().SetTitle(feed.Title).SetURL(feed.UpdateURL).SetDescription("You unfollowed this RSS.")
	if feed.Image != nil {
		e.SetThumbnail(feed.Image.URL)
	}
	s.ChannelMessageSendEmbed(m.ChannelID, e.MessageEmbed)
}

func (c *RSSModule) rmRSSFollow(url string, channelid string) (err error) {
	ctx, _ := context.WithTimeout(context.Background(), 30*time.Second)

	_, err = Bot.RSSCollection.UpdateOne(
		ctx,
		bson.D{
			{"url", url },
		},
		bson.D{
			{
				"$pull", bson.M{
				"channels": channelid,
			},
			},
		},
		options.Update().SetUpsert(false))

	return
}


text:
![alt text](https://raw.githubusercontent.com/air-Design/airUI-Design-and-Media-.Tutorial-Example/media/airnew.JPG)
* Code Beautiful
* For full documentation, visit http://airdesign.co.nf

## GETTING STARTED

Dowload the library from this page. it comes bundled in a zip file containing, a css folder, js folder and a fonts folder. The css folder contains the air.design.css and font-awesome libraries which can be downloaded directly from their website http://fontawesome.io. The js folder contains air.design.js which is used for events and enhances list-items class in the libraries. The fonts folder keeps our default font-family 'Bariol' by atipo (www.atipo.es) and font-awesome's files.

## INSTALLATION
Include in your head tag a link referecing to air.design.css file location and the font-awesome.css, then also include the javascript file. air.design.js is written in jQuery so the Jquery library is required( version 3 and above).

```html
<link rel="stylesheet" type="text/css" href="css/air.design.css"/>
<link rel="stylesheet" type="text/css" href="css/font-awesome.min.css"/>

<script src="js/jquery-3.2.1.min.js"></script>
<script src="js/air.design.js"></script>

```

* AirDesign is a web library for user interface and user experience design. We make use of CSS properties and JavaScript to bring the experience to your browser. Our library is absolutely free to use for both commercial and private projects.

## DEFAULT

airDesign comes with some default values for some CSS properties. These values were set for the purpose of our design principles width web application design in mind. Some web projects might find these values inappropriate and we advice that you overwrite these defaults with your own css file after the library has been linked.

```css
Font-family: Bariol.
Font-Size: 14px;
Background-color:whitesmoke;

```
For general website design, you might want to increase the font-size to 17px or 18px. The default 14px is optimal for web application and can sometimes be used for website like ours.
![alt text](https://raw.githubusercontent.com/air-Design/airUI-Design-and-Media-.Tutorial-Example/media/freeStyle0.JPG)
![alt text](https://raw.githubusercontent.com/air-Design/airUI-Design-and-Media-.Tutorial-Example/media/freeStyle.JPG)


text:
using System.Collections.Generic;

namespace Instaflight.Service.Models.Response
{
    public class InstaflightSearchResponse
    {
        public InstaflightSearchResponse(IEnumerable<PricedItinerary> pricedItineraries, string returnDateTime, string departureDateTime, string destinationLocation, string originLocation)
        {
            PricedItineraries = pricedItineraries;
            ReturnDateTime = returnDateTime;
            DepartureDateTime = departureDateTime;
            DestinationLocation = destinationLocation;
            OriginLocation = originLocation;
        }

        public IEnumerable<PricedItinerary> PricedItineraries { get; }
        public string ReturnDateTime { get; }
        public string DepartureDateTime { get; }
        public string DestinationLocation { get; }
        public string OriginLocation { get; }
    }
}


text:
<?php

/**
 * @license    GPL 2 (http://www.gnu.org/licenses/gpl.html)
 *
 * @author Giorgio Vecchiocattivi <giorgio@vecchio.it>
 * @author Roberto Bolli <http://www.rbnet.it/>
 * @author Pietro Battiston <toobaz@email.it>
 * @author Lorenzo Breda <lbreda@gmail.com>
 * @author robocap <robocap1@gmail.com>
 * @author Jacopo Corbetta <jacopo.corbetta@gmail.com>
 * @author Matteo Pasotti <matteo@xquiet.eu>
 */
$lang['admin_acl']             = 'Gestione Lista Controllo Accessi (ACL)';
$lang['acl_group']             = 'Gruppo:';
$lang['acl_user']              = 'Utente:';
$lang['acl_perms']             = 'Permessi per';
$lang['page']                  = 'Pagina';
$lang['namespace']             = 'Categoria';
$lang['btn_select']            = 'Seleziona';
$lang['p_user_id']             = 'L\'utente %s attualmente ha i seguenti permessi sulla pagina %s: %s.';
$lang['p_user_ns']             = 'L\'utente %s attualmente ha i seguenti permessi per la categoria %s: %s.';
$lang['p_group_id']            = 'I membri del gruppo%s attualmente hanno i seguenti permessi sulla pagina %s: %s.';
$lang['p_group_ns']            = 'I membri del gruppo%s attualmente hanno i seguenti permessi per la categoria %s: %s.';
$lang['p_choose_id']           = 'Inserisci un utente o gruppo nel campo sopra per modificare i permessi impostati per la pagina %s.';
$lang['p_choose_ns']           = 'Inserisci un utente o un gruppo nel campo sopra per modificare i permessi impostati per la categoria %s.';
$lang['p_inherited']           = 'Nota: questi permessi non sono stati esplicitamente impostati, ma sono stati ereditati da altri gruppi o da categorie superiori.';
$lang['p_isadmin']             = 'Nota: il gruppo o utente selezionato ha sempre tutti i permessi perché è configurato come amministratore.';
$lang['p_include']             = 'I permessi più elevati includono i permessi inferiori. I permessi Crea, Carica ed Elimina si applicano soltanto alle categorie e non alle pagine.';
$lang['current']               = 'Regole ACL attuali';
$lang['where']                 = 'Pagina/Categoria';
$lang['who']                   = 'Utente/Gruppo';
$lang['perm']                  = 'Permessi';
$lang['acl_perm0']             = 'Nessuno';
$lang['acl_perm1']             = 'Lettura';
$lang['acl_perm2']             = 'Modifica';
$lang['acl_perm4']             = 'Crea';
$lang['acl_perm8']             = 'Carica';
$lang['acl_perm16']            = 'Elimina';
$lang['acl_new']               = 'Aggiungi nuovo valore';
$lang['acl_mod']               = 'Modifica valore';


text:
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";

let _ = t => t,
    _t;

const _excluded = ["className", "children"];
import styled from 'styled-components';
import React from 'react';
import { densityTarget } from '@looker/design-tokens';
import { DividerVertical } from '../../Divider';
import { InputFilters } from '../../Form/Inputs/InputFilters';
import { ItemTarget } from '../Item/ItemTarget';
import { ColumnSelector } from './ColumnSelector';

const hasSelectableColumns = columns => Boolean(columns.find(c => c.hide !== undefined));

const DataTableFiltersLayout = _ref => {
  let {
    className,
    children
  } = _ref,
      props = _objectWithoutProperties(_ref, _excluded);

  const columnsSelector = React.createElement(React.Fragment, null, React.createElement(DividerVertical, {
    mx: "none",
    stretch: true
  }), React.createElement(ItemTarget, null, React.createElement(ColumnSelector, props)));
  return React.createElement("div", {
    className: className
  }, children, hasSelectableColumns(props.columns) && columnsSelector);
};

export const DataTableFilters = styled(DataTableFiltersLayout).withConfig({
  displayName: "DataTableFilters",
  componentId: "sc-1p8hllh-0"
})(_t || (_t = _`
  align-items: flex-start;
  border-bottom: solid 1px ${0};
  border-top: solid 1px ${0};
  display: flex;

  ${0} {
    border: none;
  }

  ${0} {
    /* Reduce to compensate for outer borders */
    min-height: calc(${0} - 2px);
  }
`), ({
  theme
}) => theme.colors.ui2, ({
  theme
}) => theme.colors.ui2, InputFilters, ItemTarget, densityTarget);
//# sourceMappingURL=DataTableFilters.js.map


text:
uid: contributing
---
Lucene.Net project contributing guide
===============

---------------

## Getting involved

_There are lots ways to help contribute to the Lucene.Net project!_

Lucene.Net is a very large project (over 400,000 executable lines of code and nearly 1,000,000 lines of text total) and we welcome any and all help to maintain such an effort.

### Ask a Question

If you have a general how-to question or need help from the Lucene.Net community, please email the Apache Lucene.Net-User mailing list by sending a message to:

[user@lucenenet.apache.org](mailto:user@lucenenet.apache.org)

We recommend you join the [user mailing list](https://cwiki.apache.org/confluence/display/LUCENENET/Mailing+Lists) to stay looped into all user discussions.

Alternatively, you can get help via [StackOverflow](https://stackoverflow.com/questions/tagged/lucene.net).

Please do not submit general how-to questions to GitHub, use GitHub Issues for bug reports and tasks only.

see __[mailing lists](xref:contributing/mailing-lists)__

### Start a Discussion

To start a development discussion regarding technical features of Lucene.Net, please email the Apache Lucene.Net-Developer mailing list by sending a message to:

[dev@lucenenet.apache.org](mailto:dev@lucenenet.apache.org)

We recommend you join both the [user and dev mailing lists](https://cwiki.apache.org/confluence/display/LUCENENET/Mailing+Lists) to stay looped in to all user and developer discussions.

see __[mailing lists](xref:contributing/mailing-lists)__

### Website and Documentation

Help with keeping this website and documentation up to date would be a great help. It would be great to migrate/consolidate a lot of the important information from the wiki to this website. See __[website and documentation](xref:contributing/documentation)__ for more information about contributing to this area.

### Report a Bug

To report a bug, please use the [GitHub issue tracker](xref:contributing/issue-tracker).

### Submit a Pull Request

First have a look at the __[Current Status](xref:contributing/current-status)__ of the project to see where things are at.

There's a [detailed contribution guide here](https://github.com/apache/lucenenet/blob/master/CONTRIBUTING.md). _(it would be good to migrate this guide to this website)_

And another guide is here about all the basics of getting started with the repo and how we prefer to receive pull requests [Git Setup and Pull Requests](https://cwiki.apache.org/confluence/display/LUCENENET/Git+Setup+and+Pull+Requests)


text:
package com.feedhenry.sdk;

import android.content.Context;
import com.feedhenry.sdk.utils.FHLog;

public class Device {

    private static String mDeviceId;
    private static String mDeviceName;
    private static String mUserAgent;

    private static final String MANUFACTURER_FIELD = "MANUFACTURER";
    private static final String USER_AGENT_TEMP = "Android %s; %s";

    private static final String LOG_TAG = "com.feedhenry.sdk.Device";

    /**
     * Gets the unique device ID.
     *
     * @param context Application context
     * @return the unique device id
     */
    public static String getDeviceId(Context context) {
        if (mDeviceId == null) {
            mDeviceId = android.provider.Settings.Secure.getString(
                context.getContentResolver(),
                android.provider.Settings.Secure.ANDROID_ID);
        }
        return mDeviceId;
    }

    /**
     * Gets the model and manufacturer (if possible) of the device.
     *
     * @return the model and manufacturer (if found) of the device
     */
    public static String getDeviceModelAndManufacturer() {
        if (mDeviceName == null) {
            String model = android.os.Build.MODEL;
            String deviceName = model;
            String manufacturer = android.os.Build.MANUFACTURER;
            if (manufacturer != null && !manufacturer.isEmpty()) {
                deviceName = manufacturer + ' ' + model;
            } else {
                FHLog.w(LOG_TAG, "Could not retrieve device manufacturer info");
            }
            mDeviceName = deviceName;
        }
        return mDeviceName;
    }

    /**
     * Gets the custom user agent string.
     *
     * @return the custom user agent string
     */
    public static String getUserAgent() {
        if (mUserAgent == null) {
            mUserAgent = String.format(USER_AGENT_TEMP, android.os.Build.VERSION.RELEASE, getDeviceModelAndManufacturer());
            FHLog.d(LOG_TAG, "UA = " + mUserAgent);
        }
        return mUserAgent;
    }
}


text:
@class BSBserObject;
@class IOSLongArray;
@class JavaLangLong;
@protocol BSBserCreator;
@protocol DKAsyncStorageActor_LoadCountCallback;
@protocol DKAsyncStorageActor_LoadItemCallback;
@protocol DKListEngineDisplayLoadCallback;
@protocol DKListEngineItem;
@protocol DKListStorageDisplayEx;
@protocol JavaUtilList;

@interface DKAsyncStorageActor : DKActor

#pragma mark Public

- (instancetype)initWithDKListStorageDisplayEx:(id<DKListStorageDisplayEx>)storage
                             withBSBserCreator:(id<BSBserCreator>)creator;

- (void)addOrUpdateWithJavaUtilList:(id<JavaUtilList>)items;

- (void)clear;

- (void)loadBackwardWithNSString:(NSString *)query
                withJavaLangLong:(JavaLangLong *)topSortKey
                         withInt:(jint)limit
withDKListEngineDisplayLoadCallback:(id<DKListEngineDisplayLoadCallback>)callback;

- (void)loadCenterWithJavaLangLong:(JavaLangLong *)centerSortKey
                           withInt:(jint)limit
withDKListEngineDisplayLoadCallback:(id<DKListEngineDisplayLoadCallback>)callback;

- (void)loadCountWithDKAsyncStorageActor_LoadCountCallback:(id<DKAsyncStorageActor_LoadCountCallback>)callback;

- (void)loadForwardWithNSString:(NSString *)query
               withJavaLangLong:(JavaLangLong *)topSortKey
                        withInt:(jint)limit
withDKListEngineDisplayLoadCallback:(id<DKListEngineDisplayLoadCallback>)callback;

- (void)loadHeadWithDKAsyncStorageActor_LoadItemCallback:(id<DKAsyncStorageActor_LoadItemCallback>)callback;

- (void)loadItemWithLong:(jlong)key
withDKAsyncStorageActor_LoadItemCallback:(id<DKAsyncStorageActor_LoadItemCallback>)callback;

- (void)onReceiveWithId:(id)message;

- (void)removeWithLongArray:(IOSLongArray *)keys;

- (void)replaceWithJavaUtilList:(id<JavaUtilList>)items;

@end

J2OBJC_EMPTY_STATIC_INIT(DKAsyncStorageActor)

FOUNDATION_EXPORT void DKAsyncStorageActor_initWithDKListStorageDisplayEx_withBSBserCreator_(DKAsyncStorageActor *self, id<DKListStorageDisplayEx> storage, id<BSBserCreator> creator);

FOUNDATION_EXPORT DKAsyncStorageActor *new_DKAsyncStorageActor_initWithDKListStorageDisplayEx_withBSBserCreator_(id<DKListStorageDisplayEx> storage, id<BSBserCreator> creator) NS_RETURNS_RETAINED;

J2OBJC_TYPE_LITERAL_HEADER(DKAsyncStorageActor)

typedef DKAsyncStorageActor ImActorModelDroidkitEngineAsyncStorageActor;

@interface DKAsyncStorageActor_AddOrUpdate : NSObject

#pragma mark Public

- (instancetype)initWithJavaUtilList:(id<JavaUtilList>)items;

- (id<JavaUtilList>)getItems;

@end

J2OBJC_EMPTY_STATIC_INIT(DKAsyncStorageActor_AddOrUpdate)

FOUNDATION_EXPORT void DKAsyncStorageActor_AddOrUpdate_initWithJavaUtilList_(DKAsyncStorageActor_AddOrUpdate *self, id<JavaUtilList> items);

FOUNDATION_EXPORT DKAsyncStorageActor_AddOrUpdate *new_DKAsyncStorageActor_AddOrUpdate_initWithJavaUtilList_(id<JavaUtilList> items) NS_RETURNS_RETAINED;

J2OBJC_TYPE_LITERAL_HEADER(DKAsyncStorageActor_AddOrUpdate)

@interface DKAsyncStorageActor_Replace : NSObject

#pragma mark Public

- (instancetype)initWithJavaUtilList:(id<JavaUtilList>)items;

- (id<JavaUtilList>)getItems;

@end

J2OBJC_EMPTY_STATIC_INIT(DKAsyncStorageActor_Replace)

FOUNDATION_EXPORT void DKAsyncStorageActor_Replace_initWithJavaUtilList_(DKAsyncStorageActor_Replace *self, id<JavaUtilList> items);

FOUNDATION_EXPORT DKAsyncStorageActor_Replace *new_DKAsyncStorageActor_Replace_initWithJavaUtilList_(id<JavaUtilList> items) NS_RETURNS_RETAINED;

J2OBJC_TYPE_LITERAL_HEADER(DKAsyncStorageActor_Replace)

@interface DKAsyncStorageActor_Remove : NSObject

#pragma mark Public

- (instancetype)initWithLongArray:(IOSLongArray *)keys;

- (IOSLongArray *)getKeys;

@end

J2OBJC_EMPTY_STATIC_INIT(DKAsyncStorageActor_Remove)

FOUNDATION_EXPORT void DKAsyncStorageActor_Remove_initWithLongArray_(DKAsyncStorageActor_Remove *self, IOSLongArray *keys);

FOUNDATION_EXPORT DKAsyncStorageActor_Remove *new_DKAsyncStorageActor_Remove_initWithLongArray_(IOSLongArray *keys) NS_RETURNS_RETAINED;

J2OBJC_TYPE_LITERAL_HEADER(DKAsyncStorageActor_Remove)

@interface DKAsyncStorageActor_Clear : NSObject

#pragma mark Public

- (instancetype)init;

@end

J2OBJC_EMPTY_STATIC_INIT(DKAsyncStorageActor_Clear)

FOUNDATION_EXPORT void DKAsyncStorageActor_Clear_init(DKAsyncStorageActor_Clear *self);

FOUNDATION_EXPORT DKAsyncStorageActor_Clear *new_DKAsyncStorageActor_Clear_init() NS_RETURNS_RETAINED;

J2OBJC_TYPE_LITERAL_HEADER(DKAsyncStorageActor_Clear)

@interface DKAsyncStorageActor_LoadItem : NSObject

#pragma mark Public

- (instancetype)initWithLong:(jlong)key
withDKAsyncStorageActor_LoadItemCallback:(id<DKAsyncStorageActor_LoadItemCallback>)callback;

- (id<DKAsyncStorageActor_LoadItemCallback>)getCallback;

- (jlong)getKey;

@end

J2OBJC_EMPTY_STATIC_INIT(DKAsyncStorageActor_LoadItem)

FOUNDATION_EXPORT void DKAsyncStorageActor_LoadItem_initWithLong_withDKAsyncStorageActor_LoadItemCallback_(DKAsyncStorageActor_LoadItem *self, jlong key, id<DKAsyncStorageActor_LoadItemCallback> callback);

FOUNDATION_EXPORT DKAsyncStorageActor_LoadItem *new_DKAsyncStorageActor_LoadItem_initWithLong_withDKAsyncStorageActor_LoadItemCallback_(jlong key, id<DKAsyncStorageActor_LoadItemCallback> callback) NS_RETURNS_RETAINED;

J2OBJC_TYPE_LITERAL_HEADER(DKAsyncStorageActor_LoadItem)

@interface DKAsyncStorageActor_LoadCount : NSObject

#pragma mark Public

- (instancetype)initWithDKAsyncStorageActor_LoadCountCallback:(id<DKAsyncStorageActor_LoadCountCallback>)callback;

- (id<DKAsyncStorageActor_LoadCountCallback>)getCallback;

@end

J2OBJC_EMPTY_STATIC_INIT(DKAsyncStorageActor_LoadCount)

FOUNDATION_EXPORT void DKAsyncStorageActor_LoadCount_initWithDKAsyncStorageActor_LoadCountCallback_(DKAsyncStorageActor_LoadCount *self, id<DKAsyncStorageActor_LoadCountCallback> callback);

FOUNDATION_EXPORT DKAsyncStorageActor_LoadCount *new_DKAsyncStorageActor_LoadCount_initWithDKAsyncStorageActor_LoadCountCallback_(id<DKAsyncStorageActor_LoadCountCallback> callback) NS_RETURNS_RETAINED;

J2OBJC_TYPE_LITERAL_HEADER(DKAsyncStorageActor_LoadCount)

@interface DKAsyncStorageActor_LoadHead : NSObject

#pragma mark Public

- (instancetype)initWithDKAsyncStorageActor_LoadItemCallback:(id<DKAsyncStorageActor_LoadItemCallback>)callback;

- (id<DKAsyncStorageActor_LoadItemCallback>)getCallback;

@end

J2OBJC_EMPTY_STATIC_INIT(DKAsyncStorageActor_LoadHead)

FOUNDATION_EXPORT void DKAsyncStorageActor_LoadHead_initWithDKAsyncStorageActor_LoadItemCallback_(DKAsyncStorageActor_LoadHead *self, id<DKAsyncStorageActor_LoadItemCallback> callback);

FOUNDATION_EXPORT DKAsyncStorageActor_LoadHead *new_DKAsyncStorageActor_LoadHead_initWithDKAsyncStorageActor_LoadItemCallback_(id<DKAsyncStorageActor_LoadItemCallback> callback) NS_RETURNS_RETAINED;

J2OBJC_TYPE_LITERAL_HEADER(DKAsyncStorageActor_LoadHead)

@interface DKAsyncStorageActor_LoadForward : NSObject

#pragma mark Public

- (instancetype)initWithNSString:(NSString *)query
                withJavaLangLong:(JavaLangLong *)topSortKey
                         withInt:(jint)limit
withDKListEngineDisplayLoadCallback:(id<DKListEngineDisplayLoadCallback>)callback;

- (id<DKListEngineDisplayLoadCallback>)getCallback;

- (jint)getLimit;

- (NSString *)getQuery;

- (JavaLangLong *)getTopSortKey;

@end

J2OBJC_EMPTY_STATIC_INIT(DKAsyncStorageActor_LoadForward)

FOUNDATION_EXPORT void DKAsyncStorageActor_LoadForward_initWithNSString_withJavaLangLong_withInt_withDKListEngineDisplayLoadCallback_(DKAsyncStorageActor_LoadForward *self, NSString *query, JavaLangLong *topSortKey, jint limit, id<DKListEngineDisplayLoadCallback> callback);

FOUNDATION_EXPORT DKAsyncStorageActor_LoadForward *new_DKAsyncStorageActor_LoadForward_initWithNSString_withJavaLangLong_withInt_withDKListEngineDisplayLoadCallback_(NSString *query, JavaLangLong *topSortKey, jint limit, id<DKListEngineDisplayLoadCallback> callback) NS_RETURNS_RETAINED;

J2OBJC_TYPE_LITERAL_HEADER(DKAsyncStorageActor_LoadForward)

@interface DKAsyncStorageActor_LoadBackward : NSObject

#pragma mark Public

- (instancetype)initWithNSString:(NSString *)query
                withJavaLangLong:(JavaLangLong *)topSortKey
                         withInt:(jint)limit
withDKListEngineDisplayLoadCallback:(id<DKListEngineDisplayLoadCallback>)callback;

- (id<DKListEngineDisplayLoadCallback>)getCallback;

- (jint)getLimit;

- (NSString *)getQuery;

- (JavaLangLong *)getTopSortKey;

@end

J2OBJC_EMPTY_STATIC_INIT(DKAsyncStorageActor_LoadBackward)

FOUNDATION_EXPORT void DKAsyncStorageActor_LoadBackward_initWithNSString_withJavaLangLong_withInt_withDKListEngineDisplayLoadCallback_(DKAsyncStorageActor_LoadBackward *self, NSString *query, JavaLangLong *topSortKey, jint limit, id<DKListEngineDisplayLoadCallback> callback);

FOUNDATION_EXPORT DKAsyncStorageActor_LoadBackward *new_DKAsyncStorageActor_LoadBackward_initWithNSString_withJavaLangLong_withInt_withDKListEngineDisplayLoadCallback_(NSString *query, JavaLangLong *topSortKey, jint limit, id<DKListEngineDisplayLoadCallback> callback) NS_RETURNS_RETAINED;

J2OBJC_TYPE_LITERAL_HEADER(DKAsyncStorageActor_LoadBackward)

@interface DKAsyncStorageActor_LoadCenter : NSObject

#pragma mark Public

- (instancetype)initWithJavaLangLong:(JavaLangLong *)centerSortKey
                             withInt:(jint)limit
 withDKListEngineDisplayLoadCallback:(id<DKListEngineDisplayLoadCallback>)callback;

- (id<DKListEngineDisplayLoadCallback>)getCallback;

- (JavaLangLong *)getCenterSortKey;

- (jint)getLimit;

@end

J2OBJC_EMPTY_STATIC_INIT(DKAsyncStorageActor_LoadCenter)

FOUNDATION_EXPORT void DKAsyncStorageActor_LoadCenter_initWithJavaLangLong_withInt_withDKListEngineDisplayLoadCallback_(DKAsyncStorageActor_LoadCenter *self, JavaLangLong *centerSortKey, jint limit, id<DKListEngineDisplayLoadCallback> callback);

FOUNDATION_EXPORT DKAsyncStorageActor_LoadCenter *new_DKAsyncStorageActor_LoadCenter_initWithJavaLangLong_withInt_withDKListEngineDisplayLoadCallback_(JavaLangLong *centerSortKey, jint limit, id<DKListEngineDisplayLoadCallback> callback) NS_RETURNS_RETAINED;

J2OBJC_TYPE_LITERAL_HEADER(DKAsyncStorageActor_LoadCenter)

@protocol DKAsyncStorageActor_LoadItemCallback < NSObject, JavaObject >

- (void)onLoadedWithBSBserObject:(BSBserObject<DKListEngineItem> *)item;

@end

J2OBJC_EMPTY_STATIC_INIT(DKAsyncStorageActor_LoadItemCallback)

J2OBJC_TYPE_LITERAL_HEADER(DKAsyncStorageActor_LoadItemCallback)

@protocol DKAsyncStorageActor_LoadCountCallback < NSObject, JavaObject >

- (void)onLoadedWithInt:(jint)count;

@end

J2OBJC_EMPTY_STATIC_INIT(DKAsyncStorageActor_LoadCountCallback)

J2OBJC_TYPE_LITERAL_HEADER(DKAsyncStorageActor_LoadCountCallback)

#endif // _DKAsyncStorageActor_H_


text:
<?php

namespace GithubService\Hydrator;

use GithubService\Hydrator;
use GithubService\HydratorRegistry;
use GithubService\Model\RepoSearchResults;

class RepoSearchResultsHydrator implements Hydrator
{
    public function hydrate(array $data, HydratorRegistry $hydratorRegistry)
    {
        $branches = new RepoSearchResults();
        $repositories = $hydratorRegistry->extractValue($data, 'repositories');
        $object = $hydratorRegistry->instantiateClass('GithubService\Model\Repositories', $repositories);
        $branches->repositories = $object;

        return $branches;
    }
}


text:
import os
import requests
import json
import time
from subprocess import call

CAT_API_URL = os.environ['CAT_API_URL']
print "CAT_API_URL is: " + CAT_API_URL

def main():
	global catID
	global henryURL

	henry = addHenry("Black")

	catID = henry["id"]
	henryURL = CAT_API_URL+"?id=" + str(catID)

	# checkHenry(henry, "Black")
	henry = updateHenry(henry, "Grey")
	checkHenry(henry, "Grey")
	deleteHenry(henry)
	# checkDeadHenry(henry) Spark (free) plan for ClearDB only allows 4 connections

def addHenry(color):
	print("Add Henry, the black cat. (POST)")
	catToAdd = {'name': 'Henry', 'color': color}
	response = requests.post(CAT_API_URL, data=json.dumps(catToAdd))
	result = json.loads(response.text)

	if response.status_code != 200 or not 'id' in result:
	   	print("Failed to add Henry. Response: " + response.text)
	   	exit(1)

	print("success")
	return result

def checkHenry(result, color):
	print("Verify that Henry has been added/updated (GET)")
	response=requests.get(henryURL)
	result = json.loads(response.text)

	if response.status_code != 200 or \
	   not 'id' in result or \
	   result["name"] != "Henry" or \
	   result["color"] != color or \
	   result["id"] != catID:
	   	print("Failed to verify Henry's addition/update. Response: " + response.text)
	   	exit(1)

	print("success")

def updateHenry(result, color):
	print("Oops, Henry isn't black, he's grey! (PUT)")
	catToUpdate = {'name': 'Henry', 'color': color, 'id': str(catID)}
	response = requests.put(CAT_API_URL, data=json.dumps(catToUpdate))
	result = json.loads(response.text)

	if response.status_code != 200:
	   	print("Failed to update Henry: " + response.text)
	   	exit(1)

	print("success")
	return result

def deleteHenry(result):
	print("Henry, the grey cat ran out of lives (DELETE)")
	response=requests.delete(henryURL)
	if response.status_code != 200:
	   	print("Failed to delete Henry. Response: " + response.text)
	   	exit(1)

	print("success")

# def checkDeadHenry(result):
# 	print("Verify that Henry is really dead (GET)")
# 	response=requests.get(henryURL)
# 	result = json.loads(response.text)
# 	if ('name' in result):
# 	   	print("Failed to verify Henry is really dead. Response: " + response.text)
# 	   	exit(1)

# 	print("success")

main()


text:
This is a very simple SPFx webpart which presents how to use your own SPFx library in your solution. The webpart uses two methods from SPFx manage-data library to get and save data in user application's personal folder in OneDrive.

![image](../assets/in-sharepoint.png)
webpart added to sharepoint page

![image](../assets/in-teams.png)
webpart added to teams

## Compatibility

![SPFx 1.13.0](https://img.shields.io/badge/SPFx-1.13.0-green.svg)
![Node.js v14 | v12](https://img.shields.io/badge/Node.js-v14%20%7C%20v12-green.svg)
![Compatible with SharePoint Online](https://img.shields.io/badge/SharePoint%20Online-Compatible-green.svg)
![Does not work with SharePoint 2019](https://img.shields.io/badge/SharePoint%20Server%202019-Incompatible-red.svg "SharePoint Server 2019 requires SPFx 1.4.1 or lower")
![Does not work with SharePoint 2016 (Feature Pack 2)](https://img.shields.io/badge/SharePoint%20Server%202016%20(Feature%20Pack%202)-Incompatible-red.svg "SharePoint Server 2016 Feature Pack 2 requires SPFx 1.1")
![Local Workbench Unsupported](https://img.shields.io/badge/Local%20Workbench-Unsupported-red.svg "Local workbench is no longer available as of SPFx 1.13 and above")
![Hosted Workbench Compatible](https://img.shields.io/badge/Hosted%20Workbench-Compatible-green.svg)
![Compatible with Remote Containers](https://img.shields.io/badge/Remote%20Containers-Compatible-green.svg)

## Applies to

- [SharePoint Framework](https://aka.ms/spfx)
- [Microsoft 365 tenant](https://docs.microsoft.com/en-us/sharepoint/dev/spfx/set-up-your-developer-tenant)

## Solution

Solution|Author(s)
--------|---------
client-webpart | [Adam Wójcik](https://github.com/Adam-it)

## Version history

Version|Date|Comments
-------|----|--------
1.0|Februaru 21, 2022|Initial release

## Minimal Path to Awesome

- Clone this repository (or [download this solution as a .ZIP file](https://pnp.github.io/download-partial/?url=https://github.com/pnp/sp-dev-fx-webparts/tree/main/samples/react-save-to-onedrive-app-personal-folder) then unzip it)
- Ensure that you are at the solution folder
- in the command-line run:
  - `npm install`
  - `gulp serve`
  - `gulp bundle --ship`
  - `gulp package-solution --ship`
  - Add to AppCatalog and deploy

>  This sample can also be opened with [VS Code Remote Development](https://code.visualstudio.com/docs/remote/remote-overview). Visit https://aka.ms/spfx-devcontainer for further instructions.

## Features

Description of the extension that expands upon high-level summary above.

This extension illustrates the following concepts:

- how to use SPFx library code in webpart

## References

- [Getting started with SharePoint Framework](https://docs.microsoft.com/en-us/sharepoint/dev/spfx/set-up-your-developer-tenant)
- [Building for Microsoft teams](https://docs.microsoft.com/en-us/sharepoint/dev/spfx/build-for-teams-overview)
- [Use Microsoft Graph in your solution](https://docs.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/get-started/using-microsoft-graph-apis)
- [Publish SharePoint Framework applications to the Marketplace](https://docs.microsoft.com/en-us/sharepoint/dev/spfx/publish-to-marketplace-overview)
- [Microsoft 365 Patterns and Practices](https://aka.ms/m365pnp) - Guidance, tooling, samples and open-source controls for your Microsoft 365 development

## Help

We do not support samples, but this community is always willing to help, and we want to improve these samples. We use GitHub to track issues, which makes it easy for  community members to volunteer their time and help resolve issues.

If you're having issues building the solution, please run [spfx doctor](https://pnp.github.io/cli-microsoft365/cmd/spfx/spfx-doctor/) from within the solution folder to diagnose incompatibility issues with your environment.

You can try looking at [issues related to this sample](https://github.com/pnp/sp-dev-fx-webparts/issues?q=label%3A%22sample%3A%20react-save-to-onedrive-app-personal-folder%22) to see if anybody else is having the same issues.

You can also try looking at [discussions related to this sample](https://github.com/pnp/sp-dev-fx-webparts/discussions?discussions_q=react-save-to-onedrive-app-personal-folder) and see what the community is saying.

If you encounter any issues while using this sample, [create a new issue](https://github.com/pnp/sp-dev-fx-webparts/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected%2Csample%3A%20react-save-to-onedrive-app-personal-folder&template=bug-report.yml&sample=react-save-to-onedrive-app-personal-folder&authors=@Adam-it&title=react-save-to-onedrive-app-personal-folder%20-%20).

For questions regarding this sample, [create a new question](https://github.com/pnp/sp-dev-fx-webparts/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Aquestion%2Csample%3A%20react-save-to-onedrive-app-personal-folder&template=question.yml&sample=react-save-to-onedrive-app-personal-folder&authors=@Adam-it&title=react-save-to-onedrive-app-personal-folder%20-%20).

Finally, if you have an idea for improvement, [make a suggestion](https://github.com/pnp/sp-dev-fx-webparts/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Aenhancement%2Csample%3A%20react-save-to-onedrive-app-personal-folder&template=suggestion.yml&sample=react-save-to-onedrive-app-personal-folder&authors=@Adam-it&title=react-save-to-onedrive-app-personal-folder%20-%20).

## Disclaimer

**THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.**

<img src="https://pnptelemetry.azurewebsites.net/sp-dev-fx-webparts/samples/react-save-to-onedrive-app-personal-folder" />


text:
package com.linkedin.pinot.core.query.scheduler;

import com.google.common.base.Preconditions;
import java.util.Iterator;
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.atomic.AtomicInteger;
import javax.annotation.Nonnull;

/**
 * Abstract {@link SchedulerGroup} class that provides common facilities like
 * managing pending queries as a Linked queue of requests and provides basic accounting
 * by tracking running queries, reserved threads and in-use threads
 */
public abstract class AbstractSchedulerGroup implements SchedulerGroup {
  // Queue of pending queries for this group
  protected final ConcurrentLinkedQueue<SchedulerQueryContext> pendingQueries = new ConcurrentLinkedQueue<>();
  protected final String name;
  // Tracks number of running queries for this group
  protected AtomicInteger numRunning = new AtomicInteger(0);
  // Total threads in use for this group
  protected AtomicInteger threadsInUse = new AtomicInteger(0);
  // Total reserved threads for currently running queries for this group
  protected AtomicInteger reservedThreads = new AtomicInteger(0);

  public AbstractSchedulerGroup(@Nonnull String name) {
    Preconditions.checkNotNull(name);
    this.name = name;
  }

  @Override
  public String name() {
    return this.name;
  }

  @Override
  public void addLast(SchedulerQueryContext query) {
    pendingQueries.add(query);
  }

  @Override
  public SchedulerQueryContext peekFirst() {
    return pendingQueries.peek();
  }

  @Override
  public SchedulerQueryContext removeFirst() {
    return pendingQueries.poll();
  }

  @Override
  public void trimExpired(long deadlineMillis) {
    Iterator<SchedulerQueryContext> iter = pendingQueries.iterator();
    while (iter.hasNext()) {
      SchedulerQueryContext next = iter.next();
      if (next.getArrivalTimeMs() < deadlineMillis) {
        iter.remove();
      }
    }
  }

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

  @Override
  public int numPending() {
    return pendingQueries.size();
  }

  @Override
  public int numRunning() {
    return numRunning.get();
  }

  @Override
  public void incrementThreads() {
    threadsInUse.incrementAndGet();
  }

  @Override
  public void decrementThreads() {
    threadsInUse.decrementAndGet();
  }

  @Override
  public int getThreadsInUse() {
    return threadsInUse.get();
  }

  @Override
  public void addReservedThreads(int threads) {
    reservedThreads.addAndGet(threads);
  }

  @Override
  public void releasedReservedThreads(int threads) {
    reservedThreads.addAndGet(-1 * threads);
  }

  @Override
  public int totalReservedThreads() {
    return reservedThreads.get();
  }

  @Override
  public void startQuery() {
    incrementThreads();
    numRunning.incrementAndGet();
  }

  @Override
  public void endQuery() {
    decrementThreads();
    numRunning.decrementAndGet();
  }
}


text:
package fragments;

import android.content.Context;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

/**
 * Created by rafasj6 on 7/3/17.
 */

public class TweetsPagerAdapter extends FragmentPagerAdapter {
    private String tabTitles[] = new String[] {"Home", "Mentions"};
    private Context context;
    public HomeTimelineFragment homeTimelineFragment;
    public MentionsTimelineFragment mentionsTimelineFragment;

    public TweetsPagerAdapter(FragmentManager fm, Context context) {
        super(fm);
        this.context = context;

    }

    @Override
    public int getCount() {
        return 2;
    }

    @Override
    public Fragment getItem(int position){
        if (position == 0)
        {
            homeTimelineFragment = getHomeTimeline();
            return homeTimelineFragment;
        }
        else if(position == 1){
             mentionsTimelineFragment = getMentionsTimelineFragment();
            return mentionsTimelineFragment;
        }else{
            return null;
        }

    }
    private HomeTimelineFragment getHomeTimeline(){
        if(homeTimelineFragment == null){
            return new HomeTimelineFragment();
        }
        else{
            return homeTimelineFragment;
        }

    }

    private MentionsTimelineFragment getMentionsTimelineFragment(){
        if(mentionsTimelineFragment == null){
            return new MentionsTimelineFragment();
        }
        else{
            return mentionsTimelineFragment;
        }

    }

    @Override
    public CharSequence getPageTitle(int position) {
        return tabTitles[position] ;
    }
}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Ann. Chemie 340: 291 (1905)

#### Original name
Lichen chrysoleucus Sm.

### Remarks
null


text:
var game, player;
var gameStates = { start: 0, game: 1, gameOver: 2 };
var lookState = { down: 0, up: 1, right: 2, left: 3};
var characters = [];
var minorCharacters = [];
var time = 0;

var upKey, downKey, leftKey, rightKey, spaceKey;


text:
module MagicCarpet
  module ApplicationHelper
  end
end


text:
namespace dumbo {
namespace v1 {
namespace reactor {

class OneWayFunctionMessage: public Message {
    std::function<void()> fn_;

public:
    OneWayFunctionMessage(int cpu, const std::function<void()>& fn):
        Message(cpu, true),
        fn_(fn)
    {}

    virtual void process() noexcept
    {
        try {
            fn_();
        }
        catch(...) {
            exception_ = std::current_exception();
        }
    }

    virtual void finish()
    {
        if (exception_)
        {
            auto tmp = exception_;
            delete this;
            std::rethrow_exception(tmp);
        }
        else {
            delete this;
        }
    }

    virtual std::string describe() {return "OneWayFunctionMessage";}
};

}}}


text:
JNPileView
==========

Version 0.1

![Alt text](BasicDemo.gif)


text:
<?php

namespace app\controllers;

use Yii;
use app\models\SdbCategoriasGeneral;
use app\models\SdbCategoriasGeneralSearch;
use yii\web\Controller;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;

/**
 * SdbCategoriasGeneralController implements the CRUD actions for SdbCategoriasGeneral model.
 */
class SdbCategoriasGeneralController extends Controller
{
    public function behaviors()
    {
        return [
            'verbs' => [
                'class' => VerbFilter::className(),
                'actions' => [
                    'delete' => ['post'],
                ],
            ],
        ];
    }

    /**
     * Lists all SdbCategoriasGeneral models.
     * @return mixed
     */
    public function actionIndex()
    {

        $searchModel = new SdbCategoriasGeneralSearch();
        $dataProvider = $searchModel->search(Yii::$app->request->queryParams);

        return $this->render('index', [
            'searchModel' => $searchModel,
            'dataProvider' => $dataProvider,
        ]);
    }

    /**
     * Displays a single SdbCategoriasGeneral model.
     * @param integer $id
     * @return mixed
     */
    public function actionView($id)
    {
        return $this->render('view', [
            'model' => $this->findModel($id),
        ]);
    }

    /**
     * Creates a new SdbCategoriasGeneral model.
     * If creation is successful, the browser will be redirected to the 'view' page.
     * @return mixed
     */
    public function actionCreate()
    {

        $model = new SdbCategoriasGeneral();

        if ($model->load(Yii::$app->request->post()) && $model->save()) {
            return $this->redirect(['view', 'id' => $model->cod]);
        } else {
            return $this->render('create', [
                'model' => $model,
            ]);
        }
    }

    /**
     * Updates an existing SdbCategoriasGeneral model.
     * If update is successful, the browser will be redirected to the 'view' page.
     * @param integer $id
     * @return mixed
     */
    public function actionUpdate($id)
    {

        $model = $this->findModel($id);

        if ($model->load(Yii::$app->request->post()) && $model->save()) {
            return $this->redirect(['view', 'id' => $model->cod]);
        } else {
            return $this->render('update', [
                'model' => $model,
            ]);
        }
    }

    /**
     * Deletes an existing SdbCategoriasGeneral model.
     * If deletion is successful, the browser will be redirected to the 'index' page.
     * @param integer $id
     * @return mixed
     */
    public function actionDelete($id)
    {
        $this->findModel($id)->delete();

        return $this->redirect(['index']);
    }

    /**
     * Finds the SdbCategoriasGeneral model based on its primary key value.
     * If the model is not found, a 404 HTTP exception will be thrown.
     * @param integer $id
     * @return SdbCategoriasGeneral the loaded model
     * @throws NotFoundHttpException if the model cannot be found
     */
    protected function findModel($id)
    {
        if (($model = SdbCategoriasGeneral::findOne($id)) !== null) {
            return $model;
        } else {
            throw new NotFoundHttpException('The requested page does not exist.');
        }
    }
}


text:
package mx.androidtitlan.miprimerapp;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

public class WasLameFragment extends Fragment {

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		return inflater.inflate(R.layout.fragment_lame, container, false);
	}
}


text:
package com.cfcc.deptone.excel.poi.operation;

/**
 * 排序操作
 * 代码示例:group
 * @author wanghuanyu
 *
 */
public class POIGroupOperation extends POIOperation {

	public static final String OPERATION = "group";
//	public static final String ORDER_TYPE_ASC = "asc";
//	public static final String ORDER_TYPE_DESC = "desc";

//	/**排序类型,升序asc,或降序desc*/
//	private String orderType;

//	public String getOrderType() {
//		return orderType;
//	}

//	public void setOrderType(String orderType) {
//		this.orderType = orderType;
//	}
}


text:
namespace Model.DefiningClasses
{
    using System;
    using System.Text;

    public class Display
    {
        private decimal? size;
        private int? numberOfColors;

        public Display()
        {
        }

        public Display(decimal? size, int? numberOfColors)
        {
            this.Size = size;
            this.NumberOfColors = numberOfColors;
        }

        public decimal? Size
        {
            get
            {
                return this.size;
            }

            set
            {
                if (value < 1 || value > 7)
                {
                    throw new ArgumentOutOfRangeException("Size of the display must be between 1 and 7 inch");
                }

                this.size = value;
            }
        }

        public int? NumberOfColors
        {
            get
            {
                return this.numberOfColors;
            }

            set
            {
                if (value < 2)
                {
                    throw new ArgumentOutOfRangeException("Number of colors must be more than 2 because even 1 bit color scheme has 2 colors");
                }

                this.numberOfColors = value;
            }
        }

        public override string ToString()
        {
            var print = new StringBuilder();

            if (this.Size != null)
            {
                print.AppendFormat("    Size: {0:F1}inch\n\r", this.Size);
            }

            if (this.NumberOfColors != null)
            {
                print.AppendFormat("    Number of colors: {0:N0}\n\r", this.NumberOfColors);
            }

            return print.ToString();
        }
    }
}


text:
title: Kobe Bryant Signs 2-Year Extension with Los Angeles Lakers
date: 2013-11-26 13:14:11 -06:00
tags:
- NBA
- Kobe Bryant
layout: post
custom_type: link
link_url: http://espn.go.com/los-angeles/nba/story/_/id/10034589/kobe-bryant-signs-two-year-contract-extension-los-angeles-lakers
---

>Kobe Bryant signed a two-year contract extension with the Los Angeles Lakers on Monday.
>
>The Lakers did not announce financial terms, but a source told ESPNLosAngeles.com's Ramona Shelburne that the deal is worth $48.5 million.

Even as a huge Laker fan, I don't see the logic behind this decision. Kobe Bryant has been one of the best players of the current era, but I certainly thought this would be his last year. As great as he is, age eventually catches up with you.

***But*** I could be terribly wrong. They don't call him the Black Mamba for nothing.


text:
package com.scaleset.search.mongo;

import com.mongodb.DBCursor;
import com.mongodb.DBObject;
import com.scaleset.search.AggregationResults;
import com.scaleset.search.Query;
import com.scaleset.search.Results;
import com.scaleset.utils.Coerce;

import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class ResultsConverter<T, K> {

    private Query query;
    private DBCursor cursor;
    private int totalItems;
    private List<T> items = new ArrayList<>();
    private Map<String, AggregationResults> aggregationResults = new HashMap<>();
    SearchMapping<T, K> searchMapping;

    public ResultsConverter(Query query, DBCursor cursor, SearchMapping<T, K> searchMapping) {
        this.query = query;
        this.cursor = cursor;
        this.searchMapping = searchMapping;
    }

    protected void initialize() throws IOException {
        totalItems = cursor.count();
        while (cursor.hasNext()) {
            DBObject obj = cursor.next();
            String id = Coerce.toString(obj.get("_id"));
            try {
                T item = searchMapping.fromDocument(id, obj);
                items.add(item);
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
        cursor.close();
    }

    protected void addAggResults() {
        // aggs not yet supported
    }

    public Results<T> convert() throws Exception {
        initialize();
        addAggResults();
        Results<T> results = new Results<T>(query, aggregationResults, items, totalItems);
        return results;
    }

}


text:
<?php
// src/Acme/UserBundle/Document/User.php

namespace Thrillabyte\AppBundle\Document;

use FOS\UserBundle\Document\User as BaseUser;
use Doctrine\ODM\MongoDB\Mapping\Annotations as MongoDB;

/**
 * @MongoDB\Document
 */
class User extends BaseUser
{
    /**
     * @MongoDB\Id(strategy="auto")
     */
    protected $id;

		/**
     * @MongoDB\ReferenceMany(targetDocument="Thrillabyte\AppBundle\Document\Group")
     */
		protected $groups;

    public function __construct()
    {
        parent::__construct();
        // your own logic
    }

    /**
     * Get id
     *
     * @return id $id
     */
    public function getId()
    {
        return $this->id;
    }
}


text:
<?php

namespace Zend\Log\Writer;

use DateTime;
use Mongo;
use MongoClient;
use MongoDate;
use Traversable;
use Zend\Log\Exception;
use Zend\Log\Formatter\FormatterInterface;
use Zend\Stdlib\ArrayUtils;

/**
 * MongoDB log writer.
 */
class MongoDB extends AbstractWriter
{
    /**
     * MongoCollection instance
     *
     * @var MongoCollection
     */
    protected $mongoCollection;

    /**
     * Options used for MongoCollection::save()
     *
     * @var array
     */
    protected $saveOptions;

    /**
     * Constructor
     *
     * @param Mongo|MongoClient|array|Traversable $mongo
     * @param string|MongoDB $database
     * @param string $collection
     * @param array $saveOptions
     * @throws Exception\InvalidArgumentException
     */
    public function __construct($mongo, $database = null, $collection = null, array $saveOptions = array())
    {
        if ($mongo instanceof Traversable) {
            // Configuration may be multi-dimensional due to save options
            $mongo = ArrayUtils::iteratorToArray($mongo);
        }
        if (is_array($mongo)) {
            parent::__construct($mongo);
            $saveOptions = isset($mongo['save_options']) ? $mongo['save_options'] : array();
            $collection  = isset($mongo['collection']) ? $mongo['collection'] : null;
            $database    = isset($mongo['database']) ? $mongo['database'] : null;
            $mongo       = isset($mongo['mongo']) ? $mongo['mongo'] : null;
        }

        if (null === $collection) {
            throw new Exception\InvalidArgumentException('The collection parameter cannot be empty');
        }

        if (null === $database) {
            throw new Exception\InvalidArgumentException('The database parameter cannot be empty');
        }

        if (!($mongo instanceof MongoClient || $mongo instanceof Mongo)) {
            throw new Exception\InvalidArgumentException(sprintf(
                'Parameter of type %s is invalid; must be MongoClient or Mongo',
                (is_object($mongo) ? get_class($mongo) : gettype($mongo))
            ));
        }

        $this->mongoCollection = $mongo->selectCollection($database, $collection);
        $this->saveOptions     = $saveOptions;
    }

    /**
     * This writer does not support formatting.
     *
     * @param string|FormatterInterface $formatter
     * @return WriterInterface
     */
    public function setFormatter($formatter)
    {
        return $this;
    }

    /**
     * Write a message to the log.
     *
     * @param array $event Event data
     * @return void
     * @throws Exception\RuntimeException
     */
    protected function doWrite(array $event)
    {
        if (null === $this->mongoCollection) {
            throw new Exception\RuntimeException('MongoCollection must be defined');
        }

        if (isset($event['timestamp']) && $event['timestamp'] instanceof DateTime) {
            $event['timestamp'] = new MongoDate($event['timestamp']->getTimestamp());
        }

        $this->mongoCollection->save($event, $this->saveOptions);
    }
}