text:
package apple.addressbookui;

import apple.NSObject;
import apple.addressbookui.protocol.ABUnknownPersonViewControllerDelegate;
import apple.foundation.NSArray;
import apple.foundation.NSBundle;
import apple.foundation.NSCoder;
import apple.foundation.NSMethodSignature;
import apple.foundation.NSSet;
import apple.uikit.UIViewController;
import org.moe.natj.c.ann.FunctionPtr;
import org.moe.natj.general.NatJ;
import org.moe.natj.general.Pointer;
import org.moe.natj.general.ann.Generated;
import org.moe.natj.general.ann.Library;
import org.moe.natj.general.ann.Mapped;
import org.moe.natj.general.ann.MappedReturn;
import org.moe.natj.general.ann.NInt;
import org.moe.natj.general.ann.NUInt;
import org.moe.natj.general.ann.Owned;
import org.moe.natj.general.ann.Runtime;
import org.moe.natj.general.ptr.ConstVoidPtr;
import org.moe.natj.general.ptr.VoidPtr;
import org.moe.natj.objc.Class;
import org.moe.natj.objc.ObjCRuntime;
import org.moe.natj.objc.SEL;
import org.moe.natj.objc.ann.ObjCClassBinding;
import org.moe.natj.objc.ann.Selector;
import org.moe.natj.objc.map.ObjCObjectMapper;

@Deprecated
@Generated
@Library("AddressBookUI")
@Runtime(ObjCRuntime.class)
@ObjCClassBinding
public class ABUnknownPersonViewController extends UIViewController {
    static {
        NatJ.register();
    }

    @Generated
    protected ABUnknownPersonViewController(Pointer peer) {
        super(peer);
    }

    @Generated
    @Selector("accessInstanceVariablesDirectly")
    public static native boolean accessInstanceVariablesDirectly();

    @Generated
    @Owned
    @Selector("alloc")
    public static native ABUnknownPersonViewController alloc();

    @Owned
    @Generated
    @Selector("allocWithZone:")
    public static native ABUnknownPersonViewController allocWithZone(VoidPtr zone);

    @Generated
    @Selector("attemptRotationToDeviceOrientation")
    public static native void attemptRotationToDeviceOrientation();

    @Generated
    @Selector("automaticallyNotifiesObserversForKey:")
    public static native boolean automaticallyNotifiesObserversForKey(String key);

    @Generated
    @Selector("cancelPreviousPerformRequestsWithTarget:")
    public static native void cancelPreviousPerformRequestsWithTarget(@Mapped(ObjCObjectMapper.class) Object aTarget);

    @Generated
    @Selector("cancelPreviousPerformRequestsWithTarget:selector:object:")
    public static native void cancelPreviousPerformRequestsWithTargetSelectorObject(
            @Mapped(ObjCObjectMapper.class) Object aTarget, SEL aSelector,
            @Mapped(ObjCObjectMapper.class) Object anArgument);

    @Generated
    @Selector("classFallbacksForKeyedArchiver")
    public static native NSArray<String> classFallbacksForKeyedArchiver();

    @Generated
    @Selector("classForKeyedUnarchiver")
    public static native Class classForKeyedUnarchiver();

    @Generated
    @Selector("clearTextInputContextIdentifier:")
    public static native void clearTextInputContextIdentifier(String identifier);

    @Generated
    @Selector("debugDescription")
    public static native String debugDescription_static();

    @Generated
    @Selector("description")
    public static native String description_static();

    @Generated
    @Selector("hash")
    @NUInt
    public static native long hash_static();

    @Generated
    @Selector("instanceMethodForSelector:")
    @FunctionPtr(name = "call_instanceMethodForSelector_ret")
    public static native NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(SEL aSelector);

    @Generated
    @Selector("instanceMethodSignatureForSelector:")
    public static native NSMethodSignature instanceMethodSignatureForSelector(SEL aSelector);

    @Generated
    @Selector("instancesRespondToSelector:")
    public static native boolean instancesRespondToSelector(SEL aSelector);

    @Generated
    @Selector("isSubclassOfClass:")
    public static native boolean isSubclassOfClass(Class aClass);

    @Generated
    @Selector("keyPathsForValuesAffectingValueForKey:")
    public static native NSSet<String> keyPathsForValuesAffectingValueForKey(String key);

    @Generated
    @Owned
    @Selector("new")
    public static native ABUnknownPersonViewController new_objc();

    @Generated
    @Selector("resolveClassMethod:")
    public static native boolean resolveClassMethod(SEL sel);

    @Generated
    @Selector("resolveInstanceMethod:")
    public static native boolean resolveInstanceMethod(SEL sel);

    @Generated
    @Selector("setVersion:")
    public static native void setVersion_static(@NInt long aVersion);

    @Generated
    @Selector("superclass")
    public static native Class superclass_static();

    @Generated
    @Selector("version")
    @NInt
    public static native long version_static();

    /**
     * The Address Book to use. Any contact returned will be from this ABAddressBook instance.
     * If not set, a new ABAddressBook will be created the first time the property is accessed.
     */
    @Generated
    @Selector("addressBook")
    public native ConstVoidPtr addressBook();

    /**
     * Specifies whether buttons appear to let the user perform actions such as sharing the contact,
     * initiating a FaceTime call, or sending a text message.
     */
    @Generated
    @Selector("allowsActions")
    public native boolean allowsActions();

    /**
     * Whether options to create a contact or add to an existing contact should be
     * made available to the user.
     */
    @Generated
    @Selector("allowsAddingToAddressBook")
    public native boolean allowsAddingToAddressBook();

    /**
     * An alternateName can be provided to replace the First and Last name
     * in case they are not available.
     */
    @Generated
    @Selector("alternateName")
    public native String alternateName();

    /**
     * All the fields specified in displayedPerson will be displayed in the view
     * and used if the unknown person is added to Address Book or merged into an
     * existing person in Address Book.
     * If displayedPerson has been added to an ABAddressBook, then the addressBook
     * property will be updated to use the displayedPerson's ABAddressBook.
     */
    @Generated
    @Selector("displayedPerson")
    public native ConstVoidPtr displayedPerson();

    @Generated
    @Selector("init")
    public native ABUnknownPersonViewController init();

    @Generated
    @Selector("initWithCoder:")
    public native ABUnknownPersonViewController initWithCoder(NSCoder coder);

    @Generated
    @Selector("initWithNibName:bundle:")
    public native ABUnknownPersonViewController initWithNibNameBundle(String nibNameOrNil, NSBundle nibBundleOrNil);

    /**
     * The message will be displayed below the alternateName.
     */
    @Generated
    @Selector("message")
    public native String message();

    /**
     * The Address Book to use. Any contact returned will be from this ABAddressBook instance.
     * If not set, a new ABAddressBook will be created the first time the property is accessed.
     */
    @Generated
    @Selector("setAddressBook:")
    public native void setAddressBook(ConstVoidPtr value);

    /**
     * Specifies whether buttons appear to let the user perform actions such as sharing the contact,
     * initiating a FaceTime call, or sending a text message.
     */
    @Generated
    @Selector("setAllowsActions:")
    public native void setAllowsActions(boolean value);

    /**
     * Whether options to create a contact or add to an existing contact should be
     * made available to the user.
     */
    @Generated
    @Selector("setAllowsAddingToAddressBook:")
    public native void setAllowsAddingToAddressBook(boolean value);

    /**
     * An alternateName can be provided to replace the First and Last name
     * in case they are not available.
     */
    @Generated
    @Selector("setAlternateName:")
    public native void setAlternateName(String value);

    /**
     * All the fields specified in displayedPerson will be displayed in the view
     * and used if the unknown person is added to Address Book or merged into an
     * existing person in Address Book.
     * If displayedPerson has been added to an ABAddressBook, then the addressBook
     * property will be updated to use the displayedPerson's ABAddressBook.
     */
    @Generated
    @Selector("setDisplayedPerson:")
    public native void setDisplayedPerson(ConstVoidPtr value);

    /**
     * The message will be displayed below the alternateName.
     */
    @Generated
    @Selector("setMessage:")
    public native void setMessage(String value);

    /**
     * ABPersonViewController does not support subclassing in iOS 7.0 and later. A nil instance will be returned.
     */
    @Generated
    @Selector("setUnknownPersonViewDelegate:")
    public native void setUnknownPersonViewDelegate_unsafe(
            @Mapped(ObjCObjectMapper.class) ABUnknownPersonViewControllerDelegate value);

    /**
     * ABPersonViewController does not support subclassing in iOS 7.0 and later. A nil instance will be returned.
     */
    @Generated
    public void setUnknownPersonViewDelegate(
            @Mapped(ObjCObjectMapper.class) ABUnknownPersonViewControllerDelegate value) {
        Object __old = unknownPersonViewDelegate();
        if (value != null) {
            org.moe.natj.objc.ObjCRuntime.associateObjCObject(this, value);
        }
        setUnknownPersonViewDelegate_unsafe(value);
        if (__old != null) {
            org.moe.natj.objc.ObjCRuntime.dissociateObjCObject(this, __old);
        }
    }

    /**
     * ABPersonViewController does not support subclassing in iOS 7.0 and later. A nil instance will be returned.
     */
    @Generated
    @Selector("unknownPersonViewDelegate")
    @MappedReturn(ObjCObjectMapper.class)
    public native ABUnknownPersonViewControllerDelegate unknownPersonViewDelegate();
}


text:
void sound(uint32_t freq);
void nosound();

#endif

redpajama_set_name: RedPajamaGithub


text:
import tempfile
import sys, os
import codecs
import locale

from smart.util.filetools import setCloseOnExec
from smart.sorter import ChangeSetSorter
from smart.const import INSTALL, REMOVE
from smart.pm import PackageManager
from smart import sysconf, iface, Error, _

try:
    ENCODING = locale.getpreferredencoding()
except locale.Error:
    ENCODING = "ascii"

def get_public_key(header):
    return header.sprintf("%|DSAHEADER?{%{DSAHEADER:pgpsig}}:"
                          "{%|RSAHEADER?{%{RSAHEADER:pgpsig}}:"
                          "{%|SIGGPG?{%{SIGGPG:pgpsig}}:"
                          "{%|SIGPGP?{%{SIGPGP:pgpsig}}:"
                          "{(none)}|}|}|}|").split()[-1]

class RPMPackageManager(PackageManager):

    def commit(self, changeset, pkgpaths):

        prog = iface.getProgress(self, True)
        prog.start()
        prog.setTopic(_("Committing transaction..."))
        prog.set(0, len(changeset))
        prog.show()

        # Compute upgrading/upgraded packages
        upgrading = {}
        upgraded = {}
        for pkg in changeset.keys():
            if changeset.get(pkg) is INSTALL:
                upgpkgs = [upgpkg for prv in pkg.provides
                                  for upg in prv.upgradedby
                                  for upgpkg in upg.packages
                                  if upgpkg.installed]
                upgpkgs.extend([prvpkg for upg in pkg.upgrades
                                       for prv in upg.providedby
                                       for prvpkg in prv.packages
                                       if prvpkg.installed])
                if upgpkgs:
                    for upgpkg in upgpkgs:
                        # If any upgraded package will stay in the system,
                        # this is not really an upgrade for rpm.
                        if changeset.get(upgpkg) is not REMOVE:
                            break
                    else:
                        upgrading[pkg] = True
                        for upgpkg in upgpkgs:
                            upgraded[upgpkg] = True
                            if upgpkg in changeset:
                                del changeset[upgpkg]

        ts = getTS(True)

        flags = ts.setFlags(0)
        if sysconf.get("rpm-allfiles", False):
            flags |= rpm.RPMTRANS_FLAG_ALLFILES
        if sysconf.get("rpm-justdb", False):
            flags |= rpm.RPMTRANS_FLAG_JUSTDB
        if sysconf.get("rpm-noconfigs", False):
            flags |= rpm.RPMTRANS_FLAG_NOCONFIGS
        if (sysconf.get("rpm-nodocs", False) or
            sysconf.get("rpm-excludedocs", False)):
            flags |= rpm.RPMTRANS_FLAG_NODOCS
        if sysconf.get("rpm-nomd5", False):
            flags |= rpm.RPMTRANS_FLAG_NOMD5
        if sysconf.get("rpm-noscripts", False):
            flags |= rpm.RPMTRANS_FLAG_NOSCRIPTS
        if sysconf.get("rpm-notriggers", False):
            flags |= rpm.RPMTRANS_FLAG_NOTRIGGERS
        if sysconf.get("rpm-repackage", False):
            flags |= rpm.RPMTRANS_FLAG_REPACKAGE
        if sysconf.get("rpm-test", False):
            flags |= rpm.RPMTRANS_FLAG_TEST
        ts.setFlags(flags)

        if hasattr(ts, 'setDFlags'):
			dflags = ts.setDFlags(0)
			if sysconf.get("rpm-noupgrade", False):
				dflags |= rpm.RPMDEPS_FLAG_NOUPGRADE
			if sysconf.get("rpm-norequires", False):
				dflags |= rpm.RPMDEPS_FLAG_NOREQUIRES
			if sysconf.get("rpm-noconflicts", False):
				dflags |= rpm.RPMDEPS_FLAG_NOCONFLICTS
			if sysconf.get("rpm-noobsoletes", False):
				dflags |= rpm.RPMDEPS_FLAG_NOOBSOLETES
			if sysconf.get("rpm-noparentdirs", False):
				dflags |= rpm.RPMDEPS_FLAG_NOPARENTDIRS
			if sysconf.get("rpm-nolinktos", False):
				dflags |= rpm.RPMDEPS_FLAG_NOLINKTOS
			if sysconf.get("rpm-nosuggest", False):
				dflags |= rpm.RPMDEPS_FLAG_NOSUGGEST
			ts.setDFlags(dflags)

        # Set rpm verbosity level.
        levelname = sysconf.get('rpm-log-level')
        level = {
            'emerg':   rpm.RPMLOG_EMERG,
            'alert':   rpm.RPMLOG_ALERT,
            'crit':    rpm.RPMLOG_CRIT,
            'err':     rpm.RPMLOG_ERR,
            'warning': rpm.RPMLOG_WARNING,
            'notice':  rpm.RPMLOG_NOTICE,
            'info':    rpm.RPMLOG_INFO,
            'debug':   rpm.RPMLOG_DEBUG
        }.get(levelname)
        if level is not None:
            rpm.setVerbosity(level)

        # Set rpm output log file
        rpmlogfile = sysconf.get('rpm-log-file')
        if rpmlogfile is not None:
            try:
                rpmlog = open(rpmlogfile, 'w')
                rpm.setLogFile(rpmlog)
            except (IOError, OSError), e:
                raise Error, "%s: %s" % (rpmlogfile, unicode(e))

        # Let's help RPM, since it doesn't do a good
        # ordering job on erasures.
        try:
            sorter = ChangeSetSorter(changeset)
            sorted = sorter.getSorted()
            forcerpmorder = False
        except LoopError:
            lines = [_("Found unbreakable loops:")]
            for path in sorter.getLoopPaths(sorter.getLoops()):
                path = ["%s [%s]" % (pkg, op is INSTALL and "I" or "R")
                        for pkg, op in path]
                lines.append("    "+" -> ".join(path))
            lines.append(_("Will ask RPM to order it."))
            iface.error("\n".join(lines))
            sorted = [(pkg, changeset[pkg]) for pkg in changeset]
            forcerpmorder = True
        del sorter

        packages = 0
        reinstall = False
        for pkg, op in sorted:
            if op is INSTALL:
                if pkg.installed:
                    reinstall = True
                loader = [x for x in pkg.loaders if not x.getInstalled()][0]
                info = loader.getInfo(pkg)
                mode = pkg in upgrading and "u" or "i"
                path = pkgpaths[pkg][0]
                fd = os.open(path, os.O_RDONLY)
                try:
                    h = ts.hdrFromFdno(fd)
                    if sysconf.get("rpm-check-signatures", False):
                         if get_public_key(h) == '(none)':
                             raise rpm.error('package is not signed')
                except rpm.error, e:
                    os.close(fd)
                    raise Error, "%s: %s" % (os.path.basename(path), e)
                os.close(fd)
                ts.addInstall(h, (info, path), mode)
                packages += 1
            else:
                loader = [x for x in pkg.loaders if x.getInstalled()][0]
                offset = pkg.loaders[loader]
                try:
                    ts.addErase(offset)
                except rpm.error, e:
                    raise Error, "%s-%s: %s" % \
                                 (pkg.name, pkg.version, unicode(e))

        upgradednames = {}
        for pkg in upgraded:
            upgradednames[pkg.name] = True

        del sorted
        del upgraded
        del upgrading

        force = sysconf.get("rpm-force", False)
        if not force:
            probs = ts.check()
            if probs:
                problines = []
                for prob in probs:
                    name1 = "%s-%s-%s" % prob[0]
                    name2, version = prob[1]
                    if version:
                        sense = prob[2]
                        name2 += " "
                        if sense & rpm.RPMSENSE_LESS:
                            name2 += "<"
                        elif sense & rpm.RPMSENSE_GREATER:
                            name2 += ">"
                        if sense & rpm.RPMSENSE_EQUAL:
                            name2 += "="
                        name2 += " "
                        name2 += version
                    if prob[4] == rpm.RPMDEP_SENSE_REQUIRES:
                        line = _("%s requires %s") % (name1, name2)
                    else:
                        line = _("%s conflicts with %s") % (name1, name2)
                    problines.append(line)
                raise Error, "\n".join(problines)
        if sysconf.get("rpm-order"):
            ts.order()
        probfilter = rpm.RPMPROB_FILTER_OLDPACKAGE
        if force or reinstall:
            probfilter |= rpm.RPMPROB_FILTER_REPLACEPKG
            probfilter |= rpm.RPMPROB_FILTER_REPLACEOLDFILES
            probfilter |= rpm.RPMPROB_FILTER_REPLACENEWFILES
        ts.setProbFilter(probfilter)
        cb = RPMCallback(prog, upgradednames)
        cb.grabOutput(True)
        probs = None
        try:
            probs = ts.run(cb, None)
        finally:
            del getTS.ts
            cb.grabOutput(False)
            prog.setDone()
            if probs:
                raise Error, "\n".join([x[0] for x in probs])
            prog.stop()

class RPMCallback:
    def __init__(self, prog, upgradednames):
        self.prog = prog
        self.upgradednames = upgradednames
        self.data = {"item-number": 0}
        self.fd = None
        self.rpmout = None
        self.rpmoutbuffer = ""
        self.lasttopic = None
        self.topic = None

    def grabOutput(self, flag):
        if flag:
            if not self.rpmout:
                # Grab rpm output, but not the python one.
                self.stdout = sys.stdout
                self.stderr = sys.stderr
                writer = codecs.getwriter(ENCODING)
                reader = codecs.getreader(ENCODING)
                sys.stdout = writer(os.fdopen(os.dup(1), "w"),
                                    errors="replace")
                sys.stderr = writer(os.fdopen(os.dup(2), "w"),
                                    errors="replace")
                fd, rpmoutpath = tempfile.mkstemp("-smart-rpm-out.txt")
                os.dup2(fd, 1)
                os.dup2(fd, 2)
                os.close(fd)
                self.rpmout = reader(open(rpmoutpath))
                os.unlink(rpmoutpath)
        else:
            if self.rpmout:
                self._process_rpmout()
                os.dup2(sys.stdout.fileno(), 1)
                os.dup2(sys.stderr.fileno(), 2)
                sys.stdout = self.stdout
                sys.stderr = self.stderr
                del self.stdout
                del self.stderr
                self.rpmout.close()
                self.rpmout = None
                self.rpmoutbuffer = ""

    def _process_rpmout(self, tobuffer=False):
        if self.rpmout:
            output = self.rpmout.read()
            if output or not tobuffer and self.rpmoutbuffer:
                if tobuffer:
                    self.rpmoutbuffer += output
                else:
                    output = self.rpmoutbuffer+output
                    self.rpmoutbuffer = ""
                    if self.topic and self.topic != self.lasttopic:
                        self.lasttopic = self.topic
                        iface.info(self.topic)
                    iface.info(output)

    def __call__(self, what, amount, total, infopath, data):

        if self.rpmout:
            self._process_rpmout()

        if what == rpm.RPMCALLBACK_INST_OPEN_FILE:
            info, path = infopath
            pkgstr = str(info.getPackage())
            iface.debug(_("Processing %s in %s") % (pkgstr, path))
            self.topic = _("Output from %s:") % pkgstr
            self.fd = os.open(path, os.O_RDONLY)
            setCloseOnExec(self.fd)
            return self.fd

        elif what == rpm.RPMCALLBACK_INST_CLOSE_FILE:
            if self.fd is not None:
                os.close(self.fd)
                self.fd = None

        elif what == rpm.RPMCALLBACK_INST_START:
            info, path = infopath
            pkg = info.getPackage()
            self.data["item-number"] += 1
            self.prog.add(1)
            self.prog.setSubTopic(infopath, _("Installing %s") % pkg.name)
            self.prog.setSub(infopath, 0, 1, subdata=self.data)
            self.prog.show()

        elif (what == rpm.RPMCALLBACK_TRANS_PROGRESS or
              what == rpm.RPMCALLBACK_INST_PROGRESS):
            self.prog.setSub(infopath or "trans", amount, total,
                             subdata=self.data)
            self.prog.show()

        elif what == rpm.RPMCALLBACK_TRANS_START:
            self.prog.setSubTopic("trans", _("Preparing..."))
            self.prog.setSub("trans", 0, 1)
            self.prog.show()

        elif what == rpm.RPMCALLBACK_TRANS_STOP:
            self.prog.setSubDone("trans")
            self.prog.show()

        elif what == rpm.RPMCALLBACK_UNINST_START:
            self.topic = _("Output from %s:") % infopath
            subkey =  "R*"+infopath
            self.data["item-number"] += 1
            self.prog.add(1)
            if infopath in self.upgradednames:
                topic = _("Cleaning %s") % infopath
            else:
                topic = _("Removing %s") % infopath
            self.prog.setSubTopic(subkey, topic)
            self.prog.setSub(subkey, 0, 1, subdata=self.data)
            self.prog.show()

        elif what == rpm.RPMCALLBACK_UNINST_STOP:
            self.topic = None
            subkey = "R*"+infopath
            if not self.prog.getSub(subkey):
                self.data["item-number"] += 1
                self.prog.add(1)
                if infopath in self.upgradednames:
                    topic = _("Cleaning %s") % infopath
                else:
                    topic = _("Removing %s") % infopath
                self.prog.setSubTopic(subkey, topic)
                self.prog.setSub(subkey, 1, 1, subdata=self.data)
            else:
                self.prog.setSubDone(subkey)
            self.prog.show()

from smart.backends.rpm.base import rpm, getTS

# vim:ts=4:sw=4:et


text:
"use strict";

var adapterConfig = require('adapter-config');
var adapterName = adapterConfig.name;
var adapter = require('./levelalt')(adapterConfig);
var PouchDB = global.PouchDB || require('pouchdb');
PouchDB.adapter(adapterName, adapter);
PouchDB.preferredAdapters.push(adapterName);


text:
"""
Dialog for building Tkinter accelerator key bindings
"""
from Tkinter import *
import tkMessageBox
import string, os

class GetKeysDialog(Toplevel):
    def __init__(self,parent,title,action,currentKeySequences):
        """
        action - string, the name of the virtual event these keys will be
                 mapped to
        currentKeys - list, a list of all key sequence lists currently mapped
                 to virtual events, for overlap checking
        """
        Toplevel.__init__(self, parent)
        self.configure(borderwidth=5)
        self.resizable(height=FALSE,width=FALSE)
        self.title(title)
        self.transient(parent)
        self.grab_set()
        self.protocol("WM_DELETE_WINDOW", self.Cancel)
        self.parent = parent
        self.action=action
        self.currentKeySequences=currentKeySequences
        self.result=''
        self.keyString=StringVar(self)
        self.keyString.set('')
        self.SetModifiersForPlatform()
        self.modifier_vars = []
        for modifier in self.modifiers:
            variable = StringVar(self)
            variable.set('')
            self.modifier_vars.append(variable)
        self.CreateWidgets()
        self.LoadFinalKeyList()
        self.withdraw() #hide while setting geometry
        self.update_idletasks()
        self.geometry("+%d+%d" %
            ((parent.winfo_rootx()+((parent.winfo_width()/2)
                -(self.winfo_reqwidth()/2)),
              parent.winfo_rooty()+((parent.winfo_height()/2)
                -(self.winfo_reqheight()/2)) )) ) #centre dialog over parent
        self.deiconify() #geometry set, unhide
        self.wait_window()

    def CreateWidgets(self):
        frameMain = Frame(self,borderwidth=2,relief=SUNKEN)
        frameMain.pack(side=TOP,expand=TRUE,fill=BOTH)
        frameButtons=Frame(self)
        frameButtons.pack(side=BOTTOM,fill=X)
        self.buttonOK = Button(frameButtons,text='OK',
                width=8,command=self.OK)
        self.buttonOK.grid(row=0,column=0,padx=5,pady=5)
        self.buttonCancel = Button(frameButtons,text='Cancel',
                width=8,command=self.Cancel)
        self.buttonCancel.grid(row=0,column=1,padx=5,pady=5)
        self.frameKeySeqBasic = Frame(frameMain)
        self.frameKeySeqAdvanced = Frame(frameMain)
        self.frameControlsBasic = Frame(frameMain)
        self.frameHelpAdvanced = Frame(frameMain)
        self.frameKeySeqAdvanced.grid(row=0,column=0,sticky=NSEW,padx=5,pady=5)
        self.frameKeySeqBasic.grid(row=0,column=0,sticky=NSEW,padx=5,pady=5)
        self.frameKeySeqBasic.lift()
        self.frameHelpAdvanced.grid(row=1,column=0,sticky=NSEW,padx=5)
        self.frameControlsBasic.grid(row=1,column=0,sticky=NSEW,padx=5)
        self.frameControlsBasic.lift()
        self.buttonLevel = Button(frameMain,command=self.ToggleLevel,
                text='Advanced Key Binding Entry >>')
        self.buttonLevel.grid(row=2,column=0,stick=EW,padx=5,pady=5)
        labelTitleBasic = Label(self.frameKeySeqBasic,
                text="New keys for  '"+self.action+"' :")
        labelTitleBasic.pack(anchor=W)
        labelKeysBasic = Label(self.frameKeySeqBasic,justify=LEFT,
                textvariable=self.keyString,relief=GROOVE,borderwidth=2)
        labelKeysBasic.pack(ipadx=5,ipady=5,fill=X)
        self.modifier_checkbuttons = {}
        column = 0
        for modifier, variable in zip(self.modifiers, self.modifier_vars):
            label = self.modifier_label.get(modifier, modifier)
            check=Checkbutton(self.frameControlsBasic,
                command=self.BuildKeyString,
                text=label,variable=variable,onvalue=modifier,offvalue='')
            check.grid(row=0,column=column,padx=2,sticky=W)
            self.modifier_checkbuttons[modifier] = check
            column += 1
        labelFnAdvice=Label(self.frameControlsBasic,justify=LEFT,
                            text=\
                            "Select the desired modifier keys\n"+
                            "above, and the final key from the\n"+
                            "list on the right.\n\n" +
                            "Use upper case Symbols when using\n" +
                            "the Shift modifier.  (Letters will be\n" +
                            "converted automatically.)")
        labelFnAdvice.grid(row=1,column=0,columnspan=4,padx=2,sticky=W)
        self.listKeysFinal=Listbox(self.frameControlsBasic,width=15,height=10,
                selectmode=SINGLE)
        self.listKeysFinal.bind('<ButtonRelease-1>',self.FinalKeySelected)
        self.listKeysFinal.grid(row=0,column=4,rowspan=4,sticky=NS)
        scrollKeysFinal=Scrollbar(self.frameControlsBasic,orient=VERTICAL,
                command=self.listKeysFinal.yview)
        self.listKeysFinal.config(yscrollcommand=scrollKeysFinal.set)
        scrollKeysFinal.grid(row=0,column=5,rowspan=4,sticky=NS)
        self.buttonClear=Button(self.frameControlsBasic,
                text='Clear Keys',command=self.ClearKeySeq)
        self.buttonClear.grid(row=2,column=0,columnspan=4)
        labelTitleAdvanced = Label(self.frameKeySeqAdvanced,justify=LEFT,
                text="Enter new binding(s) for  '"+self.action+"' :\n"+
                "(These bindings will not be checked for validity!)")
        labelTitleAdvanced.pack(anchor=W)
        self.entryKeysAdvanced=Entry(self.frameKeySeqAdvanced,
                textvariable=self.keyString)
        self.entryKeysAdvanced.pack(fill=X)
        labelHelpAdvanced=Label(self.frameHelpAdvanced,justify=LEFT,
            text="Key bindings are specified using Tkinter keysyms as\n"+
                 "in these samples: <Control-f>, <Shift-F2>, <F12>,\n"
                 "<Control-space>, <Meta-less>, <Control-Alt-Shift-X>.\n"
                 "Upper case is used when the Shift modifier is present!\n\n" +
                 "'Emacs style' multi-keystroke bindings are specified as\n" +
                 "follows: <Control-x><Control-y>, where the first key\n" +
                 "is the 'do-nothing' keybinding.\n\n" +
                 "Multiple separate bindings for one action should be\n"+
                 "separated by a space, eg., <Alt-v> <Meta-v>." )
        labelHelpAdvanced.grid(row=0,column=0,sticky=NSEW)

    def SetModifiersForPlatform(self):
        """Determine list of names of key modifiers for this platform.

        The names are used to build Tk bindings -- it doesn't matter if the
        keyboard has these keys, it matters if Tk understands them. The
        order is also important: key binding equality depends on it, so
        config-keys.def must use the same ordering.
        """
        import sys
        if sys.platform == 'darwin' and sys.executable.count('.app'):
            self.modifiers = ['Shift', 'Control', 'Option', 'Command']
        else:
            self.modifiers = ['Control', 'Alt', 'Shift']
        self.modifier_label = {'Control': 'Ctrl'}

    def ToggleLevel(self):
        if  self.buttonLevel.cget('text')[:8]=='Advanced':
            self.ClearKeySeq()
            self.buttonLevel.config(text='<< Basic Key Binding Entry')
            self.frameKeySeqAdvanced.lift()
            self.frameHelpAdvanced.lift()
            self.entryKeysAdvanced.focus_set()
        else:
            self.ClearKeySeq()
            self.buttonLevel.config(text='Advanced Key Binding Entry >>')
            self.frameKeySeqBasic.lift()
            self.frameControlsBasic.lift()

    def FinalKeySelected(self,event):
        self.BuildKeyString()

    def BuildKeyString(self):
        keyList = modifiers = self.GetModifiers()
        finalKey = self.listKeysFinal.get(ANCHOR)
        if finalKey:
            finalKey = self.TranslateKey(finalKey, modifiers)
            keyList.append(finalKey)
        self.keyString.set('<' + string.join(keyList,'-') + '>')

    def GetModifiers(self):
        modList = [variable.get() for variable in self.modifier_vars]
        return filter(None, modList)

    def ClearKeySeq(self):
        self.listKeysFinal.select_clear(0,END)
        self.listKeysFinal.yview(MOVETO, '0.0')
        for variable in self.modifier_vars:
            variable.set('')
        self.keyString.set('')

    def LoadFinalKeyList(self):
        #these tuples are also available for use in validity checks
        self.functionKeys=('F1','F2','F2','F4','F5','F6','F7','F8','F9',
                'F10','F11','F12')
        self.alphanumKeys=tuple(string.ascii_lowercase+string.digits)
        self.punctuationKeys=tuple('~!@#%^&*()_-+={}[]|;:,.<>/?')
        self.whitespaceKeys=('Tab','Space','Return')
        self.editKeys=('BackSpace','Delete','Insert')
        self.moveKeys=('Home','End','Page Up','Page Down','Left Arrow',
                'Right Arrow','Up Arrow','Down Arrow')
        #make a tuple of most of the useful common 'final' keys
        keys=(self.alphanumKeys+self.punctuationKeys+self.functionKeys+
                self.whitespaceKeys+self.editKeys+self.moveKeys)
        self.listKeysFinal.insert(END, *keys)

    def TranslateKey(self, key, modifiers):
        "Translate from keycap symbol to the Tkinter keysym"
        translateDict = {'Space':'space',
                '~':'asciitilde','!':'exclam','@':'at','#':'numbersign',
                '%':'percent','^':'asciicircum','&':'ampersand','*':'asterisk',
                '(':'parenleft',')':'parenright','_':'underscore','-':'minus',
                '+':'plus','=':'equal','{':'braceleft','}':'braceright',
                '[':'bracketleft',']':'bracketright','|':'bar',';':'semicolon',
                ':':'colon',',':'comma','.':'period','<':'less','>':'greater',
                '/':'slash','?':'question','Page Up':'Prior','Page Down':'Next',
                'Left Arrow':'Left','Right Arrow':'Right','Up Arrow':'Up',
                'Down Arrow': 'Down', 'Tab':'tab'}
        if key in translateDict.keys():
            key = translateDict[key]
        if 'Shift' in modifiers and key in string.ascii_lowercase:
            key = key.upper()
        key = 'Key-' + key
        return key

    def OK(self, event=None):
        if self.KeysOK():
            self.result=self.keyString.get()
            self.destroy()

    def Cancel(self, event=None):
        self.result=''
        self.destroy()

    def KeysOK(self):
        "Validity check on user's keybinding selection"
        keys = self.keyString.get()
        keys.strip()
        finalKey = self.listKeysFinal.get(ANCHOR)
        modifiers = self.GetModifiers()
        # create a key sequence list for overlap check:
        keySequence = keys.split()
        keysOK = False
        title = 'Key Sequence Error'
        if not keys:
            tkMessageBox.showerror(title=title, parent=self,
                                   message='No keys specified.')
        elif not keys.endswith('>'):
            tkMessageBox.showerror(title=title, parent=self,
                                   message='Missing the final Key')
        elif not modifiers and finalKey not in self.functionKeys:
            tkMessageBox.showerror(title=title, parent=self,
                                   message='No modifier key(s) specified.')
        elif (modifiers == ['Shift']) \
                 and (finalKey not in
                      self.functionKeys + ('Tab', 'Space')):
            msg = 'The shift modifier by itself may not be used with' \
                  ' this key symbol; only with F1-F12, Tab, or Space'
            tkMessageBox.showerror(title=title, parent=self,
                                   message=msg)
        elif keySequence in self.currentKeySequences:
            msg = 'This key combination is already in use.'
            tkMessageBox.showerror(title=title, parent=self,
                                   message=msg)
        else:
            keysOK = True
        return keysOK

if __name__ == '__main__':
    #test the dialog
    root=Tk()
    def run():
        keySeq=''
        dlg=GetKeysDialog(root,'Get Keys','find-again',[])
        print dlg.result
    Button(root,text='Dialog',command=run).pack()
    root.mainloop()


text:
var Checker = require('../../../lib/checker');
var expect = require('chai').expect;

describe('rules/require-spaces-inside-imported-object-braces', function() {
    var checker;
    beforeEach(function() {
        checker = new Checker();
        checker.registerDefaultRules();
    });

    describe('when { requireSpacesInsideImportedObjectBraces: true }', function() {
        beforeEach(function() {
            checker.configure({ requireSpacesInsideImportedObjectBraces: true });
        });

        it('should not report for import without braces', function() {
            expect(checker.checkString('import fooBar from "foo-bar";')).to.have.no.errors();
            expect(checker.checkString('import * as fooBar from "foo-bar";')).to.have.no.errors();
            expect(checker.checkString('import {} from "foo-bar";')).to.have.no.errors();
        });

        it('should report for import without spaces', function() {
            expect(
                checker.checkString('import {foo} from "foo-bar";')
            ).to.have.error.count.equal(2);

            expect(
                checker.checkString('import {foo, bar} from "foo-bar";')
            ).to.have.error.count.equal(2);

            expect(
                checker.checkString('import fooBar, {foo, bar} from "foo-bar";')
            ).to.have.error.count.equal(2);

            expect(
                checker.checkString('import {foo as bar, bar as foo} from "foo-bar";')
            ).to.have.error.count.equal(2);
        });
    });
});


text:
const { getJestProjects } = require("@nrwl/jest");

export default {
    projects: getJestProjects(),
};


text:
/* global Promise, fetch, caches, Response, clients */
import toolbox from 'sw-toolbox';
import Dmp from 'diff-match-patch';
import debugLib from './debug';

const debug = debugLib('customHelpers');

/**
 * Fetch and Cache using different versions of the same request.
 * Only caches GET requests, other methods just return response promise.
 *
 * This is a common service worker pattern that works around lack of ignoreSearch
 * implementation, but could also be useful for ignoring arbitrary components of
 * the request url in the cache, network cookie preservation, changing VARY, etc.
 * @see https://code.google.com/p/chromium/issues/detail?id=426309
 *
 * @param {Request} reqNet - A Request used to fetch from the network.
 * @param {Request|String} [reqCache] - A RequestOrUrl used to update the cache.
 * Required only for GET requests.
 * @param {Object} [options] - Options to modify behavior.
 * @param {RegExp} [options.successResponses] - Defines a successful response test.
 * @param {Function} [options.successHandler] - Receives netRequest, Response,
 * cacheRequest; Returns Promise that resolves to Response.
 * Supply to optionally post process a successful network response.
 * @param {Function} [options.cacheHandler] - Receives cache, Request,
 * PreviousResponse, NewResponse; Returns Promise to Response.
 * Supply to optionally post process after cache update.
 * @return {Response} A Response Promise.
 * @throws {Response} A Response Promise if response is not successful.
 */
export function fetchAndCache (reqNet, reqCache, options = {}) {
  const successResponses = options.successResponses ||
    toolbox.options.successResponses;

  return fetch(reqNet).then((response) => {
    if (successResponses.test(response.status)) {
      const promResponse =
        typeof options.successHandler === 'function' ?
          options.successHandler(reqNet, response, reqCache)
          : Promise.resolve(response);

      return promResponse.then((newResponse) => {
        // Only update cache for GET requests
        if (reqNet.method === 'GET') {
          return caches.open(toolbox.options.cache.name).then((cache) => {
            debug(
              'caching successful network request:', reqCache
            );

            return cache.match(reqCache).then((previousResponse) => {
              return cache.put(reqCache, newResponse.clone()).then(() => {
                const promCache =
                  typeof options.cacheHandler === 'function' ?
                    options.cacheHandler(
                      cache, reqCache, previousResponse, newResponse
                    )
                    : Promise.resolve(newResponse);

                return promCache.then((res) => {
                  debug('cached response', res);
                  return res;
                });
              });
            });
          });
        }

        return newResponse;
      });
    }

    // Raise an error and trigger the catch
    throw response;
  });
}

/**
 * Get content fastest way possible.
 * Start network and get from cache, whichever finishes first wins.
 * Network response eventually updates the cache.
 * If the network response is different than a previously cached response,
 * AND the original request was satisfied from cache, calls updateHandler.
 *
 * @param {Request} reqNet - A Request used to fetch from the network.
 * @param {Request|String} reqCache - A RequestOrUrl used to update the cache.
 * @param {Function} [updateHandler] - Receives request, response, called if stale content was updated.
 * @param {Object} [options] - Passed through to fetchAndCache, cacheHandler is overwritten.
 */
export function contentRace (reqNet, reqCache, updateHandler, options = {}) {
  updateHandler = updateHandler || defaultContentUpdate;

  return new Promise((resolve, reject) => {
    let maybeStale = false, rejected = false;
    const errors = [];

    /**
     * Resolve this promise if the result is a Response.
     * Otherwise, start a rejection.
     */
    const conditionalResolve = (result) => {
      if (result instanceof Response) {
        resolve(result);
      } else {
        conditionalReject(result);
      }
    };

    /**
     * Reject this promise after two rejections.
     */
    const conditionalReject = (error) => {
      errors.push(error);
      if (rejected) {
        debug('Both cache and network failed');
        reject(new Error(`Cache and network failed "${errors.join('", "')}"`));
      } else {
        rejected = true;
      }
    };

    // Overwrite/assign the defaultCacheHandler to call updateHandler when
    // the new response is different than previous.
    options.cacheHandler =
      /**
       * A cacheHandler that calls the given updateHandler when the new response
       * is different than previous.
       *
       * @param {Cache} cache - A reference to the service worker cache.
       * @param {Request} req - The request used to cache the newResponse.
       * @param {Response} prevResponse - The previously cached response.
       * Already evicted, undefined if no previous entry.
       * @param {Response} res - The new currently cached response.
       */
      function cacheHandler (cache, req, prevResponse, res) {
        if (prevResponse) {
          const newResponse = res.clone();

          debug(
            'cacheHandler comparing responses',
            prevResponse,
            newResponse
          );

          // Get the UVString representation of the responses
          return Promise.all([
            prevResponse.text(),
            newResponse.text()
          ]).then((contents) => {
            // If the contents are 1% different and a stale response was served...
            if (nDiff(contents[0], contents[1], 1.0) && maybeStale) {
              debug(
                'cacheHandler found objects different AND stale prior response'
              );

              // Notify that there is a content update
              updateHandler(req, res);
            }
            return res;
          });
        }

        return Promise.resolve(res);
      };

    // Start network
    fetchAndCache(reqNet, reqCache, options)
      .then(conditionalResolve)
      .catch(conditionalReject);

    // Start cache
    caches.open(toolbox.options.cache.name)
      .then((cache) => {
        cache.match(reqCache)
          .then((response) => {
            maybeStale = !!response;
            conditionalResolve(response);
          })
          .catch(conditionalReject);
      })
      .catch(conditionalReject);
  });
}

/**
 * Determine if the percentage of change from old to new exceeds a threshold.
 *
 * Compute the edit distance of transforming the old to the new string.
 *   NOTE: levenshtein edit distance, line method used.
 * Convert the levenshtein edit distance to a percentage of change.
 * Compare against threshold of allowed change.
 *
 * @private
 *
 * @param {String} oldstr - The first string to compare.
 * @param {String} newstr - The second string to compare.
 * @param {Number} threshold - The percentage threshold above which defines a
 * difference, and then the diff is true.
 * @returns true if changes exceed the threshold %, false otherwise.
 */
function nDiff (oldstr, newstr, threshold) {
  const dmp = new Dmp();
  const levenshteinMax = Math.max(oldstr.length, newstr.length);
  const diffs = dmp.diff_main(oldstr, newstr);
  const levenshtein = dmp.diff_levenshtein(diffs);

  return ((levenshtein / levenshteinMax) * 100.0) > threshold;
}

/**
 * Called to notify the client application that new content is available.
 * This is the default contentUpdate handler for contentRace.
 *
 * @private
 *
 * @param {Request} request - The request associated with the content update.
 * @returns {Promise} A promise that resolves when the update handled (no value).
 */
function defaultContentUpdate (request) {
  const requestUrl = typeof request === 'string' ? request : request.url;

  return clients.matchAll({
    type: 'window'
  }).then((clientWindows) => {
    clientWindows.forEach((clientWindow) => {
      if (clientWindow.url.indexOf(requestUrl) !== -1) {
        clientWindow.postMessage({
          command: 'notify',
          show: true,
          time: 3000,
          message: 'New content is available. Please refresh.'
        });
      }
    });
  });
}


text:
package com.kwizzad.property;

public interface IProperty<T> extends IReadableProperty<T> {

    /**
     * Set a new value
     *
     * @param value new value
     */
    void set(T value);

}


text:
"use strict";

//  https://github.com/strongloop/express/blob/master/lib/application.js#L157-L174
module.exports = {
    name: 'socket-io',
    after: 'router',
    initialize(application, container) {
        return container.lookup('service:websockets')
            .then((ws) => {
                application.ws = ws;
                ws.httpServer = application.server.http;
                ws.start();
                return ws.loadMiddleware();
            });
    }
};


text:
from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.views import defaults as default_views

from wagtail.wagtailadmin import urls as wagtailadmin_urls
from wagtail.wagtaildocs import urls as wagtaildocs_urls
from wagtail.wagtailcore import urls as wagtail_urls

urlpatterns = [
    # Django Admin, use {% url 'admin:index' %}
    url(settings.ADMIN_URL, include(admin.site.urls)),
    # Your stuff: custom urls includes go here
    url(r'^cms/', include(wagtailadmin_urls)),
    url(r'^documents/', include(wagtaildocs_urls)),
    url(r'', include(wagtail_urls)),

] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

if settings.DEBUG:
    # This allows the error pages to be debugged during development, just visit
    # these url in browser to see how these error pages look like.
    # urlpatterns += [
    #     url(r'^400/$', default_views.bad_request, kwargs={'exception': Exception('Bad Request!')}),
    #     url(r'^403/$', default_views.permission_denied, kwargs={'exception': Exception('Permission Denied')}),
    #     url(r'^404/$', default_views.page_not_found, kwargs={'exception': Exception('Page not Found')}),
    #     url(r'^500/$', default_views.server_error),
    # ]
    if 'debug_toolbar' in settings.INSTALLED_APPS:
        import debug_toolbar
        urlpatterns = [
            url(r'^__debug__/', include(debug_toolbar.urls)),
        ] + urlpatterns


text:
var fs = require('fs'),
    express = require('express'),
    createTorrent = require('create-torrent');

var app = express();
app.use('/', express.static('./build'));

createTorrent('./media/POV - R-Type III.mp3', {
    private: true,
    announce: []
}, (err, torrent) => {
    if (err) throw err;

    console.log('GOT TORRENT');
    // console.log(torrent.toString());
    fs.writeFileSync('./build/audio.torrent', torrent.toString('hex'));
});

app.listen(3000, () => {
    console.log('LISTENING');
});


text:
from django.test import TestCase
from django.conf import settings

from mock import patch, Mock
from model_mommy import mommy

from deck.permissions import has_manage_schedule_permission
from deck.models import Event

class PermissionsTestCase(TestCase):

    def setUp(self):
        self.user = mommy.make(settings.AUTH_USER_MODEL)
        self.event = mommy.make(Event)

    def test_super_user_is_always_allowed(self):
        self.user.is_superuser = True

        has_permission = has_manage_schedule_permission(self.user, self.event)

        self.assertTrue(has_permission)

    @patch.object(Event, 'user_in_jury', Mock(return_value=True))
    def test_regular_user_must_be_in_jury_to_permission(self):
        has_permission = has_manage_schedule_permission(self.user, self.event)

        self.assertTrue(has_permission)
        self.event.user_in_jury.assert_called_once_with(self.user)


text:
package org.apache.kafka.common.serialization;

import java.io.Closeable;
import java.util.Map;

/**
 *
 * @param <T> Type to be deserialized into.
 *
 * A class that implements this interface is expected to have a constructor with no parameter.
 * <p>
 * Implement {@link org.apache.kafka.common.ClusterResourceListener} to receive cluster metadata once it's available. Please see the class documentation for ClusterResourceListener for more information.
 */
public interface Deserializer<T> extends Closeable {

    /**
     * Configure this class.
     * @param configs configs in key/value pairs
     * @param isKey whether is for key or value
     */
    public void configure(Map<String, ?> configs, boolean isKey);

    /**
     * Deserialize a record value from a bytearray into a value or object.
     * @param topic topic associated with the data
     * @param data serialized bytes; may be null; implementations are recommended to handle null by returning a value or null rather than throwing an exception.
     * @return deserialized typed data; may be null
     */
    public T deserialize(String topic, byte[] data);

    @Override
    public void close();
}


text:
<!DOCTYPE html>

<meta name="generator" content="Hexo 3.8.0">

    <meta charset="utf-8">

    <meta name="google-site-verification" content="google0706f42c5c9ccd5b.html">

    <title>Categories: NodeJS | 逗哥的代码作坊 | 互联网是一门实践性科学</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

    <meta name="theme-color" content="#3F51B5">

    <meta name="keywords" content="">
    <meta property="og:type" content="website">
<meta property="og:title" content="逗哥的代码作坊">
<meta property="og:url" content="http://blog.beanmr.com/categories/NodeJS/index.html">
<meta property="og:site_name" content="逗哥的代码作坊">
<meta property="og:locale" content="zh-CN">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="逗哥的代码作坊">

        <link rel="alternate" type="application/atom+xml" title="逗哥的代码作坊" href="/atom.xml">

    <link rel="shortcut icon" href="/favicon.ico">
    <link rel="stylesheet" href="//unpkg.com/hexo-theme-material-indigo@latest/css/style.css">

        <hgroup class="introduce">

FengDD

          YmVhbm1yeEBnbWFpbC5jb20=
        </hgroup>

                主页

                Archives

                Tags

                Categories

                Github

                Weibo

Categories: NodeJS

            <input type="text" id="key" class="search-input" autocomplete="off" placeholder="输入感兴趣的关键字">

Categories: NodeJS

        全部

            Tools

            NodeJS

            WordPress

            JVM

            Algorithm

            Fundamental

            Jekyll

            MySQL

      <time class="post-time" title="2014-08-01 00:00:00" datetime="2014-07-31T16:00:00.000Z" itemprop="datePublished">2014-08-01</time>

NodeJS

      NodeJS事件驱动-时间轴并发

NodeJS

事件驱动

并发

        站点总访客数:

        站点总访问量:

            博客内容遵循 知识共享 署名 - 非商业性 - 相同方式共享 4.0 国际协议

FengDD © 2014 - 2019

                Power by Hexo Theme indigo

扫一扫,分享到微信

    <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAK4AAACuCAAAAACKZ2kyAAABv0lEQVR42u3aS3KDQAwFQN//0mSbhQNPI0bYqZ6Vy6agzUKl3+sVn+PXOf/1/MrkbjccXFzcNvc4PQlojZjc/809cXFxB7l/PeD8muqfOeeeG3Bxcb+Ruxa2cHFx/we3E7CqrwMXF/dZbpKmJP2K/JvttRouLm6Dm3cp933e0t/FxcVd4h7F02+Gtp6Oi4s7wq2mL9U2R/UPRONYXFzczdzOMDVvZFRTmYsQhouLu5mbNzjuao50Eh1cXNx5bjIo7a9fJK8juh4XF3cbd23tsl8O5QHrTfGDi4s7wk3Cytq4pdpyvUiJcHFxR7jJqKMzjs1DWN54xcXFneHmrZAkram2VpOiCxcXd5K7Ng5JypW1BOgikOHi4o5w8xZGtVxJxidrCRMuLu4kt9qeqLY8kqlONM7BxcV9lJu3KqpFTnXxCxcX99O4+XClOnatroXh4uLOcI/iuav4qSZJuLi4k9zq6HQtMOVN2P4KCC4u7l3cfKSRp0H50KX8Ky4u7iC3OixZS3RurtVwcXE/hrtvuBLdARcX9yO5VVZ/5eKGFAcXF3eJW16djAuezuIFLi7uU9y14NIJT2uLGri4uCPcHxs47AuJzXHRAAAAAElFTkSuQmCC" alt="微信分享二维码">

<template id="search-tpl">

{title}

                {tags}

            <time class="flex-col time">{date}</time>

</template>


text:
var mdConverter = function(mdContent){
  return markdown.toHTML(mdContent);
};


text:
/**
 * This file is part of the CernVM File System.
 */

#ifndef CVMFS_VOMS_AUTHZ_VOMS_CRED_H_
#define CVMFS_VOMS_AUTHZ_VOMS_CRED_H_

#include <sys/types.h>
#include <unistd.h>

#include <cstdio>

// TODO(jblomer): unit test this class

/**
 * This implements the credential fetcher server. Communicating over a dedicated
 * file descriptor (3), this will pull credentials from a given external
 * process.
 *
 * The server sends back a file descriptor to a grid certificate.  The server
 * needs root privileges because it looks into other processes environments.
 */
class CredentialsFetcher {
 public:
  static const int kTransportFd = 3;

  /**
   * Protocol steering between client and server.
   */
  enum FetcherCommands {
    kCmdExecErr = 1,
    kCmdCredReq,
    kCmdChildExit,
    kCmdCredHandle
  };

  static int MainCredentialsFetcher(int argc, char *argv[]);
  static bool GetProxyFileFromEnv(const pid_t pid, const size_t path_len,
                                  char *path);
  static FILE *GetProxyFileInternal(pid_t pid, uid_t uid, gid_t gid);
};

#endif  // CVMFS_VOMS_AUTHZ_VOMS_CRED_H_


text:
.. Numba documentation master file, created by
   sphinx-quickstart on Tue Dec 30 11:55:40 2014.
   You can adapt this file completely to your liking, but it should at least
   contain the root `toctree` directive.

Numba documentation
===================

This is the Numba documentation.  Unless you are already acquainted
with Numba, we suggest you start with the :doc:`User manual <user/index>`.

.. toctree::
   :numbered:
   :maxdepth: 2

   user/index.rst
   reference/index.rst
   cuda/index.rst
   cuda-reference/index.rst
   roc/index.rst
   extending/index.rst
   developer/index.rst
   proposals/index.rst
   glossary.rst
   release-notes.rst


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

<TITLE>
Uses of Package org.apache.fop.render.rtf.rtflib.rtfdoc (Apache FOP 1.0 API)
</TITLE>

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

      Overview
      Package
      Class
    Use
      Tree
      Deprecated
      Index
      Help

fop 1.0

 PREV
 NEXT

  FRAMES
 NO FRAMES

  All Classes

Uses of Package
org.apache.fop.render.rtf.rtflib.rtfdoc

Packages that use org.apache.fop.render.rtf.rtflib.rtfdoc

org.apache.fop.render.rtf
RTF (Rich Text Format) Output Support

org.apache.fop.render.rtf.rtflib.rtfdoc
Independent subsystem (not specific to FOP) classes that are used to build
RTF documents.

org.apache.fop.render.rtf.rtflib.tools
Utility classes used in RTF file generation.

Classes in org.apache.fop.render.rtf.rtflib.rtfdoc used by org.apache.fop.render.rtf

RtfAttributes

          Attributes for RtfText

Classes in org.apache.fop.render.rtf.rtflib.rtfdoc used by org.apache.fop.render.rtf.rtflib.rtfdoc

IRtfAfterContainer

          interface for RTF objects that can contain footers

IRtfBeforeContainer

          Interface for classes containing headers.

IRtfBookmarkContainer

          RTF Bookmark container interface.

IRtfExternalGraphicContainer

          Interface for classes containing images.

IRtfHyperLinkContainer

          interface for RtfElements that can contain RtfHyperLinks

IRtfJforCmdContainer

          Interface for objects containing Commands

IRtfListContainer

          Interface for RtfElements that can contain RtfLists

IRtfPageBreakContainer

          Interface for RtfElements that can contain RtfPageBreaks

IRtfPageNumberCitationContainer

          Interface for classes containing page number citations

IRtfPageNumberContainer

          Interface for objects containing page numbers

IRtfParagraphContainer

          Interface for RtfElements that can contain RtfParagraphs

IRtfParagraphKeepTogetherContainer

          Interface for classes containing Paragraphs with Keep Together

IRtfTableContainer

          Interface for RtfElements that can contain RtfTables

IRtfTextContainer

          Interface for RtfElements that can contain RtfText elements

IRtfTextrunContainer

          Interface which enables an implementing class to contain linear text runs.

ITableAttributes

          Constants for RTF table attribute names

ITableColumnsInfo

          Used to get information about tables, for example when handling nested tables

ParagraphKeeptogetherContext

          This context is used to manage the "keepn" RTF attribute
  Used by ParagraphBuilder and JforCmd

RtfAfter

          RtfContainer that encloses footers

RtfAttributes

          Attributes for RtfText

RtfBefore

          The opposite of RtfAfter

RtfBookmark

          RTF Bookmark.

RtfBookmarkContainerImpl

          RTF Bookmark container implementation.

RtfColorTable

          Singelton of the RTF color table.

RtfContainer

          An RtfElement that can contain other elements.

RtfDocumentArea

          The RTF document area, container for RtfSection objects.

RtfElement

          Base class for all elements of an RTF file.

RtfExternalGraphic

          Creates an RTF image from an external graphic file.

RtfFontManager

          RTF font table

RtfFootnote

          Model of an RTF footnote

RtfHyperLink

          Creates an hyperlink.

RtfJforCmd

          Process "jfor-cmd"

RtfList

          Model of an RTF list, which can contain RTF list items

RtfListItem

          Model of an RTF list item, which can contain RTF paragraphs

RtfListStyle

          Class to handle list styles.

RtfListTable

          RtfListTable: used to make the list table in the header section of the RtfFile.

RtfOptions

          Simplistic options definitions for RTF generation

RtfPage

          Specifies rtf control words.

RtfPageArea

RtfPageNumber

RtfPageNumberCitation

RtfParagraph

          Model of an RTF paragraph, which can contain RTF text elements.

RtfParagraphKeepTogether

          Models the keep together attributes of paragraphs

RtfSection

          Models a section in an RTF document

RtfSpaceSplitter

          This class splits block attributes into space-before attribute, space-after
 attribute and common attributes.

RtfStringConverter

          Converts java Strings according to RTF conventions

RtfStyleSheetTable

          Singelton of the RTF style sheet table.

RtfTable

          Container for RtfRow elements

RtfTableCell

          A cell in an RTF table, container for paragraphs, lists, etc.

RtfTableRow

          Container for RtfTableCell elements

RtfTemplate

          Singelton of the RTF style template
 This class belongs to the <jfor:style-template> tag processing.

RtfText

          Model of a text run (a piece of text with attributes) in an RTF document

RtfTextrun

          Class which contains a linear text run.

Classes in org.apache.fop.render.rtf.rtflib.rtfdoc used by org.apache.fop.render.rtf.rtflib.tools

IRtfOptions

          Options for configuring the rtf elements.

ITableColumnsInfo

          Used to get information about tables, for example when handling nested tables

RtfAttributes

          Attributes for RtfText

RtfContainer

          An RtfElement that can contain other elements.

      Overview
      Package
      Class
    Use
      Tree
      Deprecated
      Index
      Help

fop 1.0

 PREV
 NEXT

  FRAMES
 NO FRAMES

  All Classes

Copyright 1999-2010 The Apache Software Foundation. All Rights Reserved.


text:
Easily implement native sharing for social networks, email and SMS.

## Setup
```objc
PDSharingCenter *center = [PDSharingCenter defaultCenter];

// Set at least the app name and company name
center.companyName = @"companyName";
center.appName = @"appName";
center.appTwitterTag = @"appTwitterTag";
center.supportEmail = @"supportEmail";
center.appStoreID = @"appStoreID";
```

## Usage
```objc
[center shareItems:@[@"Some text", [UIImage imageNamed:@"someImage"]] completion:NULL];
```


text:
<?php

namespace Estina\SmartFocus\Api\Http;

/**
 * Simple object oriented cURL wrapper.
 *
 * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
 */
class CurlClient implements ClientInterface
{
    /** @var int */
    private $timeout;

    /**
     * Constructor.
     *
     * @param int $timeout The maximum number of seconds to allow cURL functions to execute, default - 10
     */
    public function __construct($timeout = 10)
    {
        if (!function_exists('curl_init')) {
            throw new \Exception('cURL functions are not available, check if libcurl is installed.');
        }

        $this->setTimeout($timeout);
    }

    /**
     * @param int $timeout
     */
    public function setTimeout($timeout)
    {
        $this->timeout = $timeout;
    }

    /**
     * @return int
     */
    public function getTimeout()
    {
        return $this->timeout;
    }

    /**
     * Performs GET request.
     *
     * @param string $url URL
     *
     * @return mixed - XML string or FALSE on failure
     */
    public function get($url)
    {
        $ch = $this->curlInit($url);
        $response = curl_exec($ch);
        curl_close($ch);

        return $response;
    }

    /**
     * Performs POST request.
     *
     * @param string $url URL
     * @param string $xml XML request body
     *
     * @return mixed - XML string or FALSE on failure
     */
    public function post($url, $xml)
    {
        $ch = $this->curlInit($url);
        curl_setopt($ch, CURLOPT_POST, 1);
        curl_setopt($ch, CURLOPT_POSTFIELDS, $xml);
        curl_setopt($ch, CURLOPT_HTTPHEADER, array(
            'Content-Type: text/xml; charset=utf-8',
            'Accept: application/xml'
        ));
        $response = curl_exec($ch);
        curl_close($ch);

        return $response;
    }

    /**
     * Performs PUT request.
     *
     * @param string $url    URL
     * @param array  $header Header
     * @param string $body   Body
     *
     * @return mixed - XML string or FALSE in failure
     */
    public function put($url, $header, $body)
    {
        $ch = $this->curlInit($url);

        $header[] = 'Accept: application/xml';
        curl_setopt($ch, CURLOPT_HTTPHEADER, $header);

        curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
        curl_setopt($ch, CURLOPT_POSTFIELDS, $body);
        $response = curl_exec($ch);
        curl_close($ch);

        return $response;
    }

    /**
     * Initializes cURL session and sets common options.
     *
     * @param string $url
     *
     * @throws \InvalidArgumentException on invalid URL
     *
     * @return Resource
     */
    private function curlInit($url)
    {
        if (!filter_var($url, FILTER_VALIDATE_URL, FILTER_FLAG_PATH_REQUIRED)) {
            throw new \InvalidArgumentException('Invalid URL: ' . $url);
        }
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($ch, CURLOPT_TIMEOUT, $this->getTimeout());
        curl_setopt($ch, CURLOPT_HEADER, 0);

        return $ch;
    }
}


text:
int main(int argc, char * argv[])
{
    @autoreleasepool {
        return UIApplicationMain(argc, argv, nil, NSStringFromClass([KTBAppDelegate class]));
    }
}


text:
<?php
/**
 * Created by PhpStorm.
 * User: denisa
 * Date: 04.02.2016
 * Time: 10:40
 */

namespace AppBundle\Entity;

use Doctrine\ORM\EntityRepository;

class IncomesRepository extends EntityRepository
{

}


text:
         <link href="<?= base_url(); ?>webroot/orgchart/css/jquery.orgchart.css" rel="stylesheet" type="text/css" />
        <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">

                            assignment ASIGNACIÓN DE ACCESO A SISTEMAS DE INFORMACIÓN

                 <a class="btn-floating btn-large tooltipped" data-tooltip="Regresar" data-position="top" data-delay="50" href="<?= base_url() .'accesoSistemas/acceso_si_sistemas'?>">
                                undo

                <button class="btn-floating btn-large white tooltipped scrollToTop" data-tooltip="Scroll to top" data-position="top" data-delay="50">
                    keyboard_arrow_up
                </button>

                <?php
                    $bandera="registrar";
                    //$idRequisicion=0;
                    $attributes = array('id' => 'myform');
                    $url= 'accesoSistemas/asignacion_accesos/'.$bandera;
                    //$attributes = array('id' => 'myform');
                    echo form_open(base_url().$url,$attributes );
                ?>

                            <?php
                                $msg = $this->session->flashdata('msg');
                                if ($msg){
                                    echo $msg;
                                }

                            ?>

                                                <input id="codigo" name="codigo" value="FOFI-1003" type="text" readonly="readonly" class="black-text">
                                                CÓDIGO

                                                <input id="revision" name="revision" value="5.0" type="text" readonly="readonly" class="black-text">
                                                REVISIÓN

                                                <input id="folio" name="folio" value="<?=$empleado['id_solicitud']?>" type="text" readonly="readonly" class="black-text">
                                                FOLIO

                                                <input id="fecha" name="fecha" value="<?=$empleado['fecha_solicitud'] ?>" type="text" readonly="readonly" class="black-text">
                                                FECHA DE SOLICITUD

 I.DATOS GENERALES DEL SOLICITANTE

                                 <?php
                                 $nombreEmpleado=$empleado['nombre_solicitante'];
                                 ?>

                                                    <input name="solicitante" id="solicitante" type="text"  value="<?=$nombreEmpleado?>"  class="black-text" readonly>
                                                     NOMBRE COMPLETO DEL SOLICITANTE

                                                    <input id="noEmpleado" name="noEmpleado" value="<?=$empleado['noEmpleado']?>" type="text" class="black-text" readonly="">
                                                    NO. EMPLEADO

                                                    <input name="departamento" id="departamento" type="text"  value="<?=$empleado['departamento']?>"  class="black-text" readonly>

                                                        DEPARTAMENTO

                                                    <?php echo form_error('noExtension'); ?>
                                                    <input id="noExtension" name="noExtension" value="<?=$empleado['noExtension']?>" type="text" class="black-text" placeholder="Ingresar No. de Extensión" readonly>
                                                    NO. EXTENSIÓN

                                                    <?php echo form_error('gerencia'); ?>
                                                    <input name="gerencia" id="gerencia" type="text"  value="<?=$empleado['gerencia']?>"  class="black-text" placeholder="Ingresar Nombre de Divisón o Gerencia" readonly>

                                                        DIVISIÓN O GERENCIA

                                                    <input id="puesto" name="puesto" value="<?=$empleado['puesto']?>" type="text" class="black-text" readonly>
                                                    PUESTO

II. DATOS GENERALES DEL USUARIO

                            <?php echo form_error('nombreUsuario'); ?>
                            <input name="nombreUsuario" id="nombreUsuario" type="text"  value="<?=$usuario['nombre_usuario']?>"  class="black-text"  readonly>
                             NOMBRE COMPLETO DEL USUARIO

                            <input id="noEmpleadoUsuario" name="noEmpleadoUsuario" value="<?=$usuario['no_empleado_usuario']?>" type="text" class="black-text" readonly>
                            NO. EMPLEADO

                            <?php echo form_error('departamentoUsuario'); ?>
                            <input name="departamentoUsuario" id="departamentoUsuario" type="text"  value="<?=$usuario['departamento_usuario']?>"  class="black-text"  readonly>

                                DEPARTAMENTO

                            <?php echo form_error('gerencia'); ?>
                            <input name="gerenciaUsuario" id="gerenciaUsuario" type="text"  value="<?=$usuario['gerencia_usuario']?>"  class="black-text" readonly>

                                DIVISIÓN O GERENCIA

                            <input id="puestoUsuario" name="puestoUsuario" value="<?=$usuario['puesto_usuario']?>" type="text" class="black-text"  readonly>
                            PUESTO

                                <?php
                                    $empleadoTipo=$usuario['empleado_tipo'];

                                ?>

                       <input id="empleadoTipo" name="empleadoTipo" value="<?=$empleadoTipo?>" type="text" class="black-text"  readonly >
                         TIPO DE EMPLEADO

                        <?php
                        $nombreEmpresa=$usuario['nombre_empresa'];
                        if ($empleadoTipo<>''){
                        ?>
                         <?php echo form_error('nombreEmpresa'); ?>
                        <input type="text" id="nombreEmpresa" name="nombreEmpresa" class="black-text" value="<?=$nombreEmpresa?>" readonly>
                         NOMBRE DE LA EMPRESA EXTERNA

                        <?php
                        }
                        ?>

 III. DAR DE ALTA CUENTA DE RED DE DATOS

                            <?php
                            if($accesos['acceso_red']=="SI"){
                            ?>
                                <input type="checkbox" name="red" class="filled-in" id="red" value="SI" checked disabled>
                                Acceso a Red
                            <?php
                            }else{
                            ?>
                                <input type="checkbox" name="red" class="filled-in" id="red" value="SI" disabled>
                                Acceso a Red
                            <?php
                            }
                            ?>

                            <?php
                            if($accesos['acceso_red']=="SI"){
                            ?>
                                <input type="text" id="nombreRedText"name="nombreRedText" class="black-text"   value="<?=$accesos['nombre_red']?>" readonly>
                                Nombre Red
                            <?php
                            }
                            ?>

                            <?php
                            if($accesos['acceso_internet']=="SI"){
                            ?>
                                <input type="checkbox" name="internet" class="filled-in" id="internet" value="SI" checked disabled>
                                Acceso a Internet
                            <?php
                            }else{
                            ?>
                                <input type="checkbox" name="internet" class="filled-in" id="internet" value="SI" disabled>
                                Acceso a Internet
                            <?php
                            }
                            ?>

                            <?php
                            if($accesos['acceso_vpn']=="SI"){
                            ?>
                                <input type="checkbox" name="vpn" class="filled-in" id="vpn" value="SI" checked disabled>
                                VPN
                            <?php
                            }else{
                            ?>
                                <input type="checkbox" name="vpn" class="filled-in" id="vpn" value="SI" disabled>
                                VPN
                            <?php
                            }
                            ?>

 IV.  DAR DE ALTA CUENTA DE CORREO ELECTRÓNICO

                            <?php
                            if($accesos['acceso_correoAvante']=="SI"){
                            ?>
                                <input type="checkbox" name="correoAvante" class="filled-in" id="correoAvante" value="SI" checked disabled>
                                Avante Textil
 avantetextil.com
                            <?php
                            }else{
                            ?>
                                <input type="checkbox" name="correoAvante" class="filled-in" id="correoAvante" value="SI" disabled>
                                Avante Textil
 avantetextil.com
                            <?php
                            }
                            ?>

                            <?php
                            if($accesos['acceso_correoAlka']=="SI"){
                            ?>
                                <input type="checkbox" name="correoAlka" class="filled-in" id="correoAlka" value="SI" checked disabled>
                                Tiendas Alka
 tiendasoptima.com.mx
                            <?php
                            }else{
                            ?>
                                <input type="checkbox" name="correoAlka" class="filled-in" id="correoAlka" value="SI" disabled>
                                Tiendas Alka
 tiendasoptima.com.mx
                            <?php
                            }
                            ?>

                            <?php
                            if($accesos['acceso_correoKInmuebles']=="SI"){
                            ?>
                                <input type="checkbox" name="correoKInmuebles" class="filled-in" id="correoKInmuebles" value="SI" checked disabled>
                                KInmuebles
 kinmuebles.com
                            <?php
                            }else{
                            ?>
                                <input type="checkbox" name="correoKInmuebles" class="filled-in" id="correoKInmuebles" value="SI" disabled>
                                KInmuebles
 kinmuebles.com
                            <?php
                            }
                            ?>

 V.  DAR DE ALTA CUENTA DE PLM/M3/SAP

                            <?php
                            if($accesos['acceso_plm']=="SI"){
                            ?>
                                <input type="checkbox" name="plm" class="filled-in" id="plm" value="SI" checked disabled>
                                Cuenta de PLM
                            <?php
                            }else{
                            ?>
                                <input type="checkbox" name="plm" class="filled-in" id="plm" value="SI" disabled>
                                Cuenta de PLM
                            <?php
                            }
                            ?>

                            <?php
                            if($accesos['acceso_m3']=="SI"){
                            ?>
                                <input type="checkbox" name="m3" class="filled-in" id="m3" value="SI" checked disabled>
                                Cuenta de M3
                            <?php
                            }else{
                            ?>
                                <input type="checkbox" name="m3" class="filled-in" id="m3" value="SI" disabled>
                                Cuenta de M3
                            <?php
                            }
                            ?>

                            <?php
                            if($accesos['acceso_sap']=="SI"){
                            ?>
                                <input type="checkbox" name="sap" class="filled-in" id="sap" value="SI" checked disabled>
                                Cuenta SAP
                            <?php
                            }else{
                            ?>
                                <input type="checkbox" name="sap" class="filled-in" id="sap" value="SI" disabled>
                                Cuenta SAP
                            <?php
                            }
                            ?>

 VI. DAR DE ALTA A OTRO SISTEMA

                            <?php
                            if($accesos['acceso_intranetAvante']=="SI"){
                            ?>
                                <input type="checkbox" name="intranetAvante" class="filled-in" id="intranetAvante" value="SI" checked disabled>
                                Intranet Avante
                            <?php
                            }else{
                            ?>
                                <input type="checkbox" name="intranetAvante" class="filled-in" id="intranetAvante" value="SI" disabled>
                                Intranet Avante
                            <?php
                            }
                            ?>

                            <?php
                            if($accesos['acceso_intranetAlka']=="SI"){
                            ?>
                                <input type="checkbox" name="intranetAlka" class="filled-in" id="intranetAlka" value="SI" checked disabled>
                                Intranet Alka
                            <?php
                            }else{
                            ?>
                                <input type="checkbox" name="intranetAlka" class="filled-in" id="intranetAlka" value="SI" disabled>
                                Intranet Alka
                            <?php
                            }
                            ?>

                          <?php
                            if($accesos['acceso_extension']=="SI"){
                            ?>
                                <input type="checkbox" name="extension" class="filled-in" id="extension" value="SI" checked disabled>
                                Extensión
                            <?php
                            }else{
                            ?>
                                <input type="checkbox" name="extension" class="filled-in" id="extension" value="SI" disabled>
                                Extensión
                            <?php
                            }
                            ?>

                            <?php
                            if($accesos['acceso_otro_sistema']=="SI"){
                            ?>
                                <input type="checkbox" name="otroSistema" class="filled-in" id="otroSistema" value="SI" onchange="actualizaCampoOtro()" checked disabled>
                                Otro Sistema
                            <?php
                            }else{
                            ?>
                                <input type="checkbox" name="otroSistema" class="filled-in" id="otroSistema" value="SI" onchange="actualizaCampoOtro()" disabled>
                                Otro Sistema
                            <?php
                            }
                            ?>

                            <?php
                            if($accesos['acceso_otro_sistema']=="SI"){
                            ?>
                                <input type="text" id="campoOtro"name="campoOtro" class="black-text"  placeholder="Ingresar nombre de otro sistema" value="<?=$accesos['nombre_otro_sistema']?>" readonly>
                                Nombre Otro Sistema
                            <?php
                            }
                            ?>

 VII. OBSERVACIONES

                            <textarea id="observaciones" name="observaciones" style="color:black;" disabled><?=$accesos['observaciones']?> </textarea>
                            OBSERVACIONES:

 VIII. TABLA DE SERVICIOS (USO EXCLUSIVO DE SISTEMAS)

                                    SERVICIO
                                    USUARIO
                                    PASSWORD
                                    FECHA DE CREACION
                                    CREADOR

                                    Red
                                    <input type="text"  class="black-text" id="usuario_red" name="usuario_red">
                                    <input type="text"  class="black-text" id="password_red" name="password_red">
                                     <input type="text" id="fecha_creacion_red" name="fecha_creacion_red" class="datepicker">
                                    <input type="text"  class="black-text" id="creador_red" name="creador_red">

                                    Internet
                                    <input type="text"  class="black-text" id="usuario_internet" name="usuario_internet">
                                    <input type="text"  class="black-text" id="password_internet" name="password_internet">
                                    <input type="text"  class="datepicker" id="fecha_creacion_internet" name="fecha_creacion_internet">
                                    <input type="text"  class="black-text" id="creador_internet" name="creador_internet">

                                    Usuario VPN
                                    <input type="text"  class="black-text" id="usuario_vpn" name="usuario_vpn">
                                    <input type="text"  class="black-text" id="password_vpn" name="password_vpn">
                                    <input type="text"  class="datepicker" id="fecha_creacion_vpn" name="fecha_creacion_vpn">
                                    <input type="text"  class="black-text" id="creador_vpn" name="creador_vpn">

                                    Correo Avante
                                    <input type="text"  class="black-text" id="usuario_correoAvante" name="usuario_correoAvante">
                                    <input type="text"  class="black-text" id="password_correoAvante" name="password_correoAvante">
                                    <input type="text"  class="datepicker" id="fecha_creacion_correoAvante" name="fecha_creacion_correoAvante">
                                    <input type="text"  class="black-text" id="creador_correoAvante" name="creador_correoAvante">

                                    Correo Alka
                                    <input type="text"  class="black-text" id="usuario_correoAlka" name="usuario_correoAlka">
                                    <input type="text"  class="black-text" id="password_correoAlka" name="password_correoAlka">
                                    <input type="text"  class="datepicker" id="fecha_creacion_correoAlka" name="fecha_creacion_correoAlka">
                                    <input type="text"  class="black-text" id="creador_correoAlka" name="creador_correoAlka">

                                    Correo KInmuebles
                                    <input type="text"  class="black-text" id="usuario_correoKInmuebles" name="usuario_correoKInmuebles">
                                    <input type="text"  class="black-text" id="password_correoKInmuebles" name="password_correoKInmuebles">
                                    <input type="text"  class="datepicker" id="fecha_creacion_correoKInmuebles" name="fecha_creacion_correoKInmuebles">
                                    <input type="text"  class="black-text" id="creador_correoKInmuebles" name="creador_correoKInmuebles">

                                    Cuenta PLM
                                    <input type="text"  class="black-text" id="usuario_plm" name="usuario_plm">
                                    <input type="text"  class="black-text" id="password_plm" name="password_plm">
                                    <input type="text"  class="datepicker" id="fecha_creacion_plm" name="fecha_creacion_plm">
                                    <input type="text"  class="black-text" id="creador_plm" name="creador_plm">

                                    Cuenta de M3
                                    <input type="text"  class="black-text" id="usuario_m3" name="usuario_m3">
                                    <input type="text"  class="black-text" id="password_m3" name="password_m3">
                                    <input type="text"  class="datepicker" id="fecha_creacion_m3" name="fecha_creacion_m3">
                                    <input type="text"  class="black-text" id="creador_m3" name="creador_m3">

                                    Usuario SAP
                                    <input type="text"  class="black-text" id="usuario_sap" name="usuario_sap">
                                    <input type="text"  class="black-text" id="password_sap" name="password_sap">
                                    <input type="text"  class="datepicker" id="fecha_creacion_sap" name="fecha_creacion_sap">
                                    <input type="text"  class="black-text" id="creador_sap" name="creador_sap">

                                    Intranet Avante
                                    <input type="text"  class="black-text" id="usuario_intranetAvante" name="usuario_intranetAvante">
                                    <input type="text"  class="black-text" id="password_intranetAvante" name="password_intranetAvante">
                                    <input type="text"  class="datepicker" id="fecha_creacion_intranetAvante" name="fecha_creacion_intranetAvante">
                                    <input type="text"  class="black-text" id="creador_intranetAvante" name="creador_intranetAvante">

                                    Intranet Alka
                                    <input type="text"  class="black-text" id="usuario_intranetAlka" name="usuario_intranetAlka">
                                    <input type="text"  class="black-text" id="password_intranetAlka" name="password_intranetAlka">
                                    <input type="text"  class="datepicker" id="fecha_creacion_intranetAlka" name="fecha_creacion_intranetAlka">
                                    <input type="text"  class="black-text" id="creador_intranetAlka" name="creador_intranetAlka">

                                    Extensión
                                    <input type="text"  class="black-text" id="usuario_extension" name="usuario_extension">
                                    <input type="text"  class="black-text" id="password_extension" name="password_extension">
                                    <input type="text"  class="datepicker" id="fecha_creacion_extension" name="fecha_creacion_extension">
                                    <input type="text"  class="black-text" id="creador_extension" name="creador_extension">

                                    Nombre Equipo
                                    <input type="text"  class="black-text" id="usuario_nombreEquipo" name="usuario_nombreEquipo">
                                    <input type="text"  class="black-text" id="password_nombreEquipo" name="password_nombreEquipo">
                                    <input type="text"  class="datepicker" id="fecha_creacion_nombreEquipo" name="fecha_creacion_nombreEquipo">
                                    <input type="text"  class="black-text" id="creador_nombreEquipo" name="creador_nombreEquipo">

                                    Otro
                                    <input type="text"  class="black-text" id="usuario_otro" name="usuario_otro">
                                    <input type="text"  class="black-text" id="password_otro" name="password_otro">
                                    <input type="text"  class="datepicker" id="fecha_creacion_otro" name="fecha_creacion_otro">
                                    <input type="text"  class="black-text" id="creador_otro" name="creador_otro">

                            <button class="btn" onclick="">ASIGNAR ACCESOS person_pin_circle </button>


text:
@interface DDMicBlowDetector : NSObject

+ (DDMicBlowDetector*)sharedDetector;
+ (BOOL)microphoneAvailable;

@property(nonatomic, assign) BOOL monitoring;
@property(nonatomic, assign) NSTimeInterval minDuration;
@property(nonatomic, assign) NSTimeInterval maxDuration;
@property(nonatomic, assign) double requiredConfidence;

@end

//notifications for blowing into microphone
extern NSString *DDMicBlowDetectorDidDetectStart;
extern NSString *DDMicBlowDetectorDidDetectContinue;
extern NSString *DDMicBlowDetectorDidDetectStop;
extern NSString *DDMicBlowDetectorDidDetectTooShort;
extern NSString *DDMicBlowDetectorDidDetectTooLong;

extern NSString *DDMicBlowDetectorDuration;


text:
package com.streamsets.datacollector.event.dto;

// Events for all commands requiring Pipeline name, rev and user
// made abstract under SDC-10218, when Jackson polymorphism was introduced
public abstract class PipelineBaseEvent implements Event {

  private String name;
  private String rev;
  private String user;

  public PipelineBaseEvent() {
  }

  public PipelineBaseEvent(String name, String rev, String user) {
    this.name = name;
    this.rev = rev;
    this.user = user;
  }

  public String getUser() {
    return user;
  }

  public void setUser(String user) {
    this.user = user;
  }

  public String getName() {
    return name;
  }

  public String getRev() {
    return rev;
  }

  public void setName(String name) {
    this.name = name;
  }

  public void setRev(String rev) {
    this.rev = rev;
  }

}


text:
from picamera import PiCamera
from gpiozero import Button
from overlay_functions import *
from time import gmtime, strftime

# Tell the next overlay button what to do
def next_overlay():
    global overlay
    overlay = next(all_overlays)
    preview_overlay(camera, overlay)

    #if 'overlay' in globals():
    #    overlay = next(all_overlays)
    #else:
    #    global overlay # http://stackoverflow.com/questions/843277/how-do-i-check-if-a-variable-exists
    #    overlay = next(all_overlays)# http://stackoverflow.com/questions/26545051/is-there-a-way-to-delete-created-variables-functions-etc-from-the-memory-of-th
    #preview_overlay(camera, overlay)

# Tell the take picture button what to do
def take_picture():
    camera.capture(output)
    camera.stop_preview()

# Set up buttons
next_overlay_btn = Button(23)
next_overlay_btn.when_pressed = next_overlay
take_pic_btn = Button(25)
take_pic_btn.when_pressed = take_picture

# Set up camera (with resolution of the touchscreen)
camera = PiCamera()
camera.resolution = (800, 480)
camera.hflip = True

# Start camera preview (delete alpha=128 once you know your code works)
camera.start_preview(alpha=128)

# Set up filename
output = strftime("/home/pi/photobooth/tests/allseeingpi_test/image-%d-%m %H:%M.png", gmtime())