text:
package org.apache.felix.scrplugin.helper;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

import org.apache.felix.scrplugin.Log;

/**
 * Utility class for handling errors and warnings
 */
public class IssueLog {

    private final boolean strictMode;

    private final List<Entry> errors = new ArrayList<Entry>();

    private final List<Entry> warnings = new ArrayList<Entry>();

    private final List<Entry> deprecationWarnings = new ArrayList<Entry>();

    public IssueLog(final boolean strictMode) {
        this.strictMode = strictMode;
    }

    public int getNumberOfErrors() {
        return this.errors.size();
    }

    public boolean hasErrors() {
        return errors.size() > 0 || (this.strictMode && (warnings.size() > 0 || this.deprecationWarnings.size() > 0));
    }

    public void addError(final String message, final String location) {
        errors.add(new Entry(message, location));
    }

    public void addWarning(final String message, final String location) {
        warnings.add(new Entry(message, location));
    }

    public void addDeprecationWarning(final String message, final String location) {
        deprecationWarnings.add(new Entry(message, location));
    }

    public void logMessages(final Log log) {
        // now log warnings and errors (warnings first)
        // in strict mode everything is an error!
        final Iterator<Entry> depWarnings = this.deprecationWarnings.iterator();
        while (depWarnings.hasNext()) {
            final Entry entry = depWarnings.next();
            if (strictMode) {
                log.error(entry.message, entry.location, entry.lineNumber, entry.columnNumber);
            } else {
                log.warn(entry.message, entry.location, entry.lineNumber, entry.columnNumber);
            }
        }
        if (this.deprecationWarnings.size() > 0) {
            final String msg = "It is highly recommended to fix these problems, as future versions might not "
                            + "support these features anymore.";
            if (strictMode) {
                log.error(msg);
            } else {
                log.warn(msg);
            }
        }

        final Iterator<Entry> warnings = this.warnings.iterator();
        while (warnings.hasNext()) {
            final Entry entry = warnings.next();
            if (strictMode) {
                log.error(entry.message, entry.location, entry.lineNumber, entry.columnNumber);
            } else {
                log.warn(entry.message, entry.location, entry.lineNumber, entry.columnNumber);
            }
        }

        final Iterator<Entry> errors = this.errors.iterator();
        while (errors.hasNext()) {
            final Entry entry = errors.next();
            log.error(entry.message, entry.location, entry.lineNumber, entry.columnNumber);
        }
    }

    private static class Entry {

    	static final int LINE_NUMBER_UNKNOWN = 1;
    	static final int COLUMN_NUMBER_UNKNOWN = 1;

        final String message;
        final String location;
        final int lineNumber;
        final int columnNumber;

        Entry(final String message, final String location) {
        	this(message, location, LINE_NUMBER_UNKNOWN, COLUMN_NUMBER_UNKNOWN);
        }

        Entry(final String message, final String location, final int lineNumber, final int columnNumber) {
        	this.message = message;
        	this.location = location;
        	this.lineNumber = lineNumber;
        	this.columnNumber = columnNumber;
        }

        @Override
        public String toString() {
            return this.location + " [" + this.lineNumber+ "," + this.columnNumber+"] : " + this.message;
        }
    }
}


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

    <!-- From: file:/home/adam/Workspace/Plankplaneraren/android/app/src/main/res/values-w820dp/dimens.xml -->
    <eat-comment />

    <dimen name="activity_horizontal_margin">64dp</dimen>

</resources>

redpajama_set_name: RedPajamaGithub


text:
<html>
	<head>
		<title>
			org.jaxen.*
		</title>
	</head>

	<body>
		<p>
			This package defines the core Jaxen API to the XPath engine.
                        Using this API you can work with XPath on any object model.
		</p>
	</body>
</html>


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<title>DM_LISTDELETE</title>
<meta http-equiv="Content-Type" Content="text/html; charset=Windows-1251">
<link rel="stylesheet" type="text/css" href="../../../styles/styles.css">

DM_LISTDELETE

Messages |
Dialog API

The <dfn>DM_LISTDELETE</dfn> message is sent to the dialog manager to delete items from a
DI_COMBOBOX or DI_LISTBOX list.

Param1

The ID of the dialog item from which the items should be deleted.

Param2

Pointer to a FarListDelete structure describing the delete parameters, or NULL.

Return

TRUE if the items have been deleted from the list.

FALSE if an error occurred while deleting data.

Controls

Control	Description

DI_LISTBOX
list

DI_COMBOBOX
combined list

Remarks

If <dfn>Param2</dfn> is equal to NULL,
all items will be deleted from the list.

Example

// *** delete first two list items ***
struct FarListDelete FLDItem;
FLDItem.StartIndex=0;
FLDItem.Count=2;
Info.SendDlgMessage(hDlg,DM_LISTDELETE,ID,(LONG_PTR)&FLDItem);

// *** clear all list ***
  //   Method 1:
  struct FarListDelete FLDItem={0,0};
  Info.SendDlgMessage(hDlg,DM_LISTDELETE,ID,(LONG_PTR)&FLDItem);

  //   Method 2:
  Info.SendDlgMessage(hDlg,DM_LISTDELETE,ID,(LONG_PTR)NULL);

See also:

DialogEx,
FarListDelete


text:
import mcpi.minecraft as minecraft
import mcpi.block as block

mc  = minecraft.Minecraft.create()

x      = None
y      = None
z      = None
width  = None
height = None
depth  = None

def define(x1, y1, z1, w, h, d):
    """Remember the location and dimensions of the room"""
    global x, y, z, width, height, depth

    # Remember the dimensions of the room
    x      = x1
    y      = y1
    z      = z1
    width  = w
    height = h
    depth  = d

def highlight(visible):
    """Highlight the corners of the geofenced region"""
    if visible:
        b = block.STONE.id
    else:
        b = block.AIR.id

    mc.setBlock(x,       y,        z, b)
    mc.setBlock(x+width, y,        z, b)
    mc.setBlock(x,       y+height, z, b)
    mc.setBlock(x+width, y+height, z, b)

    mc.setBlock(x,       y,        z+depth, b)
    mc.setBlock(x+width, y,        z+depth, b)
    mc.setBlock(x,       y+height, z+depth, b)
    mc.setBlock(x+width, y+height, z+depth, b)

def playerInside():
    """Geo fence the room, returns True if inside the room"""
    pos = mc.player.getTilePos()
    return inside(pos.x, pos.y, pos.z)

def inside(px, py, pz):
    if  px >= x and px <= x + width \
    and py >= y and py <= y + height \
    and pz >= z and pz <= z + depth:
        return True # inside geofenced region
    return False # not inside geofenced region

def action():
    """only called when the player is in the room"""
    mc.postToChat("Player is inside geofenced region")

# TEST HARNESS

def test():
    """Test that the geofencing works"""
    import time
    pos  = mc.player.getTilePos()
    SIZE = 20

    define(pos.x+4, pos.y, pos.z, SIZE, SIZE, SIZE)
    highlight(True)

    try:
        while True:
            time.sleep(1)
            if playerInside():
                action()
    finally:
        highlight(False)

# Only run the test code if this file is the main program

if __name__ == "__main__":
    test()

# END


text:
.groupeditemspage section[role=main] {
    -ms-grid-row: 1;
    -ms-grid-row-span: 2;
}

.groupeditemspage .groupeditemslist {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 0;
}

    /* This selector is used to prevent ui-dark/light.css from overwriting changes to .win-surface. */
    .groupeditemspage .groupeditemslist .win-horizontal.win-viewport .win-surface {
        margin-bottom: 60px;
        margin-left: 45px;
        margin-right: 115px;
        margin-top: 128px;
    }

    .groupeditemspage .groupeditemslist .win-groupheader {
        padding: 5px;
    }

    .groupeditemspage .groupeditemslist .item {
        -ms-grid-columns: 1fr;
        -ms-grid-rows: 1fr 90px;
        display: -ms-grid;
        width: 250px;
        height: 240px;
    }

        /* Resize thumbnail background images so they look consistent */
        .groupeditemspage .groupeditemslist .item .item-image {
            -ms-grid-row-span: 1;
            background-repeat: no-repeat;
            background-position: center center;
            background-size: 275px auto;
        }

        .groupeditemspage .groupeditemslist .item .item-overlay {
            -ms-grid-row: 2;
            -ms-grid-rows: 1fr 21px;
            display: -ms-grid;
            padding: 6px 15px 2px 15px;
        }

            .groupeditemspage .groupeditemslist .item .item-overlay .item-title {
                -ms-grid-row: 1;
                overflow: hidden;
                width: 220px;
            }

            .groupeditemspage .groupeditemslist .item .item-overlay .item-date {
                -ms-grid-row: 2;
                width: 220px;
            }

@media screen and (-ms-view-state: fullscreen-landscape), screen and (-ms-view-state: fullscreen-portrait), screen and (-ms-view-state: filled) {
    .groupeditemspage .groupeditemslist .item .item-overlay {
        background: rgba(0,0,0,0.65);
    }

        .groupeditemspage .groupeditemslist .item .item-overlay .item-title {
            color: rgba(255,255,255,0.87);
        }

        .groupeditemspage .groupeditemslist .item .item-overlay .item-date {
            color: rgba(255,255,255,0.6);
        }
}

@media screen and (-ms-view-state: fullscreen-landscape) and (-ms-high-contrast), screen and (-ms-view-state: fullscreen-portrait) and (-ms-high-contrast), screen and (-ms-view-state: filled) and (-ms-high-contrast) {
    .groupeditemspage .groupeditemslist .item .item-overlay {
        color: WindowText;
    }
}

@media screen and (-ms-view-state: snapped) {
    .groupeditemspage section[role=main] {
        -ms-grid-row: 2;
        -ms-grid-row-span: 1;
    }

    .groupeditemspage .groupeditemslist .win-vertical.win-viewport .win-surface {
        margin-bottom: 30px;
        margin-top: 0;
    }

    .groupeditemspage .groupeditemslist .win-container {
        margin-bottom: 15px;
        margin-left: 13px;
        margin-right: 27px;
        padding: 7px;
    }

    .groupeditemspage .groupeditemslist .item {
        -ms-grid-columns: 100px 1fr;
        -ms-grid-rows: 1fr;
        display: -ms-grid;
        width: auto;
        height: 60px;
    }

        .groupeditemspage .groupeditemslist .item .item-image {
            -ms-grid-column: 1;
            -ms-grid-row-span: 1;
            width: 100px;
            height: 60px;
            background-size: 110px auto;
        }

        .groupeditemspage .groupeditemslist .item .item-overlay {
            -ms-grid-column: 2;
            -ms-grid-row: 1;
            -ms-grid-row-align: stretch;
            background: transparent;
            display: inline-block;
            margin-left: 10px;
            padding: 0;
        }

            .groupeditemspage .groupeditemslist .item .item-overlay .item-title {
                width: auto;
                max-height: 40px;
            }

            .groupeditemspage .groupeditemslist .item .item-overlay .item-date {
                opacity: 0.6;
                width: auto;
            }
}

@media screen and (-ms-view-state: fullscreen-portrait) {
    .groupeditemspage .groupeditemslist .win-horizontal.win-viewport .win-surface {
        margin-left: 25px;
    }
}


text:
ACCEPTED

#### According to
International Plant Names Index

#### Published in
null

#### Original name
Ardisia acuminata Willd.

### Remarks
null


text:
package org.apache.felix.dm.runtime.itest.tests;

import org.apache.felix.dm.itest.util.Ensure;
import org.apache.felix.dm.itest.util.TestBase;
import org.apache.felix.dm.runtime.itest.components.PropagateAnnotation;
import org.osgi.framework.ServiceRegistration;

/**
 * Use case: Verify that dependency "propagate" option is properly propagating properties to provided service.
 *
 * @author Felix Project Team
 */
@SuppressWarnings("rawtypes")
public class PropagateAnnotationTest extends TestBase {

    public void testServiceDependencyPropagate() {
        Ensure e = new Ensure();
        ServiceRegistration sr = register(e, PropagateAnnotation.ENSURE);
        e.waitForStep(3, 10000);
        sr.unregister();
    }
}


text:
#pragma once
#include <aws/ec2/EC2_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>

namespace Aws
{
namespace Utils
{
namespace Xml
{
  class XmlNode;
} // namespace Xml
} // namespace Utils
namespace EC2
{
namespace Model
{

  /**
   *
Describes an IPv6 address associated with a network interface.

See
   * Also:
   AWS
   * API Reference

   */
  class AWS_EC2_API NetworkInterfaceIpv6Address
  {
  public:
    NetworkInterfaceIpv6Address();
    NetworkInterfaceIpv6Address(const Aws::Utils::Xml::XmlNode& xmlNode);
    NetworkInterfaceIpv6Address& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);

    void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
    void OutputToStream(Aws::OStream& oStream, const char* location) const;

    /**
     *
The IPv6 address.

     */
    inline const Aws::String& GetIpv6Address() const{ return m_ipv6Address; }

    /**
     *
The IPv6 address.

     */
    inline void SetIpv6Address(const Aws::String& value) { m_ipv6AddressHasBeenSet = true; m_ipv6Address = value; }

    /**
     *
The IPv6 address.

     */
    inline void SetIpv6Address(Aws::String&& value) { m_ipv6AddressHasBeenSet = true; m_ipv6Address = std::move(value); }

    /**
     *
The IPv6 address.

     */
    inline void SetIpv6Address(const char* value) { m_ipv6AddressHasBeenSet = true; m_ipv6Address.assign(value); }

    /**
     *
The IPv6 address.

     */
    inline NetworkInterfaceIpv6Address& WithIpv6Address(const Aws::String& value) { SetIpv6Address(value); return *this;}

    /**
     *
The IPv6 address.

     */
    inline NetworkInterfaceIpv6Address& WithIpv6Address(Aws::String&& value) { SetIpv6Address(std::move(value)); return *this;}

    /**
     *
The IPv6 address.

     */
    inline NetworkInterfaceIpv6Address& WithIpv6Address(const char* value) { SetIpv6Address(value); return *this;}

  private:

    Aws::String m_ipv6Address;
    bool m_ipv6AddressHasBeenSet;
  };

} // namespace Model
} // namespace EC2
} // namespace Aws


text:
namespace content {
class BrowserChildProcessHostIterator;
}

// Plugins/workers and other child processes that live on the IO thread use this
// class. RenderProcessHostImpl is the main exception that doesn't use this
/// class because it lives on the UI thread.
class CONTENT_EXPORT BrowserChildProcessHostImpl :
    public content::BrowserChildProcessHost,
    public NON_EXPORTED_BASE(content::ChildProcessHostDelegate),
    public ChildProcessLauncher::Client,
    public base::WaitableEventWatcher::Delegate {
 public:
  BrowserChildProcessHostImpl(
      content::ProcessType type,
      content::BrowserChildProcessHostDelegate* delegate);
  virtual ~BrowserChildProcessHostImpl();

  // Terminates all child processes and deletes each BrowserChildProcessHost
  // instance.
  static void TerminateAll();

  // BrowserChildProcessHostImpl implementation:
  virtual bool Send(IPC::Message* message) OVERRIDE;
  virtual void Launch(
#if defined(OS_WIN)
      const FilePath& exposed_dir,
#elif defined(OS_POSIX)
      bool use_zygote,
      const base::EnvironmentVector& environ,
#endif
      CommandLine* cmd_line) OVERRIDE;
  virtual const content::ChildProcessData& GetData() const OVERRIDE;
  virtual content::ChildProcessHost* GetHost() const OVERRIDE;
  virtual base::TerminationStatus GetTerminationStatus(int* exit_code) OVERRIDE;
  virtual void SetName(const string16& name) OVERRIDE;
  virtual void SetHandle(base::ProcessHandle handle) OVERRIDE;

  bool disconnect_was_alive() const { return disconnect_was_alive_; }

  // Returns the handle of the child process. This can be called only after
  // OnProcessLaunched is called or it will be invalid and may crash.
  base::ProcessHandle GetHandle() const;

  // Removes this host from the host list. Calls ChildProcessHost::ForceShutdown
  void ForceShutdown();

  // Controls whether the child process should be terminated on browser
  // shutdown. Default is to always terminate.
  void SetTerminateChildOnShutdown(bool terminate_on_shutdown);

  // Sends the given notification on the UI thread.
  void Notify(int type);

  content::BrowserChildProcessHostDelegate* delegate() const {
    return delegate_;
  }

  typedef std::list<BrowserChildProcessHostImpl*> BrowserChildProcessList;
 private:
  friend class content::BrowserChildProcessHostIterator;

  static BrowserChildProcessList* GetIterator();

  // ChildProcessHostDelegate implementation:
  virtual bool CanShutdown() OVERRIDE;
  virtual void OnChildDisconnected() OVERRIDE;
  virtual void ShutdownStarted() OVERRIDE;
  virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
  virtual void OnChannelConnected(int32 peer_pid) OVERRIDE;
  virtual void OnChannelError() OVERRIDE;

  // ChildProcessLauncher::Client implementation.
  virtual void OnProcessLaunched() OVERRIDE;

  // public base::WaitableEventWatcher::Delegate implementation:
  virtual void OnWaitableEventSignaled(
      base::WaitableEvent* waitable_event) OVERRIDE;

  content::ChildProcessData data_;
  content::BrowserChildProcessHostDelegate* delegate_;
  scoped_ptr<content::ChildProcessHost> child_process_host_;

  scoped_ptr<ChildProcessLauncher> child_process_;
#if defined(OS_WIN)
  base::WaitableEventWatcher child_watcher_;
#else
  base::WeakPtrFactory<BrowserChildProcessHostImpl> task_factory_;
#endif
  bool disconnect_was_alive_;
};

#endif  // CONTENT_BROWSER_BROWSER_CHILD_PROCESS_HOST_IMPL_H_


text:
namespace base {
class MessageLoop;
}

namespace android_webview {

class AwBrowserContext;

class AwBrowserMainParts : public content::BrowserMainParts {
 public:
  explicit AwBrowserMainParts(AwBrowserContext* browser_context);
  virtual ~AwBrowserMainParts();

  // Overriding methods from content::BrowserMainParts.
  virtual void PreEarlyInitialization() override;
  virtual int PreCreateThreads() override;
  virtual void PreMainMessageLoopRun() override;
  virtual bool MainMessageLoopRun(int* result_code) override;

 private:
  // Android specific UI MessageLoop.
  scoped_ptr<base::MessageLoop> main_message_loop_;

  AwBrowserContext* browser_context_;  // weak

  DISALLOW_COPY_AND_ASSIGN(AwBrowserMainParts);
};

}  // namespace android_webview

#endif  // ANDROID_WEBVIEW_BROWSER_AW_BROWSER_MAIN_PARTS_H_


text:
import * as THREE from 'three'
import OrbitControls from 'orbit-controls-es6'

import vert from './shaders/shader.vert'
import frag from './shaders/shader.frag'

// Initial HMR Setup
if (module.hot) {
    module.hot.accept()

    module.hot.dispose(() => {
        document.querySelector('canvas').remove()
        renderer.forceContextLoss()
        renderer.context = null
        renderer.domElement = null
        renderer = null
        cancelAnimationFrame(animationId)
        removeEventListener('resize', resize)
    })
}

// Three Scene
let scene, camera, renderer, animationId, controls
let geometry, material, mesh

function init() {
    scene = new THREE.Scene()

    camera = new THREE.PerspectiveCamera(
        75,
        window.innerWidth / window.innerHeight,
        1,
        10000
    )
    camera.position.z = 1000

    controls = new OrbitControls(camera)

    geometry = new THREE.BoxGeometry(200, 200, 200)
    material = new THREE.RawShaderMaterial({
        vertexShader: vert,
        fragmentShader: frag
    })

    mesh = new THREE.Mesh(geometry, material)
    scene.add(mesh)

    for (let i = -5; i <= 5; i++) {
        const geometry = new THREE.BoxGeometry(200, 200, 200)
        const material = new THREE.MeshBasicMaterial({
            color: 0xffffff,
            wireframe: true
        })

        const mesh = new THREE.Mesh(geometry, material)
        scene.add(mesh)
        mesh.position.x = i * 400
    }

    renderer = new THREE.WebGLRenderer({ antialias: true })
    renderer.setSize(window.innerWidth, window.innerHeight)

    document.body.appendChild(renderer.domElement)
}

function animate() {
    animationId = requestAnimationFrame(animate)

    mesh.rotation.x += 0.04
    mesh.rotation.y += 0.02

    renderer.render(scene, camera)
}

init()
animate()

// Event listeners
function resize() {
    camera.aspect = innerWidth / innerHeight
    camera.updateProjectionMatrix()
    renderer.setSize(innerWidth, innerHeight)
}

addEventListener('resize', resize)


text:
using namespace OmnisTools;

// Define static methods
const static qshort cStaticMethodSetZoneDirectory     = 20000,
                    cStaticMethodICalErrorString      = 20001,
                    cStaticMethodGetBuiltInTimezones  = 20002,
                    cStaticMethodGetCurrentTimezone   = 20003;

// Parameters for Static Methods
// Columns are:
// 1) Name of Parameter (Resource #)
// 2) Return type (fft value)
// 3) Parameter flags of type EXTD_FLAG_xxxx
// 4) Extended flags.  Documentation states, "Must be 0"
ECOparam cStaticMethodsParamsTable[] =
{
	// $setZoneDirectory
    20800, fftCharacter  , 0, 0
};

// Table of Methods available
// Columns are:
// 1) Unique ID
// 2) Name of Method (Resource #)
// 3) Return Type
// 4) # of Parameters
// 5) Array of Parameter Names (Taken from MethodsParamsTable.  Increments # of parameters past this pointer)
// 6) Enum Start (Not sure what this does, 0 = disabled)
// 7) Enum Stop (Not sure what this does, 0 = disabled)
ECOmethodEvent cStaticMethodsTable[] =
{
	cStaticMethodSetZoneDirectory,     cStaticMethodSetZoneDirectory,     fftNone,      1, &cStaticMethodsParamsTable[0], 0, 0,
    cStaticMethodICalErrorString,      cStaticMethodICalErrorString,      fftCharacter, 0,                             0, 0, 0,
    cStaticMethodGetBuiltInTimezones,  cStaticMethodGetBuiltInTimezones,  fftList,      0,                             0, 0, 0,
    cStaticMethodGetCurrentTimezone,   cStaticMethodGetCurrentTimezone,   fftRow,       0,                             0, 0, 0
};

// List of methods in Simple
qlong returnStaticMethods(tThreadData* pThreadData)
{
	const qshort cStaticMethodCount = sizeof(cStaticMethodsTable) / sizeof(ECOmethodEvent);

	return ECOreturnMethods( gInstLib, pThreadData->mEci, &cStaticMethodsTable[0], cStaticMethodCount );
}

// Implementation of single static method
void methodStaticSetZoneDirectory(tThreadData* pThreadData, qshort paramCount) {
	EXTfldval pathVal;
    if ( getParamVar(pThreadData, 1, pathVal) != qtrue) {
        pThreadData->mExtraErrorText = "First parameter, pathName, is unrecognized.  Expected path name.";
        return;
    }
    if (ensurePosixPath(pathVal) != qtrue) {
        pThreadData->mExtraErrorText = "First parameter, pathName, is unrecognized.  Expected path name.";
        return;
    }

    // Convert to std::string
    std::string path = getStringFromEXTFldVal(pathVal);

    // Pass to libical
    set_zone_directory( const_cast<char*>(path.c_str()) );  // Directory expected as non-const char*

	return;
}

// Implementation of single static method
void methodStaticICalErrorString(tThreadData* pThreadData, qshort paramCount) {
    EXTfldval retVal;

    // Retreive error from ical
    getEXTFldValFromChar(retVal, icalerror_strerror(icalerrno));

    // Return error string to caller
    ECOaddParam(pThreadData->mEci, &retVal);

	return;
}

// Fetch all time zones built into libical
void methodStaticBuiltInTimezones(tThreadData* pThreadData, qshort paramCount) {

    EXTqlist* listVal = new EXTqlist(listVlen);
    EXTfldval colName, colValue, retVal;
    NVObjTimeZone* omnisTimezone = 0;

    // Setup list definition
    getEXTFldValFromChar(colName, "TZID");
    listVal->addCol( fftCharacter, dpFcharacter, 10000000, &colName.getChar(qtrue) );

    getEXTFldValFromChar(colName, "Name");
    listVal->addCol( fftCharacter, dpFcharacter, 10000000, &colName.getChar(qtrue) );

    getEXTFldValFromChar(colName, "Location");
    listVal->addCol( fftCharacter, dpFcharacter, 10000000, &colName.getChar(qtrue) );

    getEXTFldValFromChar(colName, "Latitude");
    listVal->addCol( fftNumber, dpDefault, 0, &colName.getChar(qtrue) );

    getEXTFldValFromChar(colName, "Longitude");
    listVal->addCol( fftNumber, dpDefault, 0, &colName.getChar(qtrue) );

    getEXTFldValFromChar(colName, "TZNames");
    listVal->addCol( fftCharacter, dpFcharacter, 10000000, &colName.getChar(qtrue) );

    getEXTFldValFromChar(colName, "Timezone");
    listVal->addCol( fftObject, dpDefault, 0, &colName.getChar(qtrue) );

    // Fetch all time built-in timezones
    icalarray* zones = icaltimezone_get_builtin_timezones();
    icaltimezone *currentZone = 0;

    // Loop all elements in array and create list of time zones
    for (int x = 0; x < (int) zones->num_elements; ++x) {
        listVal->insertRow();

        currentZone = (icaltimezone*) icalarray_element_at(zones, x);

        // Setup tzid column
        listVal->getColValRef(x+1, 1, colValue, qtrue);
        colValue.setEmpty(fftCharacter, dpFcharacter);
        if (currentZone) {
            getEXTFldValFromChar(colValue, icaltimezone_get_tzid(currentZone));
        }

        // Setup name column
        listVal->getColValRef(x+1, 2, colValue, qtrue);
        colValue.setEmpty(fftCharacter, dpFcharacter);
        if (currentZone) {
            getEXTFldValFromChar(colValue, icaltimezone_get_display_name(currentZone));
        }

        // Setup location column
        listVal->getColValRef(x+1, 3, colValue, qtrue);
        colValue.setEmpty(fftCharacter, dpFcharacter);
        if (currentZone) {
            getEXTFldValFromChar(colValue, icaltimezone_get_location(currentZone));
        }

        // Setup latitude column
        listVal->getColValRef(x+1, 4, colValue, qtrue);
        colValue.setEmpty(fftNumber, dpDefault);
        if (currentZone) {
            getEXTFldValFromDouble(colValue, icaltimezone_get_latitude(currentZone));
        }

        // Setup longitude column
        listVal->getColValRef(x+1, 5, colValue, qtrue);
        colValue.setEmpty(fftNumber, dpDefault);
        if (currentZone) {
            getEXTFldValFromDouble(colValue, icaltimezone_get_longitude(currentZone));
        }

        // Setup tznames column
        listVal->getColValRef(x+1, 6, colValue, qtrue);
        colValue.setEmpty(fftCharacter, dpFcharacter);
        if (currentZone) {
            getEXTFldValFromChar(colValue, icaltimezone_get_tznames(currentZone));
        }

        // Setup object column
        listVal->getColValRef(x+1, 7, colValue, qtrue);
        colValue.setEmpty(fftObject, dpDefault);

        omnisTimezone = createNVObj<NVObjTimeZone>(pThreadData);
        if (omnisTimezone && currentZone) {
            omnisTimezone->setTimezone(currentZone);
            getEXTFldValForObj(colValue, omnisTimezone);
        }
    }

    // Return list to caller
    retVal.setList(listVal, qtrue);
    ECOaddParam(pThreadData->mEci, &retVal);

	return;
}

// Return row with current time zone
void methodStaticCurrentTimezone(tThreadData* pThreadData, qshort paramCount) {

    EXTqlist* listVal = new EXTqlist(listVlen);
    EXTfldval colName, colValue, retVal;
    SystemTimeZone curZone;

    // Setup list definition
    getEXTFldValFromChar(colName, "Name");
    listVal->addCol( fftCharacter, dpFcharacter, 10000000, &colName.getChar(qtrue) );

    getEXTFldValFromChar(colName, "IsDaylight");
    listVal->addCol( fftBoolean, dpDefault, 0, &colName.getChar(qtrue) );

    // Insert single row
    listVal->insertRow();
    listVal->getColValRef(1, 1, colValue, qtrue);
    getEXTFldValFromString(colValue, curZone.name());

    listVal->getColValRef(1, 2, colValue, qtrue);
    getEXTFldValFromBool(colValue, curZone.isDaylight());

    // Set current line
    listVal->setCurRow(1);

    // Return list to caller
    retVal.setList(listVal, qtrue);
    ECOaddParam(pThreadData->mEci, &retVal);
}

// Static method dispatch
qlong staticMethodCall( OmnisTools::tThreadData* pThreadData ) {

	qshort funcId = (qshort)ECOgetId(pThreadData->mEci);
	qshort paramCount = ECOgetParamCount(pThreadData->mEci);

	switch( funcId )
	{
		case cStaticMethodSetZoneDirectory:
			pThreadData->mCurMethodName = "$setZoneDirectory";
			methodStaticSetZoneDirectory(pThreadData, paramCount);
			break;
        case cStaticMethodICalErrorString:
			pThreadData->mCurMethodName = "$icalErrorString";
			methodStaticICalErrorString(pThreadData, paramCount);
			break;
        case cStaticMethodGetBuiltInTimezones:
			pThreadData->mCurMethodName = "$getBuiltinTimezones";
			methodStaticBuiltInTimezones(pThreadData, paramCount);
			break;
        case cStaticMethodGetCurrentTimezone:
			pThreadData->mCurMethodName = "$getCurrentTimezone";
			methodStaticCurrentTimezone(pThreadData, paramCount);
			break;
	}

	return 0L;
}


text:
<?php

namespace OG\Account\Domain\Identity\Model;

use OG\Core\Domain\ValueObject;

/**
 * ActivationCode value object to represent a random activation code in the application domain.
 */
class ActivationCode implements ValueObject
{
    const RANDOM_BYTES_SIZE = 32;

    /**
     * @var string
     */
    private $value;

    /**
     * Create a new ActivationCode.
     *
     * @param string $value
     */
    private function __construct($value)
    {
        \Assert\that($value)
            ->string('Argument has to be a string')
            ->regex('/^[0-9A-Fa-f]*$/', 'String has to be hexadecimal')
            ->length(static::RANDOM_BYTES_SIZE * 2, 'ActivationCode has to be '.static::RANDOM_BYTES_SIZE * 2 .' characters long');

        $this->value = strtolower($value);
    }

    /**
     * Generate a new ActivationCode.
     *
     * @return ActivationCode
     */
    public static function generate()
    {
        return new static(bin2hex(random_bytes(self::RANDOM_BYTES_SIZE)));
    }

    /**
     * Creates an activation code object from a string representation.
     *
     * @param string $string an activation code
     *
     * @return static
     */
    public static function fromString($string)
    {
        return new static($string);
    }

    /**
     * Returns a string that can be parsed by fromString().
     *
     * @return string
     */
    public function toString()
    {
        return $this->value;
    }

    /**
     * Returns a string that can be parsed by fromString().
     *
     * @return string
     */
    public function __toString()
    {
        return $this->toString();
    }

    /**
     * Compares the object to another value object. Returns true if both have the same type and value.
     *
     * @param ValueObject $other
     *
     * @return bool
     */
    public function equals(ValueObject $other)
    {
        return $this == $other;
    }
}


text:
package co.louiscap.moka.exceptions;

import co.louiscap.moka.utils.data.Location;

/**
 * An exception thrown when the source program contains
 * an error in the syntax, or some inconsistency exists
 * between the provided source and the given language
 * specification
 * @author Louis Capitanchik
 */
public class LanguageSyntaxException extends Exception {
    public final Location loc;

    public LanguageSyntaxException(String reason, Location loc) {
        super(createMsg(reason, loc));
        this.loc = loc;
    }
    public LanguageSyntaxException(String reason, Location loc, Throwable cause) {
        super(createMsg(reason, loc), cause);
        this.loc = loc;
    }
    private static String createMsg(String reason, Location loc) {
        String msg = "";
        msg += reason;
        msg += " at line ";
        msg += loc.line;
        msg += ", char ";
        msg += loc.column;
        msg += " in file ";
        msg += loc.filename;
        return msg;
    }
}


text:
WorkSpaceModel::WorkSpaceModel(const QString &name, QObject *parent) :
    CatalogModel( Ilwis::Resource("ilwis://internalcatalog/workspaces/" + name,itWORKSPACE),parent)
{
}

WorkSpaceModel::~WorkSpaceModel()
{

}

void WorkSpaceModel::addItems(const QString& ids)
{
    auto putInConfig = [&](quint64 id, int count) {

        QString basekey = "users/" + Ilwis::context()->currentUser() + "/workspace-" + name();
        Ilwis::Resource res = Ilwis::mastercatalog()->id2Resource(id);
        if ( res.isValid()){
            QString key;
            if ( res.ilwisType() & itOPERATIONMETADATA){
                key = QString("%1/operation-%2").arg(basekey).arg(count);
                Ilwis::context()->configurationRef().addValue(QString("%1/operation-count").arg(basekey),QString::number(count + 1));
            }
            else{
                key = QString("%1/data-%2").arg(basekey).arg(count);
                Ilwis::context()->configurationRef().addValue(QString("%1/data-count").arg(basekey),QString::number(count + 1));
            }
            Ilwis::context()->configurationRef().addValue(key + "/url", res.url().toString());
            Ilwis::context()->configurationRef().addValue(key + "/type", QString::number(res.ilwisType()));
        }
    };

    QSqlQuery stmt(Ilwis::kernel()->database());
    int count = 0;
    if (_view.fixedItemCount() == 0) {
        QString query = QString("Insert into workspaces (workspaceid) values(%1)").arg(_view.id());
        if(!stmt.exec(query))
            return;
    }
    // we dont want to add ids that are already in the list so we collect all ids that we have laready added
    std::set<QString> presentids;
    for(auto item : _operations){
        presentids.insert(item->id());
    }
    for(auto item : _data){
        presentids.insert(item->id());
    }
    QStringList idlist = ids.split("|");
    for(auto id : idlist){
        if ( presentids.find(id) != presentids.end())
            continue;

        quint64 idn = id.toULongLong();
        putInConfig(idn, count);
        _view.addFixedItem(idn);
        ++count;

        QString query = QString("Select workspaceid from workspace where workspaceid=%1 and itemid=%2").arg(_view.id()).arg(idn);
        if (stmt.exec(query)) { // already there
            if ( stmt.next()) {
                continue;
            }else{
                query = QString("Insert into workspace (workspaceid, itemid) values(%1,%2)").arg(_view.id()).arg(idn);
                if(!stmt.exec(query))
                    return;
            }
        }
    }
    QString availableWorkspaces = Ilwis::ilwisconfig("users/" + Ilwis::context()->currentUser() + "/workspaces",QString(""));
    if ( availableWorkspaces.indexOf(name()) == -1){
        if ( availableWorkspaces.size() > 0){
            availableWorkspaces += "|";
        }
        availableWorkspaces += name();
        Ilwis::context()->configurationRef().addValue("users/" + Ilwis::context()->currentUser() + "/workspaces",availableWorkspaces);
    }

    refresh(true);
    emit dataChanged();
}

void WorkSpaceModel::removeItems(const QString& ids)
{
    QStringList idlist = ids.split("|");
    for(auto id : idlist){
        _view.removeFixedItem(id.toULongLong());
    }
}

bool WorkSpaceModel::isDefault() const
{
    return resource().url().toString() == Ilwis::Catalog::DEFAULT_WORKSPACE;
}

void WorkSpaceModel::gatherItems() {
    bool needRefresh = _refresh;
    CatalogModel::gatherItems();
    if ( needRefresh){
        _operations.clear();
        _data.clear();

        for(auto iter=_currentItems.begin(); iter != _currentItems.end(); ++iter){
            if ( (*iter)->type() & itOPERATIONMETADATA){
                _operations.push_back(new OperationModel((*iter)->resource(),this));
            }else if ( hasType((*iter)->type(), itILWISOBJECT)){
                _data.push_back(*iter);
            }
        }
    }
    refresh(false);
}

QQmlListProperty<OperationModel> WorkSpaceModel::operations()
{
    refresh(true);
    gatherItems();
    return  QQmlListProperty<OperationModel>(this, _operations);
}

QQmlListProperty<ResourceModel> WorkSpaceModel::data()
{
    refresh(true);
    gatherItems();
    return  QQmlListProperty<ResourceModel>(this, _data);
}


text:
#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.h"

#include <algorithm>

#include "webrtc/base/checks.h"
#include "webrtc/base/logging.h"
#include "webrtc/base/trace_event.h"
#include "webrtc/modules/include/module_common_types.h"
#include "webrtc/modules/rtp_rtcp/source/byte_io.h"
#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/common_header.h"

namespace webrtc {
namespace rtcp {
namespace {
// Header size:
// * 4 bytes Common RTCP Packet Header
// * 8 bytes Common Packet Format for RTCP Feedback Messages
// * 8 bytes FeedbackPacket header
constexpr size_t kTransportFeedbackHeaderSizeBytes = 4 + 8 + 8;
constexpr size_t kChunkSizeBytes = 2;
// TODO(sprang): Add support for dynamic max size for easier fragmentation,
// eg. set it to what's left in the buffer or IP_PACKET_SIZE.
// Size constraint imposed by RTCP common header: 16bit size field interpreted
// as number of four byte words minus the first header word.
constexpr size_t kMaxSizeBytes = (1 << 16) * 4;
// Payload size:
// * 8 bytes Common Packet Format for RTCP Feedback Messages
// * 8 bytes FeedbackPacket header.
// * 2 bytes for one chunk.
constexpr size_t kMinPayloadSizeBytes = 8 + 8 + 2;
constexpr size_t kBaseScaleFactor =
    TransportFeedback::kDeltaScaleFactor * (1 << 8);
constexpr int64_t kTimeWrapPeriodUs = (1ll << 24) * kBaseScaleFactor;

//    Message format
//
//     0                   1                   2                   3
//     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
//    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//    |V=2|P|  FMT=15 |    PT=205     |           length              |
//    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//  0 |                     SSRC of packet sender                     |
//    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//  4 |                      SSRC of media source                     |
//    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//  8 |      base sequence number     |      packet status count      |
//    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
// 12 |                 reference time                | fb pkt. count |
//    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
// 16 |          packet chunk         |         packet chunk          |
//    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//    .                                                               .
//    .                                                               .
//    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//    |         packet chunk          |  recv delta   |  recv delta   |
//    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//    .                                                               .
//    .                                                               .
//    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//    |           recv delta          |  recv delta   | zero padding  |
//    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
}  // namespace
constexpr uint8_t TransportFeedback::kFeedbackMessageType;
constexpr size_t TransportFeedback::kMaxReportedPackets;

// Keep delta_sizes that can be encoded into single chunk if it is last chunk.
class TransportFeedback::LastChunk {
 public:
  using DeltaSize = TransportFeedback::DeltaSize;

  LastChunk();

  bool Empty() const;
  void Clear();
  // Return if delta sizes still can be encoded into single chunk with added
  // |delta_size|.
  bool CanAdd(DeltaSize delta_size) const;
  // Add |delta_size|, assumes |CanAdd(delta_size)|,
  void Add(DeltaSize delta_size);

  // Encode chunk as large as possible removing encoded delta sizes.
  // Assume CanAdd() == false for some valid delta_size.
  uint16_t Emit();
  // Encode all stored delta_sizes into single chunk, pad with 0s if needed.
  uint16_t EncodeLast() const;

  // Decode up to |max_size| delta sizes from |chunk|.
  void Decode(uint16_t chunk, size_t max_size);
  // Appends content of the Lastchunk to |deltas|.
  void AppendTo(std::vector<DeltaSize>* deltas) const;

 private:
  static constexpr size_t kMaxRunLengthCapacity = 0x1fff;
  static constexpr size_t kMaxOneBitCapacity = 14;
  static constexpr size_t kMaxTwoBitCapacity = 7;
  static constexpr size_t kMaxVectorCapacity = kMaxOneBitCapacity;
  static constexpr DeltaSize kLarge = 2;

  uint16_t EncodeOneBit() const;
  void DecodeOneBit(uint16_t chunk, size_t max_size);

  uint16_t EncodeTwoBit(size_t size) const;
  void DecodeTwoBit(uint16_t chunk, size_t max_size);

  uint16_t EncodeRunLength() const;
  void DecodeRunLength(uint16_t chunk, size_t max_size);

  DeltaSize delta_sizes_[kMaxVectorCapacity];
  uint16_t size_;
  bool all_same_;
  bool has_large_delta_;
};
constexpr size_t TransportFeedback::LastChunk::kMaxRunLengthCapacity;
constexpr size_t TransportFeedback::LastChunk::kMaxOneBitCapacity;
constexpr size_t TransportFeedback::LastChunk::kMaxTwoBitCapacity;
constexpr size_t TransportFeedback::LastChunk::kMaxVectorCapacity;

TransportFeedback::LastChunk::LastChunk() {
  Clear();
}

bool TransportFeedback::LastChunk::Empty() const {
  return size_ == 0;
}

void TransportFeedback::LastChunk::Clear() {
  size_ = 0;
  all_same_ = true;
  has_large_delta_ = false;
}

bool TransportFeedback::LastChunk::CanAdd(DeltaSize delta_size) const {
  RTC_DCHECK_LE(delta_size, 2);
  if (size_ < kMaxTwoBitCapacity)
    return true;
  if (size_ < kMaxOneBitCapacity && !has_large_delta_ && delta_size != kLarge)
    return true;
  if (size_ < kMaxRunLengthCapacity && all_same_ &&
      delta_sizes_[0] == delta_size)
    return true;
  return false;
}

void TransportFeedback::LastChunk::Add(DeltaSize delta_size) {
  RTC_DCHECK(CanAdd(delta_size));
  if (size_ < kMaxVectorCapacity)
    delta_sizes_[size_] = delta_size;
  size_++;
  all_same_ = all_same_ && delta_size == delta_sizes_[0];
  has_large_delta_ = has_large_delta_ || delta_size == kLarge;
}

uint16_t TransportFeedback::LastChunk::Emit() {
  RTC_DCHECK(!CanAdd(0) || !CanAdd(1) || !CanAdd(2));
  if (all_same_) {
    uint16_t chunk = EncodeRunLength();
    Clear();
    return chunk;
  }
  if (size_ == kMaxOneBitCapacity) {
    uint16_t chunk = EncodeOneBit();
    Clear();
    return chunk;
  }
  RTC_DCHECK_GE(size_, kMaxTwoBitCapacity);
  uint16_t chunk = EncodeTwoBit(kMaxTwoBitCapacity);
  // Remove |kMaxTwoBitCapacity| encoded delta sizes:
  // Shift remaining delta sizes and recalculate all_same_ && has_large_delta_.
  size_ -= kMaxTwoBitCapacity;
  all_same_ = true;
  has_large_delta_ = false;
  for (size_t i = 0; i < size_; ++i) {
    DeltaSize delta_size = delta_sizes_[kMaxTwoBitCapacity + i];
    delta_sizes_[i] = delta_size;
    all_same_ = all_same_ && delta_size == delta_sizes_[0];
    has_large_delta_ = has_large_delta_ || delta_size == kLarge;
  }

  return chunk;
}

uint16_t TransportFeedback::LastChunk::EncodeLast() const {
  RTC_DCHECK_GT(size_, 0);
  if (all_same_)
    return EncodeRunLength();
  if (size_ <= kMaxTwoBitCapacity)
    return EncodeTwoBit(size_);
  return EncodeOneBit();
}

// Appends content of the Lastchunk to |deltas|.
void TransportFeedback::LastChunk::AppendTo(
    std::vector<DeltaSize>* deltas) const {
  if (all_same_) {
    deltas->insert(deltas->end(), size_, delta_sizes_[0]);
  } else {
    deltas->insert(deltas->end(), delta_sizes_, delta_sizes_ + size_);
  }
}

void TransportFeedback::LastChunk::Decode(uint16_t chunk, size_t max_size) {
  if ((chunk & 0x8000) == 0) {
    DecodeRunLength(chunk, max_size);
  } else if ((chunk & 0x4000) == 0) {
    DecodeOneBit(chunk, max_size);
  } else {
    DecodeTwoBit(chunk, max_size);
  }
}

//  One Bit Status Vector Chunk
//
//  0                   1
//  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
//  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//  |T|S|       symbol list         |
//  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//
//  T = 1
//  S = 0
//  Symbol list = 14 entries where 0 = not received, 1 = received 1-byte delta.
uint16_t TransportFeedback::LastChunk::EncodeOneBit() const {
  RTC_DCHECK(!has_large_delta_);
  RTC_DCHECK_LE(size_, kMaxOneBitCapacity);
  uint16_t chunk = 0x8000;
  for (size_t i = 0; i < size_; ++i)
    chunk |= delta_sizes_[i] << (kMaxOneBitCapacity - 1 - i);
  return chunk;
}

void TransportFeedback::LastChunk::DecodeOneBit(uint16_t chunk,
                                                size_t max_size) {
  RTC_DCHECK_EQ(chunk & 0xc000, 0x8000);
  size_ = std::min(kMaxOneBitCapacity, max_size);
  has_large_delta_ = false;
  all_same_ = false;
  for (size_t i = 0; i < size_; ++i)
    delta_sizes_[i] = (chunk >> (kMaxOneBitCapacity - 1 - i)) & 0x01;
}

//  Two Bit Status Vector Chunk
//
//  0                   1
//  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
//  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//  |T|S|       symbol list         |
//  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//
//  T = 1
//  S = 1
//  symbol list = 7 entries of two bits each.
uint16_t TransportFeedback::LastChunk::EncodeTwoBit(size_t size) const {
  RTC_DCHECK_LE(size, size_);
  uint16_t chunk = 0xc000;
  for (size_t i = 0; i < size; ++i)
    chunk |= delta_sizes_[i] << 2 * (kMaxTwoBitCapacity - 1 - i);
  return chunk;
}

void TransportFeedback::LastChunk::DecodeTwoBit(uint16_t chunk,
                                                size_t max_size) {
  RTC_DCHECK_EQ(chunk & 0xc000, 0xc000);
  size_ = std::min(kMaxTwoBitCapacity, max_size);
  has_large_delta_ = true;
  all_same_ = false;
  for (size_t i = 0; i < size_; ++i)
    delta_sizes_[i] = (chunk >> 2 * (kMaxTwoBitCapacity - 1 - i)) & 0x03;
}

//  Run Length Status Vector Chunk
//
//  0                   1
//  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
//  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//  |T| S |       Run Length        |
//  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//
//  T = 0
//  S = symbol
//  Run Length = Unsigned integer denoting the run length of the symbol
uint16_t TransportFeedback::LastChunk::EncodeRunLength() const {
  RTC_DCHECK(all_same_);
  RTC_DCHECK_LE(size_, kMaxRunLengthCapacity);
  return (delta_sizes_[0] << 13) | size_;
}

void TransportFeedback::LastChunk::DecodeRunLength(uint16_t chunk,
                                                   size_t max_count) {
  RTC_DCHECK_EQ(chunk & 0x8000, 0);
  size_ = std::min<size_t>(chunk & 0x1fff, max_count);
  size_t delta_size = (chunk >> 13) & 0x03;
  has_large_delta_ = delta_size >= kLarge;
  all_same_ = true;
  // To make it consistent with Add function, populate delta_sizes_ beyound 1st.
  for (size_t i = 0; i < std::min<size_t>(size_, kMaxVectorCapacity); ++i)
    delta_sizes_[i] = delta_size;
}

TransportFeedback::TransportFeedback()
    : base_seq_no_(0),
      num_seq_no_(0),
      base_time_ticks_(0),
      feedback_seq_(0),
      last_timestamp_us_(0),
      last_chunk_(new LastChunk()),
      size_bytes_(kTransportFeedbackHeaderSizeBytes) {}

TransportFeedback::~TransportFeedback() {}

void TransportFeedback::SetBase(uint16_t base_sequence,
                                int64_t ref_timestamp_us) {
  RTC_DCHECK_EQ(num_seq_no_, 0);
  RTC_DCHECK_GE(ref_timestamp_us, 0);
  base_seq_no_ = base_sequence;
  base_time_ticks_ = (ref_timestamp_us % kTimeWrapPeriodUs) / kBaseScaleFactor;
  last_timestamp_us_ = GetBaseTimeUs();
}

void TransportFeedback::SetFeedbackSequenceNumber(uint8_t feedback_sequence) {
  feedback_seq_ = feedback_sequence;
}

bool TransportFeedback::AddReceivedPacket(uint16_t sequence_number,
                                          int64_t timestamp_us) {
  // Convert to ticks and round.
  int64_t delta_full = (timestamp_us - last_timestamp_us_) % kTimeWrapPeriodUs;
  if (delta_full > kTimeWrapPeriodUs / 2)
    delta_full -= kTimeWrapPeriodUs;
  delta_full +=
      delta_full < 0 ? -(kDeltaScaleFactor / 2) : kDeltaScaleFactor / 2;
  delta_full /= kDeltaScaleFactor;

  int16_t delta = static_cast<int16_t>(delta_full);
  // If larger than 16bit signed, we can't represent it - need new fb packet.
  if (delta != delta_full) {
    LOG(LS_WARNING) << "Delta value too large ( >= 2^16 ticks )";
    return false;
  }

  uint16_t next_seq_no = base_seq_no_ + num_seq_no_;
  if (sequence_number != next_seq_no) {
    uint16_t last_seq_no = next_seq_no - 1;
    if (!IsNewerSequenceNumber(sequence_number, last_seq_no))
      return false;
    for (; next_seq_no != sequence_number; ++next_seq_no)
      if (!AddDeltaSize(0))
        return false;
  }

  DeltaSize delta_size = (delta >= 0 && delta <= 0xff) ? 1 : 2;
  if (!AddDeltaSize(delta_size))
    return false;

  packets_.emplace_back(sequence_number, delta);
  last_timestamp_us_ += delta * kDeltaScaleFactor;
  size_bytes_ += delta_size;
  return true;
}

const std::vector<TransportFeedback::ReceivedPacket>&
TransportFeedback::GetReceivedPackets() const {
  return packets_;
}

uint16_t TransportFeedback::GetBaseSequence() const {
  return base_seq_no_;
}

std::vector<TransportFeedback::StatusSymbol>
TransportFeedback::GetStatusVector() const {
  std::vector<TransportFeedback::StatusSymbol> symbols;
  uint16_t seq_no = GetBaseSequence();
  for (const auto& packet : packets_) {
    for (; seq_no != packet.sequence_number(); ++seq_no)
      symbols.push_back(StatusSymbol::kNotReceived);
    if (packet.delta_ticks() >= 0x00 && packet.delta_ticks() <= 0xff) {
      symbols.push_back(StatusSymbol::kReceivedSmallDelta);
    } else {
      symbols.push_back(StatusSymbol::kReceivedLargeDelta);
    }
    ++seq_no;
  }
  return symbols;
}

std::vector<int16_t> TransportFeedback::GetReceiveDeltas() const {
  std::vector<int16_t> deltas;
  for (const auto& packet : packets_)
    deltas.push_back(packet.delta_ticks());
  return deltas;
}

int64_t TransportFeedback::GetBaseTimeUs() const {
  return static_cast<int64_t>(base_time_ticks_) * kBaseScaleFactor;
}

std::vector<int64_t> TransportFeedback::GetReceiveDeltasUs() const {
  std::vector<int64_t> us_deltas;
  for (const auto& packet : packets_)
    us_deltas.push_back(packet.delta_us());
  return us_deltas;
}

// De-serialize packet.
bool TransportFeedback::Parse(const CommonHeader& packet) {
  RTC_DCHECK_EQ(packet.type(), kPacketType);
  RTC_DCHECK_EQ(packet.fmt(), kFeedbackMessageType);
  TRACE_EVENT0("webrtc", "TransportFeedback::Parse");

  if (packet.payload_size_bytes() < kMinPayloadSizeBytes) {
    LOG(LS_WARNING) << "Buffer too small (" << packet.payload_size_bytes()
                    << " bytes) to fit a "
                       "FeedbackPacket. Minimum size = "
                    << kMinPayloadSizeBytes;
    return false;
  }

  const uint8_t* const payload = packet.payload();
  ParseCommonFeedback(payload);

  base_seq_no_ = ByteReader<uint16_t>::ReadBigEndian(&payload[8]);
  size_t status_count = ByteReader<uint16_t>::ReadBigEndian(&payload[10]);
  base_time_ticks_ = ByteReader<int32_t, 3>::ReadBigEndian(&payload[12]);
  feedback_seq_ = payload[15];
  Clear();
  size_t index = 16;
  const size_t end_index = packet.payload_size_bytes();

  if (status_count == 0) {
    LOG(LS_WARNING) << "Empty feedback messages not allowed.";
    return false;
  }

  std::vector<uint8_t> delta_sizes;
  delta_sizes.reserve(status_count);
  while (delta_sizes.size() < status_count) {
    if (index + kChunkSizeBytes > end_index) {
      LOG(LS_WARNING) << "Buffer overflow while parsing packet.";
      Clear();
      return false;
    }

    uint16_t chunk = ByteReader<uint16_t>::ReadBigEndian(&payload[index]);
    index += kChunkSizeBytes;
    encoded_chunks_.push_back(chunk);
    last_chunk_->Decode(chunk, status_count - delta_sizes.size());
    last_chunk_->AppendTo(&delta_sizes);
  }
  // Last chunk is stored in the |last_chunk_|.
  encoded_chunks_.pop_back();
  RTC_DCHECK_EQ(delta_sizes.size(), status_count);
  num_seq_no_ = status_count;

  uint16_t seq_no = base_seq_no_;
  for (size_t delta_size : delta_sizes) {
    if (index + delta_size > end_index) {
      LOG(LS_WARNING) << "Buffer overflow while parsing packet.";
      Clear();
      return false;
    }
    switch (delta_size) {
      case 0:
        break;
      case 1: {
        int16_t delta = payload[index];
        packets_.emplace_back(seq_no, delta);
        last_timestamp_us_ += delta * kDeltaScaleFactor;
        index += delta_size;
        break;
      }
      case 2: {
        int16_t delta = ByteReader<int16_t>::ReadBigEndian(&payload[index]);
        packets_.emplace_back(seq_no, delta);
        last_timestamp_us_ += delta * kDeltaScaleFactor;
        index += delta_size;
        break;
      }
      case 3:
        Clear();
        LOG(LS_WARNING) << "Invalid delta_size for seq_no " << seq_no;
        return false;
      default:
        RTC_NOTREACHED();
        break;
    }
    ++seq_no;
  }
  size_bytes_ = RtcpPacket::kHeaderLength + index;
  RTC_DCHECK_LE(index, end_index);
  return true;
}

std::unique_ptr<TransportFeedback> TransportFeedback::ParseFrom(
    const uint8_t* buffer,
    size_t length) {
  CommonHeader header;
  if (!header.Parse(buffer, length))
    return nullptr;
  if (header.type() != kPacketType || header.fmt() != kFeedbackMessageType)
    return nullptr;
  std::unique_ptr<TransportFeedback> parsed(new TransportFeedback);
  if (!parsed->Parse(header))
    return nullptr;
  return parsed;
}

bool TransportFeedback::IsConsistent() const {
  size_t packet_size = kTransportFeedbackHeaderSizeBytes;
  std::vector<DeltaSize> delta_sizes;
  LastChunk chunk_decoder;
  for (uint16_t chunk : encoded_chunks_) {
    chunk_decoder.Decode(chunk, kMaxReportedPackets);
    chunk_decoder.AppendTo(&delta_sizes);
    packet_size += kChunkSizeBytes;
  }
  if (!last_chunk_->Empty()) {
    last_chunk_->AppendTo(&delta_sizes);
    packet_size += kChunkSizeBytes;
  }
  if (num_seq_no_ != delta_sizes.size()) {
    LOG(LS_ERROR) << delta_sizes.size() << " packets encoded. Expected "
                  << num_seq_no_;
    return false;
  }
  int64_t timestamp_us = base_time_ticks_ * kBaseScaleFactor;
  auto packet_it = packets_.begin();
  uint16_t seq_no = base_seq_no_;
  for (DeltaSize delta_size : delta_sizes) {
    if (delta_size > 0) {
      if (packet_it == packets_.end()) {
        LOG(LS_ERROR) << "Failed to find delta for seq_no " << seq_no;
        return false;
      }
      if (packet_it->sequence_number() != seq_no) {
        LOG(LS_ERROR) << "Expected to find delta for seq_no " << seq_no
                      << ". Next delta is for " << packet_it->sequence_number();
        return false;
      }
      if (delta_size == 1 &&
          (packet_it->delta_ticks() < 0 || packet_it->delta_ticks() > 0xff)) {
        LOG(LS_ERROR) << "Delta " << packet_it->delta_ticks() << " for seq_no "
                      << seq_no << " doesn't fit into one byte";
        return false;
      }
      timestamp_us += packet_it->delta_us();
      ++packet_it;
    }
    packet_size += delta_size;
    ++seq_no;
  }
  if (packet_it != packets_.end()) {
    LOG(LS_ERROR) << "Unencoded delta for seq_no "
                  << packet_it->sequence_number();
    return false;
  }
  if (timestamp_us != last_timestamp_us_) {
    LOG(LS_ERROR) << "Last timestamp mismatch. Calculated: " << timestamp_us
                  << ". Saved: " << last_timestamp_us_;
    return false;
  }
  if (size_bytes_ != packet_size) {
    LOG(LS_ERROR) << "Rtcp packet size mismatch. Calculated: " << packet_size
                  << ". Saved: " << size_bytes_;
    return false;
  }
  return true;
}

// Serialize packet.
bool TransportFeedback::Create(uint8_t* packet,
                               size_t* position,
                               size_t max_length,
                               PacketReadyCallback* callback) const {
  if (num_seq_no_ == 0)
    return false;

  while (*position + BlockLength() > max_length) {
    if (!OnBufferFull(packet, position, callback))
      return false;
  }
  const size_t position_end = *position + BlockLength();

  CreateHeader(kFeedbackMessageType, kPacketType, HeaderLength(), packet,
               position);
  CreateCommonFeedback(packet + *position);
  *position += kCommonFeedbackLength;

  ByteWriter<uint16_t>::WriteBigEndian(&packet[*position], base_seq_no_);
  *position += 2;

  ByteWriter<uint16_t>::WriteBigEndian(&packet[*position], num_seq_no_);
  *position += 2;

  ByteWriter<int32_t, 3>::WriteBigEndian(&packet[*position], base_time_ticks_);
  *position += 3;

  packet[(*position)++] = feedback_seq_;

  for (uint16_t chunk : encoded_chunks_) {
    ByteWriter<uint16_t>::WriteBigEndian(&packet[*position], chunk);
    *position += 2;
  }
  if (!last_chunk_->Empty()) {
    uint16_t chunk = last_chunk_->EncodeLast();
    ByteWriter<uint16_t>::WriteBigEndian(&packet[*position], chunk);
    *position += 2;
  }

  for (const auto& received_packet : packets_) {
    int16_t delta = received_packet.delta_ticks();
    if (delta >= 0 && delta <= 0xFF) {
      packet[(*position)++] = delta;
    } else {
      ByteWriter<int16_t>::WriteBigEndian(&packet[*position], delta);
      *position += 2;
    }
  }

  while ((*position % 4) != 0)
    packet[(*position)++] = 0;

  RTC_DCHECK_EQ(*position, position_end);
  return true;
}

size_t TransportFeedback::BlockLength() const {
  // Round size_bytes_ up to multiple of 32bits.
  return (size_bytes_ + 3) & (~static_cast<size_t>(3));
}

void TransportFeedback::Clear() {
  num_seq_no_ = 0;
  last_timestamp_us_ = GetBaseTimeUs();
  packets_.clear();
  encoded_chunks_.clear();
  last_chunk_->Clear();
  size_bytes_ = kTransportFeedbackHeaderSizeBytes;
}

bool TransportFeedback::AddDeltaSize(DeltaSize delta_size) {
  if (num_seq_no_ == kMaxReportedPackets)
    return false;
  size_t add_chunk_size = last_chunk_->Empty() ? kChunkSizeBytes : 0;
  if (size_bytes_ + delta_size + add_chunk_size > kMaxSizeBytes)
    return false;

  if (last_chunk_->CanAdd(delta_size)) {
    size_bytes_ += add_chunk_size;
    last_chunk_->Add(delta_size);
    ++num_seq_no_;
    return true;
  }
  if (size_bytes_ + delta_size + kChunkSizeBytes > kMaxSizeBytes)
    return false;

  encoded_chunks_.push_back(last_chunk_->Emit());
  size_bytes_ += kChunkSizeBytes;
  last_chunk_->Add(delta_size);
  ++num_seq_no_;
  return true;
}

}  // namespace rtcp
}  // namespace webrtc


text:
var https = require('https');

(function () {
	'use strict';

	var RiotData =  {},
					apiKey,
					region = 'na',
					riotHost = 'api.pvp.net',
					riotPath = '/api/lol',
					shardHost = 'status.leagueoflegends.com';

	var Endpoints = {
		champion: '/v1.2/champion',
		game: '/v1.3/game/by-summoner',
		league: {
			summoner:'/v2.5/league/by-summoner',
			team: '/v2.5/league/by-team',
			challenger: '/v2.5/league/challenger'
		},
		status: '/shards',
		match: '/v2.2/match',
		matchHistory: '/v2.2/matchhistory',
		stats: '/v1.3/stats/by-summoner',
		// NOTE: summoner, static-data, and team endpoints are functions, so they must be invoked.
		summoner: {
			byNames: function(names) {
				return '/v1.4/summoner/by-name/' + names;
			},
			byIds: function(ids) {
				return '/v1.4/summoner/' + ids;
			},
			masteries: function(ids) {
				return '/v1.4/summoner/' + ids + '/masteries';
			},
			name: function(ids) {
				return '/v1.4/summoner/' + ids + '/name';
			},
			runes: function(ids) {
				return '/v1.4/summoner/' + ids + '/runes';
			}
		},
		staticData: {
			champion: function() {
				return '/static-data' + '/' + region + '/v1.2/champion';
			},
			item: function() {
				return '/static-data' + '/' + region + '/v1.2/item';
			},
			languages: function() {
				return '/static-data' + '/' + region + '/v1.2/languages';
			},
			mastery: function() {
				return '/static-data' + '/' + region + '/v1.2/mastery';
			},
			realm: function() {
				return '/static-data' + '/' + region + '/v1.2/realm';
			},
			rune: function() {
				return '/static-data' + '/' + region + '/v1.2/rune';
			},
			summonerSpell: function() {
				return '/static-data' + '/' + region + '/v1.2/summoner-spell';
			},
			versions: function() {
				return '/static-data' + '/' + region + '/v1.2/versions';
			}
		},
		team: {
			bySummoner: function(ids) {
				return '/v2.4/team/by-summoner/' + ids;
			},
			byTeam: function(ids) {
				return '/v2.4/team/' + ids;
			}
		}
	};

	RiotData.initialize = function (key, inputRegion) {
		apiKey = 'api_key=' + key;
		if (inputRegion) {
			region = inputRegion;
		}
		riotHost = region + '.' + riotHost;
	};

	var requestData = function(options, callback) {
		console.log('Starting req');
		var getRequest = https.request(options, function(response) {

			var data = '';
			console.log('status: ', response.statusCode);
			console.log(data);
			// console.log('headers: ', response.headers);
			// console.log(response);

			response.on('data', function (chunk) {
				console.log('Data chunk recieved.');
				data += chunk;
			});

			response.on('end', function () {
				console.log('All chunks recieved.');
				// console.log(data);
				callback(null, data);
			});

			response.on('error', function() {
				console.log('Error in getRequest occured.');
				callback(error);
			});

		});
		getRequest.end();
		getRequest.on('error', function(error) {
			callback(error);
			console.log('Error in requestData occured.');
			console.error(error);
		});
	};

	/*
	 * utility functions
	 */

	var buildEndpoint = function(inputPath) {
		var options = {
			host: riotHost,
			path: riotPath + '/' + region + inputPath + apiKey,
			method: 'GET'
		};
		console.log('URI: ' + options.host + options.path);
		return options;
	};

	var buildStaticEndpoint = function(inputPath) {
		var options = {
			host: riotHost,
			path: riotPath + inputPath + apiKey,
			method: 'GET'
		};
		console.log('URI: ' + options.host + options.path);
		return options;
	};

	var buildShardEndpoint = function(inputPath) {
		var options = {
			host: shardHost,
			path: inputPath,
			method: 'GET'
		};
		console.log('URI: ' + options.host + options.path);
		return options;
	};

	var buildQueryParameters = function(queryParameters) {
		var params = '';
		for (var qp in queryParameters) {
			if (queryParameters.hasOwnProperty(qp)) {
				params += qp + "=" + queryParameters[qp] + '&';
			}
		}
		return params;
	};

	/*
	 * champion endpoint
	 */
	RiotData.getChampions = function(free, callback) {
		var	options,
			paramFreeToPlay = '';
		if (free) {
			paramFreeToPlay = 'freeToPlay=true&';
		}
		options = buildEndpoint(Endpoints.champion + '?' + paramFreeToPlay);
		requestData(options, callback);
	};

	RiotData.getChampionById = function(id, callback) {
		var	options;

		options = buildEndpoint(Endpoints.champion + '/' + id + '?');
		requestData(options, callback);
	};

	/*
	 * summoner endpoint
	 */
	RiotData.getRecentGamesBySummonerId = function(id, callback) {
		var	options;

		options = buildEndpoint(Endpoints.game + '/' + id + '/recent' + '?');
		requestData(options, callback);
	};

	/*
	 * league endpoint
	 */
	RiotData.getLeagueBySummonerId = function(id, callback) {
		var	options;

		options = buildEndpoint(Endpoints.league.summoner + '/' + id + '?');
		requestData(options, callback);
	};

	RiotData.getLeagueEntryBySummonerId = function(id, callback) {
		var	options;

		options = buildEndpoint(Endpoints.league.summoner + '/' + id + '/entry' + '?');
		requestData(options, callback);
	};

	RiotData.getLeagueByTeamId = function(id, callback) {
		var	options;

		options = buildEndpoint(Endpoints.league.team + '/' + id + '?');
		requestData(options, callback);
	};

	RiotData.getLeagueEntryByTeamId = function(id, callback) {
		var	options;

		options = buildEndpoint(Endpoints.league.team + '/' + id + '/entry' + '?');
		requestData(options, callback);
	};

	RiotData.getLeagueChallenger = function(type, callback) {
		var	options;

		options = buildEndpoint(Endpoints.league.challenger + '?type=' + type + '&');
		requestData(options, callback);
	};

	/*
	 * lol-static-data endpoint
	 */
	RiotData.getStaticChampions = function(queryParams, callback) {
		var	options;
		if (arguments.length === 1 && typeof queryParams === 'function') {
			queryParams = {};
			callback = arguments[0];
		}
		console.log('running cod.e.');
		options = buildStaticEndpoint(Endpoints.staticData.champion() + '?' + buildQueryParameters(queryParams));
		requestData(options,callback);
	};

	RiotData.getStaticChampionById = function(id, queryParams, callback) {
		var	options;
		if (arguments.length === 2 && typeof queryParams === 'function') {
			queryParams = {};
			id = arguments[0];
			callback = arguments[1];
		}
		options = buildStaticEndpoint(Endpoints.staticData.champion() + '/' + id + '?' + buildQueryParameters(queryParams));
		requestData(options,callback);
	};

	RiotData.getStaticItems = function(queryParams, callback)
	{
		var	options;
		if (arguments.length === 1 && typeof queryParams === 'function') {
			queryParams = {};
			callback = arguments[0];
		}
		options = buildStaticEndpoint(Endpoints.staticData.item() + '?' + buildQueryParameters(queryParams));
		requestData(options,callback);
	};

	RiotData.getStaticItemById = function(id, queryParams, callback) {
		var	options;
		if (arguments.length === 2 && typeof queryParams === 'function') {
			queryParams = {};
			id = arguments[0];
			callback = arguments[1];
		}
		options = buildStaticEndpoint(Endpoints.staticData.item() + '/' + id + '?' + buildQueryParameters(queryParams));
		requestData(options,callback);
	};

	RiotData.getStaticLanguages = function(callback)
	{
		var	options;

		options = buildStaticEndpoint(Endpoints.staticData.languages() + '?');
		requestData(options,callback);
	};

	RiotData.getStaticMasteries = function(queryParams, callback)
	{
		var	options;
		if (arguments.length === 1 && typeof queryParams === 'function') {
			queryParams = {};
			callback = arguments[0];
		}
		options = buildStaticEndpoint(Endpoints.staticData.mastery() + '?' + buildQueryParameters(queryParams));
		requestData(options,callback);
	};

	RiotData.getStaticMasteryById = function(id, queryParams, callback) {
		var	options;
		if (arguments.length === 2 && typeof queryParams === 'function') {
			queryParams = {};
			id = arguments[0];
			callback = arguments[1];
		}
		options = buildStaticEndpoint(Endpoints.staticData.mastery() + '/' + id + '?' + buildQueryParameters(queryParams));
		requestData(options,callback);
	};

	RiotData.getStaticRealms = function(callback)
	{
		var	options;

		options = buildStaticEndpoint(Endpoints.staticData.realm() + '?');
		requestData(options,callback);
	};

	RiotData.getStaticRunes = function(queryParams, callback)
	{
		var	options;
		if (arguments.length === 1 && typeof queryParams === 'function') {
			queryParams = {};
			callback = arguments[0];
		}
		options = buildStaticEndpoint(Endpoints.staticData.rune() + '?' + buildQueryParameters(queryParams));
		requestData(options,callback);
	};

	RiotData.getStaticRuneById = function(id, queryParams, callback) {
		var	options;
		if (arguments.length === 2 && typeof queryParams === 'function') {
			queryParams = {};
			id = arguments[0];
			callback = arguments[1];
		}
		options = buildStaticEndpoint(Endpoints.staticData.rune() + '/' + id + '?' + buildQueryParameters(queryParams));
		requestData(options,callback);
	};

	RiotData.getStaticSummonerSpells = function(queryParams, callback)
	{
		var	options;
		if (arguments.length === 1 && typeof queryParams === 'function') {
			queryParams = {};
			callback = arguments[0];
		}
		options = buildStaticEndpoint(Endpoints.staticData.summonerSpell() + '?' + buildQueryParameters(queryParams));
		requestData(options,callback);
	};

	RiotData.getStaticSummonerSpellById = function(id, queryParams, callback) {
		var	options;
		if (arguments.length === 2 && typeof queryParams === 'function') {
			queryParams = {};
			id = arguments[0];
			callback = arguments[1];
		}
		options = buildStaticEndpoint(Endpoints.staticData.summonerSpell() + '/' + id + '?' + buildQueryParameters(queryParams));
		requestData(options,callback);
	};

	RiotData.getStaticVersions = function(callback)
	{
		var	options;

		options = buildStaticEndpoint(Endpoints.staticData.versions() + '?');
		requestData(options,callback);
	};

	/*
	 * lol-status endpoint
	 */
	RiotData.getStatus = function(callback)
	{
		var	options;

		options = buildShardEndpoint(Endpoints.status);
		requestData(options,callback);
	};

	RiotData.getStatusByRegion = function(inputRegion, callback)
	{
		var options;

		options = buildShardEndpoint(Endpoints.status + '/' + inputRegion);
		requestData(options,callback);
	};

	/*
	 * match endpoint
	 */

	RiotData.getMatchById = function(id, includeTimeline, callback) {
		var	options;
		if (arguments.length === 2 && typeof includeTimeline === 'function') {
			includeTimeline = false;
			callback = arguments[1];
		}
		options = buildEndpoint(Endpoints.match + '/' + id + '?' + 'includeTimeline=' + includeTimeline + '&');
		requestData(options, callback);
	};

	/*
	 * match-history endpoint
	 */

	RiotData.getMatchHistoryById = function(id, queryParams, callback) {
		var	options;
		if (arguments.length === 2 && typeof queryParams === 'function') {
			queryParams = {};
			callback = arguments[1];
		}
		options = buildEndpoint(Endpoints.match + '/' + id + '?' + buildQueryParameters(queryParams));
		requestData(options, callback);
	};

	/*
	 * stats endpoint
	 */

	RiotData.getStatsById = function(id, queryParams, callback) {
		var	options;
		if (arguments.length === 2 && typeof queryParams === 'function') {
			queryParams = {};
			callback = arguments[1];
		}
		options = buildEndpoint(Endpoints.stats + '/' + id + '/ranked?' + buildQueryParameters(queryParams));
		requestData(options, callback);
	};

	RiotData.getStatsSummaryById = function(id, queryParams, callback) {
		var	options;
		if (arguments.length === 2 && typeof queryParams === 'function') {
			queryParams = {};
			callback = arguments[1];
		}
		options = buildEndpoint(Endpoints.stats + '/' + id + '/summary?' + buildQueryParameters(queryParams));
		requestData(options, callback);
	};

	/*
	 * summoner endpoint
	 */

	RiotData.getSummonerByNames = function(names, callback) {
		var	options;

		options = buildEndpoint(Endpoints.summoner.byNames(names) + '?');
		requestData(options, callback);
	};

	RiotData.getSummonerByIds = function(ids, callback) {
		var	options;

		options = buildEndpoint(Endpoints.summoner.byIds(ids) + '?');
		requestData(options, callback);
	};

	RiotData.getSummonerMasteries = function(ids, callback) {
		var	options;

		options = buildEndpoint(Endpoints.summoner.masteries(ids) + '?');
		requestData(options, callback);
	};

	RiotData.getSummonerNamesByIds = function(ids, callback) {
		var	options;

		options = buildEndpoint(Endpoints.summoner.name(ids) + '?');
		requestData(options, callback);
	};

	RiotData.getSummonerRunes = function(ids, callback) {
		var	options;

		options = buildEndpoint(Endpoints.summoner.runes(ids) + '?');
		requestData(options, callback);
	};

	/*
	 * team endpoint
	 */

 	RiotData.getTeamBySummonerIds = function(ids, callback) {
		var	options;

		options = buildEndpoint(Endpoints.team.bySummoner(ids) + '?');
		requestData(options, callback);
	};

 	RiotData.getTeamByTeamIds = function(ids, callback) {
		var	options;

		options = buildEndpoint(Endpoints.team.byTeam(ids) + '?');
		requestData(options, callback);
	};

	module.exports = RiotData;

}());


text:
<?php
 class modeloMantenimientoAdministrador extends CI_Model {

 function modeloMantenimientoAdministrador() {
 parent::__construct();
 }

function getData(){
 $usuario = $this->db->get('cliente');
 return $usuario->result(); //devolvemos el resultado de lanzar la query.
 }

 function insert($data) {
 $this->db->set('nombresCliente', $data['nombresCliente']);
 $this->db->set('apellidosCliente', $data['apellidosCliente']);
 $this->db->set('direccionCliente', $data['direccionCliente']);
 $this->db->set('telefonoCelular', $data['telefonoCelular']);
 $this->db->set('telefonoCasa', $data['telefonoCasa']);
 $this->db->insert('cliente');
 }
 function baja ($nombre) {
 $this->db->where('nombresCliente', $nombre);
 $this->db->delete('cliente');
 }
 function obtenerCliente($idCliente) {
$this->db->select('idCliente, nombresCliente, apellidosCliente,direccionCliente, telefonoCelular, telefonoCasa');
$this->db->from('cliente');
$this->db->where('idCliente = ' . $idCliente);
$cliente = $this->db->get();
return $cliente->result();
}
function update($data) {
 $this->db->set('nombresCliente', $data['nombre']);
 $this->db->set('apellidosCliente', $data['apellido']);
 $this->db->set('direccionCliente', $data['direccion']);
 $this->db->set('telefonoCelular', $data['telefonoCelular']);
 $this->db->set('telefonoCasa', $data['telefonoCasa']);
 $this->db->where('idCliente', $data['idCliente']);
 $this->db->update('cliente');
 }

}


text:
use rect::Rect;
use surface::SDL_Surface;

#[cfg(feature = "no_std")]
use core::prelude::*;
use libc::{c_void, c_int, c_float, c_char, uint16_t, uint32_t};
use num::FromPrimitive;

pub type SDL_Rect = Rect;
pub type SDL_bool = c_int;

//SDL_video.h
#[allow(missing_copy_implementations)]
#[repr(C)]
pub struct SDL_Window;

#[allow(missing_copy_implementations)]
#[repr(C)]
pub struct SDL_DisplayMode {
    pub format: uint32_t,
    pub w: c_int,
    pub h: c_int,
    pub refresh_rate: c_int,
    pub driverdata: *mut c_void
}

pub type SDL_WindowPos = c_int;
pub const SDL_WINDOWPOS_CENTERED: SDL_WindowPos = 0x2FFF0000;
pub const SDL_WINDOWPOS_UNDEFINED: SDL_WindowPos = 0x1FFF0000;

#[derive(Copy, Clone)]
pub enum SDL_WindowFlags {
    SDL_WINDOW_FULLSCREEN = 0x00000001,
    SDL_WINDOW_OPENGL = 0x00000002,
    SDL_WINDOW_SHOWN = 0x00000004,
    SDL_WINDOW_HIDDEN = 0x00000008,
    SDL_WINDOW_BORDERLESS = 0x00000010,
    SDL_WINDOW_RESIZABLE = 0x00000020,
    SDL_WINDOW_MINIMIZED = 0x00000040,
    SDL_WINDOW_MAXIMIZED = 0x00000080,
    SDL_WINDOW_INPUT_GRABBED = 0x00000100,
    SDL_WINDOW_INPUT_FOCUS = 0x00000200,
    SDL_WINDOW_MOUSE_FOCUS = 0x00000400,
    SDL_WINDOW_FULLSCREEN_DESKTOP = 0x00001001,
    SDL_WINDOW_FOREIGN = 0x00000800,
    SDL_WINDOW_ALLOW_HIGHDPI = 0x00002000
}

#[derive(Copy, Clone)]
pub enum SDL_WindowEventID {
    SDL_WINDOWEVENT_NONE,
    SDL_WINDOWEVENT_SHOWN,
    SDL_WINDOWEVENT_HIDDEN,
    SDL_WINDOWEVENT_EXPOSED,
    SDL_WINDOWEVENT_MOVED,
    SDL_WINDOWEVENT_RESIZED,
    SDL_WINDOWEVENT_SIZE_CHANGED,
    SDL_WINDOWEVENT_MINIMIZED,
    SDL_WINDOWEVENT_MAXIMIZED,
    SDL_WINDOWEVENT_RESTORED,
    SDL_WINDOWEVENT_ENTER,
    SDL_WINDOWEVENT_LEAVE,
    SDL_WINDOWEVENT_FOCUS_GAINED,
    SDL_WINDOWEVENT_FOCUS_LOST,
    SDL_WINDOWEVENT_CLOSE
}

pub type SDL_GLContext = *const c_void;

#[derive(Copy, Clone)]
#[repr(C)]
pub enum SDL_GLattr {
    SDL_GL_RED_SIZE = 0,
    SDL_GL_GREEN_SIZE = 1,
    SDL_GL_BLUE_SIZE = 2,
    SDL_GL_ALPHA_SIZE = 3,
    SDL_GL_BUFFER_SIZE = 4,
    SDL_GL_DOUBLEBUFFER = 5,
    SDL_GL_DEPTH_SIZE = 6,
    SDL_GL_STENCIL_SIZE = 7,
    SDL_GL_ACCUM_RED_SIZE = 8,
    SDL_GL_ACCUM_GREEN_SIZE = 9,
    SDL_GL_ACCUM_BLUE_SIZE = 10,
    SDL_GL_ACCUM_ALPHA_SIZE = 11,
    SDL_GL_STEREO = 12,
    SDL_GL_MULTISAMPLEBUFFERS = 13,
    SDL_GL_MULTISAMPLESAMPLES = 14,
    SDL_GL_ACCELERATED_VISUAL = 15,
    SDL_GL_RETAINED_BACKING = 16,
    SDL_GL_CONTEXT_MAJOR_VERSION = 17,
    SDL_GL_CONTEXT_MINOR_VERSION = 18,
    SDL_GL_CONTEXT_EGL = 19,
    SDL_GL_CONTEXT_FLAGS = 20,
    SDL_GL_CONTEXT_PROFILE_MASK = 21,
    SDL_GL_SHARE_WITH_CURRENT_CONTEXT = 22,
    SDL_GL_FRAMEBUFFER_SRGB_CAPABLE = 23
}

impl FromPrimitive for SDL_GLattr {
    fn from_i64(n: i64) -> Option<SDL_GLattr> {
        use self::SDL_GLattr::*;

        Some( match n {
            0  => SDL_GL_RED_SIZE,
            1  => SDL_GL_GREEN_SIZE,
            2  => SDL_GL_BLUE_SIZE,
            3  => SDL_GL_ALPHA_SIZE,
            4  => SDL_GL_BUFFER_SIZE,
            5  => SDL_GL_DOUBLEBUFFER,
            6  => SDL_GL_DEPTH_SIZE,
            7  => SDL_GL_STENCIL_SIZE,
            8  => SDL_GL_ACCUM_RED_SIZE,
            9  => SDL_GL_ACCUM_GREEN_SIZE,
            10 => SDL_GL_ACCUM_BLUE_SIZE,
            11 => SDL_GL_ACCUM_ALPHA_SIZE,
            12 => SDL_GL_STEREO,
            13 => SDL_GL_MULTISAMPLEBUFFERS,
            14 => SDL_GL_MULTISAMPLESAMPLES,
            15 => SDL_GL_ACCELERATED_VISUAL,
            16 => SDL_GL_RETAINED_BACKING,
            17 => SDL_GL_CONTEXT_MAJOR_VERSION,
            18 => SDL_GL_CONTEXT_MINOR_VERSION,
            19 => SDL_GL_CONTEXT_EGL,
            20 => SDL_GL_CONTEXT_FLAGS,
            21 => SDL_GL_CONTEXT_PROFILE_MASK,
            22 => SDL_GL_SHARE_WITH_CURRENT_CONTEXT,
            23 => SDL_GL_FRAMEBUFFER_SRGB_CAPABLE,
            _  => return None,
        })
    }

    fn from_u64(n: u64) -> Option<SDL_GLattr> { FromPrimitive::from_i64(n as i64) }
}

#[derive(Copy, Clone)]
pub enum SDL_GLprofile {
    SDL_GL_CONTEXT_PROFILE_CORE = 0x0001,
    SDL_GL_CONTEXT_PROFILE_COMPATIBILITY = 0x0002,
    SDL_GL_CONTEXT_PROFILE_ES = 0x0004
}

//SDL_video.h
extern "C" {
    pub fn SDL_GetNumVideoDrivers() -> c_int;
    pub fn SDL_GetVideoDriver(index: c_int) -> *const c_char;
    pub fn SDL_VideoInit(driver_name: *const c_char) -> c_int;
    pub fn SDL_VideoQuit();
    pub fn SDL_GetCurrentVideoDriver() -> *const c_char;
    pub fn SDL_GetNumVideoDisplays() -> c_int;
    pub fn SDL_GetDisplayName(displayIndex: c_int) -> *const c_char;
    pub fn SDL_GetDisplayBounds(displayIndex: c_int, rect: *mut SDL_Rect) -> c_int;
    pub fn SDL_GetNumDisplayModes(displayIndex: c_int) -> c_int;
    pub fn SDL_GetDisplayMode(displayIndex: c_int, modeIndex: c_int, mode: *mut SDL_DisplayMode) -> c_int;
    pub fn SDL_GetDesktopDisplayMode(displayIndex: c_int, mode: *mut SDL_DisplayMode) -> c_int;
    pub fn SDL_GetCurrentDisplayMode(displayIndex: c_int, mode: *mut SDL_DisplayMode) -> c_int;
    pub fn SDL_GetClosestDisplayMode(displayIndex: c_int, mode: *const SDL_DisplayMode, closest: *mut SDL_DisplayMode) -> *mut SDL_DisplayMode;
    pub fn SDL_GetWindowDisplayIndex(window: *mut SDL_Window) -> c_int;
    pub fn SDL_SetWindowDisplayMode(window: *mut SDL_Window, mode: *const SDL_DisplayMode) -> c_int;
    pub fn SDL_GetWindowDisplayMode(window: *mut SDL_Window, mode: *mut SDL_DisplayMode) -> c_int;
    pub fn SDL_GetWindowPixelFormat(window: *mut SDL_Window) -> uint32_t;
    pub fn SDL_CreateWindow(title: *const c_char, x: c_int, y: c_int, w: c_int, h: c_int, flags: uint32_t) -> *mut SDL_Window;
    pub fn SDL_CreateWindowFrom(data: *const c_void) -> *mut SDL_Window;
    pub fn SDL_GetWindowID(window: *mut SDL_Window) -> uint32_t;
    pub fn SDL_GetWindowFromID(id: uint32_t) -> *mut SDL_Window;
    pub fn SDL_GetWindowFlags(window: *mut SDL_Window) -> uint32_t;
    pub fn SDL_SetWindowTitle(window: *mut SDL_Window, title: *const c_char);
    pub fn SDL_GetWindowTitle(window: *mut SDL_Window) -> *const c_char;
    pub fn SDL_SetWindowIcon(window: *mut SDL_Window, icon: *mut SDL_Surface);
    pub fn SDL_SetWindowData(window: *mut SDL_Window, name: *const c_char, userdata: *const c_void) -> *const c_void;
    pub fn SDL_GetWindowData(window: *mut SDL_Window, name: *const c_char) -> *mut c_void;
    pub fn SDL_SetWindowPosition(window: *mut SDL_Window, x: c_int, y: c_int);
    pub fn SDL_GetWindowPosition(window: *mut SDL_Window, x: *const c_int, y: *const c_int);
    pub fn SDL_SetWindowSize(window: *mut SDL_Window, w: c_int, h: c_int);
    pub fn SDL_GetWindowSize(window: *mut SDL_Window, w: *mut c_int, h: *mut c_int);
    pub fn SDL_SetWindowMinimumSize(window: *mut SDL_Window, min_w: c_int, min_h: c_int);
    pub fn SDL_GetWindowMinimumSize(window: *mut SDL_Window, w: *mut c_int, h: *mut c_int);
    pub fn SDL_SetWindowMaximumSize(window: *mut SDL_Window, max_w: c_int, max_h: c_int);
    pub fn SDL_GetWindowMaximumSize(window: *mut SDL_Window, w: *mut c_int, h: *mut c_int);
    pub fn SDL_SetWindowBordered(window: *mut SDL_Window, bordered: SDL_bool);
    pub fn SDL_ShowWindow(window: *mut SDL_Window);
    pub fn SDL_HideWindow(window: *mut SDL_Window);
    pub fn SDL_RaiseWindow(window: *mut SDL_Window);
    pub fn SDL_MaximizeWindow(window: *mut SDL_Window);
    pub fn SDL_MinimizeWindow(window: *mut SDL_Window);
    pub fn SDL_RestoreWindow(window: *mut SDL_Window);
    pub fn SDL_SetWindowFullscreen(window: *mut SDL_Window, flags: uint32_t) -> c_int;
    pub fn SDL_GetWindowSurface(window: *mut SDL_Window) -> *mut SDL_Surface;
    pub fn SDL_UpdateWindowSurface(window: *mut SDL_Window) -> c_int;
    pub fn SDL_UpdateWindowSurfaceRects(window: *mut SDL_Window, rects: *const SDL_Rect, numrects: c_int) -> c_int;
    pub fn SDL_SetWindowGrab(window: *mut SDL_Window, grabbed: SDL_bool);
    pub fn SDL_GetWindowGrab(window: *mut SDL_Window) -> SDL_bool;
    pub fn SDL_SetWindowBrightness(window: *mut SDL_Window, brightness: c_float) -> c_int;
    pub fn SDL_GetWindowBrightness(window: *mut SDL_Window) -> c_float;
    pub fn SDL_SetWindowGammaRamp(window: *mut SDL_Window, red: *const uint16_t, green: *const uint16_t, blue: *const uint16_t) -> c_int;
    pub fn SDL_GetWindowGammaRamp(window: *mut SDL_Window, red: *mut uint16_t, green: *mut uint16_t, blue: *mut uint16_t) -> c_int;
    pub fn SDL_DestroyWindow(window: *mut SDL_Window);
    pub fn SDL_IsScreenSaverEnabled() -> SDL_bool;
    pub fn SDL_EnableScreenSaver();
    pub fn SDL_DisableScreenSaver();
    pub fn SDL_GL_GetDrawableSize(window: *mut SDL_Window, w: *mut c_int, h: *mut c_int);
    pub fn SDL_GL_LoadLibrary(path: *const c_char) -> c_int;
    pub fn SDL_GL_GetProcAddress(procname: *const c_char) -> *const c_void;
    pub fn SDL_GL_UnloadLibrary();
    pub fn SDL_GL_ExtensionSupported(extension: *const c_char) -> SDL_bool;
    pub fn SDL_GL_SetAttribute(attr: SDL_GLattr, value: c_int) -> c_int;
    pub fn SDL_GL_GetAttribute(attr: SDL_GLattr, value: *mut c_int) -> c_int;
    pub fn SDL_GL_CreateContext(window: *mut SDL_Window) -> SDL_GLContext;
    pub fn SDL_GL_MakeCurrent(window: *mut SDL_Window, context: SDL_GLContext) -> c_int;
    pub fn SDL_GL_GetCurrentWindow() -> *mut SDL_Window;
    pub fn SDL_GL_GetCurrentContext() -> SDL_GLContext;
    pub fn SDL_GL_SetSwapInterval(interval: c_int) -> c_int;
    pub fn SDL_GL_GetSwapInterval() -> c_int;
    pub fn SDL_GL_SwapWindow(window: *mut SDL_Window);
    pub fn SDL_GL_DeleteContext(context: SDL_GLContext);
}


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

import java.io.IOException;

import ghidra.app.util.bin.StructConverter;
import ghidra.file.formats.dump.DumpFileReader;
import ghidra.program.model.data.*;

public class LoadedDriver implements StructConverter {

	public final static String NAME = "_KLDR_DATA_TABLE_ENTRY";

	private int nameOffset;
	private long dllBase;
	private long entryPoint;
	private long sizeOfImage;
	private long fullDllName;
	private long baseDllName;
	private int flags;
	private short loadCount;
	private int checkSum;
	private long buildFileHash;

	private DumpFileReader reader;
	private long index;
	private int psz;
	private boolean is32Bit;

	LoadedDriver(DumpFileReader reader, long index) throws IOException {
		this.reader = reader;
		this.index = index;
		this.psz = reader.getPointerSize();
		this.is32Bit = psz == 4;

		parse();
	}

	private void parse() throws IOException {
		reader.setPointerIndex(index);

		setNameOffset(reader.readNextInt());
		int res0len = is32Bit ? 24 : 52;
		reader.readNextAsciiString(res0len);
		setDllBase(reader.readNextPointer());
		setEntryPoint(reader.readNextPointer());
		setSizeOfImage(reader.readNextPointer());
		reader.readNextPointer();
		setFullDllName(reader.readNextPointer());
		reader.readNextPointer();
		setBaseDllName(reader.readNextPointer());
		setFlags(reader.readNextInt());
		setLoadCount(reader.readNextShort());
		reader.readNextShort();
		reader.readNextPointer();
		setCheckSum(reader.readNextInt());
		reader.readNextInt();
		setBuildFileHash(reader.readNextInt());
		reader.readNextInt();
	}

	@Override
	public DataType toDataType() {
		StructureDataType struct = new StructureDataType(NAME, 0);

		struct.add(DWORD, 4, "NameOffset", null);
		struct.add(DWORD, 4, "", null);
		struct.add(POINTER, psz, "InLoadOrderLinks.Flink", null);
		struct.add(POINTER, psz, "InLoadOrderLinks.Blink", null);
		struct.add(POINTER, psz, "ExceptionTable", null);
		struct.add(POINTER, psz, "ExceptionTableSize", null);
		struct.add(POINTER, psz, "GpValue", null);
		struct.add(POINTER, psz, "NonPagedDebugInfo", null);
		struct.add(POINTER, psz, "DllBase", null);
		struct.add(POINTER, psz, "EntryPoint", null);
		struct.add(is32Bit ? DWORD : QWORD, psz, "SizeOfImage", null);
		struct.add(is32Bit ? DWORD : QWORD, psz, "", null);
		struct.add(POINTER, psz, "FullDllName", null);
		struct.add(is32Bit ? DWORD : QWORD, psz, "", null);
		struct.add(POINTER, psz, "BaseDllName", null);
		struct.add(DWORD, 4, "Flags", null);
		struct.add(WORD, 2, "LoadCount", null);
		struct.add(WORD, 2, "", null);
		struct.add(POINTER, psz, "SectionPointer", null);
		struct.add(is32Bit ? DWORD : QWORD, psz, "CheckSum", null);
		struct.add(is32Bit ? DWORD : QWORD, psz, "BuildFileHash", null);

		struct.setCategoryPath(new CategoryPath("/PDMP"));

		return struct;
	}

	public int getNameOffset() {
		return nameOffset;
	}

	public void setNameOffset(int nameOffset) {
		this.nameOffset = nameOffset;
	}

	public long getDllBase() {
		return dllBase;
	}

	public void setDllBase(long dllBase) {
		this.dllBase = dllBase;
	}

	public long getEntryPoint() {
		return entryPoint;
	}

	public void setEntryPoint(long entryPoint) {
		this.entryPoint = entryPoint;
	}

	public long getSizeOfImage() {
		return sizeOfImage;
	}

	public void setSizeOfImage(long sizeOfImage) {
		this.sizeOfImage = sizeOfImage;
	}

	public long getBuildFileHash() {
		return buildFileHash;
	}

	public void setBuildFileHash(long buildFileHash) {
		this.buildFileHash = buildFileHash;
	}

	public long getFullDllName() {
		return fullDllName;
	}

	public void setFullDllName(long fullDllName) {
		this.fullDllName = fullDllName;
	}

	public long getBaseDllName() {
		return baseDllName;
	}

	public void setBaseDllName(long baseDllName) {
		this.baseDllName = baseDllName;
	}

	public int getFlags() {
		return flags;
	}

	public void setFlags(int flags) {
		this.flags = flags;
	}

	public short getLoadCount() {
		return loadCount;
	}

	public void setLoadCount(short loadCount) {
		this.loadCount = loadCount;
	}

	public int getCheckSum() {
		return checkSum;
	}

	public void setCheckSum(int checkSum) {
		this.checkSum = checkSum;
	}

}


text:
var div = document.createElement("div");
document.body.appendChild(div);
var obj = new Time.Test(div);

var button1 = document.createElement("button");
button1.innerHTML = "start";
button1.onclick = function(){
	obj.start();
}
document.body.appendChild(button1);

var button2 = document.createElement("button");
button2.innerHTML = "stop";
button2.onclick = function(){
	obj.stop();
}
document.body.appendChild(button2);


text:
title: "Tor 0.4.2.4-rc released with minor bug fixes and improvements"
layout: post
categories: tor release
tags: tor release
image: "/assets/images/post-images/tor-banner.png"
---

**The** Tor Project has published a release candidate for Tor, a tool that offers protection from surveillance and protects anonymity on the internet. The Tor 0.4.2.4-rc release is coming with some minor bug fixes and improvements.

![Tor Banner](/assets/images/post-images/tor-banner.png)

Tor 0.4.2.4-rc is the first release candidate in its series and a bundled Tor Browser alpha release will be made available in the first week of December. The Tor release candidate source code is currently available from the project's download page. The compiled packages will be made available over the coming weeks.

## Highlights in Tor 0.4.2.4-rc
Tor 0.4.2.4-rc includes a set of bug fixes that resolves minor issues in the tool and also improves the overall project quality. These changes are summarized below.
> - The build system is corrected. Make pkg-config use --prefix when cross-compiling, if PKG_CONFIG_PATH is not set.
- Updated geoip and geoip6 to the November 6, 2019, Maxmind GeoLite2 Country database.
- Fixed a BUG() assertion that occurs within a very small race window between when a client intro circuit opens and when its descriptor gets cleaned up from the cache. The circuit is now closed early, which will trigger a re-fetch of the descriptor and continue the connection.
- Fixed "make check-includes" so it runs correctly on out-of-tree builds. This contributes to the code quality.
- Logs the option name when skipping an obsolete option.
- When running Tor with an option like --verify-config or --dump-config that does not start the event loop, avoid crashing if we try to exit early because of an error.
- When checking if a directory connection is anonymous, test if the circuit was marked for close before looking at its channel. This avoids a BUG() stack trace if the circuit was previously closed.

For [more information on Tor 0.4.2.4-rc release](https://blog.torproject.org/new-release-candidate-tor-0424-rc), read the original release announcement.


text:
package errors

// InternalError is a ProcessOut internal error
type InternalError struct {
	message string
	code    string
}

// Error returns the error message
func (e *InternalError) Error() string {
	return e.message
}

// Code returns the error code returned by ProcessOut
func (e *InternalError) Code() string {
	return e.code
}


text:
CREATE TABLE [dbo].[AspNetUserClaims] (
    [Id]         INT            IDENTITY (1, 1) NOT NULL,
    [UserId]     NVARCHAR (128) NOT NULL,
    [ClaimType]  NVARCHAR (MAX) NULL,
    [ClaimValue] NVARCHAR (MAX) NULL
);

GO
CREATE NONCLUSTERED INDEX [IX_UserId]
    ON [dbo].[AspNetUserClaims]([UserId] ASC);

GO
ALTER TABLE [dbo].[AspNetUserClaims]
    ADD CONSTRAINT [PK_dbo.AspNetUserClaims] PRIMARY KEY CLUSTERED ([Id] ASC);

GO
ALTER TABLE [dbo].[AspNetUserClaims]
    ADD CONSTRAINT [FK_dbo.AspNetUserClaims_dbo.AspNetUsers_UserId] FOREIGN KEY ([UserId]) REFERENCES [dbo].[AspNetUsers] ([Id]) ON DELETE CASCADE;


text:
E-mails

                        De
                        Assunto
                        Data

                    <?php foreach ($emails as $email) { ?>

                            <?php echo $email->nomeRemetente; ?>
                            <?php echo $email->assunto; ?>
                            <?php echo date('d/m/Y H:i:s', strtotime($email->dataDeEnvio)); ?>
                             <?php echo $email->foiLido; ?>
                             <?php echo $email->idDoEmailNoServidor; ?>

                    <?php } ?>


text:
webgl-3d-animation
==================

An interactive 3D animation using WebGL to depict a 2D predator prey ecology on a grid real-time mapped onto the surface of a 3D torus.  Sound file is parsed then visualized both in time and frequency domains as well as rendered using Web Audio API - this is an exercise where I taught myself how to display data for an ongoing project on sound synthesis

# Installation

Visit [nodejs.org](http://nodejs.org) and install Node.js.

Clone this repository to your local machine:

```bash
git clone git@github.com:scottstensland/webgl-3d-animation.git
```

Change directory into the project folder:
```bash
cd webgl-3d-animation
```

Then install the dependent modules:

```bash
npm install
```

Launch the nodejs app:

```bash
npm start
```

Using a WebGL savvy browser, point it at URL :

```bash
		 http://localhost:8888
```

or ignore above and just see this WebGL app deployed live on heroku :

[http://webgl-3d-animation.herokuapp.com/](http://webgl-3d-animation.herokuapp.com/ "Scott Stensland's WebGL magic")

Feel free to contact me on twitter if you have any questions!

... my twitter name is same as my github name

   instructions on how to drive this ...

    run on a computer not on a phone since it currently uses
   just the mouse and keyboard as controls

     mouse left button and middle scroll wheel
           page up / page down
     arrow keys  left/right/up/down
           also these keys :  w s a d

      it uses WebGL for graphics
    I wrote it in the language javascript infact this was my
      "Hello World"  for both javascript and WebGL


text:
let config = require('config');
const fs = require('fs');
const os = require('os');
const prompt = require('prompt');

let myConfig = {};

const ifaces = os.networkInterfaces();
let adresses = [];

if (config.has('ip')) {
console.log('Current IP Address: %s', config.get('ip'));
  myConfig.ip = config.get('ip');
} else {
  myConfig.ip = "";
  console.log('No ip selected yet.');
}
if (config.has('port')) {
  console.log('Current Serial Port: %s', config.get('port'));
  myConfig.port = config.get('port');
} else {
  console.log('No port selected yet.');
  myConfig.port = "";
}

prompt.start();
// list ip addresses:
console.log('Select IP Address by typing it\'s number into the prompt.');

Object.keys(ifaces).forEach(function(ifname) {
  let alias = 0;

  ifaces[ifname].forEach(function(iface) {
    if ('IPv4' !== iface.family || iface.internal !== false) {
      // skip over internal (i.e. 127.0.0.1) and non-ipv4 addresses
      return;
    }

    if (alias >= 1) {
      // this single interface has multiple ipv4 addresses
      console.log(`(${alias}) ${ifname} : ${iface.address}`);
      adresses.push(iface.address);
    } else {
      // this interface has only one ipv4 adress
      console.log(`(${alias}) ${ifname} : ${iface.address}`);
      adresses.push(iface.address);
    }
    prompt.get(['num'], function(err, result) {
      console.log('IP Selected: %s', adresses[result.num]);
      myConfig.ip = adresses[result.num];
      fs.writeFile('./config/default.json', JSON.stringify(myConfig), function (err) {
        if (err) {
          return console.log(err);
        }
      });
      alias += 1;
    });
  });
});


text:
<?php
/**
 * WPSEO plugin file.
 *
 * @package WPSEO\Admin
 * @since   1.5.0
 */

if ( ! defined( 'WPSEO_VERSION' ) ) {
	header( 'Status: 403 Forbidden' );
	header( 'HTTP/1.1 403 Forbidden' );
	exit();
}

/**
 * Sanitizes the parameters that have been sent.
 *
 * @return array The sanitized fields.
 */
function yoast_free_bulk_sanitize_input_fields() {
	$possible_params = array(
		'type',
		'paged',
		'post_type_filter',
		'post_status',
		'order',
		'orderby',
	);

	$input_get = array();
	foreach ( $possible_params as $param_name ) {
		if ( isset( $_GET[ $param_name ] ) ) {
			$input_get[ $param_name ] = sanitize_text_field( wp_unslash( $_GET[ $param_name ] ) );
		}
	}

	return $input_get;
}

$yoast_free_input_fields = yoast_free_bulk_sanitize_input_fields();

// Verifies the nonce.
if ( ! empty( $yoast_free_input_fields ) ) {
	check_admin_referer( 'bulk-editor-table', 'nonce' );
}

// If type is empty, fill it with value of first tab (title).
if ( ! isset( $yoast_free_input_fields['type'] ) ) {
	$yoast_free_input_fields['type'] = 'title';
}

$yoast_bulk_editor_arguments = array(
	'input_fields' => $yoast_free_input_fields,
	'nonce'        => wp_create_nonce( 'bulk-editor-table' ),
);

$wpseo_bulk_titles_table      = new WPSEO_Bulk_Title_Editor_List_Table( $yoast_bulk_editor_arguments );
$wpseo_bulk_description_table = new WPSEO_Bulk_Description_List_Table( $yoast_bulk_editor_arguments );

$yoast_free_screen_reader_content = array(
	'heading_views'      => __( 'Filter posts list', 'wordpress-seo' ),
	'heading_pagination' => __( 'Posts list navigation', 'wordpress-seo' ),
	'heading_list'       => __( 'Posts list', 'wordpress-seo' ),
);
get_current_screen()->set_screen_reader_content( $yoast_free_screen_reader_content );

if ( ! empty( $_REQUEST['_wp_http_referer'] ) && isset( $_SERVER['REQUEST_URI'] ) ) {
	$request_uri = sanitize_file_name( wp_unslash( $_SERVER['REQUEST_URI'] ) );

	wp_redirect(
		remove_query_arg(
			array( '_wp_http_referer', '_wpnonce' ),
			$request_uri
		)
	);
	exit;
}

/**
 * Outputs a help center.
 */
function wpseo_render_help_center() {
	$tabs = new WPSEO_Option_Tabs( '', '' );

	$bulk_editor_tab_title = new WPSEO_Option_Tab(
		'title',
		__( 'Bulk editor', 'wordpress-seo' ),
		array( 'video_url' => WPSEO_Shortlinker::get( 'https://yoa.st/screencast-tools-bulk-editor' ) )
	);
	$tabs->add_tab( $bulk_editor_tab_title );

	$bulk_editor_tab_description = new WPSEO_Option_Tab(
		'description',
		__( 'Bulk editor', 'wordpress-seo' ),
		array( 'video_url' => WPSEO_Shortlinker::get( 'https://yoa.st/screencast-tools-bulk-editor' ) )
	);
	$tabs->add_tab( $bulk_editor_tab_description );

	$helpcenter = new WPSEO_Help_Center( '', $tabs, WPSEO_Utils::is_yoast_seo_premium() );
	$helpcenter->localize_data();
	$helpcenter->mount();
}

/**
 * Renders a bulk editor tab.
 *
 * @param WPSEO_Bulk_List_Table $table The table to render.
 * @param string                $id    The id for the tab.
 */
function wpseo_get_rendered_tab( $table, $id ) {
	?>
	<div id="<?php echo esc_attr( $id ); ?>" class="wpseotab">
		<?php
		$table->show_page();
		?>

	<?php
}

?>

		<?php esc_html_e( 'Title', 'wordpress-seo' ); ?>
		<?php esc_html_e( 'Description', 'wordpress-seo' ); ?>

	<?php wpseo_render_help_center(); ?>

		<?php wpseo_get_rendered_tab( $wpseo_bulk_titles_table, 'title' ); ?>
		<?php wpseo_get_rendered_tab( $wpseo_bulk_description_table, 'description' ); ?>