text:
This repository holds basically a master of the contents of the completed Angular2 Tutorial
"Tour-of-heroes". This means that npm installs have been completed and the code finished.
The intent is to build omn this base in trying to make something useful.

Initialize this project as a *local git repo* and make the first commit:
```bash
$ git init
$ git add .
$ git commit -m "Initial commit"
```

Create a *remote repository* for this project on the service of your choice.

Grab its address (e.g. *`https://github.com/<my-org>/my-proj.git`*) and push the *local repo* to the *remote*.
```bash
$ git remote add origin <repo-address>
$ git push -u origin master
```
### Start development

Install the npm packages described in the `package.json` and verify that it works:

```bash
$ npm install
$ npm start
```
You're ready to write your application.

Remember the npm scripts in `package.json`:

* `npm start` - runs the compiler and a server at the same time, both in "watch mode".
* `npm run tsc` - runs the TypeScript compiler once.
* `npm run tsc:w` - runs the TypeScript compiler in watch mode; the process keeps running, awaiting changes to TypeScript files and re-compiling when it sees them.
* `npm run lite` - runs the [lite-server](https://www.npmjs.com/package/lite-server), a light-weight, static file server, written and maintained by
[John Papa](https://github.com/johnpapa) and
[Christopher Martin](https://github.com/cgmartin)
with excellent support for Angular apps that use routing.
* `npm run typings` - runs the typings tool.
* `npm run postinstall` - called by *npm* automatically *after* it successfully completes package installation. This script installs the TypeScript definition files this app requires.


text:
@class BTCBigNumber;
@class BTCBlock;
@interface BTCNetwork : NSObject <NSCopying>

// Available networks

// Main Bitcoin network, singleton instance.
+ (BTCNetwork*) mainnet;

// Testnet3 (current testnet), singleton instance.
+ (BTCNetwork*) testnet3;

// Network Parameters
// Note: all properties are writable so you can tweak parameters for testing purposes.
// If you do so, you may want to use -copy.

// Returns YES if this network is testnet3 (used to tweak certain validation rules).
- (BOOL) isTestnet;

// Hash of the genesis block.
@property(nonatomic) NSData* genesisBlockHash;

// Default port for TCP connections.
@property(nonatomic) uint32_t defaultPort;

// Maximum target for the proof of work: CBigNum(~uint256(0) >> 32) for mainnet.
@property(nonatomic) BTCBigNumber* proofOfWorkLimit;

// Array of pairs @[ @(int <height>), NSData* <hash> ] sorted by height.
@property(nonatomic) NSArray* checkpoints;

// Returns a checkpoint hash if it exists or BTC256Zero if there is no checkpoint at such height.
- (NSData*) checkpointAtHeight:(int)height;

// Returns height of checkpoint or -1 if there is no such checkpoint.
- (int) heightForCheckpoint:(NSData*)checkpointHash;

@end

redpajama_set_name: RedPajamaGithub


text:
package org.finra.datagenerator.engine;

import org.finra.datagenerator.distributor.multithreaded.SingleThreadedProcessing;

import java.io.IOException;
import java.util.Map;
import java.util.Queue;
import java.util.concurrent.atomic.AtomicBoolean;

/**
 * Represents a partial search produced by an Engine's bootstrapping.
 */
public interface Frontier {

    /**
     * Generate Maps of variable assignments produced by a DFS strategy;
     * the DFS is performed on a possible state bound up inside the Frontier and will
     * stop early if flag is set to true
     *
     * @param singleThreadedProcessing Processing Strategy
     * @param flag the exit flag
     * @param outTemplate Output Template
     * @param sb String Builder
     * @return StringBuilder
     * @throws IOException io exception
     */
    StringBuilder searchForScenarios(SingleThreadedProcessing singleThreadedProcessing, AtomicBoolean flag,
                                     String[] outTemplate, StringBuilder sb) throws IOException;

    /**
     * Fills the queue with Maps of variable assignments produced by a DFS strategy;
     * the DFS is performed on a possible state bound up inside the Frontier and will
     * stop early if flag is set to true
     *
     * @param queue the queue
     * @param flag the exit flag
     * @throws java.io.IOException io exception
     */
    void searchForScenarios(Queue<Map<String, String>> queue, AtomicBoolean flag) throws IOException;

}


text:
#include "db_config.h"

#include "db_int.h"

/*
 * __crypto_region_init --
 *	Initialize crypto.
 *
 *
 * !!!
 * We don't put this stub file in the crypto/ directory of the distribution
 * because that entire directory is removed for non-crypto distributions.
 *
 * PUBLIC: int __crypto_region_init __P((ENV *));
 */
int
__crypto_region_init(env)
	ENV *env;
{
	REGENV *renv;
	REGINFO *infop;
	int ret;

	infop = env->reginfo;
	renv = infop->primary;
	MUTEX_LOCK(env, renv->mtx_regenv);
	ret = !(renv->cipher_off == INVALID_ROFF);
	MUTEX_UNLOCK(env, renv->mtx_regenv);

	if (ret == 0)
		return (0);

	__db_errx(env, DB_STR("0040",
"Encrypted environment: library build did not include cryptography support"));
	return (DB_OPNOTSUP);
}


text:
namespace PrintHost.view.calibration
{
    partial class BedHeightMap
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(BedHeightMap));
            this.groupScanArea = new System.Windows.Forms.GroupBox();
            this.buttonMeasureHeights = new System.Windows.Forms.Button();
            this.textYPoints = new System.Windows.Forms.TextBox();
            this.labelYPoints = new System.Windows.Forms.Label();
            this.textXPoints = new System.Windows.Forms.TextBox();
            this.labelXPoints = new System.Windows.Forms.Label();
            this.textYMax = new System.Windows.Forms.TextBox();
            this.labelYMax = new System.Windows.Forms.Label();
            this.textXMax = new System.Windows.Forms.TextBox();
            this.labelXMax = new System.Windows.Forms.Label();
            this.textYMin = new System.Windows.Forms.TextBox();
            this.labelYMin = new System.Windows.Forms.Label();
            this.textXMin = new System.Windows.Forms.TextBox();
            this.labelXMin = new System.Windows.Forms.Label();
            this.buttonResultToClipboard = new System.Windows.Forms.Button();
            this.map = new System.Windows.Forms.PictureBox();
            this.groupScanResults = new System.Windows.Forms.GroupBox();
            this.labelZCenterValue = new System.Windows.Forms.Label();
            this.labelZAvgValue = new System.Windows.Forms.Label();
            this.labelZMaxValue = new System.Windows.Forms.Label();
            this.labelZCenter = new System.Windows.Forms.Label();
            this.labelZAvg = new System.Windows.Forms.Label();
            this.labelZMax = new System.Windows.Forms.Label();
            this.labelZMinValue = new System.Windows.Forms.Label();
            this.labelZMin = new System.Windows.Forms.Label();
            this.groupScanArea.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.map)).BeginInit();
            this.groupScanResults.SuspendLayout();
            this.SuspendLayout();
            //
            // groupScanArea
            //
            this.groupScanArea.Controls.Add(this.buttonMeasureHeights);
            this.groupScanArea.Controls.Add(this.textYPoints);
            this.groupScanArea.Controls.Add(this.labelYPoints);
            this.groupScanArea.Controls.Add(this.textXPoints);
            this.groupScanArea.Controls.Add(this.labelXPoints);
            this.groupScanArea.Controls.Add(this.textYMax);
            this.groupScanArea.Controls.Add(this.labelYMax);
            this.groupScanArea.Controls.Add(this.textXMax);
            this.groupScanArea.Controls.Add(this.labelXMax);
            this.groupScanArea.Controls.Add(this.textYMin);
            this.groupScanArea.Controls.Add(this.labelYMin);
            this.groupScanArea.Controls.Add(this.textXMin);
            this.groupScanArea.Controls.Add(this.labelXMin);
            this.groupScanArea.Location = new System.Drawing.Point(13, 13);
            this.groupScanArea.Name = "groupScanArea";
            this.groupScanArea.Size = new System.Drawing.Size(194, 217);
            this.groupScanArea.TabIndex = 0;
            this.groupScanArea.TabStop = false;
            this.groupScanArea.Text = "Scan Area";
            //
            // buttonMeasureHeights
            //
            this.buttonMeasureHeights.Location = new System.Drawing.Point(10, 180);
            this.buttonMeasureHeights.Name = "buttonMeasureHeights";
            this.buttonMeasureHeights.Size = new System.Drawing.Size(150, 23);
            this.buttonMeasureHeights.TabIndex = 6;
            this.buttonMeasureHeights.Text = "Measure heights";
            this.buttonMeasureHeights.UseVisualStyleBackColor = true;
            this.buttonMeasureHeights.Click += new System.EventHandler(this.buttonMeasureHeights_Click);
            //
            // textYPoints
            //
            this.textYPoints.Location = new System.Drawing.Point(60, 150);
            this.textYPoints.Name = "textYPoints";
            this.textYPoints.Size = new System.Drawing.Size(100, 20);
            this.textYPoints.TabIndex = 5;
            this.textYPoints.Text = "8";
            //
            // labelYPoints
            //
            this.labelYPoints.AutoSize = true;
            this.labelYPoints.Location = new System.Drawing.Point(7, 153);
            this.labelYPoints.Name = "labelYPoints";
            this.labelYPoints.Size = new System.Drawing.Size(49, 13);
            this.labelYPoints.TabIndex = 0;
            this.labelYPoints.Text = "Y-Points:";
            //
            // textXPoints
            //
            this.textXPoints.Location = new System.Drawing.Point(60, 124);
            this.textXPoints.Name = "textXPoints";
            this.textXPoints.Size = new System.Drawing.Size(100, 20);
            this.textXPoints.TabIndex = 4;
            this.textXPoints.Text = "8";
            //
            // labelXPoints
            //
            this.labelXPoints.AutoSize = true;
            this.labelXPoints.Location = new System.Drawing.Point(7, 127);
            this.labelXPoints.Name = "labelXPoints";
            this.labelXPoints.Size = new System.Drawing.Size(49, 13);
            this.labelXPoints.TabIndex = 0;
            this.labelXPoints.Text = "X-Points:";
            //
            // textYMax
            //
            this.textYMax.Location = new System.Drawing.Point(60, 98);
            this.textYMax.Name = "textYMax";
            this.textYMax.Size = new System.Drawing.Size(100, 20);
            this.textYMax.TabIndex = 3;
            this.textYMax.Tag = "";
            this.textYMax.Text = "80";
            //
            // labelYMax
            //
            this.labelYMax.AutoSize = true;
            this.labelYMax.Location = new System.Drawing.Point(7, 101);
            this.labelYMax.Name = "labelYMax";
            this.labelYMax.Size = new System.Drawing.Size(39, 13);
            this.labelYMax.TabIndex = 0;
            this.labelYMax.Text = "Y-max:";
            //
            // textXMax
            //
            this.textXMax.Location = new System.Drawing.Point(60, 72);
            this.textXMax.Name = "textXMax";
            this.textXMax.Size = new System.Drawing.Size(100, 20);
            this.textXMax.TabIndex = 2;
            this.textXMax.Tag = "";
            this.textXMax.Text = "80";
            //
            // labelXMax
            //
            this.labelXMax.AutoSize = true;
            this.labelXMax.Location = new System.Drawing.Point(7, 75);
            this.labelXMax.Name = "labelXMax";
            this.labelXMax.Size = new System.Drawing.Size(39, 13);
            this.labelXMax.TabIndex = 0;
            this.labelXMax.Text = "X-max:";
            //
            // textYMin
            //
            this.textYMin.Location = new System.Drawing.Point(60, 46);
            this.textYMin.Name = "textYMin";
            this.textYMin.Size = new System.Drawing.Size(100, 20);
            this.textYMin.TabIndex = 1;
            this.textYMin.Text = "-80";
            //
            // labelYMin
            //
            this.labelYMin.AutoSize = true;
            this.labelYMin.Location = new System.Drawing.Point(7, 49);
            this.labelYMin.Name = "labelYMin";
            this.labelYMin.Size = new System.Drawing.Size(36, 13);
            this.labelYMin.TabIndex = 0;
            this.labelYMin.Text = "Y-min:";
            //
            // textXMin
            //
            this.textXMin.Location = new System.Drawing.Point(60, 20);
            this.textXMin.Name = "textXMin";
            this.textXMin.Size = new System.Drawing.Size(100, 20);
            this.textXMin.TabIndex = 0;
            this.textXMin.Text = "-80";
            //
            // labelXMin
            //
            this.labelXMin.AutoSize = true;
            this.labelXMin.Location = new System.Drawing.Point(7, 23);
            this.labelXMin.Name = "labelXMin";
            this.labelXMin.Size = new System.Drawing.Size(36, 13);
            this.labelXMin.TabIndex = 0;
            this.labelXMin.Text = "X-min:";
            //
            // buttonResultToClipboard
            //
            this.buttonResultToClipboard.Enabled = false;
            this.buttonResultToClipboard.Location = new System.Drawing.Point(11, 123);
            this.buttonResultToClipboard.Name = "buttonResultToClipboard";
            this.buttonResultToClipboard.Size = new System.Drawing.Size(150, 23);
            this.buttonResultToClipboard.TabIndex = 0;
            this.buttonResultToClipboard.Text = "Result to Clipboard";
            this.buttonResultToClipboard.UseVisualStyleBackColor = true;
            this.buttonResultToClipboard.Click += new System.EventHandler(this.buttonResultToClipboard_Click);
            //
            // map
            //
            this.map.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
            | System.Windows.Forms.AnchorStyles.Left)
            | System.Windows.Forms.AnchorStyles.Right)));
            this.map.Location = new System.Drawing.Point(213, 12);
            this.map.Name = "map";
            this.map.Size = new System.Drawing.Size(520, 502);
            this.map.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
            this.map.TabIndex = 1;
            this.map.TabStop = false;
            //
            // groupScanResults
            //
            this.groupScanResults.Controls.Add(this.labelZCenterValue);
            this.groupScanResults.Controls.Add(this.labelZAvgValue);
            this.groupScanResults.Controls.Add(this.labelZMaxValue);
            this.groupScanResults.Controls.Add(this.labelZCenter);
            this.groupScanResults.Controls.Add(this.labelZAvg);
            this.groupScanResults.Controls.Add(this.labelZMax);
            this.groupScanResults.Controls.Add(this.labelZMinValue);
            this.groupScanResults.Controls.Add(this.labelZMin);
            this.groupScanResults.Controls.Add(this.buttonResultToClipboard);
            this.groupScanResults.Location = new System.Drawing.Point(12, 236);
            this.groupScanResults.Name = "groupScanResults";
            this.groupScanResults.Size = new System.Drawing.Size(194, 174);
            this.groupScanResults.TabIndex = 2;
            this.groupScanResults.TabStop = false;
            this.groupScanResults.Text = "Scan results";
            //
            // labelZCenterValue
            //
            this.labelZCenterValue.AutoSize = true;
            this.labelZCenterValue.Location = new System.Drawing.Point(101, 90);
            this.labelZCenterValue.Name = "labelZCenterValue";
            this.labelZCenterValue.Size = new System.Drawing.Size(25, 13);
            this.labelZCenterValue.TabIndex = 5;
            this.labelZCenterValue.Text = "???";
            //
            // labelZAvgValue
            //
            this.labelZAvgValue.AutoSize = true;
            this.labelZAvgValue.Location = new System.Drawing.Point(101, 66);
            this.labelZAvgValue.Name = "labelZAvgValue";
            this.labelZAvgValue.Size = new System.Drawing.Size(25, 13);
            this.labelZAvgValue.TabIndex = 5;
            this.labelZAvgValue.Text = "???";
            //
            // labelZMaxValue
            //
            this.labelZMaxValue.AutoSize = true;
            this.labelZMaxValue.Location = new System.Drawing.Point(101, 42);
            this.labelZMaxValue.Name = "labelZMaxValue";
            this.labelZMaxValue.Size = new System.Drawing.Size(25, 13);
            this.labelZMaxValue.TabIndex = 5;
            this.labelZMaxValue.Text = "???";
            //
            // labelZCenter
            //
            this.labelZCenter.AutoSize = true;
            this.labelZCenter.Location = new System.Drawing.Point(11, 90);
            this.labelZCenter.Name = "labelZCenter";
            this.labelZCenter.Size = new System.Drawing.Size(50, 13);
            this.labelZCenter.TabIndex = 4;
            this.labelZCenter.Text = "Z center:";
            //
            // labelZAvg
            //
            this.labelZAvg.AutoSize = true;
            this.labelZAvg.Location = new System.Drawing.Point(11, 66);
            this.labelZAvg.Name = "labelZAvg";
            this.labelZAvg.Size = new System.Drawing.Size(59, 13);
            this.labelZAvg.TabIndex = 4;
            this.labelZAvg.Text = "Z average:";
            //
            // labelZMax
            //
            this.labelZMax.AutoSize = true;
            this.labelZMax.Location = new System.Drawing.Point(11, 42);
            this.labelZMax.Name = "labelZMax";
            this.labelZMax.Size = new System.Drawing.Size(39, 13);
            this.labelZMax.TabIndex = 4;
            this.labelZMax.Text = "Z max:";
            //
            // labelZMinValue
            //
            this.labelZMinValue.AutoSize = true;
            this.labelZMinValue.Location = new System.Drawing.Point(101, 20);
            this.labelZMinValue.Name = "labelZMinValue";
            this.labelZMinValue.Size = new System.Drawing.Size(25, 13);
            this.labelZMinValue.TabIndex = 5;
            this.labelZMinValue.Text = "???";
            //
            // labelZMin
            //
            this.labelZMin.AutoSize = true;
            this.labelZMin.Location = new System.Drawing.Point(11, 20);
            this.labelZMin.Name = "labelZMin";
            this.labelZMin.Size = new System.Drawing.Size(36, 13);
            this.labelZMin.TabIndex = 4;
            this.labelZMin.Text = "Z min:";
            //
            // BedHeightMap
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(745, 526);
            this.Controls.Add(this.groupScanResults);
            this.Controls.Add(this.map);
            this.Controls.Add(this.groupScanArea);
            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
            this.Name = "BedHeightMap";
            this.Text = "Create height map";
            this.groupScanArea.ResumeLayout(false);
            this.groupScanArea.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.map)).EndInit();
            this.groupScanResults.ResumeLayout(false);
            this.groupScanResults.PerformLayout();
            this.ResumeLayout(false);

        }

        #endregion

        private System.Windows.Forms.GroupBox groupScanArea;
        private System.Windows.Forms.Button buttonResultToClipboard;
        private System.Windows.Forms.Button buttonMeasureHeights;
        private System.Windows.Forms.TextBox textYPoints;
        private System.Windows.Forms.Label labelYPoints;
        private System.Windows.Forms.TextBox textXPoints;
        private System.Windows.Forms.Label labelXPoints;
        private System.Windows.Forms.TextBox textYMax;
        private System.Windows.Forms.Label labelYMax;
        private System.Windows.Forms.TextBox textXMax;
        private System.Windows.Forms.Label labelXMax;
        private System.Windows.Forms.TextBox textYMin;
        private System.Windows.Forms.Label labelYMin;
        private System.Windows.Forms.TextBox textXMin;
        private System.Windows.Forms.Label labelXMin;
        private System.Windows.Forms.PictureBox map;
        private System.Windows.Forms.GroupBox groupScanResults;
        private System.Windows.Forms.Label labelZCenterValue;
        private System.Windows.Forms.Label labelZAvgValue;
        private System.Windows.Forms.Label labelZMaxValue;
        private System.Windows.Forms.Label labelZCenter;
        private System.Windows.Forms.Label labelZAvg;
        private System.Windows.Forms.Label labelZMax;
        private System.Windows.Forms.Label labelZMinValue;
        private System.Windows.Forms.Label labelZMin;
    }
}


text:
package ru.lizaalert.hotline.lib.yp.ui;

import android.content.Context;
import android.util.AttributeSet;
import android.view.ContextThemeWrapper;
import android.widget.ListView;

import ru.lizaalert.hotline.lib.R;

public class YpFastscrollListView extends ListView {
    public YpFastscrollListView(Context context, AttributeSet attrs) {
        super(new ContextThemeWrapper(context, R.style.FastScrollTheme), attrs);
    }
}


text:
package org.elasticsearch.xpack.sql.expression.function.scalar.datetime;

import org.elasticsearch.common.io.stream.Writeable.Reader;
import org.elasticsearch.test.AbstractWireSerializingTestCase;
import org.elasticsearch.xpack.sql.expression.function.scalar.datetime.DateTimeProcessor.DateTimeExtractor;
import org.joda.time.DateTime;
import org.joda.time.DateTimeZone;

import java.io.IOException;
import java.util.TimeZone;

public class DateTimeProcessorTests extends AbstractWireSerializingTestCase<DateTimeProcessor> {
    private static final TimeZone UTC = TimeZone.getTimeZone("UTC");

    public static DateTimeProcessor randomDateTimeProcessor() {
        return new DateTimeProcessor(randomFrom(DateTimeExtractor.values()), UTC);
    }

    @Override
    protected DateTimeProcessor createTestInstance() {
        return randomDateTimeProcessor();
    }

    @Override
    protected Reader<DateTimeProcessor> instanceReader() {
        return DateTimeProcessor::new;
    }

    @Override
    protected DateTimeProcessor mutateInstance(DateTimeProcessor instance) throws IOException {
        DateTimeExtractor replaced = randomValueOtherThan(instance.extractor(), () -> randomFrom(DateTimeExtractor.values()));
        return new DateTimeProcessor(replaced, UTC);
    }

    public void testApply() {
        DateTimeProcessor proc = new DateTimeProcessor(DateTimeExtractor.YEAR, UTC);
        assertEquals(1970, proc.process(new DateTime(0L, DateTimeZone.UTC)));
        assertEquals(2017, proc.process(new DateTime(2017, 01, 02, 10, 10, DateTimeZone.UTC)));

        proc = new DateTimeProcessor(DateTimeExtractor.DAY_OF_MONTH, UTC);
        assertEquals(1, proc.process(new DateTime(0L, DateTimeZone.UTC)));
        assertEquals(2, proc.process(new DateTime(2017, 01, 02, 10, 10, DateTimeZone.UTC)));
        assertEquals(31, proc.process(new DateTime(2017, 01, 31, 10, 10, DateTimeZone.UTC)));
    }
}


text:
"""
    Swaggy Jenkins

    Jenkins API clients generated from Swagger / Open API specification  # noqa: E501

    The version of the OpenAPI document: 1.5.1-pre.0
    Contact: blah@cliffano.com
    Generated by: https://openapi-generator.tech
"""

import unittest

import openapi_client
from openapi_client.model.queue_blocked_item import QueueBlockedItem

class TestQueueBlockedItem(unittest.TestCase):
    """QueueBlockedItem unit test stubs"""

    def setUp(self):
        pass

    def tearDown(self):
        pass

    def test_QueueBlockedItem(self):
        """Test QueueBlockedItem"""
        # FIXME: construct object with mandatory attributes with example values
        # model = QueueBlockedItem()  # noqa: E501
        pass

if __name__ == '__main__':
    unittest.main()


text:
#import "PFObjectFilePersistenceController.h"

#import "BFTask+Private.h"
#import "PFAssert.h"
#import "PFJSONSerialization.h"
#import "PFMacros.h"
#import "PFObjectFileCoder.h"
#import "PFObjectPrivate.h"
#import "PFPersistenceController.h"

@implementation PFObjectFilePersistenceController

///--------------------------------------
#pragma mark - Init
///--------------------------------------

- (instancetype)initWithDataSource:(id<PFPersistenceControllerProvider>)dataSource {
    self = [super init];
    if (!self) return nil;

    _dataSource = dataSource;

    return self;
}

+ (instancetype)controllerWithDataSource:(id<PFPersistenceControllerProvider>)dataSource {
    return [[self alloc] initWithDataSource:dataSource];
}

///--------------------------------------
#pragma mark - Objects
///--------------------------------------

- (BFTask<PFObject *> *)loadPersistentObjectAsyncForKey:(NSString *)key {
    return [[self _getPersistenceGroupAsync] continueWithSuccessBlock:^id(BFTask<id<PFPersistenceGroup>> *task) {
        id<PFPersistenceGroup> group = task.result;
        __block PFObject *object = nil;
        return [[[[[group beginLockedContentAccessAsyncToDataForKey:key] continueWithSuccessBlock:^id(BFTask *_) {
            return [group getDataAsyncForKey:key];
        }] continueWithSuccessBlock:^id(BFTask *task) {
            NSData *data = task.result;
            if (data) {
                object = [PFObjectFileCoder objectFromData:data usingDecoder:[PFDecoder objectDecoder]];
            }
            return nil;
        }] continueWithBlock:^id(BFTask *task) {
            return [group endLockedContentAccessAsyncToDataForKey:key];
        }] continueWithSuccessBlock:^id(BFTask *task) {
            // Finalize everything with object pointer.
            return object;
        }];
    }];
}

- (BFTask *)persistObjectAsync:(PFObject *)object forKey:(NSString *)key {
    return [[self _getPersistenceGroupAsync] continueWithSuccessBlock:^id(BFTask<id<PFPersistenceGroup>> *task) {
        id<PFPersistenceGroup> group = task.result;
        return [[[group beginLockedContentAccessAsyncToDataForKey:key] continueWithSuccessBlock:^id(BFTask *_) {
            NSData *data = [PFObjectFileCoder dataFromObject:object usingEncoder:[PFPointerObjectEncoder objectEncoder]];
            return [group setDataAsync:data forKey:key];
        }] continueWithBlock:^id(BFTask *task) {
            return [group endLockedContentAccessAsyncToDataForKey:key];
        }];
    }];
}

- (BFTask *)removePersistentObjectAsyncForKey:(NSString *)key {
    return [[self _getPersistenceGroupAsync] continueWithSuccessBlock:^id(BFTask<id<PFPersistenceGroup>> *task) {
        id<PFPersistenceGroup> group = task.result;
        return [[[group beginLockedContentAccessAsyncToDataForKey:key] continueWithSuccessBlock:^id(BFTask *_) {
            return [group removeDataAsyncForKey:key];
        }] continueWithBlock:^id(BFTask *_) {
            return [group endLockedContentAccessAsyncToDataForKey:key];
        }];
    }];
}

///--------------------------------------
#pragma mark - Private
///--------------------------------------

- (BFTask<id<PFPersistenceGroup>> *)_getPersistenceGroupAsync {
    return [self.dataSource.persistenceController getPersistenceGroupAsync];
}

@end


text:
package com.airbnb.lottie;

import org.json.JSONObject;

import java.util.List;

class AnimatableIntegerValue extends BaseAnimatableValue<Integer, Integer> {
  private AnimatableIntegerValue(LottieComposition composition, Integer initialValue) {
    super(composition, initialValue);
  }

  private AnimatableIntegerValue(List<Keyframe<Integer>> keyframes, LottieComposition composition,
      Integer initialValue) {
    super(keyframes, composition, initialValue);
  }

  @Override public KeyframeAnimation<Integer> createAnimation() {
    if (!hasAnimation()) {
      return new StaticKeyframeAnimation<>(initialValue);
    }

    return new IntegerKeyframeAnimation(keyframes);
  }

  public Integer getInitialValue() {
    return initialValue;
  }

  static final class Factory {
    private Factory() {
    }

    static AnimatableIntegerValue newInstance(LottieComposition composition, Integer initialValue) {
      return new AnimatableIntegerValue(composition, initialValue);
    }

    static AnimatableIntegerValue newInstance(JSONObject json, LottieComposition composition,
        boolean isDp, boolean remap100To255) {
      float scale = isDp ? composition.getDpScale() : 1f;
      AnimatableValueParser.Result<Integer> result = AnimatableValueParser
          .newInstance(json, scale, composition, ValueFactory.INSTANCE)
          .parseJson();
      Integer initialValue = result.initialValue;
      if (remap100To255 && result.initialValue != null) {
        initialValue = result.initialValue * 255 / 100;
        int size = result.keyframes.size();
        for (int i = 0; i < size; i++) {
          Keyframe<Integer> keyframe = result.keyframes.get(i);
          keyframe.startValue = keyframe.startValue * 255 / 100;
          keyframe.endValue = keyframe.endValue * 255 / 100;
        }
      }
      return new AnimatableIntegerValue(result.keyframes, composition, initialValue);
    }
  }

  private static class ValueFactory implements AnimatableValue.Factory<Integer> {
    private static final ValueFactory INSTANCE = new ValueFactory();

    private ValueFactory() {
    }

    @Override public Integer valueFromObject(Object object, float scale) {
      return Math.round(JsonUtils.valueFromObject(object) * scale);
    }
  }
}


text:
package io.permazen.parse.expr;

import com.google.common.base.Preconditions;

import io.permazen.parse.ParseException;
import io.permazen.parse.ParseSession;
import io.permazen.parse.ParseUtil;
import io.permazen.parse.SpaceParser;
import io.permazen.util.ParseContext;

import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.List;

/**
 * Node representing a literal array instantiation expression, i.e., with curly braces initial values.
 */
public class LiteralArrayNode extends AbstractArrayNode {

    private final List<?> initialValue;

    /**
     * Constructor.
     *
     * @param baseTypeNode array base type class node
     * @param numDimensions number of array dimensions
     * @param initialValue array initial value; each element in the list is either a {@link List} (all but the last dimension)
     *  or a {@code Node} (last dimension)
     */
    public LiteralArrayNode(ClassNode baseTypeNode, int numDimensions, List<?> initialValue) {
        super(baseTypeNode, numDimensions);
        this.initialValue = initialValue;
    }

    @Override
    public Value evaluate(final ParseSession session) {
        final Class<?> elemType = ParseUtil.getArrayClass(this.getBaseType(session), this.numDimensions - 1);
        return new ConstValue(LiteralArrayNode.createLiteral(session, elemType, this.initialValue));
    }

    private static Object createLiteral(ParseSession session, Class<?> elemType, List<?> values) {
        final int length = values.size();
        final Object array = Array.newInstance(elemType, length);
        for (int i = 0; i < length; i++) {
            if (elemType.isArray())
                Array.set(array, i, LiteralArrayNode.createLiteral(session, elemType.getComponentType(), (List<?>)values.get(i)));
            else {
                try {
                    Array.set(array, i, ((Node)values.get(i)).evaluate(session).get(session));
                } catch (Exception e) {
                    throw new EvalException("error setting array value: " + e, e);
                }
            }
        }
        return array;
    }

    /**
     * Parse an array literal initial value expression.
     *
     * @param session parse session
     * @param ctx input to parse
     * @param complete false if parse is "for real", true if only for tab completion calculation
     * @param dims number of array dimensions
     * @return list of array elements, possibly nested
     * @throws IllegalArgumentException if {@code dims} is less than one
     */
    public static List<?> parseArrayLiteral(ParseSession session, ParseContext ctx, boolean complete, int dims) {
        Preconditions.checkArgument(dims >= 1, "dims < 1");
        final SpaceParser spaceParser = new SpaceParser();
        final ArrayList<Object> list = new ArrayList<>();
        spaceParser.parse(ctx, complete);
        if (!ctx.tryLiteral("{"))
            throw new ParseException(ctx).addCompletion("{ ");
        spaceParser.parse(ctx, complete);
        if (ctx.tryLiteral("}"))
            return list;
        while (true) {
            list.add(dims > 1 ?
              LiteralArrayNode.parseArrayLiteral(session, ctx, complete, dims - 1) :
              ExprParser.INSTANCE.parse(session, ctx, complete));
            ctx.skipWhitespace();
            if (ctx.tryLiteral("}"))
                break;
            if (!ctx.tryLiteral(","))
                throw new ParseException(ctx, "expected `,'").addCompletion(", ");
            spaceParser.parse(ctx, complete);
        }
        return list;
    }
}


text:
@interface ZIKQueryResponse()

@property (nonatomic, retain, readwrite) NSArray *links;
@property (nonatomic, retain, readwrite) NSString *server;
@property (nonatomic, retain, readwrite) NSString *ql;

@end

@implementation ZIKQueryResponse

-(instancetype) initWithDictionary:(NSDictionary *) data {
    NSLog(@"Props: %@", data[@"properties"]);
    if (self = [super init]) {
        self.server = data[@"properties"][@"name"];
        self.ql = data[@"properties"][@"ql"];
        NSMutableArray *links = [[NSMutableArray alloc] init];

        for (NSDictionary *linkData in data[@"links"]) {
            ZIKLink *link = [ZIKLink initWithDictionary:linkData];
            [links addObject:link];
        }

        self.links = [NSArray arrayWithArray:links];

        if ([data objectForKey:@"entities"] != nil) {
            NSMutableArray *devices = [[NSMutableArray alloc] init];
            for (NSDictionary *deviceData in data[@"entities"]) {
                [devices addObject:[ZIKDevice initWithDictionary:deviceData]];
            }
            self.devices = [NSArray arrayWithArray:devices];
        }
    }

    return self;
}

+(instancetype) initWithDictionary:(NSDictionary *) data {
    return [[ZIKQueryResponse alloc] initWithDictionary:data];
}

-(ZIKStream *) resultsStream {
    NSPredicate *pred = [NSPredicate predicateWithFormat:@"rel CONTAINS %@", @"http://rels.zettajs.io/query"];
    NSArray *filteredStreams = [self.links filteredArrayUsingPredicate:pred];
    if ([filteredStreams count] != 0) {
        ZIKLink *entry = filteredStreams[0];
        return [ZIKStream initWithLink:entry];
    } else {
        return nil;
    }
}

- (NSString *)description {
    return [NSString stringWithFormat:@"<ZIKQueryResponse %@ against %@>", self.ql, self.server];
}

@end


text:
/*jshint unused:false */

var trueFunc = function () {
    return true;
};
var profile = {
    basePath: '../src',
    action: 'release',
    cssOptimize: 'comments',
    mini: true,
    optimize: false,
    layerOptimize: false,
    selectorEngine: 'acme',
    layers: {
        'dojo/dojo': {
            include: [
                'dojo/i18n',
                'dojo/domReady',
                'app/run',
                'app/App',
                'dojox/gfx/filters',
                'dojox/gfx/path',
                'dojox/gfx/svg',
                'dojox/gfx/svgext',
                'dojox/gfx/shape'
            ],
            targetStylesheet: 'app/resources/App.css',
            includeLocales: ['en-us'],
            customBase: true,
            boot: true
        }
    },
    packages: [{
        name: 'moment',
        location: 'moment',
        main: 'moment',
        trees: [
          // don't bother with .hidden, tests, min, src, and templates
          ['.', '.', /(\/\.)|(~$)|(test|txt|src|min|templates)/]
        ],
        resourceTags: {
            amd: function (filename, mid) {
                return /\.js$/.test(filename);
            }
        }
    }],
    map: {
        'esri': {
            dgrid: 'dgrid0.3'
        }
    },
    staticHasFeatures: {
        // The trace & log APIs are used for debugging the loader, so we don't need them in the build
        'dojo-trace-api': 0,
        'dojo-log-api': 0,

        // This causes normally private loader data to be exposed for debugging, so we don't need that either
        'dojo-publish-privates': 0,

        // We're fully async, so get rid of the legacy loader
        'dojo-sync-loader': 0,

        // dojo-xhr-factory relies on dojo-sync-loader
        'dojo-xhr-factory': 0,

        // We aren't loading tests in production
        'dojo-test-sniff': 0
    },
    plugins: {
        'xstyle/css': 'xstyle/build/amd-css'
    },
    userConfig: {
        packages: ['app', 'dijit', 'dojox', 'agrc', 'ijit', 'esri', 'layer-selector']
    }
};


text:
layout: page
title: Shade Foundation Award Ceremony
date: 2016-05-24
author: Rachel Beard
tags: weekly links, java
status: published
summary: Nunc at nisi arcu. Nulla mattis.
banner: images/banner/leisure-01.jpg
booking:
  startDate: 05/14/2016
  endDate: 05/19/2016
  ctyhocn: HIBHXHX
  groupCode: SFAC
published: true
---
Morbi rutrum vehicula magna, et semper turpis pharetra sit amet. Proin orci metus, tristique id tristique et, ultricies id odio. Nam dictum, sapien a dignissim molestie, lorem arcu ornare metus, eu bibendum ligula massa in nibh. Integer nec eros tortor. Phasellus tempus, diam non sollicitudin posuere, ante orci feugiat arcu, at fermentum eros leo vitae lorem. Integer nulla turpis, malesuada in gravida porta, varius quis lacus. Pellentesque in nibh a lacus convallis cursus. Suspendisse bibendum interdum lectus. Integer luctus id ante et sollicitudin. Proin eleifend odio odio, sed facilisis ex iaculis quis. Maecenas faucibus metus eros, et placerat justo ultrices at. Phasellus dictum fermentum erat vitae scelerisque. Nulla eu porttitor dui, et convallis lorem. Sed tincidunt vitae felis sed vehicula. Phasellus at consectetur felis.

* Nam in nibh finibus, imperdiet risus nec, elementum sem
* Vestibulum sed lorem scelerisque, tincidunt urna eu, suscipit purus
* Vivamus quis nibh id tellus placerat sodales.

Etiam placerat tellus in urna pellentesque ullamcorper. Ut non egestas sem. Sed lectus massa, pellentesque a venenatis at, consectetur quis massa. Sed dictum quam id ante blandit condimentum. Donec elementum purus leo, sit amet eleifend tellus molestie nec. Phasellus feugiat vehicula tincidunt. Quisque eget nibh sed ex elementum aliquet. Mauris porttitor elit ac pharetra sodales. Sed mollis sem tellus, in blandit lectus venenatis ac. Suspendisse elit felis, accumsan nec mollis eu, molestie at tortor. Aliquam et justo accumsan, tempor ante id, hendrerit ligula. Nam sed bibendum lectus. Suspendisse luctus lorem tortor, a aliquet est ornare sit amet.


text:
AIOrchestra. OpenSource OpenStack TOSCA orchestration
=====================================================

What is TOSCA?
--------------

The TOSCA Simple Profile in `YAML`_ specifies a rendering of TOSCA which aims
to provide a more accessible syntax as well as a more concise and incremental
expressiveness of the TOSCA DSL in order to minimize the learning curve and
speed the adoption of the use of TOSCA to portably describe cloud applications.
This proposal describes a `YAML`_ rendering for TOSCA. `YAML`_ is a human friendly data
serialization standard with a syntax much easier to read and edit
than XML. As there are a number of DSLs encoded in `YAML`_, a `YAML`_ encoding of the TOSCA
DSL makes TOSCA more accessible by these communities.
This proposal prescribes an isomorphic rendering in `YAML`_ of a subset of the
TOSCA v1.0 ensuring that TOSCA semantics are preserved and can be transformed
from XML to `YAML`_ or from `YAML`_ to XML. Additionally, in order to streamline the
expression of TOSCA semantics, the `YAML`_ rendering is sought to be more concise and
compact through the use of the `YAML`_ syntax.

More information can be regarding TOSCA simple profile can be found at its `home page`_.

What is OpenStack?
------------------

Feel free to find lots of articles and posts regarding this question.
But the most authoritative is `OpenStack official web site`_.

.. _YAML: http://yaml.org/
.. _home page: http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/TOSCA-Simple-Profile-YAML-v1.0.pdf
.. _OpenStack official web site: https://opensource.com/resources/what-is-openstack


text:
{% extends "app.html" %}
{% load flatpages %}

{% block page_title %}
    {% get_flatpages '/account/' as account_pages %}
    {% for account_page in account_pages %}
        {{ account_page.title }}
    {% endfor %}
{% endblock %}

{% block extrascript %}
{{ block.super }}

{% endblock %}

{% block content_main %}

Manage Profile

        {% include "base/includes/messages.html" %}

Info

Social

IM

Team

Contact Us

        <form class="form-horizontal" action="" method="post">
            {{account_form}}
            <input type="submit" class="btn btn-primary" data-loading-text="saving..." name="_account" value="Save changes">
            {% csrf_token %}
        </form>

Social Networks

Adding social networks will let you message your followers and fans from Vumi

Add your Facebook profile

This will allow you to post messages to your wall.

                    This is still being developed and will become available here
                    immediately when released.

Add your Twitter profile

This will allow you to tweet on your twitter timeline.

                    This is still being developed and will become available here
                    immediately when released.

Instant Messaging

Adding instant messaging services will let you send instant chat messages to friends and contacts.

        <form class="well col-md-5">

GTalk ID

                Shortly we will allow you to provide your own Jabber / GTalk account
                to use for messaging with Vumi.

        </form>

        <form class="well col-md-5">

Facebook Chat

                Shortly we will allow you to connect your Facebook account
                to use for messaging with Vumi.

        </form>

Email Messaging

Adding email messaging services will let you send simple messages to your email contacts

        <form class="form-horizontal">
                  <fieldset>

                      From Address

                        <input type="text" class="input-xlarge" id="input01" value="gustav@praekelt.com">

                      Reply-to Address

                        <input type="text" class="input-xlarge" id="input02" value="gustav@praekelt.com">

                      From Name

                        <input type="text" class="input-xlarge" id="input03" value="Praekelt Group">

                    <button type="submit" class="btn btn-primary" data-loading-text="saving...">Save changes</button>
                  </fieldset>
                </form>

Account Owner

            Account Owner

          {{user_profile}}
            {{user_profile.user.username}}

Team Members

        <form>

            Current Team Members

            None yet

        </form>

            <form method="post" action="">

Contact Us

                <fieldset>
                    {% for field in email_form.visible_fields %}

                                {{field.label}}

                                {{field}}

                                    {% if field.errors %}
                                        {{field.errors|join:" "}}
                                    {% endif %}
                                    {% if field.help_text %}
                                        ({{field.help_text}})
                                    {% endif %}

                    {% endfor %}

<input type="submit" class="btn btn-primary" name="_email" value="Send Email →">

<input type="reset" class="btn btn-default" value="Cancel">

                </fieldset>
                {% csrf_token %}
            </form>

{% endblock %}


text:
<?php
namespace SN\AnimeBundle\Entity;
use Doctrine\ORM\EntityRepository;
use Doctrine\ORM\Tools\Pagination\Paginator;
/**
 * AnimeRepository
 *
 * This class was generated by the Doctrine ORM. Add your own custom
 * repository methods below.
 */

class AnimeRepository extends EntityRepository
{
public function getAnimes($page, $nbPerPage)

  {

    $query = $this->createQueryBuilder('a')

      ->leftJoin('a.image', 'i')

      ->addSelect('i')

      ->orderBy('a.dateajout', 'DESC')

      ->getQuery()

    ;

    $query

      // On définit l'annonce à partir de laquelle commencer la liste

      ->setFirstResult(($page-1) * $nbPerPage)

      // Ainsi que le nombre d'annonce à afficher sur une page

      ->setMaxResults($nbPerPage)

    ;

    // Enfin, on retourne l'objet Paginator correspondant à la requéte construite

    // (n'oubliez pas le use correspondant en début de fichier)

    return new Paginator($query, true);

  }
}


text:
const chai = require('chai');

chai.config.includeStack = false;
chai.config.showDiff = false;

console.log(JSON.stringify(chai.config));

const exists = (expected, message) => {
    if( expected === null || expected === 'undefined') {
        throw new Error(message);
    }
};

const isObject = (expected, message) => {
    if( typeof expected === 'object') {
        throw new Error(message);
    }
};

module.exports = {
    "assert" : chai.assert
    /*
    "assert" : {
        "exists" : exists,
        "isObject" : isObject
    }*/
};


text:
class LwoInputFile : public IffInputFile {
public:
  LwoInputFile();
  ~LwoInputFile();

  INLINE double get_lwo_version() const;
  INLINE void set_lwo_version(double version);

  int get_vx();
  LVecBase3 get_vec3();
  Filename get_filename();

protected:
  virtual IffChunk *make_new_chunk(IffId id);

private:
  double _lwo_version;

public:
  virtual TypeHandle get_type() const {
    return get_class_type();
  }
  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
  static TypeHandle get_class_type() {
    return _type_handle;
  }
  static void init_type() {
    IffInputFile::init_type();
    register_type(_type_handle, "LwoInputFile",
                  IffInputFile::get_class_type());
  }

private:
  static TypeHandle _type_handle;
};

#include "lwoInputFile.I"

#endif


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.dataprotection.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** Parameters in Policy. */
@Fluent
public final class PolicyParameters {
    @JsonIgnore private final ClientLogger logger = new ClientLogger(PolicyParameters.class);

    /*
     * Gets or sets the DataStore Parameters
     */
    @JsonProperty(value = "dataStoreParametersList")
    private List<DataStoreParameters> dataStoreParametersList;

    /**
     * Get the dataStoreParametersList property: Gets or sets the DataStore Parameters.
     *
     * @return the dataStoreParametersList value.
     */
    public List<DataStoreParameters> dataStoreParametersList() {
        return this.dataStoreParametersList;
    }

    /**
     * Set the dataStoreParametersList property: Gets or sets the DataStore Parameters.
     *
     * @param dataStoreParametersList the dataStoreParametersList value to set.
     * @return the PolicyParameters object itself.
     */
    public PolicyParameters withDataStoreParametersList(List<DataStoreParameters> dataStoreParametersList) {
        this.dataStoreParametersList = dataStoreParametersList;
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (dataStoreParametersList() != null) {
            dataStoreParametersList().forEach(e -> e.validate());
        }
    }
}


text:
package me.legrange.panstamp.definition;

/**
 * The size of a data point (endpoint or parameter).
 *
 * @since 1.0
 * @author Gideon le Grange https://github.com/GideonLeGrange *
 */
public final class Size {

    public enum Type { BITS, BYTES; }

    public Size(int sizeByte) {
        this(sizeByte, 0);
    }

    public Size(int sizeByte, int sizeBit) {
        if (sizeBit == 0) {
            type = Type.BYTES;
        }
        else {
            type = Type.BITS;
        }
        this.sizeByte = sizeByte;
        this.sizeBit = sizeBit;
    }

    /** Get the type of this size (is it in bytes or bits).
     *
     * @return The type.
     */
    public Type getType() {
        return type;
    }

    /** Get the number of bytes defined by this size.
     *
     * @return The size in bytes.
     */
    public int getBytes() {
        return sizeByte;
    }

    /** Get the number of bits defined by this size.
     *
     * @return The size in bits.
     */
    public int getBits() {
        return sizeBit;
    }

    private final int sizeByte;
    private final int sizeBit;
    private final Type type;
}


text:
Extracting of Ariel data (events, flows and simulated arcs) out of a Qradar system through a JDBC driver.

Overview
=======

This project aims to implement and deliver a JDBC compliant Java driver project for exposing Ariel data via AQL queries, from a QRadar system.  The project is only compatible with QRadar v7.2.4+.

The usage of the project's built driver jar, is as per standard JDBC Java coded constructs; or with use in conjunction with SQL client tools or reporting engines which support custom drivers (e.g. Birt, Jasper, SqlSquirell, Crystal Reports ...)

These driver and project source code come without warranties of any kind.

Any issues discovered using the samples should not be directed to QRadar support, but be reported on the Github issues tracker.

The driver does not aim to be fully compliant to the JDBC specification; but aims to allow QRadar Advance Query Lanaguage (AQL) sql statements to be run against a QRadar system, to return readonly datasets; whilst progressively implement improved compliance against the JDBC spec.

Development notes
=============
## PRE-REQUISITES

1. git 1.7.1 (or later) - http://git-scm.com/downloads
2. maven 3.2.2 (or later) - http://maven.apache.org/download.cgi
3. Java JDK (1.7+) - http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

### CLONE:
```
git clone https://github.com/ibm-security-intelligence/jdbc-driver.git
```

### USEFUL COMMANDS:

#### 1) BUILD, (with no tests), PACKAGE the driver jar:
```
mvn -Dmaven.test.skip=true clean package
```

If you want to both build AND run the test suite, or portions of the test suite.  You will need to edit all the *Test.properties files under the <jdbc-driver>/src/test directory amending all the properties in each file to suite your QRadar environment.  The username/password combination must be a valid Qradar user, attached to a User Role, defined with both Log Activity and Network Activity privileges granted.  For testing convenience, use the Qradar admin user for connection.

```
ip=localhost
user=admin
password=password
url=jdbc:qradar://localhost/
```

#### 2) BUILD, Run ALL Tests, PACKAGE the driver jar:
```
mvn clean package
```

#### 2) BUILD, Run Specific Test
```
mvn  -Dtest=SomeTestClass#someTestMethod test
```

### OUTPUT

- <jdbc-driver>/target/jaql-0.1.jar
- <jdbc-driver>/target/jaql-0.1-jar-with-dependencies.jar

Use the resulting **jaql-0.1-jar-with-dependencies.jar** as your jdbc driver, with your reporting engine / SQL client of choice to connect to an Ariel datastore.

Usage
=====
Key notes for usage:

- **main Driver class**: com.ibm.si.jaql.Driver
- **url**: jdbc:qradar://<<<Qradar-Console>>>/
- **username**:  <<<admin-user>>>
- **password**:  <<<admin-user-password>>>

AQL SQL Syntax
==============
The publicly available documenettation stack for IBM's Qradar Security Intellience Platform, includes a reference section for Qradar's Ariel Database Query Language.

- http://www-01.ibm.com/support/knowledgecenter/SS42VS_7.2.4/com.ibm.qradar.doc_7.2.4/c_aql_intro.html?lang=en


text:
module Rogguer
  require_relative 'enemy'

  module Sprites
    class Water < Enemy
      def enemy?
        true
      end

      def fightable?
        false
      end

      def passable?
        true
      end
    end
  end
end


text:
package tracer

import (
	"bytes"
	"encoding/json"
	"fmt"
	"math"
	"net/http"
	"runtime"
	"time"

	"gopkg.in/DataDog/dd-trace-go.v1/internal/globalconfig"
	"gopkg.in/DataDog/dd-trace-go.v1/internal/log"
	"gopkg.in/DataDog/dd-trace-go.v1/internal/version"
)

const (
	unknown = "unknown"
)

// startupInfo contains various information about the status of the tracer on startup.
type startupInfo struct {
	Date                  string            `json:"date"`                    // ISO 8601 date and time of start
	OSName                string            `json:"os_name"`                 // Windows, Darwin, Debian, etc.
	OSVersion             string            `json:"os_version"`              // Version of the OS
	Version               string            `json:"version"`                 // Tracer version
	Lang                  string            `json:"lang"`                    // "Go"
	LangVersion           string            `json:"lang_version"`            // Go version, e.g. go1.13
	Env                   string            `json:"env"`                     // Tracer env
	Service               string            `json:"service"`                 // Tracer Service
	AgentURL              string            `json:"agent_url"`               // The address of the agent
	AgentError            string            `json:"agent_error"`             // Any error that occurred trying to connect to agent
	Debug                 bool              `json:"debug"`                   // Whether debug mode is enabled
	AnalyticsEnabled      bool              `json:"analytics_enabled"`       // True if there is a global analytics rate set
	SampleRate            string            `json:"sample_rate"`             // The default sampling rate for the rules sampler
	SamplingRules         []SamplingRule    `json:"sampling_rules"`          // Rules used by the rules sampler
	SamplingRulesError    string            `json:"sampling_rules_error"`    // Any errors that occurred while parsing sampling rules
	Tags                  map[string]string `json:"tags"`                    // Global tags
	RuntimeMetricsEnabled bool              `json:"runtime_metrics_enabled"` // Whether or not runtime metrics are enabled
	HealthMetricsEnabled  bool              `json:"health_metrics_enabled"`  // Whether or not health metrics are enabled
	ApplicationVersion    string            `json:"dd_version"`              // Version of the user's application
	Architecture          string            `json:"architecture"`            // Architecture of host machine
	GlobalService         string            `json:"global_service"`          // Global service string. If not-nil should be same as Service. (#614)
	LambdaMode            string            `json:"lambda_mode"`             // Whether or not the client has enabled lambda mode
	AgentFeatures         agentFeatures     `json:"agent_features"`          // Lists the capabilities of the agent.
}

// checkEndpoint tries to connect to the URL specified by endpoint.
// If the endpoint is not reachable, checkEndpoint returns an error
// explaining why.
func checkEndpoint(endpoint string) error {
	req, err := http.NewRequest("POST", endpoint, bytes.NewReader([]byte{0x90}))
	if err != nil {
		return fmt.Errorf("cannot create http request: %v", err)
	}
	req.Header.Set(traceCountHeader, "0")
	req.Header.Set("Content-Type", "application/msgpack")
	_, err = defaultClient.Do(req)
	if err != nil {
		return err
	}
	return nil
}

// logStartup generates a startupInfo for a tracer and writes it to the log in
// JSON format.
func logStartup(t *tracer) {
	tags := make(map[string]string)
	for k, v := range t.config.globalTags {
		tags[k] = fmt.Sprintf("%v", v)
	}

	info := startupInfo{
		Date:                  time.Now().Format(time.RFC3339),
		OSName:                osName(),
		OSVersion:             osVersion(),
		Version:               version.Tag,
		Lang:                  "Go",
		LangVersion:           runtime.Version(),
		Env:                   t.config.env,
		Service:               t.config.serviceName,
		AgentURL:              t.config.transport.endpoint(),
		Debug:                 t.config.debug,
		AnalyticsEnabled:      !math.IsNaN(globalconfig.AnalyticsRate()),
		SampleRate:            fmt.Sprintf("%f", t.rulesSampling.globalRate),
		SamplingRules:         t.rulesSampling.rules,
		Tags:                  tags,
		RuntimeMetricsEnabled: t.config.runtimeMetrics,
		HealthMetricsEnabled:  t.config.runtimeMetrics,
		ApplicationVersion:    t.config.version,
		Architecture:          runtime.GOARCH,
		GlobalService:         globalconfig.ServiceName(),
		LambdaMode:            fmt.Sprintf("%t", t.config.logToStdout),
		AgentFeatures:         t.features.Load(),
	}
	if _, err := samplingRulesFromEnv(); err != nil {
		info.SamplingRulesError = fmt.Sprintf("%s", err)
	}
	if !t.config.logToStdout {
		if err := checkEndpoint(t.config.transport.endpoint()); err != nil {
			info.AgentError = fmt.Sprintf("%s", err)
			log.Warn("DIAGNOSTICS Unable to reach agent intake: %s", err)
		}
	}
	bs, err := json.Marshal(info)
	if err != nil {
		log.Warn("DIAGNOSTICS Failed to serialize json for startup log (%v) %#v\n", err, info)
		return
	}
	log.Info("DATADOG TRACER CONFIGURATION %s\n", string(bs))
}


text:
import { Injectable } from '@angular/core';
import { Http, Response } from '@angular/http';

import 'rxjs/add/operator/map';

@Injectable()
export class MagicApiService {
  private apiUrl = 'https://api.magicthegathering.io/v1/cards';

  constructor(private http: Http) { }

  getCards(restrictions) {
    return this.http.get(this.apiUrl, restrictions).map((res: Response) => res.json());
  }

}


text:
namespace ash {

enum class LoginStatus;
class StatusAreaWidget;

class StatusAreaWidgetTestHelper {
 public:
  StatusAreaWidgetTestHelper() = delete;
  StatusAreaWidgetTestHelper(const StatusAreaWidgetTestHelper&) = delete;
  StatusAreaWidgetTestHelper& operator=(const StatusAreaWidgetTestHelper&) =
      delete;

  static LoginStatus GetUserLoginStatus();

  // Returns the StatusAreaWidget that appears on the primary display.
  static StatusAreaWidget* GetStatusAreaWidget();

  // Returns the StatusAreaWidget that appears on the secondary display.
  static StatusAreaWidget* GetSecondaryStatusAreaWidget();

  // Waits until status area animations are over.
  static void WaitForAnimationEnd(StatusAreaWidget* status_area_widget);

  // Waits until one child view's layer animations are over.
  static void WaitForLayerAnimationEnd(ui::Layer* layer);
};

}  // namespace ash

#endif  // ASH_SYSTEM_STATUS_AREA_WIDGET_TEST_HELPER_H_


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <color name="colorPrimary">#40ADFA</color>
    <color name="colorPrimaryDark">#0298FF</color>
    <color name="colorAccent">#FF4081</color>
</resources>


text:
// File: MapControl.xaml.cs
// Project: ROS_ImageWPF
//
// ROS.NET
// Eric McCann <emccann@cs.uml.edu>
// UMass Lowell Robotics Laboratory
//
// Reimplementation of the ROS (ros.org) ros_cpp client in C#.
//
// Created: 04/28/2015
// Updated: 10/07/2015

#region USINGZ

using System;
using System.Linq;
using System.Threading;
using System.Windows;
using System.Windows.Controls;
using Ros_CSharp;
using d = System.Drawing;
using m = Messages.std_msgs;
using gm = Messages.geometry_msgs;
using nm = Messages.nav_msgs;
using sm = Messages.sensor_msgs;

#endregion

namespace ROS_ImageWPF
{
    /// <summary>
    ///     A WPF Control used for displaying of maps (occupancy grids)
    ///     When added to a XAML file, the width of the map control needs to be set to the desired width, height will be set
    ///     automatically to keep map aspect ratio
    /// </summary>
    public partial class MapControl : UserControl
    {
        public static readonly DependencyProperty TopicProperty = DependencyProperty.Register(
            "Topic",
            typeof (string),
            typeof (MapControl),
            new FrameworkPropertyMetadata(null,
                FrameworkPropertyMetadataOptions.None, (obj, args) =>
                                                           {
                                                               try
                                                               {
                                                                   if (obj is MapControl)
                                                                   {
                                                                       MapControl target = obj as MapControl;
                                                                       target.Topic = (string) args.NewValue;
                                                                       target.DrawMap();
                                                                   }
                                                               }
                                                               catch (Exception e)
                                                               {
                                                                   Console.WriteLine(e);
                                                               }
                                                           }));

        private float actualResolution;
        private NodeHandle imagehandle;
        private float mapHeight;
        private float mapResolution; //in Meters per Pixel
        private Subscriber<nm.OccupancyGrid> mapSub;
        private float mapWidth;
        private Point origin;
        private Thread waitingThread;

        public MapControl()
        {
            InitializeComponent();
        }

        /// <summary>
        ///     Map Resolution in meters per pixel of the actual rendered map
        /// </summary>
        public float ActualResolution
        {
            get { return actualResolution; }
        }

        /// <summary>
        ///     Map Resolution in meters per pixel, (As provided in the map topic, not actual rendered resolution)
        /// </summary>
        public float MapResolution
        {
            get { return mapResolution; }
        }

        /// <summary>
        ///     Map height in pixels (This is the map height as provided in the map topic, not the actual rendered height)
        /// </summary>
        public float MapHeight
        {
            get { return mapHeight; }
        }

        /// <summary>
        ///     Map width in pixels (This is the map width as provided in the map topic, not the actual rendered width)
        /// </summary>
        public float MapWidth
        {
            get { return mapWidth; }
        }

        /// <summary>
        ///     Point set as the origin of the map
        /// </summary>
        public Point Origin
        {
            get { return origin; }
        }

        private string __topic = null;

        /// <summary>
        ///     Map provider topic
        /// </summary>
        public string Topic
        {
            get { return GetValue(TopicProperty) as string; }
            set { SetValue(TopicProperty, (__topic = value)); }
        }

        private void DrawMap()
        {
            lock (this)
            {
                if (!ROS.isStarted())
                {
                    if (waitingThread == null)
                    {
                        waitingThread = new Thread(waitThenSubscribe);
                    }
                    if (!waitingThread.IsAlive)
                    {
                        waitingThread.Start();
                    }
                    return;
                }
            }
            if (!ROS.isStarted() || ROS.shutting_down)
                return;
            SubscribeToMap(Topic);
        }

        private void waitThenSubscribe()
        {
            while (true)
            {
                Thread.Sleep(100);
                lock (this)
                    if (ROS.shutting_down || ROS.isStarted())
                        break;
            }
            lock (this)
                if (ROS.shutting_down)
                    return;
            SubscribeToMap(__topic);
        }

        private void SubscribeToMap(string topic)
        {
            lock (this)
            {
                if (imagehandle == null)
                    imagehandle = new NodeHandle();
                if (mapSub != null && mapSub.topic != topic)
                {
                    mapSub.shutdown();
                    mapSub = null;
                }
                if (mapSub != null)
                    return;
                Console.WriteLine("Subscribing to map at:= " + topic);
                mapSub = imagehandle.subscribe<nm.OccupancyGrid>(topic, 1, i => Dispatcher.Invoke(new Action(() =>
                                                                                {
                                                                                mapResolution = i.info.resolution;
                                                                                mapHeight = i.info.height;
                                                                                mapWidth = i.info.width;
                                                                                if (Width != 0)
                                                                                actualResolution = (mapWidth/(float) Width)*mapResolution;
                                                                                else
                                                                                actualResolution = (mapWidth / (float)ActualWidth) * mapResolution;
                                                                                if (float.IsNaN(actualResolution) || float.IsInfinity(actualResolution))
                                                                                actualResolution = 0;
                                                                                else
                                                                                {
                                                                                MatchAspectRatio();
                                                                                }
                                                                                origin = new Point(i.info.origin.position.x, i.info.origin.position.y);
                                                                                Size size = new Size(i.info.width, i.info.height);
                                                                                byte[] data = createRGBA(i.data);
                                                                                mGenericImage.UpdateImage(data, size, false);
                                                                                data = null;
                                                                                })));
            }
        }

        /// <summary>
        ///     Changes the Height of the control, so that it matches the aspect ratio of the map
        /// </summary>
        private void MatchAspectRatio()
        {
            double mapAspectRatio = mapWidth/(double) mapHeight;
            //Do nothing if map aspect ratio is close enough to control aspect ratio
            if (Math.Abs(Width/Height - mapAspectRatio) < 0.001)
                return;

            //Else, modify control Height to match map aspect ratio
            Height = Width/mapAspectRatio;
        }

        private byte[] createRGBA(sbyte[] map)
        {
            byte[] image = new byte[4*map.Length];
            int count = 0;
            foreach (sbyte j in map)
            {
                switch (j)
                {
                    case -1: ///Unkown occupancy, light gray
                        image[count] = 211;
                        image[count + 1] = 211;
                        image[count + 2] = 211;
                        image[count + 3] = 0xFF;
                        break;
                    case 100: //100% prob of occupancy, dark gray
                        image[count] = 105;
                        image[count + 1] = 105;
                        image[count + 2] = 105;
                        image[count + 3] = 0xFF;
                        break;
                    case 0: //0% prob of occupancy, White
                        image[count] = 255;
                        image[count + 1] = 255;
                        image[count + 2] = 255;
                        image[count + 3] = 0xFF;
                        break;
                    default: //Any other case. (red?)
                        image[count] = 255;
                        image[count + 1] = 0;
                        image[count + 2] = 0;
                        image[count + 3] = 0xFF;
                        break;
                }
                count += 4;
            }
            return image;
        }
    }
}


text:
using System.Collections;
using System.Collections.Generic;
using System.Linq;

namespace FluentSpotifyApi.AuthorizationFlows.Native.AuthorizationCode
{
    /// <summary>
    /// The collection of <see cref="UserClaim"/>.
    /// </summary>
    public class UserClaims : IReadOnlyCollection<UserClaim>
    {
        private IDictionary<string, UserClaim> claims;

        /// <summary>
        /// Initializes a new instance of the <see cref="UserClaims"/> class.
        /// </summary>
        /// <param name="sequence">The sequence of claims.</param>
        public UserClaims(IEnumerable<UserClaim> sequence)
        {
            this.claims = new Dictionary<string, UserClaim>();

            foreach (var item in sequence ?? Enumerable.Empty<UserClaim>())
            {
                this.claims[item.Type] = item;
            }
        }

        /// <summary>
        /// Gets the number of claims.
        /// </summary>
        public int Count => this.claims.Count;

        /// <summary>
        /// Gets claim for give <paramref name="type"/>.
        /// </summary>
        /// <param name="type">The claim type.</param>
        /// <returns></returns>
        public UserClaim this[string type] => this.claims[type];

        /// <summary>
        /// Checks whether claim of given <paramref name="type"/> exists.
        /// </summary>
        /// <param name="type">The claim type.</param>
        /// <returns></returns>
        public bool HasClaim(string type) => this.claims.ContainsKey(type);

        /// <summary>
        /// Gets claim for the given <paramref name="type"/>.
        /// </summary>
        /// <param name="type">The claim type.</param>
        /// <param name="claim">Found claim.</param>
        /// <returns><c>true</c> if user claim was found, <c>false</c> otherwise.</returns>
        public bool TryGetClaim(string type, out UserClaim claim) => this.claims.TryGetValue(type, out claim);

        /// <summary>
        /// Gets claim for the given <paramref name="type"/> or <c>null</c> if claim was not found.
        /// </summary>
        /// <param name="type">The claim type.</param>
        public UserClaim GetClaimOrDefault(string type) => this.TryGetClaim(type, out var claim) ? claim : null;

        /// <summary>
        /// Returns an enumerator that iterates through claims.
        /// </summary>
        public IEnumerator<UserClaim> GetEnumerator() => this.claims.Values.GetEnumerator();

        IEnumerator IEnumerable.GetEnumerator() => this.claims.Values.GetEnumerator();
    }
}


text:
import React, { Ref, useRef, useState } from 'react';
import { Button, Tooltip } from '@material-ui/core';
import { color } from 'src/Css';
import { classes, stylesheet } from 'typestyle';
import ArrowDropDownIcon from '@material-ui/icons/ArrowDropDown';
import ChevronRightIcon from '@material-ui/icons/ChevronRight';

const css = stylesheet({
  defaultFont: {
    fontSize: '1rem',
  },
  dropdown: {
    border: `1px solid ${color.lightGrey}`,
    color: color.grey,
    fontWeight: 400,
    margin: 0,
  },
  dropdownMenu: {
    display: 'block',
    borderRadius: '5px',
    border: `1px solid ${color.lightGrey}`,
    margin: 0,
    padding: '5px 0',
    position: 'absolute',
    top: '100%',
    left: 0,
    minWidth: '10rem',
    cursor: 'pointer',
    backgroundColor: color.background,
    zIndex: 1,
  },
  dropdownElement: {
    padding: '1rem',
    position: 'relative',

    $nest: {
      '&:hover': {
        backgroundColor: `${color.lightGrey}`,
      },
    },
  },
  textContainer: {
    textOverflow: 'ellipsis',
    whiteSpace: 'nowrap',
    maxWidth: '30rem',
    overflow: 'hidden',
    verticalAlign: 'top',
  },
  dropdownSubmenu: {
    left: '100%',
    // Offsets the dropdown menu vertical padding (5px) and border (1px).
    top: '-6px',
  },
  inlineContainer: {
    display: 'inline-block',
  },
  relativeContainer: {
    position: 'relative',
  },
});

const ChevronRightSmallIcon = () => <ChevronRightIcon className={classes(css.defaultFont)} />;

export interface SelectedItem {
  itemName: string;
  subItemName: string;
  subItemSecondaryName?: string;
}

export interface DropdownSubItem {
  name: string;
  secondaryName?: string;
}

export interface DropdownItem {
  name: string;
  subItems: DropdownSubItem[];
}

interface DropdownButtonProps {
  dropdownRef: Ref<HTMLDivElement>;
  toggleDropdown: (e: React.MouseEvent) => void;
  selectedItem: SelectedItem;
  title: string;
}

function DropdownButton(props: DropdownButtonProps) {
  const { dropdownRef, toggleDropdown, selectedItem, title } = props;

  const dropdownTooltip: string =
    selectedItem.itemName && selectedItem.subItemName
      ? `${selectedItem.itemName} > ${selectedItem.subItemName}` +
        (selectedItem.subItemSecondaryName ? ` > ${selectedItem.subItemSecondaryName}` : '')
      : title;
  return (

      <Button onClick={toggleDropdown} className={classes(css.dropdown, css.textContainer)}>
        <Tooltip title={dropdownTooltip} enterDelay={300} placement='top-start'>

            {selectedItem.itemName && selectedItem.subItemName ? (
              <>
                {selectedItem.itemName}
                <ChevronRightSmallIcon />
                {selectedItem.subItemName}
                {selectedItem.subItemSecondaryName && (
                  <>
                    <ChevronRightSmallIcon />
                    {selectedItem.subItemSecondaryName}
                  </>
                )}
              </>
            ) : (
              title
            )}

        </Tooltip>
        <ArrowDropDownIcon />
      </Button>

  );
}

interface DropdownSubMenuProps {
  subDropdownActive: number;
  setSubDropdownActive: (subDropdownActive: number) => void;
  subDropdownIndex: number;
  item: DropdownItem;
  deactivateDropdown: (selectedItem: SelectedItem) => void;
}

function DropdownSubMenu(props: DropdownSubMenuProps) {
  const {
    subDropdownActive,
    setSubDropdownActive,
    subDropdownIndex,
    item,
    deactivateDropdown,
  } = props;

  if (item.subItems.length === 0 || subDropdownActive !== subDropdownIndex) {
    return <></>;
  }

  return (

      {item.subItems.map((subItem, subIndex) => (

 {
            deactivateDropdown({
              itemName: item.name,
              subItemName: subItem.name,
              subItemSecondaryName: subItem.secondaryName,
            });
            setSubDropdownActive(-1);
          }}
        >
          <Tooltip
            title={subItem.name + (subItem.secondaryName ? ` > ${subItem.secondaryName}` : '')}
            enterDelay={300}
            placement='top-start'
          >

              {subItem.name}
              {subItem.secondaryName && (
                <>
                  <ChevronRightSmallIcon />
                  {subItem.secondaryName}
                </>
              )}

          </Tooltip>

      ))}

  );
}

interface DropdownMenuProps {
  dropdownListRef: Ref<HTMLDivElement>;
  dropdownActive: boolean;
  items: DropdownItem[];
  deactivateDropdown: (selectedItem: SelectedItem) => void;
}

function DropdownMenu(props: DropdownMenuProps) {
  const { dropdownListRef, dropdownActive, items, deactivateDropdown } = props;

  // Provides the index of the active sub-dropdown, or '-1' if none are active.
  const [subDropdownActive, setSubDropdownActive] = useState<number>(-1);

  if (items.length === 0 || !dropdownActive) {
    return <></>;
  }

  return (

        {items.map((item, index) => {
          return (

 setSubDropdownActive(index)}
              onMouseLeave={() => setSubDropdownActive(-1)}
              key={index}
            >
              <Tooltip title={item.name} enterDelay={300} placement='top-start'>
                {item.name}
              </Tooltip>
              <ChevronRightSmallIcon />
              <DropdownSubMenu
                subDropdownActive={subDropdownActive}
                setSubDropdownActive={setSubDropdownActive}
                subDropdownIndex={index}
                item={item}
                deactivateDropdown={deactivateDropdown}
              />

          );
        })}

  );
}

export interface TwoLevelDropdownProps {
  title: string;
  items: DropdownItem[];
  selectedItem: SelectedItem;
  setSelectedItem: (selectedItem: SelectedItem) => void;
}

function TwoLevelDropdown(props: TwoLevelDropdownProps) {
  const { title, items, selectedItem, setSelectedItem } = props;
  const [dropdownActive, setDropdownActive] = useState(false);

  // Close dropdown if the user clicks outside of the dropdown button or main menu.
  const dropdownRef = useRef<HTMLDivElement>(null);
  const dropdownListRef = useRef<HTMLDivElement>(null);
  window.addEventListener('click', (event: MouseEvent) => {
    if (
      dropdownRef.current &&
      !dropdownRef.current.contains(event.target as Node) &&
      dropdownListRef.current &&
      !dropdownListRef.current.contains(event.target as Node)
    ) {
      setDropdownActive(false);
    }
  });

  const toggleDropdown = (_: React.MouseEvent) => {
    setDropdownActive(!dropdownActive);
  };

  const deactivateDropdown = (selectedItem: SelectedItem) => {
    setSelectedItem(selectedItem);
    setDropdownActive(false);
  };

  return (

      <DropdownButton
        dropdownRef={dropdownRef}
        toggleDropdown={toggleDropdown}
        selectedItem={selectedItem}
        title={title}
      />
      <DropdownMenu
        dropdownListRef={dropdownListRef}
        dropdownActive={dropdownActive}
        items={items}
        deactivateDropdown={deactivateDropdown}
      />

  );
}

export default TwoLevelDropdown;


text:
package org.springframework.boot.actuate.autoconfigure.jdbc;

import javax.sql.DataSource;

import org.junit.Test;

import org.springframework.boot.actuate.autoconfigure.health.HealthIndicatorAutoConfiguration;
import org.springframework.boot.actuate.health.ApplicationHealthIndicator;
import org.springframework.boot.actuate.health.CompositeHealthIndicator;
import org.springframework.boot.actuate.health.HealthIndicator;
import org.springframework.boot.actuate.jdbc.DataSourceHealthIndicator;
import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.EmbeddedDataSourceConfiguration;
import org.springframework.boot.autoconfigure.jdbc.metadata.DataSourcePoolMetadataProvidersConfiguration;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.jdbc.DataSourceBuilder;
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;

import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;

/**
 * Tests for {@link DataSourceHealthIndicatorAutoConfiguration}.
 *
 * @author Phillip Webb
 */
public class DataSourceHealthIndicatorAutoConfigurationTests {

	private ApplicationContextRunner contextRunner = new ApplicationContextRunner()
			.withConfiguration(AutoConfigurations.of(DataSourceAutoConfiguration.class,
					HealthIndicatorAutoConfiguration.class,
					DataSourceHealthIndicatorAutoConfiguration.class))
			.withPropertyValues("spring.datasource.initialization-mode=never");

	@Test
	public void runShouldCreateIndicator() {
		this.contextRunner.run((context) -> {
			context.getBean(DataSourceHealthIndicator.class);
			assertThat(context).hasSingleBean(DataSourceHealthIndicator.class)
					.doesNotHaveBean(ApplicationHealthIndicator.class);
		});
	}

	@Test
	public void runWhenMultipleDataSourceBeansShouldCreateCompositeIndicator() {
		this.contextRunner.withUserConfiguration(EmbeddedDataSourceConfiguration.class,
				DataSourceConfig.class).run((context) -> {
					assertThat(context).hasSingleBean(HealthIndicator.class);
					HealthIndicator indicator = context
							.getBean(CompositeHealthIndicator.class);
					assertThat(indicator.health().getDetails())
							.containsOnlyKeys("dataSource", "testDataSource");
				});
	}

	@Test
	public void runShouldFilterRoutingDataSource() {
		this.contextRunner
				.withUserConfiguration(EmbeddedDataSourceConfiguration.class,
						RoutingDatasourceConfig.class)
				.run((context) -> assertThat(context)
						.hasSingleBean(DataSourceHealthIndicator.class)
						.doesNotHaveBean(CompositeHealthIndicator.class));
	}

	@Test
	public void runWithValidationQueryPropertyShouldUseCustomQuery() {
		this.contextRunner
				.withUserConfiguration(DataSourceConfig.class,
						DataSourcePoolMetadataProvidersConfiguration.class)
				.withPropertyValues(
						"spring.datasource.test.validation-query:SELECT from FOOBAR")
				.run((context) -> {
					assertThat(context).hasSingleBean(HealthIndicator.class);
					DataSourceHealthIndicator indicator = context
							.getBean(DataSourceHealthIndicator.class);
					assertThat(indicator.getQuery()).isEqualTo("SELECT from FOOBAR");
				});
	}

	@Test
	public void runWhenDisabledShouldNotCreateIndicator() {
		this.contextRunner.withUserConfiguration(EmbeddedDataSourceConfiguration.class)
				.withPropertyValues("management.health.db.enabled:false")
				.run((context) -> assertThat(context)
						.doesNotHaveBean(DataSourceHealthIndicator.class)
						.doesNotHaveBean(CompositeHealthIndicator.class)
						.hasSingleBean(ApplicationHealthIndicator.class));
	}

	@Configuration(proxyBeanMethods = false)
	@EnableConfigurationProperties
	protected static class DataSourceConfig {

		@Bean
		@ConfigurationProperties(prefix = "spring.datasource.test")
		public DataSource testDataSource() {
			return DataSourceBuilder.create()
					.type(org.apache.tomcat.jdbc.pool.DataSource.class)
					.driverClassName("org.hsqldb.jdbc.JDBCDriver")
					.url("jdbc:hsqldb:mem:test").username("sa").build();
		}

	}

	@Configuration(proxyBeanMethods = false)
	protected static class RoutingDatasourceConfig {

		@Bean
		AbstractRoutingDataSource routingDataSource() {
			return mock(AbstractRoutingDataSource.class);
		}

	}

}


text:
package io.github.silencio_app.silencio;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by vipin on 28/11/16.
 */
public class Location implements Parcelable{
    private String name;
    private float db_level;
    private String mac;
    private float [] records;

    public static Creator<Location> getCREATOR() {
        return CREATOR;
    }

    public float[] getRecords() {
        return records;
    }

    public void setRecords(float[] records) {
        this.records = records;
    }

    public Location(String name, float db_level, String mac) {
        this.db_level = db_level;
        this.mac = mac;
        this.name = name;
    }

    public String getMac() {
        return mac;
    }

    public void setMac(String mac) {
        this.mac = mac;
    }

    public float getDb_level() {
        return db_level;
    }

    public void setDb_level(float db_level) {
        this.db_level = db_level;
    }

    public String getName() {
        return name;
    }

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

    protected Location(Parcel in) {
        name = in.readString();
        db_level = in.readFloat();
        mac = in.readString();
    }

    public static final Creator<Location> CREATOR = new Creator<Location>() {
        @Override
        public Location createFromParcel(Parcel in) {
            return new Location(in);
        }

        @Override
        public Location[] newArray(int size) {
            return new Location[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeString(name);
        parcel.writeFloat(db_level);
        parcel.writeString(mac);
    }
}


text: These scripts are used for setting up dev machines on Cloud9.


text:
#pragma once

#include <gloperate/resources/Loader.h>

#include <gloperate-assimp/gloperate-assimp_api.h>

struct aiMesh;
struct aiScene;

namespace gloperate
{
    class PolygonalGeometry;
}

namespace gloperate_assimp
{

/**
*  @brief
*    Loader for meshes (PolygonalGeometry) that uses ASSIMP for import
*/
class GLOPERATE_ASSIMP_API AssimpMeshLoader : public gloperate::Loader<gloperate::PolygonalGeometry>
{
public:
    /**
    *  @brief
    *    Constructor
    */
    AssimpMeshLoader();

    /**
    *  @brief
    *    Destructor
    */
    virtual ~AssimpMeshLoader();

    // Virtual loader methods
    virtual bool canLoad(const std::string & ext) const override;
    virtual std::vector<std::string> loadingTypes() const override;
    virtual std::string allLoadingTypes() const override;
    virtual gloperate::PolygonalGeometry * load(const std::string & filename, std::function<void(int, int)> progress) const override;

protected:
    /**
    *  @brief
    *    Convert ASSIMP mesh into gloperate mesh
    *
    *  @param[in] mesh
    *    ASSIMP mesh (must be valid!)
    *
    *  @return
    *    Mesh, must be destroyed by the caller
    */
    gloperate::PolygonalGeometry * convertGeometry(const aiMesh * mesh) const;
};

} // namespace gloperate_assimp