text:
package com.zeshan.syncnotes;

import java.awt.Color;
import java.awt.Point;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextField;
import javax.swing.SwingConstants;

import java.awt.Font;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;

import javax.swing.JTextPane;

public class NoteView extends JFrame {

	private static final long serialVersionUID = 1L;

	public NoteView frame;

	private JPanel pane;
	private Point mouseDownCompCoords;
	private JTextField textField;
	private JTextPane textPane;
	private ComponentResizer cr = new ComponentResizer();

	private String ID;
	private int x;
	private int y;

	/**
	 * Create the frame.
	 */

	public NoteView createFrame(String ID, String title, String body) {
		this.ID = ID;

		setBounds(100, 100, 450, 300);

		pane = (JPanel) getContentPane();

		pane.setLayout(null);
		pane.setBackground(hexToColor("#FFE981"));

		textField = new JTextField();
		textField.setHorizontalAlignment(SwingConstants.CENTER);
		textField.setFont(new Font("Arial Black", Font.BOLD, 15));
		textField.setBounds(10, 11, 414, 20);
		pane.add(textField);
		textField.setColumns(10);
		textField.setText(title);
		textField.setOpaque(false);
		textField.setBorder(javax.swing.BorderFactory.createEmptyBorder());

		JScrollPane scrollPane = new JScrollPane();
		scrollPane.setBounds(10, 42, 414, 209);
		scrollPane.setBackground(hexToColor("#FFE981"));
		scrollPane.setBorder(javax.swing.BorderFactory.createEmptyBorder());
		pane.add(scrollPane);

		textPane = new JTextPane();
		scrollPane.setViewportView(textPane);
		textPane.setText(body);
		textPane.setBorder(javax.swing.BorderFactory.createEmptyBorder());
		textPane.setBackground(hexToColor("#FFE981"));

		return this;
	}

	public void showFrame() {
		dragListener();
		cr.registerComponent(frame);

        frame.setUndecorated(true);
		frame.setVisible(true);

		// Hide from tool bar.
		//frame.setType(javax.swing.JFrame.Type.UTILITY);
	}

	private Color hexToColor(String colorStr) {
	    return new Color(
	            Integer.valueOf( colorStr.substring( 1, 3 ), 16 ),
	            Integer.valueOf( colorStr.substring( 3, 5 ), 16 ),
	            Integer.valueOf( colorStr.substring( 5, 7 ), 16 ) );
	}

	private void dragListener() {
		mouseDownCompCoords = null;

		textField.addMouseListener(new MouseListener(){
            public void mouseReleased(MouseEvent e) {
                mouseDownCompCoords = null;
            }
            public void mousePressed(MouseEvent e) {
                mouseDownCompCoords = e.getPoint();
            }
            public void mouseExited(MouseEvent e) {
            }
            public void mouseEntered(MouseEvent e) {
            }
            public void mouseClicked(MouseEvent e) {
            }
        });

		textField.addMouseMotionListener(new MouseMotionListener(){
            public void mouseMoved(MouseEvent e) {
            }

            public void mouseDragged(MouseEvent e) {
                Point currCoords = e.getLocationOnScreen();
                frame.setLocation(currCoords.x - mouseDownCompCoords.x, currCoords.y - mouseDownCompCoords.y);

                x = currCoords.x - mouseDownCompCoords.x;
                y = currCoords.y - mouseDownCompCoords.y;
            }
        });
	}
}


text:
package io.micrometer.signalfx;

import io.micrometer.common.lang.Nullable;
import io.micrometer.core.instrument.AbstractTimer;
import io.micrometer.core.instrument.Clock;
import io.micrometer.core.instrument.distribution.DistributionStatisticConfig;
import io.micrometer.core.instrument.distribution.HistogramSnapshot;
import io.micrometer.core.instrument.distribution.TimeWindowMax;
import io.micrometer.core.instrument.distribution.pause.PauseDetector;
import io.micrometer.core.instrument.step.StepTuple2;
import io.micrometer.core.instrument.util.TimeUtils;

import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.LongAdder;

/**
 * This class is mostly the same as {@link io.micrometer.core.instrument.step.StepTimer},
 * with one notable difference: the {@link DistributionStatisticConfig} is modified before
 * being passed to the super class constructor - that forces the histogram generated by
 * this meter to be cumulative.
 *
 * @author Bogdan Drutu
 * @author Mateusz Rzeszutek
 */
final class SignalfxTimer extends AbstractTimer {

    private final LongAdder count = new LongAdder();

    private final LongAdder total = new LongAdder();

    private final StepTuple2<Long, Long> countTotal;

    private final TimeWindowMax max;

    @Nullable
    private final DeltaHistogramCounts deltaHistogramCounts;

    SignalfxTimer(Id id, Clock clock, DistributionStatisticConfig distributionStatisticConfig,
            PauseDetector pauseDetector, TimeUnit baseTimeUnit, long stepMillis, boolean isDelta) {
        super(id, clock, CumulativeHistogramConfigUtil.updateConfig(distributionStatisticConfig), pauseDetector,
                baseTimeUnit, false);
        countTotal = new StepTuple2<>(clock, stepMillis, 0L, 0L, count::sumThenReset, total::sumThenReset);
        max = new TimeWindowMax(clock, distributionStatisticConfig);
        if (distributionStatisticConfig.isPublishingHistogram() && isDelta) {
            deltaHistogramCounts = new DeltaHistogramCounts();
        }
        else {
            deltaHistogramCounts = null;
        }
    }

    @Override
    protected void recordNonNegative(long amount, TimeUnit unit) {
        final long nanoAmount = (long) TimeUtils.convert(amount, unit, TimeUnit.NANOSECONDS);
        count.increment();
        total.add(nanoAmount);
        max.record(amount, unit);
    }

    @Override
    public long count() {
        return countTotal.poll1();
    }

    @Override
    public double totalTime(TimeUnit unit) {
        return TimeUtils.nanosToUnit(countTotal.poll2(), unit);
    }

    @Override
    public double max(TimeUnit unit) {
        return max.poll(unit);
    }

    @Override
    public HistogramSnapshot takeSnapshot() {
        HistogramSnapshot currentSnapshot = super.takeSnapshot();
        if (deltaHistogramCounts == null) {
            return currentSnapshot;
        }
        return new HistogramSnapshot(currentSnapshot.count(), // Already delta in sfx
                                                              // implementation
                currentSnapshot.total(), // Already delta in sfx implementation
                currentSnapshot.max(), // Max cannot be calculated as delta, keep the
                                       // current.
                currentSnapshot.percentileValues(), // No changes to the percentile
                                                    // values.
                deltaHistogramCounts.calculate(currentSnapshot.histogramCounts()), currentSnapshot::outputSummary);
    }

}

redpajama_set_name: RedPajamaGithub


text:
package video;

import java.io.*;
import javax.swing.*;
import javax.swing.filechooser.FileFilter;

public class VideoFileChooser extends JFrame {

	private static final long serialVersionUID = -315195984033206096L;
	private File file = null;

	public VideoFileChooser() {
		super("File Chooser Test Frame");

		JFileChooser chooser = new JFileChooser("./");
		chooser.setAcceptAllFileFilterUsed(false);
		chooser.addChoosableFileFilter(new FileFilter() {

			String extensions[] = {"3gp", "3g2", "aac", "asf", "dvd", "dxa", "ffm", "flac", "flv", "flic", "mpg",
					"h261", "h263", "h264", "gif", "image2", "image2pipe", "ipod", "m4v", "matroska", "webm",
					"md5", "mjpeg", "mlp", "mov", "mp4", "m4a", "mj2", "mp2", "mp3", "mpeg", "mpjpeg", "mvi",
					"mxf", "wav", "xwma", "mkv", "avi"};

		    public String getDescription() {
		        return "Video Files";
		    }

		    public boolean accept(File f) {
		    	if (f.isDirectory())
		    		return true;

		    	for (String extension : extensions) {
		    		if (f.getName().toLowerCase().endsWith("." + extension))
		    			return true;
		    	}
		    	return false;
		    }
		});

		int option = chooser.showOpenDialog(VideoFileChooser.this);
		if (option == JFileChooser.APPROVE_OPTION) {
			this.file = chooser.getSelectedFile();
		}
		else {
			System.out.println("You cancelled.");
		}
	}

	public File getFile() {
		return file;
	}

	public void setFile(File file) {
		this.file = file;
	}
}


text:
//
//  WaterPurifierStatus.h
//  MxChip
//
//  Created by Zhiyongxu on 15/12/9.
//  Copyright © 2015年 Zhiyongxu. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "BaseOznerObject.h"

typedef void (^onWaterPurifierStatusSetHandler) (NSData* data,OperateCallback cb);
@interface WaterPurifierStatus : NSObject
{
    onWaterPurifierStatusSetHandler callback;
}
-(instancetype)init:(onWaterPurifierStatusSetHandler)cb;

/*!
 @property power
 @discussion 电源
 */
@property (nonatomic,readonly) BOOL power;
/*!
 @property cool
 @discussion 制冷
 */
@property (nonatomic,readonly) BOOL cool;
/*!
 @property hot
 @discussion 加热
 */
@property (nonatomic,readonly) BOOL hot;
/*!
 @property sterilization
 @discussion 杀菌
 */
@property (nonatomic,readonly) BOOL sterilization;

-(void)setPower:(BOOL)power Callback:(OperateCallback)cb;
-(void)setSterilization:(BOOL)sterilization Callback:(OperateCallback)cb;
-(void)setCool:(BOOL)cool Callback:(OperateCallback)cb;
-(void)setHot:(BOOL)hot Callback:(OperateCallback)cb;

-(void)load:(BytePtr)bytes;

@end


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

using System.Windows.Forms;

namespace TestCentric.Gui.Elements
{
    /// <summary>
    /// IMenu is implemented by a menu item that displays subitems.
    /// </summary>
    public interface IToolStripMenu : IViewElement
    {
        /// <summary>
        /// Popup event is raised to signal the presenter
        /// that the menu items under this element are
        /// about to be displayed.
        /// </summary>
        event CommandHandler Popup;

        ToolStripItemCollection Items { get; }
    }
}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">

Provides classes and interfaces for dealing with
javax.swing.JTable.
JTable is Swing's grid or tabular view for
constructing user interfaces for tabular data structures inside
an application.  Use this package if you want control over how tables
are constructed, updated, and rendered, as well as how data associated
with the tables are viewed and managed.

Note:
Most of the Swing API is not thread safe.
For details, see
Threads and Swing,
a section in
The Java Tutorial.

Related Documentation

For overviews, tutorials, examples, guides, and tool documentation, please see:

How to Use Tables,
      a section in The Java Tutorial

@since 1.2
@serial exclude


text:
//JAH Modifications
//====================================================
//- removed trailing comma in enumerations
//- made enumerations typedef and added explicit alias

#ifndef ADIDatCAPI_H__
#define ADIDatCAPI_H__

#ifdef ADIDATIOWIN_EXPORTS
#define DLLEXPORT   __declspec(dllexport)
#else
#define DLLEXPORT
#endif

#ifdef __cplusplus
extern "C" {
#endif

   // Result code values
   typedef enum ADIResultCode
      {
      //Win32 error codes (HRESULTs)
      kResultSuccess = 0,                             // operation succeeded
      kResultErrorFlagBit        = 0x80000000L,       // high bit set if operation failed
      kResultInvalidArg          = 0x80070057L,       // invalid argument. One (or more) of the arguments is invalid
      kResultFail                = 0x80004005L,       // Unspecified error
      kResultFileNotFound        = 0x80030002L,       // failure to find the specified file (check the path)

      //Start of error codes specific to this API
      kResultADICAPIMsgBase        = 0xA0049000L,

      kResultFileIOError  = kResultADICAPIMsgBase,    // file IO error - could not read/write file
      kResultFileOpenFail,                            // file failed to open
      kResultInvalidFileHandle,                       // file handle is invalid
      kResultInvalidPosition,                         // pos specified is outside the bounds of the record or file
      kResultInvalidCommentNum,                       // invalid commentNum. Comment could not be found
      kResultNoData,                                  // the data requested was not present (e.g. no more comments in the record).
      kResultBufferTooSmall                          // the buffer passed to a function to receive data (e.g. comment text) was not big enough to receive all the data.

                                                      // new result codes must be added at the end
      } ADIResultCode;

   // File open modes
   typedef enum ADIFileOpenMode
      {
      kOpenFileForReadOnly = 0,  // opens the file as read-only, so data cannot be written
      kOpenFileForReadAndWrite  // opens the file as read/write
      } ADIFileOpenMode;

   // Data Types : ADICDataFlags
   typedef enum ADICDataFlags
      {
      kADICDataAtSampleRate = 0,                 // specifies that the function uses samples
      kADICDataAtTickRate = 0x80000000          // specifies that the function uses ticks
      } ADICDataFlags;

   //Struct holding maximum and minimum values between which valid
   //data values in a channel fall.
   typedef struct ADIDataLimits
      {
      float mMaxLimit;
      float mMinLimit;
      } ADIDataLimits;

   // Handles - essentially void* with a little added type safety.
   struct ADI_FileHandle__ { int unused; }; typedef struct ADI_FileHandle__ *ADI_FileHandle;
   struct ADI_WriterHandle__ { int unused; }; typedef struct ADI_WriterHandle__ *ADI_WriterHandle;
   struct ADI_CommentsHandle__ { int unused; }; typedef struct ADI_CommentsHandle__ *ADI_CommentsHandle;

// Define ADI_USELOADIDATDLL to link explicitly to the ADIDatDll. To link implicitly using the
// import library leave this undefined.
#ifndef ADI_USELOADIDATDLL

   //--------------------
   // General Operations:
   //

   // Opens an existing *.adidat file for read and write operations and returns a pointer
   // to it.
   // If operation is successful, 'fileH' param will be be a handle to the file, else 0.
   // Params: path  - absolute, delimited path to the file,
   //                 e.g. "C:\\MyData\\TestFile.adidat"
   //         fileH - pointer to an ADI_FileHandle object [outparam]
   //         mode  - ADIFileOpenMode option for controlling the how the file is to be opened
   // Return: a ADIResultCode for result of the operation
   DLLEXPORT ADIResultCode ADI_OpenFile(const wchar_t* path, ADI_FileHandle* fileH, ADIFileOpenMode mode);

   // Creates a new *.adidat file for write operations at the specified location and
   // returns a pointer to it.
   // If operation is successful, 'file' param will be be a handle to the file, else 0.
   // Params: path  - absolute, delimited path to the file,
   //                 e.g. "C:\\MyData\\NewFile.adidat"
   //         fileH - pointer to an ADI_FileHandle object [outparam]
   // Return: a ADIResultCode for result of the operation
   DLLEXPORT ADIResultCode ADI_CreateFile(const wchar_t* path, ADI_FileHandle* fileH);

   // Retrieves a text description of a result code returned from an API call.
   // Params: code     - an ADIResultCode value
   //         message  - null-terminated text for the error message [outparam]
   //         maxChars - the size used for the buffer. Must not exceed this when copying
   //                    text into the buffer
   //         textLen  - receives the number of characters needed to hold the full comment text,
   //                     even if parameter text is NULL (optional, may be NULL) [outparam]
   // Return: returns kResultBufferTooSmall if maxChars was too small to receive the full title text.
   // Return: a ADIResultCode for result of the operation
   DLLEXPORT ADIResultCode ADI_GetErrorMessage(ADIResultCode code, wchar_t* messageOut,
      long maxChars, long *textLen);

   // Converts a tick position to a sample position for a given channel.
   // Params: fileH              - ADI_FileHandle for the open file
   //         channel            - the channel index (starting from 0)
   //         record             - the record index (starting from 0)
   //         tickInRecord       - the tick position to be converted
   //         samplePosInRecord  - the converted sample position [outparam]
   // Return: a ADIResultCode for result of the operation
   DLLEXPORT ADIResultCode ADI_TickToSamplePos(ADI_FileHandle fileH, long channel, long record,
      long tickInRecord, double* samplePosInRecord);

   // Converts a sample position to a tick position for a given channel.
   // Params: fileH              - ADI_FileHandle for the open file
   //         channel            - the channel index (starting from 0)
   //         record             - the record index (starting from 0)
   //         samplePosInRecord  - the tick position to be converted
   //         tickInRecord       - the converted sample position [outparam]
   // Return: a ADIResultCode for result of the operation
   DLLEXPORT ADIResultCode ADI_SamplePosToTick(ADI_FileHandle fileH, long channel, long record,
      double samplePosInRecord, double* tickInRecord);

   //-----------------
   // Read Operations:
   //

   // Retrieves the number of records in the file.
   // Params: fileH    - ADI_FileHandle for the open file
   //         nRecords - the number of records in the file [outparam]
   // Return: a ADIResultCode for result of the operation
   DLLEXPORT ADIResultCode ADI_GetNumberOfRecords(ADI_FileHandle fileH, long* nRecords);

   // Retrieves the number of channels in the file.
   // Params: fileH     - ADI_FileHandle for the open file
   //         nChannels - the number of channels in the file [outparam]
   // Return: a ADIResultCode for result of the operation
   DLLEXPORT ADIResultCode ADI_GetNumberOfChannels(ADI_FileHandle fileH, long* nChannels);

   // Retrieves the number of ticks in the specified record.
   // Params: fileH   - ADI_FileHandle for the open file
   //         record  - the record index (starting from 0)
   //         nTicks  - the number of ticks in the record [outparam]
   // Return: a ADIResultCode for result of the operation
   DLLEXPORT ADIResultCode ADI_GetNumTicksInRecord(ADI_FileHandle fileH, long record, long* nTicks);

   // Retrieves the tick period for the specified record and channel.
   // Params: fileH       - ADI_FileHandle for the open file
   //         channel     - the channel in the record (starting from 0)
   //         record      - the record index (starting from 0)
   //         secsPerTick - the tick period for the record [outparam]
   // Return: a ADIResultCode for result of the operation
   DLLEXPORT ADIResultCode ADI_GetRecordTickPeriod(ADI_FileHandle fileH, long channel, long record,
      double* secsPerTick);

   // Retrieves the number of samples in the specified record.
   // Params: fileH    - ADI_FileHandle for the open file
   //         channel  - the channel in the record (starting from 0)
   //         record   - the record index (starting from 0)
   //         nSamples - the number of samples in the record [outparam]
   // Return: a ADIResultCode for result of the operation
   DLLEXPORT ADIResultCode ADI_GetNumSamplesInRecord(ADI_FileHandle fileH, long channel, long record,
      long* nSamples);

   // Retrieves the sample period for the specified record.
   // Params: fileH         - ADI_FileHandle for the open file
   //         channel       - the channel in the record (starting from 0)
   //         record        - the record index (starting from 0)
   //         secsPerSample - the sample period for the record [outparam]
   // Return: a ADIResultCode for result of the operation
   DLLEXPORT ADIResultCode ADI_GetRecordSamplePeriod(ADI_FileHandle fileH, long channel, long record,
      double* secsPerSample);

   //Retrieves time information about the specified record.
   //The trigger time is the time origin of the record and may differ from the start time if
   //there is a pre or post trigger delay, as specified by the trigMinusRecStart parameter.
   // Params: fileH             - ADI_FileHandle for the open file
   //         record            - the record index (starting from 0)
   //         triggerTime       - time_t receives the date and time of the trigger
   //                             position for the new record. Measured as number of
   //                             seconds from 1 Jan 1970
   //         fracSecs          - receives the fractional seconds part of
   //                             the record trigger time ('triggerTime' parameter)
   //         trigMinusRecStart - trigger-time-minus-record-start-ticks. Receives the
   //                             difference between the time of trigger tick and the first
   //                             tick in the record. This +ve for pre-trigger delay and
   //                             -ve for post-trigger delay.
   // Return: a ADIResultCode for result of the operation
   DLLEXPORT ADIResultCode ADI_GetRecordTime(ADI_FileHandle fileH, long record, time_t *triggerTime,
      double *fracSecs, long *triggerMinusStartTicks);

   // Creates a comments accessor handle for the specified record.
   // Params: fileH         - ADI_FileHandle for the open file
   //         record        - the record index (starting from 0)
   //         commentsH     - handle to the new comments accessor for the record [outparam]
   // Return: a ADIResultCode for result of the operation
   DLLEXPORT ADIResultCode ADI_CreateCommentsAccessor(ADI_FileHandle fileH, long record,
      ADI_CommentsHandle* commentsH);

   // Closes the comments accessor, releasing the memory it used.
   // Sets the ADI_CommentsHandle to 0.
   // Params: ADI_CommentsHandle       - handle to a comments accessor
   // Return: a ADIResultCode for result of the operation
   DLLEXPORT ADIResultCode ADI_CloseCommentsAccessor(ADI_CommentsHandle *commentsH);

   // Retrieves information from the comment currently referenced by the comments accessor.
   // Params: ADI_CommentsHandle       - handle to a comments accessor
   //          tickPos                 - receives the tick position of the comment in the record [outparam]
   //          commentNum              - receives the number of the comment [outparam]
   //          channel                 - receives the channel of the comment (-1 for all channel comments) [outparam]
   //          text                    - buffer to receive null terminated text for the comment (optional, may be NULL) [outparam]
   //          maxChars                - the size of the text buffer in wchar_t s. The text will be truncated to fit in this size
   //          textLen                 - receives the number of characters needed to hold the full comment text,
   //                                    even if parameter text is NULL (optional, may be NULL) [outparam]
   // Return: returns kResultBufferTooSmall if maxChars was too small to receive the full comment text.
   // Returns kResultNoData if this accessor has reached the end of the comments in the record.
   DLLEXPORT ADIResultCode ADI_GetCommentInfo(ADI_CommentsHandle commentsH, long *tickPos, long *channel, long *commentNum, wchar_t* text,
      long maxChars, long *textLen);

   // Advances the comments accessor to the next comment in the record
   // Params: ADI_CommentsHandle       - handle to a comments accessor
   // Returns kResultNoData if this accessor has reached the end of the comments in the record.
   DLLEXPORT ADIResultCode ADI_NextComment(ADI_CommentsHandle commentsH);

   // Retrieves a block of sample data from the file into a buffer. Samples are in physical
   // prefixed units.
   // Params: fileH    - ADI_FileHandle for the open file
   //         channel  - the channel containing the desired data (starting from 0)
   //         record   - the record containing the start position of the desired data
   //                    (starting from 0)
   //         startPos - the start position as an offset from the start of the record (0)
   //         nLength  - number of elements (ticks/samples) to retrieve
   //         dataType - specifies the type of data (ticks or samples) to retrieve
   //         data     - pointer to a float array of 'nLength' in size
   //                    e.g. float* data=(float*)malloc(sizeof(float*kDataSize)); [outparam]
   //         returned - the number of samples actually returned by the function (may be less
   //                    than the amount requested) [outparam]
   // Return: a ADIResultCode for result of the operation
   DLLEXPORT ADIResultCode ADI_GetSamples(ADI_FileHandle fileH, long channel, long record, long startPos,
      ADICDataFlags dataType, long nLength, float* data, long* returned);

   // Retrieves the prefixed units of a channel, as a string.
   // Params: fileH     - ADI_FileHandle for the open file
   //         channel   - the unit's channel (starting from 0)
   //         record    - the unit's record (starting from 0)
   //         units     - buffer to receive null terminated text for the units name (optional, may be NULL) [outparam]
   //         maxChars  - the size of the text buffer in wchar_t s. The text will be truncated to fit in this size
   //         textLen   - receives the number of characters needed to hold the full comment text,
   //                     even if parameter text is NULL (optional, may be NULL) [outparam]
   // Return: returns kResultBufferTooSmall if maxChars was too small to receive the full comment text.
   // Return: a ADIResultCode for result of the operation
   DLLEXPORT ADIResultCode ADI_GetUnitsName(ADI_FileHandle fileH, long channel, long record, wchar_t* units,
      long maxChars, long *textLen);

   // Retrieves the name of a channel, as a string.
   // Params: fileH    - ADI_FileHandle for the open file
   //         channel  - the channel index (starting from 0)
   //         name    - null-terminated text for the name [outparam]
   //         maxChars - the size used for the buffer. Must not exceed this when copying
   //                    text into the buffer
   //         textLen   - receives the number of characters needed to hold the full comment text,
   //                     even if parameter text is NULL (optional, may be NULL) [outparam]
   // Return: returns kResultBufferTooSmall if maxChars was too small to receive the full title text.
   // Return: a ADIResultCode for result of the operation
   DLLEXPORT ADIResultCode ADI_GetChannelName(ADI_FileHandle fileH, long channel, wchar_t* name,
      long maxChars, long *textLen);

   //------------------
   // Write Operations:
   //

   // Sets the name of the specified channel.
   // Params: file    - ADI_FileHandle for the open file
   //         channel - the channel to set the name (starting from 0)
   //         name   - null-terminated text string with the channel name
   // Return: a ADIResultCode for result of the operation
   DLLEXPORT ADIResultCode ADI_SetChannelName(ADI_FileHandle fileH, long channel, const wchar_t* name);

   // Creates a new writer session for writing new data and returns a handle to that open writer for use in
   // other related functions.
   // Params: fileH             - ADI_FileHandle for the open file
   //         writerH           - ADI_WriterHandle for the new writing session [outparam]
   // Return: a ADIResultCode for result of the operation
   DLLEXPORT ADIResultCode ADI_CreateWriter(ADI_FileHandle fileH, ADI_WriterHandle* writerH);

   // Sets the channel information for the specified channel in a new record to be written by the writer session.
   // Params: writerH          - ADI_WriterHandle for the writing session
   //         channel          - the channel to receive the new info (starting from 0)
   //         enabled          - boolean value set true (1) if data is to be added to this channel in the new record
   //         secondsPerSample - new sample period for this channel in the new record
   //         unitsName        - null-terminated text string units for the channel record
   //         limits           - Optional pointer to a struct holding maximum and minimum values between which valid
   //                            data values in the channel fall.
   //                            If NULL, the limits are +ve and -ve infinity.
   //
   // Return: a ADIResultCode for result of the operation
   DLLEXPORT ADIResultCode ADI_SetChannelInfo(ADI_WriterHandle writerH, long channel, int enabled,
      double secondsPerSample, const wchar_t* units, const ADIDataLimits *limits);

   //Starts the writer recording a new record, setting the trigger time.
   //The trigger time is the time origin of the record and may differ from the start time if
   //there is a pre or post trigger delay, as specified by the trigMinusRecStart parameter.
   //         writerH           - ADI_WriterHandle for the writing session
   //         triggerTime       - time_t specifying the date and time of the trigger
   //                             position for the new record. Measured as number of
   //                             seconds from 1 Jan 1970
   //         fracSecs          - Provides fraction-resolution to the start position of
   //                             the record ('triggerTime' parameter)
   //         trigMinusRecStart - trigger-time-minus-record-start-ticks.  Specifies the
   //                             difference between the time of trigger tick and the first
   //                             tick in the record. This +ve for pre-trigger delay and
   //                             -ve for post-trigger delay.
   // Return: a ADIResultCode for result of the operation
   DLLEXPORT ADIResultCode ADI_StartRecord(ADI_WriterHandle writerH, time_t triggerTime,
      double fracSecs, long triggerMinusStartTicks);

   // Writes new data samples into the specified channel record.
   // Params: writerH         - ADI_WriterHandle for the writing session
   //         channel         - the channel to receive the new data (starting from 0)
   //         data            - an array of new float data
   //                            e.g.  float* data = (float*)malloc(sizeof(float * numSamples));
   //         dataType        - specifies the type of data (ticks or samples) being added
   //         nSamples        - number of samples in the array
   //         newTicksAdded   - number of ticks by which the record increased as a result of adding these samples.
   //                           This will usually be 0 for channels other than the first to which samples are added.
   //                           In the multi-rate case, this can be greater than the number of samples added if
   //                           the channel has a sample rate lower than the tick rate.
   // Return: a ADIResultCode for result of the operation
   DLLEXPORT ADIResultCode ADI_AddChannelSamples(ADI_WriterHandle writerH, long channel,
      float* data, long nSamples, long *newTicksAdded);

   // Ends the current record being written by the writer.
   // Params: writerH - ADI_WriterHandle for the writer session
   // Return: a ADIResultCode for result of the operation
   DLLEXPORT ADIResultCode ADI_FinishRecord(ADI_WriterHandle writerH);

   // Ensures all changes to the file made via the writer session are written to the file.
   // Params: writerH - ADI_WriterHandle for the writer session
   // Return: a ADIResultCode for result of the operation
   DLLEXPORT ADIResultCode ADI_CommitFile(ADI_WriterHandle writerH, long flags);

   // Terminates the writer session and releases resources used by the session.
   // Sets the ADI_WriterHandle to 0.
   // Also calls ADI_CommitFile() to ensure all changes to the file made via the
   //writer session are written to the file.
   // Params: writerH - ADI_WriterHandle for the writer session
   // Return: a ADIResultCode for result of the operation
   DLLEXPORT ADIResultCode ADI_CloseWriter(ADI_WriterHandle *writerH);

   // Adds a new comment at the specified position in the existing data.
   // Params: file       - ADI_FileHandle for the open file
   //         channel    - the channel to add the comment into, or -1 for all-channel comment
   //         record     - the record containing the desired position of the new comment
   //                      (starting from 0)
   //         tickPos    - the tick position of the comment as an offset from the start of
   //                      the record (0)
   //         text       - the null-terminated text string for the new comment
   //         commentNum - the number of the newly added comment (optional, may be NULL) [outparam]
   // Return: a ADIResultCode for result of the operation
   DLLEXPORT ADIResultCode ADI_AddComment(ADI_FileHandle fileH, long channel, long record, long tickPos,
      const wchar_t* text, long* commentNum);

   // Deletes a comment from the specified position in the existing data.
   // Params: file       - ADI_FileHandle for the open file
   //         commentNum - the number of the comment to delete
   // Return: a ADIResultCode for result of the operation
   DLLEXPORT ADIResultCode ADI_DeleteComment(ADI_FileHandle fileH, long commentNum);

   // Closes the open file and releases memory.
   // If operation is successful, 'fileH' param will be be 0.
   // Params: fileH - pointer to an ADI_FileHandle object [in/outparam]
   // Return: a ADIResultCode for result of the operation
   DLLEXPORT ADIResultCode ADI_CloseFile(ADI_FileHandle* fileH);

#endif //ADI_USELOADIDATDLL

#ifdef __cplusplus
}
#endif

#endif


text:
var App = {
    IndexPage: function () {
        var that = this;

        this.init = function () {
            $("#homeBtn").attr({"href": Rho.Application.startURI});

            var items = <%= name.camelize %>Model.find("all");
            var container = $(".list-group");
            items.forEach(function (each) {
                var span = $("<i data-feather=\"chevron-right\"></i>");
                var anchor = $("<a>", {"class": "list-group-item list-group-item-action d-flex justify-content-between", "href": "show.html?" + each.object()});
                anchor.text(each.get("<%= attributes[0] %>"));
                anchor.append(span);
                container.append(anchor);
                container.append(anchor);
            });
        };
        setTimeout(function(){feather.replace();}, 0);
    },

    ShowPage: function () {
        var that = this;

        this.init = function () {
            $("#backBtn").on("click", function () {
                history.back();
            });

            var id = window.location.search.slice(1);
            var item = <%= name.camelize %>Model.find("first", {conditions: {object: id}});
            $("#title").text(item.get("<%= attributes[0] %>"));
            $("#editBtn").attr("href", "edit.html?" + item.object());
            <% attributes.each do |attribute| %>
            $("#<%= name.downcase %><%= attribute.capitalize %>").text(item.get("<%= attribute %>"));
            <% end %>
        };
        feather.replace();
    },

    NewPage: function () {
        var that = this;

        this.init = function () {
            $("#cancelBtn").on("click", function () {
                history.back();
            });
            $("#submitBtn").on("click", function () {
                var properties = {};
                <% attributes.each do |attribute| %>
                properties.<%= attribute %> = $("#<%= name.downcase %><%= attribute.capitalize %>").val();
                <% end %>
                <%= name.camelize %>Model.create(properties);
                history.back();
             });
        };
        feather.replace();
    },

    EditPage: function () {
        var that = this;

        this.init = function () {
            var id = window.location.search.slice(1);
            var item = <%= name.camelize %>Model.find("first", {conditions: {object: id}});
            $("#cancelBtn").on("click", function () {
                history.back();
            });
            $("#deleteBtn").on("click", function () {
                item.destroy();
                window.location = "index.html";
            });
            <% attributes.each do |attribute| %>
            $("#<%= name.downcase %><%= attribute.capitalize %>").attr("value", item.get("<%= attribute %>"));
            <% end %>

            $("#submitBtn").on("click", function () {
                 var properties = {};
                 <% attributes.each do |attribute| %>
                 properties.<%= attribute %> = $("#<%= name.downcase %><%= attribute.capitalize %>").val();
                 <% end %>
                 item.updateAttributes(properties);
                 history.back();
                });
            feather.replace();
        }
    }
}


text:
__author__ = 'cody'
import dbapi
import unittest
import os
from dbapi import app
from dbapi.models import *
from sqlalchemy import create_engine
from sqlalchemy.orm import scoped_session, sessionmaker
from utils.messages import *
from utils.rest_api_utils import *

class DbapiTestCase(unittest.TestCase):
    def init_db(self):
        connection = self.engine.connect()
        db_session = scoped_session(sessionmaker(autocommit=False, autoflush=False, bind=connection))
        Base.query = db_session.query_property()
        Base.metadata.create_all(bind=connection)
        return db_session

    def close_db(self, blah):
        blah.flush()
        blah.commit()

    def setUp(self):
        app.config["TESTING"] = True
        dbapi.init_db = self.init_db
        self.app = app.test_client()
        self.engine = create_engine("sqlite:////tmp/temp.db", convert_unicode=True)
        self.session = self.init_db()

        self.test_user = self.create_user({"username": "johnsmith",
                                           "password": "password",
                                           "email": "testemail"})
        self.test_task = self.create_task({"name": "testtask",
                                           "userid": self.test_user.id})

        from flask.globals import current_app

        with app.app_context():
            current_app.init_db = self.init_db
            current_app.close_db = self.close_db

    def tearDown(self):
        if os.path.isfile("/tmp/temp.db"):
            os.remove("/tmp/temp.db")

    def create_user(self, user_dict):
        test_user = User(user_dict)
        self.session.add(test_user)
        self.session.commit()
        return test_user

    def create_task(self, task_dict):
        test_task = Task(task_dict)
        self.session.add(test_task)
        self.session.commit()
        return test_task


text:
<!doctype html>

        <meta charset="utf-8">
        <title></title>
        <meta name="description" content="">
        <meta name="viewport" content="width=device-width, initial-scale=1">

        <link rel="stylesheet" href="css/a.css">

Hello world! This is HTML5 Boilerplate.


text:
import merge from '../object/merge';

/**
 * Used by `_.defaultsDeep` to customize its `_.merge` use.
 *
 * @private
 * @param {*} objectValue The destination object property value.
 * @param {*} sourceValue The source object property value.
 * @returns {*} Returns the value to assign to the destination object.
 */
function mergeDefaults(objectValue, sourceValue) {
  return objectValue === undefined ? sourceValue : merge(objectValue, sourceValue, mergeDefaults);
}

export default mergeDefaults;


text:
using namespace std;

int calculate()
{
	return 123;
}

int main()
{
	auto fut = async(calculate);

	int res = fut.get();
	cout << res << endl;

	return 0;
}


text:
package canopus

import "net"

func Dial(address string) (conn Connection, err error) {
	udpConn, err := net.Dial("udp", address)
	if err != nil {
		return
	}

	conn = &UDPConnection{
		conn: udpConn,
	}

	return
}

func DialDTLS(address, identity, psk string) (conn Connection, err error) {
	udpConn, err := net.Dial("udp", address)
	if err != nil {
		return
	}

	conn, err = NewDTLSConnection(udpConn, identity, psk)
	if err != nil {
		return
	}

	return
}

func NewObserveMessage(r string, val interface{}, msg Message) ObserveMessage {
	return &CoapObserveMessage{
		Resource: r,
		Value:    val,
		Msg:      msg,
	}
}

type CoapObserveMessage struct {
	CoapMessage
	Resource string
	Value    interface{}
	Msg      Message
}

func (m *CoapObserveMessage) GetResource() string {
	return m.Resource
}

func (m *CoapObserveMessage) GetValue() interface{} {
	return m.Value
}

func (m *CoapObserveMessage) GetMessage() Message {
	return m.GetMessage()
}


text:
package se.liquidbytes.jel.web.api;

import com.theoryinpractise.halbuilder.api.Representation;
import io.vertx.core.Vertx;
import io.vertx.core.json.JsonObject;
import io.vertx.ext.web.RoutingContext;
import se.liquidbytes.jel.Settings;
import static se.liquidbytes.jel.system.JelService.API_ENDPOINT;
import se.liquidbytes.jel.system.JelServiceProxy;
import se.liquidbytes.jel.web.PresentationFactory;

/**
 *
 * @author Henrik Östman
 */
public class SystemApi {

  private final Vertx vertx;
  private final JelServiceProxy service;

  /**
   * Constructor
   *
   * @param vertx Vertx-instance
   */
  public SystemApi(Vertx vertx) {
    this.vertx = vertx;
    service = JelServiceProxy.createProxy(this.vertx, Settings.EVENTBUS_NAME);
  }

  public void systemInformation(RoutingContext context) {
    service.systemInformation((r) -> {
      if (r.succeeded()) {
        JsonObject source = r.result();
        Representation rep = PresentationFactory.getRepresentation(API_ENDPOINT + "/system/info")
            .withProperty("applicationVersion", source.getString("applicationVersion"))
            .withProperty("applicationStarttime", source.getString("applicationStarttime"))
            .withProperty("serverCurrenttime", source.getString("serverCurrenttime"))
            .withProperty("applicationBuildnumber", source.getString("applicationBuildnumber"))
            .withRepresentation("java", PresentationFactory.getRepresentation()
                .withProperty("virtualMachine", source.getJsonObject("java").getString("virtualMachine"))
                .withProperty("runtime", source.getJsonObject("java").getString("runtime"))
                .withProperty("version", source.getJsonObject("java").getString("version"))
                .withProperty("vendor", source.getJsonObject("java").getString("vendor"))
                .withProperty("specificationName", source.getJsonObject("java").getString("specificationName"))
                .withProperty("javaHome", source.getJsonObject("java").getString("javaHome"))
            )
            .withRepresentation("os", PresentationFactory.getRepresentation()
                .withProperty("name", source.getJsonObject("os").getString("name"))
                .withProperty("description", source.getJsonObject("os").getString("description"))
                .withProperty("version", source.getJsonObject("os").getString("version"))
                .withProperty("architecture", source.getJsonObject("os").getString("architecture"))
            )
            .withRepresentation("hardware", PresentationFactory.getRepresentation()
                .withProperty("availableCPUs", source.getJsonObject("hardware").getInteger("availableCPUs"))
                .withProperty("ipAddress", source.getJsonObject("hardware").getString("ipAddress"))
                .withProperty("gatewayAddress", source.getJsonObject("hardware").getString("gatewayAddress"))
                .withProperty("serverEndpoint", source.getJsonObject("hardware").getString("serverEndpoint"))
                .withProperty("bogoMIPS", source.getJsonObject("hardware").getString("bogoMIPS"))
                .withProperty("details", source.getJsonObject("hardware").getJsonObject("details"))
            );

        context.response().end(rep.toString(context.get("__content-type")));

      } else {
        context.fail(r.cause());
      }
    });
  }

  public void systemResources(RoutingContext context) {
    service.systemResources((r) -> {
      if (r.succeeded()) {
        JsonObject source = r.result();
        Representation rep = PresentationFactory.getRepresentation(API_ENDPOINT + "/system/resources")
            .withRepresentation("cpu", PresentationFactory.getRepresentation()
                .withProperty("temperature", source.getJsonObject("cpu").getFloat("temperature"))
                .withProperty("loadAverage", source.getJsonObject("cpu").getFloat("loadAverage"))
            )
            .withRepresentation("disk", PresentationFactory.getRepresentation()
                .withProperty("fullness", source.getJsonObject("disk").getFloat("fullness"))
            )
            .withRepresentation("java", PresentationFactory.getRepresentation()
                .withProperty("freeMemory", source.getJsonObject("java").getLong("freeMemory"))
                .withProperty("totalMemory", source.getJsonObject("java").getLong("totalMemory"))
            )
            .withRepresentation("memory", PresentationFactory.getRepresentation()
                .withProperty("free", source.getJsonObject("memory").getLong("free"))
                .withProperty("total", source.getJsonObject("memory").getLong("total"))
            );

        context.response().end(rep.toString(context.get("__content-type")));
      } else {
        context.fail(r.cause());
      }
    });
  }
}


text:
#pragma once
#ifndef LIGHTSOURCECOMPONENT_H
#define LIGHTSOURCECOMPONENT_H

#include "Component/SceneComponent.h"
#include "Rendering/RHI/RHICommon.h"
#include "Math/Math.h"
#include "Rendering/LightSource.h"

class RHIGraphicsPipeline;
class RHIDescriptorSetAllocator;
class RHIDescriptorSet;
class LightSource;
class Sampler;

class LightSourceComponent : public SceneComponent
{
public:
	IMPL_OBJECT(LightSourceComponent);

	LightSourceComponent(const Ptr<Actor>& actor) : SceneComponent(actor) {}

	virtual ~LightSourceComponent() = default;

	virtual void Init() override;

	virtual void Destroy() override;

	const auto& Light() const { return _lightSource; }

	META(Getter("dir"))
	auto Direction() const { return _transform.ZAxis(); }
	META(Setter("dir"))
	void Direction(const Math::float3& dir);

	/*
	* Make sure that all rendering resources is ready
	* update uniform buffers
	* make sure light's rendering data is inited
	*/
	void PrepareRendering();

	/*
	* Bind rendering resources
	* bind uniform buffers
	*/
	void BindRendering(const Ptr<RHIGraphicsPipeline>& pipeline);

	LightSourceSample SampleRadiance(const Ptr<Sampler>& sampler, const Math::float3& pos) const;

protected:
	Ptr<LightSource> _lightSource;
	Ptr<RHIDescriptorSet> _paramsSet;
} META();

class PointLightSourceComponent : public LightSourceComponent
{
public:
	IMPL_OBJECT(PointLightSourceComponent);

	PointLightSourceComponent(const Ptr<Actor>& actor) : LightSourceComponent(actor) {}

	virtual void Init() override
	{
		LightSourceComponent::Init();
		_pointLightSource = std::make_shared<PointLightSource>();
		_lightSource = _pointLightSource;
	}

	const auto& PointLight() const { return _pointLightSource; }

protected:
	Ptr<PointLightSource> _pointLightSource;
} META();

class SpotLightSourceComponent : public LightSourceComponent
{
public:
	IMPL_OBJECT(SpotLightSourceComponent);

	SpotLightSourceComponent(const Ptr<Actor>& actor) : LightSourceComponent(actor) {}

	virtual void Init() override
	{
		LightSourceComponent::Init();
		_spotLightSource = std::make_shared<SpotLightSource>();
		_lightSource = _spotLightSource;
	}

	const auto& SpotLight() const { return _spotLightSource; }

protected:
	Ptr<SpotLightSource> _spotLightSource;
} META();

class DirectionalLightSourceComponent : public LightSourceComponent
{
public:
	IMPL_OBJECT(DirectionalLightSourceComponent);

	DirectionalLightSourceComponent(const Ptr<Actor>& actor) : LightSourceComponent(actor) {}

	virtual void Init() override
	{
		LightSourceComponent::Init();
		_dirLightSource = std::make_shared<DirectionalLightSource>();
		_lightSource = _dirLightSource;
	}

	const auto& DirLight() const { return _dirLightSource; }

protected:
	Ptr<DirectionalLightSource> _dirLightSource;
} META();

class SphereAreaLightSourceComponent : public LightSourceComponent
{
public:
	IMPL_OBJECT(SphereAreaLightSourceComponent);

	SphereAreaLightSourceComponent(const Ptr<Actor>& actor) : LightSourceComponent(actor) {}

	virtual void Init() override
	{
		LightSourceComponent::Init();
		_sphereAreaLightSource = std::make_shared<SphereAreaLightSource>();
		_lightSource = _sphereAreaLightSource;
	}

	const auto& SphereAreaLight() const { return _sphereAreaLightSource; }

protected:
	Ptr<SphereAreaLightSource> _sphereAreaLightSource;
} META();

class EnvironmentLightSourceComponent : public LightSourceComponent
{
public:
	IMPL_OBJECT(EnvironmentLightSourceComponent);

	EnvironmentLightSourceComponent(const Ptr<Actor>& actor) : LightSourceComponent(actor) {}

	virtual void Init() override
	{
		LightSourceComponent::Init();
		_environmentLightSource = std::make_shared<EnvironmentLightSource>();
		_lightSource = _environmentLightSource;
	}

	const auto& EnvironmentLight() const { return _environmentLightSource; }

protected:
	Ptr<EnvironmentLightSource> _environmentLightSource;
} META();

#endif


text:
namespace Kvasir {
//Serial controller 2 (Direct memory      access)
    namespace Sc2DmaSc2Dmarxbegaddar{    ///<Serial controller receive DMA begin address          channel A register
        using Addr = Register::Address<0x4000c000,0xffffe000,0x00000000,unsigned>;
        ///ADD
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(12,0),Register::ReadWriteAccess,unsigned> add{};
    }
    namespace Sc2DmaSc2Dmarxendaddar{    ///<Serial controller receive DMA end address          channel A register
        using Addr = Register::Address<0x4000c004,0xffffe000,0x00000000,unsigned>;
        ///ADD
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(12,0),Register::ReadWriteAccess,unsigned> add{};
    }
    namespace Sc2DmaSc2Dmarxbegaddbr{    ///<Serial controller receive DMA begin address          channel B register
        using Addr = Register::Address<0x4000c008,0xffffe000,0x00000000,unsigned>;
        ///ADD
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(12,0),Register::ReadWriteAccess,unsigned> add{};
    }
    namespace Sc2DmaSc2Dmarxendaddbr{    ///<Serial controller receive DMA end address          channel B register
        using Addr = Register::Address<0x4000c00c,0xffffe000,0x00000000,unsigned>;
        ///ADD
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(12,0),Register::ReadWriteAccess,unsigned> add{};
    }
    namespace Sc2DmaSc2Dmatxbegaddar{    ///<Serial controller transmit DMA begin address          channel A register
        using Addr = Register::Address<0x4000c010,0xffffe000,0x00000000,unsigned>;
        ///ADD
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(12,0),Register::ReadWriteAccess,unsigned> add{};
    }
    namespace Sc2DmaSc2Dmatxendaddar{    ///<Serial controller transmit DMA end address          channel A register
        using Addr = Register::Address<0x4000c014,0xffffe000,0x00000000,unsigned>;
        ///ADD
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(12,0),Register::ReadWriteAccess,unsigned> add{};
    }
    namespace Sc2DmaSc2Dmatxbegaddbr{    ///<Serial controller transmit DMA begin address          channel B register
        using Addr = Register::Address<0x4000c018,0xffffe000,0x00000000,unsigned>;
        ///ADD
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(12,0),Register::ReadWriteAccess,unsigned> add{};
    }
    namespace Sc2DmaSc2Dmatxendaddbr{    ///<Serial controller transmit DMA end address          channel B register
        using Addr = Register::Address<0x4000c01c,0xffffe000,0x00000000,unsigned>;
        ///ADD
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(12,0),Register::ReadWriteAccess,unsigned> add{};
    }
    namespace Sc2DmaSc2Dmarxcntar{    ///<Serial controller receive DMA counter          channel A register
        using Addr = Register::Address<0x4000c020,0xffffe000,0x00000000,unsigned>;
        ///CNT
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(12,0),Register::ReadWriteAccess,unsigned> cnt{};
    }
    namespace Sc2DmaSc2Dmarxcntbr{    ///<Serial controller receive DMA count channel          B register
        using Addr = Register::Address<0x4000c024,0xffffe000,0x00000000,unsigned>;
        ///CNT
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(12,0),Register::ReadWriteAccess,unsigned> cnt{};
    }
    namespace Sc2DmaSc2Dmatxcntr{    ///<Serial controller transmit DMA counter          register
        using Addr = Register::Address<0x4000c028,0xffffe000,0x00000000,unsigned>;
        ///CNT
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(12,0),Register::ReadWriteAccess,unsigned> cnt{};
    }
    namespace Sc2DmaSc2Dmasr{    ///<Serial controller DMA status          register
        using Addr = Register::Address<0x4000c02c,0xffffe000,0x00000000,unsigned>;
        ///NSSS
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(12,10),Register::ReadWriteAccess,unsigned> nsss{};
        ///FEB
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(9,9),Register::ReadWriteAccess,unsigned> feb{};
        ///FEA
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(8,8),Register::ReadWriteAccess,unsigned> fea{};
        ///PEB
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(7,7),Register::ReadWriteAccess,unsigned> peb{};
        ///PEA
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(6,6),Register::ReadWriteAccess,unsigned> pea{};
        ///OVRB
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(5,5),Register::ReadWriteAccess,unsigned> ovrb{};
        ///OVRA
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(4,4),Register::ReadWriteAccess,unsigned> ovra{};
        ///TXBACK
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(3,3),Register::ReadWriteAccess,unsigned> txback{};
        ///TXAACK
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(2,2),Register::ReadWriteAccess,unsigned> txaack{};
        ///RXBACK
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(1,1),Register::ReadWriteAccess,unsigned> rxback{};
        ///RXAACK
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(0,0),Register::ReadWriteAccess,unsigned> rxaack{};
    }
    namespace Sc2DmaSc2Dmacr{    ///<Serial controller DMA control          register
        using Addr = Register::Address<0x4000c030,0xffffffc0,0x00000000,unsigned>;
        ///TXRST
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(5,5),Register::Access<Register::AccessType::writeOnly,Register::ReadActionType::normal,Register::ModifiedWriteValueType::normal>,unsigned> txrst{};
        ///RXRST
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(4,4),Register::Access<Register::AccessType::writeOnly,Register::ReadActionType::normal,Register::ModifiedWriteValueType::normal>,unsigned> rxrst{};
        ///TXLODB
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(3,3),Register::ReadWriteAccess,unsigned> txlodb{};
        ///TXLODA
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(2,2),Register::ReadWriteAccess,unsigned> txloda{};
        ///RXLODB
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(1,1),Register::ReadWriteAccess,unsigned> rxlodb{};
        ///RXLODA
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(0,0),Register::ReadWriteAccess,unsigned> rxloda{};
    }
    namespace Sc2DmaSc2Dmarxerrar{    ///<Serial controller receive DMA channel A          first error register
        using Addr = Register::Address<0x4000c034,0xffffe000,0x00000000,unsigned>;
        ///ADD
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(12,0),Register::ReadWriteAccess,unsigned> add{};
    }
    namespace Sc2DmaSc2Dmarxerrbr{    ///<Serial controller receive DMA channel B          first error register
        using Addr = Register::Address<0x4000c038,0xffffe000,0x00000000,unsigned>;
        ///ADD
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(12,0),Register::ReadWriteAccess,unsigned> add{};
    }
    namespace Sc2DmaSc2Dmarxcntsavedr{    ///<Serial controller receive DMA saved counter          channel B register
        using Addr = Register::Address<0x4000c070,0xffffe000,0x00000000,unsigned>;
        ///CNT
        constexpr Register::FieldLocation<Addr,Register::maskFromRange(12,0),Register::ReadWriteAccess,unsigned> cnt{};
    }
}


text:
var $ = require('jquery-cdb-v3');
var cdb = require('cartodb.js-v3');
var AddGroupUsersView = require('../../../../../../javascripts/cartodb/common/dialogs/add_group_users/add_group_users_view');

describe('common/dialogs/add_group_users/add_group_users_view', function() {
  beforeEach(function() {
    this.user = new cdb.admin.User({
      id: 123,
      base_url: 'https://cartodb.com/user/paco',
      username: 'paco',
      organization: {
        id: 'o1',
        owner: {
          id: 123
        }
      }
    });
    this.orgUsers = this.user.organization.users;
    spyOn(this.orgUsers, 'excludeCurrentUser').and.callThrough();
    spyOn(this.orgUsers, 'fetch').and.callThrough();
    this.orgUsers.sync = function(a,b,opts) {
      opts.success && opts.success({
        users: [
          {
            id: 'abc-123',
            username: 'paco'
          },
          {
            id: 'abc-456',
            username: 'pepe'
          }
        ],
        total_entries: 2,
        total_user_entries: 2
      })
    };

    this.group = new cdb.admin.Group({
      id: 'g1',
      organization: this.user.organization,
      users: [{
        id: 'u1',
        username: 'pachi'
      }]
    });

    this.view = new AddGroupUsersView({
      group: this.group,
      orgUsers: this.orgUsers
    });
    this.view.render();
  });

  afterEach(function() {
    this.view.clean();
  });

  it('should not have leaks', function() {
    expect(this.view).toHaveNoLeaks();
  });

  it('should include current user', function() {
    expect(this.orgUsers.excludeCurrentUser).toHaveBeenCalledWith(false);
  });

  describe('when view is cleaned', function() {
    beforeEach(function() {
      spyOn(this.orgUsers, 'restoreExcludeCurrentUser').and.callThrough();
      spyOn(this.view, 'elder');
      this.view.clean();
    });

    it('should restore orgUsers', function() {
      expect(this.orgUsers.restoreExcludeCurrentUser).toHaveBeenCalled();
    });

    it('should call parent clean', function() {
      expect(this.view.elder).toHaveBeenCalledWith('clean');
    });
  });

  it('should fetch org users', function() {
    expect(this.orgUsers.fetch).toHaveBeenCalled();
  });

  it('should render the users', function() {
    expect(this.innerHTML()).toContain('pepe');
    expect(this.innerHTML()).toContain('paco');
  });

  it('should disable ok btn', function() {
    expect(this.view.$('.ok').hasClass('is-disabled')).toBe(true);
  });

  describe('when at least 1 user is selected', function() {
    beforeEach(function() {
      this.view.$('.OrganizationList-userLink').click();
    });

    it('should enable ok btn', function() {
      expect(this.view.$('.ok').hasClass('is-disabled')).toBe(false);
    });

    describe('when click ok', function() {
      beforeEach(function() {
        this.jqXHR = $.Deferred();
        spyOn(this.group.users, 'addInBatch').and.returnValue(this.jqXHR);
        this.view.$('.ok').click();
      });

      it('should change state to adding users', function() {
        expect(this.innerHTML()).toContain('Adding');
      });

      describe('when is saved', function() {
        beforeEach(function() {
          spyOn(this.view, 'close');
          this.jqXHR.resolve();
        });

        it('should add users to group', function() {
          expect(this.group.users.length > 0).toBe(true);
        });

        it('should close modal', function() {
          expect(this.view.close).toHaveBeenCalled();
        });
      });

      describe('when fail', function() {
        beforeEach(function() {
          this.jqXHR.reject();
        });

        it('should show generic error', function() {
          expect(this.innerHTML()).toContain('error');
        });
      });
    });
  });
});


text:
///////////////////////////////////////////////////////////////////////////
//
// Main class for HCI2 assignments
// Authors:
//		Stefan Neubert (2015)
//		Stephan Richter (2011)
//		Patrick Lühne (2012)
//
///////////////////////////////////////////////////////////////////////////

#include "Application.h"

#include <iostream>

#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>

#include "framework/DepthCamera.h"
#include "framework/KinectMotor.h"
#include "framework/SkeletonTracker.h"

#define BOOST_SIGNALS_NO_DEPRECATION_WARNING
#include <boost/thread.hpp>
#define _USE_MATH_DEFINES
#include <math.h>
#include "uist-game/GameServer.h"
#include "uist-game/GameClient.h"
#include "uist-game/Game.h"
#include "uist-game/GameUnit.h"

const int Application::uist_level = 1;
const char* Application::uist_server = "127.0.0.1";

void Application::processFrame()
{
	///////////////////////////////////////////////////////////////////////////
	//
	// To do:
	//
	// This method will be called every frame of the camera. Insert code here in
	// order to fulfill the assignment. These images will help you doing so:
	//
	// * m_bgrImage: The image of the Kinect's color camera
	// * m_depthImage: The image of the Kinects's depth sensor
	// * m_outputImage: The image in which you can draw the touch circles.
	// * m_gameImage: The image in which the UIST game is rendered.
	//
	///////////////////////////////////////////////////////////////////////////

	// Sample code brightening up the depth image to make the values visible
	m_depthImage *= 10;
}

void Application::processSkeleton(XnUserID userId)
{
	///////////////////////////////////////////////////////////////////////////
	//
	// To do:
	//
	// This method will be called every frame of the camera for each tracked user.
	// Insert code here in order to fulfill the assignment.
	//
	// Below is an example how to retrieve a skeleton joint position and
	// (if needed) how to convert its position into image space.
	//
	///////////////////////////////////////////////////////////////////////////

	m_skeletonTracker->drawSkeleton(m_bgrImage, userId);

	xn::SkeletonCapability skeletonCap = m_skeletonTracker->getSkeletonCapability();

	XnSkeletonJointPosition leftHand;
	skeletonCap.GetSkeletonJointPosition(userId, XN_SKEL_LEFT_HAND, leftHand);
	cv::Point2f imagePosition = m_skeletonTracker->getProjectedPosition(leftHand);
}

void Application::loop()
{
	int key = cv::waitKey(20);
	switch (key)
	{
	case 'q': // quit
		m_isFinished = true;
		break;
	case 'p': // screenshot
		makeScreenshots();
		break;
	// run the loaded level
	case 'r':
		if(m_gameServer)
			m_gameServer->startGame();
		break;
	// Move fist (0) game unit with wasd
	case 'w': // north
		if(m_gameClient && m_gameClient->game())
			m_gameClient->game()->moveUnit(0, (float)M_PI_2, 1.f);
		break;
	case 'a': // west
		if(m_gameClient && m_gameClient->game())
			m_gameClient->game()->moveUnit(0, (float)M_PI, 1.f);
		break;
	case 's': // south
		if(m_gameClient && m_gameClient->game())
			m_gameClient->game()->moveUnit(0, 3 * (float)M_PI_2, 1.f);
		break;
	case 'd': // east
		if(m_gameClient && m_gameClient->game())
			m_gameClient->game()->moveUnit(0, 0.f, 1.f);
		break;
	// stop the first (0) game unit
	case ' ':
		if(m_gameClient && m_gameClient->game())
			m_gameClient->game()->moveUnit(0, 0.f, 0.f);
		break;
	// highlight the first (0) game unit
	case 'h':
		if(m_gameClient && m_gameClient->game())
			m_gameClient->game()->highlightUnit(0, true);
		break;
	case 'u':
		if(m_gameClient && m_gameClient->game())
			m_gameClient->game()->highlightUnit(0, false);
		break;
	}

	if(m_isFinished) return;

	if(m_gameClient && m_gameClient->game())
		m_gameClient->game()->render(m_gameImage);

	if(m_depthCamera)
	{
		m_depthCamera->getFrame(m_bgrImage, m_depthImage);
		processFrame();
	}

	if(m_skeletonTracker)
	{
		std::set<XnUserID>& users = m_skeletonTracker->getTrackedUsers();
		for (std::set<XnUserID>::iterator i = users.begin(); i != users.end(); ++i)
			processSkeleton(*i);
	}

	cv::imshow("bgr", m_bgrImage);
	cv::imshow("depth", m_depthImage);
	cv::imshow("output", m_outputImage);
	cv::imshow("UIST game", m_gameImage);
}

void Application::makeScreenshots()
{
	cv::imwrite("color.png", m_bgrImage);
	cv::imwrite("depth.png", m_depthImage);
	cv::imwrite("output.png", m_outputImage);
}

Application::Application()
	: m_isFinished(false)
	, m_depthCamera(nullptr)
	, m_kinectMotor(nullptr)
	, m_skeletonTracker(nullptr)
	, m_gameClient(nullptr)
	, m_gameServer(nullptr)
{
	// If you want to control the motor / LED
	// m_kinectMotor = new KinectMotor;

	// Not used for UIST game demo, uncomment for skeleton assignment
	// m_depthCamera = new DepthCamera;
	// m_skeletonTracker = new SkeletonTracker(m_depthCamera);

	// open windows
	cv::namedWindow("output", CV_WINDOW_AUTOSIZE);
	cv::namedWindow("depth", CV_WINDOW_AUTOSIZE);
	cv::namedWindow("bgr", CV_WINDOW_AUTOSIZE);
	cv::namedWindow("UIST game", CV_WINDOW_AUTOSIZE);

	// create work buffer
	m_bgrImage = cv::Mat(480, 640, CV_8UC3);
	m_depthImage = cv::Mat(480, 640, CV_16UC1);
	m_outputImage = cv::Mat(480, 640, CV_8UC1);
	m_gameImage = cv::Mat(480, 480, CV_8UC3);

	if(uist_server == "127.0.0.1") {
		m_gameServer = new GameServer;
		m_gameClient = new GameClient;
		m_gameServer->run();
		m_gameServer->loadGame(uist_level);
		boost::this_thread::sleep(boost::posix_time::milliseconds(100));
	}
	m_gameClient->run();
	m_gameClient->connectToServer(uist_server);
	std::cout << "[Info] Connected to " << uist_server << std::endl;
}

Application::~Application()
{
	// Fails due to race conditions in UIST game
	/*
	if (m_gameClient)
	{
		m_gameClient->stop();
		delete m_gameClient;
	}
	if (m_gameServer)
	{
		m_gameServer->stop();
		delete m_gameServer;
	}*/

	if (m_skeletonTracker) delete m_skeletonTracker;
	if (m_depthCamera) delete m_depthCamera;
	if (m_kinectMotor) delete m_kinectMotor;
}

bool Application::isFinished()
{
	return m_isFinished;
}


text:
// Copyright (c) 2001-2021 Aspose Pty Ltd. All Rights Reserved.
//
// This file is part of Aspose.Words. The source code in this file
// is only intended as a supplement to the documentation, and is provided
// "as is", without warranty of any kind, either expressed or implied.
//////////////////////////////////////////////////////////////////////////

using System.IO;
using Aspose.Words;
using Aspose.Words.Loading;
using Aspose.Words.Saving;
using NUnit.Framework;

namespace ApiExamples
{
    [TestFixture]
    class ExPlainTextDocument : ApiExampleBase
    {
        [Test]
        public void Load()
        {
            //ExStart
            //ExFor:PlainTextDocument
            //ExFor:PlainTextDocument.#ctor(String)
            //ExFor:PlainTextDocument.Text
            //ExSummary:Shows how to load the contents of a Microsoft Word document in plaintext.
            Document doc = new Document();
            DocumentBuilder builder = new DocumentBuilder(doc);
            builder.Writeln("Hello world!");

            doc.Save(ArtifactsDir + "PlainTextDocument.Load.docx");

            PlainTextDocument plaintext = new PlainTextDocument(ArtifactsDir + "PlainTextDocument.Load.docx");

            Assert.AreEqual("Hello world!", plaintext.Text.Trim());
            //ExEnd
        }

        [Test]
        public void LoadFromStream()
        {
            //ExStart
            //ExFor:PlainTextDocument.#ctor(Stream)
            //ExSummary:Shows how to load the contents of a Microsoft Word document in plaintext using stream.
            Document doc = new Document();
            DocumentBuilder builder = new DocumentBuilder(doc);

            builder.Writeln("Hello world!");
            doc.Save(ArtifactsDir + "PlainTextDocument.LoadFromStream.docx");

            using (FileStream stream = new FileStream(ArtifactsDir + "PlainTextDocument.LoadFromStream.docx", FileMode.Open))
            {
                PlainTextDocument plaintext = new PlainTextDocument(stream);

                Assert.AreEqual("Hello world!", plaintext.Text.Trim());
            }
            //ExEnd
        }

        [Test]
        public void LoadEncrypted()
        {
            //ExStart
            //ExFor:PlainTextDocument.#ctor(String, LoadOptions)
            //ExSummary:Shows how to load the contents of an encrypted Microsoft Word document in plaintext.
            Document doc = new Document();
            DocumentBuilder builder = new DocumentBuilder(doc);
            builder.Writeln("Hello world!");

            OoxmlSaveOptions saveOptions = new OoxmlSaveOptions();
            saveOptions.Password = "MyPassword";

            doc.Save(ArtifactsDir + "PlainTextDocument.LoadEncrypted.docx", saveOptions);

            LoadOptions loadOptions = new LoadOptions();
            loadOptions.Password = "MyPassword";

            PlainTextDocument plaintext = new PlainTextDocument(ArtifactsDir + "PlainTextDocument.LoadEncrypted.docx", loadOptions);

            Assert.AreEqual("Hello world!", plaintext.Text.Trim());
            //ExEnd
        }

        [Test]
        public void LoadEncryptedUsingStream()
        {
            //ExStart
            //ExFor:PlainTextDocument.#ctor(Stream, LoadOptions)
            //ExSummary:Shows how to load the contents of an encrypted Microsoft Word document in plaintext using stream.
            Document doc = new Document();
            DocumentBuilder builder = new DocumentBuilder(doc);

            builder.Writeln("Hello world!");

            OoxmlSaveOptions saveOptions = new OoxmlSaveOptions();
            saveOptions.Password = "MyPassword";

            doc.Save(ArtifactsDir + "PlainTextDocument.LoadFromStreamWithOptions.docx", saveOptions);

            LoadOptions loadOptions = new LoadOptions();
            loadOptions.Password = "MyPassword";

            using (FileStream stream = new FileStream(ArtifactsDir + "PlainTextDocument.LoadFromStreamWithOptions.docx", FileMode.Open))
            {
                PlainTextDocument plaintext = new PlainTextDocument(stream, loadOptions);

                Assert.AreEqual("Hello world!", plaintext.Text.Trim());
            }
            //ExEnd
        }

        [Test]
        public void BuiltInProperties()
        {
            //ExStart
            //ExFor:PlainTextDocument.BuiltInDocumentProperties
            //ExSummary:Shows how to load the contents of a Microsoft Word document in plaintext and then access the original document's built-in properties.
            Document doc = new Document();
            DocumentBuilder builder = new DocumentBuilder(doc);

            builder.Writeln("Hello world!");
            doc.BuiltInDocumentProperties.Author = "John Doe";

            doc.Save(ArtifactsDir + "PlainTextDocument.BuiltInProperties.docx");

            PlainTextDocument plaintext = new PlainTextDocument(ArtifactsDir + "PlainTextDocument.BuiltInProperties.docx");

            Assert.AreEqual("Hello world!", plaintext.Text.Trim());
            Assert.AreEqual("John Doe", plaintext.BuiltInDocumentProperties.Author);
            //ExEnd
        }

        [Test]
        public void CustomDocumentProperties()
        {
            //ExStart
            //ExFor:PlainTextDocument.CustomDocumentProperties
            //ExSummary:Shows how to load the contents of a Microsoft Word document in plaintext and then access the original document's custom properties.
            Document doc = new Document();
            DocumentBuilder builder = new DocumentBuilder(doc);

            builder.Writeln("Hello world!");
            doc.CustomDocumentProperties.Add("Location of writing", "123 Main St, London, UK");

            doc.Save(ArtifactsDir + "PlainTextDocument.CustomDocumentProperties.docx");

            PlainTextDocument plaintext = new PlainTextDocument(ArtifactsDir + "PlainTextDocument.CustomDocumentProperties.docx");

            Assert.AreEqual("Hello world!", plaintext.Text.Trim());
            Assert.AreEqual("123 Main St, London, UK", plaintext.CustomDocumentProperties["Location of writing"].Value);
            //ExEnd
        }
    }
}


text:
<!DOCTYPE html>

    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />

    <title>Ryan's blog - Blogging about stuffs - useful and not useful</title>
    <meta name="description" content="Ryan McKinnon personal experiment/blog | located in Plantation Florida" />

    <meta name="HandheldFriendly" content="True" />
    <meta name="MobileOptimized" content="320" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />

    <link rel="stylesheet" type="text/css" href="/assets/css/screen.css" />
    <link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Merriweather:300,700,700italic,300italic|Open+Sans:700,400" />

    <link rel="stylesheet" type="text/css" href="/assets/css/main.css" />
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">

        Home
        Subscribe

Joke

                    on jokes and funny

During his physical, the doctor asked the patient about his daily activity level. He described a typical day this way:
"Well, yesterday afternoon, I waded along the edge of a lake, drank eight beers, escaped from wild dogs in the heavy brush, jumped away from an aggressive rattlesnake, marched up and down several rocky hills, stood in a patch of poison ivy, crawled out of quicksand and took four leaks behind big trees."
Inspired by the story, the doctor said, "You must be one hell of an outdoors man!"
"NAH," he replied, "I'm just a shitty golfer."

                    Ryan McKinnon's Picture

 Ryan McKinnon

                        Part time nerd full time dad.

Share this post

        Twitter

        Facebook

        Google+

Made with  by Ryan


text:
namespace iv {
namespace lv5 {

GlobalData::GlobalData(Context* ctx)
  : ctx_(ctx),
    random_generator_(0, 1, static_cast<int>(std::time(nullptr))),
    regs_(),
    symbol_table_(),
    classes_(),
    string_cache_(),
    global_obj_(JSGlobal::New(ctx)),
    string_empty_(nullptr),
    string_null_(),
    string_true_(),
    string_false_(),
    string_undefined_(),
    string_function_(),
    string_object_(),
    string_number_(),
    string_string_(),
    string_symbol_(),
    string_boolean_(),
    string_empty_regexp_(),
    primitive_string_map_(Map::New(ctx, static_cast<JSObject*>(nullptr), true)),
    primitive_symbol_map_(Map::New(ctx, static_cast<JSObject*>(nullptr), true)),
    empty_object_map_(Map::New(ctx, static_cast<JSObject*>(nullptr), false)),
    function_map_(Map::New(ctx, static_cast<JSObject*>(nullptr), false)),
    array_map_(Map::New(ctx, static_cast<JSObject*>(nullptr), true)),
    array_iterator_map_(Map::New(ctx, static_cast<JSObject*>(nullptr), true)),
    string_map_(Map::New(ctx, static_cast<JSObject*>(nullptr), true)),
    string_iterator_map_(Map::New(ctx, static_cast<JSObject*>(nullptr), true)),
    symbol_map_(Map::New(ctx, static_cast<JSObject*>(nullptr), false)),
    boolean_map_(Map::New(ctx, static_cast<JSObject*>(nullptr), false)),
    number_map_(Map::New(ctx, static_cast<JSObject*>(nullptr), false)),
    date_map_(Map::New(ctx, static_cast<JSObject*>(nullptr), false)),
    regexp_map_(nullptr),
    error_map_(Map::New(ctx, static_cast<JSObject*>(nullptr), false)),
    eval_error_map_(Map::New(ctx, static_cast<JSObject*>(nullptr), false)),
    range_error_map_(Map::New(ctx, static_cast<JSObject*>(nullptr), false)),
    reference_error_map_(Map::New(ctx, static_cast<JSObject*>(nullptr), false)),
    syntax_error_map_(Map::New(ctx, static_cast<JSObject*>(nullptr), false)),
    type_error_map_(Map::New(ctx, static_cast<JSObject*>(nullptr), false)),
    uri_error_map_(Map::New(ctx, static_cast<JSObject*>(nullptr), false)),
    map_map_(Map::New(ctx, static_cast<JSObject*>(nullptr), false)),
    map_iterator_map_(Map::New(ctx, static_cast<JSObject*>(nullptr), true)),
    weak_map_map_(Map::New(ctx, static_cast<JSObject*>(nullptr), false)),
    set_map_(Map::New(ctx, static_cast<JSObject*>(nullptr), false)),
    set_iterator_map_(Map::New(ctx, static_cast<JSObject*>(nullptr), true)),
    array_buffer_map_(nullptr),
    data_view_map_(nullptr),
    iterator_map_(nullptr),
    iterator_result_map_(nullptr),
    typed_array_maps_(),
    normal_arguments_map_(nullptr),
    strict_arguments_map_(nullptr),
    number_format_map_(Map::New(ctx, static_cast<JSObject*>(nullptr), false)),
    date_time_format_map_(Map::New(ctx, static_cast<JSObject*>(nullptr), false)),
    gc_hook_(this) {
  {
    Error::Dummy e;
    string_empty_ = new JSString(ctx);
    string_null_ = JSString::New(ctx, "null", &e);
    string_true_ = JSString::New(ctx, "true", &e);
    string_false_ = JSString::New(ctx, "false", &e);
    string_undefined_ = JSString::New(ctx, "undefined", &e);
    string_function_ = JSString::New(ctx, "function", &e);
    string_object_ = JSString::New(ctx, "object", &e);
    string_number_ = JSString::New(ctx, "number", &e);
    string_string_ = JSString::New(ctx, "string", &e);
    string_symbol_ = JSString::New(ctx, "symbol", &e);
    string_boolean_ = JSString::New(ctx, "boolean", &e);
    string_empty_regexp_ = JSString::New(ctx, "(?:)", &e);

    // RegExp Map
    // see also jsregexp.h, JSRegExp::FIELD
    {
      MapBuilder builder(ctx, nullptr);
      builder.Add(symbol::source(), ATTR::CreateData(ATTR::N));
      builder.Add(symbol::global(), ATTR::CreateData(ATTR::N));
      builder.Add(symbol::ignoreCase(), ATTR::CreateData(ATTR::N));
      builder.Add(symbol::multiline(), ATTR::CreateData(ATTR::N));
      builder.Add(symbol::lastIndex(), ATTR::CreateData(ATTR::W));
      regexp_map_ = builder.Build(false);
    }

    // ArrayBuffer Map
    //   see also jsarray_buffer.h, JSArrayBuffer::FIELD
    {
      MapBuilder builder(ctx, nullptr);
      builder.Add(symbol::byteLength(), ATTR::CreateData(ATTR::N));
      array_buffer_map_ = builder.Build(false);
    }

    // DataView Map
    //   see also jsdata_view.h, JSDataView::FIELD
    {
      MapBuilder builder(ctx, nullptr);
      builder.Add(symbol::byteLength(), ATTR::CreateData(ATTR::N));
      builder.Add(symbol::buffer(), ATTR::CreateData(ATTR::N));
      builder.Add(symbol::byteOffset(), ATTR::CreateData(ATTR::N));
      data_view_map_ = builder.Build(false);
    }

    // TypedArray Map
    //   see also jstyped_array.h, TypedArrayImpl::FIELD
    for (TypedArrayMaps::iterator it = typed_array_maps_.begin(),
         last = typed_array_maps_.end(); it != last; ++it) {
      MapBuilder builder(ctx, nullptr);
      builder.Add(symbol::length(), ATTR::CreateData(ATTR::N));
      builder.Add(symbol::byteLength(), ATTR::CreateData(ATTR::N));
      builder.Add(symbol::buffer(), ATTR::CreateData(ATTR::N));
      builder.Add(symbol::byteOffset(), ATTR::CreateData(ATTR::N));
      *it = builder.Build(false, true);
    }

    InitGlobalSymbols(ctx);
  }
}

void GlobalData::InitNormalObjectMaps(Context* ctx) {
  // Iterator Map
  uint32_t next_offset;
  iterator_map_ =
      empty_object_map()
        ->AddPropertyTransition(
            ctx,
            symbol::next(),
            ATTR::Object::Data(),
            &next_offset
        );

  // IteratorResult Map
  uint32_t value_offset, done_offset;
  iterator_result_map_ =
      empty_object_map()
        ->AddPropertyTransition(
            ctx,
            symbol::value(),
            ATTR::Object::Data(),
            &value_offset
        )
        ->AddPropertyTransition(
            ctx,
            symbol::done(),
            ATTR::Object::Data(),
            &done_offset
        );
  // assert(value_offset == JSIteratorResult::VALUE);
  // assert(done_offset  == JSIteratorResult::DONE);
}

// If string is not cached, return nullptr
JSString* GlobalData::GetSingleString(char16_t ch) {
  if (ch < 0x80) {
    // caching value
    const char ascii = ch;
    if (string_cache_[ch]) {
      return string_cache_[ch];
    }
    return (string_cache_[ch] =
            new JSSeqString(ctx_, true, &ascii, &ascii + 1));
  }
  return nullptr;
}

void GlobalData::InitArgumentsMap() {
  JSObject* proto = object_prototype();
  // normal arguments map
  {
    MapBuilder builder(ctx(), proto);
    builder.Add(symbol::length(), ATTR::CreateData(ATTR::W | ATTR::C));
    builder.Add(symbol::callee(), ATTR::CreateData(ATTR::W | ATTR::C));
    normal_arguments_map_ = builder.Build(false, true);
  }
  // strict arguments map
  {
    MapBuilder builder(ctx(), proto);
    builder.Add(symbol::length(), ATTR::CreateData(ATTR::W | ATTR::C));
    builder.Add(symbol::callee(), ATTR::CreateAccessor(ATTR::N));
    builder.Add(symbol::caller(), ATTR::CreateAccessor(ATTR::N));
    strict_arguments_map_ = builder.Build(false, true);
  }
}

} }  // namespace iv::lv5


text:
package org.jhaws.common.lang;

import java.util.LinkedHashMap;

public class LongValueLinkedHashMap<K> extends LinkedHashMap<K, Long> implements LongValueMap<K> {
    private static final long serialVersionUID = 5840996068861570167L;
}


text:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="oval" android:dither="true">
    <solid android:color="@android:color/transparent"/>
    <size
        android:width="60dp"
        android:height="60dp"/>
</shape>


text:
<link rel="stylesheet" href="../shared_js/perfect-scrollbar/css/perfect-scrollbar.min.css">

<link rel="import" href="../../bower_components/polymer/polymer.html">

<link rel="import" href="../../bower_components/neon-animation/neon-animation.html">
<link rel="import" href="../../bower_components/neon-animation/neon-animatable.html">
<link rel="import" href="../../bower_components/neon-animation/neon-animations.html">
<link rel="import" href="../../bower_components/paper-material/paper-material.html"/>
<link rel="import" href="../../bower_components/paper-menu/paper-menu.html">
<link rel="import" href="../../bower_components/paper-item/paper-item.html">
<link rel="import" href="../../bower_components/paper-button/paper-button.html">
<link rel="import" href="../../bower_components/paper-dropdown-menu/paper-dropdown-menu.html">
<link rel="import" href="../../bower_components/paper-input/paper-input.html">
<link rel="import" href="../../bower_components/paper-input/paper-textarea.html">
<link rel="import" href="../../bower_components/paper-icon-button/paper-icon-button.html">
<link rel="import" href="../../bower_components/paper-dialog/paper-dialog.html">
<link rel="import" href="../../bower_components/paper-slider/paper-slider.html">
<link rel="import" href="../../bower_components/paper-spinner/paper-spinner.html">
<link rel="import" href="../../bower_components/paper-checkbox/paper-checkbox.html">
<link rel="import" href="../../bower_components/iron-icons/iron-icons.html">
<link rel="import" href="../../bower_components/paper-checkbox/paper-checkbox.html">
<link rel="import" href="../../bower_components/paper-tooltip/paper-tooltip.html">

<link rel="import" href="../page-slider-controllet/page-slider-controllet.html">

<link rel="import" href="../select-dataset-controllet/select-dataset-controllet.html">
<link rel="import" href="select-layers-controllet.html"/>

<dom-module id="map-controllet">

    <template>

            <paper-button id="addDataletButton" raised on-click="_onAddDatalet"
                          disabled={{addDataletButtonState.disabled}} hidden={{addDataletButtonState.hidden}}>
                {{_translate('addDataletButton')}}
            </paper-button>
            <paper-button id="addDatasetButton" raised on-click="_onAddDataset"
                          disabled={{addDatasetButtonState.disabled}} hidden={{addDatasetButtonState.hidden}}>
                {{_translate('addDatasetButton')}}
            </paper-button>

        <page-slider-controllet id="slider">

            <neon-animatable>

                <select-dataset-controllet id="select_dataset" datasets={{datasets}}
                                           suggested-datasets={{suggestedDatasets}}></select-dataset-controllet>

            </neon-animatable>

            <neon-animatable>

                <select-layers-controllet id="select_layers"></select-layers-controllet>

            </neon-animatable>

            <neon-animatable>

            </neon-animatable>

        </page-slider-controllet>

    </template>

</dom-module>


text:
<?php

namespace CfdiUtils\Validate\Common;

use CfdiUtils\Nodes\NodeInterface;
use CfdiUtils\Validate\Asserts;
use CfdiUtils\Validate\Status;

trait TimbreFiscalDigitalVersionValidatorTrait
{
    public function validate(NodeInterface $comprobante, Asserts $asserts)
    {
        $asserts->put(
            'TFDVERSION01',
            'Si existe el complemento timbre fiscal digital, entonces su versión debe ser 1.1'
        );

        $tfdVersion = $comprobante->searchNode('cfdi:Complemento', 'tfd:TimbreFiscalDigital');
        if (null !== $tfdVersion) {
            $asserts->putStatus(
                'TFDVERSION01',
                Status::when('1.1' === $tfdVersion['Version'])
            );
        }
    }
}


text:
import Store from '../../Store';
import Expires from '../../Expires';
import { set } from '../set';

describe('Test set command', () => {
  it('should set value', () => {
    const redis = new MockRedis();
    (<any>redis).set('mykey', 'val');
    expect(redis.get('mykey')).toBe('val');
  });
  it('should expire key after 1 second (EX)', (done) => {
    const redis = new MockRedis();
    (<any>redis).set('mykey', 'val', 'EX', 1);
    expect(redis.get('mykey')).toBe('val');
    setTimeout(() => {
      expect(redis.get('mykey')).toBeNull();
      done();
    }, 1100);
  });
  it('should expire key after 500 milliseconds (PX)', (done) => {
    const redis = new MockRedis();
    (<any>redis).set('mykey', 'val', 'PX', 400);
    expect(redis.get('mykey')).toBe('val');
    setTimeout(() => {
      expect(redis.get('mykey')).toBeNull();
      done();
    }, 600);
  });
  it('should throw if NX and XX both options provided', () => {
    const redis = new MockRedis();
    expect(() => (<any>redis).set('mykey', 'val', 'NX', 'XX'))
      .toThrowError('ERR syntax error.');
  });
  it('should only set if not exists (NX)', () => {
    const redis = new MockRedis();
    expect((<any>redis).set('mykey', 'val', 'NX')).toBe('OK');
    expect((<any>redis).set('mykey', 'val1', 'NX')).toBeNull();
  });
  it('should only set if exists (XX)', () => {
    const redis = new MockRedis();
    expect((<any>redis).set('mykey', 'val', 'XX')).toBeNull();
    (<any>redis).set('mykey', 'val');
    expect((<any>redis).set('mykey', 'val1', 'XX')).toBe('OK');
  });
});

class MockRedis {
  private data: Store;
  private expires: Expires;
  constructor() {
    this.expires = new Expires();
    this.data = new Store(this.expires);
    (<any>this)['set'] = set.bind(this);
  }
  get(key: string) {
    return this.data.get(key);
  }
  expire(key: string, seconds: number) {
    this.expires.set(key, (seconds * 1000) + Date.now());
  }
}


text:
+++
draft = false
image = "https://steemitimages.com/DQmaNx9Jq6sAjkxT8kciEKrduyVvfYwsiskSpQKhKnDWxYL/html-3-colonnes.jpg"
showonlyimage = false
date = "2017-06-23T20:22:08+05:30"
title = "Comment créer un article en 3 colonnes avec un tableau HTML ?"
weight = 11
steem = "fr/@becometheartist/fr-comment-creer-un-article-en-3-colonnes-avec-un-tableau-html-article-available-in-en-de-fr-and-127799"
+++

<!--more-->


text:
cd /x1/buildmaster/master1/public_html/projects
chmod -R 755 . 2>&1 >/dev/null
chmod -R g+w openoffice/milestones 2>&1 >/dev/null
cat header.inc > index.html
echo '

    Introduction

Welcome to the ASF Buildbot Instance. Projects are welcome to sign up to have their projects make use of Buildbot.

For more information see the main Buildbot information page

For info on other CI systems we use at the ASF such as Jenkins and Gump see the main  Index page

   Projects that have published docs and or APIs

' >> index.html

find . -mindepth 2 -name "index.html" -exec echo '{}
' \; | sort | sed -e s/\\.\\///g >> index.html

echo '

Projects that have had Apache RAT reports run against them
' >> index.html

find . -mindepth 1 -name "rat-output.html" -exec echo '{}
' \; | sort | sed -e s/\\.\\///g >> index.html
echo '
' >> index.html
find . -mindepth 1 -name "rat-output.txt" -exec echo '{}
' \; | sort | sed -e s/\\.\\///g >> index.html
echo '
' >> index.html
echo '
See also:  A master summary table of project RAT reports.
' >> index.html
echo '

Notes:

This page is re-generated every hour. Depending on project builds and how they are configured to generate
documentation, APIs, or have RAT reports run against their latest trunk, will determine what links appear here.

Any documentation, install instructions or anything else shown in any project build outputs above are not official released information and should not be treated as such. This is a testing environment and any websites, documentation, javadocs etc are built from the latest unreleased source code in subversion. Always refer to the official project website and/or released documentation.

' >> index.html
cat footer.inc >> index.html