text:
using System;
using System.Configuration;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Net;
using System.Reflection;
using System.Runtime.CompilerServices;
using Paket.Bootstrapper.DownloadStrategies;
using Paket.Bootstrapper.HelperProxies;

[assembly: InternalsVisibleTo("Paket.Bootstrapper.Tests")]

namespace Paket.Bootstrapper
{

    static class Program
    {
        private static readonly Stopwatch executionWatch = new Stopwatch();

        static void Main(string[] args)
        {
            AppContext.SetSwitch("Switch.System.Net.DontEnableSystemDefaultTlsVersions", false);
            executionWatch.Start();
            Console.CancelKeyPress += CancelKeyPressed;

            IProxyProvider proxyProvider = new DefaultProxyProvider();

            var appSettings = ConfigurationManager.AppSettings;

            var appConfigInWorkingDir = Path.Combine(Environment.CurrentDirectory, "paket.bootstrapper.exe.config");
            if (File.Exists(appConfigInWorkingDir))
            {
                var exeInWorkingDir = Path.Combine(Environment.CurrentDirectory, "paket.bootstrapper.exe");
                var exeConf = ConfigurationManager.OpenExeConfiguration(null);
                if (exeConf != null)
                {
                    var nv = new System.Collections.Specialized.NameValueCollection();
                    foreach (KeyValueConfigurationElement kv in exeConf.AppSettings.Settings)
                    {
                        nv.Add(kv.Key, kv.Value);
                    }
                    appSettings = nv;
                }
            }

            var optionsBeforeDependenciesFile = ArgumentParser.ParseArgumentsAndConfigurations(args, appSettings,
                Environment.GetEnvironmentVariables(), proxyProvider.FileSystemProxy, Enumerable.Empty<string>());
            ConsoleImpl.Verbosity = optionsBeforeDependenciesFile.Verbosity;

            var argumentsFromDependenciesFile =
                WindowsProcessArguments.Parse(
                    PaketDependencies.GetBootstrapperArgsForFolder(proxyProvider.FileSystemProxy));
            var options = ArgumentParser.ParseArgumentsAndConfigurations(args, appSettings,
                Environment.GetEnvironmentVariables(), proxyProvider.FileSystemProxy, argumentsFromDependenciesFile);
            if (options.ShowHelp)
            {
                ConsoleImpl.WriteAlways(BootstrapperHelper.HelpText);
                return;
            }

            ConsoleImpl.Verbosity = options.Verbosity;
            if (options.UnprocessedCommandArgs.Any())
                ConsoleImpl.WriteWarning("Ignoring the following unknown argument(s): {0}", String.Join(", ", options.UnprocessedCommandArgs));

#if PAKET_BOOTSTRAP_NO_CACHE
            ConsoleImpl.WriteTrace("Force ignore cache, because not implemented.");
            options.DownloadArguments.IgnoreCache = true;
#endif

            var effectiveStrategy = GetEffectiveDownloadStrategy(options.DownloadArguments, options.PreferNuget, options.ForceNuget, proxyProvider);
            ConsoleImpl.WriteTrace("Using strategy: " + effectiveStrategy.Name);
            ConsoleImpl.WriteTrace("Using install kind: " + (options.DownloadArguments.AsTool? "tool": "exe"));

            StartPaketBootstrapping(effectiveStrategy, options.DownloadArguments, proxyProvider.FileSystemProxy, () => OnSuccessfulDownload(options));
        }

        private static void OnSuccessfulDownload(BootstrapperOptions options)
        {
            if (options.Run && File.Exists(options.DownloadArguments.Target))
            {
                Console.CancelKeyPress -= CancelKeyPressed;
                try
                {
                    var exitCode = PaketRunner.Run(options.DownloadArguments.Target, options.RunArgs);
                    Environment.Exit(exitCode);
                }
                catch (Exception e)
                {
                    ConsoleImpl.WriteError("Running paket failed with: {0}", e);
                }
            }
        }

        private static void CancelKeyPressed(object o, ConsoleCancelEventArgs eventArgs)
        {
            Console.WriteLine("Bootstrapper cancelled");
            var folder = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
            var target = Path.Combine(folder, "paket.exe");

            var exitCode = 1;
            if (File.Exists(target))
            {
                var localVersion = BootstrapperHelper.GetLocalFileVersion(target, new FileSystemProxy());
                Console.WriteLine("Detected existing paket.exe ({0}). Cancelling normally.", localVersion);
                exitCode = 0;
            }
            Environment.Exit(exitCode);
        }

        public static void StartPaketBootstrapping(IDownloadStrategy downloadStrategy, DownloadArguments dlArgs, IFileSystemProxy fileSystemProxy, Action onSuccess)
        {
            Action<Exception> handleException = exception =>
            {
#if DEBUG
                Environment.ExitCode = 1;
                ConsoleImpl.WriteError(String.Format("{0} ({1})", exception.ToString(), downloadStrategy.Name));
                return;
#else
                ConsoleImpl.WriteError(String.Format("{0} ({1})", exception.Message, downloadStrategy.Name));
                if (!fileSystemProxy.FileExists(dlArgs.Target))
                {
                    Environment.ExitCode = 1;
                }
                else
                {
                    fileSystemProxy.WaitForFileFinished(dlArgs.Target);
                    onSuccess();
                }
#endif
            };
            try
            {
                string versionRequested;
                if (!dlArgs.IgnorePrerelease)
                    versionRequested = "prerelease requested";
                else if (String.IsNullOrWhiteSpace(dlArgs.LatestVersion))
                    versionRequested = "downloading latest stable";
                else
                    versionRequested = string.Format("version {0} requested", dlArgs.LatestVersion);

                ConsoleImpl.WriteInfo("Checking Paket version ({0})...", versionRequested);
                ConsoleImpl.WriteTrace("Target path is {0}", dlArgs.Target);
                var localVersion = fileSystemProxy.GetLocalFileVersion(dlArgs.Target);
                ConsoleImpl.WriteTrace("File in target path version: v{0}", string.IsNullOrEmpty(localVersion) ? "UNKNOWN" : localVersion);

                var specificVersionRequested = true;
                var latestVersion = dlArgs.LatestVersion;

                if (latestVersion == string.Empty)
                {
                    ConsoleImpl.WriteTrace("No version specified, checking online...");

                    var getLatestVersionWatch = Stopwatch.StartNew();
                    latestVersion = downloadStrategy.GetLatestVersion(dlArgs.IgnorePrerelease);
                    getLatestVersionWatch.Stop();

                    ConsoleImpl.WriteTrace("Latest version check found v{0} in {1:0.##} second(s)", latestVersion, getLatestVersionWatch.Elapsed.TotalSeconds);
                    specificVersionRequested = false;
                }

                if (dlArgs.DoSelfUpdate)
                {
                    ConsoleImpl.WriteInfo("Trying self update");
                    downloadStrategy.SelfUpdate(latestVersion);
                }
                else
                {
                    var currentSemVer = String.IsNullOrEmpty(localVersion) ? new SemVer() : SemVer.Create(localVersion);
                    if (currentSemVer.PreRelease != null && dlArgs.IgnorePrerelease)
                        currentSemVer = new SemVer();
                    var latestSemVer = SemVer.Create(latestVersion);
                    var comparison = currentSemVer.CompareTo(latestSemVer);

                    if ((comparison > 0 && specificVersionRequested) || comparison < 0)
                    {
                        PaketHashFile hashFile = null;
                        if (downloadStrategy.CanDownloadHashFile)
                        {
                            ConsoleImpl.WriteTrace("Downloading hash for v{0} ...", latestVersion);
                            var downloadHashWatch = Stopwatch.StartNew();
                            hashFile = downloadStrategy.DownloadHashFile(latestVersion);
                            downloadHashWatch.Stop();

                            ConsoleImpl.WriteTrace("Hash download took {0:0.##} second(s)", downloadHashWatch.Elapsed.TotalSeconds);
                        }

                        ConsoleImpl.WriteTrace("Downloading v{0} ...", latestVersion);

                        var downloadWatch = Stopwatch.StartNew();
                        downloadStrategy.DownloadVersion(latestVersion, dlArgs.Target, hashFile);
                        downloadWatch.Stop();

                        ConsoleImpl.WriteTrace("Download took {0:0.##} second(s)", downloadWatch.Elapsed.TotalSeconds);
                        ConsoleImpl.WriteInfo("Done in {0:0.##} second(s).", executionWatch.Elapsed.TotalSeconds);
                    }
                    else
                    {
                        ConsoleImpl.WriteInfo("Paket.exe {0} is up to date.", localVersion);
                    }
                }

                executionWatch.Stop();
                ConsoleImpl.WriteTrace("Paket Bootstrapping took {0:0.##} second(s)", executionWatch.Elapsed.TotalSeconds);

                onSuccess();
            }
            catch (WebException exn)
            {
                var shouldHandleException = true;
                if (!fileSystemProxy.FileExists(dlArgs.Target))
                {
                    if (downloadStrategy.FallbackStrategy != null)
                    {
                        var fallbackStrategy = downloadStrategy.FallbackStrategy;
                        ConsoleImpl.WriteInfo("'{0}' download failed. If using Mono, you may need to import trusted certificates using the 'mozroots' tool as none are contained by default. Trying fallback download from '{1}'.", downloadStrategy.Name, fallbackStrategy.Name);
                        StartPaketBootstrapping(fallbackStrategy, dlArgs, fileSystemProxy, onSuccess);
                        shouldHandleException = !fileSystemProxy.FileExists(dlArgs.Target);
                    }
                }
                if (shouldHandleException)
                    handleException(exn);
            }
            catch (Exception exn)
            {
                handleException(exn);
            }
        }

        public static DownloadStrategy GetEffectiveDownloadStrategy(DownloadArguments dlArgs, bool preferNuget, bool forceNuget, IProxyProvider proxyProvider)
        {
            var gitHubDownloadStrategy =
                dlArgs.AsTool
                ? new GitHubDownloadToolStrategy(proxyProvider.WebRequestProxy, proxyProvider.FileSystemProxy).AsCached(dlArgs.IgnoreCache)
                : new GitHubDownloadStrategy(proxyProvider.WebRequestProxy, proxyProvider.FileSystemProxy).AsCached(dlArgs.IgnoreCache);
            var nugetDownloadStrategy = new NugetDownloadStrategy(proxyProvider.WebRequestProxy, proxyProvider.FileSystemProxy, dlArgs.Folder, dlArgs.NugetSource, dlArgs.AsTool).AsCached(dlArgs.IgnoreCache);

            DownloadStrategy effectiveStrategy;
            if (forceNuget)
            {
                effectiveStrategy = nugetDownloadStrategy;
                nugetDownloadStrategy.FallbackStrategy = null;
            }
            else if (preferNuget)
            {
                effectiveStrategy = nugetDownloadStrategy;
                nugetDownloadStrategy.FallbackStrategy = gitHubDownloadStrategy;
            }
            else
            {
                effectiveStrategy = gitHubDownloadStrategy;
                gitHubDownloadStrategy.FallbackStrategy = nugetDownloadStrategy;
            }

            return effectiveStrategy.AsTemporarilyIgnored(dlArgs.MaxFileAgeInMinutes, dlArgs.Target);
        }

        private static DownloadStrategy AsCached(this DownloadStrategy effectiveStrategy, bool ignoreCache)
        {
            if (ignoreCache)
                return effectiveStrategy;
            return new CacheDownloadStrategy(effectiveStrategy, new FileSystemProxy());
        }

        private static DownloadStrategy AsTemporarilyIgnored(this DownloadStrategy effectiveStrategy, int? maxFileAgeInMinutes, string target)
        {
            if (maxFileAgeInMinutes.HasValue)
                return new TemporarilyIgnoreUpdatesDownloadStrategy(effectiveStrategy, new FileSystemProxy(), target, maxFileAgeInMinutes.Value);
            return effectiveStrategy;
        }
    }
}


text:
package com.google.sps.workspace;

import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.doNothing;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;

import com.google.sps.workspace.WorkspaceArchive.ArchiveType;
import java.io.IOException;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import org.apache.commons.compress.archivers.ArchiveOutputStream;
import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
import org.apache.commons.compress.archivers.tar.TarArchiveOutputStream;
import org.apache.commons.compress.archivers.zip.ZipArchiveEntry;
import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnitRunner;

@RunWith(MockitoJUnitRunner.class)
public class WorkspaceArchiveTest {
  @Mock Workspace workspace;
  @Mock Future<List<WorkspaceFile>> futureFiles;
  @Mock Future<String> futureString;
  @Mock ArchiveOutputStream archiveOut;
  @Mock OutputStream out;
  @Mock WorkspaceFile file;

  @Test(expected = NullPointerException.class)
  public void workspaceArchiveNullWorkspace() {
    new WorkspaceArchive(null, ArchiveType.ZIP);
  }

  @Test(expected = NullPointerException.class)
  public void workspaceArchiveNullType() {
    new WorkspaceArchive(workspace, null);
  }

  @Test
  public void archiveTar() throws InterruptedException, ExecutionException, IOException {
    int NUM_FILES = 3;
    String FILENAME = "FILENAME";
    String CONTENTS = "CONTENTS";

    List<WorkspaceFile> files = new ArrayList<>();
    for (int i = 0; i < NUM_FILES; i++) {
      files.add(file);
    }

    when(workspace.getFiles()).thenReturn(futureFiles);
    when(futureFiles.get()).thenReturn(files);
    when(file.getFilename()).thenReturn(FILENAME);
    when(file.getContents()).thenReturn(futureString);
    when(futureString.get()).thenReturn(CONTENTS);

    new WorkspaceArchive(workspace, ArchiveType.TAR).archive(archiveOut);

    verify(workspace, times(1)).getFiles();
    verify(file, times(NUM_FILES)).getFilename();
    verify(file, times(NUM_FILES)).getContents();

    verify(archiveOut, times(NUM_FILES)).putArchiveEntry(any(TarArchiveEntry.class));
    verify(archiveOut, times(NUM_FILES)).write(eq(CONTENTS.getBytes()));
    verify(archiveOut, times(NUM_FILES)).closeArchiveEntry();

    verify(archiveOut, times(1)).close();
  }

  @Test
  public void archiveZip() throws InterruptedException, ExecutionException, IOException {
    int NUM_FILES = 3;
    String FILENAME = "FILENAME";
    String CONTENTS = "CONTENTS";

    List<WorkspaceFile> files = new ArrayList<>();
    for (int i = 0; i < NUM_FILES; i++) {
      files.add(file);
    }

    when(workspace.getFiles()).thenReturn(futureFiles);
    when(futureFiles.get()).thenReturn(files);
    when(file.getFilename()).thenReturn(FILENAME);
    when(file.getContents()).thenReturn(futureString);
    when(futureString.get()).thenReturn(CONTENTS);

    new WorkspaceArchive(workspace, ArchiveType.ZIP).archive(archiveOut);

    verify(workspace, times(1)).getFiles();
    verify(file, times(NUM_FILES)).getFilename();
    verify(file, times(NUM_FILES)).getContents();

    verify(archiveOut, times(NUM_FILES)).putArchiveEntry(any(ZipArchiveEntry.class));
    verify(archiveOut, times(NUM_FILES)).write(eq(CONTENTS.getBytes()));
    verify(archiveOut, times(NUM_FILES)).closeArchiveEntry();

    verify(archiveOut, times(1)).close();
  }

  @Test(expected = ExecutionException.class)
  public void archiveException() throws Exception {
    when(workspace.getFiles()).thenReturn(futureFiles);
    when(futureFiles.get()).thenThrow(new ExecutionException(new Exception()));

    new WorkspaceArchive(workspace, ArchiveType.TAR).archive(archiveOut);
  }

  @Test
  public void archiveHelperTar() throws Exception {
    WorkspaceArchive archive = spy(new WorkspaceArchive(workspace, ArchiveType.TAR));
    doNothing().when(archive).archive(any(ArchiveOutputStream.class));

    archive.archive(out);

    verify(archive, times(1)).archive(any(TarArchiveOutputStream.class));
  }

  @Test
  public void archiveHelperZip() throws Exception {
    WorkspaceArchive archive = spy(new WorkspaceArchive(workspace, ArchiveType.ZIP));
    doNothing().when(archive).archive(any(ArchiveOutputStream.class));

    archive.archive(out);

    verify(archive, times(1)).archive(any(ZipArchiveOutputStream.class));
  }
}

redpajama_set_name: RedPajamaGithub


text:
//
// @author raver119@gmail.com, created on 24.11.17.
// @author Yurii Shyrma (iuriish@yahoo.com)
//

#include <system/op_boilerplate.h>
#if NOT_EXCLUDED(OP_scatter_add)

#include <ops/declarable/CustomOperations.h>
#include <ops/declarable/generic/helpers/ScatterHelper.h>

namespace sd {
namespace ops {

OP_IMPL(scatter_add, 3, 1, true) {
    auto input = INPUT_VARIABLE(0);
    auto indices = INPUT_VARIABLE(1);
    auto updates = INPUT_VARIABLE(2);

    auto output = OUTPUT_VARIABLE(0);

    if (!block.isInplace())
        output->assign(input);

    const bool lock = block.getBArguments()->empty() ? false : B_ARG(0);
    const bool checkIndices = block.getBArguments()->size() <= 1 ? false : B_ARG(1);

    const int inRank  = input->rankOf();
    const int indRank = indices->rankOf();
    const int updRank = updates->rankOf();
    const sd::LongType indLen = indices->lengthOf();

    REQUIRE_TRUE(inRank > 0, 0, "SCATTER_ADD OP: input should not be scalar !");

    if(inRank == 1) {
        REQUIRE_TRUE(indices->isSameShape(updates), 0, "SCATTER_ADD OP: when input array has rank = 1 then indices and updates must have the same shapes, but got %s and %s correspondingly !", ShapeUtils::shapeAsString(indices).c_str(), ShapeUtils::shapeAsString(updates).c_str());
    }
    else if (inRank == updRank && indices->isVector()) {
        std::vector<sd::LongType> updShape = updates->getShapeAsVector();
        std::vector<sd::LongType> inShape  = input->getShapeAsVector();
        std::vector<sd::LongType> expectedUpdShape = {indices->lengthOf()};
        expectedUpdShape.insert(expectedUpdShape.end(), inShape.begin()+1, inShape.end());

    }
    else {

        REQUIRE_TRUE(updRank == indRank + inRank - 1, 0, "SCATTER_ADD OP: wrong rank of updates array, expected is %i, but got %i instead !", indRank + inRank - 1 , updRank);

        std::vector<sd::LongType> updShape = updates->getShapeAsVector();
        std::vector<sd::LongType> inShape  = input->getShapeAsVector();
        std::vector<sd::LongType> expectedUpdShape = indices->getShapeAsVector();
        expectedUpdShape.insert(expectedUpdShape.end(), inShape.begin() + sd::LongType(1L), inShape.end());

    }

    if (!indices->isEmpty()) {

        if(checkIndices) {
            const sd::LongType numOfBadIndx = helpers::checkIndices(block.launchContext(), *indices, *output, 0);
            REQUIRE_TRUE(numOfBadIndx == 0, 0, "SCATTER_ADD OP: please check elements of indices-array, total number of wrong elements is %lld!", numOfBadIndx);
        }

        helpers::scatter(block.launchContext(), pairwise::Add, *indices, *updates, *output, lock);
    }

    return Status::OK;
}

DECLARE_SYN(ScatterAdd, scatter_add);

DECLARE_TYPES(scatter_add) {
    getOpDescriptor()
        ->setAllowedInputTypes(0, {ALL_INTS, ALL_FLOATS})
        ->setAllowedInputTypes(1, {ALL_INTS})
        ->setAllowedInputTypes(2, {ALL_INTS, ALL_FLOATS})
        ->setAllowedOutputTypes({ALL_INTS, ALL_FLOATS});
}

}
}

#endif


text:
var args = arguments[0] || {};

function volver(){
	$.winUsuarios.close();
};

function abrirAltaUsuario(){
    Alloy.createController('altaUsuario');
};

function abrirBajaUsuario(){
    Alloy.createController('eliminarUsuario');
	// alert("Ventana baja de usuarios");
};

function abrirConsultaUsuario(){
    Alloy.createController('consultaUsuario');
	// alert("Ventana consulta de usuarios");
};

if (OS_ANDROID) {
    $.winUsuarios.open();
};

if (OS_IOS) {
    Alloy.Globals.winInventarioCGMA.openWindow($.winUsuarios);
};


text:
Chapter 9 - Testing
-------------------

This chapters covers

- Introducing and using the Camel Test Kit
- Testing Camel with:
  - Standalone Java
  - Spring XML
  - Spring Java Config
  - Spring Boot
  - CDI
  - OSGi Blueprint XML
  - WildFly and WildFly Swarm
- Testing with and without using mocks
- Simulating real components and errors
- Amending routes before testing
- Integration and system testing
- Testing Camel using third party test frameworks:
  - Arquillian
  - Pax Exam
  - Citrus Integration Testing


text:
package com.pinpoint.test.plugin;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class SpringDataR2dbcPluginTestStarter {

    public static void main(String[] args) {
        SpringApplication.run(SpringDataR2dbcPluginTestStarter.class, args);
    }
}


text:
import {Component} from '@angular/core';

/** @title Implicit main content with two sidenavs */
@Component({
  selector: 'sidenav-position-example',
  templateUrl: 'sidenav-position-example.html',
  styleUrls: ['sidenav-position-example.css'],
})
export class SidenavPositionExample {
  shouldRun = /(^|.)(stackblitz|webcontainer).(io|com)$/.test(window.location.host);
}


text:
package de.silveryard.car.debugapp;

import de.silveryard.basesystem.sdk.gui.Screen;
import de.silveryard.car.gui.Button;

/**
 * Created by Sebif on 10.04.2017.
 */
public abstract class Page {
    private Button button;
    private PageClickHandler handler;

    protected Page(String name, int yPos, PageClickHandler handler){
        button = new Button(0, yPos, name);
        button.setLayer(1);
        button.registerHandler(this::buttonClickHandler);
        Screen.addRenderObject(button);
        this.handler = handler;
    }

    private void buttonClickHandler(){
        handler.invoke(this);
    }

    public abstract void enablePage();
    public abstract void disablePage();
}


text:
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

[assembly: AssemblyTitle("Kronometer")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Kronometer")]
[assembly: AssemblyCopyright("Copyright ©  2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: Guid("39bdaffa-a6ef-4fde-a152-c915bbd7d4e2")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: KSPAssembly("Kronometer", 1, 0)]
[assembly: KSPAssemblyDependency("Kopernicus.Parser", 1, 0)]


text:
#include "gamepadForm.h"

#include "ui_gamepadForm.h"

#include <QMessageBox>

GamepadForm::GamepadForm()
	: QWidget()
	, ui(new Ui::GamepadForm())
{
	// Here all GUI widgets are created and initialized.
	ui->setupUi(this);

	// Disabling buttons since we are not connected to robot yet and can not send any commands.
	setButtonsEnabled(false);

	// Setting mapper for "magic" buttons.
	// First, providing mapper with information about button id's.
	mButtonsMapper.setMapping(ui->button1, 1);
	mButtonsMapper.setMapping(ui->button2, 2);
	mButtonsMapper.setMapping(ui->button3, 3);
	mButtonsMapper.setMapping(ui->button4, 4);
	mButtonsMapper.setMapping(ui->button5, 5);

	// Second, connecting mapper to a slot which will process all magic button presses.
	connect(&mButtonsMapper, SIGNAL(mapped(int)), this, SLOT(onButtonPressed(int)));

	// Third, connecting buttons with mapper.
	connect(ui->button1, SIGNAL(clicked()), &mButtonsMapper, SLOT(map()));
	connect(ui->button2, SIGNAL(clicked()), &mButtonsMapper, SLOT(map()));
	connect(ui->button3, SIGNAL(clicked()), &mButtonsMapper, SLOT(map()));
	connect(ui->button4, SIGNAL(clicked()), &mButtonsMapper, SLOT(map()));
	connect(ui->button5, SIGNAL(clicked()), &mButtonsMapper, SLOT(map()));

	// Setting up mapper for pad buttons, "pressed" signal. Here we provide a command to be sent to a robot instead of
	// id, since all buttons must use different coordinates.
	mPadsDownMapper.setMapping(ui->buttonPad1Up, "pad 1 0 -100");
	mPadsDownMapper.setMapping(ui->buttonPad1Down, "pad 1 0 100");
	mPadsDownMapper.setMapping(ui->buttonPad1Left, "pad 1 -100 0");
	mPadsDownMapper.setMapping(ui->ButtonPad1Right, "pad 1 100 0");

	mPadsDownMapper.setMapping(ui->buttonPad2Up, "pad 2 0 -100");
	mPadsDownMapper.setMapping(ui->buttonPad2Down, "pad 2 0 100");
	mPadsDownMapper.setMapping(ui->buttonPad2Left, "pad 2 -100 0");
	mPadsDownMapper.setMapping(ui->ButtonPad2Right, "pad 2 100 0");

	connect(&mPadsDownMapper, SIGNAL(mapped(QString)), this, SLOT(onPadPressed(QString)));

	connect(ui->buttonPad1Up, SIGNAL(pressed()), &mPadsDownMapper, SLOT(map()));
	connect(ui->buttonPad1Down, SIGNAL(pressed()), &mPadsDownMapper, SLOT(map()));
	connect(ui->buttonPad1Left, SIGNAL(pressed()), &mPadsDownMapper, SLOT(map()));
	connect(ui->ButtonPad1Right, SIGNAL(pressed()), &mPadsDownMapper, SLOT(map()));

	connect(ui->buttonPad2Up, SIGNAL(pressed()), &mPadsDownMapper, SLOT(map()));
	connect(ui->buttonPad2Down, SIGNAL(pressed()), &mPadsDownMapper, SLOT(map()));
	connect(ui->buttonPad2Left, SIGNAL(pressed()), &mPadsDownMapper, SLOT(map()));
	connect(ui->ButtonPad2Right, SIGNAL(pressed()), &mPadsDownMapper, SLOT(map()));

	// Setting up mapper for "released" signal of pad buttons. Here we need only id of a pad, so it is pretty simple.
	mPadsUpMapper.setMapping(ui->buttonPad1Up, 1);
	mPadsUpMapper.setMapping(ui->buttonPad1Down, 1);
	mPadsUpMapper.setMapping(ui->buttonPad1Left, 1);
	mPadsUpMapper.setMapping(ui->ButtonPad1Right, 1);

	mPadsUpMapper.setMapping(ui->buttonPad2Up, 2);
	mPadsUpMapper.setMapping(ui->buttonPad2Down, 2);
	mPadsUpMapper.setMapping(ui->buttonPad2Left, 2);
	mPadsUpMapper.setMapping(ui->ButtonPad2Right, 2);

	connect(&mPadsUpMapper, SIGNAL(mapped(int)), this, SLOT(onPadReleased(int)));

	connect(ui->buttonPad1Up, SIGNAL(released()), &mPadsUpMapper, SLOT(map()));
	connect(ui->buttonPad1Down, SIGNAL(released()), &mPadsUpMapper, SLOT(map()));
	connect(ui->buttonPad1Left, SIGNAL(released()), &mPadsUpMapper, SLOT(map()));
	connect(ui->ButtonPad1Right, SIGNAL(released()), &mPadsUpMapper, SLOT(map()));

	connect(ui->buttonPad2Up, SIGNAL(released()), &mPadsUpMapper, SLOT(map()));
	connect(ui->buttonPad2Down, SIGNAL(released()), &mPadsUpMapper, SLOT(map()));
	connect(ui->buttonPad2Left, SIGNAL(released()), &mPadsUpMapper, SLOT(map()));
	connect(ui->ButtonPad2Right, SIGNAL(released()), &mPadsUpMapper, SLOT(map()));
}

GamepadForm::~GamepadForm()
{
	// Gracefully disconnecting from host.
	mSocket.disconnectFromHost();
	// Here we do not care for success or failure of operation since we will close anyway.
	mSocket.waitForDisconnected(3000);
	// Deleting GUI.
	delete ui;
}

void GamepadForm::on_connectButton_clicked()
{
	// Getting IP address of a robot.
	const auto ip = ui->robotIpLineEdit->text();

	// Connecting. 4444 is hardcoded here since it is default gamepad port on TRIK.
	mSocket.connectToHost(ip, 4444);

	// Waiting for opened connection and checking that connection is actually established.
	if (!mSocket.waitForConnected(3000)) {
		// If not, quitting, to keep things simple.
		QMessageBox::warning(this, "Connection failed", "Failed to connect to robot, will now quit");
		QApplication::quit();
	}

	// Ok, connection is established, now we can enable all buttons.
	setButtonsEnabled(true);
}

void GamepadForm::setButtonsEnabled(bool enabled)
{
	// Here we enable or disable pads and "magic buttons" depending on given parameter.
	ui->button1->setEnabled(enabled);
	ui->button2->setEnabled(enabled);
	ui->button3->setEnabled(enabled);
	ui->button4->setEnabled(enabled);
	ui->button5->setEnabled(enabled);

	ui->buttonPad1Left->setEnabled(enabled);
	ui->ButtonPad1Right->setEnabled(enabled);
	ui->buttonPad1Up->setEnabled(enabled);
	ui->buttonPad1Down->setEnabled(enabled);

	ui->buttonPad2Left->setEnabled(enabled);
	ui->ButtonPad2Right->setEnabled(enabled);
	ui->buttonPad2Up->setEnabled(enabled);
	ui->buttonPad2Down->setEnabled(enabled);
}

void GamepadForm::onButtonPressed(int buttonId)
{
	// Checking that we are still connected, just in case.
	if (mSocket.state() != QTcpSocket::ConnectedState) {
		return;
	}

	// Sending "btn <buttonId>" command to robot.
	if (mSocket.write(QString("btn %1\n").arg(buttonId).toLatin1()) == -1) {
		// If sending failed for some reason, we think that we lost connection and disable buttons.
		setButtonsEnabled(false);
	}
}

void GamepadForm::onPadPressed(const QString &action)
{
	// Here we send "pad <padId> <x> <y>" command.
	if (mSocket.state() != QTcpSocket::ConnectedState) {
		return;
	}

	if (mSocket.write((action + "\n").toLatin1()) == -1) {
		setButtonsEnabled(false);
	}
}

void GamepadForm::onPadReleased(int padId)
{
	// Here we send "pad <padId> up" command.
	if (mSocket.state() != QTcpSocket::ConnectedState) {
		return;
	}

	if (mSocket.write(QString("pad %1 up\n").arg(padId).toLatin1()) == -1) {
		setButtonsEnabled(false);
	}
}


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

namespace MakingWaves.Common.WS.Exceptions
{

    /// <summary>
    /// The exception of this type should be thrown, if the cause is made by the administrator: e.g. wrong configuration or maintenance.
    /// </summary>
    [global::System.Serializable]
    public class AdministratorException : MWBaseException
    {
        /// <summary> A log4net handle for writing log for this class </summary>
        private readonly static log4net.ILog log = log4net.LogManager.GetLogger(typeof(AdministratorException));

        public AdministratorException() { }
        public AdministratorException(string message) : base(message) { }
        public AdministratorException(string message, Exception inner) : base(message, inner) { }
        protected AdministratorException(
          System.Runtime.Serialization.SerializationInfo info,
          System.Runtime.Serialization.StreamingContext context)
            : base(info, context) { }

        public override void HandleMe()
        {
            string excStr = GetMessageWithInnerExceptions(this);
            log.Error(String.Format("Configuration exception:\r\n{0}", excStr), this);
        }
    }
}


text:
class CreateFooterLinks < ActiveRecord::Migration[5.0]
  def change
    create_table :footer_links do |t|
      t.string :title
      t.string :link
      t.integer :footer_id
    end
  end
end


text:
using syncable::BASE_VERSION;
using syncable::Blob;
using syncable::CHANGES_VERSION;
using syncable::CREATE;
using syncable::CREATE_NEW_UPDATE_ITEM;
using syncable::CTIME;
using syncable::Directory;
using syncable::Entry;
using syncable::GET_BY_HANDLE;
using syncable::GET_BY_ID;
using syncable::ID;
using syncable::IS_DEL;
using syncable::IS_DIR;
using syncable::IS_UNAPPLIED_UPDATE;
using syncable::IS_UNSYNCED;
using syncable::Id;
using syncable::META_HANDLE;
using syncable::MTIME;
using syncable::MutableEntry;
using syncable::NEXT_ID;
using syncable::NON_UNIQUE_NAME;
using syncable::PARENT_ID;
using syncable::PREV_ID;
using syncable::ReadTransaction;
using syncable::SERVER_CTIME;
using syncable::SERVER_IS_DEL;
using syncable::SERVER_IS_DIR;
using syncable::SERVER_MTIME;
using syncable::SERVER_NON_UNIQUE_NAME;
using syncable::SERVER_PARENT_ID;
using syncable::SERVER_POSITION_IN_PARENT;
using syncable::SERVER_SPECIFICS;
using syncable::SERVER_VERSION;
using syncable::UNIQUE_CLIENT_TAG;
using syncable::UNIQUE_SERVER_TAG;
using syncable::SPECIFICS;
using syncable::SYNCER;
using syncable::WriteTransaction;

namespace browser_sync {

// Returns the number of unsynced entries.
// static
int SyncerUtil::GetUnsyncedEntries(syncable::BaseTransaction* trans,
                                   std::vector<int64> *handles) {
  trans->directory()->GetUnsyncedMetaHandles(trans, handles);
  VLOG_IF(1, !handles->empty()) << "Have " << handles->size()
                                << " unsynced items.";
  return handles->size();
}

// static
void SyncerUtil::ChangeEntryIDAndUpdateChildren(
    syncable::WriteTransaction* trans,
    syncable::MutableEntry* entry,
    const syncable::Id& new_id,
    syncable::Directory::ChildHandles* children) {
  syncable::Id old_id = entry->Get(ID);
  if (!entry->Put(ID, new_id)) {
    Entry old_entry(trans, GET_BY_ID, new_id);
    CHECK(old_entry.good());
    LOG(FATAL) << "Attempt to change ID to " << new_id
               << " conflicts with existing entry.\n\n"
               << *entry << "\n\n" << old_entry;
  }
  if (entry->Get(IS_DIR)) {
    // Get all child entries of the old id.
    trans->directory()->GetChildHandles(trans, old_id, children);
    Directory::ChildHandles::iterator i = children->begin();
    while (i != children->end()) {
      MutableEntry child_entry(trans, GET_BY_HANDLE, *i++);
      CHECK(child_entry.good());
      // Use the unchecked setter here to avoid touching the child's NEXT_ID
      // and PREV_ID fields (which Put(PARENT_ID) would normally do to
      // maintain linked-list invariants).  In this case, NEXT_ID and PREV_ID
      // among the children will be valid after the loop, since we update all
      // the children at once.
      child_entry.PutParentIdPropertyOnly(new_id);
    }
  }
  // Update Id references on the previous and next nodes in the sibling
  // order.  Do this by reinserting into the linked list; the first
  // step in PutPredecessor is to Unlink from the existing order, which
  // will overwrite the stale Id value from the adjacent nodes.
  if (entry->Get(PREV_ID) == entry->Get(NEXT_ID) &&
      entry->Get(PREV_ID) == old_id) {
    // We just need a shallow update to |entry|'s fields since it is already
    // self looped.
    entry->Put(NEXT_ID, new_id);
    entry->Put(PREV_ID, new_id);
  } else {
    entry->PutPredecessor(entry->Get(PREV_ID));
  }
}

// static
void SyncerUtil::ChangeEntryIDAndUpdateChildren(
    syncable::WriteTransaction* trans,
    syncable::MutableEntry* entry,
    const syncable::Id& new_id) {
  syncable::Directory::ChildHandles children;
  ChangeEntryIDAndUpdateChildren(trans, entry, new_id, &children);
}

// static
syncable::Id SyncerUtil::FindLocalIdToUpdate(
    syncable::BaseTransaction* trans,
    const SyncEntity& update) {
  // Expected entry points of this function:
  // SyncEntity has NOT been applied to SERVER fields.
  // SyncEntity has NOT been applied to LOCAL fields.
  // DB has not yet been modified, no entries created for this update.

  const std::string& client_id = trans->directory()->cache_guid();

  if (update.has_client_defined_unique_tag() &&
      !update.client_defined_unique_tag().empty()) {
    // When a server sends down a client tag, the following cases can occur:
    // 1) Client has entry for tag already, ID is server style, matches
    // 2) Client has entry for tag already, ID is server, doesn't match.
    // 3) Client has entry for tag already, ID is local, (never matches)
    // 4) Client has no entry for tag

    // Case 1, we don't have to do anything since the update will
    // work just fine. Update will end up in the proper entry, via ID lookup.
    // Case 2 - Happens very rarely due to lax enforcement of client tags
    // on the server, if two clients commit the same tag at the same time.
    // When this happens, we pick the lexically-least ID and ignore all other
    // items.
    // Case 3 - We need to replace the local ID with the server ID so that
    // this update gets targeted at the correct local entry; we expect conflict
    // resolution to occur.
    // Case 4 - Perfect. Same as case 1.

    syncable::Entry local_entry(trans, syncable::GET_BY_CLIENT_TAG,
                                update.client_defined_unique_tag());

    // The SyncAPI equivalent of this function will return !good if IS_DEL.
    // The syncable version will return good even if IS_DEL.
    // TODO(chron): Unit test the case with IS_DEL and make sure.
    if (local_entry.good()) {
      if (local_entry.Get(ID).ServerKnows()) {
        if (local_entry.Get(ID) != update.id()) {
          // Case 2.
          LOG(WARNING) << "Duplicated client tag.";
          if (local_entry.Get(ID) < update.id()) {
            // Signal an error; drop this update on the floor.  Note that
            // we don't server delete the item, because we don't allow it to
            // exist locally at all.  So the item will remain orphaned on
            // the server, and we won't pay attention to it.
            return syncable::kNullId;
          }
        }
        // Target this change to the existing local entry; later,
        // we'll change the ID of the local entry to update.id()
        // if needed.
        return local_entry.Get(ID);
      } else {
        // Case 3: We have a local entry with the same client tag.
        // We should change the ID of the local entry to the server entry.
        // This will result in an server ID with base version == 0, but that's
        // a legal state for an item with a client tag.  By changing the ID,
        // update will now be applied to local_entry.
        DCHECK(0 == local_entry.Get(BASE_VERSION) ||
               CHANGES_VERSION == local_entry.Get(BASE_VERSION));
        return local_entry.Get(ID);
      }
    }
  } else if (update.has_originator_cache_guid() &&
      update.originator_cache_guid() == client_id) {
    // If a commit succeeds, but the response does not come back fast enough
    // then the syncer might assume that it was never committed.
    // The server will track the client that sent up the original commit and
    // return this in a get updates response. When this matches a local
    // uncommitted item, we must mutate our local item and version to pick up
    // the committed version of the same item whose commit response was lost.
    // There is however still a race condition if the server has not
    // completed the commit by the time the syncer tries to get updates
    // again. To mitigate this, we need to have the server time out in
    // a reasonable span, our commit batches have to be small enough
    // to process within our HTTP response "assumed alive" time.

    // We need to check if we have an entry that didn't get its server
    // id updated correctly. The server sends down a client ID
    // and a local (negative) id. If we have a entry by that
    // description, we should update the ID and version to the
    // server side ones to avoid multiple copies of the same thing.

    syncable::Id client_item_id = syncable::Id::CreateFromClientString(
        update.originator_client_item_id());
    DCHECK(!client_item_id.ServerKnows());
    syncable::Entry local_entry(trans, GET_BY_ID, client_item_id);

    // If it exists, then our local client lost a commit response.  Use
    // the local entry.
    if (local_entry.good() && !local_entry.Get(IS_DEL)) {
      int64 old_version = local_entry.Get(BASE_VERSION);
      int64 new_version = update.version();
      DCHECK_LE(old_version, 0);
      DCHECK_GT(new_version, 0);
      // Otherwise setting the base version could cause a consistency failure.
      // An entry should never be version 0 and SYNCED.
      DCHECK(local_entry.Get(IS_UNSYNCED));

      // Just a quick sanity check.
      DCHECK(!local_entry.Get(ID).ServerKnows());

      VLOG(1) << "Reuniting lost commit response IDs. server id: "
              << update.id() << " local id: " << local_entry.Get(ID)
              << " new version: " << new_version;

      return local_entry.Get(ID);
    }
  }
  // Fallback: target an entry having the server ID, creating one if needed.
  return update.id();
}

// static
UpdateAttemptResponse SyncerUtil::AttemptToUpdateEntry(
    syncable::WriteTransaction* const trans,
    syncable::MutableEntry* const entry,
    ConflictResolver* resolver,
    Cryptographer* cryptographer) {

  CHECK(entry->good());
  if (!entry->Get(IS_UNAPPLIED_UPDATE))
    return SUCCESS;  // No work to do.
  syncable::Id id = entry->Get(ID);

  if (entry->Get(IS_UNSYNCED)) {
    VLOG(1) << "Skipping update, returning conflict for: " << id
            << " ; it's unsynced.";
    return CONFLICT;
  }
  if (!entry->Get(SERVER_IS_DEL)) {
    syncable::Id new_parent = entry->Get(SERVER_PARENT_ID);
    Entry parent(trans, GET_BY_ID,  new_parent);
    // A note on non-directory parents:
    // We catch most unfixable tree invariant errors at update receipt time,
    // however we deal with this case here because we may receive the child
    // first then the illegal parent. Instead of dealing with it twice in
    // different ways we deal with it once here to reduce the amount of code and
    // potential errors.
    if (!parent.good() || parent.Get(IS_DEL) || !parent.Get(IS_DIR)) {
      return CONFLICT;
    }
    if (entry->Get(PARENT_ID) != new_parent) {
      if (!entry->Get(IS_DEL) && !IsLegalNewParent(trans, id, new_parent)) {
        VLOG(1) << "Not updating item " << id
                << ", illegal new parent (would cause loop).";
        return CONFLICT;
      }
    }
  } else if (entry->Get(IS_DIR)) {
    Directory::ChildHandles handles;
    trans->directory()->GetChildHandles(trans, id, &handles);
    if (!handles.empty()) {
      // If we have still-existing children, then we need to deal with
      // them before we can process this change.
      VLOG(1) << "Not deleting directory; it's not empty " << *entry;
      return CONFLICT;
    }
  }

  // We intercept updates to the Nigori node, update the Cryptographer and
  // encrypt any unsynced changes here because there is no Nigori
  // ChangeProcessor.
  const sync_pb::EntitySpecifics& specifics = entry->Get(SERVER_SPECIFICS);
  if (specifics.HasExtension(sync_pb::nigori)) {
    const sync_pb::NigoriSpecifics& nigori =
        specifics.GetExtension(sync_pb::nigori);
    if (!nigori.encrypted().blob().empty()) {
      if (cryptographer->CanDecrypt(nigori.encrypted())) {
        cryptographer->SetKeys(nigori.encrypted());
      } else {
        cryptographer->SetPendingKeys(nigori.encrypted());
      }
    }

    // Make sure any unsynced changes are properly encrypted as necessary.
    syncable::ModelTypeSet encrypted_types =
        syncable::GetEncryptedDataTypesFromNigori(nigori);
    if (!VerifyUnsyncedChangesAreEncrypted(trans, encrypted_types) &&
        (!cryptographer->is_ready() ||
         !syncable::ProcessUnsyncedChangesForEncryption(trans, encrypted_types,
                                                        cryptographer))) {
      // We were unable to encrypt the changes, possibly due to a missing
      // passphrase. We return conflict, even though the conflict is with the
      // unsynced change and not the nigori node. We ensure foward progress
      // because the cryptographer already has the pending keys set, so once
      // the new passphrase is entered we should be able to encrypt properly.
      // And, because this update will not be applied yet, next time around
      // we will properly encrypt all appropriate unsynced data.
      // Note: we return CONFLICT_ENCRYPTION instead of CONFLICT. See
      // explanation below.
      VLOG(1) << "Marking nigori node update as conflicting due to being unable"
              << " to encrypt all necessary unsynced changes.";
      return CONFLICT_ENCRYPTION;
    }

    // Note that we don't bother to encrypt any synced data that now requires
    // encryption. The machine that turned on encryption should encrypt
    // everything itself. It's possible it could get interrupted during this
    // process, but we currently reencrypt everything at startup as well,
    // so as soon as a client is restarted with this datatype encrypted, all the
    // data should be updated as necessary.
  }

  // Only apply updates that we can decrypt. If we can't decrypt the update, it
  // is likely because the passphrase has not arrived yet. Because the
  // passphrase may not arrive within this GetUpdates, we can't just return
  // conflict, else the syncer gets stuck. As such, we return
  // CONFLICT_ENCRYPTION, which is treated as a non-blocking conflict. See the
  // description in syncer_types.h.
  if (!entry->Get(SERVER_IS_DIR)) {
    if (specifics.has_encrypted() &&
        !cryptographer->CanDecrypt(specifics.encrypted())) {
      // We can't decrypt this node yet.
      VLOG(1) << "Received an undecryptable "
              << syncable::ModelTypeToString(entry->GetServerModelType())
              << " update, returning encryption_conflict.";
      return CONFLICT_ENCRYPTION;
    } else if (specifics.HasExtension(sync_pb::password)) {
      // Passwords use their own legacy encryption scheme.
      const sync_pb::PasswordSpecifics& password =
          specifics.GetExtension(sync_pb::password);
      if (!cryptographer->CanDecrypt(password.encrypted())) {
        VLOG(1) << "Received an undecryptable password update, returning "
                << "encryption_conflict.";
        return CONFLICT_ENCRYPTION;
      }
    }
  }

  SyncerUtil::UpdateLocalDataFromServerData(trans, entry);

  return SUCCESS;
}

namespace {
// Helper to synthesize a new-style sync_pb::EntitySpecifics for use locally,
// when the server speaks only the old sync_pb::SyncEntity_BookmarkData-based
// protocol.
void UpdateBookmarkSpecifics(const std::string& singleton_tag,
                             const std::string& url,
                             const std::string& favicon_bytes,
                             MutableEntry* local_entry) {
  // In the new-style protocol, the server no longer sends bookmark info for
  // the "google_chrome" folder.  Mimic that here.
  if (singleton_tag == "google_chrome")
    return;
  sync_pb::EntitySpecifics pb;
  sync_pb::BookmarkSpecifics* bookmark = pb.MutableExtension(sync_pb::bookmark);
  if (!url.empty())
    bookmark->set_url(url);
  if (!favicon_bytes.empty())
    bookmark->set_favicon(favicon_bytes);
  local_entry->Put(SERVER_SPECIFICS, pb);
}

}  // namespace

// Pass in name and checksum because of UTF8 conversion.
// static
void SyncerUtil::UpdateServerFieldsFromUpdate(
    MutableEntry* target,
    const SyncEntity& update,
    const std::string& name) {
  if (update.deleted()) {
    if (target->Get(SERVER_IS_DEL)) {
      // If we already think the item is server-deleted, we're done.
      // Skipping these cases prevents our committed deletions from coming
      // back and overriding subsequent undeletions.  For non-deleted items,
      // the version number check has a similar effect.
      return;
    }
    // The server returns very lightweight replies for deletions, so we don't
    // clobber a bunch of fields on delete.
    target->Put(SERVER_IS_DEL, true);
    if (!target->Get(UNIQUE_CLIENT_TAG).empty()) {
      // Items identified by the client unique tag are undeletable; when
      // they're deleted, they go back to version 0.
      target->Put(SERVER_VERSION, 0);
    } else {
      // Otherwise, fake a server version by bumping the local number.
      target->Put(SERVER_VERSION,
          std::max(target->Get(SERVER_VERSION),
                   target->Get(BASE_VERSION)) + 1);
    }
    target->Put(IS_UNAPPLIED_UPDATE, true);
    return;
  }

  DCHECK(target->Get(ID) == update.id())
      << "ID Changing not supported here";
  target->Put(SERVER_PARENT_ID, update.parent_id());
  target->Put(SERVER_NON_UNIQUE_NAME, name);
  target->Put(SERVER_VERSION, update.version());
  target->Put(SERVER_CTIME,
      ServerTimeToClientTime(update.ctime()));
  target->Put(SERVER_MTIME,
      ServerTimeToClientTime(update.mtime()));
  target->Put(SERVER_IS_DIR, update.IsFolder());
  if (update.has_server_defined_unique_tag()) {
    const std::string& tag = update.server_defined_unique_tag();
    target->Put(UNIQUE_SERVER_TAG, tag);
  }
  if (update.has_client_defined_unique_tag()) {
    const std::string& tag = update.client_defined_unique_tag();
    target->Put(UNIQUE_CLIENT_TAG, tag);
  }
  // Store the datatype-specific part as a protobuf.
  if (update.has_specifics()) {
    DCHECK(update.GetModelType() != syncable::UNSPECIFIED)
        << "Storing unrecognized datatype in sync database.";
    target->Put(SERVER_SPECIFICS, update.specifics());
  } else if (update.has_bookmarkdata()) {
    // Legacy protocol response for bookmark data.
    const SyncEntity::BookmarkData& bookmark = update.bookmarkdata();
    UpdateBookmarkSpecifics(update.server_defined_unique_tag(),
                            bookmark.bookmark_url(),
                            bookmark.bookmark_favicon(),
                            target);
  }
  if (update.has_position_in_parent())
    target->Put(SERVER_POSITION_IN_PARENT, update.position_in_parent());

  target->Put(SERVER_IS_DEL, update.deleted());
  // We only mark the entry as unapplied if its version is greater than the
  // local data. If we're processing the update that corresponds to one of our
  // commit we don't apply it as time differences may occur.
  if (update.version() > target->Get(BASE_VERSION)) {
    target->Put(IS_UNAPPLIED_UPDATE, true);
  }
}

// Creates a new Entry iff no Entry exists with the given id.
// static
void SyncerUtil::CreateNewEntry(syncable::WriteTransaction *trans,
                                const syncable::Id& id) {
  syncable::MutableEntry entry(trans, syncable::GET_BY_ID, id);
  if (!entry.good()) {
    syncable::MutableEntry new_entry(trans, syncable::CREATE_NEW_UPDATE_ITEM,
                                     id);
  }
}

// static
bool SyncerUtil::ServerAndLocalOrdersMatch(syncable::Entry* entry) {
  // Find the closest up-to-date local sibling by walking the linked list.
  syncable::Id local_up_to_date_predecessor = entry->Get(PREV_ID);
  while (!local_up_to_date_predecessor.IsRoot()) {
    Entry local_prev(entry->trans(), GET_BY_ID, local_up_to_date_predecessor);
    if (!local_prev.good() || local_prev.Get(IS_DEL))
      return false;
    if (!local_prev.Get(IS_UNAPPLIED_UPDATE) && !local_prev.Get(IS_UNSYNCED))
      break;
    local_up_to_date_predecessor = local_prev.Get(PREV_ID);
  }

  // Now find the closest up-to-date sibling in the server order.
  syncable::Id server_up_to_date_predecessor =
      entry->ComputePrevIdFromServerPosition(entry->Get(SERVER_PARENT_ID));
  return server_up_to_date_predecessor == local_up_to_date_predecessor;
}

// static
bool SyncerUtil::ServerAndLocalEntriesMatch(syncable::Entry* entry) {
  if (!ClientAndServerTimeMatch(
        entry->Get(CTIME), ClientTimeToServerTime(entry->Get(SERVER_CTIME)))) {
    LOG(WARNING) << "Client and server time mismatch";
    return false;
  }
  if (entry->Get(IS_DEL) && entry->Get(SERVER_IS_DEL))
    return true;
  // Name should exactly match here.
  if (!(entry->Get(NON_UNIQUE_NAME) == entry->Get(SERVER_NON_UNIQUE_NAME))) {
    LOG(WARNING) << "Unsanitized name mismatch";
    return false;
  }

  if (entry->Get(PARENT_ID) != entry->Get(SERVER_PARENT_ID) ||
      entry->Get(IS_DIR) != entry->Get(SERVER_IS_DIR) ||
      entry->Get(IS_DEL) != entry->Get(SERVER_IS_DEL)) {
    LOG(WARNING) << "Metabit mismatch";
    return false;
  }

  if (!ServerAndLocalOrdersMatch(entry)) {
    LOG(WARNING) << "Server/local ordering mismatch";
    return false;
  }

  // TODO(ncarter): This is unfortunately heavyweight.  Can we do better?
  if (entry->Get(SPECIFICS).SerializeAsString() !=
      entry->Get(SERVER_SPECIFICS).SerializeAsString()) {
    LOG(WARNING) << "Specifics mismatch";
    return false;
  }
  if (entry->Get(IS_DIR))
    return true;
  // For historical reasons, a folder's MTIME changes when its contents change.
  // TODO(ncarter): Remove the special casing of MTIME.
  bool time_match = ClientAndServerTimeMatch(entry->Get(MTIME),
      ClientTimeToServerTime(entry->Get(SERVER_MTIME)));
  if (!time_match) {
    LOG(WARNING) << "Time mismatch";
  }
  return time_match;
}

// static
void SyncerUtil::SplitServerInformationIntoNewEntry(
    syncable::WriteTransaction* trans,
    syncable::MutableEntry* entry) {
  syncable::Id id = entry->Get(ID);
  ChangeEntryIDAndUpdateChildren(trans, entry, trans->directory()->NextId());
  entry->Put(BASE_VERSION, 0);

  MutableEntry new_entry(trans, CREATE_NEW_UPDATE_ITEM, id);
  CopyServerFields(entry, &new_entry);
  ClearServerData(entry);

  VLOG(1) << "Splitting server information, local entry: " << *entry
          << " server entry: " << new_entry;
}

// This function is called on an entry when we can update the user-facing data
// from the server data.
// static
void SyncerUtil::UpdateLocalDataFromServerData(
    syncable::WriteTransaction* trans,
    syncable::MutableEntry* entry) {
  DCHECK(!entry->Get(IS_UNSYNCED));
  DCHECK(entry->Get(IS_UNAPPLIED_UPDATE));

  VLOG(2) << "Updating entry : " << *entry;
  // Start by setting the properties that determine the model_type.
  entry->Put(SPECIFICS, entry->Get(SERVER_SPECIFICS));
  entry->Put(IS_DIR, entry->Get(SERVER_IS_DIR));
  // This strange dance around the IS_DEL flag avoids problems when setting
  // the name.
  // TODO(chron): Is this still an issue? Unit test this codepath.
  if (entry->Get(SERVER_IS_DEL)) {
    entry->Put(IS_DEL, true);
  } else {
    entry->Put(NON_UNIQUE_NAME, entry->Get(SERVER_NON_UNIQUE_NAME));
    entry->Put(PARENT_ID, entry->Get(SERVER_PARENT_ID));
    CHECK(entry->Put(IS_DEL, false));
    Id new_predecessor =
        entry->ComputePrevIdFromServerPosition(entry->Get(SERVER_PARENT_ID));
    CHECK(entry->PutPredecessor(new_predecessor))
        << " Illegal predecessor after converting from server position.";
  }

  entry->Put(CTIME, entry->Get(SERVER_CTIME));
  entry->Put(MTIME, entry->Get(SERVER_MTIME));
  entry->Put(BASE_VERSION, entry->Get(SERVER_VERSION));
  entry->Put(IS_DEL, entry->Get(SERVER_IS_DEL));
  entry->Put(IS_UNAPPLIED_UPDATE, false);
}

// static
VerifyCommitResult SyncerUtil::ValidateCommitEntry(
    syncable::Entry* entry) {
  syncable::Id id = entry->Get(ID);
  if (id == entry->Get(PARENT_ID)) {
    CHECK(id.IsRoot()) << "Non-root item is self parenting." << *entry;
    // If the root becomes unsynced it can cause us problems.
    LOG(ERROR) << "Root item became unsynced " << *entry;
    return VERIFY_UNSYNCABLE;
  }
  if (entry->IsRoot()) {
    LOG(ERROR) << "Permanent item became unsynced " << *entry;
    return VERIFY_UNSYNCABLE;
  }
  if (entry->Get(IS_DEL) && !entry->Get(ID).ServerKnows()) {
    // Drop deleted uncommitted entries.
    return VERIFY_UNSYNCABLE;
  }
  return VERIFY_OK;
}

// static
bool SyncerUtil::AddItemThenPredecessors(
    syncable::BaseTransaction* trans,
    syncable::Entry* item,
    syncable::IndexedBitField inclusion_filter,
    syncable::MetahandleSet* inserted_items,
    std::vector<syncable::Id>* commit_ids) {

  if (!inserted_items->insert(item->Get(META_HANDLE)).second)
    return false;
  commit_ids->push_back(item->Get(ID));
  if (item->Get(IS_DEL))
    return true;  // Deleted items have no predecessors.

  Id prev_id = item->Get(PREV_ID);
  while (!prev_id.IsRoot()) {
    Entry prev(trans, GET_BY_ID, prev_id);
    CHECK(prev.good()) << "Bad id when walking predecessors.";
    if (!prev.Get(inclusion_filter))
      break;
    if (!inserted_items->insert(prev.Get(META_HANDLE)).second)
      break;
    commit_ids->push_back(prev_id);
    prev_id = prev.Get(PREV_ID);
  }
  return true;
}

// static
void SyncerUtil::AddPredecessorsThenItem(
    syncable::BaseTransaction* trans,
    syncable::Entry* item,
    syncable::IndexedBitField inclusion_filter,
    syncable::MetahandleSet* inserted_items,
    std::vector<syncable::Id>* commit_ids) {
  size_t initial_size = commit_ids->size();
  if (!AddItemThenPredecessors(trans, item, inclusion_filter, inserted_items,
                               commit_ids))
    return;
  // Reverse what we added to get the correct order.
  std::reverse(commit_ids->begin() + initial_size, commit_ids->end());
}

// static
void SyncerUtil::MarkDeletedChildrenSynced(
    const syncable::ScopedDirLookup &dir,
    std::set<syncable::Id>* deleted_folders) {
  // There's two options here.
  // 1. Scan deleted unsynced entries looking up their pre-delete tree for any
  //    of the deleted folders.
  // 2. Take each folder and do a tree walk of all entries underneath it.
  // #2 has a lower big O cost, but writing code to limit the time spent inside
  // the transaction during each step is simpler with 1. Changing this decision
  // may be sensible if this code shows up in profiling.
  if (deleted_folders->empty())
    return;
  Directory::UnsyncedMetaHandles handles;
  {
    ReadTransaction trans(dir, __FILE__, __LINE__);
    dir->GetUnsyncedMetaHandles(&trans, &handles);
  }
  if (handles.empty())
    return;
  Directory::UnsyncedMetaHandles::iterator it;
  for (it = handles.begin() ; it != handles.end() ; ++it) {
    // Single transaction / entry we deal with.
    WriteTransaction trans(dir, SYNCER, __FILE__, __LINE__);
    MutableEntry entry(&trans, GET_BY_HANDLE, *it);
    if (!entry.Get(IS_UNSYNCED) || !entry.Get(IS_DEL))
      continue;
    syncable::Id id = entry.Get(PARENT_ID);
    while (id != trans.root_id()) {
      if (deleted_folders->find(id) != deleted_folders->end()) {
        // We've synced the deletion of this deleted entries parent.
        entry.Put(IS_UNSYNCED, false);
        break;
      }
      Entry parent(&trans, GET_BY_ID, id);
      if (!parent.good() || !parent.Get(IS_DEL))
        break;
      id = parent.Get(PARENT_ID);
    }
  }
}

// static
VerifyResult SyncerUtil::VerifyNewEntry(
    const SyncEntity& update,
    syncable::Entry* target,
    const bool deleted) {
  if (target->good()) {
    // Not a new update.
    return VERIFY_UNDECIDED;
  }
  if (deleted) {
    // Deletion of an item we've never seen can be ignored.
    return VERIFY_SKIP;
  }

  return VERIFY_SUCCESS;
}

// Assumes we have an existing entry; check here for updates that break
// consistency rules.
// static
VerifyResult SyncerUtil::VerifyUpdateConsistency(
    syncable::WriteTransaction* trans,
    const SyncEntity& update,
    syncable::MutableEntry* target,
    const bool deleted,
    const bool is_directory,
    syncable::ModelType model_type) {

  CHECK(target->good());

  // If the update is a delete, we don't really need to worry at this stage.
  if (deleted)
    return VERIFY_SUCCESS;

  if (model_type == syncable::UNSPECIFIED) {
    // This update is to an item of a datatype we don't recognize. The server
    // shouldn't have sent it to us.  Throw it on the ground.
    return VERIFY_SKIP;
  }

  if (target->Get(SERVER_VERSION) > 0) {
    // Then we've had an update for this entry before.
    if (is_directory != target->Get(SERVER_IS_DIR) ||
        model_type != target->GetServerModelType()) {
      if (target->Get(IS_DEL)) {  // If we've deleted the item, we don't care.
        return VERIFY_SKIP;
      } else {
        LOG(ERROR) << "Server update doesn't agree with previous updates. ";
        LOG(ERROR) << " Entry: " << *target;
        LOG(ERROR) << " Update: "
                   << SyncerProtoUtil::SyncEntityDebugString(update);
        return VERIFY_FAIL;
      }
    }

    if (!deleted && (target->Get(ID) == update.id()) &&
        (target->Get(SERVER_IS_DEL) ||
         (!target->Get(IS_UNSYNCED) && target->Get(IS_DEL) &&
          target->Get(BASE_VERSION) > 0))) {
      // An undelete. The latter case in the above condition is for
      // when the server does not give us an update following the
      // commit of a delete, before undeleting.
      // Undeletion is common for items that reuse the client-unique tag.
      VerifyResult result =
          SyncerUtil::VerifyUndelete(trans, update, target);
      if (VERIFY_UNDECIDED != result)
        return result;
    }
  }
  if (target->Get(BASE_VERSION) > 0) {
    // We've committed this update in the past.
    if (is_directory != target->Get(IS_DIR) ||
        model_type != target->GetModelType()) {
      LOG(ERROR) << "Server update doesn't agree with committed item. ";
      LOG(ERROR) << " Entry: " << *target;
      LOG(ERROR) << " Update: "
                 << SyncerProtoUtil::SyncEntityDebugString(update);
      return VERIFY_FAIL;
    }
    if (target->Get(ID) == update.id()) {
      // Checks that are only valid if we're not changing the ID.
      if (target->Get(BASE_VERSION) == update.version() &&
          !target->Get(IS_UNSYNCED) &&
          !SyncerProtoUtil::Compare(*target, update)) {
        // TODO(sync): This constraint needs to be relaxed. For now it's OK to
        // fail the verification and deal with it when we ApplyUpdates.
        LOG(ERROR) << "Server update doesn't match local data with same "
            "version. A bug should be filed. Entry: " << *target <<
            "Update: " << SyncerProtoUtil::SyncEntityDebugString(update);
        return VERIFY_FAIL;
      }
      if (target->Get(SERVER_VERSION) > update.version()) {
        LOG(WARNING) << "We've already seen a more recent version.";
        LOG(WARNING) << " Entry: " << *target;
        LOG(WARNING) << " Update: "
                     << SyncerProtoUtil::SyncEntityDebugString(update);
        return VERIFY_SKIP;
      }
    }
  }
  return VERIFY_SUCCESS;
}

// Assumes we have an existing entry; verify an update that seems to be
// expressing an 'undelete'
// static
VerifyResult SyncerUtil::VerifyUndelete(syncable::WriteTransaction* trans,
                                        const SyncEntity& update,
                                        syncable::MutableEntry* target) {
  // TODO(nick): We hit this path for items deleted items that the server
  // tells us to re-create; only deleted items with positive base versions
  // will hit this path.  However, it's not clear how such an undeletion
  // would actually succeed on the server; in the protocol, a base
  // version of 0 is required to undelete an object.  This codepath
  // should be deprecated in favor of client-tag style undeletion
  // (where items go to version 0 when they're deleted), or else
  // removed entirely (if this type of undeletion is indeed impossible).
  CHECK(target->good());
  VLOG(1) << "Server update is attempting undelete. " << *target
          << "Update:" << SyncerProtoUtil::SyncEntityDebugString(update);
  // Move the old one aside and start over.  It's too tricky to get the old one
  // back into a state that would pass CheckTreeInvariants().
  if (target->Get(IS_DEL)) {
    DCHECK(target->Get(UNIQUE_CLIENT_TAG).empty())
        << "Doing move-aside undeletion on client-tagged item.";
    target->Put(ID, trans->directory()->NextId());
    target->Put(UNIQUE_CLIENT_TAG, "");
    target->Put(BASE_VERSION, CHANGES_VERSION);
    target->Put(SERVER_VERSION, 0);
    return VERIFY_SUCCESS;
  }
  if (update.version() < target->Get(SERVER_VERSION)) {
    LOG(WARNING) << "Update older than current server version for "
                 << *target << " Update:"
                 << SyncerProtoUtil::SyncEntityDebugString(update);
    return VERIFY_SUCCESS;  // Expected in new sync protocol.
  }
  return VERIFY_UNDECIDED;
}

}  // namespace browser_sync


text:
<!DOCTYPE html>

        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
        <meta name="description" content="Blankon is a theme fullpack admin template powered by Twitter bootstrap 3 front-end framework. Included are multiple example pages, elements styles, and javascript widgets to get your project started.">
        <meta name="keywords" content="admin, admin template, bootstrap3, clean, fontawesome4, good documentation, lightweight admin, responsive dashboard, webapp">
        <meta name="author" content="Djava UI">
        <title>TABS & ACCORDION | BLANKON - Fullpack Admin Theme</title>

        <link href="assets/global/img/ico/apple-touch-icon-144x144-precomposed.png" rel="apple-touch-icon-precomposed" sizes="144x144">
        <link href="assets/global/img/ico/apple-touch-icon-114x114-precomposed.png" rel="apple-touch-icon-precomposed" sizes="114x114">
        <link href="assets/global/img/ico/apple-touch-icon-72x72-precomposed.png" rel="apple-touch-icon-precomposed" sizes="72x72">
        <link href="assets/global/img/ico/apple-touch-icon-57x57-precomposed.png" rel="apple-touch-icon-precomposed">
        <link href="assets/global/img/ico/apple-touch-icon.png" rel="shortcut icon">

        <link href="http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700" rel="stylesheet">

        <link href="assets/global/plugins/bower_components/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">

        <link href="assets/global/plugins/bower_components/fontawesome/css/font-awesome.min.css" rel="stylesheet">
        <link href="assets/global/plugins/bower_components/animate.css/animate.min.css" rel="stylesheet">

        <link href="assets/admin/css/reset.css" rel="stylesheet">
        <link href="assets/admin/css/layout.css" rel="stylesheet">
        <link href="assets/admin/css/components.css" rel="stylesheet">
        <link href="assets/admin/css/plugins.css" rel="stylesheet">
        <link href="assets/admin/css/themes/default.theme.css" rel="stylesheet" id="theme">
        <link href="assets/admin/css/custom.css" rel="stylesheet">

                                <form class="navbar-form">

                                        <input type="text" class="form-control typeahead rounded" placeholder="Search for people, places and things">
                                        <button type="submit" class="btn btn-theme fa fa-search form-control-feedback rounded"></button>

                                </form>

                                7

                                        Messages (7)
                                        + New message

                                        <form class="form-horizontal" action="#">

                                                <input type="text" class="form-control input-sm" placeholder="Search message...">
                                                <button type="submit" class="btn btn-theme fa fa-search form-control-feedback"></button>

                                        </form>

                                                    John Kribo
                                                    I was impressed how fast the content is loaded. Congratulations. nice design.

                                                    13 minutes

                                                    Jennifer Poiyem
                                                    It's Simple, Clean & Nice .. Good work Dear .. GLWS

                                                    17 hours

                                                    Clara Wati
                                                    Great work! Do you have any plans to add loading indicators for AJAX calls that might take longer than normal?

                                                    1 days

                                                    Toni Mriang
                                                    I am very interested in the theme and I'm thinking about buying it.

                                                    2 days

                                                    Bella negoro
                                                    Great work! Good luck!

                                                    1 week

                                                    Kim Mbako
                                                    Hi! First of all, thank you for the very nice theme for creating awesome web applications :)

                                                    1 week

                                                    Pack Suparman
                                                    Apik temen kie jan template, nyong gep tuku jal..

                                                    1 week

                                                Load more messages...

                                        See All

                                6

                                        Notifications (10)
                                         Setting

                                                    Dolanan Remi : Chris Job,Denny Puk and Joko Fernandes sent you 5 free energy boosts and other request

                                                    3 minutes

                                                    Your sistem is updated

                                                    5 minutes

                                                    3 Member is BANNED

                                                    5 minutes

                                                    daddy pushed to project Blankon version 1.0.0

                                                    45 minutes

                                                    Change your user profile

                                                    1 days

                                                    Added new article

                                                    1 days

                                                Load more notifications...

                                        See All

                                        Tol Lee

Account

View profile

Inbox 30

Invite a friend

Product

Upload

Earning

Withdrawals

Logout

Hello, Lee

                            Web Designer

                            Dashboard

                            Frontend themes

                            Blankon Versions

                        APPS

                            Blog

Grid

List

Single

                            Mail

Inbox

Compose mail

View mail

                            Pages

Gallery

Calendar

FAQ New

Invoice

Messages

Timeline

Profile

                                Search

Courses

                                Error

Error 403

Error 403 Type 2

Error 404

Error 404 Type 2

Error 500

Error 500 Type 2

                                Account

Sign In

Sign In Type 2

Sign Up

Lost password

Lock Screen

                        UI KIT

                            Forms

Element

Advanced

Layout

Validation

Wizard

Text Editor

X-Editable

                            Tables

Default

Color

Datatable

                            Maps

Google

Vector

                            Charts

Flot

Morris

Chartjs

C3js

                        DEVELOP

                            Components

Grid System

Buttons

Typography

Panels

Alerts

Modals

Video New

Tabs & Accordion

Sliders

                                    Icons
                                    6

Glyphicons

Glyphicons PRO

Font Awesome

Weather Icons

Map Icons

Simple Line Icons

Other

                            Layouts

Blank Page

Boxed Page

Header Fixed Page

Sidebar Fixed Page

Sidebar Minimize Page

Sidebar Default Page

Sidebar Box Page

Sidebar Rounded Page

Sidebar Circle Page

Footer Fixed Page

                            Sub Menu

                                    Level 1

                                            Level 2

                                                    Level 3

                                                            Level 4

                                                                Level 5

                                                                Level 5

                                                                Level 5

                                                        Level 4

                                                        Level 4

                                                Level 3

                                                Level 3

                                        Level 2

                                        Level 2

                                    Level 1

                                    Level 1

                            Animate.css
                            New

                        WIDGET

                            Overview
                            10

                            Social
                            28

                            Blog
                            15

                            Weather
                            6

                            Misc
                            9

                        BLANKON CORE

                            API Documentation

 Tabs & Accordion general ui components

                        You are here:

                                Dashboard

                                Components

Tabs & Accordion

Add quick, dynamic tab functionality to transition through panes of local content

                                                Personal

                                                Product

                                                Payment

                                                Confirmation

Personal details content

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Product details content

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Payment content

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Confirmation content

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

                                                    Step 1
                                                    Personal details

                                                    Step 2
                                                    Product details

                                                    Step 3
                                                    Payment

                                                    Step 4
                                                    Confirmation

Personal details content

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Product details content

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Payment content

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Confirmation content

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

                                                    Step 1
                                                    Personal details

                                                    Step 2
                                                    Product details

                                                    Step 3
                                                    Payment

                                                    Step 4
                                                    Confirmation

Personal details content

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Product details content

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Payment content

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Confirmation content

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

                                                        Step 1
                                                        Personal details

                                                        Step 2
                                                        Product details

                                                        Step 3
                                                        Payment

                                                        Step 4
                                                        Confirmation

Personal details content

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Product details content

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Payment content

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Confirmation content

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

«

1

2

3

4

5

»

Get base styles and flexible support for collapsible components like accordions and navigation.

                                                Collapsible Group Item #1

                                            Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.

                                                Collapsible Group Item #2

                                            Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.

                                                Collapsible Group Item #3

                                            Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS.

                                             Home

                                                         Articles

                                                         News

                                                         About

                                                         Comments 42

                                             Profile

                                                        Change Password

                                                        Notifications 9

                                                        Import

                                                         Delete Account

                                             Examples

                                                        Orders $ 42

                                                        Invoices

                                                        Shipments

                                                        Logging

                                                 Reports

                                                         Sales

                                                         Customers

                                                         Products

                                                         Shopping Cart

                                 Item 1

                                    Subitem 1

                                        Subitem 1
                                        Subitem 2

                                             Subitem 3

                                            Sub sub item 3.1
                                            Sub sub item 3.2

                                        Subitem 4

                                             Subitem 5

                                            Sub sub item 5.1
                                            Sub sub item 5.2

                                    Subitem 2
                                    Subitem 3

                                Item 2

                                    Subitem 1
                                     Subitem 2

                                             Sub sub item 1

                                             Sub sub item 2

                                    Subitem 3

                    2014 - 2015 © Blankon Admin. Created by Djava UI, Yogyakarta ID
                    0.01 GB(0%) of 15 GB used

                                            ABOUT ME

                                                    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed

                                                     Last update about 2 hours ago

                                                     Total time spent 250 hrs

                                                     Tol.lee@djavaui.com

                                                     1 405 777 1212

                                            RECENT ACTIVITY

                                                        Added a note to Ticket #947
                                                        about 2 hours ago

                                                        Added a product to Ticket #948
                                                        about 3 hours ago

                                                        Added a service to Ticket #949
                                                        about 15 hours ago

                                            CURRENTLY WORKING

                                                        Daddy Botak
                                                        online

                                                        Sarah Tingting
                                                        offline

                                                        7 m

                                                        Nicolas Olivier
                                                        busy

                                                        Claudia Cinta
                                                        online

                                                        Catherine Parker
                                                        busy

                                             RESET SETTINGS

                                            LAYOUT

                                                        <input id="layout-fluid" type="radio" name="layout" value="">
                                                        Fluid

                                                        <input id="layout-boxed" type="radio" name="layout" value="page-boxed">
                                                        Boxed

                                            HEADER

                                                        <input id="header-default" type="radio" name="header" value="">
                                                        Default

                                                        <input id="header-fixed" type="radio" name="header" value="page-header-fixed">
                                                        Fixed

                                            SIDEBAR

                                                        <input id="sidebar-default" type="radio" name="sidebar" value="">
                                                        Default

                                                        <input id="sidebar-fixed" type="radio" name="sidebar" value="page-sidebar-fixed">
                                                        Fixed

                                            SIDEBAR TYPE

                                                        <input id="sidebar-type-default" type="radio" name="sidebarType" value="">
                                                        Default

                                                        <input id="sidebar-type-box" type="radio" name="sidebarType" value="sidebar-box">
                                                        Box

                                                        <input id="sidebar-type-rounded" type="radio" name="sidebarType" value="sidebar-rounded">
                                                        Rounded

                                                        <input id="sidebar-type-circle" type="radio" name="sidebarType" value="sidebar-circle">
                                                        Circle

                                            FOOTER

                                                        <input id="footer-default" type="radio" name="footer" value="">
                                                        Default

                                                        <input id="footer-fixed" type="radio" name="footer" value="page-footer-fixed">
                                                        Fixed

                                            COLOR SCHEMES

                                                default
                                                blue
                                                cyan
                                                green
                                                red
                                                yellow
                                                purple
                                                brown
                                                green-army

                                                blue-sea
                                                blue-gray
                                                purple-gray
                                                purple-wine
                                                alizarin-crimson
                                                black-and-white
                                                amazon
                                                amber
                                                android-green

                                                antique-brass
                                                antique-bronze
                                                artichoke
                                                atomic-tangerine
                                                bazaar
                                                bistre-brown
                                                bittersweet
                                                blueberry
                                                bud-green

                                            NAVBAR COLOR

                                                dark
                                                light
                                                primary
                                                success
                                                info
                                                warning
                                                danger

                                            SIDEBAR COLOR

                                                dark
                                                light
                                                primary
                                                success
                                                info
                                                warning
                                                danger

                                            TASK PROGRESS

  Core System   82%

  Front-End   67%

  Back-End   45%

                                            SUMMARY SYSTEM

                                                        Average Users

1, 412, 101

4,2,3,2,4,2,5,1,2,2,5,3

                                                        Daily Traffic

781, 601

1,2,3,2,4,1,5,3,2,4,2,3

                                                        Disk Usage

52.2%

5,5,3,2,1,3,4,3,2,4,1,3

                                                        CPU Usage

67.8%

1,5,3,2,4,5,5,3,2,4,5,3

                                    <form class="form-horizontal">

                                            <input class="form-control" type="text" placeholder="Search messages...">

                                    </form>

                                            FAMILY

                                                        Daddy Botak
                                                        online

                                                        Sarah Tingting
                                                        offline

                                                        7 m

                                                        Nicolas Olivier
                                                        busy

                                                        Harry Potret
                                                        online

                                                        Catherine Parker
                                                        busy

                                            FRIENDS

                                                        Jeck Joko
                                                        online

                                                        Tenny Imoet
                                                        busy

                                                        Leli Madang
                                                        offline

                                                        2 m

                                                        Rebecca Cabean
                                                        offline

                                                        8 m

                                                        ondoel return
                                                        busy

                                            OTHERS

                                                        Sishy Mawar
                                                        offline

                                                        23 m

                                                        Mbah Roso
                                                        away

                                                        2 h

                                                        Alma Butoi
                                                        busy