text:
<?php

namespace Symfony\Component\Messenger\Transport\Serialization;

use Symfony\Component\Messenger\Envelope;
use Symfony\Component\Messenger\Exception\MessageDecodingFailedException;
use Symfony\Component\Messenger\Stamp\NonSendableStampInterface;

/**
 * @author Ryan Weaver<ryan@symfonycasts.com>
 */
class PhpSerializer implements SerializerInterface
{
    /**
     * {@inheritdoc}
     */
    public function decode(array $encodedEnvelope): Envelope
    {
        if (empty($encodedEnvelope['body'])) {
            throw new MessageDecodingFailedException('Encoded envelope should have at least a "body".');
        }

        $serializeEnvelope = stripslashes($encodedEnvelope['body']);

        return $this->safelyUnserialize($serializeEnvelope);
    }

    /**
     * {@inheritdoc}
     */
    public function encode(Envelope $envelope): array
    {
        $envelope = $envelope->withoutStampsOfType(NonSendableStampInterface::class);

        $body = addslashes(serialize($envelope));

        return [
            'body' => $body,
        ];
    }

    private function safelyUnserialize(string $contents)
    {
        $e = null;
        $signalingException = new MessageDecodingFailedException(sprintf('Could not decode message using PHP serialization: %s.', $contents));
        $prevUnserializeHandler = ini_set('unserialize_callback_func', self::class.'::handleUnserializeCallback');
        $prevErrorHandler = set_error_handler(function ($type, $msg, $file, $line, $context = []) use (&$prevErrorHandler, $signalingException) {
            if (__FILE__ === $file) {
                throw $signalingException;
            }

            return $prevErrorHandler ? $prevErrorHandler($type, $msg, $file, $line, $context) : false;
        });

        try {
            $meta = unserialize($contents);
        } finally {
            restore_error_handler();
            ini_set('unserialize_callback_func', $prevUnserializeHandler);
        }

        return $meta;
    }

    /**
     * @internal
     */
    public static function handleUnserializeCallback($class)
    {
        throw new MessageDecodingFailedException(sprintf('Message class "%s" not found during decoding.', $class));
    }
}


text:
<!DOCTYPE html>

Example

    <input type="checkbox" name="test-1" id="elementOne" />Element 1

    <input type="checkbox" name="test-2" id="elementTwo" />Element 2

    <input type="checkbox" name="test-3" id="elementThree" />Element 3

redpajama_set_name: RedPajamaGithub


text:
A somewhat hacky Chrome extension to convert imperial/customary units on
Instacart into metric values.

Currently understands gallons, fl oz, quarts, pints, oz, and lbs.

## Installation

Click [Add to Chrome here](https://chrome.google.com/webstore/detail/instametric/agnehkmmogfljboljnbojbdohffjjpgc).


text:
A tool for managing Riak clusters.

## Beta Software
* This software should **not be used in a production environment**.
* This software is **not fully compatable with all new features of Riak 1.4.x**. Please refer to the issues page for a full description of upcoming features.

## Installation

Requirements:

* Bash 3.x or 4.x
* POSIX grep, sed, awk, uniq, ln, cp, logger, du
* readlink (BSD or GNU)
* Riak (for local test clusters)
* OpenSSH (for planned remote cluster management)

To install from source, clone this repository or [download and extract a
tarball](https://github.com/basho/riak-manage/tarball/master) somewhere like
/opt/riak-manage or in your home directory. Then, create a symlink to the main
riak-manage script in a directory that is in $PATH such as /usr/bin, /usr/sbin,
or /usr/local/bin.

Packages may be forthcoming. The riak-manage script also supports being placed
in the bin or sbin directory of a prefix, and the riak-manage directory in the
lib directory of that same prefix. For example:

```
/usr/sbin/riak-manage
/usr/lib/riak-manage/{commands,templates}
```

## Getting started

To get started with riak-manage, first export RIAK_CLUSTERS to a path:
```
export RIAK_CLUSTERS=$HOME/clusters
```

Then make sure that `riak` is in your path:
```
which riak
```
Neither of the above are strictly necessary, but setting them will allow you to
call all of the following commands without needing to do any additional
configuration.

## Getting help, creating a cluster
Now, execute each of the following and get familiar with riak-manage:

```
riak-manage
riak-manage help
riak-manage help node
riak-manage node help # help accomodates argument dyslexia
```
```
# Create a cluster
riak-manage mycluster create

# Start that cluster
riak-manage mycluster riak start

# Join it together with old style commnads
riak-manage mycluster join-all

OR

# If on 1.2 or newer, you might have to give -f
riak-manage mycluster join-all -f

OR

# Join the cluster using the cluster staging commands.
# Then use the node command to look at the plan and commit it.
riak-manage mycluster cluster-join-all
riak-manage mycluster node 1 riak-admin cluster plan
riak-manage mycluster node 1 riak-admin commit
```

You can continue creating clusters and riak-manage will figure out all of the
ports for the additional clusters so that nothing conflicts. This works for up
to 20 automatically managed clusters, then you are on your own.

## Templates

Templates are just directories containing app.config, vm.args, and other
configuration files that get bootstrapped by cp and sed. Have a look at the
create command for all of the search and replace performed. To create your own
set of templates, copy the `default` directory and edit away. The `RIAK_MANAGE_`
variables will be replaced with values during create. To specify the use of a
template during create, use `--template NAME`. See `riak-manage help create`
for more.

## Writing commands

Contributing your own comands is pretty easy. An example command, called
`a-sample-cmd`, is present that shows how to get started. Just copy
`a-sample-cmd` to a file in the `commands` directory with the name
corresponding to what you wish the command to be, then implement the three
hooks as shown to perform the desired actions.

See the `node`, `riak`, and `join-all` commands for more examples.


text:
package hadraha;

import java.io.IOException;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.google.appengine.api.datastore.DatastoreServiceFactory;
import com.google.appengine.api.datastore.DatastoreService;
import com.google.appengine.api.datastore.Entity;
import com.google.appengine.api.datastore.Text;
import com.google.appengine.api.datastore.KeyFactory;
import com.google.gson.Gson;

public class Add extends HttpServlet {

    private static Gson gson = new Gson();

    @Override
    public void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException {
        String responseText = "fail";

        resp.setContentType("application/json; charset=UTF-8");
        resp.setHeader("Access-Control-Allow-Origin", "*");
        resp.setHeader("Cache-Control", "no-cache, no-store, must-revalidate"); // HTTP 1.1.
        resp.setHeader("Access-Control-Allow-Headers", "Content-Type");
        resp.setHeader("Access-Control-Allow-Methods", "POST, OPTIONS");

        try {
            String userId = Utils.getCurrentUserId(req);
            Entity userEntity = Utils.getUserEntity(userId);
            UserPermissions userPermissions = Utils.getUserPermissions(userEntity);
            if (userPermissions == null || userPermissions.getRank() > UserPermissions.INSTRUCTOR.getRank()) {
                resp.sendError(401);
                return;
            }

            String dataString = Utils.getRequestInput(req);
            Brick brick = Brick.constructFromJson(dataString);
            if (brick.getContent().length() == 0){
                brick.setContent("ריק");
            }
            brick.initializeCreation(userId);
            Entity brickEntity = convertBrickToEntity(brick);

            DatastoreService dataStore = DatastoreServiceFactory.getDatastoreService();
            dataStore.put(brickEntity);

            brickEntity.setUnindexedProperty("id", brickEntity.getKey().getId());

            responseText = gson.toJson(brickEntity);

            resp.getWriter().print(responseText);

        } catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
            resp.sendError(520);
        }
    }

    private Entity convertBrickToEntity(Brick brick) {
        Entity brickEntity = new Entity("Brick");

        brickEntity.setProperty("type", brick.getType());
        brickEntity.setProperty("topic", brick.getTopic());
        brickEntity.setProperty("title", brick.getTitle());
        brickEntity.setUnindexedProperty("tags", brick.getTags());
        brickEntity.setUnindexedProperty("ages", brick.getAges());
        brickEntity.setUnindexedProperty("duration", brick.getDuration());
        brickEntity.setUnindexedProperty("accessories", new Text(brick.getAccessories()));
        brickEntity.setUnindexedProperty("content", new Text(brick.getContent()));
        brickEntity.setUnindexedProperty("creationTime", brick.getCreationTime());
        brickEntity.setProperty("createdBy", brick.getCreatedBy());
        brickEntity.setUnindexedProperty("updatedTime", brick.getUpdatedTime());
        brickEntity.setProperty("updatedBy", brick.getUpdatedBy());
        brickEntity.setUnindexedProperty("childBricks", brick.getChildBricks());
        brickEntity.setUnindexedProperty("isPublic", brick.getPublicStatus());

        return brickEntity;
    }

    @Override
    protected void doOptions(HttpServletRequest req, HttpServletResponse resp) {
        // pre-flight request processing
        String origin = Utils.getAllowedOriginValue(req);
        resp.setHeader("Access-Control-Allow-Origin", origin);
        resp.setHeader("Access-Control-Allow-Methods", "POST");
        resp.setHeader("Access-Control-Allow-Headers", "Content-Type");
    }
}


text:
Gravito ID, provided by [Gravito Ltd.](https://gravito.net), is ID for ad targeting by using 1st party cookie.
Please contact Gravito Ltd. before using this ID.

## Building Prebid with Gravito ID Support

First, make sure to add the Gravito ID submodule to your Prebid.js package with:

```
gulp build --modules=gravitoIdSystem
```

The following configuration parameters are available:

```javascript
pbjs.setConfig({
    userSync: {
        userIds: [{
            name: 'gravitompId'
        }]
    }
});
```

| Param under userSync.userIds[] | Scope | Type | Description | Example |
| --- | --- | --- | --- | --- |
| name | Required | String | The name of this module. | `"gravitompId"` |


text:
require File.expand_path("../../../../base", __FILE__)

require Vagrant.source_root.join("plugins/synced_folders/nfs/config")

describe VagrantPlugins::SyncedFolderNFS::Config do
  subject { described_class.new }

  describe "#map_gid" do
    it "defaults to :auto" do
      subject.finalize!
      expect(subject.map_gid).to eq(:auto)
    end
  end

  describe "#map_uid" do
    it "defaults to nil" do
      subject.finalize!
      expect(subject.map_uid).to eq(:auto)
    end
  end
end


text:
// Generated on 2016-01-12 using generator-angular 0.15.1
'use strict';

var gulp = require('gulp');
var $ = require('gulp-load-plugins')();
var openURL = require('open');
var lazypipe = require('lazypipe');
var rimraf = require('rimraf');
var wiredep = require('wiredep').stream;
var runSequence = require('run-sequence');
var process = require('child_process');
var webserver = require('gulp-webserver');
var proxyMiddleware = require('http-proxy-middleware');
var proxy = proxyMiddleware('/api/v1', {target: 'http://localhost:8888'});
var url = require('url');
var yeoman = {
  app: require('./bower.json').appPath || 'app',
  dist: 'dist'
};

var paths = {
  scripts: [yeoman.app + '/scripts/**/*.js'],
  styles: [yeoman.app + '/styles/**/*.scss'],

  test: ['test/spec/**/*.js'],
  testRequire: [
    // yeoman.app + './bower_components/angular/angular.js',
    // yeoman.app + './bower_components/angular-mocks/angular-mocks.js',
    // yeoman.app + './bower_components/angular-resource/angular-resource.js',
    // yeoman.app + './bower_components/angular-cookies/angular-cookies.js',
    // yeoman.app + './bower_components/angular-sanitize/angular-sanitize.js',
    // yeoman.app + './bower_components/angular-route/angular-route.js',
    // 'test/mock/**/*.js',
    // 'test/spec/**/*.js'
  ],
  karma: 'karma.conf.js',
  views: {
    main: yeoman.app + '/index.html',
    files: [yeoman.app + '/views/**/*.html']
  }
};

////////////////////////
// Reusable pipelines //
////////////////////////

var lintScripts = lazypipe()
  .pipe($.jshint, '.jshintrc')
  .pipe($.jshint.reporter, 'jshint-stylish');

var styles = lazypipe()
  .pipe($.sass, {
    outputStyle: 'expanded',
    precision: 10
  })
  .pipe($.autoprefixer, 'last 1 version')
  .pipe(gulp.dest, '.tmp/styles');

///////////
// Tasks //
///////////

gulp.task('styles', function() {
  return gulp.src(paths.styles)
    .pipe(styles());
});

gulp.task('lint:scripts', function() {
  return gulp.src(paths.scripts)
    .pipe(lintScripts());
});

gulp.task('clean:tmp', function(cb) {
  rimraf('./.tmp', cb);
});

gulp.task('start:client', ['start:server', 'styles'], function() {
  openURL('http://localhost:9002');
});

gulp.task('start:server', function() {

gulp.src('app')
    .pipe(webserver({
      livereload: true,
      middleware:proxy,
       open: true
    }));

  // $.connect.server({
  //   // root: [yeoman.app, '.tmp'],
  //   root: [yeoman.app],
  //   livereload: true,
  //   port: 9002,
  //  middleware: proxy,
  //   // Change this to '0.0.0.0' to access the server from outside.

  // });
});

gulp.task('start:server:test', function() {
  $.connect.server({
    root: ['test', yeoman.app, '.tmp'],
    livereload: true,
    port: 9001
  });
});

gulp.task('watch', function() {
  $.watch(paths.styles)
    .pipe($.plumber())
    .pipe(styles())
    .pipe($.connect.reload());

  $.watch(paths.views.files)
    .pipe($.plumber())
    .pipe($.connect.reload());

  $.watch(paths.scripts)
    .pipe($.plumber())
    .pipe(lintScripts())
    .pipe($.connect.reload());

  $.watch(paths.test)
    .pipe($.plumber())
    .pipe(lintScripts());

  gulp.watch('bower.json', ['bower']);
});

gulp.task('serve', function(cb) {
  runSequence('clean:tmp', ['lint:scripts'], ['start:client'], 'bower',
    'watch', 'flask',cb);
});

gulp.task('serve:prod', function() {
  $.connect.server({
    root: ['/'],
    livereload: true,
    port: 9000
  });
});

gulp.task('test', ['start:server:test'], function() {
  var testToFiles = paths.testRequire.concat(paths.scripts, paths.test);
  return gulp.src(testToFiles)
    .pipe($.karma({
      configFile: paths.karma,
      action: 'watch'
    }));
});

// inject bower components
gulp.task('bower', ['copyBower'], function() {
  // gulp.task('bower', ['copyBower'], function() {
  return gulp.src(paths.views.main)
    .pipe(wiredep({
      // directory: './bower_components',
      optional: 'configuration',
      goes: 'here'
      // ignorePath: '..'
    }))
    .pipe(gulp.dest(yeoman.app));

});
//thats a mistake of link to bower components,but,it is work now :<however ,in my mind ,it's becouse
gulp.task('copyBower',['cleanBower'], function() {

  return gulp.src('./bower_components/**/*')
    .pipe(gulp.dest(yeoman.app + '/bower_components'))

})

gulp.task('cleanBower', function(cb) {
  rimraf(yeoman.app + '/bower_components/*',cb);
});
///////////
// Build //
///////////

gulp.task('clean:dist', function(cb) {
  rimraf('./dist', cb);
});

gulp.task('client:build', ['html', 'styles'], function() {
  var jsFilter = $.filter('**/*.js');
  var cssFilter = $.filter('**/*.css');

  return gulp.src(paths.views.main)
    .pipe($.useref({
      searchPath: [yeoman.app, '.tmp']
    }))
    .pipe(jsFilter)
    .pipe($.ngAnnotate())
    .pipe($.uglify())
    .pipe(jsFilter.restore())
    .pipe(cssFilter)
    .pipe($.minifyCss({
      cache: true
    }))
    .pipe(cssFilter.restore())
    .pipe($.rev())
    .pipe($.revReplace())
    .pipe(gulp.dest(yeoman.dist));
});

gulp.task('html', function() {
  return gulp.src(yeoman.app + '/views/**/*')
    .pipe(gulp.dest(yeoman.dist + '/views'));
});

gulp.task('images', function() {
  return gulp.src(yeoman.app + '/images/**/*')
    .pipe($.cache($.imagemin({
      optimizationLevel: 5,
      progressive: true,
      interlaced: true
    })))
    .pipe(gulp.dest(yeoman.dist + '/images'));
});

gulp.task('copy:extras', function() {
  return gulp.src(yeoman.app + '/*/.*', {
      dot: true
    })
    .pipe(gulp.dest(yeoman.dist));
});

gulp.task('copy:fonts', function() {
  return gulp.src(yeoman.app + '/fonts/**/*')
    .pipe(gulp.dest(yeoman.dist + '/fonts'));
});

gulp.task('build', ['clean:dist'], function() {
  runSequence(['images', 'copy:extras', 'copy:fonts', 'client:build']);
});

gulp.task('default', ['build']);
//start flask server from this files
gulp.task('flask', function() {
  var spawn = process.spawn;
  console.info('Starting flask server');
  var PIPE = {
    stdio: 'inherit'
  };
  spawn('python', ['server/run.py', 'runserver'], PIPE);
});


text:
//
//  NSTableView-NoodleExtensions.h
//  NoodleKit
//
//  Created by Paul Kim on 10/22/09.
//  Copyright 2009 Noodlesoft, LLC. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
// restriction, including without limitation the rights to use,
// copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following
// conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.

#import <Cocoa/Cocoa.h>

#ifndef NS_ENUM
#import <Foundation/Foundation.h>
#endif
typedef NS_ENUM(NSUInteger, NoodleStickyRowTransition)
{
	NoodleStickyRowTransitionNone,
	NoodleStickyRowTransitionFadeIn
};

void NoodleClearRect(NSRect rect);

@interface NSTableView (NoodleExtensions)

#pragma mark Sticky Row Header methods
// Note: see NoodleTableView's -drawRect on how to hook in this functionality in a subclass

/*
 Currently set to any groups rows (as dictated by the delegate). The
 delegate can implement -tableView:isStickyRow: to override this.
 */
- (BOOL)isRowSticky:(NSInteger)rowIndex;

/*
 Does the actual drawing of the sticky row. Override if you want a custom look.
 You shouldn't invoke this directly. See -drawStickyRowHeader.
 */
- (void)drawStickyRow:(NSInteger)row clipRect:(NSRect)clipRect;

/*
 Draws the sticky row at the top of the table. You have to override -drawRect
 and call this method, that being all you need to get the sticky row stuff
 to work in your subclass. Look at NoodleStickyRowTableView.
 Note that you shouldn't need to override this. To modify the look of the row,
 override -drawStickyRow: instead.
 */
- (void)drawStickyRowHeader;

/*
 Returns the rect of the sticky view header. Will return NSZeroRect if there is no current
 sticky row.
 */
@property (nonatomic, readonly) NSRect stickyRowHeaderRect;

/*
 Does an animated scroll to the current sticky row. Clicking on the sticky
 row header will trigger this.
 */
- (IBAction)scrollToStickyRow:(id)sender;

/*
 Returns what kind of transition you want when the row becomes sticky. Fade-in
 is the default.
 */
@property (nonatomic, readonly) NoodleStickyRowTransition stickyRowHeaderTransition;

#pragma mark Row Spanning methods

/*
 Returns the range of the span at the given column and row indexes. The span is determined by
 a range of contiguous rows having the same object value.
 */
- (NSRange)rangeOfRowSpanAtColumn:(NSInteger)columnIndex row:(NSInteger)rowIndex;

@end

@class NoodleRowSpanningCell;

@interface NSTableColumn (NoodleExtensions)

#pragma mark Row Spanning methods
/*
 Returns whether this column will try to consolidate rows into spans.
 */
@property (nonatomic, getter=isRowSpanningEnabled, readonly) BOOL rowSpanningEnabled;

/*
 Returns the cell used to draw the spanning regions. Default implementation returns nil.
 */
@property (nonatomic, readonly, strong) NoodleRowSpanningCell *spanningCell;

@end

@interface NSOutlineView (NoodleExtensions)

#pragma mark Sticky Row Header methods
/*
 Currently set to any groups rows (or as dictated by the delegate). The
 delegate can implement -outlineView:isStickyRow: to override this.
 */
- (BOOL)isRowSticky:(NSInteger)rowIndex;

@end

@interface NSObject (NoodleStickyRowDelegate)

/*
 Allows the delegate to specify if a row is sticky. By default, group rows
 are sticky. The delegate can override that by implementing this method.
 */
- (BOOL)tableView:(NSTableView *)tableView isStickyRow:(NSInteger)rowIndex;

/*
 Allows the delegate to specify whether a certain cell should be drawn in the sticky row header
 */
- (BOOL)tableView:(NSTableView *)tableView shouldDisplayCellInStickyRowHeaderForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)rowIndex;

/*
 Same as above but for outline views.
 */
- (BOOL)outlineView:(NSOutlineView *)outlineView isStickyItem:(id)item;

@end


text:
function Resolve-SqlIpAddress {
    [CmdletBinding()]
    param (
        [Parameter(Mandatory = $true)]
        [Alias("ServerInstance", "SqlServer")]
        [object]$SqlInstance,
        [PSCredential]$SqlCredential
    )

    $server = Connect-SqlInstance -SqlInstance $SqlInstance -SqlCredential $SqlCredential
    $servernetbios = $server.ComputerNamePhysicalNetBIOS
    $ipaddr = (Test-Connection $servernetbios -count 1).Ipv4Address
    return $ipaddr
}


text:
<?php
require_once 'directory_list.php';
require_once 'path_generator.php';

class Autoloader {
  const AUTOLOAD_METHOD = 'autoload';
  const PREPEND = '';
  const APPEND = '';

  protected static $directory_list;
  protected static $words;
  protected static $class_filename;

  final public static function unregister() {
    spl_autoload_unregister([get_called_class(), static::AUTOLOAD_METHOD]);
  }

  final public static function register() {
    static::set_directory_list();
    static::register_magic_autoload_function_if_no_others_registered();
    spl_autoload_register([get_called_class(), static::AUTOLOAD_METHOD]);
  }

  protected static function register_magic_autoload_function_if_no_others_registered() {
    // __autoload() has been deprecated as of PHP 7.2 but some older libraries might still use it
    if (!spl_autoload_functions() && function_exists('__autoload')) {
      spl_autoload_register('__autoload');
    }
  }

  public static function get_directory_list() {
    static::set_directory_list();
    return static::$directory_list;
  }

  public static function set_directory_list($directory_list = null) {
    if ($directory_list instanceof DirectoryList) {
      static::$directory_list = $directory_list;
    }
    elseif (static::$directory_list === null) {
      static::$directory_list = new DirectoryList;
    }
  }

  protected static function autoload($class_name) {
    $namespaces = preg_split('/\\\\/', $class_name, -1, PREG_SPLIT_NO_EMPTY);
    $class_name = array_pop($namespaces);
    static::$words = static::split_class_name_into_words($class_name);

    if (static::validate()) {
      static::process_words();
      static::adjust();

      $class_filename = static::get_class_filename($namespaces);
      if ($class_filename !== false) {
        require_once $class_filename;
      }
    }
  }

  protected static function validate() {
    return true;
  }

  protected static function process_words() {
    static::$words = array_map('strtolower', static::$words);
    static::$class_filename = static::PREPEND . implode('_', static::$words) . static::APPEND . '.php';
  }

  protected static function adjust() {
  }

  protected static function split_class_name_into_words($class_name) {
    $pattern = <<<REGEX
/
  (?=[A-Z] (?=[^A-Z\d]))
| (?<=[^A-Z\d]) (?=[A-Z\d])
| (?<=\d) (?=[A-Z])
| (?<=[^\d]) (?=\d)
| _
/x
REGEX;
    return preg_split($pattern, $class_name, null, PREG_SPLIT_NO_EMPTY);
  }

  protected static function get_class_filename($namespaces) {
    $directory_list = static::get_namespaced_directory_list($namespaces);
    $path_generator = new PathGenerator;
    $path_generator->set_base_directories($directory_list);
    $path_generator->set_words(static::$words);
    $path_generator->set_filename(static::$class_filename);
    return $path_generator->get_first_existing_filename();
  }

  protected static function get_namespaced_directory_list($namespaces) {
    $directory_list = static::$directory_list->get_directory_list();
    $namespace_path = strtolower(implode('/', $namespaces));
    if ($namespace_path) {
      $namespace_path = '/' . $namespace_path;
    }
    $directory_list = array_map(function($directory) use ($namespace_path) { return $directory . $namespace_path; }, $directory_list);
    return $directory_list;
  }
}


text:
<?php

namespace Tymon\JWTAuth\Test;

use Mockery;
use Tymon\JWTAuth\Middleware\GetUserFromToken;
use Tymon\JWTAuth\Exceptions\TokenExpiredException;
use Tymon\JWTAuth\Exceptions\TokenInvalidException;

class GetUserFromTokenTest extends \PHPUnit_Framework_TestCase
{
    public function setUp()
    {
        $this->events = Mockery::mock('Illuminate\Contracts\Events\Dispatcher');
        $this->auth = Mockery::mock('Tymon\JWTAuth\JWTAuth');

        $this->request = Mockery::mock('Illuminate\Http\Request');
        $this->response = Mockery::mock('Illuminate\Contracts\Routing\ResponseFactory');

        $this->middleware = new GetUserFromToken($this->response, $this->events, $this->auth);

        $this->auth->shouldReceive('setRequest')->once()->with($this->request)->andReturn($this->auth);
    }

    public function tearDown()
    {
        Mockery::close();
    }

    /** @test */
    public function it_should_fire_an_event_when_no_token_is_available()
    {
        $this->auth->shouldReceive('getToken')->once()->andReturn(false);

        $this->events->shouldReceive('fire')->once()->with('tymon.jwt.absent', [], true);
        $this->response->shouldReceive('json')->with(['error' => 'token_not_provided'], 400);

        $this->middleware->handle($this->request, function () {
        });
    }

    /** @test */
    public function it_should_fire_an_event_when_the_token_has_expired()
    {
        $exception = new TokenExpiredException;

        $this->auth->shouldReceive('getToken')->once()->andReturn('foo');
        $this->auth->shouldReceive('authenticate')->once()->with('foo')->andThrow($exception);

        $this->events->shouldReceive('fire')->once()->with('tymon.jwt.expired', [$exception], true);
        $this->response->shouldReceive('json')->with(['error' => 'token_expired'], 401);

        $this->middleware->handle($this->request, function () {
        });
    }

    /** @test */
    public function it_should_fire_an_event_when_the_token_is_invalid()
    {
        $exception = new TokenInvalidException;

        $this->auth->shouldReceive('getToken')->once()->andReturn('foo');
        $this->auth->shouldReceive('authenticate')->once()->with('foo')->andThrow($exception);

        $this->events->shouldReceive('fire')->once()->with('tymon.jwt.invalid', [$exception], true);
        $this->response->shouldReceive('json')->with(['error' => 'token_invalid'], 400);

        $this->middleware->handle($this->request, function () {
        });
    }

    /** @test */
    public function it_should_fire_an_event_when_no_user_is_found()
    {
        $this->auth->shouldReceive('getToken')->once()->andReturn('foo');
        $this->auth->shouldReceive('authenticate')->once()->with('foo')->andReturn(false);

        $this->events->shouldReceive('fire')->once()->with('tymon.jwt.user_not_found', [], true);
        $this->response->shouldReceive('json')->with(['error' => 'user_not_found'], 404);

        $this->middleware->handle($this->request, function () {
        });
    }

    /** @test */
    public function it_should_fire_an_event_when_the_token_has_been_decoded_and_user_is_found()
    {
        $user = (object) ['id' => 1];

        $this->auth->shouldReceive('getToken')->once()->andReturn('foo');
        $this->auth->shouldReceive('authenticate')->once()->with('foo')->andReturn($user);

        $this->events->shouldReceive('fire')->once()->with('tymon.jwt.valid', $user);
        $this->response->shouldReceive('json')->never();

        $this->middleware->handle($this->request, function () {
        });
    }
}


text:
<?php

/**
 * dinMenuItemAdmin module configuration
 *
 * @package     dinMenuPlugin
 * @subpackage  modules.dinMenuItemAdmin.lib
 * @author      Nicolay N. Zyk <relo.san@gmail.com>
 */
class dinMenuItemAdminGeneratorConfiguration extends BaseDinMenuItemAdminGeneratorConfiguration
{
} // dinMenuItemAdminGeneratorConfiguration

//EOF


text:
from __future__ import absolute_import

from .experience_replay import ExperienceReplay


text:
export default function negativeArray(array) {
	if (!Array.isArray(array)) {
		throw new TypeError('Expected an array');
	}

	return new Proxy(array, {
		get(target, name, receiver) {
			if (typeof name !== 'string') {
				return Reflect.get(target, name, receiver);
			}

			const index = Number(name);

			if (Number.isNaN(index)) {
				return Reflect.get(target, name, receiver);
			}

			return target[index < 0 ? target.length + index : index];
		},
		set(target, name, value, receiver) {
			if (typeof name !== 'string') {
				return Reflect.set(target, name, value, receiver);
			}

			const index = Number(name);

			if (Number.isNaN(index)) {
				return Reflect.set(target, name, value, receiver);
			}

			target[index < 0 ? target.length + index : index] = value;

			return true;
		},
	});
}


text:
	<meta charset="utf-8">
	<title><?php echo $title; ?></title>

	<?php

			function integerToRoman($integer)
		{
		 // Convert the integer into an integer (just to make sure)
		 $integer = intval($integer);
		 $result = '';

		 // Create a lookup array that contains all of the Roman numerals.
		 $lookup = array('M' => 1000,
		 'CM' => 900,
		 'D' => 500,
		 'CD' => 400,
		 'C' => 100,
		 'XC' => 90,
		 'L' => 50,
		 'XL' => 40,
		 'X' => 10,
		 'IX' => 9,
		 'V' => 5,
		 'IV' => 4,
		 'I' => 1);

		 foreach($lookup as $roman => $value){
		  // Determine the number of matches
		  $matches = intval($integer/$value);

		  // Add the same number of characters to the string
		  $result .= str_repeat($roman,$matches);

		  // Set the integer to be the remainder of the integer and the value
		  $integer = $integer % $value;
		 }

		 // The Roman numeral should be built, return it
		 return $result;
		}

$students = array_unique($students, SORT_REGULAR);

global $userid;
$userid = $principal[0]->userid;

$certificateNo1 = array();
  foreach($staffadmin as $staffadmin2) {
	    	$data = $this->db->select('id')->from('tblcertificate')->like('certificate_username', substr($staffadmin2, 0, strrpos($staffadmin2, ' ')))->where('userid', $userid)->get()->result();
	    	// echo $this->db->last_query();
	    	$data = json_decode(json_encode($data), true);

	    	foreach ($data as $value) {
	    		foreach ($value as $value) {
	    			 $certificateNo1[] = $value;
	    		}

	    	}
	    }

$certificateNo2 = array();
 $students2 = array_column($students, 'student_name');

  foreach($students2 as $students2) {
	    	$data2 = $this->db->select('id')->from('tblcertificate')->like('certificate_username', substr($students2, 0, strrpos($students2, ' ')))->where('userid', $userid)->get()->result();
	    	// echo $this->db->last_query(); echo "
";
	    	$data2 = json_decode(json_encode($data2), true);

	    	foreach ($data2 as $value) {
	    		foreach ($value as $value) {
	    			 $certificateNo2[] = $value;
	    		}

	    	}
	    }
		if (!empty($principal)) {

			$i=0;
			foreach($principal as $certificate) {

		// if (!empty($school_certificates)) {

	    // $i=0;
	    // foreach($school_certificates as $certificate) {
// 		if ($certificate->certificate_username !="") {
// 		    echo "

//
" . $certificate->certificate_username ."

//
". $certificate->certificate_schoolname."

//
Certificate No: "."GSPAudit/2019/".$certificate->id."

//

";
// 		}
	  }
	}
// $string = strtoupper($certificate->certificate_schoolname.', '.getdistrictById($students[0]['district']).', '.getStateById($students[0]['state']));
$string = strtoupper($certificate->school_name.', '.$certificate->district_name.', '.$certificate->state_name);
$school = '';
 if(strlen($string)<=70){
 	 $school = ''.$string.'';
 }else{
 	 $school = ''.$string.'';
 }

	if (!empty($principal)) {
	    $i=0;
	    foreach($principal as $principal) {

		if ($principal->principle_name !="") {
		    echo "

" . strtoupper($principal->principle_name) ."

".$school."

Certificate No: "."GSPAudit/2021/".($certificate->id-1)."

";
		}
	  }
	}

	if (!empty($coname)) {
	    $i=0;
	    foreach($coname as $coname) {

		if ($coname->coname !="") {
		    echo "

" . strtoupper($coname->coname) ."

".$school."

Certificate No: "."GSPAudit/2021/".($certificate->id-2)."

";
		}
	  }
	}

	if (!empty($staffadmin)) {
	    $i=0;
	    foreach($staffadmin as $staffadmin) {

		if ($staffadmin !="") {
		   echo "

" . strtoupper($staffadmin)  ."

".$school."

Certificate No: "."GSPAudit/2021/".$certificateNo1[$i++]."

";
		}
	  }
	}

	if (!empty($students)) {
	    $i=0;
	    foreach($students as $students) {

		if ($students !="") {
		   echo "

" . strtoupper($students['student_name'])  . '      CLASS '. integerToRoman($students['grade'])  ."

".$school."

Certificate No: "."GSPAudit/2021/".$certificateNo2[$i++]."

";
		}
	  }
	}

// 	if (!empty($staffadmin)) {
// 	    for ($i = 0; $i < count($staffadmin); $i++) {
// 		if ($staffadmin != '') {
// 		    echo "

" . $staffadmin[$i]['teacher'] . "

" .  $staffadmin[$i]['school'] . "

";
// 		}
// 	    }
// 	}

/*	if (!empty($principal)) {
	    for ($i = 0; $i < count($principal); $i++) {
		if ($principal != '') {
		    echo "

" . $principal[$i]['name'] . "

" .  $principal[$i]['schoolname'] . "

";
		}
	    }
	}*/

	?>


text:
namespace {

const char kFirstRunTabs[] = "first_run_tabs";

base::LazyInstance<installer::InitialPreferences>::DestructorAtExit
    g_initial_preferences = LAZY_INSTANCE_INITIALIZER;

std::vector<std::string> GetNamedList(const char* name,
                                      const base::DictionaryValue* prefs) {
  std::vector<std::string> list;
  if (!prefs)
    return list;

  const base::ListValue* value_list = nullptr;
  if (!prefs->GetList(name, &value_list))
    return list;

  list.reserve(value_list->GetListDeprecated().size());
  for (const base::Value& entry : value_list->GetListDeprecated()) {
    if (!entry.is_string()) {
      NOTREACHED();
      break;
    }
    list.push_back(entry.GetString());
  }
  return list;
}

base::DictionaryValue* ParseDistributionPreferences(
    const std::string& json_data) {
  JSONStringValueDeserializer json(json_data);
  std::string error;
  std::unique_ptr<base::Value> root(json.Deserialize(nullptr, &error));
  if (!root.get()) {
    LOG(WARNING) << "Failed to parse initial prefs file: " << error;
    return nullptr;
  }
  if (!root->is_dict()) {
    LOG(WARNING) << "Failed to parse initial prefs file: "
                 << "Root item must be a dictionary.";
    return nullptr;
  }
  return static_cast<base::DictionaryValue*>(root.release());
}

}  // namespace

namespace installer {

InitialPreferences::InitialPreferences() {
  InitializeFromCommandLine(*base::CommandLine::ForCurrentProcess());
}

InitialPreferences::InitialPreferences(const base::CommandLine& cmd_line) {
  InitializeFromCommandLine(cmd_line);
}

InitialPreferences::InitialPreferences(const base::FilePath& prefs_path) {
  InitializeFromFilePath(prefs_path);
}

InitialPreferences::InitialPreferences(const std::string& prefs) {
  InitializeFromString(prefs);
}

InitialPreferences::InitialPreferences(const base::DictionaryValue& prefs)
    : initial_dictionary_(prefs.CreateDeepCopy()) {
  // Cache a pointer to the distribution dictionary.
  initial_dictionary_->GetDictionary(
      installer::initial_preferences::kDistroDict, &distribution_);

  EnforceLegacyPreferences();
}

InitialPreferences::~InitialPreferences() = default;

void InitialPreferences::InitializeFromCommandLine(
    const base::CommandLine& cmd_line) {
#if BUILDFLAG(IS_WIN)
  if (cmd_line.HasSwitch(installer::switches::kInstallerData)) {
    base::FilePath prefs_path(
        cmd_line.GetSwitchValuePath(installer::switches::kInstallerData));
    InitializeFromFilePath(prefs_path);
  } else {
    initial_dictionary_ = std::make_unique<base::DictionaryValue>();
  }

  DCHECK(initial_dictionary_.get());

  // A simple map from command line switches to equivalent switches in the
  // distribution dictionary.  Currently all switches added will be set to
  // 'true'.
  static const struct CmdLineSwitchToDistributionSwitch {
    const char* cmd_line_switch;
    const char* distribution_switch;
  } translate_switches[] = {
      {installer::switches::kAllowDowngrade,
       installer::initial_preferences::kAllowDowngrade},
      {installer::switches::kDisableLogging,
       installer::initial_preferences::kDisableLogging},
      {installer::switches::kMsi, installer::initial_preferences::kMsi},
      {installer::switches::kDoNotRegisterForUpdateLaunch,
       installer::initial_preferences::kDoNotRegisterForUpdateLaunch},
      {installer::switches::kDoNotLaunchChrome,
       installer::initial_preferences::kDoNotLaunchChrome},
      {installer::switches::kMakeChromeDefault,
       installer::initial_preferences::kMakeChromeDefault},
      {installer::switches::kSystemLevel,
       installer::initial_preferences::kSystemLevel},
      {installer::switches::kVerboseLogging,
       installer::initial_preferences::kVerboseLogging},
  };

  std::string name(installer::initial_preferences::kDistroDict);
  for (size_t i = 0; i < std::size(translate_switches); ++i) {
    if (cmd_line.HasSwitch(translate_switches[i].cmd_line_switch)) {
      name.assign(installer::initial_preferences::kDistroDict);
      name.append(".").append(translate_switches[i].distribution_switch);
      initial_dictionary_->SetBoolean(name, true);
    }
  }

  // See if the log file path was specified on the command line.
  std::wstring str_value(
      cmd_line.GetSwitchValueNative(installer::switches::kLogFile));
  if (!str_value.empty()) {
    name.assign(installer::initial_preferences::kDistroDict);
    name.append(".").append(installer::initial_preferences::kLogFile);
    initial_dictionary_->SetString(name, base::WideToUTF8(str_value));
  }

  // Handle the special case of --system-level being implied by the presence of
  // the kGoogleUpdateIsMachineEnvVar environment variable.
  std::unique_ptr<base::Environment> env(base::Environment::Create());
  if (env) {
    std::string is_machine_var;
    env->GetVar(env_vars::kGoogleUpdateIsMachineEnvVar, &is_machine_var);
    if (is_machine_var == "1") {
      VLOG(1) << "Taking system-level from environment.";
      name.assign(installer::initial_preferences::kDistroDict);
      name.append(".").append(installer::initial_preferences::kSystemLevel);
      initial_dictionary_->SetBoolean(name, true);
    }
  }

  // Cache a pointer to the distribution dictionary. Ignore errors if any.
  initial_dictionary_->GetDictionary(
      installer::initial_preferences::kDistroDict, &distribution_);
#endif
}

void InitialPreferences::InitializeFromFilePath(
    const base::FilePath& prefs_path) {
  std::string json_data;
  // Failure to read the file is ignored as |json_data| will be the empty string
  // and the remainder of this InitialPreferences object should still be
  // initialized as best as possible.
  if (base::PathExists(prefs_path) &&
      !base::ReadFileToString(prefs_path, &json_data)) {
    LOG(ERROR) << "Failed to read preferences from " << prefs_path.value();
  }
  if (InitializeFromString(json_data))
    preferences_read_from_file_ = true;
}

bool InitialPreferences::InitializeFromString(const std::string& json_data) {
  if (!json_data.empty())
    initial_dictionary_.reset(ParseDistributionPreferences(json_data));

  bool data_is_valid = true;
  if (!initial_dictionary_.get()) {
    initial_dictionary_ = std::make_unique<base::DictionaryValue>();
    data_is_valid = false;
  } else {
    // Cache a pointer to the distribution dictionary.
    initial_dictionary_->GetDictionary(
        installer::initial_preferences::kDistroDict, &distribution_);
  }

  EnforceLegacyPreferences();
  return data_is_valid;
}

void InitialPreferences::EnforceLegacyPreferences() {
  // Boolean. This is a legacy preference and should no longer be used; it is
  // kept around so that old master_preferences which specify
  // "create_all_shortcuts":false still enforce the new
  // "do_not_create_(desktop|quick_launch)_shortcut" preferences. Setting this
  // to true no longer has any impact.
  static constexpr char kCreateAllShortcuts[] = "create_all_shortcuts";

  // If create_all_shortcuts was explicitly set to false, set
  // do_not_create_(desktop|quick_launch)_shortcut to true.
  bool create_all_shortcuts = true;
  GetBool(kCreateAllShortcuts, &create_all_shortcuts);
  if (!create_all_shortcuts) {
    distribution_->SetBoolean(
        installer::initial_preferences::kDoNotCreateDesktopShortcut, true);
    distribution_->SetBoolean(
        installer::initial_preferences::kDoNotCreateQuickLaunchShortcut, true);
  }

  // Deprecated boolean import initial preferences now mapped to their
  // duplicates in prefs::.
  static constexpr char kDistroImportHistoryPref[] = "import_history";
  static constexpr char kDistroImportHomePagePref[] = "import_home_page";
  static constexpr char kDistroImportSearchPref[] = "import_search_engine";
  static constexpr char kDistroImportBookmarksPref[] = "import_bookmarks";

  static constexpr struct {
    const char* old_distro_pref_path;
    const char* modern_pref_path;
  } kLegacyDistroImportPrefMappings[] = {
      {kDistroImportBookmarksPref, prefs::kImportBookmarks},
      {kDistroImportHistoryPref, prefs::kImportHistory},
      {kDistroImportHomePagePref, prefs::kImportHomepage},
      {kDistroImportSearchPref, prefs::kImportSearchEngine},
  };

  for (const auto& mapping : kLegacyDistroImportPrefMappings) {
    bool value = false;
    if (GetBool(mapping.old_distro_pref_path, &value))
      initial_dictionary_->SetBoolean(mapping.modern_pref_path, value);
  }

#if BUILDFLAG(ENABLE_RLZ)
  // Map the RLZ ping delay shipped in the distribution dictionary into real
  // prefs.
  static constexpr char kDistroPingDelay[] = "ping_delay";
  int rlz_ping_delay = 0;
  if (GetInt(kDistroPingDelay, &rlz_ping_delay))
    initial_dictionary_->SetInteger(prefs::kRlzPingDelaySeconds,
                                    rlz_ping_delay);
#endif  // BUILDFLAG(ENABLE_RLZ)
}

bool InitialPreferences::GetBool(const std::string& name, bool* value) const {
  if (!distribution_)
    return false;
  if (absl::optional<bool> v = distribution_->FindBoolPath(name)) {
    *value = *v;
    return true;
  }
  return false;
}

bool InitialPreferences::GetInt(const std::string& name, int* value) const {
  bool ret = false;
  if (distribution_)
    ret = distribution_->GetInteger(name, value);
  return ret;
}

bool InitialPreferences::GetString(const std::string& name,
                                   std::string* value) const {
  bool ret = false;
  if (distribution_)
    ret = (distribution_->GetString(name, value) && !value->empty());
  return ret;
}

bool InitialPreferences::GetPath(const std::string& name,
                                 base::FilePath* value) const {
  std::string string_value;
  if (!GetString(name, &string_value))
    return false;
  *value = base::FilePath::FromUTF8Unsafe(string_value);
  return true;
}

std::vector<std::string> InitialPreferences::GetFirstRunTabs() const {
  return GetNamedList(kFirstRunTabs, initial_dictionary_.get());
}

bool InitialPreferences::GetExtensionsBlock(
    base::DictionaryValue** extensions) const {
  return initial_dictionary_->GetDictionary(
      initial_preferences::kExtensionsBlock, extensions);
}

std::string InitialPreferences::GetCompressedVariationsSeed() const {
  return ExtractPrefString(variations::prefs::kVariationsCompressedSeed);
}

std::string InitialPreferences::GetVariationsSeedSignature() const {
  return ExtractPrefString(variations::prefs::kVariationsSeedSignature);
}

std::string InitialPreferences::ExtractPrefString(
    const std::string& name) const {
  std::string result;
  absl::optional<base::Value> pref_value =
      initial_dictionary_->ExtractKey(name);
  if (pref_value.has_value()) {
    if (pref_value->is_string())
      result = pref_value->GetString();
    else
      NOTREACHED();
  }
  return result;
}

// static
const InitialPreferences& InitialPreferences::ForCurrentProcess() {
  return g_initial_preferences.Get();
}

}  // namespace installer


text:
<!DOCTYPE html>

    <title>Type Definitions  Reference</title>
    <link rel='stylesheet' type='text/css' href='css/jazzy.css' />
    <link rel='stylesheet' type='text/css' href='css/highlight.css' />
    <meta charset='utf-8'>

          VPKit Docs

         (54% documented)

            View on GitHub

      VPKit Reference

      Type Definitions  Reference

            Classes

                VPKApp

                VPKColorStyles

                VPKDevice

                VPKEnvironment

                VPKFontStyles

                VPKImage

                VPKPlayerItem

                VPKPlaylist

                VPKPreview

                VPKPublicVeep

                VPKSdk

                VPKStyles

                VPKUser

                VPKVeepViewer

                VPKit

            Constants

                VPKEventVideoComplete

                VPKEventVideoFramesPerSecondKey

                VPKEventVideoLoad

                VPKEventVideoNumberOfDroppedVideoFrames

                VPKEventVideoObservedBitrateKey

                VPKEventVideoPause

                VPKEventVideoPlay

                VPKEventVideoPlayRequested

                VPKEventVideoPlaybackBitrateKey

                VPKEventVideoPlaybackTypeKey

                VPKEventVideoSeekComplete

                VPKEventVideoSeekStart

                VPKEventVideoStartupTimeKey

                VPKEventVideoUnload

                VPKIdentifierKey

                vpkErrorKey

                vpkErrorNotification

                vpkPresentErrorKey

            Enumerations

                VPKEnvironmentType

                VPKServerEnvironment

                VPKUserType

            Protocols

                VPKAdHandler

                VPKMediaIdentifier

                VPKPreviewDelegate

                VPKPreviewPassThroughDelegate

                VPKVeepViewerDelegate

            Type Definitions

                VPKBOOLErrorBlock

                VPKCompetitiveStatsBlock

                VPKDailyStatsBlock

                VPKNetworkResponseBlock

                VPKUserStatsErrorBlock

                VPKVeepIdentifierErrorCompletionBlock

                VPKitConsumerIdCompletionBlock

                VPKitPublicVeepErrorCompletionBlock

                VPKitVeepErrorCompletionBlock

Type Definitions

The following type definitions are available globally.

                    VPKNetworkResponseBlock

Undocumented

Declaration

Objective-C

typedef void (^VPKNetworkResponseBlock)(BOOL success, NSInteger responseCode, NSError* _Nullable error)

                          Show on GitHub

                    VPKBOOLErrorBlock

Undocumented

Declaration

Objective-C

typedef void (^VPKBOOLErrorBlock)(BOOL success, NSError* _Nullable error)

                          Show on GitHub

                    VPKitConsumerIdCompletionBlock

Undocumented

Declaration

Objective-C

typedef void (^VPKitConsumerIdCompletionBlock)(NSString* consumerId)

                          Show on GitHub

                    VPKitPublicVeepErrorCompletionBlock

Undocumented

Declaration

Objective-C

typedef void (^VPKitPublicVeepErrorCompletionBlock)(  VPKPublicVeep* _Nullable veep
                                                    , NSError* _Nullable error)

                          Show on GitHub

                    VPKitVeepErrorCompletionBlock

Undocumented

Declaration

Objective-C

typedef void (^VPKitVeepErrorCompletionBlock)(  VPKVeep* _Nullable veep
                                                    , NSError* _Nullable error)

                          Show on GitHub

                    VPKVeepIdentifierErrorCompletionBlock

Undocumented

Declaration

Objective-C

typedef void (^VPKVeepIdentifierErrorCompletionBlock)(  NSString* _Nullable identifier
                                              , NSError* _Nullable error)

                          Show on GitHub

                    VPKUserStatsErrorBlock

Undocumented

Declaration

Objective-C

typedef void (^VPKUserStatsErrorBlock)(  VPKUserStats* _Nullable userStats
                                                    , NSError* _Nullable error)

                          Show on GitHub

                    VPKCompetitiveStatsBlock

Undocumented

Declaration

Objective-C

typedef void (^VPKCompetitiveStatsBlock)(VPKCompetitiveStats* _Nullable stats,  NSError* _Nullable  error)

                          Show on GitHub

                    VPKDailyStatsBlock

Undocumented

Declaration

Objective-C

typedef void (^VPKDailyStatsBlock)(VPKDailyStats* _Nullable stats, NSError* _Nullable error)

                          Show on GitHub

© 2021 Veepio. All rights reserved.

Generated by jazzy ♪♫ v0.9.1, a Realm project.


text:
# Test file for the Vester module - https://github.com/WahlNetwork/Vester
# Called via Invoke-Pester VesterTemplate.Tests.ps1

# Test title, e.g. 'DNS Servers'
$Title = 'VDS MTU Size'

# Test description: How New-VesterConfig explains this value to the user
$Description = 'Set the MTU size for the VDS'

# The config entry stating the desired values
$Desired = $cfg.vds.mtu

# The test value's data type, to help with conversion: bool/string/int
$Type = 'int'

# The command(s) to pull the actual value for comparison
# $Object will scope to the folder this test is in (Cluster, Host, etc.)
[ScriptBlock]$Actual = {
    $Object.MTU
}

# The command(s) to match the environment to the config
# Use $Object to help filter, and $Desired to set the correct value
[ScriptBlock]$Fix = {
    Set-VDSwitch $Object -LinkDiscoveryProtocol $Desired -Confirm:$FALSE -ErrorAction Stop
}


text:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />

	<title>Virtual Reality Map Maker</title>

    <link href="css/bootstrap.min.css" rel="stylesheet"/>
    <link href="css/style.css" rel="stylesheet"/>

Virtual Reality  Map Maker


text:
/*
 *    GeoTools - The Open Source Java GIS Toolkit
 *    http://geotools.org
 *
 *    (C) 2008, Open Source Geospatial Foundation (OSGeo)
 *
 *    This library is free software; you can redistribute it and/or
 *    modify it under the terms of the GNU Lesser General Public
 *    License as published by the Free Software Foundation;
 *    version 2.1 of the License.
 *
 *    This library is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *    Lesser General Public License for more details.
 */
package org.geotools.temporal.object;

import org.geotools.util.Utilities;
import org.opengis.temporal.IndeterminateValue;
import org.opengis.temporal.OrdinalEra;
import org.opengis.temporal.OrdinalPosition;
import org.opengis.temporal.TemporalReferenceSystem;

/**
 * A data type that shall be used for identifying temporal position within an ordinal
 * temporal reference system.
 *
 * @author Mehdi Sidhoum (Geomatys)
 *
 *
 *
 * @source $URL$
 */
public class DefaultOrdinalPosition extends DefaultTemporalPosition implements OrdinalPosition {

    /**
     * This is a reference to the ordinal era in which the instant occurs.
     */
    private OrdinalEra ordinalPosition;

    public DefaultOrdinalPosition(TemporalReferenceSystem frame, IndeterminateValue indeterminatePosition, OrdinalEra ordinalPosition) {
        super(frame, indeterminatePosition);
        this.ordinalPosition = ordinalPosition;
    }

    /**
     * Provides a reference to the ordinal era in which the instant occurs.
     *
     * @todo The method name doesn't match the return type.
     */
    public OrdinalEra getOrdinalPosition() {
        return ordinalPosition;
    }

    public void setOrdinalPosition(OrdinalEra ordinalPosition) {
        this.ordinalPosition = ordinalPosition;
    }

    @Override
    public boolean equals(final Object object) {
        if (object == this) {
            return true;
        }
        if (object instanceof DefaultOrdinalPosition && super.equals(object)) {
            final DefaultOrdinalPosition that = (DefaultOrdinalPosition) object;

            return Utilities.equals(this.ordinalPosition, that.ordinalPosition);
        }
        return false;
    }

    @Override
    public int hashCode() {
        int hash = 5;
        hash = 37 * hash + (this.ordinalPosition != null ? this.ordinalPosition.hashCode() : 0);
        return hash;
    }

    @Override
    public String toString() {
        StringBuilder s = new StringBuilder("OrdinalPosition:").append('\n');
        if (ordinalPosition != null) {
            s.append("ordinalPosition:").append(ordinalPosition).append('\n');
        }
        return s.toString();
    }
}


text:
{-# LANGUAGE DeriveDataTypeable #-}
module HStyle.Main
    ( mainWith
    ) where

import Control.Applicative ((<$>))
import Control.Monad (when)
import System.Directory (doesDirectoryExist, getDirectoryContents)
import System.Exit (ExitCode (..), exitWith)
import System.FilePath (takeExtension, (</>))

import qualified Data.Text.IO as T
import System.Console.CmdArgs

import HStyle.Block
import HStyle.Parse
import HStyle.Rule

-- | CmdArgs-enabled data-type
data HStyle = HStyle
    { fix   :: Bool
    , quiet :: Bool
    , files :: [FilePath]
    } deriving (Show, Data, Typeable)

-- | CmdArgs configuration
hstyle :: HStyle
hstyle = HStyle
    { fix   = def &= help "Automatically fix (some) problems"
    , quiet = def &= help "Print less output"
    , files = def &= args
    }

-- | Convert CmdArgs configuration to cleaner datatype
toOptions :: HStyle -> Options
toOptions hs = Options
    { optionsFix   = fix hs
    , optionsQuiet = quiet hs
    }

-- | Recursively list the contents of a directory. Only returns regular files.
getFiles :: FilePath -> IO [FilePath]
getFiles path = do
    isDir <- doesDirectoryExist path
    if not isDir
        then return [path]
        else do
            contents <- filter proper <$> getDirectoryContents path
            concat <$> mapM (getFiles . (path </>)) contents
  where
    proper = not . (`elem` [".", ".."])

-- | Is a file haskell?
isCheckable :: FilePath -> Bool
isCheckable fp = case takeExtension fp of
    ".hs" -> True
    _     -> False

-- | Customizable main function
mainWith :: [Rule] -> IO ()
mainWith rules = do
    config <- cmdArgs hstyle
    -- Expand all files
    files' <- filter isCheckable . concat <$> mapM getFiles (files config)
    ok <- all fileOk <$> mapM (checkStyle rules $ toOptions config) files'
    exitWith $ if ok then ExitSuccess else ExitFailure 1

checkStyle :: [Rule] -> Options -> FilePath -> IO FileState
checkStyle rules options file = do
    text <- T.readFile file
    case parseModule (Just file) text of
        Left err          -> error err
        Right (md, block) -> do
            let fs           = FileState file md block False True
                fm           = mapM_ runRule rules
                (_, fs', ts) = runFileM fm options fs

            mapM_ T.putStrLn ts
            when (fileUpdated fs') $ T.writeFile file $ toText $ fileBlock fs'
            return fs'


text:
import * as DOM from 'vs/base/browser/dom';
import { Codicon, CSSIcon } from 'vs/base/common/codicons';
import { localize } from 'vs/nls';
import { FoldingController } from 'vs/workbench/contrib/notebook/browser/controller/foldingController';
import { CellEditState, CellFoldingState, INotebookEditor } from 'vs/workbench/contrib/notebook/browser/notebookBrowser';
import { CellContentPart } from 'vs/workbench/contrib/notebook/browser/view/cellPart';
import { MarkupCellViewModel } from 'vs/workbench/contrib/notebook/browser/viewModel/markupCellViewModel';

export class FoldedCellHint extends CellContentPart {

	constructor(
		private readonly _notebookEditor: INotebookEditor,
		private readonly _container: HTMLElement,
	) {
		super();
	}

	override didRenderCell(element: MarkupCellViewModel): void {
		this.update(element);
	}

	private update(element: MarkupCellViewModel) {
		if (!this._notebookEditor.hasModel()) {
			return;
		}

		if (element.isInputCollapsed || element.getEditState() === CellEditState.Editing) {
			DOM.hide(this._container);
		} else if (element.foldingState === CellFoldingState.Collapsed) {
			const idx = this._notebookEditor._getViewModel().getCellIndex(element);
			const length = this._notebookEditor._getViewModel().getFoldedLength(idx);
			DOM.reset(this._container, this.getHiddenCellsLabel(length), this.getHiddenCellHintButton(element));
			DOM.show(this._container);

			const foldHintTop = element.layoutInfo.previewHeight;
			this._container.style.top = `${foldHintTop}px`;
		} else {
			DOM.hide(this._container);
		}
	}

	private getHiddenCellsLabel(num: number): HTMLElement {
		const label = num === 1 ?
			localize('hiddenCellsLabel', "1 cell hidden") :
			localize('hiddenCellsLabelPlural', "{0} cells hidden", num);

		return DOM.$('span.notebook-folded-hint-label', undefined, label);
	}

	private getHiddenCellHintButton(element: MarkupCellViewModel): HTMLElement {
		const expandIcon = DOM.$('span.cell-expand-part-button');
		expandIcon.classList.add(...CSSIcon.asClassNameArray(Codicon.more));
		this._register(DOM.addDisposableListener(expandIcon, DOM.EventType.CLICK, () => {
			const controller = this._notebookEditor.getContribution<FoldingController>(FoldingController.id);
			const idx = this._notebookEditor.getCellIndex(element);
			if (typeof idx === 'number') {
				controller.setFoldingStateDown(idx, CellFoldingState.Expanded, 1);
			}
		}));

		return expandIcon;
	}

	override updateInternalLayoutNow(element: MarkupCellViewModel) {
		this.update(element);
	}
}


text:
// ======================================================================== //
// Copyright 2009-2016 Intel Corporation                                    //
//                                                                          //
// Licensed under the Apache License, Version 2.0 (the "License");          //
// you may not use this file except in compliance with the License.         //
// You may obtain a copy of the License at                                  //
//                                                                          //
//     http://www.apache.org/licenses/LICENSE-2.0                           //
//                                                                          //
// Unless required by applicable law or agreed to in writing, software      //
// distributed under the License is distributed on an "AS IS" BASIS,        //
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. //
// See the License for the specific language governing permissions and      //
// limitations under the License.                                           //
// ======================================================================== //

// ospray
#include "ospray/mpi/MPILoadBalancer.h"
#include "ospray/render/Renderer.h"
#include "ospray/fb/LocalFB.h"
#include "ospray/mpi/DistributedFrameBuffer.h"
#include "ospray/common/tasking/parallel_for.h"

#include <algorithm>

namespace ospray {
  namespace mpi {

    // for profiling
    extern "C" void async_beginFrame();
    extern "C" void async_endFrame();

    using std::cout;
    using std::endl;

    namespace staticLoadBalancer {

      float Master::renderFrame(Renderer *tiledRenderer,
                                FrameBuffer *fb,
                                const uint32 channelFlags)
      {
        async_beginFrame();
        DistributedFrameBuffer *dfb = dynamic_cast<DistributedFrameBuffer*>(fb);
        assert(dfb);

        dfb->startNewFrame();
        /* the client will do its magic here, and the distributed
           frame buffer will be writing tiles here, without us doing
           anything ourselves */
        dfb->waitUntilFinished();

        async_endFrame();

        return dfb->endFrame(0.f);
      }

      std::string Master::toString() const
      {
        return "ospray::mpi::staticLoadBalancer::Master";
      }

      float Slave::renderFrame(Renderer *tiledRenderer,
                               FrameBuffer *fb,
                               const uint32 channelFlags)
      {
        async_beginFrame();

        auto *dfb = dynamic_cast<DistributedFrameBuffer*>(fb);
        dfb->startNewFrame();

        void *perFrameData = tiledRenderer->beginFrame(fb);

        int numTiles_x = divRoundUp(fb->size.x,TILE_SIZE);
        int numTiles_y = divRoundUp(fb->size.y,TILE_SIZE);

        const int NTASKS = numTiles_x * numTiles_y;
        parallel_for(NTASKS, [&](int taskIndex){
          const size_t tileID = taskIndex;
          if ((tileID % worker.size) != worker.rank) return;

          const size_t tile_y = tileID / numTiles_x;
          const size_t tile_x = tileID - tile_y*numTiles_x;
          const vec2i tileId(tile_x, tile_y);
          const int32 accumID = fb->accumID(tileID);

#if TILE_SIZE>128
          Tile *tilePtr = new Tile(tileId, fb->size, accumID);
          Tile &tile = *tilePtr;
#else
          Tile __aligned(64) tile(tileId, fb->size, accumID);
#endif

          parallel_for(numJobs(tiledRenderer->spp, accumID), [&](int taskIndex){
            tiledRenderer->renderTile(perFrameData, tile, taskIndex);
          });

          fb->setTile(tile);
#if TILE_SIZE>128
          delete tilePtr;
#endif
        });

        dfb->waitUntilFinished();
        tiledRenderer->endFrame(perFrameData,channelFlags);

        async_endFrame();

        return dfb->endFrame(0.f);
      }

      std::string Slave::toString() const
      {
        return "ospray::mpi::staticLoadBalancer::Slave";
      }

    }// ::ospray::mpi::staticLoadBalancer
  } // ::ospray::mpi
} // ::ospray


text:
package net.hydromatic.optiq.runtime;

import net.hydromatic.linq4j.Enumerable;

import net.hydromatic.optiq.DataContext;

/**
 * Statement that can be bound to a {@link DataContext} and then executed.
 *
 * @param <T> Element type of the resulting enumerable
 */
public interface Bindable<T> {
  /**
   * Executes this statement and returns an enumerable which will yield rows.
   * The {@code environment} parameter provides the values in the root of the
   * environment (usually schemas).
   *
   * @param dataContext Environment that provides tables
   * @return Enumerable over rows
   */
  Enumerable<T> bind(DataContext dataContext);
}

// End Bindable.java


text:
date: 2011-06-12 22:05:32+00:00
layout: post
image:
  thumbnail: /images/blog/10022_salut-gilles.jpg
slug: f1-con-amigos-gp-de-canada
title: F1 con amigos (GP de Canadá)
categories: day-by-day
---

[![GP de Canadá con los amigos](/images/blog/10022_salut-gilles.jpg)](/images/blog/10022_salut-gilles.jpg)

Una de las ventajas de tener la F1 a las 19.00 de la tarde es que puedes quedar fácil para verla con amigos. Y compartir las aficiones, es una gran forma de <del>perder</del> disfrutar tu tiempo.


text:
package org.onosproject.store.service;

import org.onosproject.store.primitives.DistributedPrimitiveBuilder;

/**
 * Builder for {@link DocumentTree}.
 */
public abstract class DocumentTreeBuilder<V>
        extends DistributedPrimitiveBuilder<DocumentTreeBuilder<V>, AsyncDocumentTree<V>> {

    private boolean purgeOnUninstall = false;

    public DocumentTreeBuilder() {
        super(DistributedPrimitive.Type.DOCUMENT_TREE);
    }

    /**
     * Clears document tree contents when the owning application is uninstalled.
     *
     * @return this builder
     */
    public DocumentTreeBuilder<V> withPurgeOnUninstall() {
        purgeOnUninstall = true;
        return this;
    }

    /**
     * Return if document tree entries need to be cleared when owning application is uninstalled.
     *
     * @return true if items are to be cleared on uninstall
     */
    public boolean purgeOnUninstall() {
        return purgeOnUninstall;
    }

    /**
     * Builds the distributed Document tree based on the configuration options supplied
     * to this builder.
     *
     * @return new distributed document tree
     * @throws java.lang.RuntimeException if a mandatory parameter is missing
     */
    public abstract AsyncDocumentTree<V> buildDocumentTree();
}


text:
local default_battery_symbol='\u25b6'
local default_danger_color='%{\e[31m%}'
local default_alert_color='%{\e[33m%}'
local default_safe_color='%{\e[32m%}'
local default_full_color='%{\e[35m%}'

# Script variables
local battery_symbol="${BATTERY_SYMBOL:-$default_battery_symbol}"
local danger_color="${DANGER_COLOR:-$default_danger_color}"
local alert_color="${ALERT_COLOR:-$default_alert_color}"
local safe_color="${SAFE_COLOR:-$default_safe_color}"
local full_color="${full_color:-$default_full_color}"

#####################################################

#####################################################
# 							HELPER FUNCTIONS										#
#####################################################

# Returns one string repetition of battery_symbol according to level
print_battery_icons() {
	local level=$1
  local output=$(printf "${battery_symbol}%.0s" {1..${level}})
	echo "${output// /*}"
}

# Decides which color to use
display_color() {
	if [ "$1" -lt 2 ]; then
		echo $danger_color
	elif [ "$1" -lt 4 ]; then
		echo $alert_color
	elif [ "$1" -lt 5 ]; then
		echo $safe_color
	else
		echo $full_color
	fi
}

# get battery level (0-5) according to acpi
get_level() {
	local battery_percentage=$(acpi | grep -o "[0-9]*%" | grep -o "[0-9]*")
  local battery_step=25
  local level=$(($battery_percentage / $battery_step + 1))

  if [ "$level" -lt 1 ]; then
    eval $level=1
  fi

  echo "$level"
}

# Reset color to default
color_reset() {
	echo "%{\e[m%}"
}

# export battery status in RPROMPT
reset_battery_status() {
	local battery_level=$(get_level)
	export RPROMPT="$(display_color $battery_level)$(print_battery_icons $battery_level)$(color_reset)"
}

# binds the export to recalculate battery level after each command
preexec() {
	reset_battery_status
}
#####################################################

#####################################################
# 								EXECUTION													#
#####################################################
reset_battery_status


text:
package iso20022

// Information related to an identification, eg, party identification or account identification.
type GenericIdentification3 struct {

	// Name or number assigned by an entity to enable recognition of that entity, eg, account identifier.
	Identification *Max35Text `xml:"Id"`

	// Entity that assigns the identification.
	Issuer *Max35Text `xml:"Issr,omitempty"`
}

func (g *GenericIdentification3) SetIdentification(value string) {
	g.Identification = (*Max35Text)(&value)
}

func (g *GenericIdentification3) SetIssuer(value string) {
	g.Issuer = (*Max35Text)(&value)
}


text:
package org.apereo.portal.groups;

import org.apereo.portal.spring.locator.EntityTypesLocator;

/**
 * Reference implementation for IEntityStore.
 *
 * @author Dan Ellentuck
 */
public class RDBMEntityStore implements IEntityStore {
    private static IEntityStore singleton;

    /** RDBMEntityStore constructor. */
    public RDBMEntityStore() {
        super();
    }

    /**
     * @return org.apereo.portal.groups.IEntity
     * @param key java.lang.String
     * @param type java.lang.Class
     */
    public IEntity newInstance(String key, Class type) throws GroupsException {
        if (EntityTypesLocator.getEntityTypes().getEntityIDFromType(type) == null) {
            throw new GroupsException("Invalid group type: " + type);
        }
        return new EntityImpl(key, type);
    }
    /** @return org.apereo.portal.groups.IEntityStore */
    public static synchronized IEntityStore singleton() {
        if (singleton == null) {
            singleton = new RDBMEntityStore();
        }
        return singleton;
    }
}


text:
"""Provide tests for mysensors notify platform."""
from __future__ import annotations

from collections.abc import Callable
from unittest.mock import MagicMock, call

from mysensors.sensor import Sensor

from homeassistant.components.notify import DOMAIN as NOTIFY_DOMAIN
from homeassistant.core import HomeAssistant

from tests.common import MockConfigEntry

async def test_text_type(
    hass: HomeAssistant,
    text_node: Sensor,
    transport_write: MagicMock,
    integration: MockConfigEntry,
) -> None:
    """Test a text type child."""
    # Test without target.
    await hass.services.async_call(
        NOTIFY_DOMAIN, "mysensors", {"message": "Hello World"}, blocking=True
    )

    assert transport_write.call_count == 1
    assert transport_write.call_args == call("1;1;1;0;47;Hello World\n")

    # Test with target.
    await hass.services.async_call(
        NOTIFY_DOMAIN,
        "mysensors",
        {"message": "Hello", "target": "Text Node 1 1"},
        blocking=True,
    )

    assert transport_write.call_count == 2
    assert transport_write.call_args == call("1;1;1;0;47;Hello\n")

    transport_write.reset_mock()

    # Test a message longer than 25 characters.
    await hass.services.async_call(
        NOTIFY_DOMAIN,
        "mysensors",
        {
            "message": "This is a long message that will be split",
            "target": "Text Node 1 1",
        },
        blocking=True,
    )

    assert transport_write.call_count == 2
    assert transport_write.call_args_list == [
        call("1;1;1;0;47;This is a long message th\n"),
        call("1;1;1;0;47;at will be split\n"),
    ]

async def test_text_type_discovery(
    hass: HomeAssistant,
    text_node: Sensor,
    transport_write: MagicMock,
    receive_message: Callable[[str], None],
) -> None:
    """Test text type discovery."""
    receive_message("1;2;0;0;36;\n")
    receive_message("1;2;1;0;47;test\n")
    receive_message("1;2;1;0;47;test2\n")  # Test that more than one set message works.
    await hass.async_block_till_done()

    # Test targeting the discovered child.
    await hass.services.async_call(
        NOTIFY_DOMAIN,
        "mysensors",
        {"message": "Hello", "target": "Text Node 1 2"},
        blocking=True,
    )

    assert transport_write.call_count == 1
    assert transport_write.call_args == call("1;2;1;0;47;Hello\n")

    transport_write.reset_mock()

    # Test targeting all notify children.
    await hass.services.async_call(
        NOTIFY_DOMAIN, "mysensors", {"message": "Hello World"}, blocking=True
    )

    assert transport_write.call_count == 2
    assert transport_write.call_args_list == [
        call("1;1;1;0;47;Hello World\n"),
        call("1;2;1;0;47;Hello World\n"),
    ]


text:
define(['exports'], function (exports) { 'use strict';

  function broken() {
    console.log('broken');
  }

  exports.broken = broken;

});


text:
package com.tectonica.jonix.onix2;

import com.tectonica.jonix.common.JPU;
import com.tectonica.jonix.common.OnixElement;
import com.tectonica.jonix.common.codelist.Languages;
import com.tectonica.jonix.common.codelist.RecordSourceTypes;
import com.tectonica.jonix.common.codelist.TextCaseFlags;
import com.tectonica.jonix.common.codelist.TextFormats;
import com.tectonica.jonix.common.codelist.TransliterationSchemes;

import java.io.Serializable;

/*
 * NOTE: THIS IS AN AUTO-GENERATED FILE, DO NOT EDIT MANUALLY
 */

/**
 *
Record source identifier

 *

 * An identifier for the party which issued the record, from the scheme specified in <RecordSourceIdentifierType>.
 * Optional and non-repeating, but <RecordSourceIdentifierType> must also be present if this field is present.
 *

 *

 *

 * Format
 * Defined by the identifier scheme specified in <RecordSourceIdentifierType>
 *

 *

 * Reference name
 * <tt><RecordSourceIdentifier></tt>
 *

 *

 * Short tag
 * <tt><a196></tt>
 *

 *

 *

 * This tag may be included in the following composites:
 *

 *
<{@link Product}>

 *
<{@link SubSeriesRecord}>

 *
<{@link MainSeriesRecord}>

 *

 *

 * Possible placements within ONIX message:
 *

 *
{@link ONIXMessage} ⯈ {@link Product} ⯈ {@link RecordSourceIdentifier}

 *
{@link ONIXMessage} ⯈ {@link SubSeriesRecord} ⯈ {@link RecordSourceIdentifier}

 *
{@link ONIXMessage} ⯈ {@link MainSeriesRecord} ⯈ {@link RecordSourceIdentifier}

 *

 */
public class RecordSourceIdentifier implements OnixElement<String>, Serializable {
    private static final long serialVersionUID = 1L;

    public static final String refname = "RecordSourceIdentifier";
    public static final String shortname = "a196";

    /////////////////////////////////////////////////////////////////////////////////
    // ATTRIBUTES
    /////////////////////////////////////////////////////////////////////////////////

    public TextFormats textformat;

    public TextCaseFlags textcase;

    public Languages language;

    public TransliterationSchemes transliteration;

    /**
     * (type: DateOrDateTime)
     */
    public String datestamp;

    public RecordSourceTypes sourcetype;

    public String sourcename;

    /////////////////////////////////////////////////////////////////////////////////
    // VALUE MEMBER
    /////////////////////////////////////////////////////////////////////////////////

    /**
     * This is the raw content of RecordSourceIdentifier. Could be null if {@code exists() == false}. Use
     * {@link #value()} instead if you want to get this as an {@link java.util.Optional}.
     *

     * Raw Format: Defined by the identifier scheme specified in <RecordSourceIdentifierType>
     *

     * (type: NonEmptyString)
     */
    public String value;

    /**
     * Internal API, use the {@link #value()} method or the {@link #value} field instead
     */
    @Override
    public String _value() {
        return value;
    }

    /////////////////////////////////////////////////////////////////////////////////
    // SERVICES
    /////////////////////////////////////////////////////////////////////////////////

    private final boolean exists;
    public static final RecordSourceIdentifier EMPTY = new RecordSourceIdentifier();

    public RecordSourceIdentifier() {
        exists = false;
    }

    public RecordSourceIdentifier(org.w3c.dom.Element element) {
        exists = true;
        textformat = TextFormats.byCode(JPU.getAttribute(element, "textformat"));
        textcase = TextCaseFlags.byCode(JPU.getAttribute(element, "textcase"));
        language = Languages.byCode(JPU.getAttribute(element, "language"));
        transliteration = TransliterationSchemes.byCode(JPU.getAttribute(element, "transliteration"));
        datestamp = JPU.getAttribute(element, "datestamp");
        sourcetype = RecordSourceTypes.byCode(JPU.getAttribute(element, "sourcetype"));
        sourcename = JPU.getAttribute(element, "sourcename");

        value = JPU.getContentAsString(element);
    }

    /**
     * @return whether this tag (<RecordSourceIdentifier> or <a196>) is explicitly provided in the ONIX XML
     */
    @Override
    public boolean exists() {
        return exists;
    }
}


text:
"""added posts

Revision ID: 58404d0b7e55
Revises: 38144bf8e233
Create Date: 2015-08-04 15:59:34.695963

"""

# revision identifiers, used by Alembic.
revision = '58404d0b7e55'
down_revision = '38144bf8e233'

from alembic import op
import sqlalchemy as sa

def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_table('posts',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('body', sa.Text(), nullable=True),
    sa.Column('timestamp', sa.DateTime(), nullable=True),
    sa.Column('author_id', sa.Integer(), nullable=True),
    sa.ForeignKeyConstraint(['author_id'], ['users.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_posts_timestamp'), 'posts', ['timestamp'], unique=False)
    ### end Alembic commands ###

def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_posts_timestamp'), table_name='posts')
    op.drop_table('posts')
    ### end Alembic commands ###


text:
<?xml version="1.0" encoding="UTF-8"?>
<billStatus>
  <bill>
    <subjects>
      <billSubjects>
        <policyArea>
          <name>Congress</name>
        </policyArea>
        <legislativeSubjects>
          <item>
            <name>Congressional operations and organization</name>
          </item>
        </legislativeSubjects>
      </billSubjects>
    </subjects>
    <amendments />
    <recordedVotes />
    <sponsors>
      <item>
        <firstName>PETE</firstName>
        <fullName>Rep. Sessions, Pete [R-TX-32]</fullName>
        <state>TX</state>
        <identifiers>
          <lisID>1525</lisID>
          <gpoId>8188</gpoId>
          <bioguideId>S000250</bioguideId>
        </identifiers>
        <middleName />
        <lastName>SESSIONS</lastName>
        <district>32</district>
        <bioguideId>S000250</bioguideId>
        <byRequestType />
        <party>R</party>
      </item>
      <item>
        <firstName>PETE</firstName>
        <fullName>Rep. Sessions, Pete [R-TX-32]</fullName>
        <state>TX</state>
        <identifiers>
          <lisID>1525</lisID>
          <gpoId>8188</gpoId>
          <bioguideId>S000250</bioguideId>
        </identifiers>
        <middleName />
        <lastName>SESSIONS</lastName>
        <district>32</district>
        <bioguideId>S000250</bioguideId>
        <byRequestType />
        <party>R</party>
      </item>
    </sponsors>
    <createDate>2015-01-07T09:38:03Z</createDate>
    <updateDate>2017-02-14T20:05:58Z</updateDate>
    <billType>HCONRES</billType>
    <cboCostEstimates />
    <calendarNumbers />
    <notes />
    <committeeReports />
    <constitutionalAuthorityStatementText />
    <introducedDate>2015-01-06</introducedDate>
    <title>Regarding consent to assemble outside the seat of government.</title>
    <cosponsors />
    <summaries>
      <billSummaries>
        <item>
          <versionCode>00</versionCode>
          <text><![CDATA[
Authorizes the Speaker of the House and the Majority Leader of the Senate, or their respective designees, to notify the Members of the House and the Senate, respectively, to assemble at a place outside the District of Columbia whenever, in their opinion, the public interest shall warrant it.
]]></text>
          <actionDesc>Introduced in House</actionDesc>
          <lastSummaryUpdateDate>2015-01-16T17:59:10Z</lastSummaryUpdateDate>
          <name>Introduced in House</name>
          <actionDate>2015-01-06</actionDate>
          <updateDate>2015-01-06T05:00:00Z</updateDate>
        </item>
        <item>
          <versionCode>81</versionCode>
          <text><![CDATA[
(This measure has not been amended since it was introduced. The summary of that version is repeated here.)

Authorizes the Speaker of the House and the Majority Leader of the Senate, or their respective designees, to notify the Members of the House and the Senate, respectively, to assemble at a place outside the District of Columbia whenever, in their opinion, the public interest shall warrant it.
]]></text>
          <actionDesc>Passed House without amendment</actionDesc>
          <lastSummaryUpdateDate>2015-02-06T21:52:55Z</lastSummaryUpdateDate>
          <name>Passed House without amendment</name>
          <actionDate>2015-01-06</actionDate>
          <updateDate>2015-01-06T20:45:01Z</updateDate>
        </item>
      </billSummaries>
    </summaries>
    <originChamber>House</originChamber>
    <titles>
      <item>
        <titleType>Official Title as Introduced</titleType>
        <chamberName />
        <chamberCode />
        <parentTitleType />
        <title>Regarding consent to assemble outside the seat of government.</title>
      </item>
      <item>
        <titleType>Display Title</titleType>
        <chamberName />
        <chamberCode />
        <parentTitleType />
        <title>Regarding consent to assemble outside the seat of government.</title>
      </item>
    </titles>
    <congress>114</congress>
    <policyArea>
      <name>Congress</name>
    </policyArea>
    <committees>
      <billCommittees />
    </committees>
    <latestAction>
      <actionDate>2015-01-07</actionDate>
      <text>Received in the Senate.</text>
      <links />
    </latestAction>
    <actions>
      <actionByCounts>
        <senate>1</senate>
        <houseOfRepresentatives>6</houseOfRepresentatives>
      </actionByCounts>
      <item>
        <actionDate>2015-01-07</actionDate>
        <committee />
        <links />
        <sourceSystem>
          0
          <name>Senate</name>
        </sourceSystem>
        <text>Received in the Senate.</text>
        <type>IntroReferral</type>
      </item>
      <item>
        <committee />
        <actionDate>2015-01-06</actionDate>
        <text>Motion to reconsider laid on the table Agreed to without objection.</text>
        <actionCode>H38310</actionCode>
        <actionTime>18:33:25</actionTime>
        <sourceSystem>
          2
          <name>House floor actions</name>
        </sourceSystem>
        <links />
        <type>Floor</type>
      </item>
      <item>
        <committee />
        <actionDate>2015-01-06</actionDate>
        <text>On agreeing to the resolution Agreed to without objection. (text: CR H32)</text>
        <actionCode>H37100</actionCode>
        <actionTime>18:32:50</actionTime>
        <sourceSystem>
          2
          <name>House floor actions</name>
        </sourceSystem>
        <links>
          <link>
            <url>https://www.congress.gov/congressional-record/volume-161/house-section/page/H32</url>
            <name>H32</name>
          </link>
        </links>
        <type>Floor</type>
      </item>
      <item>
        <committee />
        <actionDate>2015-01-06</actionDate>
        <text>Passed/agreed to in House: On agreeing to the resolution Agreed to without objection.(text: CR H32)</text>
        <actionCode>8000</actionCode>
        <actionTime>18:32:50</actionTime>
        <sourceSystem>
          9
          <name>Library of Congress</name>
        </sourceSystem>
        <links>
          <link>
            <url>https://www.congress.gov/congressional-record/volume-161/house-section/page/H32</url>
            <name>H32</name>
          </link>
        </links>
        <type>Floor</type>
      </item>
      <item>
        <committee />
        <actionDate>2015-01-06</actionDate>
        <text>Considered as privileged matter. (consideration: CR H32)</text>
        <actionCode>H30000</actionCode>
        <actionTime>18:32:37</actionTime>
        <sourceSystem>
          2
          <name>House floor actions</name>
        </sourceSystem>
        <links>
          <link>
            <url>https://www.congress.gov/congressional-record/volume-161/house-section/page/H32</url>
            <name>H32</name>
          </link>
        </links>
        <type>Floor</type>
      </item>
      <item>
        <committee />
        <sourceSystem>
          9
          <name>Library of Congress</name>
        </sourceSystem>
        <text>Introduced in House</text>
        <actionCode>Intro-H</actionCode>
        <actionDate>2015-01-06</actionDate>
        <links />
        <type>IntroReferral</type>
      </item>
      <item>
        <committee />
        <sourceSystem>
          9
          <name>Library of Congress</name>
        </sourceSystem>
        <text>Introduced in House</text>
        <actionCode>1000</actionCode>
        <actionDate>2015-01-06</actionDate>
        <links />
        <type>IntroReferral</type>
      </item>
      <actionTypeCounts>
        <introducedInHouse>1</introducedInHouse>
        <passageOfAMeasure>1</passageOfAMeasure>
        <introducedInTheHouse>1</introducedInTheHouse>
        <passedAgreedToInHouse>1</passedAgreedToInHouse>
        <introducedInSenate>1</introducedInSenate>
        <considerationByHouse>1</considerationByHouse>
        <motionToReconsiderResults>1</motionToReconsiderResults>
      </actionTypeCounts>
    </actions>
    <laws />
    <relatedBills />
    <billNumber>1</billNumber>
  </bill>
  <dublinCore xmlns:dc="http://purl.org/dc/elements/1.1/">
    <dc:format>text/xml</dc:format>
    <dc:language>EN</dc:language>
    <dc:rights>Pursuant to Title 17 Section 105 of the United States Code, this file is not subject to copyright protection and is in the public domain.</dc:rights>
    <dc:contributor>Congressional Research Service, Library of Congress</dc:contributor>
    <dc:description>This file contains bill summaries and statuses for federal legislation. A bill summary describes the most significant provisions of a piece of legislation and details the effects the legislative text may have on current law and federal programs. Bill summaries are authored by the Congressional Research Service (CRS) of the Library of Congress. As stated in Public Law 91-510 (2 USC 166 (d)(6)), one of the duties of CRS is "to prepare summaries and digests of bills and resolutions of a public general nature introduced in the Senate or House of Representatives". For more information, refer to the User Guide that accompanies this file.</dc:description>
  </dublinCore>
</billStatus>