text:
module SakuraChan
  module Admin
    extend Discordrb::Commands::CommandContainer

    def self.isowner?(user)
      Config.bot_owners.include?(user)
    end

    command(:setmod) do |event, mention|
      unless Admin.isowner?(event.user)
        event.respond("You don't got the right permissions.")
        break
      end

      begin
        member = event.bot.parse_mention(mention)
        role_mod = event.server.roles.find { |role| role.name == 'Mods' }
        member.on(event.server).add_role(role_mod)
        event.respond('The user is now a mod.')
      rescue
        event.respond('The user mentioned is no member.')
      end
    end

    command(:eval, min_args: 1) do |event, *cmd|
      unless Admin.isowner?(event.user)
        event.respond('You got no permissions to do so')
        break
      end
      eval cmd.join(' ')
    end

    command(:shutdown) do |event|
      unless Admin.isowner?(event.user)
        event.respond("You're not the right user!")
        break
      end

      event.respond('Goodbye!')
      eval exit
    end

    command(:bash) do |event, *cmd|
      unless Admin.isowner?(event.user)
        event.respond('I got no permission to do so!')
        break
      end

      com = `#{"#{cmd.join(' ')} 2>&1"}`

      if com.length < 1980
        event.respond("```bash\n#{com}```")
      else
        event.respond('output too big to handle, outputting to Terminal')
        puts com
      end
    end
  end
end

redpajama_set_name: RedPajamaGithub


text:
require 'crx_unpack'
require 'tmpdir'
require 'digest/sha1'

shared_context 'Move to temporary directory' do
  before do
    @pwd = Dir.pwd
    @tmpdir = Dir.mktmpdir
    Dir.chdir(@tmpdir)
  end

  after do
    Dir.chdir(@pwd)
    FileUtils.rm_r(@tmpdir)
  end
end

def sha1hex(file)
  Digest::SHA1.hexdigest open(file).read
end

describe CrxUnpack do
  let(:crx_file) do
    File.expand_path(File.join(File.dirname(__FILE__), 'fixtures', 'extension.crx'))
  end

  let(:crx_io) do
    open(crx_file, 'rb')
  end

  let(:crx_data) do
    open(crx_file, 'rb').read
  end

  let(:fixture_files) do
    Dir.glob(File.expand_path(File.join(File.dirname(__FILE__), 'fixtures', 'extension', '*')))
  end

  describe '#unpack' do
    it 'unpacks crx data' do
      subject.unpack(crx_data)
      expect(subject.zip[0,2]).to eq("PK")
    end
  end

  describe '#unpack_from_io' do
    it 'unpacks crx data from io' do
      subject.unpack_from_io(crx_io)
      expect(subject.zip[0,2]).to eq("PK")
    end
  end

  describe '#unpack_from_file' do
    it 'unpacks crx data from file' do
      subject.unpack_from_file(crx_file)
      expect(subject.zip[0,2]).to eq("PK")
    end
  end

  describe '.unpack' do
    it 'unpacks crx data' do
      crx = described_class.unpack(crx_data)
      expect(crx.zip[0,2]).to eq("PK")
    end
  end

  describe '.unpack_from_io' do
    it 'unpacks crx data from io' do
      crx = described_class.unpack_from_io(crx_io)
      expect(crx.zip[0,2]).to eq("PK")
    end
  end

  describe '.unpack_from_file' do
    it 'unpacks crx data from file' do
      crx = described_class.unpack_from_file(crx_file)
      expect(crx.zip[0,2]).to eq("PK")
    end
  end

  describe '#unpack_contents' do
    include_context 'Move to temporary directory'

    it 'unpacks crx contents' do
      subject.unpack_contents(crx_data, 'extension')

      Dir.chdir('extension') do
        fixture_files.each do |file|
          expect(sha1hex(File.basename(file))).to eq(sha1hex(file))
        end
      end
    end
  end

  describe '#unpack_contents_from_io' do
    include_context 'Move to temporary directory'

    it 'unpacks crx contents from io' do
      subject.unpack_contents_from_io(crx_io, 'extension')

      Dir.chdir('extension') do
        fixture_files.each do |file|
          expect(sha1hex(File.basename(file))).to eq(sha1hex(file))
        end
      end
    end
  end

  describe '#unpack_contents_from_file' do
    include_context 'Move to temporary directory'

    it 'unpacks crx contents from file' do
      subject.unpack_contents_from_file(crx_file, 'extension')

      Dir.chdir('extension') do
        fixture_files.each do |file|
          expect(sha1hex(File.basename(file))).to eq(sha1hex(file))
        end
      end
    end
  end

  describe '.unpack_contents' do
    include_context 'Move to temporary directory'

    it 'unpacks crx contents' do
      described_class.unpack_contents(crx_data, 'extension')

      Dir.chdir('extension') do
        fixture_files.each do |file|
          expect(sha1hex(File.basename(file))).to eq(sha1hex(file))
        end
      end
    end
  end

  describe '.unpack_contents_from_io' do
    include_context 'Move to temporary directory'

    it 'unpacks crx contents from io' do
      described_class.unpack_contents_from_io(crx_io, 'extension')

      Dir.chdir('extension') do
        fixture_files.each do |file|
          expect(sha1hex(File.basename(file))).to eq(sha1hex(file))
        end
      end
    end
  end

  describe '.unpack_contents_from_file' do
    include_context 'Move to temporary directory'

    it 'unpacks crx contents from file' do
      described_class.unpack_contents_from_file(crx_file, 'extension')

      Dir.chdir('extension') do
        fixture_files.each do |file|
          expect(sha1hex(File.basename(file))).to eq(sha1hex(file))
        end
      end
    end
  end
end


text:
#include <linux/module.h>
#include <linux/bootmem.h>
#include <linux/mm.h>
#include <linux/pfn.h>
#include <asm/page.h>
#include <as-layout.h>
#include <init.h>
#include <kern.h>
#include <mem_user.h>
#include <os.h>

static int physmem_fd = -1;

/* Changed during early boot */
unsigned long high_physmem;
EXPORT_SYMBOL(high_physmem);

extern unsigned long long physmem_size;

int __init init_maps(unsigned long physmem, unsigned long iomem,
		     unsigned long highmem)
{
	struct page *p, *map;
	unsigned long phys_len, phys_pages, highmem_len, highmem_pages;
	unsigned long iomem_len, iomem_pages, total_len, total_pages;
	int i;

	phys_pages = physmem >> PAGE_SHIFT;
	phys_len = phys_pages * sizeof(struct page);

	iomem_pages = iomem >> PAGE_SHIFT;
	iomem_len = iomem_pages * sizeof(struct page);

	highmem_pages = highmem >> PAGE_SHIFT;
	highmem_len = highmem_pages * sizeof(struct page);

	total_pages = phys_pages + iomem_pages + highmem_pages;
	total_len = phys_len + iomem_len + highmem_len;

	map = alloc_bootmem_low_pages(total_len);
	if (map == NULL)
		return -ENOMEM;

	for (i = 0; i < total_pages; i++) {
		p = &map[i];
		memset(p, 0, sizeof(struct page));
		SetPageReserved(p);
		INIT_LIST_HEAD(&p->lru);
	}

	max_mapnr = total_pages;
	return 0;
}

void map_memory(unsigned long virt, unsigned long phys, unsigned long len,
		int r, int w, int x)
{
	__u64 offset;
	int fd, err;

	fd = phys_mapping(phys, &offset);
	err = os_map_memory((void *) virt, fd, offset, len, r, w, x);
	if (err) {
		if (err == -ENOMEM)
			printk(KERN_ERR "try increasing the host's "
			       "/proc/sys/vm/max_map_count to <physical "
			       "memory size>/4096\n");
		panic("map_memory(0x%lx, %d, 0x%llx, %ld, %d, %d, %d) failed, "
		      "err = %d\n", virt, fd, offset, len, r, w, x, err);
	}
}

extern int __syscall_stub_start;

void __init setup_physmem(unsigned long start, unsigned long reserve_end,
			  unsigned long len, unsigned long long highmem)
{
	unsigned long reserve = reserve_end - start;
	int pfn = PFN_UP(__pa(reserve_end));
	int delta = (len - reserve) >> PAGE_SHIFT;
	int err, offset, bootmap_size;

	physmem_fd = create_mem_file(len + highmem);

	offset = uml_reserved - uml_physmem;
	err = os_map_memory((void *) uml_reserved, physmem_fd, offset,
			    len - offset, 1, 1, 1);
	if (err < 0) {
		printf("setup_physmem - mapping %ld bytes of memory at 0x%p "
		       "failed - errno = %d\n", len - offset,
		       (void *) uml_reserved, err);
		exit(1);
	}

	/*
	 * Special kludge - This page will be mapped in to userspace processes
	 * from physmem_fd, so it needs to be written out there.
	 */
	os_seek_file(physmem_fd, __pa(&__syscall_stub_start));
	os_write_file(physmem_fd, &__syscall_stub_start, PAGE_SIZE);

	bootmap_size = init_bootmem(pfn, pfn + delta);
	free_bootmem(__pa(reserve_end) + bootmap_size,
		     len - bootmap_size - reserve);
}

int phys_mapping(unsigned long phys, unsigned long long *offset_out)
{
	int fd = -1;

	if (phys < physmem_size) {
		fd = physmem_fd;
		*offset_out = phys;
	}
	else if (phys < __pa(end_iomem)) {
		struct iomem_region *region = iomem_regions;

		while (region != NULL) {
			if ((phys >= region->phys) &&
			    (phys < region->phys + region->size)) {
				fd = region->fd;
				*offset_out = phys - region->phys;
				break;
			}
			region = region->next;
		}
	}
	else if (phys < __pa(end_iomem) + highmem) {
		fd = physmem_fd;
		*offset_out = phys - iomem_size;
	}

	return fd;
}

static int __init uml_mem_setup(char *line, int *add)
{
	char *retptr;
	physmem_size = memparse(line,&retptr);
	return 0;
}
__uml_setup("mem=", uml_mem_setup,
"mem=<Amount of desired ram>\n"
"    This controls how much \"physical\" memory the kernel allocates\n"
"    for the system. The size is specified as a number followed by\n"
"    one of 'k', 'K', 'm', 'M', which have the obvious meanings.\n"
"    This is not related to the amount of memory in the host.  It can\n"
"    be more, and the excess, if it's ever used, will just be swapped out.\n"
"	Example: mem=64M\n\n"
);

extern int __init parse_iomem(char *str, int *add);

__uml_setup("iomem=", parse_iomem,
"iomem=<name>,<file>\n"
"    Configure <file> as an IO memory region named <name>.\n\n"
);

/*
 * This list is constructed in parse_iomem and addresses filled in in
 * setup_iomem, both of which run during early boot.  Afterwards, it's
 * unchanged.
 */
struct iomem_region *iomem_regions;

/* Initialized in parse_iomem and unchanged thereafter */
int iomem_size;

unsigned long find_iomem(char *driver, unsigned long *len_out)
{
	struct iomem_region *region = iomem_regions;

	while (region != NULL) {
		if (!strcmp(region->driver, driver)) {
			*len_out = region->size;
			return region->virt;
		}

		region = region->next;
	}

	return 0;
}
EXPORT_SYMBOL(find_iomem);

static int setup_iomem(void)
{
	struct iomem_region *region = iomem_regions;
	unsigned long iomem_start = high_physmem + PAGE_SIZE;
	int err;

	while (region != NULL) {
		err = os_map_memory((void *) iomem_start, region->fd, 0,
				    region->size, 1, 1, 0);
		if (err)
			printk(KERN_ERR "Mapping iomem region for driver '%s' "
			       "failed, errno = %d\n", region->driver, -err);
		else {
			region->virt = iomem_start;
			region->phys = __pa(region->virt);
		}

		iomem_start += region->size + PAGE_SIZE;
		region = region->next;
	}

	return 0;
}

__initcall(setup_iomem);


text:
using System;
using TopMove.Infrastructure;

namespace TopMove.Lettings.Shared
{
    public class Withdrawal : Entity<int>
    {
        public Withdrawal(Amount amount, DateTime withDrawn, string reference, string additionalNotes = null)
        {
            Amount = amount;
            WithDrawn = withDrawn;
            Reference = reference;
            AdditionalNotes = additionalNotes ?? string.Empty;
        }

        public Guid PropertyId { get; private set; }

        public Amount Amount { get; private set; }
        public DateTime WithDrawn { get; private set; }
        public string Reference { get; private set; }
        public string AdditionalNotes { get; private set; }
    }

    public class Deposit : Entity<int>
        {
            public Deposit(Amount amount, DateTime deposited, string reference, string additionalNotes = null,
                bool isRent = true)
            {
                Amount = amount;
                Deposited = deposited;
                Reference = reference;
                AdditionalNotes = additionalNotes ?? string.Empty;
                IsRent = isRent;
            }

            public Guid PropertyId { get; private set; }

            public Amount Amount { get; private set; }
            public DateTime Deposited { get; private set; }
            public string Reference { get; private set; }

            public bool IsRent { get; set; }
            public string AdditionalNotes { get; private set; }
        }
    }


text:
package com.dysania.coolweather.gson;

import com.google.gson.annotations.SerializedName;

/**
 * Created by DysaniazzZ on 23/02/2017.
 * 天气接口返回的天气预报
 */
public class Forecast {

    public String date;

    @SerializedName("cond")
    public More more;

    @SerializedName("tmp")
    public Temperature temperature;

    public class Temperature {

        public String max;
        public String min;
    }

    public class More {

        @SerializedName("txt_d")
        public String dayInfo;
        @SerializedName("txt_n")
        public String nightInfo;
    }
}


text:
#ifndef QFONTENGINE_X11_P_H
#define QFONTENGINE_X11_P_H

//
//  W A R N I N G
//  -------------
//
// This file is not part of the Qt API.  It exists purely as an
// implementation detail.  This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include <private/qt_x11_p.h>

#include <private/qfontengine_ft_p.h>

QT_BEGIN_NAMESPACE

class QFreetypeFace;

// --------------------------------------------------------------------------

class QFontEngineMultiXLFD : public QFontEngineMulti
{
public:
    QFontEngineMultiXLFD(const QFontDef &r, const QList<int> &l, int s);
    ~QFontEngineMultiXLFD();

    void loadEngine(int at);

private:
    QList<int> encodings;
    int screen;
    QFontDef request;
};

/**
 * \internal The font engine for X Logical Font Description (XLFD) fonts, which is for X11 systems without freetype.
 */
class QFontEngineXLFD : public QFontEngine
{
public:
    QFontEngineXLFD(XFontStruct *f, const QByteArray &name, int mib);
    ~QFontEngineXLFD();

    virtual QFontEngine::FaceId faceId() const;
    QFontEngine::Properties properties() const;
    virtual void getUnscaledGlyph(glyph_t glyph, QPainterPath *path, glyph_metrics_t *metrics);
    virtual bool getSfntTableData(uint tag, uchar *buffer, uint *length) const;
    virtual int synthesized() const;

    virtual bool stringToCMap(const QChar *str, int len, QGlyphLayout *glyphs, int *nglyphs,
                      QTextEngine::ShaperFlags flags) const;
    virtual void recalcAdvances(QGlyphLayout *, QTextEngine::ShaperFlags) const;

    virtual glyph_metrics_t boundingBox(const QGlyphLayout &glyphs);
    virtual glyph_metrics_t boundingBox(glyph_t glyph);

    virtual void addOutlineToPath(qreal x, qreal y, const QGlyphLayout &glyphs, QPainterPath *path, QTextItem::RenderFlags);
    virtual QFixed ascent() const;
    virtual QFixed descent() const;
    virtual QFixed leading() const;
    virtual qreal maxCharWidth() const;
    virtual qreal minLeftBearing() const;
    virtual qreal minRightBearing() const;
    virtual QImage alphaMapForGlyph(glyph_t);

    virtual inline Type type() const
    { return QFontEngine::XLFD; }

    virtual bool canRender(const QChar *string, int len);
    virtual const char *name() const;

    inline XFontStruct *fontStruct() const
    { return _fs; }

#ifndef QT_NO_FREETYPE
    FT_Face non_locked_face() const;
    glyph_t glyphIndexToFreetypeGlyphIndex(glyph_t g) const;
#endif
    uint toUnicode(glyph_t g) const;

private:
    QBitmap bitmapForGlyphs(const QGlyphLayout &glyphs, const glyph_metrics_t &metrics, QTextItem::RenderFlags flags = 0);

    XFontStruct *_fs;
    QByteArray _name;
    QTextCodec *_codec;
    int _cmap;
    int lbearing, rbearing;
    mutable QFontEngine::FaceId face_id;
    mutable QFreetypeFace *freetype;
    mutable int synth;
};

#ifndef QT_NO_FONTCONFIG

class Q_GUI_EXPORT QFontEngineMultiFT : public QFontEngineMulti
{
public:
    QFontEngineMultiFT(QFontEngine *fe, FcPattern *firstEnginePattern, FcPattern *p, int s, const QFontDef &request);
    ~QFontEngineMultiFT();

    void loadEngine(int at);

private:
    QFontDef request;
    FcPattern *pattern;
    FcPattern *firstEnginePattern;
    FcFontSet *fontSet;
    int screen;
    int firstFontIndex; // first font in fontset
};

class Q_GUI_EXPORT QFontEngineX11FT : public QFontEngineFT
{
public:
    explicit QFontEngineX11FT(const QFontDef &fontDef) : QFontEngineFT(fontDef) {}
    explicit QFontEngineX11FT(FcPattern *pattern, const QFontDef &fd, int screen);
    ~QFontEngineX11FT();

    QFontEngine *cloneWithSize(qreal pixelSize) const;

#ifndef QT_NO_XRENDER
    int xglyph_format;
#endif

protected:
    virtual bool uploadGlyphToServer(QGlyphSet *set, uint glyphid, Glyph *g, GlyphInfo *info, int glyphDataSize) const;
    virtual unsigned long allocateServerGlyphSet();
    virtual void freeServerGlyphSet(unsigned long id);
};

#endif // QT_NO_FONTCONFIG

QT_END_NAMESPACE

#endif // QFONTENGINE_X11_P_H


text:
/**********************************************************************************
 * CloudCV Boostrap - A starter template for Node.js with OpenCV bindings.
 *                    This project lets you to quickly prototype a REST API
 *                    in a Node.js for a image processing service written in C++.
 *
 * Author: Eugene Khvedchenya <ekhvedchenya@gmail.com>
 *
 * More information:
 *  - https://cloudcv.io
 *  - http://computer-vision-talks.com
 *
 **********************************************************************************/

var assert = require("assert")
var fs     = require('fs');
var inspect = require('util').inspect;

var cloudcv = require("../cloudcv.js");

describe('cv', function() {

    describe('analyzeImage', function() {

        it('process (File)', function(done) {
            cloudcv.analyzeImage("test/data/opencv-logo.jpg", function(error, result) {

                //console.log(inspect(error));
                //console.log(inspect(result));

                assert.notStrictEqual(result, undefined);
                assert.equal(4, result.dominantColors.length);
                done();
            });
        });

        it('process (Buffer)', function(done) {
            var imageData = fs.readFileSync("test/data/opencv-logo.jpg");

            cloudcv.analyzeImage(imageData, function(error, result) {
                //console.log(error, result);

                assert.notStrictEqual(result, undefined);
                assert.equal(4, result.dominantColors.length);
                done();
            });
        });

    });
});


text:
<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class OrangTua extends CI_Controller {

	 public function __construct()
       {
            parent::__construct();
            //$this->load->library('PHPExcel');
            $this->load->library('PHPExcel/IOFactory');
            if($this->session->userdata('login')!='TRUE'){
           	redirect('auth');
           };
            $this->load->helper(array('form', 'url'));
            $this->load->model('student_model');
            $this->load->model('school_model');
            $this->load->model('auth_model');
        	$this->load->model('orangtua_model');
	        $this->load->model('KonselingIndividu_model');

       }

	public function index()
	{
		$data=array(
			'title'=>'sistem bimbingan konsultasi sekolah',
			'data'=>$this->orangtua_model->show()
		);
		$this->load->view('dashboard/orangtua/index',$data);
	}

	public function data(){
		$id=$this->uri->segment(3);
		$data=array(
		'title'=>'sistem bimbingan konsultasi sekolah',
		'data'=> $this->KonselingIndividu_model->data($id)
		);
		// print_r($data);
		// die();
		$this->load->view('dashboard/orangtua/data_anak',$data);
	}

	public function add()
	{
		$data=array(
		'title'=>'sistem bimbingan konsultasi sekolah',
		'list_student'=>$this->student_model->show()
		);
		// print_r($data);
		// die();
		$this->load->view('dashboard/orangtua/add',$data);

	}

	public function register()
	{
		/* upload part */
		// $config['upload_path'] ='./public/upload/';
  //       $config['allowed_types'] = 'gif|jpg|png';
  //       $config['overwrite'] = TRUE;
  //       $config['file_name']=date('Ymdhms').".jpg";
  //       $this->load->library('upload', $config);
  //       if ( ! $this->upload->do_upload('photo'))
  //       {
  //           $error = $this->upload->display_errors();
  //           $this->session->set_flashdata('error',$error);
  //           redirect('student');
  //       }
  //       else
  //       {
  //           $path="public/upload/".$config['file_name'];
  //       }

        /* get all data*/
        $data_post = $this->input->post();

      	/* test is password is note simillar */
        if($data_post['password']!==$data_post['password2']){
        	$error ="password tidak sama, silahkan ulangi lagi";
            $this->session->set_flashdata('error',$error);
            redirect('orangtua');
        };

        $data_ortu=array(
        'username'=>$data_post['nik'],
        'level'=>2,
        'password'=>md5($data_post['password'])
        );

        $data=array(
        	'nik'=>$data_post['nik'],
		    'nama_ortu'=>$data_post['nama'],
		    'id_student'=>$data_post['id_student'],
		    'tempat_lahir'=>$data_post['tempat_lahir'],
		    'tanggal_lahir'=>$data_post['tanggal_lahir'],
		    'telp'=>$data_post['hp'],
		    'alamat_rumah'=>$data_post['alamat_rumah'],
		    'status'=>0
        );
        //print_r($data_ortu);
        $query=$this->orangtua_model->register($data);
        $query_user=$this->auth_model->register($data_ortu);

        if($query && $query_user){
    	 	$success ="data telah berhasil ditambahkan";
            $this->session->set_flashdata('success',$success);
            redirect('orangtua');
        }
	}

	public function edit()
	{
		$id=$this->uri->segment(3);
		$query=$this->orangtua_model->edit($id);
		$data=array(
			'title'=>'sistem bimbingan konsultasi sekolah',
			'data'=>$query,
			'list_student'=>$this->student_model->show()
		);
		$this->load->view('dashboard/orangtua/edit',$data);

	}

	public function update()
	{
		/* upload part */

		/* get all data*/
        $data_post = $this->input->post();
        //print_r($data_post);
        //die();
        $id=$data_post['id_orangtua'];
		// $config['upload_path'] ='./public/upload/';
  //       $config['allowed_types'] = 'gif|jpg|png';
  //       $config['overwrite'] = TRUE;
  //       $config['file_name']=date('Ymdhms').".jpg";
  //       $this->load->library('upload', $config);
  //       if ( ! $this->upload->do_upload('photo'))
  //       {
  //          $path=$data_post['old_photo'];
  //       }
  //       else
  //       {
  //       	unlink($data_post['old_photo']);
  //           $path="public/upload/".$config['file_name'];
  //       }

        $data=array(
      	'nama_ortu'=>$data_post['nama'],
		    'id_student'=>$data_post['id_student'],
		    'tempat_lahir'=>$data_post['tempat_lahir'],
		    'tanggal_lahir'=>$data_post['tanggal_lahir'],
		    'telp'=>$data_post['hp'],
		    'alamat_rumah'=>$data_post['alamat_rumah']
		    );

         // print_r($data);
         // die();

        $query=$this->orangtua_model->update($data,$id);
        if($query){
    	 	$success ="data telah berhasil diubah";
            $this->session->set_flashdata('success',$success);
            redirect('orangtua');
        }else{
        	$error ="data gagal diubah";
            $this->session->set_flashdata('error',$error);
            redirect('orangtua');
        }
	}

	public function delete()
	{
		$id=$this->uri->segment(3);
		$username=$this->uri->segment(4);
		$query=$this->orangtua_model->delete($id,$username);
		if($query){
			$success ="data telah berhasil dihapus";
            $this->session->set_flashdata('success',$success);
            redirect('orangtua');
		}else{
			$error ="data telah gagal dibahpus";
            $this->session->set_flashdata('error',$error);
            redirect('orangtua');
		}

	}

  public function restore()
  {
    $id=$this->uri->segment(3);
    $username=$this->uri->segment(4);
    $query=$this->orangtua_model->restore($id,$username);
    if($query){
      $success ="data telah berhasil direstore";
            $this->session->set_flashdata('success',$success);
            redirect('orangtua');
    }else{
      $error ="data telah gagal direstore";
            $this->session->set_flashdata('error',$error);
            redirect('orangtua');
    }

  }

}

/* End of file Parent.php */
/* Location: ./application/controllers/Parent.php */


text:
package gobblin.example.wikipedia;

import gobblin.configuration.ConfigurationKeys;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.Queue;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.google.common.base.Splitter;
import com.google.common.io.Closer;
import com.google.gson.Gson;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;

import gobblin.configuration.WorkUnitState;
import gobblin.source.extractor.DataRecordException;
import gobblin.source.extractor.Extractor;
import gobblin.source.workunit.WorkUnit;

/**
 * An implementation of {@link Extractor} for the Wikipedia example.
 *
 * <p>
 *   This extractor uses the MediaWiki web API to retrieve a certain number of latest revisions
 *   for each specified title from Wikipedia. Each revision is returned as a JSON document.
 * </p>
 *
 * @author ziliu
 */
public class WikipediaExtractor implements Extractor<String, JsonElement>{

  private static final Logger LOG = LoggerFactory.getLogger(WikipediaExtractor.class);

  private static final String SOURCE_PAGE_TITLES = "source.page.titles";
  private static final String SOURCE_REVISIONS_CNT = "source.revisions.cnt";
  private static final String WIKIPEDIA_API_ROOTURL = "wikipedia.api.rooturl";
  private static final String WIKIPEDIA_AVRO_SCHEMA = "wikipedia.avro.schema";

  private static final String JSON_MEMBER_QUERY = "query";
  private static final String JSON_MEMBER_PAGES = "pages";
  private static final String JSON_MEMBER_REVISIONS = "revisions";
  private static final String JSON_MEMBER_PAGEID = "pageid";
  private static final String JSON_MEMBER_TITLE = "title";

  private static final Splitter SPLITTER = Splitter.on(",").omitEmptyStrings().trimResults();

  private static final Gson GSON = new Gson();

  private final WikiResponseReader reader;
  private final int revisionsCnt;
  private final String rootUrl;
  private final String schema;
  private final Queue<String> requestedTitles;
  private final int numRequestedTitles;
  private Queue<JsonElement> recordsOfCurrentTitle;

  private class WikiResponseReader implements Iterator<JsonElement> {

    @Override
    public boolean hasNext() {
      if (!recordsOfCurrentTitle.isEmpty()) {
        return true;
      } else if (requestedTitles.isEmpty()) {
        return false;
      } else {

        /*
         * Retrieve revisions for the next title. Repeat until we find a title that has at least one revision,
         * otherwise return false
         */
        while (!requestedTitles.isEmpty()) {
          String currentTitle = requestedTitles.poll();
          try {
            recordsOfCurrentTitle =
                retrievePageRevisions(currentTitle);
          } catch (IOException e) {
            LOG.error("IOException while retrieving revisions for title '" + currentTitle + "'");
          }
          if (!recordsOfCurrentTitle.isEmpty()) {
            return true;
          }
        }
        return false;
      }
    }

    @Override
    public JsonElement next() {
      if (!hasNext()) {
        return null;
      }
      return WikipediaExtractor.this.recordsOfCurrentTitle.poll();
    }

    @Override
    public void remove() {
      throw new UnsupportedOperationException();
    }
  }

  public WikipediaExtractor(WorkUnitState workUnitState) throws IOException {
    WorkUnit workUnit = workUnitState.getWorkunit();
    rootUrl = workUnit.getProp(WIKIPEDIA_API_ROOTURL);
    schema = workUnit.getProp(WIKIPEDIA_AVRO_SCHEMA);
    requestedTitles = new LinkedList<String>(SPLITTER.splitToList(workUnit.getProp(SOURCE_PAGE_TITLES)));
    revisionsCnt = Integer.parseInt(workUnit.getProp(SOURCE_REVISIONS_CNT));
    numRequestedTitles = requestedTitles.size();

    if (requestedTitles.isEmpty()) {
      recordsOfCurrentTitle = new LinkedList<JsonElement>();
    } else {
      String firstTitle = requestedTitles.poll();
      recordsOfCurrentTitle = retrievePageRevisions(firstTitle);
    }

    this.reader = new WikiResponseReader();
  }

  private Queue<JsonElement> retrievePageRevisions(String pageTitle) throws IOException {
    Queue<JsonElement> retrievedRevisions = new LinkedList<JsonElement>();

    Closer closer = Closer.create();
    HttpURLConnection conn = null;
    StringBuilder sb = new StringBuilder();
    String urlStr = rootUrl + "&titles=" + pageTitle
        + "&rvlimit=" + revisionsCnt;
    try {
      URL url = new URL(urlStr);
      conn = (HttpURLConnection) url.openConnection();
      BufferedReader br = closer.register(
          new BufferedReader(new InputStreamReader(conn.getInputStream(), ConfigurationKeys.DEFAULT_CHARSET_ENCODING)));
      String line;
      while ((line = br.readLine()) != null) {
        sb.append(line + "\n");
      }
    } catch (Throwable t) {
      throw closer.rethrow(t);
    } finally {
      try {
        closer.close();
      } catch (IOException e) {
        LOG.error("IOException in Closer.close() while retrieving revisions for title '" + pageTitle
            + "' from URL '" + urlStr + "'");
      }
      if (conn != null) {
        conn.disconnect();
      }
    }

    JsonElement jsonElement = GSON.fromJson(sb.toString(), JsonElement.class);

    if (!jsonElement.isJsonObject()) {
      return retrievedRevisions;
    }

    JsonObject jsonObj = jsonElement.getAsJsonObject();
    if (jsonObj == null || !jsonObj.has(JSON_MEMBER_QUERY)) {
      return retrievedRevisions;
    }

    JsonObject queryObj = jsonObj.getAsJsonObject(JSON_MEMBER_QUERY);
    if (!queryObj.has(JSON_MEMBER_PAGES)) {
      return retrievedRevisions;
    }

    JsonObject pagesObj = queryObj.getAsJsonObject(JSON_MEMBER_PAGES);
    if (pagesObj.entrySet().isEmpty()) {
      return retrievedRevisions;
    }

    JsonObject pageIdObj = pagesObj.getAsJsonObject(pagesObj.entrySet().iterator().next().getKey());
    if (!pageIdObj.has(JSON_MEMBER_REVISIONS)) {
      return retrievedRevisions;
    }

    //retrieve revisions of the current pageTitle
    JsonArray jsonArr = pageIdObj.getAsJsonArray(JSON_MEMBER_REVISIONS);
    for (JsonElement revElement : jsonArr) {
      JsonObject revObj = revElement.getAsJsonObject();

      /*'pageid' and 'title' are associated with the parent object
       * of all revisions. Add them to each individual revision.
       */
      if (pageIdObj.has(JSON_MEMBER_PAGEID)) {
        revObj.add(JSON_MEMBER_PAGEID, pageIdObj.get(JSON_MEMBER_PAGEID));
      }
      if (pageIdObj.has(JSON_MEMBER_TITLE)) {
        revObj.add(JSON_MEMBER_TITLE, pageIdObj.get(JSON_MEMBER_TITLE));
      }
      retrievedRevisions.add((JsonElement) revObj);
    }

    LOG.info(retrievedRevisions.size() + " record(s) retrieved for title " + pageTitle);
    return retrievedRevisions;
  }

  @Override
  public void close() throws IOException {
    // There's nothing to close
  }

  @Override
  public String getSchema() {
    return schema;
  }

  @Override
  public JsonElement readRecord(@Deprecated JsonElement reuse) throws DataRecordException, IOException {
    if (this.reader == null) {
      return null;
    }
    if (this.reader.hasNext()) {
      return this.reader.next();
    }
    return null;
  }

  @Override
  public long getExpectedRecordCount() {
    return numRequestedTitles * this.revisionsCnt;
  }

  @Override
  public long getHighWatermark() {
    return 0;
  }

}


text:
namespace silica
{
    using Models;
    using System.Threading;
    using System.Threading.Tasks;

    /// <summary>
    /// Extension methods for GetSystemApi.
    /// </summary>
    public static partial class GetSystemApiExtensions
    {
            /// <summary>
            /// API Heartbeat Monitoring
            /// </summary>
            /// <remarks>
            /// Endpoint used for Heartbeat Monitoring. Monitoring will use this endpoint
            /// to check if the API is up and available.
            /// </remarks>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='aPIKey'>
            /// Client API Key
            /// </param>
            public static void PingApi(this IGetSystemApi operations, string aPIKey)
            {
                operations.PingApiAsync(aPIKey).GetAwaiter().GetResult();
            }

            /// <summary>
            /// API Heartbeat Monitoring
            /// </summary>
            /// <remarks>
            /// Endpoint used for Heartbeat Monitoring. Monitoring will use this endpoint
            /// to check if the API is up and available.
            /// </remarks>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='aPIKey'>
            /// Client API Key
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task PingApiAsync(this IGetSystemApi operations, string aPIKey, CancellationToken cancellationToken = default(CancellationToken))
            {
                (await operations.PingApiWithHttpMessagesAsync(aPIKey, null, cancellationToken).ConfigureAwait(false)).Dispose();
            }

    }
}


text:
package com.digitalpetri.opcua.stack.core.security;

import javax.crypto.Cipher;
import javax.crypto.Mac;
import java.security.MessageDigest;
import java.security.Signature;

import com.digitalpetri.opcua.stack.core.StatusCodes;
import com.digitalpetri.opcua.stack.core.UaException;

public enum SecurityAlgorithm {

    None("", ""),

    /**
     * Symmetric Signature; transformation to be used with {@link Mac#getInstance(String)}.
     */
    HmacSha1("http://www.w3.org/2000/09/xmldsig#hmac-sha1", "HmacSHA1"),

    /**
     * Symmetric Signature; transformation to be used with {@link Mac#getInstance(String)}.
     */
    HmacSha256("http://www.w3.org/2000/09/xmldsig#hmac-sha256", "HmacSHA256"),

    /**
     * Symmetric Encryption; transformation to be used with {@link Cipher#getInstance(String)}.
     */
    Aes128("http://www.w3.org/2001/04/xmlenc#aes128-cbc", "AES/CBC/NoPadding"),

    /**
     * Symmetric Encryption; transformation to be used with {@link Cipher#getInstance(String)}.
     */
    Aes256("http://www.w3.org/2001/04/xmlenc#aes256-cbc", "AES/CBC/NoPadding"),

    /**
     * Asymmetric Signature; transformation to be used with {@link Signature#getInstance(String)}.
     */
    RsaSha1("http://www.w3.org/2000/09/xmldsig#rsa-sha1", "SHA1withRSA"),

    /**
     * Asymmetric Signature; transformation to be used with {@link Signature#getInstance(String)}.
     */
    RsaSha256("http://www.w3.org/2000/09/xmldsig#rsa-sha256", "SHA256withRSA"),

    /**
     * Asymmetric Encryption; transformation to be used with {@link Cipher#getInstance(String)}.
     */
    Rsa15("http://www.w3.org/2001/04/xmlenc#rsa-1_5", "RSA/ECB/PKCS1Padding"),

    /**
     * Asymmetric Encryption; transformation to be used with {@link Cipher#getInstance(String)}.
     */
    RsaOaep("http://www.w3.org/2001/04/xmlenc#rsa-oaep", "RSA/ECB/OAEPWithSHA-1AndMGF1Padding"),

    /**
     * Asymmetric Key Wrap
     */
    KwRsa15("http://www.w3.org/2001/04/xmlenc#rsa-1_5", ""),

    /**
     * Asymmetric Key Wrap
     */
    KwRsaOaep("http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p", ""),

    /**
     * Key Derivation
     */
    PSha1("http://docs.oasis-open.org/ws-sx/ws-secureconversation/200512/dk/p_sha1", ""),

    /**
     * Key Derivation
     */
    PSha256("http://docs.oasis-open.org/ws-sx/ws-secureconversation/200512/dk/p_sha256", ""),

    /**
     * Cryptographic Hash; transformation to be used with {@link MessageDigest#getInstance(String)}.
     */
    Sha1("http://www.w3.org/2000/09/xmldsig#sha1", "SHA-1"),

    /**
     * Cryptographic Hash; transformation to be used with {@link MessageDigest#getInstance(String)}.
     */
    Sha256("http://www.w3.org/2001/04/xmlenc#sha256", "SHA-256");

    private final String uri;
    private final String transformation;

    SecurityAlgorithm(String uri, String transformation) {
        this.uri = uri;
        this.transformation = transformation;
    }

    /**
     * @return The URI identifying this security algorithm.
     */
    public String getUri() {
        return uri;
    }

    /**
     * @return The transformation string to use with the appropriate provider SPI.
     */
    public String getTransformation() {
        return transformation;
    }

    public static SecurityAlgorithm fromUri(String securityAlgorithmUri) throws UaException {
        for (SecurityAlgorithm algorithm: values()) {
            if (algorithm.getUri().equals(securityAlgorithmUri)) {
                return algorithm;
            }
        }

        throw new UaException(StatusCodes.Bad_SecurityChecksFailed,
                "unknown securityAlgorithmUri: " + securityAlgorithmUri);
    }

}


text:
version: '0.14'
order: 14
layout: page
menu_title: 0.14
title: Apache Samza 0.14 <a href="/learn/documentation/0.14/">      [Docs] </a>
---
<!--
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
   this work for additional information regarding copyright ownership.
   The ASF licenses this file to You 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.
-->

We are very excited to announce the release of **Apache Samza 0.14.0**. It is a major release with highly anticipated features viz Samza SQL, Azure EventHubs support and AWS Kinesis consumer.

####Enhancements and Bug Fixes
Overall, [65 JIRAs](https://issues.apache.org/jira/browse/SAMZA-1109?jql=project%20%3D%20SAMZA%20AND%20status%20%3D%20Resolved%20AND%20fixVersion%20%3D%200.14.0%20ORDER%20BY%20priority%20DESC%2C%20key%20ASC) were resolved in this release. Here are few highlights

- [SAMZA-1510](https://issues.apache.org/jira/browse/SAMZA-1510)  Introduce SQL semantics to Samza
- [SAMZA-1438](https://issues.apache.org/jira/browse/SAMZA-1438)  Implement Producer and consumer for Azure EventHubs
- [SAMZA-1515](https://issues.apache.org/jira/browse/SAMZA-1515)  Implement Kinesis consumer
- [SAMZA-1486](https://issues.apache.org/jira/browse/SAMZA-1486)  Checkpoint provider for Azure tables
- [SAMZA-1421](https://issues.apache.org/jira/browse/SAMZA-1421)  Support for durable state in high-level API
- [SAMZA-1392](https://issues.apache.org/jira/browse/SAMZA-1392)  Fix performance and correctness issues with concurrent sends and flushes in kafka system producer
- [SAMZA-1406](https://issues.apache.org/jira/browse/SAMZA-1406)  Enhancements to the Zookeeper based deployment model
- [SAMZA-1321](https://issues.apache.org/jira/browse/SAMZA-1321)  Support for multi-stage batch processing

####Upgrade Notes
- Introduced a new mandatory configuration - `job.coordination.utils.factory`. It impacts applications using non-YARN deployment models. Read more about it [here](/learn/documentation/{{site.version}}/jobs/configuration-table.html).
- The following APIs in SystemAdmin have been deprecated in the previous versions and hence, replaced with newer APIs. If you have a custom System implementation, then you have to update to the newer APIs.
    - `void createChangelogStream(String streamName, int numOfPartitions); -> boolean createStream(StreamSpec streamSpec);`
    - `void createCoordinatorStream(String streamName); -> boolean createStream(StreamSpec streamSpec);`
    - `void validateChangelogStream(String streamName, int numOfPartitions); -> void validateStream(StreamSpec streamSpec) throws StreamValidationException;`
- New API has been added to SystemAdmin that clear a stream.
    - `boolean clearStream(StreamSpec streamSpec);` Read more about it in the [API docs](/learn/documentation/{{site.version}}/api/javadocs/org/apache/samza/system/SystemAdmin.html).

####Sources and Artifacts
[Samza-sources-0.14.tgz](http://www.apache.org/dyn/closer.cgi/samza/0.14.0)

For more details about this release, please check out the [release blog post](https://blogs.apache.org/samza/).


text:
package main

import (
	"database/sql"
	"fmt"
)

func main() {
	fmt.Println(query("'test' OR 1=1"))
}

const GetAllQuery = "SELECT COUNT(*) FROM t WHERE arg=%s"

// For this test we expect the second QueryRow to have an SQL injection issue
func query(arg string) error {
	db, err := sql.Open("postgres", "postgresql://test:test@test")
	if err != nil {
		return err
	}

	query := fmt.Sprintf(GetAllQuery, arg)
	//nolint:safesql
	row := db.QueryRow(query)
	var count int
	if err := row.Scan(&count); err != nil {
		return err
	}

	row = db.QueryRow(fmt.Sprintf(GetAllQuery, "Catch me please?"))
	if err := row.Scan(&count); err != nil {
		return err
	}

	return nil
}


text:
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: com/github/aeonlucid/pogoprotos/networking/Requests.proto

package com.github.aeonlucid.pogoprotos.networking;

public final class Requests {
  private Requests() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistryLite registry) {
  }
  /**
   * Protobuf enum {@code com.github.aeonlucid.pogoprotos.networking.requests.RequestType}
   */
  public enum RequestType
      implements com.google.protobuf.Internal.EnumLite {
    /**
     *

     * No implementation required
     *

     *
     * METHOD_UNSET = 0;
     */
    METHOD_UNSET(0),
    /**
     *

     * Implemented [R & M]
     *

     *
     * PLAYER_UPDATE = 1;
     */
    PLAYER_UPDATE(1),
    /**
     *

     * Implemented [R & M]
     *

     *
     * GET_PLAYER = 2;
     */
    GET_PLAYER(2),
    /**
     *

     * Implemented [R & M]
     *

     *
     * GET_INVENTORY = 4;
     */
    GET_INVENTORY(4),
    /**
     *

     * Implemented [R & M]
     *

     *
     * DOWNLOAD_SETTINGS = 5;
     */
    DOWNLOAD_SETTINGS(5),
    /**
     *

     * Implemented [R & M]
     *

     *
     * DOWNLOAD_ITEM_TEMPLATES = 6;
     */
    DOWNLOAD_ITEM_TEMPLATES(6),
    /**
     *

     * Implemented [R & M]
     *

     *
     * DOWNLOAD_REMOTE_CONFIG_VERSION = 7;
     */
    DOWNLOAD_REMOTE_CONFIG_VERSION(7),
    /**
     *

     * Implemented [R & M]
     *

     *
     * FORT_SEARCH = 101;
     */
    FORT_SEARCH(101),
    /**
     *

     * Implemented [R & M]
     *

     *
     * ENCOUNTER = 102;
     */
    ENCOUNTER(102),
    /**
     *

     * Implemented [R & M]
     *

     *
     * CATCH_POKEMON = 103;
     */
    CATCH_POKEMON(103),
    /**
     *

     * Implemented [R & M]
     *

     *
     * FORT_DETAILS = 104;
     */
    FORT_DETAILS(104),
    /**
     *

     * Can't find this one
     *

     *
     * ITEM_USE = 105;
     */
    ITEM_USE(105),
    /**
     *

     * Implemented [R & M]
     *

     *
     * GET_MAP_OBJECTS = 106;
     */
    GET_MAP_OBJECTS(106),
    /**
     *

     * Implemented [R & M]
     *

     *
     * FORT_DEPLOY_POKEMON = 110;
     */
    FORT_DEPLOY_POKEMON(110),
    /**
     *

     * Implemented [R & M]
     *

     *
     * FORT_RECALL_POKEMON = 111;
     */
    FORT_RECALL_POKEMON(111),
    /**
     *

     * Implemented [R & M]
     *

     *
     * RELEASE_POKEMON = 112;
     */
    RELEASE_POKEMON(112),
    /**
     *

     * Implemented [R & M]
     *

     *
     * USE_ITEM_POTION = 113;
     */
    USE_ITEM_POTION(113),
    /**
     *

     * Implemented [R & M]
     *

     *
     * USE_ITEM_CAPTURE = 114;
     */
    USE_ITEM_CAPTURE(114),
    /**
     *

     * Can't find this one
     *

     *
     * USE_ITEM_FLEE = 115;
     */
    USE_ITEM_FLEE(115),
    /**
     *

     * Implemented [R & M]
     *

     *
     * USE_ITEM_REVIVE = 116;
     */
    USE_ITEM_REVIVE(116),
    /**
     *

     * Not yet implemented in the game
     *

     *
     * TRADE_SEARCH = 117;
     */
    TRADE_SEARCH(117),
    /**
     *

     * Not yet implemented in the game
     *

     *
     * TRADE_OFFER = 118;
     */
    TRADE_OFFER(118),
    /**
     *

     * Not yet implemented in the game
     *

     *
     * TRADE_RESPONSE = 119;
     */
    TRADE_RESPONSE(119),
    /**
     *

     * Not yet implemented in the game
     *

     *
     * TRADE_RESULT = 120;
     */
    TRADE_RESULT(120),
    /**
     *

     * Implemented [R & M]
     *

     *
     * GET_PLAYER_PROFILE = 121;
     */
    GET_PLAYER_PROFILE(121),
    /**
     *

     * Can't find this one
     *

     *
     * GET_ITEM_PACK = 122;
     */
    GET_ITEM_PACK(122),
    /**
     *

     * Can't find this one
     *

     *
     * BUY_ITEM_PACK = 123;
     */
    BUY_ITEM_PACK(123),
    /**
     *

     * Can't find this one
     *

     *
     * BUY_GEM_PACK = 124;
     */
    BUY_GEM_PACK(124),
    /**
     *

     * Implemented [R & M]
     *

     *
     * EVOLVE_POKEMON = 125;
     */
    EVOLVE_POKEMON(125),
    /**
     *

     * Implemented [R & M]
     *

     *
     * GET_HATCHED_EGGS = 126;
     */
    GET_HATCHED_EGGS(126),
    /**
     *

     * Implemented [R & M]
     *

     *
     * ENCOUNTER_TUTORIAL_COMPLETE = 127;
     */
    ENCOUNTER_TUTORIAL_COMPLETE(127),
    /**
     *

     * Implemented [R & M]
     *

     *
     * LEVEL_UP_REWARDS = 128;
     */
    LEVEL_UP_REWARDS(128),
    /**
     *

     * Implemented [R & M]
     *

     *
     * CHECK_AWARDED_BADGES = 129;
     */
    CHECK_AWARDED_BADGES(129),
    /**
     *

     * Implemented [R & M]
     *

     *
     * USE_ITEM_GYM = 133;
     */
    USE_ITEM_GYM(133),
    /**
     *

     * Implemented [R & M]
     *

     *
     * GET_GYM_DETAILS = 134;
     */
    GET_GYM_DETAILS(134),
    /**
     *

     * Implemented [R & M]
     *

     *
     * START_GYM_BATTLE = 135;
     */
    START_GYM_BATTLE(135),
    /**
     *

     * Implemented [R & M]
     *

     *
     * ATTACK_GYM = 136;
     */
    ATTACK_GYM(136),
    /**
     *

     * Implemented [R & M]
     *

     *
     * RECYCLE_INVENTORY_ITEM = 137;
     */
    RECYCLE_INVENTORY_ITEM(137),
    /**
     *

     * Implemented [R & M]
     *

     *
     * COLLECT_DAILY_BONUS = 138;
     */
    COLLECT_DAILY_BONUS(138),
    /**
     *

     * Implemented [R & M]
     *

     *
     * USE_ITEM_XP_BOOST = 139;
     */
    USE_ITEM_XP_BOOST(139),
    /**
     *

     * Implemented [R & M]
     *

     *
     * USE_ITEM_EGG_INCUBATOR = 140;
     */
    USE_ITEM_EGG_INCUBATOR(140),
    /**
     *

     * Implemented [R & M]
     *

     *
     * USE_INCENSE = 141;
     */
    USE_INCENSE(141),
    /**
     *

     * Implemented [R & M]
     *

     *
     * GET_INCENSE_POKEMON = 142;
     */
    GET_INCENSE_POKEMON(142),
    /**
     *

     * Implemented [R & M]
     *

     *
     * INCENSE_ENCOUNTER = 143;
     */
    INCENSE_ENCOUNTER(143),
    /**
     *

     * Implemented [R & M]
     *

     *
     * ADD_FORT_MODIFIER = 144;
     */
    ADD_FORT_MODIFIER(144),
    /**
     *

     * Implemented [R & M]
     *

     *
     * DISK_ENCOUNTER = 145;
     */
    DISK_ENCOUNTER(145),
    /**
     *

     * Implemented [R & M]
     *

     *
     * COLLECT_DAILY_DEFENDER_BONUS = 146;
     */
    COLLECT_DAILY_DEFENDER_BONUS(146),
    /**
     *

     * Implemented [R & M]
     *

     *
     * UPGRADE_POKEMON = 147;
     */
    UPGRADE_POKEMON(147),
    /**
     *

     * Implemented [R & M]
     *

     *
     * SET_FAVORITE_POKEMON = 148;
     */
    SET_FAVORITE_POKEMON(148),
    /**
     *

     * Implemented [R & M]
     *

     *
     * NICKNAME_POKEMON = 149;
     */
    NICKNAME_POKEMON(149),
    /**
     *

     * Implemented [R & M]
     *

     *
     * EQUIP_BADGE = 150;
     */
    EQUIP_BADGE(150),
    /**
     *

     * Implemented [R & M]
     *

     *
     * SET_CONTACT_SETTINGS = 151;
     */
    SET_CONTACT_SETTINGS(151),
    /**
     * SET_BUDDY_POKEMON = 152;
     */
    SET_BUDDY_POKEMON(152),
    /**
     * GET_BUDDY_WALKED = 153;
     */
    GET_BUDDY_WALKED(153),
    /**
     *

     * Implemented [R & M]
     *

     *
     * GET_ASSET_DIGEST = 300;
     */
    GET_ASSET_DIGEST(300),
    /**
     *

     * Implemented [R & M]
     *

     *
     * GET_DOWNLOAD_URLS = 301;
     */
    GET_DOWNLOAD_URLS(301),
    /**
     *

     * Implemented [R & M]
     *

     *
     * GET_SUGGESTED_CODENAMES = 401;
     */
    GET_SUGGESTED_CODENAMES(401),
    /**
     *

     * Implemented [R & M] TEST RESPONSE
     *

     *
     * CHECK_CODENAME_AVAILABLE = 402;
     */
    CHECK_CODENAME_AVAILABLE(402),
    /**
     *

     * Implemented [R & M] TEST RESPONSE
     *

     *
     * CLAIM_CODENAME = 403;
     */
    CLAIM_CODENAME(403),
    /**
     *

     * Implemented [R & M]
     *

     *
     * SET_AVATAR = 404;
     */
    SET_AVATAR(404),
    /**
     *

     * Implemented [R & M]
     *

     *
     * SET_PLAYER_TEAM = 405;
     */
    SET_PLAYER_TEAM(405),
    /**
     *

     * Implemented [R & M]
     *

     *
     * MARK_TUTORIAL_COMPLETE = 406;
     */
    MARK_TUTORIAL_COMPLETE(406),
    /**
     *

     * Can't find this one
     *

     *
     * LOAD_SPAWN_POINTS = 500;
     */
    LOAD_SPAWN_POINTS(500),
    /**
     * CHECK_CHALLENGE = 600;
     */
    CHECK_CHALLENGE(600),
    /**
     * VERIFY_CHALLENGE = 601;
     */
    VERIFY_CHALLENGE(601),
    /**
     *

     * Implemented [R & M]
     *

     *
     * ECHO = 666;
     */
    ECHO(666),
    /**
     * DEBUG_UPDATE_INVENTORY = 700;
     */
    DEBUG_UPDATE_INVENTORY(700),
    /**
     * DEBUG_DELETE_PLAYER = 701;
     */
    DEBUG_DELETE_PLAYER(701),
    /**
     *

     * Not yet released.
     *

     *
     * SFIDA_REGISTRATION = 800;
     */
    SFIDA_REGISTRATION(800),
    /**
     *

     * Implemented [R & M]
     *

     *
     * SFIDA_ACTION_LOG = 801;
     */
    SFIDA_ACTION_LOG(801),
    /**
     *

     * Not yet released.
     *

     *
     * SFIDA_CERTIFICATION = 802;
     */
    SFIDA_CERTIFICATION(802),
    /**
     *

     * Not yet released.
     *

     *
     * SFIDA_UPDATE = 803;
     */
    SFIDA_UPDATE(803),
    /**
     *

     * Not yet released.
     *

     *
     * SFIDA_ACTION = 804;
     */
    SFIDA_ACTION(804),
    /**
     *

     * Not yet released.
     *

     *
     * SFIDA_DOWSER = 805;
     */
    SFIDA_DOWSER(805),
    /**
     *

     * Not yet released.
     *

     *
     * SFIDA_CAPTURE = 806;
     */
    SFIDA_CAPTURE(806),
    UNRECOGNIZED(-1),
    ;

    /**
     *

     * No implementation required
     *

     *
     * METHOD_UNSET = 0;
     */
    public static final int METHOD_UNSET_VALUE = 0;
    /**
     *

     * Implemented [R & M]
     *

     *
     * PLAYER_UPDATE = 1;
     */
    public static final int PLAYER_UPDATE_VALUE = 1;
    /**
     *

     * Implemented [R & M]
     *

     *
     * GET_PLAYER = 2;
     */
    public static final int GET_PLAYER_VALUE = 2;
    /**
     *

     * Implemented [R & M]
     *

     *
     * GET_INVENTORY = 4;
     */
    public static final int GET_INVENTORY_VALUE = 4;
    /**
     *

     * Implemented [R & M]
     *

     *
     * DOWNLOAD_SETTINGS = 5;
     */
    public static final int DOWNLOAD_SETTINGS_VALUE = 5;
    /**
     *

     * Implemented [R & M]
     *

     *
     * DOWNLOAD_ITEM_TEMPLATES = 6;
     */
    public static final int DOWNLOAD_ITEM_TEMPLATES_VALUE = 6;
    /**
     *

     * Implemented [R & M]
     *

     *
     * DOWNLOAD_REMOTE_CONFIG_VERSION = 7;
     */
    public static final int DOWNLOAD_REMOTE_CONFIG_VERSION_VALUE = 7;
    /**
     *

     * Implemented [R & M]
     *

     *
     * FORT_SEARCH = 101;
     */
    public static final int FORT_SEARCH_VALUE = 101;
    /**
     *

     * Implemented [R & M]
     *

     *
     * ENCOUNTER = 102;
     */
    public static final int ENCOUNTER_VALUE = 102;
    /**
     *

     * Implemented [R & M]
     *

     *
     * CATCH_POKEMON = 103;
     */
    public static final int CATCH_POKEMON_VALUE = 103;
    /**
     *

     * Implemented [R & M]
     *

     *
     * FORT_DETAILS = 104;
     */
    public static final int FORT_DETAILS_VALUE = 104;
    /**
     *

     * Can't find this one
     *

     *
     * ITEM_USE = 105;
     */
    public static final int ITEM_USE_VALUE = 105;
    /**
     *

     * Implemented [R & M]
     *

     *
     * GET_MAP_OBJECTS = 106;
     */
    public static final int GET_MAP_OBJECTS_VALUE = 106;
    /**
     *

     * Implemented [R & M]
     *

     *
     * FORT_DEPLOY_POKEMON = 110;
     */
    public static final int FORT_DEPLOY_POKEMON_VALUE = 110;
    /**
     *

     * Implemented [R & M]
     *

     *
     * FORT_RECALL_POKEMON = 111;
     */
    public static final int FORT_RECALL_POKEMON_VALUE = 111;
    /**
     *

     * Implemented [R & M]
     *

     *
     * RELEASE_POKEMON = 112;
     */
    public static final int RELEASE_POKEMON_VALUE = 112;
    /**
     *

     * Implemented [R & M]
     *

     *
     * USE_ITEM_POTION = 113;
     */
    public static final int USE_ITEM_POTION_VALUE = 113;
    /**
     *

     * Implemented [R & M]
     *

     *
     * USE_ITEM_CAPTURE = 114;
     */
    public static final int USE_ITEM_CAPTURE_VALUE = 114;
    /**
     *

     * Can't find this one
     *

     *
     * USE_ITEM_FLEE = 115;
     */
    public static final int USE_ITEM_FLEE_VALUE = 115;
    /**
     *

     * Implemented [R & M]
     *

     *
     * USE_ITEM_REVIVE = 116;
     */
    public static final int USE_ITEM_REVIVE_VALUE = 116;
    /**
     *

     * Not yet implemented in the game
     *

     *
     * TRADE_SEARCH = 117;
     */
    public static final int TRADE_SEARCH_VALUE = 117;
    /**
     *

     * Not yet implemented in the game
     *

     *
     * TRADE_OFFER = 118;
     */
    public static final int TRADE_OFFER_VALUE = 118;
    /**
     *

     * Not yet implemented in the game
     *

     *
     * TRADE_RESPONSE = 119;
     */
    public static final int TRADE_RESPONSE_VALUE = 119;
    /**
     *

     * Not yet implemented in the game
     *

     *
     * TRADE_RESULT = 120;
     */
    public static final int TRADE_RESULT_VALUE = 120;
    /**
     *

     * Implemented [R & M]
     *

     *
     * GET_PLAYER_PROFILE = 121;
     */
    public static final int GET_PLAYER_PROFILE_VALUE = 121;
    /**
     *

     * Can't find this one
     *

     *
     * GET_ITEM_PACK = 122;
     */
    public static final int GET_ITEM_PACK_VALUE = 122;
    /**
     *

     * Can't find this one
     *

     *
     * BUY_ITEM_PACK = 123;
     */
    public static final int BUY_ITEM_PACK_VALUE = 123;
    /**
     *

     * Can't find this one
     *

     *
     * BUY_GEM_PACK = 124;
     */
    public static final int BUY_GEM_PACK_VALUE = 124;
    /**
     *

     * Implemented [R & M]
     *

     *
     * EVOLVE_POKEMON = 125;
     */
    public static final int EVOLVE_POKEMON_VALUE = 125;
    /**
     *

     * Implemented [R & M]
     *

     *
     * GET_HATCHED_EGGS = 126;
     */
    public static final int GET_HATCHED_EGGS_VALUE = 126;
    /**
     *

     * Implemented [R & M]
     *

     *
     * ENCOUNTER_TUTORIAL_COMPLETE = 127;
     */
    public static final int ENCOUNTER_TUTORIAL_COMPLETE_VALUE = 127;
    /**
     *

     * Implemented [R & M]
     *

     *
     * LEVEL_UP_REWARDS = 128;
     */
    public static final int LEVEL_UP_REWARDS_VALUE = 128;
    /**
     *

     * Implemented [R & M]
     *

     *
     * CHECK_AWARDED_BADGES = 129;
     */
    public static final int CHECK_AWARDED_BADGES_VALUE = 129;
    /**
     *

     * Implemented [R & M]
     *

     *
     * USE_ITEM_GYM = 133;
     */
    public static final int USE_ITEM_GYM_VALUE = 133;
    /**
     *

     * Implemented [R & M]
     *

     *
     * GET_GYM_DETAILS = 134;
     */
    public static final int GET_GYM_DETAILS_VALUE = 134;
    /**
     *

     * Implemented [R & M]
     *

     *
     * START_GYM_BATTLE = 135;
     */
    public static final int START_GYM_BATTLE_VALUE = 135;
    /**
     *

     * Implemented [R & M]
     *

     *
     * ATTACK_GYM = 136;
     */
    public static final int ATTACK_GYM_VALUE = 136;
    /**
     *

     * Implemented [R & M]
     *

     *
     * RECYCLE_INVENTORY_ITEM = 137;
     */
    public static final int RECYCLE_INVENTORY_ITEM_VALUE = 137;
    /**
     *

     * Implemented [R & M]
     *

     *
     * COLLECT_DAILY_BONUS = 138;
     */
    public static final int COLLECT_DAILY_BONUS_VALUE = 138;
    /**
     *

     * Implemented [R & M]
     *

     *
     * USE_ITEM_XP_BOOST = 139;
     */
    public static final int USE_ITEM_XP_BOOST_VALUE = 139;
    /**
     *

     * Implemented [R & M]
     *

     *
     * USE_ITEM_EGG_INCUBATOR = 140;
     */
    public static final int USE_ITEM_EGG_INCUBATOR_VALUE = 140;
    /**
     *

     * Implemented [R & M]
     *

     *
     * USE_INCENSE = 141;
     */
    public static final int USE_INCENSE_VALUE = 141;
    /**
     *

     * Implemented [R & M]
     *

     *
     * GET_INCENSE_POKEMON = 142;
     */
    public static final int GET_INCENSE_POKEMON_VALUE = 142;
    /**
     *

     * Implemented [R & M]
     *

     *
     * INCENSE_ENCOUNTER = 143;
     */
    public static final int INCENSE_ENCOUNTER_VALUE = 143;
    /**
     *

     * Implemented [R & M]
     *

     *
     * ADD_FORT_MODIFIER = 144;
     */
    public static final int ADD_FORT_MODIFIER_VALUE = 144;
    /**
     *

     * Implemented [R & M]
     *

     *
     * DISK_ENCOUNTER = 145;
     */
    public static final int DISK_ENCOUNTER_VALUE = 145;
    /**
     *

     * Implemented [R & M]
     *

     *
     * COLLECT_DAILY_DEFENDER_BONUS = 146;
     */
    public static final int COLLECT_DAILY_DEFENDER_BONUS_VALUE = 146;
    /**
     *

     * Implemented [R & M]
     *

     *
     * UPGRADE_POKEMON = 147;
     */
    public static final int UPGRADE_POKEMON_VALUE = 147;
    /**
     *

     * Implemented [R & M]
     *

     *
     * SET_FAVORITE_POKEMON = 148;
     */
    public static final int SET_FAVORITE_POKEMON_VALUE = 148;
    /**
     *

     * Implemented [R & M]
     *

     *
     * NICKNAME_POKEMON = 149;
     */
    public static final int NICKNAME_POKEMON_VALUE = 149;
    /**
     *

     * Implemented [R & M]
     *

     *
     * EQUIP_BADGE = 150;
     */
    public static final int EQUIP_BADGE_VALUE = 150;
    /**
     *

     * Implemented [R & M]
     *

     *
     * SET_CONTACT_SETTINGS = 151;
     */
    public static final int SET_CONTACT_SETTINGS_VALUE = 151;
    /**
     * SET_BUDDY_POKEMON = 152;
     */
    public static final int SET_BUDDY_POKEMON_VALUE = 152;
    /**
     * GET_BUDDY_WALKED = 153;
     */
    public static final int GET_BUDDY_WALKED_VALUE = 153;
    /**
     *

     * Implemented [R & M]
     *

     *
     * GET_ASSET_DIGEST = 300;
     */
    public static final int GET_ASSET_DIGEST_VALUE = 300;
    /**
     *

     * Implemented [R & M]
     *

     *
     * GET_DOWNLOAD_URLS = 301;
     */
    public static final int GET_DOWNLOAD_URLS_VALUE = 301;
    /**
     *

     * Implemented [R & M]
     *

     *
     * GET_SUGGESTED_CODENAMES = 401;
     */
    public static final int GET_SUGGESTED_CODENAMES_VALUE = 401;
    /**
     *

     * Implemented [R & M] TEST RESPONSE
     *

     *
     * CHECK_CODENAME_AVAILABLE = 402;
     */
    public static final int CHECK_CODENAME_AVAILABLE_VALUE = 402;
    /**
     *

     * Implemented [R & M] TEST RESPONSE
     *

     *
     * CLAIM_CODENAME = 403;
     */
    public static final int CLAIM_CODENAME_VALUE = 403;
    /**
     *

     * Implemented [R & M]
     *

     *
     * SET_AVATAR = 404;
     */
    public static final int SET_AVATAR_VALUE = 404;
    /**
     *

     * Implemented [R & M]
     *

     *
     * SET_PLAYER_TEAM = 405;
     */
    public static final int SET_PLAYER_TEAM_VALUE = 405;
    /**
     *

     * Implemented [R & M]
     *

     *
     * MARK_TUTORIAL_COMPLETE = 406;
     */
    public static final int MARK_TUTORIAL_COMPLETE_VALUE = 406;
    /**
     *

     * Can't find this one
     *

     *
     * LOAD_SPAWN_POINTS = 500;
     */
    public static final int LOAD_SPAWN_POINTS_VALUE = 500;
    /**
     * CHECK_CHALLENGE = 600;
     */
    public static final int CHECK_CHALLENGE_VALUE = 600;
    /**
     * VERIFY_CHALLENGE = 601;
     */
    public static final int VERIFY_CHALLENGE_VALUE = 601;
    /**
     *

     * Implemented [R & M]
     *

     *
     * ECHO = 666;
     */
    public static final int ECHO_VALUE = 666;
    /**
     * DEBUG_UPDATE_INVENTORY = 700;
     */
    public static final int DEBUG_UPDATE_INVENTORY_VALUE = 700;
    /**
     * DEBUG_DELETE_PLAYER = 701;
     */
    public static final int DEBUG_DELETE_PLAYER_VALUE = 701;
    /**
     *

     * Not yet released.
     *

     *
     * SFIDA_REGISTRATION = 800;
     */
    public static final int SFIDA_REGISTRATION_VALUE = 800;
    /**
     *

     * Implemented [R & M]
     *

     *
     * SFIDA_ACTION_LOG = 801;
     */
    public static final int SFIDA_ACTION_LOG_VALUE = 801;
    /**
     *

     * Not yet released.
     *

     *
     * SFIDA_CERTIFICATION = 802;
     */
    public static final int SFIDA_CERTIFICATION_VALUE = 802;
    /**
     *

     * Not yet released.
     *

     *
     * SFIDA_UPDATE = 803;
     */
    public static final int SFIDA_UPDATE_VALUE = 803;
    /**
     *

     * Not yet released.
     *

     *
     * SFIDA_ACTION = 804;
     */
    public static final int SFIDA_ACTION_VALUE = 804;
    /**
     *

     * Not yet released.
     *

     *
     * SFIDA_DOWSER = 805;
     */
    public static final int SFIDA_DOWSER_VALUE = 805;
    /**
     *

     * Not yet released.
     *

     *
     * SFIDA_CAPTURE = 806;
     */
    public static final int SFIDA_CAPTURE_VALUE = 806;

    public final int getNumber() {
      return value;
    }

    /**
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static RequestType valueOf(int value) {
      return forNumber(value);
    }

    public static RequestType forNumber(int value) {
      switch (value) {
        case 0: return METHOD_UNSET;
        case 1: return PLAYER_UPDATE;
        case 2: return GET_PLAYER;
        case 4: return GET_INVENTORY;
        case 5: return DOWNLOAD_SETTINGS;
        case 6: return DOWNLOAD_ITEM_TEMPLATES;
        case 7: return DOWNLOAD_REMOTE_CONFIG_VERSION;
        case 101: return FORT_SEARCH;
        case 102: return ENCOUNTER;
        case 103: return CATCH_POKEMON;
        case 104: return FORT_DETAILS;
        case 105: return ITEM_USE;
        case 106: return GET_MAP_OBJECTS;
        case 110: return FORT_DEPLOY_POKEMON;
        case 111: return FORT_RECALL_POKEMON;
        case 112: return RELEASE_POKEMON;
        case 113: return USE_ITEM_POTION;
        case 114: return USE_ITEM_CAPTURE;
        case 115: return USE_ITEM_FLEE;
        case 116: return USE_ITEM_REVIVE;
        case 117: return TRADE_SEARCH;
        case 118: return TRADE_OFFER;
        case 119: return TRADE_RESPONSE;
        case 120: return TRADE_RESULT;
        case 121: return GET_PLAYER_PROFILE;
        case 122: return GET_ITEM_PACK;
        case 123: return BUY_ITEM_PACK;
        case 124: return BUY_GEM_PACK;
        case 125: return EVOLVE_POKEMON;
        case 126: return GET_HATCHED_EGGS;
        case 127: return ENCOUNTER_TUTORIAL_COMPLETE;
        case 128: return LEVEL_UP_REWARDS;
        case 129: return CHECK_AWARDED_BADGES;
        case 133: return USE_ITEM_GYM;
        case 134: return GET_GYM_DETAILS;
        case 135: return START_GYM_BATTLE;
        case 136: return ATTACK_GYM;
        case 137: return RECYCLE_INVENTORY_ITEM;
        case 138: return COLLECT_DAILY_BONUS;
        case 139: return USE_ITEM_XP_BOOST;
        case 140: return USE_ITEM_EGG_INCUBATOR;
        case 141: return USE_INCENSE;
        case 142: return GET_INCENSE_POKEMON;
        case 143: return INCENSE_ENCOUNTER;
        case 144: return ADD_FORT_MODIFIER;
        case 145: return DISK_ENCOUNTER;
        case 146: return COLLECT_DAILY_DEFENDER_BONUS;
        case 147: return UPGRADE_POKEMON;
        case 148: return SET_FAVORITE_POKEMON;
        case 149: return NICKNAME_POKEMON;
        case 150: return EQUIP_BADGE;
        case 151: return SET_CONTACT_SETTINGS;
        case 152: return SET_BUDDY_POKEMON;
        case 153: return GET_BUDDY_WALKED;
        case 300: return GET_ASSET_DIGEST;
        case 301: return GET_DOWNLOAD_URLS;
        case 401: return GET_SUGGESTED_CODENAMES;
        case 402: return CHECK_CODENAME_AVAILABLE;
        case 403: return CLAIM_CODENAME;
        case 404: return SET_AVATAR;
        case 405: return SET_PLAYER_TEAM;
        case 406: return MARK_TUTORIAL_COMPLETE;
        case 500: return LOAD_SPAWN_POINTS;
        case 600: return CHECK_CHALLENGE;
        case 601: return VERIFY_CHALLENGE;
        case 666: return ECHO;
        case 700: return DEBUG_UPDATE_INVENTORY;
        case 701: return DEBUG_DELETE_PLAYER;
        case 800: return SFIDA_REGISTRATION;
        case 801: return SFIDA_ACTION_LOG;
        case 802: return SFIDA_CERTIFICATION;
        case 803: return SFIDA_UPDATE;
        case 804: return SFIDA_ACTION;
        case 805: return SFIDA_DOWSER;
        case 806: return SFIDA_CAPTURE;
        default: return null;
      }
    }

    public static com.google.protobuf.Internal.EnumLiteMap<RequestType>
        internalGetValueMap() {
      return internalValueMap;
    }
    private static final com.google.protobuf.Internal.EnumLiteMap<
        RequestType> internalValueMap =
          new com.google.protobuf.Internal.EnumLiteMap<RequestType>() {
            public RequestType findValueByNumber(int number) {
              return RequestType.forNumber(number);
            }
          };

    private final int value;

    private RequestType(int value) {
      this.value = value;
    }

    // @@protoc_insertion_point(enum_scope:com.github.aeonlucid.pogoprotos.networking.requests.RequestType)
  }

  public interface RequestOrBuilder extends
      // @@protoc_insertion_point(interface_extends:com.github.aeonlucid.pogoprotos.networking.requests.Request)
      com.google.protobuf.MessageLiteOrBuilder {

    /**
     * optional .com.github.aeonlucid.pogoprotos.networking.requests.RequestType request_type = 1;
     */
    int getRequestTypeValue();
    /**
     * optional .com.github.aeonlucid.pogoprotos.networking.requests.RequestType request_type = 1;
     */
    com.github.aeonlucid.pogoprotos.networking.Requests.RequestType getRequestType();

    /**
     * optional bytes request_message = 2;
     */
    com.google.protobuf.ByteString getRequestMessage();
  }
  /**
   * Protobuf type {@code com.github.aeonlucid.pogoprotos.networking.requests.Request}
   */
  public  static final class Request extends
      com.google.protobuf.GeneratedMessageLite<
          Request, Request.Builder> implements
      // @@protoc_insertion_point(message_implements:com.github.aeonlucid.pogoprotos.networking.requests.Request)
      RequestOrBuilder {
    private Request() {
      requestMessage_ = com.google.protobuf.ByteString.EMPTY;
    }
    public static final int REQUEST_TYPE_FIELD_NUMBER = 1;
    private int requestType_;
    /**
     * optional .com.github.aeonlucid.pogoprotos.networking.requests.RequestType request_type = 1;
     */
    public int getRequestTypeValue() {
      return requestType_;
    }
    /**
     * optional .com.github.aeonlucid.pogoprotos.networking.requests.RequestType request_type = 1;
     */
    public com.github.aeonlucid.pogoprotos.networking.Requests.RequestType getRequestType() {
      com.github.aeonlucid.pogoprotos.networking.Requests.RequestType result = com.github.aeonlucid.pogoprotos.networking.Requests.RequestType.forNumber(requestType_);
      return result == null ? com.github.aeonlucid.pogoprotos.networking.Requests.RequestType.UNRECOGNIZED : result;
    }
    /**
     * optional .com.github.aeonlucid.pogoprotos.networking.requests.RequestType request_type = 1;
     */
    private void setRequestTypeValue(int value) {
        requestType_ = value;
    }
    /**
     * optional .com.github.aeonlucid.pogoprotos.networking.requests.RequestType request_type = 1;
     */
    private void setRequestType(com.github.aeonlucid.pogoprotos.networking.Requests.RequestType value) {
      if (value == null) {
        throw new NullPointerException();
      }

      requestType_ = value.getNumber();
    }
    /**
     * optional .com.github.aeonlucid.pogoprotos.networking.requests.RequestType request_type = 1;
     */
    private void clearRequestType() {

      requestType_ = 0;
    }

    public static final int REQUEST_MESSAGE_FIELD_NUMBER = 2;
    private com.google.protobuf.ByteString requestMessage_;
    /**
     * optional bytes request_message = 2;
     */
    public com.google.protobuf.ByteString getRequestMessage() {
      return requestMessage_;
    }
    /**
     * optional bytes request_message = 2;
     */
    private void setRequestMessage(com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }

      requestMessage_ = value;
    }
    /**
     * optional bytes request_message = 2;
     */
    private void clearRequestMessage() {

      requestMessage_ = getDefaultInstance().getRequestMessage();
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (requestType_ != com.github.aeonlucid.pogoprotos.networking.Requests.RequestType.METHOD_UNSET.getNumber()) {
        output.writeEnum(1, requestType_);
      }
      if (!requestMessage_.isEmpty()) {
        output.writeBytes(2, requestMessage_);
      }
    }

    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;

      size = 0;
      if (requestType_ != com.github.aeonlucid.pogoprotos.networking.Requests.RequestType.METHOD_UNSET.getNumber()) {
        size += com.google.protobuf.CodedOutputStream
          .computeEnumSize(1, requestType_);
      }
      if (!requestMessage_.isEmpty()) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(2, requestMessage_);
      }
      memoizedSerializedSize = size;
      return size;
    }

    public static com.github.aeonlucid.pogoprotos.networking.Requests.Request parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static com.github.aeonlucid.pogoprotos.networking.Requests.Request parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static com.github.aeonlucid.pogoprotos.networking.Requests.Request parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data);
    }
    public static com.github.aeonlucid.pogoprotos.networking.Requests.Request parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, data, extensionRegistry);
    }
    public static com.github.aeonlucid.pogoprotos.networking.Requests.Request parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static com.github.aeonlucid.pogoprotos.networking.Requests.Request parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input, extensionRegistry);
    }
    public static com.github.aeonlucid.pogoprotos.networking.Requests.Request parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input);
    }
    public static com.github.aeonlucid.pogoprotos.networking.Requests.Request parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return parseDelimitedFrom(DEFAULT_INSTANCE, input, extensionRegistry);
    }
    public static com.github.aeonlucid.pogoprotos.networking.Requests.Request parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input);
    }
    public static com.github.aeonlucid.pogoprotos.networking.Requests.Request parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageLite.parseFrom(
          DEFAULT_INSTANCE, input, extensionRegistry);
    }

    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(com.github.aeonlucid.pogoprotos.networking.Requests.Request prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }

    /**
     * Protobuf type {@code com.github.aeonlucid.pogoprotos.networking.requests.Request}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageLite.Builder<
          com.github.aeonlucid.pogoprotos.networking.Requests.Request, Builder> implements
        // @@protoc_insertion_point(builder_implements:com.github.aeonlucid.pogoprotos.networking.requests.Request)
        com.github.aeonlucid.pogoprotos.networking.Requests.RequestOrBuilder {
      // Construct using com.github.aeonlucid.pogoprotos.networking.Requests.Request.newBuilder()
      private Builder() {
        super(DEFAULT_INSTANCE);
      }

      /**
       * optional .com.github.aeonlucid.pogoprotos.networking.requests.RequestType request_type = 1;
       */
      public int getRequestTypeValue() {
        return instance.getRequestTypeValue();
      }
      /**
       * optional .com.github.aeonlucid.pogoprotos.networking.requests.RequestType request_type = 1;
       */
      public Builder setRequestTypeValue(int value) {
        copyOnWrite();
        instance.setRequestTypeValue(value);
        return this;
      }
      /**
       * optional .com.github.aeonlucid.pogoprotos.networking.requests.RequestType request_type = 1;
       */
      public com.github.aeonlucid.pogoprotos.networking.Requests.RequestType getRequestType() {
        return instance.getRequestType();
      }
      /**
       * optional .com.github.aeonlucid.pogoprotos.networking.requests.RequestType request_type = 1;
       */
      public Builder setRequestType(com.github.aeonlucid.pogoprotos.networking.Requests.RequestType value) {
        copyOnWrite();
        instance.setRequestType(value);
        return this;
      }
      /**
       * optional .com.github.aeonlucid.pogoprotos.networking.requests.RequestType request_type = 1;
       */
      public Builder clearRequestType() {
        copyOnWrite();
        instance.clearRequestType();
        return this;
      }

      /**
       * optional bytes request_message = 2;
       */
      public com.google.protobuf.ByteString getRequestMessage() {
        return instance.getRequestMessage();
      }
      /**
       * optional bytes request_message = 2;
       */
      public Builder setRequestMessage(com.google.protobuf.ByteString value) {
        copyOnWrite();
        instance.setRequestMessage(value);
        return this;
      }
      /**
       * optional bytes request_message = 2;
       */
      public Builder clearRequestMessage() {
        copyOnWrite();
        instance.clearRequestMessage();
        return this;
      }

      // @@protoc_insertion_point(builder_scope:com.github.aeonlucid.pogoprotos.networking.requests.Request)
    }
    protected final Object dynamicMethod(
        com.google.protobuf.GeneratedMessageLite.MethodToInvoke method,
        Object arg0, Object arg1) {
      switch (method) {
        case NEW_MUTABLE_INSTANCE: {
          return new com.github.aeonlucid.pogoprotos.networking.Requests.Request();
        }
        case IS_INITIALIZED: {
          return DEFAULT_INSTANCE;
        }
        case MAKE_IMMUTABLE: {
          return null;
        }
        case NEW_BUILDER: {
          return new Builder();
        }
        case VISIT: {
          Visitor visitor = (Visitor) arg0;
          com.github.aeonlucid.pogoprotos.networking.Requests.Request other = (com.github.aeonlucid.pogoprotos.networking.Requests.Request) arg1;
          requestType_ = visitor.visitInt(requestType_ != 0, requestType_,    other.requestType_ != 0, other.requestType_);
          requestMessage_ = visitor.visitByteString(requestMessage_ != com.google.protobuf.ByteString.EMPTY, requestMessage_,
              other.requestMessage_ != com.google.protobuf.ByteString.EMPTY, other.requestMessage_);
          if (visitor == com.google.protobuf.GeneratedMessageLite.MergeFromVisitor
              .INSTANCE) {
          }
          return this;
        }
        case MERGE_FROM_STREAM: {
          com.google.protobuf.CodedInputStream input =
              (com.google.protobuf.CodedInputStream) arg0;
          com.google.protobuf.ExtensionRegistryLite extensionRegistry =
              (com.google.protobuf.ExtensionRegistryLite) arg1;
          try {
            boolean done = false;
            while (!done) {
              int tag = input.readTag();
              switch (tag) {
                case 0:
                  done = true;
                  break;
                default: {
                  if (!input.skipField(tag)) {
                    done = true;
                  }
                  break;
                }
                case 8: {
                  int rawValue = input.readEnum();

                  requestType_ = rawValue;
                  break;
                }
                case 18: {

                  requestMessage_ = input.readBytes();
                  break;
                }
              }
            }
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            throw new RuntimeException(e.setUnfinishedMessage(this));
          } catch (java.io.IOException e) {
            throw new RuntimeException(
                new com.google.protobuf.InvalidProtocolBufferException(
                    e.getMessage()).setUnfinishedMessage(this));
          } finally {
          }
        }
        case GET_DEFAULT_INSTANCE: {
          return DEFAULT_INSTANCE;
        }
        case GET_PARSER: {
          if (PARSER == null) {    synchronized (com.github.aeonlucid.pogoprotos.networking.Requests.Request.class) {
              if (PARSER == null) {
                PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
              }
            }
          }
          return PARSER;
        }
      }
      throw new UnsupportedOperationException();
    }

    // @@protoc_insertion_point(class_scope:com.github.aeonlucid.pogoprotos.networking.requests.Request)
    private static final com.github.aeonlucid.pogoprotos.networking.Requests.Request DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new Request();
      DEFAULT_INSTANCE.makeImmutable();
    }

    public static com.github.aeonlucid.pogoprotos.networking.Requests.Request getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static volatile com.google.protobuf.Parser<Request> PARSER;

    public static com.google.protobuf.Parser<Request> parser() {
      return DEFAULT_INSTANCE.getParserForType();
    }
  }

  static {
  }

  // @@protoc_insertion_point(outer_class_scope)
}


text:
import { Component, OnInit } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/map';

import { GitHubService } from '../../github/github.service';
import { Repository } from '../../github/interfaces';

@Component({
  selector: 'gh-repositories',
  templateUrl: './repositories.component.html',
  styleUrls: ['./repositories.component.scss']
})
export class RepositoriesComponent implements OnInit {
  repositories: Observable<Repository[]>;

  constructor(private github: GitHubService) { }

  ngOnInit() {
    this.repositories = this.github.getRepositories()
      .map(repos => repos.filter(r => r.hasPages));
  }

}