text:
<html>
<head>
<link rel="help" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/elements.html#dom-document-dir"/>
<script>
var headReadDocumentDir = document.dir;
document.dir = "rtl";
var headWriteDocumentDir = document.dir;
</script>
</head>
<body>
<script src="../../resources/js-test.js"></script>
<script>
description("document.dir should reflect the 'dir' content attribute of the <html> element and should be settable in <head>.");

debug("Read document.dir in head");
shouldBeEqualToString("headReadDocumentDir", "");
debug("");

debug("Write document.dir in head");
shouldBeEqualToString("headWriteDocumentDir", "rtl");
debug("");

debug("Read document.dir in body");
shouldBeEqualToString("document.dir", "rtl");
debug("");

debug("Read document.documentElement.dir in body");
shouldBeEqualToString("document.documentElement.dir", "rtl");
debug("");

debug("Read document.documentElement.getAttribute('dir') in body");
shouldBeEqualToString("document.documentElement.getAttribute('dir')", "rtl");
debug("");

debug("Read document.body.dir in body");
shouldBeEqualToString("document.body.dir", "");
debug("");

debug("Write document.dir in body");
document.dir = "ltr";
shouldBeEqualToString("document.dir", "ltr");
debug("");

debug("Read document.documentElement.dir in body");
shouldBeEqualToString("document.documentElement.dir", "ltr");
debug("");

debug("Read document.body.dir in body");
shouldBeEqualToString("document.body.dir", "");
debug("");

debug("Read document.documentElement.getAttribute('dir') in body");
shouldBeEqualToString("document.documentElement.getAttribute('dir')", "ltr");
debug("");

debug("Write non-canonical case document.dir in body");
shouldNotThrow("document.dir = 'RTL'");
shouldBeEqualToString("document.dir", "rtl");
debug("");

debug("Read document.documentElement.getAttribute('dir') in body");
shouldBeEqualToString("document.documentElement.getAttribute('dir')", "RTL");
debug("");

debug("Write invalid document.dir in body");
shouldNotThrow("document.dir = 'WRONG'");
shouldBeEqualToString("document.dir", "");
debug("");

debug("Read document.documentElement.getAttribute('dir') in body");
shouldBeEqualToString("document.documentElement.getAttribute('dir')", "WRONG");
debug("");

debug("Write non-canonical case document.body.dir in body");
shouldNotThrow("document.body.dir = 'RTL'");
shouldBeEqualToString("document.body.dir", "rtl");
debug("");

debug("Write invalid document.body.dir in body");
shouldNotThrow("document.body.dir = 'WRONG'");
shouldBeEqualToString("document.body.dir", "");
debug("");

document.dir = null;
debug("Read document.dir in body");
shouldBeEqualToString("document.dir", "");
debug("");

debug("Read document.documentElement.getAttribute('dir') in body");
shouldBeEqualToString("document.documentElement.getAttribute('dir')", "null");
debug("");

</script>
</body>
</html>


text:
title: How to clear Home Menu extdata
help-desc: Deleting home menu extdata
---

1. Navigate to the following folder on your SD card: `/Nintendo 3DS/(32 Character ID)/(32 Character ID)/extdata/00000000/`
2. Delete the corresponding folder for your region:
  USA: `0000008f`
  EUR: `00000098`
  JPN: `00000082`
  KOR: `000000A9`

redpajama_set_name: RedPajamaGithub


text:
package main

import (
        "flag"
	"fmt"
	"io/ioutil"
	"log"
	"strings"
)

func parseFile(filename string) []string {
	line_bytes, err := ioutil.ReadFile(filename)
	if err != nil {
		log.Fatal(err)
	}

	line := string(line_bytes)
	clean_line := strings.Trim(line, "\n")
	return strings.Split(clean_line, ",")
}

func getCounts(elements []string) map[string]int {
	counts := make(map[string]int)
	for _, element := range elements {
		_, present := counts[element]
		if present {
			counts[element]++
		} else {
			counts[element] = 1
		}
	}
	return counts
}

func naiveMajorityElement(elements []string) {
	counts := getCounts(elements)
	for k, v := range counts {
		if v > len(elements) / 2 {
			fmt.Println(k)
			return
		}
	}
	fmt.Println(nil)
}

var inputFile = flag.String("input-file", "input.txt", "input file")

func main() {
        flag.Parse()

	elements := parseFile(*inputFile)
	naiveMajorityElement(elements)
}


text:
@class OCDViewController;

@interface OCDAppDelegate : UIResponder <UIApplicationDelegate>

@property (strong, nonatomic) UIWindow *window;

@property (strong, nonatomic) OCDViewController *viewController;

@end


text:
<?php

/* sprint2RealEstateAdminBundle::admin_layout.html.twig */
class __TwigTemplate_d9c921eec837a9e663828ef1598fc1c1f7116a2600ce66a8911d039bfa02af9e extends Twig_Template
{
    public function __construct(Twig_Environment $env)
    {
        parent::__construct($env);

        $this->parent = false;

        $this->blocks = array(
            'DashActive' => array($this, 'block_DashActive'),
            'MailboxActive' => array($this, 'block_MailboxActive'),
            'MailboxEtra' => array($this, 'block_MailboxEtra'),
            'MailboxEtra2' => array($this, 'block_MailboxEtra2'),
            'clientsActive' => array($this, 'block_clientsActive'),
            'gerantsActive' => array($this, 'block_gerantsActive'),
            'AganceActive' => array($this, 'block_AganceActive'),
            'offreActive' => array($this, 'block_offreActive'),
            'StatActive' => array($this, 'block_StatActive'),
            'DashCore' => array($this, 'block_DashCore'),
            'MailCore' => array($this, 'block_MailCore'),
            'clientsCore' => array($this, 'block_clientsCore'),
            'gerantsCore' => array($this, 'block_gerantsCore'),
            'AganceCore' => array($this, 'block_AganceCore'),
            'offreCore' => array($this, 'block_offreCore'),
            'StatCore' => array($this, 'block_StatCore'),
        );
    }

    protected function doDisplay(array $context, array $blocks = array())
    {
        // line 1
        echo "<!DOCTYPE html>

    <meta charset=\"UTF-8\">
    <title>TiMob | Dashboard</title>
    <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>

    <link href=\"";
        // line 8
        echo twig_escape_filter($this->env, $this->env->getExtension('assets')->getAssetUrl("css/bootstrap.css"), "html", null, true);
        echo "\" rel=\"stylesheet\" type=\"text/css\" />

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

    <link href=\"http://code.ionicframework.com/ionicons/2.0.0/css/ionicons.min.css\" rel=\"stylesheet\" type=\"text/css\" />
    <link href=\"";
        // line 13
        echo twig_escape_filter($this->env, $this->env->getExtension('assets')->getAssetUrl("bundles/sprint2realestateadmin/less/dropdown.less"), "html", null, true);
        echo "\" rel=\"stylesheet/less\" type=\"text/css\" />

    <link href=\"";
        // line 15
        echo twig_escape_filter($this->env, $this->env->getExtension('assets')->getAssetUrl("bundles/sprint2realestateadmin/plugins/morris/morris.css"), "html", null, true);
        echo "\" rel=\"stylesheet\" type=\"text/css\" />

    <link href=\"";
        // line 17
        echo twig_escape_filter($this->env, $this->env->getExtension('assets')->getAssetUrl("bundles/sprint2realestateadmin/plugins/jvectormap/jquery-jvectormap-1.2.2.css"), "html", null, true);
        echo "\" rel=\"stylesheet\" type=\"text/css\" />

    <link href=\"";
        // line 19
        echo twig_escape_filter($this->env, $this->env->getExtension('assets')->getAssetUrl("bundles/sprint2realestateadmin/plugins/daterangepicker/daterangepicker-bs3.css"), "html", null, true);
        echo "\" rel=\"stylesheet\" type=\"text/css\" />

    <link href=\"";
        // line 21
        echo twig_escape_filter($this->env, $this->env->getExtension('assets')->getAssetUrl("bundles/sprint2realestateadmin/css/AdminLTE.css"), "html", null, true);
        echo "\" rel=\"stylesheet\" type=\"text/css\" />

    <link href=\"";
        // line 24
        echo twig_escape_filter($this->env, $this->env->getExtension('assets')->getAssetUrl("bundles/sprint2realestateadmin/css/skins/_all-skins.min.css"), "html", null, true);
        echo "\" rel=\"stylesheet\" type=\"text/css\" />

    <link href=\"";
        // line 26
        echo twig_escape_filter($this->env, $this->env->getExtension('assets')->getAssetUrl("bundles/sprint2realestateadmin/plugins/datatables/dataTables.bootstrap.css"), "html", null, true);
        echo "\" rel=\"stylesheet\" type=\"text/css\" />

        env, $this->env->getExtension('assets')->getAssetUrl("bundles/sprint2realestateadmin/img/logo.png"), "html", null, true);
        echo "\"/>

            Toggle navigation

                  4

You have 4 messages

                            env, $this->env->getExtension('assets')->getAssetUrl("bundles/sprint2realestateadmin/img/user2-160x160.jpg"), "html", null, true);
        echo "\" class=\"img-circle\" alt=\"User Image\"/>

                            Support Team
                             5 mins

Why not buy a new awesome theme?

                            env, $this->env->getExtension('assets')->getAssetUrl("bundles/sprint2realestateadmin/img/user3-128x128.jpg"), "html", null, true);
        echo "\" class=\"img-circle\" alt=\"user image\"/>

                            AdminLTE Design Team
                             2 hours

Why not buy a new awesome theme?

                            env, $this->env->getExtension('assets')->getAssetUrl("bundles/sprint2realestateadmin/img/user4-128x128.jpg"), "html", null, true);
        echo "\" class=\"img-circle\" alt=\"user image\"/>

                            Developers
                             Today

Why not buy a new awesome theme?

                            env, $this->env->getExtension('assets')->getAssetUrl("bundles/sprint2realestateadmin/img/user3-128x128.jpg"), "html", null, true);
        echo "\" class=\"img-circle\" alt=\"user image\"/>

                            Sales Department
                             Yesterday

Why not buy a new awesome theme?

                            env, $this->env->getExtension('assets')->getAssetUrl("bundles/sprint2realestateadmin/img/user4-128x128.jpg"), "html", null, true);
        echo "\" class=\"img-circle\" alt=\"user image\"/>

                            Reviewers
                             2 days

Why not buy a new awesome theme?

See All Messages

                  10

You have 10 notifications

                           5 new members joined today

                           Very long description here that may not fit into the page and may cause design problems

                           5 new members joined

                           25 sales made

                           You changed your username

View all

                  env, $this->env->getExtension('assets')->getAssetUrl("bundles/sprint2realestateadmin/img/user2-160x160.jpg"), "html", null, true);
        echo "\" class=\"user-image\" alt=\"User Image\"/>
                  Alexander Pierce

                    env, $this->env->getExtension('assets')->getAssetUrl("bundles/sprint2realestateadmin/img/user2-160x160.jpg"), "html", null, true);
        echo "\" class=\"img-circle\" alt=\"User Image\" />

                      Alexander Pierce - Web Developer
                      Member since Nov. 2012

                      Profile

                      Sign out

              env, $this->env->getExtension('assets')->getAssetUrl("bundles/sprint2realestateadmin/img/user2-160x160.jpg"), "html", null, true);
        echo "\" class=\"img-circle\" alt=\"User Image\" />

Alexander Pierce

               Online

          <form action=\"#\" method=\"get\" class=\"sidebar-form\">

              <input type=\"text\" name=\"q\" class=\"form-control\" placeholder=\"Search...\"/>

                <button type='submit' name='search' id='search-btn' class=\"btn btn-flat\"></button>

          </form>

MAIN NAVIGATION

displayBlock('DashActive', $context, $blocks);
        echo ">

                 Dashboard

displayBlock('MailboxActive', $context, $blocks);
        echo ">

                 Mailbox
                ";
        // line 236
        $this->displayBlock('MailboxEtra', $context, $blocks);
        // line 237
        echo "
              ";
        // line 238
        $this->displayBlock('MailboxEtra2', $context, $blocks);
        // line 239
        echo "

displayBlock('clientsActive', $context, $blocks);
        echo ">

                 Liste des clients

displayBlock('gerantsActive', $context, $blocks);
        echo ">

                 Liste des gérants

displayBlock('AganceActive', $context, $blocks);
        echo ">

                 Liste des Agence

displayBlock('offreActive', $context, $blocks);
        echo ">

                 Liste des offre

displayBlock('StatActive', $context, $blocks);
        echo ">

                 Statistiques

        ";
        // line 278
        $this->displayBlock('DashCore', $context, $blocks);
        // line 279
        echo "        ";
        $this->displayBlock('MailCore', $context, $blocks);
        // line 280
        echo "        ";
        $this->displayBlock('clientsCore', $context, $blocks);
        // line 281
        echo "        ";
        $this->displayBlock('gerantsCore', $context, $blocks);
        // line 282
        echo "        ";
        $this->displayBlock('AganceCore', $context, $blocks);
        // line 283
        echo "        ";
        $this->displayBlock('offreCore', $context, $blocks);
        // line 284
        echo "        ";
        $this->displayBlock('StatCore', $context, $blocks);
        echo "

        Copyright © 2015 Timob All rights reserved.

";
    }

    // line 228
    public function block_DashActive($context, array $blocks = array())
    {
    }

    // line 233
    public function block_MailboxActive($context, array $blocks = array())
    {
    }

    // line 236
    public function block_MailboxEtra($context, array $blocks = array())
    {
    }

    // line 238
    public function block_MailboxEtra2($context, array $blocks = array())
    {
    }

    // line 240
    public function block_clientsActive($context, array $blocks = array())
    {
    }

    // line 246
    public function block_gerantsActive($context, array $blocks = array())
    {
    }

    // line 252
    public function block_AganceActive($context, array $blocks = array())
    {
    }

    // line 258
    public function block_offreActive($context, array $blocks = array())
    {
    }

    // line 263
    public function block_StatActive($context, array $blocks = array())
    {
    }

    // line 278
    public function block_DashCore($context, array $blocks = array())
    {
    }

    // line 279
    public function block_MailCore($context, array $blocks = array())
    {
    }

    // line 280
    public function block_clientsCore($context, array $blocks = array())
    {
    }

    // line 281
    public function block_gerantsCore($context, array $blocks = array())
    {
    }

    // line 282
    public function block_AganceCore($context, array $blocks = array())
    {
    }

    // line 283
    public function block_offreCore($context, array $blocks = array())
    {
    }

    // line 284
    public function block_StatCore($context, array $blocks = array())
    {
    }

    public function getTemplateName()
    {
        return "sprint2RealEstateAdminBundle::admin_layout.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  602 => 284,  597 => 283,  592 => 282,  587 => 281,  582 => 280,  577 => 279,  572 => 278,  567 => 263,  562 => 258,  557 => 252,  552 => 246,  547 => 240,  542 => 238,  537 => 236,  532 => 233,  527 => 228,  505 => 328,  499 => 325,  495 => 324,  490 => 322,  484 => 319,  478 => 316,  473 => 314,  468 => 312,  463 => 310,  458 => 308,  453 => 306,  449 => 305,  444 => 303,  439 => 301,  434 => 299,  429 => 297,  424 => 295,  409 => 284,  406 => 283,  403 => 282,  400 => 281,  397 => 280,  394 => 279,  392 => 278,  374 => 263,  366 => 258,  357 => 252,  348 => 246,  339 => 240,  336 => 239,  334 => 238,  331 => 237,  329 => 236,  323 => 233,  315 => 228,  291 => 207,  258 => 177,  249 => 171,  186 => 111,  171 => 99,  156 => 87,  141 => 75,  126 => 63,  99 => 39,  83 => 26,  78 => 24,  72 => 21,  67 => 19,  62 => 17,  57 => 15,  52 => 13,  44 => 8,  35 => 1,);
    }
}


text:
package com.intellij.lang.xml;

import com.intellij.lang.ASTNode;
import com.intellij.lang.ParserDefinition;
import com.intellij.lang.PsiParser;
import com.intellij.lexer.Lexer;
import com.intellij.lexer.XmlLexer;
import com.intellij.openapi.project.Project;
import com.intellij.psi.FileViewProvider;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiFile;
import com.intellij.psi.impl.source.parsing.xml.XmlParser;
import com.intellij.psi.impl.source.xml.XmlFileImpl;
import com.intellij.psi.impl.source.xml.stub.XmlStubBasedElementType;
import com.intellij.psi.tree.IFileElementType;
import com.intellij.psi.tree.TokenSet;
import com.intellij.psi.xml.XmlElementType;
import com.intellij.psi.xml.XmlTokenType;
import com.intellij.util.IncorrectOperationException;
import org.jetbrains.annotations.NotNull;

public class XMLParserDefinition implements ParserDefinition {
  @Override
  @NotNull
  public Lexer createLexer(Project project) {
    return new XmlLexer();
  }

  @Override
  public @NotNull IFileElementType getFileNodeType() {
    return XmlElementType.XML_FILE;
  }

  @Override
  @NotNull
  public TokenSet getWhitespaceTokens() {
    return XmlTokenType.WHITESPACES;
  }

  @Override
  @NotNull
  public TokenSet getCommentTokens() {
    return XmlTokenType.COMMENTS;
  }

  @Override
  @NotNull
  public TokenSet getStringLiteralElements() {
    return TokenSet.EMPTY;
  }

  @Override
  @NotNull
  public PsiParser createParser(final Project project) {
    return new XmlParser();
  }

  @Override
  @NotNull
  public PsiElement createElement(ASTNode node) {
    if (node.getElementType() instanceof XmlStubBasedElementType) {
      //noinspection rawtypes
      return ((XmlStubBasedElementType)node.getElementType()).createPsi(node);
    }
    throw new IncorrectOperationException("I dont know how to create XML PSI for this node: "+node+" ("+node.getClass()+")");
  }

  @Override
  public @NotNull PsiFile createFile(@NotNull FileViewProvider viewProvider) {
    return new XmlFileImpl(viewProvider, XmlElementType.XML_FILE);
  }

  @Override
  public @NotNull SpaceRequirements spaceExistenceTypeBetweenTokens(ASTNode left, ASTNode right) {
    return canStickTokensTogether(left, right);
  }

  public static SpaceRequirements canStickTokensTogether(final ASTNode left, final ASTNode right) {
    if (left.getElementType() == XmlTokenType.XML_ATTRIBUTE_VALUE_TOKEN ||
        right.getElementType() == XmlTokenType.XML_ATTRIBUTE_VALUE_TOKEN) {
      return SpaceRequirements.MUST_NOT;
    }
    if (left.getElementType() == XmlTokenType.XML_ATTRIBUTE_VALUE_END_DELIMITER && right.getElementType() == XmlTokenType.XML_NAME) {
      return SpaceRequirements.MUST;
    }
    if (left.getElementType() == XmlTokenType.XML_NAME && right.getElementType() == XmlTokenType.XML_NAME) {
      return SpaceRequirements.MUST;
    }
    if (left.getElementType() == XmlTokenType.XML_TAG_NAME && right.getElementType() == XmlTokenType.XML_NAME) {
      return SpaceRequirements.MUST;
    }
    return SpaceRequirements.MAY;
  }
}


text:
<?
ini_set('display_errors',1);
error_reporting(E_ALL);

//if( !isset($_FILES['file']) ) exit( "Ошибка: Файл не отправлен" );

session_start();
include_once("classes/userfiles.php");
$files = new userfiles();
$files->saveFile($_FILES['file']);

require_once($_SERVER["DOCUMENT_ROOT"]. "/personal/classes/userfiles.php");

$client = new userfiles();

//$data = array("filename" => "bigfile", 'params' => array("username" => "djon") );

if( isset($_FILES['file']) && count( $_FILES['file'] ) )
{

	if( ($file = $client->saveFile($_FILES['file'], $_POST)) !== false ){

		if( ($folders = $client->getAllClientFilesTree($_POST['table']) ) ){
			echo '{"success" : true, "msg" : "Файл(ы) успешно сохранен(ы)", "folders" : "'.$client->renderTemplate($folders).'"}';
		}
	}else echo '{"success" : false, "msg" : "Произошла ошибка, не удалось сохранить файл(ы)"}';

}

?>


text:
<configuration>

    <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <file>gallery.log</file>
        <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
            <fileNamePattern>test.%i.log.zip</fileNamePattern>
            <minIndex>1</minIndex>
            <maxIndex>3</maxIndex>
        </rollingPolicy>
        <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
            <maxFileSize>5MB</maxFileSize>
        </triggeringPolicy>
        <encoder>
            <pattern>%date %level %logger{10} [%file:%line] %msg%n</pattern>
        </encoder>
    </appender>

    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
        <encoder>
            <pattern>%msg%n</pattern>
        </encoder>
    </appender>

    <root level="debug">
        <appender-ref ref="FILE" />
        <appender-ref ref="STDOUT" />
    </root>
</configuration>


text:
<?php

namespace MaxBeckers\AmazonAlexa\Test\Response\Directives\Dialog;

use MaxBeckers\AmazonAlexa\Intent\Intent;
use MaxBeckers\AmazonAlexa\Response\Directives\Dialog\ElicitSlotDirective;
use PHPUnit\Framework\TestCase;

/**
 * @author Peter <peter279k@gmail.com>
 */
class ElicitSlotDirectiveTest extends TestCase
{
    public function testCreate()
    {
        $elicitSlotDirective = ElicitSlotDirective::create('');
        $this->assertSame('Dialog.ElicitSlot', $elicitSlotDirective->type);
    }

    public function testCreateWithIntent()
    {
        $json   = file_get_contents(__DIR__.'/../../../Intent/Data/intent_without_resolutions.json');
        $intent = Intent::fromAmazonRequest(json_decode($json, true));

        $elicitSlotDirective = ElicitSlotDirective::create('', $intent);
        $this->assertSame('Dialog.ElicitSlot', $elicitSlotDirective->type);
    }
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Dufry.Comissoes.Application.Interfaces;

namespace Dufry.Comissoes.Controllers
{
    public class TipoBusinessController : Controller
    {
        private readonly ITipoBusinessAppService _tipoBusinessAppService;

        public TipoBusinessController(ITipoBusinessAppService tipoBusinessAppService)
        {
            _tipoBusinessAppService = tipoBusinessAppService;
        }
    }
}


text:
ACCEPTED

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Lichenologist 27(4): 289 (1995)

#### Original name
Gudelia mexicana Henssen

### Remarks
null


text:
@interface ZHYMeController ()

@end

@implementation ZHYMeController

static NSString * const ZHYMeCellID = @"ZHYME_CELL";

- (void)viewDidLoad {
    [super viewDidLoad];

    [self setupController];
}

- (void)setupController {

    [self.tableView registerClass:[ZHYMeTableCell class] forCellReuseIdentifier:ZHYMeCellID];
    self.tableView.sectionHeaderHeight = 0;
    self.tableView.sectionFooterHeight = 10;
    self.tableView.contentInset = UIEdgeInsetsMake(-25, 0, 0, 0);
    self.navigationItem.title = @"我的";
    self.view.backgroundColor = kCommonBgColor;

    UIBarButtonItem * moonItem = [UIBarButtonItem itemWithImage:@"mine-moon-icon" highImage:@"mine-moon-icon-click" target:self action:@selector(moonButtonClick)];
    UIBarButtonItem * settingItem = [UIBarButtonItem itemWithImage:@"mine-setting-icon" highImage:@"mine-setting-icon-click" target:self action:@selector(settingButtonClick)];
    self.navigationItem.rightBarButtonItems = @[settingItem, moonItem];

    self.tableView.tableFooterView = [[ZHYMeFooterView alloc] init];

}

- (void)moonButtonClick {
    ZHYLogFunc;

}

- (void)settingButtonClick {

    ZHYSettingTableController * settingVc = [[ZHYSettingTableController alloc] initWithStyle:UITableViewStyleGrouped];
    [self.navigationController pushViewController:settingVc animated:YES];
}

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {

    return 2;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {

    return 1;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

    ZHYMeTableCell * cell = [tableView dequeueReusableCellWithIdentifier:ZHYMeCellID];
    if (indexPath.section == 0) {
        cell.textLabel.text = @"登陆/注册";
        cell.imageView.image = [UIImage imageNamed:@"setup-head-default"];
        cell.textLabel.font = [UIFont systemFontOfSize:16];
    } else {
        cell.textLabel.text = @"离线下载";
        cell.imageView.image = [UIImage imageNamed:@"iconDownLoad"];
    }
    return cell;
}

@end


text:
module Origen
  module SubBlocks
    # This will be called whenever an object that includes this module
    # is instantiated
    #
    # @api private
    def init_sub_blocks(*args)
      options = args.find { |a| a.is_a?(Hash) }
      @custom_attrs = (options ? options.dup : {}).with_indifferent_access
      # Delete these keys which are either meta data added by Origen or are already covered by
      # dedicated methods
      %w(parent name base_address reg_base_address base).each do |key|
        @custom_attrs.delete(key)
      end
      if options
        # Using reg_base_address for storage to avoid class with the original Origen base
        # address API, but will accept any of these
        @reg_base_address = options.delete(:reg_base_address) ||
                            options.delete(:base_address) || options.delete(:base) || 0
        if options[:_instance]                # to be deprecated as part of multi-instance removal below
          if @reg_base_address.is_a?(Array)
            @reg_base_address = @reg_base_address[options[:_instance]]
          elsif options[:base_address_step]
            @reg_base_address = @reg_base_address + (options[:_instance] * options[:base_address_step])
          end
        end
        @domain_names = [options.delete(:domain) || options.delete(:domains)].flatten.compact
        @domain_specified = !@domain_names.empty?
        @path = options.delete(:path)
        @abs_path = options.delete(:abs_path) || options.delete(:absolute_path)
      end
      if is_a?(SubBlock)
        options.each do |k, v|
          send("#{k}=", v)
        end
      end
    end

    # Returns the default
    def self.lazy?
      @lazy || false
    end

    def self.lazy=(value)
      @lazy = value
    end

    # Returns a hash containing all options that were passed to the sub_block definition
    def custom_attrs
      @custom_attrs
    end

    module Domains
      def domain(name, options = {})
        domains[name] = Origen::Registers::Domain.new(name, options)
      end

      def domain_specified?
        @domain_specified
      end

      def domains
        @domains ||= {}.with_indifferent_access
        if @domain_names
          @domain_names.each do |domain|
            if domain.is_a?(Origen::Registers::Domain)
              @domains[domain.id] = domain
            elsif parent.domains[domain]
              @domains[domain] = parent.domains[domain]
            else
              fail "Uknown domain: #{domain}"
            end
          end
          @domain_names = nil
        end
        if parent && @domains.empty?
          parent.domains
        else
          @domains
        end
      end
      alias_method :register_domains, :domains
    end
    include Domains

    # Jumping through some hoops here since many Origen modules talk about an owner,
    # but would prefer to start standardizing on parent in future, so this should give
    # most Origen models a parent method
    module Parent
      def parent
        @owner
      end
      alias_method :owner, :parent

      unless method_defined? :owner=
        def owner=(obj)
          if obj.respond_to?(:controller) && obj.controller
            @owner = obj.controller
          else
            @owner = obj
          end
        end
      end
      alias_method :parent=, :owner=
    end
    include Parent

    module RegBaseAddress
      def reg_base_address(options = {})
        if options[:relative]
          reg_base_address_for_domain(options)
        else
          total_reg_base_address = reg_base_address_for_domain(options)
          if parent
            total_reg_base_address += parent.reg_base_address(options)
          end
          total_reg_base_address
        end
      end

      def reg_base_address_for_domain(options)
        if @reg_base_address
          if @reg_base_address.is_a?(Hash)
            if options[:domain]
              if options[:domain].is_a?(Hash)
                domains = options[:domain].keys
              else
                domains = [options[:domain]].flatten
              end
              bases = domains.map do |d|
                @reg_base_address.with_indifferent_access[d]
              end.compact
              if bases.empty?
                @reg_base_address[:default] || 0
              else
                if bases.size > 1
                  fail 'Multiple base addresses found, specify the domain you want, e.g. reg.address(domain: :ahb)'
                else
                  bases.first
                end
              end
            else
              @reg_base_address[:default] || 0
            end
          else
            @reg_base_address
          end
        else
          0
        end
      end

      unless method_defined? :base_address
        def base_address
          reg_base_address
        end
      end
    end
    include RegBaseAddress

    module Path
      def path=(val)
        @path = val
      end

      def path_var
        @path
      end

      def abs_path=(val)
        @abs_path = val
      end
      alias_method :full_path=, :abs_path=

      def abs_path
        @abs_path
      end
      alias_method :full_path, :abs_path

      def path(options = {})
        return abs_path if abs_path
        if is_a?(Origen::Registers::BitCollection)
          # Special case where path relative to the register has been requested
          if options[:relative_to] == parent
            if size == 1
              return "[#{position}]"
            else
              return "[#{position + size - 1}:#{position}]"
            end
          else
            p = parent.parent
          end
        else
          p = parent
        end
        if p && p != options[:relative_to]
          if p.path(options).empty?
            root = ''
          else
            root = "#{p.path(options)}."
          end
        else
          # If a path variable has been set on a top-level object, then we will
          # include that in path, otherwise by default the top-level object is not
          # included in the path
          if p || path_var
            root = ''
          else
            return ''
          end
        end
        local = (path_var || name || self.class.to_s.split('::').last).to_s
        if local == 'hidden'
          root.chop
        elsif is_a?(Origen::Registers::BitCollection) && parent.path_var == :hidden
          "#{root.chop}#{local}"
        else
          "#{root}#{local}"
        end
      end
      alias_method :hdl_path, :path
    end
    include Path

    # Returns a hash containing all immediate children of the given sub-block
    def sub_blocks(*args)
      if args.empty?
        @sub_blocks ||= {}.with_indifferent_access
      else
        sub_block(*args)
      end
    end
    alias_method :children, :sub_blocks

    # Returns a hash containing all sub block groups thus far added
    # if no arguments given.
    # If given a code block, will serve as alias to sub_block_group method.
    # Does not handle arguments, no need at this time.
    def sub_block_groups(*args, &block)
      if block_given?
        sub_block_group(*args, &block)
      else
        if args.empty?
          @sub_block_groups ||= {}.with_indifferent_access
        else
          fail 'sub_block_groups not meant to take arguments!'
        end
      end
    end

    # Delete all sub_blocks by emptying the Hash
    def delete_sub_blocks
      @sub_blocks = {}
    end

    def sub_blocks_array
      sub_blocks.map { |_name, sub_block| sub_block }
    end
    alias_method :children_array, :sub_blocks_array

    # Returns an array containing all descendant child objects of the given sub-block, i.e. this returns
    # an array containing children's children as well
    #
    # Note that this returns an array instead of a hash since there could be naming collisions in the
    # hash keys
    def all_sub_blocks
      @all_sub_blocks ||= begin
        (sub_blocks_array + sub_blocks_array.map(&:all_sub_blocks)).flatten
      end
    end

    # Returns true if the given sub block owns at least one register
    def owns_registers?
      if regs
        regs.is_a?(Origen::Registers::RegCollection) && !regs.empty?
      else
        false
      end
    end
    alias_method :has_regs?, :owns_registers?

    def has_fuses?
      fuses.empty? ? false : true
    end

    def has_tests?
      tests.empty? ? false : true
    end

    def sub_block(name = nil, options = {})
      name, options = nil, name if name.is_a?(Hash)
      return sub_blocks unless name

      if name.is_a?(Class)
        return sub_blocks.select { |n, s| s.is_a?(name) }
      elsif name.origen_sub_block?
        return sub_block(name.class)
      end

      if i = options.delete(:instances)
        # permit creating multiple instances of a particular sub_block class
        # can pass array for base_address, which will be processed above
        Origen.deprecate 'instances: option to sub_block is deprecated, use sub_block_groups instead'
        group_name = name =~ /s$/ ? name : "#{name}s"  # take care if name already with 's' is passed
        unless respond_to?(group_name)
          sub_block_groups group_name do
            i.times do |j|
              o = options.dup
              o[:_instance] = j
              sub_block("#{name}#{j}", o)
            end
          end
        end
      else
        block = Placeholder.new(self, name, options)
        # Allow additional attributes to be added to an existing sub-block if it hasn't
        # been instantiated yet. This is not supported yet for instantiated sub-blocks since
        # there are probably a lot more corner-cases to consider, and hopefully no one will
        # really need this anyway.
        if sub_blocks[name] && !sub_blocks[name].is_a?(Placeholder)
          fail "You have already defined a sub-block named #{name} within class #{self.class}"
        end
        if respond_to?(name)
          callers = Origen.split_caller_line caller[0]
          Origen.log.warning "The sub_block defined at #{Pathname.new(callers[0]).relative_path_from(Pathname.pwd)}:#{callers[1]} is overriding an existing method called #{name}"
        end
        define_singleton_method name do
          sub_blocks[name]
        end
        if sub_blocks[name] && sub_blocks[name].is_a?(Placeholder)
          sub_blocks[name].add_attributes(options)
        else
          sub_blocks[name] = block
        end
        unless @current_group.nil?  # a group is currently open, store sub_block id only
          @current_group << name
        end
        if options.key?(:lazy)
          lazy = options[:lazy]
        else
          lazy = Origen::SubBlocks.lazy?
        end
        lazy ? block : block.materialize
      end
    end

    # Create a group of associated sub_blocks under a group name
    # permits each sub_block to be of a different class
    # e.g.
    # sub_block_group :my_ip_group do
    #   sub_block :ip0, class_name: 'IP0', base_address: 0x000000
    #   sub_block :ip1, class_name: 'IP1', base_address: 0x000200
    #   sub_block :ip2, class_name: 'IP2', base_address: 0x000400
    #   sub_block :ip3, class_name: 'IP3', base_address: 0x000600
    # end
    #
    # creates an array referenced by method called 'my_ip_group'
    # which contains the sub_blocks 'ip0', 'ip1', 'ip2', 'ip3'.
    #
    # Can also indicate a custom class container to hold these.
    # This custom class container MUST support a '<<' method in
    # order to add new sub_blocks to the container instance.
    #
    # e.g.
    # sub_block_group :my_ip_group, class_name: 'MYGRP' do
    #   sub_block :ip0, class_name: 'IP0', base_address: 0x000000
    #   sub_block :ip1, class_name: 'IP1', base_address: 0x000200
    #   sub_block :ip2, class_name: 'IP2', base_address: 0x000400
    #   sub_block :ip3, class_name: 'IP3', base_address: 0x000600
    # end
    #
    #
    def sub_block_group(id, options = {})
      @current_group = []    # open group
      yield                  # any sub_block calls within this block will have their ID added to @current_group
      my_group = @current_group.dup
      if respond_to?(id)
        callers = Origen.split_caller_line caller[0]
        Origen.log.warning "The sub_block_group defined at #{Pathname.new(callers[0]).relative_path_from(Pathname.pwd)}:#{callers[1]} is overriding an existing method called #{id}"
      end
      # Define a singleton method which will be called every time the sub_block_group is referenced
      # This is not called here but later when referenced
      define_singleton_method "#{id}" do
        sub_block_groups[id]
      end
      # Instantiate group
      if options[:class_name]
        b = Object.const_get(options[:class_name]).new
      else
        b = []             # Will use Array if no class defined
      end
      # Add sub_blocks to group
      my_group.each do |group_id|
        b << send(group_id)
      end
      sub_block_groups[id] = b
      @current_group = nil   # close group
    end
    alias_method :sub_blocks_group, :sub_block_group

    def namespace
      self.class.to_s.sub(/::[^:]*$/, '')
    end

    private

    def instantiate_sub_block(name, klass, options)
      return sub_blocks[name] unless sub_blocks[name].is_a?(Placeholder)
      sub_blocks[name] = klass.new(options.merge(parent: self, name: name))
    end

    class Placeholder
      attr_reader :name, :owner, :attributes

      def initialize(owner, name, attributes)
        @owner = owner
        @name = name
        @attributes = attributes
      end

      def add_attributes(attrs)
        @attributes = @attributes.merge(attrs)
      end

      # Make this appear like a sub-block to any application code
      def class
        klass
      end

      # Make this appear like a sub-block to any application code
      def is_a?(klass)
        # Because sub_blocks are stored in a hash.with_indifferent_access, the value is tested
        # against being a Hash or Array when it is added to the hash. This prevents the class being
        # looking up and loaded by the autoload system straight away, especially if the sub-block
        # has been specified to lazy load
        return false if klass == Hash || klass == Array
        klass == self.klass || klass == Placeholder
      end

      # Make it look like a sub-block in the console to avoid confusion
      def inspect
        "<SubBlock: #{name}>"
      end

      def method_missing(method, *args, &block)
        materialize.send(method, *args, &block)
      end

      def respond_to?(method, include_private = false)
        materialize.respond_to?(method, include_private)
      end

      def materialize
        block = nil
        file = attributes.delete(:file)
        load_block = attributes.delete(:load_block)
        dir = attributes.delete(:dir) || owner.send(:export_dir)
        block = owner.send(:instantiate_sub_block, name, klass, attributes)
        if file
          require File.join(dir, file)
          block.extend owner.send(:export_module_names_from_path, file).join('::').constantize
        end
        block.load_block(load_block) if load_block
        block.owner = owner
        block
      end

      def ==(obj)
        if obj.is_a?(Placeholder)
          materialize == obj.materialize
        else
          materialize == obj
        end
      end
      alias_method :equal?, :==

      def freeze
        materialize.freeze
      end

      def clone
        materialize.clone
      end

      def dup
        materialize.dup
      end

      def to_json(*args)
        materialize.to_json(*args)
      end

      def klass
        @klass ||= begin
          class_name = attributes.delete(:class_name)
          tmp_class = nil
          if class_name
            begin
              tmp_class = "::#{owner.namespace}::#{class_name}"
              klass = eval(tmp_class)
            rescue NameError => e
              raise if e.message !~ /^uninitialized constant (.*)$/ || tmp_class !~ /#{Regexp.last_match(1)}/
              begin
                tmp_class = class_name.to_s
                klass = eval(class_name)
              rescue NameError => e
                raise if e.message !~ /^uninitialized constant (.*)$/ || tmp_class !~ /#{Regexp.last_match(1)}/
                begin
                  tmp_class = "#{owner.class}::#{class_name}"
                  klass = eval(tmp_class)
                rescue NameError => e
                  raise if e.message !~ /^uninitialized constant (.*)$/ || tmp_class !~ /#{Regexp.last_match(1)}/
                  puts "Could not find class: #{class_name}"
                  raise 'Unknown sub block class!'
                end
              end
            end
          else
            klass = Origen::SubBlock
          end
          unless klass.respond_to?(:includes_origen_model)
            puts 'Any class which is to be instantiated as a sub_block must include Origen::Model,'
            puts "add this to #{klass}:"
            puts ''
            puts '  include Origen::Model'
            puts ''
            fail 'Sub block does not include Origen::Model!'
          end
          klass
        end
      end
    end
  end

  # A simple class that will be instantiated by default when a sub block is
  # defined without another class name specified
  #
  # This class includes support for registers, pins, etc.
  class SubBlock
    include Origen::Model

    # Since no application defined this sub-block class, consider its parent's app to be
    # the owning application
    def app
      parent.app
    end

    # Used to create attribute accessors on the fly.
    #
    # On first call of a missing method a method is generated to avoid the missing lookup
    # next time, this should be faster for repeated lookups of the same method, e.g. reg
    def method_missing(method, *args, &block)
      super
    rescue NoMethodError
      return regs(method) if self.has_reg?(method)
      return ports(method) if self.has_port?(method)
      if method.to_s =~ /=$/
        define_singleton_method(method) do |val|
          instance_variable_set("@#{method.to_s.sub('=', '')}", val)
        end
      else
        define_singleton_method(method) do
          instance_variable_get("@#{method}")
        end
      end
      send(method, *args, &block)
    end
  end
end


text:
<?php
use yii\helpers\Html;
use yii\helpers\Url;
/* @var $this yii\web\View */
/* @var $searchModel app\models\BarangSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Laporan Persediaan Barang berdasarkan Kategori';
$this->params['breadcrumbs'][] = $this->title;
?>

        <?php
        $stockCalc = 0;
        $totalCalc = 0;
        if (count($modelCalc) > 0) {
            foreach ($modelCalc as $key => $rowCalc) {
                ?>

                    <?php echo $key; ?>
                    <?php echo number_format($rowCalc[0]['stock']); ?>
                    <?php echo number_format($rowCalc[0]['total']); ?>

                <?php
                $totalCalc += $rowCalc[0]['total'];
                $stockCalc += $rowCalc[0]['stock'];
            }
        }
        ?>

            <?php echo number_format($stockCalc); ?>
            <?php echo number_format($totalCalc); ?>

<?php
if (count($model) > 0) {
    foreach ($model as $key => $rows) {
        $totalKategori = 0;
        $stockKategori = 0;
        echo '
' . $key . '
';
        ?>

                No
                Barang
                Harga
                Stock
                Subtotal

            <?php
            if (count($rows) > 0) {
                $i = 1;
                foreach ($rows as $row) {
                    $subtotal = (int)$row['stock'] * (int)$row['harga_jual'];
                    $totalKategori += $subtotal;
                    $stockKategori += (int)$row['stock'];
                    ?>

                        <?php echo $i; ?>
                        <?php echo $row['nm_barang']; ?>
                        <?php echo number_format($row['harga_jual']); ?>
                        <?php echo number_format($row['stock']); ?>
                        <?php echo number_format($subtotal); ?>

                    <?php
                    $i++;
                }
            }
            ?>

<?php echo number_format($stockKategori); ?>

Rp. <?php echo number_format($totalKategori); ?>

        <?php
    }
}
?>


text:
.class Landroid/net/Uri$OpaqueUri;
.super Landroid/net/Uri;
.source "Uri.java"

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Landroid/net/Uri;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0xa
    name = "OpaqueUri"
.end annotation

# static fields
.field static final TYPE_ID:I = 0x2

# instance fields
.field private volatile cachedString:Ljava/lang/String;

.field private final fragment:Landroid/net/Uri$Part;

.field private final scheme:Ljava/lang/String;

.field private final ssp:Landroid/net/Uri$Part;

# direct methods
.method private constructor <init>(Ljava/lang/String;Landroid/net/Uri$Part;Landroid/net/Uri$Part;)V
    .locals 1
    .param p1, "scheme"    # Ljava/lang/String;
    .param p2, "ssp"    # Landroid/net/Uri$Part;
    .param p3, "fragment"    # Landroid/net/Uri$Part;

    .prologue
    .line 836
    const/4 v0, 0x0

    invoke-direct {p0, v0}, Landroid/net/Uri;-><init>(Landroid/net/Uri$1;)V

    .line 937
    # getter for: Landroid/net/Uri;->NOT_CACHED:Ljava/lang/String;
    invoke-static {}, Landroid/net/Uri;->access$300()Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Landroid/net/Uri$OpaqueUri;->cachedString:Ljava/lang/String;

    .line 837
    iput-object p1, p0, Landroid/net/Uri$OpaqueUri;->scheme:Ljava/lang/String;

    .line 838
    iput-object p2, p0, Landroid/net/Uri$OpaqueUri;->ssp:Landroid/net/Uri$Part;

    .line 839
    if-nez p3, :cond_0

    sget-object p3, Landroid/net/Uri$Part;->NULL:Landroid/net/Uri$Part;

    .end local p3    # "fragment":Landroid/net/Uri$Part;
    :cond_0
    iput-object p3, p0, Landroid/net/Uri$OpaqueUri;->fragment:Landroid/net/Uri$Part;

    .line 840
    return-void
.end method

.method synthetic constructor <init>(Ljava/lang/String;Landroid/net/Uri$Part;Landroid/net/Uri$Part;Landroid/net/Uri$1;)V
    .locals 0
    .param p1, "x0"    # Ljava/lang/String;
    .param p2, "x1"    # Landroid/net/Uri$Part;
    .param p3, "x2"    # Landroid/net/Uri$Part;
    .param p4, "x3"    # Landroid/net/Uri$1;

    .prologue
    .line 827
    invoke-direct {p0, p1, p2, p3}, Landroid/net/Uri$OpaqueUri;-><init>(Ljava/lang/String;Landroid/net/Uri$Part;Landroid/net/Uri$Part;)V

    return-void
.end method

.method static readFrom(Landroid/os/Parcel;)Landroid/net/Uri;
    .locals 4
    .param p0, "parcel"    # Landroid/os/Parcel;

    .prologue
    .line 843
    new-instance v0, Landroid/net/Uri$OpaqueUri;

    invoke-virtual {p0}, Landroid/os/Parcel;->readString()Ljava/lang/String;

    move-result-object v1

    invoke-static {p0}, Landroid/net/Uri$Part;->readFrom(Landroid/os/Parcel;)Landroid/net/Uri$Part;

    move-result-object v2

    invoke-static {p0}, Landroid/net/Uri$Part;->readFrom(Landroid/os/Parcel;)Landroid/net/Uri$Part;

    move-result-object v3

    invoke-direct {v0, v1, v2, v3}, Landroid/net/Uri$OpaqueUri;-><init>(Ljava/lang/String;Landroid/net/Uri$Part;Landroid/net/Uri$Part;)V

    return-object v0
.end method

# virtual methods
.method public buildUpon()Landroid/net/Uri$Builder;
    .locals 2

    .prologue
    .line 959
    new-instance v0, Landroid/net/Uri$Builder;

    invoke-direct {v0}, Landroid/net/Uri$Builder;-><init>()V

    iget-object v1, p0, Landroid/net/Uri$OpaqueUri;->scheme:Ljava/lang/String;

    invoke-virtual {v0, v1}, Landroid/net/Uri$Builder;->scheme(Ljava/lang/String;)Landroid/net/Uri$Builder;

    move-result-object v0

    iget-object v1, p0, Landroid/net/Uri$OpaqueUri;->ssp:Landroid/net/Uri$Part;

    invoke-virtual {v0, v1}, Landroid/net/Uri$Builder;->opaquePart(Landroid/net/Uri$Part;)Landroid/net/Uri$Builder;

    move-result-object v0

    iget-object v1, p0, Landroid/net/Uri$OpaqueUri;->fragment:Landroid/net/Uri$Part;

    invoke-virtual {v0, v1}, Landroid/net/Uri$Builder;->fragment(Landroid/net/Uri$Part;)Landroid/net/Uri$Builder;

    move-result-object v0

    return-object v0
.end method

.method public bridge synthetic compareTo(Ljava/lang/Object;)I
    .locals 1
    .param p1, "x0"    # Ljava/lang/Object;

    .prologue
    .line 827
    check-cast p1, Landroid/net/Uri;

    .end local p1    # "x0":Ljava/lang/Object;
    invoke-super {p0, p1}, Landroid/net/Uri;->compareTo(Landroid/net/Uri;)I

    move-result v0

    return v0
.end method

.method public describeContents()I
    .locals 1

    .prologue
    .line 851
    const/4 v0, 0x0

    return v0
.end method

.method public getAuthority()Ljava/lang/String;
    .locals 1

    .prologue
    .line 882
    const/4 v0, 0x0

    return-object v0
.end method

.method public getEncodedAuthority()Ljava/lang/String;
    .locals 1

    .prologue
    .line 886
    const/4 v0, 0x0

    return-object v0
.end method

.method public getEncodedFragment()Ljava/lang/String;
    .locals 1

    .prologue
    .line 910
    iget-object v0, p0, Landroid/net/Uri$OpaqueUri;->fragment:Landroid/net/Uri$Part;

    invoke-virtual {v0}, Landroid/net/Uri$Part;->getEncoded()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getEncodedPath()Ljava/lang/String;
    .locals 1

    .prologue
    .line 894
    const/4 v0, 0x0

    return-object v0
.end method

.method public getEncodedQuery()Ljava/lang/String;
    .locals 1

    .prologue
    .line 902
    const/4 v0, 0x0

    return-object v0
.end method

.method public getEncodedSchemeSpecificPart()Ljava/lang/String;
    .locals 1

    .prologue
    .line 874
    iget-object v0, p0, Landroid/net/Uri$OpaqueUri;->ssp:Landroid/net/Uri$Part;

    invoke-virtual {v0}, Landroid/net/Uri$Part;->getEncoded()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getEncodedUserInfo()Ljava/lang/String;
    .locals 1

    .prologue
    .line 926
    const/4 v0, 0x0

    return-object v0
.end method

.method public getFragment()Ljava/lang/String;
    .locals 1

    .prologue
    .line 906
    iget-object v0, p0, Landroid/net/Uri$OpaqueUri;->fragment:Landroid/net/Uri$Part;

    invoke-virtual {v0}, Landroid/net/Uri$Part;->getDecoded()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getHost()Ljava/lang/String;
    .locals 1

    .prologue
    .line 930
    const/4 v0, 0x0

    return-object v0
.end method

.method public getLastPathSegment()Ljava/lang/String;
    .locals 1

    .prologue
    .line 918
    const/4 v0, 0x0

    return-object v0
.end method

.method public getPath()Ljava/lang/String;
    .locals 1

    .prologue
    .line 890
    const/4 v0, 0x0

    return-object v0
.end method

.method public getPathSegments()Ljava/util/List;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/List",
            "<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation

    .prologue
    .line 914
    invoke-static {}, Ljava/util/Collections;->emptyList()Ljava/util/List;

    move-result-object v0

    return-object v0
.end method

.method public getPort()I
    .locals 1

    .prologue
    .line 934
    const/4 v0, -0x1

    return v0
.end method

.method public getQuery()Ljava/lang/String;
    .locals 1

    .prologue
    .line 898
    const/4 v0, 0x0

    return-object v0
.end method

.method public getScheme()Ljava/lang/String;
    .locals 1

    .prologue
    .line 870
    iget-object v0, p0, Landroid/net/Uri$OpaqueUri;->scheme:Ljava/lang/String;

    return-object v0
.end method

.method public getSchemeSpecificPart()Ljava/lang/String;
    .locals 1

    .prologue
    .line 878
    iget-object v0, p0, Landroid/net/Uri$OpaqueUri;->ssp:Landroid/net/Uri$Part;

    invoke-virtual {v0}, Landroid/net/Uri$Part;->getDecoded()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getUserInfo()Ljava/lang/String;
    .locals 1

    .prologue
    .line 922
    const/4 v0, 0x0

    return-object v0
.end method

.method public isHierarchical()Z
    .locals 1

    .prologue
    .line 862
    const/4 v0, 0x0

    return v0
.end method

.method public isRelative()Z
    .locals 1

    .prologue
    .line 866
    iget-object v0, p0, Landroid/net/Uri$OpaqueUri;->scheme:Ljava/lang/String;

    if-nez v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public toString()Ljava/lang/String;
    .locals 4

    .prologue
    .line 941
    iget-object v2, p0, Landroid/net/Uri$OpaqueUri;->cachedString:Ljava/lang/String;

    # getter for: Landroid/net/Uri;->NOT_CACHED:Ljava/lang/String;
    invoke-static {}, Landroid/net/Uri;->access$300()Ljava/lang/String;

    move-result-object v3

    if-eq v2, v3, :cond_0

    const/4 v0, 0x1

    .line 942
    .local v0, "cached":Z
    :goto_0
    if-eqz v0, :cond_1

    .line 943
    iget-object v2, p0, Landroid/net/Uri$OpaqueUri;->cachedString:Ljava/lang/String;

    .line 955
    :goto_1
    return-object v2

    .line 941
    .end local v0    # "cached":Z
    :cond_0
    const/4 v0, 0x0

    goto :goto_0

    .line 946
    .restart local v0    # "cached":Z
    :cond_1
    new-instance v1, Ljava/lang/StringBuilder;

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

    .line 948
    .local v1, "sb":Ljava/lang/StringBuilder;
    iget-object v2, p0, Landroid/net/Uri$OpaqueUri;->scheme:Ljava/lang/String;

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

    move-result-object v2

    const/16 v3, 0x3a

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

    .line 949
    invoke-virtual {p0}, Landroid/net/Uri$OpaqueUri;->getEncodedSchemeSpecificPart()Ljava/lang/String;

    move-result-object v2

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

    .line 951
    iget-object v2, p0, Landroid/net/Uri$OpaqueUri;->fragment:Landroid/net/Uri$Part;

    invoke-virtual {v2}, Landroid/net/Uri$Part;->isEmpty()Z

    move-result v2

    if-nez v2, :cond_2

    .line 952
    const/16 v2, 0x23

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

    move-result-object v2

    iget-object v3, p0, Landroid/net/Uri$OpaqueUri;->fragment:Landroid/net/Uri$Part;

    invoke-virtual {v3}, Landroid/net/Uri$Part;->getEncoded()Ljava/lang/String;

    move-result-object v3

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

    .line 955
    :cond_2
    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    iput-object v2, p0, Landroid/net/Uri$OpaqueUri;->cachedString:Ljava/lang/String;

    goto :goto_1
.end method

.method public writeToParcel(Landroid/os/Parcel;I)V
    .locals 1
    .param p1, "parcel"    # Landroid/os/Parcel;
    .param p2, "flags"    # I

    .prologue
    .line 855
    const/4 v0, 0x2

    invoke-virtual {p1, v0}, Landroid/os/Parcel;->writeInt(I)V

    .line 856
    iget-object v0, p0, Landroid/net/Uri$OpaqueUri;->scheme:Ljava/lang/String;

    invoke-virtual {p1, v0}, Landroid/os/Parcel;->writeString(Ljava/lang/String;)V

    .line 857
    iget-object v0, p0, Landroid/net/Uri$OpaqueUri;->ssp:Landroid/net/Uri$Part;

    invoke-virtual {v0, p1}, Landroid/net/Uri$Part;->writeTo(Landroid/os/Parcel;)V

    .line 858
    iget-object v0, p0, Landroid/net/Uri$OpaqueUri;->fragment:Landroid/net/Uri$Part;

    invoke-virtual {v0, p1}, Landroid/net/Uri$Part;->writeTo(Landroid/os/Parcel;)V

    .line 859
    return-void
.end method


text:
/*
 * MT safe
 */

/* because we are compatible with archive format only since AIX 4.3 */

#define __AR_BIG__

#include "config.h"

#include <ar.h>
#include <stdlib.h>

#include <dlfcn.h>

/* --- functions --- */
static gchar*
fetch_dlerror (gboolean replace_null)
{
  gchar *msg = dlerror ();

  /* make sure we always return an error message != NULL, if
   * expected to do so. */

  if (!msg && replace_null)
    return "unknown dl-error";

  return msg;
}

static gchar* _g_module_get_member(const gchar* file_name)
{
  gchar* member = NULL;
  struct fl_hdr file_header;
  struct ar_hdr ar_header;
  long first_member;
  long name_len;
  int fd;

  fd = open(file_name, O_RDONLY);
  if (fd == -1)
    return NULL;

  if (read(fd, (void*)&file_header, FL_HSZ) != FL_HSZ)
    goto exit;

  if (strncmp(file_header.fl_magic, AIAMAGBIG, SAIAMAG) != 0)
    goto exit;

  /* read first archive file member header */

  first_member = atol(file_header.fl_fstmoff);

  if (lseek(fd, first_member, SEEK_SET) != first_member)
    goto exit;

  if (read(fd, (void*)&ar_header, AR_HSZ - 2) != AR_HSZ - 2)
    goto exit;

  /* read member name */

  name_len = atol(ar_header.ar_namlen);

  member = g_malloc(name_len+1);
  if (!member)
    goto exit;

  if (read(fd, (void*)member, name_len) != name_len)
    {
      g_free(member);
      member = NULL;
      goto exit;
    }

  member[name_len] = 0;

exit:
  close(fd);

  return member;
}

static gpointer
_g_module_open (const gchar *file_name,
		gboolean     bind_lazy,
		gboolean     bind_local)
{
  gpointer handle;
  gchar* member;
  gchar* full_name;

  /* extract name of first member of archive */

  member = _g_module_get_member (file_name);
  if (member != NULL)
    {
      full_name = g_strconcat (file_name, "(", member, ")", NULL);
      g_free (member);
    }
  else
    full_name = g_strdup (file_name);

  handle = dlopen (full_name,
		   (bind_local ? RTLD_LOCAL : RTLD_GLOBAL) | RTLD_MEMBER | (bind_lazy ? RTLD_LAZY : RTLD_NOW));

  g_free (full_name);

  if (!handle)
    g_module_set_error (fetch_dlerror (TRUE));

  return handle;
}

static gpointer
_g_module_self (void)
{
  gpointer handle;

  handle = dlopen (NULL, RTLD_GLOBAL | RTLD_LAZY);
  if (!handle)
    g_module_set_error (fetch_dlerror (TRUE));

  return handle;
}

static void
_g_module_close (gpointer handle,
		 gboolean is_unref)
{
  /* are there any systems out there that have dlopen()/dlclose()
   * without a reference count implementation?
   */
  is_unref |= 1;

  if (is_unref)
    {
      if (dlclose (handle) != 0)
	g_module_set_error (fetch_dlerror (TRUE));
    }
}

static gpointer
_g_module_symbol (gpointer     handle,
		  const gchar *symbol_name)
{
  gpointer p;

  p = dlsym (handle, symbol_name);
  if (!p)
    g_module_set_error (fetch_dlerror (FALSE));

  return p;
}

static gchar*
_g_module_build_path (const gchar *directory,
		      const gchar *module_name)
{
  if (directory && *directory) {
    if (strncmp (module_name, "lib", 3) == 0)
      return g_strconcat (directory, "/", module_name, NULL);
    else
      return g_strconcat (directory, "/lib", module_name, "." G_MODULE_SUFFIX, NULL);
  } else if (strncmp (module_name, "lib", 3) == 0)
    return g_strdup (module_name);
  else
    return g_strconcat ("lib", module_name, "." G_MODULE_SUFFIX, NULL);
}


text:
'use strict';

// Games controller
angular.module('games')
        .controller('GamesController', ['GameManager',
            function (GameManager) {
                this.game = GameManager;

                this.newGame = function () {
                    this.game.newGame();
                    this.startGame();
                }

                this.restart = function () {
                    this.game.restart();
                }

                this.startGame = function () {
                    var gameCtrl = this;

                }

                this.newGame();
            }
        ]);


text:
package cz.yetanotherview.webcamviewer.app.actions;

import android.annotation.TargetApi;
import android.app.Activity;
import android.app.Dialog;
import android.app.DialogFragment;
import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Environment;
import android.os.ParcelFileDescriptor;
import android.support.design.widget.Snackbar;
import android.view.View;
import android.widget.EditText;
import android.widget.Spinner;

import com.afollestad.materialdialogs.DialogAction;
import com.afollestad.materialdialogs.MaterialDialog;
import com.google.gson.Gson;

import java.io.File;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.util.List;

import cz.yetanotherview.webcamviewer.app.R;
import cz.yetanotherview.webcamviewer.app.helper.Utils;
import cz.yetanotherview.webcamviewer.app.adapter.SpinnerAdapter;
import cz.yetanotherview.webcamviewer.app.helper.DatabaseHelper;
import cz.yetanotherview.webcamviewer.app.helper.OnTextChange;
import cz.yetanotherview.webcamviewer.app.model.WebCam;

public class ExportDialog extends DialogFragment {

    private EditText input;
    private List<WebCam> allWebCams;
    private MaterialDialog dialog;
    private Spinner spinner;
    private static final int CREATE_REQUEST_CODE = 40;

    @Override
    public Dialog onCreateDialog(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        DatabaseHelper db = new DatabaseHelper(getActivity().getApplicationContext());
        allWebCams = db.getAllWebCams(Utils.defaultSortOrder);
        db.closeDB();

        if (allWebCams.size() != 0) {
            dialog = new MaterialDialog.Builder(getActivity())
                    .title(R.string.pref_backup)
                    .customView(R.layout.export_dialog, true)
                    .positiveText(android.R.string.ok)
                    .negativeText(android.R.string.cancel)
                    .autoDismiss(false)
                    .iconRes(R.drawable.settings_backup)
                    .callback(new MaterialDialog.ButtonCallback() {
                        @Override
                        public void onPositive(MaterialDialog dialog) {
                            String inputName = input.getText().toString().trim();
                            if (spinner.getSelectedItemPosition() == 0) {
                                exportJson(inputName);
                                dialog.dismiss();
                            } else {
                                newFile(inputName);
                                dialog.hide();
                            }
                        }

                        @Override
                        public void onNegative(MaterialDialog dialog) {
                            dialog.dismiss();
                        }
                    }).build();

            input = (EditText) dialog.findViewById(R.id.input_name);
            input.requestFocus();
            input.setText(Utils.getCustomDateString("yyyy-MM-dd_HH-mm"));

            String[] backUpValues;
            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
                backUpValues = getResources().getStringArray(R.array.backup_values);
            }
            else backUpValues = getResources().getStringArray(R.array.backup_values_pre_kk);

            spinner = (Spinner) dialog.findViewById(R.id.backup_spinner);
            spinner.setAdapter(new SpinnerAdapter(getActivity(), R.layout.spinner_item, backUpValues));

            View positiveAction = dialog.getActionButton(DialogAction.POSITIVE);
            input.addTextChangedListener(new OnTextChange(positiveAction));
        }
        else dialog = new MaterialDialog.Builder(getActivity())
                .title(R.string.nothing_to_export)
                .content(R.string.nothing_to_export_summary)
                .positiveText(android.R.string.ok)
                .iconRes(R.drawable.warning)
                .build();

        return dialog;
    }

    private void exportJson(String fileName) {
        File exportDirectory = new File(Utils.folderWCVPath);

        if (!exportDirectory.exists()) {
            exportDirectory.mkdir();
        }

        try {
            File sd = Environment.getExternalStorageDirectory();
            if (sd.canWrite()) {
                Gson gson = new Gson();
                String json = gson.toJson(allWebCams);

                FileWriter writer = new FileWriter(Utils.folderWCVPath + fileName + Utils.extension);
                writer.write(json);
                writer.close();

                backUpDone();
            }
        } catch (IOException e) {
            e.printStackTrace();
            Snackbar.make(getActivity().findViewById(R.id.content_frame), R.string.export_failed,
                    Snackbar.LENGTH_SHORT).show();
        }
    }

    @TargetApi(Build.VERSION_CODES.KITKAT)
    private void newFile(String fileName) {
        Intent intent = new Intent(Intent.ACTION_CREATE_DOCUMENT);

        intent.addCategory(Intent.CATEGORY_OPENABLE);
        intent.setType("application/octet-stream");
        intent.putExtra(Intent.EXTRA_TITLE, fileName + Utils.extension);

        startActivityForResult(intent, CREATE_REQUEST_CODE);
    }

    public void onActivityResult(int requestCode, int resultCode,
                                 Intent resultData) {
        if (resultCode == Activity.RESULT_OK) {
            if (requestCode == CREATE_REQUEST_CODE) {
                if (resultData != null) {
                    Uri currentUri = resultData.getData();
                    writeFileContent(currentUri);
                }
            }
        }
    }

    private void writeFileContent(Uri uri) {
            try {
                ParcelFileDescriptor pfd =
                        getActivity().getContentResolver().
                                openFileDescriptor(uri, "w");

                FileOutputStream fileOutputStream =
                        new FileOutputStream(pfd.getFileDescriptor());

                Gson gson = new Gson();
                String json = gson.toJson(allWebCams);
                fileOutputStream.write(json.getBytes());
                fileOutputStream.close();
                pfd.close();
                backUpDone();

                dialog.dismiss();
            } catch (IOException e) {
                e.printStackTrace();
        }
    }

    private void backUpDone() {
        Snackbar.make(getActivity().findViewById(R.id.content_frame), R.string.export_done,
                Snackbar.LENGTH_SHORT).show();
    }
}


text:
require Rails.root.join('config/routes.rb')

class Mailer < ActionMailer::Base
  helper ApplicationHelper

  default :from                      => Errbit::Config.email_from,
          'X-Errbit-Host'            => Errbit::Config.host,
          'X-Mailer'                 => 'Errbit',
          'X-Auto-Response-Suppress' => 'OOF, AutoReply',
          'Precedence'               => 'bulk',
          'Auto-Submitted'           => 'auto-generated'

  def err_notification(error_report)
    @notice   = NoticeDecorator.new error_report.notice
    @app      = AppDecorator.new error_report.app

    count = error_report.problem.notices_count
    count = count > 1 ? "(#{count}) " : ""

    errbit_headers 'App'         => @app.name,
                   'Environment' => @notice.environment_name,
                   'Error-Id'    => @notice.err_id

    mail to:      @app.notification_recipients,
         subject: "#{count}[#{@app.name}][#{@notice.environment_name}] #{@notice.message.truncate(50)}"
  end

  def comment_notification(comment)
    @comment  = comment
    @user     = comment.user
    @problem  = ProblemDecorator.new comment.err
    @notice   = @problem.notices.first
    @app      = @problem.app

    recipients = @comment.notification_recipients

    errbit_headers 'App'            => @app.name,
                   'Environment'    => @notice.environment_name,
                   'Problem-Id'     => @problem.id,
                   'Comment-Author' => @user.name

    mail to:      recipients,
         subject: "#{@user.name} commented on [#{@app.name}][#{@notice.environment_name}] #{@notice.message.truncate(50)}"
  end

  private def errbit_headers(header)
    header.each { |key, value| headers["X-Errbit-#{key}"] = value.to_s }
  end
end


text:
{% extends path1+"/_addlayout.html" %}

{% block citizen_content %}

Back

Add a new Healthcare Professional

    {% include path1+ "/manage-staff/_staff-hours.html" %}

{% endblock %} {% block footer_top %} {{ super() }} {# {% include path1+"/footer_links.html" %} #} {% endblock %}


text:
package org.geogit.api.plumbing;

import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Queue;
import java.util.Set;

import org.geogit.api.AbstractGeoGitOp;
import org.geogit.api.ObjectId;
import org.geogit.api.RevCommit;
import org.geogit.storage.GraphDatabase;
import org.geogit.storage.GraphDatabase.Direction;
import org.geogit.storage.GraphDatabase.GraphEdge;
import org.geogit.storage.GraphDatabase.GraphNode;

import com.google.common.base.Optional;
import com.google.common.base.Preconditions;

/**
 * Finds the common {@link RevCommit commit} ancestor of two commits.
 */
public class FindCommonAncestor extends AbstractGeoGitOp<Optional<ObjectId>> {

    private ObjectId left;

    private ObjectId right;

    /**
     * @param left the left {@link ObjectId}
     */
    public FindCommonAncestor setLeftId(ObjectId left) {
        this.left = left;
        return this;
    }

    /**
     * @param right the right {@link ObjectId}
     */
    public FindCommonAncestor setRightId(ObjectId right) {
        this.right = right;
        return this;
    }

    /**
     * @param left the left {@link RevCommit}
     */
    public FindCommonAncestor setLeft(RevCommit left) {
        this.left = left.getId();
        return this;
    }

    /**
     * @param right the right {@link RevCommit}
     */
    public FindCommonAncestor setRight(RevCommit right) {
        this.right = right.getId();
        return this;
    }

    /**
     * Finds the common {@link RevCommit commit} ancestor of two commits.
     *
     * @return an {@link Optional} of the ancestor commit, or {@link Optional#absent()} if no common
     *         ancestor was found
     */
    @Override
    protected Optional<ObjectId> _call() {
        Preconditions.checkState(left != null, "Left commit has not been set.");
        Preconditions.checkState(right != null, "Right commit has not been set.");

        if (left.equals(right)) {
            // They are the same commit
            return Optional.of(left);
        }

        getProgressListener().started();

        Optional<ObjectId> ancestor = findLowestCommonAncestor(left, right);

        getProgressListener().complete();

        return ancestor;
    }

    /**
     * Finds the lowest common ancestor of two commits.
     *
     * @param leftId the commit id of the left commit
     * @param rightId the commit id of the right commit
     * @return An {@link Optional} of the lowest common ancestor of the two commits, or
     *         {@link Optional#absent()} if a common ancestor could not be found.
     */
    public Optional<ObjectId> findLowestCommonAncestor(ObjectId leftId, ObjectId rightId) {
        Set<GraphNode> leftSet = new HashSet<GraphNode>();
        Set<GraphNode> rightSet = new HashSet<GraphNode>();

        Queue<GraphNode> leftQueue = new LinkedList<GraphNode>();
        Queue<GraphNode> rightQueue = new LinkedList<GraphNode>();

        GraphDatabase graphDb = graphDatabase();
        GraphNode leftNode = graphDb.getNode(leftId);
        leftQueue.add(leftNode);

        GraphNode rightNode = graphDb.getNode(rightId);
        rightQueue.add(rightNode);

        List<GraphNode> potentialCommonAncestors = new LinkedList<GraphNode>();
        while (!leftQueue.isEmpty() || !rightQueue.isEmpty()) {
            if (!leftQueue.isEmpty()) {
                GraphNode commit = leftQueue.poll();
                if (processCommit(commit, leftQueue, leftSet, rightQueue, rightSet)) {
                    potentialCommonAncestors.add(commit);
                }
            }
            if (!rightQueue.isEmpty()) {
                GraphNode commit = rightQueue.poll();
                if (processCommit(commit, rightQueue, rightSet, leftQueue, leftSet)) {
                    potentialCommonAncestors.add(commit);
                }
            }
        }
        verifyAncestors(potentialCommonAncestors, leftSet, rightSet);

        Optional<ObjectId> ancestor = Optional.absent();
        if (potentialCommonAncestors.size() > 0) {
            ancestor = Optional.of(potentialCommonAncestors.get(0).getIdentifier());
        }
        return ancestor;
    }

    /**
     * Process a commit to see if it has already been seen. If it has, prevent unnecessary work from
     * continuing on the other traversal queue. If it hasn't, add it's parents to the traversal
     * queue.
     *
     * @param commit commit to process
     * @param myQueue my traversal queue
     * @param mySet my visited nodes
     * @param theirQueue other traversal queue
     * @param theirSet other traversal's visited nodes
     * @return
     */
    private boolean processCommit(GraphNode commit, Queue<GraphNode> myQueue, Set<GraphNode> mySet,
            Queue<GraphNode> theirQueue, Set<GraphNode> theirSet) {
        if (mySet.add(commit)) {
            if (theirSet.contains(commit)) {
                stopAncestryPath(commit, theirQueue, theirSet);
                return true;
            }
            Iterator<GraphEdge> edges = commit.getEdges(Direction.OUT);
            while (edges.hasNext()) {
                GraphEdge parentEdge = edges.next();
                GraphNode parent = parentEdge.getToNode();
                myQueue.add(parent);
            }
        }
        return false;

    }

    /**
     * This function is called when a common ancestor is found and the other traversal queue should
     * stop traversing down the history of that particular commit. Any ancestors caught after this
     * one will be an older ancestor. This function follows the ancestry of the common ancestor
     * until it has been removed from the opposite traversal queue.
     *
     * @param commit the common ancestor
     * @param theirQueue the opposite traversal queue
     * @param theirSet the opposite visited nodes
     */
    private void stopAncestryPath(GraphNode commit, Queue<GraphNode> theirQueue,
            Set<GraphNode> theirSet) {
        Queue<GraphNode> ancestorQueue = new LinkedList<GraphNode>();
        ancestorQueue.add(commit);
        Set<GraphNode> processed = new HashSet<GraphNode>();
        while (!ancestorQueue.isEmpty()) {
            GraphNode ancestor = ancestorQueue.poll();
            Iterator<GraphEdge> edges = ancestor.getEdges(Direction.OUT);
            while (edges.hasNext()) {
                GraphEdge relationship = edges.next();
                GraphNode parentNode = relationship.getToNode();
                if (theirSet.contains(parentNode)) {
                    if (!processed.contains(parentNode)) {
                        ancestorQueue.add(parentNode);
                        processed.add(parentNode);
                    }
                } else {
                    theirQueue.remove(parentNode);
                }
            }
        }
    }

    /**
     * This function is called at the end of the traversal to make sure none of our results have a
     * more recent ancestor in the result list.
     *
     * @param potentialCommonAncestors the result list
     * @param leftSet the visited nodes of the left traversal
     * @param rightSet the visited nodes of the right traversal
     */
    private void verifyAncestors(List<GraphNode> potentialCommonAncestors, Set<GraphNode> leftSet,
            Set<GraphNode> rightSet) {
        Queue<GraphNode> ancestorQueue = new LinkedList<GraphNode>();
        List<GraphNode> falseAncestors = new LinkedList<GraphNode>();
        List<GraphNode> processed = new LinkedList<GraphNode>();

        for (GraphNode v : potentialCommonAncestors) {
            if (falseAncestors.contains(v)) {
                continue;
            }
            ancestorQueue.add(v);
            while (!ancestorQueue.isEmpty()) {
                GraphNode ancestor = ancestorQueue.poll();
                Iterator<GraphEdge> edges = ancestor.getEdges(Direction.OUT);
                while (edges.hasNext()) {
                    GraphEdge parent = edges.next();
                    GraphNode parentNode = parent.getToNode();
                    if (parentNode.getIdentifier() != ancestor.getIdentifier()) {
                        if (leftSet.contains(parentNode) || rightSet.contains(parentNode)) {
                            if (!processed.contains(parentNode)) {
                                ancestorQueue.add(parentNode);
                                processed.add(parentNode);
                            }
                            if (potentialCommonAncestors.contains(parentNode)) {
                                falseAncestors.add(parentNode);
                            }
                        }
                    }
                }
            }
        }
        potentialCommonAncestors.removeAll(falseAncestors);
    }
}


text:
<?php

namespace Zotlabs\Update;

class _1179 {
function run() {

	if(ACTIVE_DBTYPE == DBTYPE_POSTGRES) {
		$r1 = q("CREATE TABLE atoken (
  atoken_id serial NOT NULL,
  atoken_aid bigint NOT NULL DEFAULT 0,
  atoken_uid bigint NOT NULL DEFAULT 0,
  atoken_name varchar(255) NOT NULL DEFAULT '',
  atoken_token varchar(255) NOT NULL DEFAULT '',
  atoken_expires timestamp NOT NULL DEFAULT '0001-01-01 00:00:00',
  PRIMARY KEY (atoken_id)) ");
	$r2 = q("create index atoken_aid on atoken (atoken_aid)");
	$r3 = q("create index atoken_uid on atoken (atoken_uid)");
	$r4 = q("create index atoken_name on atoken (atoken_name)");
	$r5 = q("create index atoken_token on atoken (atoken_token)");
	$r6 = q("create index atoken_expires on atoken (atoken_expires)");

	$r = $r1 && $r2 && $r3 && $r4 && $r5 && $r6;

	}
	else {
		$r = q("CREATE TABLE IF NOT EXISTS `atoken` (
  `atoken_id` int(11) NOT NULL AUTO_INCREMENT,
  `atoken_aid` int(11) NOT NULL DEFAULT 0,
  `atoken_uid` int(11) NOT NULL DEFAULT 0,
  `atoken_name` char(255) NOT NULL DEFAULT '',
  `atoken_token` char(255) NOT NULL DEFAULT '',
  `atoken_expires` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
  PRIMARY KEY (`atoken_id`),
  KEY `atoken_aid` (`atoken_aid`),
  KEY `atoken_uid` (`atoken_uid`),
  KEY `atoken_name` (`atoken_name`),
  KEY `atoken_token` (`atoken_token`),
  KEY `atoken_expires` (`atoken_expires`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ");
	}
	if($r)
		return UPDATE_SUCCESS;
	return UPDATE_FAILED;

}

}


text:
package com.twu.biblioteca;

import org.junit.Test;

import java.util.ArrayList;

import static org.junit.Assert.assertEquals;

public class ListBooksOptionTest {

    @Test
    public void shouldReturnTheListOfBooks() {
        ArrayList<Book> books = new ArrayList<>();
        books.add(new Book("Muskan", "Author", 123));
        books.add(new Book("Muskan Dhanda", "Author Same", 1234));
        BookLibrary bookLibrary = new BookLibrary(books);
        ListBooksOption listBooks = new ListBooksOption(bookLibrary);

        String bookString = listBooks.execute();

        String testString = String.format("%-25s %-25s %-25s\n\n%-25s %-25s %-25d\n%-25s %-25s %-25d\n", "Book Name", "Book Author", "Year Of Publish", "Muskan", "Author", 123, "Muskan Dhanda", "Author Same", 1234);
        assertEquals(testString, bookString);
    }

    @Test
    public void shouldReturnTheAvailableListOfBooksInTheLibrary() {
        ArrayList<Book> books = new ArrayList<>();
        books.add(new Book("Muskan D", "Author 1", 123));
        books.add(new Book("Muskan Dhanda", "Author Same", 1234));
        BookLibrary bookLibrary = new BookLibrary(books);
        ListBooksOption listBooks = new ListBooksOption(bookLibrary);

        String bookString = listBooks.execute();

        String testString = String.format("%-25s %-25s %-25s\n\n%-25s %-25s %-25d\n%-25s %-25s %-25d\n", "Book Name", "Book Author", "Year Of Publish", "Muskan D", "Author 1", 123, "Muskan Dhanda", "Author Same", 1234);
        assertEquals(testString, bookString);
    }
}


text:
<!doctype html>

	<meta charset="utf-8"/>
	<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
	<meta name="keywords" content="OSZIMT">
	<title>ZIMTOS</title>

	<link rel="stylesheet" href="dist/css/bootstrap.min.css">

	<link rel="stylesheet" href="assets/css/zimtos-style.css">

				<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
					Toggle navigation

				</button>
				ZIMTOS

Stundenpläne

Lehrer finden

Raumplan

Einstellungen

	<canvas id='your_canvas' style='position: absolute; background-color: white;'></canvas>       //the real where we draw/render our scene