text:
package daemon // import "github.com/docker/docker/daemon"

import (
	"context"
	"fmt"
	"runtime"
	"strconv"
	"syscall"
	"time"

	containerpkg "github.com/docker/docker/container"
	"github.com/docker/docker/errdefs"
	"github.com/moby/sys/signal"
	"github.com/pkg/errors"
	"github.com/sirupsen/logrus"
)

type errNoSuchProcess struct {
	pid    int
	signal syscall.Signal
}

func (e errNoSuchProcess) Error() string {
	return fmt.Sprintf("cannot kill process (pid=%d) with signal %d: no such process", e.pid, e.signal)
}

func (errNoSuchProcess) NotFound() {}

// ContainerKill sends signal to the container
// If no signal is given, then Kill with SIGKILL and wait
// for the container to exit.
// If a signal is given, then just send it to the container and return.
func (daemon *Daemon) ContainerKill(name, stopSignal string) error {
	var (
		err error
		sig = syscall.SIGKILL
	)
	if stopSignal != "" {
		sig, err = signal.ParseSignal(stopSignal)
		if err != nil {
			return errdefs.InvalidParameter(err)
		}
		if !signal.ValidSignalForPlatform(sig) {
			return errdefs.InvalidParameter(errors.Errorf("the %s daemon does not support signal %d", runtime.GOOS, sig))
		}
	}
	container, err := daemon.GetContainer(name)
	if err != nil {
		return err
	}
	if sig == syscall.SIGKILL {
		// perform regular Kill (SIGKILL + wait())
		return daemon.Kill(container)
	}
	return daemon.killWithSignal(container, sig)
}

// killWithSignal sends the container the given signal. This wrapper for the
// host specific kill command prepares the container before attempting
// to send the signal. An error is returned if the container is paused
// or not running, or if there is a problem returned from the
// underlying kill command.
func (daemon *Daemon) killWithSignal(container *containerpkg.Container, stopSignal syscall.Signal) error {
	logrus.Debugf("Sending kill signal %d to container %s", stopSignal, container.ID)
	container.Lock()
	defer container.Unlock()

	task, err := container.GetRunningTask()
	if err != nil {
		return err
	}

	var unpause bool
	if container.Config.StopSignal != "" && stopSignal != syscall.SIGKILL {
		containerStopSignal, err := signal.ParseSignal(container.Config.StopSignal)
		if err != nil {
			return err
		}
		if containerStopSignal == stopSignal {
			container.ExitOnNext()
			unpause = container.Paused
		}
	} else {
		container.ExitOnNext()
		unpause = container.Paused
	}

	if !daemon.IsShuttingDown() {
		container.HasBeenManuallyStopped = true
		container.CheckpointTo(daemon.containersReplica)
	}

	// if the container is currently restarting we do not need to send the signal
	// to the process. Telling the monitor that it should exit on its next event
	// loop is enough
	if container.Restarting {
		return nil
	}

	if err := task.Kill(context.Background(), stopSignal); err != nil {
		if errdefs.IsNotFound(err) {
			unpause = false
			logrus.WithError(err).WithField("container", container.ID).WithField("action", "kill").Debug("container kill failed because of 'container not found' or 'no such process'")
			go func() {
				// We need to clean up this container but it is possible there is a case where we hit here before the exit event is processed
				// but after it was fired off.
				// So let's wait the container's stop timeout amount of time to see if the event is eventually processed.
				// Doing this has the side effect that if no event was ever going to come we are waiting a a longer period of time uneccessarily.
				// But this prevents race conditions in processing the container.
				ctx, cancel := context.WithTimeout(context.TODO(), time.Duration(container.StopTimeout())*time.Second)
				defer cancel()
				s := <-container.Wait(ctx, containerpkg.WaitConditionNotRunning)
				if s.Err() != nil {
					daemon.handleContainerExit(container, nil)
				}
			}()
		} else {
			return errors.Wrapf(err, "Cannot kill container %s", container.ID)
		}
	}

	if unpause {
		// above kill signal will be sent once resume is finished
		if err := task.Resume(context.Background()); err != nil {
			logrus.Warnf("Cannot unpause container %s: %s", container.ID, err)
		}
	}

	daemon.LogContainerEventWithAttributes(container, "kill", map[string]string{
		"signal": strconv.Itoa(int(stopSignal)),
	})
	return nil
}

// Kill forcefully terminates a container.
func (daemon *Daemon) Kill(container *containerpkg.Container) error {
	if !container.IsRunning() {
		return errNotRunning(container.ID)
	}

	// 1. Send SIGKILL
	if err := daemon.killPossiblyDeadProcess(container, syscall.SIGKILL); err != nil {
		// kill failed, check if process is no longer running.
		if errors.As(err, &errNoSuchProcess{}) {
			return nil
		}
	}

	ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
	defer cancel()

	status := <-container.Wait(ctx, containerpkg.WaitConditionNotRunning)
	if status.Err() == nil {
		return nil
	}

	logrus.WithError(status.Err()).WithField("container", container.ID).Error("Container failed to exit within 10 seconds of kill - trying direct SIGKILL")

	if err := killProcessDirectly(container); err != nil {
		if errors.As(err, &errNoSuchProcess{}) {
			return nil
		}
		return err
	}

	// wait for container to exit one last time, if it doesn't then kill didnt work, so return error
	ctx2, cancel2 := context.WithTimeout(context.Background(), 2*time.Second)
	defer cancel2()

	if status := <-container.Wait(ctx2, containerpkg.WaitConditionNotRunning); status.Err() != nil {
		return errors.New("tried to kill container, but did not receive an exit event")
	}
	return nil
}

// killPossibleDeadProcess is a wrapper around killSig() suppressing "no such process" error.
func (daemon *Daemon) killPossiblyDeadProcess(container *containerpkg.Container, sig syscall.Signal) error {
	err := daemon.killWithSignal(container, sig)
	if errdefs.IsNotFound(err) {
		err = errNoSuchProcess{container.GetPID(), sig}
		logrus.Debug(err)
		return err
	}
	return err
}


text:
package de.silveryard.basesystem.gui.kernel;

import de.silveryard.basesystem.app.RunningApp;
import de.silveryard.basesystem.app.kernel.Kernel;
import de.silveryard.basesystem.app.kernel.ReturnCode;
import de.silveryard.basesystem.gui.GraphicsManager;
import de.silveryard.basesystem.gui.IMoveable;
import de.silveryard.basesystem.util.Action;
import de.silveryard.basesystem.util.Utils;
import de.silveryard.basesystem.util.Wrapper;
import de.silveryard.transport.Parameter;
import de.silveryard.transport.highlevelprotocols.qa.QAMessage;

/**
 * Created by Sebif on 19.03.2017.
 */
abstract class Moveable {
    public static void enableKernel(){
        Kernel.getInstance().registerSystemCall("de.silveryard.basesystem.systemcall.gui.moveable.getposition", Moveable::systemCallMoveableGetPosition);
        Kernel.getInstance().registerSystemCall("de.silveryard.basesystem.systemcall.gui.moveable.getpositionx", Moveable::systemCallMoveableGetPositionX);
        Kernel.getInstance().registerSystemCall("de.silveryard.basesystem.systemcall.gui.moveable.getpositiony", Moveable::systemCallMoveableGetPositionY);
        Kernel.getInstance().registerSystemCall("de.silveryard.basesystem.systemcall.gui.moveable.setposition", Moveable::systemCallMoveableSetPosition);
        Kernel.getInstance().registerSystemCall("de.silveryard.basesystem.systemcall.gui.moveable.setpositionx", Moveable::systemCallMoveableSetPositionX);
        Kernel.getInstance().registerSystemCall("de.silveryard.basesystem.systemcall.gui.moveable.setpositiony", Moveable::systemCallMoveableSetPositionY);
    }

    private static QAMessage systemCallMoveableGetPosition(RunningApp app, QAMessage message){
        final Wrapper<ReturnCode> returnCode = new Wrapper<>(ReturnCode.OK);
        final Wrapper<GuiReturnCode> guiReturnCode = new Wrapper<>(GuiReturnCode.OK);
        final Wrapper<Integer> positionX = new Wrapper<>(0);
        final Wrapper<Integer> positionY = new Wrapper<>(0);
        final Wrapper<Boolean> operationDone = new Wrapper<>();
        final int renderObjectID = message.getParameters().get(0).getInt();

        Object obj = app.getRegisteredObject(renderObjectID);
        IMoveable moveable = Utils.as(IMoveable.class, obj);

        if(obj == null){
            returnCode.value = ReturnCode.ERROR;
            guiReturnCode.value = GuiReturnCode.INVALID_ID;
            operationDone.value = true;
            return Kernel.getInstance().createResponse(message, returnCode.value.getValue(), guiReturnCode.value.getValue(),
                    Parameter.createInt(positionX.value), Parameter.createInt(positionY.value));
        }

        if(moveable == null){
            returnCode.value = ReturnCode.ERROR;
            guiReturnCode.value = GuiReturnCode.NOT_A_MOVEABLE;
            operationDone.value = true;
            return Kernel.getInstance().createResponse(message, returnCode.value.getValue(), guiReturnCode.value.getValue(),
                    Parameter.createInt(positionX.value), Parameter.createInt(positionY.value));
        }

        positionX.value = moveable.getPositionX();
        positionY.value = moveable.getPositionY();
        operationDone.value = true;

        return Kernel.getInstance().createResponse(message, returnCode.value.getValue(), guiReturnCode.value.getValue(),
                Parameter.createInt(positionX.value), Parameter.createInt(positionY.value));
    }
    private static QAMessage systemCallMoveableGetPositionX(RunningApp app, QAMessage message){
        final Wrapper<ReturnCode> returnCode = new Wrapper<>(ReturnCode.OK);
        final Wrapper<GuiReturnCode> guiReturnCode = new Wrapper<>(GuiReturnCode.OK);
        final Wrapper<Integer> result = new Wrapper<>();
        final int renderObjectID = message.getParameters().get(0).getInt();

        Object obj = app.getRegisteredObject(renderObjectID);
        IMoveable moveable = Utils.as(IMoveable.class, obj);

        if(obj == null){
            returnCode.value = ReturnCode.ERROR;
            guiReturnCode.value = GuiReturnCode.INVALID_ID;
            result.value = -1;
            return Kernel.getInstance().createResponse(message, returnCode.value.getValue(), guiReturnCode.value.getValue(),
                    Parameter.createInt(result.value));
        }

        if(moveable == null){
            returnCode.value = ReturnCode.ERROR;
            guiReturnCode.value = GuiReturnCode.NOT_A_MOVEABLE;
            result.value = -1;
            return Kernel.getInstance().createResponse(message, returnCode.value.getValue(), guiReturnCode.value.getValue(),
                    Parameter.createInt(result.value));
        }

        result.value = moveable.getPositionX();
        return Kernel.getInstance().createResponse(message, returnCode.value.getValue(), guiReturnCode.value.getValue(),
                Parameter.createInt(result.value));
    }
    private static QAMessage systemCallMoveableGetPositionY(RunningApp app, QAMessage message){
        final Wrapper<ReturnCode> returnCode = new Wrapper<>(ReturnCode.OK);
        final Wrapper<GuiReturnCode> guiReturnCode = new Wrapper<>(GuiReturnCode.OK);
        final Wrapper<Integer> result = new Wrapper<>();
        final int renderObjectID = message.getParameters().get(0).getInt();

        Object obj = app.getRegisteredObject(renderObjectID);
        IMoveable moveable = Utils.as(IMoveable.class, obj);

        if(obj == null){
            returnCode.value = ReturnCode.ERROR;
            guiReturnCode.value = GuiReturnCode.INVALID_ID;
            result.value = -1;
            return Kernel.getInstance().createResponse(message, returnCode.value.getValue(), guiReturnCode.value.getValue(),
                    Parameter.createInt(result.value));
        }

        if(moveable == null){
            returnCode.value = ReturnCode.ERROR;
            guiReturnCode.value = GuiReturnCode.NOT_A_MOVEABLE;
            result.value = -1;
            return Kernel.getInstance().createResponse(message, returnCode.value.getValue(), guiReturnCode.value.getValue(),
                    Parameter.createInt(result.value));
        }

        result.value = moveable.getPositionY();
        return Kernel.getInstance().createResponse(message, returnCode.value.getValue(), guiReturnCode.value.getValue(),
                Parameter.createInt(result.value));
    }

    private static QAMessage systemCallMoveableSetPosition(RunningApp app, QAMessage message){
        final Wrapper<ReturnCode> returnCode = new Wrapper<>(ReturnCode.OK);
        final Wrapper<GuiReturnCode> guiReturnCode = new Wrapper<>(GuiReturnCode.OK);
        final Wrapper<Boolean> operationDone = new Wrapper<>();
        final int renderObjectID = message.getParameters().get(0).getInt();
        final int positionX = message.getParameters().get(1).getInt();
        final int positionY = message.getParameters().get(2).getInt();

        final Object obj = app.getRegisteredObject(renderObjectID);
        final IMoveable moveable = Utils.as(IMoveable.class, obj);

        if(obj == null){
            returnCode.value = ReturnCode.ERROR;
            guiReturnCode.value = GuiReturnCode.INVALID_ID;
            operationDone.value = true;
            return Kernel.getInstance().createResponse(message, returnCode.value.getValue(), guiReturnCode.value.getValue());
        }
        if(moveable == null){
            returnCode.value = ReturnCode.ERROR;
            guiReturnCode.value = GuiReturnCode.NOT_A_MOVEABLE;
            operationDone.value = true;
            return Kernel.getInstance().createResponse(message, returnCode.value.getValue(), guiReturnCode.value.getValue());
        }

        GraphicsManager.getInstance().runNextFrame(new Action() {
            @Override
            public void invoke() {
                moveable.setPosition(positionX, positionY);
                operationDone.value = true;
            }
        });

        return Kernel.getInstance().createResponse(message, returnCode.value.getValue(), guiReturnCode.value.getValue());
    }
    private static QAMessage systemCallMoveableSetPositionX(RunningApp app, QAMessage message){
        final Wrapper<ReturnCode> returnCode = new Wrapper<>(ReturnCode.OK);
        final Wrapper<GuiReturnCode> guiReturnCode = new Wrapper<>(GuiReturnCode.OK);
        final Wrapper<Boolean> operationDone = new Wrapper<>();
        final int renderObjectID = message.getParameters().get(0).getInt();
        final int positionX = message.getParameters().get(1).getInt();

        Object obj = app.getRegisteredObject(renderObjectID);
        IMoveable moveable = Utils.as(IMoveable.class, obj);

        if(obj == null){
            returnCode.value = ReturnCode.ERROR;
            guiReturnCode.value = GuiReturnCode.INVALID_ID;
            operationDone.value = true;
            return Kernel.getInstance().createResponse(message, returnCode.value.getValue(), guiReturnCode.value.getValue());
        }

        if(moveable == null){
            returnCode.value = ReturnCode.ERROR;
            guiReturnCode.value = GuiReturnCode.NOT_A_MOVEABLE;
            operationDone.value = true;
            return Kernel.getInstance().createResponse(message, returnCode.value.getValue(), guiReturnCode.value.getValue());
        }

        GraphicsManager.getInstance().runNextFrame(new Action() {
            @Override
            public void invoke() {
                moveable.setPositionX(positionX);
                operationDone.value = true;
            }
        });

        return Kernel.getInstance().createResponse(message, returnCode.value.getValue(), guiReturnCode.value.getValue());
    }
    private static QAMessage systemCallMoveableSetPositionY(RunningApp app, QAMessage message){
        final Wrapper<ReturnCode> returnCode = new Wrapper<>(ReturnCode.OK);
        final Wrapper<GuiReturnCode> guiReturnCode = new Wrapper<>(GuiReturnCode.OK);
        final Wrapper<Boolean> operationDone = new Wrapper<>();
        final int renderObjectID = message.getParameters().get(0).getInt();
        final int positionY = message.getParameters().get(1).getInt();

        Object obj = app.getRegisteredObject(renderObjectID);
        IMoveable moveable = Utils.as(IMoveable.class, obj);

        if(obj == null){
            returnCode.value = ReturnCode.ERROR;
            guiReturnCode.value = GuiReturnCode.INVALID_ID;
            operationDone.value = true;
            return Kernel.getInstance().createResponse(message, returnCode.value.getValue(), guiReturnCode.value.getValue());
        }

        if(moveable == null){
            returnCode.value = ReturnCode.ERROR;
            guiReturnCode.value = GuiReturnCode.NOT_A_MOVEABLE;
            operationDone.value = true;
            return Kernel.getInstance().createResponse(message, returnCode.value.getValue(), guiReturnCode.value.getValue());
        }

        GraphicsManager.getInstance().runNextFrame(new Action() {
            @Override
            public void invoke() {
                moveable.setPositionY(positionY);
                operationDone.value = true;
            }
        });

        return Kernel.getInstance().createResponse(message, returnCode.value.getValue(), guiReturnCode.value.getValue());
    }
}

redpajama_set_name: RedPajamaGithub


text:
using System;
using org.apache.zookeeper;
using Org.Apache.CuratorNet.Client.Utils;
using Org.Apache.CuratorNet.Framework.API;
using Org.Apache.Java.Types;
using Org.Apache.Java.Types.Concurrent;

namespace Org.Apache.CuratorNet.Framework.Imps
{
    internal class Backgrounding
    {
        private readonly bool inBackgrnd;
        private readonly Object context;
        private readonly IBackgroundCallback callback;
        private readonly IUnhandledErrorListener errorListener;

        internal Backgrounding(Object context)
        {
            this.inBackgrnd = true;
            this.context = context;
            this.callback = null;
            errorListener = null;
        }

        internal Backgrounding(IBackgroundCallback callback)
        {
            this.inBackgrnd = true;
            this.context = null;
            this.callback = callback;
            errorListener = null;
        }

        internal Backgrounding(bool inBackground)
        {
            this.inBackgrnd = inBackground;
            this.context = null;
            this.callback = null;
            errorListener = null;
        }

        internal Backgrounding(IBackgroundCallback callback, Object context)
        {
            this.inBackgrnd = true;
            this.context = context;
            this.callback = callback;
            errorListener = null;
        }

        internal Backgrounding(CuratorFrameworkImpl client,
                                IBackgroundCallback callback,
                                Object context,
                                IExecutor executor)
            : this(wrapCallback(client, callback, executor), context) { }

        internal Backgrounding(CuratorFrameworkImpl client,
                                IBackgroundCallback callback,
                                IExecutor executor)
            : this(wrapCallback(client, callback, executor)) { }

        internal Backgrounding(Backgrounding rhs, IUnhandledErrorListener errorListener)
        {
            if (rhs == null)
            {
                rhs = new Backgrounding();
            }
            this.inBackgrnd = rhs.inBackgrnd;
            this.context = rhs.context;
            this.callback = rhs.callback;
            this.errorListener = errorListener;
        }

        internal Backgrounding()
        {
            inBackgrnd = false;
            context = null;
            this.callback = null;
            errorListener = null;
        }

        internal bool inBackground()
        {
            return inBackgrnd;
        }

        internal Object getContext()
        {
            return context;
        }

        internal IBackgroundCallback getCallback()
        {
            return callback;
        }

        internal void checkError(Exception e)
        {
            if ( e != null )
            {
                if (errorListener != null)
                {
                    errorListener.unhandledError("n/a", e);
                }
                else
                {
                    throw e;
                }
            }
        }

        private class BackgroundCallback : IBackgroundCallback
        {
            private readonly CuratorFrameworkImpl _client;
            private readonly IBackgroundCallback _callback;
            private readonly IExecutor _service;

            public BackgroundCallback(CuratorFrameworkImpl client,
                                        IBackgroundCallback callback,
                                        IExecutor service)
            {
                _client = client;
                _callback = callback;
                _service = service;
            }

            public void processResult(CuratorFramework client, ICuratorEvent @event)
            {
                _service.execute(RunnableUtils.FromFunc(() =>
                {
                    try
                    {
                        _callback.processResult(_client, @event);
                    }
                    catch ( Exception e )
                    {
                        ThreadUtils.checkInterrupted(e);
                        var keeperException = e as KeeperException;
                        if ( keeperException != null )
                        {
                            _client.validateConnection(_client.codeToState(keeperException));
                        }
                        _client.logError("Background operation result handling threw exception", e);
                    }
                }));
            }
        }

        private static IBackgroundCallback wrapCallback(CuratorFrameworkImpl client,
                                                        IBackgroundCallback callback,
                                                        IExecutor executor)
        {
            return new BackgroundCallback(client,callback, executor);
        }
    }
}


text:
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models

class Migration(migrations.Migration):

    dependencies = [
        ('zerver', '0043_realm_filter_validators'),
    ]

    operations = [
        migrations.CreateModel(
            name='Reaction',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('user_profile', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('message', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='zerver.Message')),
                ('emoji_name', models.TextField()),
            ],
            bases=(models.Model,),
        ),
        migrations.AlterUniqueTogether(
            name='reaction',
            unique_together=set([('user_profile', 'message', 'emoji_name')]),
        ),
    ]


text:
cask "freecad-pre" do
  version "0.19_pre,24212"
  sha256 "0c62d5bae4e3f57047ccc4069c1809542183274cd64223f99357247fc975493f"

  url "https://github.com/FreeCAD/FreeCAD/releases/download/#{version.before_comma}/FreeCAD_#{version.major_minor.delete_suffix("_pre")}-#{version.after_comma}-macOS-x86_64-conda.dmg",
      verified: "github.com/FreeCAD/FreeCAD/"
  appcast "https://github.com/freecad/freecad/releases.atom"
  name "FreeCAD"
  desc "3D parametric modeler"
  homepage "https://freecadweb.org/"

  conflicts_with cask: "freecad"
  depends_on macos: ">= :sierra"

  app "FreeCAD.app"
end


text:
$(function() {
	var latestactivity = new Vue({
		el: "#latestactivity",
		data: {
			activity: [],
			latest: 0,
			more: false,
			loading: false
		},
		created: function() {
			this.Load();
		},
		methods: {
			Load: function() {
				this.loading = true;
				var self = this;
				$.get("/api/activity/latest", {before: this.latest}, result => {
					if(result.fail)
						alert(result.message);
					else {
						this.activity = this.activity.concat(result.acts);
						this.latest = result.latest;
						this.more = result.more;
					}
					this.loading = false;
				}, "json");
			}
		}
	});

	var features = new Vue({
		el: "#features",
		data: {
			features: [
				{id: "bln", name: "blog", desc: "read the blog"},
				{id: "album", name: "photo album", desc: "see my photos"},
				{id: "guides", name: "guides", desc: "learn how i've done things"},
				{id: "lego", name: "lego models", desc: "download instructions for custom lego models"},
				{id: "art", name: "visual art", desc: "see sketches and digital artwork"},
				{id: "pen", name: "stories", desc: "read short fiction and a poem"},
				{id: "code", name: "software", desc: "download free software with source code"},
				{id: "forum", name: "forums", desc: "join or start conversations"}
			]
		}
	});
});


text:
namespace nall {
  template<unsigned bits> class uint_t {
  private:
    typedef typename type_if<bits <= 8 * sizeof(unsigned), unsigned, uintmax_t>::type type_t;
    type_t data;

  public:
    inline operator type_t() const { return data; }
    inline type_t operator ++(int) { type_t r = data; data = uclip<bits>(data + 1); return r; }
    inline type_t operator --(int) { type_t r = data; data = uclip<bits>(data - 1); return r; }
    inline type_t operator ++() { return data = uclip<bits>(data + 1); }
    inline type_t operator --() { return data = uclip<bits>(data - 1); }
    inline type_t operator  =(const type_t i) { return data = uclip<bits>(i); }
    inline type_t operator |=(const type_t i) { return data = uclip<bits>(data  | i); }
    inline type_t operator ^=(const type_t i) { return data = uclip<bits>(data  ^ i); }
    inline type_t operator &=(const type_t i) { return data = uclip<bits>(data  & i); }
    inline type_t operator<<=(const type_t i) { return data = uclip<bits>(data << i); }
    inline type_t operator>>=(const type_t i) { return data = uclip<bits>(data >> i); }
    inline type_t operator +=(const type_t i) { return data = uclip<bits>(data  + i); }
    inline type_t operator -=(const type_t i) { return data = uclip<bits>(data  - i); }
    inline type_t operator *=(const type_t i) { return data = uclip<bits>(data  * i); }
    inline type_t operator /=(const type_t i) { return data = uclip<bits>(data  / i); }
    inline type_t operator %=(const type_t i) { return data = uclip<bits>(data  % i); }

    inline uint_t() : data(0) {}
    inline uint_t(const type_t i) : data(uclip<bits>(i)) {}

    template<unsigned s> inline type_t operator=(const uint_t<s> &i) { return data = uclip<bits>((type_t)i); }
    template<unsigned s> inline uint_t(const uint_t<s> &i) : data(uclip<bits>(i)) {}
  };

  template<unsigned bits> class int_t {
  private:
    typedef typename type_if<bits <= 8 * sizeof(signed), signed, intmax_t>::type type_t;
    type_t data;

  public:
    inline operator type_t() const { return data; }
    inline type_t operator ++(int) { type_t r = data; data = sclip<bits>(data + 1); return r; }
    inline type_t operator --(int) { type_t r = data; data = sclip<bits>(data - 1); return r; }
    inline type_t operator ++() { return data = sclip<bits>(data + 1); }
    inline type_t operator --() { return data = sclip<bits>(data - 1); }
    inline type_t operator  =(const type_t i) { return data = sclip<bits>(i); }
    inline type_t operator |=(const type_t i) { return data = sclip<bits>(data  | i); }
    inline type_t operator ^=(const type_t i) { return data = sclip<bits>(data  ^ i); }
    inline type_t operator &=(const type_t i) { return data = sclip<bits>(data  & i); }
    inline type_t operator<<=(const type_t i) { return data = sclip<bits>(data << i); }
    inline type_t operator>>=(const type_t i) { return data = sclip<bits>(data >> i); }
    inline type_t operator +=(const type_t i) { return data = sclip<bits>(data  + i); }
    inline type_t operator -=(const type_t i) { return data = sclip<bits>(data  - i); }
    inline type_t operator *=(const type_t i) { return data = sclip<bits>(data  * i); }
    inline type_t operator /=(const type_t i) { return data = sclip<bits>(data  / i); }
    inline type_t operator %=(const type_t i) { return data = sclip<bits>(data  % i); }

    inline int_t() : data(0) {}
    inline int_t(const type_t i) : data(sclip<bits>(i)) {}

    template<unsigned s> inline type_t operator=(const int_t<s> &i) { return data = sclip<bits>((type_t)i); }
    template<unsigned s> inline int_t(const int_t<s> &i) : data(sclip<bits>(i)) {}
  };

  class varuint_t {
  private:
    unsigned data;
    unsigned mask;

  public:
    inline operator unsigned() const { return data; }
    inline unsigned operator ++(int) { unsigned r = data; data = (data + 1) & mask; return r; }
    inline unsigned operator --(int) { unsigned r = data; data = (data - 1) & mask; return r; }
    inline unsigned operator ++() { return data = (data + 1) & mask; }
    inline unsigned operator --() { return data = (data - 1) & mask; }
    inline unsigned operator  =(const unsigned i) { return data = (i) & mask; }
    inline unsigned operator |=(const unsigned i) { return data = (data  | i) & mask; }
    inline unsigned operator ^=(const unsigned i) { return data = (data  ^ i) & mask; }
    inline unsigned operator &=(const unsigned i) { return data = (data  & i) & mask; }
    inline unsigned operator<<=(const unsigned i) { return data = (data << i) & mask; }
    inline unsigned operator>>=(const unsigned i) { return data = (data >> i) & mask; }
    inline unsigned operator +=(const unsigned i) { return data = (data  + i) & mask; }
    inline unsigned operator -=(const unsigned i) { return data = (data  - i) & mask; }
    inline unsigned operator *=(const unsigned i) { return data = (data  * i) & mask; }
    inline unsigned operator /=(const unsigned i) { return data = (data  / i) & mask; }
    inline unsigned operator %=(const unsigned i) { return data = (data  % i) & mask; }

    inline void bits(unsigned bits) { mask = (1U << (bits - 1)) + ((1U << (bits - 1)) - 1); data &= mask; }
    inline varuint_t() : data(0), mask(~0U) {}
    inline varuint_t(const unsigned i) : data(i), mask(~0U) {}
  };

  class varuintmax_t {
  private:
    uintmax_t data;
    uintmax_t mask;

  public:
    inline operator uintmax_t() const { return data; }
    inline uintmax_t operator ++(int) { uintmax_t r = data; data = (data + 1) & mask; return r; }
    inline uintmax_t operator --(int) { uintmax_t r = data; data = (data - 1) & mask; return r; }
    inline uintmax_t operator ++() { return data = (data + 1) & mask; }
    inline uintmax_t operator --() { return data = (data - 1) & mask; }
    inline uintmax_t operator  =(const uintmax_t i) { return data = (i) & mask; }
    inline uintmax_t operator |=(const uintmax_t i) { return data = (data  | i) & mask; }
    inline uintmax_t operator ^=(const uintmax_t i) { return data = (data  ^ i) & mask; }
    inline uintmax_t operator &=(const uintmax_t i) { return data = (data  & i) & mask; }
    inline uintmax_t operator<<=(const uintmax_t i) { return data = (data << i) & mask; }
    inline uintmax_t operator>>=(const uintmax_t i) { return data = (data >> i) & mask; }
    inline uintmax_t operator +=(const uintmax_t i) { return data = (data  + i) & mask; }
    inline uintmax_t operator -=(const uintmax_t i) { return data = (data  - i) & mask; }
    inline uintmax_t operator *=(const uintmax_t i) { return data = (data  * i) & mask; }
    inline uintmax_t operator /=(const uintmax_t i) { return data = (data  / i) & mask; }
    inline uintmax_t operator %=(const uintmax_t i) { return data = (data  % i) & mask; }

    inline void bits(unsigned bits) { mask = (1ULL << (bits - 1)) + ((1ULL << (bits - 1)) - 1); data &= mask; }
    inline varuintmax_t() : data(0), mask(~0ULL) {}
    inline varuintmax_t(const uintmax_t i) : data(i), mask(~0ULL) {}
  };
}

//typedefs
  typedef nall::uint_t< 1> uint1_t;
  typedef nall::uint_t< 2> uint2_t;
  typedef nall::uint_t< 3> uint3_t;
  typedef nall::uint_t< 4> uint4_t;
  typedef nall::uint_t< 5> uint5_t;
  typedef nall::uint_t< 6> uint6_t;
  typedef nall::uint_t< 7> uint7_t;
//typedef nall::uint_t< 8> uint8_t;
  typedef nall::uint_t< 9> uint9_t;
  typedef nall::uint_t<10> uint10_t;
  typedef nall::uint_t<11> uint11_t;
  typedef nall::uint_t<12> uint12_t;
  typedef nall::uint_t<13> uint13_t;
  typedef nall::uint_t<14> uint14_t;
  typedef nall::uint_t<15> uint15_t;
//typedef nall::uint_t<16> uint16_t;
  typedef nall::uint_t<17> uint17_t;
  typedef nall::uint_t<18> uint18_t;
  typedef nall::uint_t<19> uint19_t;
  typedef nall::uint_t<20> uint20_t;
  typedef nall::uint_t<21> uint21_t;
  typedef nall::uint_t<22> uint22_t;
  typedef nall::uint_t<23> uint23_t;
  typedef nall::uint_t<24> uint24_t;
  typedef nall::uint_t<25> uint25_t;
  typedef nall::uint_t<26> uint26_t;
  typedef nall::uint_t<27> uint27_t;
  typedef nall::uint_t<28> uint28_t;
  typedef nall::uint_t<29> uint29_t;
  typedef nall::uint_t<30> uint30_t;
  typedef nall::uint_t<31> uint31_t;
//typedef nall::uint_t<32> uint32_t;

  typedef nall::int_t< 1> int1_t;
  typedef nall::int_t< 2> int2_t;
  typedef nall::int_t< 3> int3_t;
  typedef nall::int_t< 4> int4_t;
  typedef nall::int_t< 5> int5_t;
  typedef nall::int_t< 6> int6_t;
  typedef nall::int_t< 7> int7_t;
//typedef nall::int_t< 8> int8_t;
  typedef nall::int_t< 9> int9_t;
  typedef nall::int_t<10> int10_t;
  typedef nall::int_t<11> int11_t;
  typedef nall::int_t<12> int12_t;
  typedef nall::int_t<13> int13_t;
  typedef nall::int_t<14> int14_t;
  typedef nall::int_t<15> int15_t;
//typedef nall::int_t<16> int16_t;
  typedef nall::int_t<17> int17_t;
  typedef nall::int_t<18> int18_t;
  typedef nall::int_t<19> int19_t;
  typedef nall::int_t<20> int20_t;
  typedef nall::int_t<21> int21_t;
  typedef nall::int_t<22> int22_t;
  typedef nall::int_t<23> int23_t;
  typedef nall::int_t<24> int24_t;
  typedef nall::int_t<25> int25_t;
  typedef nall::int_t<26> int26_t;
  typedef nall::int_t<27> int27_t;
  typedef nall::int_t<28> int28_t;
  typedef nall::int_t<29> int29_t;
  typedef nall::int_t<30> int30_t;
  typedef nall::int_t<31> int31_t;
//typedef nall::int_t<32> int32_t;

#endif


text:
using BepuPhysics.Collidables;
using BepuUtilities;
using BepuUtilities.Memory;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Numerics;
using System.Runtime.CompilerServices;
using System.Text;

namespace BepuPhysics.CollisionDetection.CollisionTasks
{
    public struct MeshPairOverlapFinder<TMeshA, TMeshB> : ICompoundPairOverlapFinder
        where TMeshA : struct, IHomogeneousCompoundShape<Triangle, TriangleWide>
        where TMeshB : struct, IHomogeneousCompoundShape<Triangle, TriangleWide>
    {

        public unsafe void FindLocalOverlaps(ref Buffer<BoundsTestedPair> pairs, int pairCount, BufferPool pool, Shapes shapes, float dt, out CompoundPairOverlaps overlaps)
        {
            var totalCompoundChildCount = 0;
            for (int i = 0; i < pairCount; ++i)
            {
                totalCompoundChildCount += Unsafe.AsRef<TMeshA>(pairs[i].A).ChildCount;
            }
            overlaps = new CompoundPairOverlaps(pool, pairCount, totalCompoundChildCount);
            ref var pairsToTest = ref overlaps.pairQueries;
            int nextSubpairIndex = 0;
            for (int i = 0; i < pairCount; ++i)
            {
                ref var pair = ref pairs[i];
                ref var meshA = ref Unsafe.AsRef<TMeshA>(pair.A);
                overlaps.CreatePairOverlaps(meshA.ChildCount);
                for (int j = 0; j < meshA.ChildCount; ++j)
                {
                    var subpairIndex = nextSubpairIndex++;
                    overlaps.GetOverlapsForPair(subpairIndex).ChildIndex = j;
                    pairsToTest[subpairIndex].Container = pair.B;
                }
            }

            Unsafe.SkipInit(out TriangleWide triangles);
            nextSubpairIndex = 0;
            for (int i = 0; i < pairCount; ++i)
            {
                ref var pair = ref pairs[i];
                Vector3Wide.Broadcast(pair.OffsetB, out var offsetB);
                QuaternionWide.Broadcast(pair.OrientationA, out var orientationA);
                QuaternionWide.Broadcast(pair.OrientationB, out var orientationB);
                Vector3Wide.Broadcast(pair.RelativeLinearVelocityA, out var relativeLinearVelocityA);
                Vector3Wide.Broadcast(pair.AngularVelocityA, out var angularVelocityA);
                Vector3Wide.Broadcast(pair.AngularVelocityB, out var angularVelocityB);
                var maximumAllowedExpansion = new Vector<float>(pair.MaximumExpansion);

                QuaternionWide.Conjugate(orientationB, out var toLocalB);
                QuaternionWide.ConcatenateWithoutOverlap(orientationA, toLocalB, out var localOrientationA);
                QuaternionWide.TransformWithoutOverlap(offsetB, toLocalB, out var localOffsetB);
                Vector3Wide.Negate(localOffsetB, out var localOffsetA);

                ref var meshA = ref Unsafe.AsRef<TMeshA>(pair.A);
                for (int j = 0; j < meshA.ChildCount; j += Vector<float>.Count)
                {
                    var count = meshA.ChildCount - j;
                    if (count > Vector<float>.Count)
                        count = Vector<float>.Count;
                    for (int innerIndex = 0; innerIndex < count; ++innerIndex)
                    {
                        meshA.GetLocalChild(j + innerIndex, ref GatherScatter.GetOffsetInstance(ref triangles, innerIndex));
                    }
                    triangles.GetBounds(ref localOrientationA, count, out var maximumRadius, out var maximumAngularExpansion, out var min, out var max);

                    QuaternionWide.TransformWithoutOverlap(relativeLinearVelocityA, toLocalB, out var localRelativeLinearVelocityA);
                    Vector3Wide.Length(localOffsetA, out var radiusA);
                    BoundingBoxHelpers.ExpandLocalBoundingBoxes(ref min, ref max, radiusA, localOffsetA, localRelativeLinearVelocityA, angularVelocityA, angularVelocityB, dt,
                        maximumRadius, maximumAngularExpansion, maximumAllowedExpansion);

                    for (int innerIndex = 0; innerIndex < count; ++innerIndex)
                    {
                        ref var pairToTest = ref pairsToTest[nextSubpairIndex++];
                        Vector3Wide.ReadSlot(ref min, innerIndex, out pairToTest.Min);
                        Vector3Wide.ReadSlot(ref max, innerIndex, out pairToTest.Max);
                    }
                }
            }

            //Doesn't matter what mesh/compound instance is used for the function; just using it as a source of the function.
            Debug.Assert(totalCompoundChildCount > 0);
            Unsafe.AsRef<TMeshB>(pairsToTest[0].Container).FindLocalOverlaps<CompoundPairOverlaps, ChildOverlapsCollection>(ref pairsToTest, pool, shapes, ref overlaps);

        }

    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright (C) 2013 SlimRoms (blk_jack)
     Copyright (C) 2015 The Fusion Project

     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.
-->

<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
        android:title="@string/theme_pb_settings_title">

    <SwitchPreference
        android:key="pref_theme_mode"
        android:title="@string/theme_settings_switch_title" />

    <SwitchPreference
        android:key="pref_override_custom_colors"
        android:title="@string/theme_override_custom_colors_title"
        android:summary="@string/theme_override_custom_colors_summary" />

    <ListPreference
        android:key="pref_theme_auto_mode"
        android:entries="@array/theme_auto_mode_entries"
        android:entryValues="@array/theme_auto_mode_values"
        android:title="@string/theme_auto_mode_title"
        android:dialogTitle="@string/theme_auto_mode_title" />

</PreferenceScreen>


text:
<?php

namespace Ivory\CKEditorBundle\Model;

/**
 * Ivory CKEditor configuration manager.
 *
 * @author GeLo <geloen.eric@gmail.com>
 */
interface ConfigManagerInterface
{
    /**
     * Gets the default configuration name.
     *
     * @return string The default configuration name.
     */
    public function getDefaultConfig();

    /**
     * Sets the default configuration name.
     *
     * @param string $defaultConfig The default configuration name.
     *
     * @return null No return value.
     */
    public function setDefaultConfig($defaultConfig);

    /**
     * Checks if the CKEditor configs exists.
     *
     * @return boolean TRUE if the CKEditor configs exists else FALSE.
     */
    public function hasConfigs();

    /**
     * Gets the CKEditor configs.
     *
     * @return array The CKEditor configs.
     */
    public function getConfigs();

    /**
     * Sets the CKEditor configs.
     *
     * @param array $configs The CKEditor configs.
     *
     * @return null No return value.
     */
    public function setConfigs(array $configs);

    /**
     * Checks if a specific CKEditor config exists.
     *
     * @param string $name The CKEditor config name.
     *
     * @return boolean TRUE if the CKEditor config exists else FALSE.
     */
    public function hasConfig($name);

    /**
     * Gets a specific CKEditor config.
     *
     * @param string $name The CKEditor config name.
     *
     * @return array The CKEditor config.
     */
    public function getConfig($name);

    /**
     * Sets a CKEditor config.
     *
     * @param string $name   The CKEditor config name.
     * @param array  $config The CKEditor config.
     *
     * @return null No return value.
     */
    public function setConfig($name, array $config);

    /**
     * Merges a CKEditor config.
     *
     * @param string $name   The CKEditor config name.
     * @param array  $config The CKEditor config.
     *
     * @return null No return value.
     */
    public function mergeConfig($name, array $config);
}


text:
.class public Lcom/samsung/android/settings/iris/IrisUiHelper;
.super Lcom/samsung/android/camera/iris/SemIrisManager$AuthenticationCallback;
.source "IrisUiHelper.java"

# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/samsung/android/settings/iris/IrisUiHelper$1;,
        Lcom/samsung/android/settings/iris/IrisUiHelper$Callback;
    }
.end annotation

# instance fields
.field private mCallback:Lcom/samsung/android/settings/iris/IrisUiHelper$Callback;

.field private mCancellationSignal:Landroid/os/CancellationSignal;

.field private mContext:Landroid/content/Context;

.field mIrisFailedCount:I

.field private mIrisManager:Lcom/samsung/android/camera/iris/SemIrisManager;

.field private mIrisMessage:Landroid/widget/TextView;

.field private mIrisPreviewLayout:Landroid/widget/LinearLayout;

.field private mResetErrorTextRunnable:Ljava/lang/Runnable;

.field private mUserId:I

# direct methods
.method static synthetic -get0(Lcom/samsung/android/settings/iris/IrisUiHelper;)Landroid/content/Context;
    .locals 1

    iget-object v0, p0, Lcom/samsung/android/settings/iris/IrisUiHelper;->mContext:Landroid/content/Context;

    return-object v0
.end method

.method static synthetic -get1(Lcom/samsung/android/settings/iris/IrisUiHelper;)Landroid/widget/TextView;
    .locals 1

    iget-object v0, p0, Lcom/samsung/android/settings/iris/IrisUiHelper;->mIrisMessage:Landroid/widget/TextView;

    return-object v0
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/widget/LinearLayout;Landroid/widget/TextView;Lcom/samsung/android/settings/iris/IrisUiHelper$Callback;I)V
    .locals 1

    invoke-direct {p0}, Lcom/samsung/android/camera/iris/SemIrisManager$AuthenticationCallback;-><init>()V

    new-instance v0, Lcom/samsung/android/settings/iris/IrisUiHelper$1;

    invoke-direct {v0, p0}, Lcom/samsung/android/settings/iris/IrisUiHelper$1;-><init>(Lcom/samsung/android/settings/iris/IrisUiHelper;)V

    iput-object v0, p0, Lcom/samsung/android/settings/iris/IrisUiHelper;->mResetErrorTextRunnable:Ljava/lang/Runnable;

    iput-object p1, p0, Lcom/samsung/android/settings/iris/IrisUiHelper;->mContext:Landroid/content/Context;

    iget-object v0, p0, Lcom/samsung/android/settings/iris/IrisUiHelper;->mContext:Landroid/content/Context;

    invoke-static {v0}, Lcom/samsung/android/camera/iris/SemIrisManager;->getSemIrisManager(Landroid/content/Context;)Lcom/samsung/android/camera/iris/SemIrisManager;

    move-result-object v0

    iput-object v0, p0, Lcom/samsung/android/settings/iris/IrisUiHelper;->mIrisManager:Lcom/samsung/android/camera/iris/SemIrisManager;

    iput-object p2, p0, Lcom/samsung/android/settings/iris/IrisUiHelper;->mIrisPreviewLayout:Landroid/widget/LinearLayout;

    iput-object p3, p0, Lcom/samsung/android/settings/iris/IrisUiHelper;->mIrisMessage:Landroid/widget/TextView;

    iput-object p4, p0, Lcom/samsung/android/settings/iris/IrisUiHelper;->mCallback:Lcom/samsung/android/settings/iris/IrisUiHelper$Callback;

    iput p5, p0, Lcom/samsung/android/settings/iris/IrisUiHelper;->mUserId:I

    return-void
.end method

.method private setIrisPreviewMessage()V
    .locals 4

    invoke-virtual {p0}, Lcom/samsung/android/settings/iris/IrisUiHelper;->isListening()Z

    move-result v0

    if-nez v0, :cond_0

    return-void

    :cond_0
    iget-object v0, p0, Lcom/samsung/android/settings/iris/IrisUiHelper;->mIrisMessage:Landroid/widget/TextView;

    iget-object v1, p0, Lcom/samsung/android/settings/iris/IrisUiHelper;->mResetErrorTextRunnable:Ljava/lang/Runnable;

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->removeCallbacks(Ljava/lang/Runnable;)Z

    iget-object v0, p0, Lcom/samsung/android/settings/iris/IrisUiHelper;->mIrisMessage:Landroid/widget/TextView;

    iget-object v1, p0, Lcom/samsung/android/settings/iris/IrisUiHelper;->mResetErrorTextRunnable:Ljava/lang/Runnable;

    const-wide/16 v2, 0x7d0

    invoke-virtual {v0, v1, v2, v3}, Landroid/widget/TextView;->postDelayed(Ljava/lang/Runnable;J)Z

    return-void
.end method

# virtual methods
.method public irisConfirmCredentialFailedCount(Landroid/content/Context;)I
    .locals 3

    invoke-virtual {p1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    const-string/jumbo v1, "iris_confirm_credential_fail_count"

    const/4 v2, 0x0

    invoke-static {v0, v1, v2}, Landroid/provider/Settings$Secure;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

    move-result v0

    return v0
.end method

.method public isListening()Z
    .locals 1

    iget-object v0, p0, Lcom/samsung/android/settings/iris/IrisUiHelper;->mCancellationSignal:Landroid/os/CancellationSignal;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/samsung/android/settings/iris/IrisUiHelper;->mCancellationSignal:Landroid/os/CancellationSignal;

    invoke-virtual {v0}, Landroid/os/CancellationSignal;->isCanceled()Z

    move-result v0

    xor-int/lit8 v0, v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public onAuthenticationError(ILjava/lang/CharSequence;)V
    .locals 3

    const-string/jumbo v0, "IrisUiHelper"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string/jumbo v2, "onAuthenticationError : "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-interface {p2}, Ljava/lang/CharSequence;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    iget-object v0, p0, Lcom/samsung/android/settings/iris/IrisUiHelper;->mIrisMessage:Landroid/widget/TextView;

    invoke-virtual {v0, p2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    invoke-direct {p0}, Lcom/samsung/android/settings/iris/IrisUiHelper;->setIrisPreviewMessage()V

    return-void
.end method

.method public onAuthenticationFailed()V
    .locals 2

    const-string/jumbo v0, "IrisUiHelper"

    const-string/jumbo v1, "onAuthenticationFailed"

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    iget-object v0, p0, Lcom/samsung/android/settings/iris/IrisUiHelper;->mContext:Landroid/content/Context;

    invoke-virtual {p0, v0}, Lcom/samsung/android/settings/iris/IrisUiHelper;->reportFailedIrisAttempts(Landroid/content/Context;)V

    iget-object v0, p0, Lcom/samsung/android/settings/iris/IrisUiHelper;->mIrisMessage:Landroid/widget/TextView;

    const v1, 0x7f120e2f

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(I)V

    iget-object v0, p0, Lcom/samsung/android/settings/iris/IrisUiHelper;->mContext:Landroid/content/Context;

    invoke-virtual {p0, v0}, Lcom/samsung/android/settings/iris/IrisUiHelper;->irisConfirmCredentialFailedCount(Landroid/content/Context;)I

    move-result v0

    const/4 v1, 0x5

    if-lt v0, v1, :cond_0

    iget-object v0, p0, Lcom/samsung/android/settings/iris/IrisUiHelper;->mCallback:Lcom/samsung/android/settings/iris/IrisUiHelper$Callback;

    const/4 v1, 0x0

    invoke-interface {v0, v1}, Lcom/samsung/android/settings/iris/IrisUiHelper$Callback;->onIrisVisibilityChanged(Z)V

    :cond_0
    invoke-direct {p0}, Lcom/samsung/android/settings/iris/IrisUiHelper;->setIrisPreviewMessage()V

    return-void
.end method

.method public onAuthenticationHelp(ILjava/lang/CharSequence;)V
    .locals 3

    const-string/jumbo v0, "IrisUiHelper"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string/jumbo v2, "onAuthenticationHelp : "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-interface {p2}, Ljava/lang/CharSequence;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    iget-object v0, p0, Lcom/samsung/android/settings/iris/IrisUiHelper;->mIrisMessage:Landroid/widget/TextView;

    invoke-virtual {v0, p2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    return-void
.end method

.method public onAuthenticationSucceeded(Lcom/samsung/android/camera/iris/SemIrisManager$AuthenticationResult;)V
    .locals 2

    const-string/jumbo v0, "IrisUiHelper"

    const-string/jumbo v1, "onAuthenticationSucceeded"

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    iget-object v0, p0, Lcom/samsung/android/settings/iris/IrisUiHelper;->mCallback:Lcom/samsung/android/settings/iris/IrisUiHelper$Callback;

    invoke-interface {v0}, Lcom/samsung/android/settings/iris/IrisUiHelper$Callback;->onAuthenticated()V

    return-void
.end method

.method public reportFailedIrisAttempts(Landroid/content/Context;)V
    .locals 3

    invoke-virtual {p0, p1}, Lcom/samsung/android/settings/iris/IrisUiHelper;->irisConfirmCredentialFailedCount(Landroid/content/Context;)I

    move-result v0

    iput v0, p0, Lcom/samsung/android/settings/iris/IrisUiHelper;->mIrisFailedCount:I

    iget v0, p0, Lcom/samsung/android/settings/iris/IrisUiHelper;->mIrisFailedCount:I

    add-int/lit8 v0, v0, 0x1

    iput v0, p0, Lcom/samsung/android/settings/iris/IrisUiHelper;->mIrisFailedCount:I

    invoke-virtual {p1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    const-string/jumbo v1, "iris_confirm_credential_fail_count"

    iget v2, p0, Lcom/samsung/android/settings/iris/IrisUiHelper;->mIrisFailedCount:I

    invoke-static {v0, v1, v2}, Landroid/provider/Settings$Secure;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z

    return-void
.end method

.method public startListening()V
    .locals 7

    const/4 v3, 0x0

    const/4 v1, 0x0

    iget-object v0, p0, Lcom/samsung/android/settings/iris/IrisUiHelper;->mIrisManager:Lcom/samsung/android/camera/iris/SemIrisManager;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/samsung/android/settings/iris/IrisUiHelper;->mIrisManager:Lcom/samsung/android/camera/iris/SemIrisManager;

    invoke-virtual {v0}, Lcom/samsung/android/camera/iris/SemIrisManager;->isHardwareDetected()Z

    move-result v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/samsung/android/settings/iris/IrisUiHelper;->mIrisManager:Lcom/samsung/android/camera/iris/SemIrisManager;

    invoke-virtual {v0}, Lcom/samsung/android/camera/iris/SemIrisManager;->hasEnrolledIrises()Z

    move-result v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/samsung/android/settings/iris/IrisUiHelper;->mContext:Landroid/content/Context;

    invoke-virtual {p0, v0}, Lcom/samsung/android/settings/iris/IrisUiHelper;->irisConfirmCredentialFailedCount(Landroid/content/Context;)I

    move-result v0

    const/4 v2, 0x5

    if-lt v0, v2, :cond_1

    iget-object v0, p0, Lcom/samsung/android/settings/iris/IrisUiHelper;->mIrisPreviewLayout:Landroid/widget/LinearLayout;

    invoke-virtual {v0, v3}, Landroid/widget/LinearLayout;->setVisibility(I)V

    iget-object v0, p0, Lcom/samsung/android/settings/iris/IrisUiHelper;->mIrisMessage:Landroid/widget/TextView;

    const v1, 0x7f120e21

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(I)V

    :cond_0
    :goto_0
    return-void

    :cond_1
    new-instance v0, Landroid/os/CancellationSignal;

    invoke-direct {v0}, Landroid/os/CancellationSignal;-><init>()V

    iput-object v0, p0, Lcom/samsung/android/settings/iris/IrisUiHelper;->mCancellationSignal:Landroid/os/CancellationSignal;

    iget-object v0, p0, Lcom/samsung/android/settings/iris/IrisUiHelper;->mIrisManager:Lcom/samsung/android/camera/iris/SemIrisManager;

    if-eqz v0, :cond_2

    iget-object v0, p0, Lcom/samsung/android/settings/iris/IrisUiHelper;->mIrisManager:Lcom/samsung/android/camera/iris/SemIrisManager;

    iget-object v2, p0, Lcom/samsung/android/settings/iris/IrisUiHelper;->mCancellationSignal:Landroid/os/CancellationSignal;

    move-object v4, p0

    move-object v5, v1

    move-object v6, v1

    invoke-virtual/range {v0 .. v6}, Lcom/samsung/android/camera/iris/SemIrisManager;->authenticate(Lcom/samsung/android/camera/iris/SemIrisManager$CryptoObject;Landroid/os/CancellationSignal;ILcom/samsung/android/camera/iris/SemIrisManager$AuthenticationCallback;Landroid/os/Handler;Landroid/view/View;)V

    :cond_2
    iget-object v0, p0, Lcom/samsung/android/settings/iris/IrisUiHelper;->mIrisPreviewLayout:Landroid/widget/LinearLayout;

    invoke-virtual {v0, v3}, Landroid/widget/LinearLayout;->setVisibility(I)V

    iget-object v0, p0, Lcom/samsung/android/settings/iris/IrisUiHelper;->mIrisMessage:Landroid/widget/TextView;

    const v1, 0x7f120e2c

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(I)V

    iget-object v0, p0, Lcom/samsung/android/settings/iris/IrisUiHelper;->mCallback:Lcom/samsung/android/settings/iris/IrisUiHelper$Callback;

    const/4 v1, 0x1

    invoke-interface {v0, v1}, Lcom/samsung/android/settings/iris/IrisUiHelper$Callback;->onIrisVisibilityChanged(Z)V

    goto :goto_0
.end method

.method public stopListening()V
    .locals 2

    const/4 v1, 0x0

    iget-object v0, p0, Lcom/samsung/android/settings/iris/IrisUiHelper;->mCancellationSignal:Landroid/os/CancellationSignal;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/samsung/android/settings/iris/IrisUiHelper;->mCancellationSignal:Landroid/os/CancellationSignal;

    invoke-virtual {v0}, Landroid/os/CancellationSignal;->cancel()V

    iput-object v1, p0, Lcom/samsung/android/settings/iris/IrisUiHelper;->mCancellationSignal:Landroid/os/CancellationSignal;

    :cond_0
    iget-object v0, p0, Lcom/samsung/android/settings/iris/IrisUiHelper;->mContext:Landroid/content/Context;

    invoke-virtual {p0, v0}, Lcom/samsung/android/settings/iris/IrisUiHelper;->irisConfirmCredentialFailedCount(Landroid/content/Context;)I

    move-result v0

    const/4 v1, 0x5

    if-ge v0, v1, :cond_1

    iget-object v0, p0, Lcom/samsung/android/settings/iris/IrisUiHelper;->mIrisMessage:Landroid/widget/TextView;

    const v1, 0x7f120e2b

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(I)V

    :cond_1
    return-void
.end method


text:
namespace GafferArnold
{

class GAFFERARNOLD_API ArnoldOptions : public GafferScene::Options
{

	public :

		ArnoldOptions( const std::string &name=defaultName<ArnoldOptions>() );
		~ArnoldOptions() override;

		IE_CORE_DECLARERUNTIMETYPEDEXTENSION( GafferArnold::ArnoldOptions, ArnoldOptionsTypeId, GafferScene::Options );

};

IE_CORE_DECLAREPTR( ArnoldOptions );

} // namespace GafferArnold

#endif // GAFFERARNOLD_ARNOLDOPTIONS_H


text:
package com.jerry.qrcode.data;

public enum ECLevel {
	L("7%"), M("15%"), Q("25%"), H("30%");
	String recoveryRate;
	private ECLevel(String recoveryRate) {
		this.recoveryRate = recoveryRate;
	}
	public String toString() {
		return "This Level of Error Correction Allowing recovery of " + recoveryRate;
	}

}


text:
var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}var
Path=function(){
function Path(path){var _this=this;_classCallCheck(this,Path);
[
'push',
'reset',
'move',
'moveTo',
'line',
'lineTo',
'curve',
'curveTo',
'arc',
'arcTo',
'counterArc',
'counterArcTo',
'close'].
forEach(function(methodName){_this[methodName]=function(){return _this;};});

this.path=path||[];
}_createClass(Path,[{key:'toJSON',value:function(){function toJSON()

{
return JSON.stringify(this.path);
}return toJSON;}()}]);return Path;}();

module.exports=Path;


text:
<?php
namespace Flubber;

$FLSession;

class Session {

    const SESSION_STARTED = TRUE;
    const SESSION_NOT_STARTED = FALSE;

    private $sessionState = self::SESSION_NOT_STARTED;

    private $id = null;

    private function __construct() {}

    public function init(){
        global $FLSession;
        if ( !isset($FLSession)) {
            $FLSession = new self;
        }
        $FLSession->start();
    }

    public function start() {
        session_name(SESSION_NAME);
        ini_set('session.gc_maxlifetime', SESSION_EXPIRY);
        session_set_cookie_params(SESSION_EXPIRY, // expire in 24 hours
                    '/',                          // path
                    '.'.SITEURL,                  // domain
                    false,                        // "secure only"
                    true);                        // only over http

        if ( $this->sessionState == self::SESSION_NOT_STARTED ) {
            $this->sessionState = session_start(array(
                                    'cookie_lifetime' => SESSION_EXPIRY));
        }

        if (SESSION_AUTO_RENEW
                && isset($_SESSION['timeout_idle'])
                && $_SESSION['timeout_idle'] < time()) {
            $this->updateExpiry( time() + SESSION_EXPIRY);
        }

        $_SESSION['timeout_idle'] = $newidle = time() + SESSION_IDLE;

        return $this->sessionState;
    }

    private function updateExpiry($lifetime) {
        $cookie = session_get_cookie_params();
        setcookie(session_name(),
            session_id(),
            $lifetime,
            $cookie['path'],
            $cookie['domain'],
            $cookie['secure'],
            $cookie['httponly']);
    }

    public function set( $name , $value ) {
        $_SESSION[$name] = $value;
    }

    public function get( $name ) {
        if ( isset($_SESSION[$name])) {
            return $_SESSION[$name];
        }
    }

    public function is_set( $name ) {
        return isset($_SESSION[$name]);
    }

    public function un_set( $name ) {
        unset( $_SESSION[$name] );
    }

    public function destroy() {
        if ( $this->sessionState == self::SESSION_STARTED ) {
            $this->sessionState = !session_destroy();
            unset( $_SESSION );

            return !$this->sessionState;
        }
        return FALSE;
    }
}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<TITLE>
AnnotationEditor.FeatChangeData
</TITLE>

<META NAME="keywords" CONTENT="apollo.editor.AnnotationEditor.FeatChangeData class">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">

      Overview
      Package
    Class
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

apollo.editor

Class AnnotationEditor.FeatChangeData

java.lang.Object
  apollo.editor.AnnotationEditor.FeatChangeData

Enclosing class:
AnnotationEditor

public class AnnotationEditor.FeatChangeData
extends java.lang.Object

Helper class for keeping track of changed top level annots

Field Summary

 java.util.List<SeqFeatureI>
newFeats

 SeqFeatureI
oldFeat

Constructor Summary

AnnotationEditor.FeatChangeData()

Method Summary

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

oldFeat

public SeqFeatureI oldFeat

newFeats

public java.util.List<SeqFeatureI> newFeats

Constructor Detail

AnnotationEditor.FeatChangeData

public AnnotationEditor.FeatChangeData()

      Overview
      Package
    Class
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD


text:
  * Install dependencies with `mix deps.get`
  * Create and migrate your database with `mix ecto.create && mix ecto.migrate`
  * Install Node.js dependencies with `npm install`
  * Start app `mix phoenix.server`

Now you can visit [`localhost:4000`](http://localhost:4000) from your browser.


text:
#include "stm32f4xx_HAL.h"
#include "BSP_System.h"
#include "LIB_SYSTICK.h"

void HAL_SYSTICK_Callback(void)
{
  LIB_SYSTICK_Run();
}

/** System Clock Configuration
*/
void SystemClock_Config(void)
{

  RCC_OscInitTypeDef RCC_OscInitStruct;
  RCC_ClkInitTypeDef RCC_ClkInitStruct;
  RCC_PeriphCLKInitTypeDef PeriphClkInitStruct;

  __PWR_CLK_ENABLE();

  __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);

  RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI|RCC_OSCILLATORTYPE_LSI
                              |RCC_OSCILLATORTYPE_HSE;
  RCC_OscInitStruct.HSEState = RCC_HSE_ON;
  RCC_OscInitStruct.HSIState = RCC_HSI_ON;
  RCC_OscInitStruct.HSICalibrationValue = 16;
  RCC_OscInitStruct.LSIState = RCC_LSI_ON;
  RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
  RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
  RCC_OscInitStruct.PLL.PLLM = 8;
  RCC_OscInitStruct.PLL.PLLN = 64;
  RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;
  RCC_OscInitStruct.PLL.PLLQ = 4;
  HAL_RCC_OscConfig(&RCC_OscInitStruct);

  RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
                              |RCC_CLOCKTYPE_PCLK1;
  RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
  RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV4;
  RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV4;
  RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;
  HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_0);

  PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_RTC;
  PeriphClkInitStruct.RTCClockSelection = RCC_RTCCLKSOURCE_LSI;
  HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct);

  HAL_SYSTICK_Config(HAL_RCC_GetHCLKFreq()/SYSTICK_FREQUENCY);

  HAL_SYSTICK_CLKSourceConfig(SYSTICK_CLKSOURCE_HCLK);

  /* SysTick_IRQn interrupt configuration */
  HAL_NVIC_SetPriority(SysTick_IRQn, 2, 0);
}


text:
try:
    from setuptools import setup
except ImportError:
    from distutils.core import setup

setup(
    name='korbit-python',
    packages=['korbit'],
    version='0.6.0',
    description='korbit API wrapper for Python',
    url='http://github.com/Hoonjin/korbit-python/',
    author='Daniel Ji',
    author_email='bwjhj1030@gmail.com',
    install_requires=['requests'],
    classifiers=[
        "Programming Language :: Python",
        "Programming Language :: Python :: 3",
        "License :: OSI Approved :: MIT License",
        "Operating System :: OS Independent",
        "Topic :: Software Development :: Libraries :: Python Modules"
    ],
    license='MIT',
)


text:
package com.microsoft.services.orc.impl;

import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonDeserializer;
import com.google.gson.JsonElement;
import com.google.gson.JsonParseException;
import com.google.gson.JsonPrimitive;
import com.google.gson.JsonSerializationContext;
import com.microsoft.services.orc.CalendarSerializer;

import java.lang.reflect.Type;
import java.text.ParseException;
import java.util.Calendar;

/**
 * The type Calendar type adapter.
 */
public class CalendarTypeAdapter implements com.google.gson.JsonSerializer<Calendar>, JsonDeserializer<Calendar> {

    @Override
    public Calendar deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
        String strVal = json.getAsString();

        try {
            return CalendarSerializer.deserialize(strVal);
        }
        catch (ParseException e) {
            throw new JsonParseException(e);
        }
    }

    @Override
    public JsonElement serialize(Calendar src, Type typeOfSrc, JsonSerializationContext context) {
        String formatted = CalendarSerializer.serialize(src);

        return new JsonPrimitive(formatted);
    }
}


text:
/*
 * 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 com.facebook.presto.hive.functions;

import org.apache.hadoop.hive.ql.exec.FunctionInfo;
import org.apache.hadoop.hive.ql.exec.Registry;
import org.apache.hadoop.hive.ql.parse.SemanticException;
import org.apache.hadoop.hive.ql.udf.UDFAcos;
import org.apache.hadoop.hive.ql.udf.UDFAsin;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDAFAverage;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDAFCollectList;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDAFCollectSet;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDAFComputeStats;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDAFContextNGrams;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDAFCorrelation;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDAFCount;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDAFCovariance;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDAFCovarianceSample;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDAFCumeDist;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDAFDenseRank;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDAFFirstValue;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDAFHistogramNumeric;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDAFLastValue;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDAFMax;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDAFMin;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDAFNTile;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDAFPercentRank;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDAFPercentileApprox;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDAFRank;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDAFRowNumber;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDAFStd;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDAFStdSample;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDAFSum;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDAFVariance;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDAFVarianceSample;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDAFnGrams;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFAbs;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFAddMonths;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFAesDecrypt;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFAesEncrypt;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFArray;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFArrayContains;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFAssertTrue;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFAssertTrueOOM;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFBRound;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFBetween;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFCardinalityViolation;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFCase;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFCbrt;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFCeil;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFCharacterLength;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFCoalesce;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFConcat;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFConcatWS;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFCurrentDate;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFCurrentGroups;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFCurrentTimestamp;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFCurrentUser;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFDate;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFDateAdd;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFDateDiff;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFDateFormat;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFDateSub;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFDecode;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFElt;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFEncode;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFEnforceConstraint;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFEpochMilli;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFExtractUnion;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFFactorial;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFField;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFFloor;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFFormatNumber;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFFromUtcTimestamp;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFGreatest;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFGrouping;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFHash;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFInBloomFilter;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFInFile;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFIndex;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFInitCap;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFInstr;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFInternalInterval;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFLTrim;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFLag;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFLastDay;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFLead;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFLeast;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFLength;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFLevenshtein;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFLikeAll;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFLikeAny;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFLocate;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFLoggedInUser;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFLower;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFLpad;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFMap;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFMapKeys;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFMapValues;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFMonthsBetween;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFMurmurHash;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFNamedStruct;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFNextDay;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFNullif;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFNvl;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFOPFalse;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFOPNegative;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFOPNotFalse;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFOPNotNull;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFOPNotTrue;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFOPNull;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFOPPositive;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFOPTrue;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFOctetLength;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFPosMod;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFPower;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFPrintf;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFQuarter;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFRTrim;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFReflect;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFReflect2;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFRegExp;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFRestrictInformationSchema;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFRound;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFRpad;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFSQCountCheck;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFSentences;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFSha2;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFSize;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFSortArray;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFSortArrayByField;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFSoundex;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFSplit;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFStringToMap;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFStruct;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFSubstringIndex;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFTimestamp;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFToBinary;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFToChar;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFToDate;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFToDecimal;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFToIntervalDayTime;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFToIntervalYearMonth;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFToTimestampLocalTZ;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFToUnixTimeStamp;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFToUtcTimestamp;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFToVarchar;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFTranslate;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFTrim;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFTrunc;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFUnion;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFUnixTimeStamp;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFUpper;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFWhen;
import org.apache.hadoop.hive.ql.udf.generic.GenericUDFWidthBucket;
import org.apache.hadoop.hive.ql.udf.generic.UDFCurrentDB;
import org.apache.hadoop.hive.ql.udf.xml.GenericUDFXPath;

import java.util.Set;

public final class FunctionRegistry
{
    private FunctionRegistry() {}

    // registry for hive functions
    private static final Registry system = new Registry(true);

    static {
        // register genericUDF
        system.registerGenericUDF("concat", GenericUDFConcat.class);
        system.registerGenericUDF("substring_index", GenericUDFSubstringIndex.class);
        system.registerGenericUDF("lpad", GenericUDFLpad.class);
        system.registerGenericUDF("rpad", GenericUDFRpad.class);
        system.registerGenericUDF("levenshtein", GenericUDFLevenshtein.class);
        system.registerGenericUDF("soundex", GenericUDFSoundex.class);
        system.registerGenericUDF("size", GenericUDFSize.class);
        system.registerGenericUDF("round", GenericUDFRound.class);
        system.registerGenericUDF("bround", GenericUDFBRound.class);
        system.registerGenericUDF("floor", GenericUDFFloor.class);
        system.registerGenericUDF("cbrt", GenericUDFCbrt.class);
        system.registerGenericUDF("ceil", GenericUDFCeil.class);
        system.registerGenericUDF("ceiling", GenericUDFCeil.class);
        system.registerGenericUDF("abs", GenericUDFAbs.class);
        system.registerGenericUDF("sq_count_check", GenericUDFSQCountCheck.class);
        system.registerGenericUDF("enforce_constraint", GenericUDFEnforceConstraint.class);
        system.registerGenericUDF("pmod", GenericUDFPosMod.class);
        system.registerGenericUDF("power", GenericUDFPower.class);
        system.registerGenericUDF("pow", GenericUDFPower.class);
        system.registerGenericUDF("factorial", GenericUDFFactorial.class);
        system.registerGenericUDF("sha2", GenericUDFSha2.class);
        system.registerGenericUDF("aes_encrypt", GenericUDFAesEncrypt.class);
        system.registerGenericUDF("aes_decrypt", GenericUDFAesDecrypt.class);
        system.registerGenericUDF("encode", GenericUDFEncode.class);
        system.registerGenericUDF("decode", GenericUDFDecode.class);
        system.registerGenericUDF("upper", GenericUDFUpper.class);
        system.registerGenericUDF("lower", GenericUDFLower.class);
        system.registerGenericUDF("ucase", GenericUDFUpper.class);
        system.registerGenericUDF("lcase", GenericUDFLower.class);
        system.registerGenericUDF("trim", GenericUDFTrim.class);
        system.registerGenericUDF("ltrim", GenericUDFLTrim.class);
        system.registerGenericUDF("rtrim", GenericUDFRTrim.class);
        system.registerGenericUDF("length", GenericUDFLength.class);
        system.registerGenericUDF("character_length", GenericUDFCharacterLength.class);
        system.registerGenericUDF("char_length", GenericUDFCharacterLength.class);
        system.registerGenericUDF("octet_length", GenericUDFOctetLength.class);
        system.registerGenericUDF("field", GenericUDFField.class);
        system.registerGenericUDF("initcap", GenericUDFInitCap.class);
        system.registerGenericUDF("likeany", GenericUDFLikeAny.class);
        system.registerGenericUDF("likeall", GenericUDFLikeAll.class);
        system.registerGenericUDF("rlike", GenericUDFRegExp.class);
        system.registerGenericUDF("regexp", GenericUDFRegExp.class);
        system.registerGenericUDF("nvl", GenericUDFNvl.class);
        system.registerGenericUDF("split", GenericUDFSplit.class);
        system.registerGenericUDF("str_to_map", GenericUDFStringToMap.class);
        system.registerGenericUDF("translate", GenericUDFTranslate.class);
        system.registerGenericUDF("positive", GenericUDFOPPositive.class);
        system.registerGenericUDF("negative", GenericUDFOPNegative.class);
        system.registerGenericUDF("quarter", GenericUDFQuarter.class);
        system.registerGenericUDF("to_date", GenericUDFDate.class);
        system.registerGenericUDF("last_day", GenericUDFLastDay.class);
        system.registerGenericUDF("next_day", GenericUDFNextDay.class);
        system.registerGenericUDF("trunc", GenericUDFTrunc.class);
        system.registerGenericUDF("date_format", GenericUDFDateFormat.class);
        system.registerGenericUDF("date_add", GenericUDFDateAdd.class);
        system.registerGenericUDF("date_sub", GenericUDFDateSub.class);
        system.registerGenericUDF("datediff", GenericUDFDateDiff.class);
        system.registerGenericUDF("add_months", GenericUDFAddMonths.class);
        system.registerGenericUDF("months_between", GenericUDFMonthsBetween.class);
        system.registerGenericUDF("xpath", GenericUDFXPath.class);
        system.registerGenericUDF("grouping", GenericUDFGrouping.class);
        system.registerGenericUDF("current_database", UDFCurrentDB.class);
        system.registerGenericUDF("current_date", GenericUDFCurrentDate.class);
        system.registerGenericUDF("current_timestamp", GenericUDFCurrentTimestamp.class);
        system.registerGenericUDF("current_user", GenericUDFCurrentUser.class);
        system.registerGenericUDF("current_groups", GenericUDFCurrentGroups.class);
        system.registerGenericUDF("logged_in_user", GenericUDFLoggedInUser.class);
        system.registerGenericUDF("restrict_information_schema", GenericUDFRestrictInformationSchema.class);
        system.registerGenericUDF("isnull", GenericUDFOPNull.class);
        system.registerGenericUDF("isnotnull", GenericUDFOPNotNull.class);
        system.registerGenericUDF("istrue", GenericUDFOPTrue.class);
        system.registerGenericUDF("isnottrue", GenericUDFOPNotTrue.class);
        system.registerGenericUDF("isfalse", GenericUDFOPFalse.class);
        system.registerGenericUDF("isnotfalse", GenericUDFOPNotFalse.class);
        system.registerGenericUDF("between", GenericUDFBetween.class);
        system.registerGenericUDF("in_bloom_filter", GenericUDFInBloomFilter.class);
        system.registerGenericUDF("date", GenericUDFToDate.class);
        system.registerGenericUDF("timestamp", GenericUDFTimestamp.class);
        system.registerGenericUDF("timestamp with local time zone", GenericUDFToTimestampLocalTZ.class);
        system.registerGenericUDF("interval_year_month", GenericUDFToIntervalYearMonth.class);
        system.registerGenericUDF("interval_day_time", GenericUDFToIntervalDayTime.class);
        system.registerGenericUDF("binary", GenericUDFToBinary.class);
        system.registerGenericUDF("decimal", GenericUDFToDecimal.class);
        system.registerGenericUDF("varchar", GenericUDFToVarchar.class);
        system.registerGenericUDF("char", GenericUDFToChar.class);
        system.registerGenericUDF("reflect", GenericUDFReflect.class);
        system.registerGenericUDF("reflect2", GenericUDFReflect2.class);
        system.registerGenericUDF("java_method", GenericUDFReflect.class);
        system.registerGenericUDF("array", GenericUDFArray.class);
        system.registerGenericUDF("assert_true", GenericUDFAssertTrue.class);
        system.registerGenericUDF("assert_true_oom", GenericUDFAssertTrueOOM.class);
        system.registerGenericUDF("map", GenericUDFMap.class);
        system.registerGenericUDF("struct", GenericUDFStruct.class);
        system.registerGenericUDF("named_struct", GenericUDFNamedStruct.class);
        system.registerGenericUDF("create_union", GenericUDFUnion.class);
        system.registerGenericUDF("extract_union", GenericUDFExtractUnion.class);
        system.registerGenericUDF("case", GenericUDFCase.class);
        system.registerGenericUDF("when", GenericUDFWhen.class);
        system.registerGenericUDF("nullif", GenericUDFNullif.class);
        system.registerGenericUDF("hash", GenericUDFHash.class);
        system.registerGenericUDF("murmur_hash", GenericUDFMurmurHash.class);
        system.registerGenericUDF("coalesce", GenericUDFCoalesce.class);
        system.registerGenericUDF("index", GenericUDFIndex.class);
        system.registerGenericUDF("in_file", GenericUDFInFile.class);
        system.registerGenericUDF("instr", GenericUDFInstr.class);
        system.registerGenericUDF("locate", GenericUDFLocate.class);
        system.registerGenericUDF("elt", GenericUDFElt.class);
        system.registerGenericUDF("concat_ws", GenericUDFConcatWS.class);
        system.registerGenericUDF("sort_array", GenericUDFSortArray.class);
        system.registerGenericUDF("sort_array_by", GenericUDFSortArrayByField.class);
        system.registerGenericUDF("array_contains", GenericUDFArrayContains.class);
        system.registerGenericUDF("sentences", GenericUDFSentences.class);
        system.registerGenericUDF("map_keys", GenericUDFMapKeys.class);
        system.registerGenericUDF("map_values", GenericUDFMapValues.class);
        system.registerGenericUDF("format_number", GenericUDFFormatNumber.class);
        system.registerGenericUDF("printf", GenericUDFPrintf.class);
        system.registerGenericUDF("greatest", GenericUDFGreatest.class);
        system.registerGenericUDF("least", GenericUDFLeast.class);
        system.registerGenericUDF("cardinality_violation", GenericUDFCardinalityViolation.class);
        system.registerGenericUDF("width_bucket", GenericUDFWidthBucket.class);
        system.registerGenericUDF("from_utc_timestamp", GenericUDFFromUtcTimestamp.class);
        system.registerGenericUDF("to_utc_timestamp", GenericUDFToUtcTimestamp.class);
        system.registerGenericUDF("unix_timestamp", GenericUDFUnixTimeStamp.class);
        system.registerGenericUDF("to_unix_timestamp", GenericUDFToUnixTimeStamp.class);
        system.registerGenericUDF("internal_interval", GenericUDFInternalInterval.class);
        system.registerGenericUDF("to_epoch_milli", GenericUDFEpochMilli.class);
        system.registerGenericUDF("lead", GenericUDFLead.class);
        system.registerGenericUDF("lag", GenericUDFLag.class);

        // register UDF
        system.registerUDF("asin", UDFAsin.class, false);
        system.registerUDF("acos", UDFAcos.class, false);

        // Aggregate functions
        system.registerGenericUDAF("max", new GenericUDAFMax());
        system.registerGenericUDAF("min", new GenericUDAFMin());
        system.registerGenericUDAF("sum", new GenericUDAFSum());
        system.registerGenericUDAF("count", new GenericUDAFCount());
        system.registerGenericUDAF("avg", new GenericUDAFAverage());
        system.registerGenericUDAF("std", new GenericUDAFStd());
        system.registerGenericUDAF("stddev", new GenericUDAFStd());
        system.registerGenericUDAF("stddev_pop", new GenericUDAFStd());
        system.registerGenericUDAF("stddev_samp", new GenericUDAFStdSample());
        system.registerGenericUDAF("variance", new GenericUDAFVariance());
        system.registerGenericUDAF("var_pop", new GenericUDAFVariance());
        system.registerGenericUDAF("var_samp", new GenericUDAFVarianceSample());
        system.registerGenericUDAF("covar_pop", new GenericUDAFCovariance());
        system.registerGenericUDAF("covar_samp", new GenericUDAFCovarianceSample());
        system.registerGenericUDAF("corr", new GenericUDAFCorrelation());
        system.registerGenericUDAF("histogram_numeric", new GenericUDAFHistogramNumeric());
        system.registerGenericUDAF("percentile_approx", new GenericUDAFPercentileApprox());
        system.registerGenericUDAF("collect_set", new GenericUDAFCollectSet());
        system.registerGenericUDAF("collect_list", new GenericUDAFCollectList());
        system.registerGenericUDAF("ngrams", new GenericUDAFnGrams());
        system.registerGenericUDAF("context_ngrams", new GenericUDAFContextNGrams());
        system.registerGenericUDAF("compute_stats", new GenericUDAFComputeStats());
        system.registerGenericUDAF("row_number", new GenericUDAFRowNumber());
        system.registerGenericUDAF("rank", new GenericUDAFRank());
        system.registerGenericUDAF("dense_rank", new GenericUDAFDenseRank());
        system.registerGenericUDAF("percent_rank", new GenericUDAFPercentRank());
        system.registerGenericUDAF("cume_dist", new GenericUDAFCumeDist());
        system.registerGenericUDAF("ntile", new GenericUDAFNTile());
        system.registerGenericUDAF("first_value", new GenericUDAFFirstValue());
        system.registerGenericUDAF("last_value", new GenericUDAFLastValue());
    }

    public static FunctionInfo getFunctionInfo(String functionName) throws SemanticException
    {
        return system.getFunctionInfo(functionName);
    }

    public static Set<String> getCurrentFunctionNames()
    {
        return system.getCurrentFunctionNames();
    }
}


text:
namespace tensorflow {

// Message-text conversion for tensorflow.AutoParallelOptions
string ProtoDebugString(
    const ::tensorflow::AutoParallelOptions& msg);
string ProtoShortDebugString(
    const ::tensorflow::AutoParallelOptions& msg);
bool ProtoParseFromString(
    const string& s,
    ::tensorflow::AutoParallelOptions* msg)
        TF_MUST_USE_RESULT;

// Enum text output for tensorflow.RewriterConfig.MemOptType
const char* EnumName_RewriterConfig_MemOptType(
    ::tensorflow::RewriterConfig_MemOptType value);

// Message-text conversion for tensorflow.RewriterConfig
string ProtoDebugString(
    const ::tensorflow::RewriterConfig& msg);
string ProtoShortDebugString(
    const ::tensorflow::RewriterConfig& msg);
bool ProtoParseFromString(
    const string& s,
    ::tensorflow::RewriterConfig* msg)
        TF_MUST_USE_RESULT;

}  // namespace tensorflow

#endif  // tensorflow_core_protobuf_rewriter_config_proto_H_


text: <title th:utext="${BLC_PAGE.description}"></title>