text:
/**
 * Created by twagner on 2/11/15.
 */
"use strict";

const should = require('should'),
    AuthenticationResponse = require('../../main/lib/model/authenticationResponse');

describe('AuthenticationResponse', function() {

    const redirectUri = 'http://localhost/client';

    describe('#toUri', function() {
        it('should return code for code grant', function() {

            const ar = new AuthenticationResponse({
                redirectUri: redirectUri,
                code: 'foo',
                state: 'a bar',
                responseType: 'code'
            });
            const uri = ar.toUri();
            uri.should.be.equal('http://localhost/client?code=foo&state=a%20bar');
            console.log(uri);
        });

        it('should return access token and id token', function() {
            const ar = new AuthenticationResponse({
                redirectUri: redirectUri,
                code: 'foo',
                state: 'a bar',
                accessToken: '1234567890',
                idToken: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...',
                responseType: 'id_token token'
            });
            const uri = ar.toUri();
            uri.should.be.equal('http://localhost/client?token_type=bearer&access_token=1234567890&id_token=eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...&state=a%20bar');
        });

        it('should return id token', function() {
            const ar = new AuthenticationResponse({
                redirectUri: redirectUri,
                code: 'foo',
                state: 'a bar',
                accessToken: '1234567890',
                idToken: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...',
                responseType: 'id_token'
            });
            const uri = ar.toUri();
            uri.should.be.equal('http://localhost/client?token_type=bearer&id_token=eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...&state=a%20bar');
        });

        it('should return access token', function() {
            const ar = new AuthenticationResponse({
                redirectUri: redirectUri,
                code: 'foo',
                state: 'a bar',
                accessToken: '1234567890',
                responseType: 'token'
            });
            const uri = ar.toUri();
            uri.should.be.equal('http://localhost/client?token_type=bearer&access_token=1234567890&state=a%20bar');
        });

        it('should fail because of missing responseType', function() {
            (function(){
                const ar = new AuthenticationResponse({
                    redirectUri: redirectUri,
                    code: 'foo',
                    state: 'a bar',
                    accessToken: '1234567890'
                });
            }).should.throw();
        });

        it('should fail because of missing redirectUri', function() {
            (function(){
                const ar = new AuthenticationResponse({
                    responseType: 'token',
                    code: 'foo',
                    state: 'a bar',
                    accessToken: '1234567890'
                });
            }).should.throw();
        });

        it('should fail because of missing access token', function() {
            const ar = new AuthenticationResponse({
                redirectUri: redirectUri,
                code: 'foo',
                state: 'a bar',
                responseType: 'token'
            });
            (function() { ar.toUri(); }).should.throw();
        });

        it('should fail because of missing id token', function() {
            const ar = new AuthenticationResponse({
                redirectUri: redirectUri,
                code: 'foo',
                state: 'a bar',
                responseType: 'id_token'
            });
            (function() { ar.toUri(); }).should.throw();
        });
    });
});


text:
FROM php:7.1-fpm

LABEL Maintainer="Jeremy Brayton"

# apt-get required packages
RUN apt-get update -yqq && apt-get install -yqq git openssh-client zlib1g-dev zip unzip

# PHP extension installation
RUN docker-php-ext-install pdo_mysql zip bcmath json pcntl posix

# Install iconv, mcrypt, and gd
RUN apt-get install -yqq libfreetype6-dev libjpeg62-turbo-dev libmcrypt-dev libpng-dev \
    && docker-php-ext-install -j$(nproc) iconv mcrypt \
    && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
    && docker-php-ext-install -j$(nproc) gd

# Install ssh2
#RUN apt-get install -yqq libssh2-1 libssh2-1-dev \
#    && pecl install ssh2 \
#    && docker-php-ext-enable ssh2

# Install xdebug
#RUN pecl install xdebug \
#    && docker-php-ext-enable xdebug

# Install composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

# Environmental variables
ENV COMPOSER_HOME /root/.composer
ENV COMPOSER_CACHE_DIR /cache
ENV PATH /root/.composer/vendor/bin:$PATH

# Install composer parallel downloads
RUN composer global require "hirak/prestissimo:^0.3"

# Install deployer
RUN composer global require "deployer/deployer"
RUN composer global require --dev "deployer/recipes"

# Install PHP SSH2 extension
#RUN composer global require "herzult/php-ssh:~1.1"

redpajama_set_name: RedPajamaGithub


text:
package org.zezutom.schematic.service.parser.json.node;

import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.junit.Before;
import org.junit.Test;
import org.zezutom.schematic.TestUtil;
import org.zezutom.schematic.model.json.Node;
import org.zezutom.schematic.model.json.schema.JsonSchemaCombinationRule;
import org.zezutom.schematic.model.json.schema.JsonSchemaCombinationType;
import org.zezutom.schematic.service.generator.ValueGenerator;
import org.zezutom.schematic.service.parser.json.JsonNodeParser;

import java.io.IOException;

import static org.junit.Assert.*;

public abstract class BaseJsonNodeParserTestCase<T, G extends ValueGenerator<T>, N extends Node<T, G>, P extends JsonNodeParser<N>> {

    G generator;

    P parser;

    abstract G createGenerator();

    abstract P createParser(G generator);

    abstract String getResourceDir();

    @Before
    public void before() {
        generator = createGenerator();
        parser = createParser(generator);
    }

    @Test
    public void parseNullNodeReturnsNull() {
        assertNull(parser.parse(null));
    }

    void parse(String fileName) {
        N node = parser.parse(getJsonNode(fileName));
        assertNotNull(node);
    }

    void assertCombinationRule(JsonSchemaCombinationRule rule, JsonSchemaCombinationType expectedType) {
        assertNotNull(rule);
        assertEquals(expectedType, rule.getType());
    }

    private JsonNode getJsonNode(String fileName) {
        ObjectMapper mapper = new ObjectMapper();
        try {
            return mapper.readTree(TestUtil.getResourceAsStream(getResourceDir(), fileName));
        } catch (IOException e) {
            fail("Failed to parse JSON from file: " + e.getMessage());
        }
        return null;
    }
}


text:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Mdetailpengumuman extends CI_Model {

	/* i. function construct */
	function __construct(){
		parent::__construct();
		$this->load->database();
	}

function selectdetailpengumuman($pengumuman_id){
  $query= $this->db->query("select `pengumuman_id`,`judul`,`konten`,`file`,
																	DATE_FORMAT(`tgl_tampil`, '%d %M %Y') AS `tgl_tam`,
																	DATE_FORMAT(`tgl_tutup`, '%d %M %Y') AS `tgl_tut` FROM `pengumuman`
																	WHERE `pengumuman`.`pengumuman_id`='$pengumuman_id'");
	// echo $this->db->last_query();
  return $query;
}
}
?>


text:
function ok = jtreeCheckQueries(jtree, queries)
%% Return true if all of the queries are within cliques of the jtree

% This file is from pmtk3.googlecode.com

ok = false;
queries = cellwrap(queries);
cliqueLookup = jtree.cliqueLookup;
nqueries = numel(queries);
for i = 1:nqueries
    if ~any(all(cliqueLookup(queries{i}, :), 1)); return; end
end
ok = true;
end


text:
exports.localTearDown = function(test, assert) {
  console.error("globalTearDown was here");
  assert.equal(1, 1);
  test.finish();
};


text:
export default function readApplicationConfig(container) {
  if (container === void 0) {
    container = '#u-wave-config';
  }

  try {
    return JSON.parse(document.querySelector(container).textContent);
  } catch (e) {
    return {};
  }
}
//# sourceMappingURL=readApplicationConfig.js.map


text:
GazRos_Zakaz
============

Simple CRM server


text:
# ################################################################
# xxHash Makefile
# Copyright (C) 2012-2020 Yann Collet
#
# GPL v2 License
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# You can contact the author at:
#   - xxHash homepage: https://www.xxhash.com
#   - xxHash source repository: https://github.com/Cyan4973/xxHash
# ################################################################
# xxhsum: provides 32/64 bits hash of one or multiple files, or stdin
# ################################################################
Q = $(if $(filter 1,$(V) $(VERBOSE)),,@)

# Version numbers
SED ?= sed
SED_ERE_OPT ?= -E
LIBVER_MAJOR_SCRIPT:=`$(SED) -n '/define XXH_VERSION_MAJOR/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < xxhash.h`
LIBVER_MINOR_SCRIPT:=`$(SED) -n '/define XXH_VERSION_MINOR/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < xxhash.h`
LIBVER_PATCH_SCRIPT:=`$(SED) -n '/define XXH_VERSION_RELEASE/s/.*[[:blank:]]\([0-9][0-9]*\).*/\1/p' < xxhash.h`
LIBVER_MAJOR := $(shell echo $(LIBVER_MAJOR_SCRIPT))
LIBVER_MINOR := $(shell echo $(LIBVER_MINOR_SCRIPT))
LIBVER_PATCH := $(shell echo $(LIBVER_PATCH_SCRIPT))
LIBVER := $(LIBVER_MAJOR).$(LIBVER_MINOR).$(LIBVER_PATCH)

CFLAGS ?= -O3
DEBUGFLAGS+=-Wall -Wextra -Wconversion -Wcast-qual -Wcast-align -Wshadow \
            -Wstrict-aliasing=1 -Wswitch-enum -Wdeclaration-after-statement \
            -Wstrict-prototypes -Wundef -Wpointer-arith -Wformat-security \
            -Wvla -Wformat=2 -Winit-self -Wfloat-equal -Wwrite-strings \
            -Wredundant-decls -Wstrict-overflow=2
CFLAGS += $(DEBUGFLAGS) $(MOREFLAGS)
FLAGS   = $(CFLAGS) $(CPPFLAGS)
XXHSUM_VERSION = $(LIBVER)
UNAME := $(shell uname)

# Define *.exe as extension for Windows systems
ifneq (,$(filter Windows%,$(OS)))
EXT =.exe
else
EXT =
endif

# OS X linker doesn't support -soname, and use different extension
# see: https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/DynamicLibraryDesignGuidelines.html
ifeq ($(UNAME), Darwin)
	SHARED_EXT = dylib
	SHARED_EXT_MAJOR = $(LIBVER_MAJOR).$(SHARED_EXT)
	SHARED_EXT_VER = $(LIBVER).$(SHARED_EXT)
	SONAME_FLAGS = -install_name $(LIBDIR)/libxxhash.$(SHARED_EXT_MAJOR) -compatibility_version $(LIBVER_MAJOR) -current_version $(LIBVER)
else
	SONAME_FLAGS = -Wl,-soname=libxxhash.$(SHARED_EXT).$(LIBVER_MAJOR)
	SHARED_EXT = so
	SHARED_EXT_MAJOR = $(SHARED_EXT).$(LIBVER_MAJOR)
	SHARED_EXT_VER = $(SHARED_EXT).$(LIBVER)
endif

LIBXXH = libxxhash.$(SHARED_EXT_VER)

XXHSUM_SRC_DIR = cli
XXHSUM_SPLIT_SRCS = $(XXHSUM_SRC_DIR)/xxhsum.c \
                    $(XXHSUM_SRC_DIR)/xsum_os_specific.c \
                    $(XXHSUM_SRC_DIR)/xsum_output.c \
                    $(XXHSUM_SRC_DIR)/xsum_sanity_check.c \
                    $(XXHSUM_SRC_DIR)/xsum_bench.c
XXHSUM_SPLIT_OBJS = $(XXHSUM_SPLIT_SRCS:.c=.o)
XXHSUM_HEADERS = $(XXHSUM_SRC_DIR)/xsum_config.h \
                 $(XXHSUM_SRC_DIR)/xsum_arch.h \
                 $(XXHSUM_SRC_DIR)/xsum_os_specific.h \
                 $(XXHSUM_SRC_DIR)/xsum_output.h \
                 $(XXHSUM_SRC_DIR)/xsum_sanity_check.h \
                 $(XXHSUM_SRC_DIR)/xsum_bench.h

## generate CLI and libraries in release mode (default for `make`)
.PHONY: default
default: DEBUGFLAGS=
default: lib xxhsum_and_links

.PHONY: all
all: lib xxhsum xxhsum_inlinedXXH

## xxhsum is the command line interface (CLI)
ifeq ($(DISPATCH),1)
xxhsum: CPPFLAGS += -DXXHSUM_DISPATCH=1
xxhsum: xxh_x86dispatch.o
endif
xxhsum: xxhash.o $(XXHSUM_SPLIT_OBJS)
	$(CC) $(FLAGS) $^ $(LDFLAGS) -o $@$(EXT)

xxhsum32: CFLAGS += -m32  ## generate CLI in 32-bits mode
xxhsum32: xxhash.c $(XXHSUM_SPLIT_SRCS) ## do not generate object (avoid mixing different ABI)
	$(CC) $(FLAGS) $^ $(LDFLAGS) -o $@$(EXT)

## dispatch only works for x86/x64 systems
dispatch: CPPFLAGS += -DXXHSUM_DISPATCH=1
dispatch: xxhash.o xxh_x86dispatch.o $(XXHSUM_SPLIT_SRCS)
	$(CC) $(FLAGS) $^ $(LDFLAGS) -o $@$(EXT)

xxhash.o: xxhash.c xxhash.h
xxhsum.o: $(XXHSUM_SRC_DIR)/xxhsum.c $(XXHSUM_HEADERS) \
    xxhash.h xxh_x86dispatch.h
xxh_x86dispatch.o: xxh_x86dispatch.c xxh_x86dispatch.h xxhash.h

.PHONY: xxhsum_and_links
xxhsum_and_links: xxhsum xxh32sum xxh64sum xxh128sum

xxh32sum xxh64sum xxh128sum: xxhsum
	ln -sf $<$(EXT) $@$(EXT)

xxhsum_inlinedXXH: CPPFLAGS += -DXXH_INLINE_ALL
xxhsum_inlinedXXH: $(XXHSUM_SPLIT_SRCS)
	$(CC) $(FLAGS) $< -o $@$(EXT)

# library

libxxhash.a: ARFLAGS = rcs
libxxhash.a: xxhash.o
	$(AR) $(ARFLAGS) $@ $^

$(LIBXXH): LDFLAGS += -shared
ifeq (,$(filter Windows%,$(OS)))
$(LIBXXH): CFLAGS += -fPIC
endif
ifeq ($(DISPATCH),1)
$(LIBXXH): xxh_x86dispatch.c
endif
$(LIBXXH): xxhash.c
	$(CC) $(FLAGS) $^ $(LDFLAGS) $(SONAME_FLAGS) -o $@
	ln -sf $@ libxxhash.$(SHARED_EXT_MAJOR)
	ln -sf $@ libxxhash.$(SHARED_EXT)

.PHONY: libxxhash
libxxhash:  ## generate dynamic xxhash library
libxxhash: $(LIBXXH)

.PHONY: lib
lib:  ## generate static and dynamic xxhash libraries
lib: libxxhash.a libxxhash

# helper targets

AWK  = awk
GREP = grep
SORT = sort
NM   = nm

.PHONY: list
list:  ## list all Makefile targets
	$(Q)$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | $(AWK) -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | $(SORT) | egrep -v -e '^[^[:alnum:]]' -e '^$@$$' | xargs

.PHONY: help
help:  ## list documented targets
	$(Q)$(GREP) -E '^[0-9a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \
	$(SORT) | \
	$(AWK) 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

.PHONY: clean
clean:  ## remove all build artifacts
	$(Q)$(RM) -r *.dSYM   # Mac OS-X specific
	$(Q)$(RM) core *.o *.obj *.$(SHARED_EXT) *.$(SHARED_EXT).* *.a libxxhash.pc
	$(Q)$(RM) xxhsum$(EXT) xxhsum32$(EXT) xxhsum_inlinedXXH$(EXT) dispatch$(EXT)
	$(Q)$(RM) xxh32sum$(EXT) xxh64sum$(EXT) xxh128sum$(EXT)
	$(Q)$(RM) $(XXHSUM_SRC_DIR)/*.o $(XXHSUM_SRC_DIR)/*.obj
	$(MAKE) -C tests clean
	$(MAKE) -C tests/bench clean
	$(MAKE) -C tests/collisions clean
	@echo cleaning completed

# =================================================
# tests
# =================================================

# make check can be run with cross-compiled binaries on emulated environments (qemu user mode)
# by setting $(RUN_ENV) to the target emulation environment
.PHONY: check
check: xxhsum   ## basic tests for xxhsum CLI, set RUN_ENV for emulated environments
	# stdin
	$(RUN_ENV) ./xxhsum$(EXT) < xxhash.c
	# multiple files
	$(RUN_ENV) ./xxhsum$(EXT) xxhash.*
	# internal bench
	$(RUN_ENV) ./xxhsum$(EXT) -bi0
	# long bench command
	$(RUN_ENV) ./xxhsum$(EXT) --benchmark-all -i0
	# bench multiple variants
	$(RUN_ENV) ./xxhsum$(EXT) -b1,2,3 -i0
	# file bench
	$(RUN_ENV) ./xxhsum$(EXT) -bi0 xxhash.c
	# 32-bit
	$(RUN_ENV) ./xxhsum$(EXT) -H0 xxhash.c
	# 128-bit
	$(RUN_ENV) ./xxhsum$(EXT) -H2 xxhash.c
	# XXH3 (enforce BSD style)
	$(RUN_ENV) ./xxhsum$(EXT) -H3 xxhash.c | grep "XXH3"
	# request incorrect variant
	$(RUN_ENV) ./xxhsum$(EXT) -H9 xxhash.c ; test $$? -eq 1
	@printf "\n .......   checks completed successfully   ....... \n"

.PHONY: test-unicode
test-unicode:
	$(MAKE) -C tests test_unicode

.PHONY: test-mem
VALGRIND = valgrind --leak-check=yes --error-exitcode=1
test-mem: RUN_ENV = $(VALGRIND)
test-mem: xxhsum check

.PHONY: test32
test32: xxhsum32
	@echo ---- test 32-bit ----
	./xxhsum32 -bi0 xxhash.c

TEST_FILES = xxhsum$(EXT) xxhash.c xxhash.h
.PHONY: test-xxhsum-c
test-xxhsum-c: xxhsum
	# xxhsum to/from pipe
	./xxhsum $(TEST_FILES) | ./xxhsum -c -
	./xxhsum -H0 $(TEST_FILES) | ./xxhsum -c -
	# xxhsum -c is unable to verify checksum of file from STDIN (#470)
	./xxhsum < README.md > .test.README.md.xxh
	./xxhsum -c .test.README.md.xxh < README.md
	# xxhsum -q does not display "Loading" message into stderr (#251)
	! ./xxhsum -q $(TEST_FILES) 2>&1 | grep Loading
	# xxhsum does not display "Loading" message into stderr either
	! ./xxhsum $(TEST_FILES) 2>&1 | grep Loading
	# Check that xxhsum do display filename that it failed to open.
	LC_ALL=C ./xxhsum nonexistent 2>&1 | grep "Error: Could not open 'nonexistent'"
	# xxhsum to/from file, shell redirection
	./xxhsum $(TEST_FILES) > .test.xxh64
	./xxhsum --tag $(TEST_FILES) > .test.xxh64_tag
	./xxhsum --little-endian $(TEST_FILES) > .test.le_xxh64
	./xxhsum --tag --little-endian $(TEST_FILES) > .test.le_xxh64_tag
	./xxhsum -H0 $(TEST_FILES) > .test.xxh32
	./xxhsum -H0 --tag $(TEST_FILES) > .test.xxh32_tag
	./xxhsum -H0 --little-endian $(TEST_FILES) > .test.le_xxh32
	./xxhsum -H0 --tag --little-endian $(TEST_FILES) > .test.le_xxh32_tag
	./xxhsum -H2 $(TEST_FILES) > .test.xxh128
	./xxhsum -H2 --tag $(TEST_FILES) > .test.xxh128_tag
	./xxhsum -H2 --little-endian $(TEST_FILES) > .test.le_xxh128
	./xxhsum -H2 --tag --little-endian $(TEST_FILES) > .test.le_xxh128_tag
	./xxhsum -H3 $(TEST_FILES) > .test.xxh3
	./xxhsum -H3 --tag $(TEST_FILES) > .test.xxh3_tag
	./xxhsum -H3 --little-endian $(TEST_FILES) > .test.le_xxh3
	./xxhsum -H3 --tag --little-endian $(TEST_FILES) > .test.le_xxh3_tag
	./xxhsum -c .test.xxh*
	./xxhsum -c --little-endian .test.le_xxh*
	./xxhsum -c .test.*_tag
	# read list of files from stdin
	./xxhsum -c < .test.xxh32
	./xxhsum -c < .test.xxh64
	./xxhsum -c < .test.xxh128
	./xxhsum -c < .test.xxh3
	cat .test.xxh* | ./xxhsum -c -
	# check variant with '*' marker as second separator
	$(SED) 's/  / \*/' .test.xxh32 | ./xxhsum -c
	# bsd-style output
	./xxhsum --tag xxhsum* | $(GREP) XXH64
	./xxhsum --tag -H0 xxhsum* | $(GREP) XXH32
	./xxhsum --tag -H1 xxhsum* | $(GREP) XXH64
	./xxhsum --tag -H2 xxhsum* | $(GREP) XXH128
	./xxhsum --tag -H3 xxhsum* | $(GREP) XXH3
	./xxhsum       -H3 xxhsum* | $(GREP) XXH3  # --tag is implicit for H3
	./xxhsum --tag -H32 xxhsum* | $(GREP) XXH32
	./xxhsum --tag -H64 xxhsum* | $(GREP) XXH64
	./xxhsum --tag -H128 xxhsum* | $(GREP) XXH128
	./xxhsum --tag -H0 --little-endian xxhsum* | $(GREP) XXH32_LE
	./xxhsum --tag -H1 --little-endian xxhsum* | $(GREP) XXH64_LE
	./xxhsum --tag -H2 --little-endian xxhsum* | $(GREP) XXH128_LE
	./xxhsum       -H3 --little-endian xxhsum* | $(GREP) XXH3_LE
	./xxhsum --tag -H32 --little-endian xxhsum* | $(GREP) XXH32_LE
	./xxhsum --tag -H64 --little-endian xxhsum* | $(GREP) XXH64_LE
	./xxhsum --tag -H128 --little-endian xxhsum* | $(GREP) XXH128_LE
	# check bsd-style
	./xxhsum --tag xxhsum* | ./xxhsum -c
	./xxhsum --tag -H32 --little-endian xxhsum* | ./xxhsum -c
	# xxhsum -c warns improperly format lines.
	echo '12345678 ' >>.test.xxh32
	./xxhsum -c .test.xxh32 | $(GREP) improperly
	echo '123456789  file' >>.test.xxh64
	./xxhsum -c .test.xxh64 | $(GREP) improperly
	# Expects "FAILED"
	echo "0000000000000000  LICENSE" | ./xxhsum -c -; test $$? -eq 1
	echo "00000000  LICENSE" | ./xxhsum -c -; test $$? -eq 1
	# Expects "FAILED open or read"
	echo "0000000000000000  test-expects-file-not-found" | ./xxhsum -c -; test $$? -eq 1
	echo "00000000  test-expects-file-not-found" | ./xxhsum -c -; test $$? -eq 1
	@$(RM) .test.*

.PHONY: armtest
armtest: clean
	@echo ---- test ARM compilation ----
	CC=arm-linux-gnueabi-gcc MOREFLAGS="-Werror -static" $(MAKE) xxhsum

.PHONY: clangtest
clangtest: clean
	@echo ---- test clang compilation ----
	CC=clang MOREFLAGS="-Werror -Wconversion -Wno-sign-conversion" $(MAKE) all

.PHONY: cxxtest
cxxtest: clean
	@echo ---- test C++ compilation ----
	CC="$(CXX) -Wno-deprecated" $(MAKE) all CFLAGS="-O3 -Wall -Wextra -Wundef -Wshadow -Wcast-align -Werror -fPIC"

.PHONY: c90test
ifeq ($(NO_C90_TEST),true)
c90test:
	@echo no c90 compatibility test
else
c90test: CPPFLAGS += -DXXH_NO_LONG_LONG
c90test: CFLAGS += -std=c90 -Werror -pedantic
c90test: xxhash.c
	@echo ---- test strict C90 compilation [xxh32 only] ----
	$(RM) xxhash.o
	$(CC) $(FLAGS) $^ -c
	$(NM) xxhash.o | $(GREP) XXH64 ; test $$? -eq 1
	$(RM) xxhash.o
endif

noxxh3test: CPPFLAGS += -DXXH_NO_XXH3
noxxh3test: CFLAGS += -Werror -pedantic -Wno-long-long  # XXH64 requires long long support
noxxh3test: xxhash.c
	@echo ---- test compilation without XXH3 ----
	$(RM) xxhash.o
	$(CC) $(FLAGS) $^ -c
	$(NM) xxhash.o | $(GREP) XXH3_ ; test $$? -eq 1
	$(RM) xxhash.o

.PHONY: usan
usan: CC=clang
usan: CXX=clang++
usan:  ## check CLI runtime for undefined behavior, using clang's sanitizer
	@echo ---- check undefined behavior - sanitize ----
	$(MAKE) clean
	$(MAKE) test CC=$(CC) CXX=$(CXX) MOREFLAGS="-g -fsanitize=undefined -fno-sanitize-recover=all"

.PHONY: staticAnalyze
SCANBUILD ?= scan-build
staticAnalyze: clean  ## check C source files using $(SCANBUILD) static analyzer
	@echo ---- static analyzer - $(SCANBUILD) ----
	CFLAGS="-g -Werror" $(SCANBUILD) --status-bugs -v $(MAKE) all

CPPCHECK ?= cppcheck
.PHONY: cppcheck
cppcheck:  ## check C source files using $(CPPCHECK) static analyzer
	@echo ---- static analyzer - $(CPPCHECK) ----
	$(CPPCHECK) . --force --enable=warning,portability,performance,style --error-exitcode=1 > /dev/null

.PHONY: namespaceTest
namespaceTest:  ## ensure XXH_NAMESPACE redefines all public symbols
	$(CC) -c xxhash.c
	$(CC) -DXXH_NAMESPACE=TEST_ -c xxhash.c -o xxhash2.o
	$(CC) xxhash.o xxhash2.o $(XXHSUM_SPLIT_SRCS)  -o xxhsum2  # will fail if one namespace missing (symbol collision)
	$(RM) *.o xxhsum2  # clean

MAN = $(XXHSUM_SRC_DIR)/xxhsum.1
MD2ROFF ?= ronn
MD2ROFF_FLAGS ?= --roff --warnings --manual="User Commands" --organization="xxhsum $(XXHSUM_VERSION)"
$(MAN): $(XXHSUM_SRC_DIR)/xxhsum.1.md xxhash.h
	cat $< | $(MD2ROFF) $(MD2ROFF_FLAGS) | $(SED) -n '/^\.\\\".*/!p' > $@

.PHONY: man
man: $(MAN)  ## generate man page from markdown source

.PHONY: clean-man
clean-man:
	$(RM) xxhsum.1

.PHONY: preview-man
preview-man: man
	man ./xxhsum.1

.PHONY: test
test: DEBUGFLAGS += -DXXH_DEBUGLEVEL=1
test: all namespaceTest check test-xxhsum-c c90test test-tools

.PHONY: test-inline
test-inline:
	$(MAKE) -C tests test_multiInclude

.PHONY: test-all
test-all: CFLAGS += -Werror
test-all: test test32 test-unicode clangtest cxxtest usan test-inline listL120 trailingWhitespace

.PHONY: test-tools
test-tools:
	CFLAGS=-Werror $(MAKE) -C tests/bench
	CFLAGS=-Werror $(MAKE) -C tests/collisions

.PHONY: listL120
listL120:  # extract lines >= 120 characters in *.{c,h}, by Takayuki Matsuoka (note: $$, for Makefile compatibility)
	find . -type f -name '*.c' -o -name '*.h' | while read -r filename; do awk 'length > 120 {print FILENAME "(" FNR "): " $$0}' $$filename; done

.PHONY: trailingWhitespace
trailingWhitespace:
	! $(GREP) -E "`printf '[ \\t]$$'`" cli/*.{c,h,1} *.c *.h LICENSE Makefile cmake_unofficial/CMakeLists.txt

.PHONY: lint-unicode
lint-unicode:
	./tests/unicode_lint.sh

# =========================================================
# make install is validated only for the following targets
# =========================================================
ifneq (,$(filter Linux Darwin GNU/kFreeBSD GNU Haiku OpenBSD FreeBSD NetBSD DragonFly SunOS CYGWIN% , $(UNAME)))

DESTDIR     ?=
# directory variables: GNU conventions prefer lowercase
# see https://www.gnu.org/prep/standards/html_node/Makefile-Conventions.html
# support both lower and uppercase (BSD), use uppercase in script
prefix      ?= /usr/local
PREFIX      ?= $(prefix)
exec_prefix ?= $(PREFIX)
EXEC_PREFIX ?= $(exec_prefix)
libdir      ?= $(EXEC_PREFIX)/lib
LIBDIR      ?= $(libdir)
includedir  ?= $(PREFIX)/include
INCLUDEDIR  ?= $(includedir)
bindir      ?= $(EXEC_PREFIX)/bin
BINDIR      ?= $(bindir)
datarootdir ?= $(PREFIX)/share
mandir      ?= $(datarootdir)/man
man1dir     ?= $(mandir)/man1

ifneq (,$(filter $(UNAME),FreeBSD NetBSD DragonFly))
PKGCONFIGDIR ?= $(PREFIX)/libdata/pkgconfig
else
PKGCONFIGDIR ?= $(LIBDIR)/pkgconfig
endif

ifneq (,$(filter $(UNAME),OpenBSD FreeBSD NetBSD DragonFly SunOS))
MANDIR  ?= $(PREFIX)/man/man1
else
MANDIR  ?= $(man1dir)
endif

ifneq (,$(filter $(UNAME),SunOS))
INSTALL ?= ginstall
else
INSTALL ?= install
endif

INSTALL_PROGRAM ?= $(INSTALL)
INSTALL_DATA    ?= $(INSTALL) -m 644

# Escape special symbols by putting each character into its separate class
EXEC_PREFIX_REGEX ?= $(shell echo "$(EXEC_PREFIX)" | $(SED) $(SED_ERE_OPT) -e "s/([^^])/[\1]/g" -e "s/\\^/\\\\^/g")
PREFIX_REGEX ?= $(shell echo "$(PREFIX)" | $(SED) $(SED_ERE_OPT) -e "s/([^^])/[\1]/g" -e "s/\\^/\\\\^/g")

PCLIBDIR ?= $(shell echo "$(LIBDIR)"     | $(SED) -n $(SED_ERE_OPT) -e "s@^$(EXEC_PREFIX_REGEX)(/|$$)@@p")
PCINCDIR ?= $(shell echo "$(INCLUDEDIR)" | $(SED) -n $(SED_ERE_OPT) -e "s@^$(PREFIX_REGEX)(/|$$)@@p")
PCEXECDIR?= $(if $(filter $(PREFIX),$(EXEC_PREFIX)),$$\{prefix\},$(EXEC_PREFIX))

ifeq (,$(PCLIBDIR))
# Additional prefix check is required, since the empty string is technically a
# valid PCLIBDIR
ifeq (,$(shell echo "$(LIBDIR)" | $(SED) -n $(SED_ERE_OPT) -e "\\@^$(EXEC_PREFIX_REGEX)(/|$$)@ p"))
$(error configured libdir ($(LIBDIR)) is outside of exec_prefix ($(EXEC_PREFIX)), can't generate pkg-config file)
endif
endif

ifeq (,$(PCINCDIR))
# Additional prefix check is required, since the empty string is technically a
# valid PCINCDIR
ifeq (,$(shell echo "$(INCLUDEDIR)" | $(SED) -n $(SED_ERE_OPT) -e "\\@^$(PREFIX_REGEX)(/|$$)@ p"))
$(error configured includedir ($(INCLUDEDIR)) is outside of prefix ($(PREFIX)), can't generate pkg-config file)
endif
endif

libxxhash.pc: libxxhash.pc.in
	@echo creating pkgconfig
	$(Q)$(SED) $(SED_ERE_OPT) -e 's|@PREFIX@|$(PREFIX)|' \
          -e 's|@EXECPREFIX@|$(PCEXECDIR)|' \
          -e 's|@LIBDIR@|$(PCLIBDIR)|' \
          -e 's|@INCLUDEDIR@|$(PCINCDIR)|' \
          -e 's|@VERSION@|$(LIBVER)|' \
          $< > $@

.PHONY: install
install: lib libxxhash.pc xxhsum  ## install libraries, CLI, links and man page
	@echo Installing libxxhash
	$(Q)$(INSTALL) -d -m 755 $(DESTDIR)$(LIBDIR)
	$(Q)$(INSTALL_DATA) libxxhash.a $(DESTDIR)$(LIBDIR)
	$(Q)$(INSTALL_PROGRAM) $(LIBXXH) $(DESTDIR)$(LIBDIR)
	$(Q)ln -sf $(LIBXXH) $(DESTDIR)$(LIBDIR)/libxxhash.$(SHARED_EXT_MAJOR)
	$(Q)ln -sf $(LIBXXH) $(DESTDIR)$(LIBDIR)/libxxhash.$(SHARED_EXT)
	$(Q)$(INSTALL) -d -m 755 $(DESTDIR)$(INCLUDEDIR)   # includes
	$(Q)$(INSTALL_DATA) xxhash.h $(DESTDIR)$(INCLUDEDIR)
	$(Q)$(INSTALL_DATA) xxh3.h $(DESTDIR)$(INCLUDEDIR) # for compatibility, will be removed in v0.9.0
ifeq ($(DISPATCH),1)
	$(Q)$(INSTALL_DATA) xxh_x86dispatch.h $(DESTDIR)$(INCLUDEDIR)
endif
	@echo Installing pkgconfig
	$(Q)$(INSTALL) -d -m 755 $(DESTDIR)$(PKGCONFIGDIR)/
	$(Q)$(INSTALL_DATA) libxxhash.pc $(DESTDIR)$(PKGCONFIGDIR)/
	@echo Installing xxhsum
	$(Q)$(INSTALL) -d -m 755 $(DESTDIR)$(BINDIR)/ $(DESTDIR)$(MANDIR)/
	$(Q)$(INSTALL_PROGRAM) xxhsum $(DESTDIR)$(BINDIR)/xxhsum
	$(Q)ln -sf xxhsum $(DESTDIR)$(BINDIR)/xxh32sum
	$(Q)ln -sf xxhsum $(DESTDIR)$(BINDIR)/xxh64sum
	$(Q)ln -sf xxhsum $(DESTDIR)$(BINDIR)/xxh128sum
	@echo Installing man pages
	$(Q)$(INSTALL_DATA) $(MAN) $(DESTDIR)$(MANDIR)/xxhsum.1
	$(Q)ln -sf $(MAN) $(DESTDIR)$(MANDIR)/xxh32sum.1
	$(Q)ln -sf $(MAN) $(DESTDIR)$(MANDIR)/xxh64sum.1
	$(Q)ln -sf $(MAN) $(DESTDIR)$(MANDIR)/xxh128sum.1
	@echo xxhash installation completed

.PHONY: uninstall
uninstall:  ## uninstall libraries, CLI, links and man page
	$(Q)$(RM) $(DESTDIR)$(LIBDIR)/libxxhash.a
	$(Q)$(RM) $(DESTDIR)$(LIBDIR)/libxxhash.$(SHARED_EXT)
	$(Q)$(RM) $(DESTDIR)$(LIBDIR)/libxxhash.$(SHARED_EXT_MAJOR)
	$(Q)$(RM) $(DESTDIR)$(LIBDIR)/$(LIBXXH)
	$(Q)$(RM) $(DESTDIR)$(INCLUDEDIR)/xxhash.h
	$(Q)$(RM) $(DESTDIR)$(INCLUDEDIR)/xxh3.h
	$(Q)$(RM) $(DESTDIR)$(INCLUDEDIR)/xxh_x86dispatch.h
	$(Q)$(RM) $(DESTDIR)$(PKGCONFIGDIR)/libxxhash.pc
	$(Q)$(RM) $(DESTDIR)$(BINDIR)/xxh32sum
	$(Q)$(RM) $(DESTDIR)$(BINDIR)/xxh64sum
	$(Q)$(RM) $(DESTDIR)$(BINDIR)/xxh128sum
	$(Q)$(RM) $(DESTDIR)$(BINDIR)/xxhsum
	$(Q)$(RM) $(DESTDIR)$(MANDIR)/xxh32sum.1
	$(Q)$(RM) $(DESTDIR)$(MANDIR)/xxh64sum.1
	$(Q)$(RM) $(DESTDIR)$(MANDIR)/xxh128sum.1
	$(Q)$(RM) $(DESTDIR)$(MANDIR)/xxhsum.1
	@echo xxhsum successfully uninstalled

endif


text:
\chapter*{Annex}\label{chap:annex}

\section*{Parameter-framework links}
\begin{description}
    \item[core] \url{https://github.com/01org/parameter-framework}
    \item[filesystem plugin] \url{https://github.com/01org/parameter-framework-plugins-filesystem}
    \item[alsa plugin] \url{https://github.com/01org/parameter-framework-plugins-alsa}
    \item[core wiki] \url{https://github.com/01org/parameter-framework/wiki}
    \item[sample files] \url{https://github.com/01org/parameter-framework-samples}
\end{description}

\section*{More links}
\begin{description}
    \item[01.org | Intel open-source technology center] \url{https://01.org/}
\end{description}


text:
/**
 * Class that generates a path for auto
 *
 * @author squirlemaster42
 * @author TheCookingCookie
 */
package org.usfirst.frc.team1699.utils.autonomous;

import java.util.List;

import org.usfirst.frc.team1699.utils.command.AutoCommandMap;
import org.usfirst.frc.team1699.utils.inireader.ConfigSection;

public class AutoScriptReader {

	private final String path; // Stores the path a the text file containing auto
							// script
	private List<String> fileAsString; // Array list that hold the autoFile as
										// an array of strings
	private final ConfigSection cs; // Holds an instance of ConfigSection
	private final AutoCommandMap map;

	/**
	 * Constructor
	 *
	 * @param path
	 * @param cmds
	 */
	public AutoScriptReader(final String path, final AutoCommandMap map) {
		// Sets instance vars to values input by programmer
		this.path = path;
		this.map = map;
		this.cs = null;
		fileAsString = AutoUtils.loadFileAsArray(path); // Sets fileAsArray list
														// equal to the file
		fileAsString.forEach(a -> System.out.println(a));
	}

	/**
	 * Constructor
	 *
	 * @param cs
	 * @param cmds
	 */
	public AutoScriptReader(final ConfigSection cs, final AutoCommandMap map) {
		// Sets instance vars to values input by programmer
		this.map = map;
		this.cs = cs;
		this.path = null;
		fileAsString = AutoUtils.loadFileAsArray(cs); // Sets fileAsArray list
														// equal to the file
	}

	/**
	 * Returns path to file that contains autonomous scripts
	 *
	 * @return
	 */
	public String getPath() { // Returns the file path
		return path;
	}

	/**
	 * Returns file as string array
	 *
	 * @return
	 */
	public List<String> getFileAsString() { // Returns the ArrayList of the file
											// as a string
		return fileAsString;
	}

	/**
	 * Returns an instance of ConfigSection
	 *
	 * @return
	 */
	public ConfigSection getCs() {
		return cs;
	}

	/**
	 * Runs all lines of file (main)
	 */
	public void runScript() {
		for (int i = 0; i < fileAsString.size(); i++) { // Loops through
														// fileAsString array
			try {
				if (ValueGetterUtils.isCommand(fileAsString.get(i), map)) {
					ValueGetterUtils.callCommandFromString(fileAsString.get(i), map); // Sends string to method so it can be converted to an object then calls command's run autoMethod
				} else if (CommentUtils.isComment(fileAsString.get(i))) {
					i += 1;
				} else {
					throw new InvalidLineException();
				}
			} catch (CommandNotFoundException e) { // Detects if there is a
													// error where the command
													// is not found
				System.out.println("Your autonomous script has failed because a command does not exist.");
				e.printStackTrace();
				break;
			}
		}
	}
}


text:
[![travis-ci](https://travis-ci.org/sharedmemory/sharedmemory.github.io-source.svg)](https://travis-ci.org/sharedmemory/sharedmemory.github.io-source)

Source for sharedmemory.github.io

### Usage
```
git clone --recursive git@github.com:sharedmemory/sharedmemory.github.io-source.git
```


text:
package com.amazonaws.services.ecrpublic.model;

import java.io.Serializable;
import javax.annotation.Generated;

/**
 *
 * @see AWS API
 *      Documentation
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class DescribeImagesResult extends com.amazonaws.AmazonWebServiceResult<com.amazonaws.ResponseMetadata> implements Serializable, Cloneable {

    /**
     *

     * A list of ImageDetail objects that contain data about the image.
     *

     */
    private java.util.List<ImageDetail> imageDetails;
    /**
     *

     * The nextToken value to include in a future DescribeImages request. When the results of
     * a DescribeImages request exceed maxResults, this value can be used to retrieve the next
     * page of results. This value is null when there are no more results to return.
     *

     */
    private String nextToken;

    /**
     *

     * A list of ImageDetail objects that contain data about the image.
     *

     *
     * @return A list of ImageDetail objects that contain data about the image.
     */

    public java.util.List<ImageDetail> getImageDetails() {
        return imageDetails;
    }

    /**
     *

     * A list of ImageDetail objects that contain data about the image.
     *

     *
     * @param imageDetails
     *        A list of ImageDetail objects that contain data about the image.
     */

    public void setImageDetails(java.util.Collection<ImageDetail> imageDetails) {
        if (imageDetails == null) {
            this.imageDetails = null;
            return;
        }

        this.imageDetails = new java.util.ArrayList<ImageDetail>(imageDetails);
    }

    /**
     *

     * A list of ImageDetail objects that contain data about the image.
     *

     *

     * NOTE: This method appends the values to the existing list (if any). Use
     * {@link #setImageDetails(java.util.Collection)} or {@link #withImageDetails(java.util.Collection)} if you want to
     * override the existing values.
     *

     *
     * @param imageDetails
     *        A list of ImageDetail objects that contain data about the image.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public DescribeImagesResult withImageDetails(ImageDetail... imageDetails) {
        if (this.imageDetails == null) {
            setImageDetails(new java.util.ArrayList<ImageDetail>(imageDetails.length));
        }
        for (ImageDetail ele : imageDetails) {
            this.imageDetails.add(ele);
        }
        return this;
    }

    /**
     *

     * A list of ImageDetail objects that contain data about the image.
     *

     *
     * @param imageDetails
     *        A list of ImageDetail objects that contain data about the image.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public DescribeImagesResult withImageDetails(java.util.Collection<ImageDetail> imageDetails) {
        setImageDetails(imageDetails);
        return this;
    }

    /**
     *

     * The nextToken value to include in a future DescribeImages request. When the results of
     * a DescribeImages request exceed maxResults, this value can be used to retrieve the next
     * page of results. This value is null when there are no more results to return.
     *

     *
     * @param nextToken
     *        The nextToken value to include in a future DescribeImages request. When the
     *        results of a DescribeImages request exceed maxResults, this value can be used to
     *        retrieve the next page of results. This value is null when there are no more results to
     *        return.
     */

    public void setNextToken(String nextToken) {
        this.nextToken = nextToken;
    }

    /**
     *

     * The nextToken value to include in a future DescribeImages request. When the results of
     * a DescribeImages request exceed maxResults, this value can be used to retrieve the next
     * page of results. This value is null when there are no more results to return.
     *

     *
     * @return The nextToken value to include in a future DescribeImages request. When the
     *         results of a DescribeImages request exceed maxResults, this value can be used
     *         to retrieve the next page of results. This value is null when there are no more results to
     *         return.
     */

    public String getNextToken() {
        return this.nextToken;
    }

    /**
     *

     * The nextToken value to include in a future DescribeImages request. When the results of
     * a DescribeImages request exceed maxResults, this value can be used to retrieve the next
     * page of results. This value is null when there are no more results to return.
     *

     *
     * @param nextToken
     *        The nextToken value to include in a future DescribeImages request. When the
     *        results of a DescribeImages request exceed maxResults, this value can be used to
     *        retrieve the next page of results. This value is null when there are no more results to
     *        return.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public DescribeImagesResult withNextToken(String nextToken) {
        setNextToken(nextToken);
        return this;
    }

    /**
     * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
     * redacted from this string using a placeholder value.
     *
     * @return A string representation of this object.
     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getImageDetails() != null)
            sb.append("ImageDetails: ").append(getImageDetails()).append(",");
        if (getNextToken() != null)
            sb.append("NextToken: ").append(getNextToken());
        sb.append("}");
        return sb.toString();
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;

        if (obj instanceof DescribeImagesResult == false)
            return false;
        DescribeImagesResult other = (DescribeImagesResult) obj;
        if (other.getImageDetails() == null ^ this.getImageDetails() == null)
            return false;
        if (other.getImageDetails() != null && other.getImageDetails().equals(this.getImageDetails()) == false)
            return false;
        if (other.getNextToken() == null ^ this.getNextToken() == null)
            return false;
        if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == false)
            return false;
        return true;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;

        hashCode = prime * hashCode + ((getImageDetails() == null) ? 0 : getImageDetails().hashCode());
        hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode());
        return hashCode;
    }

    @Override
    public DescribeImagesResult clone() {
        try {
            return (DescribeImagesResult) super.clone();
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
        }
    }

}


text:
using System;
using Azure.Core;

namespace Azure.MixedReality.RemoteRendering
{
    /// <summary> Conversion input settings describe the origin of conversion input. </summary>
    public partial class AssetConversionInputOptions
    {
        /// <summary> Initializes a new instance of AssetConversionInputOptions. </summary>
        /// <param name="storageContainerUri"> The URI of the Azure blob storage container containing the input model. </param>
        /// <param name="relativeInputAssetPath"> The relative path starting at blobPrefix (or at the container root if blobPrefix is not provided) to the input model. Must point to a file with a supported file format ending. See https://docs.microsoft.com/azure/remote-rendering/how-tos/conversion/model-conversion for details. </param>
        /// <exception cref="ArgumentNullException"> <paramref name="storageContainerUri"/> or <paramref name="relativeInputAssetPath"/> is null. </exception>
        public AssetConversionInputOptions(Uri storageContainerUri, string relativeInputAssetPath)
        {
            Argument.AssertNotNull(storageContainerUri, nameof(storageContainerUri));
            Argument.AssertNotNull(relativeInputAssetPath, nameof(relativeInputAssetPath));

            StorageContainerUri = storageContainerUri;
            RelativeInputAssetPath = relativeInputAssetPath;
        }

        /// <summary> Initializes a new instance of AssetConversionInputOptions. </summary>
        /// <param name="storageContainerUri"> The URI of the Azure blob storage container containing the input model. </param>
        /// <param name="storageContainerReadListSas"> An Azure blob storage container shared access signature giving read and list access to the storage container. Optional. If not provided, the Azure Remote Rendering account needs to be linked with the storage account containing the blob container. See https://docs.microsoft.com/azure/remote-rendering/how-tos/create-an-account#link-storage-accounts for details. For security purposes this field will never be filled out in responses bodies. </param>
        /// <param name="blobPrefix"> Only Blobs starting with this prefix will be downloaded to perform the conversion. Optional. If not provided, all Blobs from the container will be downloaded. </param>
        /// <param name="relativeInputAssetPath"> The relative path starting at blobPrefix (or at the container root if blobPrefix is not provided) to the input model. Must point to a file with a supported file format ending. See https://docs.microsoft.com/azure/remote-rendering/how-tos/conversion/model-conversion for details. </param>
        internal AssetConversionInputOptions(Uri storageContainerUri, string storageContainerReadListSas, string blobPrefix, string relativeInputAssetPath)
        {
            StorageContainerUri = storageContainerUri;
            StorageContainerReadListSas = storageContainerReadListSas;
            BlobPrefix = blobPrefix;
            RelativeInputAssetPath = relativeInputAssetPath;
        }
        /// <summary> An Azure blob storage container shared access signature giving read and list access to the storage container. Optional. If not provided, the Azure Remote Rendering account needs to be linked with the storage account containing the blob container. See https://docs.microsoft.com/azure/remote-rendering/how-tos/create-an-account#link-storage-accounts for details. For security purposes this field will never be filled out in responses bodies. </summary>
        public string StorageContainerReadListSas { get; set; }
        /// <summary> Only Blobs starting with this prefix will be downloaded to perform the conversion. Optional. If not provided, all Blobs from the container will be downloaded. </summary>
        public string BlobPrefix { get; set; }
    }
}


text:
//===-- UnreachableBlockElim.cpp - Remove unreachable blocks for codegen --===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This pass is an extremely simple version of the SimplifyCFG pass.  Its sole
// job is to delete LLVM basic blocks that are not reachable from the entry
// node.  To do this, it performs a simple depth first traversal of the CFG,
// then deletes any unvisited nodes.
//
// Note that this pass is really a hack.  In particular, the instruction
// selectors for various targets should just not generate code for unreachable
// blocks.  Until LLVM has a more systematic way of defining instruction
// selectors, however, we cannot really expect them to handle additional
// complexity.
//
//===----------------------------------------------------------------------===//

#include "llvm/CodeGen/Passes.h"
#include "llvm/Constant.h"
#include "llvm/Instructions.h"
#include "llvm/Function.h"
#include "llvm/Pass.h"
#include "llvm/Type.h"
#include "llvm/Analysis/Dominators.h"
#include "llvm/Analysis/ProfileInfo.h"
#include "llvm/CodeGen/MachineDominators.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineModuleInfo.h"
#include "llvm/CodeGen/MachineLoopInfo.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/Support/CFG.h"
#include "llvm/Target/TargetInstrInfo.h"
#include "llvm/ADT/DepthFirstIterator.h"
#include "llvm/ADT/SmallPtrSet.h"
using namespace llvm;

namespace {
  class UnreachableBlockElim : public FunctionPass {
    virtual bool runOnFunction(Function &F);
  public:
    static char ID; // Pass identification, replacement for typeid
    UnreachableBlockElim() : FunctionPass(ID) {
      initializeUnreachableBlockElimPass(*PassRegistry::getPassRegistry());
    }

    virtual void getAnalysisUsage(AnalysisUsage &AU) const {
      AU.addPreserved<DominatorTree>();
      AU.addPreserved<ProfileInfo>();
    }
  };
}
char UnreachableBlockElim::ID = 0;
INITIALIZE_PASS(UnreachableBlockElim, "unreachableblockelim",
                "Remove unreachable blocks from the CFG", false, false)

FunctionPass *llvm::createUnreachableBlockEliminationPass() {
  return new UnreachableBlockElim();
}

bool UnreachableBlockElim::runOnFunction(Function &F) {
  SmallPtrSet<BasicBlock*, 8> Reachable;

  // Mark all reachable blocks.
  for (df_ext_iterator<Function*, SmallPtrSet<BasicBlock*, 8> > I =
       df_ext_begin(&F, Reachable), E = df_ext_end(&F, Reachable); I != E; ++I)
    /* Mark all reachable blocks */;

  // Loop over all dead blocks, remembering them and deleting all instructions
  // in them.
  std::vector<BasicBlock*> DeadBlocks;
  for (Function::iterator I = F.begin(), E = F.end(); I != E; ++I)
    if (!Reachable.count(I)) {
      BasicBlock *BB = I;
      DeadBlocks.push_back(BB);
      while (PHINode *PN = dyn_cast<PHINode>(BB->begin())) {
        PN->replaceAllUsesWith(Constant::getNullValue(PN->getType()));
        BB->getInstList().pop_front();
      }
      for (succ_iterator SI = succ_begin(BB), E = succ_end(BB); SI != E; ++SI)
        (*SI)->removePredecessor(BB);
      BB->dropAllReferences();
    }

  // Actually remove the blocks now.
  ProfileInfo *PI = getAnalysisIfAvailable<ProfileInfo>();
  for (unsigned i = 0, e = DeadBlocks.size(); i != e; ++i) {
    if (PI) PI->removeBlock(DeadBlocks[i]);
    DeadBlocks[i]->eraseFromParent();
  }

  return DeadBlocks.size();
}

namespace {
  class UnreachableMachineBlockElim : public MachineFunctionPass {
    virtual bool runOnMachineFunction(MachineFunction &F);
    virtual void getAnalysisUsage(AnalysisUsage &AU) const;
    MachineModuleInfo *MMI;
  public:
    static char ID; // Pass identification, replacement for typeid
    UnreachableMachineBlockElim() : MachineFunctionPass(ID) {}
  };
}
char UnreachableMachineBlockElim::ID = 0;

INITIALIZE_PASS(UnreachableMachineBlockElim, "unreachable-mbb-elimination",
  "Remove unreachable machine basic blocks", false, false)

char &llvm::UnreachableMachineBlockElimID = UnreachableMachineBlockElim::ID;

void UnreachableMachineBlockElim::getAnalysisUsage(AnalysisUsage &AU) const {
  AU.addPreserved<MachineLoopInfo>();
  AU.addPreserved<MachineDominatorTree>();
  MachineFunctionPass::getAnalysisUsage(AU);
}

bool UnreachableMachineBlockElim::runOnMachineFunction(MachineFunction &F) {
  SmallPtrSet<MachineBasicBlock*, 8> Reachable;
  bool ModifiedPHI = false;

  MMI = getAnalysisIfAvailable<MachineModuleInfo>();
  MachineDominatorTree *MDT = getAnalysisIfAvailable<MachineDominatorTree>();
  MachineLoopInfo *MLI = getAnalysisIfAvailable<MachineLoopInfo>();

  // Mark all reachable blocks.
  for (df_ext_iterator<MachineFunction*, SmallPtrSet<MachineBasicBlock*, 8> >
       I = df_ext_begin(&F, Reachable), E = df_ext_end(&F, Reachable);
       I != E; ++I)
    /* Mark all reachable blocks */;

  // Loop over all dead blocks, remembering them and deleting all instructions
  // in them.
  std::vector<MachineBasicBlock*> DeadBlocks;
  for (MachineFunction::iterator I = F.begin(), E = F.end(); I != E; ++I) {
    MachineBasicBlock *BB = I;

    // Test for deadness.
    if (!Reachable.count(BB)) {
      DeadBlocks.push_back(BB);

      // Update dominator and loop info.
      if (MLI) MLI->removeBlock(BB);
      if (MDT && MDT->getNode(BB)) MDT->eraseNode(BB);

      while (BB->succ_begin() != BB->succ_end()) {
        MachineBasicBlock* succ = *BB->succ_begin();

        MachineBasicBlock::iterator start = succ->begin();
        while (start != succ->end() && start->isPHI()) {
          for (unsigned i = start->getNumOperands() - 1; i >= 2; i-=2)
            if (start->getOperand(i).isMBB() &&
                start->getOperand(i).getMBB() == BB) {
              start->RemoveOperand(i);
              start->RemoveOperand(i-1);
            }

          start++;
        }

        BB->removeSuccessor(BB->succ_begin());
      }
    }
  }

  // Actually remove the blocks now.
  for (unsigned i = 0, e = DeadBlocks.size(); i != e; ++i)
    DeadBlocks[i]->eraseFromParent();

  // Cleanup PHI nodes.
  for (MachineFunction::iterator I = F.begin(), E = F.end(); I != E; ++I) {
    MachineBasicBlock *BB = I;
    // Prune unneeded PHI entries.
    SmallPtrSet<MachineBasicBlock*, 8> preds(BB->pred_begin(),
                                             BB->pred_end());
    MachineBasicBlock::iterator phi = BB->begin();
    while (phi != BB->end() && phi->isPHI()) {
      for (unsigned i = phi->getNumOperands() - 1; i >= 2; i-=2)
        if (!preds.count(phi->getOperand(i).getMBB())) {
          phi->RemoveOperand(i);
          phi->RemoveOperand(i-1);
          ModifiedPHI = true;
        }

      if (phi->getNumOperands() == 3) {
        unsigned Input = phi->getOperand(1).getReg();
        unsigned Output = phi->getOperand(0).getReg();

        MachineInstr* temp = phi;
        ++phi;
        temp->eraseFromParent();
        ModifiedPHI = true;

        if (Input != Output) {
          MachineRegisterInfo &MRI = F.getRegInfo();
          MRI.constrainRegClass(Input, MRI.getRegClass(Output));
          MRI.replaceRegWith(Output, Input);
        }

        continue;
      }

      ++phi;
    }
  }

  F.RenumberBlocks();

  return (DeadBlocks.size() || ModifiedPHI);
}


text:
package com.suredigit.inappfeedback;

import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.HttpClient;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.params.BasicHttpParams;
import org.apache.http.params.HttpConnectionParams;
import org.apache.http.params.HttpParams;
import org.apache.http.protocol.HTTP;
import org.apache.http.util.EntityUtils;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import android.app.Activity;
import android.app.AlertDialog;
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.PackageManager.NameNotFoundException;
import android.net.Uri;
import android.text.InputType;
import android.util.Log;
import android.view.Gravity;
import android.view.ViewGroup.LayoutParams;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.Toast;

public class FeedbackDialog {
	public static enum LogTypes {
		DEBUG, NONE
	};

	public static LogTypes LOGT = LogTypes.NONE;

	private static final String APIVER = "2";
	private static final String LIBVER = "6";
	private static final String POSTURL = "http://www.android-feedback.com/service/" + APIVER;
	// private static final String POSTURL =
	// "http://192.168.1.10/ANDROID/service/" + APIVER;

	private static final String REPLIESURL = "http://www.android-feedback.com/service/" + APIVER + "/getPending/";
	// private static final String REPLIESURL =
	// "http://192.168.1.10/ANDROID/service/" + APIVER + "/getPending/";

	private static final String PREFS_NAME = "inappfeedback_prefs";
	private static final int MAX_PENDING_ITEMS = 20;
	private static final String TAG = "FeedbackDialog";
	private static int CONN_TIMEOUT = 5000;

	private String APPUID;

	private AlertDialog.Builder builder;
	private Context mContext;
	private Activity mActivity;

	private FeedbackSettings mSettings;

	private EditText eTcomments;

	private RadioGroup rGroup;
	private LinearLayout ll;

	private ArrayList<FeedBackItem> mFeedBackItems = new ArrayList<FeedBackItem>();

	private AlertDialog mDialog;
	private AlertDialog mResponseDialog;

	private String UUID;

	public FeedbackDialog(Context context, String appUID) {
		this.mActivity = (Activity) context;
		this.mContext = context;
		this.mSettings = new FeedbackSettings();
		this.APPUID = appUID;
		this.UUID = Installation.id(mContext);
		initialise();
		this.mDialog = createDialog();
		this.mDialog.setView(createLayout());
	}

	public FeedbackDialog(Activity activity, String appUID, FeedbackSettings settings) {
		this(activity, appUID);
		this.mSettings = settings;
		this.mDialog = createDialog();
		this.mDialog.setView(createLayout());
	}

	public void setSettings(FeedbackSettings settings) {
		this.mSettings = settings;
		this.mDialog = createDialog();
		this.mDialog.setView(createLayout());
	}

	public void setDebug(boolean flag) {
		if (flag)
			LOGT = LogTypes.DEBUG;
		else
			LOGT = LogTypes.NONE;
	}

	private void initialise() {
		loadUnsentItems(mActivity);
		if (mFeedBackItems.size() > 0) {
			if (LOGT == LogTypes.DEBUG)
				Log.d(TAG, "Found pending feedback items");
			sendFeedback(null, false);
		}
		getPendingResponses();
	}

	private AlertDialog createDialog() {
		builder = null;
		builder = new AlertDialog.Builder(mContext);
		builder.setCancelable(!(mSettings.isModal()));
		builder.setTitle(mSettings.getTitle());

		// TextView title = new TextView(mContext);
		// // You Can Customise your Title here
		// title.setText(mSettings.getTitle());
		// title.setBackgroundColor(Color.DKGRAY);
		// title.setPadding(10, 10, 10, 10);
		// title.setGravity(Gravity.CENTER);
		// title.setTextColor(Color.WHITE);
		// title.setTextSize(20);
		//
		// builder.setCustomTitle(title);
		//
		builder.setMessage(mSettings.getText());
		builder.setPositiveButton(mSettings.getSendButtonText(), new DialogInterface.OnClickListener() {
			@Override
			public void onClick(DialogInterface dialog, int id) {
				if (!(eTcomments.getText().toString().trim().equalsIgnoreCase(""))) {
					sendFeedback(createFeedBackItem(), true);
					Toast toast = Toast.makeText(mContext, mSettings.getToast(), Toast.LENGTH_SHORT);
					toast.show();
				}
			}
		});
		builder.setNegativeButton(mSettings.getCancelButtonText(), new DialogInterface.OnClickListener() {
			@Override
			public void onClick(DialogInterface dialog, int id) {

			}
		});
		return builder.create();
	}

	private LinearLayout createLayout() {

		ll = new LinearLayout(mContext);
		ll.setPadding(10, 10, 10, 10);
		ll.setOrientation(LinearLayout.VERTICAL);
		ll.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));

		eTcomments = new EditText(mContext);
		// eTcomments.setLayoutParams(new LayoutParams(
		// LayoutParams.WRAP_CONTENT, LayoutParams.FILL_PARENT));
		// eTcomments.setGravity(Gravity.CENTER_VERTICAL | Gravity.TOP);

		eTcomments.setHint(mSettings.getYourComments());
		eTcomments.setInputType(InputType.TYPE_TEXT_FLAG_CAP_SENTENCES | InputType.TYPE_TEXT_FLAG_MULTI_LINE | InputType.TYPE_CLASS_TEXT);
		eTcomments.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT));
		eTcomments.setMinLines(1);
		eTcomments.setMaxLines(5);

		rGroup = new RadioGroup(mContext);
		rGroup.setOrientation(mSettings.getOrientation());
		LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT);
		params.setMargins(0, 20, 10, 20); // substitute parameters for left,
		rGroup.setLayoutParams(params);

		RadioButton rBbug = new RadioButton(mContext);
		rBbug.setText(mSettings.getBugLabel());
		rBbug.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
		rGroup.addView(rBbug);

		RadioButton rBidea = new RadioButton(mContext);
		rBidea.setText(mSettings.getIdeaLabel());
		rBidea.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
		rGroup.addView(rBidea);

		RadioButton rBquestion = new RadioButton(mContext);
		rBquestion.setText(mSettings.getQuestionLabel());
		rBquestion.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
		rGroup.addView(rBquestion);

		rGroup.setGravity(mSettings.getGravity());

		rBquestion.setChecked(true);

		ll.addView(eTcomments);
		if (mSettings.isEnableRadio())
			ll.addView(rGroup);

		return ll;
	}

	private FeedBackItem createFeedBackItem() {
		String comment = eTcomments.getText().toString();

		String type = "";
		int count = rGroup.getChildCount();
		for (int i = 0; i < count; i++) {
			RadioButton theButton = (RadioButton) rGroup.getChildAt(i);
			if (theButton.isChecked()) {
				type = theButton.getText().toString();
				break;
			}
		}

		if (!(mSettings.isEnableRadio())) {
			type = "Feedback:";
		}

		String ts = Long.toString(System.currentTimeMillis() / 1000L);
		String model = android.os.Build.MODEL;
		String manufacturer = android.os.Build.MANUFACTURER;
		String sdk = String.valueOf(android.os.Build.VERSION.SDK_INT);
		String uuid = this.UUID;
		String versionName = "";
		String versionCode = "";
		String customMessage = mSettings.getDeveloperMessage();

		try {
			versionName = mContext.getPackageManager().getPackageInfo(mContext.getPackageName(), 0).versionName;
			versionCode = String.valueOf(mContext.getPackageManager().getPackageInfo(mContext.getPackageName(), 0).versionCode);
		} catch (NameNotFoundException e) {
			e.printStackTrace();
		}

		FeedBackItem fItem = new FeedBackItem(comment, type, ts, model, manufacturer, sdk, mContext.getPackageName(), uuid, LIBVER, versionName,
				versionCode, customMessage);

		return fItem;
	}

	protected void sendFeedback(final FeedBackItem fi, final boolean toast) {
		Thread thread = new Thread() {
			@Override
			public void run() {
				try {
					HttpPost httppost = new HttpPost(POSTURL);

					HttpParams httpParameters = new BasicHttpParams();
					int timeoutConnection = CONN_TIMEOUT;
					HttpConnectionParams.setConnectionTimeout(httpParameters, timeoutConnection);
					int timeoutSocket = CONN_TIMEOUT;
					HttpConnectionParams.setSoTimeout(httpParameters, timeoutSocket);

					HttpClient httpclient = new DefaultHttpClient(httpParameters);

					boolean success = false;

					JSONObject submitJson = new JSONObject();
					JSONArray list = new JSONArray();
					try {
						if (fi != null)
							list.put(fi.toJson());

						if (mFeedBackItems.size() > 0)
							Collections.reverse(mFeedBackItems);
						for (FeedBackItem myFi : mFeedBackItems) {
							list.put(myFi.toJson());
						}
						submitJson.put("APPUID", APPUID);
						submitJson.put("feedback", list);
					} catch (JSONException e1) {
						e1.printStackTrace();
					}

					try {

						if (LOGT == LogTypes.DEBUG)
							Log.d(TAG, submitJson.toString());

						List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(2);
						nameValuePairs.add(new BasicNameValuePair("json", submitJson.toString()));
						httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs, "UTF-8"));

						HttpResponse response = httpclient.execute(httppost);

						HttpEntity entity = response.getEntity();
						String result = EntityUtils.toString(entity);

						if (LOGT == LogTypes.DEBUG)
							Log.d(TAG, result);

						int code = response.getStatusLine().getStatusCode();
						if (code == 200)
							success = true;
					} catch (ClientProtocolException e) {
						e.printStackTrace();
						success = false;
					} catch (IOException e) {
						e.printStackTrace();
						success = false;
					} finally {
						if (!(success)) {
							if (fi != null) {
								mFeedBackItems.add(fi);
								saveUnsentItems();
							}
						}

						else {
							mFeedBackItems.clear();
							saveUnsentItems();
						}

					}
				} finally {

				}
			}

		};
		thread.start();
	}

	private void openGooglePlay() {
		String packageName = mActivity.getPackageName();
		System.out.println(packageName);
		Uri uri = Uri.parse("market://details?id=" + packageName);
		Intent goToMarket = new Intent(Intent.ACTION_VIEW, uri);
		try {
			mActivity.startActivity(goToMarket);
		} catch (ActivityNotFoundException e) {
			e.printStackTrace();
			Toast.makeText(mActivity, "Couldn't launch the market", Toast.LENGTH_LONG).show();
		}
	}

	protected void getPendingResponses() {
		Thread thread = new Thread() {
			@Override
			public void run() {
				try {
					HttpGet httpget = new HttpGet(REPLIESURL + UUID);
					if (LOGT == LogTypes.DEBUG)
						Log.d(TAG, httpget.getURI().toString());

					HttpParams httpParameters = new BasicHttpParams();
					int timeoutConnection = CONN_TIMEOUT;
					HttpConnectionParams.setConnectionTimeout(httpParameters, timeoutConnection);
					int timeoutSocket = CONN_TIMEOUT;
					HttpConnectionParams.setSoTimeout(httpParameters, timeoutSocket);

					HttpClient httpclient = new DefaultHttpClient(httpParameters);

					boolean success = false;

					String result = "";
					try {

						HttpResponse response = httpclient.execute(httpget);

						HttpEntity entity = response.getEntity();
						result = EntityUtils.toString(entity, HTTP.UTF_8);
						if (LOGT == LogTypes.DEBUG)
							Log.d(TAG, result);

						int code = response.getStatusLine().getStatusCode();
						if (code == 200)
							success = true;
					} catch (ClientProtocolException e) {
						e.printStackTrace();
						success = false;
					} catch (IOException e) {
						e.printStackTrace();
						success = false;
					} finally {
						if (!(success)) {

						}

						else {
							if (!(result.equalsIgnoreCase(""))) {

								String resultInterim = result.toString();

								final boolean rate;
								rate = resultInterim.contains("[RATE]");
								if (rate)
									resultInterim = resultInterim.replace("[RATE]", "");

								final String resultFinal = resultInterim;

								mActivity.runOnUiThread(new Runnable() {
									public void run() {
										AlertDialog.Builder builder = new AlertDialog.Builder(mActivity);
										builder.setTitle(mSettings.getReplyTitle()).setMessage(resultFinal).setCancelable(false)
												.setNegativeButton(mSettings.getReplyCloseButtonText(), new DialogInterface.OnClickListener() {
													public void onClick(DialogInterface dialog, int id) {
														dialog.cancel();
													}
												});
										if (rate) {
											builder.setPositiveButton(mSettings.getReplyRateButtonText(), new DialogInterface.OnClickListener() {
												public void onClick(DialogInterface dialog, int id) {
													dialog.cancel();
													openGooglePlay();
												}
											});
										}
										mResponseDialog = builder.create();
										mResponseDialog.show();
									}
								});

							}
						}

					}
				} finally {

				}
			}
		};
		thread.start();
	}

	private boolean saveUnsentItems() {

		SharedPreferences preferences = mActivity.getSharedPreferences(PREFS_NAME, 0);
		SharedPreferences.Editor editor = preferences.edit();
		editor.putInt("com.suredigit.feedbackdialog.pending_size", mFeedBackItems.size());

		// Clean up possible old pending items
		for (int i = 0; i < MAX_PENDING_ITEMS; i++) {
			editor.remove("com.suredigit.feedbackdialog.pending_item_" + i);
		}

		//

		if (mFeedBackItems.size() > 0) {
			for (int i = 0; i < mFeedBackItems.size(); i++) {
				editor.putString("com.suredigit.feedbackdialog.pending_item_" + i, mFeedBackItems.get(i).toString());
			}
		}

		return editor.commit();
	}

	private void loadUnsentItems(Activity hostActivity) {
		SharedPreferences preferences = hostActivity.getSharedPreferences(PREFS_NAME, 0);
		mFeedBackItems.clear();
		int size = preferences.getInt("com.suredigit.feedbackdialog.pending_size", 0);

		for (int i = 0; i < size; i++) {
			String jsonTxt = preferences.getString("com.suredigit.feedbackdialog.pending_item_" + i, null);
			if (jsonTxt != null) {
				JSONObject json = null;
				try {
					json = new JSONObject(jsonTxt);
				} catch (JSONException e1) {
					e1.printStackTrace();
				}
				try {
					if (json != null)
						mFeedBackItems.add(new FeedBackItem(json.get("comment").toString(), json.get("type").toString(), json.get("ts").toString(),
								json.get("model").toString(), json.get("manufacturer").toString(), json.get("sdk").toString(), json.get("pname")
										.toString(), json.get("UUID").toString(), json.get("libver").toString(), json.get("versionname").toString(),
								json.get("versioncode").toString(), json.get("custommessage").toString()));
				} catch (JSONException e) {
					e.printStackTrace();
				}
			}
		}
	}

	public void show() {
		if (eTcomments != null) {
			eTcomments.setText("");
		}
		mDialog.show();
	}

	public void dismiss() {
		if (mDialog != null)
			mDialog.dismiss();

		if (mResponseDialog != null)
			mResponseDialog.dismiss();

	}

}


text:
package org.motechproject.commons.date.util;

import org.apache.commons.collections.CollectionUtils;
import org.joda.time.DateTime;
import org.joda.time.DateTimeFieldType;
import org.joda.time.DateTimeZone;
import org.joda.time.LocalDate;
import org.joda.time.LocalDateTime;
import org.joda.time.Period;
import org.joda.time.PeriodType;
import org.motechproject.commons.date.model.DayOfWeek;
import org.motechproject.commons.date.model.Time;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import static org.motechproject.commons.date.model.DayOfWeek.getDayOfWeek;

public final class DateUtil {

    private DateUtil() {

    }

    public static DateTime now() {
        return DateTimeSourceUtil.now();
    }

    public static LocalDate today() {
        return DateTimeSourceUtil.today();
    }

    public static LocalDate tomorrow() {
        return today().plusDays(1);
    }

    public static LocalDate newDate(int year, int month, int day) {
        return new LocalDate(DateTimeSourceUtil.timeZone())
                .withYear(year)
                .withMonthOfYear(month)
                .withDayOfMonth(day);
    }

    public static DateTime newDateTime(LocalDate localDate, int hour, int minute, int second) {
        final DateTimeZone zone = DateTimeSourceUtil.timeZone();
        LocalDateTime localDateTime = new LocalDateTime(zone)
                .withYear(localDate.getYear())
                .withMonthOfYear(localDate.getMonthOfYear())
                .withDayOfMonth(localDate.getDayOfMonth())
                .withHourOfDay(hour)
                .withMinuteOfHour(minute)
                .withSecondOfMinute(second)
                .withMillisOfSecond(0);

        if (zone.isLocalDateTimeGap(localDateTime)) {
            localDateTime = localDateTime.withHourOfDay(hour+1);
        }

        return localDateTime.toDateTime();
    }

    public static DateTime setTimeZone(DateTime dateTime) {
        return dateTime == null ? dateTime : dateTime.toDateTime(DateTimeSourceUtil.timeZone());
    }

    public static DateTime newDateTime(Date date) {
        return new DateTime(date.getTime(), DateTimeSourceUtil.timeZone()).withMillisOfSecond(0);
    }

    public static DateTime newDateTime(LocalDate date) {
        return newDateTime(date, 0, 0, 0);
    }

    public static Time time(DateTime dateTime) {
        return new Time(dateTime.getHourOfDay(), dateTime.getMinuteOfHour());
    }

    public static LocalDate newDate(Date date) {
        if (date == null) {
            return null;
        }
        return new LocalDate(date.getTime(), DateTimeSourceUtil.timeZone());
    }

    public static LocalDate newDate(DateTime dateTime) {
        if (dateTime == null) {
            return null;
        }
        return newDate(dateTime.getYear(), dateTime.getMonthOfYear(), dateTime.getDayOfMonth());
    }

    public static int daysPast(LocalDate localDate, DayOfWeek dayOfWeek) {
        int count = 0;
        LocalDate date = localDate;
        while (date.getDayOfWeek() != dayOfWeek.getValue()) {
            date = date.minusDays(1);
            count++;
        }
        return count;
    }

    public static boolean isOnOrBefore(DateTime firstDate, DateTime secondDate) {
        return firstDate.equals(secondDate) || firstDate.isBefore(secondDate);
    }

    public static boolean isOnOrAfter(DateTime firstDate, DateTime secondDate) {
        return firstDate.equals(secondDate) || firstDate.isAfter(secondDate);
    }

    public static boolean inRange(DateTime reference, DateTime start, DateTime end) {
        return (isOnOrAfter(reference, start)) && (isOnOrBefore(reference, end));
    }

    public static int daysToCalendarWeekEnd(LocalDate date, int calendarWeekStartDay) {
        final int daysInWeek = 7;
        int currentDayOfWeek = date.get(DateTimeFieldType.dayOfWeek());
        int calendarWeekEndDay = (calendarWeekStartDay + daysInWeek - 1) % 7;
        int intervalBetweenWeekEndAndCurrentDay = calendarWeekEndDay - currentDayOfWeek;
        return intervalBetweenWeekEndAndCurrentDay >= 0 ? intervalBetweenWeekEndAndCurrentDay :
                intervalBetweenWeekEndAndCurrentDay + 7;
    }

    public static DateTime newDateTime(LocalDate localDate, Time time) {
        return newDateTime(localDate, time.getHour(), time.getMinute(), 0);
    }

    public static DateTime newDateTime(int year, int month, int day, Time time) {
        return newDateTime(newDate(year, month, day), time.getHour(), time.getMinute(), 0);
    }

    public static DateTime newDateTime(int year, int month, int day) {
        return newDateTime(newDate(year, month, day), 0, 0, 0);
    }

    public static DateTime newDateTime(int year, int month, int day, int hour, int minute, int second) {
        return newDateTime(newDate(year, month, day), hour, minute, second);
    }

    public static int getDifferenceOfDatesInYears(Date startDate) {
        Period period = new Period(newDate(startDate), today(), PeriodType.yearMonthDay());
        return period.getYears();
    }

    public static DateTime endOfDay(Date dateTime) {
        final int hour = 23;
        final int minute = 59;
        final int second = 59;
        final int millis = 999;
        return new DateTime(dateTime).withTime(hour, minute, second, millis);
    }

    public static DateTime nextApplicableWeekDay(DateTime fromDate, List<DayOfWeek> applicableDays) {
        return nextApplicableWeekDayIncludingFromDate(fromDate.dayOfMonth().addToCopy(1), applicableDays);
    }

    public static DateTime nextApplicableWeekDayIncludingFromDate(DateTime fromDate, List<DayOfWeek> applicableDays) {
        if (CollectionUtils.isEmpty(applicableDays)) {
            throw new IllegalArgumentException("Applicable Days should not be empty");
        }

        int dayOfWeek = fromDate.getDayOfWeek();
        int noOfDaysToNearestCycleDate = 0;
        int weekMaxDay = DayOfWeek.Sunday.getValue();
        int currentDayOfWeek = dayOfWeek;
        for (int dayCount = 0; dayCount <= weekMaxDay; dayCount++) {
            if (applicableDays.contains(getDayOfWeek(currentDayOfWeek))) {
                noOfDaysToNearestCycleDate = dayCount;
                break;
            }
            if (currentDayOfWeek == weekMaxDay) {
                currentDayOfWeek = 1;
            } else {
                currentDayOfWeek++;
            }
        }
        return fromDate.dayOfMonth().addToCopy(noOfDaysToNearestCycleDate);
    }

    public static List<DateTime> greaterThanOrEqualTo(final DateTime date, final List<DateTime> dates){
        List<DateTime> list = new ArrayList<>(dates.size());

        for (DateTime dt : dates) {
            if (isOnOrAfter(dt, date)) {
                list.add(dt);
            }
        }

        return list;
    }

    public static List<DateTime> lessThan(final DateTime date, final List<DateTime> dates) {
        List<DateTime> list = new ArrayList<>(dates.size());

        for (DateTime dt : dates) {
            if (dt.isBefore(date)) {
                list.add(dt);
            }
        }

        return list;
    }
}