text:
#region Project Description [About this]
// =================================================================================
//            The whole Project is Licensed under the MIT License
// =================================================================================
// =================================================================================
//    Wiesend's Dynamic Link Library is a collection of reusable code that
//    I've written, or found throughout my programming career.
//
//    I tried my very best to mention all of the original copyright holders.
//    I hope that all code which I've copied from others is mentioned and all
//    their copyrights are given. The copied code (or code snippets) could
//    already be modified by me or others.
// =================================================================================
#endregion of Project Description
#region Original Source Code [Links to all original source code]
// =================================================================================
//          Original Source Code [Links to all original source code]
// =================================================================================
// https://github.com/JaCraig/Craig-s-Utility-Library
// =================================================================================
//    I didn't wrote this source totally on my own, this class could be nearly a
//    clone of the project of James Craig, I did highly get inspired by him, so
//    this piece of code isn't totally mine, shame on me, I'm not the best!
// =================================================================================
#endregion of where is the original source code
#region Licenses [MIT Licenses]
#region MIT License [James Craig]
// =================================================================================
//    Copyright(c) 2014 James Craig
//
//    Permission is hereby granted, free of charge, to any person obtaining a copy
//    of this software and associated documentation files (the "Software"), to deal
//    in the Software without restriction, including without limitation the rights
//    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
//    copies of the Software, and to permit persons to whom the Software is
//    furnished to do so, subject to the following conditions:
//
//    The above copyright notice and this permission notice shall be included in all
//    copies or substantial portions of the Software.
//
//    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
//    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
//    SOFTWARE.
// =================================================================================
#endregion of MIT License [James Craig]
#region MIT License [Dominik Wiesend]
// =================================================================================
//    Copyright(c) 2016 Dominik Wiesend. All rights reserved.
//
//    Permission is hereby granted, free of charge, to any person obtaining a copy
//    of this software and associated documentation files (the "Software"), to deal
//    in the Software without restriction, including without limitation the rights
//    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
//    copies of the Software, and to permit persons to whom the Software is
//    furnished to do so, subject to the following conditions:
//
//    The above copyright notice and this permission notice shall be included in all
//    copies or substantial portions of the Software.
//
//    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
//    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
//    SOFTWARE.
// =================================================================================
#endregion of MIT License [Dominik Wiesend]
#endregion of Licenses [MIT Licenses]

using System;
using System.Diagnostics.Contracts;
using System.Xml.XPath;

namespace Wiesend.IO.FileFormats.RSS
{
    ///
    /// Enclosure class for RSS feeds (used for pod casting)
    ///
    public class Enclosure
    {
        ///
        /// Constructor
        ///
        public Enclosure()
        {
        }

        ///
        /// Constructor
        ///
        /// <param name="Doc">XML element holding info for the enclosure</param>
        public Enclosure(IXPathNavigable Doc)
        {
            Contract.Requires<ArgumentNullException>(Doc != null, "Doc");
            var Element = Doc.CreateNavigator();
            if (string.IsNullOrEmpty(Element.GetAttribute("url", "")))
            {
                Url = Element.GetAttribute("url", "");
            }
            if (string.IsNullOrEmpty(Element.GetAttribute("length", "")))
            {
                Length = Element.GetAttribute("length", "");
            }
            if (string.IsNullOrEmpty(Element.GetAttribute("type", "")))
            {
                Type = Element.GetAttribute("type", "");
            }
        }

        ///
        /// Size in bytes
        ///
        public virtual string Length { get; set; }

        ///
        /// File type
        ///
        public virtual string Type { get; set; }

        ///
        /// Location of the item
        ///
        public virtual string Url { get; set; }

        ///
        /// to string item. Used for outputting the item to RSS.
        ///
        /// <returns>A string formatted for RSS output</returns>
        public override string ToString()
        {
            if (!string.IsNullOrEmpty(Url) && !string.IsNullOrEmpty(Type) && !string.IsNullOrEmpty(Length))
            {
                return "<enclosure url=\"" + Url + "\" length=\"" + Length + "\" type=\"" + Type + "\" />\r\n"
                    + "<media:content url=\"" + Url + "\" fileSize=\"" + Length + "\" type=\"" + Type + "\" />";
            }
            return string.Empty;
        }
    }
}


text:
/*
 $Id$
 */

#include <stdio.h>
#include <string.h>
#if defined(CRAY) && !defined(__crayx1)
#include <fortran.h>
#define FATR
#endif
#include "ga.h"
#include "typesf2c.h"

#if defined(USE_FCD)
int fortchar_to_string(_fcd, int, char *, const int);
#else
Integer fortchar_to_string(const char *, Integer, char *, const Integer);
#endif

void util_file_copy(const char *input, const char *output)
/*
  The local process copies the input file to the output file.
  Any existing file is overwritten.
  Any error is fatal.
  */
{
    FILE *fin  = fopen(input, "rb");
    FILE *fout = fopen(output, "w+b");
    char buf[8192];
    Integer nread;

    if (!fin) {
	fprintf(stderr,"util_file_copy: unable to open %s\n", input);
	GA_Error("util_file_copy",0);
    }
    if (!fout) {
	fprintf(stderr,"util_file_copy: unable to open %s\n", output);
	GA_Error("util_file_copy",0);
    }
    while ((nread = fread(buf, 1, sizeof(buf), fin)) > 0)
	if (fwrite(buf, 1, nread, fout) != nread) {
	    fprintf(stderr,"util_file_copy: failed writing %s\n", output);
	    GA_Error("util_file_copy",0);
	}

    if (!feof(fin)) {
	fprintf(stderr,"util_file_copy: failed reading %s\n", input);
	GA_Error("util_file_copy",0);
    }

    (void) fclose(fin);
    (void) fclose(fout);
}

void util_file_parallel_copy(const char *input, const char *output)
/*
  Process 0 broadcasts the input file to all nodes which write to their
  output file.  Any existing file is overwritten.  Any error is fatal.

  It is same to call it with a same/different output file name on all nodes.
  If the input and output files have the same name on node0 it is also safe.
  */
{
    FILE *fin=0, *fout=0;
    Integer differ = strcmp(input,output);

    if (GA_Nodeid() == 0) {
      if (!(fin = fopen(input, "rb"))) {
	fprintf(stderr,"util_file_copy: unable to open input %s\n", input);
	GA_Error("util_file_parallel_copy",0);
      }
      if (differ) {
	if (!(fout = fopen(output, "w+b"))) {
	  fprintf(stderr,"util_file_copy: unable to open output %s\n", input);
	  GA_Error("util_file_parallel_copy",0);
	}
      }
    }
    else if (!(fout = fopen(output, "w+b"))) {
      fprintf(stderr,"util_file_copy: unable to open output %s\n", input);
      GA_Error("util_file_parallel_copy",0);
    }

    while (1) {
      char buf[8192];
      Integer nread, msgnread=44,msgbuf=45,msglen=sizeof(Integer),node0=0;
      if (GA_Nodeid() == 0)
	nread = fread(buf, 1, sizeof(buf), fin);
      GA_Brdcst(&nread, msglen, node0);
      if (nread > 0) {
	GA_Brdcst(buf, nread, node0);
	if ((GA_Nodeid() != 0) || (differ != 0)) {
	  if (fwrite(buf, 1, nread, fout) != nread) {
	    fprintf(stderr,"util_file_parallel_copy: failed writing %s\n", output);
	    GA_Error("util_file_parallel_copy",0);
	  }
	}
      }
      else
	break;
    }

    if (GA_Nodeid() == 0) {
      if (!feof(fin)) {
	fprintf(stderr,"util_file_parallel_copy: failed reading %s\n", input);
	GA_Error("util_file_parallel_copy",0);
      }
    }

    if (fin) (void) fclose(fin);
    if (fout) (void) fclose(fout);
}

#if defined(USE_FCD)
void FATR UTIL_FILE_COPY(_fcd input, _fcd output)
{
    int lin  = _fcdlen(input);
    int lout = _fcdlen(output);
#else
void util_file_copy_(const char *input, const char *output, Integer lin, Integer lout)
{
#endif
    char in[255], out[255];
    if (!fortchar_to_string(input, lin, in, sizeof(in)))
	GA_Error("util_file_copy: fortchar_to_string failed for in",0);
    if (!fortchar_to_string(output, lout, out, sizeof(out)))
	GA_Error("util_file_copy: fortchar_to_string failed for out",0);
    util_file_copy(in, out);
}

redpajama_set_name: RedPajamaGithub


text:
package parser

import (
	"encoding/xml"
	"io"

	"github.com/ChrisTrenkamp/xsel/node"
	"golang.org/x/net/html/charset"
)

type XmlElement struct {
	space, local string
}

func (x XmlElement) Space() string {
	return x.space
}

func (x XmlElement) Local() string {
	return x.local
}

type XmlNamespace struct {
	prefix, value string
}

func (x XmlNamespace) Prefix() string {
	return x.prefix
}

func (x XmlNamespace) NamespaceValue() string {
	return x.value
}

type XmlAttribute struct {
	space, local, value string
}

func (x XmlAttribute) Space() string {
	return x.space
}

func (x XmlAttribute) Local() string {
	return x.local
}

func (x XmlAttribute) AttributeValue() string {
	return x.value
}

type XmlCharData struct {
	value string
}

func (x XmlCharData) CharDataValue() string {
	return x.value
}

type XmlComment struct {
	value string
}

func (x XmlComment) CommentValue() string {
	return x.value
}

type XmlProcInst struct {
	target, value string
}

func (x XmlProcInst) Target() string {
	return x.target
}

func (x XmlProcInst) ProcInstValue() string {
	return x.value
}

var emptyAttrs = make([]XmlAttribute, 0)
var emptyNamespaces = make([]XmlNamespace, 0)

type XmlParseOptions func(d *xml.Decoder)

// Creates a Parser that reads the given XML document.
func ReadXml(in io.Reader, opts ...XmlParseOptions) Parser {
	xmlReader := xml.NewDecoder(in)
	xmlReader.CharsetReader = charset.NewReaderLabel

	for _, i := range opts {
		i(xmlReader)
	}

	namespaces := emptyNamespaces
	nsPos := 0

	attrs := emptyAttrs
	attrPos := 0

	return func() (node.Node, bool, error) {
		if nsPos < len(namespaces) {
			n := namespaces[nsPos]
			nsPos++

			return n, false, nil
		}

		if attrPos < len(attrs) {
			a := attrs[attrPos]
			attrPos++

			return a, false, nil
		}

		attrs = emptyAttrs
		attrPos = 0
		namespaces = emptyNamespaces
		nsPos = 0
		tok, err := xmlReader.Token()

		if err != nil {
			return nil, false, err
		}

		switch n := tok.(type) {
		case xml.StartElement:
			namespaces = createNamespaces(n.Attr)
			attrs = createAttrs(n.Attr)
			return XmlElement{
				space: n.Name.Space,
				local: n.Name.Local,
			}, false, nil
		case xml.CharData:
			return XmlCharData{
				value: (string)(n),
			}, false, nil
		case xml.Comment:
			return XmlComment{
				value: (string)(n),
			}, false, nil
		case xml.ProcInst:
			return XmlProcInst{
				target: n.Target,
				value:  string(n.Inst),
			}, false, nil
		}

		//case xml.EndElement:
		return nil, true, nil
	}
}

const XMLNS = "xmlns"

func createNamespaces(attrs []xml.Attr) []XmlNamespace {
	ret := make([]XmlNamespace, 0, 1)
	ns := XmlNamespace{
		prefix: "xml",
		value:  "http://www.w3.org/XML/1998/namespace",
	}

	ret = append(ret, ns)

	for _, i := range attrs {
		if i.Name.Space == "" && i.Name.Local == XMLNS {
			ns = XmlNamespace{
				prefix: "",
				value:  i.Value,
			}

			ret = append(ret, ns)
		}

		if i.Name.Local == XMLNS {
			ns = XmlNamespace{
				prefix: i.Name.Space,
				value:  i.Value,
			}

			ret = append(ret, ns)
		}
	}

	return ret
}

func createAttrs(attrs []xml.Attr) []XmlAttribute {
	ret := make([]XmlAttribute, 0, len(attrs))

	for _, i := range attrs {
		if i.Name.Space == XMLNS || i.Name.Local == XMLNS {
			continue
		}

		next := XmlAttribute{
			space: i.Name.Space,
			local: i.Name.Local,
			value: i.Value,
		}

		ret = append(ret, next)
	}

	return ret
}


text:
/******************************************************************************
 *
 * This script generates an nmake compatible makefile for Microsoft Visual
 * Studio. The generated makefile can be used to build the system from a
 * release of Gambit.  To build from a clone of the github repository
 * some additional tools and steps are needed (see below).
 *
 *
 * Steps to build the system from a release of Gambit:
 *
 * STEP 1 -- Ensure that the Visual Studio tools are in the path
 *
 *   C:\gambit>"C:\Program Files\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat"
 *
 * STEP 2 -- Run the script using --prefix=... to specify install destination
 *
 *   C:\gambit>cscript misc\configure-vstudio.js --prefix=C:\Gambit
 *
 * STEP 3 -- Use the makefile to build and then install Gambit
 *
 *   C:\gambit>nmake
 *   C:\gambit>nmake install
 *
 * You will now have gsi.exe and gsc.exe in the bin subdirectory of
 * the directory specified with the --prefix option.
 *
 * A Scheme file can be compiled to a standalone .exe with:
 *
 *   C:\gambit>set PATH=C:\Gambit\bin;%PATH%
 *   C:\gambit>gsc -exe hello.scm
 *   C:\gambit>hello
 *   Hello World!
 *   C:\gambit>type hello.scm
 *   (display "Hello World!\n")
 *
 *
 * The script accepts a subset of the configure script options.
 * The supported options are:
 *
 *   --prefix=DIR       dir for default root of bindir, libdir, etc
 *
 *   --bindir=DIR       dir for executables (gsi.exe, gsc.exe, ...)
 *   --libdir=DIR       dir for libraries (libgambit.lib, syntax-case.scm, ...)
 *   --includedir=DIR   dir for C header files (gambit.h, ...)
 *   --docdir=DIR       dir for documentation (gambit.pdf, gambit.html, ...)
 *   --infodir=DIR      dir for info documentation (gambit.info, ...)
 *   --datadir=DIR      dir for arch independent files (gambit.el)
 *
 *   --enable-single-host    compile each Scheme module as a single C function
 *
 *   --enable-c-opt          compile with higher C compiler optimization level
 *
 *   --enable-cplusplus      compile using C++ compiler
 *
 *   --enable-debug          build so system is easier to debug
 *   --enable-debug-log      build so system generates a debugging log file
 *   --enable-debug-ctrl-flow-history  build so system tracks control flow
 *   --enable-debug-host-changes  build so system tracks host changes
 *   --enable-debug-alloc-mem  build so system tracks memory allocations
 *   --enable-debug-garbage-collector  build so system detects GC issues
 *   --enable-activity-log   build so system generates activity log
 *
 *   --enable-char-size=N    Scheme character size in bytes (N = 1, 2 or 4)
 *
 *   --enable-multiple-threaded-vms  support > 1 OS thread per Gambit VM
 *   --enable-max-processors=N  max number of processors per Gambit VM
 *
 *
 * Steps to build the system from a clone of the github repository:
 *
 * STEP 1 -- Install mingw and git if they are not yet installed
 *
 *   - mingw: http://mingw.org/wiki/Getting_Started
 *   - git:   https://git-for-windows.github.io/
 *
 * STEP 2 -- Start a mingw shell and bootstrap the sources with the commands
 *
 *   $ git clone https://github.com/gambit/gambit.git
 *   $ cd gambit
 *   $ ./configure --enable-single-host
 *   $ make -j4 current-gsc-boot
 *   $ make -j4 from-scratch
 *
 * STEP 3 -- Use the steps above to build with Visual Studio
 *
 *****************************************************************************/

// Utilities

function pathExpand(dir,subdir)
{
    if (dir.slice(-1) == "\\")
        return dir + subdir;
    else
        return dir + "\\" + subdir;
}

var fso = new ActiveXObject("Scripting.FileSystemObject")

var gambitRoot = GetGambitRoot(fso);

// Command line arguments processing

var config = {};

function configParamError(param)
{
    WScript.echo("Configure parameter error on \"" + param + "\"");
    WScript.Quit(1);
}

function setConfig(param, val)
{
    config[param] = val;
}

function setFlag(param, val)
{
    if (param.slice(0,9) == "--enable-")
        setConfig(param.slice(9), true);
    else if (param.slice(0,10) == "--disable-")
        setConfig(param.slice(10), false);
    else
        configParamError(param);
}

function setCharSize(param, size)
{
    if (size == "1" || size == "2" || size == "4")
        setConfig("char-size", size);
    else
        configParamError(param);
}

function setMaxProcessors(param, size)
{
    setConfig("max-processors", size);
}

function setDir(param, dir)
{
    if (param.slice(0,2) == "--" && param.slice(-1) == "=")
        setConfig(param.slice(2,-1), dir);
    else
        configParamError(param);
}

var configParamHandlers =
{
    "--prefix="                        : setDir,
    "--bindir="                        : setDir,
    "--libdir="                        : setDir,
    "--includedir="                    : setDir,
    "--docdir="                        : setDir,
    "--infodir="                       : setDir,
    "--datadir="                       : setDir,
    "--enable-single-host"             : setFlag,
    "--disable-single-host"            : setFlag,
    "--enable-c-opt"                   : setFlag,
    "--disable-c-opt"                  : setFlag,
    "--enable-cplusplus"               : setFlag,
    "--disable-cplusplus"              : setFlag,
    "--enable-debug"                   : setFlag,
    "--disable-debug"                  : setFlag,
    "--enable-debug-log"               : setFlag,
    "--disable-debug-log"              : setFlag,
    "--enable-debug-ctrl-flow-history" : setFlag,
    "--disable-debug-ctrl-flow-history": setFlag,
    "--enable-debug-host-changes"      : setFlag,
    "--disable-debug-host-changes"     : setFlag,
    "--enable-debug-alloc-mem"         : setFlag,
    "--disable-debug-alloc-mem"        : setFlag,
    "--enable-debug-garbage-collector" : setFlag,
    "--disable-debug-garbage-collector": setFlag,
    "--enable-activity-log"            : setFlag,
    "--disable-activity-log"           : setFlag,
    "--enable-char-size="              : setCharSize,
    "--enable-multiple-threaded-vms"   : setFlag,
    "--disable-multiple-threaded-vms"  : setFlag,
    "--enable-max-processors="         : setMaxProcessors
};

function ConfigArg(arg)
{
    for (var k in configParamHandlers)
    {
        if (k.slice(-1) == "=")
        {
            if (arg.slice(0, k.length) == k)
            {
                configParamHandlers[k](k, arg.slice(k.length));
                return;
            }
        }
        else
        {
            if (arg == k)
            {
                configParamHandlers[k](k, false);
                return;
            }
        }
    }
    configParamError(arg);
}

function ProcessCommandLine()
{
    var args = WScript.arguments;

    for (var i=0; i<args.length; i++)
        ConfigArg(args(i));
}

function InitConfigDefaults()
{
    // Setup defaults for configuration parameters

    ConfigArg("--prefix=" + "C:\\Program Files\\Gambit");
    ConfigArg("--disable-single-host");
    ConfigArg("--disable-c-opt");
    ConfigArg("--disable-cplusplus");
    ConfigArg("--disable-debug");
    ConfigArg("--disable-debug-log");
    ConfigArg("--disable-debug-ctrl-flow-history");
    ConfigArg("--disable-debug-host-changes");
    ConfigArg("--disable-debug-alloc-mem");
    ConfigArg("--disable-debug-garbage-collector");
    ConfigArg("--disable-activity-log");
    ConfigArg("--enable-char-size=" + "4");
    ConfigArg("--disable-multiple-threaded-vms");
    ConfigArg("--enable-max-processors=" + "64");
}

InitConfigDefaults();

ProcessCommandLine();

// Determine installation directories

var GAMBITDIRS;

function Escape(str)
{
    return "\\\"" + str.replace(/\\/g, "\\\\").replace(/ /g, "\\040") + "\\\"";
}

function AddGambitDir(key, dir, name)
{
    if (config[key])
        GAMBITDIRS += " " + "-D" + name + "=" + Escape(config[key]);
    else
        config[key] = pathExpand(config["prefix"], dir);
}

function SetGambitDirs()
{
    GAMBITDIRS = "-D___GAMBITDIR=" + Escape(config["prefix"]);

    AddGambitDir("bindir",     "bin",     "___GAMBITDIR_BIN");
    AddGambitDir("libdir",     "lib",     "___GAMBITDIR_LIB");
    AddGambitDir("includedir", "include", "___GAMBITDIR_INCLUDE");
    AddGambitDir("docdir",     "doc",     "___GAMBITDIR_DOC");
    AddGambitDir("infodir",    "info",    "___GAMBITDIR_INFO");
    AddGambitDir("datadir",    "share",   "___GAMBITDIR_SHARE");
}

SetGambitDirs();

// Determine susbtitutions for .in files

var DEFS = "";

var CONF_VOIDSTAR_WIDTH = "___LONG_WIDTH";

var CONF_MAX_CHR = "0x10ffff";
switch (config["char-size"])
{
    case "1": CONF_MAX_CHR = "0xff"; break;
    case "2": CONF_MAX_CHR = "0xffff"; break;
}

var CONF_SINGLE_MULTIPLE_VMS = "___SINGLE_VM";

var CONF_SINGLE_MULTIPLE_THREADED_VMS = "___SINGLE_THREADED_VMS";
if (config["multiple-threaded-vms"])
    CONF_SINGLE_MULTIPLE_THREADED_VMS = "___MULTIPLE_THREADED_VMS";

var CONF_THREAD_SYSTEM = "___USE_NO_THREAD_SYSTEM";
if (config["multiple-threaded-vms"])
    CONF_THREAD_SYSTEM = "___USE_WIN32_THREAD_SYSTEM";

var CONF_THREAD_LOCAL_STORAGE_CLASS = "___NO_THREAD_LOCAL_STORAGE_CLASS";
if (config["multiple-threaded-vms"])
    CONF_THREAD_LOCAL_STORAGE_CLASS = "___THREAD_LOCAL_STORAGE_CLASS __declspec(thread)";

var CONF_HAVE_CONDITION_VARIABLE = "___DONT_HAVE_CONDITION_VARIABLE";
if (config["multiple-threaded-vms"])
    CONF_HAVE_CONDITION_VARIABLE = "___HAVE_CONDITION_VARIABLE";

var CONF_MAX_PROCESSORS = "64";
if (config["multiple-threaded-vms"])
    CONF_MAX_PROCESSORS = config["max-processors"];

var CONF_ACTIVITY_LOG = "___NO_ACTIVITY_LOG";
if (config["activity-log"])
    CONF_ACTIVITY_LOG = "___ACTIVITY_LOG";

var CONF_BOOL = "int";
if (config["cplusplus"])
    CONF_BOOL = "bool";

if (config["debug"])
    DEFS += " -D___DEBUG";

if (config["debug-ctrl-flow-history"])
{
    config["debug-log"] = true;
    DEFS += " -D___DEBUG_CTRL_FLOW_HISTORY";
}

if (config["debug-host-changes"])
{
    config["debug-log"] = true;
    DEFS += " -D___DEBUG_HOST_CHANGES";
}

if (config["debug-alloc-mem"])
{
    config["debug-log"] = true;
    DEFS += " -D___DEBUG_ALLOC_MEM";
}

if (config["debug-debug-garbage-collector"])
{
    config["debug-log"] = true;
    DEFS += " -D___DEBUG_GARBAGE_COLLECT";
}

if (config["debug-log"])
    DEFS += " -D___DEBUG_LOG";

function GetCCompiler(sh)
{
    return "cl -nologo"
           + (config["c-opt"] ? " -Oityb2" : " -Oityb1")
           + (config["cplusplus"] ? " -TP" : "")
           + " -Zi -GS -RTC1 -MT -D_CRT_SECURE_NO_DEPRECATE"
           + (sh && config["single-host"] ? " -D___SINGLE_HOST" : "")
           + DEFS;
}

// Process .in files

FixupFile(
    fso,
    gambitRoot + "\\include\\gambit.h.in",
    gambitRoot + "\\include\\gambit.h",
    {
        "CONF_VOIDSTAR_WIDTH":               CONF_VOIDSTAR_WIDTH,
        "CONF_MAX_CHR":                      CONF_MAX_CHR,
        "CONF_SINGLE_MULTIPLE_VMS":          CONF_SINGLE_MULTIPLE_VMS,
        "CONF_SINGLE_MULTIPLE_THREADED_VMS": CONF_SINGLE_MULTIPLE_THREADED_VMS,
        "CONF_THREAD_SYSTEM":                CONF_THREAD_SYSTEM,
        "CONF_THREAD_LOCAL_STORAGE_CLASS":   CONF_THREAD_LOCAL_STORAGE_CLASS,
        "CONF_HAVE_CONDITION_VARIABLE":      CONF_HAVE_CONDITION_VARIABLE,
        "CONF_MAX_PROCESSORS":               CONF_MAX_PROCESSORS,
        "CONF_ACTIVITY_LOG":                 CONF_ACTIVITY_LOG,
        "CONF_BOOL":                         CONF_BOOL
    });

FixupFile(
    fso,
    gambitRoot + "\\include\\config.h.in",
    gambitRoot + "\\include\\config.h",
    {});

FixupFile(
    fso,
    gambitRoot + "\\bin\\gambcomp-C.bat.windows.in",
    gambitRoot + "\\bin\\gambcomp-C.bat",
    {
        "C_COMPILER_BAT": GetCCompiler(true),
        "BUILD_OBJ_ECHO_BAT": "%C_COMPILER% -I\"%GAMBITDIR_INCLUDE%\" -c -Fo%BUILD_OBJ_OUTPUT_FILENAME% %BUILD_OBJ_CC_OPTIONS% %BUILD_OBJ_INPUT_FILENAMES%",
        "BUILD_DYN_ECHO_BAT": "%C_COMPILER% -I\"%GAMBITDIR_INCLUDE%\" -D___DYNAMIC -LD -Fe%BUILD_DYN_OUTPUT_FILENAME% %BUILD_DYN_CC_OPTIONS% %BUILD_DYN_LD_OPTIONS_PRELUDE% %BUILD_DYN_INPUT_FILENAMES% %BUILD_DYN_LD_OPTIONS%",
        "BUILD_EXE_ECHO_BAT": "%C_COMPILER% -I\"%GAMBITDIR_INCLUDE%\" %GAMBITLIB_LOC% -Fe%BUILD_EXE_OUTPUT_FILENAME% %BUILD_EXE_CC_OPTIONS% %BUILD_EXE_LD_OPTIONS_PRELUDE% %BUILD_EXE_INPUT_FILENAMES% \"%GAMBITDIR_LIB%\\libgambit.lib\" Kernel32.Lib User32.Lib Gdi32.Lib WS2_32.Lib %GAMBITLIB_LINK% %BUILD_EXE_LD_OPTIONS%"
    });

FixupFile(
    fso,
    gambitRoot + "\\bin\\gambcomp-js.bat.windows.in",
    gambitRoot + "\\bin\\gambcomp-js.bat",
    {});

FixupFile(
    fso,
    gambitRoot + "\\bin\\gambcomp-python.bat.windows.in",
    gambitRoot + "\\bin\\gambcomp-python.bat",
    {});

FixupFile(
    fso,
    gambitRoot + "\\bin\\gambcomp-ruby.bat.windows.in",
    gambitRoot + "\\bin\\gambcomp-ruby.bat",
    {});

FixupFile(
    fso,
    gambitRoot + "\\bin\\gambcomp-php.bat.windows.in",
    gambitRoot + "\\bin\\gambcomp-php.bat",
    {});

FixupFile(
    fso,
    gambitRoot + "\\bin\\gambcomp-java.bat.windows.in",
    gambitRoot + "\\bin\\gambcomp-java.bat",
    {});

FixupFile(
    fso,
    gambitRoot + "\\bin\\gambdoc.bat.windows.in",
    gambitRoot + "\\bin\\gambdoc.bat",
    {});

// We read in all the targets into makefile dictionary
// which is later used to write out the makefile file.
var libObjects = "libObjects";
var gsiObjects = "gsiObjects";
var gscObjects = "gscObjects";

var makefile = {
    libObjects: {},
    gsiObjects: {},
    gscObjects: {}
};

var NORMAL_C = GetValuesFromMakefile(fso, GetGambitRoot(fso) + "\\lib\\makefile.in", "NORMAL_C");
var MODULES_C = GetValuesFromMakefile(fso, GetGambitRoot(fso) + "\\lib\\makefile.in", "MODULES_C");
var LIBRARY_MODULES_C = GetValuesFromMakefile(fso, GetGambitRoot(fso) + "\\gsc\\makefile.in", "LIBRARY_MODULES_C");
AddTargets(NORMAL_C, "lib", gambitRoot, makefile[libObjects]);
AddTargets(MODULES_C, "lib", gambitRoot, makefile[libObjects]);
AddTarget("_gambit.c", "lib", gambitRoot, makefile[libObjects]);

AddTarget("_gsilib.c", "gsi", gambitRoot, makefile[gsiObjects]);
AddTarget("_gambitgsi.c", "gsi", gambitRoot, makefile[gsiObjects]);
AddTarget("_gsi.c", "gsi", gambitRoot, makefile[gsiObjects]);
AddTarget("_gsi_.c", "gsi", gambitRoot, makefile[gsiObjects]);

AddTargets(LIBRARY_MODULES_C, "gsc", gambitRoot, makefile[gscObjects]);
AddTarget("_gsclib.c", "gsc", gambitRoot, makefile[gscObjects]);
AddTarget("_gambitgsc.c", "gsc", gambitRoot, makefile[gscObjects]);
AddTarget("_gsc.c", "gsc", gambitRoot, makefile[gscObjects]);
AddTarget("_gsc_.c", "gsc", gambitRoot, makefile[gscObjects]);

var libObjectList=[];
for(var i in makefile[libObjects])
{
    libObjectList.push(makefile[libObjects][i]["object"]);
}

var gsiObjectList=[];
for(var i in makefile[gsiObjects])
{
    gsiObjectList.push(makefile[gsiObjects][i]["object"]);
}

var gscObjectList=[];
for(var i in makefile[gscObjects])
{
    gscObjectList.push(makefile[gscObjects][i]["object"]);
}

var makefileObject = fso.CreateTextFile(gambitRoot + "\\makefile", 2, true);

makefileObject.WriteLine("GAMBIT_ROOT=" + gambitRoot);

makefileObject.WriteLine("all:  $(GAMBIT_ROOT)\\gsc\\gsc.exe $(GAMBIT_ROOT)\\gsi\\gsi.exe");

makefileObject.WriteLine("$(GAMBIT_ROOT)\\gsi\\gsi.exe:  $(GAMBIT_ROOT)\\lib\\libgambit.lib " + gsiObjectList.join(" "));
makefileObject.WriteLine("\t " + GetCCompiler(true) + " -Fe$(GAMBIT_ROOT)\\gsi\\gsi.exe $(GAMBIT_ROOT)\\lib\\libgambit.lib " + gsiObjectList.join(" ") + " Kernel32.Lib User32.Lib Gdi32.Lib WS2_32.Lib" );

makefileObject.WriteLine("$(GAMBIT_ROOT)\\gsc\\gsc.exe:  $(GAMBIT_ROOT)\\lib\\libgambit.lib " + gscObjectList.join(" "));
makefileObject.WriteLine("\t " + GetCCompiler(true) + " -Fe$(GAMBIT_ROOT)\\gsc\\gsc.exe $(GAMBIT_ROOT)\\lib\\libgambit.lib " + gscObjectList.join(" ") + " Kernel32.Lib User32.Lib Gdi32.Lib WS2_32.Lib" );

makefileObject.WriteLine("$(GAMBIT_ROOT)\\lib\\libgambit.lib: " + libObjectList.join(" "));
makefileObject.WriteLine("\t lib -out:$(GAMBIT_ROOT)\\lib\\libgambit.lib " + libObjectList.join(" "));

for(var i in makefile[libObjects])
{
    makefileObject.WriteLine(makefile[libObjects][i]["object"] + ": " + i);
    makefileObject.WriteLine("\t" + makefile[libObjects][i]["commandLine"]);
}

for(var i in makefile[gsiObjects])
{
    makefileObject.WriteLine(makefile[gsiObjects][i]["object"] + ": " + i);
    makefileObject.WriteLine("\t" + makefile[gsiObjects][i]["commandLine"]);
}

for(var i in makefile[gscObjects])
{
    makefileObject.WriteLine(makefile[gscObjects][i]["object"] + ": " + i);
    makefileObject.WriteLine("\t" + makefile[gscObjects][i]["commandLine"]);
}

makefileObject.WriteLine("install:");
makefileObject.WriteLine("\t" + "if exist \"" + config["bindir"] + "\" rd /s \"" + config["bindir"] + "\"");
makefileObject.WriteLine("\t" + "if exist \"" + config["libdir"] + "\" rd /s \"" + config["libdir"] + "\"");
makefileObject.WriteLine("\t" + "if exist \"" + config["includedir"] + "\" rd /s \"" + config["includedir"] + "\"");
makefileObject.WriteLine("\t" + "if exist \"" + config["docdir"] + "\" rd /s \"" + config["docdir"] + "\"");
makefileObject.WriteLine("\t" + "if exist \"" + config["infodir"] + "\" rd /s \"" + config["infodir"] + "\"");
makefileObject.WriteLine("\t" + "if exist \"" + config["datadir"] + "\" rd /s \"" + config["datadir"] + "\"");
makefileObject.WriteLine("\t" + "mkdir \"" + config["bindir"] + "\"");
makefileObject.WriteLine("\t" + "mkdir \"" + config["libdir"] + "\"");
makefileObject.WriteLine("\t" + "mkdir \"" + config["includedir"] + "\"");
makefileObject.WriteLine("\t" + "mkdir \"" + config["docdir"] + "\"");
makefileObject.WriteLine("\t" + "mkdir \"" + config["infodir"] + "\"");
makefileObject.WriteLine("\t" + "mkdir \"" + config["datadir"] + "\"");
makefileObject.WriteLine("\t" + "copy gsi\\*.exe \"" + config["bindir"] + "\"");
makefileObject.WriteLine("\t" + "copy gsc\\*.exe \"" + config["bindir"] + "\"");
makefileObject.WriteLine("\t" + "copy bin\\*.bat \"" + config["bindir"] + "\"");
makefileObject.WriteLine("\t" + "copy lib\\_gambit.c \"" + config["libdir"] + "\"");
makefileObject.WriteLine("\t" + "copy lib\\*.lib \"" + config["libdir"] + "\"");
makefileObject.WriteLine("\t" + "copy lib\\*#.scm \"" + config["libdir"] + "\"");
makefileObject.WriteLine("\t" + "copy include\\gambit.h \"" + config["includedir"] + "\"");
makefileObject.WriteLine("\t" + "if exist doc\\gambit.pdf copy doc\\gambit.pdf \"" + config["docdir"] + "\"");
makefileObject.WriteLine("\t" + "if exist doc\\gambit.html copy doc\\gambit.html \"" + config["docdir"] + "\"");

makefileObject.WriteLine("clean:");
makefileObject.WriteLine("\t" + "del lib\\*.obj");
makefileObject.WriteLine("\t" + "del lib\\*.lib");
makefileObject.WriteLine("\t" + "del gsi\\*.obj");
makefileObject.WriteLine("\t" + "del gsc\\*.obj");
makefileObject.WriteLine("\t" + "del gsi\\*.exe");
makefileObject.WriteLine("\t" + "del gsc\\*.exe");

/////////////////
WScript.Quit() //
/////////////////

function AddTargets(cList, subdir, gambitRoot, makefileDict)
{
    for(var i in cList)
    {
        AddTarget(cList[i], subdir, gambitRoot, makefileDict);
    }
}

function AddTarget(fileName, subdir, gambitRoot, makefileDict)
{
    var fullPath = "$(GAMBIT_ROOT)\\" + subdir + "\\" + fileName;
    var objName = ReplaceExtension(fullPath, "c", "obj");
    makefileDict[fullPath] = {
        "object": objName,
        "commandLine": GetCommandLineForCompilation(fileName, gambitRoot) + " /Fo" + objName + " " + fullPath
    };
}

// Replace the pattern @ABC@ in the input file with the
// value in the fixup dictionary for the key ABC and write
// out the contents to the output file
function FixupFile(fso, inFile, outFile, fixupDictionary)
{
    var inFileObject = fso.OpenTextFile(inFile);
    var outFileObject = fso.CreateTextFile(outFile, true);
    var re = /@(\S+)@/;

    while (!inFileObject.AtEndOfStream)
    {
        var line = inFileObject.ReadLine();
        var m = line.match(re);
        if (m != null)
        {
            var replacement = fixupDictionary[m[1]];
            if (replacement != null)
            {
                line = line.replace(re, replacement);
            }
        }
        outFileObject.WriteLine(line);
    }
    inFileObject.close();
    outFileObject.close();
}

// Return the list of source files corresponding to a macro
// as specified in the makefile.in file
function GetValuesFromMakefile(fso, makefileName, macro)
{
    var makefileObject = fso.OpenTextFile(makefileName);
    var re = new RegExp("^" + macro + " *= *(.*)");

    while (!makefileObject.AtEndOfStream)
    {
        var line = makefileObject.ReadLine();
        var m = line.match(re);
        if (m != null)
        {
            line = m[1];

            var m;
            while ((m = line.match(/(.*)\\$/)) != null)
            {
                line = m[1] + makefileObject.ReadLine();
            }
            line.replace(/\s+/, " ");
            return line.split(" ");
        }
    }
}

function GetGambitRoot(fso)
{
    return fso.GetParentFolderName(fso.GetFile(WScript.ScriptFullName)) + "\\.."
}

function ReplaceExtension(fileName, fromExt, toExt)
{
    return fileName.replace(new RegExp("." + fromExt + "$"), "." + toExt);
}

function GetCommandLineForCompilation(fileName, gambitRoot)
{
    var COMP = GetCCompiler((fileName != "_num.c" && fileName != "_io.c"))
               + " -c -I$(GAMBIT_ROOT)\\include -D___SYS_TYPE_CPU=\\\"i686\\\" -D___SYS_TYPE_VENDOR=\\\"pc\\\" -D___SYS_TYPE_OS=\\\"visualc\\\" " + GAMBITDIRS;

    var COMP_LIB = COMP + " " + "-D___LIBRARY";
    var COMP_LIB_PR = COMP_LIB + " " + "-D___PRIMAL";
    var COMP_APP = COMP;

    if (fileName == "_gsi.c" || fileName == "_gsi_.c" || fileName == "_gsc.c" || fileName == "_gsc_.c")
    {
        return COMP_APP;
    }
    else
    {
        return COMP_LIB_PR;
    }
}


text:
package log

import (
	"os"

	"github.com/ncw/rclone/fs"
)

// redirectStderr to the file passed in
func redirectStderr(f *os.File) {
	fs.Errorf(nil, "Can't redirect stderr to file")
}


text:
package controller;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import view.ManagementMusicView;

public class ButtonsController implements ActionListener{

	// VISTA
	private ManagementMusicView view;
	// NETWORK
	//private InformationService infoService;

	public ButtonsController(ManagementMusicView view) {
		this.view = view;
		// Instanciem la classe per poder enviar missatges.
		// Passem una referencia a lobjecte per si cal notificar alguna informacio.
		// Aquest tambe podria ser creat des del prinicpal.
		//this.infoService = new InformationService(this);
	}

	public void actionPerformed(ActionEvent event) {
		if (event.getActionCommand().equals("ADD")) {
			// Recuperem la informació que sha escrit a la vista
			// i l'enviem al servidor

			// Actualitzem la vista
			//vista.addText(vista.getTypedMessage());
		}else if (event.getActionCommand().equals("ESTADISTICS")){

		}
	}
}


text:
from __future__ import print_function

import logging
import sys

from .command import ClusterManagerCmd
from kafka_utils.util import positive_int
from kafka_utils.util.validation import assignment_to_plan
from kafka_utils.util.validation import validate_plan

DEFAULT_MAX_PARTITION_MOVEMENTS = 1
DEFAULT_MAX_LEADER_CHANGES = 5

class DecommissionCmd(ClusterManagerCmd):

    def __init__(self):
        super(DecommissionCmd, self).__init__()
        self.log = logging.getLogger(self.__class__.__name__)

    def build_subparser(self, subparsers):
        subparser = subparsers.add_parser(
            'decommission',
            description='Decommission one or more brokers of the cluster.',
            help='This command is used to move all the replicas assigned to given '
            'brokers and redistribute them across all the other brokers while '
            'trying to keep the cluster balanced.',
        )
        subparser.add_argument(
            'broker_ids',
            nargs='+',
            type=int,
            help='Broker ids of the brokers to decommission.',
        )
        subparser.add_argument(
            '--max-partition-movements',
            type=positive_int,
            default=DEFAULT_MAX_PARTITION_MOVEMENTS,
            help='Maximum number of partition-movements in final set of actions.'
                 ' DEFAULT: %(default)s. RECOMMENDATION: Should be at least max '
                 'replication-factor across the cluster.',
        )
        subparser.add_argument(
            '--max-leader-changes',
            type=positive_int,
            default=DEFAULT_MAX_LEADER_CHANGES,
            help='Maximum number of actions with leader-only changes.'
                 ' DEFAULT: %(default)s',
        )
        return subparser

    def run_command(self, cluster_topology, cluster_balancer):
        base_assignment = cluster_topology.assignment

        cluster_balancer.decommission_brokers(self.args.broker_ids)

        if not validate_plan(
            assignment_to_plan(cluster_topology.assignment),
            assignment_to_plan(base_assignment),
        ):
            self.log.error('Invalid assignment %s.', cluster_topology.assignment)
            print(
                'Invalid assignment: {0}'.format(cluster_topology.assignment),
                file=sys.stderr,
            )
            sys.exit(1)

        # Reduce the proposed assignment based on max_partition_movements
        # and max_leader_changes
        reduced_assignment = self.get_reduced_assignment(
            base_assignment,
            cluster_topology.assignment,
            self.args.max_partition_movements,
            self.args.max_leader_changes,
        )
        if reduced_assignment:
            self.process_assignment(reduced_assignment)
        else:
            self.log.info(
                "Cluster already balanced. No more replicas in "
                "decommissioned brokers."
            )
            print(
                "Cluster already balanced. No more replicas in "
                "decommissioned brokers."
            )


text:
<?php
require_once($_SERVER['DOCUMENT_ROOT']."../../php/cashRegisterConfig.php");
require_once("connect.php");
date_default_timezone_set('America/Detroit');
$dateStamp=date("Y-m-d H:i:s");
if(!isset($_COOKIE['loginTime'])){
setcookie("loginTime",$dateStamp,time()+10800);
}
$sql = "select * from clerk where active = 1 order by name";
$result = mysql_query($sql);
if(mysql_error() != ""){
	echo "Trouble with mysql request " . mysql_error() . "
" . $sql;
	quit;
	}
	$selectPhrase ="<option value=\"0\" > Select a clerk </option> \n";
	while($row=mysql_fetch_array($result)){
	$selectPhrase .= "<option value=\"" . $row['id'] . "\">" .  $row['name'] . "</option> \n";
	}
?>

<!DOCTYPE html>

	<title>Virtual Cash Register</title>
	<?php require_once('meta.inc');?>

Gray and White Virtual Cash Register

<? echo ORGNAME_DEF ?> Proxy Entry

<form>

Entry Date
<input type="date" name="entryDate" id="entryDate">

</fieldset>
<fieldset>
<legend>Select Clerk</legend>
<select name="clerkSelect" id="clerkSelect">
<? echo $selectPhrase ?>
</select>
</fieldset>
<fieldset>
<legend>Sales amounts</legend>
Taxable Sales
<input type="number" name="taxable" id="taxable" />
Non taxable sales
<input type="number" name="non_tax" id="non_tax"/>
 Sales tax
<input type="text" name="tax" id="tax" />
Sales amount
<input type="text" name="totalAmount" id="totalAmount" />
<input type="button" id="submitButton" value="Submit" />
</form>

Gray and White Virtual Cash Register


text:
package com.minggo.pluto.bitmap;

import android.app.ActivityManager;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Bitmap.CompressFormat;
import android.graphics.BitmapFactory;
import android.util.Log;

import com.minggo.pluto.util.LogUtils;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

public class BitmapCache {

    private static final String TAG = "ImageCache";

    //默认的内存缓存大小
    private static final int DEFAULT_MEM_CACHE_SIZE = 1024 * 1024 * 8; // 8MB

    //默认的磁盘缓存大小
    private static final int DEFAULT_DISK_CACHE_SIZE = 1024 * 1024 * 20; // 20MB

    // Compression settings when writing images to disk cache
    private static final CompressFormat DEFAULT_COMPRESS_FORMAT = CompressFormat.JPEG;
    /**
     * 默认图片质量以前是70现在因为首页要显示高清100
     */
    private static final int DEFAULT_COMPRESS_QUALITY = 90;
    private static final int DISK_CACHE_INDEX = 0;

    // Constants to easily toggle various caches
    private static final boolean DEFAULT_MEM_CACHE_ENABLED = true;
    private static final boolean DEFAULT_DISK_CACHE_ENABLED = true;
    private static final boolean DEFAULT_CLEAR_DISK_CACHE_ON_START = false;
    private static final boolean DEFAULT_INIT_DISK_CACHE_ON_CREATE = false;

    private LruDiskCache mDiskLruCache;
    private LruMemoryCache<String, Bitmap> mMemoryCache;
    private ImageCacheParams mCacheParams;
    private final Object mDiskCacheLock = new Object();
    private boolean mDiskCacheStarting = true;

    /**
     * Creating a new ImageCache object using the specified parameters.
     *
     * @param cacheParams The cache parameters to use to initialize the cache
     */
    public BitmapCache(ImageCacheParams cacheParams) {
        init(cacheParams);
    }

    /**
     * Initialize the cache, providing all parameters.
     *
     * @param cacheParams The cache parameters to initialize the cache
     */
    private void init(ImageCacheParams cacheParams) {
        mCacheParams = cacheParams;

        // Set up memory cache
        if (mCacheParams.memoryCacheEnabled) {
            mMemoryCache = new LruMemoryCache<String, Bitmap>(mCacheParams.memCacheSize) {
                /**
                 * Measure item size in bytes rather than units which is more practical
                 * for a bitmap cache
                 */
                @Override
                protected int sizeOf(String key, Bitmap bitmap) {
                    return BitmapCommonUtils.getBitmapSize(bitmap);
                }
            };
        }

        // By default the disk cache is not initialized here as it should be initialized
        // on a separate thread due to disk access.
        if (cacheParams.initDiskCacheOnCreate) {
            // Set up disk cache
            initDiskCache();
        }
    }

    /**
     * Initializes the disk cache.  Note that this includes disk access so this should not be
     * executed on the main/UI thread. By default an ImageCache does not initialize the disk
     * cache when it is created, instead you should call initDiskCache() to initialize it on a
     * background thread.
     */
    public void initDiskCache() {
        // Set up disk cache
        synchronized (mDiskCacheLock) {
            if (mDiskLruCache == null || mDiskLruCache.isClosed()) {
                File diskCacheDir = mCacheParams.diskCacheDir;
                if (mCacheParams.diskCacheEnabled && diskCacheDir != null) {
                    if (!diskCacheDir.exists()) {
                        diskCacheDir.mkdirs();
                    }
                    if (BitmapCommonUtils.getUsableSpace(diskCacheDir) > mCacheParams.diskCacheSize) {
                        try {
                            mDiskLruCache = LruDiskCache.open(diskCacheDir, 1, 1, mCacheParams.diskCacheSize);
                        } catch (final IOException e) {
                            mCacheParams.diskCacheDir = null;
                            Log.e(TAG, "initDiskCache - " + e);
                        }
                    }
                }
            }
            mDiskCacheStarting = false;
            mDiskCacheLock.notifyAll();
        }
    }

    /**
     * Adds a bitmap to both memory and disk cache.
     * @param data Unique identifier for the bitmap to store
     * @param bitmap The bitmap to store
     */
    public void addBitmapToCache(String data, Bitmap bitmap) {
        if (data == null || bitmap == null) {
            return;
        }

        // Add to memory cache
        if (mMemoryCache != null && mMemoryCache.get(data) == null) {
            mMemoryCache.put(data, bitmap);
        }

        synchronized (mDiskCacheLock) {
            // 添加到硬盘缓存
            if (mDiskLruCache != null) {
                final String key = FileNameGenerator.generator(data);
                OutputStream out = null;
                try {
                    LruDiskCache.Snapshot snapshot = mDiskLruCache.get(key);
                    if (snapshot == null) {
                        final LruDiskCache.Editor editor = mDiskLruCache.edit(key);
                        if (editor != null) {
                            out = editor.newOutputStream(DISK_CACHE_INDEX);
                            LogUtils.info("data-->"+data+" key-->"+data);
                            bitmap.compress(
                                    getImageType(data), mCacheParams.compressQuality, out);
                            editor.commit();
                            out.close();
                        }
                    } else {
                        snapshot.getInputStream(DISK_CACHE_INDEX).close();
                    }
                } catch (final IOException e) {
                    LogUtils.error(TAG, "addBitmapToCache - " + e);
                } catch (Exception e) {
                    LogUtils.error(TAG, "addBitmapToCache - " + e);
                } finally {
                    try {
                        if (out != null) {
                            out.close();
                        }
                    } catch (IOException e) {
                        e.printStackTrace();
                    }
                }
            }
        }
    }

    /**
     * 判断原始图片格式
     * @param data  图片url地址
     * @return jpg/png
     */
    public CompressFormat getImageType(String data){
        CompressFormat type = CompressFormat.PNG;
        return type;
    }

    /**
     * Get from memory cache.
     *
     * @param data Unique identifier for which item to get
     * @return The bitmap if found in cache, null otherwise
     */
    public Bitmap getBitmapFromMemCache(Context context, int resId) {
        if (mMemoryCache != null) {
            Bitmap memBitmap = mMemoryCache.get(resId+"");
            if (memBitmap != null) {
                return memBitmap;
            }
            memBitmap = BitmapFactory.decodeResource(context.getResources(), resId);
            if (memBitmap != null) {
				mMemoryCache.put(resId+"", memBitmap);
				return memBitmap;
			}
        }
        return null;
    }

    /**
     * Get from memory cache.
     *
     * @param data Unique identifier for which item to get
     * @return The bitmap if found in cache, null otherwise
     */
    public Bitmap getBitmapFromMemCache(String data) {
        if (mMemoryCache != null) {
            final Bitmap memBitmap = mMemoryCache.get(data);
            if (memBitmap != null) {
                return memBitmap;
            }
        }
        return null;
    }

    /**
     * 获取硬盘缓存
     * @param data
     * @return
     */
    public Bitmap getBitmapFromDiskCache(String data) {
    	final String key = FileNameGenerator.generator(data);
        //LogUtils.infoF("data:%s: key:%s", data, key);
        synchronized (mDiskCacheLock) {
            while (mDiskCacheStarting) {
                try {
                    mDiskCacheLock.wait();
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
            if (mDiskLruCache != null) {
                InputStream inputStream = null;
                try {
                    final LruDiskCache.Snapshot snapshot = mDiskLruCache.get(key);
                    if (snapshot != null) {
                        inputStream = snapshot.getInputStream(DISK_CACHE_INDEX);
                        if (inputStream != null) {
                            final Bitmap bitmap = BitmapFactory.decodeStream(inputStream);
                            return bitmap;
                        }
                    }
                } catch (final IOException e) {
                    Log.e(TAG, "getBitmapFromDiskCache - " + e);
                } finally {
                    try {
                        if (inputStream != null) {
                            inputStream.close();
                        }
                    } catch (IOException e) {
                        e.printStackTrace();
                    }
                }
            }
            return null;
        }
    }

    /**
     * Clears both the memory and disk cache associated with this ImageCache object. Note that
     * this includes disk access so this should not be executed on the main/UI thread.
     */
    public void clearCache() {
    	clearMemoryCache();
        synchronized (mDiskCacheLock) {
            mDiskCacheStarting = true;
            if (mDiskLruCache != null && !mDiskLruCache.isClosed()) {
                try {
                    mDiskLruCache.delete();
                } catch (IOException e) {
                    Log.e(TAG, "clearCache - " + e);
                }
                mDiskLruCache = null;
                initDiskCache();
            }
        }
    }

    public void clearMemoryCache(){
    	if (mMemoryCache != null) {
            mMemoryCache.evictAll();
        }
    }

    /**
     * Flushes the disk cache associated with this ImageCache object. Note that this includes
     * disk access so this should not be executed on the main/UI thread.
     */
    public void flush() {
        synchronized (mDiskCacheLock) {
            if (mDiskLruCache != null) {
                try {
                    mDiskLruCache.flush();
                } catch (IOException e) {
                    Log.e(TAG, "flush - " + e);
                }
            }
        }
    }

    /**
     * Closes the disk cache associated with this ImageCache object. Note that this includes
     * disk access so this should not be executed on the main/UI thread.
     */
    public void close() {
        synchronized (mDiskCacheLock) {
            if (mDiskLruCache != null) {
                try {
                    if (!mDiskLruCache.isClosed()) {
                        mDiskLruCache.close();
                        mDiskLruCache = null;
                    }
                } catch (IOException e) {
                    Log.e(TAG, "close - " + e);
                }
            }
        }
    }

    /**
     * A holder class that contains cache parameters.
     */
    public static class ImageCacheParams {
        public int memCacheSize = DEFAULT_MEM_CACHE_SIZE;
        public int diskCacheSize = DEFAULT_DISK_CACHE_SIZE;
        public File diskCacheDir;
        public CompressFormat compressFormat = DEFAULT_COMPRESS_FORMAT;
        public int compressQuality = DEFAULT_COMPRESS_QUALITY;
        public boolean memoryCacheEnabled = DEFAULT_MEM_CACHE_ENABLED;
        public boolean diskCacheEnabled = DEFAULT_DISK_CACHE_ENABLED;
        public boolean clearDiskCacheOnStart = DEFAULT_CLEAR_DISK_CACHE_ON_START;
        public boolean initDiskCacheOnCreate = DEFAULT_INIT_DISK_CACHE_ON_CREATE;

        public ImageCacheParams(File diskCacheDir) {
            this.diskCacheDir = diskCacheDir;
        }

        public ImageCacheParams(String diskCacheDir) {
            this.diskCacheDir = new File(diskCacheDir);
        }

        /**
         * 设置缓存大小
         * @param context
         * @param percent 百分比,值的范围是在 0.05 到 0.8之间
         */
        public void setMemCacheSizePercent(Context context, float percent) {
            if (percent < 0.05f || percent > 0.8f) {
                throw new IllegalArgumentException("setMemCacheSizePercent - percent must be "
                        + "between 0.05 and 0.8 (inclusive)");
            }
            memCacheSize = Math.round(percent * getMemoryClass(context) * 1024 * 1024);
        }

		public void setMemCacheSize(int memCacheSize) {
			this.memCacheSize = memCacheSize;
		}

		public void setDiskCacheSize(int diskCacheSize) {
			this.diskCacheSize = diskCacheSize;
		}

		private static int getMemoryClass(Context context) {
            return ((ActivityManager) context.getSystemService(
                    Context.ACTIVITY_SERVICE)).getMemoryClass();
        }
    }

}


text:
package org.optaplanner.examples.common;

public final class TestSystemProperties {

    public static final String MOVE_THREAD_COUNTS = "moveThreadCounts";
    public static final String CONSTRAINT_STREAM_IMPL_TYPE = "constraintStreamImplType";
    public static final String RUN_TURTLE_TESTS = "runTurtleTests";
    public static final String MOVE_THREAD_COUNT = "moveThreadCount";

    private TestSystemProperties() {
    }
}


text:
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package nl.fontys.sofa.limo.view.node.property.editor;

import java.awt.Component;
import java.beans.PropertyEditorSupport;
import nl.fontys.sofa.limo.domain.component.leg.Leg;
import nl.fontys.sofa.limo.view.wizard.leg.normal.NormalLegWizardAction;

/**
 * The LegPropertyEditor is the Editor for editing a Leg. In the background it
 * used the NormalLegWizardAction for editing.
 *
 * @author Christina Zenzes
 */
public class LegPropertyEditor extends PropertyEditorSupport {

    @Override
    public String getAsText() {
        return ((Leg) getValue()).getName();
    }

    @Override
    public void setAsText(String s) {
    }

    @Override
    public Component getCustomEditor() {
        NormalLegWizardAction wiz = new NormalLegWizardAction();
        wiz.setUpdate((Leg) getValue());
        wiz.actionPerformed(null);
        return super.getCustomEditor();
    }

    @Override
    public boolean supportsCustomEditor() {
        return true;
    }

}


text:
DOTFILES="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )"
if ! type -t cecho > /dev/null; then
    source $DOTFILES/cecho.sh
fi

cecho "Init oh-my-zsh.sh" $green

OH_MY_ZSH_HOME=$DOTFILES/zsh/oh-my-zsh.symlink
CUSTOM_THEMES_HOME=$OH_MY_ZSH_HOME/custom/themes

cecho "Installing customizations..." $green
mkdir -p $CUSTOM_THEMES_HOME

curl -fsSL https://raw.githubusercontent.com/wesbos/Cobalt2-iterm/master/cobalt2.zsh-theme > $CUSTOM_THEMES_HOME/cobalt2.zsh-theme

cecho "Done oh-my-zsh.sh" $green


text:
using System;
using System.Diagnostics;

namespace org.apache.lucene.util.fst
{

	using DataInput = org.apache.lucene.store.DataInput;
	using DataOutput = org.apache.lucene.store.DataOutput;

	/// <summary>
	/// An FST <seealso cref="Outputs"/> implementation where each output
	/// is one or two non-negative long values.  If it's a
	/// single output, Long is returned; else, TwoLongs.  Order
	/// is preserved in the TwoLongs case, ie .first is the first
	/// input/output added to Builder, and .second is the
	/// second.  You cannot store 0 output with this (that's
	/// reserved to mean "no output")!
	///
	/// <para>NOTE: the only way to create a TwoLongs output is to
	/// add the same input to the FST twice in a row.  This is
	/// how the FST maps a single input to two outputs (e.g. you
	/// cannot pass a TwoLongs to <seealso cref="Builder#add"/>.  If you
	/// need more than two then use <seealso cref="ListOfOutputs"/>, but if
	/// you only have at most 2 then this implementation will
	/// require fewer bytes as it steals one bit from each long
	/// value.
	///
	/// </para>
	/// <para>NOTE: the resulting FST is not guaranteed to be minimal!
	/// See <seealso cref="Builder"/>.
	///
	/// @lucene.experimental
	/// </para>
	/// </summary>

	public sealed class UpToTwoPositiveIntOutputs : Outputs<object>
	{

	  /// <summary>
	  /// Holds two long outputs. </summary>
	  public sealed class TwoLongs
	  {
		public readonly long first;
		public readonly long second;

		public TwoLongs(long first, long second)
		{
		  this.first = first;
		  this.second = second;
		  Debug.Assert(first >= 0);
		  Debug.Assert(second >= 0);
		}

		public override string ToString()
		{
		  return "TwoLongs:" + first + "," + second;
		}

		public override bool Equals(object _other)
		{
		  if (_other is TwoLongs)
		  {
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final TwoLongs other = (TwoLongs) _other;
			TwoLongs other = (TwoLongs) _other;
			return first == other.first && second == other.second;
		  }
		  else
		  {
			return false;
		  }
		}

		public override int GetHashCode()
		{
		  return (int)((first ^ ((long)((ulong)first >> 32))) ^ (second ^ (second >> 32)));
		}
	  }

	  private static readonly long? NO_OUTPUT = new long?(0);

	  private readonly bool doShare;

	  private static readonly UpToTwoPositiveIntOutputs singletonShare = new UpToTwoPositiveIntOutputs(true);
	  private static readonly UpToTwoPositiveIntOutputs singletonNoShare = new UpToTwoPositiveIntOutputs(false);

	  private UpToTwoPositiveIntOutputs(bool doShare)
	  {
		this.doShare = doShare;
	  }

	  public static UpToTwoPositiveIntOutputs getSingleton(bool doShare)
	  {
		return doShare ? singletonShare : singletonNoShare;
	  }

	  public long? get(long v)
	  {
		if (v == 0)
		{
		  return NO_OUTPUT;
		}
		else
		{
		  return Convert.ToInt64(v);
		}
	  }

	  public TwoLongs get(long first, long second)
	  {
		return new TwoLongs(first, second);
	  }

	  public override long? common(object _output1, object _output2)
	  {
		Debug.Assert(valid(_output1, false));
		Debug.Assert(valid(_output2, false));
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final Long output1 = (Long) _output1;
		long? output1 = (long?) _output1;
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final Long output2 = (Long) _output2;
		long? output2 = (long?) _output2;
		if (output1 == NO_OUTPUT || output2 == NO_OUTPUT)
		{
		  return NO_OUTPUT;
		}
		else if (doShare)
		{
		  Debug.Assert(output1 > 0);
		  Debug.Assert(output2 > 0);
		  return Math.Min(output1, output2);
		}
		else if (output1.Equals(output2))
		{
		  return output1;
		}
		else
		{
		  return NO_OUTPUT;
		}
	  }

	  public override long? subtract(object _output, object _inc)
	  {
		Debug.Assert(valid(_output, false));
		Debug.Assert(valid(_inc, false));
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final Long output = (Long) _output;
		long? output = (long?) _output;
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final Long inc = (Long) _inc;
		long? inc = (long?) _inc;
		Debug.Assert(output >= inc);

		if (inc == NO_OUTPUT)
		{
		  return output;
		}
		else if (output.Equals(inc))
		{
		  return NO_OUTPUT;
		}
		else
		{
		  return output - inc;
		}
	  }

	  public override object add(object _prefix, object _output)
	  {
		Debug.Assert(valid(_prefix, false));
		Debug.Assert(valid(_output, true));
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final Long prefix = (Long) _prefix;
		long? prefix = (long?) _prefix;
		if (_output is long?)
		{
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final Long output = (Long) _output;
		  long? output = (long?) _output;
		  if (prefix == NO_OUTPUT)
		  {
			return output;
		  }
		  else if (output == NO_OUTPUT)
		  {
			return prefix;
		  }
		  else
		  {
			return prefix + output;
		  }
		}
		else
		{
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final TwoLongs output = (TwoLongs) _output;
		  TwoLongs output = (TwoLongs) _output;
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final long v = prefix;
		  long v = prefix.Value;
		  return new TwoLongs(output.first + v, output.second + v);
		}
	  }

//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: @Override public void write(Object _output, org.apache.lucene.store.DataOutput out) throws java.io.IOException
	  public override void write(object _output, DataOutput @out)
	  {
		Debug.Assert(valid(_output, true));
		if (_output is long?)
		{
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final Long output = (Long) _output;
		  long? output = (long?) _output;
		  @out.writeVLong(output << 1);
		}
		else
		{
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final TwoLongs output = (TwoLongs) _output;
		  TwoLongs output = (TwoLongs) _output;
		  @out.writeVLong((output.first << 1) | 1);
		  @out.writeVLong(output.second);
		}
	  }

//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: @Override public Object read(org.apache.lucene.store.DataInput in) throws java.io.IOException
	  public override object read(DataInput @in)
	  {
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final long code = in.readVLong();
		long code = @in.readVLong();
		if ((code & 1) == 0)
		{
		  // single long
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final long v = code >>> 1;
		  long v = (long)((ulong)code >> 1);
		  if (v == 0)
		  {
			return NO_OUTPUT;
		  }
		  else
		  {
			return Convert.ToInt64(v);
		  }
		}
		else
		{
		  // two longs
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final long first = code >>> 1;
		  long first = (long)((ulong)code >> 1);
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final long second = in.readVLong();
		  long second = @in.readVLong();
		  return new TwoLongs(first, second);
		}
	  }

	  private bool valid(long? o)
	  {
		Debug.Assert(o != null);
		Debug.Assert(o is long?);
		Debug.Assert(o == NO_OUTPUT || o > 0);
		return true;
	  }

	  // Used only by assert
	  private bool valid(object _o, bool allowDouble)
	  {
		if (!allowDouble)
		{
		  Debug.Assert(_o is long?);
		  return valid((long?) _o);
		}
		else if (_o is TwoLongs)
		{
		  return true;
		}
		else
		{
		  return valid((long?) _o);
		}
	  }

	  public override object NoOutput
	  {
		  get
		  {
			return NO_OUTPUT;
		  }
	  }

	  public override string outputToString(object output)
	  {
		return output.ToString();
	  }

	  public override object merge(object first, object second)
	  {
		Debug.Assert(valid(first, false));
		Debug.Assert(valid(second, false));
		return new TwoLongs((long?) first, (long?) second);
	  }
	}

}


text:
package ti.android.ble.common;

import java.util.List;
import android.app.Service;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothGatt;
import android.bluetooth.BluetoothGattCallback;
import android.bluetooth.BluetoothGattCharacteristic;
import android.bluetooth.BluetoothGattDescriptor;
import android.bluetooth.BluetoothGattService;
import android.bluetooth.BluetoothManager;
import android.bluetooth.BluetoothProfile;
import android.content.Context;
import android.content.Intent;
import android.os.Binder;
import android.os.IBinder;
import android.util.Log;

/**
 * Service for managing connection and data communication with a GATT server hosted on a given Bluetooth LE device.
 */
public class BluetoothLeService extends Service {
  static final String TAG = "BluetoothLeService";

  public final static String ACTION_GATT_CONNECTED ="ti.android.ble.common.ACTION_GATT_CONNECTED";
  public final static String ACTION_GATT_DISCONNECTED = "ti.android.ble.common.ACTION_GATT_DISCONNECTED";
  public final static String ACTION_GATT_SERVICES_DISCOVERED = "ti.android.ble.common.ACTION_GATT_SERVICES_DISCOVERED";
  public final static String ACTION_DATA_READ = "ti.android.ble.common.ACTION_DATA_READ";
  public final static String ACTION_DATA_SET_NOTIF = "ti.android.ble.common.ACTION_DATA_SET_NOTIF";
  public final static String ACTION_DATA_NOTIFY = "ti.android.ble.common.ACTION_DATA_NOTIFY";
  public final static String ACTION_DATA_WRITE = "ti.android.ble.common.ACTION_DATA_WRITE";
  public final static String EXTRA_DATA = "ti.android.ble.common.EXTRA_DATA";
  public final static String EXTRA_UUID = "ti.android.ble.common.EXTRA_UUID";
  public final static String EXTRA_STATUS = "ti.android.ble.common.EXTRA_STATUS";
  public final static String EXTRA_ADDRESS = "ti.android.ble.common.EXTRA_ADDRESS";

  // BLE
  private BluetoothManager mBluetoothManager = null;
  private BluetoothAdapter mBtAdapter = null;
  private BluetoothGatt mBluetoothGatt = null;
  private static BluetoothLeService mThis = null;
  private volatile boolean mBusy = false; // Write/read pending response
  private String mBluetoothDeviceAddress;

  /**
   * GATT client callbacks
   */
  private BluetoothGattCallback mGattCallbacks = new BluetoothGattCallback() {

    @Override
    public void onConnectionStateChange(BluetoothGatt gatt, int status, int newState) {
      if (mBluetoothGatt == null) {
        Log.e(TAG, "mBluetoothGatt not created!");
        return;
      }

      BluetoothDevice device = gatt.getDevice();
      String address = device.getAddress();
      Log.d(TAG, "onConnectionStateChange (" + address + ") " + newState + " status: " + status);

      try {
        switch (newState) {
        case BluetoothProfile.STATE_CONNECTED:
          broadcastUpdate(ACTION_GATT_CONNECTED, address, status);
          break;
        case BluetoothProfile.STATE_DISCONNECTED:
          broadcastUpdate(ACTION_GATT_DISCONNECTED, address, status);
          break;
        default:
          Log.e(TAG, "New state not processed: " + newState);
          break;
        }
      } catch (NullPointerException e) {
        e.printStackTrace();
      }
    }

    @Override
    public void onServicesDiscovered(BluetoothGatt gatt, int status) {
      BluetoothDevice device = gatt.getDevice();
    	broadcastUpdate(ACTION_GATT_SERVICES_DISCOVERED,device.getAddress(),status);
    }

    @Override
    public void onCharacteristicChanged(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic) {
    	broadcastUpdate(ACTION_DATA_NOTIFY,characteristic,BluetoothGatt.GATT_SUCCESS);
    }

    @Override
    public void onCharacteristicRead(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic, int status) {
    	broadcastUpdate(ACTION_DATA_READ,characteristic,status);
    }

    @Override
    public void onCharacteristicWrite(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic, int status) {
    	broadcastUpdate(ACTION_DATA_WRITE,characteristic,status);
    }

    @Override
    public void onDescriptorRead(BluetoothGatt gatt, BluetoothGattDescriptor descriptor, int status) {
      mBusy = false;
      Log.i(TAG, "onDescriptorRead");
    }

    @Override
    public void onDescriptorWrite(BluetoothGatt gatt, BluetoothGattDescriptor descriptor, int status) {
      mBusy = false;
      Log.i(TAG, "onDescriptorWrite");
      BluetoothLeService.this.broadcastUpdate(ACTION_DATA_SET_NOTIF, descriptor, status);
    }
  };

  private void broadcastUpdate(final String action, final String address, final int status) {
	  final Intent intent = new Intent(action);
		intent.putExtra(EXTRA_ADDRESS, address);
		intent.putExtra(EXTRA_STATUS, status);
	  sendBroadcast(intent);
    mBusy = false;
  }

  private void broadcastUpdate(final String action, final BluetoothGattCharacteristic characteristic, final int status) {
	  final Intent intent = new Intent(action);
	  intent.putExtra(EXTRA_UUID, characteristic.getUuid().toString());
		intent.putExtra(EXTRA_DATA, characteristic.getValue());
		intent.putExtra(EXTRA_STATUS, status);
	  sendBroadcast(intent);
    mBusy = false;
  }

  private void broadcastUpdate(String action, BluetoothGattDescriptor descriptor, int status)
  {
    final Intent intent = new Intent(action);
    intent.putExtra(EXTRA_UUID, descriptor.getUuid().toString());
    intent.putExtra(EXTRA_DATA, descriptor.getValue());
    intent.putExtra(EXTRA_STATUS, status);
    sendBroadcast(intent);
    mBusy = false;
  }

  private boolean checkGatt() {
    if (mBtAdapter == null) {
      Log.w(TAG, "BluetoothAdapter not initialized");
      return false;
    }
    if (mBluetoothGatt == null) {
      Log.w(TAG, "BluetoothGatt not initialized");
      return false;
    }

    if (mBusy) {
      Log.w(TAG, "LeService busy");
      return false;
    }
		return true;

  }

  /**
   * Manage the BLE service
   */
  public class LocalBinder extends Binder {
    public BluetoothLeService getService() {
      return BluetoothLeService.this;
    }
  }

  @Override
  public IBinder onBind(Intent intent) {
    return binder;
  }

  @Override
  public boolean onUnbind(Intent intent) {
    // After using a given device, you should make sure that
    // BluetoothGatt.close() is called
    // such that resources are cleaned up properly. In this particular example,
    // close() is
    // invoked when the UI is disconnected from the Service.
    close();
    return super.onUnbind(intent);
  }

  private final IBinder binder = new LocalBinder();

  /**
   * Initializes a reference to the local Bluetooth adapter.
   *
   * @return Return true if the initialization is successful.
   */
  public boolean initialize() {

    Log.d(TAG, "initialize");
    // For API level 18 and above, get a reference to BluetoothAdapter through
    // BluetoothManager.
    mThis = this;
    if (mBluetoothManager == null) {
      mBluetoothManager = (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE);
      if (mBluetoothManager == null) {
        Log.e(TAG, "Unable to initialize BluetoothManager.");
        return false;
      }
    }

    mBtAdapter = mBluetoothManager.getAdapter();
    if (mBtAdapter == null) {
      Log.e(TAG, "Unable to obtain a BluetoothAdapter.");
      return false;
    }
    return true;
  }

  @Override
  public int onStartCommand(Intent intent, int flags, int startId) {
    Log.i(TAG, "Received start id " + startId + ": " + intent);
    // We want this service to continue running until it is explicitly
    // stopped, so return sticky.
    return START_STICKY;
  }

  @Override
  public void onDestroy() {
    super.onDestroy();
    Log.d(TAG, "onDestroy() called");
    if (mBluetoothGatt != null) {
      mBluetoothGatt.close();
      mBluetoothGatt = null;
    }
  }

  //
  // GATT API
  //
  /**
   * Request a read on a given {@code BluetoothGattCharacteristic}. The read result is reported asynchronously through the
   * {@code BluetoothGattCallback#onCharacteristicRead(android.bluetooth.BluetoothGatt, android.bluetooth.BluetoothGattCharacteristic, int)} callback.
   *
   * @param characteristic
   *          The characteristic to read from.
   */
  public void readCharacteristic(BluetoothGattCharacteristic characteristic) {
  	if (!checkGatt())
  		return;
    mBusy = true;
    mBluetoothGatt.readCharacteristic(characteristic);
  }

  public boolean writeCharacteristic(BluetoothGattCharacteristic characteristic, byte b) {
  	if (!checkGatt())
  		return false;

    byte[] val = new byte[1];
    val[0] = b;
    characteristic.setValue(val);

    mBusy = true;
    return mBluetoothGatt.writeCharacteristic(characteristic);
  }

  public boolean writeCharacteristic(BluetoothGattCharacteristic characteristic, boolean b) {
  	if (!checkGatt())
  		return false;

    byte[] val = new byte[1];

    val[0] = (byte) (b ? 1 : 0);
    characteristic.setValue(val);
    mBusy = true;
    return mBluetoothGatt.writeCharacteristic(characteristic);
  }

  public boolean writeCharacteristic(BluetoothGattCharacteristic characteristic) {
  	if (!checkGatt())
  		return false;

  	mBusy = true;
    return mBluetoothGatt.writeCharacteristic(characteristic);
  }

  /**
   * Retrieves the number of GATT services on the connected device. This should be invoked only after {@code BluetoothGatt#discoverServices()} completes
   * successfully.
   *
   * @return A {@code integer} number of supported services.
   */
  public int getNumServices() {
    if (mBluetoothGatt == null)
      return 0;

    return mBluetoothGatt.getServices().size();
  }

  /**
   * Retrieves a list of supported GATT services on the connected device. This should be invoked only after {@code BluetoothGatt#discoverServices()} completes
   * successfully.
   *
   * @return A {@code List} of supported services.
   */
  public List<BluetoothGattService> getSupportedGattServices() {
    if (mBluetoothGatt == null)
      return null;

    return mBluetoothGatt.getServices();
  }

  /**
   * Enables or disables notification on a give characteristic.
   *
   * @param characteristic
   *          Characteristic to act on.
   * @param enabled
   *          If true, enable notification. False otherwise.
   */
  public boolean setCharacteristicNotification(BluetoothGattCharacteristic characteristic, boolean enable) {
  	if (!checkGatt())
  		return false;

    if (!mBluetoothGatt.setCharacteristicNotification(characteristic, enable)) {
      Log.w(TAG, "setCharacteristicNotification failed");
      return false;
    }

    BluetoothGattDescriptor clientConfig = characteristic.getDescriptor(GattInfo.CLIENT_CHARACTERISTIC_CONFIG);
    if (clientConfig == null)
      return false;

    if (enable) {
      Log.i(TAG, "enable notification");
      clientConfig.setValue(BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE);
    } else {
      Log.i(TAG, "disable notification");
      clientConfig.setValue(BluetoothGattDescriptor.DISABLE_NOTIFICATION_VALUE);
    }

    mBusy = true;
    return mBluetoothGatt.writeDescriptor(clientConfig);
  }

  public boolean isNotificationEnabled(BluetoothGattCharacteristic characteristic) {
  	if (!checkGatt())
  		return false;

  	BluetoothGattDescriptor clientConfig = characteristic.getDescriptor(GattInfo.CLIENT_CHARACTERISTIC_CONFIG);
    if (clientConfig == null)
      return false;

    return clientConfig.getValue() == BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE;
  }

  /**
   * Connects to the GATT server hosted on the Bluetooth LE device.
   *
   * @param address
   *          The device address of the destination device.
   *
   * @return Return true if the connection is initiated successfully. The connection result is reported asynchronously through the
   *         {@code BluetoothGattCallback#onConnectionStateChange(android.bluetooth.BluetoothGatt, int, int)} callback.
   */
  public boolean connect(final String address) {
    if (mBtAdapter == null || address == null) {
      Log.w(TAG, "BluetoothAdapter not initialized or unspecified address.");
      return false;
    }
    final BluetoothDevice device = mBtAdapter.getRemoteDevice(address);
    int connectionState = mBluetoothManager.getConnectionState(device, BluetoothProfile.GATT);

    if (connectionState == BluetoothProfile.STATE_DISCONNECTED) {

      // Previously connected device. Try to reconnect.
      if (mBluetoothDeviceAddress != null && address.equals(mBluetoothDeviceAddress) && mBluetoothGatt != null) {
        Log.d(TAG, "Re-use GATT connection");
        if (mBluetoothGatt.connect()) {
          return true;
        } else {
          Log.w(TAG, "GATT re-connect failed.");
          return false;
        }
      }

      if (device == null) {
        Log.w(TAG, "Device not found.  Unable to connect.");
        return false;
      }
      // We want to directly connect to the device, so we are setting the
      // autoConnect parameter to false.
      Log.d(TAG, "Create a new GATT connection.");
      mBluetoothGatt = device.connectGatt(this, false, mGattCallbacks);
      mBluetoothDeviceAddress = address;
    } else {
      Log.w(TAG, "Attempt to connect in state: " + connectionState);
      return false;
    }
    return true;
  }

  /**
   * Disconnects an existing connection or cancel a pending connection. The disconnection result is reported asynchronously through the
   * {@code BluetoothGattCallback#onConnectionStateChange(android.bluetooth.BluetoothGatt, int, int)} callback.
   */
  public void disconnect(String address) {
    if (mBtAdapter == null) {
      Log.w(TAG, "disconnect: BluetoothAdapter not initialized");
      return;
    }
    final BluetoothDevice device = mBtAdapter.getRemoteDevice(address);
    int connectionState = mBluetoothManager.getConnectionState(device, BluetoothProfile.GATT);

    if (mBluetoothGatt != null) {
      Log.i(TAG, "disconnect");
      if (connectionState != BluetoothProfile.STATE_DISCONNECTED) {
        mBluetoothGatt.disconnect();
      } else {
        Log.w(TAG, "Attempt to disconnect in state: " + connectionState);
      }
    }
  }

  /**
   * After using a given BLE device, the app must call this method to ensure resources are released properly.
   */
  public void close() {
    if (mBluetoothGatt != null) {
      Log.i(TAG, "close");
      mBluetoothGatt.close();
      mBluetoothGatt = null;
    }
  }

  public int numConnectedDevices() {
    int n = 0;

    if (mBluetoothGatt != null) {
      List<BluetoothDevice> devList;
      devList = mBluetoothManager.getConnectedDevices(BluetoothProfile.GATT);
      n = devList.size();
    }
    return n;
  }

  //
  // Utility functions
  //
  public static BluetoothGatt getBtGatt() {
    return mThis.mBluetoothGatt;
  }

  public static BluetoothManager getBtManager() {
    return mThis.mBluetoothManager;
  }

  public static BluetoothLeService getInstance() {
    return mThis;
  }

  public boolean waitIdle(int i) {
    i /= 10;
    while (--i > 0) {
      if (mBusy)
        try {
          Thread.sleep(10);
        } catch (InterruptedException e) {
          e.printStackTrace();
        }
      else
        break;
    }

    return i > 0;
  }

}


text:
import type { Story } from '@storybook/react/types-6-0'
import React from 'react'
import type { DataTableProps } from '../'
import { DataTable } from '../'
import { useSelectManager } from '../utils/useSelectManager'
import { columns as mockColumns } from '../../fixtures/DataTable/columns'
import { data } from '../../fixtures/DataTable/data'
import { items, itemsNoActions } from './items'

interface DemoProps extends Omit<DataTableProps, 'bulk' | 'select'> {
  caption: string
  select: boolean
}

const Template: Story<DemoProps> = ({
  caption,
  select: selectActive,
  ...args
}) => {
  const allPageItems = data.map(({ id }) => id)

  const { onSelect, onSelectAll, selections } = useSelectManager(allPageItems)

  const select = selectActive
    ? {
        onSelect,
        onSelectAll,
        pageItems: allPageItems,
        selectedItems: selections,
      }
    : undefined

  return <DataTable caption="DataTable Responsive" select={select} {...args} />
}

const hideAllColumns = mockColumns.map(c => {
  return { ...c, hide: true }
})
hideAllColumns[0].hide = false
export const ResponsiveMinimal = Template.bind({})
ResponsiveMinimal.args = {
  children: items,
  columns: hideAllColumns,
}
ResponsiveMinimal.parameters = {
  storyshots: { disable: true },
}

export const ResponsiveOverflow = Template.bind({})
ResponsiveOverflow.args = {
  children: items,
  columns: mockColumns,
}

export const ResponsiveOverflowFirstColumnStuck = Template.bind({})
ResponsiveOverflowFirstColumnStuck.args = {
  ...ResponsiveOverflow.args,
  firstColumnStuck: true,
}

export const ResponsiveOverflowSelectFirstColumnNotStuck = Template.bind({})
ResponsiveOverflowSelectFirstColumnNotStuck.args = {
  ...ResponsiveOverflow.args,
  firstColumnStuck: false,
  select: true,
}

export const ResponsiveOverflowSelectNoActions = Template.bind({})
ResponsiveOverflowSelectNoActions.args = {
  ...ResponsiveOverflow.args,
  children: itemsNoActions,
  select: true,
}


text:
ez-zero-clipboard
==============

Demo
----

Live demo of the example in index.html.

***
Generated with ez-module


text:
<?php

namespace Coast\Validator\Rule;

use Coast\Validator\Rule;

class Url extends Rule
{
	protected function _validate($value)
	{
		if (!filter_var($value, FILTER_VALIDATE_URL)) {
		 	$this->error();
		}
	}
}


text:
module RedactGatewayStubs

  def successful_redact_gateway_response
    StubResponse.succeeded <<-XML
      <transaction>
        <token>NXKt1iNkIJhzF5QCDt1qSsuFbcN</token>
        <created_at type="datetime">2013-08-19T17:16:07Z</created_at>
        <updated_at type="datetime">2013-08-19T17:16:07Z</updated_at>
        <succeeded type="boolean">true</succeeded>
        <transaction_type>RedactGateway</transaction_type>
        <message key="messages.transaction_succeeded">Succeeded!</message>
        <gateway>
          <token>8zy49qcEUigjYbpPKCjlhDzUqJ</token>
          <gateway_type>test</gateway_type>
          <name>Spreedly Test</name>
          <characteristics>
            <supports_purchase type="boolean">true</supports_purchase>
            <supports_authorize type="boolean">true</supports_authorize>
            <supports_capture type="boolean">true</supports_capture>
            <supports_credit type="boolean">true</supports_credit>
            <supports_general_credit type="boolean">true</supports_general_credit>
            <supports_void type="boolean">true</supports_void>
            <supports_reference_purchase type="boolean">true</supports_reference_purchase>
            <supports_purchase_via_preauthorization type="boolean">true</supports_purchase_via_preauthorization>
            <supports_offsite_purchase type="boolean">true</supports_offsite_purchase>
            <supports_offsite_authorize type="boolean">true</supports_offsite_authorize>
            <supports_3dsecure_purchase type="boolean">true</supports_3dsecure_purchase>
            <supports_3dsecure_authorize type="boolean">true</supports_3dsecure_authorize>
            <supports_store type="boolean">true</supports_store>
            <supports_remove type="boolean">true</supports_remove>
            <supports_disburse type="boolean">true</supports_disburse>
          </characteristics>
          <state>redacted</state>
          <payment_methods>
            <payment_method>credit_card</payment_method>
            <payment_method>sprel</payment_method>
            <payment_method>third_party_token</payment_method>
            <payment_method>bank_account</payment_method>
          </payment_methods>
          <gateway_specific_fields/>
          <redacted type="boolean">true</redacted>
          <created_at type="datetime">2013-08-19T17:16:06Z</created_at>
          <updated_at type="datetime">2013-08-19T17:16:07Z</updated_at>
        </gateway>
      </transaction>
    XML
  end

end


text:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Reviewed: no -->
<sect2 id="zend.application.available-resources.frontcontroller">
    <title>Zend_Application_Resource_Frontcontroller</title>

    <para>
        Probably the most common resource you will load with
        <classname>Zend_Application</classname> will be the Front Controller resource,
        which provides the ability to configure
        <classname>Zend_Controller_Front</classname>. This resource provides the ability
        to set arbitrary front controller parameters, specify plugins to
        initialize, and much more.
    </para>

    <para>
        Once initialized, the resource assigns the <varname>$frontController</varname>
        property of the bootstrap to the <classname>Zend_Controller_Front</classname>
        instance.
    </para>

    <para>
        Available configuration keys include the following, and are case
        insensitive:
    </para>

    <itemizedlist>
        <listitem>
            <para>
                <emphasis><property>controllerDirectory</property></emphasis>: either a string value
                specifying a single controller directory, or an array of
                module to controller directory pairs.
            </para>
        </listitem>

        <listitem>
            <para>
                <emphasis><property>moduleControllerDirectoryName</property></emphasis>: a string
                value indicating the subdirectory under a module that contains controllers.
            </para>
        </listitem>

        <listitem>
            <para>
                <emphasis><property>moduleDirectory</property></emphasis>: directory under which
                modules may be found.
            </para>
        </listitem>

        <listitem>
            <para>
                <emphasis><property>defaultControllerName</property></emphasis>: base name of the
                default controller (normally "index").
            </para>
        </listitem>

        <listitem>
            <para>
                <emphasis><property>defaultAction</property></emphasis>: base name of the default
                action (normally "index").
            </para>
        </listitem>

        <listitem>
            <para>
                <emphasis><property>defaultModule</property></emphasis>: base name of the default
                module (normally "default").
            </para>
        </listitem>

        <listitem>
            <para>
                <emphasis><property>baseUrl</property></emphasis>: explicit base
                <acronym>URL</acronym> to the application (normally auto-detected).
            </para>
        </listitem>

        <listitem>
            <para>
                <emphasis><property>plugins</property></emphasis>: array of front controller plugin
                class names. The resource will instantiate each class (with no constructor
                arguments) and then register the instance with the front controller. If you want to
                register a plugin with a particular stack index, you need to provide an array with
                two keys <property>class</property> and <property>stackIndex</property>.
            </para>
        </listitem>

        <listitem>
            <para>
                <emphasis><property>params</property></emphasis>: array of key to value pairs to
                register with the front controller.
            </para>
        </listitem>

        <listitem>
            <para>
                <emphasis><property>returnresponse</property></emphasis>: whether or not to return
                the response object after dispatching the front controller. Value should be a
                boolean; by default, this is disabled.
            </para>
        </listitem>
    </itemizedlist>

    <para>
        If an unrecognized key is provided, it is registered as a front
        controller parameter by passing it to <methodname>setParam()</methodname>.
    </para>

    <example id="zend.application.available-resources.frontcontroller.configExample">
        <title>Sample Front Controller resource configuration</title>

        <para>
            Below is a sample <acronym>INI</acronym> snippet showing how to configure the front
            controller resource.
        </para>

        <programlisting language="ini"><![CDATA[
[production]
resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
resources.frontController.moduleControllerDirectoryName = "actions"
resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
resources.frontController.defaultControllerName = "site"
resources.frontController.defaultAction = "home"
resources.frontController.defaultModule = "static"
resources.frontController.baseUrl = "/subdir"
resources.frontController.plugins.foo = "My_Plugin_Foo"
resources.frontController.plugins.bar = "My_Plugin_Bar"
resources.frontController.plugins.baz.class = "My_Plugin_Baz"
resources.frontController.plugins.baz.stackIndex = 123
resources.frontController.returnresponse = 1
resources.frontController.env = APPLICATION_ENV
]]></programlisting>
    </example>

    <example id="zend.application.available-resources.frontcontroller.propertyExample">
        <title>Retrieving the Front Controller in your bootstrap</title>

        <para>
            Once your Front Controller resource has been initialized, you can
            fetch the Front Controller instance via the
            <varname>$frontController</varname> property of your bootstrap.
        </para>

        <programlisting language="php"><![CDATA[
$bootstrap->bootstrap('frontController');
$front = $bootstrap->frontController;
]]></programlisting>
    </example>
</sect2>


text:
package cmd

import (
	"fmt"
	"log"
	"os"
	"text/tabwriter"

	"github.com/spf13/cobra"
)

var taskCmd = &cobra.Command{
	Use:   "task [Task ID]...",
	Short: "Get task details",
	Long: `
Lookup is used to retrieve the details of a GRiD task, including the status.`,
	Run: func(cmd *cobra.Command, args []string) {
		err := initClient()
		if err != nil {
			fmt.Println(err.Error())
			return
		}

		if len(args) == 0 {
			fmt.Println("Please provide a WKT geometry")
			cmd.Usage()
			return
		}

		for _, taskID := range args {
			// get and print the suggested name for the current geometry
			task, _, err := g.TaskDetails(taskID)
			if err != nil {
				log.Fatal(err)
			}
			w := new(tabwriter.Writer)
			w.Init(os.Stdout, 0, 8, 3, '\t', 0)
			fmt.Fprintln(w, "ID\tNAME\tSTATE")
			fmt.Fprintf(w, "%v\t%v\t%v\n", task.TaskID, task.Name, task.State)
			w.Flush()
		}
	},
}


text:
{{/* grpc-docsy file override */ -}}
<link rel="shortcut icon" href="{{ "favicon.ico" | relURL }}">
<link rel="apple-touch-icon" href="/favicons/apple-touch-icon.png">
<link rel="icon" type="image/png" href="/favicons/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="/favicons/android-chrome-512x512.png" sizes="512x512">
<link rel="icon" type="image/png" href="/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="/favicons/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="/favicons/site.webmanifest">


text:
<resources>
    <string name="app_name">ExemploAula</string>
</resources>


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

	<modelVersion>4.0.0</modelVersion>

	<parent>
		<groupId>net.stickycode.parent</groupId>
		<artifactId>sticky-jar</artifactId>
		<version>1.20</version>
	</parent>

	<groupId>net.stickycode.heartbeat</groupId>
	<artifactId>sticky-heartbeat-monitor-api-v1</artifactId>
	<version>1.1-SNAPSHOT</version>
	<packaging>jar</packaging>

	<dependencies>
		<dependency>
			<groupId>org.mockwire</groupId>
			<artifactId>mockwire-guice3</artifactId>
			<version>[1.3,2)</version>
			<scope>test</scope>
		</dependency>
	</dependencies>
</project>


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

  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">

  <title>GunnHacks 2.0 Registration Form</title>


text:
<?php
include_once '../includes/db_connect.php';
include_once '../includes/functions.php';

sec_session_start();
?>
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Admin | Publicação</title>

    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">

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

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

    <link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">

    <link rel="stylesheet" href="../plugins/jvectormap/jquery-jvectormap-1.2.2.css">

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

    <link rel="stylesheet" href="../dist/css/skins/_all-skins.min.css">

       <?php if (login_check($mysqli) == true) : ?>

        <?php include_once '../includes/template/header_template.php';?>

        <?php include_once '../includes/template/menuside_template.php'; ?>

                Publicação

 Home

Publicações

Publicação

Publicação

                    <?php
                        if(isset($_GET['pbnumber'])){
                            $idpb = $_GET['pbnumber'];
                            $sql = "SELECT * FROM publicacoes WHERE id = '$idpb' LIMIT 1 ";
                            $results = $mysqli->query($sql);
                            while($row = $results->fetch_assoc()) {
                                $data = $row["data"];
                                $newdata = date("d/m/Y", strtotime($data));

                                print '
Tribunal
';
                                print '
'.$row["tribunal"].'	';
                                print '
Comarca
';
                                print '
'.$row["comarca"].'
';
                                print '
Vara
';
                                print '
'.$row["vara"].'
';
                                print '
Juiz
';
                                print '
'.$row["juiz"].'
';
                                print '
Escrivão
';
                                print '
'.$row["escrivao"].'
';
                                print '
Vara
';
                                print '
'.$row["vara"].'
';
                                print '
Partes
';
                                print '
'.$row["autor"].' x '.$row["reu"].'
';
                                print '
Numero Processo
';
                                print '
'.$row["processo"].'
';
                                print '
Descrição
';
                                print '
'.$row["descricao"].'
';
                                if($row["novo"] == "1"){
                                    $updt = "UPDATE publicacoes SET novo = '0' WHERE id= '$idpb'";
                                    $mysqli->query($updt);
                                }

                            }
                        }else{
                            echo 'Erro ao tentar conectar no banco de dados';
                        }
                    ?>

      <?php include_once '../includes/template/footer_template.php'; ?>

      <?php include_once '../includes/template/settings_template.php';?>

 <?php else : header("Location: ../login.php"); endif; ?>