code
stringlengths
3
1.05M
repo_name
stringlengths
4
116
path
stringlengths
4
991
language
stringclasses
9 values
license
stringclasses
15 values
size
int32
3
1.05M
class JbossForge < Formula desc "Tools to help set up and configure a project" homepage "https://forge.jboss.org/" url "https://downloads.jboss.org/forge/releases/3.9.0.Final/forge-distribution-3.9.0.Final-offline.zip" version "3.9.0.Final" sha256 "7b2013ad0629d38d487514111eadf079860a5cd230994f33ce5b7dcca82e76ad" bottle :unneeded depends_on :java => "1.8+" def install rm_f Dir["bin/*.bat"] libexec.install %w[addons bin lib logging.properties] bin.install_symlink libexec/"bin/forge" end test do assert_match "org.jboss.forge.addon:core", shell_output("#{bin}/forge --list") end end
moderndeveloperllc/homebrew-core
Formula/jboss-forge.rb
Ruby
bsd-2-clause
628
#include "stdafx.h" #include "com4j.h" void error( JNIEnv* env, const char* file, int line, HRESULT hr, const char* msg ... ) { // format the message va_list va; va_start(va,msg); int len = _vscprintf(msg,va); char* w = reinterpret_cast<char*>(alloca(len+1)); // +1 for '\0' vsprintf(w,msg,va); env->ExceptionClear(); env->Throw( (jthrowable)comexception_new_hr( env, env->NewStringUTF(w), hr, env->NewStringUTF(file), line ) ); } void error( JNIEnv* env, const char* file, int line, const char* msg ... ) { // format the message va_list va; va_start(va,msg); int len = _vscprintf(msg,va); char* w = reinterpret_cast<char*>(alloca(len+1)); // +1 for '\0' vsprintf(w,msg,va); env->ExceptionClear(); env->Throw( (jthrowable)comexception_new( env, env->NewStringUTF(w), env->NewStringUTF(file), line ) ); }
kohsuke/com4j
native/error.cpp
C++
bsd-2-clause
826
from PyQt4 import QtGui, QtCore, QtSvg from PyQt4.QtCore import QMimeData from PyQt4.QtGui import QGraphicsScene, QGraphicsView, QWidget, QApplication from Orange.data.io import FileFormat class ImgFormat(FileFormat): @staticmethod def _get_buffer(size, filename): raise NotImplementedError @staticmethod def _get_target(scene, painter, buffer): raise NotImplementedError @staticmethod def _save_buffer(buffer, filename): raise NotImplementedError @staticmethod def _get_exporter(): raise NotImplementedError @staticmethod def _export(self, exporter, filename): raise NotImplementedError @classmethod def write_image(cls, filename, scene): try: scene = scene.scene() scenerect = scene.sceneRect() #preserve scene bounding rectangle viewrect = scene.views()[0].sceneRect() scene.setSceneRect(viewrect) backgroundbrush = scene.backgroundBrush() #preserve scene background brush scene.setBackgroundBrush(QtCore.Qt.white) exporter = cls._get_exporter() cls._export(exporter(scene), filename) scene.setBackgroundBrush(backgroundbrush) # reset scene background brush scene.setSceneRect(scenerect) # reset scene bounding rectangle except Exception: if isinstance(scene, (QGraphicsScene, QGraphicsView)): rect = scene.sceneRect() elif isinstance(scene, QWidget): rect = scene.rect() rect = rect.adjusted(-15, -15, 15, 15) buffer = cls._get_buffer(rect.size(), filename) painter = QtGui.QPainter() painter.begin(buffer) painter.setRenderHint(QtGui.QPainter.Antialiasing) target = cls._get_target(scene, painter, buffer, rect) try: scene.render(painter, target, rect) except TypeError: scene.render(painter) # PyQt4 QWidget.render() takes different params cls._save_buffer(buffer, filename) painter.end() @classmethod def write(cls, filename, scene): if type(scene) == dict: scene = scene['scene'] cls.write_image(filename, scene) class PngFormat(ImgFormat): EXTENSIONS = ('.png',) DESCRIPTION = 'Portable Network Graphics' PRIORITY = 50 @staticmethod def _get_buffer(size, filename): return QtGui.QPixmap(int(size.width()), int(size.height())) @staticmethod def _get_target(scene, painter, buffer, source): try: brush = scene.backgroundBrush() if brush.style() == QtCore.Qt.NoBrush: brush = QtGui.QBrush(scene.palette().color(QtGui.QPalette.Base)) except AttributeError: # not a QGraphicsView/Scene brush = QtGui.QBrush(QtCore.Qt.white) painter.fillRect(buffer.rect(), brush) return QtCore.QRectF(0, 0, source.width(), source.height()) @staticmethod def _save_buffer(buffer, filename): buffer.save(filename, "png") @staticmethod def _get_exporter(): from pyqtgraph.exporters.ImageExporter import ImageExporter return ImageExporter @staticmethod def _export(exporter, filename): buffer = exporter.export(toBytes=True) buffer.save(filename, "png") class ClipboardFormat(PngFormat): EXTENSIONS = () DESCRIPTION = 'System Clipboard' PRIORITY = 50 @staticmethod def _save_buffer(buffer, _): QApplication.clipboard().setPixmap(buffer) @staticmethod def _export(exporter, _): buffer = exporter.export(toBytes=True) mimedata = QMimeData() mimedata.setData("image/png", buffer) QApplication.clipboard().setMimeData(mimedata) class SvgFormat(ImgFormat): EXTENSIONS = ('.svg',) DESCRIPTION = 'Scalable Vector Graphics' PRIORITY = 100 @staticmethod def _get_buffer(size, filename): buffer = QtSvg.QSvgGenerator() buffer.setFileName(filename) buffer.setSize(QtCore.QSize(int(size.width()), int(size.height()))) return buffer @staticmethod def _get_target(scene, painter, buffer, source): return QtCore.QRectF(0, 0, source.width(), source.height()) @staticmethod def _save_buffer(buffer, filename): pass @staticmethod def _get_exporter(): from pyqtgraph.exporters.SVGExporter import SVGExporter return SVGExporter @staticmethod def _export(exporter, filename): exporter.export(filename)
qPCR4vir/orange3
Orange/widgets/io.py
Python
bsd-2-clause
4,645
cask "inso" do version "2.4.1" sha256 "ef9510f32d5d5093f6589fe22d6629c2aa780315966381fc94f83519f2553c2d" url "https://github.com/Kong/insomnia/releases/download/lib%40#{version}/inso-macos-#{version}.zip", verified: "github.com/Kong/insomnia/" name "inso" desc "CLI HTTP and GraphQL Client" homepage "https://insomnia.rest/products/inso" livecheck do url "https://github.com/Kong/insomnia/releases?q=prerelease%3Afalse+Inso+CLI" strategy :page_match regex(/href=.*?inso-macos-(?:latest-)*(\d+(?:\.\d+)+)\.zip/i) end conflicts_with cask: "homebrew/cask-versions/inso-beta" binary "inso" end
cobyism/homebrew-cask
Casks/inso.rb
Ruby
bsd-2-clause
632
class Timidity < Formula desc "Software synthesizer" homepage "http://timidity.sourceforge.net/" url "https://downloads.sourceforge.net/project/timidity/TiMidity++/TiMidity++-2.14.0/TiMidity++-2.14.0.tar.bz2" sha256 "f97fb643f049e9c2e5ef5b034ea9eeb582f0175dce37bc5df843cc85090f6476" bottle do sha256 "0b26a98c3e8e3706f8ff1fb2e21c014ac7245c01510799172e7f3ebdc71602ac" => :el_capitan sha256 "2bfaec5aaaacf7ed13148f437cbeba6bb793f9eacdab739b7202d151031253b4" => :yosemite sha256 "9e56e31b91c1cab53ebd7830114520233b02f7766f69f2e761d005b8bcd2fb58" => :mavericks sha256 "a6c27dd89a2a68505faa01a3be6b770d5c89ae79a9b4739a5f7f1d226bfedb2d" => :mountain_lion end option "without-darwin", "Build without Darwin CoreAudio support" option "without-freepats", "Build without the Freepats instrument patches from http://freepats.zenvoid.org/" depends_on "libogg" => :recommended depends_on "libvorbis" => :recommended depends_on "flac" => :recommended depends_on "speex" => :recommended depends_on "libao" => :recommended resource "freepats" do url "http://freepats.zenvoid.org/freepats-20060219.zip" sha256 "532048a5777aea717effabf19a35551d3fcc23b1ad6edd92f5de1d64600acd48" end def install args = ["--disable-debug", "--disable-dependency-tracking", "--prefix=#{prefix}", "--mandir=#{man}" ] formats = [] formats << "darwin" if build.with? "darwin" formats << "vorbis" if build.with?("libogg") && build.with?("libvorbis") formats << "flac" if build.with? "flac" formats << "speex" if build.with? "speex" formats << "ao" if build.with? "libao" if formats.any? args << "--enable-audio=" + formats.join(",") end system "./configure", *args system "make", "install" if build.with? "freepats" (share/"freepats").install resource("freepats") (share/"timidity").install_symlink share/"freepats/Tone_000", share/"freepats/Drum_000", share/"freepats/freepats.cfg" => "timidity.cfg" end end test do system "#{bin}/timidity" end end
andyjeffries/homebrew-core
Formula/timidity.rb
Ruby
bsd-2-clause
2,183
class HapiFhirCli < Formula desc "Command-line interface for the HAPI FHIR library" homepage "https://hapifhir.io/hapi-fhir/docs/tools/hapi_fhir_cli.html" url "https://github.com/jamesagnew/hapi-fhir/releases/download/v5.3.0/hapi-fhir-5.3.0-cli.zip" sha256 "851fa036c55fee7c0eca62a1c00fd9b5f35f8296850762e002f752ad35ba0240" license "Apache-2.0" livecheck do url :stable strategy :github_latest end bottle :unneeded depends_on "openjdk" resource "test_resource" do url "https://github.com/jamesagnew/hapi-fhir/raw/v5.1.0/hapi-fhir-structures-dstu3/src/test/resources/specimen-example.json" sha256 "4eacf47eccec800ffd2ca23b704c70d71bc840aeb755912ffb8596562a0a0f5e" end def install inreplace "hapi-fhir-cli", /SCRIPTDIR=(.*)/, "SCRIPTDIR=#{libexec}" libexec.install "hapi-fhir-cli.jar" bin.install "hapi-fhir-cli" bin.env_script_all_files libexec/"bin", JAVA_HOME: Formula["openjdk"].opt_prefix end test do testpath.install resource("test_resource") system bin/"hapi-fhir-cli", "validate", "--file", "specimen-example.json", "--fhir-version", "dstu3" end end
dsXLII/homebrew-core
Formula/hapi-fhir-cli.rb
Ruby
bsd-2-clause
1,143
class NewrelicInfraAgent < Formula desc "New Relic infrastructure agent" homepage "https://github.com/newrelic/infrastructure-agent" url "https://github.com/newrelic/infrastructure-agent.git", tag: "1.20.7", revision: "b17a417d4745da7be9c00ecc72619523867f7add" license "Apache-2.0" head "https://github.com/newrelic/infrastructure-agent.git", branch: "master" bottle do sha256 cellar: :any_skip_relocation, monterey: "ffdb274016361a220fbc8fb21cfae1b90347c03ff7c86e128d20a6c3a0a6053b" sha256 cellar: :any_skip_relocation, big_sur: "bf1f38cc2c2f73370f92c7645eb9c228dbaf5f760b700477f1c40e7de34690b7" sha256 cellar: :any_skip_relocation, catalina: "966da6a25822e35c9e96e518336b3d1bb3ceb9e06c88d9456c19e2305ab45570" sha256 cellar: :any_skip_relocation, x86_64_linux: "93328d150756320c4ea4a9aba6c66dd773cdc1b7c63db1165918f64ca8409194" end # https://github.com/newrelic/infrastructure-agent/issues/723 depends_on "go@1.16" => :build # https://github.com/newrelic/infrastructure-agent/issues/695 depends_on arch: :x86_64 def install goarch = Hardware::CPU.intel? ? "amd64" : Hardware::CPU.arch.to_s os = OS.kernel_name.downcase ENV["VERSION"] = version.to_s ENV["GOOS"] = os ENV["CGO_ENABLED"] = OS.mac? ? "1" : "0" system "make", "dist-for-os" bin.install "dist/#{os}-newrelic-infra_#{os}_#{goarch}/newrelic-infra" bin.install "dist/#{os}-newrelic-infra-ctl_#{os}_#{goarch}/newrelic-infra-ctl" bin.install "dist/#{os}-newrelic-infra-service_#{os}_#{goarch}/newrelic-infra-service" (var/"db/newrelic-infra").install "assets/licence/LICENSE.macos.txt" if OS.mac? end def post_install (etc/"newrelic-infra").mkpath (var/"log/newrelic-infra").mkpath end service do run [bin/"newrelic-infra-service", "-config", etc/"newrelic-infra/newrelic-infra.yml"] log_path var/"log/newrelic-infra/newrelic-infra.log" error_log_path var/"log/newrelic-infra/newrelic-infra.stderr.log" end test do output = shell_output("#{bin}/newrelic-infra -validate") assert_match "config validation", output end end
sjackman/homebrew-core
Formula/newrelic-infra-agent.rb
Ruby
bsd-2-clause
2,137
/** * Copyright (c) 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * The examples provided by Facebook are for non-commercial testing and * evaluation purposes only. * * Facebook reserves all rights not expressly granted. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * @flow */ 'use strict'; var React = require('react'); var ReactNative = require('react-native'); var { Text, TextInput, View, StyleSheet, } = ReactNative; var TextEventsExample = React.createClass({ getInitialState: function() { return { curText: '<No Event>', prevText: '<No Event>', prev2Text: '<No Event>', }; }, updateText: function(text) { this.setState((state) => { return { curText: text, prevText: state.curText, prev2Text: state.prevText, }; }); }, render: function() { return ( <View> <TextInput autoCapitalize="none" placeholder="Enter text to see events" autoCorrect={false} onFocus={() => this.updateText('onFocus')} onBlur={() => this.updateText('onBlur')} onChange={(event) => this.updateText( 'onChange text: ' + event.nativeEvent.text )} onEndEditing={(event) => this.updateText( 'onEndEditing text: ' + event.nativeEvent.text )} onSubmitEditing={(event) => this.updateText( 'onSubmitEditing text: ' + event.nativeEvent.text )} style={styles.singleLine} /> <Text style={styles.eventLabel}> {this.state.curText}{'\n'} (prev: {this.state.prevText}){'\n'} (prev2: {this.state.prev2Text}) </Text> </View> ); } }); class AutoExpandingTextInput extends React.Component { constructor(props) { super(props); this.state = { text: 'React Native enables you to build world-class application experiences on native platforms using a consistent developer experience based on JavaScript and React. The focus of React Native is on developer efficiency across all the platforms you care about — learn once, write anywhere. Facebook uses React Native in multiple production apps and will continue investing in React Native.', height: 0, }; } render() { return ( <TextInput {...this.props} multiline={true} onContentSizeChange={(event) => { this.setState({height: event.nativeEvent.contentSize.height}); }} onChangeText={(text) => { this.setState({text}); }} style={[styles.default, {height: Math.max(35, this.state.height)}]} value={this.state.text} /> ); } } class RewriteExample extends React.Component { constructor(props) { super(props); this.state = {text: ''}; } render() { var limit = 20; var remainder = limit - this.state.text.length; var remainderColor = remainder > 5 ? 'blue' : 'red'; return ( <View style={styles.rewriteContainer}> <TextInput multiline={false} maxLength={limit} onChangeText={(text) => { text = text.replace(/ /g, '_'); this.setState({text}); }} style={styles.default} value={this.state.text} /> <Text style={[styles.remainder, {color: remainderColor}]}> {remainder} </Text> </View> ); } } class TokenizedTextExample extends React.Component { constructor(props) { super(props); this.state = {text: 'Hello #World'}; } render() { //define delimiter let delimiter = /\s+/; //split string let _text = this.state.text; let token, index, parts = []; while (_text) { delimiter.lastIndex = 0; token = delimiter.exec(_text); if (token === null) { break; } index = token.index; if (token[0].length === 0) { index = 1; } parts.push(_text.substr(0, index)); parts.push(token[0]); index = index + token[0].length; _text = _text.slice(index); } parts.push(_text); //highlight hashtags parts = parts.map((text) => { if (/^#/.test(text)) { return <Text key={text} style={styles.hashtag}>{text}</Text>; } else { return text; } }); return ( <View> <TextInput multiline={true} style={styles.multiline} onChangeText={(text) => { this.setState({text}); }}> <Text>{parts}</Text> </TextInput> </View> ); } } var BlurOnSubmitExample = React.createClass({ focusNextField(nextField) { this.refs[nextField].focus(); }, render: function() { return ( <View> <TextInput ref="1" style={styles.singleLine} placeholder="blurOnSubmit = false" returnKeyType="next" blurOnSubmit={false} onSubmitEditing={() => this.focusNextField('2')} /> <TextInput ref="2" style={styles.singleLine} keyboardType="email-address" placeholder="blurOnSubmit = false" returnKeyType="next" blurOnSubmit={false} onSubmitEditing={() => this.focusNextField('3')} /> <TextInput ref="3" style={styles.singleLine} keyboardType="url" placeholder="blurOnSubmit = false" returnKeyType="next" blurOnSubmit={false} onSubmitEditing={() => this.focusNextField('4')} /> <TextInput ref="4" style={styles.singleLine} keyboardType="numeric" placeholder="blurOnSubmit = false" blurOnSubmit={false} onSubmitEditing={() => this.focusNextField('5')} /> <TextInput ref="5" style={styles.singleLine} keyboardType="numbers-and-punctuation" placeholder="blurOnSubmit = true" returnKeyType="done" /> </View> ); } }); var styles = StyleSheet.create({ multiline: { height: 60, fontSize: 16, padding: 4, marginBottom: 10, }, eventLabel: { margin: 3, fontSize: 12, }, singleLine: { fontSize: 16, padding: 4, }, singleLineWithHeightTextInput: { height: 30, }, hashtag: { color: 'blue', fontWeight: 'bold', }, }); exports.title = '<TextInput>'; exports.description = 'Single and multi-line text inputs.'; exports.examples = [ { title: 'Auto-focus', render: function() { return ( <TextInput autoFocus={true} style={styles.singleLine} accessibilityLabel="I am the accessibility label for text input" /> ); } }, { title: "Live Re-Write (<sp> -> '_')", render: function() { return <RewriteExample />; } }, { title: 'Auto-capitalize', render: function() { var autoCapitalizeTypes = [ 'none', 'sentences', 'words', 'characters', ]; var examples = autoCapitalizeTypes.map((type) => { return ( <TextInput key={type} autoCapitalize={type} placeholder={'autoCapitalize: ' + type} style={styles.singleLine} /> ); }); return <View>{examples}</View>; } }, { title: 'Auto-correct', render: function() { return ( <View> <TextInput autoCorrect={true} placeholder="This has autoCorrect" style={styles.singleLine} /> <TextInput autoCorrect={false} placeholder="This does not have autoCorrect" style={styles.singleLine} /> </View> ); } }, { title: 'Keyboard types', render: function() { var keyboardTypes = [ 'default', 'email-address', 'numeric', 'phone-pad', ]; var examples = keyboardTypes.map((type) => { return ( <TextInput key={type} keyboardType={type} placeholder={'keyboardType: ' + type} style={styles.singleLine} /> ); }); return <View>{examples}</View>; } }, { title: 'Blur on submit', render: function(): ReactElement { return <BlurOnSubmitExample />; }, }, { title: 'Event handling', render: function(): ReactElement { return <TextEventsExample />; }, }, { title: 'Colors and text inputs', render: function() { return ( <View> <TextInput style={[styles.singleLine]} defaultValue="Default color text" /> <TextInput style={[styles.singleLine, {color: 'green'}]} defaultValue="Green Text" /> <TextInput placeholder="Default placeholder text color" style={styles.singleLine} /> <TextInput placeholder="Red placeholder text color" placeholderTextColor="red" style={styles.singleLine} /> <TextInput placeholder="Default underline color" style={styles.singleLine} /> <TextInput placeholder="Blue underline color" style={styles.singleLine} underlineColorAndroid="blue" /> <TextInput defaultValue="Same BackgroundColor as View " style={[styles.singleLine, {backgroundColor: 'rgba(100, 100, 100, 0.3)'}]}> <Text style={{backgroundColor: 'rgba(100, 100, 100, 0.3)'}}> Darker backgroundColor </Text> </TextInput> <TextInput defaultValue="Highlight Color is red" selectionColor={'red'} style={styles.singleLine}> </TextInput> </View> ); } }, { title: 'Text input, themes and heights', render: function() { return ( <TextInput placeholder="If you set height, beware of padding set from themes" style={[styles.singleLineWithHeightTextInput]} /> ); } }, { title: 'fontFamily, fontWeight and fontStyle', render: function() { return ( <View> <TextInput style={[styles.singleLine, {fontFamily: 'sans-serif'}]} placeholder="Custom fonts like Sans-Serif are supported" /> <TextInput style={[styles.singleLine, {fontFamily: 'sans-serif', fontWeight: 'bold'}]} placeholder="Sans-Serif bold" /> <TextInput style={[styles.singleLine, {fontFamily: 'sans-serif', fontStyle: 'italic'}]} placeholder="Sans-Serif italic" /> <TextInput style={[styles.singleLine, {fontFamily: 'serif'}]} placeholder="Serif" /> </View> ); } }, { title: 'Passwords', render: function() { return ( <View> <TextInput defaultValue="iloveturtles" secureTextEntry={true} style={styles.singleLine} /> <TextInput secureTextEntry={true} style={[styles.singleLine, {color: 'red'}]} placeholder="color is supported too" placeholderTextColor="red" /> </View> ); } }, { title: 'Editable', render: function() { return ( <TextInput defaultValue="Can't touch this! (>'-')> ^(' - ')^ <('-'<) (>'-')> ^(' - ')^" editable={false} style={styles.singleLine} /> ); } }, { title: 'Multiline', render: function() { return ( <View> <TextInput autoCorrect={true} placeholder="multiline, aligned top-left" placeholderTextColor="red" multiline={true} style={[styles.multiline, {textAlign: "left", textAlignVertical: "top"}]} /> <TextInput autoCorrect={true} placeholder="multiline, aligned center" placeholderTextColor="green" multiline={true} style={[styles.multiline, {textAlign: "center", textAlignVertical: "center"}]} /> <TextInput autoCorrect={true} multiline={true} style={[styles.multiline, {color: 'blue'}, {textAlign: "right", textAlignVertical: "bottom"}]}> <Text style={styles.multiline}>multiline with children, aligned bottom-right</Text> </TextInput> </View> ); } }, { title: 'Fixed number of lines', platform: 'android', render: function() { return ( <View> <TextInput numberOfLines={2} multiline={true} placeholder="Two line input" /> <TextInput numberOfLines={5} multiline={true} placeholder="Five line input" /> </View> ); } }, { title: 'Auto-expanding', render: function() { return ( <View> <AutoExpandingTextInput placeholder="height increases with content" enablesReturnKeyAutomatically={true} returnKeyType="done" /> </View> ); } }, { title: 'Attributed text', render: function() { return <TokenizedTextExample />; } }, { title: 'Return key', render: function() { var returnKeyTypes = [ 'none', 'go', 'search', 'send', 'done', 'previous', 'next', ]; var returnKeyLabels = [ 'Compile', 'React Native', ]; var examples = returnKeyTypes.map((type) => { return ( <TextInput key={type} returnKeyType={type} placeholder={'returnKeyType: ' + type} style={styles.singleLine} /> ); }); var types = returnKeyLabels.map((type) => { return ( <TextInput key={type} returnKeyLabel={type} placeholder={'returnKeyLabel: ' + type} style={styles.singleLine} /> ); }); return <View>{examples}{types}</View>; } }, { title: 'Inline Images', render: function() { return ( <View> <TextInput inlineImageLeft="ic_menu_black_24dp" placeholder="This has drawableLeft set" style={styles.singleLine} /> <TextInput inlineImageLeft="ic_menu_black_24dp" inlineImagePadding={30} placeholder="This has drawableLeft and drawablePadding set" style={styles.singleLine} /> <TextInput placeholder="This does not have drawable props set" style={styles.singleLine} /> </View> ); } }, ];
mrspeaker/react-native
Examples/UIExplorer/js/TextInputExample.android.js
JavaScript
bsd-3-clause
15,828
#! /usr/bin/python """versioneer.py (like a rocketeer, but for versions) * https://github.com/warner/python-versioneer * Brian Warner * License: Public Domain * Version: 0.7+ This file helps distutils-based projects manage their version number by just creating version-control tags. For developers who work from a VCS-generated tree (e.g. 'git clone' etc), each 'setup.py version', 'setup.py build', 'setup.py sdist' will compute a version number by asking your version-control tool about the current checkout. The version number will be written into a generated _version.py file of your choosing, where it can be included by your __init__.py For users who work from a VCS-generated tarball (e.g. 'git archive'), it will compute a version number by looking at the name of the directory created when te tarball is unpacked. This conventionally includes both the name of the project and a version number. For users who work from a tarball built by 'setup.py sdist', it will get a version number from a previously-generated _version.py file. As a result, loading code directly from the source tree will not result in a real version. If you want real versions from VCS trees (where you frequently update from the upstream repository, or do new development), you will need to do a 'setup.py version' after each update, and load code from the build/ directory. You need to provide this code with a few configuration values: versionfile_source: A project-relative pathname into which the generated version strings should be written. This is usually a _version.py next to your project's main __init__.py file. If your project uses src/myproject/__init__.py, this should be 'src/myproject/_version.py'. This file should be checked in to your VCS as usual: the copy created below by 'setup.py update_files' will include code that parses expanded VCS keywords in generated tarballs. The 'build' and 'sdist' commands will replace it with a copy that has just the calculated version string. versionfile_build: Like versionfile_source, but relative to the build directory instead of the source directory. These will differ when your setup.py uses 'package_dir='. If you have package_dir={'myproject': 'src/myproject'}, then you will probably have versionfile_build='myproject/_version.py' and versionfile_source='src/myproject/_version.py'. tag_prefix: a string, like 'PROJECTNAME-', which appears at the start of all VCS tags. If your tags look like 'myproject-1.2.0', then you should use tag_prefix='myproject-'. If you use unprefixed tags like '1.2.0', this should be an empty string. parentdir_prefix: a string, frequently the same as tag_prefix, which appears at the start of all unpacked tarball filenames. If your tarball unpacks into 'myproject-1.2.0', this should be 'myproject-'. To use it: 1: include this file in the top level of your project 2: make the following changes to the top of your setup.py: import versioneer versioneer.versionfile_source = 'src/myproject/_version.py' versioneer.versionfile_build = 'myproject/_version.py' versioneer.tag_prefix = '' # tags are like 1.2.0 versioneer.parentdir_prefix = 'myproject-' # dirname like 'myproject-1.2.0' 3: add the following arguments to the setup() call in your setup.py: version=versioneer.get_version(), cmdclass=versioneer.get_cmdclass(), 4: run 'setup.py update_files', which will create _version.py, and will append the following to your __init__.py: from _version import __version__ 5: modify your MANIFEST.in to include versioneer.py 6: add both versioneer.py and the generated _version.py to your VCS """ import os import sys import re import subprocess from distutils.core import Command from distutils.command.sdist import sdist as _sdist from distutils.command.build import build as _build versionfile_source = None versionfile_build = None tag_prefix = None parentdir_prefix = None VCS = "git" IN_LONG_VERSION_PY = False GIT = "git" LONG_VERSION_PY = ''' IN_LONG_VERSION_PY = True # This file helps to compute a version number in source trees obtained from # git-archive tarball (such as those provided by github's download-from-tag # feature). Distribution tarballs (build by setup.py sdist) and build # directories (produced by setup.py build) will contain a much shorter file # that just contains the computed version number. # This file is released into the public domain. Generated by # versioneer-0.7+ (https://github.com/warner/python-versioneer) # these strings will be replaced by git during git-archive git_refnames = "%(DOLLAR)sFormat:%%d%(DOLLAR)s" git_full = "%(DOLLAR)sFormat:%%H%(DOLLAR)s" GIT = "git" import subprocess import sys def run_command(args, cwd=None, verbose=False): try: # remember shell=False, so use git.cmd on windows, not just git p = subprocess.Popen(args, stdout=subprocess.PIPE, cwd=cwd) except EnvironmentError: e = sys.exc_info()[1] if verbose: print("unable to run %%s" %% args[0]) print(e) return None stdout = p.communicate()[0].strip() if sys.version >= '3': stdout = stdout.decode() if p.returncode != 0: if verbose: print("unable to run %%s (error)" %% args[0]) return None return stdout import sys import re import os.path def get_expanded_variables(versionfile_source): # the code embedded in _version.py can just fetch the value of these # variables. When used from setup.py, we don't want to import # _version.py, so we do it with a regexp instead. This function is not # used from _version.py. variables = {} try: for line in open(versionfile_source,"r").readlines(): if line.strip().startswith("git_refnames ="): mo = re.search(r'=\s*"(.*)"', line) if mo: variables["refnames"] = mo.group(1) if line.strip().startswith("git_full ="): mo = re.search(r'=\s*"(.*)"', line) if mo: variables["full"] = mo.group(1) except EnvironmentError: pass return variables def versions_from_expanded_variables(variables, tag_prefix, verbose=False): refnames = variables["refnames"].strip() if refnames.startswith("$Format"): if verbose: print("variables are unexpanded, not using") return {} # unexpanded, so not in an unpacked git-archive tarball refs = set([r.strip() for r in refnames.strip("()").split(",")]) for ref in list(refs): if not re.search(r'\d', ref): if verbose: print("discarding '%%s', no digits" %% ref) refs.discard(ref) # Assume all version tags have a digit. git's %%d expansion # behaves like git log --decorate=short and strips out the # refs/heads/ and refs/tags/ prefixes that would let us # distinguish between branches and tags. By ignoring refnames # without digits, we filter out many common branch names like # "release" and "stabilization", as well as "HEAD" and "master". if verbose: print("remaining refs: %%s" %% ",".join(sorted(refs))) for ref in sorted(refs): # sorting will prefer e.g. "2.0" over "2.0rc1" if ref.startswith(tag_prefix): r = ref[len(tag_prefix):] if verbose: print("picking %%s" %% r) return { "version": r, "full": variables["full"].strip() } # no suitable tags, so we use the full revision id if verbose: print("no suitable tags, using full revision id") return { "version": variables["full"].strip(), "full": variables["full"].strip() } def versions_from_vcs(tag_prefix, versionfile_source, verbose=False): # this runs 'git' from the root of the source tree. That either means # someone ran a setup.py command (and this code is in versioneer.py, so # IN_LONG_VERSION_PY=False, thus the containing directory is the root of # the source tree), or someone ran a project-specific entry point (and # this code is in _version.py, so IN_LONG_VERSION_PY=True, thus the # containing directory is somewhere deeper in the source tree). This only # gets called if the git-archive 'subst' variables were *not* expanded, # and _version.py hasn't already been rewritten with a short version # string, meaning we're inside a checked out source tree. try: here = os.path.realpath(__file__) except NameError: # some py2exe/bbfreeze/non-CPython implementations don't do __file__ return {} # not always correct # versionfile_source is the relative path from the top of the source tree # (where the .git directory might live) to this file. Invert this to find # the root from __file__. root = here if IN_LONG_VERSION_PY: for i in range(len(versionfile_source.split("/"))): root = os.path.dirname(root) else: root = os.path.dirname(here) if not os.path.exists(os.path.join(root, ".git")): if verbose: print("no .git in %%s" %% root) return {} stdout = run_command([GIT, "describe", "--tags", "--dirty", "--always"], cwd=root) if stdout is None: return {} if not stdout.startswith(tag_prefix): if verbose: print("tag '%%s' doesn't start with prefix '%%s'" %% (stdout, tag_prefix)) return {} tag = stdout[len(tag_prefix):] stdout = run_command([GIT, "rev-parse", "HEAD"], cwd=root) if stdout is None: return {} full = stdout.strip() if tag.endswith("-dirty"): full += "-dirty" return {"version": tag, "full": full} def versions_from_parentdir(parentdir_prefix, versionfile_source, verbose=False): if IN_LONG_VERSION_PY: # We're running from _version.py. If it's from a source tree # (execute-in-place), we can work upwards to find the root of the # tree, and then check the parent directory for a version string. If # it's in an installed application, there's no hope. try: here = os.path.realpath(__file__) except NameError: # py2exe/bbfreeze/non-CPython don't have __file__ return {} # without __file__, we have no hope # versionfile_source is the relative path from the top of the source # tree to _version.py. Invert this to find the root from __file__. root = here for i in range(len(versionfile_source.split("/"))): root = os.path.dirname(root) else: # we're running from versioneer.py, which means we're running from # the setup.py in a source tree. sys.argv[0] is setup.py in the root. here = os.path.realpath(sys.argv[0]) root = os.path.dirname(here) # Source tarballs conventionally unpack into a directory that includes # both the project name and a version string. dirname = os.path.basename(root) if not dirname.startswith(parentdir_prefix): if verbose: print("guessing rootdir is '%%s', but '%%s' doesn't start with prefix '%%s'" %% (root, dirname, parentdir_prefix)) return None return {"version": dirname[len(parentdir_prefix):], "full": ""} tag_prefix = "%(TAG_PREFIX)s" parentdir_prefix = "%(PARENTDIR_PREFIX)s" versionfile_source = "%(VERSIONFILE_SOURCE)s" def get_versions(default={"version": "unknown", "full": ""}, verbose=False): variables = { "refnames": git_refnames, "full": git_full } ver = versions_from_expanded_variables(variables, tag_prefix, verbose) if not ver: ver = versions_from_vcs(tag_prefix, versionfile_source, verbose) if not ver: ver = versions_from_parentdir(parentdir_prefix, versionfile_source, verbose) if not ver: ver = default return ver ''' def run_command(args, cwd=None, verbose=False): try: # remember shell=False, so use git.cmd on windows, not just git p = subprocess.Popen(args, stdout=subprocess.PIPE, cwd=cwd) except EnvironmentError: e = sys.exc_info()[1] if verbose: print("unable to run %s" % args[0]) print(e) return None stdout = p.communicate()[0].strip() if sys.version >= '3': stdout = stdout.decode() if p.returncode != 0: if verbose: print("unable to run %s (error)" % args[0]) return None return stdout def get_expanded_variables(versionfile_source): # the code embedded in _version.py can just fetch the value of these # variables. When used from setup.py, we don't want to import # _version.py, so we do it with a regexp instead. This function is not # used from _version.py. variables = {} try: for line in open(versionfile_source,"r").readlines(): if line.strip().startswith("git_refnames ="): mo = re.search(r'=\s*"(.*)"', line) if mo: variables["refnames"] = mo.group(1) if line.strip().startswith("git_full ="): mo = re.search(r'=\s*"(.*)"', line) if mo: variables["full"] = mo.group(1) except EnvironmentError: pass return variables def versions_from_expanded_variables(variables, tag_prefix, verbose=False): refnames = variables["refnames"].strip() if refnames.startswith("$Format"): if verbose: print("variables are unexpanded, not using") return {} # unexpanded, so not in an unpacked git-archive tarball refs = set([r.strip() for r in refnames.strip("()").split(",")]) for ref in list(refs): if not re.search(r'\d', ref): if verbose: print("discarding '%s', no digits" % ref) refs.discard(ref) # Assume all version tags have a digit. git's %d expansion # behaves like git log --decorate=short and strips out the # refs/heads/ and refs/tags/ prefixes that would let us # distinguish between branches and tags. By ignoring refnames # without digits, we filter out many common branch names like # "release" and "stabilization", as well as "HEAD" and "master". if verbose: print("remaining refs: %s" % ",".join(sorted(refs))) for ref in sorted(refs): # sorting will prefer e.g. "2.0" over "2.0rc1" if ref.startswith(tag_prefix): r = ref[len(tag_prefix):] if verbose: print("picking %s" % r) return { "version": r, "full": variables["full"].strip() } # no suitable tags, so we use the full revision id if verbose: print("no suitable tags, using full revision id") return { "version": variables["full"].strip(), "full": variables["full"].strip() } def versions_from_vcs(tag_prefix, versionfile_source, verbose=False): # this runs 'git' from the root of the source tree. That either means # someone ran a setup.py command (and this code is in versioneer.py, so # IN_LONG_VERSION_PY=False, thus the containing directory is the root of # the source tree), or someone ran a project-specific entry point (and # this code is in _version.py, so IN_LONG_VERSION_PY=True, thus the # containing directory is somewhere deeper in the source tree). This only # gets called if the git-archive 'subst' variables were *not* expanded, # and _version.py hasn't already been rewritten with a short version # string, meaning we're inside a checked out source tree. try: here = os.path.realpath(__file__) except NameError: # some py2exe/bbfreeze/non-CPython implementations don't do __file__ return {} # not always correct # versionfile_source is the relative path from the top of the source tree # (where the .git directory might live) to this file. Invert this to find # the root from __file__. root = here if IN_LONG_VERSION_PY: for i in range(len(versionfile_source.split("/"))): root = os.path.dirname(root) else: root = os.path.dirname(here) if not os.path.exists(os.path.join(root, ".git")): if verbose: print("no .git in %s" % root) return {} stdout = run_command([GIT, "describe", "--tags", "--dirty", "--always"], cwd=root) if stdout is None: return {} if not stdout.startswith(tag_prefix): if verbose: print("tag '%s' doesn't start with prefix '%s'" % (stdout, tag_prefix)) return {} tag = stdout[len(tag_prefix):] stdout = run_command([GIT, "rev-parse", "HEAD"], cwd=root) if stdout is None: return {} full = stdout.strip() if tag.endswith("-dirty"): full += "-dirty" return {"version": tag, "full": full} def versions_from_parentdir(parentdir_prefix, versionfile_source, verbose=False): if IN_LONG_VERSION_PY: # We're running from _version.py. If it's from a source tree # (execute-in-place), we can work upwards to find the root of the # tree, and then check the parent directory for a version string. If # it's in an installed application, there's no hope. try: here = os.path.realpath(__file__) except NameError: # py2exe/bbfreeze/non-CPython don't have __file__ return {} # without __file__, we have no hope # versionfile_source is the relative path from the top of the source # tree to _version.py. Invert this to find the root from __file__. root = here for i in range(len(versionfile_source.split("/"))): root = os.path.dirname(root) else: # we're running from versioneer.py, which means we're running from # the setup.py in a source tree. sys.argv[0] is setup.py in the root. here = os.path.realpath(sys.argv[0]) root = os.path.dirname(here) # Source tarballs conventionally unpack into a directory that includes # both the project name and a version string. dirname = os.path.basename(root) if not dirname.startswith(parentdir_prefix): if verbose: print("guessing rootdir is '%s', but '%s' doesn't start with prefix '%s'" % (root, dirname, parentdir_prefix)) return None return {"version": dirname[len(parentdir_prefix):], "full": ""} def do_vcs_install(versionfile_source, ipy): run_command([GIT, "add", "versioneer.py"]) run_command([GIT, "add", versionfile_source]) run_command([GIT, "add", ipy]) present = False try: f = open(".gitattributes", "r") for line in f.readlines(): if line.strip().startswith(versionfile_source): if "export-subst" in line.strip().split()[1:]: present = True f.close() except EnvironmentError: pass if not present: f = open(".gitattributes", "a+") f.write("%s export-subst\n" % versionfile_source) f.close() run_command([GIT, "add", ".gitattributes"]) SHORT_VERSION_PY = """ # This file was generated by 'versioneer.py' (0.7+) from # revision-control system data, or from the parent directory name of an # unpacked source archive. Distribution tarballs contain a pre-generated copy # of this file. version_version = '%(version)s' version_full = '%(full)s' def get_versions(default={}, verbose=False): return {'version': version_version, 'full': version_full} """ DEFAULT = {"version": "unknown", "full": "unknown"} def versions_from_file(filename): versions = {} try: f = open(filename) except EnvironmentError: return versions for line in f.readlines(): mo = re.match("version_version = '([^']+)'", line) if mo: versions["version"] = mo.group(1) mo = re.match("version_full = '([^']+)'", line) if mo: versions["full"] = mo.group(1) return versions def write_to_version_file(filename, versions): f = open(filename, "w") f.write(SHORT_VERSION_PY % versions) f.close() print("set %s to '%s'" % (filename, versions["version"])) def get_best_versions(versionfile, tag_prefix, parentdir_prefix, default=DEFAULT, verbose=False): # returns dict with two keys: 'version' and 'full' # # extract version from first of _version.py, 'git describe', parentdir. # This is meant to work for developers using a source checkout, for users # of a tarball created by 'setup.py sdist', and for users of a # tarball/zipball created by 'git archive' or github's download-from-tag # feature. variables = get_expanded_variables(versionfile_source) if variables: ver = versions_from_expanded_variables(variables, tag_prefix) if ver: if verbose: print("got version from expanded variable %s" % ver) return ver ver = versions_from_file(versionfile) if ver: if verbose: print("got version from file %s %s" % (versionfile, ver)) return ver ver = versions_from_vcs(tag_prefix, versionfile_source, verbose) if ver: if verbose: print("got version from git %s" % ver) return ver ver = versions_from_parentdir(parentdir_prefix, versionfile_source, verbose) if ver: if verbose: print("got version from parentdir %s" % ver) return ver if verbose: print("got version from default %s" % ver) return default def get_versions(default=DEFAULT, verbose=False): assert versionfile_source is not None, "please set versioneer.versionfile_source" assert tag_prefix is not None, "please set versioneer.tag_prefix" assert parentdir_prefix is not None, "please set versioneer.parentdir_prefix" return get_best_versions(versionfile_source, tag_prefix, parentdir_prefix, default=default, verbose=verbose) def get_version(verbose=False): return get_versions(verbose=verbose)["version"] class cmd_version(Command): description = "report generated version string" user_options = [] boolean_options = [] def initialize_options(self): pass def finalize_options(self): pass def run(self): ver = get_version(verbose=True) print("Version is currently: %s" % ver) class cmd_build(_build): def run(self): versions = get_versions(verbose=True) _build.run(self) # now locate _version.py in the new build/ directory and replace it # with an updated value target_versionfile = os.path.join(self.build_lib, versionfile_build) print("UPDATING %s" % target_versionfile) os.unlink(target_versionfile) f = open(target_versionfile, "w") f.write(SHORT_VERSION_PY % versions) f.close() class cmd_sdist(_sdist): def run(self): versions = get_versions(verbose=True) self._versioneer_generated_versions = versions # unless we update this, the command will keep using the old version self.distribution.metadata.version = versions["version"] return _sdist.run(self) def make_release_tree(self, base_dir, files): _sdist.make_release_tree(self, base_dir, files) # now locate _version.py in the new base_dir directory (remembering # that it may be a hardlink) and replace it with an updated value target_versionfile = os.path.join(base_dir, versionfile_source) print("UPDATING %s" % target_versionfile) os.unlink(target_versionfile) f = open(target_versionfile, "w") f.write(SHORT_VERSION_PY % self._versioneer_generated_versions) f.close() INIT_PY_SNIPPET = """ from ._version import get_versions __version__ = get_versions()['version'] del get_versions """ class cmd_update_files(Command): description = "modify __init__.py and create _version.py" user_options = [] boolean_options = [] def initialize_options(self): pass def finalize_options(self): pass def run(self): ipy = os.path.join(os.path.dirname(versionfile_source), "__init__.py") print(" creating %s" % versionfile_source) f = open(versionfile_source, "w") f.write(LONG_VERSION_PY % {"DOLLAR": "$", "TAG_PREFIX": tag_prefix, "PARENTDIR_PREFIX": parentdir_prefix, "VERSIONFILE_SOURCE": versionfile_source, }) f.close() try: old = open(ipy, "r").read() except EnvironmentError: old = "" if INIT_PY_SNIPPET not in old: print(" appending to %s" % ipy) f = open(ipy, "a") f.write(INIT_PY_SNIPPET) f.close() else: print(" %s unmodified" % ipy) do_vcs_install(versionfile_source, ipy) def get_cmdclass(): return {'version': cmd_version, 'update_files': cmd_update_files, 'build': cmd_build, 'sdist': cmd_sdist, }
sahat/bokeh
versioneer.py
Python
bsd-3-clause
25,525
<?php /** * TOP API: taobao.tmc.user.get request * * @author auto create * @since 1.0, 2015.12.04 */ class TmcUserGetRequest { /** * 需返回的字段列表,多个字段以半角逗号分隔。可选值:TmcUser结构体中的所有字段,一定要返回topic。 **/ private $fields; /** * 用户昵称 **/ private $nick; /** * 用户所属的平台类型,tbUIC:淘宝用户; icbu: icbu用户 **/ private $userPlatform; private $apiParas = array(); public function setFields($fields) { $this->fields = $fields; $this->apiParas["fields"] = $fields; } public function getFields() { return $this->fields; } public function setNick($nick) { $this->nick = $nick; $this->apiParas["nick"] = $nick; } public function getNick() { return $this->nick; } public function setUserPlatform($userPlatform) { $this->userPlatform = $userPlatform; $this->apiParas["user_platform"] = $userPlatform; } public function getUserPlatform() { return $this->userPlatform; } public function getApiMethodName() { return "taobao.tmc.user.get"; } public function getApiParas() { return $this->apiParas; } public function check() { RequestCheckUtil::checkNotNull($this->fields,"fields"); RequestCheckUtil::checkNotNull($this->nick,"nick"); RequestCheckUtil::checkMaxLength($this->nick,100,"nick"); } public function putOtherTextParam($key, $value) { $this->apiParas[$key] = $value; $this->$key = $value; } }
jasonzhangxian/scanner
common/components/topsdk/top/request/TmcUserGetRequest.php
PHP
bsd-3-clause
1,496
from django.contrib.auth.decorators import login_required from django.core.urlresolvers import reverse from django.utils.decorators import method_decorator from django.views import generic from regressiontests.generic_views.models import Artist, Author, Book, Page from regressiontests.generic_views.forms import AuthorForm class CustomTemplateView(generic.TemplateView): template_name = 'generic_views/about.html' def get_context_data(self, **kwargs): return { 'params': kwargs, 'key': 'value' } class ObjectDetail(generic.DetailView): template_name = 'generic_views/detail.html' def get_object(self): return {'foo': 'bar'} class ArtistDetail(generic.DetailView): queryset = Artist.objects.all() class AuthorDetail(generic.DetailView): queryset = Author.objects.all() class PageDetail(generic.DetailView): queryset = Page.objects.all() template_name_field = 'template' class DictList(generic.ListView): """A ListView that doesn't use a model.""" queryset = [ {'first': 'John', 'last': 'Lennon'}, {'last': 'Yoko', 'last': 'Ono'} ] template_name = 'generic_views/list.html' class AuthorList(generic.ListView): queryset = Author.objects.all() class ArtistCreate(generic.CreateView): model = Artist class NaiveAuthorCreate(generic.CreateView): queryset = Author.objects.all() class AuthorCreate(generic.CreateView): model = Author success_url = '/list/authors/' class SpecializedAuthorCreate(generic.CreateView): model = Author form_class = AuthorForm template_name = 'generic_views/form.html' context_object_name = 'thingy' def get_success_url(self): return reverse('author_detail', args=[self.object.id,]) class AuthorCreateRestricted(AuthorCreate): post = method_decorator(login_required)(AuthorCreate.post) class ArtistUpdate(generic.UpdateView): model = Artist class NaiveAuthorUpdate(generic.UpdateView): queryset = Author.objects.all() class AuthorUpdate(generic.UpdateView): model = Author success_url = '/list/authors/' class SpecializedAuthorUpdate(generic.UpdateView): model = Author form_class = AuthorForm template_name = 'generic_views/form.html' context_object_name = 'thingy' def get_success_url(self): return reverse('author_detail', args=[self.object.id,]) class NaiveAuthorDelete(generic.DeleteView): queryset = Author.objects.all() class AuthorDelete(generic.DeleteView): model = Author success_url = '/list/authors/' class SpecializedAuthorDelete(generic.DeleteView): queryset = Author.objects.all() template_name = 'generic_views/confirm_delete.html' context_object_name = 'thingy' def get_success_url(self): return reverse('authors_list') class BookConfig(object): queryset = Book.objects.all() date_field = 'pubdate' class BookArchive(BookConfig, generic.ArchiveIndexView): pass class BookYearArchive(BookConfig, generic.YearArchiveView): pass class BookMonthArchive(BookConfig, generic.MonthArchiveView): pass class BookWeekArchive(BookConfig, generic.WeekArchiveView): pass class BookDayArchive(BookConfig, generic.DayArchiveView): pass class BookTodayArchive(BookConfig, generic.TodayArchiveView): pass class BookDetail(BookConfig, generic.DateDetailView): pass
faun/django_test
tests/regressiontests/generic_views/views.py
Python
bsd-3-clause
3,421
"""A connection adapter that tries to use the best polling method for the platform pika is running on. """ import os import logging import socket import select import errno import time from operator import itemgetter from collections import defaultdict import threading import pika.compat from pika.compat import dictkeys from pika.adapters.base_connection import BaseConnection LOGGER = logging.getLogger(__name__) # One of select, epoll, kqueue or poll SELECT_TYPE = None # Use epoll's constants to keep life easy READ = 0x0001 WRITE = 0x0004 ERROR = 0x0008 if pika.compat.PY2: _SELECT_ERROR = select.error else: # select.error was deprecated and replaced by OSError in python 3.3 _SELECT_ERROR = OSError def _get_select_errno(error): if pika.compat.PY2: assert isinstance(error, select.error), repr(error) return error.args[0] else: assert isinstance(error, OSError), repr(error) return error.errno class SelectConnection(BaseConnection): """An asynchronous connection adapter that attempts to use the fastest event loop adapter for the given platform. """ def __init__(self, parameters=None, on_open_callback=None, on_open_error_callback=None, on_close_callback=None, stop_ioloop_on_close=True, custom_ioloop=None): """Create a new instance of the Connection object. :param pika.connection.Parameters parameters: Connection parameters :param method on_open_callback: Method to call on connection open :param on_open_error_callback: Method to call if the connection cant be opened :type on_open_error_callback: method :param method on_close_callback: Method to call on connection close :param bool stop_ioloop_on_close: Call ioloop.stop() if disconnected :param custom_ioloop: Override using the global IOLoop in Tornado :raises: RuntimeError """ ioloop = custom_ioloop or IOLoop() super(SelectConnection, self).__init__(parameters, on_open_callback, on_open_error_callback, on_close_callback, ioloop, stop_ioloop_on_close) def _adapter_connect(self): """Connect to the RabbitMQ broker, returning True on success, False on failure. :rtype: bool """ error = super(SelectConnection, self)._adapter_connect() if not error: self.ioloop.add_handler(self.socket.fileno(), self._handle_events, self.event_state) return error def _adapter_disconnect(self): """Disconnect from the RabbitMQ broker""" if self.socket: self.ioloop.remove_handler(self.socket.fileno()) super(SelectConnection, self)._adapter_disconnect() class IOLoop(object): """Singlton wrapper that decides which type of poller to use, creates an instance of it in start_poller and keeps the invoking application in a blocking state by calling the pollers start method. Poller should keep looping until IOLoop.instance().stop() is called or there is a socket error. Passes through all operations to the loaded poller object. """ def __init__(self): self._poller = self._get_poller() def __getattr__(self, attr): return getattr(self._poller, attr) def _get_poller(self): """Determine the best poller to use for this enviroment.""" poller = None if hasattr(select, 'epoll'): if not SELECT_TYPE or SELECT_TYPE == 'epoll': LOGGER.debug('Using EPollPoller') poller = EPollPoller() if not poller and hasattr(select, 'kqueue'): if not SELECT_TYPE or SELECT_TYPE == 'kqueue': LOGGER.debug('Using KQueuePoller') poller = KQueuePoller() if (not poller and hasattr(select, 'poll') and hasattr(select.poll(), 'modify')): # pylint: disable=E1101 if not SELECT_TYPE or SELECT_TYPE == 'poll': LOGGER.debug('Using PollPoller') poller = PollPoller() if not poller: LOGGER.debug('Using SelectPoller') poller = SelectPoller() return poller class SelectPoller(object): """Default behavior is to use Select since it's the widest supported and has all of the methods we need for child classes as well. One should only need to override the update_handler and start methods for additional types. """ # Drop out of the poll loop every POLL_TIMEOUT secs as a worst case, this # is only a backstop value. We will run timeouts when they are scheduled. POLL_TIMEOUT = 5 # if the poller uses MS specify 1000 POLL_TIMEOUT_MULT = 1 def __init__(self): """Create an instance of the SelectPoller """ # fd-to-handler function mappings self._fd_handlers = dict() # event-to-fdset mappings self._fd_events = {READ: set(), WRITE: set(), ERROR: set()} self._stopping = False self._timeouts = {} self._next_timeout = None self._processing_fd_event_map = {} # Mutex for controlling critical sections where ioloop-interrupt sockets # are created, used, and destroyed. Needed in case `stop()` is called # from a thread. self._mutex = threading.Lock() # ioloop-interrupt socket pair; initialized in start() self._r_interrupt = None self._w_interrupt = None def get_interrupt_pair(self): """ Use a socketpair to be able to interrupt the ioloop if called from another thread. Socketpair() is not supported on some OS (Win) so use a pair of simple UDP sockets instead. The sockets will be closed and garbage collected by python when the ioloop itself is. """ try: read_sock, write_sock = socket.socketpair() except AttributeError: LOGGER.debug("Using custom socketpair for interrupt") read_sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) read_sock.bind(('localhost', 0)) write_sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) write_sock.connect(read_sock.getsockname()) read_sock.setblocking(0) write_sock.setblocking(0) return read_sock, write_sock def read_interrupt(self, interrupt_sock, events, write_only): # pylint: disable=W0613 """ Read the interrupt byte(s). We ignore the event mask and write_only flag as we can ony get here if there's data to be read on our fd. :param int interrupt_sock: The file descriptor to read from :param int events: (unused) The events generated for this fd :param bool write_only: (unused) True if poll was called to trigger a write """ try: os.read(interrupt_sock, 512) except OSError as err: if err.errno != errno.EAGAIN: raise def add_timeout(self, deadline, callback_method): """Add the callback_method to the IOLoop timer to fire after deadline seconds. Returns a handle to the timeout. Do not confuse with Tornado's timeout where you pass in the time you want to have your callback called. Only pass in the seconds until it's to be called. :param int deadline: The number of seconds to wait to call callback :param method callback_method: The callback method :rtype: str """ timeout_at = time.time() + deadline value = {'deadline': timeout_at, 'callback': callback_method} timeout_id = hash(frozenset(value.items())) self._timeouts[timeout_id] = value if not self._next_timeout or timeout_at < self._next_timeout: self._next_timeout = timeout_at return timeout_id def remove_timeout(self, timeout_id): """Remove a timeout if it's still in the timeout stack :param str timeout_id: The timeout id to remove """ try: timeout = self._timeouts.pop(timeout_id) if timeout['deadline'] == self._next_timeout: self._next_timeout = None except KeyError: pass def get_next_deadline(self): """Get the interval to the next timeout event, or a default interval """ if self._next_timeout: timeout = max((self._next_timeout - time.time(), 0)) elif self._timeouts: deadlines = [t['deadline'] for t in self._timeouts.values()] self._next_timeout = min(deadlines) timeout = max((self._next_timeout - time.time(), 0)) else: timeout = SelectPoller.POLL_TIMEOUT timeout = min((timeout, SelectPoller.POLL_TIMEOUT)) return timeout * SelectPoller.POLL_TIMEOUT_MULT def process_timeouts(self): """Process the self._timeouts event stack""" now = time.time() to_run = [timer for timer in self._timeouts.values() if timer['deadline'] <= now] # Run the timeouts in order of deadlines. Although this shouldn't # be strictly necessary it preserves old behaviour when timeouts # were only run periodically. for t in sorted(to_run, key=itemgetter('deadline')): t['callback']() del self._timeouts[hash(frozenset(t.items()))] self._next_timeout = None def add_handler(self, fileno, handler, events): """Add a new fileno to the set to be monitored :param int fileno: The file descriptor :param method handler: What is called when an event happens :param int events: The event mask """ self._fd_handlers[fileno] = handler self.update_handler(fileno, events) def update_handler(self, fileno, events): """Set the events to the current events :param int fileno: The file descriptor :param int events: The event mask """ for ev in (READ, WRITE, ERROR): if events & ev: self._fd_events[ev].add(fileno) else: self._fd_events[ev].discard(fileno) def remove_handler(self, fileno): """Remove a file descriptor from the set :param int fileno: The file descriptor """ try: del self._processing_fd_event_map[fileno] except KeyError: pass self.update_handler(fileno, 0) del self._fd_handlers[fileno] def start(self): """Start the main poller loop. It will loop here until self._stopping""" LOGGER.debug('Starting IOLoop') self._stopping = False with self._mutex: # Watch out for reentry if self._r_interrupt is None: # Create ioloop-interrupt socket pair and register read handler. # NOTE: we defer their creation because some users (e.g., # BlockingConnection adapter) don't use the event loop and these # sockets would get reported as leaks self._r_interrupt, self._w_interrupt = self.get_interrupt_pair() self.add_handler(self._r_interrupt.fileno(), self.read_interrupt, READ) interrupt_sockets_created = True else: interrupt_sockets_created = False try: # Run event loop while not self._stopping: self.poll() self.process_timeouts() finally: # Unregister and close ioloop-interrupt socket pair if interrupt_sockets_created: with self._mutex: self.remove_handler(self._r_interrupt.fileno()) self._r_interrupt.close() self._r_interrupt = None self._w_interrupt.close() self._w_interrupt = None def stop(self): """Request exit from the ioloop.""" LOGGER.debug('Stopping IOLoop') self._stopping = True with self._mutex: if self._w_interrupt is None: return try: # Send byte to interrupt the poll loop, use write() for # consitency. os.write(self._w_interrupt.fileno(), b'X') except OSError as err: if err.errno != errno.EWOULDBLOCK: raise except Exception as err: # There's nothing sensible to do here, we'll exit the interrupt # loop after POLL_TIMEOUT secs in worst case anyway. LOGGER.warning("Failed to send ioloop interrupt: %s", err) raise def poll(self, write_only=False): """Wait for events on interested filedescriptors. :param bool write_only: Passed through to the hadnlers to indicate that they should only process write events. """ while True: try: read, write, error = select.select(self._fd_events[READ], self._fd_events[WRITE], self._fd_events[ERROR], self.get_next_deadline()) break except _SELECT_ERROR as error: if _get_select_errno(error) == errno.EINTR: continue else: raise # Build an event bit mask for each fileno we've recieved an event for fd_event_map = defaultdict(int) for fd_set, ev in zip((read, write, error), (READ, WRITE, ERROR)): for fileno in fd_set: fd_event_map[fileno] |= ev self._process_fd_events(fd_event_map, write_only) def _process_fd_events(self, fd_event_map, write_only): """ Processes the callbacks for each fileno we've recieved events. Before doing so we re-calculate the event mask based on what is currently set in case it has been changed under our feet by a previous callback. We also take a store a refernce to the fd_event_map in the class so that we can detect removal of an fileno during processing of another callback and not generate spurious callbacks on it. :param dict fd_event_map: Map of fds to events recieved on them. """ self._processing_fd_event_map = fd_event_map for fileno in dictkeys(fd_event_map): if fileno not in fd_event_map: # the fileno has been removed from the map under our feet. continue events = fd_event_map[fileno] for ev in [READ, WRITE, ERROR]: if fileno not in self._fd_events[ev]: events &= ~ev if events: handler = self._fd_handlers[fileno] handler(fileno, events, write_only=write_only) class KQueuePoller(SelectPoller): """KQueuePoller works on BSD based systems and is faster than select""" def __init__(self): """Create an instance of the KQueuePoller :param int fileno: The file descriptor to check events for :param method handler: What is called when an event happens :param int events: The events to look for """ self._kqueue = select.kqueue() super(KQueuePoller, self).__init__() def update_handler(self, fileno, events): """Set the events to the current events :param int fileno: The file descriptor :param int events: The event mask """ kevents = list() if not events & READ: if fileno in self._fd_events[READ]: kevents.append(select.kevent(fileno, filter=select.KQ_FILTER_READ, flags=select.KQ_EV_DELETE)) else: if fileno not in self._fd_events[READ]: kevents.append(select.kevent(fileno, filter=select.KQ_FILTER_READ, flags=select.KQ_EV_ADD)) if not events & WRITE: if fileno in self._fd_events[WRITE]: kevents.append(select.kevent(fileno, filter=select.KQ_FILTER_WRITE, flags=select.KQ_EV_DELETE)) else: if fileno not in self._fd_events[WRITE]: kevents.append(select.kevent(fileno, filter=select.KQ_FILTER_WRITE, flags=select.KQ_EV_ADD)) for event in kevents: self._kqueue.control([event], 0) super(KQueuePoller, self).update_handler(fileno, events) def _map_event(self, kevent): """return the event type associated with a kevent object :param kevent kevent: a kevent object as returned by kqueue.control() """ if kevent.filter == select.KQ_FILTER_READ: return READ elif kevent.filter == select.KQ_FILTER_WRITE: return WRITE elif kevent.flags & select.KQ_EV_ERROR: return ERROR def poll(self, write_only=False): """Check to see if the events that are cared about have fired. :param bool write_only: Don't look at self.events, just look to see if the adapter can write. """ while True: try: kevents = self._kqueue.control(None, 1000, self.get_next_deadline()) break except _SELECT_ERROR as error: if _get_select_errno(error) == errno.EINTR: continue else: raise fd_event_map = defaultdict(int) for event in kevents: fileno = event.ident fd_event_map[fileno] |= self._map_event(event) self._process_fd_events(fd_event_map, write_only) class PollPoller(SelectPoller): """Poll works on Linux and can have better performance than EPoll in certain scenarios. Both are faster than select. """ POLL_TIMEOUT_MULT = 1000 def __init__(self): """Create an instance of the KQueuePoller :param int fileno: The file descriptor to check events for :param method handler: What is called when an event happens :param int events: The events to look for """ self._poll = self.create_poller() super(PollPoller, self).__init__() def create_poller(self): return select.poll() # pylint: disable=E1101 def add_handler(self, fileno, handler, events): """Add a file descriptor to the poll set :param int fileno: The file descriptor to check events for :param method handler: What is called when an event happens :param int events: The events to look for """ self._poll.register(fileno, events) super(PollPoller, self).add_handler(fileno, handler, events) def update_handler(self, fileno, events): """Set the events to the current events :param int fileno: The file descriptor :param int events: The event mask """ super(PollPoller, self).update_handler(fileno, events) self._poll.modify(fileno, events) def remove_handler(self, fileno): """Remove a fileno to the set :param int fileno: The file descriptor """ super(PollPoller, self).remove_handler(fileno) self._poll.unregister(fileno) def poll(self, write_only=False): """Poll until the next timeout waiting for an event :param bool write_only: Only process write events """ while True: try: events = self._poll.poll(self.get_next_deadline()) break except _SELECT_ERROR as error: if _get_select_errno(error) == errno.EINTR: continue else: raise fd_event_map = defaultdict(int) for fileno, event in events: fd_event_map[fileno] |= event self._process_fd_events(fd_event_map, write_only) class EPollPoller(PollPoller): """EPoll works on Linux and can have better performance than Poll in certain scenarios. Both are faster than select. """ POLL_TIMEOUT_MULT = 1 def create_poller(self): return select.epoll() # pylint: disable=E1101
reddec/pika
pika/adapters/select_connection.py
Python
bsd-3-clause
21,137
/* * Copyright 2016 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ #include <map> #include <memory> #include "webrtc/sdk/android/src/jni/classreferenceholder.h" #include "webrtc/sdk/android/src/jni/jni_helpers.h" #include "webrtc/system_wrappers/include/metrics.h" #include "webrtc/system_wrappers/include/metrics_default.h" // Enables collection of native histograms and creating them. namespace webrtc_jni { JOW(void, Metrics_nativeEnable)(JNIEnv* jni, jclass) { webrtc::metrics::Enable(); } // Gets and clears native histograms. JOW(jobject, Metrics_nativeGetAndReset)(JNIEnv* jni, jclass) { jclass j_metrics_class = jni->FindClass("org/webrtc/Metrics"); jmethodID j_add = GetMethodID(jni, j_metrics_class, "add", "(Ljava/lang/String;Lorg/webrtc/Metrics$HistogramInfo;)V"); jclass j_info_class = jni->FindClass("org/webrtc/Metrics$HistogramInfo"); jmethodID j_add_sample = GetMethodID(jni, j_info_class, "addSample", "(II)V"); // Create |Metrics|. jobject j_metrics = jni->NewObject( j_metrics_class, GetMethodID(jni, j_metrics_class, "<init>", "()V")); std::map<std::string, std::unique_ptr<webrtc::metrics::SampleInfo>> histograms; webrtc::metrics::GetAndReset(&histograms); for (const auto& kv : histograms) { // Create and add samples to |HistogramInfo|. jobject j_info = jni->NewObject( j_info_class, GetMethodID(jni, j_info_class, "<init>", "(III)V"), kv.second->min, kv.second->max, static_cast<int>(kv.second->bucket_count)); for (const auto& sample : kv.second->samples) { jni->CallVoidMethod(j_info, j_add_sample, sample.first, sample.second); } // Add |HistogramInfo| to |Metrics|. jstring j_name = jni->NewStringUTF(kv.first.c_str()); jni->CallVoidMethod(j_metrics, j_add, j_name, j_info); jni->DeleteLocalRef(j_name); jni->DeleteLocalRef(j_info); } CHECK_EXCEPTION(jni); return j_metrics; } } // namespace webrtc_jni
Alkalyne/webrtctrunk
sdk/android/src/jni/androidmetrics_jni.cc
C++
bsd-3-clause
2,312
/* Copyright (c) 2007, Arvid Norberg All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the author nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "libtorrent/udp_socket.hpp" #include "libtorrent/connection_queue.hpp" #include "libtorrent/escape_string.hpp" #include <stdlib.h> #include <boost/bind.hpp> #include <boost/array.hpp> #if BOOST_VERSION < 103500 #include <asio/read.hpp> #else #include <boost/asio/read.hpp> #endif using namespace libtorrent; udp_socket::udp_socket(asio::io_service& ios, udp_socket::callback_t const& c , connection_queue& cc) : m_callback(c) , m_ipv4_sock(ios) #if TORRENT_USE_IPV6 , m_ipv6_sock(ios) #endif , m_bind_port(0) , m_v4_outstanding(0) #if TORRENT_USE_IPV6 , m_v6_outstanding(0) #endif , m_socks5_sock(ios) , m_connection_ticket(-1) , m_cc(cc) , m_resolver(ios) , m_queue_packets(false) , m_tunnel_packets(false) , m_abort(false) , m_outstanding_ops(0) { #ifdef TORRENT_DEBUG m_magic = 0x1337; m_started = false; m_outstanding_when_aborted = -1; #endif } udp_socket::~udp_socket() { #if TORRENT_USE_IPV6 TORRENT_ASSERT(m_v6_outstanding == 0); #endif TORRENT_ASSERT(m_v4_outstanding == 0); TORRENT_ASSERT(m_magic == 0x1337); TORRENT_ASSERT(!m_callback || !m_started); #ifdef TORRENT_DEBUG m_magic = 0; #endif TORRENT_ASSERT(m_outstanding_ops == 0); } #ifdef TORRENT_DEBUG #define CHECK_MAGIC check_magic_ cm_(m_magic) struct check_magic_ { check_magic_(int& m_): m(m_) { TORRENT_ASSERT(m == 0x1337); } ~check_magic_() { TORRENT_ASSERT(m == 0x1337); } int& m; }; #else #define CHECK_MAGIC do {} while (false) #endif bool udp_socket::maybe_clear_callback(mutex_t::scoped_lock& l) { if (m_outstanding_ops + m_v4_outstanding + m_v6_outstanding == 0) { // "this" may be destructed in the callback // that's why we need to unlock callback_t tmp = m_callback; m_callback.clear(); l.unlock(); return true; } return false; } void udp_socket::send(udp::endpoint const& ep, char const* p, int len, error_code& ec) { CHECK_MAGIC; TORRENT_ASSERT(is_open()); // if the sockets are closed, the udp_socket is closing too if (!is_open()) return; if (m_tunnel_packets) { // send udp packets through SOCKS5 server wrap(ep, p, len, ec); return; } if (m_queue_packets) { m_queue.push_back(queued_packet()); queued_packet& qp = m_queue.back(); qp.ep = ep; qp.buf.insert(qp.buf.begin(), p, p + len); return; } #if TORRENT_USE_IPV6 if (ep.address().is_v4() && m_ipv4_sock.is_open()) #endif m_ipv4_sock.send_to(asio::buffer(p, len), ep, 0, ec); #if TORRENT_USE_IPV6 else m_ipv6_sock.send_to(asio::buffer(p, len), ep, 0, ec); #endif } void udp_socket::on_read(udp::socket* s, error_code const& e, std::size_t bytes_transferred) { TORRENT_ASSERT(m_magic == 0x1337); mutex_t::scoped_lock l(m_mutex); #if TORRENT_USE_IPV6 if (s == &m_ipv6_sock) { TORRENT_ASSERT(m_v6_outstanding > 0); --m_v6_outstanding; } else #endif { TORRENT_ASSERT(m_v4_outstanding > 0); --m_v4_outstanding; } if (m_abort) { maybe_clear_callback(l); return; } CHECK_MAGIC; if (!m_callback) return; if (e) { l.unlock(); #ifndef BOOST_NO_EXCEPTIONS try { #endif #if TORRENT_USE_IPV6 if (s == &m_ipv4_sock) #endif m_callback(e, m_v4_ep, 0, 0); #if TORRENT_USE_IPV6 else m_callback(e, m_v6_ep, 0, 0); #endif #ifndef BOOST_NO_EXCEPTIONS } catch(std::exception&) {} #endif l.lock(); // don't stop listening on recoverable errors if (e != asio::error::host_unreachable && e != asio::error::fault && e != asio::error::connection_reset && e != asio::error::connection_refused && e != asio::error::connection_aborted && e != asio::error::operation_aborted && e != asio::error::message_size) { maybe_clear_callback(l); return; } if (m_abort) return; #if TORRENT_USE_IPV6 if (s == &m_ipv4_sock && m_v4_outstanding == 0) #endif { ++m_v4_outstanding; s->async_receive_from(asio::buffer(m_v4_buf, sizeof(m_v4_buf)) , m_v4_ep, boost::bind(&udp_socket::on_read, self(), s, _1, _2)); } #if TORRENT_USE_IPV6 else if (m_v6_outstanding == 0) { ++m_v6_outstanding; s->async_receive_from(asio::buffer(m_v6_buf, sizeof(m_v6_buf)) , m_v6_ep, boost::bind(&udp_socket::on_read, self(), s, _1, _2)); } #endif #ifdef TORRENT_DEBUG m_started = true; #endif return; } #if TORRENT_USE_IPV6 if (s == &m_ipv4_sock) #endif { #ifndef BOOST_NO_EXCEPTIONS try { #endif if (m_tunnel_packets) { l.unlock(); // if the source IP doesn't match the proxy's, ignore the packet if (m_v4_ep == m_proxy_addr) unwrap(e, m_v4_buf, bytes_transferred); } else { l.unlock(); m_callback(e, m_v4_ep, m_v4_buf, bytes_transferred); } l.lock(); #ifndef BOOST_NO_EXCEPTIONS } catch(std::exception&) {} #endif if (m_abort) return; if (m_v4_outstanding == 0) { ++m_v4_outstanding; s->async_receive_from(asio::buffer(m_v4_buf, sizeof(m_v4_buf)) , m_v4_ep, boost::bind(&udp_socket::on_read, self(), s, _1, _2)); } } #if TORRENT_USE_IPV6 else { #ifndef BOOST_NO_EXCEPTIONS try { #endif if (m_tunnel_packets) { l.unlock(); // if the source IP doesn't match the proxy's, ignore the packet if (m_v6_ep == m_proxy_addr) unwrap(e, m_v6_buf, bytes_transferred); } else { l.unlock(); m_callback(e, m_v6_ep, m_v6_buf, bytes_transferred); } #ifndef BOOST_NO_EXCEPTIONS } catch(std::exception&) {} #endif l.lock(); if (m_abort) return; if (m_v6_outstanding == 0) { ++m_v6_outstanding; s->async_receive_from(asio::buffer(m_v6_buf, sizeof(m_v6_buf)) , m_v6_ep, boost::bind(&udp_socket::on_read, self(), s, _1, _2)); } } #endif // TORRENT_USE_IPV6 #ifdef TORRENT_DEBUG m_started = true; #endif } void udp_socket::wrap(udp::endpoint const& ep, char const* p, int len, error_code& ec) { CHECK_MAGIC; using namespace libtorrent::detail; char header[25]; char* h = header; write_uint16(0, h); // reserved write_uint8(0, h); // fragment write_uint8(ep.address().is_v4()?1:4, h); // atyp write_address(ep.address(), h); write_uint16(ep.port(), h); boost::array<asio::const_buffer, 2> iovec; iovec[0] = asio::const_buffer(header, h - header); iovec[1] = asio::const_buffer(p, len); #if TORRENT_USE_IPV6 if (m_proxy_addr.address().is_v4() && m_ipv4_sock.is_open()) #endif m_ipv4_sock.send_to(iovec, m_proxy_addr, 0, ec); #if TORRENT_USE_IPV6 else m_ipv6_sock.send_to(iovec, m_proxy_addr, 0, ec); #endif } // unwrap the UDP packet from the SOCKS5 header void udp_socket::unwrap(error_code const& e, char const* buf, int size) { CHECK_MAGIC; using namespace libtorrent::detail; // the minimum socks5 header size if (size <= 10) return; char const* p = buf; p += 2; // reserved int frag = read_uint8(p); // fragmentation is not supported if (frag != 0) return; udp::endpoint sender; int atyp = read_uint8(p); if (atyp == 1) { // IPv4 sender = read_v4_endpoint<udp::endpoint>(p); } #if TORRENT_USE_IPV6 else if (atyp == 4) { // IPv6 sender = read_v6_endpoint<udp::endpoint>(p); } #endif else { // domain name not supported return; } m_callback(e, sender, p, size - (p - buf)); } void udp_socket::close() { mutex_t::scoped_lock l(m_mutex); TORRENT_ASSERT(m_magic == 0x1337); error_code ec; m_ipv4_sock.close(ec); #if TORRENT_USE_IPV6 m_ipv6_sock.close(ec); #endif m_socks5_sock.close(ec); m_resolver.cancel(); m_abort = true; #ifdef TORRENT_DEBUG m_outstanding_when_aborted = m_v4_outstanding + m_v6_outstanding; #endif if (m_connection_ticket >= 0) { m_cc.done(m_connection_ticket); m_connection_ticket = -1; // we just called done, which means on_timeout // won't be called. Decrement the outstanding // ops counter for that TORRENT_ASSERT(m_outstanding_ops > 0); --m_outstanding_ops; if (m_abort) { maybe_clear_callback(l); return; } } maybe_clear_callback(l); } void udp_socket::bind(udp::endpoint const& ep, error_code& ec) { mutex_t::scoped_lock l(m_mutex); CHECK_MAGIC; TORRENT_ASSERT(m_abort == false); if (m_abort) return; if (m_ipv4_sock.is_open()) m_ipv4_sock.close(ec); #if TORRENT_USE_IPV6 if (m_ipv6_sock.is_open()) m_ipv6_sock.close(ec); #endif if (ep.address().is_v4()) { m_ipv4_sock.open(udp::v4(), ec); if (ec) return; m_ipv4_sock.bind(ep, ec); if (ec) return; if (m_v4_outstanding == 0) { ++m_v4_outstanding; m_ipv4_sock.async_receive_from(asio::buffer(m_v4_buf, sizeof(m_v4_buf)) , m_v4_ep, boost::bind(&udp_socket::on_read, self(), &m_ipv4_sock, _1, _2)); } } #if TORRENT_USE_IPV6 else { m_ipv6_sock.set_option(v6only(true), ec); if (ec) return; m_ipv6_sock.bind(ep, ec); if (ec) return; if (m_v6_outstanding == 0) { ++m_v6_outstanding; m_ipv6_sock.async_receive_from(asio::buffer(m_v6_buf, sizeof(m_v6_buf)) , m_v6_ep, boost::bind(&udp_socket::on_read, self(), &m_ipv6_sock, _1, _2)); } } #endif #ifdef TORRENT_DEBUG m_started = true; #endif m_bind_port = ep.port(); } void udp_socket::bind(int port) { mutex_t::scoped_lock l(m_mutex); CHECK_MAGIC; TORRENT_ASSERT(m_abort == false); if (m_abort) return; error_code ec; if (m_ipv4_sock.is_open()) m_ipv4_sock.close(ec); #if TORRENT_USE_IPV6 if (m_ipv6_sock.is_open()) m_ipv6_sock.close(ec); #endif m_ipv4_sock.open(udp::v4(), ec); if (!ec) { m_ipv4_sock.bind(udp::endpoint(address_v4::any(), port), ec); if (m_v4_outstanding == 0) { ++m_v4_outstanding; m_ipv4_sock.async_receive_from(asio::buffer(m_v4_buf, sizeof(m_v4_buf)) , m_v4_ep, boost::bind(&udp_socket::on_read, self(), &m_ipv4_sock, _1, _2)); } } #if TORRENT_USE_IPV6 m_ipv6_sock.open(udp::v6(), ec); if (!ec) { m_ipv6_sock.set_option(v6only(true), ec); m_ipv6_sock.bind(udp::endpoint(address_v6::any(), port), ec); if (m_v6_outstanding == 0) { ++m_v6_outstanding; m_ipv6_sock.async_receive_from(asio::buffer(m_v6_buf, sizeof(m_v6_buf)) , m_v6_ep, boost::bind(&udp_socket::on_read, self(), &m_ipv6_sock, _1, _2)); } } #endif // TORRENT_USE_IPV6 #ifdef TORRENT_DEBUG m_started = true; #endif m_bind_port = port; } void udp_socket::set_proxy_settings(proxy_settings const& ps) { mutex_t::scoped_lock l(m_mutex); CHECK_MAGIC; error_code ec; m_socks5_sock.close(ec); m_tunnel_packets = false; m_proxy_settings = ps; if (ps.type == proxy_settings::socks5 || ps.type == proxy_settings::socks5_pw) { m_queue_packets = true; // connect to socks5 server and open up the UDP tunnel tcp::resolver::query q(ps.hostname, to_string(ps.port).elems); ++m_outstanding_ops; m_resolver.async_resolve(q, boost::bind( &udp_socket::on_name_lookup, self(), _1, _2)); } } void udp_socket::on_name_lookup(error_code const& e, tcp::resolver::iterator i) { mutex_t::scoped_lock l(m_mutex); TORRENT_ASSERT(m_outstanding_ops > 0); --m_outstanding_ops; if (m_abort) { maybe_clear_callback(l); return; } CHECK_MAGIC; if (e == asio::error::operation_aborted) return; if (e) { #ifndef BOOST_NO_EXCEPTIONS try { #endif m_callback(e, udp::endpoint(), 0, 0); #ifndef BOOST_NO_EXCEPTIONS } catch(std::exception&) {} #endif return; } m_proxy_addr.address(i->endpoint().address()); m_proxy_addr.port(i->endpoint().port()); l.unlock(); // on_connect may be called from within this thread // the semantics for on_connect and on_timeout is // a bit complicated. See comments in connection_queue.hpp // for more details. This semantic determines how and // when m_outstanding_ops may be decremented // To simplyfy this, it's probably a good idea to // merge on_connect and on_timeout to a single function ++m_outstanding_ops; m_cc.enqueue(boost::bind(&udp_socket::on_connect, self(), _1) , boost::bind(&udp_socket::on_timeout, self()), seconds(10)); } void udp_socket::on_timeout() { mutex_t::scoped_lock l(m_mutex); CHECK_MAGIC; error_code ec; m_socks5_sock.close(ec); m_connection_ticket = -1; } void udp_socket::on_connect(int ticket) { mutex_t::scoped_lock l(m_mutex); TORRENT_ASSERT(m_outstanding_ops > 0); --m_outstanding_ops; if (m_abort) { maybe_clear_callback(l); return; } CHECK_MAGIC; if (is_closed()) return; m_connection_ticket = ticket; // at this point on_timeout may be called before on_connected // so increment the outstanding ops // it may also not be called in case we call // connection_queue::done first, so be sure to // decrement if that happens ++m_outstanding_ops; error_code ec; m_socks5_sock.open(m_proxy_addr.address().is_v4()?tcp::v4():tcp::v6(), ec); ++m_outstanding_ops; m_socks5_sock.async_connect(tcp::endpoint(m_proxy_addr.address(), m_proxy_addr.port()) , boost::bind(&udp_socket::on_connected, self(), _1)); } void udp_socket::on_connected(error_code const& e) { mutex_t::scoped_lock l(m_mutex); TORRENT_ASSERT(m_outstanding_ops > 0); --m_outstanding_ops; if (m_abort) { maybe_clear_callback(l); return; } CHECK_MAGIC; if (e == asio::error::operation_aborted) return; m_cc.done(m_connection_ticket); m_connection_ticket = -1; // we just called done, which meand on_timeout // won't be called. Decrement the outstanding // ops counter for that TORRENT_ASSERT(m_outstanding_ops > 0); --m_outstanding_ops; if (m_abort) { maybe_clear_callback(l); return; } if (e) { #ifndef BOOST_NO_EXCEPTIONS try { #endif m_callback(e, udp::endpoint(), 0, 0); #ifndef BOOST_NO_EXCEPTIONS } catch(std::exception&) {} #endif return; } if (is_closed()) return; using namespace libtorrent::detail; // send SOCKS5 authentication methods char* p = &m_tmp_buf[0]; write_uint8(5, p); // SOCKS VERSION 5 if (m_proxy_settings.username.empty() || m_proxy_settings.type == proxy_settings::socks5) { write_uint8(1, p); // 1 authentication method (no auth) write_uint8(0, p); // no authentication } else { write_uint8(2, p); // 2 authentication methods write_uint8(0, p); // no authentication write_uint8(2, p); // username/password } ++m_outstanding_ops; asio::async_write(m_socks5_sock, asio::buffer(m_tmp_buf, p - m_tmp_buf) , boost::bind(&udp_socket::handshake1, self(), _1)); } void udp_socket::handshake1(error_code const& e) { mutex_t::scoped_lock l(m_mutex); TORRENT_ASSERT(m_outstanding_ops > 0); --m_outstanding_ops; if (m_abort) { maybe_clear_callback(l); return; } CHECK_MAGIC; if (e) return; ++m_outstanding_ops; asio::async_read(m_socks5_sock, asio::buffer(m_tmp_buf, 2) , boost::bind(&udp_socket::handshake2, self(), _1)); } void udp_socket::handshake2(error_code const& e) { mutex_t::scoped_lock l(m_mutex); TORRENT_ASSERT(m_outstanding_ops > 0); --m_outstanding_ops; if (m_abort) { maybe_clear_callback(l); return; } CHECK_MAGIC; if (e) return; using namespace libtorrent::detail; char* p = &m_tmp_buf[0]; int version = read_uint8(p); int method = read_uint8(p); if (version < 5) return; if (method == 0) { socks_forward_udp(l); } else if (method == 2) { if (m_proxy_settings.username.empty()) { error_code ec; m_socks5_sock.close(ec); return; } // start sub-negotiation char* p = &m_tmp_buf[0]; write_uint8(1, p); write_uint8(m_proxy_settings.username.size(), p); write_string(m_proxy_settings.username, p); write_uint8(m_proxy_settings.password.size(), p); write_string(m_proxy_settings.password, p); ++m_outstanding_ops; asio::async_write(m_socks5_sock, asio::buffer(m_tmp_buf, p - m_tmp_buf) , boost::bind(&udp_socket::handshake3, self(), _1)); } else { error_code ec; m_socks5_sock.close(ec); return; } } void udp_socket::handshake3(error_code const& e) { mutex_t::scoped_lock l(m_mutex); TORRENT_ASSERT(m_outstanding_ops > 0); --m_outstanding_ops; if (m_abort) { maybe_clear_callback(l); return; } CHECK_MAGIC; if (e) return; ++m_outstanding_ops; asio::async_read(m_socks5_sock, asio::buffer(m_tmp_buf, 2) , boost::bind(&udp_socket::handshake4, self(), _1)); } void udp_socket::handshake4(error_code const& e) { mutex_t::scoped_lock l(m_mutex); TORRENT_ASSERT(m_outstanding_ops > 0); --m_outstanding_ops; if (m_abort) { maybe_clear_callback(l); return; } CHECK_MAGIC; if (e) return; using namespace libtorrent::detail; char* p = &m_tmp_buf[0]; int version = read_uint8(p); int status = read_uint8(p); if (version != 1) return; if (status != 0) return; socks_forward_udp(l); } void udp_socket::socks_forward_udp(mutex_t::scoped_lock& l) { TORRENT_ASSERT(m_outstanding_ops > 0); --m_outstanding_ops; if (m_abort) { maybe_clear_callback(l); return; } CHECK_MAGIC; using namespace libtorrent::detail; // send SOCKS5 UDP command char* p = &m_tmp_buf[0]; write_uint8(5, p); // SOCKS VERSION 5 write_uint8(3, p); // UDP ASSOCIATE command write_uint8(0, p); // reserved write_uint8(1, p); // ATYP IPv4 write_uint32(0, p); // IP any write_uint16(m_bind_port, p); ++m_outstanding_ops; asio::async_write(m_socks5_sock, asio::buffer(m_tmp_buf, p - m_tmp_buf) , boost::bind(&udp_socket::connect1, self(), _1)); } void udp_socket::connect1(error_code const& e) { mutex_t::scoped_lock l(m_mutex); TORRENT_ASSERT(m_outstanding_ops > 0); --m_outstanding_ops; if (m_abort) { maybe_clear_callback(l); return; } CHECK_MAGIC; if (e) return; ++m_outstanding_ops; asio::async_read(m_socks5_sock, asio::buffer(m_tmp_buf, 10) , boost::bind(&udp_socket::connect2, self(), _1)); } void udp_socket::connect2(error_code const& e) { mutex_t::scoped_lock l(m_mutex); TORRENT_ASSERT(m_outstanding_ops > 0); --m_outstanding_ops; if (m_abort) { m_queue.clear(); maybe_clear_callback(l); return; } CHECK_MAGIC; if (e) { m_queue.clear(); return; } using namespace libtorrent::detail; char* p = &m_tmp_buf[0]; int version = read_uint8(p); // VERSION int status = read_uint8(p); // STATUS ++p; // RESERVED int atyp = read_uint8(p); // address type if (version != 5 || status != 0) { m_queue.clear(); return; } if (atyp == 1) { m_proxy_addr.address(address_v4(read_uint32(p))); m_proxy_addr.port(read_uint16(p)); } else { // in this case we need to read more data from the socket TORRENT_ASSERT(false && "not implemented yet!"); m_queue.clear(); return; } m_tunnel_packets = true; m_queue_packets = false; // forward all packets that were put in the queue while (!m_queue.empty()) { queued_packet const& p = m_queue.front(); error_code ec; udp_socket::send(p.ep, &p.buf[0], p.buf.size(), ec); m_queue.pop_front(); } ++m_outstanding_ops; asio::async_read(m_socks5_sock, asio::buffer(m_tmp_buf, 10) , boost::bind(&udp_socket::hung_up, self(), _1)); } void udp_socket::hung_up(error_code const& e) { mutex_t::scoped_lock l(m_mutex); TORRENT_ASSERT(m_outstanding_ops > 0); --m_outstanding_ops; if (m_abort) { maybe_clear_callback(l); return; } CHECK_MAGIC; if (e == asio::error::operation_aborted || m_abort) return; l.unlock(); // the socks connection was closed, re-open it set_proxy_settings(m_proxy_settings); } rate_limited_udp_socket::rate_limited_udp_socket(io_service& ios , callback_t const& c, connection_queue& cc) : udp_socket(ios, c, cc) , m_timer(ios) , m_queue_size_limit(200) , m_rate_limit(4000) , m_quota(4000) , m_last_tick(time_now()) { error_code ec; m_timer.expires_from_now(seconds(1), ec); m_timer.async_wait(boost::bind(&rate_limited_udp_socket::on_tick , boost::intrusive_ptr<rate_limited_udp_socket>(this), _1)); TORRENT_ASSERT(!ec); } bool rate_limited_udp_socket::send(udp::endpoint const& ep, char const* p, int len, error_code& ec, int flags) { if (m_quota < len) { // bit 1 of flags means "don't drop" if (int(m_queue.size()) >= m_queue_size_limit && (flags & 1) == 0) return false; m_queue.push_back(queued_packet()); queued_packet& qp = m_queue.back(); qp.ep = ep; qp.buf.insert(qp.buf.begin(), p, p + len); return true; } m_quota -= len; udp_socket::send(ep, p, len, ec); return true; } void rate_limited_udp_socket::on_tick(error_code const& e) { if (e) return; if (is_closed()) return; error_code ec; ptime now = time_now_hires(); m_timer.expires_at(now + seconds(1), ec); m_timer.async_wait(boost::bind(&rate_limited_udp_socket::on_tick , boost::intrusive_ptr<rate_limited_udp_socket>(this), _1)); time_duration delta = now - m_last_tick; m_last_tick = now; if (m_quota < m_rate_limit) m_quota += m_rate_limit * total_milliseconds(delta) / 1000; if (m_queue.empty()) return; while (!m_queue.empty() && int(m_queue.front().buf.size()) <= m_quota) { queued_packet const& p = m_queue.front(); TORRENT_ASSERT(m_quota >= int(p.buf.size())); m_quota -= p.buf.size(); error_code ec; udp_socket::send(p.ep, &p.buf[0], p.buf.size(), ec); m_queue.pop_front(); } } void rate_limited_udp_socket::close() { error_code ec; m_timer.cancel(ec); udp_socket::close(); }
jav/libtorrent
src/udp_socket.cpp
C++
bsd-3-clause
22,274
<!DOCTYPE html> <html> <head> <title>Flatty - Flat Administration Template</title> <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'> <meta content='text/html;charset=utf-8' http-equiv='content-type'> <meta content='Flat administration template for Twitter Bootstrap.' name='description'> <link href='<?php echo Yii::app()->theme->baseUrl; ?>/assets/images/meta_icons/favicon.ico' rel='shortcut icon' type='image/x-icon'> <link href='<?php echo Yii::app()->theme->baseUrl; ?>/assets/images/meta_icons/apple-touch-icon.png' rel='apple-touch-icon-precomposed'> <link href='<?php echo Yii::app()->theme->baseUrl; ?>/assets/images/meta_icons/apple-touch-icon-57x57.png' rel='apple-touch-icon-precomposed' sizes='57x57'> <link href='<?php echo Yii::app()->theme->baseUrl; ?>/assets/images/meta_icons/apple-touch-icon-72x72.png' rel='apple-touch-icon-precomposed' sizes='72x72'> <link href='<?php echo Yii::app()->theme->baseUrl; ?>/assets/images/meta_icons/apple-touch-icon-114x114.png' rel='apple-touch-icon-precomposed' sizes='114x114'> <link href='<?php echo Yii::app()->theme->baseUrl; ?>/assets/images/meta_icons/apple-touch-icon-144x144.png' rel='apple-touch-icon-precomposed' sizes='144x144'> <!--[if lt IE 9]> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/html5shiv.js" type="text/javascript"></script> <![endif]--> <!-- / bootstrap [required files] --> <link href="<?php echo Yii::app()->theme->baseUrl; ?>/assets/stylesheets/bootstrap/bootstrap.css" media="all" rel="stylesheet" type="text/css" /> <link href="<?php echo Yii::app()->theme->baseUrl; ?>/assets/stylesheets/bootstrap/bootstrap-responsive.css" media="all" rel="stylesheet" type="text/css" /> <!-- / jquery ui --> <link href="<?php echo Yii::app()->theme->baseUrl; ?>/assets/stylesheets/jquery_ui/jquery.ui-1.10.0.custom.css" media="all" rel="stylesheet" type="text/css" /> <link href="<?php echo Yii::app()->theme->baseUrl; ?>/assets/stylesheets/jquery_ui/jquery.ui.1.10.0.ie.css" media="all" rel="stylesheet" type="text/css" /> <!-- / switch buttons --> <link href="<?php echo Yii::app()->theme->baseUrl; ?>/assets/stylesheets/plugins/bootstrap_switch/bootstrap-switch.css" media="all" rel="stylesheet" type="text/css" /> <!-- / xeditable --> <link href="<?php echo Yii::app()->theme->baseUrl; ?>/assets/stylesheets/plugins/xeditable/bootstrap-editable.css" media="all" rel="stylesheet" type="text/css" /> <link href="<?php echo Yii::app()->theme->baseUrl; ?>/assets/stylesheets/plugins/common/bootstrap-wysihtml5.css" media="all" rel="stylesheet" type="text/css" /> <!-- / wysihtml5 (wysywig) --> <link href="<?php echo Yii::app()->theme->baseUrl; ?>/assets/stylesheets/plugins/common/bootstrap-wysihtml5.css" media="all" rel="stylesheet" type="text/css" /> <!-- / jquery file upload --> <link href="<?php echo Yii::app()->theme->baseUrl; ?>/assets/stylesheets/plugins/jquery_fileupload/jquery.fileupload-ui.css" media="all" rel="stylesheet" type="text/css" /> <!-- / full calendar --> <link href="<?php echo Yii::app()->theme->baseUrl; ?>/assets/stylesheets/plugins/fullcalendar/fullcalendar.css" media="all" rel="stylesheet" type="text/css" /> <!-- / select2 --> <link href="<?php echo Yii::app()->theme->baseUrl; ?>/assets/stylesheets/plugins/select2/select2.css" media="all" rel="stylesheet" type="text/css" /> <!-- / mention --> <link href="<?php echo Yii::app()->theme->baseUrl; ?>/assets/stylesheets/plugins/mention/mention.css" media="all" rel="stylesheet" type="text/css" /> <!-- / tabdrop (responsive tabs) --> <link href="<?php echo Yii::app()->theme->baseUrl; ?>/assets/stylesheets/plugins/tabdrop/tabdrop.css" media="all" rel="stylesheet" type="text/css" /> <!-- / jgrowl notifications --> <link href="<?php echo Yii::app()->theme->baseUrl; ?>/assets/stylesheets/plugins/jgrowl/jquery.jgrowl.min.css" media="all" rel="stylesheet" type="text/css" /> <!-- / datatables --> <link href="<?php echo Yii::app()->theme->baseUrl; ?>/assets/stylesheets/plugins/datatables/bootstrap-datatable.css" media="all" rel="stylesheet" type="text/css" /> <!-- / dynatrees (file trees) --> <link href="<?php echo Yii::app()->theme->baseUrl; ?>/assets/stylesheets/plugins/dynatree/ui.dynatree.css" media="all" rel="stylesheet" type="text/css" /> <!-- / color picker --> <link href="<?php echo Yii::app()->theme->baseUrl; ?>/assets/stylesheets/plugins/bootstrap_colorpicker/bootstrap-colorpicker.css" media="all" rel="stylesheet" type="text/css" /> <!-- / datetime picker --> <link href="<?php echo Yii::app()->theme->baseUrl; ?>/assets/stylesheets/plugins/bootstrap_datetimepicker/bootstrap-datetimepicker.min.css" media="all" rel="stylesheet" type="text/css" /> <!-- / daterange picker) --> <link href="<?php echo Yii::app()->theme->baseUrl; ?>/assets/stylesheets/plugins/bootstrap_daterangepicker/bootstrap-daterangepicker.css" media="all" rel="stylesheet" type="text/css" /> <!-- / flags (country flags) --> <link href="<?php echo Yii::app()->theme->baseUrl; ?>/assets/stylesheets/plugins/flags/flags.css" media="all" rel="stylesheet" type="text/css" /> <!-- / slider nav (address book) --> <link href="<?php echo Yii::app()->theme->baseUrl; ?>/assets/stylesheets/plugins/slider_nav/slidernav.css" media="all" rel="stylesheet" type="text/css" /> <!-- / fuelux (wizard) --> <link href="<?php echo Yii::app()->theme->baseUrl; ?>/assets/stylesheets/plugins/fuelux/wizard.css" media="all" rel="stylesheet" type="text/css" /> <!-- / theme files [required files] --> <link href="<?php echo Yii::app()->theme->baseUrl; ?>/assets/stylesheets/light-theme.css" media="all" id="color-settings-body-color" rel="stylesheet" type="text/css" /> <link href="<?php echo Yii::app()->theme->baseUrl; ?>/assets/stylesheets/theme-colors.css" media="all" rel="stylesheet" type="text/css" /> <link href="<?php echo Yii::app()->theme->baseUrl; ?>/assets/stylesheets/demo.css" media="all" rel="stylesheet" type="text/css" /> </head> <body class='contrast-purple sign-in contrast-background'> <div id='wrapper'> <div class='application'> <div class='application-content'> <a href='#'> <div class='icon-heart'></div> <span>Yincart开源商城</span> </a> </div> </div> <div class='controls'> <div class='caret'></div> <div class='form-wrapper'> <h1 class='text-center'>Sign in</h1> <!-- <form action='--><?php //echo Yii::app()->createUrl('/site/login') ?><!--' method='post'>--> <?php $form=$this->beginWidget('bootstrap.widgets.TbActiveForm', array( 'id'=>'user-login', // 'type'=>'horizontal', 'enableClientValidation'=>true, 'clientOptions'=>array( 'validateOnSubmit'=>true, ), )); ?> <?php echo $form->errorSummary($model); ?> <div class='row-fluid'> <div class='span12 icon-over-input'> <input value="" placeholder="Username" class="span12" name="UserLogin[username]" type="text" /> <i class='icon-user muted'></i> </div> </div> <div class='row-fluid'> <div class='span12 icon-over-input'> <input value="" placeholder="Password" class="span12" name="UserLogin[password]" type="password" /> <i class='icon-lock muted'></i> </div> </div> <label class='checkbox' for='remember_me'> <input id='LoginForm_rememberMe' name='UserLogin[rememberMe]' type='checkbox' value='1'> 记住我 </label> <button class='btn btn-block'>登录</button> </form> <div class='text-center'> <hr class='hr-normal'> <?php //echo CHtml::link("Forgot your password?", array('/user/recovery/recovery')); ?> </div> <?php $this->endWidget(); ?> </div> </div> <div class='login-action text-center'> <!-- <a href='--><?php //echo Yii::app()->createUrl('/site/sign_up') ?><!--'>--> <!-- <i class='icon-user'></i>--> <!-- New to Yincart?--> <!-- <strong>Sign up</strong>--> <!-- </a>--> <span style="color:#ffffff">后台管理员账号:admin 密码:admin123</span> </div> </div> <!-- / jquery --> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/jquery/jquery.min.js" type="text/javascript"></script> <!-- / jquery mobile events (for touch and slide) --> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/mobile_events/jquery.mobile-events.min.js" type="text/javascript"></script> <!-- / jquery migrate (for compatibility with new jquery) --> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/jquery/jquery-migrate.min.js" type="text/javascript"></script> <!-- / jquery ui --> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/jquery_ui/jquery-ui.min.js" type="text/javascript"></script> <!-- / jQuery UI Touch Punch --> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/jquery_ui_touch_punch/jquery.ui.touch-punch.min.js" type="text/javascript"></script> <!-- / bootstrap --> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/bootstrap/bootstrap.min.js" type="text/javascript"></script> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/flot/excanvas.js" type="text/javascript"></script> <!-- / sparklines --> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/sparklines/jquery.sparkline.min.js" type="text/javascript"></script> <!-- / flot charts --> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/flot/flot.min.js" type="text/javascript"></script> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/flot/flot.resize.js" type="text/javascript"></script> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/flot/flot.pie.js" type="text/javascript"></script> <!-- / bootstrap switch --> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/bootstrap_switch/bootstrapSwitch.min.js" type="text/javascript"></script> <!-- / fullcalendar --> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/fullcalendar/fullcalendar.min.js" type="text/javascript"></script> <!-- / datatables --> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/datatables/jquery.dataTables.min.js" type="text/javascript"></script> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/datatables/jquery.dataTables.columnFilter.js" type="text/javascript"></script> <!-- / wysihtml5 --> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/common/wysihtml5.min.js" type="text/javascript"></script> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/common/bootstrap-wysihtml5.js" type="text/javascript"></script> <!-- / select2 --> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/select2/select2.js" type="text/javascript"></script> <!-- / color picker --> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/bootstrap_colorpicker/bootstrap-colorpicker.min.js" type="text/javascript"></script> <!-- / mention --> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/mention/mention.min.js" type="text/javascript"></script> <!-- / input mask --> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/input_mask/bootstrap-inputmask.min.js" type="text/javascript"></script> <!-- / fileinput --> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/fileinput/bootstrap-fileinput.js" type="text/javascript"></script> <!-- / modernizr --> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/modernizr/modernizr.min.js" type="text/javascript"></script> <!-- / retina --> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/retina/retina.js" type="text/javascript"></script> <!-- / fileupload --> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/fileupload/tmpl.min.js" type="text/javascript"></script> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/fileupload/load-image.min.js" type="text/javascript"></script> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/fileupload/canvas-to-blob.min.js" type="text/javascript"></script> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/fileupload/jquery.iframe-transport.min.js" type="text/javascript"></script> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/fileupload/jquery.fileupload.min.js" type="text/javascript"></script> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/fileupload/jquery.fileupload-fp.min.js" type="text/javascript"></script> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/fileupload/jquery.fileupload-ui.min.js" type="text/javascript"></script> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/fileupload/jquery.fileupload-init.js" type="text/javascript"></script> <!-- / timeago --> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/timeago/jquery.timeago.js" type="text/javascript"></script> <!-- / slimscroll --> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/slimscroll/jquery.slimscroll.min.js" type="text/javascript"></script> <!-- / autosize (for textareas) --> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/autosize/jquery.autosize-min.js" type="text/javascript"></script> <!-- / charCount --> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/charCount/charCount.js" type="text/javascript"></script> <!-- / validate --> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/validate/jquery.validate.min.js" type="text/javascript"></script> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/validate/additional-methods.js" type="text/javascript"></script> <!-- / naked password --> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/naked_password/naked_password-0.2.4.min.js" type="text/javascript"></script> <!-- / nestable --> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/nestable/jquery.nestable.js" type="text/javascript"></script> <!-- / tabdrop --> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/tabdrop/bootstrap-tabdrop.js" type="text/javascript"></script> <!-- / jgrowl --> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/jgrowl/jquery.jgrowl.min.js" type="text/javascript"></script> <!-- / bootbox --> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/bootbox/bootbox.min.js" type="text/javascript"></script> <!-- / inplace editing --> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/xeditable/bootstrap-editable.min.js" type="text/javascript"></script> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/xeditable/wysihtml5.js" type="text/javascript"></script> <!-- / ckeditor --> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/ckeditor/ckeditor.js" type="text/javascript"></script> <!-- / filetrees --> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/dynatree/jquery.dynatree.min.js" type="text/javascript"></script> <!-- / datetime picker --> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/bootstrap_datetimepicker/bootstrap-datetimepicker.js" type="text/javascript"></script> <!-- / daterange picker --> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/bootstrap_daterangepicker/moment.min.js" type="text/javascript"></script> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/bootstrap_daterangepicker/bootstrap-daterangepicker.js" type="text/javascript"></script> <!-- / max length --> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/bootstrap_maxlength/bootstrap-maxlength.min.js" type="text/javascript"></script> <!-- / dropdown hover --> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/bootstrap_hover_dropdown/twitter-bootstrap-hover-dropdown.min.js" type="text/javascript"></script> <!-- / slider nav (address book) --> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/slider_nav/slidernav-min.js" type="text/javascript"></script> <!-- / fuelux --> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/fuelux/wizard.js" type="text/javascript"></script> <!-- / flatty theme [required files] --> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/nav.js" type="text/javascript"></script> <!-- / flatty theme --> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/tables.js" type="text/javascript"></script> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/theme.js" type="text/javascript"></script> <!-- / demo --> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/demo/jquery.mockjax.js" type="text/javascript"></script> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/demo/inplace_editing.js" type="text/javascript"></script> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/demo/charts.js" type="text/javascript"></script> <script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/demo/demo.js" type="text/javascript"></script> </body> </html>
zahdxj/YinCart
themes/backend/views/core/default/login.php
PHP
bsd-3-clause
18,572
package org.hisp.dhis.system.filter; /* * Copyright (c) 2004-2015, University of Oslo * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * Neither the name of the HISP project nor the names of its contributors may * be used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ import com.google.common.collect.Sets; import org.hisp.dhis.common.ValueType; import org.hisp.dhis.commons.filter.Filter; import org.hisp.dhis.dataelement.DataElement; import java.util.Set; /** * @author Lars Helge Overland */ public class AggregatableDataElementFilter implements Filter<DataElement> { public static final AggregatableDataElementFilter INSTANCE = new AggregatableDataElementFilter(); private static final Set<ValueType> VALUE_TYPES = Sets.newHashSet( ValueType.BOOLEAN, ValueType.TRUE_ONLY, ValueType.TEXT, ValueType.LONG_TEXT, ValueType.LETTER, ValueType.INTEGER, ValueType.INTEGER_POSITIVE, ValueType.INTEGER_NEGATIVE, ValueType.INTEGER_ZERO_OR_POSITIVE, ValueType.NUMBER, ValueType.UNIT_INTERVAL, ValueType.PERCENTAGE, ValueType.COORDINATE ); @Override public boolean retain( DataElement object ) { return object != null && VALUE_TYPES.contains( object.getValueType() ); } }
steffeli/inf5750-tracker-capture
dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/filter/AggregatableDataElementFilter.java
Java
bsd-3-clause
2,620
// Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "content/browser/mojo/mojo_app_connection_impl.h" #include <stdint.h> #include <utility> #include "base/bind.h" #include "content/browser/mojo/mojo_shell_context.h" namespace content { const char kBrowserMojoAppUrl[] = "system:content_browser"; namespace { void OnGotInstanceID(shell::mojom::ConnectResult result, const std::string& user_id, uint32_t remote_id) {} } // namespace // static std::unique_ptr<MojoAppConnection> MojoAppConnection::Create( const std::string& user_id, const std::string& name, const std::string& requestor_name) { return std::unique_ptr<MojoAppConnection>( new MojoAppConnectionImpl(user_id, name, requestor_name)); } MojoAppConnectionImpl::MojoAppConnectionImpl( const std::string& user_id, const std::string& name, const std::string& requestor_name) { MojoShellContext::ConnectToApplication( user_id, name, requestor_name, mojo::GetProxy(&interfaces_), shell::mojom::InterfaceProviderPtr(), base::Bind(&OnGotInstanceID)); } MojoAppConnectionImpl::~MojoAppConnectionImpl() { } void MojoAppConnectionImpl::GetInterface( const std::string& interface_name, mojo::ScopedMessagePipeHandle handle) { interfaces_->GetInterface(interface_name, std::move(handle)); } } // namespace content
axinging/chromium-crosswalk
content/browser/mojo/mojo_app_connection_impl.cc
C++
bsd-3-clause
1,495
# encoding: utf-8 require_relative './job' module CartoDB module Importer2 class FormatLinter CHARACTER_LIMIT = 1000 def self.supported?(extension) extension == '.kml' end # INFO: importer_config not used but needed for compatibility with other normalizers def initialize(filepath, job = nil, importer_config = nil) @filepath = filepath @job = job || Job.new end def run data = File.open(filepath, 'r') sample = data.read(CHARACTER_LIMIT) data.close raise KmlNetworkLinkError if sample =~ /NetworkLink.*href.*NetworkLink/m self end def converted_filepath filepath end private attr_reader :filepath, :job end # FormatLinter end # Importer2 end # CartoDB
codeandtheory/cartodb
services/importer/lib/importer/format_linter.rb
Ruby
bsd-3-clause
827
/**************************************************************************** ** ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: ** ** "Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions are ** met: ** * Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** * Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names ** of its contributors may be used to endorse or promote products derived ** from this software without specific prior written permission. ** ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." ** ** $QT_END_LICENSE$ ** ****************************************************************************/ #include <QtGui> #include "buttonwidget.h" //! [0] ButtonWidget::ButtonWidget(QStringList texts, QWidget *parent) : QWidget(parent) { signalMapper = new QSignalMapper(this); QGridLayout *gridLayout = new QGridLayout; for (int i = 0; i < texts.size(); ++i) { QPushButton *button = new QPushButton(texts[i]); connect(button, SIGNAL(clicked()), signalMapper, SLOT(map())); //! [0] //! [1] signalMapper->setMapping(button, texts[i]); gridLayout->addWidget(button, i / 3, i % 3); } connect(signalMapper, SIGNAL(mapped(QString)), //! [1] //! [2] this, SIGNAL(clicked(QString))); setLayout(gridLayout); } //! [2]
klim-iv/phantomjs-qt5
src/qt/qtbase/src/corelib/doc/snippets/qsignalmapper/buttonwidget.cpp
C++
bsd-3-clause
2,655
from __future__ import division, absolute_import, print_function import sys if sys.version_info[0] >= 3: from io import StringIO else: from io import StringIO import compiler import inspect import textwrap import tokenize from .compiler_unparse import unparse class Comment(object): """ A comment block. """ is_comment = True def __init__(self, start_lineno, end_lineno, text): # int : The first line number in the block. 1-indexed. self.start_lineno = start_lineno # int : The last line number. Inclusive! self.end_lineno = end_lineno # str : The text block including '#' character but not any leading spaces. self.text = text def add(self, string, start, end, line): """ Add a new comment line. """ self.start_lineno = min(self.start_lineno, start[0]) self.end_lineno = max(self.end_lineno, end[0]) self.text += string def __repr__(self): return '%s(%r, %r, %r)' % (self.__class__.__name__, self.start_lineno, self.end_lineno, self.text) class NonComment(object): """ A non-comment block of code. """ is_comment = False def __init__(self, start_lineno, end_lineno): self.start_lineno = start_lineno self.end_lineno = end_lineno def add(self, string, start, end, line): """ Add lines to the block. """ if string.strip(): # Only add if not entirely whitespace. self.start_lineno = min(self.start_lineno, start[0]) self.end_lineno = max(self.end_lineno, end[0]) def __repr__(self): return '%s(%r, %r)' % (self.__class__.__name__, self.start_lineno, self.end_lineno) class CommentBlocker(object): """ Pull out contiguous comment blocks. """ def __init__(self): # Start with a dummy. self.current_block = NonComment(0, 0) # All of the blocks seen so far. self.blocks = [] # The index mapping lines of code to their associated comment blocks. self.index = {} def process_file(self, file): """ Process a file object. """ if sys.version_info[0] >= 3: nxt = file.__next__ else: nxt = file.next for token in tokenize.generate_tokens(nxt): self.process_token(*token) self.make_index() def process_token(self, kind, string, start, end, line): """ Process a single token. """ if self.current_block.is_comment: if kind == tokenize.COMMENT: self.current_block.add(string, start, end, line) else: self.new_noncomment(start[0], end[0]) else: if kind == tokenize.COMMENT: self.new_comment(string, start, end, line) else: self.current_block.add(string, start, end, line) def new_noncomment(self, start_lineno, end_lineno): """ We are transitioning from a noncomment to a comment. """ block = NonComment(start_lineno, end_lineno) self.blocks.append(block) self.current_block = block def new_comment(self, string, start, end, line): """ Possibly add a new comment. Only adds a new comment if this comment is the only thing on the line. Otherwise, it extends the noncomment block. """ prefix = line[:start[1]] if prefix.strip(): # Oops! Trailing comment, not a comment block. self.current_block.add(string, start, end, line) else: # A comment block. block = Comment(start[0], end[0], string) self.blocks.append(block) self.current_block = block def make_index(self): """ Make the index mapping lines of actual code to their associated prefix comments. """ for prev, block in zip(self.blocks[:-1], self.blocks[1:]): if not block.is_comment: self.index[block.start_lineno] = prev def search_for_comment(self, lineno, default=None): """ Find the comment block just before the given line number. Returns None (or the specified default) if there is no such block. """ if not self.index: self.make_index() block = self.index.get(lineno, None) text = getattr(block, 'text', default) return text def strip_comment_marker(text): """ Strip # markers at the front of a block of comment text. """ lines = [] for line in text.splitlines(): lines.append(line.lstrip('#')) text = textwrap.dedent('\n'.join(lines)) return text def get_class_traits(klass): """ Yield all of the documentation for trait definitions on a class object. """ # FIXME: gracefully handle errors here or in the caller? source = inspect.getsource(klass) cb = CommentBlocker() cb.process_file(StringIO(source)) mod_ast = compiler.parse(source) class_ast = mod_ast.node.nodes[0] for node in class_ast.code.nodes: # FIXME: handle other kinds of assignments? if isinstance(node, compiler.ast.Assign): name = node.nodes[0].name rhs = unparse(node.expr).strip() doc = strip_comment_marker(cb.search_for_comment(node.lineno, default='')) yield name, rhs, doc
nguy/artview
docs/sphinxext/numpydoc/comment_eater.py
Python
bsd-3-clause
5,425
/** * Copyright 2013-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * @providesModule ResponderEventPlugin */ 'use strict'; var EventConstants = require('EventConstants'); var EventPluginUtils = require('EventPluginUtils'); var EventPropagators = require('EventPropagators'); var ResponderSyntheticEvent = require('ResponderSyntheticEvent'); var ResponderTouchHistoryStore = require('ResponderTouchHistoryStore'); var accumulate = require('accumulate'); var invariant = require('invariant'); var keyOf = require('keyOf'); var isStartish = EventPluginUtils.isStartish; var isMoveish = EventPluginUtils.isMoveish; var isEndish = EventPluginUtils.isEndish; var executeDirectDispatch = EventPluginUtils.executeDirectDispatch; var hasDispatches = EventPluginUtils.hasDispatches; var executeDispatchesInOrderStopAtTrue = EventPluginUtils.executeDispatchesInOrderStopAtTrue; /** * Instance of element that should respond to touch/move types of interactions, * as indicated explicitly by relevant callbacks. */ var responderInst = null; /** * Count of current touches. A textInput should become responder iff the * selection changes while there is a touch on the screen. */ var trackedTouchCount = 0; /** * Last reported number of active touches. */ var previousActiveTouches = 0; var changeResponder = function(nextResponderInst, blockHostResponder) { var oldResponderInst = responderInst; responderInst = nextResponderInst; if (ResponderEventPlugin.GlobalResponderHandler !== null) { ResponderEventPlugin.GlobalResponderHandler.onChange( oldResponderInst, nextResponderInst, blockHostResponder ); } }; var eventTypes = { /** * On a `touchStart`/`mouseDown`, is it desired that this element become the * responder? */ startShouldSetResponder: { phasedRegistrationNames: { bubbled: keyOf({onStartShouldSetResponder: null}), captured: keyOf({onStartShouldSetResponderCapture: null}), }, }, /** * On a `scroll`, is it desired that this element become the responder? This * is usually not needed, but should be used to retroactively infer that a * `touchStart` had occurred during momentum scroll. During a momentum scroll, * a touch start will be immediately followed by a scroll event if the view is * currently scrolling. * * TODO: This shouldn't bubble. */ scrollShouldSetResponder: { phasedRegistrationNames: { bubbled: keyOf({onScrollShouldSetResponder: null}), captured: keyOf({onScrollShouldSetResponderCapture: null}), }, }, /** * On text selection change, should this element become the responder? This * is needed for text inputs or other views with native selection, so the * JS view can claim the responder. * * TODO: This shouldn't bubble. */ selectionChangeShouldSetResponder: { phasedRegistrationNames: { bubbled: keyOf({onSelectionChangeShouldSetResponder: null}), captured: keyOf({onSelectionChangeShouldSetResponderCapture: null}), }, }, /** * On a `touchMove`/`mouseMove`, is it desired that this element become the * responder? */ moveShouldSetResponder: { phasedRegistrationNames: { bubbled: keyOf({onMoveShouldSetResponder: null}), captured: keyOf({onMoveShouldSetResponderCapture: null}), }, }, /** * Direct responder events dispatched directly to responder. Do not bubble. */ responderStart: {registrationName: keyOf({onResponderStart: null})}, responderMove: {registrationName: keyOf({onResponderMove: null})}, responderEnd: {registrationName: keyOf({onResponderEnd: null})}, responderRelease: {registrationName: keyOf({onResponderRelease: null})}, responderTerminationRequest: { registrationName: keyOf({onResponderTerminationRequest: null}), }, responderGrant: {registrationName: keyOf({onResponderGrant: null})}, responderReject: {registrationName: keyOf({onResponderReject: null})}, responderTerminate: {registrationName: keyOf({onResponderTerminate: null})}, }; /** * * Responder System: * ---------------- * * - A global, solitary "interaction lock" on a view. * - If a node becomes the responder, it should convey visual feedback * immediately to indicate so, either by highlighting or moving accordingly. * - To be the responder means, that touches are exclusively important to that * responder view, and no other view. * - While touches are still occurring, the responder lock can be transferred to * a new view, but only to increasingly "higher" views (meaning ancestors of * the current responder). * * Responder being granted: * ------------------------ * * - Touch starts, moves, and scrolls can cause an ID to become the responder. * - We capture/bubble `startShouldSetResponder`/`moveShouldSetResponder` to * the "appropriate place". * - If nothing is currently the responder, the "appropriate place" is the * initiating event's `targetID`. * - If something *is* already the responder, the "appropriate place" is the * first common ancestor of the event target and the current `responderInst`. * - Some negotiation happens: See the timing diagram below. * - Scrolled views automatically become responder. The reasoning is that a * platform scroll view that isn't built on top of the responder system has * began scrolling, and the active responder must now be notified that the * interaction is no longer locked to it - the system has taken over. * * - Responder being released: * As soon as no more touches that *started* inside of descendants of the * *current* responderInst, an `onResponderRelease` event is dispatched to the * current responder, and the responder lock is released. * * TODO: * - on "end", a callback hook for `onResponderEndShouldRemainResponder` that * determines if the responder lock should remain. * - If a view shouldn't "remain" the responder, any active touches should by * default be considered "dead" and do not influence future negotiations or * bubble paths. It should be as if those touches do not exist. * -- For multitouch: Usually a translate-z will choose to "remain" responder * after one out of many touches ended. For translate-y, usually the view * doesn't wish to "remain" responder after one of many touches end. * - Consider building this on top of a `stopPropagation` model similar to * `W3C` events. * - Ensure that `onResponderTerminate` is called on touch cancels, whether or * not `onResponderTerminationRequest` returns `true` or `false`. * */ /* Negotiation Performed +-----------------------+ / \ Process low level events to + Current Responder + wantsResponderID determine who to perform negot-| (if any exists at all) | iation/transition | Otherwise just pass through| -------------------------------+----------------------------+------------------+ Bubble to find first ID | | to return true:wantsResponderID| | | | +-------------+ | | | onTouchStart| | | +------+------+ none | | | return| | +-----------v-------------+true| +------------------------+ | |onStartShouldSetResponder|----->|onResponderStart (cur) |<-----------+ +-----------+-------------+ | +------------------------+ | | | | | +--------+-------+ | returned true for| false:REJECT +-------->|onResponderReject | wantsResponderID | | | +----------------+ | (now attempt | +------------------+-----+ | | handoff) | | onResponder | | +------------------->| TerminationRequest| | | +------------------+-----+ | | | | +----------------+ | true:GRANT +-------->|onResponderGrant| | | +--------+-------+ | +------------------------+ | | | | onResponderTerminate |<-----------+ | +------------------+-----+ | | | | +----------------+ | +-------->|onResponderStart| | | +----------------+ Bubble to find first ID | | to return true:wantsResponderID| | | | +-------------+ | | | onTouchMove | | | +------+------+ none | | | return| | +-----------v-------------+true| +------------------------+ | |onMoveShouldSetResponder |----->|onResponderMove (cur) |<-----------+ +-----------+-------------+ | +------------------------+ | | | | | +--------+-------+ | returned true for| false:REJECT +-------->|onResponderRejec| | wantsResponderID | | | +----------------+ | (now attempt | +------------------+-----+ | | handoff) | | onResponder | | +------------------->| TerminationRequest| | | +------------------+-----+ | | | | +----------------+ | true:GRANT +-------->|onResponderGrant| | | +--------+-------+ | +------------------------+ | | | | onResponderTerminate |<-----------+ | +------------------+-----+ | | | | +----------------+ | +-------->|onResponderMove | | | +----------------+ | | | | Some active touch started| | inside current responder | +------------------------+ | +------------------------->| onResponderEnd | | | | +------------------------+ | +---+---------+ | | | onTouchEnd | | | +---+---------+ | | | | +------------------------+ | +------------------------->| onResponderEnd | | No active touches started| +-----------+------------+ | inside current responder | | | | v | | +------------------------+ | | | onResponderRelease | | | +------------------------+ | | | + + */ /** * A note about event ordering in the `EventPluginHub`. * * Suppose plugins are injected in the following order: * * `[R, S, C]` * * To help illustrate the example, assume `S` is `SimpleEventPlugin` (for * `onClick` etc) and `R` is `ResponderEventPlugin`. * * "Deferred-Dispatched Events": * * - The current event plugin system will traverse the list of injected plugins, * in order, and extract events by collecting the plugin's return value of * `extractEvents()`. * - These events that are returned from `extractEvents` are "deferred * dispatched events". * - When returned from `extractEvents`, deferred-dispatched events contain an * "accumulation" of deferred dispatches. * - These deferred dispatches are accumulated/collected before they are * returned, but processed at a later time by the `EventPluginHub` (hence the * name deferred). * * In the process of returning their deferred-dispatched events, event plugins * themselves can dispatch events on-demand without returning them from * `extractEvents`. Plugins might want to do this, so that they can use event * dispatching as a tool that helps them decide which events should be extracted * in the first place. * * "On-Demand-Dispatched Events": * * - On-demand-dispatched events are not returned from `extractEvents`. * - On-demand-dispatched events are dispatched during the process of returning * the deferred-dispatched events. * - They should not have side effects. * - They should be avoided, and/or eventually be replaced with another * abstraction that allows event plugins to perform multiple "rounds" of event * extraction. * * Therefore, the sequence of event dispatches becomes: * * - `R`s on-demand events (if any) (dispatched by `R` on-demand) * - `S`s on-demand events (if any) (dispatched by `S` on-demand) * - `C`s on-demand events (if any) (dispatched by `C` on-demand) * - `R`s extracted events (if any) (dispatched by `EventPluginHub`) * - `S`s extracted events (if any) (dispatched by `EventPluginHub`) * - `C`s extracted events (if any) (dispatched by `EventPluginHub`) * * In the case of `ResponderEventPlugin`: If the `startShouldSetResponder` * on-demand dispatch returns `true` (and some other details are satisfied) the * `onResponderGrant` deferred dispatched event is returned from * `extractEvents`. The sequence of dispatch executions in this case * will appear as follows: * * - `startShouldSetResponder` (`ResponderEventPlugin` dispatches on-demand) * - `touchStartCapture` (`EventPluginHub` dispatches as usual) * - `touchStart` (`EventPluginHub` dispatches as usual) * - `responderGrant/Reject` (`EventPluginHub` dispatches as usual) */ function setResponderAndExtractTransfer( topLevelType, targetInst, nativeEvent, nativeEventTarget ) { var shouldSetEventType = isStartish(topLevelType) ? eventTypes.startShouldSetResponder : isMoveish(topLevelType) ? eventTypes.moveShouldSetResponder : topLevelType === EventConstants.topLevelTypes.topSelectionChange ? eventTypes.selectionChangeShouldSetResponder : eventTypes.scrollShouldSetResponder; // TODO: stop one short of the current responder. var bubbleShouldSetFrom = !responderInst ? targetInst : EventPluginUtils.getLowestCommonAncestor(responderInst, targetInst); // When capturing/bubbling the "shouldSet" event, we want to skip the target // (deepest ID) if it happens to be the current responder. The reasoning: // It's strange to get an `onMoveShouldSetResponder` when you're *already* // the responder. var skipOverBubbleShouldSetFrom = bubbleShouldSetFrom === responderInst; var shouldSetEvent = ResponderSyntheticEvent.getPooled( shouldSetEventType, bubbleShouldSetFrom, nativeEvent, nativeEventTarget ); shouldSetEvent.touchHistory = ResponderTouchHistoryStore.touchHistory; if (skipOverBubbleShouldSetFrom) { EventPropagators.accumulateTwoPhaseDispatchesSkipTarget(shouldSetEvent); } else { EventPropagators.accumulateTwoPhaseDispatches(shouldSetEvent); } var wantsResponderInst = executeDispatchesInOrderStopAtTrue(shouldSetEvent); if (!shouldSetEvent.isPersistent()) { shouldSetEvent.constructor.release(shouldSetEvent); } if (!wantsResponderInst || wantsResponderInst === responderInst) { return null; } var extracted; var grantEvent = ResponderSyntheticEvent.getPooled( eventTypes.responderGrant, wantsResponderInst, nativeEvent, nativeEventTarget ); grantEvent.touchHistory = ResponderTouchHistoryStore.touchHistory; EventPropagators.accumulateDirectDispatches(grantEvent); var blockHostResponder = executeDirectDispatch(grantEvent) === true; if (responderInst) { var terminationRequestEvent = ResponderSyntheticEvent.getPooled( eventTypes.responderTerminationRequest, responderInst, nativeEvent, nativeEventTarget ); terminationRequestEvent.touchHistory = ResponderTouchHistoryStore.touchHistory; EventPropagators.accumulateDirectDispatches(terminationRequestEvent); var shouldSwitch = !hasDispatches(terminationRequestEvent) || executeDirectDispatch(terminationRequestEvent); if (!terminationRequestEvent.isPersistent()) { terminationRequestEvent.constructor.release(terminationRequestEvent); } if (shouldSwitch) { var terminateEvent = ResponderSyntheticEvent.getPooled( eventTypes.responderTerminate, responderInst, nativeEvent, nativeEventTarget ); terminateEvent.touchHistory = ResponderTouchHistoryStore.touchHistory; EventPropagators.accumulateDirectDispatches(terminateEvent); extracted = accumulate(extracted, [grantEvent, terminateEvent]); changeResponder(wantsResponderInst, blockHostResponder); } else { var rejectEvent = ResponderSyntheticEvent.getPooled( eventTypes.responderReject, wantsResponderInst, nativeEvent, nativeEventTarget ); rejectEvent.touchHistory = ResponderTouchHistoryStore.touchHistory; EventPropagators.accumulateDirectDispatches(rejectEvent); extracted = accumulate(extracted, rejectEvent); } } else { extracted = accumulate(extracted, grantEvent); changeResponder(wantsResponderInst, blockHostResponder); } return extracted; } /** * A transfer is a negotiation between a currently set responder and the next * element to claim responder status. Any start event could trigger a transfer * of responderInst. Any move event could trigger a transfer. * * @param {string} topLevelType Record from `EventConstants`. * @return {boolean} True if a transfer of responder could possibly occur. */ function canTriggerTransfer(topLevelType, topLevelInst, nativeEvent) { return topLevelInst && ( // responderIgnoreScroll: We are trying to migrate away from specifically // tracking native scroll events here and responderIgnoreScroll indicates we // will send topTouchCancel to handle canceling touch events instead (topLevelType === EventConstants.topLevelTypes.topScroll && !nativeEvent.responderIgnoreScroll) || (trackedTouchCount > 0 && topLevelType === EventConstants.topLevelTypes.topSelectionChange) || isStartish(topLevelType) || isMoveish(topLevelType) ); } /** * Returns whether or not this touch end event makes it such that there are no * longer any touches that started inside of the current `responderInst`. * * @param {NativeEvent} nativeEvent Native touch end event. * @return {boolean} Whether or not this touch end event ends the responder. */ function noResponderTouches(nativeEvent) { var touches = nativeEvent.touches; if (!touches || touches.length === 0) { return true; } for (var i = 0; i < touches.length; i++) { var activeTouch = touches[i]; var target = activeTouch.target; if (target !== null && target !== undefined && target !== 0) { // Is the original touch location inside of the current responder? var targetInst = EventPluginUtils.getInstanceFromNode(target); if (EventPluginUtils.isAncestor(responderInst, targetInst)) { return false; } } } return true; } var ResponderEventPlugin = { /* For unit testing only */ _getResponderID: function() { return responderInst ? responderInst._rootNodeID : null; }, eventTypes: eventTypes, /** * We must be resilient to `targetInst` being `null` on `touchMove` or * `touchEnd`. On certain platforms, this means that a native scroll has * assumed control and the original touch targets are destroyed. */ extractEvents: function( topLevelType, targetInst, nativeEvent, nativeEventTarget ) { if (isStartish(topLevelType)) { trackedTouchCount += 1; } else if (isEndish(topLevelType)) { trackedTouchCount -= 1; invariant( trackedTouchCount >= 0, 'Ended a touch event which was not counted in trackedTouchCount.' ); } ResponderTouchHistoryStore.recordTouchTrack(topLevelType, nativeEvent, nativeEventTarget); var extracted = canTriggerTransfer(topLevelType, targetInst, nativeEvent) ? setResponderAndExtractTransfer( topLevelType, targetInst, nativeEvent, nativeEventTarget) : null; // Responder may or may not have transferred on a new touch start/move. // Regardless, whoever is the responder after any potential transfer, we // direct all touch start/move/ends to them in the form of // `onResponderMove/Start/End`. These will be called for *every* additional // finger that move/start/end, dispatched directly to whoever is the // current responder at that moment, until the responder is "released". // // These multiple individual change touch events are are always bookended // by `onResponderGrant`, and one of // (`onResponderRelease/onResponderTerminate`). var isResponderTouchStart = responderInst && isStartish(topLevelType); var isResponderTouchMove = responderInst && isMoveish(topLevelType); var isResponderTouchEnd = responderInst && isEndish(topLevelType); var incrementalTouch = isResponderTouchStart ? eventTypes.responderStart : isResponderTouchMove ? eventTypes.responderMove : isResponderTouchEnd ? eventTypes.responderEnd : null; if (incrementalTouch) { var gesture = ResponderSyntheticEvent.getPooled( incrementalTouch, responderInst, nativeEvent, nativeEventTarget ); gesture.touchHistory = ResponderTouchHistoryStore.touchHistory; EventPropagators.accumulateDirectDispatches(gesture); extracted = accumulate(extracted, gesture); } var isResponderTerminate = responderInst && topLevelType === EventConstants.topLevelTypes.topTouchCancel; var isResponderRelease = responderInst && !isResponderTerminate && isEndish(topLevelType) && noResponderTouches(nativeEvent); var finalTouch = isResponderTerminate ? eventTypes.responderTerminate : isResponderRelease ? eventTypes.responderRelease : null; if (finalTouch) { var finalEvent = ResponderSyntheticEvent.getPooled( finalTouch, responderInst, nativeEvent, nativeEventTarget ); finalEvent.touchHistory = ResponderTouchHistoryStore.touchHistory; EventPropagators.accumulateDirectDispatches(finalEvent); extracted = accumulate(extracted, finalEvent); changeResponder(null); } var numberActiveTouches = ResponderTouchHistoryStore.touchHistory.numberActiveTouches; if (ResponderEventPlugin.GlobalInteractionHandler && numberActiveTouches !== previousActiveTouches) { ResponderEventPlugin.GlobalInteractionHandler.onChange( numberActiveTouches ); } previousActiveTouches = numberActiveTouches; return extracted; }, GlobalResponderHandler: null, GlobalInteractionHandler: null, injection: { /** * @param {{onChange: (ReactID, ReactID) => void} GlobalResponderHandler * Object that handles any change in responder. Use this to inject * integration with an existing touch handling system etc. */ injectGlobalResponderHandler: function(GlobalResponderHandler) { ResponderEventPlugin.GlobalResponderHandler = GlobalResponderHandler; }, /** * @param {{onChange: (numberActiveTouches) => void} GlobalInteractionHandler * Object that handles any change in the number of active touches. */ injectGlobalInteractionHandler: function(GlobalInteractionHandler) { ResponderEventPlugin.GlobalInteractionHandler = GlobalInteractionHandler; }, }, }; module.exports = ResponderEventPlugin;
nathanmarks/react
src/renderers/shared/stack/event/eventPlugins/ResponderEventPlugin.js
JavaScript
bsd-3-clause
25,013
/* * BridJ - Dynamic and blazing-fast native interop for Java. * http://bridj.googlecode.com/ * * Copyright (c) 2010-2015, Olivier Chafik (http://ochafik.com/) * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of Olivier Chafik nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY OLIVIER CHAFIK AND CONTRIBUTORS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.bridj; import static org.bridj.Pointer.allocate; import static org.bridj.Pointer.allocateArray; import java.util.AbstractList; import java.util.Collection; import java.util.RandomAccess; import org.bridj.Pointer.ListType; /** * TODO : smart rewrite by chunks for removeAll and retainAll ! * * @author ochafik * @param <T> component type */ class DefaultNativeList<T> extends AbstractList<T> implements NativeList<T>, RandomAccess { /* * For optimization purposes, please look at AbstractList.java and AbstractCollection.java : * http://www.koders.com/java/fidCFCB47A1819AB345234CC04B6A1EA7554C2C17C0.aspx?s=iso * http://www.koders.com/java/fidA34BB0789922998CD34313EE49D61B06851A4397.aspx?s=iso * * We've reimplemented more methods than needed on purpose, for performance reasons (mainly using a native-optimized indexOf, that uses memmem and avoids deserializing too many elements) */ final ListType type; final PointerIO<T> io; volatile Pointer<T> pointer; volatile long size; public Pointer<?> getPointer() { return pointer; } /** * Create a native list that uses the provided storage and implementation * strategy * * @param pointer * @param type Implementation type */ DefaultNativeList(Pointer<T> pointer, ListType type) { if (pointer == null || type == null) { throw new IllegalArgumentException("Cannot build a " + getClass().getSimpleName() + " with " + pointer + " and " + type); } this.io = pointer.getIO("Cannot create a list out of untyped pointer " + pointer); this.type = type; this.size = pointer.getValidElements(); this.pointer = pointer; } protected void checkModifiable() { if (type == ListType.Unmodifiable) { throw new UnsupportedOperationException("This list is unmodifiable"); } } protected int safelyCastLongToInt(long i, String content) { if (i > Integer.MAX_VALUE) { throw new RuntimeException(content + " is bigger than Java int's maximum value : " + i); } return (int) i; } @Override public int size() { return safelyCastLongToInt(size, "Size of the native list"); } @Override public void clear() { checkModifiable(); size = 0; } @Override public T get(int i) { if (i >= size || i < 0) { throw new IndexOutOfBoundsException("Invalid index : " + i + " (list has size " + size + ")"); } return pointer.get(i); } @Override public T set(int i, T e) { checkModifiable(); if (i >= size || i < 0) { throw new IndexOutOfBoundsException("Invalid index : " + i + " (list has size " + size + ")"); } T old = pointer.get(i); pointer.set(i, e); return old; } @SuppressWarnings("deprecation") void add(long i, T e) { checkModifiable(); if (i > size || i < 0) { throw new IndexOutOfBoundsException("Invalid index : " + i + " (list has size " + size + ")"); } requireSize(size + 1); if (i < size) { pointer.moveBytesAtOffsetTo(i, pointer, i + 1, size - i); } pointer.set(i, e); size++; } @Override public void add(int i, T e) { add((long) i, e); } protected void requireSize(long newSize) { if (newSize > pointer.getValidElements()) { switch (type) { case Dynamic: long nextSize = newSize < 5 ? newSize + 1 : (long) (newSize * 1.6); Pointer<T> newPointer = allocateArray(io, nextSize); pointer.copyTo(newPointer); pointer = newPointer; break; case FixedCapacity: throw new UnsupportedOperationException("This list has a fixed capacity, cannot grow its storage"); case Unmodifiable: // should not happen ! checkModifiable(); } } } @SuppressWarnings("deprecation") T remove(long i) { checkModifiable(); if (i >= size || i < 0) { throw new IndexOutOfBoundsException("Invalid index : " + i + " (list has size " + size + ")"); } T old = pointer.get(i); long targetSize = io.getTargetSize(); pointer.moveBytesAtOffsetTo((i + 1) * targetSize, pointer, i * targetSize, targetSize); size--; return old; } @Override public T remove(int i) { return remove((long) i); } @Override public boolean remove(Object o) { checkModifiable(); long i = indexOf(o, true, 0); if (i < 0) { return false; } remove(i); return true; } @SuppressWarnings("unchecked") long indexOf(Object o, boolean last, int offset) { Pointer<T> pointer = this.pointer; assert offset >= 0 && (last || offset > 0); if (offset > 0) { pointer = pointer.next(offset); } Pointer<T> needle = allocate(io); needle.set((T) o); Pointer<T> occurrence = last ? pointer.findLast(needle) : pointer.find(needle); if (occurrence == null) { return -1; } return occurrence.getPeer() - pointer.getPeer(); } @Override public int indexOf(Object o) { return safelyCastLongToInt(indexOf(o, false, 0), "Index of the object"); } @Override public int lastIndexOf(Object o) { return safelyCastLongToInt(indexOf(o, true, 0), "Last index of the object"); } @Override public boolean contains(Object o) { return indexOf(o) >= 0; } @Override public boolean addAll(int i, Collection<? extends T> clctn) { if (i >= 0 && i < size) { requireSize(size + clctn.size()); } return super.addAll(i, clctn); } @Override public Object[] toArray() { return pointer.validElements(size).toArray(); } @SuppressWarnings("hiding") @Override public <T> T[] toArray(T[] ts) { return pointer.validElements(size).toArray(ts); } }
nativelibs4java/BridJ
src/main/java/org/bridj/DefaultNativeList.java
Java
bsd-3-clause
8,041
from django.conf.urls.defaults import patterns, url urlpatterns = patterns( 'popcorn_gallery.users.views', url(r'^edit/$', 'edit', name='users_edit'), url(r'^delete/$', 'delete_profile', name='users_delete'), url(r'^(?P<username>[\w-]+)/$', 'profile', name='users_profile'), )
mozilla/popcorn_maker
popcorn_gallery/users/urls.py
Python
bsd-3-clause
294
/* * Copyright LWJGL. All rights reserved. * License terms: https://www.lwjgl.org/license * MACHINE GENERATED FILE, DO NOT EDIT */ package org.lwjgl.util.lz4; import javax.annotation.*; import java.nio.*; import org.lwjgl.*; import org.lwjgl.system.*; import static org.lwjgl.system.Checks.*; import static org.lwjgl.system.MemoryUtil.*; import static org.lwjgl.util.lz4.LZ4HC.LZ4_STREAMHCSIZE_VOIDP; /** * <h3>Layout</h3> * * <pre><code> * union LZ4_streamHC_t { * size_t table[LZ4_STREAMHCSIZE_VOIDP]; * {@link LZ4HCCCtxInternal struct LZ4HC_CCtx_internal} internal_donotuse; * }</code></pre> */ @NativeType("union LZ4_streamHC_t") public class LZ4StreamHC extends Struct { /** The struct size in bytes. */ public static final int SIZEOF; /** The struct alignment in bytes. */ public static final int ALIGNOF; /** The struct member offsets. */ public static final int TABLE, INTERNAL_DONOTUSE; static { Layout layout = __union( __array(POINTER_SIZE, LZ4_STREAMHCSIZE_VOIDP), __member(LZ4HCCCtxInternal.SIZEOF, LZ4HCCCtxInternal.ALIGNOF) ); SIZEOF = layout.getSize(); ALIGNOF = layout.getAlignment(); TABLE = layout.offsetof(0); INTERNAL_DONOTUSE = layout.offsetof(1); } /** * Creates a {@code LZ4StreamHC} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be * visible to the struct instance and vice versa. * * <p>The created instance holds a strong reference to the container object.</p> */ public LZ4StreamHC(ByteBuffer container) { super(memAddress(container), __checkContainer(container, SIZEOF)); } @Override public int sizeof() { return SIZEOF; } /** @return a {@link PointerBuffer} view of the {@code table} field. */ @NativeType("size_t[LZ4_STREAMHCSIZE_VOIDP]") public PointerBuffer table() { return ntable(address()); } /** @return the value at the specified index of the {@code table} field. */ @NativeType("size_t") public long table(int index) { return ntable(address(), index); } /** @return a {@link LZ4HCCCtxInternal} view of the {@code internal_donotuse} field. */ @NativeType("struct LZ4HC_CCtx_internal") public LZ4HCCCtxInternal internal_donotuse() { return ninternal_donotuse(address()); } // ----------------------------------- /** Returns a new {@code LZ4StreamHC} instance for the specified memory address. */ public static LZ4StreamHC create(long address) { return wrap(LZ4StreamHC.class, address); } /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ @Nullable public static LZ4StreamHC createSafe(long address) { return address == NULL ? null : wrap(LZ4StreamHC.class, address); } /** * Create a {@link LZ4StreamHC.Buffer} instance at the specified memory. * * @param address the memory address * @param capacity the buffer capacity */ public static LZ4StreamHC.Buffer create(long address, int capacity) { return wrap(Buffer.class, address, capacity); } /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ @Nullable public static LZ4StreamHC.Buffer createSafe(long address, int capacity) { return address == NULL ? null : wrap(Buffer.class, address, capacity); } // ----------------------------------- /** Unsafe version of {@link #table}. */ public static PointerBuffer ntable(long struct) { return memPointerBuffer(struct + LZ4StreamHC.TABLE, LZ4_STREAMHCSIZE_VOIDP); } /** Unsafe version of {@link #table(int) table}. */ public static long ntable(long struct, int index) { return memGetAddress(struct + LZ4StreamHC.TABLE + check(index, LZ4_STREAMHCSIZE_VOIDP) * POINTER_SIZE); } /** Unsafe version of {@link #internal_donotuse}. */ public static LZ4HCCCtxInternal ninternal_donotuse(long struct) { return LZ4HCCCtxInternal.create(struct + LZ4StreamHC.INTERNAL_DONOTUSE); } // ----------------------------------- /** An array of {@link LZ4StreamHC} structs. */ public static class Buffer extends StructBuffer<LZ4StreamHC, Buffer> { private static final LZ4StreamHC ELEMENT_FACTORY = LZ4StreamHC.create(-1L); /** * Creates a new {@code LZ4StreamHC.Buffer} instance backed by the specified container. * * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided * by {@link LZ4StreamHC#SIZEOF}, and its mark will be undefined. * * <p>The created buffer instance holds a strong reference to the container object.</p> */ public Buffer(ByteBuffer container) { super(container, container.remaining() / SIZEOF); } public Buffer(long address, int cap) { super(address, null, -1, 0, cap, cap); } Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { super(address, container, mark, pos, lim, cap); } @Override protected Buffer self() { return this; } @Override protected LZ4StreamHC getElementFactory() { return ELEMENT_FACTORY; } /** @return a {@link PointerBuffer} view of the {@code table} field. */ @NativeType("size_t[LZ4_STREAMHCSIZE_VOIDP]") public PointerBuffer table() { return LZ4StreamHC.ntable(address()); } /** @return the value at the specified index of the {@code table} field. */ @NativeType("size_t") public long table(int index) { return LZ4StreamHC.ntable(address(), index); } /** @return a {@link LZ4HCCCtxInternal} view of the {@code internal_donotuse} field. */ @NativeType("struct LZ4HC_CCtx_internal") public LZ4HCCCtxInternal internal_donotuse() { return LZ4StreamHC.ninternal_donotuse(address()); } } }
LWJGL-CI/lwjgl3
modules/lwjgl/lz4/src/generated/java/org/lwjgl/util/lz4/LZ4StreamHC.java
Java
bsd-3-clause
6,358
import copy from django import forms from django.db import models from django.core.exceptions import ValidationError, ImproperlyConfigured from django.db.models.fields.subclassing import Creator from djangae.forms.fields import ListFormField from django.utils.text import capfirst class _FakeModel(object): """ An object of this class can pass itself off as a model instance when used as an arguments to Field.pre_save method (item_fields of iterable fields are not actually fields of any model). """ def __init__(self, field, value): setattr(self, field.attname, value) class IterableField(models.Field): __metaclass__ = models.SubfieldBase @property def _iterable_type(self): raise NotImplementedError() def db_type(self, connection): return 'list' def get_prep_lookup(self, lookup_type, value): if hasattr(value, 'prepare'): return value.prepare() if hasattr(value, '_prepare'): return value._prepare() if value is None: raise ValueError("You can't query an iterable field with None") if lookup_type == 'isnull' and value in (True, False): return value if lookup_type != 'exact' and lookup_type != 'in': raise ValueError("You can only query using exact and in lookups on iterable fields") if isinstance(value, (list, set)): return [ self.item_field_type.to_python(x) for x in value ] return self.item_field_type.to_python(value) def get_prep_value(self, value): if value is None: raise ValueError("You can't set a {} to None (did you mean {}?)".format( self.__class__.__name__, str(self._iterable_type()) )) if isinstance(value, basestring): # Catch accidentally assigning a string to a ListField raise ValueError("Tried to assign a string to a {}".format(self.__class__.__name__)) return super(IterableField, self).get_prep_value(value) def __init__(self, item_field_type, *args, **kwargs): # This seems bonkers, we shout at people for specifying null=True, but then do it ourselves. But this is because # *we* abuse None values for our own purposes (to represent an empty iterable) if someone else tries to then # all hell breaks loose if kwargs.get("null", False): raise RuntimeError("IterableFields cannot be set as nullable (as the datastore doesn't differentiate None vs []") kwargs["null"] = True default = kwargs.get("default", []) self._original_item_field_type = copy.deepcopy(item_field_type) # For deconstruction purposes if default is not None and not callable(default): kwargs["default"] = lambda: self._iterable_type(default) if hasattr(item_field_type, 'attname'): item_field_type = item_field_type.__class__ if callable(item_field_type): item_field_type = item_field_type() if isinstance(item_field_type, models.ForeignKey): raise ImproperlyConfigured("Lists of ForeignKeys aren't supported, use RelatedSetField instead") self.item_field_type = item_field_type # We'll be pretending that item_field is a field of a model # with just one "value" field. assert not hasattr(self.item_field_type, 'attname') self.item_field_type.set_attributes_from_name('value') super(IterableField, self).__init__(*args, **kwargs) def deconstruct(self): name, path, args, kwargs = super(IterableField, self).deconstruct() args = (self._original_item_field_type,) del kwargs["null"] return name, path, args, kwargs def contribute_to_class(self, cls, name): self.item_field_type.model = cls self.item_field_type.name = name super(IterableField, self).contribute_to_class(cls, name) # If items' field uses SubfieldBase we also need to. item_metaclass = getattr(self.item_field_type, '__metaclass__', None) if item_metaclass and issubclass(item_metaclass, models.SubfieldBase): setattr(cls, self.name, Creator(self)) def _map(self, function, iterable, *args, **kwargs): return self._iterable_type(function(element, *args, **kwargs) for element in iterable) def to_python(self, value): if value is None: return self._iterable_type([]) # Because a set cannot be defined in JSON, we must allow a list to be passed as the value # of a SetField, as otherwise SetField data can't be loaded from fixtures if not hasattr(value, "__iter__"): # Allows list/set, not string raise ValueError("Tried to assign a {} to a {}".format(value.__class__.__name__, self.__class__.__name__)) return self._map(self.item_field_type.to_python, value) def pre_save(self, model_instance, add): """ Gets our value from the model_instance and passes its items through item_field's pre_save (using a fake model instance). """ value = getattr(model_instance, self.attname) if value is None: return None return self._map(lambda item: self.item_field_type.pre_save(_FakeModel(self.item_field_type, item), add), value) def get_db_prep_value(self, value, connection, prepared=False): if not prepared: value = self.get_prep_value(value) if value is None: return None # If the value is an empty iterable, store None if value == self._iterable_type([]): return None return self._map(self.item_field_type.get_db_prep_save, value, connection=connection) def get_db_prep_lookup(self, lookup_type, value, connection, prepared=False): """ Passes the value through get_db_prep_lookup of item_field. """ return self.item_field_type.get_db_prep_lookup( lookup_type, value, connection=connection, prepared=prepared) def validate(self, value_list, model_instance): """ We want to override the default validate method from django.db.fields.Field, because it is only designed to deal with a single choice from the user. """ if not self.editable: # Skip validation for non-editable fields return # Validate choices if self.choices: valid_values = [] for choice in self.choices: if isinstance(choice[0], (list, tuple)): # this is an optgroup, so look inside it for the options for optgroup_choice in choice[0]: valid_values.append(optgroup_choice[0]) else: valid_values.append(choice[0]) for value in value_list: if value not in valid_values: # TODO: if there is more than 1 invalid value then this should show all of the invalid values raise ValidationError(self.error_messages['invalid_choice'] % value) # Validate null-ness if value_list is None and not self.null: raise ValidationError(self.error_messages['null']) if not self.blank and not value_list: raise ValidationError(self.error_messages['blank']) # apply the default items validation rules for value in value_list: self.item_field_type.clean(value, model_instance) def formfield(self, **kwargs): """ If this field has choices, then we can use a multiple choice field. NB: The choices must be set on *this* field, e.g. this_field = ListField(CharField(), choices=x) as opposed to: this_field = ListField(CharField(choices=x)) """ #Largely lifted straight from Field.formfield() in django.models.__init__.py defaults = {'required': not self.blank, 'label': capfirst(self.verbose_name), 'help_text': self.help_text} if self.has_default(): #No idea what this does if callable(self.default): defaults['initial'] = self.default defaults['show_hidden_initial'] = True else: defaults['initial'] = self.get_default() if self.choices: form_field_class = forms.MultipleChoiceField defaults['choices'] = self.get_choices(include_blank=False) #no empty value on a multi-select else: form_field_class = ListFormField defaults.update(**kwargs) return form_field_class(**defaults) class ListField(IterableField): def __init__(self, *args, **kwargs): self.ordering = kwargs.pop('ordering', None) if self.ordering is not None and not callable(self.ordering): raise TypeError("'ordering' has to be a callable or None, " "not of type %r." % type(self.ordering)) super(ListField, self).__init__(*args, **kwargs) def pre_save(self, model_instance, add): value = super(ListField, self).pre_save(model_instance, add) if value and self.ordering: value.sort(key=self.ordering) return value @property def _iterable_type(self): return list def deconstruct(self): name, path, args, kwargs = super(ListField, self).deconstruct() kwargs['ordering'] = self.ordering return name, path, args, kwargs class SetField(IterableField): @property def _iterable_type(self): return set def db_type(self, connection): return 'set' def get_db_prep_save(self, *args, **kwargs): ret = super(SetField, self).get_db_prep_save(*args, **kwargs) if ret: ret = list(ret) return ret def get_db_prep_lookup(self, *args, **kwargs): ret = super(SetField, self).get_db_prep_lookup(*args, **kwargs) if ret: ret = list(ret) return ret def value_to_string(self, obj): """ Custom method for serialization, as JSON doesn't support serializing sets. """ return str(list(self._get_val_from_obj(obj)))
nealedj/djangae
djangae/fields/iterable.py
Python
bsd-3-clause
10,309
$.ajax({ url: './data/population.json', success: function (data) { var max = -Infinity; data = data.map(function (item) { max = Math.max(item[2], max); return { geoCoord: item.slice(0, 2), value: item[2] } }); data.forEach(function (item) { item.barHeight = item.value / max * 50 + 0.1 }); myChart.setOption({ title : { text: 'Gridded Population of the World (2000)', subtext: 'Data from Socioeconomic Data and Applications Center', sublink : 'http://sedac.ciesin.columbia.edu/data/set/gpw-v3-population-density/data-download#close', x:'center', y:'top', textStyle: { color: 'white' } }, tooltip: { formatter: '{b}' }, dataRange: { min: 0, max: max, text:['High','Low'], realtime: false, calculable : true, color: ['red','yellow','lightskyblue'] }, series: [{ type: 'map3d', mapType: 'world', baseLayer: { backgroundColor: 'rgba(0, 150, 200, 0.5)' }, data: [{}], itemStyle: { normal: { areaStyle: { color: 'rgba(0, 150, 200, 0.8)' }, borderColor: '#777' } }, markBar: { barSize: 0.6, data: data }, autoRotate: true, }] }); } });
wangyuefive/echarts-x
doc/example/code/map3d_population3.js
JavaScript
bsd-3-clause
1,877
"""Tools for manipulating of large commutative expressions. """ from __future__ import print_function, division from sympy.core.add import Add from sympy.core.compatibility import iterable, is_sequence, SYMPY_INTS from sympy.core.mul import Mul, _keep_coeff from sympy.core.power import Pow from sympy.core.basic import Basic, preorder_traversal from sympy.core.expr import Expr from sympy.core.sympify import sympify from sympy.core.numbers import Rational, Integer, Number, I from sympy.core.singleton import S from sympy.core.symbol import Dummy from sympy.core.coreerrors import NonCommutativeExpression from sympy.core.containers import Tuple, Dict from sympy.utilities import default_sort_key from sympy.utilities.iterables import (common_prefix, common_suffix, variations, ordered) from collections import defaultdict def _isnumber(i): return isinstance(i, (SYMPY_INTS, float)) or i.is_Number def decompose_power(expr): """ Decompose power into symbolic base and integer exponent. This is strictly only valid if the exponent from which the integer is extracted is itself an integer or the base is positive. These conditions are assumed and not checked here. Examples ======== >>> from sympy.core.exprtools import decompose_power >>> from sympy.abc import x, y >>> decompose_power(x) (x, 1) >>> decompose_power(x**2) (x, 2) >>> decompose_power(x**(2*y)) (x**y, 2) >>> decompose_power(x**(2*y/3)) (x**(y/3), 2) """ base, exp = expr.as_base_exp() if exp.is_Number: if exp.is_Rational: if not exp.is_Integer: base = Pow(base, Rational(1, exp.q)) exp = exp.p else: base, exp = expr, 1 else: exp, tail = exp.as_coeff_Mul(rational=True) if exp is S.NegativeOne: base, exp = Pow(base, tail), -1 elif exp is not S.One: tail = _keep_coeff(Rational(1, exp.q), tail) base, exp = Pow(base, tail), exp.p else: base, exp = expr, 1 return base, exp class Factors(object): """Efficient representation of ``f_1*f_2*...*f_n``.""" __slots__ = ['factors', 'gens'] def __init__(self, factors=None): # Factors """Initialize Factors from dict or expr. Examples ======== >>> from sympy.core.exprtools import Factors >>> from sympy.abc import x >>> from sympy import I >>> e = 2*x**3 >>> Factors(e) Factors({2: 1, x: 3}) >>> Factors(e.as_powers_dict()) Factors({2: 1, x: 3}) >>> f = _ >>> f.factors # underlying dictionary {2: 1, x: 3} >>> f.gens # base of each factor frozenset([2, x]) >>> Factors(0) Factors({0: 1}) >>> Factors(I) Factors({I: 1}) Notes ===== Although a dictionary can be passed, only minimal checking is performed: powers of -1 and I are made canonical. """ if isinstance(factors, (SYMPY_INTS, float)): factors = S(factors) if isinstance(factors, Factors): factors = factors.factors.copy() elif factors is None or factors is S.One: factors = {} elif factors is S.Zero or factors == 0: factors = {S.Zero: S.One} elif isinstance(factors, Number): n = factors factors = {} if n < 0: factors[S.NegativeOne] = S.One n = -n if n is not S.One: if n.is_Float or n.is_Integer or n is S.Infinity: factors[n] = S.One elif n.is_Rational: # since we're processing Numbers, the denominator is # stored with a negative exponent; all other factors # are left . if n.p != 1: factors[Integer(n.p)] = S.One factors[Integer(n.q)] = S.NegativeOne else: raise ValueError('Expected Float|Rational|Integer, not %s' % n) elif isinstance(factors, Basic) and not factors.args: factors = {factors: S.One} elif isinstance(factors, Expr): c, nc = factors.args_cnc() i = c.count(I) for _ in range(i): c.remove(I) factors = dict(Mul._from_args(c).as_powers_dict()) if i: factors[I] = S.One*i if nc: factors[Mul(*nc, evaluate=False)] = S.One else: factors = factors.copy() # /!\ should be dict-like # tidy up -/+1 and I exponents if Rational handle = [] for k in factors: if k is I or k in (-1, 1): handle.append(k) if handle: i1 = S.One for k in handle: if not _isnumber(factors[k]): continue i1 *= k**factors.pop(k) if i1 is not S.One: for a in i1.args if i1.is_Mul else [i1]: # at worst, -1.0*I*(-1)**e if a is S.NegativeOne: factors[a] = S.One elif a is I: factors[I] = S.One elif a.is_Pow: if S.NegativeOne not in factors: factors[S.NegativeOne] = S.Zero factors[S.NegativeOne] += a.exp elif a == 1: factors[a] = S.One elif a == -1: factors[-a] = S.One factors[S.NegativeOne] = S.One else: raise ValueError('unexpected factor in i1: %s' % a) self.factors = factors try: self.gens = frozenset(factors.keys()) except AttributeError: raise TypeError('expecting Expr or dictionary') def __hash__(self): # Factors keys = tuple(ordered(self.factors.keys())) values = [self.factors[k] for k in keys] return hash((keys, values)) def __repr__(self): # Factors return "Factors({%s})" % ', '.join( ['%s: %s' % (k, v) for k, v in ordered(self.factors.items())]) @property def is_zero(self): # Factors """ >>> from sympy.core.exprtools import Factors >>> Factors(0).is_zero True """ f = self.factors return len(f) == 1 and S.Zero in f @property def is_one(self): # Factors """ >>> from sympy.core.exprtools import Factors >>> Factors(1).is_one True """ return not self.factors def as_expr(self): # Factors """Return the underlying expression. Examples ======== >>> from sympy.core.exprtools import Factors >>> from sympy.abc import x, y >>> Factors((x*y**2).as_powers_dict()).as_expr() x*y**2 """ args = [] for factor, exp in self.factors.items(): if exp != 1: b, e = factor.as_base_exp() if isinstance(exp, int): e = _keep_coeff(Integer(exp), e) elif isinstance(exp, Rational): e = _keep_coeff(exp, e) else: e *= exp args.append(b**e) else: args.append(factor) return Mul(*args) def mul(self, other): # Factors """Return Factors of ``self * other``. Examples ======== >>> from sympy.core.exprtools import Factors >>> from sympy.abc import x, y, z >>> a = Factors((x*y**2).as_powers_dict()) >>> b = Factors((x*y/z).as_powers_dict()) >>> a.mul(b) Factors({x: 2, y: 3, z: -1}) >>> a*b Factors({x: 2, y: 3, z: -1}) """ if not isinstance(other, Factors): other = Factors(other) if any(f.is_zero for f in (self, other)): return Factors(S.Zero) factors = dict(self.factors) for factor, exp in other.factors.items(): if factor in factors: exp = factors[factor] + exp if not exp: del factors[factor] continue factors[factor] = exp return Factors(factors) def normal(self, other): """Return ``self`` and ``other`` with ``gcd`` removed from each. The only differences between this and method ``div`` is that this is 1) optimized for the case when there are few factors in common and 2) this does not raise an error if ``other`` is zero. See Also ======== div """ if not isinstance(other, Factors): other = Factors(other) if other.is_zero: return (Factors(), Factors(S.Zero)) if self.is_zero: return (Factors(S.Zero), Factors()) self_factors = dict(self.factors) other_factors = dict(other.factors) for factor, self_exp in self.factors.items(): try: other_exp = other.factors[factor] except KeyError: continue exp = self_exp - other_exp if not exp: del self_factors[factor] del other_factors[factor] elif _isnumber(exp): if exp > 0: self_factors[factor] = exp del other_factors[factor] else: del self_factors[factor] other_factors[factor] = -exp else: r = self_exp.extract_additively(other_exp) if r is not None: if r: self_factors[factor] = r del other_factors[factor] else: # should be handled already del self_factors[factor] del other_factors[factor] else: sc, sa = self_exp.as_coeff_Add() if sc: oc, oa = other_exp.as_coeff_Add() diff = sc - oc if diff > 0: self_factors[factor] -= oc other_exp = oa elif diff < 0: self_factors[factor] -= sc other_factors[factor] -= sc other_exp = oa - diff else: self_factors[factor] = sa other_exp = oa if other_exp: other_factors[factor] = other_exp else: del other_factors[factor] return Factors(self_factors), Factors(other_factors) def div(self, other): # Factors """Return ``self`` and ``other`` with ``gcd`` removed from each. This is optimized for the case when there are many factors in common. Examples ======== >>> from sympy.core.exprtools import Factors >>> from sympy.abc import x, y, z >>> from sympy import S >>> a = Factors((x*y**2).as_powers_dict()) >>> a.div(a) (Factors({}), Factors({})) >>> a.div(x*z) (Factors({y: 2}), Factors({z: 1})) The ``/`` operator only gives ``quo``: >>> a/x Factors({y: 2}) Factors treats its factors as though they are all in the numerator, so if you violate this assumption the results will be correct but will not strictly correspond to the numerator and denominator of the ratio: >>> a.div(x/z) (Factors({y: 2}), Factors({z: -1})) Factors is also naive about bases: it does not attempt any denesting of Rational-base terms, for example the following does not become 2**(2*x)/2. >>> Factors(2**(2*x + 2)).div(S(8)) (Factors({2: 2*x + 2}), Factors({8: 1})) factor_terms can clean up such Rational-bases powers: >>> from sympy.core.exprtools import factor_terms >>> n, d = Factors(2**(2*x + 2)).div(S(8)) >>> n.as_expr()/d.as_expr() 2**(2*x + 2)/8 >>> factor_terms(_) 2**(2*x)/2 """ quo, rem = dict(self.factors), {} if not isinstance(other, Factors): other = Factors(other) if other.is_zero: raise ZeroDivisionError if self.is_zero: return (Factors(S.Zero), Factors()) for factor, exp in other.factors.items(): if factor in quo: d = quo[factor] - exp if _isnumber(d): if d <= 0: del quo[factor] if d >= 0: if d: quo[factor] = d continue exp = -d else: r = quo[factor].extract_additively(exp) if r is not None: if r: quo[factor] = r else: # should be handled already del quo[factor] else: other_exp = exp sc, sa = quo[factor].as_coeff_Add() if sc: oc, oa = other_exp.as_coeff_Add() diff = sc - oc if diff > 0: quo[factor] -= oc other_exp = oa elif diff < 0: quo[factor] -= sc other_exp = oa - diff else: quo[factor] = sa other_exp = oa if other_exp: rem[factor] = other_exp else: assert factor not in rem continue rem[factor] = exp return Factors(quo), Factors(rem) def quo(self, other): # Factors """Return numerator Factor of ``self / other``. Examples ======== >>> from sympy.core.exprtools import Factors >>> from sympy.abc import x, y, z >>> a = Factors((x*y**2).as_powers_dict()) >>> b = Factors((x*y/z).as_powers_dict()) >>> a.quo(b) # same as a/b Factors({y: 1}) """ return self.div(other)[0] def rem(self, other): # Factors """Return denominator Factors of ``self / other``. Examples ======== >>> from sympy.core.exprtools import Factors >>> from sympy.abc import x, y, z >>> a = Factors((x*y**2).as_powers_dict()) >>> b = Factors((x*y/z).as_powers_dict()) >>> a.rem(b) Factors({z: -1}) >>> a.rem(a) Factors({}) """ return self.div(other)[1] def pow(self, other): # Factors """Return self raised to a non-negative integer power. Examples ======== >>> from sympy.core.exprtools import Factors >>> from sympy.abc import x, y >>> a = Factors((x*y**2).as_powers_dict()) >>> a**2 Factors({x: 2, y: 4}) """ if isinstance(other, Factors): other = other.as_expr() if other.is_Integer: other = int(other) if isinstance(other, SYMPY_INTS) and other >= 0: factors = {} if other: for factor, exp in self.factors.items(): factors[factor] = exp*other return Factors(factors) else: raise ValueError("expected non-negative integer, got %s" % other) def gcd(self, other): # Factors """Return Factors of ``gcd(self, other)``. The keys are the intersection of factors with the minimum exponent for each factor. Examples ======== >>> from sympy.core.exprtools import Factors >>> from sympy.abc import x, y, z >>> a = Factors((x*y**2).as_powers_dict()) >>> b = Factors((x*y/z).as_powers_dict()) >>> a.gcd(b) Factors({x: 1, y: 1}) """ if not isinstance(other, Factors): other = Factors(other) if other.is_zero: return Factors(self.factors) factors = {} for factor, exp in self.factors.items(): if factor in other.factors: exp = min(exp, other.factors[factor]) factors[factor] = exp return Factors(factors) def lcm(self, other): # Factors """Return Factors of ``lcm(self, other)`` which are the union of factors with the maximum exponent for each factor. Examples ======== >>> from sympy.core.exprtools import Factors >>> from sympy.abc import x, y, z >>> a = Factors((x*y**2).as_powers_dict()) >>> b = Factors((x*y/z).as_powers_dict()) >>> a.lcm(b) Factors({x: 1, y: 2, z: -1}) """ if not isinstance(other, Factors): other = Factors(other) if any(f.is_zero for f in (self, other)): return Factors(S.Zero) factors = dict(self.factors) for factor, exp in other.factors.items(): if factor in factors: exp = max(exp, factors[factor]) factors[factor] = exp return Factors(factors) def __mul__(self, other): # Factors return self.mul(other) def __divmod__(self, other): # Factors return self.div(other) def __div__(self, other): # Factors return self.quo(other) __truediv__ = __div__ def __mod__(self, other): # Factors return self.rem(other) def __pow__(self, other): # Factors return self.pow(other) def __eq__(self, other): # Factors if not isinstance(other, Factors): other = Factors(other) return self.factors == other.factors def __ne__(self, other): # Factors return not self.__eq__(other) class Term(object): """Efficient representation of ``coeff*(numer/denom)``. """ __slots__ = ['coeff', 'numer', 'denom'] def __init__(self, term, numer=None, denom=None): # Term if numer is None and denom is None: if not term.is_commutative: raise NonCommutativeExpression( 'commutative expression expected') coeff, factors = term.as_coeff_mul() numer, denom = defaultdict(int), defaultdict(int) for factor in factors: base, exp = decompose_power(factor) if base.is_Add: cont, base = base.primitive() coeff *= cont**exp if exp > 0: numer[base] += exp else: denom[base] += -exp numer = Factors(numer) denom = Factors(denom) else: coeff = term if numer is None: numer = Factors() if denom is None: denom = Factors() self.coeff = coeff self.numer = numer self.denom = denom def __hash__(self): # Term return hash((self.coeff, self.numer, self.denom)) def __repr__(self): # Term return "Term(%s, %s, %s)" % (self.coeff, self.numer, self.denom) def as_expr(self): # Term return self.coeff*(self.numer.as_expr()/self.denom.as_expr()) def mul(self, other): # Term coeff = self.coeff*other.coeff numer = self.numer.mul(other.numer) denom = self.denom.mul(other.denom) numer, denom = numer.normal(denom) return Term(coeff, numer, denom) def inv(self): # Term return Term(1/self.coeff, self.denom, self.numer) def quo(self, other): # Term return self.mul(other.inv()) def pow(self, other): # Term if other < 0: return self.inv().pow(-other) else: return Term(self.coeff ** other, self.numer.pow(other), self.denom.pow(other)) def gcd(self, other): # Term return Term(self.coeff.gcd(other.coeff), self.numer.gcd(other.numer), self.denom.gcd(other.denom)) def lcm(self, other): # Term return Term(self.coeff.lcm(other.coeff), self.numer.lcm(other.numer), self.denom.lcm(other.denom)) def __mul__(self, other): # Term if isinstance(other, Term): return self.mul(other) else: return NotImplemented def __div__(self, other): # Term if isinstance(other, Term): return self.quo(other) else: return NotImplemented __truediv__ = __div__ def __pow__(self, other): # Term if isinstance(other, SYMPY_INTS): return self.pow(other) else: return NotImplemented def __eq__(self, other): # Term return (self.coeff == other.coeff and self.numer == other.numer and self.denom == other.denom) def __ne__(self, other): # Term return not self.__eq__(other) def _gcd_terms(terms, isprimitive=False, fraction=True): """Helper function for :func:`gcd_terms`. If ``isprimitive`` is True then the call to primitive for an Add will be skipped. This is useful when the content has already been extrated. If ``fraction`` is True then the expression will appear over a common denominator, the lcm of all term denominators. """ if isinstance(terms, Basic) and not isinstance(terms, Tuple): terms = Add.make_args(terms) terms = list(map(Term, [t for t in terms if t])) # there is some simplification that may happen if we leave this # here rather than duplicate it before the mapping of Term onto # the terms if len(terms) == 0: return S.Zero, S.Zero, S.One if len(terms) == 1: cont = terms[0].coeff numer = terms[0].numer.as_expr() denom = terms[0].denom.as_expr() else: cont = terms[0] for term in terms[1:]: cont = cont.gcd(term) for i, term in enumerate(terms): terms[i] = term.quo(cont) if fraction: denom = terms[0].denom for term in terms[1:]: denom = denom.lcm(term.denom) numers = [] for term in terms: numer = term.numer.mul(denom.quo(term.denom)) numers.append(term.coeff*numer.as_expr()) else: numers = [t.as_expr() for t in terms] denom = Term(S(1)).numer cont = cont.as_expr() numer = Add(*numers) denom = denom.as_expr() if not isprimitive and numer.is_Add: _cont, numer = numer.primitive() cont *= _cont return cont, numer, denom def gcd_terms(terms, isprimitive=False, clear=True, fraction=True): """Compute the GCD of ``terms`` and put them together. ``terms`` can be an expression or a non-Basic sequence of expressions which will be handled as though they are terms from a sum. If ``isprimitive`` is True the _gcd_terms will not run the primitive method on the terms. ``clear`` controls the removal of integers from the denominator of an Add expression. When True (default), all numerical denominator will be cleared; when False the denominators will be cleared only if all terms had numerical denominators other than 1. ``fraction``, when True (default), will put the expression over a common denominator. Examples ======== >>> from sympy.core import gcd_terms >>> from sympy.abc import x, y >>> gcd_terms((x + 1)**2*y + (x + 1)*y**2) y*(x + 1)*(x + y + 1) >>> gcd_terms(x/2 + 1) (x + 2)/2 >>> gcd_terms(x/2 + 1, clear=False) x/2 + 1 >>> gcd_terms(x/2 + y/2, clear=False) (x + y)/2 >>> gcd_terms(x/2 + 1/x) (x**2 + 2)/(2*x) >>> gcd_terms(x/2 + 1/x, fraction=False) (x + 2/x)/2 >>> gcd_terms(x/2 + 1/x, fraction=False, clear=False) x/2 + 1/x >>> gcd_terms(x/2/y + 1/x/y) (x**2 + 2)/(2*x*y) >>> gcd_terms(x/2/y + 1/x/y, fraction=False, clear=False) (x + 2/x)/(2*y) The ``clear`` flag was ignored in this case because the returned expression was a rational expression, not a simple sum. See Also ======== factor_terms, sympy.polys.polytools.terms_gcd """ def mask(terms): """replace nc portions of each term with a unique Dummy symbols and return the replacements to restore them""" args = [(a, []) if a.is_commutative else a.args_cnc() for a in terms] reps = [] for i, (c, nc) in enumerate(args): if nc: nc = Mul._from_args(nc) d = Dummy() reps.append((d, nc)) c.append(d) args[i] = Mul._from_args(c) else: args[i] = c return args, dict(reps) isadd = isinstance(terms, Add) addlike = isadd or not isinstance(terms, Basic) and \ is_sequence(terms, include=set) and \ not isinstance(terms, Dict) if addlike: if isadd: # i.e. an Add terms = list(terms.args) else: terms = sympify(terms) terms, reps = mask(terms) cont, numer, denom = _gcd_terms(terms, isprimitive, fraction) numer = numer.xreplace(reps) coeff, factors = cont.as_coeff_Mul() return _keep_coeff(coeff, factors*numer/denom, clear=clear) if not isinstance(terms, Basic): return terms if terms.is_Atom: return terms if terms.is_Mul: c, args = terms.as_coeff_mul() return _keep_coeff(c, Mul(*[gcd_terms(i, isprimitive, clear, fraction) for i in args]), clear=clear) def handle(a): # don't treat internal args like terms of an Add if not isinstance(a, Expr): if isinstance(a, Basic): return a.func(*[handle(i) for i in a.args]) return type(a)([handle(i) for i in a]) return gcd_terms(a, isprimitive, clear, fraction) if isinstance(terms, Dict): return Dict(*[(k, handle(v)) for k, v in terms.args]) return terms.func(*[handle(i) for i in terms.args]) def factor_terms(expr, radical=False, clear=False, fraction=False, sign=True): """Remove common factors from terms in all arguments without changing the underlying structure of the expr. No expansion or simplification (and no processing of non-commutatives) is performed. If radical=True then a radical common to all terms will be factored out of any Add sub-expressions of the expr. If clear=False (default) then coefficients will not be separated from a single Add if they can be distributed to leave one or more terms with integer coefficients. If fraction=True (default is False) then a common denominator will be constructed for the expression. If sign=True (default) then even if the only factor in common is a -1, it will be factored out of the expression. Examples ======== >>> from sympy import factor_terms, Symbol >>> from sympy.abc import x, y >>> factor_terms(x + x*(2 + 4*y)**3) x*(8*(2*y + 1)**3 + 1) >>> A = Symbol('A', commutative=False) >>> factor_terms(x*A + x*A + x*y*A) x*(y*A + 2*A) When ``clear`` is False, a rational will only be factored out of an Add expression if all terms of the Add have coefficients that are fractions: >>> factor_terms(x/2 + 1, clear=False) x/2 + 1 >>> factor_terms(x/2 + 1, clear=True) (x + 2)/2 This only applies when there is a single Add that the coefficient multiplies: >>> factor_terms(x*y/2 + y, clear=True) y*(x + 2)/2 >>> factor_terms(x*y/2 + y, clear=False) == _ True If a -1 is all that can be factored out, to *not* factor it out, the flag ``sign`` must be False: >>> factor_terms(-x - y) -(x + y) >>> factor_terms(-x - y, sign=False) -x - y >>> factor_terms(-2*x - 2*y, sign=False) -2*(x + y) See Also ======== gcd_terms, sympy.polys.polytools.terms_gcd """ from sympy.simplify.simplify import bottom_up def do(expr): is_iterable = iterable(expr) if not isinstance(expr, Basic) or expr.is_Atom: if is_iterable: return type(expr)([do(i) for i in expr]) return expr if expr.is_Pow or expr.is_Function or \ is_iterable or not hasattr(expr, 'args_cnc'): args = expr.args newargs = tuple([do(i) for i in args]) if newargs == args: return expr return expr.func(*newargs) cont, p = expr.as_content_primitive(radical=radical) if p.is_Add: list_args = [do(a) for a in Add.make_args(p)] # get a common negative (if there) which gcd_terms does not remove if all(a.as_coeff_Mul()[0] < 0 for a in list_args): cont = -cont list_args = [-a for a in list_args] # watch out for exp(-(x+2)) which gcd_terms will change to exp(-x-2) special = {} for i, a in enumerate(list_args): b, e = a.as_base_exp() if e.is_Mul and e != Mul(*e.args): list_args[i] = Dummy() special[list_args[i]] = a # rebuild p not worrying about the order which gcd_terms will fix p = Add._from_args(list_args) p = gcd_terms(p, isprimitive=True, clear=clear, fraction=fraction).xreplace(special) elif p.args: p = p.func( *[do(a) for a in p.args]) rv = _keep_coeff(cont, p, clear=clear, sign=sign) return rv expr = sympify(expr) return do(expr) def _mask_nc(eq, name=None): """ Return ``eq`` with non-commutative objects replaced with Dummy symbols. A dictionary that can be used to restore the original values is returned: if it is None, the expression is noncommutative and cannot be made commutative. The third value returned is a list of any non-commutative symbols that appear in the returned equation. ``name``, if given, is the name that will be used with numered Dummy variables that will replace the non-commutative objects and is mainly used for doctesting purposes. Notes ===== All non-commutative objects other than Symbols are replaced with a non-commutative Symbol. Identical objects will be identified by identical symbols. If there is only 1 non-commutative object in an expression it will be replaced with a commutative symbol. Otherwise, the non-commutative entities are retained and the calling routine should handle replacements in this case since some care must be taken to keep track of the ordering of symbols when they occur within Muls. Examples ======== >>> from sympy.physics.secondquant import Commutator, NO, F, Fd >>> from sympy import symbols, Mul >>> from sympy.core.exprtools import _mask_nc >>> from sympy.abc import x, y >>> A, B, C = symbols('A,B,C', commutative=False) One nc-symbol: >>> _mask_nc(A**2 - x**2, 'd') (_d0**2 - x**2, {_d0: A}, []) Multiple nc-symbols: >>> _mask_nc(A**2 - B**2, 'd') (A**2 - B**2, None, [A, B]) An nc-object with nc-symbols but no others outside of it: >>> _mask_nc(1 + x*Commutator(A, B), 'd') (_d0*x + 1, {_d0: Commutator(A, B)}, []) >>> _mask_nc(NO(Fd(x)*F(y)), 'd') (_d0, {_d0: NO(CreateFermion(x)*AnnihilateFermion(y))}, []) Multiple nc-objects: >>> eq = x*Commutator(A, B) + x*Commutator(A, C)*Commutator(A, B) >>> _mask_nc(eq, 'd') (x*_d0 + x*_d1*_d0, {_d0: Commutator(A, B), _d1: Commutator(A, C)}, [_d0, _d1]) Multiple nc-objects and nc-symbols: >>> eq = A*Commutator(A, B) + B*Commutator(A, C) >>> _mask_nc(eq, 'd') (A*_d0 + B*_d1, {_d0: Commutator(A, B), _d1: Commutator(A, C)}, [_d0, _d1, A, B]) If there is an object that: - doesn't contain nc-symbols - but has arguments which derive from Basic, not Expr - and doesn't define an _eval_is_commutative routine then it will give False (or None?) for the is_commutative test. Such objects are also removed by this routine: >>> from sympy import Basic >>> eq = (1 + Mul(Basic(), Basic(), evaluate=False)) >>> eq.is_commutative False >>> _mask_nc(eq, 'd') (_d0**2 + 1, {_d0: Basic()}, []) """ name = name or 'mask' # Make Dummy() append sequential numbers to the name def numbered_names(): i = 0 while True: yield name + str(i) i += 1 names = numbered_names() def Dummy(*args, **kwargs): from sympy import Dummy return Dummy(next(names), *args, **kwargs) expr = eq if expr.is_commutative: return eq, {}, [] # identify nc-objects; symbols and other rep = [] nc_obj = set() nc_syms = set() pot = preorder_traversal(expr, keys=default_sort_key) for i, a in enumerate(pot): if any(a == r[0] for r in rep): pot.skip() elif not a.is_commutative: if a.is_Symbol: nc_syms.add(a) elif not (a.is_Add or a.is_Mul or a.is_Pow): if all(s.is_commutative for s in a.free_symbols): rep.append((a, Dummy())) else: nc_obj.add(a) pot.skip() # If there is only one nc symbol or object, it can be factored regularly # but polys is going to complain, so replace it with a Dummy. if len(nc_obj) == 1 and not nc_syms: rep.append((nc_obj.pop(), Dummy())) elif len(nc_syms) == 1 and not nc_obj: rep.append((nc_syms.pop(), Dummy())) # Any remaining nc-objects will be replaced with an nc-Dummy and # identified as an nc-Symbol to watch out for nc_obj = sorted(nc_obj, key=default_sort_key) for n in nc_obj: nc = Dummy(commutative=False) rep.append((n, nc)) nc_syms.add(nc) expr = expr.subs(rep) nc_syms = list(nc_syms) nc_syms.sort(key=default_sort_key) return expr, dict([(v, k) for k, v in rep]) or None, nc_syms def factor_nc(expr): """Return the factored form of ``expr`` while handling non-commutative expressions. **examples** >>> from sympy.core.exprtools import factor_nc >>> from sympy import Symbol >>> from sympy.abc import x >>> A = Symbol('A', commutative=False) >>> B = Symbol('B', commutative=False) >>> factor_nc((x**2 + 2*A*x + A**2).expand()) (x + A)**2 >>> factor_nc(((x + A)*(x + B)).expand()) (x + A)*(x + B) """ from sympy.simplify.simplify import powsimp from sympy.polys import gcd, factor def _pemexpand(expr): "Expand with the minimal set of hints necessary to check the result." return expr.expand(deep=True, mul=True, power_exp=True, power_base=False, basic=False, multinomial=True, log=False) expr = sympify(expr) if not isinstance(expr, Expr) or not expr.args: return expr if not expr.is_Add: return expr.func(*[factor_nc(a) for a in expr.args]) expr, rep, nc_symbols = _mask_nc(expr) if rep: return factor(expr).subs(rep) else: args = [a.args_cnc() for a in Add.make_args(expr)] c = g = l = r = S.One hit = False # find any commutative gcd term for i, a in enumerate(args): if i == 0: c = Mul._from_args(a[0]) elif a[0]: c = gcd(c, Mul._from_args(a[0])) else: c = S.One if c is not S.One: hit = True c, g = c.as_coeff_Mul() if g is not S.One: for i, (cc, _) in enumerate(args): cc = list(Mul.make_args(Mul._from_args(list(cc))/g)) args[i][0] = cc for i, (cc, _) in enumerate(args): cc[0] = cc[0]/c args[i][0] = cc # find any noncommutative common prefix for i, a in enumerate(args): if i == 0: n = a[1][:] else: n = common_prefix(n, a[1]) if not n: # is there a power that can be extracted? if not args[0][1]: break b, e = args[0][1][0].as_base_exp() ok = False if e.is_Integer: for t in args: if not t[1]: break bt, et = t[1][0].as_base_exp() if et.is_Integer and bt == b: e = min(e, et) else: break else: ok = hit = True l = b**e il = b**-e for i, a in enumerate(args): args[i][1][0] = il*args[i][1][0] break if not ok: break else: hit = True lenn = len(n) l = Mul(*n) for i, a in enumerate(args): args[i][1] = args[i][1][lenn:] # find any noncommutative common suffix for i, a in enumerate(args): if i == 0: n = a[1][:] else: n = common_suffix(n, a[1]) if not n: # is there a power that can be extracted? if not args[0][1]: break b, e = args[0][1][-1].as_base_exp() ok = False if e.is_Integer: for t in args: if not t[1]: break bt, et = t[1][-1].as_base_exp() if et.is_Integer and bt == b: e = min(e, et) else: break else: ok = hit = True r = b**e il = b**-e for i, a in enumerate(args): args[i][1][-1] = args[i][1][-1]*il break if not ok: break else: hit = True lenn = len(n) r = Mul(*n) for i, a in enumerate(args): args[i][1] = a[1][:len(a[1]) - lenn] if hit: mid = Add(*[Mul(*cc)*Mul(*nc) for cc, nc in args]) else: mid = expr # sort the symbols so the Dummys would appear in the same # order as the original symbols, otherwise you may introduce # a factor of -1, e.g. A**2 - B**2) -- {A:y, B:x} --> y**2 - x**2 # and the former factors into two terms, (A - B)*(A + B) while the # latter factors into 3 terms, (-1)*(x - y)*(x + y) rep1 = [(n, Dummy()) for n in sorted(nc_symbols, key=default_sort_key)] unrep1 = [(v, k) for k, v in rep1] unrep1.reverse() new_mid, r2, _ = _mask_nc(mid.subs(rep1)) new_mid = powsimp(factor(new_mid)) new_mid = new_mid.subs(r2).subs(unrep1) if new_mid.is_Pow: return _keep_coeff(c, g*l*new_mid*r) if new_mid.is_Mul: # XXX TODO there should be a way to inspect what order the terms # must be in and just select the plausible ordering without # checking permutations cfac = [] ncfac = [] for f in new_mid.args: if f.is_commutative: cfac.append(f) else: b, e = f.as_base_exp() if e.is_Integer: ncfac.extend([b]*e) else: ncfac.append(f) pre_mid = g*Mul(*cfac)*l target = _pemexpand(expr/c) for s in variations(ncfac, len(ncfac)): ok = pre_mid*Mul(*s)*r if _pemexpand(ok) == target: return _keep_coeff(c, ok) # mid was an Add that didn't factor successfully return _keep_coeff(c, g*l*mid*r)
kmacinnis/sympy
sympy/core/exprtools.py
Python
bsd-3-clause
41,487
# Author: Prabhu Ramachandran <prabhu [at] aero . iitb . ac . in> # Copyright (c) 2008, Enthought, Inc. # License: BSD Style. # Enthought library imports. from tvtk.tools.tvtk_doc import TVTKFilterChooser, TVTK_FILTERS # Local imports. from mayavi.filters.filter_base import FilterBase from mayavi.core.common import handle_children_state, error from mayavi.core.pipeline_info import PipelineInfo ################################################################################ # `UserDefined` class. ################################################################################ class UserDefined(FilterBase): """ This filter lets the user define their own filter dynamically/interactively. It is like `FilterBase` but allows a user to specify the class without writing any code. """ # The version of this class. Used for persistence. __version__ = 0 input_info = PipelineInfo(datasets=['any'], attribute_types=['any'], attributes=['any']) output_info = PipelineInfo(datasets=['any'], attribute_types=['any'], attributes=['any']) ###################################################################### # `object` interface. ###################################################################### def __set_pure_state__(self, state): # Create and set the filter. children = [f for f in [self.filter] if f is not None] handle_children_state(children, [state.filter]) self.filter = children[0] self.update_pipeline() # Restore our state. super(UserDefined, self).__set_pure_state__(state) ###################################################################### # `UserDefined` interface. ###################################################################### def setup_filter(self): """Setup the filter if none has been set or check it if it already has been.""" obj = self.filter if not self._check_object(obj): if obj is not None: cname = obj.__class__.__name__ error('Invalid filter %s chosen! Try again!'%cname) obj = self._choose_filter() self.filter = obj ###################################################################### # Non-public interface. ###################################################################### def _choose_filter(self): chooser = TVTKFilterChooser() chooser.edit_traits(kind='livemodal') obj = chooser.object if obj is None: error('Invalid filter chosen! Try again!') return obj def _check_object(self, obj): if obj is None: return False if obj.__class__.__name__ in TVTK_FILTERS: return True return False def _filter_changed(self, old, new): self.name = 'UserDefined:%s'%new.__class__.__name__ super(UserDefined, self)._filter_changed(old, new)
dmsurti/mayavi
mayavi/filters/user_defined.py
Python
bsd-3-clause
3,082
// // Copyright 2015 The ANGLE Project Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // // texture_format_util: // Contains helper functions for texture_format_table // #include "libANGLE/renderer/d3d/d3d11/texture_format_util.h" #include "libANGLE/renderer/d3d/d3d11/formatutils11.h" #include "libANGLE/renderer/d3d/loadimage.h" #include "libANGLE/renderer/d3d/loadimage_etc.h" namespace rx { namespace d3d11 { namespace { // ES3 image loading functions vary based on: // - the GL internal format (supplied to glTex*Image*D) // - the GL data type given (supplied to glTex*Image*D) // - the target DXGI_FORMAT that the image will be loaded into (which is chosen based on the D3D // device's capabilities) // This map type determines which loading function to use, based on these three parameters. // Source formats and types are taken from Tables 3.2 and 3.3 of the ES 3 spec. void UnimplementedLoadFunction(size_t width, size_t height, size_t depth, const uint8_t *input, size_t inputRowPitch, size_t inputDepthPitch, uint8_t *output, size_t outputRowPitch, size_t outputDepthPitch) { UNIMPLEMENTED(); } void UnreachableLoadFunction(size_t width, size_t height, size_t depth, const uint8_t *input, size_t inputRowPitch, size_t inputDepthPitch, uint8_t *output, size_t outputRowPitch, size_t outputDepthPitch) { UNREACHABLE(); } // A helper function to insert data into the D3D11LoadFunctionMap with fewer characters. inline void InsertLoadFunction(D3D11LoadFunctionMap *map, GLenum internalFormat, GLenum type, DXGI_FORMAT dxgiFormat, LoadImageFunction loadFunc) { (*map)[internalFormat].push_back(GLTypeDXGIFunctionPair(type, DxgiFormatLoadFunctionPair(dxgiFormat, loadFunc))); } } // namespace // TODO: This will be generated by a JSON file const D3D11LoadFunctionMap &BuildD3D11LoadFunctionMap() { static D3D11LoadFunctionMap map; // clang-format off // | Internal format | Type | Target DXGI Format | Load function | InsertLoadFunction(&map, GL_RGBA8, GL_UNSIGNED_BYTE, DXGI_FORMAT_R8G8B8A8_UNORM, LoadToNative<GLubyte, 4> ); InsertLoadFunction(&map, GL_RGB5_A1, GL_UNSIGNED_BYTE, DXGI_FORMAT_R8G8B8A8_UNORM, LoadToNative<GLubyte, 4> ); InsertLoadFunction(&map, GL_RGBA4, GL_UNSIGNED_BYTE, DXGI_FORMAT_R8G8B8A8_UNORM, LoadToNative<GLubyte, 4> ); InsertLoadFunction(&map, GL_SRGB8_ALPHA8, GL_UNSIGNED_BYTE, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, LoadToNative<GLubyte, 4> ); InsertLoadFunction(&map, GL_RGBA8_SNORM, GL_BYTE, DXGI_FORMAT_R8G8B8A8_SNORM, LoadToNative<GLbyte, 4> ); InsertLoadFunction(&map, GL_RGBA4, GL_UNSIGNED_SHORT_4_4_4_4, DXGI_FORMAT_R8G8B8A8_UNORM, LoadRGBA4ToRGBA8 ); InsertLoadFunction(&map, GL_RGBA4, GL_UNSIGNED_SHORT_4_4_4_4, DXGI_FORMAT_B4G4R4A4_UNORM, LoadRGBA4ToARGB4 ); InsertLoadFunction(&map, GL_RGB10_A2, GL_UNSIGNED_INT_2_10_10_10_REV, DXGI_FORMAT_R10G10B10A2_UNORM, LoadToNative<GLuint, 1> ); InsertLoadFunction(&map, GL_RGB5_A1, GL_UNSIGNED_SHORT_5_5_5_1, DXGI_FORMAT_R8G8B8A8_UNORM, LoadRGB5A1ToRGBA8 ); InsertLoadFunction(&map, GL_RGB5_A1, GL_UNSIGNED_SHORT_5_5_5_1, DXGI_FORMAT_B5G5R5A1_UNORM, LoadRGB5A1ToA1RGB5 ); InsertLoadFunction(&map, GL_RGB5_A1, GL_UNSIGNED_INT_2_10_10_10_REV, DXGI_FORMAT_R8G8B8A8_UNORM, LoadRGB10A2ToRGBA8 ); InsertLoadFunction(&map, GL_RGBA16F, GL_HALF_FLOAT, DXGI_FORMAT_R16G16B16A16_FLOAT, LoadToNative<GLhalf, 4> ); InsertLoadFunction(&map, GL_RGBA16F, GL_HALF_FLOAT_OES, DXGI_FORMAT_R16G16B16A16_FLOAT, LoadToNative<GLhalf, 4> ); InsertLoadFunction(&map, GL_RGBA32F, GL_FLOAT, DXGI_FORMAT_R32G32B32A32_FLOAT, LoadToNative<GLfloat, 4> ); InsertLoadFunction(&map, GL_RGBA16F, GL_FLOAT, DXGI_FORMAT_R16G16B16A16_FLOAT, Load32FTo16F<4> ); InsertLoadFunction(&map, GL_RGBA8UI, GL_UNSIGNED_BYTE, DXGI_FORMAT_R8G8B8A8_UINT, LoadToNative<GLubyte, 4> ); InsertLoadFunction(&map, GL_RGBA8I, GL_BYTE, DXGI_FORMAT_R8G8B8A8_SINT, LoadToNative<GLbyte, 4> ); InsertLoadFunction(&map, GL_RGBA16UI, GL_UNSIGNED_SHORT, DXGI_FORMAT_R16G16B16A16_UINT, LoadToNative<GLushort, 4> ); InsertLoadFunction(&map, GL_RGBA16I, GL_SHORT, DXGI_FORMAT_R16G16B16A16_SINT, LoadToNative<GLshort, 4> ); InsertLoadFunction(&map, GL_RGBA32UI, GL_UNSIGNED_INT, DXGI_FORMAT_R32G32B32A32_UINT, LoadToNative<GLuint, 4> ); InsertLoadFunction(&map, GL_RGBA32I, GL_INT, DXGI_FORMAT_R32G32B32A32_SINT, LoadToNative<GLint, 4> ); InsertLoadFunction(&map, GL_RGB10_A2UI, GL_UNSIGNED_INT_2_10_10_10_REV, DXGI_FORMAT_R10G10B10A2_UINT, LoadToNative<GLuint, 1> ); InsertLoadFunction(&map, GL_RGB8, GL_UNSIGNED_BYTE, DXGI_FORMAT_R8G8B8A8_UNORM, LoadToNative3To4<GLubyte, 0xFF> ); InsertLoadFunction(&map, GL_RGB565, GL_UNSIGNED_BYTE, DXGI_FORMAT_R8G8B8A8_UNORM, LoadToNative3To4<GLubyte, 0xFF> ); InsertLoadFunction(&map, GL_SRGB8, GL_UNSIGNED_BYTE, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, LoadToNative3To4<GLubyte, 0xFF> ); InsertLoadFunction(&map, GL_RGB8_SNORM, GL_BYTE, DXGI_FORMAT_R8G8B8A8_SNORM, LoadToNative3To4<GLbyte, 0x7F> ); InsertLoadFunction(&map, GL_RGB565, GL_UNSIGNED_SHORT_5_6_5, DXGI_FORMAT_R8G8B8A8_UNORM, LoadR5G6B5ToRGBA8 ); InsertLoadFunction(&map, GL_RGB565, GL_UNSIGNED_SHORT_5_6_5, DXGI_FORMAT_B5G6R5_UNORM, LoadToNative<GLushort, 1> ); InsertLoadFunction(&map, GL_R11F_G11F_B10F, GL_UNSIGNED_INT_10F_11F_11F_REV, DXGI_FORMAT_R11G11B10_FLOAT, LoadToNative<GLuint, 1> ); InsertLoadFunction(&map, GL_RGB9_E5, GL_UNSIGNED_INT_5_9_9_9_REV, DXGI_FORMAT_R9G9B9E5_SHAREDEXP, LoadToNative<GLuint, 1> ); InsertLoadFunction(&map, GL_RGB16F, GL_HALF_FLOAT, DXGI_FORMAT_R16G16B16A16_FLOAT, LoadToNative3To4<GLhalf, gl::Float16One>); InsertLoadFunction(&map, GL_RGB16F, GL_HALF_FLOAT_OES, DXGI_FORMAT_R16G16B16A16_FLOAT, LoadToNative3To4<GLhalf, gl::Float16One>); InsertLoadFunction(&map, GL_R11F_G11F_B10F, GL_HALF_FLOAT, DXGI_FORMAT_R11G11B10_FLOAT, LoadRGB16FToRG11B10F ); InsertLoadFunction(&map, GL_R11F_G11F_B10F, GL_HALF_FLOAT_OES, DXGI_FORMAT_R11G11B10_FLOAT, LoadRGB16FToRG11B10F ); InsertLoadFunction(&map, GL_RGB9_E5, GL_HALF_FLOAT, DXGI_FORMAT_R9G9B9E5_SHAREDEXP, LoadRGB16FToRGB9E5 ); InsertLoadFunction(&map, GL_RGB9_E5, GL_HALF_FLOAT_OES, DXGI_FORMAT_R9G9B9E5_SHAREDEXP, LoadRGB16FToRGB9E5 ); InsertLoadFunction(&map, GL_RGB32F, GL_FLOAT, DXGI_FORMAT_R32G32B32A32_FLOAT, LoadToNative3To4<GLfloat, gl::Float32One>); InsertLoadFunction(&map, GL_RGB16F, GL_FLOAT, DXGI_FORMAT_R16G16B16A16_FLOAT, LoadRGB32FToRGBA16F ); InsertLoadFunction(&map, GL_R11F_G11F_B10F, GL_FLOAT, DXGI_FORMAT_R11G11B10_FLOAT, LoadRGB32FToRG11B10F ); InsertLoadFunction(&map, GL_RGB9_E5, GL_FLOAT, DXGI_FORMAT_R9G9B9E5_SHAREDEXP, LoadRGB32FToRGB9E5 ); InsertLoadFunction(&map, GL_RGB8UI, GL_UNSIGNED_BYTE, DXGI_FORMAT_R8G8B8A8_UINT, LoadToNative3To4<GLubyte, 0x01> ); InsertLoadFunction(&map, GL_RGB8I, GL_BYTE, DXGI_FORMAT_R8G8B8A8_SINT, LoadToNative3To4<GLbyte, 0x01> ); InsertLoadFunction(&map, GL_RGB16UI, GL_UNSIGNED_SHORT, DXGI_FORMAT_R16G16B16A16_UINT, LoadToNative3To4<GLushort, 0x0001> ); InsertLoadFunction(&map, GL_RGB16I, GL_SHORT, DXGI_FORMAT_R16G16B16A16_SINT, LoadToNative3To4<GLshort, 0x0001> ); InsertLoadFunction(&map, GL_RGB32UI, GL_UNSIGNED_INT, DXGI_FORMAT_R32G32B32A32_UINT, LoadToNative3To4<GLuint, 0x00000001> ); InsertLoadFunction(&map, GL_RGB32I, GL_INT, DXGI_FORMAT_R32G32B32A32_SINT, LoadToNative3To4<GLint, 0x00000001> ); InsertLoadFunction(&map, GL_RG8, GL_UNSIGNED_BYTE, DXGI_FORMAT_R8G8_UNORM, LoadToNative<GLubyte, 2> ); InsertLoadFunction(&map, GL_RG8_SNORM, GL_BYTE, DXGI_FORMAT_R8G8_SNORM, LoadToNative<GLbyte, 2> ); InsertLoadFunction(&map, GL_RG16F, GL_HALF_FLOAT, DXGI_FORMAT_R16G16_FLOAT, LoadToNative<GLhalf, 2> ); InsertLoadFunction(&map, GL_RG16F, GL_HALF_FLOAT_OES, DXGI_FORMAT_R16G16_FLOAT, LoadToNative<GLhalf, 2> ); InsertLoadFunction(&map, GL_RG32F, GL_FLOAT, DXGI_FORMAT_R32G32_FLOAT, LoadToNative<GLfloat, 2> ); InsertLoadFunction(&map, GL_RG16F, GL_FLOAT, DXGI_FORMAT_R16G16_FLOAT, Load32FTo16F<2> ); InsertLoadFunction(&map, GL_RG8UI, GL_UNSIGNED_BYTE, DXGI_FORMAT_R8G8_UINT, LoadToNative<GLubyte, 2> ); InsertLoadFunction(&map, GL_RG8I, GL_BYTE, DXGI_FORMAT_R8G8_SINT, LoadToNative<GLbyte, 2> ); InsertLoadFunction(&map, GL_RG16UI, GL_UNSIGNED_SHORT, DXGI_FORMAT_R16G16_UINT, LoadToNative<GLushort, 2> ); InsertLoadFunction(&map, GL_RG16I, GL_SHORT, DXGI_FORMAT_R16G16_SINT, LoadToNative<GLshort, 2> ); InsertLoadFunction(&map, GL_RG32UI, GL_UNSIGNED_INT, DXGI_FORMAT_R32G32_UINT, LoadToNative<GLuint, 2> ); InsertLoadFunction(&map, GL_RG32I, GL_INT, DXGI_FORMAT_R32G32_SINT, LoadToNative<GLint, 2> ); InsertLoadFunction(&map, GL_R8, GL_UNSIGNED_BYTE, DXGI_FORMAT_R8_UNORM, LoadToNative<GLubyte, 1> ); InsertLoadFunction(&map, GL_R8_SNORM, GL_BYTE, DXGI_FORMAT_R8_SNORM, LoadToNative<GLbyte, 1> ); InsertLoadFunction(&map, GL_R16F, GL_HALF_FLOAT, DXGI_FORMAT_R16_FLOAT, LoadToNative<GLhalf, 1> ); InsertLoadFunction(&map, GL_R16F, GL_HALF_FLOAT_OES, DXGI_FORMAT_R16_FLOAT, LoadToNative<GLhalf, 1> ); InsertLoadFunction(&map, GL_R32F, GL_FLOAT, DXGI_FORMAT_R32_FLOAT, LoadToNative<GLfloat, 1> ); InsertLoadFunction(&map, GL_R16F, GL_FLOAT, DXGI_FORMAT_R16_FLOAT, Load32FTo16F<1> ); InsertLoadFunction(&map, GL_R8UI, GL_UNSIGNED_BYTE, DXGI_FORMAT_R8_UINT, LoadToNative<GLubyte, 1> ); InsertLoadFunction(&map, GL_R8I, GL_BYTE, DXGI_FORMAT_R8_SINT, LoadToNative<GLbyte, 1> ); InsertLoadFunction(&map, GL_R16UI, GL_UNSIGNED_SHORT, DXGI_FORMAT_R16_UINT, LoadToNative<GLushort, 1> ); InsertLoadFunction(&map, GL_R16I, GL_SHORT, DXGI_FORMAT_R16_SINT, LoadToNative<GLshort, 1> ); InsertLoadFunction(&map, GL_R32UI, GL_UNSIGNED_INT, DXGI_FORMAT_R32_UINT, LoadToNative<GLuint, 1> ); InsertLoadFunction(&map, GL_R32I, GL_INT, DXGI_FORMAT_R32_SINT, LoadToNative<GLint, 1> ); InsertLoadFunction(&map, GL_DEPTH_COMPONENT16, GL_UNSIGNED_SHORT, DXGI_FORMAT_R16_TYPELESS, LoadToNative<GLushort, 1> ); InsertLoadFunction(&map, GL_DEPTH_COMPONENT16, GL_UNSIGNED_SHORT, DXGI_FORMAT_D16_UNORM, LoadToNative<GLushort, 1> ); InsertLoadFunction(&map, GL_DEPTH_COMPONENT24, GL_UNSIGNED_INT, DXGI_FORMAT_R24G8_TYPELESS, LoadR32ToR24G8 ); InsertLoadFunction(&map, GL_DEPTH_COMPONENT24, GL_UNSIGNED_INT, DXGI_FORMAT_D24_UNORM_S8_UINT, LoadR32ToR24G8 ); InsertLoadFunction(&map, GL_DEPTH_COMPONENT16, GL_UNSIGNED_INT, DXGI_FORMAT_R16_TYPELESS, LoadR32ToR16 ); InsertLoadFunction(&map, GL_DEPTH_COMPONENT32F, GL_FLOAT, DXGI_FORMAT_R32_TYPELESS, LoadToNative<GLfloat, 1> ); InsertLoadFunction(&map, GL_DEPTH_COMPONENT32F, GL_FLOAT, DXGI_FORMAT_UNKNOWN, UnimplementedLoadFunction ); InsertLoadFunction(&map, GL_DEPTH24_STENCIL8, GL_UNSIGNED_INT_24_8, DXGI_FORMAT_R24G8_TYPELESS, LoadR32ToR24G8 ); InsertLoadFunction(&map, GL_DEPTH24_STENCIL8, GL_UNSIGNED_INT_24_8, DXGI_FORMAT_D24_UNORM_S8_UINT, LoadR32ToR24G8 ); InsertLoadFunction(&map, GL_DEPTH32F_STENCIL8, GL_FLOAT_32_UNSIGNED_INT_24_8_REV, DXGI_FORMAT_R32G8X24_TYPELESS, LoadToNative<GLuint, 2> ); InsertLoadFunction(&map, GL_DEPTH32F_STENCIL8, GL_FLOAT_32_UNSIGNED_INT_24_8_REV, DXGI_FORMAT_UNKNOWN, UnimplementedLoadFunction ); InsertLoadFunction(&map, GL_STENCIL_INDEX8, DXGI_FORMAT_R24G8_TYPELESS, DXGI_FORMAT_UNKNOWN, UnimplementedLoadFunction ); InsertLoadFunction(&map, GL_STENCIL_INDEX8, DXGI_FORMAT_D24_UNORM_S8_UINT, DXGI_FORMAT_UNKNOWN, UnimplementedLoadFunction ); // Unsized formats // Load functions are unreachable because they are converted to sized internal formats based on // the format and type before loading takes place. InsertLoadFunction(&map, GL_RGBA, GL_UNSIGNED_BYTE, DXGI_FORMAT_UNKNOWN, UnreachableLoadFunction ); InsertLoadFunction(&map, GL_RGBA, GL_UNSIGNED_SHORT_4_4_4_4, DXGI_FORMAT_UNKNOWN, UnreachableLoadFunction ); InsertLoadFunction(&map, GL_RGBA, GL_UNSIGNED_SHORT_5_5_5_1, DXGI_FORMAT_UNKNOWN, UnreachableLoadFunction ); InsertLoadFunction(&map, GL_RGB, GL_UNSIGNED_BYTE, DXGI_FORMAT_UNKNOWN, UnreachableLoadFunction ); InsertLoadFunction(&map, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, DXGI_FORMAT_UNKNOWN, UnreachableLoadFunction ); InsertLoadFunction(&map, GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE, DXGI_FORMAT_UNKNOWN, UnreachableLoadFunction ); InsertLoadFunction(&map, GL_LUMINANCE, GL_UNSIGNED_BYTE, DXGI_FORMAT_UNKNOWN, UnreachableLoadFunction ); InsertLoadFunction(&map, GL_ALPHA, GL_UNSIGNED_BYTE, DXGI_FORMAT_UNKNOWN, UnreachableLoadFunction ); InsertLoadFunction(&map, GL_BGRA_EXT, GL_UNSIGNED_BYTE, DXGI_FORMAT_UNKNOWN, UnreachableLoadFunction ); // From GL_OES_texture_float InsertLoadFunction(&map, GL_LUMINANCE_ALPHA, GL_FLOAT, DXGI_FORMAT_R32G32B32A32_FLOAT, LoadLA32FToRGBA32F ); InsertLoadFunction(&map, GL_LUMINANCE, GL_FLOAT, DXGI_FORMAT_R32G32B32A32_FLOAT, LoadL32FToRGBA32F ); InsertLoadFunction(&map, GL_ALPHA, GL_FLOAT, DXGI_FORMAT_R32G32B32A32_FLOAT, LoadA32FToRGBA32F ); // From GL_OES_texture_half_float InsertLoadFunction(&map, GL_LUMINANCE_ALPHA, GL_HALF_FLOAT, DXGI_FORMAT_R16G16B16A16_FLOAT, LoadLA16FToRGBA16F ); InsertLoadFunction(&map, GL_LUMINANCE_ALPHA, GL_HALF_FLOAT_OES, DXGI_FORMAT_R16G16B16A16_FLOAT, LoadLA16FToRGBA16F ); InsertLoadFunction(&map, GL_LUMINANCE, GL_HALF_FLOAT, DXGI_FORMAT_R16G16B16A16_FLOAT, LoadL16FToRGBA16F ); InsertLoadFunction(&map, GL_LUMINANCE, GL_HALF_FLOAT_OES, DXGI_FORMAT_R16G16B16A16_FLOAT, LoadL16FToRGBA16F ); InsertLoadFunction(&map, GL_ALPHA, GL_HALF_FLOAT, DXGI_FORMAT_R16G16B16A16_FLOAT, LoadA16FToRGBA16F ); InsertLoadFunction(&map, GL_ALPHA, GL_HALF_FLOAT_OES, DXGI_FORMAT_R16G16B16A16_FLOAT, LoadA16FToRGBA16F ); // From GL_EXT_texture_storage InsertLoadFunction(&map, GL_ALPHA8_EXT, GL_UNSIGNED_BYTE, DXGI_FORMAT_A8_UNORM, LoadToNative<GLubyte, 1> ); InsertLoadFunction(&map, GL_ALPHA8_EXT, GL_UNSIGNED_BYTE, DXGI_FORMAT_R8G8B8A8_UNORM, LoadA8ToRGBA8 ); InsertLoadFunction(&map, GL_LUMINANCE8_EXT, GL_UNSIGNED_BYTE, DXGI_FORMAT_UNKNOWN, LoadL8ToRGBA8 ); InsertLoadFunction(&map, GL_LUMINANCE8_ALPHA8_EXT, GL_UNSIGNED_BYTE, DXGI_FORMAT_UNKNOWN, LoadLA8ToRGBA8 ); InsertLoadFunction(&map, GL_ALPHA32F_EXT, GL_FLOAT, DXGI_FORMAT_UNKNOWN, LoadA32FToRGBA32F ); InsertLoadFunction(&map, GL_LUMINANCE32F_EXT, GL_FLOAT, DXGI_FORMAT_UNKNOWN, LoadL32FToRGBA32F ); InsertLoadFunction(&map, GL_LUMINANCE_ALPHA32F_EXT, GL_FLOAT, DXGI_FORMAT_UNKNOWN, LoadLA32FToRGBA32F ); InsertLoadFunction(&map, GL_ALPHA16F_EXT, GL_HALF_FLOAT, DXGI_FORMAT_UNKNOWN, LoadA16FToRGBA16F ); InsertLoadFunction(&map, GL_ALPHA16F_EXT, GL_HALF_FLOAT_OES, DXGI_FORMAT_UNKNOWN, LoadA16FToRGBA16F ); InsertLoadFunction(&map, GL_LUMINANCE16F_EXT, GL_HALF_FLOAT, DXGI_FORMAT_UNKNOWN, LoadL16FToRGBA16F ); InsertLoadFunction(&map, GL_LUMINANCE16F_EXT, GL_HALF_FLOAT_OES, DXGI_FORMAT_UNKNOWN, LoadL16FToRGBA16F ); InsertLoadFunction(&map, GL_LUMINANCE_ALPHA16F_EXT, GL_HALF_FLOAT, DXGI_FORMAT_UNKNOWN, LoadLA16FToRGBA16F ); InsertLoadFunction(&map, GL_LUMINANCE_ALPHA16F_EXT, GL_HALF_FLOAT_OES, DXGI_FORMAT_UNKNOWN, LoadLA16FToRGBA16F ); // From GL_ANGLE_depth_texture InsertLoadFunction(&map, GL_DEPTH_COMPONENT32_OES, GL_UNSIGNED_INT, DXGI_FORMAT_UNKNOWN, LoadR32ToR24G8 ); // From GL_EXT_texture_format_BGRA8888 InsertLoadFunction(&map, GL_BGRA8_EXT, GL_UNSIGNED_BYTE, DXGI_FORMAT_UNKNOWN, LoadToNative<GLubyte, 4> ); InsertLoadFunction(&map, GL_BGRA4_ANGLEX, GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT, DXGI_FORMAT_UNKNOWN, LoadRGBA4ToRGBA8 ); InsertLoadFunction(&map, GL_BGRA4_ANGLEX, GL_UNSIGNED_BYTE, DXGI_FORMAT_UNKNOWN, LoadToNative<GLubyte, 4> ); InsertLoadFunction(&map, GL_BGR5_A1_ANGLEX, GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT, DXGI_FORMAT_UNKNOWN, LoadRGB5A1ToRGBA8 ); InsertLoadFunction(&map, GL_BGR5_A1_ANGLEX, GL_UNSIGNED_BYTE, DXGI_FORMAT_UNKNOWN, LoadToNative<GLubyte, 4> ); // Compressed formats // From ES 3.0.1 spec, table 3.16 // | Internal format | Type | Target DXGI Format | Load function InsertLoadFunction(&map, GL_COMPRESSED_R11_EAC, GL_UNSIGNED_BYTE, DXGI_FORMAT_R8_UNORM, LoadEACR11ToR8 ); InsertLoadFunction(&map, GL_COMPRESSED_SIGNED_R11_EAC, GL_UNSIGNED_BYTE, DXGI_FORMAT_R8_SNORM, LoadEACR11SToR8 ); InsertLoadFunction(&map, GL_COMPRESSED_RG11_EAC, GL_UNSIGNED_BYTE, DXGI_FORMAT_R8G8_UNORM, LoadEACRG11ToRG8 ); InsertLoadFunction(&map, GL_COMPRESSED_SIGNED_RG11_EAC, GL_UNSIGNED_BYTE, DXGI_FORMAT_R8G8_SNORM, LoadEACRG11SToRG8 ); InsertLoadFunction(&map, GL_COMPRESSED_RGB8_ETC2, GL_UNSIGNED_BYTE, DXGI_FORMAT_R8G8B8A8_UNORM, LoadETC2RGB8ToRGBA8 ); InsertLoadFunction(&map, GL_COMPRESSED_SRGB8_ETC2, GL_UNSIGNED_BYTE, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, LoadETC2SRGB8ToRGBA8 ); InsertLoadFunction(&map, GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2, GL_UNSIGNED_BYTE, DXGI_FORMAT_R8G8B8A8_UNORM, LoadETC2RGB8A1ToRGBA8 ); InsertLoadFunction(&map, GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2, GL_UNSIGNED_BYTE, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, LoadETC2SRGB8A1ToRGBA8); InsertLoadFunction(&map, GL_COMPRESSED_RGBA8_ETC2_EAC, GL_UNSIGNED_BYTE, DXGI_FORMAT_R8G8B8A8_UNORM, LoadETC2RGBA8ToRGBA8 ); InsertLoadFunction(&map, GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC, GL_UNSIGNED_BYTE, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, LoadETC2SRGBA8ToSRGBA8); // From GL_ETC1_RGB8_OES InsertLoadFunction(&map, GL_ETC1_RGB8_OES, GL_UNSIGNED_BYTE, DXGI_FORMAT_R8G8B8A8_UNORM, LoadETC1RGB8ToRGBA8 ); // From GL_EXT_texture_compression_dxt1 InsertLoadFunction(&map, GL_COMPRESSED_RGB_S3TC_DXT1_EXT, GL_UNSIGNED_BYTE, DXGI_FORMAT_UNKNOWN, LoadCompressedToNative<4, 4, 8> ); InsertLoadFunction(&map, GL_COMPRESSED_RGBA_S3TC_DXT1_EXT, GL_UNSIGNED_BYTE, DXGI_FORMAT_UNKNOWN, LoadCompressedToNative<4, 4, 8> ); // From GL_ANGLE_texture_compression_dxt3 InsertLoadFunction(&map, GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE, GL_UNSIGNED_BYTE, DXGI_FORMAT_UNKNOWN, LoadCompressedToNative<4, 4, 16> ); // From GL_ANGLE_texture_compression_dxt5 InsertLoadFunction(&map, GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE, GL_UNSIGNED_BYTE, DXGI_FORMAT_UNKNOWN, LoadCompressedToNative<4, 4, 16> ); // clang-format on return map; } typedef std::pair<InitializeTextureFormatPair, InitializeTextureDataFunction> InternalFormatInitializerPair; // TODO: This should be generated by a JSON file const InternalFormatInitializerMap &BuildInternalFormatInitializerMap() { static InternalFormatInitializerMap map; map.insert(InternalFormatInitializerPair( InitializeTextureFormatPair(GL_RGB8, DXGI_FORMAT_R8G8B8A8_UNORM), Initialize4ComponentData<GLubyte, 0x00, 0x00, 0x00, 0xFF>)); map.insert(InternalFormatInitializerPair( InitializeTextureFormatPair(GL_RGB565, DXGI_FORMAT_R8G8B8A8_UNORM), Initialize4ComponentData<GLubyte, 0x00, 0x00, 0x00, 0xFF>)); map.insert(InternalFormatInitializerPair( InitializeTextureFormatPair(GL_SRGB8, DXGI_FORMAT_R8G8B8A8_UNORM_SRGB), Initialize4ComponentData<GLubyte, 0x00, 0x00, 0x00, 0xFF>)); map.insert(InternalFormatInitializerPair( InitializeTextureFormatPair(GL_RGB16F, DXGI_FORMAT_R16G16B16A16_FLOAT), Initialize4ComponentData<GLhalf, 0x0000, 0x0000, 0x0000, gl::Float16One>)); map.insert(InternalFormatInitializerPair( InitializeTextureFormatPair(GL_RGB32F, DXGI_FORMAT_R32G32B32A32_FLOAT), Initialize4ComponentData<GLfloat, 0x00000000, 0x00000000, 0x00000000, gl::Float32One>)); map.insert(InternalFormatInitializerPair( InitializeTextureFormatPair(GL_RGB8UI, DXGI_FORMAT_R8G8B8A8_UINT), Initialize4ComponentData<GLubyte, 0x00, 0x00, 0x00, 0x01>)); map.insert(InternalFormatInitializerPair( InitializeTextureFormatPair(GL_RGB8I, DXGI_FORMAT_R8G8B8A8_SINT), Initialize4ComponentData<GLbyte, 0x00, 0x00, 0x00, 0x01>)); map.insert(InternalFormatInitializerPair( InitializeTextureFormatPair(GL_RGB16UI, DXGI_FORMAT_R16G16B16A16_UINT), Initialize4ComponentData<GLushort, 0x0000, 0x0000, 0x0000, 0x0001>)); map.insert(InternalFormatInitializerPair( InitializeTextureFormatPair(GL_RGB16I, DXGI_FORMAT_R16G16B16A16_SINT), Initialize4ComponentData<GLshort, 0x0000, 0x0000, 0x0000, 0x0001>)); map.insert(InternalFormatInitializerPair( InitializeTextureFormatPair(GL_RGB32UI, DXGI_FORMAT_R32G32B32A32_UINT), Initialize4ComponentData<GLuint, 0x00000000, 0x00000000, 0x00000000, 0x00000001>)); map.insert(InternalFormatInitializerPair( InitializeTextureFormatPair(GL_RGB32I, DXGI_FORMAT_R32G32B32A32_SINT), Initialize4ComponentData<GLint, 0x00000000, 0x00000000, 0x00000000, 0x00000001>)); return map; } } // namespace d3d11 } // namespace rx
mlfarrell/angle
src/libANGLE/renderer/d3d/d3d11/texture_format_util.cpp
C++
bsd-3-clause
27,624
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "ui/events/platform/x11/hotplug_event_handler_x11.h" #include <X11/extensions/XInput.h> #include <X11/extensions/XInput2.h> #include <cmath> #include <set> #include <string> #include <vector> #include "base/command_line.h" #include "base/files/file_enumerator.h" #include "base/logging.h" #include "base/process/launch.h" #include "base/strings/string_util.h" #include "base/sys_info.h" #include "ui/events/device_hotplug_event_observer.h" #include "ui/events/touchscreen_device.h" #include "ui/gfx/x/x11_types.h" namespace ui { namespace { // We consider the touchscreen to be internal if it is an I2c device. // With the device id, we can query X to get the device's dev input // node eventXXX. Then we search all the dev input nodes registered // by I2C devices to see if we can find eventXXX. bool IsTouchscreenInternal(XDisplay* dpy, int device_id) { using base::FileEnumerator; using base::FilePath; #if !defined(CHROMEOS) return false; #else if (!base::SysInfo::IsRunningOnChromeOS()) return false; #endif // Input device has a property "Device Node" pointing to its dev input node, // e.g. Device Node (250): "/dev/input/event8" Atom device_node = XInternAtom(dpy, "Device Node", False); if (device_node == None) return false; Atom actual_type; int actual_format; unsigned long nitems, bytes_after; unsigned char* data; XDevice* dev = XOpenDevice(dpy, device_id); if (!dev) return false; if (XGetDeviceProperty(dpy, dev, device_node, 0, 1000, False, AnyPropertyType, &actual_type, &actual_format, &nitems, &bytes_after, &data) != Success) { XCloseDevice(dpy, dev); return false; } base::FilePath dev_node_path(reinterpret_cast<char*>(data)); XFree(data); XCloseDevice(dpy, dev); std::string event_node = dev_node_path.BaseName().value(); if (event_node.empty() || !StartsWithASCII(event_node, "event", false)) return false; // Extract id "XXX" from "eventXXX" std::string event_node_id = event_node.substr(5); // I2C input device registers its dev input node at // /sys/bus/i2c/devices/*/input/inputXXX/eventXXX FileEnumerator i2c_enum(FilePath(FILE_PATH_LITERAL("/sys/bus/i2c/devices/")), false, base::FileEnumerator::DIRECTORIES); for (FilePath i2c_name = i2c_enum.Next(); !i2c_name.empty(); i2c_name = i2c_enum.Next()) { FileEnumerator input_enum(i2c_name.Append(FILE_PATH_LITERAL("input")), false, base::FileEnumerator::DIRECTORIES, FILE_PATH_LITERAL("input*")); for (base::FilePath input = input_enum.Next(); !input.empty(); input = input_enum.Next()) { if (input.BaseName().value().substr(5) == event_node_id) return true; } } return false; } } // namespace HotplugEventHandlerX11::HotplugEventHandlerX11( DeviceHotplugEventObserver* delegate) : delegate_(delegate) { } HotplugEventHandlerX11::~HotplugEventHandlerX11() { } void HotplugEventHandlerX11::OnHotplugEvent() { const XIDeviceList& device_list = DeviceListCacheX::GetInstance()->GetXI2DeviceList(gfx::GetXDisplay()); HandleTouchscreenDevices(device_list); } void HotplugEventHandlerX11::HandleTouchscreenDevices( const XIDeviceList& x11_devices) { std::vector<TouchscreenDevice> devices; Display* display = gfx::GetXDisplay(); Atom valuator_x = XInternAtom(display, "Abs MT Position X", False); Atom valuator_y = XInternAtom(display, "Abs MT Position Y", False); if (valuator_x == None || valuator_y == None) return; std::set<int> no_match_touchscreen; for (int i = 0; i < x11_devices.count; i++) { if (!x11_devices[i].enabled || x11_devices[i].use != XIFloatingSlave) continue; // Assume all touchscreens are floating slaves double width = -1.0; double height = -1.0; bool is_direct_touch = false; for (int j = 0; j < x11_devices[i].num_classes; j++) { XIAnyClassInfo* class_info = x11_devices[i].classes[j]; if (class_info->type == XIValuatorClass) { XIValuatorClassInfo* valuator_info = reinterpret_cast<XIValuatorClassInfo*>(class_info); if (valuator_x == valuator_info->label) { // Ignore X axis valuator with unexpected properties if (valuator_info->number == 0 && valuator_info->mode == Absolute && valuator_info->min == 0.0) { width = valuator_info->max; } } else if (valuator_y == valuator_info->label) { // Ignore Y axis valuator with unexpected properties if (valuator_info->number == 1 && valuator_info->mode == Absolute && valuator_info->min == 0.0) { height = valuator_info->max; } } } #if defined(USE_XI2_MT) if (class_info->type == XITouchClass) { XITouchClassInfo* touch_info = reinterpret_cast<XITouchClassInfo*>(class_info); is_direct_touch = touch_info->mode == XIDirectTouch; } #endif } // Touchscreens should have absolute X and Y axes, and be direct touch // devices. if (width > 0.0 && height > 0.0 && is_direct_touch) { bool is_internal = IsTouchscreenInternal(display, x11_devices[i].deviceid); devices.push_back(TouchscreenDevice( x11_devices[i].deviceid, gfx::Size(width, height), is_internal)); } } delegate_->OnTouchscreenDevicesUpdated(devices); } } // namespace ui
collinjackson/mojo
ui/events/platform/x11/hotplug_event_handler_x11.cc
C++
bsd-3-clause
5,674
<?php /** * ALIPAY API: alipay.pass.instance.update request * * @author auto create * @since 1.0, 2015-07-23 11:37:35 */ class AlipayPassInstanceUpdateRequest { /** * 需要更新的券实例变量和状态信息 **/ private $bizContent; private $apiParas = array(); private $terminalType; private $terminalInfo; private $prodCode; private $apiVersion="1.0"; private $notifyUrl; public function setBizContent($bizContent) { $this->bizContent = $bizContent; $this->apiParas["biz_content"] = $bizContent; } public function getBizContent() { return $this->bizContent; } public function getApiMethodName() { return "alipay.pass.instance.update"; } public function setNotifyUrl($notifyUrl) { $this->notifyUrl=$notifyUrl; } public function getNotifyUrl() { return $this->notifyUrl; } public function getApiParas() { return $this->apiParas; } public function getTerminalType() { return $this->terminalType; } public function setTerminalType($terminalType) { $this->terminalType = $terminalType; } public function getTerminalInfo() { return $this->terminalInfo; } public function setTerminalInfo($terminalInfo) { $this->terminalInfo = $terminalInfo; } public function getProdCode() { return $this->prodCode; } public function setProdCode($prodCode) { $this->prodCode = $prodCode; } public function setApiVersion($apiVersion) { $this->apiVersion=$apiVersion; } public function getApiVersion() { return $this->apiVersion; } }
black-tangyang/basic
web/alipay/aop/request/AlipayPassInstanceUpdateRequest.php
PHP
bsd-3-clause
1,524
"""Univariate features selection.""" # Authors: V. Michel, B. Thirion, G. Varoquaux, A. Gramfort, E. Duchesnay. # L. Buitinck, A. Joly # License: BSD 3 clause import numpy as np import warnings from scipy import special, stats from scipy.sparse import issparse from ..base import BaseEstimator from ..preprocessing import LabelBinarizer from ..utils import (as_float_array, check_array, check_X_y, safe_sqr, safe_mask) from ..utils.extmath import norm, safe_sparse_dot from ..utils.validation import check_is_fitted from .base import SelectorMixin def _clean_nans(scores): """ Fixes Issue #1240: NaNs can't be properly compared, so change them to the smallest value of scores's dtype. -inf seems to be unreliable. """ # XXX where should this function be called? fit? scoring functions # themselves? scores = as_float_array(scores, copy=True) scores[np.isnan(scores)] = np.finfo(scores.dtype).min return scores ###################################################################### # Scoring functions # The following function is a rewriting of scipy.stats.f_oneway # Contrary to the scipy.stats.f_oneway implementation it does not # copy the data while keeping the inputs unchanged. def f_oneway(*args): """Performs a 1-way ANOVA. The one-way ANOVA tests the null hypothesis that 2 or more groups have the same population mean. The test is applied to samples from two or more groups, possibly with differing sizes. Parameters ---------- sample1, sample2, ... : array_like, sparse matrices The sample measurements should be given as arguments. Returns ------- F-value : float The computed F-value of the test. p-value : float The associated p-value from the F-distribution. Notes ----- The ANOVA test has important assumptions that must be satisfied in order for the associated p-value to be valid. 1. The samples are independent 2. Each sample is from a normally distributed population 3. The population standard deviations of the groups are all equal. This property is known as homoscedasticity. If these assumptions are not true for a given set of data, it may still be possible to use the Kruskal-Wallis H-test (`scipy.stats.kruskal`_) although with some loss of power. The algorithm is from Heiman[2], pp.394-7. See ``scipy.stats.f_oneway`` that should give the same results while being less efficient. References ---------- .. [1] Lowry, Richard. "Concepts and Applications of Inferential Statistics". Chapter 14. http://faculty.vassar.edu/lowry/ch14pt1.html .. [2] Heiman, G.W. Research Methods in Statistics. 2002. """ n_classes = len(args) args = [as_float_array(a) for a in args] n_samples_per_class = np.array([a.shape[0] for a in args]) n_samples = np.sum(n_samples_per_class) ss_alldata = sum(safe_sqr(a).sum(axis=0) for a in args) sums_args = [np.asarray(a.sum(axis=0)) for a in args] square_of_sums_alldata = sum(sums_args) ** 2 square_of_sums_args = [s ** 2 for s in sums_args] sstot = ss_alldata - square_of_sums_alldata / float(n_samples) ssbn = 0. for k, _ in enumerate(args): ssbn += square_of_sums_args[k] / n_samples_per_class[k] ssbn -= square_of_sums_alldata / float(n_samples) sswn = sstot - ssbn dfbn = n_classes - 1 dfwn = n_samples - n_classes msb = ssbn / float(dfbn) msw = sswn / float(dfwn) constant_features_idx = np.where(msw == 0.)[0] if (np.nonzero(msb)[0].size != msb.size and constant_features_idx.size): warnings.warn("Features %s are constant." % constant_features_idx, UserWarning) f = msb / msw # flatten matrix to vector in sparse case f = np.asarray(f).ravel() prob = stats.fprob(dfbn, dfwn, f) return f, prob def f_classif(X, y): """Compute the Anova F-value for the provided sample Parameters ---------- X : {array-like, sparse matrix} shape = [n_samples, n_features] The set of regressors that will tested sequentially. y : array of shape(n_samples) The data matrix. Returns ------- F : array, shape = [n_features,] The set of F values. pval : array, shape = [n_features,] The set of p-values. """ X, y = check_X_y(X, y, ['csr', 'csc', 'coo']) args = [X[safe_mask(X, y == k)] for k in np.unique(y)] return f_oneway(*args) def _chisquare(f_obs, f_exp): """Fast replacement for scipy.stats.chisquare. Version from https://github.com/scipy/scipy/pull/2525 with additional optimizations. """ f_obs = np.asarray(f_obs, dtype=np.float64) k = len(f_obs) # Reuse f_obs for chi-squared statistics chisq = f_obs chisq -= f_exp chisq **= 2 chisq /= f_exp chisq = chisq.sum(axis=0) return chisq, special.chdtrc(k - 1, chisq) def chi2(X, y): """Compute chi-squared statistic for each class/feature combination. This score can be used to select the n_features features with the highest values for the test chi-squared statistic from X, which must contain booleans or frequencies (e.g., term counts in document classification), relative to the classes. Recall that the chi-square test measures dependence between stochastic variables, so using this function "weeds out" the features that are the most likely to be independent of class and therefore irrelevant for classification. Parameters ---------- X : {array-like, sparse matrix}, shape = (n_samples, n_features_in) Sample vectors. y : array-like, shape = (n_samples,) Target vector (class labels). Returns ------- chi2 : array, shape = (n_features,) chi2 statistics of each feature. pval : array, shape = (n_features,) p-values of each feature. Notes ----- Complexity of this algorithm is O(n_classes * n_features). """ # XXX: we might want to do some of the following in logspace instead for # numerical stability. X = check_array(X, accept_sparse='csr') if np.any((X.data if issparse(X) else X) < 0): raise ValueError("Input X must be non-negative.") Y = LabelBinarizer().fit_transform(y) if Y.shape[1] == 1: Y = np.append(1 - Y, Y, axis=1) observed = safe_sparse_dot(Y.T, X) # n_classes * n_features feature_count = check_array(X.sum(axis=0)) class_prob = check_array(Y.mean(axis=0)) expected = np.dot(class_prob.T, feature_count) return _chisquare(observed, expected) def f_regression(X, y, center=True): """Univariate linear regression tests Quick linear model for testing the effect of a single regressor, sequentially for many regressors. This is done in 3 steps: 1. the regressor of interest and the data are orthogonalized wrt constant regressors 2. the cross correlation between data and regressors is computed 3. it is converted to an F score then to a p-value Parameters ---------- X : {array-like, sparse matrix} shape = (n_samples, n_features) The set of regressors that will tested sequentially. y : array of shape(n_samples). The data matrix center : True, bool, If true, X and y will be centered. Returns ------- F : array, shape=(n_features,) F values of features. pval : array, shape=(n_features,) p-values of F-scores. """ if issparse(X) and center: raise ValueError("center=True only allowed for dense data") X, y = check_X_y(X, y, ['csr', 'csc', 'coo'], dtype=np.float) if center: y = y - np.mean(y) X = X.copy('F') # faster in fortran X -= X.mean(axis=0) # compute the correlation corr = safe_sparse_dot(y, X) # XXX could use corr /= row_norms(X.T) here, but the test doesn't pass corr /= np.asarray(np.sqrt(safe_sqr(X).sum(axis=0))).ravel() corr /= norm(y) # convert to p-value degrees_of_freedom = y.size - (2 if center else 1) F = corr ** 2 / (1 - corr ** 2) * degrees_of_freedom pv = stats.f.sf(F, 1, degrees_of_freedom) return F, pv ###################################################################### # Base classes class _BaseFilter(BaseEstimator, SelectorMixin): """Initialize the univariate feature selection. Parameters ---------- score_func : callable Function taking two arrays X and y, and returning a pair of arrays (scores, pvalues). """ def __init__(self, score_func): self.score_func = score_func def fit(self, X, y): """Run score function on (X, y) and get the appropriate features. Parameters ---------- X : array-like, shape = [n_samples, n_features] The training input samples. y : array-like, shape = [n_samples] The target values (class labels in classification, real numbers in regression). Returns ------- self : object Returns self. """ X, y = check_X_y(X, y, ['csr', 'csc', 'coo']) if not callable(self.score_func): raise TypeError("The score function should be a callable, %s (%s) " "was passed." % (self.score_func, type(self.score_func))) self._check_params(X, y) self.scores_, self.pvalues_ = self.score_func(X, y) self.scores_ = np.asarray(self.scores_) self.pvalues_ = np.asarray(self.pvalues_) return self def _check_params(self, X, y): pass ###################################################################### # Specific filters ###################################################################### class SelectPercentile(_BaseFilter): """Select features according to a percentile of the highest scores. Parameters ---------- score_func : callable Function taking two arrays X and y, and returning a pair of arrays (scores, pvalues). percentile : int, optional, default=10 Percent of features to keep. Attributes ---------- scores_ : array-like, shape=(n_features,) Scores of features. pvalues_ : array-like, shape=(n_features,) p-values of feature scores. Notes ----- Ties between features with equal scores will be broken in an unspecified way. """ def __init__(self, score_func=f_classif, percentile=10): super(SelectPercentile, self).__init__(score_func) self.percentile = percentile def _check_params(self, X, y): if not 0 <= self.percentile <= 100: raise ValueError("percentile should be >=0, <=100; got %r" % self.percentile) def _get_support_mask(self): check_is_fitted(self, 'scores_') # Cater for NaNs if self.percentile == 100: return np.ones(len(self.scores_), dtype=np.bool) elif self.percentile == 0: return np.zeros(len(self.scores_), dtype=np.bool) scores = _clean_nans(self.scores_) treshold = stats.scoreatpercentile(scores, 100 - self.percentile) mask = scores > treshold ties = np.where(scores == treshold)[0] if len(ties): max_feats = len(scores) * self.percentile // 100 kept_ties = ties[:max_feats - mask.sum()] mask[kept_ties] = True return mask class SelectKBest(_BaseFilter): """Select features according to the k highest scores. Parameters ---------- score_func : callable Function taking two arrays X and y, and returning a pair of arrays (scores, pvalues). k : int or "all", optional, default=10 Number of top features to select. The "all" option bypasses selection, for use in a parameter search. Attributes ---------- scores_ : array-like, shape=(n_features,) Scores of features. pvalues_ : array-like, shape=(n_features,) p-values of feature scores. Notes ----- Ties between features with equal scores will be broken in an unspecified way. """ def __init__(self, score_func=f_classif, k=10): super(SelectKBest, self).__init__(score_func) self.k = k def _check_params(self, X, y): if not (self.k == "all" or 0 <= self.k <= X.shape[1]): raise ValueError("k should be >=0, <= n_features; got %r." "Use k='all' to return all features." % self.k) def _get_support_mask(self): check_is_fitted(self, 'scores_') if self.k == 'all': return np.ones(self.scores_.shape, dtype=bool) elif self.k == 0: return np.zeros(self.scores_.shape, dtype=bool) else: scores = _clean_nans(self.scores_) mask = np.zeros(scores.shape, dtype=bool) # Request a stable sort. Mergesort takes more memory (~40MB per # megafeature on x86-64). mask[np.argsort(scores, kind="mergesort")[-self.k:]] = 1 return mask class SelectFpr(_BaseFilter): """Filter: Select the pvalues below alpha based on a FPR test. FPR test stands for False Positive Rate test. It controls the total amount of false detections. Parameters ---------- score_func : callable Function taking two arrays X and y, and returning a pair of arrays (scores, pvalues). alpha : float, optional The highest p-value for features to be kept. Attributes ---------- scores_ : array-like, shape=(n_features,) Scores of features. pvalues_ : array-like, shape=(n_features,) p-values of feature scores. """ def __init__(self, score_func=f_classif, alpha=5e-2): super(SelectFpr, self).__init__(score_func) self.alpha = alpha def _get_support_mask(self): check_is_fitted(self, 'scores_') return self.pvalues_ < self.alpha class SelectFdr(_BaseFilter): """Filter: Select the p-values for an estimated false discovery rate This uses the Benjamini-Hochberg procedure. ``alpha`` is the target false discovery rate. Parameters ---------- score_func : callable Function taking two arrays X and y, and returning a pair of arrays (scores, pvalues). alpha : float, optional The highest uncorrected p-value for features to keep. Attributes ---------- scores_ : array-like, shape=(n_features,) Scores of features. pvalues_ : array-like, shape=(n_features,) p-values of feature scores. """ def __init__(self, score_func=f_classif, alpha=5e-2): super(SelectFdr, self).__init__(score_func) self.alpha = alpha def _get_support_mask(self): check_is_fitted(self, 'scores_') alpha = self.alpha sv = np.sort(self.pvalues_) selected = sv[sv < alpha * np.arange(len(self.pvalues_))] if selected.size == 0: return np.zeros_like(self.pvalues_, dtype=bool) return self.pvalues_ <= selected.max() class SelectFwe(_BaseFilter): """Filter: Select the p-values corresponding to Family-wise error rate Parameters ---------- score_func : callable Function taking two arrays X and y, and returning a pair of arrays (scores, pvalues). alpha : float, optional The highest uncorrected p-value for features to keep. Attributes ---------- scores_ : array-like, shape=(n_features,) Scores of features. pvalues_ : array-like, shape=(n_features,) p-values of feature scores. """ def __init__(self, score_func=f_classif, alpha=5e-2): super(SelectFwe, self).__init__(score_func) self.alpha = alpha def _get_support_mask(self): check_is_fitted(self, 'scores_') return (self.pvalues_ < self.alpha / len(self.pvalues_)) ###################################################################### # Generic filter ###################################################################### # TODO this class should fit on either p-values or scores, # depending on the mode. class GenericUnivariateSelect(_BaseFilter): """Univariate feature selector with configurable strategy. Parameters ---------- score_func : callable Function taking two arrays X and y, and returning a pair of arrays (scores, pvalues). mode : {'percentile', 'k_best', 'fpr', 'fdr', 'fwe'} Feature selection mode. param : float or int depending on the feature selection mode Parameter of the corresponding mode. Attributes ---------- scores_ : array-like, shape=(n_features,) Scores of features. pvalues_ : array-like, shape=(n_features,) p-values of feature scores. """ _selection_modes = {'percentile': SelectPercentile, 'k_best': SelectKBest, 'fpr': SelectFpr, 'fdr': SelectFdr, 'fwe': SelectFwe} def __init__(self, score_func=f_classif, mode='percentile', param=1e-5): super(GenericUnivariateSelect, self).__init__(score_func) self.mode = mode self.param = param def _make_selector(self): selector = self._selection_modes[self.mode](score_func=self.score_func) # Now perform some acrobatics to set the right named parameter in # the selector possible_params = selector._get_param_names() possible_params.remove('score_func') selector.set_params(**{possible_params[0]: self.param}) return selector def _check_params(self, X, y): if self.mode not in self._selection_modes: raise ValueError("The mode passed should be one of %s, %r," " (type %s) was passed." % (self._selection_modes.keys(), self.mode, type(self.mode))) self._make_selector()._check_params(X, y) def _get_support_mask(self): check_is_fitted(self, 'scores_') selector = self._make_selector() selector.pvalues_ = self.pvalues_ selector.scores_ = self.scores_ return selector._get_support_mask()
loli/semisupervisedforests
sklearn/feature_selection/univariate_selection.py
Python
bsd-3-clause
18,609
// Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "ios/chrome/browser/search_engines/template_url_service_factory.h" #include "base/bind.h" #include "base/callback.h" #include "base/no_destructor.h" #include "components/keyed_service/core/service_access_type.h" #include "components/keyed_service/ios/browser_state_dependency_manager.h" #include "components/search_engines/default_search_manager.h" #include "components/search_engines/template_url_service.h" #include "ios/chrome/browser/application_context.h" #include "ios/chrome/browser/browser_state/browser_state_otr_helper.h" #include "ios/chrome/browser/browser_state/chrome_browser_state.h" #include "ios/chrome/browser/history/history_service_factory.h" #include "ios/chrome/browser/search_engines/template_url_service_client_impl.h" #include "ios/chrome/browser/search_engines/ui_thread_search_terms_data.h" #include "ios/chrome/browser/webdata_services/web_data_service_factory.h" #include "rlz/buildflags/buildflags.h" #if BUILDFLAG(ENABLE_RLZ) #include "components/rlz/rlz_tracker.h" // nogncheck #endif namespace ios { namespace { base::RepeatingClosure GetDefaultSearchProviderChangedCallback() { #if BUILDFLAG(ENABLE_RLZ) return base::BindRepeating( base::IgnoreResult(&rlz::RLZTracker::RecordProductEvent), rlz_lib::CHROME, rlz::RLZTracker::ChromeOmnibox(), rlz_lib::SET_TO_GOOGLE); #else return base::RepeatingClosure(); #endif } std::unique_ptr<KeyedService> BuildTemplateURLService( web::BrowserState* context) { ChromeBrowserState* browser_state = ChromeBrowserState::FromBrowserState(context); return std::make_unique<TemplateURLService>( browser_state->GetPrefs(), std::make_unique<ios::UIThreadSearchTermsData>(), ios::WebDataServiceFactory::GetKeywordWebDataForBrowserState( browser_state, ServiceAccessType::EXPLICIT_ACCESS), std::make_unique<ios::TemplateURLServiceClientImpl>( ios::HistoryServiceFactory::GetForBrowserState( browser_state, ServiceAccessType::EXPLICIT_ACCESS)), GetDefaultSearchProviderChangedCallback()); } } // namespace // static TemplateURLService* TemplateURLServiceFactory::GetForBrowserState( ChromeBrowserState* browser_state) { return static_cast<TemplateURLService*>( GetInstance()->GetServiceForBrowserState(browser_state, true)); } // static TemplateURLServiceFactory* TemplateURLServiceFactory::GetInstance() { static base::NoDestructor<TemplateURLServiceFactory> instance; return instance.get(); } // static BrowserStateKeyedServiceFactory::TestingFactory TemplateURLServiceFactory::GetDefaultFactory() { return base::BindRepeating(&BuildTemplateURLService); } TemplateURLServiceFactory::TemplateURLServiceFactory() : BrowserStateKeyedServiceFactory( "TemplateURLService", BrowserStateDependencyManager::GetInstance()) { DependsOn(ios::HistoryServiceFactory::GetInstance()); DependsOn(ios::WebDataServiceFactory::GetInstance()); } TemplateURLServiceFactory::~TemplateURLServiceFactory() {} void TemplateURLServiceFactory::RegisterBrowserStatePrefs( user_prefs::PrefRegistrySyncable* registry) { DefaultSearchManager::RegisterProfilePrefs(registry); TemplateURLService::RegisterProfilePrefs(registry); } std::unique_ptr<KeyedService> TemplateURLServiceFactory::BuildServiceInstanceFor( web::BrowserState* context) const { return BuildTemplateURLService(context); } web::BrowserState* TemplateURLServiceFactory::GetBrowserStateToUse( web::BrowserState* context) const { return GetBrowserStateRedirectedInIncognito(context); } bool TemplateURLServiceFactory::ServiceIsNULLWhileTesting() const { return true; } } // namespace ios
scheib/chromium
ios/chrome/browser/search_engines/template_url_service_factory.cc
C++
bsd-3-clause
3,840
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/threading/platform_thread.h" #include <errno.h> #include <sched.h> #include <stddef.h> #include "base/lazy_instance.h" #include "base/logging.h" #include "base/threading/platform_thread_internal_posix.h" #include "base/threading/thread_id_name_manager.h" #if 0 #include "base/tracked_objects.h" #endif #include "build/build_config.h" #if !defined(OS_NACL) #include <pthread.h> #include <sys/types.h> #include <unistd.h> #endif namespace base { namespace internal { namespace { #if !defined(OS_NACL) const struct sched_param kRealTimePrio = {8}; #endif } // namespace const ThreadPriorityToNiceValuePair kThreadPriorityToNiceValueMap[4] = { {ThreadPriority::BACKGROUND, 10}, {ThreadPriority::NORMAL, 0}, {ThreadPriority::DISPLAY, -6}, {ThreadPriority::REALTIME_AUDIO, -10}, }; bool SetCurrentThreadPriorityForPlatform(ThreadPriority priority) { #if !defined(OS_NACL) return priority == ThreadPriority::REALTIME_AUDIO && pthread_setschedparam(pthread_self(), SCHED_RR, &kRealTimePrio) == 0; #else return false; #endif } bool GetCurrentThreadPriorityForPlatform(ThreadPriority* priority) { #if !defined(OS_NACL) int maybe_sched_rr = 0; struct sched_param maybe_realtime_prio = {0}; if (pthread_getschedparam(pthread_self(), &maybe_sched_rr, &maybe_realtime_prio) == 0 && maybe_sched_rr == SCHED_RR && maybe_realtime_prio.sched_priority == kRealTimePrio.sched_priority) { *priority = ThreadPriority::REALTIME_AUDIO; return true; } #endif return false; } } // namespace internal // static void PlatformThread::SetName(const std::string& name) { ThreadIdNameManager::GetInstance()->SetName(CurrentId(), name); #if 0 tracked_objects::ThreadData::InitializeThreadContext(name); #endif #if !defined(OS_NACL) // On FreeBSD we can get the thread names to show up in the debugger by // setting the process name for the LWP. We don't want to do this for the // main thread because that would rename the process, causing tools like // killall to stop working. if (PlatformThread::CurrentId() == getpid()) return; setproctitle("%s", name.c_str()); #endif // !defined(OS_NACL) } void InitThreading() {} void TerminateOnThread() {} size_t GetDefaultThreadStackSize(const pthread_attr_t& attributes) { #if !defined(THREAD_SANITIZER) return 0; #else // ThreadSanitizer bloats the stack heavily. Evidence has been that the // default stack size isn't enough for some browser tests. return 2 * (1 << 23); // 2 times 8192K (the default stack size on Linux). #endif } } // namespace base
kku1993/libquic
src/base/threading/platform_thread_freebsd.cc
C++
bsd-3-clause
2,784
package org.broadinstitute.hellbender.tools.spark.pathseq; import com.esotericsoftware.kryo.Kryo; import com.esotericsoftware.kryo.io.Output; import htsjdk.samtools.SAMSequenceRecord; import org.apache.commons.compress.archivers.tar.TarArchiveEntry; import org.apache.commons.compress.archivers.tar.TarArchiveInputStream; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.broadinstitute.hellbender.exceptions.UserException; import org.broadinstitute.hellbender.utils.io.IOUtils; import scala.Tuple2; import java.io.*; import java.util.*; import java.util.zip.GZIPInputStream; public final class PSBuildReferenceTaxonomyUtils { protected static final Logger logger = LogManager.getLogger(PSBuildReferenceTaxonomyUtils.class); private static final String VERTICAL_BAR_DELIMITER_REGEX = "\\s*\\|\\s*"; /** * Build set of accessions contained in the reference. * Returns: a map from accession to the name and length of the record. If the sequence name contains the * taxonomic ID, it instead gets added to taxIdToProperties. Later we merge both results into taxIdToProperties. * Method: First, look for either "taxid|<taxid>|" or "ref|<accession>|" in the sequence name. If neither of * those are found, use the first word of the name as the accession. */ protected static Map<String, Tuple2<String, Long>> parseReferenceRecords(final List<SAMSequenceRecord> dictionaryList, final Map<Integer, PSPathogenReferenceTaxonProperties> taxIdToProperties) { final Map<String, Tuple2<String, Long>> accessionToNameAndLength = new HashMap<>(); for (final SAMSequenceRecord record : dictionaryList) { final String recordName = record.getSequenceName(); final long recordLength = record.getSequenceLength(); final String[] tokens = recordName.split(VERTICAL_BAR_DELIMITER_REGEX); String recordAccession = null; int recordTaxId = PSTree.NULL_NODE; for (int i = 0; i < tokens.length - 1 && recordTaxId == PSTree.NULL_NODE; i++) { if (tokens[i].equals("ref")) { recordAccession = tokens[i + 1]; } else if (tokens[i].equals("taxid")) { recordTaxId = parseTaxonId(tokens[i + 1]); } } if (recordTaxId == PSTree.NULL_NODE) { if (recordAccession == null) { final String[] tokens2 = tokens[0].split(" "); //Default accession to first word in the name recordAccession = tokens2[0]; } accessionToNameAndLength.put(recordAccession, new Tuple2<>(recordName, recordLength)); } else { addReferenceAccessionToTaxon(recordTaxId, recordName, recordLength, taxIdToProperties); } } return accessionToNameAndLength; } private static int parseTaxonId(final String taxonId) { try { return Integer.valueOf(taxonId); } catch (final NumberFormatException e) { throw new UserException.BadInput("Expected taxonomy ID to be an integer but found \"" + taxonId + "\"", e); } } /** * Helper classes for defining RefSeq and GenBank catalog formats. Columns should be given as 0-based indices. */ private interface AccessionCatalogFormat { int getTaxIdColumn(); int getAccessionColumn(); } private static final class RefSeqCatalogFormat implements AccessionCatalogFormat { private static final int TAX_ID_COLUMN = 0; private static final int ACCESSION_COLUMN = 2; public int getTaxIdColumn() { return TAX_ID_COLUMN; } public int getAccessionColumn() { return ACCESSION_COLUMN; } } private static final class GenBankCatalogFormat implements AccessionCatalogFormat { private static final int TAX_ID_COLUMN = 6; private static final int ACCESSION_COLUMN = 1; public int getTaxIdColumn() { return TAX_ID_COLUMN; } public int getAccessionColumn() { return ACCESSION_COLUMN; } } /** * Builds maps of reference contig accessions to their taxonomic ids and vice versa. * Input can be a RefSeq or Genbank catalog file. accNotFound is an initial list of * accessions from the reference that have not been successfully looked up; if null, * will be initialized to the accToRefInfo key set by default. * <p> * Returns a collection of reference accessions that could not be found, if any. */ protected static Set<String> parseCatalog(final BufferedReader reader, final Map<String, Tuple2<String, Long>> accessionToNameAndLength, final Map<Integer, PSPathogenReferenceTaxonProperties> taxIdToProperties, final boolean bGenBank, final Set<String> accessionsNotFoundIn) { final Set<String> accessionsNotFoundOut; try { String line; final AccessionCatalogFormat catalogFormat = bGenBank ? new GenBankCatalogFormat() : new RefSeqCatalogFormat(); final int taxIdColumnIndex = catalogFormat.getTaxIdColumn(); final int accessionColumnIndex = catalogFormat.getAccessionColumn(); if (accessionsNotFoundIn == null) { //If accessionsNotFoundIn is null, this is the first call to parseCatalog, so initialize the set to all accessions accessionsNotFoundOut = new HashSet<>(accessionToNameAndLength.keySet()); } else { //Otherwise this is a subsequent call and we continue to look for any remaining accessions accessionsNotFoundOut = new HashSet<>(accessionsNotFoundIn); } final int minColumns = Math.max(taxIdColumnIndex, accessionColumnIndex) + 1; long lineNumber = 1; while ((line = reader.readLine()) != null && !line.isEmpty()) { final String[] tokens = line.trim().split("\t", minColumns + 1); if (tokens.length >= minColumns) { final int taxId = parseTaxonId(tokens[taxIdColumnIndex]); final String accession = tokens[accessionColumnIndex]; if (accessionToNameAndLength.containsKey(accession)) { final Tuple2<String, Long> nameAndLength = accessionToNameAndLength.get(accession); addReferenceAccessionToTaxon(taxId, nameAndLength._1, nameAndLength._2, taxIdToProperties); accessionsNotFoundOut.remove(accession); } } else { throw new UserException.BadInput("Expected at least " + minColumns + " tab-delimited columns in " + "GenBank catalog file, but only found " + tokens.length + " on line " + lineNumber); } lineNumber++; } } catch (final IOException e) { throw new UserException.CouldNotReadInputFile("Error reading from catalog file", e); } return accessionsNotFoundOut; } /** * Parses scientific name of each taxon and puts it in taxIdToProperties */ protected static void parseNamesFile(final BufferedReader reader, final Map<Integer, PSPathogenReferenceTaxonProperties> taxIdToProperties) { try { String line; while ((line = reader.readLine()) != null) { //Split into columns delimited by <TAB>|<TAB> final String[] tokens = line.split(VERTICAL_BAR_DELIMITER_REGEX); if (tokens.length < 4) { throw new UserException.BadInput("Expected at least 4 columns in tax dump names file but found " + tokens.length); } final String nameType = tokens[3]; if (nameType.equals("scientific name")) { final int taxId = parseTaxonId(tokens[0]); final String name = tokens[1]; if (taxIdToProperties.containsKey(taxId)) { taxIdToProperties.get(taxId).setName(name); } else { taxIdToProperties.put(taxId, new PSPathogenReferenceTaxonProperties(name)); } } } } catch (final IOException e) { throw new UserException.CouldNotReadInputFile("Error reading from taxonomy dump names file", e); } } /** * Gets the rank and parent of each taxon. * Returns a Collection of tax ID's found in the nodes file that are not in taxIdToProperties (i.e. were not found in * a reference sequence name using the taxid|\<taxid\> tag or the catalog file). */ protected static Collection<Integer> parseNodesFile(final BufferedReader reader, final Map<Integer, PSPathogenReferenceTaxonProperties> taxIdToProperties) { try { final Collection<Integer> taxIdsNotFound = new ArrayList<>(); String line; while ((line = reader.readLine()) != null) { final String[] tokens = line.split(VERTICAL_BAR_DELIMITER_REGEX); if (tokens.length < 3) { throw new UserException.BadInput("Expected at least 3 columns in tax dump nodes file but found " + tokens.length); } final int taxId = parseTaxonId(tokens[0]); final int parent = parseTaxonId(tokens[1]); final String rank = tokens[2]; final PSPathogenReferenceTaxonProperties taxonProperties; if (taxIdToProperties.containsKey(taxId)) { taxonProperties = taxIdToProperties.get(taxId); } else { taxonProperties = new PSPathogenReferenceTaxonProperties("tax_" + taxId); taxIdsNotFound.add(taxId); } taxonProperties.setRank(rank); if (taxId != PSTaxonomyConstants.ROOT_ID) { //keep root's parent set to null taxonProperties.setParent(parent); } taxIdToProperties.put(taxId, taxonProperties); } return taxIdsNotFound; } catch (final IOException e) { throw new UserException.CouldNotReadInputFile("Error reading from taxonomy dump nodes file", e); } } /** * Helper function for building the map from tax id to reference contig accession */ private static void addReferenceAccessionToTaxon(final int taxId, final String accession, final long length, final Map<Integer, PSPathogenReferenceTaxonProperties> taxIdToProperties) { taxIdToProperties.putIfAbsent(taxId, new PSPathogenReferenceTaxonProperties()); taxIdToProperties.get(taxId).addAccession(accession, length); } /** * Removes nodes not in the tree from the tax_id-to-properties map */ static void removeUnusedTaxIds(final Map<Integer, PSPathogenReferenceTaxonProperties> taxIdToProperties, final PSTree tree) { taxIdToProperties.keySet().retainAll(tree.getNodeIDs()); } /** * Create reference_name-to-taxid map (just an inversion on taxIdToProperties) */ protected static Map<String, Integer> buildAccessionToTaxIdMap(final Map<Integer, PSPathogenReferenceTaxonProperties> taxIdToProperties, final PSTree tree, final int minNonVirusContigLength) { final Map<String, Integer> accessionToTaxId = new HashMap<>(); for (final int taxId : taxIdToProperties.keySet()) { final boolean isVirus = tree.getPathOf(taxId).contains(PSTaxonomyConstants.VIRUS_ID); final PSPathogenReferenceTaxonProperties taxonProperties = taxIdToProperties.get(taxId); for (final String name : taxonProperties.getAccessions()) { if (isVirus || taxonProperties.getAccessionLength(name) >= minNonVirusContigLength) { accessionToTaxId.put(name, taxId); } } } return accessionToTaxId; } /** * Returns a PSTree representing a reduced taxonomic tree containing only taxa present in the reference */ protected static PSTree buildTaxonomicTree(final Map<Integer, PSPathogenReferenceTaxonProperties> taxIdToProperties) { //Build tree of all taxa final PSTree tree = new PSTree(PSTaxonomyConstants.ROOT_ID); final Collection<Integer> invalidIds = new HashSet<>(taxIdToProperties.size()); for (final int taxId : taxIdToProperties.keySet()) { if (taxId != PSTaxonomyConstants.ROOT_ID) { final PSPathogenReferenceTaxonProperties taxonProperties = taxIdToProperties.get(taxId); if (taxonProperties.getName() != null && taxonProperties.getParent() != PSTree.NULL_NODE && taxonProperties.getRank() != null) { tree.addNode(taxId, taxonProperties.getName(), taxonProperties.getParent(), taxonProperties.getTotalLength(), taxonProperties.getRank()); } else { invalidIds.add(taxId); } } } PSUtils.logItemizedWarning(logger, invalidIds, "The following taxonomic IDs did not have name/taxonomy information (this may happen when the catalog and taxdump files are inconsistent)"); final Set<Integer> unreachableNodes = tree.removeUnreachableNodes(); if (!unreachableNodes.isEmpty()) { PSUtils.logItemizedWarning(logger, unreachableNodes, "Removed " + unreachableNodes.size() + " unreachable tree nodes"); } tree.checkStructure(); //Trim tree down to nodes corresponding only to reference taxa (and their ancestors) final Set<Integer> relevantNodes = new HashSet<>(); for (final int taxonId : taxIdToProperties.keySet()) { if (!taxIdToProperties.get(taxonId).getAccessions().isEmpty() && tree.hasNode(taxonId)) { relevantNodes.addAll(tree.getPathOf(taxonId)); } } if (relevantNodes.isEmpty()) { throw new UserException.BadInput("Did not find any taxa corresponding to reference sequence names.\n\n" + "Check that reference names follow one of the required formats:\n\n" + "\t...|ref|<accession.version>|...\n" + "\t...|taxid|<taxonomy_id>|...\n" + "\t<accession.version><mask>..."); } tree.retainNodes(relevantNodes); return tree; } /** * Gets a buffered reader for a gzipped file * @param path File path * @return Reader for the file */ public static BufferedReader getBufferedReaderGz(final String path) { try { return new BufferedReader(IOUtils.makeReaderMaybeGzipped(new File(path))); } catch (final IOException e) { throw new UserException.BadInput("Could not open file " + path, e); } } /** * Gets a Reader for a file in a gzipped tarball * @param tarPath Path to the tarball * @param fileName File within the tarball * @return The file's reader */ public static BufferedReader getBufferedReaderTarGz(final String tarPath, final String fileName) { try { InputStream result = null; final TarArchiveInputStream tarStream = new TarArchiveInputStream(new GZIPInputStream(new FileInputStream(tarPath))); TarArchiveEntry entry = tarStream.getNextTarEntry(); while (entry != null) { if (entry.getName().equals(fileName)) { result = tarStream; break; } entry = tarStream.getNextTarEntry(); } if (result == null) { throw new UserException.BadInput("Could not find file " + fileName + " in tarball " + tarPath); } return new BufferedReader(new InputStreamReader(result)); } catch (final IOException e) { throw new UserException.BadInput("Could not open compressed tarball file " + fileName + " in " + tarPath, e); } } /** * Writes objects using Kryo to specified local file path. * NOTE: using setReferences(false), which must also be set when reading the file. Does not work with nested * objects that reference its parent. */ public static void writeTaxonomyDatabase(final String filePath, final PSTaxonomyDatabase taxonomyDatabase) { try { final Kryo kryo = new Kryo(); kryo.setReferences(false); Output output = new Output(new FileOutputStream(filePath)); kryo.writeObject(output, taxonomyDatabase); output.close(); } catch (final FileNotFoundException e) { throw new UserException.CouldNotCreateOutputFile("Could not serialize objects to file", e); } } }
magicDGS/gatk
src/main/java/org/broadinstitute/hellbender/tools/spark/pathseq/PSBuildReferenceTaxonomyUtils.java
Java
bsd-3-clause
17,481
// Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/banners/app_banner_debug_log.h" #include "content/public/browser/render_frame_host.h" #include "content/public/browser/web_contents.h" namespace banners { const char kRendererRequestCancel[] = "renderer has requested the banner prompt be cancelled"; const char kManifestEmpty[] = "manifest could not be fetched, is empty, or could not be parsed"; const char kNoManifest[] = "site has no manifest <link> URL"; const char kCannotDetermineBestIcon[] = "could not determine the best icon to use"; const char kNoMatchingServiceWorker[] = "no matching service worker detected. You may need to reload the page, or " "check that the service worker for the current page also controls the " "start URL from the manifest"; const char kNoIconAvailable[] = "no icon available to display"; const char kUserNavigatedBeforeBannerShown[] = "the user navigated before the banner could be shown"; const char kStartURLNotValid[] = "start URL in manifest is not valid"; const char kManifestMissingNameOrShortName[] = "one of manifest name or short name must be specified"; const char kManifestMissingSuitableIcon[] = "manifest does not contain a suitable icon - PNG format of at least " "144x144px is required, and the sizes attribute must be set"; const char kNotLoadedInMainFrame[] = "page not loaded in the main frame"; const char kNotServedFromSecureOrigin[] = "page not served from a secure origin"; // The leading space is intentional as another string is prepended. const char kIgnoredNotSupportedOnAndroid[] = " application ignored: not supported on Android"; const char kIgnoredNoId[] = "play application ignored: no id provided"; const char kIgnoredIdsDoNotMatch[] = "play application ignored: app URL and id fields were specified in the " "manifest, but they do not match"; void OutputDeveloperNotShownMessage(content::WebContents* web_contents, const std::string& message, bool is_debug_mode) { OutputDeveloperDebugMessage(web_contents, "not shown: " + message, is_debug_mode); } void OutputDeveloperDebugMessage(content::WebContents* web_contents, const std::string& message, bool is_debug_mode) { if (!is_debug_mode || !web_contents) return; web_contents->GetMainFrame()->AddMessageToConsole( content::CONSOLE_MESSAGE_LEVEL_DEBUG, "App banner " + message); } } // namespace banners
ds-hwang/chromium-crosswalk
chrome/browser/banners/app_banner_debug_log.cc
C++
bsd-3-clause
2,713
using Microsoft.Extensions.DependencyInjection; namespace OrchardCore.Liquid { public static class ServiceCollectionExtensions { public static IServiceCollection AddLiquidFilter<T>(this IServiceCollection services, string name) where T : class, ILiquidFilter { services.Configure<LiquidOptions>(options => options.FilterRegistrations[name] = typeof(T)); services.AddScoped<T>(); return services; } } }
OrchardCMS/Brochard
src/OrchardCore/OrchardCore.Liquid.Abstractions/ServiceExtensions.cs
C#
bsd-3-clause
475
// Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package org.chromium.content.browser.input; import android.os.SystemClock; import android.text.Editable; import android.text.InputType; import android.text.Selection; import android.text.TextUtils; import android.view.KeyCharacterMap; import android.view.KeyEvent; import android.view.View; import android.view.inputmethod.BaseInputConnection; import android.view.inputmethod.EditorInfo; import android.view.inputmethod.ExtractedText; import android.view.inputmethod.ExtractedTextRequest; import org.chromium.base.Log; import org.chromium.base.VisibleForTesting; import org.chromium.blink_public.web.WebInputEventType; import org.chromium.blink_public.web.WebTextInputFlags; import org.chromium.ui.base.ime.TextInputType; /** * InputConnection is created by ContentView.onCreateInputConnection. * It then adapts android's IME to chrome's RenderWidgetHostView using the * native ImeAdapterAndroid via the class ImeAdapter. */ public class AdapterInputConnection extends BaseInputConnection { private static final String TAG = "cr.InputConnection"; private static final boolean DEBUG = false; /** * Selection value should be -1 if not known. See EditorInfo.java for details. */ public static final int INVALID_SELECTION = -1; public static final int INVALID_COMPOSITION = -1; private final View mInternalView; private final ImeAdapter mImeAdapter; private final Editable mEditable; private boolean mSingleLine; private int mNumNestedBatchEdits = 0; private int mPendingAccent; private int mLastUpdateSelectionStart = INVALID_SELECTION; private int mLastUpdateSelectionEnd = INVALID_SELECTION; private int mLastUpdateCompositionStart = INVALID_COMPOSITION; private int mLastUpdateCompositionEnd = INVALID_COMPOSITION; @VisibleForTesting AdapterInputConnection(View view, ImeAdapter imeAdapter, Editable editable, EditorInfo outAttrs) { super(view, true); mInternalView = view; mImeAdapter = imeAdapter; mImeAdapter.setInputConnection(this); mEditable = editable; // The editable passed in might have been in use by a prior keyboard and could have had // prior composition spans set. To avoid keyboard conflicts, remove all composing spans // when taking ownership of an existing Editable. finishComposingText(); mSingleLine = true; outAttrs.imeOptions = EditorInfo.IME_FLAG_NO_FULLSCREEN | EditorInfo.IME_FLAG_NO_EXTRACT_UI; outAttrs.inputType = EditorInfo.TYPE_CLASS_TEXT | EditorInfo.TYPE_TEXT_VARIATION_WEB_EDIT_TEXT; int inputType = imeAdapter.getTextInputType(); int inputFlags = imeAdapter.getTextInputFlags(); if ((inputFlags & WebTextInputFlags.AutocompleteOff) != 0) { outAttrs.inputType |= EditorInfo.TYPE_TEXT_FLAG_NO_SUGGESTIONS; } if (inputType == TextInputType.TEXT) { // Normal text field outAttrs.imeOptions |= EditorInfo.IME_ACTION_GO; if ((inputFlags & WebTextInputFlags.AutocorrectOff) == 0) { outAttrs.inputType |= EditorInfo.TYPE_TEXT_FLAG_AUTO_CORRECT; } } else if (inputType == TextInputType.TEXT_AREA || inputType == TextInputType.CONTENT_EDITABLE) { outAttrs.inputType |= EditorInfo.TYPE_TEXT_FLAG_MULTI_LINE; if ((inputFlags & WebTextInputFlags.AutocorrectOff) == 0) { outAttrs.inputType |= EditorInfo.TYPE_TEXT_FLAG_AUTO_CORRECT; } outAttrs.imeOptions |= EditorInfo.IME_ACTION_NONE; mSingleLine = false; } else if (inputType == TextInputType.PASSWORD) { // Password outAttrs.inputType = InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_WEB_PASSWORD; outAttrs.imeOptions |= EditorInfo.IME_ACTION_GO; } else if (inputType == TextInputType.SEARCH) { // Search outAttrs.imeOptions |= EditorInfo.IME_ACTION_SEARCH; } else if (inputType == TextInputType.URL) { // Url outAttrs.inputType = InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_URI; outAttrs.imeOptions |= EditorInfo.IME_ACTION_GO; } else if (inputType == TextInputType.EMAIL) { // Email outAttrs.inputType = InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_WEB_EMAIL_ADDRESS; outAttrs.imeOptions |= EditorInfo.IME_ACTION_GO; } else if (inputType == TextInputType.TELEPHONE) { // Telephone // Number and telephone do not have both a Tab key and an // action in default OSK, so set the action to NEXT outAttrs.inputType = InputType.TYPE_CLASS_PHONE; outAttrs.imeOptions |= EditorInfo.IME_ACTION_NEXT; } else if (inputType == TextInputType.NUMBER) { // Number outAttrs.inputType = InputType.TYPE_CLASS_NUMBER | InputType.TYPE_NUMBER_VARIATION_NORMAL | InputType.TYPE_NUMBER_FLAG_DECIMAL; outAttrs.imeOptions |= EditorInfo.IME_ACTION_NEXT; } // Handling of autocapitalize. Blink will send the flag taking into account the element's // type. This is not using AutocapitalizeNone because Android does not autocapitalize by // default and there is no way to express no capitalization. // Autocapitalize is meant as a hint to the virtual keyboard. if ((inputFlags & WebTextInputFlags.AutocapitalizeCharacters) != 0) { outAttrs.inputType |= InputType.TYPE_TEXT_FLAG_CAP_CHARACTERS; } else if ((inputFlags & WebTextInputFlags.AutocapitalizeWords) != 0) { outAttrs.inputType |= InputType.TYPE_TEXT_FLAG_CAP_WORDS; } else if ((inputFlags & WebTextInputFlags.AutocapitalizeSentences) != 0) { outAttrs.inputType |= InputType.TYPE_TEXT_FLAG_CAP_SENTENCES; } // Content editable doesn't use autocapitalize so we need to set it manually. if (inputType == TextInputType.CONTENT_EDITABLE) { outAttrs.inputType |= InputType.TYPE_TEXT_FLAG_CAP_SENTENCES; } outAttrs.initialSelStart = Selection.getSelectionStart(mEditable); outAttrs.initialSelEnd = Selection.getSelectionEnd(mEditable); mLastUpdateSelectionStart = outAttrs.initialSelStart; mLastUpdateSelectionEnd = outAttrs.initialSelEnd; if (DEBUG) Log.w(TAG, "Constructor called with outAttrs: " + outAttrs); Selection.setSelection(mEditable, outAttrs.initialSelStart, outAttrs.initialSelEnd); updateSelectionIfRequired(); } /** * Updates the AdapterInputConnection's internal representation of the text being edited and * its selection and composition properties. The resulting Editable is accessible through the * getEditable() method. If the text has not changed, this also calls updateSelection on the * InputMethodManager. * * @param text The String contents of the field being edited. * @param selectionStart The character offset of the selection start, or the caret position if * there is no selection. * @param selectionEnd The character offset of the selection end, or the caret position if there * is no selection. * @param compositionStart The character offset of the composition start, or -1 if there is no * composition. * @param compositionEnd The character offset of the composition end, or -1 if there is no * selection. * @param isNonImeChange True when the update was caused by non-IME (e.g. Javascript). */ @VisibleForTesting public void updateState(String text, int selectionStart, int selectionEnd, int compositionStart, int compositionEnd, boolean isNonImeChange) { if (DEBUG) { Log.w(TAG, "updateState [" + text + "] [" + selectionStart + " " + selectionEnd + "] [" + compositionStart + " " + compositionEnd + "] [" + isNonImeChange + "]"); } // If this update is from the IME, no further state modification is necessary because the // state should have been updated already by the IM framework directly. if (!isNonImeChange) return; // Non-breaking spaces can cause the IME to get confused. Replace with normal spaces. text = text.replace('\u00A0', ' '); selectionStart = Math.min(selectionStart, text.length()); selectionEnd = Math.min(selectionEnd, text.length()); compositionStart = Math.min(compositionStart, text.length()); compositionEnd = Math.min(compositionEnd, text.length()); String prevText = mEditable.toString(); boolean textUnchanged = prevText.equals(text); if (!textUnchanged) { mEditable.replace(0, mEditable.length(), text); } Selection.setSelection(mEditable, selectionStart, selectionEnd); if (compositionStart == compositionEnd) { removeComposingSpans(mEditable); } else { super.setComposingRegion(compositionStart, compositionEnd); } updateSelectionIfRequired(); } /** * @return Editable object which contains the state of current focused editable element. */ @Override public Editable getEditable() { return mEditable; } /** * Sends selection update to the InputMethodManager unless we are currently in a batch edit or * if the exact same selection and composition update was sent already. */ private void updateSelectionIfRequired() { if (mNumNestedBatchEdits != 0) return; int selectionStart = Selection.getSelectionStart(mEditable); int selectionEnd = Selection.getSelectionEnd(mEditable); int compositionStart = getComposingSpanStart(mEditable); int compositionEnd = getComposingSpanEnd(mEditable); // Avoid sending update if we sent an exact update already previously. if (mLastUpdateSelectionStart == selectionStart && mLastUpdateSelectionEnd == selectionEnd && mLastUpdateCompositionStart == compositionStart && mLastUpdateCompositionEnd == compositionEnd) { return; } if (DEBUG) { Log.w(TAG, "updateSelectionIfRequired [" + selectionStart + " " + selectionEnd + "] [" + compositionStart + " " + compositionEnd + "]"); } // updateSelection should be called every time the selection or composition changes // if it happens not within a batch edit, or at the end of each top level batch edit. getInputMethodManagerWrapper().updateSelection( mInternalView, selectionStart, selectionEnd, compositionStart, compositionEnd); mLastUpdateSelectionStart = selectionStart; mLastUpdateSelectionEnd = selectionEnd; mLastUpdateCompositionStart = compositionStart; mLastUpdateCompositionEnd = compositionEnd; } /** * @see BaseInputConnection#setComposingText(java.lang.CharSequence, int) */ @Override public boolean setComposingText(CharSequence text, int newCursorPosition) { if (DEBUG) Log.w(TAG, "setComposingText [" + text + "] [" + newCursorPosition + "]"); if (maybePerformEmptyCompositionWorkaround(text)) return true; mPendingAccent = 0; super.setComposingText(text, newCursorPosition); updateSelectionIfRequired(); return mImeAdapter.checkCompositionQueueAndCallNative(text, newCursorPosition, false); } /** * @see BaseInputConnection#commitText(java.lang.CharSequence, int) */ @Override public boolean commitText(CharSequence text, int newCursorPosition) { if (DEBUG) Log.w(TAG, "commitText [" + text + "] [" + newCursorPosition + "]"); if (maybePerformEmptyCompositionWorkaround(text)) return true; mPendingAccent = 0; super.commitText(text, newCursorPosition); updateSelectionIfRequired(); return mImeAdapter.checkCompositionQueueAndCallNative(text, newCursorPosition, text.length() > 0); } /** * @see BaseInputConnection#performEditorAction(int) */ @Override public boolean performEditorAction(int actionCode) { if (DEBUG) Log.w(TAG, "performEditorAction [" + actionCode + "]"); if (actionCode == EditorInfo.IME_ACTION_NEXT) { restartInput(); // Send TAB key event long timeStampMs = SystemClock.uptimeMillis(); mImeAdapter.sendSyntheticKeyEvent( WebInputEventType.RawKeyDown, timeStampMs, KeyEvent.KEYCODE_TAB, 0, 0); } else { mImeAdapter.sendKeyEventWithKeyCode(KeyEvent.KEYCODE_ENTER, KeyEvent.FLAG_SOFT_KEYBOARD | KeyEvent.FLAG_KEEP_TOUCH_MODE | KeyEvent.FLAG_EDITOR_ACTION); } return true; } /** * @see BaseInputConnection#performContextMenuAction(int) */ @Override public boolean performContextMenuAction(int id) { if (DEBUG) Log.w(TAG, "performContextMenuAction [" + id + "]"); switch (id) { case android.R.id.selectAll: return mImeAdapter.selectAll(); case android.R.id.cut: return mImeAdapter.cut(); case android.R.id.copy: return mImeAdapter.copy(); case android.R.id.paste: return mImeAdapter.paste(); default: return false; } } /** * @see BaseInputConnection#getExtractedText(android.view.inputmethod.ExtractedTextRequest, * int) */ @Override public ExtractedText getExtractedText(ExtractedTextRequest request, int flags) { if (DEBUG) Log.w(TAG, "getExtractedText"); ExtractedText et = new ExtractedText(); et.text = mEditable.toString(); et.partialEndOffset = mEditable.length(); et.selectionStart = Selection.getSelectionStart(mEditable); et.selectionEnd = Selection.getSelectionEnd(mEditable); et.flags = mSingleLine ? ExtractedText.FLAG_SINGLE_LINE : 0; return et; } /** * @see BaseInputConnection#beginBatchEdit() */ @Override public boolean beginBatchEdit() { if (DEBUG) Log.w(TAG, "beginBatchEdit [" + (mNumNestedBatchEdits == 0) + "]"); mNumNestedBatchEdits++; return true; } /** * @see BaseInputConnection#endBatchEdit() */ @Override public boolean endBatchEdit() { if (mNumNestedBatchEdits == 0) return false; --mNumNestedBatchEdits; if (DEBUG) Log.w(TAG, "endBatchEdit [" + (mNumNestedBatchEdits == 0) + "]"); if (mNumNestedBatchEdits == 0) updateSelectionIfRequired(); return mNumNestedBatchEdits != 0; } /** * @see BaseInputConnection#deleteSurroundingText(int, int) */ @Override public boolean deleteSurroundingText(int beforeLength, int afterLength) { return deleteSurroundingTextImpl(beforeLength, afterLength, false); } /** * Check if the given {@code index} is between UTF-16 surrogate pair. * @param str The String. * @param index The index * @return True if the index is between UTF-16 surrogate pair, false otherwise. */ @VisibleForTesting static boolean isIndexBetweenUtf16SurrogatePair(CharSequence str, int index) { return index > 0 && index < str.length() && Character.isHighSurrogate(str.charAt(index - 1)) && Character.isLowSurrogate(str.charAt(index)); } private boolean deleteSurroundingTextImpl( int beforeLength, int afterLength, boolean fromPhysicalKey) { if (DEBUG) { Log.w(TAG, "deleteSurroundingText [" + beforeLength + " " + afterLength + " " + fromPhysicalKey + "]"); } if (mPendingAccent != 0) { finishComposingText(); } int originalBeforeLength = beforeLength; int originalAfterLength = afterLength; int selectionStart = Selection.getSelectionStart(mEditable); int selectionEnd = Selection.getSelectionEnd(mEditable); int availableBefore = selectionStart; int availableAfter = mEditable.length() - selectionEnd; beforeLength = Math.min(beforeLength, availableBefore); afterLength = Math.min(afterLength, availableAfter); // Adjust these values even before calling super.deleteSurroundingText() to be consistent // with the super class. if (isIndexBetweenUtf16SurrogatePair(mEditable, selectionStart - beforeLength)) { beforeLength += 1; } if (isIndexBetweenUtf16SurrogatePair(mEditable, selectionEnd + afterLength)) { afterLength += 1; } super.deleteSurroundingText(beforeLength, afterLength); updateSelectionIfRequired(); // If this was called due to a physical key, no need to generate a key event here as // the caller will take care of forwarding the original. if (fromPhysicalKey) { return true; } // For single-char deletion calls |ImeAdapter.sendKeyEventWithKeyCode| with the real key // code. For multi-character deletion, executes deletion by calling // |ImeAdapter.deleteSurroundingText| and sends synthetic key events with a dummy key code. int keyCode = KeyEvent.KEYCODE_UNKNOWN; if (originalBeforeLength == 1 && originalAfterLength == 0) { keyCode = KeyEvent.KEYCODE_DEL; } else if (originalBeforeLength == 0 && originalAfterLength == 1) { keyCode = KeyEvent.KEYCODE_FORWARD_DEL; } boolean result = true; if (keyCode == KeyEvent.KEYCODE_UNKNOWN) { result = mImeAdapter.sendSyntheticKeyEvent( WebInputEventType.RawKeyDown, SystemClock.uptimeMillis(), keyCode, 0, 0); result &= mImeAdapter.deleteSurroundingText(beforeLength, afterLength); result &= mImeAdapter.sendSyntheticKeyEvent( WebInputEventType.KeyUp, SystemClock.uptimeMillis(), keyCode, 0, 0); } else { mImeAdapter.sendKeyEventWithKeyCode( keyCode, KeyEvent.FLAG_SOFT_KEYBOARD | KeyEvent.FLAG_KEEP_TOUCH_MODE); } return result; } /** * @see BaseInputConnection#sendKeyEvent(android.view.KeyEvent) */ @Override public boolean sendKeyEvent(KeyEvent event) { if (DEBUG) { Log.w(TAG, "sendKeyEvent [" + event.getAction() + "] [" + event.getKeyCode() + "] [" + event.getUnicodeChar() + "]"); } int action = event.getAction(); int keycode = event.getKeyCode(); int unicodeChar = event.getUnicodeChar(); // If this isn't a KeyDown event, no need to update composition state; just pass the key // event through and return. But note that some keys, such as enter, may actually be // handled on ACTION_UP in Blink. if (action != KeyEvent.ACTION_DOWN) { mImeAdapter.translateAndSendNativeEvents(event); return true; } // If this is backspace/del or if the key has a character representation, // need to update the underlying Editable (i.e. the local representation of the text // being edited). Some IMEs like Jellybean stock IME and Samsung IME mix in delete // KeyPress events instead of calling deleteSurroundingText. if (keycode == KeyEvent.KEYCODE_DEL) { deleteSurroundingTextImpl(1, 0, true); } else if (keycode == KeyEvent.KEYCODE_FORWARD_DEL) { deleteSurroundingTextImpl(0, 1, true); } else if (keycode == KeyEvent.KEYCODE_ENTER) { // Finish text composition when pressing enter, as that may submit a form field. // TODO(aurimas): remove this workaround when crbug.com/278584 is fixed. finishComposingText(); } else if ((unicodeChar & KeyCharacterMap.COMBINING_ACCENT) != 0) { // Store a pending accent character and make it the current composition. int pendingAccent = unicodeChar & KeyCharacterMap.COMBINING_ACCENT_MASK; StringBuilder builder = new StringBuilder(); builder.appendCodePoint(pendingAccent); setComposingText(builder.toString(), 1); mPendingAccent = pendingAccent; return true; } else if (mPendingAccent != 0 && unicodeChar != 0) { int combined = KeyEvent.getDeadChar(mPendingAccent, unicodeChar); if (combined != 0) { StringBuilder builder = new StringBuilder(); builder.appendCodePoint(combined); commitText(builder.toString(), 1); return true; } // Noncombinable character; commit the accent character and fall through to sending // the key event for the character afterwards. finishComposingText(); } replaceSelectionWithUnicodeChar(unicodeChar); mImeAdapter.translateAndSendNativeEvents(event); return true; } /** * Update the mEditable state to reflect what Blink will do in response to the KeyDown * for a unicode-mapped key event. * @param unicodeChar The Unicode character to update selection with. */ private void replaceSelectionWithUnicodeChar(int unicodeChar) { if (unicodeChar == 0) return; int selectionStart = Selection.getSelectionStart(mEditable); int selectionEnd = Selection.getSelectionEnd(mEditable); if (selectionStart > selectionEnd) { int temp = selectionStart; selectionStart = selectionEnd; selectionEnd = temp; } mEditable.replace(selectionStart, selectionEnd, Character.toString((char) unicodeChar)); updateSelectionIfRequired(); } /** * @see BaseInputConnection#finishComposingText() */ @Override public boolean finishComposingText() { if (DEBUG) Log.w(TAG, "finishComposingText"); mPendingAccent = 0; if (getComposingSpanStart(mEditable) == getComposingSpanEnd(mEditable)) { return true; } super.finishComposingText(); updateSelectionIfRequired(); mImeAdapter.finishComposingText(); return true; } /** * @see BaseInputConnection#setSelection(int, int) */ @Override public boolean setSelection(int start, int end) { if (DEBUG) Log.w(TAG, "setSelection [" + start + " " + end + "]"); int textLength = mEditable.length(); if (start < 0 || end < 0 || start > textLength || end > textLength) return true; super.setSelection(start, end); updateSelectionIfRequired(); return mImeAdapter.setEditableSelectionOffsets(start, end); } /** * Informs the InputMethodManager and InputMethodSession (i.e. the IME) that the text * state is no longer what the IME has and that it needs to be updated. */ void restartInput() { if (DEBUG) Log.w(TAG, "restartInput"); getInputMethodManagerWrapper().restartInput(mInternalView); mNumNestedBatchEdits = 0; mPendingAccent = 0; } /** * @see BaseInputConnection#setComposingRegion(int, int) */ @Override public boolean setComposingRegion(int start, int end) { if (DEBUG) Log.w(TAG, "setComposingRegion [" + start + " " + end + "]"); int textLength = mEditable.length(); int a = Math.min(start, end); int b = Math.max(start, end); if (a < 0) a = 0; if (b < 0) b = 0; if (a > textLength) a = textLength; if (b > textLength) b = textLength; if (a == b) { removeComposingSpans(mEditable); } else { super.setComposingRegion(a, b); } updateSelectionIfRequired(); CharSequence regionText = null; if (b > a) { regionText = mEditable.subSequence(a, b); } return mImeAdapter.setComposingRegion(regionText, a, b); } boolean isActive() { return getInputMethodManagerWrapper().isActive(mInternalView); } private InputMethodManagerWrapper getInputMethodManagerWrapper() { return mImeAdapter.getInputMethodManagerWrapper(); } /** * This method works around the issue crbug.com/373934 where Blink does not cancel * the composition when we send a commit with the empty text. * * TODO(aurimas) Remove this once crbug.com/373934 is fixed. * * @param text Text that software keyboard requested to commit. * @return Whether the workaround was performed. */ private boolean maybePerformEmptyCompositionWorkaround(CharSequence text) { int selectionStart = Selection.getSelectionStart(mEditable); int selectionEnd = Selection.getSelectionEnd(mEditable); int compositionStart = getComposingSpanStart(mEditable); int compositionEnd = getComposingSpanEnd(mEditable); if (TextUtils.isEmpty(text) && (selectionStart == selectionEnd) && compositionStart != INVALID_COMPOSITION && compositionEnd != INVALID_COMPOSITION) { beginBatchEdit(); finishComposingText(); int selection = Selection.getSelectionStart(mEditable); deleteSurroundingText(selection - compositionStart, selection - compositionEnd); endBatchEdit(); return true; } return false; } @VisibleForTesting static class ImeState { public final String text; public final int selectionStart; public final int selectionEnd; public final int compositionStart; public final int compositionEnd; public ImeState(String text, int selectionStart, int selectionEnd, int compositionStart, int compositionEnd) { this.text = text; this.selectionStart = selectionStart; this.selectionEnd = selectionEnd; this.compositionStart = compositionStart; this.compositionEnd = compositionEnd; } } @VisibleForTesting ImeState getImeStateForTesting() { String text = mEditable.toString(); int selectionStart = Selection.getSelectionStart(mEditable); int selectionEnd = Selection.getSelectionEnd(mEditable); int compositionStart = getComposingSpanStart(mEditable); int compositionEnd = getComposingSpanEnd(mEditable); return new ImeState(text, selectionStart, selectionEnd, compositionStart, compositionEnd); } }
PeterWangIntel/chromium-crosswalk
content/public/android/java/src/org/chromium/content/browser/input/AdapterInputConnection.java
Java
bsd-3-clause
27,345
VERSION = (1, 0, 0,) __version__ = '.'.join(map(str, VERSION)) default_app_config = 'admin_sso.apps.AdminSSOConfig' # Do not use Django settings at module level as recommended try: from django.utils.functional import LazyObject except ImportError: pass else: class LazySettings(LazyObject): def _setup(self): from admin_sso import default_settings self._wrapped = Settings(default_settings) class Settings(object): def __init__(self, settings_module): for setting in dir(settings_module): if setting == setting.upper(): setattr(self, setting, getattr(settings_module, setting)) settings = LazySettings()
frog32/django-admin-sso
admin_sso/__init__.py
Python
bsd-3-clause
716
// Copyright 2020 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "third_party/blink/renderer/core/layout/ng/mathml/ng_math_under_over_layout_algorithm.h" #include "third_party/blink/renderer/core/layout/ng/mathml/ng_math_layout_utils.h" #include "third_party/blink/renderer/core/layout/ng/ng_block_break_token.h" #include "third_party/blink/renderer/core/layout/ng/ng_box_fragment.h" #include "third_party/blink/renderer/core/layout/ng/ng_length_utils.h" #include "third_party/blink/renderer/core/layout/ng/ng_out_of_flow_layout_part.h" #include "third_party/blink/renderer/core/layout/ng/ng_physical_box_fragment.h" #include "third_party/blink/renderer/core/mathml/mathml_operator_element.h" #include "third_party/blink/renderer/core/mathml/mathml_under_over_element.h" namespace blink { namespace { // Describes the amount to shift to apply to the under/over boxes. // Data is populated from the OpenType MATH table. // If the OpenType MATH table is not present fallback values are used. // https://w3c.github.io/mathml-core/#base-with-underscript // https://w3c.github.io/mathml-core/#base-with-overscript struct UnderOverVerticalParameters { bool use_under_over_bar_fallback; LayoutUnit under_gap_min; LayoutUnit over_gap_min; LayoutUnit under_shift_min; LayoutUnit over_shift_min; LayoutUnit under_extra_descender; LayoutUnit over_extra_ascender; LayoutUnit accent_base_height; }; UnderOverVerticalParameters GetUnderOverVerticalParameters( const ComputedStyle& style, bool is_base_large_operator, bool is_base_stretchy_in_inline_axis) { UnderOverVerticalParameters parameters; const SimpleFontData* font_data = style.GetFont().PrimaryFont(); if (!font_data) return parameters; // https://w3c.github.io/mathml-core/#dfn-default-fallback-constant const float default_fallback_constant = 0; if (is_base_large_operator) { parameters.under_gap_min = LayoutUnit( MathConstant(style, OpenTypeMathSupport::MathConstants::kLowerLimitGapMin) .value_or(default_fallback_constant)); parameters.over_gap_min = LayoutUnit( MathConstant(style, OpenTypeMathSupport::MathConstants::kUpperLimitGapMin) .value_or(default_fallback_constant)); parameters.under_shift_min = LayoutUnit( MathConstant( style, OpenTypeMathSupport::MathConstants::kLowerLimitBaselineDropMin) .value_or(default_fallback_constant)); parameters.over_shift_min = LayoutUnit( MathConstant( style, OpenTypeMathSupport::MathConstants::kUpperLimitBaselineRiseMin) .value_or(default_fallback_constant)); parameters.under_extra_descender = LayoutUnit(); parameters.over_extra_ascender = LayoutUnit(); parameters.accent_base_height = LayoutUnit(); parameters.use_under_over_bar_fallback = false; return parameters; } if (is_base_stretchy_in_inline_axis) { parameters.under_gap_min = LayoutUnit( MathConstant( style, OpenTypeMathSupport::MathConstants::kStretchStackGapBelowMin) .value_or(default_fallback_constant)); parameters.over_gap_min = LayoutUnit( MathConstant( style, OpenTypeMathSupport::MathConstants::kStretchStackGapAboveMin) .value_or(default_fallback_constant)); parameters.under_shift_min = LayoutUnit( MathConstant( style, OpenTypeMathSupport::MathConstants::kStretchStackBottomShiftDown) .value_or(default_fallback_constant)); parameters.over_shift_min = LayoutUnit( MathConstant( style, OpenTypeMathSupport::MathConstants::kStretchStackTopShiftUp) .value_or(default_fallback_constant)); parameters.under_extra_descender = LayoutUnit(); parameters.over_extra_ascender = LayoutUnit(); parameters.accent_base_height = LayoutUnit(); parameters.use_under_over_bar_fallback = false; return parameters; } const float default_rule_thickness = RuleThicknessFallback(style); parameters.under_gap_min = LayoutUnit( MathConstant(style, OpenTypeMathSupport::MathConstants::kUnderbarVerticalGap) .value_or(3 * default_rule_thickness)); parameters.over_gap_min = LayoutUnit( MathConstant(style, OpenTypeMathSupport::MathConstants::kOverbarVerticalGap) .value_or(3 * default_rule_thickness)); parameters.under_shift_min = LayoutUnit(); parameters.over_shift_min = LayoutUnit(); parameters.under_extra_descender = LayoutUnit( MathConstant(style, OpenTypeMathSupport::MathConstants::kUnderbarExtraDescender) .value_or(default_rule_thickness)); parameters.over_extra_ascender = LayoutUnit( MathConstant(style, OpenTypeMathSupport::MathConstants::kOverbarExtraAscender) .value_or(default_rule_thickness)); parameters.accent_base_height = LayoutUnit( MathConstant(style, OpenTypeMathSupport::MathConstants::kAccentBaseHeight) .value_or(font_data->GetFontMetrics().XHeight() / 2)); parameters.use_under_over_bar_fallback = true; return parameters; } // https://w3c.github.io/mathml-core/#underscripts-and-overscripts-munder-mover-munderover bool HasAccent(const NGBlockNode& node, bool accent_under) { DCHECK(node); auto* underover = To<MathMLUnderOverElement>(node.GetDOMNode()); auto script_type = underover->GetScriptType(); DCHECK(script_type == MathScriptType::kUnderOver || (accent_under && script_type == MathScriptType::kUnder) || (!accent_under && script_type == MathScriptType::kOver)); absl::optional<bool> attribute_value = accent_under ? underover->AccentUnder() : underover->Accent(); return attribute_value && *attribute_value; } } // namespace NGMathUnderOverLayoutAlgorithm::NGMathUnderOverLayoutAlgorithm( const NGLayoutAlgorithmParams& params) : NGLayoutAlgorithm(params) { DCHECK(params.space.IsNewFormattingContext()); } void NGMathUnderOverLayoutAlgorithm::GatherChildren(NGBlockNode* base, NGBlockNode* over, NGBlockNode* under) { auto script_type = Node().ScriptType(); for (NGLayoutInputNode child = Node().FirstChild(); child; child = child.NextSibling()) { NGBlockNode block_child = To<NGBlockNode>(child); if (child.IsOutOfFlowPositioned()) { container_builder_.AddOutOfFlowChildCandidate( block_child, BorderScrollbarPadding().StartOffset()); continue; } if (!*base) { *base = block_child; continue; } switch (script_type) { case MathScriptType::kUnder: DCHECK(!*under); *under = block_child; break; case MathScriptType::kOver: DCHECK(!*over); *over = block_child; break; case MathScriptType::kUnderOver: if (!*under) { *under = block_child; continue; } DCHECK(!*over); *over = block_child; break; default: NOTREACHED(); } } } scoped_refptr<const NGLayoutResult> NGMathUnderOverLayoutAlgorithm::Layout() { DCHECK(!BreakToken()); DCHECK(IsValidMathMLScript(Node())); NGBlockNode base = nullptr; NGBlockNode over = nullptr; NGBlockNode under = nullptr; GatherChildren(&base, &over, &under); const LogicalSize border_box_size = container_builder_.InitialBorderBoxSize(); const LogicalOffset content_start_offset = BorderScrollbarPadding().StartOffset(); LayoutUnit block_offset = content_start_offset.block_offset; const auto base_properties = GetMathMLEmbellishedOperatorProperties(base); const bool is_base_large_operator = base_properties && base_properties->is_large_op; const bool is_base_stretchy_in_inline_axis = base_properties && base_properties->is_stretchy && !base_properties->is_vertical; const bool base_inherits_block_stretch_size_constraint = ConstraintSpace().TargetStretchBlockSizes().has_value(); const bool base_inherits_inline_stretch_size_constraint = !base_inherits_block_stretch_size_constraint && ConstraintSpace().HasTargetStretchInlineSize(); UnderOverVerticalParameters parameters = GetUnderOverVerticalParameters( Style(), is_base_large_operator, is_base_stretchy_in_inline_axis); // https://w3c.github.io/mathml-core/#dfn-algorithm-for-stretching-operators-along-the-inline-axis LayoutUnit inline_stretch_size; auto UpdateInlineStretchSize = [&](const scoped_refptr<const NGLayoutResult>& result) { NGFragment fragment( ConstraintSpace().GetWritingDirection(), To<NGPhysicalBoxFragment>(result->PhysicalFragment())); inline_stretch_size = std::max(inline_stretch_size, fragment.InlineSize()); }; // "Perform layout without any stretch size constraint on all the items of // LNotToStretch" bool layout_remaining_items_with_zero_inline_stretch_size = true; for (NGLayoutInputNode child = Node().FirstChild(); child; child = child.NextSibling()) { if (child.IsOutOfFlowPositioned() || IsInlineAxisStretchyOperator(To<NGBlockNode>(child))) continue; const auto child_constraint_space = CreateConstraintSpaceForMathChild( Node(), ChildAvailableSize(), ConstraintSpace(), child, NGCacheSlot::kMeasure); const auto child_layout_result = To<NGBlockNode>(child).Layout( child_constraint_space, nullptr /* break_token */); UpdateInlineStretchSize(child_layout_result); layout_remaining_items_with_zero_inline_stretch_size = false; } if (UNLIKELY(layout_remaining_items_with_zero_inline_stretch_size)) { // "If LNotToStretch is empty, perform layout with stretch size constraint 0 // on all the items of LToStretch. for (NGLayoutInputNode child = Node().FirstChild(); child; child = child.NextSibling()) { if (child.IsOutOfFlowPositioned()) continue; DCHECK(IsInlineAxisStretchyOperator(To<NGBlockNode>(child))); if (child == base && (base_inherits_block_stretch_size_constraint || base_inherits_inline_stretch_size_constraint)) continue; LayoutUnit zero_stretch_size; const auto child_constraint_space = CreateConstraintSpaceForMathChild( Node(), ChildAvailableSize(), ConstraintSpace(), child, NGCacheSlot::kMeasure, absl::nullopt, zero_stretch_size); const auto child_layout_result = To<NGBlockNode>(child).Layout( child_constraint_space, nullptr /* break_token */); UpdateInlineStretchSize(child_layout_result); } } auto CreateConstraintSpaceForUnderOverChild = [&](const NGBlockNode child) { if (child == base && base_inherits_block_stretch_size_constraint && IsBlockAxisStretchyOperator(To<NGBlockNode>(child))) { return CreateConstraintSpaceForMathChild( Node(), ChildAvailableSize(), ConstraintSpace(), child, NGCacheSlot::kLayout, *ConstraintSpace().TargetStretchBlockSizes()); } if (child == base && base_inherits_inline_stretch_size_constraint && IsInlineAxisStretchyOperator(To<NGBlockNode>(child))) { return CreateConstraintSpaceForMathChild( Node(), ChildAvailableSize(), ConstraintSpace(), child, NGCacheSlot::kLayout, absl::nullopt, ConstraintSpace().TargetStretchInlineSize()); } if ((child != base || (!base_inherits_block_stretch_size_constraint && !base_inherits_inline_stretch_size_constraint)) && IsInlineAxisStretchyOperator(To<NGBlockNode>(child))) { return CreateConstraintSpaceForMathChild( Node(), ChildAvailableSize(), ConstraintSpace(), child, NGCacheSlot::kLayout, absl::nullopt, inline_stretch_size); } return CreateConstraintSpaceForMathChild(Node(), ChildAvailableSize(), ConstraintSpace(), child, NGCacheSlot::kLayout); }; // TODO(crbug.com/1125136): take into account italic correction. const auto baseline_type = Style().GetFontBaseline(); const auto base_space = CreateConstraintSpaceForUnderOverChild(base); auto base_layout_result = base.Layout(base_space); auto base_margins = ComputeMarginsFor(base_space, base.Style(), ConstraintSpace()); NGBoxFragment base_fragment( ConstraintSpace().GetWritingDirection(), To<NGPhysicalBoxFragment>(base_layout_result->PhysicalFragment())); LayoutUnit base_ascent = base_fragment.BaselineOrSynthesize(baseline_type); // All children are positioned centered relative to the container (and // therefore centered relative to themselves). if (over) { const auto over_space = CreateConstraintSpaceForUnderOverChild(over); scoped_refptr<const NGLayoutResult> over_layout_result = over.Layout(over_space); NGBoxStrut over_margins = ComputeMarginsFor(over_space, over.Style(), ConstraintSpace()); NGBoxFragment over_fragment( ConstraintSpace().GetWritingDirection(), To<NGPhysicalBoxFragment>(over_layout_result->PhysicalFragment())); block_offset += parameters.over_extra_ascender + over_margins.block_start; LogicalOffset over_offset = { content_start_offset.inline_offset + over_margins.inline_start + (ChildAvailableSize().inline_size - (over_fragment.InlineSize() + over_margins.InlineSum())) / 2, block_offset}; container_builder_.AddResult(*over_layout_result, over_offset); over.StoreMargins(ConstraintSpace(), over_margins); if (parameters.use_under_over_bar_fallback) { block_offset += over_fragment.BlockSize(); if (HasAccent(Node(), false)) { if (base_ascent < parameters.accent_base_height) block_offset += parameters.accent_base_height - base_ascent; } else { block_offset += parameters.over_gap_min; } } else { LayoutUnit over_ascent = over_fragment.BaselineOrSynthesize(baseline_type); block_offset += std::max(over_fragment.BlockSize() + parameters.over_gap_min, over_ascent + parameters.over_shift_min); } block_offset += over_margins.block_end; } block_offset += base_margins.block_start; LogicalOffset base_offset = { content_start_offset.inline_offset + base_margins.inline_start + (ChildAvailableSize().inline_size - (base_fragment.InlineSize() + base_margins.InlineSum())) / 2, block_offset}; container_builder_.AddResult(*base_layout_result, base_offset); base.StoreMargins(ConstraintSpace(), base_margins); block_offset += base_fragment.BlockSize() + base_margins.block_end; if (under) { const auto under_space = CreateConstraintSpaceForUnderOverChild(under); scoped_refptr<const NGLayoutResult> under_layout_result = under.Layout(under_space); NGBoxStrut under_margins = ComputeMarginsFor(under_space, under.Style(), ConstraintSpace()); NGBoxFragment under_fragment( ConstraintSpace().GetWritingDirection(), To<NGPhysicalBoxFragment>(under_layout_result->PhysicalFragment())); block_offset += under_margins.block_start; if (parameters.use_under_over_bar_fallback) { if (!HasAccent(Node(), true)) block_offset += parameters.under_gap_min; } else { LayoutUnit under_ascent = under_fragment.BaselineOrSynthesize(baseline_type); block_offset += std::max(parameters.under_gap_min, parameters.under_shift_min - under_ascent); } LogicalOffset under_offset = { content_start_offset.inline_offset + under_margins.inline_start + (ChildAvailableSize().inline_size - (under_fragment.InlineSize() + under_margins.InlineSum())) / 2, block_offset}; block_offset += under_fragment.BlockSize(); block_offset += parameters.under_extra_descender; container_builder_.AddResult(*under_layout_result, under_offset); under.StoreMargins(ConstraintSpace(), under_margins); block_offset += under_margins.block_end; } container_builder_.SetBaseline(base_offset.block_offset + base_ascent); block_offset += BorderScrollbarPadding().block_end; LayoutUnit block_size = ComputeBlockSizeForFragment(ConstraintSpace(), Style(), BorderPadding(), block_offset, border_box_size.inline_size); container_builder_.SetIntrinsicBlockSize(block_offset); container_builder_.SetFragmentsTotalBlockSize(block_size); NGOutOfFlowLayoutPart(Node(), ConstraintSpace(), &container_builder_).Run(); return container_builder_.ToBoxFragment(); } MinMaxSizesResult NGMathUnderOverLayoutAlgorithm::ComputeMinMaxSizes( const MinMaxSizesFloatInput&) { DCHECK(IsValidMathMLScript(Node())); if (auto result = CalculateMinMaxSizesIgnoringChildren( Node(), BorderScrollbarPadding())) return *result; MinMaxSizes sizes; bool depends_on_block_constraints = false; for (NGLayoutInputNode child = Node().FirstChild(); child; child = child.NextSibling()) { if (child.IsOutOfFlowPositioned()) continue; // TODO(crbug.com/1125136): take into account italic correction. const auto child_result = ComputeMinAndMaxContentContributionForMathChild( Style(), ConstraintSpace(), To<NGBlockNode>(child), ChildAvailableSize().block_size); sizes.Encompass(child_result.sizes); depends_on_block_constraints |= child_result.depends_on_block_constraints; } sizes += BorderScrollbarPadding().InlineSum(); return MinMaxSizesResult(sizes, depends_on_block_constraints); } } // namespace blink
nwjs/chromium.src
third_party/blink/renderer/core/layout/ng/mathml/ng_math_under_over_layout_algorithm.cc
C++
bsd-3-clause
18,124
/* ***** BEGIN LICENSE BLOCK ***** * Distributed under the BSD license: * * Copyright (c) 2010, Ajax.org B.V. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of Ajax.org B.V. nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * ***** END LICENSE BLOCK ***** */ define(function(require, exports, module) { "use strict"; var dom = require("../lib/dom"); var oop = require("../lib/oop"); var lang = require("../lib/lang"); var EventEmitter = require("../lib/event_emitter").EventEmitter; var Gutter = function(parentEl) { this.element = dom.createElement("div"); this.element.className = "ace_layer ace_gutter-layer"; parentEl.appendChild(this.element); this.setShowFoldWidgets(this.$showFoldWidgets); this.gutterWidth = 0; this.$annotations = []; this.$updateAnnotations = this.$updateAnnotations.bind(this); }; (function() { oop.implement(this, EventEmitter); this.setSession = function(session) { if (this.session) this.session.removeEventListener("change", this.$updateAnnotations); this.session = session; session.on("change", this.$updateAnnotations); }; this.addGutterDecoration = function(row, className){ if (window.console) console.warn && console.warn("deprecated use session.addGutterDecoration"); this.session.addGutterDecoration(row, className); }; this.removeGutterDecoration = function(row, className){ if (window.console) console.warn && console.warn("deprecated use session.removeGutterDecoration"); this.session.removeGutterDecoration(row, className); }; this.setAnnotations = function(annotations) { // iterate over sparse array this.$annotations = [] var rowInfo, row; for (var i = 0; i < annotations.length; i++) { var annotation = annotations[i]; var row = annotation.row; var rowInfo = this.$annotations[row]; if (!rowInfo) rowInfo = this.$annotations[row] = {text: []}; var annoText = annotation.text; annoText = annoText ? lang.escapeHTML(annoText) : annotation.html || ""; if (rowInfo.text.indexOf(annoText) === -1) rowInfo.text.push(annoText); var type = annotation.type; if (type == "error") rowInfo.className = " ace_error"; else if (type == "warning" && rowInfo.className != " ace_error") rowInfo.className = " ace_warning"; else if (type == "info" && (!rowInfo.className)) rowInfo.className = " ace_info"; } }; this.$updateAnnotations = function (e) { if (!this.$annotations.length) return; var delta = e.data; var range = delta.range; var firstRow = range.start.row; var len = range.end.row - firstRow; if (len === 0) { // do nothing } else if (delta.action == "removeText" || delta.action == "removeLines") { this.$annotations.splice(firstRow, len + 1, null); } else { var args = Array(len + 1); args.unshift(firstRow, 1); this.$annotations.splice.apply(this.$annotations, args); } }; this.update = function(config) { var emptyAnno = {className: ""}; var html = []; var i = config.firstRow; var lastRow = config.lastRow; var fold = this.session.getNextFoldLine(i); var foldStart = fold ? fold.start.row : Infinity; var foldWidgets = this.$showFoldWidgets && this.session.foldWidgets; var breakpoints = this.session.$breakpoints; var decorations = this.session.$decorations; var firstLineNumber = this.session.$firstLineNumber; var lastLineNumber = 0; while (true) { if(i > foldStart) { i = fold.end.row + 1; fold = this.session.getNextFoldLine(i, fold); foldStart = fold ?fold.start.row :Infinity; } if(i > lastRow) break; var annotation = this.$annotations[i] || emptyAnno; html.push( "<div class='ace_gutter-cell ", breakpoints[i] || "", decorations[i] || "", annotation.className, "' style='height:", this.session.getRowLength(i) * config.lineHeight, "px;'>", lastLineNumber = i + firstLineNumber ); if (foldWidgets) { var c = foldWidgets[i]; // check if cached value is invalidated and we need to recompute if (c == null) c = foldWidgets[i] = this.session.getFoldWidget(i); if (c) html.push( "<span class='ace_fold-widget ace_", c, c == "start" && i == foldStart && i < fold.end.row ? " ace_closed" : " ace_open", "' style='height:", config.lineHeight, "px", "'></span>" ); } html.push("</div>"); i++; } this.element = dom.setInnerHtml(this.element, html.join("")); this.element.style.height = config.minHeight + "px"; if (this.session.$useWrapMode) lastLineNumber = this.session.getLength(); var gutterWidth = ("" + lastLineNumber).length * config.characterWidth; var padding = this.$padding || this.$computePadding(); gutterWidth += padding.left + padding.right; if (gutterWidth !== this.gutterWidth && !isNaN(gutterWidth)) { this.gutterWidth = gutterWidth; this.element.style.width = Math.ceil(this.gutterWidth) + "px"; this._emit("changeGutterWidth", gutterWidth); } }; this.$showFoldWidgets = true; this.setShowFoldWidgets = function(show) { if (show) dom.addCssClass(this.element, "ace_folding-enabled"); else dom.removeCssClass(this.element, "ace_folding-enabled"); this.$showFoldWidgets = show; this.$padding = null; }; this.getShowFoldWidgets = function() { return this.$showFoldWidgets; }; this.$computePadding = function() { if (!this.element.firstChild) return {left: 0, right: 0}; var style = dom.computedStyle(this.element.firstChild); this.$padding = {}; this.$padding.left = parseInt(style.paddingLeft) + 1 || 0; this.$padding.right = parseInt(style.paddingRight) || 0; return this.$padding; }; this.getRegion = function(point) { var padding = this.$padding || this.$computePadding(); var rect = this.element.getBoundingClientRect(); if (point.x < padding.left + rect.left) return "markers"; if (this.$showFoldWidgets && point.x > rect.right - padding.right) return "foldWidgets"; }; }).call(Gutter.prototype); exports.Gutter = Gutter; });
newrelic/ace
lib/ace/layer/gutter.js
JavaScript
bsd-3-clause
8,543
/* * Copyright 2020 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "include/core/SkFont.h" #include "include/core/SkTypeface.h" #include "src/core/SkScalerCache.h" #include "src/core/SkStrikeSpec.h" #include "src/core/SkTaskGroup.h" #include "tests/Test.h" #include "tools/ToolUtils.h" #include <atomic> class Barrier { public: Barrier(int threadCount) : fThreadCount(threadCount) { } void waitForAll() { fThreadCount -= 1; while (fThreadCount > 0) { } } private: std::atomic<int> fThreadCount; }; DEF_TEST(SkScalerCacheMultiThread, Reporter) { sk_sp<SkTypeface> typeface = ToolUtils::create_portable_typeface("serif", SkFontStyle::Italic()); static constexpr int kThreadCount = 4; Barrier barrier{kThreadCount}; SkFont font; font.setEdging(SkFont::Edging::kAntiAlias); font.setSubpixel(true); font.setTypeface(typeface); SkGlyphID glyphs['z']; SkPoint pos['z']; for (int c = ' '; c < 'z'; c++) { glyphs[c] = font.unicharToGlyph(c); pos[c] = {30.0f * c + 30, 30.0f}; } constexpr size_t glyphCount = 'z' - ' '; auto data = SkMakeZip(glyphs, pos).subspan(SkTo<int>(' '), glyphCount); SkPaint defaultPaint; SkStrikeSpec strikeSpec = SkStrikeSpec::MakeMask( font, defaultPaint, SkSurfaceProps(0, kUnknown_SkPixelGeometry), SkScalerContextFlags::kNone, SkMatrix::I()); // Make our own executor so the --threads parameter doesn't mess things up. auto executor = SkExecutor::MakeFIFOThreadPool(kThreadCount); for (int tries = 0; tries < 100; tries++) { SkScalerContextEffects effects; std::unique_ptr<SkScalerContext> ctx{ typeface->createScalerContext(effects, &strikeSpec.descriptor())}; SkScalerCache scalerCache{strikeSpec.descriptor(), std::move(ctx)}; auto perThread = [&](int threadIndex) { barrier.waitForAll(); auto local = data.subspan(threadIndex * 2, data.size() - kThreadCount * 2); for (int i = 0; i < 100; i++) { SkDrawableGlyphBuffer drawable; SkSourceGlyphBuffer rejects; drawable.ensureSize(glyphCount); rejects.setSource(local); drawable.startBitmapDevice(rejects.source(), {0, 0}, SkMatrix::I(), scalerCache.roundingSpec()); scalerCache.prepareForMaskDrawing(&drawable, &rejects); rejects.flipRejectsToSource(); drawable.reset(); } }; SkTaskGroup(*executor).batch(kThreadCount, perThread); } }
youtube/cobalt
third_party/skia_next/third_party/skia/tests/SkScalerCacheTest.cpp
C++
bsd-3-clause
2,751
// Copyright 2016 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "third_party/blink/renderer/core/fetch/multipart_parser.h" #include "base/cxx17_backports.h" #include "third_party/blink/public/platform/platform.h" #include "third_party/blink/renderer/platform/network/http_names.h" #include "third_party/blink/renderer/platform/network/http_parsers.h" #include "third_party/blink/renderer/platform/wtf/std_lib_extras.h" #include <algorithm> #include <utility> namespace blink { namespace { constexpr char kCloseDelimiterSuffix[] = "--\r\n"; constexpr size_t kCloseDelimiterSuffixSize = base::size(kCloseDelimiterSuffix) - 1u; constexpr size_t kDashBoundaryOffset = 2u; // The length of "\r\n". constexpr char kDelimiterSuffix[] = "\r\n"; constexpr size_t kDelimiterSuffixSize = base::size(kDelimiterSuffix) - 1u; } // namespace MultipartParser::Matcher::Matcher() = default; MultipartParser::Matcher::Matcher(const char* data, size_t num_matched_bytes, size_t size) : data_(data), num_matched_bytes_(num_matched_bytes), size_(size) {} bool MultipartParser::Matcher::Match(const char* first, const char* last) { while (first < last) { if (!Match(*first++)) return false; } return true; } void MultipartParser::Matcher::SetNumMatchedBytes(size_t num_matched_bytes) { DCHECK_LE(num_matched_bytes, size_); num_matched_bytes_ = num_matched_bytes; } MultipartParser::MultipartParser(Vector<char> boundary, Client* client) : client_(client), delimiter_(std::move(boundary)), state_(State::kParsingPreamble) { // The delimiter consists of "\r\n" and a dash boundary which consists of // "--" and a boundary. delimiter_.push_front("\r\n--", 4u); matcher_ = DelimiterMatcher(kDashBoundaryOffset); } bool MultipartParser::AppendData(const char* bytes, size_t size) { DCHECK_NE(State::kFinished, state_); DCHECK_NE(State::kCancelled, state_); const char* const bytes_end = bytes + size; while (bytes < bytes_end) { switch (state_) { case State::kParsingPreamble: // Parse either a preamble and a delimiter or a dash boundary. ParseDelimiter(&bytes, bytes_end); if (!matcher_.IsMatchComplete() && bytes < bytes_end) { // Parse a preamble data (by ignoring it) and then a delimiter. matcher_.SetNumMatchedBytes(0u); ParseDataAndDelimiter(&bytes, bytes_end); } if (matcher_.IsMatchComplete()) { // Prepare for a delimiter suffix. matcher_ = DelimiterSuffixMatcher(); state_ = State::kParsingDelimiterSuffix; } break; case State::kParsingDelimiterSuffix: // Parse transport padding and "\r\n" after a delimiter. // This state can be reached after either a preamble or part // octets are parsed. if (matcher_.NumMatchedBytes() == 0u) ParseTransportPadding(&bytes, bytes_end); while (bytes < bytes_end) { if (!matcher_.Match(*bytes++)) return false; if (matcher_.IsMatchComplete()) { // Prepare for part header fields. state_ = State::kParsingPartHeaderFields; break; } } break; case State::kParsingPartHeaderFields: { // Parse part header fields (which ends with "\r\n") and an empty // line (which also ends with "\r\n"). // This state can be reached after a delimiter and a delimiter // suffix after either a preamble or part octets are parsed. HTTPHeaderMap header_fields; if (ParseHeaderFields(&bytes, bytes_end, &header_fields)) { // Prepare for part octets. matcher_ = DelimiterMatcher(); state_ = State::kParsingPartOctets; client_->PartHeaderFieldsInMultipartReceived(header_fields); } break; } case State::kParsingPartOctets: { // Parse part octets and a delimiter. // This state can be reached only after part header fields are // parsed. const size_t num_initially_matched_bytes = matcher_.NumMatchedBytes(); const char* octets_begin = bytes; ParseDelimiter(&bytes, bytes_end); if (!matcher_.IsMatchComplete() && bytes < bytes_end) { if (matcher_.NumMatchedBytes() >= num_initially_matched_bytes && num_initially_matched_bytes > 0u) { // Since the matched bytes did not form a complete // delimiter, the matched bytes turned out to be octet // bytes instead of being delimiter bytes. Additionally, // some of the matched bytes are from the previous call and // are therefore not in the range [octetsBegin, bytesEnd[. client_->PartDataInMultipartReceived(matcher_.Data(), matcher_.NumMatchedBytes()); if (state_ != State::kParsingPartOctets) break; octets_begin = bytes; } matcher_.SetNumMatchedBytes(0u); ParseDataAndDelimiter(&bytes, bytes_end); const char* const octets_end = bytes - matcher_.NumMatchedBytes(); if (octets_begin < octets_end) { client_->PartDataInMultipartReceived( octets_begin, static_cast<size_t>(octets_end - octets_begin)); if (state_ != State::kParsingPartOctets) break; } } if (matcher_.IsMatchComplete()) { state_ = State::kParsingDelimiterOrCloseDelimiterSuffix; client_->PartDataInMultipartFullyReceived(); } break; } case State::kParsingDelimiterOrCloseDelimiterSuffix: // Determine whether this is a delimiter suffix or a close // delimiter suffix. // This state can be reached only after part octets are parsed. if (*bytes == '-') { // Prepare for a close delimiter suffix. matcher_ = CloseDelimiterSuffixMatcher(); state_ = State::kParsingCloseDelimiterSuffix; } else { // Prepare for a delimiter suffix. matcher_ = DelimiterSuffixMatcher(); state_ = State::kParsingDelimiterSuffix; } break; case State::kParsingCloseDelimiterSuffix: // Parse "--", transport padding and "\r\n" after a delimiter // (a delimiter and "--" constitute a close delimiter). // This state can be reached only after part octets are parsed. for (;;) { if (matcher_.NumMatchedBytes() == 2u) ParseTransportPadding(&bytes, bytes_end); if (bytes >= bytes_end) break; if (!matcher_.Match(*bytes++)) return false; if (matcher_.IsMatchComplete()) { // Prepare for an epilogue. state_ = State::kParsingEpilogue; break; } } break; case State::kParsingEpilogue: // Parse an epilogue (by ignoring it). // This state can be reached only after a delimiter and a close // delimiter suffix after part octets are parsed. return true; case State::kCancelled: case State::kFinished: // The client changed the state. return false; } } DCHECK_EQ(bytes_end, bytes); return true; } void MultipartParser::Cancel() { state_ = State::kCancelled; } bool MultipartParser::Finish() { DCHECK_NE(State::kCancelled, state_); DCHECK_NE(State::kFinished, state_); const State initial_state = state_; state_ = State::kFinished; switch (initial_state) { case State::kParsingPartOctets: if (matcher_.NumMatchedBytes() > 0u) { // Since the matched bytes did not form a complete delimiter, // the matched bytes turned out to be octet bytes instead of being // delimiter bytes. client_->PartDataInMultipartReceived(matcher_.Data(), matcher_.NumMatchedBytes()); } return false; case State::kParsingCloseDelimiterSuffix: // Require a full close delimiter consisting of a delimiter and "--" // but ignore missing or partial "\r\n" after that. return matcher_.NumMatchedBytes() >= 2u; case State::kParsingEpilogue: return true; default: return false; } } MultipartParser::Matcher MultipartParser::CloseDelimiterSuffixMatcher() const { return Matcher(kCloseDelimiterSuffix, 0u, kCloseDelimiterSuffixSize); } MultipartParser::Matcher MultipartParser::DelimiterMatcher( size_t num_already_matched_bytes) const { return Matcher(delimiter_.data(), num_already_matched_bytes, delimiter_.size()); } MultipartParser::Matcher MultipartParser::DelimiterSuffixMatcher() const { return Matcher(kDelimiterSuffix, 0u, kDelimiterSuffixSize); } void MultipartParser::ParseDataAndDelimiter(const char** bytes_pointer, const char* bytes_end) { DCHECK_EQ(0u, matcher_.NumMatchedBytes()); // Search for a complete delimiter within the bytes. const char* delimiter_begin = std::search( *bytes_pointer, bytes_end, delimiter_.begin(), delimiter_.end()); if (delimiter_begin != bytes_end) { // A complete delimiter was found. The bytes before that are octet // bytes. const char* const delimiter_end = delimiter_begin + delimiter_.size(); const bool matched = matcher_.Match(delimiter_begin, delimiter_end); DCHECK(matched); DCHECK(matcher_.IsMatchComplete()); *bytes_pointer = delimiter_end; } else { // Search for a partial delimiter in the end of the bytes. const size_t size = static_cast<size_t>(bytes_end - *bytes_pointer); for (delimiter_begin = bytes_end - std::min(static_cast<size_t>(delimiter_.size() - 1u), size); delimiter_begin < bytes_end; ++delimiter_begin) { if (matcher_.Match(delimiter_begin, bytes_end)) break; matcher_.SetNumMatchedBytes(0u); } // If a partial delimiter was found in the end of bytes, the bytes // before the partial delimiter are definitely octets bytes and // the partial delimiter bytes are buffered for now. // If a partial delimiter was not found in the end of bytes, all bytes // are definitely octets bytes. // In all cases, all bytes are parsed now. *bytes_pointer = bytes_end; } DCHECK(matcher_.IsMatchComplete() || *bytes_pointer == bytes_end); } void MultipartParser::ParseDelimiter(const char** bytes_pointer, const char* bytes_end) { DCHECK(!matcher_.IsMatchComplete()); while (*bytes_pointer < bytes_end && matcher_.Match(*(*bytes_pointer))) { ++(*bytes_pointer); if (matcher_.IsMatchComplete()) break; } } bool MultipartParser::ParseHeaderFields(const char** bytes_pointer, const char* bytes_end, HTTPHeaderMap* header_fields) { // Combine the current bytes with buffered header bytes if needed. const char* header_bytes = *bytes_pointer; if ((bytes_end - *bytes_pointer) > std::numeric_limits<wtf_size_t>::max()) return false; wtf_size_t header_size = static_cast<wtf_size_t>(bytes_end - *bytes_pointer); if (!buffered_header_bytes_.IsEmpty()) { buffered_header_bytes_.Append(header_bytes, header_size); header_bytes = buffered_header_bytes_.data(); header_size = buffered_header_bytes_.size(); } wtf_size_t end = 0u; if (!ParseMultipartFormHeadersFromBody(header_bytes, header_size, header_fields, &end)) { // Store the current header bytes for the next call unless that has // already been done. if (buffered_header_bytes_.IsEmpty()) buffered_header_bytes_.Append(header_bytes, header_size); *bytes_pointer = bytes_end; return false; } buffered_header_bytes_.clear(); *bytes_pointer = bytes_end - (header_size - end); return true; } void MultipartParser::ParseTransportPadding(const char** bytes_pointer, const char* bytes_end) const { while (*bytes_pointer < bytes_end && (*(*bytes_pointer) == '\t' || *(*bytes_pointer) == ' ')) ++(*bytes_pointer); } void MultipartParser::Trace(Visitor* visitor) const { visitor->Trace(client_); } } // namespace blink
nwjs/chromium.src
third_party/blink/renderer/core/fetch/multipart_parser.cc
C++
bsd-3-clause
12,588
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const tslib_1 = require("tslib"); const chalk = require("chalk"); const cli_utils_1 = require("@ionic/cli-utils"); const command_1 = require("@ionic/cli-utils/lib/command"); const validators_1 = require("@ionic/cli-utils/lib/validators"); const common_1 = require("./common"); let PackageBuildCommand = class PackageBuildCommand extends command_1.Command { preRun(inputs, options) { return tslib_1.__awaiter(this, void 0, void 0, function* () { const { PackageClient } = yield Promise.resolve().then(function () { return require('@ionic/cli-utils/lib/package'); }); const { SecurityClient } = yield Promise.resolve().then(function () { return require('@ionic/cli-utils/lib/security'); }); const token = yield this.env.session.getAppUserToken(); const pkg = new PackageClient(token, this.env.client); const sec = new SecurityClient(token, this.env.client); if (!inputs[0]) { const platform = yield this.env.prompt({ type: 'list', name: 'platform', message: 'What platform would you like to target:', choices: ['ios', 'android'], }); inputs[0] = platform; } if (!options['profile'] && (inputs[0] === 'ios' || (inputs[0] === 'android' && options['release']))) { this.env.tasks.next(`Build requires security profile, but ${chalk.green('--profile')} was not provided. Looking up your profiles`); const allProfiles = yield sec.getProfiles({}); this.env.tasks.end(); const desiredProfileType = options['release'] ? 'production' : 'development'; const profiles = allProfiles.filter(p => p.type === desiredProfileType); if (profiles.length === 0) { this.env.log.error(`Sorry--a valid ${chalk.bold(desiredProfileType)} security profile is required for ${pkg.formatPlatform(inputs[0])} ${options['release'] ? 'release' : 'debug'} builds.`); return 1; } if (profiles.length === 1) { this.env.log.warn(`Attempting to use ${chalk.bold(profiles[0].tag)} (${chalk.bold(profiles[0].name)}), as it is your only ${chalk.bold(desiredProfileType)} security profile.`); options['profile'] = profiles[0].tag; } else { const profile = yield this.env.prompt({ type: 'list', name: 'profile', message: 'Please choose a security profile to use with this build', choices: profiles.map(p => ({ name: p.name, short: p.name, value: p.tag, })), }); options['profile'] = profile; } } }); } run(inputs, options) { return tslib_1.__awaiter(this, void 0, void 0, function* () { const { upload } = yield Promise.resolve().then(function () { return require('@ionic/cli-utils/lib/upload'); }); const { DeployClient } = yield Promise.resolve().then(function () { return require('@ionic/cli-utils/lib/deploy'); }); const { PackageClient } = yield Promise.resolve().then(function () { return require('@ionic/cli-utils/lib/package'); }); const { SecurityClient } = yield Promise.resolve().then(function () { return require('@ionic/cli-utils/lib/security'); }); const { filterOptionsByIntent } = yield Promise.resolve().then(function () { return require('@ionic/cli-utils/lib/utils/command'); }); const { createArchive } = yield Promise.resolve().then(function () { return require('@ionic/cli-utils/lib/utils/archive'); }); let [platform] = inputs; let { prod, release, profile, note } = options; if (typeof note !== 'string') { note = 'Ionic Package Upload'; } const project = yield this.env.project.load(); const token = yield this.env.session.getAppUserToken(); const deploy = new DeployClient(token, this.env.client); const sec = new SecurityClient(token, this.env.client); const pkg = new PackageClient(token, this.env.client); if (typeof profile === 'string') { this.env.tasks.next(`Retrieving security profile ${chalk.bold(profile)}`); const p = yield sec.getProfile(profile.toLowerCase()); // TODO: gracefully handle 404 this.env.tasks.end(); if (!p.credentials[platform]) { this.env.log.error(`Profile ${chalk.bold(p.tag)} (${chalk.bold(p.name)}) was found, but didn't have credentials for ${pkg.formatPlatform(platform)}.`); // TODO: link to docs return 1; } if (release && p.type !== 'production') { this.env.log.error(`Profile ${chalk.bold(p.tag)} (${chalk.bold(p.name)}) is a ${chalk.bold(p.type)} profile, which won't work for release builds.\n` + `Please use a production security profile.`); // TODO: link to docs return 1; } } if (project.type === 'ionic-angular' && release && !prod) { this.env.log.warn(`We recommend using ${chalk.green('--prod')} for production builds when using ${chalk.green('--release')}.`); } this.env.tasks.end(); const { build } = yield Promise.resolve().then(function () { return require('@ionic/cli-utils/commands/build'); }); yield build(this.env, inputs, filterOptionsByIntent(this.metadata, options, 'app-scripts')); const snapshotRequest = yield upload(this.env, { note }); this.env.tasks.next('Requesting project upload'); const uploadTask = this.env.tasks.next('Uploading project'); const proj = yield pkg.requestProjectUpload(); const zip = createArchive('zip'); zip.file('package.json', {}); zip.file('config.xml', {}); zip.directory('resources', {}); zip.finalize(); yield pkg.uploadProject(proj, zip, { progress: (loaded, total) => { uploadTask.progress(loaded, total); } }); this.env.tasks.next('Queuing build'); const snapshot = yield deploy.getSnapshot(snapshotRequest.uuid, {}); const packageBuild = yield pkg.queueBuild({ platform, mode: release ? 'release' : 'debug', zipUrl: snapshot.url, projectId: proj.id, profileTag: typeof profile === 'string' ? profile : undefined, }); this.env.tasks.end(); this.env.log.ok(`Build ${packageBuild.id} has been submitted!`); }); } }; PackageBuildCommand = tslib_1.__decorate([ command_1.CommandMetadata({ name: 'build', type: 'project', backends: [cli_utils_1.BACKEND_LEGACY], deprecated: true, description: 'Start a package build', longDescription: ` ${chalk.bold.yellow('WARNING')}: ${common_1.DEPRECATION_NOTICE} Ionic Package makes it easy to build a native binary of your app in the cloud. Full documentation can be found here: ${chalk.bold('https://docs.ionic.io/services/package/')} `, exampleCommands: ['android', 'ios --profile=dev', 'android --profile=prod --release --prod'], inputs: [ { name: 'platform', description: `The platform to target: ${chalk.green('ios')}, ${chalk.green('android')}`, validators: [validators_1.contains(['ios', 'android'], {})], }, ], options: [ { name: 'prod', description: 'Mark as a production build', type: Boolean, intent: 'app-scripts', }, { name: 'release', description: 'Mark as a release build', type: Boolean, }, { name: 'profile', description: 'The security profile to use with this build', type: String, aliases: ['p'], }, { name: 'note', description: 'Give the package snapshot a note', }, ], }) ], PackageBuildCommand); exports.PackageBuildCommand = PackageBuildCommand;
vivadaniele/spid-ionic-sdk
node_modules/ionic/dist/commands/package/build.js
JavaScript
bsd-3-clause
8,855
/**************************************************************************** * * Copyright (C) 2012 PX4 Development Team. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name PX4 nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * ****************************************************************************/ /** * @file blocks.h * * Controller library code */ #pragma once #include <px4_platform_common/defines.h> #include <assert.h> #include <time.h> #include <stdlib.h> #include <math.h> #include <mathlib/math/test/test.hpp> #include <mathlib/math/filter/LowPassFilter2p.hpp> #include "block/Block.hpp" #include "block/BlockParam.hpp" #include "matrix/math.hpp" namespace control { template<class Type, size_t M> class __EXPORT BlockLowPassVector: public Block { public: // methods BlockLowPassVector(SuperBlock *parent, const char *name) : Block(parent, name), _state(), _fCut(this, "") // only one parameter, no need to name { for (size_t i = 0; i < M; i++) { _state(i) = 0.0f / 0.0f; } } virtual ~BlockLowPassVector() = default; matrix::Vector<Type, M> update(const matrix::Matrix<Type, M, 1> &input) { for (size_t i = 0; i < M; i++) { if (!PX4_ISFINITE(getState()(i))) { setState(input); } } float b = 2 * float(M_PI) * getFCut() * getDt(); float a = b / (1 + b); setState(input * a + getState() * (1 - a)); return getState(); } // accessors matrix::Vector<Type, M> getState() { return _state; } float getFCut() { return _fCut.get(); } void setState(const matrix::Vector<Type, M> &state) { _state = state; } private: // attributes matrix::Vector<Type, M> _state; control::BlockParamFloat _fCut; }; } // namespace control
PX4/Firmware
src/lib/controllib/BlockLowPassVector.hpp
C++
bsd-3-clause
3,118
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function, unicode_literals) from builtins import * import versioneer __author__ = 'Chia-Jung, Yang' __email__ = 'jeroyang@gmail.com' __version__ = versioneer.get_version() from ._version import get_versions __version__ = get_versions()['version'] del get_versions
jeroyang/newsletter
newsletter/__init__.py
Python
bsd-3-clause
394
<?php /* Prototype : string basename(string path [, string suffix]) * Description: Returns the filename component of the path * Source code: ext/standard/string.c * Alias to functions: */ echo "*** Testing basename() : usage variation ***\n"; // Define error handler function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) { if (error_reporting() != 0) { // report non-silenced errors echo "Error: $err_no - $err_msg, $filename($linenum)\n"; } } set_error_handler('test_error_handler'); //get an unset variable $unset_var = 10; unset ($unset_var); // define some classes class classWithToString { public function __toString() { return "Class A object"; } } class classWithoutToString { } // heredoc string $heredoc = <<<EOT hello world EOT; // add arrays $index_array = array (1, 2, 3); $assoc_array = array ('one' => 1, 'two' => 2); //array of values to iterate over $inputs = array( // int data 'int 0' => 0, 'int 1' => 1, 'int 12345' => 12345, 'int -12345' => -2345, // float data 'float 10.5' => 10.5, 'float -10.5' => -10.5, 'float 12.3456789000e10' => 12.3456789000e10, 'float -12.3456789000e10' => -12.3456789000e10, 'float .5' => .5, // array data 'empty array' => array(), 'int indexed array' => $index_array, 'associative array' => $assoc_array, 'nested arrays' => array('foo', $index_array, $assoc_array), // null data 'uppercase NULL' => NULL, 'lowercase null' => null, // boolean data 'lowercase true' => true, 'lowercase false' =>false, 'uppercase TRUE' =>TRUE, 'uppercase FALSE' =>FALSE, // empty data 'empty string DQ' => "", 'empty string SQ' => '', // object data 'instance of classWithToString' => new classWithToString(), 'instance of classWithoutToString' => new classWithoutToString(), // undefined data 'undefined var' => @$undefined_var, // unset data 'unset var' => @$unset_var, ); // loop through each element of the array for path foreach($inputs as $key =>$value) { echo "\n--$key--\n"; var_dump( basename($value) ); }; ?> ===DONE===
JSchwehn/php
testdata/fuzzdir/corpus/ext_standard_tests_file_basename_variation3.php
PHP
bsd-3-clause
2,234
define( [ { "value": 40, "name": "Accessibility", "path": "Accessibility" }, { "value": 180, "name": "Accounts", "path": "Accounts", "children": [ { "value": 76, "name": "Access", "path": "Accounts/Access", "children": [ { "value": 12, "name": "DefaultAccessPlugin.bundle", "path": "Accounts/Access/DefaultAccessPlugin.bundle" }, { "value": 28, "name": "FacebookAccessPlugin.bundle", "path": "Accounts/Access/FacebookAccessPlugin.bundle" }, { "value": 20, "name": "LinkedInAccessPlugin.bundle", "path": "Accounts/Access/LinkedInAccessPlugin.bundle" }, { "value": 16, "name": "TencentWeiboAccessPlugin.bundle", "path": "Accounts/Access/TencentWeiboAccessPlugin.bundle" } ] }, { "value": 92, "name": "Authentication", "path": "Accounts/Authentication", "children": [ { "value": 24, "name": "FacebookAuthenticationPlugin.bundle", "path": "Accounts/Authentication/FacebookAuthenticationPlugin.bundle" }, { "value": 16, "name": "LinkedInAuthenticationPlugin.bundle", "path": "Accounts/Authentication/LinkedInAuthenticationPlugin.bundle" }, { "value": 20, "name": "TencentWeiboAuthenticationPlugin.bundle", "path": "Accounts/Authentication/TencentWeiboAuthenticationPlugin.bundle" }, { "value": 16, "name": "TwitterAuthenticationPlugin.bundle", "path": "Accounts/Authentication/TwitterAuthenticationPlugin.bundle" }, { "value": 16, "name": "WeiboAuthenticationPlugin.bundle", "path": "Accounts/Authentication/WeiboAuthenticationPlugin.bundle" } ] }, { "value": 12, "name": "Notification", "path": "Accounts/Notification", "children": [ { "value": 12, "name": "SPAAccountsNotificationPlugin.bundle", "path": "Accounts/Notification/SPAAccountsNotificationPlugin.bundle" } ] } ] }, { "value": 1904, "name": "AddressBook Plug-Ins", "path": "AddressBook Plug-Ins", "children": [ { "value": 744, "name": "CardDAVPlugin.sourcebundle", "path": "AddressBook Plug-Ins/CardDAVPlugin.sourcebundle", "children": [ { "value": 744, "name": "Contents", "path": "AddressBook Plug-Ins/CardDAVPlugin.sourcebundle/Contents" } ] }, { "value": 28, "name": "DirectoryServices.sourcebundle", "path": "AddressBook Plug-Ins/DirectoryServices.sourcebundle", "children": [ { "value": 28, "name": "Contents", "path": "AddressBook Plug-Ins/DirectoryServices.sourcebundle/Contents" } ] }, { "value": 680, "name": "Exchange.sourcebundle", "path": "AddressBook Plug-Ins/Exchange.sourcebundle", "children": [ { "value": 680, "name": "Contents", "path": "AddressBook Plug-Ins/Exchange.sourcebundle/Contents" } ] }, { "value": 432, "name": "LDAP.sourcebundle", "path": "AddressBook Plug-Ins/LDAP.sourcebundle", "children": [ { "value": 432, "name": "Contents", "path": "AddressBook Plug-Ins/LDAP.sourcebundle/Contents" } ] }, { "value": 20, "name": "LocalSource.sourcebundle", "path": "AddressBook Plug-Ins/LocalSource.sourcebundle", "children": [ { "value": 20, "name": "Contents", "path": "AddressBook Plug-Ins/LocalSource.sourcebundle/Contents" } ] } ] }, { "value": 36, "name": "Assistant", "path": "Assistant", "children": [ { "value": 36, "name": "Plugins", "path": "Assistant/Plugins", "children": [ { "value": 36, "name": "AddressBook.assistantBundle", "path": "Assistant/Plugins/AddressBook.assistantBundle" }, { "value": 8, "name": "GenericAddressHandler.addresshandler", "path": "Recents/Plugins/GenericAddressHandler.addresshandler" }, { "value": 12, "name": "MapsRecents.addresshandler", "path": "Recents/Plugins/MapsRecents.addresshandler" } ] } ] }, { "value": 53228, "name": "Automator", "path": "Automator", "children": [ { "value": 0, "name": "ActivateFonts.action", "path": "Automator/ActivateFonts.action", "children": [ { "value": 0, "name": "Contents", "path": "Automator/ActivateFonts.action/Contents" } ] }, { "value": 12, "name": "AddAttachments to Front Message.action", "path": "Automator/AddAttachments to Front Message.action", "children": [ { "value": 12, "name": "Contents", "path": "Automator/AddAttachments to Front Message.action/Contents" } ] }, { "value": 276, "name": "AddColor Profile.action", "path": "Automator/AddColor Profile.action", "children": [ { "value": 276, "name": "Contents", "path": "Automator/AddColor Profile.action/Contents" } ] }, { "value": 32, "name": "AddGrid to PDF Documents.action", "path": "Automator/AddGrid to PDF Documents.action", "children": [ { "value": 32, "name": "Contents", "path": "Automator/AddGrid to PDF Documents.action/Contents" } ] }, { "value": 12, "name": "AddMovie to iDVD Menu.action", "path": "Automator/AddMovie to iDVD Menu.action", "children": [ { "value": 12, "name": "Contents", "path": "Automator/AddMovie to iDVD Menu.action/Contents" } ] }, { "value": 20, "name": "AddPhotos to Album.action", "path": "Automator/AddPhotos to Album.action", "children": [ { "value": 20, "name": "Contents", "path": "Automator/AddPhotos to Album.action/Contents" } ] }, { "value": 12, "name": "AddSongs to iPod.action", "path": "Automator/AddSongs to iPod.action", "children": [ { "value": 12, "name": "Contents", "path": "Automator/AddSongs to iPod.action/Contents" } ] }, { "value": 44, "name": "AddSongs to Playlist.action", "path": "Automator/AddSongs to Playlist.action", "children": [ { "value": 44, "name": "Contents", "path": "Automator/AddSongs to Playlist.action/Contents" } ] }, { "value": 12, "name": "AddThumbnail Icon to Image Files.action", "path": "Automator/AddThumbnail Icon to Image Files.action", "children": [ { "value": 12, "name": "Contents", "path": "Automator/AddThumbnail Icon to Image Files.action/Contents" } ] }, { "value": 268, "name": "Addto Font Library.action", "path": "Automator/Addto Font Library.action", "children": [ { "value": 268, "name": "Contents", "path": "Automator/Addto Font Library.action/Contents" } ] }, { "value": 0, "name": "AddressBook.definition", "path": "Automator/AddressBook.definition", "children": [ { "value": 0, "name": "Contents", "path": "Automator/AddressBook.definition/Contents" } ] }, { "value": 408, "name": "AppleVersioning Tool.action", "path": "Automator/AppleVersioning Tool.action", "children": [ { "value": 408, "name": "Contents", "path": "Automator/AppleVersioning Tool.action/Contents" } ] }, { "value": 568, "name": "ApplyColorSync Profile to Images.action", "path": "Automator/ApplyColorSync Profile to Images.action", "children": [ { "value": 568, "name": "Contents", "path": "Automator/ApplyColorSync Profile to Images.action/Contents" } ] }, { "value": 348, "name": "ApplyQuartz Composition Filter to Image Files.action", "path": "Automator/ApplyQuartz Composition Filter to Image Files.action", "children": [ { "value": 348, "name": "Contents", "path": "Automator/ApplyQuartz Composition Filter to Image Files.action/Contents" } ] }, { "value": 368, "name": "ApplyQuartz Filter to PDF Documents.action", "path": "Automator/ApplyQuartz Filter to PDF Documents.action", "children": [ { "value": 368, "name": "Contents", "path": "Automator/ApplyQuartz Filter to PDF Documents.action/Contents" } ] }, { "value": 96, "name": "ApplySQL.action", "path": "Automator/ApplySQL.action", "children": [ { "value": 96, "name": "Contents", "path": "Automator/ApplySQL.action/Contents" } ] }, { "value": 372, "name": "Askfor Confirmation.action", "path": "Automator/Askfor Confirmation.action", "children": [ { "value": 372, "name": "Contents", "path": "Automator/Askfor Confirmation.action/Contents" } ] }, { "value": 104, "name": "Askfor Finder Items.action", "path": "Automator/Askfor Finder Items.action", "children": [ { "value": 104, "name": "Contents", "path": "Automator/Askfor Finder Items.action/Contents" } ] }, { "value": 52, "name": "Askfor Movies.action", "path": "Automator/Askfor Movies.action", "children": [ { "value": 52, "name": "Contents", "path": "Automator/Askfor Movies.action/Contents" } ] }, { "value": 44, "name": "Askfor Photos.action", "path": "Automator/Askfor Photos.action", "children": [ { "value": 44, "name": "Contents", "path": "Automator/Askfor Photos.action/Contents" } ] }, { "value": 16, "name": "Askfor Servers.action", "path": "Automator/Askfor Servers.action", "children": [ { "value": 16, "name": "Contents", "path": "Automator/Askfor Servers.action/Contents" } ] }, { "value": 52, "name": "Askfor Songs.action", "path": "Automator/Askfor Songs.action", "children": [ { "value": 52, "name": "Contents", "path": "Automator/Askfor Songs.action/Contents" } ] }, { "value": 288, "name": "Askfor Text.action", "path": "Automator/Askfor Text.action", "children": [ { "value": 288, "name": "Contents", "path": "Automator/Askfor Text.action/Contents" } ] }, { "value": 0, "name": "Automator.definition", "path": "Automator/Automator.definition", "children": [ { "value": 0, "name": "Contents", "path": "Automator/Automator.definition/Contents" } ] }, { "value": 12, "name": "BrowseMovies.action", "path": "Automator/BrowseMovies.action", "children": [ { "value": 12, "name": "Contents", "path": "Automator/BrowseMovies.action/Contents" } ] }, { "value": 552, "name": "BuildXcode Project.action", "path": "Automator/BuildXcode Project.action", "children": [ { "value": 552, "name": "Contents", "path": "Automator/BuildXcode Project.action/Contents" } ] }, { "value": 296, "name": "BurnA Disc.action", "path": "Automator/BurnA Disc.action", "children": [ { "value": 296, "name": "Contents", "path": "Automator/BurnA Disc.action/Contents" } ] }, { "value": 8, "name": "ChangeCase of Song Names.action", "path": "Automator/ChangeCase of Song Names.action", "children": [ { "value": 8, "name": "Contents", "path": "Automator/ChangeCase of Song Names.action/Contents" } ] }, { "value": 60, "name": "ChangeType of Images.action", "path": "Automator/ChangeType of Images.action", "children": [ { "value": 60, "name": "Contents", "path": "Automator/ChangeType of Images.action/Contents" } ] }, { "value": 24, "name": "Choosefrom List.action", "path": "Automator/Choosefrom List.action", "children": [ { "value": 24, "name": "Contents", "path": "Automator/Choosefrom List.action/Contents" } ] }, { "value": 12, "name": "CombineMail Messages.action", "path": "Automator/CombineMail Messages.action", "children": [ { "value": 12, "name": "Contents", "path": "Automator/CombineMail Messages.action/Contents" } ] }, { "value": 24, "name": "CombinePDF Pages.action", "path": "Automator/CombinePDF Pages.action", "children": [ { "value": 24, "name": "Contents", "path": "Automator/CombinePDF Pages.action/Contents" } ] }, { "value": 12, "name": "CombineText Files.action", "path": "Automator/CombineText Files.action", "children": [ { "value": 12, "name": "Contents", "path": "Automator/CombineText Files.action/Contents" } ] }, { "value": 24, "name": "CompressImages in PDF Documents.action", "path": "Automator/CompressImages in PDF Documents.action", "children": [ { "value": 24, "name": "Contents", "path": "Automator/CompressImages in PDF Documents.action/Contents" } ] }, { "value": 8, "name": "Connectto Servers.action", "path": "Automator/Connectto Servers.action", "children": [ { "value": 8, "name": "Contents", "path": "Automator/Connectto Servers.action/Contents" } ] }, { "value": 8, "name": "ConvertAccount object to Mailbox object.caction", "path": "Automator/ConvertAccount object to Mailbox object.caction", "children": [ { "value": 8, "name": "Contents", "path": "Automator/ConvertAccount object to Mailbox object.caction/Contents" } ] }, { "value": 8, "name": "ConvertAlbum object to Photo object.caction", "path": "Automator/ConvertAlbum object to Photo object.caction", "children": [ { "value": 8, "name": "Contents", "path": "Automator/ConvertAlbum object to Photo object.caction/Contents" } ] }, { "value": 8, "name": "ConvertAlias object to Finder object.caction", "path": "Automator/ConvertAlias object to Finder object.caction", "children": [ { "value": 8, "name": "Contents", "path": "Automator/ConvertAlias object to Finder object.caction/Contents" } ] }, { "value": 8, "name": "ConvertAlias object to iPhoto photo object.caction", "path": "Automator/ConvertAlias object to iPhoto photo object.caction", "children": [ { "value": 8, "name": "Contents", "path": "Automator/ConvertAlias object to iPhoto photo object.caction/Contents" } ] }, { "value": 8, "name": "ConvertCalendar object to Event object.caction", "path": "Automator/ConvertCalendar object to Event object.caction", "children": [ { "value": 8, "name": "Contents", "path": "Automator/ConvertCalendar object to Event object.caction/Contents" } ] }, { "value": 8, "name": "ConvertCalendar object to Reminders object.caction", "path": "Automator/ConvertCalendar object to Reminders object.caction", "children": [ { "value": 8, "name": "Contents", "path": "Automator/ConvertCalendar object to Reminders object.caction/Contents" } ] }, { "value": 8, "name": "ConvertCocoa Data To Cocoa String.caction", "path": "Automator/ConvertCocoa Data To Cocoa String.caction", "children": [ { "value": 8, "name": "Contents", "path": "Automator/ConvertCocoa Data To Cocoa String.caction/Contents" } ] }, { "value": 8, "name": "ConvertCocoa String To Cocoa Data.caction", "path": "Automator/ConvertCocoa String To Cocoa Data.caction", "children": [ { "value": 8, "name": "Contents", "path": "Automator/ConvertCocoa String To Cocoa Data.caction/Contents" } ] }, { "value": 12, "name": "ConvertCocoa URL to iTunes Track Object.caction", "path": "Automator/ConvertCocoa URL to iTunes Track Object.caction", "children": [ { "value": 12, "name": "Contents", "path": "Automator/ConvertCocoa URL to iTunes Track Object.caction/Contents" } ] }, { "value": 12, "name": "ConvertCocoa URL to RSS Feed.caction", "path": "Automator/ConvertCocoa URL to RSS Feed.caction", "children": [ { "value": 12, "name": "Contents", "path": "Automator/ConvertCocoa URL to RSS Feed.caction/Contents" } ] }, { "value": 40, "name": "ConvertCSV to SQL.action", "path": "Automator/ConvertCSV to SQL.action", "children": [ { "value": 40, "name": "Contents", "path": "Automator/ConvertCSV to SQL.action/Contents" } ] }, { "value": 8, "name": "ConvertFeeds to Articles.caction", "path": "Automator/ConvertFeeds to Articles.caction", "children": [ { "value": 8, "name": "Contents", "path": "Automator/ConvertFeeds to Articles.caction/Contents" } ] }, { "value": 8, "name": "ConvertFinder object to Alias object.caction", "path": "Automator/ConvertFinder object to Alias object.caction", "children": [ { "value": 8, "name": "Contents", "path": "Automator/ConvertFinder object to Alias object.caction/Contents" } ] }, { "value": 8, "name": "ConvertGroup object to Person object.caction", "path": "Automator/ConvertGroup object to Person object.caction", "children": [ { "value": 8, "name": "Contents", "path": "Automator/ConvertGroup object to Person object.caction/Contents" } ] }, { "value": 8, "name": "ConvertiPhoto Album to Alias object.caction", "path": "Automator/ConvertiPhoto Album to Alias object.caction", "children": [ { "value": 8, "name": "Contents", "path": "Automator/ConvertiPhoto Album to Alias object.caction/Contents" } ] }, { "value": 8, "name": "ConvertiTunes object to Alias object.caction", "path": "Automator/ConvertiTunes object to Alias object.caction", "children": [ { "value": 8, "name": "Contents", "path": "Automator/ConvertiTunes object to Alias object.caction/Contents" } ] }, { "value": 8, "name": "ConvertiTunes Playlist object to Alias object.caction", "path": "Automator/ConvertiTunes Playlist object to Alias object.caction", "children": [ { "value": 8, "name": "Contents", "path": "Automator/ConvertiTunes Playlist object to Alias object.caction/Contents" } ] }, { "value": 8, "name": "ConvertMailbox object to Message object.caction", "path": "Automator/ConvertMailbox object to Message object.caction", "children": [ { "value": 8, "name": "Contents", "path": "Automator/ConvertMailbox object to Message object.caction/Contents" } ] }, { "value": 8, "name": "ConvertPhoto object to Alias object.caction", "path": "Automator/ConvertPhoto object to Alias object.caction", "children": [ { "value": 8, "name": "Contents", "path": "Automator/ConvertPhoto object to Alias object.caction/Contents" } ] }, { "value": 8, "name": "ConvertPlaylist object to Song object.caction", "path": "Automator/ConvertPlaylist object to Song object.caction", "children": [ { "value": 8, "name": "Contents", "path": "Automator/ConvertPlaylist object to Song object.caction/Contents" } ] }, { "value": 2760, "name": "ConvertQuartz Compositions to QuickTime Movies.action", "path": "Automator/ConvertQuartz Compositions to QuickTime Movies.action", "children": [ { "value": 2760, "name": "Contents", "path": "Automator/ConvertQuartz Compositions to QuickTime Movies.action/Contents" } ] }, { "value": 8, "name": "ConvertSource object to Playlist object.caction", "path": "Automator/ConvertSource object to Playlist object.caction", "children": [ { "value": 8, "name": "Contents", "path": "Automator/ConvertSource object to Playlist object.caction/Contents" } ] }, { "value": 96, "name": "CopyFinder Items.action", "path": "Automator/CopyFinder Items.action", "children": [ { "value": 96, "name": "Contents", "path": "Automator/CopyFinder Items.action/Contents" } ] }, { "value": 8, "name": "Copyto Clipboard.action", "path": "Automator/Copyto Clipboard.action", "children": [ { "value": 8, "name": "Contents", "path": "Automator/Copyto Clipboard.action/Contents" } ] }, { "value": 72, "name": "CreateAnnotated Movie File.action", "path": "Automator/CreateAnnotated Movie File.action", "children": [ { "value": 72, "name": "Contents", "path": "Automator/CreateAnnotated Movie File.action/Contents" } ] }, { "value": 96, "name": "CreateArchive.action", "path": "Automator/CreateArchive.action", "children": [ { "value": 96, "name": "Contents", "path": "Automator/CreateArchive.action/Contents" } ] }, { "value": 412, "name": "CreateBanner Image from Text.action", "path": "Automator/CreateBanner Image from Text.action", "children": [ { "value": 412, "name": "Contents", "path": "Automator/CreateBanner Image from Text.action/Contents" } ] }, { "value": 392, "name": "CreatePackage.action", "path": "Automator/CreatePackage.action", "children": [ { "value": 392, "name": "Contents", "path": "Automator/CreatePackage.action/Contents" } ] }, { "value": 208, "name": "CreateThumbnail Images.action", "path": "Automator/CreateThumbnail Images.action", "children": [ { "value": 208, "name": "Contents", "path": "Automator/CreateThumbnail Images.action/Contents" } ] }, { "value": 712, "name": "CropImages.action", "path": "Automator/CropImages.action", "children": [ { "value": 712, "name": "Contents", "path": "Automator/CropImages.action/Contents" } ] }, { "value": 8, "name": "CVSAdd.action", "path": "Automator/CVSAdd.action", "children": [ { "value": 8, "name": "Contents", "path": "Automator/CVSAdd.action/Contents" } ] }, { "value": 24, "name": "CVSCheckout.action", "path": "Automator/CVSCheckout.action", "children": [ { "value": 24, "name": "Contents", "path": "Automator/CVSCheckout.action/Contents" } ] }, { "value": 24, "name": "CVSCommit.action", "path": "Automator/CVSCommit.action", "children": [ { "value": 24, "name": "Contents", "path": "Automator/CVSCommit.action/Contents" } ] }, { "value": 276, "name": "CVSUpdate.action", "path": "Automator/CVSUpdate.action", "children": [ { "value": 276, "name": "Contents", "path": "Automator/CVSUpdate.action/Contents" } ] }, { "value": 0, "name": "DeactivateFonts.action", "path": "Automator/DeactivateFonts.action", "children": [ { "value": 0, "name": "Contents", "path": "Automator/DeactivateFonts.action/Contents" } ] }, { "value": 12, "name": "DeleteAll iPod Notes.action", "path": "Automator/DeleteAll iPod Notes.action", "children": [ { "value": 12, "name": "Contents", "path": "Automator/DeleteAll iPod Notes.action/Contents" } ] }, { "value": 32, "name": "DeleteCalendar Events.action", "path": "Automator/DeleteCalendar Events.action", "children": [ { "value": 32, "name": "Contents", "path": "Automator/DeleteCalendar Events.action/Contents" } ] }, { "value": 8, "name": "DeleteCalendar Items.action", "path": "Automator/DeleteCalendar Items.action", "children": [ { "value": 8, "name": "Contents", "path": "Automator/DeleteCalendar Items.action/Contents" } ] }, { "value": 8, "name": "DeleteCalendars.action", "path": "Automator/DeleteCalendars.action", "children": [ { "value": 8, "name": "Contents", "path": "Automator/DeleteCalendars.action/Contents" } ] }, { "value": 8, "name": "DeleteReminders.action", "path": "Automator/DeleteReminders.action", "children": [ { "value": 8, "name": "Contents", "path": "Automator/DeleteReminders.action/Contents" } ] }, { "value": 12, "name": "DisplayMail Messages.action", "path": "Automator/DisplayMail Messages.action", "children": [ { "value": 12, "name": "Contents", "path": "Automator/DisplayMail Messages.action/Contents" } ] }, { "value": 16, "name": "DisplayNotification.action", "path": "Automator/DisplayNotification.action", "children": [ { "value": 16, "name": "Contents", "path": "Automator/DisplayNotification.action/Contents" } ] }, { "value": 8, "name": "DisplayWebpages 2.action", "path": "Automator/DisplayWebpages 2.action", "children": [ { "value": 8, "name": "Contents", "path": "Automator/DisplayWebpages 2.action/Contents" } ] }, { "value": 12, "name": "DisplayWebpages.action", "path": "Automator/DisplayWebpages.action", "children": [ { "value": 12, "name": "Contents", "path": "Automator/DisplayWebpages.action/Contents" } ] }, { "value": 276, "name": "DownloadPictures.action", "path": "Automator/DownloadPictures.action", "children": [ { "value": 276, "name": "Contents", "path": "Automator/DownloadPictures.action/Contents" } ] }, { "value": 24, "name": "DownloadURLs.action", "path": "Automator/DownloadURLs.action", "children": [ { "value": 24, "name": "Contents", "path": "Automator/DownloadURLs.action/Contents" } ] }, { "value": 8, "name": "DuplicateFinder Items.action", "path": "Automator/DuplicateFinder Items.action", "children": [ { "value": 8, "name": "Contents", "path": "Automator/DuplicateFinder Items.action/Contents" } ] }, { "value": 8, "name": "EjectDisk.action", "path": "Automator/EjectDisk.action", "children": [ { "value": 8, "name": "Contents", "path": "Automator/EjectDisk.action/Contents" } ] }, { "value": 12, "name": "EjectiPod.action", "path": "Automator/EjectiPod.action", "children": [ { "value": 12, "name": "Contents", "path": "Automator/EjectiPod.action/Contents" } ] }, { "value": 276, "name": "Enableor Disable Tracks.action", "path": "Automator/Enableor Disable Tracks.action", "children": [ { "value": 276, "name": "Contents", "path": "Automator/Enableor Disable Tracks.action/Contents" } ] }, { "value": 464, "name": "EncodeMedia.action", "path": "Automator/EncodeMedia.action", "children": [ { "value": 464, "name": "Contents", "path": "Automator/EncodeMedia.action/Contents" } ] }, { "value": 80, "name": "Encodeto MPEG Audio.action", "path": "Automator/Encodeto MPEG Audio.action", "children": [ { "value": 80, "name": "Contents", "path": "Automator/Encodeto MPEG Audio.action/Contents" } ] }, { "value": 24, "name": "EncryptPDF Documents.action", "path": "Automator/EncryptPDF Documents.action", "children": [ { "value": 24, "name": "Contents", "path": "Automator/EncryptPDF Documents.action/Contents" } ] }, { "value": 12, "name": "EventSummary.action", "path": "Automator/EventSummary.action", "children": [ { "value": 12, "name": "Contents", "path": "Automator/EventSummary.action/Contents" } ] }, { "value": 24, "name": "ExecuteSQL.action", "path": "Automator/ExecuteSQL.action", "children": [ { "value": 24, "name": "Contents", "path": "Automator/ExecuteSQL.action/Contents" } ] }, { "value": 264, "name": "ExportFont Files.action", "path": "Automator/ExportFont Files.action", "children": [ { "value": 264, "name": "Contents", "path": "Automator/ExportFont Files.action/Contents" } ] }, { "value": 24, "name": "ExportMovies for iPod.action", "path": "Automator/ExportMovies for iPod.action", "children": [ { "value": 24, "name": "Contents", "path": "Automator/ExportMovies for iPod.action/Contents" } ] }, { "value": 44, "name": "ExportvCards.action", "path": "Automator/ExportvCards.action", "children": [ { "value": 44, "name": "Contents", "path": "Automator/ExportvCards.action/Contents" } ] }, { "value": 12, "name": "ExtractData from Text.action", "path": "Automator/ExtractData from Text.action", "children": [ { "value": 12, "name": "Contents", "path": "Automator/ExtractData from Text.action/Contents" } ] }, { "value": 24, "name": "ExtractOdd & Even Pages.action", "path": "Automator/ExtractOdd & Even Pages.action", "children": [ { "value": 24, "name": "Contents", "path": "Automator/ExtractOdd & Even Pages.action/Contents" } ] }, { "value": 276, "name": "ExtractPDF Annotations.action", "path": "Automator/ExtractPDF Annotations.action", "children": [ { "value": 276, "name": "Contents", "path": "Automator/ExtractPDF Annotations.action/Contents" } ] }, { "value": 2620, "name": "ExtractPDF Text.action", "path": "Automator/ExtractPDF Text.action", "children": [ { "value": 2620, "name": "Contents", "path": "Automator/ExtractPDF Text.action/Contents" } ] }, { "value": 44, "name": "FilterArticles.action", "path": "Automator/FilterArticles.action", "children": [ { "value": 44, "name": "Contents", "path": "Automator/FilterArticles.action/Contents" } ] }, { "value": 272, "name": "FilterCalendar Items 2.action", "path": "Automator/FilterCalendar Items 2.action", "children": [ { "value": 272, "name": "Contents", "path": "Automator/FilterCalendar Items 2.action/Contents" } ] }, { "value": 280, "name": "FilterContacts Items 2.action", "path": "Automator/FilterContacts Items 2.action", "children": [ { "value": 280, "name": "Contents", "path": "Automator/FilterContacts Items 2.action/Contents" } ] }, { "value": 280, "name": "FilterFinder Items 2.action", "path": "Automator/FilterFinder Items 2.action", "children": [ { "value": 280, "name": "Contents", "path": "Automator/FilterFinder Items 2.action/Contents" } ] }, { "value": 12, "name": "FilterFinder Items.action", "path": "Automator/FilterFinder Items.action", "children": [ { "value": 12, "name": "Contents", "path": "Automator/FilterFinder Items.action/Contents" } ] }, { "value": 264, "name": "FilterFonts by Font Type.action", "path": "Automator/FilterFonts by Font Type.action", "children": [ { "value": 264, "name": "Contents", "path": "Automator/FilterFonts by Font Type.action/Contents" } ] }, { "value": 280, "name": "FilteriPhoto Items 2.action", "path": "Automator/FilteriPhoto Items 2.action", "children": [ { "value": 280, "name": "Contents", "path": "Automator/FilteriPhoto Items 2.action/Contents" } ] }, { "value": 272, "name": "FilterItems.action", "path": "Automator/FilterItems.action", "children": [ { "value": 272, "name": "Contents", "path": "Automator/FilterItems.action/Contents" } ] }, { "value": 276, "name": "FilteriTunes Items 2.action", "path": "Automator/FilteriTunes Items 2.action", "children": [ { "value": 276, "name": "Contents", "path": "Automator/FilteriTunes Items 2.action/Contents" } ] }, { "value": 276, "name": "FilterMail Items 2.action", "path": "Automator/FilterMail Items 2.action", "children": [ { "value": 276, "name": "Contents", "path": "Automator/FilterMail Items 2.action/Contents" } ] }, { "value": 60, "name": "FilterParagraphs.action", "path": "Automator/FilterParagraphs.action", "children": [ { "value": 60, "name": "Contents", "path": "Automator/FilterParagraphs.action/Contents" } ] }, { "value": 276, "name": "FilterURLs 2.action", "path": "Automator/FilterURLs 2.action", "children": [ { "value": 276, "name": "Contents", "path": "Automator/FilterURLs 2.action/Contents" } ] }, { "value": 12, "name": "FilterURLs.action", "path": "Automator/FilterURLs.action", "children": [ { "value": 12, "name": "Contents", "path": "Automator/FilterURLs.action/Contents" } ] }, { "value": 272, "name": "FindCalendar Items 2.action", "path": "Automator/FindCalendar Items 2.action", "children": [ { "value": 272, "name": "Contents", "path": "Automator/FindCalendar Items 2.action/Contents" } ] }, { "value": 276, "name": "FindContacts Items 2.action", "path": "Automator/FindContacts Items 2.action", "children": [ { "value": 276, "name": "Contents", "path": "Automator/FindContacts Items 2.action/Contents" } ] }, { "value": 276, "name": "FindFinder Items 2.action", "path": "Automator/FindFinder Items 2.action", "children": [ { "value": 276, "name": "Contents", "path": "Automator/FindFinder Items 2.action/Contents" } ] }, { "value": 280, "name": "FindFinder Items.action", "path": "Automator/FindFinder Items.action", "children": [ { "value": 280, "name": "Contents", "path": "Automator/FindFinder Items.action/Contents" } ] }, { "value": 276, "name": "FindiPhoto Items 2.action", "path": "Automator/FindiPhoto Items 2.action", "children": [ { "value": 276, "name": "Contents", "path": "Automator/FindiPhoto Items 2.action/Contents" } ] }, { "value": 272, "name": "FindItems.action", "path": "Automator/FindItems.action", "children": [ { "value": 272, "name": "Contents", "path": "Automator/FindItems.action/Contents" } ] }, { "value": 276, "name": "FindiTunes Items 2.action", "path": "Automator/FindiTunes Items 2.action", "children": [ { "value": 276, "name": "Contents", "path": "Automator/FindiTunes Items 2.action/Contents" } ] }, { "value": 280, "name": "FindMail Items 2.action", "path": "Automator/FindMail Items 2.action", "children": [ { "value": 280, "name": "Contents", "path": "Automator/FindMail Items 2.action/Contents" } ] }, { "value": 84, "name": "FindPeople with Birthdays.action", "path": "Automator/FindPeople with Birthdays.action", "children": [ { "value": 84, "name": "Contents", "path": "Automator/FindPeople with Birthdays.action/Contents" } ] }, { "value": 0, "name": "Finder.definition", "path": "Automator/Finder.definition", "children": [ { "value": 0, "name": "Contents", "path": "Automator/Finder.definition/Contents" } ] }, { "value": 104, "name": "FlipImages.action", "path": "Automator/FlipImages.action", "children": [ { "value": 104, "name": "Contents", "path": "Automator/FlipImages.action/Contents" } ] }, { "value": 0, "name": "FontBook.definition", "path": "Automator/FontBook.definition", "children": [ { "value": 0, "name": "Contents", "path": "Automator/FontBook.definition/Contents" } ] }, { "value": 36, "name": "GetAttachments from Mail Messages.action", "path": "Automator/GetAttachments from Mail Messages.action", "children": [ { "value": 36, "name": "Contents", "path": "Automator/GetAttachments from Mail Messages.action/Contents" } ] }, { "value": 180, "name": "GetContact Information.action", "path": "Automator/GetContact Information.action", "children": [ { "value": 180, "name": "Contents", "path": "Automator/GetContact Information.action/Contents" } ] }, { "value": 8, "name": "GetContents of Clipboard.action", "path": "Automator/GetContents of Clipboard.action", "children": [ { "value": 8, "name": "Contents", "path": "Automator/GetContents of Clipboard.action/Contents" } ] }, { "value": 8, "name": "GetContents of TextEdit Document.action", "path": "Automator/GetContents of TextEdit Document.action", "children": [ { "value": 8, "name": "Contents", "path": "Automator/GetContents of TextEdit Document.action/Contents" } ] }, { "value": 12, "name": "GetContents of Webpages.action", "path": "Automator/GetContents of Webpages.action", "children": [ { "value": 12, "name": "Contents", "path": "Automator/GetContents of Webpages.action/Contents" } ] }, { "value": 8, "name": "GetCurrent Webpage from Safari.action", "path": "Automator/GetCurrent Webpage from Safari.action", "children": [ { "value": 8, "name": "Contents", "path": "Automator/GetCurrent Webpage from Safari.action/Contents" } ] }, { "value": 84, "name": "GetDefinition of Word.action", "path": "Automator/GetDefinition of Word.action", "children": [ { "value": 84, "name": "Contents", "path": "Automator/GetDefinition of Word.action/Contents" } ] }, { "value": 8, "name": "GetEnclosure URLs from Articles.action", "path": "Automator/GetEnclosure URLs from Articles.action", "children": [ { "value": 8, "name": "Contents", "path": "Automator/GetEnclosure URLs from Articles.action/Contents" } ] }, { "value": 12, "name": "GetFeeds from URLs.action", "path": "Automator/GetFeeds from URLs.action", "children": [ { "value": 12, "name": "Contents", "path": "Automator/GetFeeds from URLs.action/Contents" } ] }, { "value": 0, "name": "GetFiles for Fonts.action", "path": "Automator/GetFiles for Fonts.action", "children": [ { "value": 0, "name": "Contents", "path": "Automator/GetFiles for Fonts.action/Contents" } ] }, { "value": 12, "name": "GetFolder Contents.action", "path": "Automator/GetFolder Contents.action", "children": [ { "value": 12, "name": "Contents", "path": "Automator/GetFolder Contents.action/Contents" } ] }, { "value": 412, "name": "GetFont Info.action", "path": "Automator/GetFont Info.action", "children": [ { "value": 412, "name": "Contents", "path": "Automator/GetFont Info.action/Contents" } ] }, { "value": 0, "name": "GetFonts from Font Files.action", "path": "Automator/GetFonts from Font Files.action", "children": [ { "value": 0, "name": "Contents", "path": "Automator/GetFonts from Font Files.action/Contents" } ] }, { "value": 0, "name": "GetFonts of TextEdit Document.action", "path": "Automator/GetFonts of TextEdit Document.action", "children": [ { "value": 0, "name": "Contents", "path": "Automator/GetFonts of TextEdit Document.action/Contents" } ] }, { "value": 20, "name": "GetiDVD Slideshow Images.action", "path": "Automator/GetiDVD Slideshow Images.action", "children": [ { "value": 20, "name": "Contents", "path": "Automator/GetiDVD Slideshow Images.action/Contents" } ] }, { "value": 28, "name": "GetImage URLs from Articles.action", "path": "Automator/GetImage URLs from Articles.action", "children": [ { "value": 28, "name": "Contents", "path": "Automator/GetImage URLs from Articles.action/Contents" } ] }, { "value": 52, "name": "GetImage URLs from Webpage.action", "path": "Automator/GetImage URLs from Webpage.action", "children": [ { "value": 52, "name": "Contents", "path": "Automator/GetImage URLs from Webpage.action/Contents" } ] }, { "value": 12, "name": "GetLink URLs from Articles.action", "path": "Automator/GetLink URLs from Articles.action", "children": [ { "value": 12, "name": "Contents", "path": "Automator/GetLink URLs from Articles.action/Contents" } ] }, { "value": 24, "name": "GetLink URLs from Webpages.action", "path": "Automator/GetLink URLs from Webpages.action", "children": [ { "value": 24, "name": "Contents", "path": "Automator/GetLink URLs from Webpages.action/Contents" } ] }, { "value": 20, "name": "GetNew Mail.action", "path": "Automator/GetNew Mail.action", "children": [ { "value": 20, "name": "Contents", "path": "Automator/GetNew Mail.action/Contents" } ] }, { "value": 276, "name": "GetPDF Metadata.action", "path": "Automator/GetPDF Metadata.action", "children": [ { "value": 276, "name": "Contents", "path": "Automator/GetPDF Metadata.action/Contents" } ] }, { "value": 8, "name": "GetPermalinks of Articles.action", "path": "Automator/GetPermalinks of Articles.action", "children": [ { "value": 8, "name": "Contents", "path": "Automator/GetPermalinks of Articles.action/Contents" } ] }, { "value": 0, "name": "GetPostScript name of Font.action", "path": "Automator/GetPostScript name of Font.action", "children": [ { "value": 0, "name": "Contents", "path": "Automator/GetPostScript name of Font.action/Contents" } ] }, { "value": 44, "name": "GetSelected Contacts Items 2.action", "path": "Automator/GetSelected Contacts Items 2.action", "children": [ { "value": 44, "name": "Contents", "path": "Automator/GetSelected Contacts Items 2.action/Contents" } ] }, { "value": 8, "name": "GetSelected Finder Items 2.action", "path": "Automator/GetSelected Finder Items 2.action", "children": [ { "value": 8, "name": "Contents", "path": "Automator/GetSelected Finder Items 2.action/Contents" } ] }, { "value": 28, "name": "GetSelected iPhoto Items 2.action", "path": "Automator/GetSelected iPhoto Items 2.action", "children": [ { "value": 28, "name": "Contents", "path": "Automator/GetSelected iPhoto Items 2.action/Contents" } ] }, { "value": 8, "name": "GetSelected Items.action", "path": "Automator/GetSelected Items.action", "children": [ { "value": 8, "name": "Contents", "path": "Automator/GetSelected Items.action/Contents" } ] }, { "value": 28, "name": "GetSelected iTunes Items 2.action", "path": "Automator/GetSelected iTunes Items 2.action", "children": [ { "value": 28, "name": "Contents", "path": "Automator/GetSelected iTunes Items 2.action/Contents" } ] }, { "value": 28, "name": "GetSelected Mail Items 2.action", "path": "Automator/GetSelected Mail Items 2.action", "children": [ { "value": 28, "name": "Contents", "path": "Automator/GetSelected Mail Items 2.action/Contents" } ] }, { "value": 540, "name": "GetSpecified Calendar Items.action", "path": "Automator/GetSpecified Calendar Items.action", "children": [ { "value": 540, "name": "Contents", "path": "Automator/GetSpecified Calendar Items.action/Contents" } ] }, { "value": 292, "name": "GetSpecified Contacts Items.action", "path": "Automator/GetSpecified Contacts Items.action", "children": [ { "value": 292, "name": "Contents", "path": "Automator/GetSpecified Contacts Items.action/Contents" } ] }, { "value": 308, "name": "GetSpecified Finder Items.action", "path": "Automator/GetSpecified Finder Items.action", "children": [ { "value": 308, "name": "Contents", "path": "Automator/GetSpecified Finder Items.action/Contents" } ] }, { "value": 288, "name": "GetSpecified iPhoto Items.action", "path": "Automator/GetSpecified iPhoto Items.action", "children": [ { "value": 288, "name": "Contents", "path": "Automator/GetSpecified iPhoto Items.action/Contents" } ] }, { "value": 288, "name": "GetSpecified iTunes Items.action", "path": "Automator/GetSpecified iTunes Items.action", "children": [ { "value": 288, "name": "Contents", "path": "Automator/GetSpecified iTunes Items.action/Contents" } ] }, { "value": 380, "name": "GetSpecified Mail Items.action", "path": "Automator/GetSpecified Mail Items.action", "children": [ { "value": 380, "name": "Contents", "path": "Automator/GetSpecified Mail Items.action/Contents" } ] }, { "value": 288, "name": "GetSpecified Movies.action", "path": "Automator/GetSpecified Movies.action", "children": [ { "value": 288, "name": "Contents", "path": "Automator/GetSpecified Movies.action/Contents" } ] }, { "value": 276, "name": "GetSpecified Servers.action", "path": "Automator/GetSpecified Servers.action", "children": [ { "value": 276, "name": "Contents", "path": "Automator/GetSpecified Servers.action/Contents" } ] }, { "value": 272, "name": "GetSpecified Text.action", "path": "Automator/GetSpecified Text.action", "children": [ { "value": 272, "name": "Contents", "path": "Automator/GetSpecified Text.action/Contents" } ] }, { "value": 288, "name": "GetSpecified URLs.action", "path": "Automator/GetSpecified URLs.action", "children": [ { "value": 288, "name": "Contents", "path": "Automator/GetSpecified URLs.action/Contents" } ] }, { "value": 8, "name": "GetText from Articles.action", "path": "Automator/GetText from Articles.action", "children": [ { "value": 8, "name": "Contents", "path": "Automator/GetText from Articles.action/Contents" } ] }, { "value": 40, "name": "GetText from Webpage.action", "path": "Automator/GetText from Webpage.action", "children": [ { "value": 40, "name": "Contents", "path": "Automator/GetText from Webpage.action/Contents" } ] }, { "value": 8, "name": "Getthe Current Song.action", "path": "Automator/Getthe Current Song.action", "children": [ { "value": 8, "name": "Contents", "path": "Automator/Getthe Current Song.action/Contents" } ] }, { "value": 36, "name": "GetValue of Variable.action", "path": "Automator/GetValue of Variable.action", "children": [ { "value": 36, "name": "Contents", "path": "Automator/GetValue of Variable.action/Contents" } ] }, { "value": 280, "name": "GroupMailer.action", "path": "Automator/GroupMailer.action", "children": [ { "value": 280, "name": "Contents", "path": "Automator/GroupMailer.action/Contents" } ] }, { "value": 8, "name": "HideAll Applications.action", "path": "Automator/HideAll Applications.action", "children": [ { "value": 8, "name": "Contents", "path": "Automator/HideAll Applications.action/Contents" } ] }, { "value": 12, "name": "HintMovies.action", "path": "Automator/HintMovies.action", "children": [ { "value": 12, "name": "Contents", "path": "Automator/HintMovies.action/Contents" } ] }, { "value": 0, "name": "iCal.definition", "path": "Automator/iCal.definition", "children": [ { "value": 0, "name": "Contents", "path": "Automator/iCal.definition/Contents" } ] }, { "value": 44, "name": "ImportAudio Files.action", "path": "Automator/ImportAudio Files.action", "children": [ { "value": 44, "name": "Contents", "path": "Automator/ImportAudio Files.action/Contents" } ] }, { "value": 28, "name": "ImportFiles into iPhoto.action", "path": "Automator/ImportFiles into iPhoto.action", "children": [ { "value": 28, "name": "Contents", "path": "Automator/ImportFiles into iPhoto.action/Contents" } ] }, { "value": 24, "name": "ImportFiles into iTunes.action", "path": "Automator/ImportFiles into iTunes.action", "children": [ { "value": 24, "name": "Contents", "path": "Automator/ImportFiles into iTunes.action/Contents" } ] }, { "value": 256, "name": "InitiateRemote Broadcast.action", "path": "Automator/InitiateRemote Broadcast.action", "children": [ { "value": 256, "name": "Contents", "path": "Automator/InitiateRemote Broadcast.action/Contents" } ] }, { "value": 0, "name": "iPhoto.definition", "path": "Automator/iPhoto.definition", "children": [ { "value": 0, "name": "Contents", "path": "Automator/iPhoto.definition/Contents" } ] }, { "value": 0, "name": "iTunes.definition", "path": "Automator/iTunes.definition", "children": [ { "value": 0, "name": "Contents", "path": "Automator/iTunes.definition/Contents" } ] }, { "value": 24, "name": "LabelFinder Items.action", "path": "Automator/LabelFinder Items.action", "children": [ { "value": 24, "name": "Contents", "path": "Automator/LabelFinder Items.action/Contents" } ] }, { "value": 8, "name": "LaunchApplication.action", "path": "Automator/LaunchApplication.action", "children": [ { "value": 8, "name": "Contents", "path": "Automator/LaunchApplication.action/Contents" } ] }, { "value": 24, "name": "Loop.action", "path": "Automator/Loop.action", "children": [ { "value": 24, "name": "Contents", "path": "Automator/Loop.action/Contents" } ] }, { "value": 0, "name": "Mail.definition", "path": "Automator/Mail.definition", "children": [ { "value": 0, "name": "Contents", "path": "Automator/Mail.definition/Contents" } ] }, { "value": 16, "name": "MarkArticles.action", "path": "Automator/MarkArticles.action", "children": [ { "value": 16, "name": "Contents", "path": "Automator/MarkArticles.action/Contents" } ] }, { "value": 12, "name": "MountDisk Image.action", "path": "Automator/MountDisk Image.action", "children": [ { "value": 12, "name": "Contents", "path": "Automator/MountDisk Image.action/Contents" } ] }, { "value": 12, "name": "MoveFinder Items to Trash.action", "path": "Automator/MoveFinder Items to Trash.action", "children": [ { "value": 12, "name": "Contents", "path": "Automator/MoveFinder Items to Trash.action/Contents" } ] }, { "value": 28, "name": "MoveFinder Items.action", "path": "Automator/MoveFinder Items.action", "children": [ { "value": 28, "name": "Contents", "path": "Automator/MoveFinder Items.action/Contents" } ] }, { "value": 108, "name": "NewAliases.action", "path": "Automator/NewAliases.action", "children": [ { "value": 108, "name": "Contents", "path": "Automator/NewAliases.action/Contents" } ] }, { "value": 0, "name": "NewAudio Capture.action", "path": "Automator/NewAudio Capture.action", "children": [ { "value": 0, "name": "Contents", "path": "Automator/NewAudio Capture.action/Contents" } ] }, { "value": 676, "name": "NewCalendar Events Leopard.action", "path": "Automator/NewCalendar Events Leopard.action", "children": [ { "value": 676, "name": "Contents", "path": "Automator/NewCalendar Events Leopard.action/Contents" } ] }, { "value": 24, "name": "NewCalendar.action", "path": "Automator/NewCalendar.action", "children": [ { "value": 24, "name": "Contents", "path": "Automator/NewCalendar.action/Contents" } ] }, { "value": 64, "name": "NewDisk Image.action", "path": "Automator/NewDisk Image.action", "children": [ { "value": 64, "name": "Contents", "path": "Automator/NewDisk Image.action/Contents" } ] }, { "value": 20, "name": "NewFolder.action", "path": "Automator/NewFolder.action", "children": [ { "value": 20, "name": "Contents", "path": "Automator/NewFolder.action/Contents" } ] }, { "value": 20, "name": "NewiDVD Menu.action", "path": "Automator/NewiDVD Menu.action", "children": [ { "value": 20, "name": "Contents", "path": "Automator/NewiDVD Menu.action/Contents" } ] }, { "value": 20, "name": "NewiDVD Movie Sequence.action", "path": "Automator/NewiDVD Movie Sequence.action", "children": [ { "value": 20, "name": "Contents", "path": "Automator/NewiDVD Movie Sequence.action/Contents" } ] }, { "value": 64, "name": "NewiDVD Slideshow.action", "path": "Automator/NewiDVD Slideshow.action", "children": [ { "value": 64, "name": "Contents", "path": "Automator/NewiDVD Slideshow.action/Contents" } ] }, { "value": 12, "name": "NewiPhoto Album.action", "path": "Automator/NewiPhoto Album.action", "children": [ { "value": 12, "name": "Contents", "path": "Automator/NewiPhoto Album.action/Contents" } ] }, { "value": 32, "name": "NewiPod Note.action", "path": "Automator/NewiPod Note.action", "children": [ { "value": 32, "name": "Contents", "path": "Automator/NewiPod Note.action/Contents" } ] }, { "value": 12, "name": "NewiTunes Playlist.action", "path": "Automator/NewiTunes Playlist.action", "children": [ { "value": 12, "name": "Contents", "path": "Automator/NewiTunes Playlist.action/Contents" } ] }, { "value": 576, "name": "NewMail Message.action", "path": "Automator/NewMail Message.action", "children": [ { "value": 576, "name": "Contents", "path": "Automator/NewMail Message.action/Contents" } ] }, { "value": 32, "name": "NewPDF Contact Sheet.action", "path": "Automator/NewPDF Contact Sheet.action", "children": [ { "value": 32, "name": "Contents", "path": "Automator/NewPDF Contact Sheet.action/Contents" } ] }, { "value": 4444, "name": "NewPDF from Images.action", "path": "Automator/NewPDF from Images.action", "children": [ { "value": 4444, "name": "Contents", "path": "Automator/NewPDF from Images.action/Contents" } ] }, { "value": 1976, "name": "NewQuickTime Slideshow.action", "path": "Automator/NewQuickTime Slideshow.action", "children": [ { "value": 1976, "name": "Contents", "path": "Automator/NewQuickTime Slideshow.action/Contents" } ] }, { "value": 808, "name": "NewReminders Item.action", "path": "Automator/NewReminders Item.action", "children": [ { "value": 808, "name": "Contents", "path": "Automator/NewReminders Item.action/Contents" } ] }, { "value": 0, "name": "NewScreen Capture.action", "path": "Automator/NewScreen Capture.action", "children": [ { "value": 0, "name": "Contents", "path": "Automator/NewScreen Capture.action/Contents" } ] }, { "value": 64, "name": "NewText File.action", "path": "Automator/NewText File.action", "children": [ { "value": 64, "name": "Contents", "path": "Automator/NewText File.action/Contents" } ] }, { "value": 8, "name": "NewTextEdit Document.action", "path": "Automator/NewTextEdit Document.action", "children": [ { "value": 8, "name": "Contents", "path": "Automator/NewTextEdit Document.action/Contents" } ] }, { "value": 0, "name": "NewVideo Capture.action", "path": "Automator/NewVideo Capture.action", "children": [ { "value": 0, "name": "Contents", "path": "Automator/NewVideo Capture.action/Contents" } ] }, { "value": 28, "name": "OpenFinder Items.action", "path": "Automator/OpenFinder Items.action", "children": [ { "value": 28, "name": "Contents", "path": "Automator/OpenFinder Items.action/Contents" } ] }, { "value": 12, "name": "OpenImages in Preview.action", "path": "Automator/OpenImages in Preview.action", "children": [ { "value": 12, "name": "Contents", "path": "Automator/OpenImages in Preview.action/Contents" } ] }, { "value": 12, "name": "OpenKeynote Presentations.action", "path": "Automator/OpenKeynote Presentations.action", "children": [ { "value": 12, "name": "Contents", "path": "Automator/OpenKeynote Presentations.action/Contents" } ] }, { "value": 60, "name": "PadImages.action", "path": "Automator/PadImages.action", "children": [ { "value": 60, "name": "Contents", "path": "Automator/PadImages.action/Contents" } ] }, { "value": 0, "name": "PauseCapture.action", "path": "Automator/PauseCapture.action", "children": [ { "value": 0, "name": "Contents", "path": "Automator/PauseCapture.action/Contents" } ] }, { "value": 8, "name": "PauseDVD Playback.action", "path": "Automator/PauseDVD Playback.action", "children": [ { "value": 8, "name": "Contents", "path": "Automator/PauseDVD Playback.action/Contents" } ] }, { "value": 8, "name": "PauseiTunes.action", "path": "Automator/PauseiTunes.action", "children": [ { "value": 8, "name": "Contents", "path": "Automator/PauseiTunes.action/Contents" } ] }, { "value": 20, "name": "Pause.action", "path": "Automator/Pause.action", "children": [ { "value": 20, "name": "Contents", "path": "Automator/Pause.action/Contents" } ] }, { "value": 3696, "name": "PDFto Images.action", "path": "Automator/PDFto Images.action", "children": [ { "value": 3696, "name": "Contents", "path": "Automator/PDFto Images.action/Contents" } ] }, { "value": 276, "name": "PlayDVD.action", "path": "Automator/PlayDVD.action", "children": [ { "value": 276, "name": "Contents", "path": "Automator/PlayDVD.action/Contents" } ] }, { "value": 8, "name": "PlayiPhoto Slideshow.action", "path": "Automator/PlayiPhoto Slideshow.action", "children": [ { "value": 8, "name": "Contents", "path": "Automator/PlayiPhoto Slideshow.action/Contents" } ] }, { "value": 8, "name": "PlayiTunes Playlist.action", "path": "Automator/PlayiTunes Playlist.action", "children": [ { "value": 8, "name": "Contents", "path": "Automator/PlayiTunes Playlist.action/Contents" } ] }, { "value": 264, "name": "PlayMovies.action", "path": "Automator/PlayMovies.action", "children": [ { "value": 264, "name": "Contents", "path": "Automator/PlayMovies.action/Contents" } ] }, { "value": 20, "name": "PrintFinder Items.action", "path": "Automator/PrintFinder Items.action", "children": [ { "value": 20, "name": "Contents", "path": "Automator/PrintFinder Items.action/Contents" } ] }, { "value": 108, "name": "PrintImages.action", "path": "Automator/PrintImages.action", "children": [ { "value": 108, "name": "Contents", "path": "Automator/PrintImages.action/Contents" } ] }, { "value": 32, "name": "PrintKeynote Presentation.action", "path": "Automator/PrintKeynote Presentation.action", "children": [ { "value": 32, "name": "Contents", "path": "Automator/PrintKeynote Presentation.action/Contents" } ] }, { "value": 288, "name": "QuitAll Applications.action", "path": "Automator/QuitAll Applications.action", "children": [ { "value": 288, "name": "Contents", "path": "Automator/QuitAll Applications.action/Contents" } ] }, { "value": 24, "name": "QuitApplication.action", "path": "Automator/QuitApplication.action", "children": [ { "value": 24, "name": "Contents", "path": "Automator/QuitApplication.action/Contents" } ] }, { "value": 8, "name": "RemoveEmpty Playlists.action", "path": "Automator/RemoveEmpty Playlists.action", "children": [ { "value": 8, "name": "Contents", "path": "Automator/RemoveEmpty Playlists.action/Contents" } ] }, { "value": 0, "name": "RemoveFont Files.action", "path": "Automator/RemoveFont Files.action", "children": [ { "value": 0, "name": "Contents", "path": "Automator/RemoveFont Files.action/Contents" } ] }, { "value": 1092, "name": "RenameFinder Items.action", "path": "Automator/RenameFinder Items.action", "children": [ { "value": 1092, "name": "Contents", "path": "Automator/RenameFinder Items.action/Contents" } ] }, { "value": 16, "name": "RenamePDF Documents.action", "path": "Automator/RenamePDF Documents.action", "children": [ { "value": 16, "name": "Contents", "path": "Automator/RenamePDF Documents.action/Contents" } ] }, { "value": 32, "name": "RenderPDF Pages as Images.action", "path": "Automator/RenderPDF Pages as Images.action", "children": [ { "value": 32, "name": "Contents", "path": "Automator/RenderPDF Pages as Images.action/Contents" } ] }, { "value": 2888, "name": "RenderQuartz Compositions to Image Files.action", "path": "Automator/RenderQuartz Compositions to Image Files.action", "children": [ { "value": 2888, "name": "Contents", "path": "Automator/RenderQuartz Compositions to Image Files.action/Contents" } ] }, { "value": 0, "name": "ResumeCapture.action", "path": "Automator/ResumeCapture.action", "children": [ { "value": 0, "name": "Contents", "path": "Automator/ResumeCapture.action/Contents" } ] }, { "value": 8, "name": "ResumeDVD Playback.action", "path": "Automator/ResumeDVD Playback.action", "children": [ { "value": 8, "name": "Contents", "path": "Automator/ResumeDVD Playback.action/Contents" } ] }, { "value": 8, "name": "RevealFinder Items.action", "path": "Automator/RevealFinder Items.action", "children": [ { "value": 8, "name": "Contents", "path": "Automator/RevealFinder Items.action/Contents" } ] }, { "value": 428, "name": "ReviewPhotos.action", "path": "Automator/ReviewPhotos.action", "children": [ { "value": 428, "name": "Contents", "path": "Automator/ReviewPhotos.action/Contents" } ] }, { "value": 56, "name": "RotateImages.action", "path": "Automator/RotateImages.action", "children": [ { "value": 56, "name": "Contents", "path": "Automator/RotateImages.action/Contents" } ] }, { "value": 308, "name": "RunAppleScript.action", "path": "Automator/RunAppleScript.action", "children": [ { "value": 308, "name": "Contents", "path": "Automator/RunAppleScript.action/Contents" } ] }, { "value": 20, "name": "RunSelf-Test.action", "path": "Automator/RunSelf-Test.action", "children": [ { "value": 20, "name": "Contents", "path": "Automator/RunSelf-Test.action/Contents" } ] }, { "value": 316, "name": "RunShell Script.action", "path": "Automator/RunShell Script.action", "children": [ { "value": 316, "name": "Contents", "path": "Automator/RunShell Script.action/Contents" } ] }, { "value": 36, "name": "RunWeb Service.action", "path": "Automator/RunWeb Service.action", "children": [ { "value": 36, "name": "Contents", "path": "Automator/RunWeb Service.action/Contents" } ] }, { "value": 416, "name": "RunWorkflow.action", "path": "Automator/RunWorkflow.action", "children": [ { "value": 416, "name": "Contents", "path": "Automator/RunWorkflow.action/Contents" } ] }, { "value": 32, "name": "SaveImages from Web Content.action", "path": "Automator/SaveImages from Web Content.action", "children": [ { "value": 32, "name": "Contents", "path": "Automator/SaveImages from Web Content.action/Contents" } ] }, { "value": 20, "name": "ScaleImages.action", "path": "Automator/ScaleImages.action", "children": [ { "value": 20, "name": "Contents", "path": "Automator/ScaleImages.action/Contents" } ] }, { "value": 2112, "name": "SearchPDFs.action", "path": "Automator/SearchPDFs.action", "children": [ { "value": 2112, "name": "Contents", "path": "Automator/SearchPDFs.action/Contents" } ] }, { "value": 0, "name": "SelectFonts in Font Book.action", "path": "Automator/SelectFonts in Font Book.action", "children": [ { "value": 0, "name": "Contents", "path": "Automator/SelectFonts in Font Book.action/Contents" } ] }, { "value": 944, "name": "SendBirthday Greetings.action", "path": "Automator/SendBirthday Greetings.action", "children": [ { "value": 944, "name": "Contents", "path": "Automator/SendBirthday Greetings.action/Contents" } ] }, { "value": 8, "name": "SendOutgoing Messages.action", "path": "Automator/SendOutgoing Messages.action", "children": [ { "value": 8, "name": "Contents", "path": "Automator/SendOutgoing Messages.action/Contents" } ] }, { "value": 16, "name": "SetApplication for Files.action", "path": "Automator/SetApplication for Files.action", "children": [ { "value": 16, "name": "Contents", "path": "Automator/SetApplication for Files.action/Contents" } ] }, { "value": 340, "name": "SetComputer Volume.action", "path": "Automator/SetComputer Volume.action", "children": [ { "value": 340, "name": "Contents", "path": "Automator/SetComputer Volume.action/Contents" } ] }, { "value": 44, "name": "SetContents of TextEdit Document.action", "path": "Automator/SetContents of TextEdit Document.action", "children": [ { "value": 44, "name": "Contents", "path": "Automator/SetContents of TextEdit Document.action/Contents" } ] }, { "value": 8, "name": "SetDesktop Picture.action", "path": "Automator/SetDesktop Picture.action", "children": [ { "value": 8, "name": "Contents", "path": "Automator/SetDesktop Picture.action/Contents" } ] }, { "value": 820, "name": "SetFolder Views.action", "path": "Automator/SetFolder Views.action", "children": [ { "value": 820, "name": "Contents", "path": "Automator/SetFolder Views.action/Contents" } ] }, { "value": 8, "name": "SetiDVD Background Image.action", "path": "Automator/SetiDVD Background Image.action", "children": [ { "value": 8, "name": "Contents", "path": "Automator/SetiDVD Background Image.action/Contents" } ] }, { "value": 20, "name": "SetiDVD Button Face.action", "path": "Automator/SetiDVD Button Face.action", "children": [ { "value": 20, "name": "Contents", "path": "Automator/SetiDVD Button Face.action/Contents" } ] }, { "value": 112, "name": "SetInfo of iTunes Songs.action", "path": "Automator/SetInfo of iTunes Songs.action", "children": [ { "value": 112, "name": "Contents", "path": "Automator/SetInfo of iTunes Songs.action/Contents" } ] }, { "value": 408, "name": "SetiTunes Equalizer.action", "path": "Automator/SetiTunes Equalizer.action", "children": [ { "value": 408, "name": "Contents", "path": "Automator/SetiTunes Equalizer.action/Contents" } ] }, { "value": 32, "name": "SetiTunes Volume.action", "path": "Automator/SetiTunes Volume.action", "children": [ { "value": 32, "name": "Contents", "path": "Automator/SetiTunes Volume.action/Contents" } ] }, { "value": 280, "name": "SetMovie Annotations.action", "path": "Automator/SetMovie Annotations.action", "children": [ { "value": 280, "name": "Contents", "path": "Automator/SetMovie Annotations.action/Contents" } ] }, { "value": 256, "name": "SetMovie Playback Properties.action", "path": "Automator/SetMovie Playback Properties.action", "children": [ { "value": 256, "name": "Contents", "path": "Automator/SetMovie Playback Properties.action/Contents" } ] }, { "value": 0, "name": "SetMovie URL.action", "path": "Automator/SetMovie URL.action", "children": [ { "value": 0, "name": "Contents", "path": "Automator/SetMovie URL.action/Contents" } ] }, { "value": 408, "name": "SetOptions of iTunes Songs.action", "path": "Automator/SetOptions of iTunes Songs.action", "children": [ { "value": 408, "name": "Contents", "path": "Automator/SetOptions of iTunes Songs.action/Contents" } ] }, { "value": 408, "name": "SetPDF Metadata.action", "path": "Automator/SetPDF Metadata.action", "children": [ { "value": 408, "name": "Contents", "path": "Automator/SetPDF Metadata.action/Contents" } ] }, { "value": 8, "name": "SetSpotlight Comments for Finder Items.action", "path": "Automator/SetSpotlight Comments for Finder Items.action", "children": [ { "value": 8, "name": "Contents", "path": "Automator/SetSpotlight Comments for Finder Items.action/Contents" } ] }, { "value": 20, "name": "SetValue of Variable.action", "path": "Automator/SetValue of Variable.action", "children": [ { "value": 20, "name": "Contents", "path": "Automator/SetValue of Variable.action/Contents" } ] }, { "value": 8, "name": "ShowMain iDVD Menu.action", "path": "Automator/ShowMain iDVD Menu.action", "children": [ { "value": 8, "name": "Contents", "path": "Automator/ShowMain iDVD Menu.action/Contents" } ] }, { "value": 8, "name": "ShowNext Keynote Slide.action", "path": "Automator/ShowNext Keynote Slide.action", "children": [ { "value": 8, "name": "Contents", "path": "Automator/ShowNext Keynote Slide.action/Contents" } ] }, { "value": 8, "name": "ShowPrevious Keynote Slide.action", "path": "Automator/ShowPrevious Keynote Slide.action", "children": [ { "value": 8, "name": "Contents", "path": "Automator/ShowPrevious Keynote Slide.action/Contents" } ] }, { "value": 16, "name": "ShowSpecified Keynote Slide.action", "path": "Automator/ShowSpecified Keynote Slide.action", "children": [ { "value": 16, "name": "Contents", "path": "Automator/ShowSpecified Keynote Slide.action/Contents" } ] }, { "value": 36, "name": "SortFinder Items.action", "path": "Automator/SortFinder Items.action", "children": [ { "value": 36, "name": "Contents", "path": "Automator/SortFinder Items.action/Contents" } ] }, { "value": 32, "name": "SpeakText.action", "path": "Automator/SpeakText.action", "children": [ { "value": 32, "name": "Contents", "path": "Automator/SpeakText.action/Contents" } ] }, { "value": 20, "name": "SpotlightLeopard.action", "path": "Automator/SpotlightLeopard.action", "children": [ { "value": 20, "name": "Contents", "path": "Automator/SpotlightLeopard.action/Contents" } ] }, { "value": 0, "name": "StartCapture.action", "path": "Automator/StartCapture.action", "children": [ { "value": 0, "name": "Contents", "path": "Automator/StartCapture.action/Contents" } ] }, { "value": 8, "name": "StartiTunes Playing.action", "path": "Automator/StartiTunes Playing.action", "children": [ { "value": 8, "name": "Contents", "path": "Automator/StartiTunes Playing.action/Contents" } ] }, { "value": 8, "name": "StartiTunes Visuals.action", "path": "Automator/StartiTunes Visuals.action", "children": [ { "value": 8, "name": "Contents", "path": "Automator/StartiTunes Visuals.action/Contents" } ] }, { "value": 16, "name": "StartKeynote Slideshow.action", "path": "Automator/StartKeynote Slideshow.action", "children": [ { "value": 16, "name": "Contents", "path": "Automator/StartKeynote Slideshow.action/Contents" } ] }, { "value": 8, "name": "StartScreen Saver.action", "path": "Automator/StartScreen Saver.action", "children": [ { "value": 8, "name": "Contents", "path": "Automator/StartScreen Saver.action/Contents" } ] }, { "value": 0, "name": "StopCapture.action", "path": "Automator/StopCapture.action", "children": [ { "value": 0, "name": "Contents", "path": "Automator/StopCapture.action/Contents" } ] }, { "value": 8, "name": "StopDVD Playback.action", "path": "Automator/StopDVD Playback.action", "children": [ { "value": 8, "name": "Contents", "path": "Automator/StopDVD Playback.action/Contents" } ] }, { "value": 8, "name": "StopiTunes Visuals.action", "path": "Automator/StopiTunes Visuals.action", "children": [ { "value": 8, "name": "Contents", "path": "Automator/StopiTunes Visuals.action/Contents" } ] }, { "value": 8, "name": "StopKeynote Slideshow.action", "path": "Automator/StopKeynote Slideshow.action", "children": [ { "value": 8, "name": "Contents", "path": "Automator/StopKeynote Slideshow.action/Contents" } ] }, { "value": 28, "name": "SystemProfile.action", "path": "Automator/SystemProfile.action", "children": [ { "value": 28, "name": "Contents", "path": "Automator/SystemProfile.action/Contents" } ] }, { "value": 276, "name": "TakePicture.action", "path": "Automator/TakePicture.action", "children": [ { "value": 276, "name": "Contents", "path": "Automator/TakePicture.action/Contents" } ] }, { "value": 420, "name": "TakeScreenshot.action", "path": "Automator/TakeScreenshot.action", "children": [ { "value": 420, "name": "Contents", "path": "Automator/TakeScreenshot.action/Contents" } ] }, { "value": 20, "name": "TakeVideo Snapshot.action", "path": "Automator/TakeVideo Snapshot.action", "children": [ { "value": 20, "name": "Contents", "path": "Automator/TakeVideo Snapshot.action/Contents" } ] }, { "value": 100, "name": "Textto Audio File.action", "path": "Automator/Textto Audio File.action", "children": [ { "value": 100, "name": "Contents", "path": "Automator/Textto Audio File.action/Contents" } ] }, { "value": 436, "name": "Textto EPUB File.action", "path": "Automator/Textto EPUB File.action", "children": [ { "value": 436, "name": "Contents", "path": "Automator/Textto EPUB File.action/Contents" } ] }, { "value": 8, "name": "UpdateiPod.action", "path": "Automator/UpdateiPod.action", "children": [ { "value": 8, "name": "Contents", "path": "Automator/UpdateiPod.action/Contents" } ] }, { "value": 264, "name": "ValidateFont Files.action", "path": "Automator/ValidateFont Files.action", "children": [ { "value": 264, "name": "Contents", "path": "Automator/ValidateFont Files.action/Contents" } ] }, { "value": 272, "name": "ViewResults.action", "path": "Automator/ViewResults.action", "children": [ { "value": 272, "name": "Contents", "path": "Automator/ViewResults.action/Contents" } ] }, { "value": 64, "name": "Waitfor User Action.action", "path": "Automator/Waitfor User Action.action", "children": [ { "value": 64, "name": "Contents", "path": "Automator/Waitfor User Action.action/Contents" } ] }, { "value": 456, "name": "WatchMe Do.action", "path": "Automator/WatchMe Do.action", "children": [ { "value": 456, "name": "Contents", "path": "Automator/WatchMe Do.action/Contents" } ] }, { "value": 72, "name": "WatermarkPDF Documents.action", "path": "Automator/WatermarkPDF Documents.action", "children": [ { "value": 72, "name": "Contents", "path": "Automator/WatermarkPDF Documents.action/Contents" } ] }, { "value": 80, "name": "WebsitePopup.action", "path": "Automator/WebsitePopup.action", "children": [ { "value": 80, "name": "Contents", "path": "Automator/WebsitePopup.action/Contents" } ] } ] }, { "value": 2868, "name": "BridgeSupport", "path": "BridgeSupport", "children": [ { "value": 0, "name": "include", "path": "BridgeSupport/include" }, { "value": 2840, "name": "ruby-2.0", "path": "BridgeSupport/ruby-2.0" } ] }, { "value": 21988, "name": "Caches", "path": "Caches", "children": [ { "value": 2296, "name": "com.apple.CVMS", "path": "Caches/com.apple.CVMS" }, { "value": 19048, "name": "com.apple.kext.caches", "path": "Caches/com.apple.kext.caches", "children": [ { "value": 12, "name": "Directories", "path": "Caches/com.apple.kext.caches/Directories" }, { "value": 19036, "name": "Startup", "path": "Caches/com.apple.kext.caches/Startup" } ] } ] }, { "value": 2252, "name": "ColorPickers", "path": "ColorPickers", "children": [ { "value": 288, "name": "NSColorPickerCrayon.colorPicker", "path": "ColorPickers/NSColorPickerCrayon.colorPicker", "children": [ { "value": 0, "name": "_CodeSignature", "path": "ColorPickers/NSColorPickerCrayon.colorPicker/_CodeSignature" }, { "value": 288, "name": "Resources", "path": "ColorPickers/NSColorPickerCrayon.colorPicker/Resources" } ] }, { "value": 524, "name": "NSColorPickerPageableNameList.colorPicker", "path": "ColorPickers/NSColorPickerPageableNameList.colorPicker", "children": [ { "value": 0, "name": "_CodeSignature", "path": "ColorPickers/NSColorPickerPageableNameList.colorPicker/_CodeSignature" }, { "value": 524, "name": "Resources", "path": "ColorPickers/NSColorPickerPageableNameList.colorPicker/Resources" } ] }, { "value": 848, "name": "NSColorPickerSliders.colorPicker", "path": "ColorPickers/NSColorPickerSliders.colorPicker", "children": [ { "value": 0, "name": "_CodeSignature", "path": "ColorPickers/NSColorPickerSliders.colorPicker/_CodeSignature" }, { "value": 848, "name": "Resources", "path": "ColorPickers/NSColorPickerSliders.colorPicker/Resources" } ] }, { "value": 532, "name": "NSColorPickerUser.colorPicker", "path": "ColorPickers/NSColorPickerUser.colorPicker", "children": [ { "value": 0, "name": "_CodeSignature", "path": "ColorPickers/NSColorPickerUser.colorPicker/_CodeSignature" }, { "value": 532, "name": "Resources", "path": "ColorPickers/NSColorPickerUser.colorPicker/Resources" } ] }, { "value": 60, "name": "NSColorPickerWheel.colorPicker", "path": "ColorPickers/NSColorPickerWheel.colorPicker", "children": [ { "value": 0, "name": "_CodeSignature", "path": "ColorPickers/NSColorPickerWheel.colorPicker/_CodeSignature" }, { "value": 60, "name": "Resources", "path": "ColorPickers/NSColorPickerWheel.colorPicker/Resources" } ] } ] }, { "value": 0, "name": "Colors", "path": "Colors", "children": [ { "value": 0, "name": "Apple.clr", "path": "Colors/Apple.clr", "children": [ { "value": 0, "name": "ar.lproj", "path": "Colors/Apple.clr/ar.lproj" }, { "value": 0, "name": "ca.lproj", "path": "Colors/Apple.clr/ca.lproj" }, { "value": 0, "name": "cs.lproj", "path": "Colors/Apple.clr/cs.lproj" }, { "value": 0, "name": "da.lproj", "path": "Colors/Apple.clr/da.lproj" }, { "value": 0, "name": "Dutch.lproj", "path": "Colors/Apple.clr/Dutch.lproj" }, { "value": 0, "name": "el.lproj", "path": "Colors/Apple.clr/el.lproj" }, { "value": 0, "name": "English.lproj", "path": "Colors/Apple.clr/English.lproj" }, { "value": 0, "name": "fi.lproj", "path": "Colors/Apple.clr/fi.lproj" }, { "value": 0, "name": "French.lproj", "path": "Colors/Apple.clr/French.lproj" }, { "value": 0, "name": "German.lproj", "path": "Colors/Apple.clr/German.lproj" }, { "value": 0, "name": "he.lproj", "path": "Colors/Apple.clr/he.lproj" }, { "value": 0, "name": "hr.lproj", "path": "Colors/Apple.clr/hr.lproj" }, { "value": 0, "name": "hu.lproj", "path": "Colors/Apple.clr/hu.lproj" }, { "value": 0, "name": "id.lproj", "path": "Colors/Apple.clr/id.lproj" }, { "value": 0, "name": "Italian.lproj", "path": "Colors/Apple.clr/Italian.lproj" }, { "value": 0, "name": "Japanese.lproj", "path": "Colors/Apple.clr/Japanese.lproj" }, { "value": 0, "name": "ko.lproj", "path": "Colors/Apple.clr/ko.lproj" }, { "value": 0, "name": "ms.lproj", "path": "Colors/Apple.clr/ms.lproj" }, { "value": 0, "name": "no.lproj", "path": "Colors/Apple.clr/no.lproj" }, { "value": 0, "name": "pl.lproj", "path": "Colors/Apple.clr/pl.lproj" }, { "value": 0, "name": "pt.lproj", "path": "Colors/Apple.clr/pt.lproj" }, { "value": 0, "name": "pt_PT.lproj", "path": "Colors/Apple.clr/pt_PT.lproj" }, { "value": 0, "name": "ro.lproj", "path": "Colors/Apple.clr/ro.lproj" }, { "value": 0, "name": "ru.lproj", "path": "Colors/Apple.clr/ru.lproj" }, { "value": 0, "name": "sk.lproj", "path": "Colors/Apple.clr/sk.lproj" }, { "value": 0, "name": "Spanish.lproj", "path": "Colors/Apple.clr/Spanish.lproj" }, { "value": 0, "name": "sv.lproj", "path": "Colors/Apple.clr/sv.lproj" }, { "value": 0, "name": "th.lproj", "path": "Colors/Apple.clr/th.lproj" }, { "value": 0, "name": "tr.lproj", "path": "Colors/Apple.clr/tr.lproj" }, { "value": 0, "name": "uk.lproj", "path": "Colors/Apple.clr/uk.lproj" }, { "value": 0, "name": "vi.lproj", "path": "Colors/Apple.clr/vi.lproj" }, { "value": 0, "name": "zh_CN.lproj", "path": "Colors/Apple.clr/zh_CN.lproj" }, { "value": 0, "name": "zh_TW.lproj", "path": "Colors/Apple.clr/zh_TW.lproj" } ] }, { "value": 0, "name": "Crayons.clr", "path": "Colors/Crayons.clr", "children": [ { "value": 0, "name": "ar.lproj", "path": "Colors/Crayons.clr/ar.lproj" }, { "value": 0, "name": "ca.lproj", "path": "Colors/Crayons.clr/ca.lproj" }, { "value": 0, "name": "cs.lproj", "path": "Colors/Crayons.clr/cs.lproj" }, { "value": 0, "name": "da.lproj", "path": "Colors/Crayons.clr/da.lproj" }, { "value": 0, "name": "Dutch.lproj", "path": "Colors/Crayons.clr/Dutch.lproj" }, { "value": 0, "name": "el.lproj", "path": "Colors/Crayons.clr/el.lproj" }, { "value": 0, "name": "English.lproj", "path": "Colors/Crayons.clr/English.lproj" }, { "value": 0, "name": "fi.lproj", "path": "Colors/Crayons.clr/fi.lproj" }, { "value": 0, "name": "French.lproj", "path": "Colors/Crayons.clr/French.lproj" }, { "value": 0, "name": "German.lproj", "path": "Colors/Crayons.clr/German.lproj" }, { "value": 0, "name": "he.lproj", "path": "Colors/Crayons.clr/he.lproj" }, { "value": 0, "name": "hr.lproj", "path": "Colors/Crayons.clr/hr.lproj" }, { "value": 0, "name": "hu.lproj", "path": "Colors/Crayons.clr/hu.lproj" }, { "value": 0, "name": "id.lproj", "path": "Colors/Crayons.clr/id.lproj" }, { "value": 0, "name": "Italian.lproj", "path": "Colors/Crayons.clr/Italian.lproj" }, { "value": 0, "name": "Japanese.lproj", "path": "Colors/Crayons.clr/Japanese.lproj" }, { "value": 0, "name": "ko.lproj", "path": "Colors/Crayons.clr/ko.lproj" }, { "value": 0, "name": "ms.lproj", "path": "Colors/Crayons.clr/ms.lproj" }, { "value": 0, "name": "no.lproj", "path": "Colors/Crayons.clr/no.lproj" }, { "value": 0, "name": "pl.lproj", "path": "Colors/Crayons.clr/pl.lproj" }, { "value": 0, "name": "pt.lproj", "path": "Colors/Crayons.clr/pt.lproj" }, { "value": 0, "name": "pt_PT.lproj", "path": "Colors/Crayons.clr/pt_PT.lproj" }, { "value": 0, "name": "ro.lproj", "path": "Colors/Crayons.clr/ro.lproj" }, { "value": 0, "name": "ru.lproj", "path": "Colors/Crayons.clr/ru.lproj" }, { "value": 0, "name": "sk.lproj", "path": "Colors/Crayons.clr/sk.lproj" }, { "value": 0, "name": "Spanish.lproj", "path": "Colors/Crayons.clr/Spanish.lproj" }, { "value": 0, "name": "sv.lproj", "path": "Colors/Crayons.clr/sv.lproj" }, { "value": 0, "name": "th.lproj", "path": "Colors/Crayons.clr/th.lproj" }, { "value": 0, "name": "tr.lproj", "path": "Colors/Crayons.clr/tr.lproj" }, { "value": 0, "name": "uk.lproj", "path": "Colors/Crayons.clr/uk.lproj" }, { "value": 0, "name": "vi.lproj", "path": "Colors/Crayons.clr/vi.lproj" }, { "value": 0, "name": "zh_CN.lproj", "path": "Colors/Crayons.clr/zh_CN.lproj" }, { "value": 0, "name": "zh_TW.lproj", "path": "Colors/Crayons.clr/zh_TW.lproj" } ] }, { "value": 0, "name": "System.clr", "path": "Colors/System.clr", "children": [ { "value": 0, "name": "ar.lproj", "path": "Colors/System.clr/ar.lproj" }, { "value": 0, "name": "ca.lproj", "path": "Colors/System.clr/ca.lproj" }, { "value": 0, "name": "cs.lproj", "path": "Colors/System.clr/cs.lproj" }, { "value": 0, "name": "da.lproj", "path": "Colors/System.clr/da.lproj" }, { "value": 0, "name": "Dutch.lproj", "path": "Colors/System.clr/Dutch.lproj" }, { "value": 0, "name": "el.lproj", "path": "Colors/System.clr/el.lproj" }, { "value": 0, "name": "English.lproj", "path": "Colors/System.clr/English.lproj" }, { "value": 0, "name": "fi.lproj", "path": "Colors/System.clr/fi.lproj" }, { "value": 0, "name": "French.lproj", "path": "Colors/System.clr/French.lproj" }, { "value": 0, "name": "German.lproj", "path": "Colors/System.clr/German.lproj" }, { "value": 0, "name": "he.lproj", "path": "Colors/System.clr/he.lproj" }, { "value": 0, "name": "hr.lproj", "path": "Colors/System.clr/hr.lproj" }, { "value": 0, "name": "hu.lproj", "path": "Colors/System.clr/hu.lproj" }, { "value": 0, "name": "id.lproj", "path": "Colors/System.clr/id.lproj" }, { "value": 0, "name": "Italian.lproj", "path": "Colors/System.clr/Italian.lproj" }, { "value": 0, "name": "Japanese.lproj", "path": "Colors/System.clr/Japanese.lproj" }, { "value": 0, "name": "ko.lproj", "path": "Colors/System.clr/ko.lproj" }, { "value": 0, "name": "ms.lproj", "path": "Colors/System.clr/ms.lproj" }, { "value": 0, "name": "no.lproj", "path": "Colors/System.clr/no.lproj" }, { "value": 0, "name": "pl.lproj", "path": "Colors/System.clr/pl.lproj" }, { "value": 0, "name": "pt.lproj", "path": "Colors/System.clr/pt.lproj" }, { "value": 0, "name": "pt_PT.lproj", "path": "Colors/System.clr/pt_PT.lproj" }, { "value": 0, "name": "ro.lproj", "path": "Colors/System.clr/ro.lproj" }, { "value": 0, "name": "ru.lproj", "path": "Colors/System.clr/ru.lproj" }, { "value": 0, "name": "sk.lproj", "path": "Colors/System.clr/sk.lproj" }, { "value": 0, "name": "Spanish.lproj", "path": "Colors/System.clr/Spanish.lproj" }, { "value": 0, "name": "sv.lproj", "path": "Colors/System.clr/sv.lproj" }, { "value": 0, "name": "th.lproj", "path": "Colors/System.clr/th.lproj" }, { "value": 0, "name": "tr.lproj", "path": "Colors/System.clr/tr.lproj" }, { "value": 0, "name": "uk.lproj", "path": "Colors/System.clr/uk.lproj" }, { "value": 0, "name": "vi.lproj", "path": "Colors/System.clr/vi.lproj" }, { "value": 0, "name": "zh_CN.lproj", "path": "Colors/System.clr/zh_CN.lproj" }, { "value": 0, "name": "zh_TW.lproj", "path": "Colors/System.clr/zh_TW.lproj" } ] } ] }, { "value": 2908, "name": "ColorSync", "path": "ColorSync", "children": [ { "value": 2868, "name": "Calibrators", "path": "ColorSync/Calibrators", "children": [ { "value": 2868, "name": "DisplayCalibrator.app", "path": "ColorSync/Calibrators/DisplayCalibrator.app" } ] }, { "value": 40, "name": "Profiles", "path": "ColorSync/Profiles" } ] }, { "value": 21772, "name": "Components", "path": "Components", "children": [ { "value": 416, "name": "AppleScript.component", "path": "Components/AppleScript.component", "children": [ { "value": 416, "name": "Contents", "path": "Components/AppleScript.component/Contents" } ] }, { "value": 2592, "name": "AudioCodecs.component", "path": "Components/AudioCodecs.component", "children": [ { "value": 2592, "name": "Contents", "path": "Components/AudioCodecs.component/Contents" } ] }, { "value": 92, "name": "AUSpeechSynthesis.component", "path": "Components/AUSpeechSynthesis.component", "children": [ { "value": 92, "name": "Contents", "path": "Components/AUSpeechSynthesis.component/Contents" } ] }, { "value": 18492, "name": "CoreAudio.component", "path": "Components/CoreAudio.component", "children": [ { "value": 18492, "name": "Contents", "path": "Components/CoreAudio.component/Contents" } ] }, { "value": 28, "name": "IOFWDVComponents.component", "path": "Components/IOFWDVComponents.component", "children": [ { "value": 28, "name": "Contents", "path": "Components/IOFWDVComponents.component/Contents" } ] }, { "value": 16, "name": "IOQTComponents.component", "path": "Components/IOQTComponents.component", "children": [ { "value": 16, "name": "Contents", "path": "Components/IOQTComponents.component/Contents" } ] }, { "value": 12, "name": "PDFImporter.component", "path": "Components/PDFImporter.component", "children": [ { "value": 12, "name": "Contents", "path": "Components/PDFImporter.component/Contents" } ] }, { "value": 120, "name": "SoundManagerComponents.component", "path": "Components/SoundManagerComponents.component", "children": [ { "value": 120, "name": "Contents", "path": "Components/SoundManagerComponents.component/Contents" } ] } ] }, { "value": 45728, "name": "Compositions", "path": "Compositions", "children": [ { "value": 0, "name": ".Localization.bundle", "path": "Compositions/.Localization.bundle", "children": [ { "value": 0, "name": "Contents", "path": "Compositions/.Localization.bundle/Contents" } ] } ] }, { "value": 409060, "name": "CoreServices", "path": "CoreServices", "children": [ { "value": 1152, "name": "AddPrinter.app", "path": "CoreServices/AddPrinter.app", "children": [ { "value": 1152, "name": "Contents", "path": "CoreServices/AddPrinter.app/Contents" } ] }, { "value": 72, "name": "AddressBookUrlForwarder.app", "path": "CoreServices/AddressBookUrlForwarder.app", "children": [ { "value": 72, "name": "Contents", "path": "CoreServices/AddressBookUrlForwarder.app/Contents" } ] }, { "value": 20, "name": "AirPlayUIAgent.app", "path": "CoreServices/AirPlayUIAgent.app", "children": [ { "value": 20, "name": "Contents", "path": "CoreServices/AirPlayUIAgent.app/Contents" } ] }, { "value": 56, "name": "AirPortBase Station Agent.app", "path": "CoreServices/AirPortBase Station Agent.app", "children": [ { "value": 56, "name": "Contents", "path": "CoreServices/AirPortBase Station Agent.app/Contents" } ] }, { "value": 92, "name": "AOS.bundle", "path": "CoreServices/AOS.bundle", "children": [ { "value": 92, "name": "Contents", "path": "CoreServices/AOS.bundle/Contents" } ] }, { "value": 1564, "name": "AppDownloadLauncher.app", "path": "CoreServices/AppDownloadLauncher.app", "children": [ { "value": 1564, "name": "Contents", "path": "CoreServices/AppDownloadLauncher.app/Contents" } ] }, { "value": 376, "name": "Apple80211Agent.app", "path": "CoreServices/Apple80211Agent.app", "children": [ { "value": 376, "name": "Contents", "path": "CoreServices/Apple80211Agent.app/Contents" } ] }, { "value": 480, "name": "AppleFileServer.app", "path": "CoreServices/AppleFileServer.app", "children": [ { "value": 480, "name": "Contents", "path": "CoreServices/AppleFileServer.app/Contents" } ] }, { "value": 12, "name": "AppleGraphicsWarning.app", "path": "CoreServices/AppleGraphicsWarning.app", "children": [ { "value": 12, "name": "Contents", "path": "CoreServices/AppleGraphicsWarning.app/Contents" } ] }, { "value": 1752, "name": "AppleScriptUtility.app", "path": "CoreServices/AppleScriptUtility.app", "children": [ { "value": 1752, "name": "Contents", "path": "CoreServices/AppleScriptUtility.app/Contents" } ] }, { "value": 0, "name": "ApplicationFirewall.bundle", "path": "CoreServices/ApplicationFirewall.bundle", "children": [ { "value": 0, "name": "Contents", "path": "CoreServices/ApplicationFirewall.bundle/Contents" } ] }, { "value": 14808, "name": "Applications", "path": "CoreServices/Applications", "children": [ { "value": 1792, "name": "NetworkUtility.app", "path": "CoreServices/Applications/NetworkUtility.app" }, { "value": 7328, "name": "RAIDUtility.app", "path": "CoreServices/Applications/RAIDUtility.app" }, { "value": 5688, "name": "WirelessDiagnostics.app", "path": "CoreServices/Applications/WirelessDiagnostics.app" } ] }, { "value": 6620, "name": "ArchiveUtility.app", "path": "CoreServices/ArchiveUtility.app", "children": [ { "value": 6620, "name": "Contents", "path": "CoreServices/ArchiveUtility.app/Contents" } ] }, { "value": 24, "name": "AutomatorLauncher.app", "path": "CoreServices/AutomatorLauncher.app", "children": [ { "value": 24, "name": "Contents", "path": "CoreServices/AutomatorLauncher.app/Contents" } ] }, { "value": 584, "name": "AutomatorRunner.app", "path": "CoreServices/AutomatorRunner.app", "children": [ { "value": 584, "name": "Contents", "path": "CoreServices/AutomatorRunner.app/Contents" } ] }, { "value": 412, "name": "AVRCPAgent.app", "path": "CoreServices/AVRCPAgent.app", "children": [ { "value": 412, "name": "Contents", "path": "CoreServices/AVRCPAgent.app/Contents" } ] }, { "value": 1400, "name": "backupd.bundle", "path": "CoreServices/backupd.bundle", "children": [ { "value": 1400, "name": "Contents", "path": "CoreServices/backupd.bundle/Contents" } ] }, { "value": 2548, "name": "BluetoothSetup Assistant.app", "path": "CoreServices/BluetoothSetup Assistant.app", "children": [ { "value": 2548, "name": "Contents", "path": "CoreServices/BluetoothSetup Assistant.app/Contents" } ] }, { "value": 2588, "name": "BluetoothUIServer.app", "path": "CoreServices/BluetoothUIServer.app", "children": [ { "value": 2588, "name": "Contents", "path": "CoreServices/BluetoothUIServer.app/Contents" } ] }, { "value": 1288, "name": "CalendarFileHandler.app", "path": "CoreServices/CalendarFileHandler.app", "children": [ { "value": 1288, "name": "Contents", "path": "CoreServices/CalendarFileHandler.app/Contents" } ] }, { "value": 44, "name": "CaptiveNetwork Assistant.app", "path": "CoreServices/CaptiveNetwork Assistant.app", "children": [ { "value": 44, "name": "Contents", "path": "CoreServices/CaptiveNetwork Assistant.app/Contents" } ] }, { "value": 12, "name": "CarbonSpellChecker.bundle", "path": "CoreServices/CarbonSpellChecker.bundle", "children": [ { "value": 12, "name": "Contents", "path": "CoreServices/CarbonSpellChecker.bundle/Contents" } ] }, { "value": 27144, "name": "CertificateAssistant.app", "path": "CoreServices/CertificateAssistant.app", "children": [ { "value": 27144, "name": "Contents", "path": "CoreServices/CertificateAssistant.app/Contents" } ] }, { "value": 28, "name": "CommonCocoaPanels.bundle", "path": "CoreServices/CommonCocoaPanels.bundle", "children": [ { "value": 28, "name": "Contents", "path": "CoreServices/CommonCocoaPanels.bundle/Contents" } ] }, { "value": 676, "name": "CoreLocationAgent.app", "path": "CoreServices/CoreLocationAgent.app", "children": [ { "value": 676, "name": "Contents", "path": "CoreServices/CoreLocationAgent.app/Contents" } ] }, { "value": 164, "name": "CoreServicesUIAgent.app", "path": "CoreServices/CoreServicesUIAgent.app", "children": [ { "value": 164, "name": "Contents", "path": "CoreServices/CoreServicesUIAgent.app/Contents" } ] }, { "value": 171300, "name": "CoreTypes.bundle", "path": "CoreServices/CoreTypes.bundle", "children": [ { "value": 171300, "name": "Contents", "path": "CoreServices/CoreTypes.bundle/Contents" } ] }, { "value": 308, "name": "DatabaseEvents.app", "path": "CoreServices/DatabaseEvents.app", "children": [ { "value": 308, "name": "Contents", "path": "CoreServices/DatabaseEvents.app/Contents" } ] }, { "value": 6104, "name": "DirectoryUtility.app", "path": "CoreServices/DirectoryUtility.app", "children": [ { "value": 6104, "name": "Contents", "path": "CoreServices/DirectoryUtility.app/Contents" } ] }, { "value": 1840, "name": "DiskImageMounter.app", "path": "CoreServices/DiskImageMounter.app", "children": [ { "value": 1840, "name": "Contents", "path": "CoreServices/DiskImageMounter.app/Contents" } ] }, { "value": 8476, "name": "Dock.app", "path": "CoreServices/Dock.app", "children": [ { "value": 8476, "name": "Contents", "path": "CoreServices/Dock.app/Contents" } ] }, { "value": 696, "name": "Encodings", "path": "CoreServices/Encodings" }, { "value": 1024, "name": "ExpansionSlot Utility.app", "path": "CoreServices/ExpansionSlot Utility.app", "children": [ { "value": 1024, "name": "Contents", "path": "CoreServices/ExpansionSlot Utility.app/Contents" } ] }, { "value": 1732, "name": "FileSync.app", "path": "CoreServices/FileSync.app", "children": [ { "value": 1732, "name": "Contents", "path": "CoreServices/FileSync.app/Contents" } ] }, { "value": 572, "name": "FileSyncAgent.app", "path": "CoreServices/FileSyncAgent.app", "children": [ { "value": 572, "name": "Contents", "path": "CoreServices/FileSyncAgent.app/Contents" } ] }, { "value": 35168, "name": "Finder.app", "path": "CoreServices/Finder.app", "children": [ { "value": 35168, "name": "Contents", "path": "CoreServices/Finder.app/Contents" } ] }, { "value": 0, "name": "FirmwareUpdates", "path": "CoreServices/FirmwareUpdates" }, { "value": 336, "name": "FolderActions Dispatcher.app", "path": "CoreServices/FolderActions Dispatcher.app", "children": [ { "value": 336, "name": "Contents", "path": "CoreServices/FolderActions Dispatcher.app/Contents" } ] }, { "value": 1820, "name": "FolderActions Setup.app", "path": "CoreServices/FolderActions Setup.app", "children": [ { "value": 1820, "name": "Contents", "path": "CoreServices/FolderActions Setup.app/Contents" } ] }, { "value": 3268, "name": "HelpViewer.app", "path": "CoreServices/HelpViewer.app", "children": [ { "value": 3268, "name": "Contents", "path": "CoreServices/HelpViewer.app/Contents" } ] }, { "value": 352, "name": "ImageEvents.app", "path": "CoreServices/ImageEvents.app", "children": [ { "value": 352, "name": "Contents", "path": "CoreServices/ImageEvents.app/Contents" } ] }, { "value": 2012, "name": "InstallCommand Line Developer Tools.app", "path": "CoreServices/InstallCommand Line Developer Tools.app", "children": [ { "value": 2012, "name": "Contents", "path": "CoreServices/InstallCommand Line Developer Tools.app/Contents" } ] }, { "value": 108, "name": "Installin Progress.app", "path": "CoreServices/Installin Progress.app", "children": [ { "value": 108, "name": "Contents", "path": "CoreServices/Installin Progress.app/Contents" } ] }, { "value": 7444, "name": "Installer.app", "path": "CoreServices/Installer.app", "children": [ { "value": 7444, "name": "Contents", "path": "CoreServices/Installer.app/Contents" } ] }, { "value": 8, "name": "InstallerStatusNotifications.bundle", "path": "CoreServices/InstallerStatusNotifications.bundle", "children": [ { "value": 8, "name": "Contents", "path": "CoreServices/InstallerStatusNotifications.bundle/Contents" } ] }, { "value": 0, "name": "InternetSharing.bundle", "path": "CoreServices/InternetSharing.bundle", "children": [ { "value": 0, "name": "Resources", "path": "CoreServices/InternetSharing.bundle/Resources" } ] }, { "value": 244, "name": "JarLauncher.app", "path": "CoreServices/JarLauncher.app", "children": [ { "value": 244, "name": "Contents", "path": "CoreServices/JarLauncher.app/Contents" } ] }, { "value": 152, "name": "JavaWeb Start.app", "path": "CoreServices/JavaWeb Start.app", "children": [ { "value": 152, "name": "Contents", "path": "CoreServices/JavaWeb Start.app/Contents" } ] }, { "value": 12, "name": "KernelEventAgent.bundle", "path": "CoreServices/KernelEventAgent.bundle", "children": [ { "value": 0, "name": "Contents", "path": "CoreServices/KernelEventAgent.bundle/Contents" }, { "value": 12, "name": "FileSystemUIAgent.app", "path": "CoreServices/KernelEventAgent.bundle/FileSystemUIAgent.app" } ] }, { "value": 1016, "name": "KeyboardSetupAssistant.app", "path": "CoreServices/KeyboardSetupAssistant.app", "children": [ { "value": 1016, "name": "Contents", "path": "CoreServices/KeyboardSetupAssistant.app/Contents" } ] }, { "value": 840, "name": "KeychainCircle Notification.app", "path": "CoreServices/KeychainCircle Notification.app", "children": [ { "value": 840, "name": "Contents", "path": "CoreServices/KeychainCircle Notification.app/Contents" } ] }, { "value": 1448, "name": "LanguageChooser.app", "path": "CoreServices/LanguageChooser.app", "children": [ { "value": 1448, "name": "Contents", "path": "CoreServices/LanguageChooser.app/Contents" } ] }, { "value": 868, "name": "LocationMenu.app", "path": "CoreServices/LocationMenu.app", "children": [ { "value": 868, "name": "Contents", "path": "CoreServices/LocationMenu.app/Contents" } ] }, { "value": 8260, "name": "loginwindow.app", "path": "CoreServices/loginwindow.app", "children": [ { "value": 8260, "name": "Contents", "path": "CoreServices/loginwindow.app/Contents" } ] }, { "value": 3632, "name": "ManagedClient.app", "path": "CoreServices/ManagedClient.app", "children": [ { "value": 3632, "name": "Contents", "path": "CoreServices/ManagedClient.app/Contents" } ] }, { "value": 0, "name": "mDNSResponder.bundle", "path": "CoreServices/mDNSResponder.bundle", "children": [ { "value": 0, "name": "Resources", "path": "CoreServices/mDNSResponder.bundle/Resources" } ] }, { "value": 420, "name": "MemorySlot Utility.app", "path": "CoreServices/MemorySlot Utility.app", "children": [ { "value": 420, "name": "Contents", "path": "CoreServices/MemorySlot Utility.app/Contents" } ] }, { "value": 4272, "name": "MenuExtras", "path": "CoreServices/MenuExtras", "children": [ { "value": 416, "name": "AirPort.menu", "path": "CoreServices/MenuExtras/AirPort.menu" }, { "value": 788, "name": "Battery.menu", "path": "CoreServices/MenuExtras/Battery.menu" }, { "value": 112, "name": "Bluetooth.menu", "path": "CoreServices/MenuExtras/Bluetooth.menu" }, { "value": 12, "name": "Clock.menu", "path": "CoreServices/MenuExtras/Clock.menu" }, { "value": 84, "name": "Displays.menu", "path": "CoreServices/MenuExtras/Displays.menu" }, { "value": 32, "name": "Eject.menu", "path": "CoreServices/MenuExtras/Eject.menu" }, { "value": 24, "name": "ExpressCard.menu", "path": "CoreServices/MenuExtras/ExpressCard.menu" }, { "value": 76, "name": "Fax.menu", "path": "CoreServices/MenuExtras/Fax.menu" }, { "value": 112, "name": "HomeSync.menu", "path": "CoreServices/MenuExtras/HomeSync.menu" }, { "value": 84, "name": "iChat.menu", "path": "CoreServices/MenuExtras/iChat.menu" }, { "value": 28, "name": "Ink.menu", "path": "CoreServices/MenuExtras/Ink.menu" }, { "value": 104, "name": "IrDA.menu", "path": "CoreServices/MenuExtras/IrDA.menu" }, { "value": 68, "name": "PPP.menu", "path": "CoreServices/MenuExtras/PPP.menu" }, { "value": 24, "name": "PPPoE.menu", "path": "CoreServices/MenuExtras/PPPoE.menu" }, { "value": 60, "name": "RemoteDesktop.menu", "path": "CoreServices/MenuExtras/RemoteDesktop.menu" }, { "value": 48, "name": "Script Menu.menu", "path": "CoreServices/MenuExtras/Script Menu.menu" }, { "value": 832, "name": "TextInput.menu", "path": "CoreServices/MenuExtras/TextInput.menu" }, { "value": 144, "name": "TimeMachine.menu", "path": "CoreServices/MenuExtras/TimeMachine.menu" }, { "value": 40, "name": "UniversalAccess.menu", "path": "CoreServices/MenuExtras/UniversalAccess.menu" }, { "value": 108, "name": "User.menu", "path": "CoreServices/MenuExtras/User.menu" }, { "value": 316, "name": "Volume.menu", "path": "CoreServices/MenuExtras/Volume.menu" }, { "value": 48, "name": "VPN.menu", "path": "CoreServices/MenuExtras/VPN.menu" }, { "value": 712, "name": "WWAN.menu", "path": "CoreServices/MenuExtras/WWAN.menu" } ] }, { "value": 16, "name": "MLTEFile.bundle", "path": "CoreServices/MLTEFile.bundle", "children": [ { "value": 16, "name": "Contents", "path": "CoreServices/MLTEFile.bundle/Contents" } ] }, { "value": 616, "name": "MRTAgent.app", "path": "CoreServices/MRTAgent.app", "children": [ { "value": 616, "name": "Contents", "path": "CoreServices/MRTAgent.app/Contents" } ] }, { "value": 1540, "name": "NetAuthAgent.app", "path": "CoreServices/NetAuthAgent.app", "children": [ { "value": 1540, "name": "Contents", "path": "CoreServices/NetAuthAgent.app/Contents" } ] }, { "value": 3388, "name": "NetworkDiagnostics.app", "path": "CoreServices/NetworkDiagnostics.app", "children": [ { "value": 3388, "name": "Contents", "path": "CoreServices/NetworkDiagnostics.app/Contents" } ] }, { "value": 9384, "name": "NetworkSetup Assistant.app", "path": "CoreServices/NetworkSetup Assistant.app", "children": [ { "value": 9384, "name": "Contents", "path": "CoreServices/NetworkSetup Assistant.app/Contents" } ] }, { "value": 716, "name": "NotificationCenter.app", "path": "CoreServices/NotificationCenter.app", "children": [ { "value": 716, "name": "Contents", "path": "CoreServices/NotificationCenter.app/Contents" } ] }, { "value": 948, "name": "OBEXAgent.app", "path": "CoreServices/OBEXAgent.app", "children": [ { "value": 948, "name": "Contents", "path": "CoreServices/OBEXAgent.app/Contents" } ] }, { "value": 1596, "name": "ODSAgent.app", "path": "CoreServices/ODSAgent.app", "children": [ { "value": 1596, "name": "Contents", "path": "CoreServices/ODSAgent.app/Contents" } ] }, { "value": 492, "name": "PassViewer.app", "path": "CoreServices/PassViewer.app", "children": [ { "value": 492, "name": "Contents", "path": "CoreServices/PassViewer.app/Contents" } ] }, { "value": 0, "name": "PerformanceMetricLocalizations.bundle", "path": "CoreServices/PerformanceMetricLocalizations.bundle", "children": [ { "value": 0, "name": "Contents", "path": "CoreServices/PerformanceMetricLocalizations.bundle/Contents" } ] }, { "value": 88, "name": "powerd.bundle", "path": "CoreServices/powerd.bundle", "children": [ { "value": 0, "name": "_CodeSignature", "path": "CoreServices/powerd.bundle/_CodeSignature" }, { "value": 0, "name": "ar.lproj", "path": "CoreServices/powerd.bundle/ar.lproj" }, { "value": 0, "name": "ca.lproj", "path": "CoreServices/powerd.bundle/ca.lproj" }, { "value": 0, "name": "cs.lproj", "path": "CoreServices/powerd.bundle/cs.lproj" }, { "value": 0, "name": "da.lproj", "path": "CoreServices/powerd.bundle/da.lproj" }, { "value": 0, "name": "Dutch.lproj", "path": "CoreServices/powerd.bundle/Dutch.lproj" }, { "value": 0, "name": "el.lproj", "path": "CoreServices/powerd.bundle/el.lproj" }, { "value": 0, "name": "English.lproj", "path": "CoreServices/powerd.bundle/English.lproj" }, { "value": 0, "name": "fi.lproj", "path": "CoreServices/powerd.bundle/fi.lproj" }, { "value": 0, "name": "French.lproj", "path": "CoreServices/powerd.bundle/French.lproj" }, { "value": 0, "name": "German.lproj", "path": "CoreServices/powerd.bundle/German.lproj" }, { "value": 0, "name": "he.lproj", "path": "CoreServices/powerd.bundle/he.lproj" }, { "value": 0, "name": "hr.lproj", "path": "CoreServices/powerd.bundle/hr.lproj" }, { "value": 0, "name": "hu.lproj", "path": "CoreServices/powerd.bundle/hu.lproj" }, { "value": 0, "name": "id.lproj", "path": "CoreServices/powerd.bundle/id.lproj" }, { "value": 0, "name": "Italian.lproj", "path": "CoreServices/powerd.bundle/Italian.lproj" }, { "value": 0, "name": "Japanese.lproj", "path": "CoreServices/powerd.bundle/Japanese.lproj" }, { "value": 0, "name": "ko.lproj", "path": "CoreServices/powerd.bundle/ko.lproj" }, { "value": 0, "name": "ms.lproj", "path": "CoreServices/powerd.bundle/ms.lproj" }, { "value": 0, "name": "no.lproj", "path": "CoreServices/powerd.bundle/no.lproj" }, { "value": 0, "name": "pl.lproj", "path": "CoreServices/powerd.bundle/pl.lproj" }, { "value": 0, "name": "pt.lproj", "path": "CoreServices/powerd.bundle/pt.lproj" }, { "value": 0, "name": "pt_PT.lproj", "path": "CoreServices/powerd.bundle/pt_PT.lproj" }, { "value": 0, "name": "ro.lproj", "path": "CoreServices/powerd.bundle/ro.lproj" }, { "value": 0, "name": "ru.lproj", "path": "CoreServices/powerd.bundle/ru.lproj" }, { "value": 0, "name": "sk.lproj", "path": "CoreServices/powerd.bundle/sk.lproj" }, { "value": 0, "name": "Spanish.lproj", "path": "CoreServices/powerd.bundle/Spanish.lproj" }, { "value": 0, "name": "sv.lproj", "path": "CoreServices/powerd.bundle/sv.lproj" }, { "value": 0, "name": "th.lproj", "path": "CoreServices/powerd.bundle/th.lproj" }, { "value": 0, "name": "tr.lproj", "path": "CoreServices/powerd.bundle/tr.lproj" }, { "value": 0, "name": "uk.lproj", "path": "CoreServices/powerd.bundle/uk.lproj" }, { "value": 0, "name": "vi.lproj", "path": "CoreServices/powerd.bundle/vi.lproj" }, { "value": 0, "name": "zh_CN.lproj", "path": "CoreServices/powerd.bundle/zh_CN.lproj" }, { "value": 0, "name": "zh_TW.lproj", "path": "CoreServices/powerd.bundle/zh_TW.lproj" } ] }, { "value": 776, "name": "ProblemReporter.app", "path": "CoreServices/ProblemReporter.app", "children": [ { "value": 776, "name": "Contents", "path": "CoreServices/ProblemReporter.app/Contents" } ] }, { "value": 4748, "name": "RawCamera.bundle", "path": "CoreServices/RawCamera.bundle", "children": [ { "value": 4748, "name": "Contents", "path": "CoreServices/RawCamera.bundle/Contents" } ] }, { "value": 2112, "name": "RawCameraSupport.bundle", "path": "CoreServices/RawCameraSupport.bundle", "children": [ { "value": 2112, "name": "Contents", "path": "CoreServices/RawCameraSupport.bundle/Contents" } ] }, { "value": 24, "name": "rcd.app", "path": "CoreServices/rcd.app", "children": [ { "value": 24, "name": "Contents", "path": "CoreServices/rcd.app/Contents" } ] }, { "value": 156, "name": "RegisterPluginIMApp.app", "path": "CoreServices/RegisterPluginIMApp.app", "children": [ { "value": 156, "name": "Contents", "path": "CoreServices/RegisterPluginIMApp.app/Contents" } ] }, { "value": 3504, "name": "RemoteManagement", "path": "CoreServices/RemoteManagement", "children": [ { "value": 872, "name": "AppleVNCServer.bundle", "path": "CoreServices/RemoteManagement/AppleVNCServer.bundle" }, { "value": 2260, "name": "ARDAgent.app", "path": "CoreServices/RemoteManagement/ARDAgent.app" }, { "value": 144, "name": "ScreensharingAgent.bundle", "path": "CoreServices/RemoteManagement/ScreensharingAgent.bundle" }, { "value": 228, "name": "screensharingd.bundle", "path": "CoreServices/RemoteManagement/screensharingd.bundle" } ] }, { "value": 672, "name": "ReportPanic.app", "path": "CoreServices/ReportPanic.app", "children": [ { "value": 672, "name": "Contents", "path": "CoreServices/ReportPanic.app/Contents" } ] }, { "value": 0, "name": "Resources", "path": "CoreServices/Resources", "children": [ { "value": 0, "name": "ar.lproj", "path": "CoreServices/Resources/ar.lproj" }, { "value": 0, "name": "ca.lproj", "path": "CoreServices/Resources/ca.lproj" }, { "value": 0, "name": "cs.lproj", "path": "CoreServices/Resources/cs.lproj" }, { "value": 0, "name": "da.lproj", "path": "CoreServices/Resources/da.lproj" }, { "value": 0, "name": "Dutch.lproj", "path": "CoreServices/Resources/Dutch.lproj" }, { "value": 0, "name": "el.lproj", "path": "CoreServices/Resources/el.lproj" }, { "value": 0, "name": "English.lproj", "path": "CoreServices/Resources/English.lproj" }, { "value": 0, "name": "fi.lproj", "path": "CoreServices/Resources/fi.lproj" }, { "value": 0, "name": "French.lproj", "path": "CoreServices/Resources/French.lproj" }, { "value": 0, "name": "German.lproj", "path": "CoreServices/Resources/German.lproj" }, { "value": 0, "name": "he.lproj", "path": "CoreServices/Resources/he.lproj" }, { "value": 0, "name": "hr.lproj", "path": "CoreServices/Resources/hr.lproj" }, { "value": 0, "name": "hu.lproj", "path": "CoreServices/Resources/hu.lproj" }, { "value": 0, "name": "id.lproj", "path": "CoreServices/Resources/id.lproj" }, { "value": 0, "name": "Italian.lproj", "path": "CoreServices/Resources/Italian.lproj" }, { "value": 0, "name": "Japanese.lproj", "path": "CoreServices/Resources/Japanese.lproj" }, { "value": 0, "name": "ko.lproj", "path": "CoreServices/Resources/ko.lproj" }, { "value": 0, "name": "ms.lproj", "path": "CoreServices/Resources/ms.lproj" }, { "value": 0, "name": "no.lproj", "path": "CoreServices/Resources/no.lproj" }, { "value": 0, "name": "pl.lproj", "path": "CoreServices/Resources/pl.lproj" }, { "value": 0, "name": "Profiles", "path": "CoreServices/Resources/Profiles" }, { "value": 0, "name": "pt.lproj", "path": "CoreServices/Resources/pt.lproj" }, { "value": 0, "name": "pt_PT.lproj", "path": "CoreServices/Resources/pt_PT.lproj" }, { "value": 0, "name": "ro.lproj", "path": "CoreServices/Resources/ro.lproj" }, { "value": 0, "name": "ru.lproj", "path": "CoreServices/Resources/ru.lproj" }, { "value": 0, "name": "sk.lproj", "path": "CoreServices/Resources/sk.lproj" }, { "value": 0, "name": "Spanish.lproj", "path": "CoreServices/Resources/Spanish.lproj" }, { "value": 0, "name": "sv.lproj", "path": "CoreServices/Resources/sv.lproj" }, { "value": 0, "name": "th.lproj", "path": "CoreServices/Resources/th.lproj" }, { "value": 0, "name": "tr.lproj", "path": "CoreServices/Resources/tr.lproj" }, { "value": 0, "name": "uk.lproj", "path": "CoreServices/Resources/uk.lproj" }, { "value": 0, "name": "vi.lproj", "path": "CoreServices/Resources/vi.lproj" }, { "value": 0, "name": "zh_CN.lproj", "path": "CoreServices/Resources/zh_CN.lproj" }, { "value": 0, "name": "zh_TW.lproj", "path": "CoreServices/Resources/zh_TW.lproj" } ] }, { "value": 20, "name": "RFBEventHelper.bundle", "path": "CoreServices/RFBEventHelper.bundle", "children": [ { "value": 20, "name": "Contents", "path": "CoreServices/RFBEventHelper.bundle/Contents" } ] }, { "value": 3304, "name": "ScreenSharing.app", "path": "CoreServices/ScreenSharing.app", "children": [ { "value": 3304, "name": "Contents", "path": "CoreServices/ScreenSharing.app/Contents" } ] }, { "value": 244, "name": "Search.bundle", "path": "CoreServices/Search.bundle", "children": [ { "value": 244, "name": "Contents", "path": "CoreServices/Search.bundle/Contents" } ] }, { "value": 4128, "name": "SecurityAgentPlugins", "path": "CoreServices/SecurityAgentPlugins", "children": [ { "value": 304, "name": "DiskUnlock.bundle", "path": "CoreServices/SecurityAgentPlugins/DiskUnlock.bundle" }, { "value": 1192, "name": "FamilyControls.bundle", "path": "CoreServices/SecurityAgentPlugins/FamilyControls.bundle" }, { "value": 340, "name": "HomeDirMechanism.bundle", "path": "CoreServices/SecurityAgentPlugins/HomeDirMechanism.bundle" }, { "value": 1156, "name": "KerberosAgent.bundle", "path": "CoreServices/SecurityAgentPlugins/KerberosAgent.bundle" }, { "value": 276, "name": "loginKC.bundle", "path": "CoreServices/SecurityAgentPlugins/loginKC.bundle" }, { "value": 104, "name": "loginwindow.bundle", "path": "CoreServices/SecurityAgentPlugins/loginwindow.bundle" }, { "value": 384, "name": "MCXMechanism.bundle", "path": "CoreServices/SecurityAgentPlugins/MCXMechanism.bundle" }, { "value": 12, "name": "PKINITMechanism.bundle", "path": "CoreServices/SecurityAgentPlugins/PKINITMechanism.bundle" }, { "value": 360, "name": "RestartAuthorization.bundle", "path": "CoreServices/SecurityAgentPlugins/RestartAuthorization.bundle" } ] }, { "value": 328, "name": "SecurityFixer.app", "path": "CoreServices/SecurityFixer.app", "children": [ { "value": 328, "name": "Contents", "path": "CoreServices/SecurityFixer.app/Contents" } ] }, { "value": 28200, "name": "SetupAssistant.app", "path": "CoreServices/SetupAssistant.app", "children": [ { "value": 28200, "name": "Contents", "path": "CoreServices/SetupAssistant.app/Contents" } ] }, { "value": 164, "name": "SetupAssistantPlugins", "path": "CoreServices/SetupAssistantPlugins", "children": [ { "value": 8, "name": "AppStore.icdplugin", "path": "CoreServices/SetupAssistantPlugins/AppStore.icdplugin" }, { "value": 8, "name": "Calendar.flplugin", "path": "CoreServices/SetupAssistantPlugins/Calendar.flplugin" }, { "value": 8, "name": "FaceTime.icdplugin", "path": "CoreServices/SetupAssistantPlugins/FaceTime.icdplugin" }, { "value": 8, "name": "Fonts.flplugin", "path": "CoreServices/SetupAssistantPlugins/Fonts.flplugin" }, { "value": 16, "name": "GameCenter.icdplugin", "path": "CoreServices/SetupAssistantPlugins/GameCenter.icdplugin" }, { "value": 8, "name": "Helpd.flplugin", "path": "CoreServices/SetupAssistantPlugins/Helpd.flplugin" }, { "value": 8, "name": "iBooks.icdplugin", "path": "CoreServices/SetupAssistantPlugins/iBooks.icdplugin" }, { "value": 16, "name": "IdentityServices.icdplugin", "path": "CoreServices/SetupAssistantPlugins/IdentityServices.icdplugin" }, { "value": 8, "name": "iMessage.icdplugin", "path": "CoreServices/SetupAssistantPlugins/iMessage.icdplugin" }, { "value": 8, "name": "LaunchServices.flplugin", "path": "CoreServices/SetupAssistantPlugins/LaunchServices.flplugin" }, { "value": 12, "name": "Mail.flplugin", "path": "CoreServices/SetupAssistantPlugins/Mail.flplugin" }, { "value": 8, "name": "QuickLook.flplugin", "path": "CoreServices/SetupAssistantPlugins/QuickLook.flplugin" }, { "value": 8, "name": "Safari.flplugin", "path": "CoreServices/SetupAssistantPlugins/Safari.flplugin" }, { "value": 8, "name": "ServicesMenu.flplugin", "path": "CoreServices/SetupAssistantPlugins/ServicesMenu.flplugin" }, { "value": 8, "name": "SoftwareUpdateActions.flplugin", "path": "CoreServices/SetupAssistantPlugins/SoftwareUpdateActions.flplugin" }, { "value": 8, "name": "Spotlight.flplugin", "path": "CoreServices/SetupAssistantPlugins/Spotlight.flplugin" }, { "value": 16, "name": "UAU.flplugin", "path": "CoreServices/SetupAssistantPlugins/UAU.flplugin" } ] }, { "value": 48, "name": "SocialPushAgent.app", "path": "CoreServices/SocialPushAgent.app", "children": [ { "value": 48, "name": "Contents", "path": "CoreServices/SocialPushAgent.app/Contents" } ] }, { "value": 2196, "name": "SoftwareUpdate.app", "path": "CoreServices/SoftwareUpdate.app", "children": [ { "value": 2196, "name": "Contents", "path": "CoreServices/SoftwareUpdate.app/Contents" } ] }, { "value": 856, "name": "Spotlight.app", "path": "CoreServices/Spotlight.app", "children": [ { "value": 856, "name": "Contents", "path": "CoreServices/Spotlight.app/Contents" } ] }, { "value": 384, "name": "SystemEvents.app", "path": "CoreServices/SystemEvents.app", "children": [ { "value": 384, "name": "Contents", "path": "CoreServices/SystemEvents.app/Contents" } ] }, { "value": 2152, "name": "SystemImage Utility.app", "path": "CoreServices/SystemImage Utility.app", "children": [ { "value": 2152, "name": "Contents", "path": "CoreServices/SystemImage Utility.app/Contents" } ] }, { "value": 0, "name": "SystemFolderLocalizations", "path": "CoreServices/SystemFolderLocalizations", "children": [ { "value": 0, "name": "ar.lproj", "path": "CoreServices/SystemFolderLocalizations/ar.lproj" }, { "value": 0, "name": "ca.lproj", "path": "CoreServices/SystemFolderLocalizations/ca.lproj" }, { "value": 0, "name": "cs.lproj", "path": "CoreServices/SystemFolderLocalizations/cs.lproj" }, { "value": 0, "name": "da.lproj", "path": "CoreServices/SystemFolderLocalizations/da.lproj" }, { "value": 0, "name": "de.lproj", "path": "CoreServices/SystemFolderLocalizations/de.lproj" }, { "value": 0, "name": "el.lproj", "path": "CoreServices/SystemFolderLocalizations/el.lproj" }, { "value": 0, "name": "en.lproj", "path": "CoreServices/SystemFolderLocalizations/en.lproj" }, { "value": 0, "name": "es.lproj", "path": "CoreServices/SystemFolderLocalizations/es.lproj" }, { "value": 0, "name": "fi.lproj", "path": "CoreServices/SystemFolderLocalizations/fi.lproj" }, { "value": 0, "name": "fr.lproj", "path": "CoreServices/SystemFolderLocalizations/fr.lproj" }, { "value": 0, "name": "he.lproj", "path": "CoreServices/SystemFolderLocalizations/he.lproj" }, { "value": 0, "name": "hr.lproj", "path": "CoreServices/SystemFolderLocalizations/hr.lproj" }, { "value": 0, "name": "hu.lproj", "path": "CoreServices/SystemFolderLocalizations/hu.lproj" }, { "value": 0, "name": "id.lproj", "path": "CoreServices/SystemFolderLocalizations/id.lproj" }, { "value": 0, "name": "it.lproj", "path": "CoreServices/SystemFolderLocalizations/it.lproj" }, { "value": 0, "name": "ja.lproj", "path": "CoreServices/SystemFolderLocalizations/ja.lproj" }, { "value": 0, "name": "ko.lproj", "path": "CoreServices/SystemFolderLocalizations/ko.lproj" }, { "value": 0, "name": "ms.lproj", "path": "CoreServices/SystemFolderLocalizations/ms.lproj" }, { "value": 0, "name": "nl.lproj", "path": "CoreServices/SystemFolderLocalizations/nl.lproj" }, { "value": 0, "name": "no.lproj", "path": "CoreServices/SystemFolderLocalizations/no.lproj" }, { "value": 0, "name": "pl.lproj", "path": "CoreServices/SystemFolderLocalizations/pl.lproj" }, { "value": 0, "name": "pt.lproj", "path": "CoreServices/SystemFolderLocalizations/pt.lproj" }, { "value": 0, "name": "pt_PT.lproj", "path": "CoreServices/SystemFolderLocalizations/pt_PT.lproj" }, { "value": 0, "name": "ro.lproj", "path": "CoreServices/SystemFolderLocalizations/ro.lproj" }, { "value": 0, "name": "ru.lproj", "path": "CoreServices/SystemFolderLocalizations/ru.lproj" }, { "value": 0, "name": "sk.lproj", "path": "CoreServices/SystemFolderLocalizations/sk.lproj" }, { "value": 0, "name": "sv.lproj", "path": "CoreServices/SystemFolderLocalizations/sv.lproj" }, { "value": 0, "name": "th.lproj", "path": "CoreServices/SystemFolderLocalizations/th.lproj" }, { "value": 0, "name": "tr.lproj", "path": "CoreServices/SystemFolderLocalizations/tr.lproj" }, { "value": 0, "name": "uk.lproj", "path": "CoreServices/SystemFolderLocalizations/uk.lproj" }, { "value": 0, "name": "vi.lproj", "path": "CoreServices/SystemFolderLocalizations/vi.lproj" }, { "value": 0, "name": "zh_CN.lproj", "path": "CoreServices/SystemFolderLocalizations/zh_CN.lproj" }, { "value": 0, "name": "zh_TW.lproj", "path": "CoreServices/SystemFolderLocalizations/zh_TW.lproj" } ] }, { "value": 852, "name": "SystemUIServer.app", "path": "CoreServices/SystemUIServer.app", "children": [ { "value": 852, "name": "Contents", "path": "CoreServices/SystemUIServer.app/Contents" } ] }, { "value": 132, "name": "SystemVersion.bundle", "path": "CoreServices/SystemVersion.bundle", "children": [ { "value": 4, "name": "ar.lproj", "path": "CoreServices/SystemVersion.bundle/ar.lproj" }, { "value": 4, "name": "ca.lproj", "path": "CoreServices/SystemVersion.bundle/ca.lproj" }, { "value": 4, "name": "cs.lproj", "path": "CoreServices/SystemVersion.bundle/cs.lproj" }, { "value": 4, "name": "da.lproj", "path": "CoreServices/SystemVersion.bundle/da.lproj" }, { "value": 4, "name": "Dutch.lproj", "path": "CoreServices/SystemVersion.bundle/Dutch.lproj" }, { "value": 4, "name": "el.lproj", "path": "CoreServices/SystemVersion.bundle/el.lproj" }, { "value": 4, "name": "English.lproj", "path": "CoreServices/SystemVersion.bundle/English.lproj" }, { "value": 4, "name": "fi.lproj", "path": "CoreServices/SystemVersion.bundle/fi.lproj" }, { "value": 4, "name": "French.lproj", "path": "CoreServices/SystemVersion.bundle/French.lproj" }, { "value": 4, "name": "German.lproj", "path": "CoreServices/SystemVersion.bundle/German.lproj" }, { "value": 4, "name": "he.lproj", "path": "CoreServices/SystemVersion.bundle/he.lproj" }, { "value": 4, "name": "hr.lproj", "path": "CoreServices/SystemVersion.bundle/hr.lproj" }, { "value": 4, "name": "hu.lproj", "path": "CoreServices/SystemVersion.bundle/hu.lproj" }, { "value": 4, "name": "id.lproj", "path": "CoreServices/SystemVersion.bundle/id.lproj" }, { "value": 4, "name": "Italian.lproj", "path": "CoreServices/SystemVersion.bundle/Italian.lproj" }, { "value": 4, "name": "Japanese.lproj", "path": "CoreServices/SystemVersion.bundle/Japanese.lproj" }, { "value": 4, "name": "ko.lproj", "path": "CoreServices/SystemVersion.bundle/ko.lproj" }, { "value": 4, "name": "ms.lproj", "path": "CoreServices/SystemVersion.bundle/ms.lproj" }, { "value": 4, "name": "no.lproj", "path": "CoreServices/SystemVersion.bundle/no.lproj" }, { "value": 4, "name": "pl.lproj", "path": "CoreServices/SystemVersion.bundle/pl.lproj" }, { "value": 4, "name": "pt.lproj", "path": "CoreServices/SystemVersion.bundle/pt.lproj" }, { "value": 4, "name": "pt_PT.lproj", "path": "CoreServices/SystemVersion.bundle/pt_PT.lproj" }, { "value": 4, "name": "ro.lproj", "path": "CoreServices/SystemVersion.bundle/ro.lproj" }, { "value": 4, "name": "ru.lproj", "path": "CoreServices/SystemVersion.bundle/ru.lproj" }, { "value": 4, "name": "sk.lproj", "path": "CoreServices/SystemVersion.bundle/sk.lproj" }, { "value": 4, "name": "Spanish.lproj", "path": "CoreServices/SystemVersion.bundle/Spanish.lproj" }, { "value": 4, "name": "sv.lproj", "path": "CoreServices/SystemVersion.bundle/sv.lproj" }, { "value": 4, "name": "th.lproj", "path": "CoreServices/SystemVersion.bundle/th.lproj" }, { "value": 4, "name": "tr.lproj", "path": "CoreServices/SystemVersion.bundle/tr.lproj" }, { "value": 4, "name": "uk.lproj", "path": "CoreServices/SystemVersion.bundle/uk.lproj" }, { "value": 4, "name": "vi.lproj", "path": "CoreServices/SystemVersion.bundle/vi.lproj" }, { "value": 4, "name": "zh_CN.lproj", "path": "CoreServices/SystemVersion.bundle/zh_CN.lproj" }, { "value": 4, "name": "zh_TW.lproj", "path": "CoreServices/SystemVersion.bundle/zh_TW.lproj" } ] }, { "value": 3148, "name": "TicketViewer.app", "path": "CoreServices/TicketViewer.app", "children": [ { "value": 3148, "name": "Contents", "path": "CoreServices/TicketViewer.app/Contents" } ] }, { "value": 532, "name": "TypographyPanel.bundle", "path": "CoreServices/TypographyPanel.bundle", "children": [ { "value": 532, "name": "Contents", "path": "CoreServices/TypographyPanel.bundle/Contents" } ] }, { "value": 676, "name": "UniversalAccessControl.app", "path": "CoreServices/UniversalAccessControl.app", "children": [ { "value": 676, "name": "Contents", "path": "CoreServices/UniversalAccessControl.app/Contents" } ] }, { "value": 52, "name": "UnmountAssistantAgent.app", "path": "CoreServices/UnmountAssistantAgent.app", "children": [ { "value": 52, "name": "Contents", "path": "CoreServices/UnmountAssistantAgent.app/Contents" } ] }, { "value": 60, "name": "UserNotificationCenter.app", "path": "CoreServices/UserNotificationCenter.app", "children": [ { "value": 60, "name": "Contents", "path": "CoreServices/UserNotificationCenter.app/Contents" } ] }, { "value": 456, "name": "VoiceOver.app", "path": "CoreServices/VoiceOver.app", "children": [ { "value": 456, "name": "Contents", "path": "CoreServices/VoiceOver.app/Contents" } ] }, { "value": 44, "name": "XsanManagerDaemon.bundle", "path": "CoreServices/XsanManagerDaemon.bundle", "children": [ { "value": 44, "name": "Contents", "path": "CoreServices/XsanManagerDaemon.bundle/Contents" } ] }, { "value": 844, "name": "ZoomWindow.app", "path": "CoreServices/ZoomWindow.app", "children": [ { "value": 844, "name": "Contents", "path": "CoreServices/ZoomWindow.app/Contents" } ] } ] }, { "value": 72, "name": "DirectoryServices", "path": "DirectoryServices", "children": [ { "value": 0, "name": "DefaultLocalDB", "path": "DirectoryServices/DefaultLocalDB" }, { "value": 72, "name": "dscl", "path": "DirectoryServices/dscl", "children": [ { "value": 44, "name": "mcxcl.dsclext", "path": "DirectoryServices/dscl/mcxcl.dsclext" }, { "value": 28, "name": "mcxProfiles.dsclext", "path": "DirectoryServices/dscl/mcxProfiles.dsclext" } ] }, { "value": 0, "name": "Templates", "path": "DirectoryServices/Templates", "children": [ { "value": 0, "name": "LDAPv3", "path": "DirectoryServices/Templates/LDAPv3" } ] } ] }, { "value": 0, "name": "Displays", "path": "Displays", "children": [ { "value": 0, "name": "_CodeSignature", "path": "Displays/_CodeSignature" }, { "value": 0, "name": "Overrides", "path": "Displays/Overrides", "children": [ { "value": 0, "name": "Contents", "path": "Displays/Overrides/Contents" }, { "value": 0, "name": "DisplayVendorID-11a9", "path": "Displays/Overrides/DisplayVendorID-11a9" }, { "value": 0, "name": "DisplayVendorID-2283", "path": "Displays/Overrides/DisplayVendorID-2283" }, { "value": 0, "name": "DisplayVendorID-34a9", "path": "Displays/Overrides/DisplayVendorID-34a9" }, { "value": 0, "name": "DisplayVendorID-38a3", "path": "Displays/Overrides/DisplayVendorID-38a3" }, { "value": 0, "name": "DisplayVendorID-4c2d", "path": "Displays/Overrides/DisplayVendorID-4c2d" }, { "value": 0, "name": "DisplayVendorID-4dd9", "path": "Displays/Overrides/DisplayVendorID-4dd9" }, { "value": 0, "name": "DisplayVendorID-5a63", "path": "Displays/Overrides/DisplayVendorID-5a63" }, { "value": 0, "name": "DisplayVendorID-5b4", "path": "Displays/Overrides/DisplayVendorID-5b4" }, { "value": 0, "name": "DisplayVendorID-610", "path": "Displays/Overrides/DisplayVendorID-610" }, { "value": 0, "name": "DisplayVendorID-756e6b6e", "path": "Displays/Overrides/DisplayVendorID-756e6b6e" }, { "value": 0, "name": "DisplayVendorID-daf", "path": "Displays/Overrides/DisplayVendorID-daf" } ] } ] }, { "value": 16, "name": "DTDs", "path": "DTDs" }, { "value": 400116, "name": "Extensions", "path": "Extensions", "children": [ { "value": 0, "name": "10.5", "path": "Extensions/10.5" }, { "value": 0, "name": "10.6", "path": "Extensions/10.6" }, { "value": 116, "name": "Accusys6xxxx.kext", "path": "Extensions/Accusys6xxxx.kext", "children": [ { "value": 116, "name": "Contents", "path": "Extensions/Accusys6xxxx.kext/Contents" } ] }, { "value": 1236, "name": "acfs.kext", "path": "Extensions/acfs.kext", "children": [ { "value": 1236, "name": "Contents", "path": "Extensions/acfs.kext/Contents" } ] }, { "value": 32, "name": "acfsctl.kext", "path": "Extensions/acfsctl.kext", "children": [ { "value": 32, "name": "Contents", "path": "Extensions/acfsctl.kext/Contents" } ] }, { "value": 196, "name": "ALF.kext", "path": "Extensions/ALF.kext", "children": [ { "value": 196, "name": "Contents", "path": "Extensions/ALF.kext/Contents" } ] }, { "value": 1836, "name": "AMD2400Controller.kext", "path": "Extensions/AMD2400Controller.kext", "children": [ { "value": 1836, "name": "Contents", "path": "Extensions/AMD2400Controller.kext/Contents" } ] }, { "value": 1840, "name": "AMD2600Controller.kext", "path": "Extensions/AMD2600Controller.kext", "children": [ { "value": 1840, "name": "Contents", "path": "Extensions/AMD2600Controller.kext/Contents" } ] }, { "value": 1848, "name": "AMD3800Controller.kext", "path": "Extensions/AMD3800Controller.kext", "children": [ { "value": 1848, "name": "Contents", "path": "Extensions/AMD3800Controller.kext/Contents" } ] }, { "value": 1828, "name": "AMD4600Controller.kext", "path": "Extensions/AMD4600Controller.kext", "children": [ { "value": 1828, "name": "Contents", "path": "Extensions/AMD4600Controller.kext/Contents" } ] }, { "value": 1820, "name": "AMD4800Controller.kext", "path": "Extensions/AMD4800Controller.kext", "children": [ { "value": 1820, "name": "Contents", "path": "Extensions/AMD4800Controller.kext/Contents" } ] }, { "value": 2268, "name": "AMD5000Controller.kext", "path": "Extensions/AMD5000Controller.kext", "children": [ { "value": 2268, "name": "Contents", "path": "Extensions/AMD5000Controller.kext/Contents" } ] }, { "value": 2292, "name": "AMD6000Controller.kext", "path": "Extensions/AMD6000Controller.kext", "children": [ { "value": 2292, "name": "Contents", "path": "Extensions/AMD6000Controller.kext/Contents" } ] }, { "value": 2316, "name": "AMD7000Controller.kext", "path": "Extensions/AMD7000Controller.kext", "children": [ { "value": 2316, "name": "Contents", "path": "Extensions/AMD7000Controller.kext/Contents" } ] }, { "value": 164, "name": "AMDFramebuffer.kext", "path": "Extensions/AMDFramebuffer.kext", "children": [ { "value": 164, "name": "Contents", "path": "Extensions/AMDFramebuffer.kext/Contents" } ] }, { "value": 1572, "name": "AMDRadeonVADriver.bundle", "path": "Extensions/AMDRadeonVADriver.bundle", "children": [ { "value": 1572, "name": "Contents", "path": "Extensions/AMDRadeonVADriver.bundle/Contents" } ] }, { "value": 4756, "name": "AMDRadeonX3000.kext", "path": "Extensions/AMDRadeonX3000.kext", "children": [ { "value": 4756, "name": "Contents", "path": "Extensions/AMDRadeonX3000.kext/Contents" } ] }, { "value": 11224, "name": "AMDRadeonX3000GLDriver.bundle", "path": "Extensions/AMDRadeonX3000GLDriver.bundle", "children": [ { "value": 11224, "name": "Contents", "path": "Extensions/AMDRadeonX3000GLDriver.bundle/Contents" } ] }, { "value": 4532, "name": "AMDRadeonX4000.kext", "path": "Extensions/AMDRadeonX4000.kext", "children": [ { "value": 4532, "name": "Contents", "path": "Extensions/AMDRadeonX4000.kext/Contents" } ] }, { "value": 17144, "name": "AMDRadeonX4000GLDriver.bundle", "path": "Extensions/AMDRadeonX4000GLDriver.bundle", "children": [ { "value": 17144, "name": "Contents", "path": "Extensions/AMDRadeonX4000GLDriver.bundle/Contents" } ] }, { "value": 544, "name": "AMDSupport.kext", "path": "Extensions/AMDSupport.kext", "children": [ { "value": 544, "name": "Contents", "path": "Extensions/AMDSupport.kext/Contents" } ] }, { "value": 148, "name": "Apple16X50Serial.kext", "path": "Extensions/Apple16X50Serial.kext", "children": [ { "value": 148, "name": "Contents", "path": "Extensions/Apple16X50Serial.kext/Contents" } ] }, { "value": 60, "name": "Apple_iSight.kext", "path": "Extensions/Apple_iSight.kext", "children": [ { "value": 60, "name": "Contents", "path": "Extensions/Apple_iSight.kext/Contents" } ] }, { "value": 596, "name": "AppleACPIPlatform.kext", "path": "Extensions/AppleACPIPlatform.kext", "children": [ { "value": 596, "name": "Contents", "path": "Extensions/AppleACPIPlatform.kext/Contents" } ] }, { "value": 208, "name": "AppleAHCIPort.kext", "path": "Extensions/AppleAHCIPort.kext", "children": [ { "value": 208, "name": "Contents", "path": "Extensions/AppleAHCIPort.kext/Contents" } ] }, { "value": 56, "name": "AppleAPIC.kext", "path": "Extensions/AppleAPIC.kext", "children": [ { "value": 56, "name": "Contents", "path": "Extensions/AppleAPIC.kext/Contents" } ] }, { "value": 84, "name": "AppleBacklight.kext", "path": "Extensions/AppleBacklight.kext", "children": [ { "value": 84, "name": "Contents", "path": "Extensions/AppleBacklight.kext/Contents" } ] }, { "value": 56, "name": "AppleBacklightExpert.kext", "path": "Extensions/AppleBacklightExpert.kext", "children": [ { "value": 4, "name": "_CodeSignature", "path": "Extensions/AppleBacklightExpert.kext/_CodeSignature" } ] }, { "value": 180, "name": "AppleBluetoothMultitouch.kext", "path": "Extensions/AppleBluetoothMultitouch.kext", "children": [ { "value": 180, "name": "Contents", "path": "Extensions/AppleBluetoothMultitouch.kext/Contents" } ] }, { "value": 80, "name": "AppleBMC.kext", "path": "Extensions/AppleBMC.kext", "children": [ { "value": 80, "name": "Contents", "path": "Extensions/AppleBMC.kext/Contents" } ] }, { "value": 152, "name": "AppleCameraInterface.kext", "path": "Extensions/AppleCameraInterface.kext", "children": [ { "value": 152, "name": "Contents", "path": "Extensions/AppleCameraInterface.kext/Contents" } ] }, { "value": 152, "name": "AppleEFIRuntime.kext", "path": "Extensions/AppleEFIRuntime.kext", "children": [ { "value": 152, "name": "Contents", "path": "Extensions/AppleEFIRuntime.kext/Contents" } ] }, { "value": 88, "name": "AppleFDEKeyStore.kext", "path": "Extensions/AppleFDEKeyStore.kext", "children": [ { "value": 88, "name": "Contents", "path": "Extensions/AppleFDEKeyStore.kext/Contents" } ] }, { "value": 48, "name": "AppleFileSystemDriver.kext", "path": "Extensions/AppleFileSystemDriver.kext", "children": [ { "value": 48, "name": "Contents", "path": "Extensions/AppleFileSystemDriver.kext/Contents" } ] }, { "value": 56, "name": "AppleFSCompressionTypeDataless.kext", "path": "Extensions/AppleFSCompressionTypeDataless.kext", "children": [ { "value": 56, "name": "Contents", "path": "Extensions/AppleFSCompressionTypeDataless.kext/Contents" } ] }, { "value": 60, "name": "AppleFSCompressionTypeZlib.kext", "path": "Extensions/AppleFSCompressionTypeZlib.kext", "children": [ { "value": 60, "name": "Contents", "path": "Extensions/AppleFSCompressionTypeZlib.kext/Contents" } ] }, { "value": 628, "name": "AppleFWAudio.kext", "path": "Extensions/AppleFWAudio.kext", "children": [ { "value": 628, "name": "Contents", "path": "Extensions/AppleFWAudio.kext/Contents" } ] }, { "value": 396, "name": "AppleGraphicsControl.kext", "path": "Extensions/AppleGraphicsControl.kext", "children": [ { "value": 396, "name": "Contents", "path": "Extensions/AppleGraphicsControl.kext/Contents" } ] }, { "value": 276, "name": "AppleGraphicsPowerManagement.kext", "path": "Extensions/AppleGraphicsPowerManagement.kext", "children": [ { "value": 276, "name": "Contents", "path": "Extensions/AppleGraphicsPowerManagement.kext/Contents" } ] }, { "value": 3112, "name": "AppleHDA.kext", "path": "Extensions/AppleHDA.kext", "children": [ { "value": 3112, "name": "Contents", "path": "Extensions/AppleHDA.kext/Contents" } ] }, { "value": 488, "name": "AppleHIDKeyboard.kext", "path": "Extensions/AppleHIDKeyboard.kext", "children": [ { "value": 488, "name": "Contents", "path": "Extensions/AppleHIDKeyboard.kext/Contents" } ] }, { "value": 184, "name": "AppleHIDMouse.kext", "path": "Extensions/AppleHIDMouse.kext", "children": [ { "value": 184, "name": "Contents", "path": "Extensions/AppleHIDMouse.kext/Contents" } ] }, { "value": 52, "name": "AppleHPET.kext", "path": "Extensions/AppleHPET.kext", "children": [ { "value": 52, "name": "Contents", "path": "Extensions/AppleHPET.kext/Contents" } ] }, { "value": 64, "name": "AppleHSSPIHIDDriver.kext", "path": "Extensions/AppleHSSPIHIDDriver.kext", "children": [ { "value": 64, "name": "Contents", "path": "Extensions/AppleHSSPIHIDDriver.kext/Contents" } ] }, { "value": 144, "name": "AppleHSSPISupport.kext", "path": "Extensions/AppleHSSPISupport.kext", "children": [ { "value": 144, "name": "Contents", "path": "Extensions/AppleHSSPISupport.kext/Contents" } ] }, { "value": 64, "name": "AppleHWAccess.kext", "path": "Extensions/AppleHWAccess.kext", "children": [ { "value": 64, "name": "Contents", "path": "Extensions/AppleHWAccess.kext/Contents" } ] }, { "value": 72, "name": "AppleHWSensor.kext", "path": "Extensions/AppleHWSensor.kext", "children": [ { "value": 72, "name": "Contents", "path": "Extensions/AppleHWSensor.kext/Contents" } ] }, { "value": 244, "name": "AppleIntelCPUPowerManagement.kext", "path": "Extensions/AppleIntelCPUPowerManagement.kext", "children": [ { "value": 244, "name": "Contents", "path": "Extensions/AppleIntelCPUPowerManagement.kext/Contents" } ] }, { "value": 52, "name": "AppleIntelCPUPowerManagementClient.kext", "path": "Extensions/AppleIntelCPUPowerManagementClient.kext", "children": [ { "value": 52, "name": "Contents", "path": "Extensions/AppleIntelCPUPowerManagementClient.kext/Contents" } ] }, { "value": 480, "name": "AppleIntelFramebufferAzul.kext", "path": "Extensions/AppleIntelFramebufferAzul.kext", "children": [ { "value": 480, "name": "Contents", "path": "Extensions/AppleIntelFramebufferAzul.kext/Contents" } ] }, { "value": 492, "name": "AppleIntelFramebufferCapri.kext", "path": "Extensions/AppleIntelFramebufferCapri.kext", "children": [ { "value": 492, "name": "Contents", "path": "Extensions/AppleIntelFramebufferCapri.kext/Contents" } ] }, { "value": 604, "name": "AppleIntelHD3000Graphics.kext", "path": "Extensions/AppleIntelHD3000Graphics.kext", "children": [ { "value": 604, "name": "Contents", "path": "Extensions/AppleIntelHD3000Graphics.kext/Contents" } ] }, { "value": 64, "name": "AppleIntelHD3000GraphicsGA.plugin", "path": "Extensions/AppleIntelHD3000GraphicsGA.plugin", "children": [ { "value": 64, "name": "Contents", "path": "Extensions/AppleIntelHD3000GraphicsGA.plugin/Contents" } ] }, { "value": 9164, "name": "AppleIntelHD3000GraphicsGLDriver.bundle", "path": "Extensions/AppleIntelHD3000GraphicsGLDriver.bundle", "children": [ { "value": 9164, "name": "Contents", "path": "Extensions/AppleIntelHD3000GraphicsGLDriver.bundle/Contents" } ] }, { "value": 2520, "name": "AppleIntelHD3000GraphicsVADriver.bundle", "path": "Extensions/AppleIntelHD3000GraphicsVADriver.bundle", "children": [ { "value": 2520, "name": "Contents", "path": "Extensions/AppleIntelHD3000GraphicsVADriver.bundle/Contents" } ] }, { "value": 536, "name": "AppleIntelHD4000Graphics.kext", "path": "Extensions/AppleIntelHD4000Graphics.kext", "children": [ { "value": 536, "name": "Contents", "path": "Extensions/AppleIntelHD4000Graphics.kext/Contents" } ] }, { "value": 22996, "name": "AppleIntelHD4000GraphicsGLDriver.bundle", "path": "Extensions/AppleIntelHD4000GraphicsGLDriver.bundle", "children": [ { "value": 22996, "name": "Contents", "path": "Extensions/AppleIntelHD4000GraphicsGLDriver.bundle/Contents" } ] }, { "value": 3608, "name": "AppleIntelHD4000GraphicsVADriver.bundle", "path": "Extensions/AppleIntelHD4000GraphicsVADriver.bundle", "children": [ { "value": 3608, "name": "Contents", "path": "Extensions/AppleIntelHD4000GraphicsVADriver.bundle/Contents" } ] }, { "value": 564, "name": "AppleIntelHD5000Graphics.kext", "path": "Extensions/AppleIntelHD5000Graphics.kext", "children": [ { "value": 564, "name": "Contents", "path": "Extensions/AppleIntelHD5000Graphics.kext/Contents" } ] }, { "value": 20692, "name": "AppleIntelHD5000GraphicsGLDriver.bundle", "path": "Extensions/AppleIntelHD5000GraphicsGLDriver.bundle", "children": [ { "value": 20692, "name": "Contents", "path": "Extensions/AppleIntelHD5000GraphicsGLDriver.bundle/Contents" } ] }, { "value": 6120, "name": "AppleIntelHD5000GraphicsVADriver.bundle", "path": "Extensions/AppleIntelHD5000GraphicsVADriver.bundle", "children": [ { "value": 6120, "name": "Contents", "path": "Extensions/AppleIntelHD5000GraphicsVADriver.bundle/Contents" } ] }, { "value": 976, "name": "AppleIntelHDGraphics.kext", "path": "Extensions/AppleIntelHDGraphics.kext", "children": [ { "value": 976, "name": "Contents", "path": "Extensions/AppleIntelHDGraphics.kext/Contents" } ] }, { "value": 148, "name": "AppleIntelHDGraphicsFB.kext", "path": "Extensions/AppleIntelHDGraphicsFB.kext", "children": [ { "value": 148, "name": "Contents", "path": "Extensions/AppleIntelHDGraphicsFB.kext/Contents" } ] }, { "value": 64, "name": "AppleIntelHDGraphicsGA.plugin", "path": "Extensions/AppleIntelHDGraphicsGA.plugin", "children": [ { "value": 64, "name": "Contents", "path": "Extensions/AppleIntelHDGraphicsGA.plugin/Contents" } ] }, { "value": 9108, "name": "AppleIntelHDGraphicsGLDriver.bundle", "path": "Extensions/AppleIntelHDGraphicsGLDriver.bundle", "children": [ { "value": 9108, "name": "Contents", "path": "Extensions/AppleIntelHDGraphicsGLDriver.bundle/Contents" } ] }, { "value": 104, "name": "AppleIntelHDGraphicsVADriver.bundle", "path": "Extensions/AppleIntelHDGraphicsVADriver.bundle", "children": [ { "value": 104, "name": "Contents", "path": "Extensions/AppleIntelHDGraphicsVADriver.bundle/Contents" } ] }, { "value": 96, "name": "AppleIntelHSWVA.bundle", "path": "Extensions/AppleIntelHSWVA.bundle", "children": [ { "value": 96, "name": "Contents", "path": "Extensions/AppleIntelHSWVA.bundle/Contents" } ] }, { "value": 96, "name": "AppleIntelIVBVA.bundle", "path": "Extensions/AppleIntelIVBVA.bundle", "children": [ { "value": 96, "name": "Contents", "path": "Extensions/AppleIntelIVBVA.bundle/Contents" } ] }, { "value": 72, "name": "AppleIntelLpssDmac.kext", "path": "Extensions/AppleIntelLpssDmac.kext", "children": [ { "value": 72, "name": "Contents", "path": "Extensions/AppleIntelLpssDmac.kext/Contents" } ] }, { "value": 76, "name": "AppleIntelLpssGspi.kext", "path": "Extensions/AppleIntelLpssGspi.kext", "children": [ { "value": 76, "name": "Contents", "path": "Extensions/AppleIntelLpssGspi.kext/Contents" } ] }, { "value": 132, "name": "AppleIntelLpssSpiController.kext", "path": "Extensions/AppleIntelLpssSpiController.kext", "children": [ { "value": 132, "name": "Contents", "path": "Extensions/AppleIntelLpssSpiController.kext/Contents" } ] }, { "value": 308, "name": "AppleIntelSNBGraphicsFB.kext", "path": "Extensions/AppleIntelSNBGraphicsFB.kext", "children": [ { "value": 308, "name": "Contents", "path": "Extensions/AppleIntelSNBGraphicsFB.kext/Contents" } ] }, { "value": 144, "name": "AppleIntelSNBVA.bundle", "path": "Extensions/AppleIntelSNBVA.bundle", "children": [ { "value": 144, "name": "Contents", "path": "Extensions/AppleIntelSNBVA.bundle/Contents" } ] }, { "value": 72, "name": "AppleIRController.kext", "path": "Extensions/AppleIRController.kext", "children": [ { "value": 72, "name": "Contents", "path": "Extensions/AppleIRController.kext/Contents" } ] }, { "value": 208, "name": "AppleKextExcludeList.kext", "path": "Extensions/AppleKextExcludeList.kext", "children": [ { "value": 208, "name": "Contents", "path": "Extensions/AppleKextExcludeList.kext/Contents" } ] }, { "value": 120, "name": "AppleKeyStore.kext", "path": "Extensions/AppleKeyStore.kext", "children": [ { "value": 120, "name": "Contents", "path": "Extensions/AppleKeyStore.kext/Contents" } ] }, { "value": 48, "name": "AppleKeyswitch.kext", "path": "Extensions/AppleKeyswitch.kext", "children": [ { "value": 48, "name": "Contents", "path": "Extensions/AppleKeyswitch.kext/Contents" } ] }, { "value": 56, "name": "AppleLPC.kext", "path": "Extensions/AppleLPC.kext", "children": [ { "value": 56, "name": "Contents", "path": "Extensions/AppleLPC.kext/Contents" } ] }, { "value": 188, "name": "AppleLSIFusionMPT.kext", "path": "Extensions/AppleLSIFusionMPT.kext", "children": [ { "value": 188, "name": "Contents", "path": "Extensions/AppleLSIFusionMPT.kext/Contents" } ] }, { "value": 36, "name": "AppleMatch.kext", "path": "Extensions/AppleMatch.kext", "children": [ { "value": 36, "name": "Contents", "path": "Extensions/AppleMatch.kext/Contents" } ] }, { "value": 140, "name": "AppleMCCSControl.kext", "path": "Extensions/AppleMCCSControl.kext", "children": [ { "value": 140, "name": "Contents", "path": "Extensions/AppleMCCSControl.kext/Contents" } ] }, { "value": 64, "name": "AppleMCEDriver.kext", "path": "Extensions/AppleMCEDriver.kext", "children": [ { "value": 64, "name": "Contents", "path": "Extensions/AppleMCEDriver.kext/Contents" } ] }, { "value": 76, "name": "AppleMCP89RootPortPM.kext", "path": "Extensions/AppleMCP89RootPortPM.kext", "children": [ { "value": 76, "name": "Contents", "path": "Extensions/AppleMCP89RootPortPM.kext/Contents" } ] }, { "value": 156, "name": "AppleMIDIFWDriver.plugin", "path": "Extensions/AppleMIDIFWDriver.plugin", "children": [ { "value": 156, "name": "Contents", "path": "Extensions/AppleMIDIFWDriver.plugin/Contents" } ] }, { "value": 236, "name": "AppleMIDIIACDriver.plugin", "path": "Extensions/AppleMIDIIACDriver.plugin", "children": [ { "value": 236, "name": "Contents", "path": "Extensions/AppleMIDIIACDriver.plugin/Contents" } ] }, { "value": 416, "name": "AppleMIDIRTPDriver.plugin", "path": "Extensions/AppleMIDIRTPDriver.plugin", "children": [ { "value": 416, "name": "Contents", "path": "Extensions/AppleMIDIRTPDriver.plugin/Contents" } ] }, { "value": 248, "name": "AppleMIDIUSBDriver.plugin", "path": "Extensions/AppleMIDIUSBDriver.plugin", "children": [ { "value": 248, "name": "Contents", "path": "Extensions/AppleMIDIUSBDriver.plugin/Contents" } ] }, { "value": 68, "name": "AppleMikeyHIDDriver.kext", "path": "Extensions/AppleMikeyHIDDriver.kext", "children": [ { "value": 68, "name": "Contents", "path": "Extensions/AppleMikeyHIDDriver.kext/Contents" } ] }, { "value": 28, "name": "AppleMobileDevice.kext", "path": "Extensions/AppleMobileDevice.kext", "children": [ { "value": 28, "name": "Contents", "path": "Extensions/AppleMobileDevice.kext/Contents" } ] }, { "value": 860, "name": "AppleMultitouchDriver.kext", "path": "Extensions/AppleMultitouchDriver.kext", "children": [ { "value": 860, "name": "Contents", "path": "Extensions/AppleMultitouchDriver.kext/Contents" } ] }, { "value": 136, "name": "ApplePlatformEnabler.kext", "path": "Extensions/ApplePlatformEnabler.kext", "children": [ { "value": 136, "name": "Contents", "path": "Extensions/ApplePlatformEnabler.kext/Contents" } ] }, { "value": 240, "name": "AppleRAID.kext", "path": "Extensions/AppleRAID.kext", "children": [ { "value": 240, "name": "Contents", "path": "Extensions/AppleRAID.kext/Contents" } ] }, { "value": 372, "name": "AppleRAIDCard.kext", "path": "Extensions/AppleRAIDCard.kext", "children": [ { "value": 372, "name": "Contents", "path": "Extensions/AppleRAIDCard.kext/Contents" } ] }, { "value": 80, "name": "AppleRTC.kext", "path": "Extensions/AppleRTC.kext", "children": [ { "value": 80, "name": "Contents", "path": "Extensions/AppleRTC.kext/Contents" } ] }, { "value": 148, "name": "AppleSDXC.kext", "path": "Extensions/AppleSDXC.kext", "children": [ { "value": 148, "name": "Contents", "path": "Extensions/AppleSDXC.kext/Contents" } ] }, { "value": 76, "name": "AppleSEP.kext", "path": "Extensions/AppleSEP.kext", "children": [ { "value": 76, "name": "Contents", "path": "Extensions/AppleSEP.kext/Contents" } ] }, { "value": 88, "name": "AppleSmartBatteryManager.kext", "path": "Extensions/AppleSmartBatteryManager.kext", "children": [ { "value": 88, "name": "Contents", "path": "Extensions/AppleSmartBatteryManager.kext/Contents" } ] }, { "value": 60, "name": "AppleSMBIOS.kext", "path": "Extensions/AppleSMBIOS.kext", "children": [ { "value": 60, "name": "Contents", "path": "Extensions/AppleSMBIOS.kext/Contents" } ] }, { "value": 116, "name": "AppleSMBusController.kext", "path": "Extensions/AppleSMBusController.kext", "children": [ { "value": 116, "name": "Contents", "path": "Extensions/AppleSMBusController.kext/Contents" } ] }, { "value": 56, "name": "AppleSMBusPCI.kext", "path": "Extensions/AppleSMBusPCI.kext", "children": [ { "value": 56, "name": "Contents", "path": "Extensions/AppleSMBusPCI.kext/Contents" } ] }, { "value": 120, "name": "AppleSMC.kext", "path": "Extensions/AppleSMC.kext", "children": [ { "value": 120, "name": "Contents", "path": "Extensions/AppleSMC.kext/Contents" } ] }, { "value": 172, "name": "AppleSMCLMU.kext", "path": "Extensions/AppleSMCLMU.kext", "children": [ { "value": 172, "name": "Contents", "path": "Extensions/AppleSMCLMU.kext/Contents" } ] }, { "value": 88, "name": "AppleSRP.kext", "path": "Extensions/AppleSRP.kext", "children": [ { "value": 88, "name": "Contents", "path": "Extensions/AppleSRP.kext/Contents" } ] }, { "value": 1936, "name": "AppleStorageDrivers.kext", "path": "Extensions/AppleStorageDrivers.kext", "children": [ { "value": 1936, "name": "Contents", "path": "Extensions/AppleStorageDrivers.kext/Contents" } ] }, { "value": 264, "name": "AppleThunderboltDPAdapters.kext", "path": "Extensions/AppleThunderboltDPAdapters.kext", "children": [ { "value": 264, "name": "Contents", "path": "Extensions/AppleThunderboltDPAdapters.kext/Contents" } ] }, { "value": 204, "name": "AppleThunderboltEDMService.kext", "path": "Extensions/AppleThunderboltEDMService.kext", "children": [ { "value": 204, "name": "Contents", "path": "Extensions/AppleThunderboltEDMService.kext/Contents" } ] }, { "value": 216, "name": "AppleThunderboltIP.kext", "path": "Extensions/AppleThunderboltIP.kext", "children": [ { "value": 216, "name": "Contents", "path": "Extensions/AppleThunderboltIP.kext/Contents" } ] }, { "value": 168, "name": "AppleThunderboltNHI.kext", "path": "Extensions/AppleThunderboltNHI.kext", "children": [ { "value": 168, "name": "Contents", "path": "Extensions/AppleThunderboltNHI.kext/Contents" } ] }, { "value": 172, "name": "AppleThunderboltPCIAdapters.kext", "path": "Extensions/AppleThunderboltPCIAdapters.kext", "children": [ { "value": 172, "name": "Contents", "path": "Extensions/AppleThunderboltPCIAdapters.kext/Contents" } ] }, { "value": 164, "name": "AppleThunderboltUTDM.kext", "path": "Extensions/AppleThunderboltUTDM.kext", "children": [ { "value": 164, "name": "Contents", "path": "Extensions/AppleThunderboltUTDM.kext/Contents" } ] }, { "value": 188, "name": "AppleTopCase.kext", "path": "Extensions/AppleTopCase.kext", "children": [ { "value": 188, "name": "Contents", "path": "Extensions/AppleTopCase.kext/Contents" } ] }, { "value": 92, "name": "AppleTyMCEDriver.kext", "path": "Extensions/AppleTyMCEDriver.kext", "children": [ { "value": 92, "name": "Contents", "path": "Extensions/AppleTyMCEDriver.kext/Contents" } ] }, { "value": 72, "name": "AppleUpstreamUserClient.kext", "path": "Extensions/AppleUpstreamUserClient.kext", "children": [ { "value": 72, "name": "Contents", "path": "Extensions/AppleUpstreamUserClient.kext/Contents" } ] }, { "value": 408, "name": "AppleUSBAudio.kext", "path": "Extensions/AppleUSBAudio.kext", "children": [ { "value": 408, "name": "Contents", "path": "Extensions/AppleUSBAudio.kext/Contents" } ] }, { "value": 76, "name": "AppleUSBDisplays.kext", "path": "Extensions/AppleUSBDisplays.kext", "children": [ { "value": 76, "name": "Contents", "path": "Extensions/AppleUSBDisplays.kext/Contents" } ] }, { "value": 144, "name": "AppleUSBEthernetHost.kext", "path": "Extensions/AppleUSBEthernetHost.kext", "children": [ { "value": 144, "name": "Contents", "path": "Extensions/AppleUSBEthernetHost.kext/Contents" } ] }, { "value": 160, "name": "AppleUSBMultitouch.kext", "path": "Extensions/AppleUSBMultitouch.kext", "children": [ { "value": 160, "name": "Contents", "path": "Extensions/AppleUSBMultitouch.kext/Contents" } ] }, { "value": 728, "name": "AppleUSBTopCase.kext", "path": "Extensions/AppleUSBTopCase.kext", "children": [ { "value": 728, "name": "Contents", "path": "Extensions/AppleUSBTopCase.kext/Contents" } ] }, { "value": 3576, "name": "AppleVADriver.bundle", "path": "Extensions/AppleVADriver.bundle", "children": [ { "value": 3576, "name": "Contents", "path": "Extensions/AppleVADriver.bundle/Contents" } ] }, { "value": 60, "name": "AppleWWANAutoEject.kext", "path": "Extensions/AppleWWANAutoEject.kext", "children": [ { "value": 60, "name": "Contents", "path": "Extensions/AppleWWANAutoEject.kext/Contents" } ] }, { "value": 56, "name": "AppleXsanFilter.kext", "path": "Extensions/AppleXsanFilter.kext", "children": [ { "value": 56, "name": "Contents", "path": "Extensions/AppleXsanFilter.kext/Contents" } ] }, { "value": 2976, "name": "ATIRadeonX2000.kext", "path": "Extensions/ATIRadeonX2000.kext", "children": [ { "value": 2976, "name": "Contents", "path": "Extensions/ATIRadeonX2000.kext/Contents" } ] }, { "value": 88, "name": "ATIRadeonX2000GA.plugin", "path": "Extensions/ATIRadeonX2000GA.plugin", "children": [ { "value": 88, "name": "Contents", "path": "Extensions/ATIRadeonX2000GA.plugin/Contents" } ] }, { "value": 5808, "name": "ATIRadeonX2000GLDriver.bundle", "path": "Extensions/ATIRadeonX2000GLDriver.bundle", "children": [ { "value": 5808, "name": "Contents", "path": "Extensions/ATIRadeonX2000GLDriver.bundle/Contents" } ] }, { "value": 396, "name": "ATIRadeonX2000VADriver.bundle", "path": "Extensions/ATIRadeonX2000VADriver.bundle", "children": [ { "value": 396, "name": "Contents", "path": "Extensions/ATIRadeonX2000VADriver.bundle/Contents" } ] }, { "value": 496, "name": "ATTOCelerityFC.kext", "path": "Extensions/ATTOCelerityFC.kext", "children": [ { "value": 496, "name": "Contents", "path": "Extensions/ATTOCelerityFC.kext/Contents" } ] }, { "value": 268, "name": "ATTOExpressPCI4.kext", "path": "Extensions/ATTOExpressPCI4.kext", "children": [ { "value": 268, "name": "Contents", "path": "Extensions/ATTOExpressPCI4.kext/Contents" } ] }, { "value": 252, "name": "ATTOExpressSASHBA.kext", "path": "Extensions/ATTOExpressSASHBA.kext", "children": [ { "value": 252, "name": "Contents", "path": "Extensions/ATTOExpressSASHBA.kext/Contents" } ] }, { "value": 388, "name": "ATTOExpressSASHBA3.kext", "path": "Extensions/ATTOExpressSASHBA3.kext", "children": [ { "value": 388, "name": "Contents", "path": "Extensions/ATTOExpressSASHBA3.kext/Contents" } ] }, { "value": 212, "name": "ATTOExpressSASRAID.kext", "path": "Extensions/ATTOExpressSASRAID.kext", "children": [ { "value": 212, "name": "Contents", "path": "Extensions/ATTOExpressSASRAID.kext/Contents" } ] }, { "value": 72, "name": "AudioAUUC.kext", "path": "Extensions/AudioAUUC.kext", "children": [ { "value": 4, "name": "_CodeSignature", "path": "Extensions/AudioAUUC.kext/_CodeSignature" } ] }, { "value": 144, "name": "autofs.kext", "path": "Extensions/autofs.kext", "children": [ { "value": 144, "name": "Contents", "path": "Extensions/autofs.kext/Contents" } ] }, { "value": 80, "name": "BootCache.kext", "path": "Extensions/BootCache.kext", "children": [ { "value": 80, "name": "Contents", "path": "Extensions/BootCache.kext/Contents" } ] }, { "value": 64, "name": "cd9660.kext", "path": "Extensions/cd9660.kext", "children": [ { "value": 64, "name": "Contents", "path": "Extensions/cd9660.kext/Contents" } ] }, { "value": 48, "name": "cddafs.kext", "path": "Extensions/cddafs.kext", "children": [ { "value": 48, "name": "Contents", "path": "Extensions/cddafs.kext/Contents" } ] }, { "value": 432, "name": "CellPhoneHelper.kext", "path": "Extensions/CellPhoneHelper.kext", "children": [ { "value": 432, "name": "Contents", "path": "Extensions/CellPhoneHelper.kext/Contents" } ] }, { "value": 0, "name": "ch34xsigned.kext", "path": "Extensions/ch34xsigned.kext" }, { "value": 308, "name": "corecrypto.kext", "path": "Extensions/corecrypto.kext", "children": [ { "value": 308, "name": "Contents", "path": "Extensions/corecrypto.kext/Contents" } ] }, { "value": 1324, "name": "CoreStorage.kext", "path": "Extensions/CoreStorage.kext", "children": [ { "value": 1324, "name": "Contents", "path": "Extensions/CoreStorage.kext/Contents" } ] }, { "value": 72, "name": "DontSteal Mac OS X.kext", "path": "Extensions/DontSteal Mac OS X.kext", "children": [ { "value": 68, "name": "Contents", "path": "Extensions/DontSteal Mac OS X.kext/Contents" } ] }, { "value": 36, "name": "DSACL.ppp", "path": "Extensions/DSACL.ppp", "children": [ { "value": 36, "name": "Contents", "path": "Extensions/DSACL.ppp/Contents" } ] }, { "value": 40, "name": "DSAuth.ppp", "path": "Extensions/DSAuth.ppp", "children": [ { "value": 40, "name": "Contents", "path": "Extensions/DSAuth.ppp/Contents" } ] }, { "value": 56, "name": "DVFamily.bundle", "path": "Extensions/DVFamily.bundle", "children": [ { "value": 56, "name": "Contents", "path": "Extensions/DVFamily.bundle/Contents" } ] }, { "value": 312, "name": "EAP-KRB.ppp", "path": "Extensions/EAP-KRB.ppp", "children": [ { "value": 312, "name": "Contents", "path": "Extensions/EAP-KRB.ppp/Contents" } ] }, { "value": 792, "name": "EAP-RSA.ppp", "path": "Extensions/EAP-RSA.ppp", "children": [ { "value": 792, "name": "Contents", "path": "Extensions/EAP-RSA.ppp/Contents" } ] }, { "value": 308, "name": "EAP-TLS.ppp", "path": "Extensions/EAP-TLS.ppp", "children": [ { "value": 308, "name": "Contents", "path": "Extensions/EAP-TLS.ppp/Contents" } ] }, { "value": 88, "name": "exfat.kext", "path": "Extensions/exfat.kext", "children": [ { "value": 88, "name": "Contents", "path": "Extensions/exfat.kext/Contents" } ] }, { "value": 776, "name": "GeForce.kext", "path": "Extensions/GeForce.kext", "children": [ { "value": 776, "name": "Contents", "path": "Extensions/GeForce.kext/Contents" } ] }, { "value": 160, "name": "GeForceGA.plugin", "path": "Extensions/GeForceGA.plugin", "children": [ { "value": 160, "name": "Contents", "path": "Extensions/GeForceGA.plugin/Contents" } ] }, { "value": 67212, "name": "GeForceGLDriver.bundle", "path": "Extensions/GeForceGLDriver.bundle", "children": [ { "value": 67212, "name": "Contents", "path": "Extensions/GeForceGLDriver.bundle/Contents" } ] }, { "value": 1100, "name": "GeForceTesla.kext", "path": "Extensions/GeForceTesla.kext", "children": [ { "value": 1100, "name": "Contents", "path": "Extensions/GeForceTesla.kext/Contents" } ] }, { "value": 67012, "name": "GeForceTeslaGLDriver.bundle", "path": "Extensions/GeForceTeslaGLDriver.bundle", "children": [ { "value": 67012, "name": "Contents", "path": "Extensions/GeForceTeslaGLDriver.bundle/Contents" } ] }, { "value": 1584, "name": "GeForceTeslaVADriver.bundle", "path": "Extensions/GeForceTeslaVADriver.bundle", "children": [ { "value": 1584, "name": "Contents", "path": "Extensions/GeForceTeslaVADriver.bundle/Contents" } ] }, { "value": 1476, "name": "GeForceVADriver.bundle", "path": "Extensions/GeForceVADriver.bundle", "children": [ { "value": 1476, "name": "Contents", "path": "Extensions/GeForceVADriver.bundle/Contents" } ] }, { "value": 212, "name": "intelhaxm.kext", "path": "Extensions/intelhaxm.kext", "children": [ { "value": 212, "name": "Contents", "path": "Extensions/intelhaxm.kext/Contents" } ] }, { "value": 10488, "name": "IO80211Family.kext", "path": "Extensions/IO80211Family.kext", "children": [ { "value": 10488, "name": "Contents", "path": "Extensions/IO80211Family.kext/Contents" } ] }, { "value": 56, "name": "IOAccelerator2D.plugin", "path": "Extensions/IOAccelerator2D.plugin", "children": [ { "value": 56, "name": "Contents", "path": "Extensions/IOAccelerator2D.plugin/Contents" } ] }, { "value": 448, "name": "IOAcceleratorFamily.kext", "path": "Extensions/IOAcceleratorFamily.kext", "children": [ { "value": 448, "name": "Contents", "path": "Extensions/IOAcceleratorFamily.kext/Contents" } ] }, { "value": 508, "name": "IOAcceleratorFamily2.kext", "path": "Extensions/IOAcceleratorFamily2.kext", "children": [ { "value": 508, "name": "Contents", "path": "Extensions/IOAcceleratorFamily2.kext/Contents" } ] }, { "value": 76, "name": "IOACPIFamily.kext", "path": "Extensions/IOACPIFamily.kext", "children": [ { "value": 76, "name": "Contents", "path": "Extensions/IOACPIFamily.kext/Contents" } ] }, { "value": 448, "name": "IOAHCIFamily.kext", "path": "Extensions/IOAHCIFamily.kext", "children": [ { "value": 448, "name": "Contents", "path": "Extensions/IOAHCIFamily.kext/Contents" } ] }, { "value": 872, "name": "IOATAFamily.kext", "path": "Extensions/IOATAFamily.kext", "children": [ { "value": 872, "name": "Contents", "path": "Extensions/IOATAFamily.kext/Contents" } ] }, { "value": 276, "name": "IOAudioFamily.kext", "path": "Extensions/IOAudioFamily.kext", "children": [ { "value": 276, "name": "Contents", "path": "Extensions/IOAudioFamily.kext/Contents" } ] }, { "value": 692, "name": "IOAVBFamily.kext", "path": "Extensions/IOAVBFamily.kext", "children": [ { "value": 692, "name": "Contents", "path": "Extensions/IOAVBFamily.kext/Contents" } ] }, { "value": 4808, "name": "IOBDStorageFamily.kext", "path": "Extensions/IOBDStorageFamily.kext", "children": [ { "value": 4808, "name": "Contents", "path": "Extensions/IOBDStorageFamily.kext/Contents" } ] }, { "value": 4460, "name": "IOBluetoothFamily.kext", "path": "Extensions/IOBluetoothFamily.kext", "children": [ { "value": 4460, "name": "Contents", "path": "Extensions/IOBluetoothFamily.kext/Contents" } ] }, { "value": 260, "name": "IOBluetoothHIDDriver.kext", "path": "Extensions/IOBluetoothHIDDriver.kext", "children": [ { "value": 260, "name": "Contents", "path": "Extensions/IOBluetoothHIDDriver.kext/Contents" } ] }, { "value": 4816, "name": "IOCDStorageFamily.kext", "path": "Extensions/IOCDStorageFamily.kext", "children": [ { "value": 4816, "name": "Contents", "path": "Extensions/IOCDStorageFamily.kext/Contents" } ] }, { "value": 9656, "name": "IODVDStorageFamily.kext", "path": "Extensions/IODVDStorageFamily.kext", "children": [ { "value": 9656, "name": "Contents", "path": "Extensions/IODVDStorageFamily.kext/Contents" } ] }, { "value": 288, "name": "IOFireWireAVC.kext", "path": "Extensions/IOFireWireAVC.kext", "children": [ { "value": 288, "name": "Contents", "path": "Extensions/IOFireWireAVC.kext/Contents" } ] }, { "value": 1424, "name": "IOFireWireFamily.kext", "path": "Extensions/IOFireWireFamily.kext", "children": [ { "value": 1424, "name": "Contents", "path": "Extensions/IOFireWireFamily.kext/Contents" } ] }, { "value": 236, "name": "IOFireWireIP.kext", "path": "Extensions/IOFireWireIP.kext", "children": [ { "value": 236, "name": "Contents", "path": "Extensions/IOFireWireIP.kext/Contents" } ] }, { "value": 288, "name": "IOFireWireSBP2.kext", "path": "Extensions/IOFireWireSBP2.kext", "children": [ { "value": 288, "name": "Contents", "path": "Extensions/IOFireWireSBP2.kext/Contents" } ] }, { "value": 68, "name": "IOFireWireSerialBusProtocolTransport.kext", "path": "Extensions/IOFireWireSerialBusProtocolTransport.kext", "children": [ { "value": 68, "name": "Contents", "path": "Extensions/IOFireWireSerialBusProtocolTransport.kext/Contents" } ] }, { "value": 320, "name": "IOGraphicsFamily.kext", "path": "Extensions/IOGraphicsFamily.kext", "children": [ { "value": 4, "name": "_CodeSignature", "path": "Extensions/IOGraphicsFamily.kext/_CodeSignature" } ] }, { "value": 804, "name": "IOHDIXController.kext", "path": "Extensions/IOHDIXController.kext", "children": [ { "value": 804, "name": "Contents", "path": "Extensions/IOHDIXController.kext/Contents" } ] }, { "value": 940, "name": "IOHIDFamily.kext", "path": "Extensions/IOHIDFamily.kext", "children": [ { "value": 940, "name": "Contents", "path": "Extensions/IOHIDFamily.kext/Contents" } ] }, { "value": 108, "name": "IONDRVSupport.kext", "path": "Extensions/IONDRVSupport.kext", "children": [ { "value": 4, "name": "_CodeSignature", "path": "Extensions/IONDRVSupport.kext/_CodeSignature" } ] }, { "value": 2396, "name": "IONetworkingFamily.kext", "path": "Extensions/IONetworkingFamily.kext", "children": [ { "value": 2396, "name": "Contents", "path": "Extensions/IONetworkingFamily.kext/Contents" } ] }, { "value": 228, "name": "IOPCIFamily.kext", "path": "Extensions/IOPCIFamily.kext", "children": [ { "value": 4, "name": "_CodeSignature", "path": "Extensions/IOPCIFamily.kext/_CodeSignature" } ] }, { "value": 1400, "name": "IOPlatformPluginFamily.kext", "path": "Extensions/IOPlatformPluginFamily.kext", "children": [ { "value": 1400, "name": "Contents", "path": "Extensions/IOPlatformPluginFamily.kext/Contents" } ] }, { "value": 108, "name": "IOReportFamily.kext", "path": "Extensions/IOReportFamily.kext", "children": [ { "value": 108, "name": "Contents", "path": "Extensions/IOReportFamily.kext/Contents" } ] }, { "value": 13020, "name": "IOSCSIArchitectureModelFamily.kext", "path": "Extensions/IOSCSIArchitectureModelFamily.kext", "children": [ { "value": 13020, "name": "Contents", "path": "Extensions/IOSCSIArchitectureModelFamily.kext/Contents" } ] }, { "value": 120, "name": "IOSCSIParallelFamily.kext", "path": "Extensions/IOSCSIParallelFamily.kext", "children": [ { "value": 120, "name": "Contents", "path": "Extensions/IOSCSIParallelFamily.kext/Contents" } ] }, { "value": 1292, "name": "IOSerialFamily.kext", "path": "Extensions/IOSerialFamily.kext", "children": [ { "value": 1292, "name": "Contents", "path": "Extensions/IOSerialFamily.kext/Contents" } ] }, { "value": 52, "name": "IOSMBusFamily.kext", "path": "Extensions/IOSMBusFamily.kext", "children": [ { "value": 52, "name": "Contents", "path": "Extensions/IOSMBusFamily.kext/Contents" } ] }, { "value": 2064, "name": "IOStorageFamily.kext", "path": "Extensions/IOStorageFamily.kext", "children": [ { "value": 2064, "name": "Contents", "path": "Extensions/IOStorageFamily.kext/Contents" } ] }, { "value": 164, "name": "IOStreamFamily.kext", "path": "Extensions/IOStreamFamily.kext", "children": [ { "value": 164, "name": "Contents", "path": "Extensions/IOStreamFamily.kext/Contents" } ] }, { "value": 124, "name": "IOSurface.kext", "path": "Extensions/IOSurface.kext", "children": [ { "value": 124, "name": "Contents", "path": "Extensions/IOSurface.kext/Contents" } ] }, { "value": 1040, "name": "IOThunderboltFamily.kext", "path": "Extensions/IOThunderboltFamily.kext", "children": [ { "value": 1040, "name": "Contents", "path": "Extensions/IOThunderboltFamily.kext/Contents" } ] }, { "value": 248, "name": "IOTimeSyncFamily.kext", "path": "Extensions/IOTimeSyncFamily.kext", "children": [ { "value": 248, "name": "Contents", "path": "Extensions/IOTimeSyncFamily.kext/Contents" } ] }, { "value": 96, "name": "IOUSBAttachedSCSI.kext", "path": "Extensions/IOUSBAttachedSCSI.kext", "children": [ { "value": 96, "name": "Contents", "path": "Extensions/IOUSBAttachedSCSI.kext/Contents" } ] }, { "value": 4628, "name": "IOUSBFamily.kext", "path": "Extensions/IOUSBFamily.kext", "children": [ { "value": 4628, "name": "Contents", "path": "Extensions/IOUSBFamily.kext/Contents" } ] }, { "value": 140, "name": "IOUSBMassStorageClass.kext", "path": "Extensions/IOUSBMassStorageClass.kext", "children": [ { "value": 140, "name": "Contents", "path": "Extensions/IOUSBMassStorageClass.kext/Contents" } ] }, { "value": 100, "name": "IOUserEthernet.kext", "path": "Extensions/IOUserEthernet.kext", "children": [ { "value": 100, "name": "Contents", "path": "Extensions/IOUserEthernet.kext/Contents" } ] }, { "value": 172, "name": "IOVideoFamily.kext", "path": "Extensions/IOVideoFamily.kext", "children": [ { "value": 172, "name": "Contents", "path": "Extensions/IOVideoFamily.kext/Contents" } ] }, { "value": 168, "name": "iPodDriver.kext", "path": "Extensions/iPodDriver.kext", "children": [ { "value": 168, "name": "Contents", "path": "Extensions/iPodDriver.kext/Contents" } ] }, { "value": 108, "name": "JMicronATA.kext", "path": "Extensions/JMicronATA.kext", "children": [ { "value": 108, "name": "Contents", "path": "Extensions/JMicronATA.kext/Contents" } ] }, { "value": 208, "name": "L2TP.ppp", "path": "Extensions/L2TP.ppp", "children": [ { "value": 208, "name": "Contents", "path": "Extensions/L2TP.ppp/Contents" } ] }, { "value": 64, "name": "mcxalr.kext", "path": "Extensions/mcxalr.kext", "children": [ { "value": 64, "name": "Contents", "path": "Extensions/mcxalr.kext/Contents" } ] }, { "value": 92, "name": "msdosfs.kext", "path": "Extensions/msdosfs.kext", "children": [ { "value": 92, "name": "Contents", "path": "Extensions/msdosfs.kext/Contents" } ] }, { "value": 408, "name": "ntfs.kext", "path": "Extensions/ntfs.kext", "children": [ { "value": 408, "name": "Contents", "path": "Extensions/ntfs.kext/Contents" } ] }, { "value": 2128, "name": "NVDAGF100Hal.kext", "path": "Extensions/NVDAGF100Hal.kext", "children": [ { "value": 2128, "name": "Contents", "path": "Extensions/NVDAGF100Hal.kext/Contents" } ] }, { "value": 1952, "name": "NVDAGK100Hal.kext", "path": "Extensions/NVDAGK100Hal.kext", "children": [ { "value": 1952, "name": "Contents", "path": "Extensions/NVDAGK100Hal.kext/Contents" } ] }, { "value": 3104, "name": "NVDANV50HalTesla.kext", "path": "Extensions/NVDANV50HalTesla.kext", "children": [ { "value": 3104, "name": "Contents", "path": "Extensions/NVDANV50HalTesla.kext/Contents" } ] }, { "value": 2524, "name": "NVDAResman.kext", "path": "Extensions/NVDAResman.kext", "children": [ { "value": 2524, "name": "Contents", "path": "Extensions/NVDAResman.kext/Contents" } ] }, { "value": 2540, "name": "NVDAResmanTesla.kext", "path": "Extensions/NVDAResmanTesla.kext", "children": [ { "value": 2540, "name": "Contents", "path": "Extensions/NVDAResmanTesla.kext/Contents" } ] }, { "value": 56, "name": "NVDAStartup.kext", "path": "Extensions/NVDAStartup.kext", "children": [ { "value": 56, "name": "Contents", "path": "Extensions/NVDAStartup.kext/Contents" } ] }, { "value": 104, "name": "NVSMU.kext", "path": "Extensions/NVSMU.kext", "children": [ { "value": 104, "name": "Contents", "path": "Extensions/NVSMU.kext/Contents" } ] }, { "value": 92, "name": "OSvKernDSPLib.kext", "path": "Extensions/OSvKernDSPLib.kext", "children": [ { "value": 92, "name": "Contents", "path": "Extensions/OSvKernDSPLib.kext/Contents" } ] }, { "value": 72, "name": "PPP.kext", "path": "Extensions/PPP.kext", "children": [ { "value": 72, "name": "Contents", "path": "Extensions/PPP.kext/Contents" } ] }, { "value": 120, "name": "PPPoE.ppp", "path": "Extensions/PPPoE.ppp", "children": [ { "value": 120, "name": "Contents", "path": "Extensions/PPPoE.ppp/Contents" } ] }, { "value": 1572, "name": "PPPSerial.ppp", "path": "Extensions/PPPSerial.ppp", "children": [ { "value": 1572, "name": "Contents", "path": "Extensions/PPPSerial.ppp/Contents" } ] }, { "value": 120, "name": "PPTP.ppp", "path": "Extensions/PPTP.ppp", "children": [ { "value": 120, "name": "Contents", "path": "Extensions/PPTP.ppp/Contents" } ] }, { "value": 64, "name": "pthread.kext", "path": "Extensions/pthread.kext", "children": [ { "value": 64, "name": "Contents", "path": "Extensions/pthread.kext/Contents" } ] }, { "value": 56, "name": "Quarantine.kext", "path": "Extensions/Quarantine.kext", "children": [ { "value": 56, "name": "Contents", "path": "Extensions/Quarantine.kext/Contents" } ] }, { "value": 56, "name": "Radius.ppp", "path": "Extensions/Radius.ppp", "children": [ { "value": 56, "name": "Contents", "path": "Extensions/Radius.ppp/Contents" } ] }, { "value": 52, "name": "RemoteVirtualInterface.kext", "path": "Extensions/RemoteVirtualInterface.kext", "children": [ { "value": 52, "name": "Contents", "path": "Extensions/RemoteVirtualInterface.kext/Contents" } ] }, { "value": 108, "name": "Sandbox.kext", "path": "Extensions/Sandbox.kext", "children": [ { "value": 108, "name": "Contents", "path": "Extensions/Sandbox.kext/Contents" } ] }, { "value": 68, "name": "SMARTLib.plugin", "path": "Extensions/SMARTLib.plugin", "children": [ { "value": 68, "name": "Contents", "path": "Extensions/SMARTLib.plugin/Contents" } ] }, { "value": 376, "name": "smbfs.kext", "path": "Extensions/smbfs.kext", "children": [ { "value": 376, "name": "Contents", "path": "Extensions/smbfs.kext/Contents" } ] }, { "value": 80, "name": "SMCMotionSensor.kext", "path": "Extensions/SMCMotionSensor.kext", "children": [ { "value": 80, "name": "Contents", "path": "Extensions/SMCMotionSensor.kext/Contents" } ] }, { "value": 504, "name": "System.kext", "path": "Extensions/System.kext", "children": [ { "value": 20, "name": "_CodeSignature", "path": "Extensions/System.kext/_CodeSignature" }, { "value": 476, "name": "PlugIns", "path": "Extensions/System.kext/PlugIns" } ] }, { "value": 56, "name": "TMSafetyNet.kext", "path": "Extensions/TMSafetyNet.kext", "children": [ { "value": 40, "name": "Contents", "path": "Extensions/TMSafetyNet.kext/Contents" }, { "value": 16, "name": "Helpers", "path": "Extensions/TMSafetyNet.kext/Helpers" } ] }, { "value": 40, "name": "triggers.kext", "path": "Extensions/triggers.kext", "children": [ { "value": 40, "name": "Contents", "path": "Extensions/triggers.kext/Contents" } ] }, { "value": 296, "name": "udf.kext", "path": "Extensions/udf.kext", "children": [ { "value": 296, "name": "Contents", "path": "Extensions/udf.kext/Contents" } ] }, { "value": 212, "name": "vecLib.kext", "path": "Extensions/vecLib.kext", "children": [ { "value": 212, "name": "Contents", "path": "Extensions/vecLib.kext/Contents" } ] }, { "value": 176, "name": "webcontentfilter.kext", "path": "Extensions/webcontentfilter.kext", "children": [ { "value": 176, "name": "Contents", "path": "Extensions/webcontentfilter.kext/Contents" } ] }, { "value": 232, "name": "webdav_fs.kext", "path": "Extensions/webdav_fs.kext", "children": [ { "value": 232, "name": "Contents", "path": "Extensions/webdav_fs.kext/Contents" } ] } ] }, { "value": 11992, "name": "Filesystems", "path": "Filesystems", "children": [ { "value": 5740, "name": "acfs.fs", "path": "Filesystems/acfs.fs", "children": [ { "value": 5644, "name": "Contents", "path": "Filesystems/acfs.fs/Contents" } ] }, { "value": 636, "name": "AppleShare", "path": "Filesystems/AppleShare", "children": [ { "value": 524, "name": "afpfs.kext", "path": "Filesystems/AppleShare/afpfs.kext" }, { "value": 88, "name": "asp_tcp.kext", "path": "Filesystems/AppleShare/asp_tcp.kext" }, { "value": 16, "name": "check_afp.app", "path": "Filesystems/AppleShare/check_afp.app" } ] }, { "value": 16, "name": "cd9660.fs", "path": "Filesystems/cd9660.fs", "children": [ { "value": 16, "name": "Contents", "path": "Filesystems/cd9660.fs/Contents" } ] }, { "value": 32, "name": "cddafs.fs", "path": "Filesystems/cddafs.fs", "children": [ { "value": 32, "name": "Contents", "path": "Filesystems/cddafs.fs/Contents" } ] }, { "value": 76, "name": "exfat.fs", "path": "Filesystems/exfat.fs", "children": [ { "value": 72, "name": "Contents", "path": "Filesystems/exfat.fs/Contents" } ] }, { "value": 36, "name": "ftp.fs", "path": "Filesystems/ftp.fs", "children": [ { "value": 0, "name": "Contents", "path": "Filesystems/ftp.fs/Contents" } ] }, { "value": 3180, "name": "hfs.fs", "path": "Filesystems/hfs.fs", "children": [ { "value": 452, "name": "Contents", "path": "Filesystems/hfs.fs/Contents" }, { "value": 2724, "name": "Encodings", "path": "Filesystems/hfs.fs/Encodings" } ] }, { "value": 64, "name": "msdos.fs", "path": "Filesystems/msdos.fs", "children": [ { "value": 60, "name": "Contents", "path": "Filesystems/msdos.fs/Contents" } ] }, { "value": 172, "name": "NetFSPlugins", "path": "Filesystems/NetFSPlugins", "children": [ { "value": 44, "name": "afp.bundle", "path": "Filesystems/NetFSPlugins/afp.bundle" }, { "value": 20, "name": "ftp.bundle", "path": "Filesystems/NetFSPlugins/ftp.bundle" }, { "value": 36, "name": "http.bundle", "path": "Filesystems/NetFSPlugins/http.bundle" }, { "value": 16, "name": "nfs.bundle", "path": "Filesystems/NetFSPlugins/nfs.bundle" }, { "value": 56, "name": "smb.bundle", "path": "Filesystems/NetFSPlugins/smb.bundle" } ] }, { "value": 0, "name": "nfs.fs", "path": "Filesystems/nfs.fs", "children": [ { "value": 0, "name": "Contents", "path": "Filesystems/nfs.fs/Contents" } ] }, { "value": 24, "name": "ntfs.fs", "path": "Filesystems/ntfs.fs", "children": [ { "value": 20, "name": "Contents", "path": "Filesystems/ntfs.fs/Contents" } ] }, { "value": 1800, "name": "prlufs.fs", "path": "Filesystems/prlufs.fs", "children": [ { "value": 1800, "name": "Support", "path": "Filesystems/prlufs.fs/Support" } ] }, { "value": 0, "name": "smbfs.fs", "path": "Filesystems/smbfs.fs", "children": [ { "value": 0, "name": "Contents", "path": "Filesystems/smbfs.fs/Contents" } ] }, { "value": 204, "name": "udf.fs", "path": "Filesystems/udf.fs", "children": [ { "value": 200, "name": "Contents", "path": "Filesystems/udf.fs/Contents" } ] }, { "value": 8, "name": "webdav.fs", "path": "Filesystems/webdav.fs", "children": [ { "value": 0, "name": "Contents", "path": "Filesystems/webdav.fs/Contents" }, { "value": 8, "name": "Support", "path": "Filesystems/webdav.fs/Support" } ] } ] }, { "value": 112, "name": "Filters", "path": "Filters" }, { "value": 201212, "name": "Fonts", "path": "Fonts" }, { "value": 647772, "name": "Frameworks", "path": "Frameworks", "children": [ { "value": 9800, "name": "Accelerate.framework", "path": "Frameworks/Accelerate.framework", "children": [ { "value": 9788, "name": "Versions", "path": "Frameworks/Accelerate.framework/Versions" } ] }, { "value": 100, "name": "Accounts.framework", "path": "Frameworks/Accounts.framework", "children": [ { "value": 92, "name": "Versions", "path": "Frameworks/Accounts.framework/Versions" } ] }, { "value": 10144, "name": "AddressBook.framework", "path": "Frameworks/AddressBook.framework", "children": [ { "value": 10136, "name": "Versions", "path": "Frameworks/AddressBook.framework/Versions" } ] }, { "value": 64, "name": "AGL.framework", "path": "Frameworks/AGL.framework", "children": [ { "value": 56, "name": "Versions", "path": "Frameworks/AGL.framework/Versions" } ] }, { "value": 30320, "name": "AppKit.framework", "path": "Frameworks/AppKit.framework", "children": [ { "value": 30308, "name": "Versions", "path": "Frameworks/AppKit.framework/Versions" } ] }, { "value": 12, "name": "AppKitScripting.framework", "path": "Frameworks/AppKitScripting.framework", "children": [ { "value": 4, "name": "Versions", "path": "Frameworks/AppKitScripting.framework/Versions" } ] }, { "value": 632, "name": "AppleScriptKit.framework", "path": "Frameworks/AppleScriptKit.framework", "children": [ { "value": 624, "name": "Versions", "path": "Frameworks/AppleScriptKit.framework/Versions" } ] }, { "value": 104, "name": "AppleScriptObjC.framework", "path": "Frameworks/AppleScriptObjC.framework", "children": [ { "value": 96, "name": "Versions", "path": "Frameworks/AppleScriptObjC.framework/Versions" } ] }, { "value": 324, "name": "AppleShareClientCore.framework", "path": "Frameworks/AppleShareClientCore.framework", "children": [ { "value": 316, "name": "Versions", "path": "Frameworks/AppleShareClientCore.framework/Versions" } ] }, { "value": 77200, "name": "ApplicationServices.framework", "path": "Frameworks/ApplicationServices.framework", "children": [ { "value": 77188, "name": "Versions", "path": "Frameworks/ApplicationServices.framework/Versions" } ] }, { "value": 1792, "name": "AudioToolbox.framework", "path": "Frameworks/AudioToolbox.framework", "children": [ { "value": 1716, "name": "Versions", "path": "Frameworks/AudioToolbox.framework/Versions" }, { "value": 68, "name": "XPCServices", "path": "Frameworks/AudioToolbox.framework/XPCServices" } ] }, { "value": 40, "name": "AudioUnit.framework", "path": "Frameworks/AudioUnit.framework", "children": [ { "value": 32, "name": "Versions", "path": "Frameworks/AudioUnit.framework/Versions" } ] }, { "value": 736, "name": "AudioVideoBridging.framework", "path": "Frameworks/AudioVideoBridging.framework", "children": [ { "value": 728, "name": "Versions", "path": "Frameworks/AudioVideoBridging.framework/Versions" } ] }, { "value": 11496, "name": "Automator.framework", "path": "Frameworks/Automator.framework", "children": [ { "value": 4, "name": "Frameworks", "path": "Frameworks/Automator.framework/Frameworks" }, { "value": 11484, "name": "Versions", "path": "Frameworks/Automator.framework/Versions" } ] }, { "value": 1648, "name": "AVFoundation.framework", "path": "Frameworks/AVFoundation.framework", "children": [ { "value": 1640, "name": "Versions", "path": "Frameworks/AVFoundation.framework/Versions" } ] }, { "value": 408, "name": "AVKit.framework", "path": "Frameworks/AVKit.framework", "children": [ { "value": 400, "name": "Versions", "path": "Frameworks/AVKit.framework/Versions" } ] }, { "value": 1132, "name": "CalendarStore.framework", "path": "Frameworks/CalendarStore.framework", "children": [ { "value": 1124, "name": "Versions", "path": "Frameworks/CalendarStore.framework/Versions" } ] }, { "value": 25920, "name": "Carbon.framework", "path": "Frameworks/Carbon.framework", "children": [ { "value": 25908, "name": "Versions", "path": "Frameworks/Carbon.framework/Versions" } ] }, { "value": 2000, "name": "CFNetwork.framework", "path": "Frameworks/CFNetwork.framework", "children": [ { "value": 1992, "name": "Versions", "path": "Frameworks/CFNetwork.framework/Versions" } ] }, { "value": 20, "name": "Cocoa.framework", "path": "Frameworks/Cocoa.framework", "children": [ { "value": 12, "name": "Versions", "path": "Frameworks/Cocoa.framework/Versions" } ] }, { "value": 900, "name": "Collaboration.framework", "path": "Frameworks/Collaboration.framework", "children": [ { "value": 892, "name": "Versions", "path": "Frameworks/Collaboration.framework/Versions" } ] }, { "value": 432, "name": "CoreAudio.framework", "path": "Frameworks/CoreAudio.framework", "children": [ { "value": 420, "name": "Versions", "path": "Frameworks/CoreAudio.framework/Versions" } ] }, { "value": 716, "name": "CoreAudioKit.framework", "path": "Frameworks/CoreAudioKit.framework", "children": [ { "value": 708, "name": "Versions", "path": "Frameworks/CoreAudioKit.framework/Versions" } ] }, { "value": 2632, "name": "CoreData.framework", "path": "Frameworks/CoreData.framework", "children": [ { "value": 2624, "name": "Versions", "path": "Frameworks/CoreData.framework/Versions" } ] }, { "value": 2608, "name": "CoreFoundation.framework", "path": "Frameworks/CoreFoundation.framework", "children": [ { "value": 2600, "name": "Versions", "path": "Frameworks/CoreFoundation.framework/Versions" } ] }, { "value": 9152, "name": "CoreGraphics.framework", "path": "Frameworks/CoreGraphics.framework", "children": [ { "value": 9144, "name": "Versions", "path": "Frameworks/CoreGraphics.framework/Versions" } ] }, { "value": 14552, "name": "CoreLocation.framework", "path": "Frameworks/CoreLocation.framework", "children": [ { "value": 14540, "name": "Versions", "path": "Frameworks/CoreLocation.framework/Versions" } ] }, { "value": 452, "name": "CoreMedia.framework", "path": "Frameworks/CoreMedia.framework", "children": [ { "value": 440, "name": "Versions", "path": "Frameworks/CoreMedia.framework/Versions" } ] }, { "value": 2876, "name": "CoreMediaIO.framework", "path": "Frameworks/CoreMediaIO.framework", "children": [ { "value": 2864, "name": "Versions", "path": "Frameworks/CoreMediaIO.framework/Versions" } ] }, { "value": 320, "name": "CoreMIDI.framework", "path": "Frameworks/CoreMIDI.framework", "children": [ { "value": 308, "name": "Versions", "path": "Frameworks/CoreMIDI.framework/Versions" } ] }, { "value": 20, "name": "CoreMIDIServer.framework", "path": "Frameworks/CoreMIDIServer.framework", "children": [ { "value": 12, "name": "Versions", "path": "Frameworks/CoreMIDIServer.framework/Versions" } ] }, { "value": 12024, "name": "CoreServices.framework", "path": "Frameworks/CoreServices.framework", "children": [ { "value": 12012, "name": "Versions", "path": "Frameworks/CoreServices.framework/Versions" } ] }, { "value": 1472, "name": "CoreText.framework", "path": "Frameworks/CoreText.framework", "children": [ { "value": 1464, "name": "Versions", "path": "Frameworks/CoreText.framework/Versions" } ] }, { "value": 204, "name": "CoreVideo.framework", "path": "Frameworks/CoreVideo.framework", "children": [ { "value": 196, "name": "Versions", "path": "Frameworks/CoreVideo.framework/Versions" } ] }, { "value": 520, "name": "CoreWiFi.framework", "path": "Frameworks/CoreWiFi.framework", "children": [ { "value": 512, "name": "Versions", "path": "Frameworks/CoreWiFi.framework/Versions" } ] }, { "value": 536, "name": "CoreWLAN.framework", "path": "Frameworks/CoreWLAN.framework", "children": [ { "value": 528, "name": "Versions", "path": "Frameworks/CoreWLAN.framework/Versions" } ] }, { "value": 88, "name": "DirectoryService.framework", "path": "Frameworks/DirectoryService.framework", "children": [ { "value": 80, "name": "Versions", "path": "Frameworks/DirectoryService.framework/Versions" } ] }, { "value": 1352, "name": "DiscRecording.framework", "path": "Frameworks/DiscRecording.framework", "children": [ { "value": 1344, "name": "Versions", "path": "Frameworks/DiscRecording.framework/Versions" } ] }, { "value": 1384, "name": "DiscRecordingUI.framework", "path": "Frameworks/DiscRecordingUI.framework", "children": [ { "value": 1376, "name": "Versions", "path": "Frameworks/DiscRecordingUI.framework/Versions" } ] }, { "value": 76, "name": "DiskArbitration.framework", "path": "Frameworks/DiskArbitration.framework", "children": [ { "value": 68, "name": "Versions", "path": "Frameworks/DiskArbitration.framework/Versions" } ] }, { "value": 32, "name": "DrawSprocket.framework", "path": "Frameworks/DrawSprocket.framework", "children": [ { "value": 24, "name": "Versions", "path": "Frameworks/DrawSprocket.framework/Versions" } ] }, { "value": 20, "name": "DVComponentGlue.framework", "path": "Frameworks/DVComponentGlue.framework", "children": [ { "value": 12, "name": "Versions", "path": "Frameworks/DVComponentGlue.framework/Versions" } ] }, { "value": 1420, "name": "DVDPlayback.framework", "path": "Frameworks/DVDPlayback.framework", "children": [ { "value": 1412, "name": "Versions", "path": "Frameworks/DVDPlayback.framework/Versions" } ] }, { "value": 232, "name": "EventKit.framework", "path": "Frameworks/EventKit.framework", "children": [ { "value": 224, "name": "Versions", "path": "Frameworks/EventKit.framework/Versions" } ] }, { "value": 32, "name": "ExceptionHandling.framework", "path": "Frameworks/ExceptionHandling.framework", "children": [ { "value": 24, "name": "Versions", "path": "Frameworks/ExceptionHandling.framework/Versions" } ] }, { "value": 32, "name": "ForceFeedback.framework", "path": "Frameworks/ForceFeedback.framework", "children": [ { "value": 24, "name": "Versions", "path": "Frameworks/ForceFeedback.framework/Versions" } ] }, { "value": 4228, "name": "Foundation.framework", "path": "Frameworks/Foundation.framework", "children": [ { "value": 4216, "name": "Versions", "path": "Frameworks/Foundation.framework/Versions" } ] }, { "value": 52, "name": "FWAUserLib.framework", "path": "Frameworks/FWAUserLib.framework", "children": [ { "value": 44, "name": "Versions", "path": "Frameworks/FWAUserLib.framework/Versions" } ] }, { "value": 60, "name": "GameController.framework", "path": "Frameworks/GameController.framework", "children": [ { "value": 52, "name": "Versions", "path": "Frameworks/GameController.framework/Versions" } ] }, { "value": 44244, "name": "GameKit.framework", "path": "Frameworks/GameKit.framework", "children": [ { "value": 44236, "name": "Versions", "path": "Frameworks/GameKit.framework/Versions" } ] }, { "value": 132, "name": "GLKit.framework", "path": "Frameworks/GLKit.framework", "children": [ { "value": 124, "name": "Versions", "path": "Frameworks/GLKit.framework/Versions" } ] }, { "value": 1740, "name": "GLUT.framework", "path": "Frameworks/GLUT.framework", "children": [ { "value": 1732, "name": "Versions", "path": "Frameworks/GLUT.framework/Versions" } ] }, { "value": 280, "name": "GSS.framework", "path": "Frameworks/GSS.framework", "children": [ { "value": 272, "name": "Versions", "path": "Frameworks/GSS.framework/Versions" } ] }, { "value": 236, "name": "ICADevices.framework", "path": "Frameworks/ICADevices.framework", "children": [ { "value": 228, "name": "Versions", "path": "Frameworks/ICADevices.framework/Versions" } ] }, { "value": 392, "name": "ImageCaptureCore.framework", "path": "Frameworks/ImageCaptureCore.framework", "children": [ { "value": 384, "name": "Versions", "path": "Frameworks/ImageCaptureCore.framework/Versions" } ] }, { "value": 4008, "name": "ImageIO.framework", "path": "Frameworks/ImageIO.framework", "children": [ { "value": 4000, "name": "Versions", "path": "Frameworks/ImageIO.framework/Versions" } ] }, { "value": 104, "name": "IMServicePlugIn.framework", "path": "Frameworks/IMServicePlugIn.framework", "children": [ { "value": 28, "name": "IMServicePlugInAgent.app", "path": "Frameworks/IMServicePlugIn.framework/IMServicePlugInAgent.app" }, { "value": 64, "name": "Versions", "path": "Frameworks/IMServicePlugIn.framework/Versions" } ] }, { "value": 368, "name": "InputMethodKit.framework", "path": "Frameworks/InputMethodKit.framework", "children": [ { "value": 356, "name": "Versions", "path": "Frameworks/InputMethodKit.framework/Versions" } ] }, { "value": 360, "name": "InstallerPlugins.framework", "path": "Frameworks/InstallerPlugins.framework", "children": [ { "value": 352, "name": "Versions", "path": "Frameworks/InstallerPlugins.framework/Versions" } ] }, { "value": 76, "name": "InstantMessage.framework", "path": "Frameworks/InstantMessage.framework", "children": [ { "value": 68, "name": "Versions", "path": "Frameworks/InstantMessage.framework/Versions" } ] }, { "value": 904, "name": "IOBluetooth.framework", "path": "Frameworks/IOBluetooth.framework", "children": [ { "value": 892, "name": "Versions", "path": "Frameworks/IOBluetooth.framework/Versions" } ] }, { "value": 4592, "name": "IOBluetoothUI.framework", "path": "Frameworks/IOBluetoothUI.framework", "children": [ { "value": 4584, "name": "Versions", "path": "Frameworks/IOBluetoothUI.framework/Versions" } ] }, { "value": 688, "name": "IOKit.framework", "path": "Frameworks/IOKit.framework", "children": [ { "value": 680, "name": "Versions", "path": "Frameworks/IOKit.framework/Versions" } ] }, { "value": 48, "name": "IOSurface.framework", "path": "Frameworks/IOSurface.framework", "children": [ { "value": 40, "name": "Versions", "path": "Frameworks/IOSurface.framework/Versions" } ] }, { "value": 28, "name": "JavaFrameEmbedding.framework", "path": "Frameworks/JavaFrameEmbedding.framework", "children": [ { "value": 20, "name": "Versions", "path": "Frameworks/JavaFrameEmbedding.framework/Versions" } ] }, { "value": 3336, "name": "JavaScriptCore.framework", "path": "Frameworks/JavaScriptCore.framework", "children": [ { "value": 3328, "name": "Versions", "path": "Frameworks/JavaScriptCore.framework/Versions" } ] }, { "value": 2756, "name": "JavaVM.framework", "path": "Frameworks/JavaVM.framework", "children": [ { "value": 2728, "name": "Versions", "path": "Frameworks/JavaVM.framework/Versions" } ] }, { "value": 168, "name": "Kerberos.framework", "path": "Frameworks/Kerberos.framework", "children": [ { "value": 160, "name": "Versions", "path": "Frameworks/Kerberos.framework/Versions" } ] }, { "value": 36, "name": "Kernel.framework", "path": "Frameworks/Kernel.framework", "children": [ { "value": 32, "name": "Versions", "path": "Frameworks/Kernel.framework/Versions" } ] }, { "value": 200, "name": "LatentSemanticMapping.framework", "path": "Frameworks/LatentSemanticMapping.framework", "children": [ { "value": 192, "name": "Versions", "path": "Frameworks/LatentSemanticMapping.framework/Versions" } ] }, { "value": 284, "name": "LDAP.framework", "path": "Frameworks/LDAP.framework", "children": [ { "value": 276, "name": "Versions", "path": "Frameworks/LDAP.framework/Versions" } ] }, { "value": 1872, "name": "MapKit.framework", "path": "Frameworks/MapKit.framework", "children": [ { "value": 1864, "name": "Versions", "path": "Frameworks/MapKit.framework/Versions" } ] }, { "value": 56, "name": "MediaAccessibility.framework", "path": "Frameworks/MediaAccessibility.framework", "children": [ { "value": 48, "name": "Versions", "path": "Frameworks/MediaAccessibility.framework/Versions" } ] }, { "value": 100, "name": "MediaLibrary.framework", "path": "Frameworks/MediaLibrary.framework", "children": [ { "value": 88, "name": "Versions", "path": "Frameworks/MediaLibrary.framework/Versions" } ] }, { "value": 3708, "name": "MediaToolbox.framework", "path": "Frameworks/MediaToolbox.framework", "children": [ { "value": 3700, "name": "Versions", "path": "Frameworks/MediaToolbox.framework/Versions" } ] }, { "value": 16, "name": "Message.framework", "path": "Frameworks/Message.framework", "children": [ { "value": 12, "name": "Versions", "path": "Frameworks/Message.framework/Versions" } ] }, { "value": 64, "name": "NetFS.framework", "path": "Frameworks/NetFS.framework", "children": [ { "value": 56, "name": "Versions", "path": "Frameworks/NetFS.framework/Versions" } ] }, { "value": 192, "name": "OpenAL.framework", "path": "Frameworks/OpenAL.framework", "children": [ { "value": 184, "name": "Versions", "path": "Frameworks/OpenAL.framework/Versions" } ] }, { "value": 78380, "name": "OpenCL.framework", "path": "Frameworks/OpenCL.framework", "children": [ { "value": 78368, "name": "Versions", "path": "Frameworks/OpenCL.framework/Versions" } ] }, { "value": 288, "name": "OpenDirectory.framework", "path": "Frameworks/OpenDirectory.framework", "children": [ { "value": 252, "name": "Versions", "path": "Frameworks/OpenDirectory.framework/Versions" } ] }, { "value": 25628, "name": "OpenGL.framework", "path": "Frameworks/OpenGL.framework", "children": [ { "value": 25616, "name": "Versions", "path": "Frameworks/OpenGL.framework/Versions" } ] }, { "value": 1136, "name": "OSAKit.framework", "path": "Frameworks/OSAKit.framework", "children": [ { "value": 1128, "name": "Versions", "path": "Frameworks/OSAKit.framework/Versions" } ] }, { "value": 88, "name": "PCSC.framework", "path": "Frameworks/PCSC.framework", "children": [ { "value": 80, "name": "Versions", "path": "Frameworks/PCSC.framework/Versions" } ] }, { "value": 192, "name": "PreferencePanes.framework", "path": "Frameworks/PreferencePanes.framework", "children": [ { "value": 180, "name": "Versions", "path": "Frameworks/PreferencePanes.framework/Versions" } ] }, { "value": 1012, "name": "PubSub.framework", "path": "Frameworks/PubSub.framework", "children": [ { "value": 1004, "name": "Versions", "path": "Frameworks/PubSub.framework/Versions" } ] }, { "value": 129696, "name": "Python.framework", "path": "Frameworks/Python.framework", "children": [ { "value": 129684, "name": "Versions", "path": "Frameworks/Python.framework/Versions" } ] }, { "value": 2516, "name": "QTKit.framework", "path": "Frameworks/QTKit.framework", "children": [ { "value": 2504, "name": "Versions", "path": "Frameworks/QTKit.framework/Versions" } ] }, { "value": 23712, "name": "Quartz.framework", "path": "Frameworks/Quartz.framework", "children": [ { "value": 23700, "name": "Versions", "path": "Frameworks/Quartz.framework/Versions" } ] }, { "value": 6644, "name": "QuartzCore.framework", "path": "Frameworks/QuartzCore.framework", "children": [ { "value": 6632, "name": "Versions", "path": "Frameworks/QuartzCore.framework/Versions" } ] }, { "value": 3960, "name": "QuickLook.framework", "path": "Frameworks/QuickLook.framework", "children": [ { "value": 3948, "name": "Versions", "path": "Frameworks/QuickLook.framework/Versions" } ] }, { "value": 3460, "name": "QuickTime.framework", "path": "Frameworks/QuickTime.framework", "children": [ { "value": 3452, "name": "Versions", "path": "Frameworks/QuickTime.framework/Versions" } ] }, { "value": 13168, "name": "Ruby.framework", "path": "Frameworks/Ruby.framework", "children": [ { "value": 13160, "name": "Versions", "path": "Frameworks/Ruby.framework/Versions" } ] }, { "value": 204, "name": "RubyCocoa.framework", "path": "Frameworks/RubyCocoa.framework", "children": [ { "value": 196, "name": "Versions", "path": "Frameworks/RubyCocoa.framework/Versions" } ] }, { "value": 3628, "name": "SceneKit.framework", "path": "Frameworks/SceneKit.framework", "children": [ { "value": 3616, "name": "Versions", "path": "Frameworks/SceneKit.framework/Versions" } ] }, { "value": 1812, "name": "ScreenSaver.framework", "path": "Frameworks/ScreenSaver.framework", "children": [ { "value": 1804, "name": "Versions", "path": "Frameworks/ScreenSaver.framework/Versions" } ] }, { "value": 12, "name": "Scripting.framework", "path": "Frameworks/Scripting.framework", "children": [ { "value": 4, "name": "Versions", "path": "Frameworks/Scripting.framework/Versions" } ] }, { "value": 144, "name": "ScriptingBridge.framework", "path": "Frameworks/ScriptingBridge.framework", "children": [ { "value": 136, "name": "Versions", "path": "Frameworks/ScriptingBridge.framework/Versions" } ] }, { "value": 6224, "name": "Security.framework", "path": "Frameworks/Security.framework", "children": [ { "value": 124, "name": "PlugIns", "path": "Frameworks/Security.framework/PlugIns" }, { "value": 6088, "name": "Versions", "path": "Frameworks/Security.framework/Versions" } ] }, { "value": 2076, "name": "SecurityFoundation.framework", "path": "Frameworks/SecurityFoundation.framework", "children": [ { "value": 2068, "name": "Versions", "path": "Frameworks/SecurityFoundation.framework/Versions" } ] }, { "value": 8660, "name": "SecurityInterface.framework", "path": "Frameworks/SecurityInterface.framework", "children": [ { "value": 8652, "name": "Versions", "path": "Frameworks/SecurityInterface.framework/Versions" } ] }, { "value": 88, "name": "ServiceManagement.framework", "path": "Frameworks/ServiceManagement.framework", "children": [ { "value": 68, "name": "Versions", "path": "Frameworks/ServiceManagement.framework/Versions" }, { "value": 12, "name": "XPCServices", "path": "Frameworks/ServiceManagement.framework/XPCServices" } ] }, { "value": 1112, "name": "Social.framework", "path": "Frameworks/Social.framework", "children": [ { "value": 516, "name": "Versions", "path": "Frameworks/Social.framework/Versions" }, { "value": 588, "name": "XPCServices", "path": "Frameworks/Social.framework/XPCServices" } ] }, { "value": 500, "name": "SpriteKit.framework", "path": "Frameworks/SpriteKit.framework", "children": [ { "value": 492, "name": "Versions", "path": "Frameworks/SpriteKit.framework/Versions" } ] }, { "value": 96, "name": "StoreKit.framework", "path": "Frameworks/StoreKit.framework", "children": [ { "value": 88, "name": "Versions", "path": "Frameworks/StoreKit.framework/Versions" } ] }, { "value": 1608, "name": "SyncServices.framework", "path": "Frameworks/SyncServices.framework", "children": [ { "value": 1600, "name": "Versions", "path": "Frameworks/SyncServices.framework/Versions" } ] }, { "value": 44, "name": "System.framework", "path": "Frameworks/System.framework", "children": [ { "value": 36, "name": "Versions", "path": "Frameworks/System.framework/Versions" } ] }, { "value": 576, "name": "SystemConfiguration.framework", "path": "Frameworks/SystemConfiguration.framework", "children": [ { "value": 568, "name": "Versions", "path": "Frameworks/SystemConfiguration.framework/Versions" } ] }, { "value": 3208, "name": "Tcl.framework", "path": "Frameworks/Tcl.framework", "children": [ { "value": 3200, "name": "Versions", "path": "Frameworks/Tcl.framework/Versions" } ] }, { "value": 3172, "name": "Tk.framework", "path": "Frameworks/Tk.framework", "children": [ { "value": 3160, "name": "Versions", "path": "Frameworks/Tk.framework/Versions" } ] }, { "value": 76, "name": "TWAIN.framework", "path": "Frameworks/TWAIN.framework", "children": [ { "value": 68, "name": "Versions", "path": "Frameworks/TWAIN.framework/Versions" } ] }, { "value": 24, "name": "VideoDecodeAcceleration.framework", "path": "Frameworks/VideoDecodeAcceleration.framework", "children": [ { "value": 16, "name": "Versions", "path": "Frameworks/VideoDecodeAcceleration.framework/Versions" } ] }, { "value": 3648, "name": "VideoToolbox.framework", "path": "Frameworks/VideoToolbox.framework", "children": [ { "value": 3636, "name": "Versions", "path": "Frameworks/VideoToolbox.framework/Versions" } ] }, { "value": 17668, "name": "WebKit.framework", "path": "Frameworks/WebKit.framework", "children": [ { "value": 17512, "name": "Versions", "path": "Frameworks/WebKit.framework/Versions" }, { "value": 116, "name": "WebKitPluginHost.app", "path": "Frameworks/WebKit.framework/WebKitPluginHost.app" } ] } ] }, { "value": 1076, "name": "Graphics", "path": "Graphics", "children": [ { "value": 876, "name": "QuartzComposer Patches", "path": "Graphics/QuartzComposer Patches", "children": [ { "value": 148, "name": "Backdrops.plugin", "path": "Graphics/QuartzComposer Patches/Backdrops.plugin" }, { "value": 36, "name": "FaceEffects.plugin", "path": "Graphics/QuartzComposer Patches/FaceEffects.plugin" } ] }, { "value": 200, "name": "QuartzComposer Plug-Ins", "path": "Graphics/QuartzComposer Plug-Ins", "children": [ { "value": 200, "name": "WOTD.plugin", "path": "Graphics/QuartzComposer Plug-Ins/WOTD.plugin" } ] } ] }, { "value": 0, "name": "IdentityServices", "path": "IdentityServices", "children": [ { "value": 0, "name": "ServiceDefinitions", "path": "IdentityServices/ServiceDefinitions" } ] }, { "value": 2900, "name": "ImageCapture", "path": "ImageCapture", "children": [ { "value": 200, "name": "Automatic Tasks", "path": "ImageCapture/Automatic Tasks", "children": [ { "value": 52, "name": "Build Web Page.app", "path": "ImageCapture/Automatic Tasks/Build Web Page.app" }, { "value": 148, "name": "MakePDF.app", "path": "ImageCapture/Automatic Tasks/MakePDF.app" } ] }, { "value": 480, "name": "Devices", "path": "ImageCapture/Devices", "children": [ { "value": 84, "name": "AirScanScanner.app", "path": "ImageCapture/Devices/AirScanScanner.app" }, { "value": 44, "name": "MassStorageCamera.app", "path": "ImageCapture/Devices/MassStorageCamera.app" }, { "value": 124, "name": "PTPCamera.app", "path": "ImageCapture/Devices/PTPCamera.app" }, { "value": 36, "name": "Type4Camera.app", "path": "ImageCapture/Devices/Type4Camera.app" }, { "value": 32, "name": "Type5Camera.app", "path": "ImageCapture/Devices/Type5Camera.app" }, { "value": 36, "name": "Type8Camera.app", "path": "ImageCapture/Devices/Type8Camera.app" }, { "value": 124, "name": "VirtualScanner.app", "path": "ImageCapture/Devices/VirtualScanner.app" } ] }, { "value": 2212, "name": "Support", "path": "ImageCapture/Support", "children": [ { "value": 432, "name": "Application", "path": "ImageCapture/Support/Application" }, { "value": 1608, "name": "Icons", "path": "ImageCapture/Support/Icons" }, { "value": 172, "name": "Image Capture Extension.app", "path": "ImageCapture/Support/Image Capture Extension.app" }, { "value": 3184, "name": "CoreDeploy.bundle", "path": "Java/Support/CoreDeploy.bundle" }, { "value": 2732, "name": "Deploy.bundle", "path": "Java/Support/Deploy.bundle" } ] }, { "value": 8, "name": "Tools", "path": "ImageCapture/Tools" }, { "value": 0, "name": "TWAIN Data Sources", "path": "ImageCapture/TWAIN Data Sources" } ] }, { "value": 23668, "name": "InputMethods", "path": "InputMethods", "children": [ { "value": 1400, "name": "50onPaletteServer.app", "path": "InputMethods/50onPaletteServer.app", "children": [ { "value": 1400, "name": "Contents", "path": "InputMethods/50onPaletteServer.app/Contents" } ] }, { "value": 5728, "name": "CharacterPalette.app", "path": "InputMethods/CharacterPalette.app", "children": [ { "value": 5728, "name": "Contents", "path": "InputMethods/CharacterPalette.app/Contents" } ] }, { "value": 2476, "name": "DictationIM.app", "path": "InputMethods/DictationIM.app", "children": [ { "value": 2476, "name": "Contents", "path": "InputMethods/DictationIM.app/Contents" } ] }, { "value": 88, "name": "InkServer.app", "path": "InputMethods/InkServer.app", "children": [ { "value": 88, "name": "Contents", "path": "InputMethods/InkServer.app/Contents" } ] }, { "value": 736, "name": "KeyboardViewer.app", "path": "InputMethods/KeyboardViewer.app", "children": [ { "value": 736, "name": "Contents", "path": "InputMethods/KeyboardViewer.app/Contents" } ] }, { "value": 1144, "name": "KoreanIM.app", "path": "InputMethods/KoreanIM.app", "children": [ { "value": 1144, "name": "Contents", "path": "InputMethods/KoreanIM.app/Contents" } ] }, { "value": 2484, "name": "Kotoeri.app", "path": "InputMethods/Kotoeri.app", "children": [ { "value": 2484, "name": "Contents", "path": "InputMethods/Kotoeri.app/Contents" } ] }, { "value": 40, "name": "PluginIM.app", "path": "InputMethods/PluginIM.app", "children": [ { "value": 40, "name": "Contents", "path": "InputMethods/PluginIM.app/Contents" } ] }, { "value": 24, "name": "PressAndHold.app", "path": "InputMethods/PressAndHold.app", "children": [ { "value": 24, "name": "Contents", "path": "InputMethods/PressAndHold.app/Contents" } ] }, { "value": 64, "name": "SCIM.app", "path": "InputMethods/SCIM.app", "children": [ { "value": 64, "name": "Contents", "path": "InputMethods/SCIM.app/Contents" } ] }, { "value": 6916, "name": "Switch Control.app", "path": "InputMethods/Switch Control.app", "children": [ { "value": 6916, "name": "Contents", "path": "InputMethods/Switch Control.app/Contents" } ] }, { "value": 104, "name": "TamilIM.app", "path": "InputMethods/TamilIM.app", "children": [ { "value": 104, "name": "Contents", "path": "InputMethods/TamilIM.app/Contents" } ] }, { "value": 92, "name": "TCIM.app", "path": "InputMethods/TCIM.app", "children": [ { "value": 92, "name": "Contents", "path": "InputMethods/TCIM.app/Contents" } ] }, { "value": 1820, "name": "TrackpadIM.app", "path": "InputMethods/TrackpadIM.app", "children": [ { "value": 1820, "name": "Contents", "path": "InputMethods/TrackpadIM.app/Contents" } ] }, { "value": 552, "name": "VietnameseIM.app", "path": "InputMethods/VietnameseIM.app", "children": [ { "value": 552, "name": "Contents", "path": "InputMethods/VietnameseIM.app/Contents" } ] } ] }, { "value": 17668, "name": "InternetAccounts", "path": "InternetAccounts", "children": [ { "value": 336, "name": "126.iaplugin", "path": "InternetAccounts/126.iaplugin", "children": [ { "value": 336, "name": "Contents", "path": "InternetAccounts/126.iaplugin/Contents" } ] }, { "value": 332, "name": "163.iaplugin", "path": "InternetAccounts/163.iaplugin", "children": [ { "value": 332, "name": "Contents", "path": "InternetAccounts/163.iaplugin/Contents" } ] }, { "value": 48, "name": "AddressBook.iaplugin", "path": "InternetAccounts/AddressBook.iaplugin", "children": [ { "value": 48, "name": "Contents", "path": "InternetAccounts/AddressBook.iaplugin/Contents" } ] }, { "value": 304, "name": "AOL.iaplugin", "path": "InternetAccounts/AOL.iaplugin", "children": [ { "value": 304, "name": "Contents", "path": "InternetAccounts/AOL.iaplugin/Contents" } ] }, { "value": 44, "name": "Calendar.iaplugin", "path": "InternetAccounts/Calendar.iaplugin", "children": [ { "value": 44, "name": "Contents", "path": "InternetAccounts/Calendar.iaplugin/Contents" } ] }, { "value": 784, "name": "Exchange.iaplugin", "path": "InternetAccounts/Exchange.iaplugin", "children": [ { "value": 784, "name": "Contents", "path": "InternetAccounts/Exchange.iaplugin/Contents" } ] }, { "value": 996, "name": "Facebook.iaplugin", "path": "InternetAccounts/Facebook.iaplugin", "children": [ { "value": 996, "name": "Contents", "path": "InternetAccounts/Facebook.iaplugin/Contents" } ] }, { "value": 596, "name": "Flickr.iaplugin", "path": "InternetAccounts/Flickr.iaplugin", "children": [ { "value": 596, "name": "Contents", "path": "InternetAccounts/Flickr.iaplugin/Contents" } ] }, { "value": 384, "name": "Google.iaplugin", "path": "InternetAccounts/Google.iaplugin", "children": [ { "value": 384, "name": "Contents", "path": "InternetAccounts/Google.iaplugin/Contents" } ] }, { "value": 32, "name": "iChat.iaplugin", "path": "InternetAccounts/iChat.iaplugin", "children": [ { "value": 32, "name": "Contents", "path": "InternetAccounts/iChat.iaplugin/Contents" } ] }, { "value": 7436, "name": "iCloud.iaplugin", "path": "InternetAccounts/iCloud.iaplugin", "children": [ { "value": 7436, "name": "Contents", "path": "InternetAccounts/iCloud.iaplugin/Contents" } ] }, { "value": 840, "name": "LinkedIn.iaplugin", "path": "InternetAccounts/LinkedIn.iaplugin", "children": [ { "value": 840, "name": "Contents", "path": "InternetAccounts/LinkedIn.iaplugin/Contents" } ] }, { "value": 28, "name": "Mail.iaplugin", "path": "InternetAccounts/Mail.iaplugin", "children": [ { "value": 28, "name": "Contents", "path": "InternetAccounts/Mail.iaplugin/Contents" } ] }, { "value": 32, "name": "Notes.iaplugin", "path": "InternetAccounts/Notes.iaplugin", "children": [ { "value": 32, "name": "Contents", "path": "InternetAccounts/Notes.iaplugin/Contents" } ] }, { "value": 416, "name": "OSXServer.iaplugin", "path": "InternetAccounts/OSXServer.iaplugin", "children": [ { "value": 416, "name": "Contents", "path": "InternetAccounts/OSXServer.iaplugin/Contents" } ] }, { "value": 376, "name": "QQ.iaplugin", "path": "InternetAccounts/QQ.iaplugin", "children": [ { "value": 376, "name": "Contents", "path": "InternetAccounts/QQ.iaplugin/Contents" } ] }, { "value": 32, "name": "Reminders.iaplugin", "path": "InternetAccounts/Reminders.iaplugin", "children": [ { "value": 32, "name": "Contents", "path": "InternetAccounts/Reminders.iaplugin/Contents" } ] }, { "value": 1024, "name": "SetupPlugins", "path": "InternetAccounts/SetupPlugins", "children": [ { "value": 412, "name": "CalUIAccountSetup.iaplugin", "path": "InternetAccounts/SetupPlugins/CalUIAccountSetup.iaplugin" }, { "value": 580, "name": "Contacts.iaplugin", "path": "InternetAccounts/SetupPlugins/Contacts.iaplugin" }, { "value": 8, "name": "MailAccountSetup.iaplugin", "path": "InternetAccounts/SetupPlugins/MailAccountSetup.iaplugin" }, { "value": 16, "name": "Messages.iaplugin", "path": "InternetAccounts/SetupPlugins/Messages.iaplugin" }, { "value": 8, "name": "NotesAccountSetup.iaplugin", "path": "InternetAccounts/SetupPlugins/NotesAccountSetup.iaplugin" } ] }, { "value": 392, "name": "TencentWeibo.iaplugin", "path": "InternetAccounts/TencentWeibo.iaplugin", "children": [ { "value": 392, "name": "Contents", "path": "InternetAccounts/TencentWeibo.iaplugin/Contents" } ] }, { "value": 612, "name": "Tudou.iaplugin", "path": "InternetAccounts/Tudou.iaplugin", "children": [ { "value": 612, "name": "Contents", "path": "InternetAccounts/Tudou.iaplugin/Contents" } ] }, { "value": 608, "name": "TwitterPlugin.iaplugin", "path": "InternetAccounts/TwitterPlugin.iaplugin", "children": [ { "value": 608, "name": "Contents", "path": "InternetAccounts/TwitterPlugin.iaplugin/Contents" } ] }, { "value": 584, "name": "Vimeo.iaplugin", "path": "InternetAccounts/Vimeo.iaplugin", "children": [ { "value": 584, "name": "Contents", "path": "InternetAccounts/Vimeo.iaplugin/Contents" } ] }, { "value": 468, "name": "Weibo.iaplugin", "path": "InternetAccounts/Weibo.iaplugin", "children": [ { "value": 468, "name": "Contents", "path": "InternetAccounts/Weibo.iaplugin/Contents" } ] }, { "value": 316, "name": "Yahoo.iaplugin", "path": "InternetAccounts/Yahoo.iaplugin", "children": [ { "value": 316, "name": "Contents", "path": "InternetAccounts/Yahoo.iaplugin/Contents" } ] }, { "value": 648, "name": "Youku.iaplugin", "path": "InternetAccounts/Youku.iaplugin", "children": [ { "value": 648, "name": "Contents", "path": "InternetAccounts/Youku.iaplugin/Contents" } ] } ] }, { "value": 68776, "name": "Java", "path": "Java", "children": [ { "value": 8848, "name": "Extensions", "path": "Java/Extensions" }, { "value": 54012, "name": "JavaVirtualMachines", "path": "Java/JavaVirtualMachines", "children": [ { "value": 54012, "name": "1.6.0.jdk", "path": "Java/JavaVirtualMachines/1.6.0.jdk" } ] }, { "value": 5916, "name": "Support", "path": "Java/Support", "children": [ { "value": 432, "name": "Application", "path": "ImageCapture/Support/Application" }, { "value": 1608, "name": "Icons", "path": "ImageCapture/Support/Icons" }, { "value": 172, "name": "Image Capture Extension.app", "path": "ImageCapture/Support/Image Capture Extension.app" }, { "value": 3184, "name": "CoreDeploy.bundle", "path": "Java/Support/CoreDeploy.bundle" }, { "value": 2732, "name": "Deploy.bundle", "path": "Java/Support/Deploy.bundle" } ] } ] }, { "value": 48, "name": "KerberosPlugins", "path": "KerberosPlugins", "children": [ { "value": 48, "name": "KerberosFrameworkPlugins", "path": "KerberosPlugins/KerberosFrameworkPlugins", "children": [ { "value": 8, "name": "heimdalodpac.bundle", "path": "KerberosPlugins/KerberosFrameworkPlugins/heimdalodpac.bundle" }, { "value": 16, "name": "LKDCLocate.bundle", "path": "KerberosPlugins/KerberosFrameworkPlugins/LKDCLocate.bundle" }, { "value": 12, "name": "Reachability.bundle", "path": "KerberosPlugins/KerberosFrameworkPlugins/Reachability.bundle" }, { "value": 12, "name": "SCKerberosConfig.bundle", "path": "KerberosPlugins/KerberosFrameworkPlugins/SCKerberosConfig.bundle" } ] } ] }, { "value": 276, "name": "KeyboardLayouts", "path": "KeyboardLayouts", "children": [ { "value": 276, "name": "AppleKeyboardLayouts.bundle", "path": "KeyboardLayouts/AppleKeyboardLayouts.bundle", "children": [ { "value": 276, "name": "Contents", "path": "KeyboardLayouts/AppleKeyboardLayouts.bundle/Contents" } ] } ] }, { "value": 408, "name": "Keychains", "path": "Keychains" }, { "value": 4, "name": "LaunchAgents", "path": "LaunchAgents" }, { "value": 20, "name": "LaunchDaemons", "path": "LaunchDaemons" }, { "value": 96532, "name": "LinguisticData", "path": "LinguisticData", "children": [ { "value": 8, "name": "da", "path": "LinguisticData/da" }, { "value": 16476, "name": "de", "path": "LinguisticData/de" }, { "value": 9788, "name": "en", "path": "LinguisticData/en", "children": [ { "value": 36, "name": "GB", "path": "LinguisticData/en/GB" }, { "value": 28, "name": "US", "path": "LinguisticData/en/US" } ] }, { "value": 10276, "name": "es", "path": "LinguisticData/es" }, { "value": 0, "name": "fi", "path": "LinguisticData/fi" }, { "value": 12468, "name": "fr", "path": "LinguisticData/fr" }, { "value": 7336, "name": "it", "path": "LinguisticData/it" }, { "value": 192, "name": "ko", "path": "LinguisticData/ko" }, { "value": 48, "name": "nl", "path": "LinguisticData/nl" }, { "value": 112, "name": "no", "path": "LinguisticData/no" }, { "value": 4496, "name": "pt", "path": "LinguisticData/pt" }, { "value": 24, "name": "ru", "path": "LinguisticData/ru" }, { "value": 20, "name": "sv", "path": "LinguisticData/sv" }, { "value": 0, "name": "tr", "path": "LinguisticData/tr" }, { "value": 35288, "name": "zh", "path": "LinguisticData/zh", "children": [ { "value": 2604, "name": "Hans", "path": "LinguisticData/zh/Hans" }, { "value": 2868, "name": "Hant", "path": "LinguisticData/zh/Hant" } ] } ] }, { "value": 4, "name": "LocationBundles", "path": "LocationBundles" }, { "value": 800, "name": "LoginPlugins", "path": "LoginPlugins", "children": [ { "value": 348, "name": "BezelServices.loginPlugin", "path": "LoginPlugins/BezelServices.loginPlugin", "children": [ { "value": 348, "name": "Contents", "path": "LoginPlugins/BezelServices.loginPlugin/Contents" } ] }, { "value": 108, "name": "DisplayServices.loginPlugin", "path": "LoginPlugins/DisplayServices.loginPlugin", "children": [ { "value": 108, "name": "Contents", "path": "LoginPlugins/DisplayServices.loginPlugin/Contents" } ] }, { "value": 344, "name": "FSDisconnect.loginPlugin", "path": "LoginPlugins/FSDisconnect.loginPlugin", "children": [ { "value": 344, "name": "Contents", "path": "LoginPlugins/FSDisconnect.loginPlugin/Contents" } ] } ] }, { "value": 188, "name": "Messages", "path": "Messages", "children": [ { "value": 188, "name": "PlugIns", "path": "Messages/PlugIns", "children": [ { "value": 12, "name": "Balloons.transcriptstyle", "path": "Messages/PlugIns/Balloons.transcriptstyle" }, { "value": 8, "name": "Boxes.transcriptstyle", "path": "Messages/PlugIns/Boxes.transcriptstyle" }, { "value": 8, "name": "Compact.transcriptstyle", "path": "Messages/PlugIns/Compact.transcriptstyle" }, { "value": 76, "name": "FaceTime.imservice", "path": "Messages/PlugIns/FaceTime.imservice" }, { "value": 84, "name": "iMessage.imservice", "path": "Messages/PlugIns/iMessage.imservice" } ] } ] }, { "value": 0, "name": "Metadata", "path": "Metadata", "children": [ { "value": 0, "name": "com.apple.finder.legacy.mdlabels", "path": "Metadata/com.apple.finder.legacy.mdlabels", "children": [ { "value": 0, "name": "Contents", "path": "Metadata/com.apple.finder.legacy.mdlabels/Contents" } ] } ] }, { "value": 3276, "name": "MonitorPanels", "path": "MonitorPanels", "children": [ { "value": 860, "name": "AppleDisplay.monitorPanels", "path": "MonitorPanels/AppleDisplay.monitorPanels", "children": [ { "value": 860, "name": "Contents", "path": "MonitorPanels/AppleDisplay.monitorPanels/Contents" } ] }, { "value": 36, "name": "Arrange.monitorPanel", "path": "MonitorPanels/Arrange.monitorPanel", "children": [ { "value": 36, "name": "Contents", "path": "MonitorPanels/Arrange.monitorPanel/Contents" } ] }, { "value": 2080, "name": "Display.monitorPanel", "path": "MonitorPanels/Display.monitorPanel", "children": [ { "value": 2080, "name": "Contents", "path": "MonitorPanels/Display.monitorPanel/Contents" } ] }, { "value": 300, "name": "Profile.monitorPanel", "path": "MonitorPanels/Profile.monitorPanel", "children": [ { "value": 300, "name": "Contents", "path": "MonitorPanels/Profile.monitorPanel/Contents" } ] } ] }, { "value": 652, "name": "OpenDirectory", "path": "OpenDirectory", "children": [ { "value": 8, "name": "Configurations", "path": "OpenDirectory/Configurations" }, { "value": 0, "name": "DynamicNodeTemplates", "path": "OpenDirectory/DynamicNodeTemplates" }, { "value": 0, "name": "ManagedClient", "path": "OpenDirectory/ManagedClient" }, { "value": 12, "name": "Mappings", "path": "OpenDirectory/Mappings" }, { "value": 612, "name": "Modules", "path": "OpenDirectory/Modules", "children": [ { "value": 68, "name": "ActiveDirectory.bundle", "path": "OpenDirectory/Modules/ActiveDirectory.bundle" }, { "value": 12, "name": "AppleID.bundle", "path": "OpenDirectory/Modules/AppleID.bundle" }, { "value": 76, "name": "AppleODClientLDAP.bundle", "path": "OpenDirectory/Modules/AppleODClientLDAP.bundle" }, { "value": 68, "name": "AppleODClientPWS.bundle", "path": "OpenDirectory/Modules/AppleODClientPWS.bundle" }, { "value": 12, "name": "ConfigurationProfiles.bundle", "path": "OpenDirectory/Modules/ConfigurationProfiles.bundle" }, { "value": 20, "name": "configure.bundle", "path": "OpenDirectory/Modules/configure.bundle" }, { "value": 8, "name": "FDESupport.bundle", "path": "OpenDirectory/Modules/FDESupport.bundle" }, { "value": 12, "name": "Kerberosv5.bundle", "path": "OpenDirectory/Modules/Kerberosv5.bundle" }, { "value": 8, "name": "keychain.bundle", "path": "OpenDirectory/Modules/keychain.bundle" }, { "value": 44, "name": "ldap.bundle", "path": "OpenDirectory/Modules/ldap.bundle" }, { "value": 12, "name": "legacy.bundle", "path": "OpenDirectory/Modules/legacy.bundle" }, { "value": 12, "name": "NetLogon.bundle", "path": "OpenDirectory/Modules/NetLogon.bundle" }, { "value": 24, "name": "nis.bundle", "path": "OpenDirectory/Modules/nis.bundle" }, { "value": 68, "name": "PlistFile.bundle", "path": "OpenDirectory/Modules/PlistFile.bundle" }, { "value": 16, "name": "proxy.bundle", "path": "OpenDirectory/Modules/proxy.bundle" }, { "value": 20, "name": "search.bundle", "path": "OpenDirectory/Modules/search.bundle" }, { "value": 8, "name": "statistics.bundle", "path": "OpenDirectory/Modules/statistics.bundle" }, { "value": 124, "name": "SystemCache.bundle", "path": "OpenDirectory/Modules/SystemCache.bundle" } ] }, { "value": 8, "name": "Templates", "path": "OpenDirectory/Templates", "children": [ { "value": 0, "name": "LDAPv3", "path": "DirectoryServices/Templates/LDAPv3" } ] } ] }, { "value": 0, "name": "OpenSSL", "path": "OpenSSL", "children": [ { "value": 0, "name": "certs", "path": "OpenSSL/certs" }, { "value": 0, "name": "misc", "path": "OpenSSL/misc" }, { "value": 0, "name": "private", "path": "OpenSSL/private" } ] }, { "value": 8, "name": "PasswordServer Filters", "path": "PasswordServer Filters" }, { "value": 0, "name": "PerformanceMetrics", "path": "PerformanceMetrics" }, { "value": 57236, "name": "Perl", "path": "Perl", "children": [ { "value": 14848, "name": "5.12", "path": "Perl/5.12", "children": [ { "value": 20, "name": "App", "path": "Perl/5.12/App" }, { "value": 48, "name": "Archive", "path": "Perl/5.12/Archive" }, { "value": 12, "name": "Attribute", "path": "Perl/5.12/Attribute" }, { "value": 16, "name": "autodie", "path": "Perl/5.12/autodie" }, { "value": 56, "name": "B", "path": "Perl/5.12/B" }, { "value": 0, "name": "Carp", "path": "Perl/5.12/Carp" }, { "value": 32, "name": "CGI", "path": "Perl/5.12/CGI" }, { "value": 8, "name": "Class", "path": "Perl/5.12/Class" }, { "value": 12, "name": "Compress", "path": "Perl/5.12/Compress" }, { "value": 0, "name": "Config", "path": "Perl/5.12/Config" }, { "value": 120, "name": "CPAN", "path": "Perl/5.12/CPAN" }, { "value": 180, "name": "CPANPLUS", "path": "Perl/5.12/CPANPLUS" }, { "value": 7064, "name": "darwin-thread-multi-2level", "path": "Perl/5.12/darwin-thread-multi-2level" }, { "value": 0, "name": "DBM_Filter", "path": "Perl/5.12/DBM_Filter" }, { "value": 0, "name": "Devel", "path": "Perl/5.12/Devel" }, { "value": 0, "name": "Digest", "path": "Perl/5.12/Digest" }, { "value": 12, "name": "Encode", "path": "Perl/5.12/Encode" }, { "value": 0, "name": "encoding", "path": "Perl/5.12/encoding" }, { "value": 0, "name": "Exporter", "path": "Perl/5.12/Exporter" }, { "value": 224, "name": "ExtUtils", "path": "Perl/5.12/ExtUtils" }, { "value": 104, "name": "File", "path": "Perl/5.12/File" }, { "value": 12, "name": "Filter", "path": "Perl/5.12/Filter" }, { "value": 28, "name": "Getopt", "path": "Perl/5.12/Getopt" }, { "value": 24, "name": "I18N", "path": "Perl/5.12/I18N" }, { "value": 0, "name": "inc", "path": "Perl/5.12/inc" }, { "value": 152, "name": "IO", "path": "Perl/5.12/IO" }, { "value": 24, "name": "IPC", "path": "Perl/5.12/IPC" }, { "value": 60, "name": "Locale", "path": "Perl/5.12/Locale" }, { "value": 8, "name": "Log", "path": "Perl/5.12/Log" }, { "value": 144, "name": "Math", "path": "Perl/5.12/Math" }, { "value": 8, "name": "Memoize", "path": "Perl/5.12/Memoize" }, { "value": 284, "name": "Module", "path": "Perl/5.12/Module" }, { "value": 80, "name": "Net", "path": "Perl/5.12/Net" }, { "value": 8, "name": "Object", "path": "Perl/5.12/Object" }, { "value": 0, "name": "overload", "path": "Perl/5.12/overload" }, { "value": 0, "name": "Package", "path": "Perl/5.12/Package" }, { "value": 8, "name": "Params", "path": "Perl/5.12/Params" }, { "value": 0, "name": "Parse", "path": "Perl/5.12/Parse" }, { "value": 0, "name": "PerlIO", "path": "Perl/5.12/PerlIO" }, { "value": 312, "name": "Pod", "path": "Perl/5.12/Pod" }, { "value": 2452, "name": "pods", "path": "Perl/5.12/pods" }, { "value": 0, "name": "Search", "path": "Perl/5.12/Search" }, { "value": 32, "name": "TAP", "path": "Perl/5.12/TAP" }, { "value": 36, "name": "Term", "path": "Perl/5.12/Term" }, { "value": 60, "name": "Test", "path": "Perl/5.12/Test" }, { "value": 20, "name": "Text", "path": "Perl/5.12/Text" }, { "value": 8, "name": "Thread", "path": "Perl/5.12/Thread" }, { "value": 28, "name": "Tie", "path": "Perl/5.12/Tie" }, { "value": 8, "name": "Time", "path": "Perl/5.12/Time" }, { "value": 280, "name": "Unicode", "path": "Perl/5.12/Unicode" }, { "value": 2348, "name": "unicore", "path": "Perl/5.12/unicore" }, { "value": 8, "name": "User", "path": "Perl/5.12/User" }, { "value": 12, "name": "version", "path": "Perl/5.12/version" }, { "value": 0, "name": "warnings", "path": "Perl/5.12/warnings" } ] }, { "value": 14072, "name": "5.16", "path": "Perl/5.16", "children": [ { "value": 20, "name": "App", "path": "Perl/5.16/App" }, { "value": 48, "name": "Archive", "path": "Perl/5.16/Archive" }, { "value": 12, "name": "Attribute", "path": "Perl/5.16/Attribute" }, { "value": 16, "name": "autodie", "path": "Perl/5.16/autodie" }, { "value": 56, "name": "B", "path": "Perl/5.16/B" }, { "value": 0, "name": "Carp", "path": "Perl/5.16/Carp" }, { "value": 32, "name": "CGI", "path": "Perl/5.16/CGI" }, { "value": 8, "name": "Class", "path": "Perl/5.16/Class" }, { "value": 12, "name": "Compress", "path": "Perl/5.16/Compress" }, { "value": 0, "name": "Config", "path": "Perl/5.16/Config" }, { "value": 192, "name": "CPAN", "path": "Perl/5.16/CPAN" }, { "value": 180, "name": "CPANPLUS", "path": "Perl/5.16/CPANPLUS" }, { "value": 7328, "name": "darwin-thread-multi-2level", "path": "Perl/5.16/darwin-thread-multi-2level" }, { "value": 0, "name": "DBM_Filter", "path": "Perl/5.16/DBM_Filter" }, { "value": 0, "name": "Devel", "path": "Perl/5.16/Devel" }, { "value": 0, "name": "Digest", "path": "Perl/5.16/Digest" }, { "value": 12, "name": "Encode", "path": "Perl/5.16/Encode" }, { "value": 0, "name": "encoding", "path": "Perl/5.16/encoding" }, { "value": 0, "name": "Exporter", "path": "Perl/5.16/Exporter" }, { "value": 248, "name": "ExtUtils", "path": "Perl/5.16/ExtUtils" }, { "value": 96, "name": "File", "path": "Perl/5.16/File" }, { "value": 12, "name": "Filter", "path": "Perl/5.16/Filter" }, { "value": 28, "name": "Getopt", "path": "Perl/5.16/Getopt" }, { "value": 12, "name": "HTTP", "path": "Perl/5.16/HTTP" }, { "value": 24, "name": "I18N", "path": "Perl/5.16/I18N" }, { "value": 0, "name": "inc", "path": "Perl/5.16/inc" }, { "value": 168, "name": "IO", "path": "Perl/5.16/IO" }, { "value": 28, "name": "IPC", "path": "Perl/5.16/IPC" }, { "value": 28, "name": "JSON", "path": "Perl/5.16/JSON" }, { "value": 372, "name": "Locale", "path": "Perl/5.16/Locale" }, { "value": 8, "name": "Log", "path": "Perl/5.16/Log" }, { "value": 148, "name": "Math", "path": "Perl/5.16/Math" }, { "value": 8, "name": "Memoize", "path": "Perl/5.16/Memoize" }, { "value": 212, "name": "Module", "path": "Perl/5.16/Module" }, { "value": 80, "name": "Net", "path": "Perl/5.16/Net" }, { "value": 8, "name": "Object", "path": "Perl/5.16/Object" }, { "value": 0, "name": "overload", "path": "Perl/5.16/overload" }, { "value": 0, "name": "Package", "path": "Perl/5.16/Package" }, { "value": 8, "name": "Params", "path": "Perl/5.16/Params" }, { "value": 0, "name": "Parse", "path": "Perl/5.16/Parse" }, { "value": 0, "name": "Perl", "path": "Perl/5.16/Perl" }, { "value": 0, "name": "PerlIO", "path": "Perl/5.16/PerlIO" }, { "value": 324, "name": "Pod", "path": "Perl/5.16/Pod" }, { "value": 2452, "name": "pods", "path": "Perl/5.16/pods" }, { "value": 0, "name": "Search", "path": "Perl/5.16/Search" }, { "value": 44, "name": "TAP", "path": "Perl/5.16/TAP" }, { "value": 36, "name": "Term", "path": "Perl/5.16/Term" }, { "value": 60, "name": "Test", "path": "Perl/5.16/Test" }, { "value": 20, "name": "Text", "path": "Perl/5.16/Text" }, { "value": 8, "name": "Thread", "path": "Perl/5.16/Thread" }, { "value": 28, "name": "Tie", "path": "Perl/5.16/Tie" }, { "value": 8, "name": "Time", "path": "Perl/5.16/Time" }, { "value": 684, "name": "Unicode", "path": "Perl/5.16/Unicode" }, { "value": 468, "name": "unicore", "path": "Perl/5.16/unicore" }, { "value": 8, "name": "User", "path": "Perl/5.16/User" }, { "value": 12, "name": "version", "path": "Perl/5.16/version" }, { "value": 0, "name": "warnings", "path": "Perl/5.16/warnings" } ] }, { "value": 28316, "name": "Extras", "path": "Perl/Extras", "children": [ { "value": 14188, "name": "5.12", "path": "Perl/Extras/5.12" }, { "value": 14128, "name": "5.16", "path": "Perl/Extras/5.16" } ] } ] }, { "value": 226552, "name": "PreferencePanes", "path": "PreferencePanes", "children": [ { "value": 5380, "name": "Accounts.prefPane", "path": "PreferencePanes/Accounts.prefPane", "children": [ { "value": 5380, "name": "Contents", "path": "PreferencePanes/Accounts.prefPane/Contents" } ] }, { "value": 1448, "name": "Appearance.prefPane", "path": "PreferencePanes/Appearance.prefPane", "children": [ { "value": 1448, "name": "Contents", "path": "PreferencePanes/Appearance.prefPane/Contents" } ] }, { "value": 2008, "name": "AppStore.prefPane", "path": "PreferencePanes/AppStore.prefPane", "children": [ { "value": 2008, "name": "Contents", "path": "PreferencePanes/AppStore.prefPane/Contents" } ] }, { "value": 1636, "name": "Bluetooth.prefPane", "path": "PreferencePanes/Bluetooth.prefPane", "children": [ { "value": 1636, "name": "Contents", "path": "PreferencePanes/Bluetooth.prefPane/Contents" } ] }, { "value": 2348, "name": "DateAndTime.prefPane", "path": "PreferencePanes/DateAndTime.prefPane", "children": [ { "value": 2348, "name": "Contents", "path": "PreferencePanes/DateAndTime.prefPane/Contents" } ] }, { "value": 4644, "name": "DesktopScreenEffectsPref.prefPane", "path": "PreferencePanes/DesktopScreenEffectsPref.prefPane", "children": [ { "value": 4644, "name": "Contents", "path": "PreferencePanes/DesktopScreenEffectsPref.prefPane/Contents" } ] }, { "value": 2148, "name": "DigiHubDiscs.prefPane", "path": "PreferencePanes/DigiHubDiscs.prefPane", "children": [ { "value": 2148, "name": "Contents", "path": "PreferencePanes/DigiHubDiscs.prefPane/Contents" } ] }, { "value": 624, "name": "Displays.prefPane", "path": "PreferencePanes/Displays.prefPane", "children": [ { "value": 624, "name": "Contents", "path": "PreferencePanes/Displays.prefPane/Contents" } ] }, { "value": 1012, "name": "Dock.prefPane", "path": "PreferencePanes/Dock.prefPane", "children": [ { "value": 1012, "name": "Contents", "path": "PreferencePanes/Dock.prefPane/Contents" } ] }, { "value": 2568, "name": "EnergySaver.prefPane", "path": "PreferencePanes/EnergySaver.prefPane", "children": [ { "value": 2568, "name": "Contents", "path": "PreferencePanes/EnergySaver.prefPane/Contents" } ] }, { "value": 3056, "name": "Expose.prefPane", "path": "PreferencePanes/Expose.prefPane", "children": [ { "value": 3056, "name": "Contents", "path": "PreferencePanes/Expose.prefPane/Contents" } ] }, { "value": 156, "name": "FibreChannel.prefPane", "path": "PreferencePanes/FibreChannel.prefPane", "children": [ { "value": 156, "name": "Contents", "path": "PreferencePanes/FibreChannel.prefPane/Contents" } ] }, { "value": 252, "name": "iCloudPref.prefPane", "path": "PreferencePanes/iCloudPref.prefPane", "children": [ { "value": 252, "name": "Contents", "path": "PreferencePanes/iCloudPref.prefPane/Contents" } ] }, { "value": 1588, "name": "Ink.prefPane", "path": "PreferencePanes/Ink.prefPane", "children": [ { "value": 1588, "name": "Contents", "path": "PreferencePanes/Ink.prefPane/Contents" } ] }, { "value": 4616, "name": "InternetAccounts.prefPane", "path": "PreferencePanes/InternetAccounts.prefPane", "children": [ { "value": 4616, "name": "Contents", "path": "PreferencePanes/InternetAccounts.prefPane/Contents" } ] }, { "value": 3676, "name": "Keyboard.prefPane", "path": "PreferencePanes/Keyboard.prefPane", "children": [ { "value": 3676, "name": "Contents", "path": "PreferencePanes/Keyboard.prefPane/Contents" } ] }, { "value": 3468, "name": "Localization.prefPane", "path": "PreferencePanes/Localization.prefPane", "children": [ { "value": 3468, "name": "Contents", "path": "PreferencePanes/Localization.prefPane/Contents" } ] }, { "value": 23180, "name": "Mouse.prefPane", "path": "PreferencePanes/Mouse.prefPane", "children": [ { "value": 23180, "name": "Contents", "path": "PreferencePanes/Mouse.prefPane/Contents" } ] }, { "value": 20588, "name": "Network.prefPane", "path": "PreferencePanes/Network.prefPane", "children": [ { "value": 20588, "name": "Contents", "path": "PreferencePanes/Network.prefPane/Contents" } ] }, { "value": 1512, "name": "Notifications.prefPane", "path": "PreferencePanes/Notifications.prefPane", "children": [ { "value": 1512, "name": "Contents", "path": "PreferencePanes/Notifications.prefPane/Contents" } ] }, { "value": 7648, "name": "ParentalControls.prefPane", "path": "PreferencePanes/ParentalControls.prefPane", "children": [ { "value": 7648, "name": "Contents", "path": "PreferencePanes/ParentalControls.prefPane/Contents" } ] }, { "value": 4060, "name": "PrintAndScan.prefPane", "path": "PreferencePanes/PrintAndScan.prefPane", "children": [ { "value": 4060, "name": "Contents", "path": "PreferencePanes/PrintAndScan.prefPane/Contents" } ] }, { "value": 1904, "name": "Profiles.prefPane", "path": "PreferencePanes/Profiles.prefPane", "children": [ { "value": 1904, "name": "Contents", "path": "PreferencePanes/Profiles.prefPane/Contents" } ] }, { "value": 6280, "name": "Security.prefPane", "path": "PreferencePanes/Security.prefPane", "children": [ { "value": 6280, "name": "Contents", "path": "PreferencePanes/Security.prefPane/Contents" } ] }, { "value": 9608, "name": "SharingPref.prefPane", "path": "PreferencePanes/SharingPref.prefPane", "children": [ { "value": 9608, "name": "Contents", "path": "PreferencePanes/SharingPref.prefPane/Contents" } ] }, { "value": 2204, "name": "Sound.prefPane", "path": "PreferencePanes/Sound.prefPane", "children": [ { "value": 2204, "name": "Contents", "path": "PreferencePanes/Sound.prefPane/Contents" } ] }, { "value": 1072, "name": "Speech.prefPane", "path": "PreferencePanes/Speech.prefPane", "children": [ { "value": 1072, "name": "Contents", "path": "PreferencePanes/Speech.prefPane/Contents" } ] }, { "value": 1112, "name": "Spotlight.prefPane", "path": "PreferencePanes/Spotlight.prefPane", "children": [ { "value": 1112, "name": "Contents", "path": "PreferencePanes/Spotlight.prefPane/Contents" } ] }, { "value": 2040, "name": "StartupDisk.prefPane", "path": "PreferencePanes/StartupDisk.prefPane", "children": [ { "value": 2040, "name": "Contents", "path": "PreferencePanes/StartupDisk.prefPane/Contents" } ] }, { "value": 3080, "name": "TimeMachine.prefPane", "path": "PreferencePanes/TimeMachine.prefPane", "children": [ { "value": 3080, "name": "Contents", "path": "PreferencePanes/TimeMachine.prefPane/Contents" } ] }, { "value": 93312, "name": "Trackpad.prefPane", "path": "PreferencePanes/Trackpad.prefPane", "children": [ { "value": 93312, "name": "Contents", "path": "PreferencePanes/Trackpad.prefPane/Contents" } ] }, { "value": 7680, "name": "UniversalAccessPref.prefPane", "path": "PreferencePanes/UniversalAccessPref.prefPane", "children": [ { "value": 7680, "name": "Contents", "path": "PreferencePanes/UniversalAccessPref.prefPane/Contents" } ] }, { "value": 640, "name": "Xsan.prefPane", "path": "PreferencePanes/Xsan.prefPane", "children": [ { "value": 640, "name": "Contents", "path": "PreferencePanes/Xsan.prefPane/Contents" } ] } ] }, { "value": 224, "name": "Printers", "path": "Printers", "children": [ { "value": 224, "name": "Libraries", "path": "Printers/Libraries", "children": [ { "value": 24, "name": "USBGenericPrintingClass.plugin", "path": "Printers/Libraries/USBGenericPrintingClass.plugin" }, { "value": 24, "name": "USBGenericTOPrintingClass.plugin", "path": "Printers/Libraries/USBGenericTOPrintingClass.plugin" } ] } ] }, { "value": 586092, "name": "PrivateFrameworks", "path": "PrivateFrameworks", "children": [ { "value": 52, "name": "AccessibilityBundles.framework", "path": "PrivateFrameworks/AccessibilityBundles.framework", "children": [ { "value": 44, "name": "Versions", "path": "PrivateFrameworks/AccessibilityBundles.framework/Versions" } ] }, { "value": 348, "name": "AccountsDaemon.framework", "path": "PrivateFrameworks/AccountsDaemon.framework", "children": [ { "value": 332, "name": "Versions", "path": "PrivateFrameworks/AccountsDaemon.framework/Versions" }, { "value": 8, "name": "XPCServices", "path": "PrivateFrameworks/AccountsDaemon.framework/XPCServices" } ] }, { "value": 168, "name": "Admin.framework", "path": "PrivateFrameworks/Admin.framework", "children": [ { "value": 160, "name": "Versions", "path": "PrivateFrameworks/Admin.framework/Versions" } ] }, { "value": 408, "name": "AirPortDevices.framework", "path": "PrivateFrameworks/AirPortDevices.framework", "children": [ { "value": 408, "name": "Versions", "path": "PrivateFrameworks/AirPortDevices.framework/Versions" } ] }, { "value": 1324, "name": "AirTrafficHost.framework", "path": "PrivateFrameworks/AirTrafficHost.framework", "children": [ { "value": 1276, "name": "Versions", "path": "PrivateFrameworks/AirTrafficHost.framework/Versions" } ] }, { "value": 2408, "name": "Altitude.framework", "path": "PrivateFrameworks/Altitude.framework", "children": [ { "value": 2400, "name": "Versions", "path": "PrivateFrameworks/Altitude.framework/Versions" } ] }, { "value": 224, "name": "AOSAccounts.framework", "path": "PrivateFrameworks/AOSAccounts.framework", "children": [ { "value": 216, "name": "Versions", "path": "PrivateFrameworks/AOSAccounts.framework/Versions" } ] }, { "value": 4672, "name": "AOSKit.framework", "path": "PrivateFrameworks/AOSKit.framework", "children": [ { "value": 4656, "name": "Versions", "path": "PrivateFrameworks/AOSKit.framework/Versions" } ] }, { "value": 20, "name": "AOSMigrate.framework", "path": "PrivateFrameworks/AOSMigrate.framework", "children": [ { "value": 12, "name": "Versions", "path": "PrivateFrameworks/AOSMigrate.framework/Versions" } ] }, { "value": 1300, "name": "AOSNotification.framework", "path": "PrivateFrameworks/AOSNotification.framework", "children": [ { "value": 52, "name": "Versions", "path": "PrivateFrameworks/AOSNotification.framework/Versions" } ] }, { "value": 16500, "name": "AOSUI.framework", "path": "PrivateFrameworks/AOSUI.framework", "children": [ { "value": 16492, "name": "Versions", "path": "PrivateFrameworks/AOSUI.framework/Versions" } ] }, { "value": 124, "name": "AppContainer.framework", "path": "PrivateFrameworks/AppContainer.framework", "children": [ { "value": 116, "name": "Versions", "path": "PrivateFrameworks/AppContainer.framework/Versions" } ] }, { "value": 324, "name": "Apple80211.framework", "path": "PrivateFrameworks/Apple80211.framework", "children": [ { "value": 316, "name": "Versions", "path": "PrivateFrameworks/Apple80211.framework/Versions" } ] }, { "value": 20, "name": "AppleAppSupport.framework", "path": "PrivateFrameworks/AppleAppSupport.framework", "children": [ { "value": 12, "name": "Versions", "path": "PrivateFrameworks/AppleAppSupport.framework/Versions" } ] }, { "value": 88, "name": "AppleFSCompression.framework", "path": "PrivateFrameworks/AppleFSCompression.framework", "children": [ { "value": 80, "name": "Versions", "path": "PrivateFrameworks/AppleFSCompression.framework/Versions" } ] }, { "value": 712, "name": "AppleGVA.framework", "path": "PrivateFrameworks/AppleGVA.framework", "children": [ { "value": 704, "name": "Versions", "path": "PrivateFrameworks/AppleGVA.framework/Versions" } ] }, { "value": 88, "name": "AppleGVACore.framework", "path": "PrivateFrameworks/AppleGVACore.framework", "children": [ { "value": 80, "name": "Versions", "path": "PrivateFrameworks/AppleGVACore.framework/Versions" } ] }, { "value": 52, "name": "AppleLDAP.framework", "path": "PrivateFrameworks/AppleLDAP.framework", "children": [ { "value": 44, "name": "Versions", "path": "PrivateFrameworks/AppleLDAP.framework/Versions" } ] }, { "value": 588, "name": "AppleProfileFamily.framework", "path": "PrivateFrameworks/AppleProfileFamily.framework", "children": [ { "value": 580, "name": "Versions", "path": "PrivateFrameworks/AppleProfileFamily.framework/Versions" } ] }, { "value": 508, "name": "ApplePushService.framework", "path": "PrivateFrameworks/ApplePushService.framework", "children": [ { "value": 128, "name": "Versions", "path": "PrivateFrameworks/ApplePushService.framework/Versions" } ] }, { "value": 672, "name": "AppleScript.framework", "path": "PrivateFrameworks/AppleScript.framework", "children": [ { "value": 664, "name": "Versions", "path": "PrivateFrameworks/AppleScript.framework/Versions" } ] }, { "value": 68, "name": "AppleSRP.framework", "path": "PrivateFrameworks/AppleSRP.framework", "children": [ { "value": 60, "name": "Versions", "path": "PrivateFrameworks/AppleSRP.framework/Versions" } ] }, { "value": 44, "name": "AppleSystemInfo.framework", "path": "PrivateFrameworks/AppleSystemInfo.framework", "children": [ { "value": 36, "name": "Versions", "path": "PrivateFrameworks/AppleSystemInfo.framework/Versions" } ] }, { "value": 336, "name": "AppleVA.framework", "path": "PrivateFrameworks/AppleVA.framework", "children": [ { "value": 328, "name": "Versions", "path": "PrivateFrameworks/AppleVA.framework/Versions" } ] }, { "value": 72, "name": "AppSandbox.framework", "path": "PrivateFrameworks/AppSandbox.framework", "children": [ { "value": 64, "name": "Versions", "path": "PrivateFrameworks/AppSandbox.framework/Versions" } ] }, { "value": 380, "name": "Assistant.framework", "path": "PrivateFrameworks/Assistant.framework", "children": [ { "value": 372, "name": "Versions", "path": "PrivateFrameworks/Assistant.framework/Versions" } ] }, { "value": 1772, "name": "AssistantServices.framework", "path": "PrivateFrameworks/AssistantServices.framework", "children": [ { "value": 116, "name": "Versions", "path": "PrivateFrameworks/AssistantServices.framework/Versions" } ] }, { "value": 684, "name": "AssistiveControlSupport.framework", "path": "PrivateFrameworks/AssistiveControlSupport.framework", "children": [ { "value": 224, "name": "Frameworks", "path": "PrivateFrameworks/AssistiveControlSupport.framework/Frameworks" }, { "value": 452, "name": "Versions", "path": "PrivateFrameworks/AssistiveControlSupport.framework/Versions" } ] }, { "value": 1880, "name": "AVConference.framework", "path": "PrivateFrameworks/AVConference.framework", "children": [ { "value": 388, "name": "Frameworks", "path": "PrivateFrameworks/AVConference.framework/Frameworks" }, { "value": 1484, "name": "Versions", "path": "PrivateFrameworks/AVConference.framework/Versions" } ] }, { "value": 168, "name": "AVCore.framework", "path": "PrivateFrameworks/AVCore.framework", "children": [ { "value": 160, "name": "Versions", "path": "PrivateFrameworks/AVCore.framework/Versions" } ] }, { "value": 296, "name": "AVFoundationCF.framework", "path": "PrivateFrameworks/AVFoundationCF.framework", "children": [ { "value": 288, "name": "Versions", "path": "PrivateFrameworks/AVFoundationCF.framework/Versions" } ] }, { "value": 3728, "name": "Backup.framework", "path": "PrivateFrameworks/Backup.framework", "children": [ { "value": 3720, "name": "Versions", "path": "PrivateFrameworks/Backup.framework/Versions" } ] }, { "value": 52, "name": "BezelServices.framework", "path": "PrivateFrameworks/BezelServices.framework", "children": [ { "value": 44, "name": "Versions", "path": "PrivateFrameworks/BezelServices.framework/Versions" } ] }, { "value": 316, "name": "Bom.framework", "path": "PrivateFrameworks/Bom.framework", "children": [ { "value": 308, "name": "Versions", "path": "PrivateFrameworks/Bom.framework/Versions" } ] }, { "value": 88, "name": "BookKit.framework", "path": "PrivateFrameworks/BookKit.framework", "children": [ { "value": 76, "name": "Versions", "path": "PrivateFrameworks/BookKit.framework/Versions" } ] }, { "value": 124, "name": "BookmarkDAV.framework", "path": "PrivateFrameworks/BookmarkDAV.framework", "children": [ { "value": 108, "name": "Versions", "path": "PrivateFrameworks/BookmarkDAV.framework/Versions" } ] }, { "value": 1732, "name": "BrowserKit.framework", "path": "PrivateFrameworks/BrowserKit.framework", "children": [ { "value": 1724, "name": "Versions", "path": "PrivateFrameworks/BrowserKit.framework/Versions" } ] }, { "value": 52, "name": "ByteRangeLocking.framework", "path": "PrivateFrameworks/ByteRangeLocking.framework", "children": [ { "value": 44, "name": "Versions", "path": "PrivateFrameworks/ByteRangeLocking.framework/Versions" } ] }, { "value": 64, "name": "Calculate.framework", "path": "PrivateFrameworks/Calculate.framework", "children": [ { "value": 56, "name": "Versions", "path": "PrivateFrameworks/Calculate.framework/Versions" } ] }, { "value": 356, "name": "CalDAV.framework", "path": "PrivateFrameworks/CalDAV.framework", "children": [ { "value": 348, "name": "Versions", "path": "PrivateFrameworks/CalDAV.framework/Versions" } ] }, { "value": 104, "name": "CalendarAgent.framework", "path": "PrivateFrameworks/CalendarAgent.framework", "children": [ { "value": 8, "name": "Executables", "path": "PrivateFrameworks/CalendarAgent.framework/Executables" }, { "value": 88, "name": "Versions", "path": "PrivateFrameworks/CalendarAgent.framework/Versions" } ] }, { "value": 88, "name": "CalendarAgentLink.framework", "path": "PrivateFrameworks/CalendarAgentLink.framework", "children": [ { "value": 80, "name": "Versions", "path": "PrivateFrameworks/CalendarAgentLink.framework/Versions" } ] }, { "value": 220, "name": "CalendarDraw.framework", "path": "PrivateFrameworks/CalendarDraw.framework", "children": [ { "value": 212, "name": "Versions", "path": "PrivateFrameworks/CalendarDraw.framework/Versions" } ] }, { "value": 196, "name": "CalendarFoundation.framework", "path": "PrivateFrameworks/CalendarFoundation.framework", "children": [ { "value": 188, "name": "Versions", "path": "PrivateFrameworks/CalendarFoundation.framework/Versions" } ] }, { "value": 4872, "name": "CalendarPersistence.framework", "path": "PrivateFrameworks/CalendarPersistence.framework", "children": [ { "value": 4864, "name": "Versions", "path": "PrivateFrameworks/CalendarPersistence.framework/Versions" } ] }, { "value": 900, "name": "CalendarUI.framework", "path": "PrivateFrameworks/CalendarUI.framework", "children": [ { "value": 892, "name": "Versions", "path": "PrivateFrameworks/CalendarUI.framework/Versions" } ] }, { "value": 76, "name": "CaptiveNetwork.framework", "path": "PrivateFrameworks/CaptiveNetwork.framework", "children": [ { "value": 68, "name": "Versions", "path": "PrivateFrameworks/CaptiveNetwork.framework/Versions" } ] }, { "value": 1180, "name": "CharacterPicker.framework", "path": "PrivateFrameworks/CharacterPicker.framework", "children": [ { "value": 1168, "name": "Versions", "path": "PrivateFrameworks/CharacterPicker.framework/Versions" } ] }, { "value": 192, "name": "ChunkingLibrary.framework", "path": "PrivateFrameworks/ChunkingLibrary.framework", "children": [ { "value": 184, "name": "Versions", "path": "PrivateFrameworks/ChunkingLibrary.framework/Versions" } ] }, { "value": 48, "name": "ClockMenuExtraPreferences.framework", "path": "PrivateFrameworks/ClockMenuExtraPreferences.framework", "children": [ { "value": 40, "name": "Versions", "path": "PrivateFrameworks/ClockMenuExtraPreferences.framework/Versions" } ] }, { "value": 160, "name": "CloudServices.framework", "path": "PrivateFrameworks/CloudServices.framework", "children": [ { "value": 104, "name": "Versions", "path": "PrivateFrameworks/CloudServices.framework/Versions" }, { "value": 48, "name": "XPCServices", "path": "PrivateFrameworks/CloudServices.framework/XPCServices" } ] }, { "value": 10768, "name": "CommerceKit.framework", "path": "PrivateFrameworks/CommerceKit.framework", "children": [ { "value": 10752, "name": "Versions", "path": "PrivateFrameworks/CommerceKit.framework/Versions" } ] }, { "value": 68, "name": "CommonAuth.framework", "path": "PrivateFrameworks/CommonAuth.framework", "children": [ { "value": 60, "name": "Versions", "path": "PrivateFrameworks/CommonAuth.framework/Versions" } ] }, { "value": 120, "name": "CommonCandidateWindow.framework", "path": "PrivateFrameworks/CommonCandidateWindow.framework", "children": [ { "value": 112, "name": "Versions", "path": "PrivateFrameworks/CommonCandidateWindow.framework/Versions" } ] }, { "value": 72, "name": "CommunicationsFilter.framework", "path": "PrivateFrameworks/CommunicationsFilter.framework", "children": [ { "value": 28, "name": "CMFSyncAgent.app", "path": "PrivateFrameworks/CommunicationsFilter.framework/CMFSyncAgent.app" }, { "value": 36, "name": "Versions", "path": "PrivateFrameworks/CommunicationsFilter.framework/Versions" } ] }, { "value": 24, "name": "ConfigProfileHelper.framework", "path": "PrivateFrameworks/ConfigProfileHelper.framework", "children": [ { "value": 16, "name": "Versions", "path": "PrivateFrameworks/ConfigProfileHelper.framework/Versions" } ] }, { "value": 156, "name": "ConfigurationProfiles.framework", "path": "PrivateFrameworks/ConfigurationProfiles.framework", "children": [ { "value": 148, "name": "Versions", "path": "PrivateFrameworks/ConfigurationProfiles.framework/Versions" } ] }, { "value": 20, "name": "ContactsAssistantServices.framework", "path": "PrivateFrameworks/ContactsAssistantServices.framework", "children": [ { "value": 12, "name": "Versions", "path": "PrivateFrameworks/ContactsAssistantServices.framework/Versions" } ] }, { "value": 72, "name": "ContactsAutocomplete.framework", "path": "PrivateFrameworks/ContactsAutocomplete.framework", "children": [ { "value": 64, "name": "Versions", "path": "PrivateFrameworks/ContactsAutocomplete.framework/Versions" } ] }, { "value": 24, "name": "ContactsData.framework", "path": "PrivateFrameworks/ContactsData.framework", "children": [ { "value": 16, "name": "Versions", "path": "PrivateFrameworks/ContactsData.framework/Versions" } ] }, { "value": 60, "name": "ContactsFoundation.framework", "path": "PrivateFrameworks/ContactsFoundation.framework", "children": [ { "value": 52, "name": "Versions", "path": "PrivateFrameworks/ContactsFoundation.framework/Versions" } ] }, { "value": 100, "name": "ContactsUI.framework", "path": "PrivateFrameworks/ContactsUI.framework", "children": [ { "value": 92, "name": "Versions", "path": "PrivateFrameworks/ContactsUI.framework/Versions" } ] }, { "value": 1668, "name": "CoreADI.framework", "path": "PrivateFrameworks/CoreADI.framework", "children": [ { "value": 1660, "name": "Versions", "path": "PrivateFrameworks/CoreADI.framework/Versions" } ] }, { "value": 4092, "name": "CoreAUC.framework", "path": "PrivateFrameworks/CoreAUC.framework", "children": [ { "value": 4084, "name": "Versions", "path": "PrivateFrameworks/CoreAUC.framework/Versions" } ] }, { "value": 200, "name": "CoreAVCHD.framework", "path": "PrivateFrameworks/CoreAVCHD.framework", "children": [ { "value": 192, "name": "Versions", "path": "PrivateFrameworks/CoreAVCHD.framework/Versions" } ] }, { "value": 2624, "name": "CoreChineseEngine.framework", "path": "PrivateFrameworks/CoreChineseEngine.framework", "children": [ { "value": 2616, "name": "Versions", "path": "PrivateFrameworks/CoreChineseEngine.framework/Versions" } ] }, { "value": 240, "name": "CoreDaemon.framework", "path": "PrivateFrameworks/CoreDaemon.framework", "children": [ { "value": 232, "name": "Versions", "path": "PrivateFrameworks/CoreDaemon.framework/Versions" } ] }, { "value": 488, "name": "CoreDAV.framework", "path": "PrivateFrameworks/CoreDAV.framework", "children": [ { "value": 480, "name": "Versions", "path": "PrivateFrameworks/CoreDAV.framework/Versions" } ] }, { "value": 19280, "name": "CoreFP.framework", "path": "PrivateFrameworks/CoreFP.framework", "children": [ { "value": 19268, "name": "Versions", "path": "PrivateFrameworks/CoreFP.framework/Versions" } ] }, { "value": 16124, "name": "CoreHandwriting.framework", "path": "PrivateFrameworks/CoreHandwriting.framework", "children": [ { "value": 16116, "name": "Versions", "path": "PrivateFrameworks/CoreHandwriting.framework/Versions" } ] }, { "value": 2124, "name": "CoreKE.framework", "path": "PrivateFrameworks/CoreKE.framework", "children": [ { "value": 2116, "name": "Versions", "path": "PrivateFrameworks/CoreKE.framework/Versions" } ] }, { "value": 7856, "name": "CoreLSKD.framework", "path": "PrivateFrameworks/CoreLSKD.framework", "children": [ { "value": 7848, "name": "Versions", "path": "PrivateFrameworks/CoreLSKD.framework/Versions" } ] }, { "value": 824, "name": "CoreMediaAuthoring.framework", "path": "PrivateFrameworks/CoreMediaAuthoring.framework", "children": [ { "value": 816, "name": "Versions", "path": "PrivateFrameworks/CoreMediaAuthoring.framework/Versions" } ] }, { "value": 784, "name": "CoreMediaIOServicesPrivate.framework", "path": "PrivateFrameworks/CoreMediaIOServicesPrivate.framework", "children": [ { "value": 776, "name": "Versions", "path": "PrivateFrameworks/CoreMediaIOServicesPrivate.framework/Versions" } ] }, { "value": 116, "name": "CoreMediaPrivate.framework", "path": "PrivateFrameworks/CoreMediaPrivate.framework", "children": [ { "value": 108, "name": "Versions", "path": "PrivateFrameworks/CoreMediaPrivate.framework/Versions" } ] }, { "value": 292, "name": "CoreMediaStream.framework", "path": "PrivateFrameworks/CoreMediaStream.framework", "children": [ { "value": 284, "name": "Versions", "path": "PrivateFrameworks/CoreMediaStream.framework/Versions" } ] }, { "value": 1436, "name": "CorePDF.framework", "path": "PrivateFrameworks/CorePDF.framework", "children": [ { "value": 1428, "name": "Versions", "path": "PrivateFrameworks/CorePDF.framework/Versions" } ] }, { "value": 1324, "name": "CoreProfile.framework", "path": "PrivateFrameworks/CoreProfile.framework", "children": [ { "value": 1312, "name": "Versions", "path": "PrivateFrameworks/CoreProfile.framework/Versions" } ] }, { "value": 1384, "name": "CoreRAID.framework", "path": "PrivateFrameworks/CoreRAID.framework", "children": [ { "value": 1372, "name": "Versions", "path": "PrivateFrameworks/CoreRAID.framework/Versions" } ] }, { "value": 128, "name": "CoreRecents.framework", "path": "PrivateFrameworks/CoreRecents.framework", "children": [ { "value": 120, "name": "Versions", "path": "PrivateFrameworks/CoreRecents.framework/Versions" } ] }, { "value": 832, "name": "CoreRecognition.framework", "path": "PrivateFrameworks/CoreRecognition.framework", "children": [ { "value": 824, "name": "Versions", "path": "PrivateFrameworks/CoreRecognition.framework/Versions" } ] }, { "value": 104, "name": "CoreSDB.framework", "path": "PrivateFrameworks/CoreSDB.framework", "children": [ { "value": 96, "name": "Versions", "path": "PrivateFrameworks/CoreSDB.framework/Versions" } ] }, { "value": 280, "name": "CoreServicesInternal.framework", "path": "PrivateFrameworks/CoreServicesInternal.framework", "children": [ { "value": 272, "name": "Versions", "path": "PrivateFrameworks/CoreServicesInternal.framework/Versions" } ] }, { "value": 576, "name": "CoreSymbolication.framework", "path": "PrivateFrameworks/CoreSymbolication.framework", "children": [ { "value": 536, "name": "Versions", "path": "PrivateFrameworks/CoreSymbolication.framework/Versions" } ] }, { "value": 476, "name": "CoreThemeDefinition.framework", "path": "PrivateFrameworks/CoreThemeDefinition.framework", "children": [ { "value": 468, "name": "Versions", "path": "PrivateFrameworks/CoreThemeDefinition.framework/Versions" } ] }, { "value": 4976, "name": "CoreUI.framework", "path": "PrivateFrameworks/CoreUI.framework", "children": [ { "value": 4968, "name": "Versions", "path": "PrivateFrameworks/CoreUI.framework/Versions" } ] }, { "value": 576, "name": "CoreUtils.framework", "path": "PrivateFrameworks/CoreUtils.framework", "children": [ { "value": 568, "name": "Versions", "path": "PrivateFrameworks/CoreUtils.framework/Versions" } ] }, { "value": 3476, "name": "CoreWLANKit.framework", "path": "PrivateFrameworks/CoreWLANKit.framework", "children": [ { "value": 3468, "name": "Versions", "path": "PrivateFrameworks/CoreWLANKit.framework/Versions" } ] }, { "value": 92, "name": "CrashReporterSupport.framework", "path": "PrivateFrameworks/CrashReporterSupport.framework", "children": [ { "value": 84, "name": "Versions", "path": "PrivateFrameworks/CrashReporterSupport.framework/Versions" } ] }, { "value": 132, "name": "DashboardClient.framework", "path": "PrivateFrameworks/DashboardClient.framework", "children": [ { "value": 124, "name": "Versions", "path": "PrivateFrameworks/DashboardClient.framework/Versions" } ] }, { "value": 1716, "name": "DataDetectors.framework", "path": "PrivateFrameworks/DataDetectors.framework", "children": [ { "value": 1708, "name": "Versions", "path": "PrivateFrameworks/DataDetectors.framework/Versions" } ] }, { "value": 4952, "name": "DataDetectorsCore.framework", "path": "PrivateFrameworks/DataDetectorsCore.framework", "children": [ { "value": 4940, "name": "Versions", "path": "PrivateFrameworks/DataDetectorsCore.framework/Versions" } ] }, { "value": 500, "name": "DCERPC.framework", "path": "PrivateFrameworks/DCERPC.framework", "children": [ { "value": 492, "name": "Versions", "path": "PrivateFrameworks/DCERPC.framework/Versions" } ] }, { "value": 232, "name": "DebugSymbols.framework", "path": "PrivateFrameworks/DebugSymbols.framework", "children": [ { "value": 224, "name": "Versions", "path": "PrivateFrameworks/DebugSymbols.framework/Versions" } ] }, { "value": 1792, "name": "DesktopServicesPriv.framework", "path": "PrivateFrameworks/DesktopServicesPriv.framework", "children": [ { "value": 1780, "name": "Versions", "path": "PrivateFrameworks/DesktopServicesPriv.framework/Versions" } ] }, { "value": 128, "name": "DeviceLink.framework", "path": "PrivateFrameworks/DeviceLink.framework", "children": [ { "value": 120, "name": "Versions", "path": "PrivateFrameworks/DeviceLink.framework/Versions" } ] }, { "value": 464, "name": "DeviceToDeviceKit.framework", "path": "PrivateFrameworks/DeviceToDeviceKit.framework", "children": [ { "value": 456, "name": "Versions", "path": "PrivateFrameworks/DeviceToDeviceKit.framework/Versions" } ] }, { "value": 52, "name": "DeviceToDeviceManager.framework", "path": "PrivateFrameworks/DeviceToDeviceManager.framework", "children": [ { "value": 28, "name": "PlugIns", "path": "PrivateFrameworks/DeviceToDeviceManager.framework/PlugIns" }, { "value": 16, "name": "Versions", "path": "PrivateFrameworks/DeviceToDeviceManager.framework/Versions" } ] }, { "value": 28, "name": "DiagnosticLogCollection.framework", "path": "PrivateFrameworks/DiagnosticLogCollection.framework", "children": [ { "value": 20, "name": "Versions", "path": "PrivateFrameworks/DiagnosticLogCollection.framework/Versions" } ] }, { "value": 56, "name": "DigiHubPreference.framework", "path": "PrivateFrameworks/DigiHubPreference.framework", "children": [ { "value": 48, "name": "Versions", "path": "PrivateFrameworks/DigiHubPreference.framework/Versions" } ] }, { "value": 1344, "name": "DirectoryEditor.framework", "path": "PrivateFrameworks/DirectoryEditor.framework", "children": [ { "value": 1336, "name": "Versions", "path": "PrivateFrameworks/DirectoryEditor.framework/Versions" } ] }, { "value": 104, "name": "DirectoryServer.framework", "path": "PrivateFrameworks/DirectoryServer.framework", "children": [ { "value": 52, "name": "Frameworks", "path": "PrivateFrameworks/DirectoryServer.framework/Frameworks" }, { "value": 40, "name": "Versions", "path": "PrivateFrameworks/DirectoryServer.framework/Versions" } ] }, { "value": 1596, "name": "DiskImages.framework", "path": "PrivateFrameworks/DiskImages.framework", "children": [ { "value": 1588, "name": "Versions", "path": "PrivateFrameworks/DiskImages.framework/Versions" } ] }, { "value": 1168, "name": "DiskManagement.framework", "path": "PrivateFrameworks/DiskManagement.framework", "children": [ { "value": 1160, "name": "Versions", "path": "PrivateFrameworks/DiskManagement.framework/Versions" } ] }, { "value": 80, "name": "DisplayServices.framework", "path": "PrivateFrameworks/DisplayServices.framework", "children": [ { "value": 72, "name": "Versions", "path": "PrivateFrameworks/DisplayServices.framework/Versions" } ] }, { "value": 32, "name": "DMNotification.framework", "path": "PrivateFrameworks/DMNotification.framework", "children": [ { "value": 24, "name": "Versions", "path": "PrivateFrameworks/DMNotification.framework/Versions" } ] }, { "value": 24, "name": "DVD.framework", "path": "PrivateFrameworks/DVD.framework", "children": [ { "value": 16, "name": "Versions", "path": "PrivateFrameworks/DVD.framework/Versions" } ] }, { "value": 272, "name": "EAP8021X.framework", "path": "PrivateFrameworks/EAP8021X.framework", "children": [ { "value": 20, "name": "Support", "path": "PrivateFrameworks/EAP8021X.framework/Support" }, { "value": 244, "name": "Versions", "path": "PrivateFrameworks/EAP8021X.framework/Versions" } ] }, { "value": 56, "name": "EasyConfig.framework", "path": "PrivateFrameworks/EasyConfig.framework", "children": [ { "value": 48, "name": "Versions", "path": "PrivateFrameworks/EasyConfig.framework/Versions" } ] }, { "value": 872, "name": "EFILogin.framework", "path": "PrivateFrameworks/EFILogin.framework", "children": [ { "value": 864, "name": "Versions", "path": "PrivateFrameworks/EFILogin.framework/Versions" } ] }, { "value": 32, "name": "EmailAddressing.framework", "path": "PrivateFrameworks/EmailAddressing.framework", "children": [ { "value": 24, "name": "Versions", "path": "PrivateFrameworks/EmailAddressing.framework/Versions" } ] }, { "value": 444, "name": "ExchangeWebServices.framework", "path": "PrivateFrameworks/ExchangeWebServices.framework", "children": [ { "value": 436, "name": "Versions", "path": "PrivateFrameworks/ExchangeWebServices.framework/Versions" } ] }, { "value": 23556, "name": "FaceCore.framework", "path": "PrivateFrameworks/FaceCore.framework", "children": [ { "value": 23548, "name": "Versions", "path": "PrivateFrameworks/FaceCore.framework/Versions" } ] }, { "value": 12, "name": "FaceCoreLight.framework", "path": "PrivateFrameworks/FaceCoreLight.framework", "children": [ { "value": 8, "name": "Versions", "path": "PrivateFrameworks/FaceCoreLight.framework/Versions" } ] }, { "value": 2836, "name": "FamilyControls.framework", "path": "PrivateFrameworks/FamilyControls.framework", "children": [ { "value": 2828, "name": "Versions", "path": "PrivateFrameworks/FamilyControls.framework/Versions" } ] }, { "value": 104, "name": "FileSync.framework", "path": "PrivateFrameworks/FileSync.framework", "children": [ { "value": 96, "name": "Versions", "path": "PrivateFrameworks/FileSync.framework/Versions" } ] }, { "value": 12048, "name": "FinderKit.framework", "path": "PrivateFrameworks/FinderKit.framework", "children": [ { "value": 12040, "name": "Versions", "path": "PrivateFrameworks/FinderKit.framework/Versions" } ] }, { "value": 1068, "name": "FindMyMac.framework", "path": "PrivateFrameworks/FindMyMac.framework", "children": [ { "value": 1044, "name": "Versions", "path": "PrivateFrameworks/FindMyMac.framework/Versions" }, { "value": 16, "name": "XPCServices", "path": "PrivateFrameworks/FindMyMac.framework/XPCServices" } ] }, { "value": 32, "name": "FTClientServices.framework", "path": "PrivateFrameworks/FTClientServices.framework", "children": [ { "value": 24, "name": "Versions", "path": "PrivateFrameworks/FTClientServices.framework/Versions" } ] }, { "value": 156, "name": "FTServices.framework", "path": "PrivateFrameworks/FTServices.framework", "children": [ { "value": 148, "name": "Versions", "path": "PrivateFrameworks/FTServices.framework/Versions" } ] }, { "value": 216, "name": "FWAVC.framework", "path": "PrivateFrameworks/FWAVC.framework", "children": [ { "value": 208, "name": "Versions", "path": "PrivateFrameworks/FWAVC.framework/Versions" } ] }, { "value": 116, "name": "FWAVCPrivate.framework", "path": "PrivateFrameworks/FWAVCPrivate.framework", "children": [ { "value": 108, "name": "Versions", "path": "PrivateFrameworks/FWAVCPrivate.framework/Versions" } ] }, { "value": 624, "name": "GameKitServices.framework", "path": "PrivateFrameworks/GameKitServices.framework", "children": [ { "value": 616, "name": "Versions", "path": "PrivateFrameworks/GameKitServices.framework/Versions" } ] }, { "value": 312, "name": "GenerationalStorage.framework", "path": "PrivateFrameworks/GenerationalStorage.framework", "children": [ { "value": 300, "name": "Versions", "path": "PrivateFrameworks/GenerationalStorage.framework/Versions" } ] }, { "value": 14920, "name": "GeoKit.framework", "path": "PrivateFrameworks/GeoKit.framework", "children": [ { "value": 14912, "name": "Versions", "path": "PrivateFrameworks/GeoKit.framework/Versions" } ] }, { "value": 27272, "name": "GeoServices.framework", "path": "PrivateFrameworks/GeoServices.framework", "children": [ { "value": 2104, "name": "Versions", "path": "PrivateFrameworks/GeoServices.framework/Versions" } ] }, { "value": 152, "name": "GPUSupport.framework", "path": "PrivateFrameworks/GPUSupport.framework", "children": [ { "value": 144, "name": "Versions", "path": "PrivateFrameworks/GPUSupport.framework/Versions" } ] }, { "value": 28, "name": "GraphicsAppSupport.framework", "path": "PrivateFrameworks/GraphicsAppSupport.framework", "children": [ { "value": 16, "name": "Versions", "path": "PrivateFrameworks/GraphicsAppSupport.framework/Versions" } ] }, { "value": 336, "name": "GraphKit.framework", "path": "PrivateFrameworks/GraphKit.framework", "children": [ { "value": 328, "name": "Versions", "path": "PrivateFrameworks/GraphKit.framework/Versions" } ] }, { "value": 56, "name": "HDAInterface.framework", "path": "PrivateFrameworks/HDAInterface.framework", "children": [ { "value": 48, "name": "Versions", "path": "PrivateFrameworks/HDAInterface.framework/Versions" } ] }, { "value": 1044, "name": "Heimdal.framework", "path": "PrivateFrameworks/Heimdal.framework", "children": [ { "value": 508, "name": "Helpers", "path": "PrivateFrameworks/Heimdal.framework/Helpers" }, { "value": 528, "name": "Versions", "path": "PrivateFrameworks/Heimdal.framework/Versions" } ] }, { "value": 56, "name": "HeimODAdmin.framework", "path": "PrivateFrameworks/HeimODAdmin.framework", "children": [ { "value": 48, "name": "Versions", "path": "PrivateFrameworks/HeimODAdmin.framework/Versions" } ] }, { "value": 232, "name": "HelpData.framework", "path": "PrivateFrameworks/HelpData.framework", "children": [ { "value": 224, "name": "Versions", "path": "PrivateFrameworks/HelpData.framework/Versions" } ] }, { "value": 104, "name": "IASUtilities.framework", "path": "PrivateFrameworks/IASUtilities.framework", "children": [ { "value": 92, "name": "Versions", "path": "PrivateFrameworks/IASUtilities.framework/Versions" } ] }, { "value": 224, "name": "iCalendar.framework", "path": "PrivateFrameworks/iCalendar.framework", "children": [ { "value": 216, "name": "Versions", "path": "PrivateFrameworks/iCalendar.framework/Versions" } ] }, { "value": 116, "name": "ICANotifications.framework", "path": "PrivateFrameworks/ICANotifications.framework", "children": [ { "value": 108, "name": "Versions", "path": "PrivateFrameworks/ICANotifications.framework/Versions" } ] }, { "value": 308, "name": "IconServices.framework", "path": "PrivateFrameworks/IconServices.framework", "children": [ { "value": 296, "name": "Versions", "path": "PrivateFrameworks/IconServices.framework/Versions" } ] }, { "value": 256, "name": "IDS.framework", "path": "PrivateFrameworks/IDS.framework", "children": [ { "value": 248, "name": "Versions", "path": "PrivateFrameworks/IDS.framework/Versions" } ] }, { "value": 4572, "name": "IDSCore.framework", "path": "PrivateFrameworks/IDSCore.framework", "children": [ { "value": 1300, "name": "identityservicesd.app", "path": "PrivateFrameworks/IDSCore.framework/identityservicesd.app" }, { "value": 3264, "name": "Versions", "path": "PrivateFrameworks/IDSCore.framework/Versions" } ] }, { "value": 116, "name": "IDSFoundation.framework", "path": "PrivateFrameworks/IDSFoundation.framework", "children": [ { "value": 108, "name": "Versions", "path": "PrivateFrameworks/IDSFoundation.framework/Versions" } ] }, { "value": 24, "name": "IDSSystemPreferencesSignIn.framework", "path": "PrivateFrameworks/IDSSystemPreferencesSignIn.framework", "children": [ { "value": 16, "name": "Versions", "path": "PrivateFrameworks/IDSSystemPreferencesSignIn.framework/Versions" } ] }, { "value": 16772, "name": "iLifeMediaBrowser.framework", "path": "PrivateFrameworks/iLifeMediaBrowser.framework", "children": [ { "value": 16764, "name": "Versions", "path": "PrivateFrameworks/iLifeMediaBrowser.framework/Versions" } ] }, { "value": 252, "name": "IMAP.framework", "path": "PrivateFrameworks/IMAP.framework", "children": [ { "value": 244, "name": "Versions", "path": "PrivateFrameworks/IMAP.framework/Versions" } ] }, { "value": 396, "name": "IMAVCore.framework", "path": "PrivateFrameworks/IMAVCore.framework", "children": [ { "value": 388, "name": "Versions", "path": "PrivateFrameworks/IMAVCore.framework/Versions" } ] }, { "value": 856, "name": "IMCore.framework", "path": "PrivateFrameworks/IMCore.framework", "children": [ { "value": 148, "name": "imagent.app", "path": "PrivateFrameworks/IMCore.framework/imagent.app" }, { "value": 700, "name": "Versions", "path": "PrivateFrameworks/IMCore.framework/Versions" } ] }, { "value": 364, "name": "IMDaemonCore.framework", "path": "PrivateFrameworks/IMDaemonCore.framework", "children": [ { "value": 356, "name": "Versions", "path": "PrivateFrameworks/IMDaemonCore.framework/Versions" } ] }, { "value": 68, "name": "IMDMessageServices.framework", "path": "PrivateFrameworks/IMDMessageServices.framework", "children": [ { "value": 16, "name": "Versions", "path": "PrivateFrameworks/IMDMessageServices.framework/Versions" }, { "value": 44, "name": "XPCServices", "path": "PrivateFrameworks/IMDMessageServices.framework/XPCServices" } ] }, { "value": 316, "name": "IMDPersistence.framework", "path": "PrivateFrameworks/IMDPersistence.framework", "children": [ { "value": 240, "name": "Versions", "path": "PrivateFrameworks/IMDPersistence.framework/Versions" }, { "value": 68, "name": "XPCServices", "path": "PrivateFrameworks/IMDPersistence.framework/XPCServices" } ] }, { "value": 596, "name": "IMFoundation.framework", "path": "PrivateFrameworks/IMFoundation.framework", "children": [ { "value": 484, "name": "Versions", "path": "PrivateFrameworks/IMFoundation.framework/Versions" }, { "value": 24, "name": "XPCServices", "path": "PrivateFrameworks/IMFoundation.framework/XPCServices" } ] }, { "value": 88, "name": "IMTranscoding.framework", "path": "PrivateFrameworks/IMTranscoding.framework", "children": [ { "value": 20, "name": "Versions", "path": "PrivateFrameworks/IMTranscoding.framework/Versions" }, { "value": 60, "name": "XPCServices", "path": "PrivateFrameworks/IMTranscoding.framework/XPCServices" } ] }, { "value": 92, "name": "IMTransferServices.framework", "path": "PrivateFrameworks/IMTransferServices.framework", "children": [ { "value": 28, "name": "Versions", "path": "PrivateFrameworks/IMTransferServices.framework/Versions" }, { "value": 56, "name": "XPCServices", "path": "PrivateFrameworks/IMTransferServices.framework/XPCServices" } ] }, { "value": 48, "name": "IncomingCallFilter.framework", "path": "PrivateFrameworks/IncomingCallFilter.framework", "children": [ { "value": 40, "name": "Versions", "path": "PrivateFrameworks/IncomingCallFilter.framework/Versions" } ] }, { "value": 1668, "name": "Install.framework", "path": "PrivateFrameworks/Install.framework", "children": [ { "value": 644, "name": "Frameworks", "path": "PrivateFrameworks/Install.framework/Frameworks" }, { "value": 1016, "name": "Versions", "path": "PrivateFrameworks/Install.framework/Versions" } ] }, { "value": 24, "name": "International.framework", "path": "PrivateFrameworks/International.framework", "children": [ { "value": 16, "name": "Versions", "path": "PrivateFrameworks/International.framework/Versions" } ] }, { "value": 2052, "name": "InternetAccounts.framework", "path": "PrivateFrameworks/InternetAccounts.framework", "children": [ { "value": 2040, "name": "Versions", "path": "PrivateFrameworks/InternetAccounts.framework/Versions" } ] }, { "value": 216, "name": "IntlPreferences.framework", "path": "PrivateFrameworks/IntlPreferences.framework", "children": [ { "value": 208, "name": "Versions", "path": "PrivateFrameworks/IntlPreferences.framework/Versions" } ] }, { "value": 52, "name": "IOAccelerator.framework", "path": "PrivateFrameworks/IOAccelerator.framework", "children": [ { "value": 44, "name": "Versions", "path": "PrivateFrameworks/IOAccelerator.framework/Versions" } ] }, { "value": 68, "name": "IOAccelMemoryInfo.framework", "path": "PrivateFrameworks/IOAccelMemoryInfo.framework", "children": [ { "value": 60, "name": "Versions", "path": "PrivateFrameworks/IOAccelMemoryInfo.framework/Versions" } ] }, { "value": 20, "name": "IOPlatformPluginFamily.framework", "path": "PrivateFrameworks/IOPlatformPluginFamily.framework", "children": [ { "value": 12, "name": "Versions", "path": "PrivateFrameworks/IOPlatformPluginFamily.framework/Versions" } ] }, { "value": 44, "name": "iPod.framework", "path": "PrivateFrameworks/iPod.framework", "children": [ { "value": 36, "name": "Versions", "path": "PrivateFrameworks/iPod.framework/Versions" } ] }, { "value": 160, "name": "iPodSync.framework", "path": "PrivateFrameworks/iPodSync.framework", "children": [ { "value": 152, "name": "Versions", "path": "PrivateFrameworks/iPodSync.framework/Versions" } ] }, { "value": 516, "name": "ISSupport.framework", "path": "PrivateFrameworks/ISSupport.framework", "children": [ { "value": 508, "name": "Versions", "path": "PrivateFrameworks/ISSupport.framework/Versions" } ] }, { "value": 644, "name": "iTunesAccess.framework", "path": "PrivateFrameworks/iTunesAccess.framework", "children": [ { "value": 636, "name": "Versions", "path": "PrivateFrameworks/iTunesAccess.framework/Versions" } ] }, { "value": 92, "name": "JavaApplicationLauncher.framework", "path": "PrivateFrameworks/JavaApplicationLauncher.framework", "children": [ { "value": 84, "name": "Versions", "path": "PrivateFrameworks/JavaApplicationLauncher.framework/Versions" } ] }, { "value": 48, "name": "JavaLaunching.framework", "path": "PrivateFrameworks/JavaLaunching.framework", "children": [ { "value": 40, "name": "Versions", "path": "PrivateFrameworks/JavaLaunching.framework/Versions" } ] }, { "value": 8, "name": "KerberosHelper", "path": "PrivateFrameworks/KerberosHelper", "children": [ { "value": 8, "name": "Helpers", "path": "PrivateFrameworks/KerberosHelper/Helpers" } ] }, { "value": 132, "name": "KerberosHelper.framework", "path": "PrivateFrameworks/KerberosHelper.framework", "children": [ { "value": 40, "name": "Helpers", "path": "PrivateFrameworks/KerberosHelper.framework/Helpers" }, { "value": 84, "name": "Versions", "path": "PrivateFrameworks/KerberosHelper.framework/Versions" } ] }, { "value": 44, "name": "kperf.framework", "path": "PrivateFrameworks/kperf.framework", "children": [ { "value": 36, "name": "Versions", "path": "PrivateFrameworks/kperf.framework/Versions" } ] }, { "value": 100, "name": "Librarian.framework", "path": "PrivateFrameworks/Librarian.framework", "children": [ { "value": 92, "name": "Versions", "path": "PrivateFrameworks/Librarian.framework/Versions" } ] }, { "value": 56, "name": "LibraryRepair.framework", "path": "PrivateFrameworks/LibraryRepair.framework", "children": [ { "value": 44, "name": "Versions", "path": "PrivateFrameworks/LibraryRepair.framework/Versions" } ] }, { "value": 144, "name": "login.framework", "path": "PrivateFrameworks/login.framework", "children": [ { "value": 132, "name": "Versions", "path": "PrivateFrameworks/login.framework/Versions" } ] }, { "value": 4060, "name": "LoginUIKit.framework", "path": "PrivateFrameworks/LoginUIKit.framework", "children": [ { "value": 4048, "name": "Versions", "path": "PrivateFrameworks/LoginUIKit.framework/Versions" } ] }, { "value": 576, "name": "Lookup.framework", "path": "PrivateFrameworks/Lookup.framework", "children": [ { "value": 568, "name": "Versions", "path": "PrivateFrameworks/Lookup.framework/Versions" } ] }, { "value": 32, "name": "MachineSettings.framework", "path": "PrivateFrameworks/MachineSettings.framework", "children": [ { "value": 24, "name": "Versions", "path": "PrivateFrameworks/MachineSettings.framework/Versions" } ] }, { "value": 2812, "name": "Mail.framework", "path": "PrivateFrameworks/Mail.framework", "children": [ { "value": 2800, "name": "Versions", "path": "PrivateFrameworks/Mail.framework/Versions" } ] }, { "value": 1856, "name": "MailCore.framework", "path": "PrivateFrameworks/MailCore.framework", "children": [ { "value": 1848, "name": "Versions", "path": "PrivateFrameworks/MailCore.framework/Versions" } ] }, { "value": 68, "name": "MailService.framework", "path": "PrivateFrameworks/MailService.framework", "children": [ { "value": 56, "name": "Versions", "path": "PrivateFrameworks/MailService.framework/Versions" } ] }, { "value": 292, "name": "MailUI.framework", "path": "PrivateFrameworks/MailUI.framework", "children": [ { "value": 280, "name": "Versions", "path": "PrivateFrameworks/MailUI.framework/Versions" } ] }, { "value": 80, "name": "ManagedClient.framework", "path": "PrivateFrameworks/ManagedClient.framework", "children": [ { "value": 72, "name": "Versions", "path": "PrivateFrameworks/ManagedClient.framework/Versions" } ] }, { "value": 44, "name": "Mangrove.framework", "path": "PrivateFrameworks/Mangrove.framework", "children": [ { "value": 32, "name": "Versions", "path": "PrivateFrameworks/Mangrove.framework/Versions" } ] }, { "value": 28, "name": "Marco.framework", "path": "PrivateFrameworks/Marco.framework", "children": [ { "value": 20, "name": "Versions", "path": "PrivateFrameworks/Marco.framework/Versions" } ] }, { "value": 52, "name": "MDSChannel.framework", "path": "PrivateFrameworks/MDSChannel.framework", "children": [ { "value": 44, "name": "Versions", "path": "PrivateFrameworks/MDSChannel.framework/Versions" } ] }, { "value": 1488, "name": "MediaControlSender.framework", "path": "PrivateFrameworks/MediaControlSender.framework", "children": [ { "value": 1480, "name": "Versions", "path": "PrivateFrameworks/MediaControlSender.framework/Versions" } ] }, { "value": 480, "name": "MediaKit.framework", "path": "PrivateFrameworks/MediaKit.framework", "children": [ { "value": 468, "name": "Versions", "path": "PrivateFrameworks/MediaKit.framework/Versions" } ] }, { "value": 288, "name": "MediaUI.framework", "path": "PrivateFrameworks/MediaUI.framework", "children": [ { "value": 280, "name": "Versions", "path": "PrivateFrameworks/MediaUI.framework/Versions" } ] }, { "value": 56, "name": "MessageProtection.framework", "path": "PrivateFrameworks/MessageProtection.framework", "children": [ { "value": 48, "name": "Versions", "path": "PrivateFrameworks/MessageProtection.framework/Versions" } ] }, { "value": 680, "name": "MessagesHelperKit.framework", "path": "PrivateFrameworks/MessagesHelperKit.framework", "children": [ { "value": 640, "name": "PlugIns", "path": "PrivateFrameworks/MessagesHelperKit.framework/PlugIns" }, { "value": 32, "name": "Versions", "path": "PrivateFrameworks/MessagesHelperKit.framework/Versions" } ] }, { "value": 160, "name": "MessagesKit.framework", "path": "PrivateFrameworks/MessagesKit.framework", "children": [ { "value": 112, "name": "Versions", "path": "PrivateFrameworks/MessagesKit.framework/Versions" }, { "value": 40, "name": "XPCServices", "path": "PrivateFrameworks/MessagesKit.framework/XPCServices" } ] }, { "value": 372, "name": "MMCS.framework", "path": "PrivateFrameworks/MMCS.framework", "children": [ { "value": 364, "name": "Versions", "path": "PrivateFrameworks/MMCS.framework/Versions" } ] }, { "value": 56, "name": "MMCSServices.framework", "path": "PrivateFrameworks/MMCSServices.framework", "children": [ { "value": 48, "name": "Versions", "path": "PrivateFrameworks/MMCSServices.framework/Versions" } ] }, { "value": 1932, "name": "MobileDevice.framework", "path": "PrivateFrameworks/MobileDevice.framework", "children": [ { "value": 1924, "name": "Versions", "path": "PrivateFrameworks/MobileDevice.framework/Versions" } ] }, { "value": 80, "name": "MonitorPanel.framework", "path": "PrivateFrameworks/MonitorPanel.framework", "children": [ { "value": 72, "name": "Versions", "path": "PrivateFrameworks/MonitorPanel.framework/Versions" } ] }, { "value": 132, "name": "MultitouchSupport.framework", "path": "PrivateFrameworks/MultitouchSupport.framework", "children": [ { "value": 124, "name": "Versions", "path": "PrivateFrameworks/MultitouchSupport.framework/Versions" } ] }, { "value": 76, "name": "NetAuth.framework", "path": "PrivateFrameworks/NetAuth.framework", "children": [ { "value": 68, "name": "Versions", "path": "PrivateFrameworks/NetAuth.framework/Versions" } ] }, { "value": 52, "name": "NetFSServer.framework", "path": "PrivateFrameworks/NetFSServer.framework", "children": [ { "value": 44, "name": "Versions", "path": "PrivateFrameworks/NetFSServer.framework/Versions" } ] }, { "value": 56, "name": "NetworkDiagnosticsUI.framework", "path": "PrivateFrameworks/NetworkDiagnosticsUI.framework", "children": [ { "value": 48, "name": "Versions", "path": "PrivateFrameworks/NetworkDiagnosticsUI.framework/Versions" } ] }, { "value": 84, "name": "NetworkMenusCommon.framework", "path": "PrivateFrameworks/NetworkMenusCommon.framework", "children": [ { "value": 0, "name": "_CodeSignature", "path": "PrivateFrameworks/NetworkMenusCommon.framework/_CodeSignature" } ] }, { "value": 32, "name": "NetworkStatistics.framework", "path": "PrivateFrameworks/NetworkStatistics.framework", "children": [ { "value": 24, "name": "Versions", "path": "PrivateFrameworks/NetworkStatistics.framework/Versions" } ] }, { "value": 416, "name": "Notes.framework", "path": "PrivateFrameworks/Notes.framework", "children": [ { "value": 400, "name": "Versions", "path": "PrivateFrameworks/Notes.framework/Versions" } ] }, { "value": 84, "name": "nt.framework", "path": "PrivateFrameworks/nt.framework", "children": [ { "value": 76, "name": "Versions", "path": "PrivateFrameworks/nt.framework/Versions" } ] }, { "value": 24, "name": "OAuth.framework", "path": "PrivateFrameworks/OAuth.framework", "children": [ { "value": 16, "name": "Versions", "path": "PrivateFrameworks/OAuth.framework/Versions" } ] }, { "value": 6676, "name": "OfficeImport.framework", "path": "PrivateFrameworks/OfficeImport.framework", "children": [ { "value": 6668, "name": "Versions", "path": "PrivateFrameworks/OfficeImport.framework/Versions" } ] }, { "value": 160, "name": "oncrpc.framework", "path": "PrivateFrameworks/oncrpc.framework", "children": [ { "value": 36, "name": "bin", "path": "PrivateFrameworks/oncrpc.framework/bin" }, { "value": 116, "name": "Versions", "path": "PrivateFrameworks/oncrpc.framework/Versions" } ] }, { "value": 140, "name": "OpenDirectoryConfig.framework", "path": "PrivateFrameworks/OpenDirectoryConfig.framework", "children": [ { "value": 132, "name": "Versions", "path": "PrivateFrameworks/OpenDirectoryConfig.framework/Versions" } ] }, { "value": 1292, "name": "OpenDirectoryConfigUI.framework", "path": "PrivateFrameworks/OpenDirectoryConfigUI.framework", "children": [ { "value": 1284, "name": "Versions", "path": "PrivateFrameworks/OpenDirectoryConfigUI.framework/Versions" } ] }, { "value": 1140, "name": "PackageKit.framework", "path": "PrivateFrameworks/PackageKit.framework", "children": [ { "value": 272, "name": "Frameworks", "path": "PrivateFrameworks/PackageKit.framework/Frameworks" }, { "value": 860, "name": "Versions", "path": "PrivateFrameworks/PackageKit.framework/Versions" } ] }, { "value": 64, "name": "PacketFilter.framework", "path": "PrivateFrameworks/PacketFilter.framework", "children": [ { "value": 56, "name": "Versions", "path": "PrivateFrameworks/PacketFilter.framework/Versions" } ] }, { "value": 3312, "name": "PassKit.framework", "path": "PrivateFrameworks/PassKit.framework", "children": [ { "value": 3300, "name": "Versions", "path": "PrivateFrameworks/PassKit.framework/Versions" } ] }, { "value": 216, "name": "PasswordServer.framework", "path": "PrivateFrameworks/PasswordServer.framework", "children": [ { "value": 208, "name": "Versions", "path": "PrivateFrameworks/PasswordServer.framework/Versions" } ] }, { "value": 400, "name": "PerformanceAnalysis.framework", "path": "PrivateFrameworks/PerformanceAnalysis.framework", "children": [ { "value": 360, "name": "Versions", "path": "PrivateFrameworks/PerformanceAnalysis.framework/Versions" }, { "value": 32, "name": "XPCServices", "path": "PrivateFrameworks/PerformanceAnalysis.framework/XPCServices" } ] }, { "value": 80, "name": "PhoneNumbers.framework", "path": "PrivateFrameworks/PhoneNumbers.framework", "children": [ { "value": 72, "name": "Versions", "path": "PrivateFrameworks/PhoneNumbers.framework/Versions" } ] }, { "value": 152, "name": "PhysicsKit.framework", "path": "PrivateFrameworks/PhysicsKit.framework", "children": [ { "value": 144, "name": "Versions", "path": "PrivateFrameworks/PhysicsKit.framework/Versions" } ] }, { "value": 112, "name": "PlatformHardwareManagement.framework", "path": "PrivateFrameworks/PlatformHardwareManagement.framework", "children": [ { "value": 104, "name": "Versions", "path": "PrivateFrameworks/PlatformHardwareManagement.framework/Versions" } ] }, { "value": 76, "name": "PodcastProducerCore.framework", "path": "PrivateFrameworks/PodcastProducerCore.framework", "children": [ { "value": 68, "name": "Versions", "path": "PrivateFrameworks/PodcastProducerCore.framework/Versions" } ] }, { "value": 612, "name": "PodcastProducerKit.framework", "path": "PrivateFrameworks/PodcastProducerKit.framework", "children": [ { "value": 604, "name": "Versions", "path": "PrivateFrameworks/PodcastProducerKit.framework/Versions" } ] }, { "value": 956, "name": "PreferencePanesSupport.framework", "path": "PrivateFrameworks/PreferencePanesSupport.framework", "children": [ { "value": 948, "name": "Versions", "path": "PrivateFrameworks/PreferencePanesSupport.framework/Versions" } ] }, { "value": 9580, "name": "PrintingPrivate.framework", "path": "PrivateFrameworks/PrintingPrivate.framework", "children": [ { "value": 9572, "name": "Versions", "path": "PrivateFrameworks/PrintingPrivate.framework/Versions" } ] }, { "value": 104432, "name": "ProKit.framework", "path": "PrivateFrameworks/ProKit.framework", "children": [ { "value": 104424, "name": "Versions", "path": "PrivateFrameworks/ProKit.framework/Versions" } ] }, { "value": 9784, "name": "ProofReader.framework", "path": "PrivateFrameworks/ProofReader.framework", "children": [ { "value": 9776, "name": "Versions", "path": "PrivateFrameworks/ProofReader.framework/Versions" } ] }, { "value": 76, "name": "ProtocolBuffer.framework", "path": "PrivateFrameworks/ProtocolBuffer.framework", "children": [ { "value": 68, "name": "Versions", "path": "PrivateFrameworks/ProtocolBuffer.framework/Versions" } ] }, { "value": 7628, "name": "PSNormalizer.framework", "path": "PrivateFrameworks/PSNormalizer.framework", "children": [ { "value": 7616, "name": "Versions", "path": "PrivateFrameworks/PSNormalizer.framework/Versions" } ] }, { "value": 96, "name": "RemotePacketCapture.framework", "path": "PrivateFrameworks/RemotePacketCapture.framework", "children": [ { "value": 88, "name": "Versions", "path": "PrivateFrameworks/RemotePacketCapture.framework/Versions" } ] }, { "value": 388, "name": "RemoteViewServices.framework", "path": "PrivateFrameworks/RemoteViewServices.framework", "children": [ { "value": 304, "name": "Versions", "path": "PrivateFrameworks/RemoteViewServices.framework/Versions" }, { "value": 76, "name": "XPCServices", "path": "PrivateFrameworks/RemoteViewServices.framework/XPCServices" } ] }, { "value": 420, "name": "Restore.framework", "path": "PrivateFrameworks/Restore.framework", "children": [ { "value": 412, "name": "Versions", "path": "PrivateFrameworks/Restore.framework/Versions" } ] }, { "value": 56, "name": "RTCReporting.framework", "path": "PrivateFrameworks/RTCReporting.framework", "children": [ { "value": 48, "name": "Versions", "path": "PrivateFrameworks/RTCReporting.framework/Versions" } ] }, { "value": 6168, "name": "Safari.framework", "path": "PrivateFrameworks/Safari.framework", "children": [ { "value": 6156, "name": "Versions", "path": "PrivateFrameworks/Safari.framework/Versions" } ] }, { "value": 40, "name": "SafariServices.framework", "path": "PrivateFrameworks/SafariServices.framework", "children": [ { "value": 28, "name": "Versions", "path": "PrivateFrameworks/SafariServices.framework/Versions" } ] }, { "value": 432, "name": "SAObjects.framework", "path": "PrivateFrameworks/SAObjects.framework", "children": [ { "value": 424, "name": "Versions", "path": "PrivateFrameworks/SAObjects.framework/Versions" } ] }, { "value": 84, "name": "SCEP.framework", "path": "PrivateFrameworks/SCEP.framework", "children": [ { "value": 76, "name": "Versions", "path": "PrivateFrameworks/SCEP.framework/Versions" } ] }, { "value": 24256, "name": "ScreenReader.framework", "path": "PrivateFrameworks/ScreenReader.framework", "children": [ { "value": 24244, "name": "Versions", "path": "PrivateFrameworks/ScreenReader.framework/Versions" } ] }, { "value": 528, "name": "ScreenSharing.framework", "path": "PrivateFrameworks/ScreenSharing.framework", "children": [ { "value": 520, "name": "Versions", "path": "PrivateFrameworks/ScreenSharing.framework/Versions" } ] }, { "value": 36, "name": "SecCodeWrapper.framework", "path": "PrivateFrameworks/SecCodeWrapper.framework", "children": [ { "value": 28, "name": "Versions", "path": "PrivateFrameworks/SecCodeWrapper.framework/Versions" } ] }, { "value": 36, "name": "SecureNetworking.framework", "path": "PrivateFrameworks/SecureNetworking.framework", "children": [ { "value": 28, "name": "Versions", "path": "PrivateFrameworks/SecureNetworking.framework/Versions" } ] }, { "value": 60, "name": "SecurityTokend.framework", "path": "PrivateFrameworks/SecurityTokend.framework", "children": [ { "value": 52, "name": "Versions", "path": "PrivateFrameworks/SecurityTokend.framework/Versions" } ] }, { "value": 280, "name": "SemanticDocumentManagement.framework", "path": "PrivateFrameworks/SemanticDocumentManagement.framework", "children": [ { "value": 272, "name": "Versions", "path": "PrivateFrameworks/SemanticDocumentManagement.framework/Versions" } ] }, { "value": 720, "name": "ServerFoundation.framework", "path": "PrivateFrameworks/ServerFoundation.framework", "children": [ { "value": 712, "name": "Versions", "path": "PrivateFrameworks/ServerFoundation.framework/Versions" } ] }, { "value": 320, "name": "ServerInformation.framework", "path": "PrivateFrameworks/ServerInformation.framework", "children": [ { "value": 312, "name": "Versions", "path": "PrivateFrameworks/ServerInformation.framework/Versions" } ] }, { "value": 176, "name": "SetupAssistantSupport.framework", "path": "PrivateFrameworks/SetupAssistantSupport.framework", "children": [ { "value": 168, "name": "Versions", "path": "PrivateFrameworks/SetupAssistantSupport.framework/Versions" } ] }, { "value": 5512, "name": "ShareKit.framework", "path": "PrivateFrameworks/ShareKit.framework", "children": [ { "value": 5496, "name": "Versions", "path": "PrivateFrameworks/ShareKit.framework/Versions" } ] }, { "value": 100, "name": "Sharing.framework", "path": "PrivateFrameworks/Sharing.framework", "children": [ { "value": 92, "name": "Versions", "path": "PrivateFrameworks/Sharing.framework/Versions" } ] }, { "value": 616, "name": "Shortcut.framework", "path": "PrivateFrameworks/Shortcut.framework", "children": [ { "value": 608, "name": "Versions", "path": "PrivateFrameworks/Shortcut.framework/Versions" } ] }, { "value": 20, "name": "SleepServices.framework", "path": "PrivateFrameworks/SleepServices.framework", "children": [ { "value": 12, "name": "Versions", "path": "PrivateFrameworks/SleepServices.framework/Versions" } ] }, { "value": 62320, "name": "Slideshows.framework", "path": "PrivateFrameworks/Slideshows.framework", "children": [ { "value": 62312, "name": "Versions", "path": "PrivateFrameworks/Slideshows.framework/Versions" } ] }, { "value": 144, "name": "SMBClient.framework", "path": "PrivateFrameworks/SMBClient.framework", "children": [ { "value": 136, "name": "Versions", "path": "PrivateFrameworks/SMBClient.framework/Versions" } ] }, { "value": 112, "name": "SocialAppsCore.framework", "path": "PrivateFrameworks/SocialAppsCore.framework", "children": [ { "value": 104, "name": "Versions", "path": "PrivateFrameworks/SocialAppsCore.framework/Versions" } ] }, { "value": 936, "name": "SocialUI.framework", "path": "PrivateFrameworks/SocialUI.framework", "children": [ { "value": 924, "name": "Versions", "path": "PrivateFrameworks/SocialUI.framework/Versions" } ] }, { "value": 444, "name": "SoftwareUpdate.framework", "path": "PrivateFrameworks/SoftwareUpdate.framework", "children": [ { "value": 436, "name": "Versions", "path": "PrivateFrameworks/SoftwareUpdate.framework/Versions" } ] }, { "value": 2112, "name": "SpeechDictionary.framework", "path": "PrivateFrameworks/SpeechDictionary.framework", "children": [ { "value": 2104, "name": "Versions", "path": "PrivateFrameworks/SpeechDictionary.framework/Versions" } ] }, { "value": 8492, "name": "SpeechObjects.framework", "path": "PrivateFrameworks/SpeechObjects.framework", "children": [ { "value": 8484, "name": "Versions", "path": "PrivateFrameworks/SpeechObjects.framework/Versions" } ] }, { "value": 4248, "name": "SpeechRecognitionCore.framework", "path": "PrivateFrameworks/SpeechRecognitionCore.framework", "children": [ { "value": 4236, "name": "Versions", "path": "PrivateFrameworks/SpeechRecognitionCore.framework/Versions" } ] }, { "value": 2212, "name": "SpotlightIndex.framework", "path": "PrivateFrameworks/SpotlightIndex.framework", "children": [ { "value": 2204, "name": "Versions", "path": "PrivateFrameworks/SpotlightIndex.framework/Versions" } ] }, { "value": 48, "name": "SPSupport.framework", "path": "PrivateFrameworks/SPSupport.framework", "children": [ { "value": 40, "name": "Versions", "path": "PrivateFrameworks/SPSupport.framework/Versions" } ] }, { "value": 184, "name": "StoreJavaScript.framework", "path": "PrivateFrameworks/StoreJavaScript.framework", "children": [ { "value": 176, "name": "Versions", "path": "PrivateFrameworks/StoreJavaScript.framework/Versions" } ] }, { "value": 844, "name": "StoreUI.framework", "path": "PrivateFrameworks/StoreUI.framework", "children": [ { "value": 836, "name": "Versions", "path": "PrivateFrameworks/StoreUI.framework/Versions" } ] }, { "value": 32, "name": "StoreXPCServices.framework", "path": "PrivateFrameworks/StoreXPCServices.framework", "children": [ { "value": 20, "name": "Versions", "path": "PrivateFrameworks/StoreXPCServices.framework/Versions" } ] }, { "value": 72, "name": "StreamingZip.framework", "path": "PrivateFrameworks/StreamingZip.framework", "children": [ { "value": 60, "name": "Versions", "path": "PrivateFrameworks/StreamingZip.framework/Versions" } ] }, { "value": 456, "name": "Suggestions.framework", "path": "PrivateFrameworks/Suggestions.framework", "children": [ { "value": 448, "name": "Versions", "path": "PrivateFrameworks/Suggestions.framework/Versions" } ] }, { "value": 504, "name": "Symbolication.framework", "path": "PrivateFrameworks/Symbolication.framework", "children": [ { "value": 496, "name": "Versions", "path": "PrivateFrameworks/Symbolication.framework/Versions" } ] }, { "value": 320, "name": "Symptoms.framework", "path": "PrivateFrameworks/Symptoms.framework", "children": [ { "value": 312, "name": "Frameworks", "path": "PrivateFrameworks/Symptoms.framework/Frameworks" }, { "value": 4, "name": "Versions", "path": "PrivateFrameworks/Symptoms.framework/Versions" } ] }, { "value": 280, "name": "SyncedDefaults.framework", "path": "PrivateFrameworks/SyncedDefaults.framework", "children": [ { "value": 216, "name": "Support", "path": "PrivateFrameworks/SyncedDefaults.framework/Support" }, { "value": 56, "name": "Versions", "path": "PrivateFrameworks/SyncedDefaults.framework/Versions" } ] }, { "value": 5272, "name": "SyncServicesUI.framework", "path": "PrivateFrameworks/SyncServicesUI.framework", "children": [ { "value": 5264, "name": "Versions", "path": "PrivateFrameworks/SyncServicesUI.framework/Versions" } ] }, { "value": 932, "name": "SystemAdministration.framework", "path": "PrivateFrameworks/SystemAdministration.framework", "children": [ { "value": 864, "name": "Versions", "path": "PrivateFrameworks/SystemAdministration.framework/Versions" }, { "value": 60, "name": "XPCServices", "path": "PrivateFrameworks/SystemAdministration.framework/XPCServices" } ] }, { "value": 5656, "name": "SystemMigration.framework", "path": "PrivateFrameworks/SystemMigration.framework", "children": [ { "value": 508, "name": "Frameworks", "path": "PrivateFrameworks/SystemMigration.framework/Frameworks" }, { "value": 5140, "name": "Versions", "path": "PrivateFrameworks/SystemMigration.framework/Versions" } ] }, { "value": 52, "name": "SystemUIPlugin.framework", "path": "PrivateFrameworks/SystemUIPlugin.framework", "children": [ { "value": 44, "name": "Versions", "path": "PrivateFrameworks/SystemUIPlugin.framework/Versions" } ] }, { "value": 144, "name": "TCC.framework", "path": "PrivateFrameworks/TCC.framework", "children": [ { "value": 136, "name": "Versions", "path": "PrivateFrameworks/TCC.framework/Versions" } ] }, { "value": 48, "name": "TrustEvaluationAgent.framework", "path": "PrivateFrameworks/TrustEvaluationAgent.framework", "children": [ { "value": 40, "name": "Versions", "path": "PrivateFrameworks/TrustEvaluationAgent.framework/Versions" } ] }, { "value": 720, "name": "Ubiquity.framework", "path": "PrivateFrameworks/Ubiquity.framework", "children": [ { "value": 708, "name": "Versions", "path": "PrivateFrameworks/Ubiquity.framework/Versions" } ] }, { "value": 136, "name": "UIRecording.framework", "path": "PrivateFrameworks/UIRecording.framework", "children": [ { "value": 128, "name": "Versions", "path": "PrivateFrameworks/UIRecording.framework/Versions" } ] }, { "value": 56, "name": "Uninstall.framework", "path": "PrivateFrameworks/Uninstall.framework", "children": [ { "value": 48, "name": "Versions", "path": "PrivateFrameworks/Uninstall.framework/Versions" } ] }, { "value": 2320, "name": "UniversalAccess.framework", "path": "PrivateFrameworks/UniversalAccess.framework", "children": [ { "value": 2308, "name": "Versions", "path": "PrivateFrameworks/UniversalAccess.framework/Versions" } ] }, { "value": 1248, "name": "VCXMPP.framework", "path": "PrivateFrameworks/VCXMPP.framework", "children": [ { "value": 1232, "name": "Versions", "path": "PrivateFrameworks/VCXMPP.framework/Versions" } ] }, { "value": 2016, "name": "VectorKit.framework", "path": "PrivateFrameworks/VectorKit.framework", "children": [ { "value": 2008, "name": "Versions", "path": "PrivateFrameworks/VectorKit.framework/Versions" } ] }, { "value": 1164, "name": "VideoConference.framework", "path": "PrivateFrameworks/VideoConference.framework", "children": [ { "value": 1156, "name": "Versions", "path": "PrivateFrameworks/VideoConference.framework/Versions" } ] }, { "value": 2152, "name": "VideoProcessing.framework", "path": "PrivateFrameworks/VideoProcessing.framework", "children": [ { "value": 2144, "name": "Versions", "path": "PrivateFrameworks/VideoProcessing.framework/Versions" } ] }, { "value": 420, "name": "ViewBridge.framework", "path": "PrivateFrameworks/ViewBridge.framework", "children": [ { "value": 412, "name": "Versions", "path": "PrivateFrameworks/ViewBridge.framework/Versions" } ] }, { "value": 164, "name": "vmutils.framework", "path": "PrivateFrameworks/vmutils.framework", "children": [ { "value": 156, "name": "Versions", "path": "PrivateFrameworks/vmutils.framework/Versions" } ] }, { "value": 284, "name": "WeatherKit.framework", "path": "PrivateFrameworks/WeatherKit.framework", "children": [ { "value": 272, "name": "Versions", "path": "PrivateFrameworks/WeatherKit.framework/Versions" } ] }, { "value": 2228, "name": "WebContentAnalysis.framework", "path": "PrivateFrameworks/WebContentAnalysis.framework", "children": [ { "value": 2220, "name": "Versions", "path": "PrivateFrameworks/WebContentAnalysis.framework/Versions" } ] }, { "value": 24, "name": "WebFilterDNS.framework", "path": "PrivateFrameworks/WebFilterDNS.framework", "children": [ { "value": 16, "name": "Versions", "path": "PrivateFrameworks/WebFilterDNS.framework/Versions" } ] }, { "value": 132, "name": "WebInspector.framework", "path": "PrivateFrameworks/WebInspector.framework", "children": [ { "value": 124, "name": "Versions", "path": "PrivateFrameworks/WebInspector.framework/Versions" } ] }, { "value": 1228, "name": "WebInspectorUI.framework", "path": "PrivateFrameworks/WebInspectorUI.framework", "children": [ { "value": 1220, "name": "Versions", "path": "PrivateFrameworks/WebInspectorUI.framework/Versions" } ] }, { "value": 2672, "name": "WebKit2.framework", "path": "PrivateFrameworks/WebKit2.framework", "children": [ { "value": 16, "name": "NetworkProcess.app", "path": "PrivateFrameworks/WebKit2.framework/NetworkProcess.app" }, { "value": 8, "name": "OfflineStorageProcess.app", "path": "PrivateFrameworks/WebKit2.framework/OfflineStorageProcess.app" }, { "value": 20, "name": "PluginProcess.app", "path": "PrivateFrameworks/WebKit2.framework/PluginProcess.app" }, { "value": 8, "name": "SharedWorkerProcess.app", "path": "PrivateFrameworks/WebKit2.framework/SharedWorkerProcess.app" }, { "value": 2592, "name": "Versions", "path": "PrivateFrameworks/WebKit2.framework/Versions" }, { "value": 16, "name": "WebProcess.app", "path": "PrivateFrameworks/WebKit2.framework/WebProcess.app" } ] }, { "value": 496, "name": "WhitePages.framework", "path": "PrivateFrameworks/WhitePages.framework", "children": [ { "value": 488, "name": "Versions", "path": "PrivateFrameworks/WhitePages.framework/Versions" } ] }, { "value": 36, "name": "WiFiCloudSyncEngine.framework", "path": "PrivateFrameworks/WiFiCloudSyncEngine.framework", "children": [ { "value": 28, "name": "Versions", "path": "PrivateFrameworks/WiFiCloudSyncEngine.framework/Versions" } ] }, { "value": 444, "name": "WirelessDiagnosticsSupport.framework", "path": "PrivateFrameworks/WirelessDiagnosticsSupport.framework", "children": [ { "value": 436, "name": "Versions", "path": "PrivateFrameworks/WirelessDiagnosticsSupport.framework/Versions" } ] }, { "value": 372, "name": "XMPPCore.framework", "path": "PrivateFrameworks/XMPPCore.framework", "children": [ { "value": 364, "name": "Versions", "path": "PrivateFrameworks/XMPPCore.framework/Versions" } ] }, { "value": 48, "name": "XPCObjects.framework", "path": "PrivateFrameworks/XPCObjects.framework", "children": [ { "value": 40, "name": "Versions", "path": "PrivateFrameworks/XPCObjects.framework/Versions" } ] }, { "value": 60, "name": "XPCService.framework", "path": "PrivateFrameworks/XPCService.framework", "children": [ { "value": 52, "name": "Versions", "path": "PrivateFrameworks/XPCService.framework/Versions" } ] }, { "value": 516, "name": "XQuery.framework", "path": "PrivateFrameworks/XQuery.framework", "children": [ { "value": 508, "name": "Versions", "path": "PrivateFrameworks/XQuery.framework/Versions" } ] } ] }, { "value": 2988, "name": "QuickLook", "path": "QuickLook", "children": [ { "value": 8, "name": "Audio.qlgenerator", "path": "QuickLook/Audio.qlgenerator", "children": [ { "value": 8, "name": "Contents", "path": "QuickLook/Audio.qlgenerator/Contents" } ] }, { "value": 12, "name": "Bookmark.qlgenerator", "path": "QuickLook/Bookmark.qlgenerator", "children": [ { "value": 12, "name": "Contents", "path": "QuickLook/Bookmark.qlgenerator/Contents" } ] }, { "value": 12, "name": "Clippings.qlgenerator", "path": "QuickLook/Clippings.qlgenerator", "children": [ { "value": 12, "name": "Contents", "path": "QuickLook/Clippings.qlgenerator/Contents" } ] }, { "value": 232, "name": "Contact.qlgenerator", "path": "QuickLook/Contact.qlgenerator", "children": [ { "value": 232, "name": "Contents", "path": "QuickLook/Contact.qlgenerator/Contents" } ] }, { "value": 8, "name": "EPS.qlgenerator", "path": "QuickLook/EPS.qlgenerator", "children": [ { "value": 8, "name": "Contents", "path": "QuickLook/EPS.qlgenerator/Contents" } ] }, { "value": 12, "name": "Font.qlgenerator", "path": "QuickLook/Font.qlgenerator", "children": [ { "value": 12, "name": "Contents", "path": "QuickLook/Font.qlgenerator/Contents" } ] }, { "value": 1432, "name": "iCal.qlgenerator", "path": "QuickLook/iCal.qlgenerator", "children": [ { "value": 1432, "name": "Contents", "path": "QuickLook/iCal.qlgenerator/Contents" } ] }, { "value": 8, "name": "iChat.qlgenerator", "path": "QuickLook/iChat.qlgenerator", "children": [ { "value": 8, "name": "Contents", "path": "QuickLook/iChat.qlgenerator/Contents" } ] }, { "value": 8, "name": "Icon.qlgenerator", "path": "QuickLook/Icon.qlgenerator", "children": [ { "value": 8, "name": "Contents", "path": "QuickLook/Icon.qlgenerator/Contents" } ] }, { "value": 8, "name": "Image.qlgenerator", "path": "QuickLook/Image.qlgenerator", "children": [ { "value": 8, "name": "Contents", "path": "QuickLook/Image.qlgenerator/Contents" } ] }, { "value": 12, "name": "LocPDF.qlgenerator", "path": "QuickLook/LocPDF.qlgenerator", "children": [ { "value": 12, "name": "Contents", "path": "QuickLook/LocPDF.qlgenerator/Contents" } ] }, { "value": 28, "name": "Mail.qlgenerator", "path": "QuickLook/Mail.qlgenerator", "children": [ { "value": 28, "name": "Contents", "path": "QuickLook/Mail.qlgenerator/Contents" } ] }, { "value": 12, "name": "Movie.qlgenerator", "path": "QuickLook/Movie.qlgenerator", "children": [ { "value": 12, "name": "Contents", "path": "QuickLook/Movie.qlgenerator/Contents" } ] }, { "value": 20, "name": "Notes.qlgenerator", "path": "QuickLook/Notes.qlgenerator", "children": [ { "value": 20, "name": "Contents", "path": "QuickLook/Notes.qlgenerator/Contents" } ] }, { "value": 24, "name": "Office.qlgenerator", "path": "QuickLook/Office.qlgenerator", "children": [ { "value": 24, "name": "Contents", "path": "QuickLook/Office.qlgenerator/Contents" } ] }, { "value": 8, "name": "Package.qlgenerator", "path": "QuickLook/Package.qlgenerator", "children": [ { "value": 8, "name": "Contents", "path": "QuickLook/Package.qlgenerator/Contents" } ] }, { "value": 20, "name": "PDF.qlgenerator", "path": "QuickLook/PDF.qlgenerator", "children": [ { "value": 20, "name": "Contents", "path": "QuickLook/PDF.qlgenerator/Contents" } ] }, { "value": 8, "name": "SceneKit.qlgenerator", "path": "QuickLook/SceneKit.qlgenerator", "children": [ { "value": 8, "name": "Contents", "path": "QuickLook/SceneKit.qlgenerator/Contents" } ] }, { "value": 36, "name": "Security.qlgenerator", "path": "QuickLook/Security.qlgenerator", "children": [ { "value": 36, "name": "Contents", "path": "QuickLook/Security.qlgenerator/Contents" } ] }, { "value": 1060, "name": "StandardBundles.qlgenerator", "path": "QuickLook/StandardBundles.qlgenerator", "children": [ { "value": 1060, "name": "Contents", "path": "QuickLook/StandardBundles.qlgenerator/Contents" } ] }, { "value": 12, "name": "Text.qlgenerator", "path": "QuickLook/Text.qlgenerator", "children": [ { "value": 12, "name": "Contents", "path": "QuickLook/Text.qlgenerator/Contents" } ] }, { "value": 8, "name": "Web.qlgenerator", "path": "QuickLook/Web.qlgenerator", "children": [ { "value": 8, "name": "Contents", "path": "QuickLook/Web.qlgenerator/Contents" } ] } ] }, { "value": 17888, "name": "QuickTime", "path": "QuickTime", "children": [ { "value": 24, "name": "AppleGVAHW.component", "path": "QuickTime/AppleGVAHW.component", "children": [ { "value": 24, "name": "Contents", "path": "QuickTime/AppleGVAHW.component/Contents" } ] }, { "value": 60, "name": "ApplePixletVideo.component", "path": "QuickTime/ApplePixletVideo.component", "children": [ { "value": 60, "name": "Contents", "path": "QuickTime/ApplePixletVideo.component/Contents" } ] }, { "value": 216, "name": "AppleProResDecoder.component", "path": "QuickTime/AppleProResDecoder.component", "children": [ { "value": 216, "name": "Contents", "path": "QuickTime/AppleProResDecoder.component/Contents" } ] }, { "value": 756, "name": "AppleVAH264HW.component", "path": "QuickTime/AppleVAH264HW.component", "children": [ { "value": 756, "name": "Contents", "path": "QuickTime/AppleVAH264HW.component/Contents" } ] }, { "value": 24, "name": "QuartzComposer.component", "path": "QuickTime/QuartzComposer.component", "children": [ { "value": 24, "name": "Contents", "path": "QuickTime/QuartzComposer.component/Contents" } ] }, { "value": 520, "name": "QuickTime3GPP.component", "path": "QuickTime/QuickTime3GPP.component", "children": [ { "value": 520, "name": "Contents", "path": "QuickTime/QuickTime3GPP.component/Contents" } ] }, { "value": 11548, "name": "QuickTimeComponents.component", "path": "QuickTime/QuickTimeComponents.component", "children": [ { "value": 11548, "name": "Contents", "path": "QuickTime/QuickTimeComponents.component/Contents" } ] }, { "value": 76, "name": "QuickTimeFireWireDV.component", "path": "QuickTime/QuickTimeFireWireDV.component", "children": [ { "value": 76, "name": "Contents", "path": "QuickTime/QuickTimeFireWireDV.component/Contents" } ] }, { "value": 1592, "name": "QuickTimeH264.component", "path": "QuickTime/QuickTimeH264.component", "children": [ { "value": 1592, "name": "Contents", "path": "QuickTime/QuickTimeH264.component/Contents" } ] }, { "value": 64, "name": "QuickTimeIIDCDigitizer.component", "path": "QuickTime/QuickTimeIIDCDigitizer.component", "children": [ { "value": 64, "name": "Contents", "path": "QuickTime/QuickTimeIIDCDigitizer.component/Contents" } ] }, { "value": 832, "name": "QuickTimeImporters.component", "path": "QuickTime/QuickTimeImporters.component", "children": [ { "value": 832, "name": "Contents", "path": "QuickTime/QuickTimeImporters.component/Contents" } ] }, { "value": 200, "name": "QuickTimeMPEG.component", "path": "QuickTime/QuickTimeMPEG.component", "children": [ { "value": 200, "name": "Contents", "path": "QuickTime/QuickTimeMPEG.component/Contents" } ] }, { "value": 564, "name": "QuickTimeMPEG4.component", "path": "QuickTime/QuickTimeMPEG4.component", "children": [ { "value": 564, "name": "Contents", "path": "QuickTime/QuickTimeMPEG4.component/Contents" } ] }, { "value": 968, "name": "QuickTimeStreaming.component", "path": "QuickTime/QuickTimeStreaming.component", "children": [ { "value": 968, "name": "Contents", "path": "QuickTime/QuickTimeStreaming.component/Contents" } ] }, { "value": 120, "name": "QuickTimeUSBVDCDigitizer.component", "path": "QuickTime/QuickTimeUSBVDCDigitizer.component", "children": [ { "value": 120, "name": "Contents", "path": "QuickTime/QuickTimeUSBVDCDigitizer.component/Contents" } ] }, { "value": 324, "name": "QuickTimeVR.component", "path": "QuickTime/QuickTimeVR.component", "children": [ { "value": 324, "name": "Contents", "path": "QuickTime/QuickTimeVR.component/Contents" } ] } ] }, { "value": 28, "name": "QuickTimeJava", "path": "QuickTimeJava", "children": [ { "value": 28, "name": "QuickTimeJava.bundle", "path": "QuickTimeJava/QuickTimeJava.bundle", "children": [ { "value": 28, "name": "Contents", "path": "QuickTimeJava/QuickTimeJava.bundle/Contents" } ] } ] }, { "value": 20, "name": "Recents", "path": "Recents", "children": [ { "value": 20, "name": "Plugins", "path": "Recents/Plugins", "children": [ { "value": 36, "name": "AddressBook.assistantBundle", "path": "Assistant/Plugins/AddressBook.assistantBundle" }, { "value": 8, "name": "GenericAddressHandler.addresshandler", "path": "Recents/Plugins/GenericAddressHandler.addresshandler" }, { "value": 12, "name": "MapsRecents.addresshandler", "path": "Recents/Plugins/MapsRecents.addresshandler" } ] } ] }, { "value": 12, "name": "Sandbox", "path": "Sandbox", "children": [ { "value": 12, "name": "Profiles", "path": "Sandbox/Profiles" } ] }, { "value": 1052, "name": "ScreenSavers", "path": "ScreenSavers", "children": [ { "value": 8, "name": "FloatingMessage.saver", "path": "ScreenSavers/FloatingMessage.saver", "children": [ { "value": 8, "name": "Contents", "path": "ScreenSavers/FloatingMessage.saver/Contents" } ] }, { "value": 360, "name": "Flurry.saver", "path": "ScreenSavers/Flurry.saver", "children": [ { "value": 360, "name": "Contents", "path": "ScreenSavers/Flurry.saver/Contents" } ] }, { "value": 568, "name": "iTunes Artwork.saver", "path": "ScreenSavers/iTunes Artwork.saver", "children": [ { "value": 568, "name": "Contents", "path": "ScreenSavers/iTunes Artwork.saver/Contents" } ] }, { "value": 52, "name": "Random.saver", "path": "ScreenSavers/Random.saver", "children": [ { "value": 52, "name": "Contents", "path": "ScreenSavers/Random.saver/Contents" } ] } ] }, { "value": 1848, "name": "ScreenReader", "path": "ScreenReader", "children": [ { "value": 556, "name": "BrailleDrivers", "path": "ScreenReader/BrailleDrivers", "children": [ { "value": 28, "name": "Alva6 Series.brailledriver", "path": "ScreenReader/BrailleDrivers/Alva6 Series.brailledriver" }, { "value": 16, "name": "Alva.brailledriver", "path": "ScreenReader/BrailleDrivers/Alva.brailledriver" }, { "value": 28, "name": "BrailleConnect.brailledriver", "path": "ScreenReader/BrailleDrivers/BrailleConnect.brailledriver" }, { "value": 24, "name": "BrailleNoteApex.brailledriver", "path": "ScreenReader/BrailleDrivers/BrailleNoteApex.brailledriver" }, { "value": 16, "name": "BrailleNote.brailledriver", "path": "ScreenReader/BrailleDrivers/BrailleNote.brailledriver" }, { "value": 24, "name": "BrailleSense.brailledriver", "path": "ScreenReader/BrailleDrivers/BrailleSense.brailledriver" }, { "value": 28, "name": "Brailliant2.brailledriver", "path": "ScreenReader/BrailleDrivers/Brailliant2.brailledriver" }, { "value": 28, "name": "Brailliant.brailledriver", "path": "ScreenReader/BrailleDrivers/Brailliant.brailledriver" }, { "value": 16, "name": "Deininger.brailledriver", "path": "ScreenReader/BrailleDrivers/Deininger.brailledriver" }, { "value": 20, "name": "EasyLink.brailledriver", "path": "ScreenReader/BrailleDrivers/EasyLink.brailledriver" }, { "value": 28, "name": "Eurobraille.brailledriver", "path": "ScreenReader/BrailleDrivers/Eurobraille.brailledriver" }, { "value": 28, "name": "FreedomScientific.brailledriver", "path": "ScreenReader/BrailleDrivers/FreedomScientific.brailledriver" }, { "value": 32, "name": "HandyTech.brailledriver", "path": "ScreenReader/BrailleDrivers/HandyTech.brailledriver" }, { "value": 20, "name": "HIMSDriver.brailledriver", "path": "ScreenReader/BrailleDrivers/HIMSDriver.brailledriver" }, { "value": 28, "name": "KGSDriver.brailledriver", "path": "ScreenReader/BrailleDrivers/KGSDriver.brailledriver" }, { "value": 28, "name": "MDV.brailledriver", "path": "ScreenReader/BrailleDrivers/MDV.brailledriver" }, { "value": 24, "name": "NinepointSystems.brailledriver", "path": "ScreenReader/BrailleDrivers/NinepointSystems.brailledriver" }, { "value": 24, "name": "Papenmeier.brailledriver", "path": "ScreenReader/BrailleDrivers/Papenmeier.brailledriver" }, { "value": 28, "name": "Refreshabraille.brailledriver", "path": "ScreenReader/BrailleDrivers/Refreshabraille.brailledriver" }, { "value": 32, "name": "Seika.brailledriver", "path": "ScreenReader/BrailleDrivers/Seika.brailledriver" }, { "value": 16, "name": "SyncBraille.brailledriver", "path": "ScreenReader/BrailleDrivers/SyncBraille.brailledriver" }, { "value": 24, "name": "VarioPro.brailledriver", "path": "ScreenReader/BrailleDrivers/VarioPro.brailledriver" }, { "value": 16, "name": "Voyager.brailledriver", "path": "ScreenReader/BrailleDrivers/Voyager.brailledriver" } ] }, { "value": 1292, "name": "BrailleTables", "path": "ScreenReader/BrailleTables", "children": [ { "value": 1292, "name": "Duxbury.brailletable", "path": "ScreenReader/BrailleTables/Duxbury.brailletable" } ] } ] }, { "value": 1408, "name": "ScriptingAdditions", "path": "ScriptingAdditions", "children": [ { "value": 8, "name": "DigitalHub Scripting.osax", "path": "ScriptingAdditions/DigitalHub Scripting.osax", "children": [ { "value": 8, "name": "Contents", "path": "ScriptingAdditions/DigitalHub Scripting.osax/Contents" } ] }, { "value": 1400, "name": "StandardAdditions.osax", "path": "ScriptingAdditions/StandardAdditions.osax", "children": [ { "value": 1400, "name": "Contents", "path": "ScriptingAdditions/StandardAdditions.osax/Contents" } ] } ] }, { "value": 0, "name": "ScriptingDefinitions", "path": "ScriptingDefinitions" }, { "value": 0, "name": "SDKSettingsPlist", "path": "SDKSettingsPlist" }, { "value": 312, "name": "Security", "path": "Security", "children": [ { "value": 100, "name": "dotmac_tp.bundle", "path": "Security/dotmac_tp.bundle", "children": [ { "value": 100, "name": "Contents", "path": "Security/dotmac_tp.bundle/Contents" } ] }, { "value": 72, "name": "ldapdl.bundle", "path": "Security/ldapdl.bundle", "children": [ { "value": 72, "name": "Contents", "path": "Security/ldapdl.bundle/Contents" } ] }, { "value": 132, "name": "tokend", "path": "Security/tokend", "children": [ { "value": 132, "name": "uiplugins", "path": "Security/tokend/uiplugins" } ] } ] }, { "value": 18208, "name": "Services", "path": "Services", "children": [ { "value": 0, "name": "Addto iTunes as a Spoken Track.workflow", "path": "Services/Addto iTunes as a Spoken Track.workflow", "children": [ { "value": 0, "name": "Contents", "path": "Services/Addto iTunes as a Spoken Track.workflow/Contents" } ] }, { "value": 14308, "name": "AppleSpell.service", "path": "Services/AppleSpell.service", "children": [ { "value": 14308, "name": "Contents", "path": "Services/AppleSpell.service/Contents" } ] }, { "value": 556, "name": "ChineseTextConverterService.app", "path": "Services/ChineseTextConverterService.app", "children": [ { "value": 556, "name": "Contents", "path": "Services/ChineseTextConverterService.app/Contents" } ] }, { "value": 48, "name": "EncodeSelected Audio Files.workflow", "path": "Services/EncodeSelected Audio Files.workflow", "children": [ { "value": 48, "name": "Contents", "path": "Services/EncodeSelected Audio Files.workflow/Contents" } ] }, { "value": 40, "name": "EncodeSelected Video Files.workflow", "path": "Services/EncodeSelected Video Files.workflow", "children": [ { "value": 40, "name": "Contents", "path": "Services/EncodeSelected Video Files.workflow/Contents" } ] }, { "value": 1344, "name": "ImageCaptureService.app", "path": "Services/ImageCaptureService.app", "children": [ { "value": 1344, "name": "Contents", "path": "Services/ImageCaptureService.app/Contents" } ] }, { "value": 16, "name": "OpenSpell.service", "path": "Services/OpenSpell.service", "children": [ { "value": 16, "name": "Contents", "path": "Services/OpenSpell.service/Contents" } ] }, { "value": 0, "name": "SetDesktop Picture.workflow", "path": "Services/SetDesktop Picture.workflow", "children": [ { "value": 0, "name": "Contents", "path": "Services/SetDesktop Picture.workflow/Contents" } ] }, { "value": 0, "name": "ShowAddress in Google Maps.workflow", "path": "Services/ShowAddress in Google Maps.workflow", "children": [ { "value": 0, "name": "Contents", "path": "Services/ShowAddress in Google Maps.workflow/Contents" } ] }, { "value": 60, "name": "ShowMap.workflow", "path": "Services/ShowMap.workflow", "children": [ { "value": 60, "name": "Contents", "path": "Services/ShowMap.workflow/Contents" } ] }, { "value": 12, "name": "SpeechService.service", "path": "Services/SpeechService.service", "children": [ { "value": 12, "name": "Contents", "path": "Services/SpeechService.service/Contents" } ] }, { "value": 8, "name": "Spotlight.service", "path": "Services/Spotlight.service", "children": [ { "value": 8, "name": "Contents", "path": "Services/Spotlight.service/Contents" } ] }, { "value": 1816, "name": "SummaryService.app", "path": "Services/SummaryService.app", "children": [ { "value": 1816, "name": "Contents", "path": "Services/SummaryService.app/Contents" } ] } ] }, { "value": 700, "name": "Sounds", "path": "Sounds" }, { "value": 1512668, "name": "Speech", "path": "Speech", "children": [ { "value": 2804, "name": "Recognizers", "path": "Speech/Recognizers", "children": [ { "value": 2804, "name": "AppleSpeakableItems.SpeechRecognizer", "path": "Speech/Recognizers/AppleSpeakableItems.SpeechRecognizer" } ] }, { "value": 6684, "name": "Synthesizers", "path": "Speech/Synthesizers", "children": [ { "value": 800, "name": "MacinTalk.SpeechSynthesizer", "path": "Speech/Synthesizers/MacinTalk.SpeechSynthesizer" }, { "value": 3468, "name": "MultiLingual.SpeechSynthesizer", "path": "Speech/Synthesizers/MultiLingual.SpeechSynthesizer" }, { "value": 2416, "name": "Polyglot.SpeechSynthesizer", "path": "Speech/Synthesizers/Polyglot.SpeechSynthesizer" } ] }, { "value": 1503180, "name": "Voices", "path": "Speech/Voices", "children": [ { "value": 1540, "name": "Agnes.SpeechVoice", "path": "Speech/Voices/Agnes.SpeechVoice" }, { "value": 20, "name": "Albert.SpeechVoice", "path": "Speech/Voices/Albert.SpeechVoice" }, { "value": 412132, "name": "Alex.SpeechVoice", "path": "Speech/Voices/Alex.SpeechVoice" }, { "value": 624, "name": "AliceCompact.SpeechVoice", "path": "Speech/Voices/AliceCompact.SpeechVoice" }, { "value": 908, "name": "AlvaCompact.SpeechVoice", "path": "Speech/Voices/AlvaCompact.SpeechVoice" }, { "value": 668, "name": "AmelieCompact.SpeechVoice", "path": "Speech/Voices/AmelieCompact.SpeechVoice" }, { "value": 1016, "name": "AnnaCompact.SpeechVoice", "path": "Speech/Voices/AnnaCompact.SpeechVoice" }, { "value": 12, "name": "BadNews.SpeechVoice", "path": "Speech/Voices/BadNews.SpeechVoice" }, { "value": 20, "name": "Bahh.SpeechVoice", "path": "Speech/Voices/Bahh.SpeechVoice" }, { "value": 48, "name": "Bells.SpeechVoice", "path": "Speech/Voices/Bells.SpeechVoice" }, { "value": 20, "name": "Boing.SpeechVoice", "path": "Speech/Voices/Boing.SpeechVoice" }, { "value": 1684, "name": "Bruce.SpeechVoice", "path": "Speech/Voices/Bruce.SpeechVoice" }, { "value": 12, "name": "Bubbles.SpeechVoice", "path": "Speech/Voices/Bubbles.SpeechVoice" }, { "value": 24, "name": "Cellos.SpeechVoice", "path": "Speech/Voices/Cellos.SpeechVoice" }, { "value": 720, "name": "DamayantiCompact.SpeechVoice", "path": "Speech/Voices/DamayantiCompact.SpeechVoice" }, { "value": 1000, "name": "DanielCompact.SpeechVoice", "path": "Speech/Voices/DanielCompact.SpeechVoice" }, { "value": 24, "name": "Deranged.SpeechVoice", "path": "Speech/Voices/Deranged.SpeechVoice" }, { "value": 740, "name": "EllenCompact.SpeechVoice", "path": "Speech/Voices/EllenCompact.SpeechVoice" }, { "value": 12, "name": "Fred.SpeechVoice", "path": "Speech/Voices/Fred.SpeechVoice" }, { "value": 12, "name": "GoodNews.SpeechVoice", "path": "Speech/Voices/GoodNews.SpeechVoice" }, { "value": 28, "name": "Hysterical.SpeechVoice", "path": "Speech/Voices/Hysterical.SpeechVoice" }, { "value": 492, "name": "IoanaCompact.SpeechVoice", "path": "Speech/Voices/IoanaCompact.SpeechVoice" }, { "value": 596, "name": "JoanaCompact.SpeechVoice", "path": "Speech/Voices/JoanaCompact.SpeechVoice" }, { "value": 12, "name": "Junior.SpeechVoice", "path": "Speech/Voices/Junior.SpeechVoice" }, { "value": 1336, "name": "KanyaCompact.SpeechVoice", "path": "Speech/Voices/KanyaCompact.SpeechVoice" }, { "value": 1004, "name": "KarenCompact.SpeechVoice", "path": "Speech/Voices/KarenCompact.SpeechVoice" }, { "value": 12, "name": "Kathy.SpeechVoice", "path": "Speech/Voices/Kathy.SpeechVoice" }, { "value": 408836, "name": "Kyoko.SpeechVoice", "path": "Speech/Voices/Kyoko.SpeechVoice" }, { "value": 2620, "name": "KyokoCompact.SpeechVoice", "path": "Speech/Voices/KyokoCompact.SpeechVoice" }, { "value": 496, "name": "LauraCompact.SpeechVoice", "path": "Speech/Voices/LauraCompact.SpeechVoice" }, { "value": 2104, "name": "LekhaCompact.SpeechVoice", "path": "Speech/Voices/LekhaCompact.SpeechVoice" }, { "value": 548, "name": "LucianaCompact.SpeechVoice", "path": "Speech/Voices/LucianaCompact.SpeechVoice" }, { "value": 504, "name": "MariskaCompact.SpeechVoice", "path": "Speech/Voices/MariskaCompact.SpeechVoice" }, { "value": 2092, "name": "Mei-JiaCompact.SpeechVoice", "path": "Speech/Voices/Mei-JiaCompact.SpeechVoice" }, { "value": 1020, "name": "MelinaCompact.SpeechVoice", "path": "Speech/Voices/MelinaCompact.SpeechVoice" }, { "value": 2160, "name": "MilenaCompact.SpeechVoice", "path": "Speech/Voices/MilenaCompact.SpeechVoice" }, { "value": 728, "name": "MoiraCompact.SpeechVoice", "path": "Speech/Voices/MoiraCompact.SpeechVoice" }, { "value": 612, "name": "MonicaCompact.SpeechVoice", "path": "Speech/Voices/MonicaCompact.SpeechVoice" }, { "value": 824, "name": "NoraCompact.SpeechVoice", "path": "Speech/Voices/NoraCompact.SpeechVoice" }, { "value": 24, "name": "Organ.SpeechVoice", "path": "Speech/Voices/Organ.SpeechVoice" }, { "value": 664, "name": "PaulinaCompact.SpeechVoice", "path": "Speech/Voices/PaulinaCompact.SpeechVoice" }, { "value": 12, "name": "Princess.SpeechVoice", "path": "Speech/Voices/Princess.SpeechVoice" }, { "value": 12, "name": "Ralph.SpeechVoice", "path": "Speech/Voices/Ralph.SpeechVoice" }, { "value": 908, "name": "SamanthaCompact.SpeechVoice", "path": "Speech/Voices/SamanthaCompact.SpeechVoice" }, { "value": 828, "name": "SaraCompact.SpeechVoice", "path": "Speech/Voices/SaraCompact.SpeechVoice" }, { "value": 664, "name": "SatuCompact.SpeechVoice", "path": "Speech/Voices/SatuCompact.SpeechVoice" }, { "value": 2336, "name": "Sin-jiCompact.SpeechVoice", "path": "Speech/Voices/Sin-jiCompact.SpeechVoice" }, { "value": 2856, "name": "TarikCompact.SpeechVoice", "path": "Speech/Voices/TarikCompact.SpeechVoice" }, { "value": 948, "name": "TessaCompact.SpeechVoice", "path": "Speech/Voices/TessaCompact.SpeechVoice" }, { "value": 660, "name": "ThomasCompact.SpeechVoice", "path": "Speech/Voices/ThomasCompact.SpeechVoice" }, { "value": 610156, "name": "Ting-Ting.SpeechVoice", "path": "Speech/Voices/Ting-Ting.SpeechVoice" }, { "value": 1708, "name": "Ting-TingCompact.SpeechVoice", "path": "Speech/Voices/Ting-TingCompact.SpeechVoice" }, { "value": 12, "name": "Trinoids.SpeechVoice", "path": "Speech/Voices/Trinoids.SpeechVoice" }, { "value": 28632, "name": "Vicki.SpeechVoice", "path": "Speech/Voices/Vicki.SpeechVoice" }, { "value": 1664, "name": "Victoria.SpeechVoice", "path": "Speech/Voices/Victoria.SpeechVoice" }, { "value": 12, "name": "Whisper.SpeechVoice", "path": "Speech/Voices/Whisper.SpeechVoice" }, { "value": 992, "name": "XanderCompact.SpeechVoice", "path": "Speech/Voices/XanderCompact.SpeechVoice" }, { "value": 756, "name": "YeldaCompact.SpeechVoice", "path": "Speech/Voices/YeldaCompact.SpeechVoice" }, { "value": 728, "name": "YunaCompact.SpeechVoice", "path": "Speech/Voices/YunaCompact.SpeechVoice" }, { "value": 12, "name": "Zarvox.SpeechVoice", "path": "Speech/Voices/Zarvox.SpeechVoice" }, { "value": 564, "name": "ZosiaCompact.SpeechVoice", "path": "Speech/Voices/ZosiaCompact.SpeechVoice" }, { "value": 772, "name": "ZuzanaCompact.SpeechVoice", "path": "Speech/Voices/ZuzanaCompact.SpeechVoice" } ] } ] }, { "value": 1060, "name": "Spelling", "path": "Spelling" }, { "value": 412, "name": "Spotlight", "path": "Spotlight", "children": [ { "value": 20, "name": "Application.mdimporter", "path": "Spotlight/Application.mdimporter", "children": [ { "value": 20, "name": "Contents", "path": "Spotlight/Application.mdimporter/Contents" } ] }, { "value": 12, "name": "Archives.mdimporter", "path": "Spotlight/Archives.mdimporter", "children": [ { "value": 12, "name": "Contents", "path": "Spotlight/Archives.mdimporter/Contents" } ] }, { "value": 20, "name": "Audio.mdimporter", "path": "Spotlight/Audio.mdimporter", "children": [ { "value": 20, "name": "Contents", "path": "Spotlight/Audio.mdimporter/Contents" } ] }, { "value": 12, "name": "Automator.mdimporter", "path": "Spotlight/Automator.mdimporter", "children": [ { "value": 12, "name": "Contents", "path": "Spotlight/Automator.mdimporter/Contents" } ] }, { "value": 12, "name": "Bookmarks.mdimporter", "path": "Spotlight/Bookmarks.mdimporter", "children": [ { "value": 12, "name": "Contents", "path": "Spotlight/Bookmarks.mdimporter/Contents" } ] }, { "value": 16, "name": "Chat.mdimporter", "path": "Spotlight/Chat.mdimporter", "children": [ { "value": 16, "name": "Contents", "path": "Spotlight/Chat.mdimporter/Contents" } ] }, { "value": 28, "name": "CoreMedia.mdimporter", "path": "Spotlight/CoreMedia.mdimporter", "children": [ { "value": 28, "name": "Contents", "path": "Spotlight/CoreMedia.mdimporter/Contents" } ] }, { "value": 32, "name": "Font.mdimporter", "path": "Spotlight/Font.mdimporter", "children": [ { "value": 32, "name": "Contents", "path": "Spotlight/Font.mdimporter/Contents" } ] }, { "value": 16, "name": "iCal.mdimporter", "path": "Spotlight/iCal.mdimporter", "children": [ { "value": 16, "name": "Contents", "path": "Spotlight/iCal.mdimporter/Contents" } ] }, { "value": 28, "name": "Image.mdimporter", "path": "Spotlight/Image.mdimporter", "children": [ { "value": 28, "name": "Contents", "path": "Spotlight/Image.mdimporter/Contents" } ] }, { "value": 72, "name": "iPhoto.mdimporter", "path": "Spotlight/iPhoto.mdimporter", "children": [ { "value": 72, "name": "Contents", "path": "Spotlight/iPhoto.mdimporter/Contents" } ] }, { "value": 16, "name": "iPhoto8.mdimporter", "path": "Spotlight/iPhoto8.mdimporter", "children": [ { "value": 16, "name": "Contents", "path": "Spotlight/iPhoto8.mdimporter/Contents" } ] }, { "value": 12, "name": "Mail.mdimporter", "path": "Spotlight/Mail.mdimporter", "children": [ { "value": 12, "name": "Contents", "path": "Spotlight/Mail.mdimporter/Contents" } ] }, { "value": 12, "name": "MIDI.mdimporter", "path": "Spotlight/MIDI.mdimporter", "children": [ { "value": 12, "name": "Contents", "path": "Spotlight/MIDI.mdimporter/Contents" } ] }, { "value": 8, "name": "Notes.mdimporter", "path": "Spotlight/Notes.mdimporter", "children": [ { "value": 8, "name": "Contents", "path": "Spotlight/Notes.mdimporter/Contents" } ] }, { "value": 16, "name": "PDF.mdimporter", "path": "Spotlight/PDF.mdimporter", "children": [ { "value": 16, "name": "Contents", "path": "Spotlight/PDF.mdimporter/Contents" } ] }, { "value": 12, "name": "PS.mdimporter", "path": "Spotlight/PS.mdimporter", "children": [ { "value": 12, "name": "Contents", "path": "Spotlight/PS.mdimporter/Contents" } ] }, { "value": 12, "name": "QuartzComposer.mdimporter", "path": "Spotlight/QuartzComposer.mdimporter", "children": [ { "value": 12, "name": "Contents", "path": "Spotlight/QuartzComposer.mdimporter/Contents" } ] }, { "value": 20, "name": "RichText.mdimporter", "path": "Spotlight/RichText.mdimporter", "children": [ { "value": 20, "name": "Contents", "path": "Spotlight/RichText.mdimporter/Contents" } ] }, { "value": 16, "name": "SystemPrefs.mdimporter", "path": "Spotlight/SystemPrefs.mdimporter", "children": [ { "value": 16, "name": "Contents", "path": "Spotlight/SystemPrefs.mdimporter/Contents" } ] }, { "value": 20, "name": "vCard.mdimporter", "path": "Spotlight/vCard.mdimporter", "children": [ { "value": 20, "name": "Contents", "path": "Spotlight/vCard.mdimporter/Contents" } ] } ] }, { "value": 0, "name": "StartupItems", "path": "StartupItems" }, { "value": 168, "name": "SyncServices", "path": "SyncServices", "children": [ { "value": 0, "name": "AutoRegistration", "path": "SyncServices/AutoRegistration", "children": [ { "value": 0, "name": "Clients", "path": "SyncServices/AutoRegistration/Clients" }, { "value": 0, "name": "Schemas", "path": "SyncServices/AutoRegistration/Schemas" } ] }, { "value": 168, "name": "Schemas", "path": "SyncServices/Schemas", "children": [ { "value": 24, "name": "Bookmarks.syncschema", "path": "SyncServices/Schemas/Bookmarks.syncschema" }, { "value": 68, "name": "Calendars.syncschema", "path": "SyncServices/Schemas/Calendars.syncschema" }, { "value": 48, "name": "Contacts.syncschema", "path": "SyncServices/Schemas/Contacts.syncschema" }, { "value": 16, "name": "Notes.syncschema", "path": "SyncServices/Schemas/Notes.syncschema" }, { "value": 12, "name": "Palm.syncschema", "path": "SyncServices/Schemas/Palm.syncschema" } ] } ] }, { "value": 3156, "name": "SystemConfiguration", "path": "SystemConfiguration", "children": [ { "value": 8, "name": "ApplicationFirewallStartup.bundle", "path": "SystemConfiguration/ApplicationFirewallStartup.bundle", "children": [ { "value": 8, "name": "Contents", "path": "SystemConfiguration/ApplicationFirewallStartup.bundle/Contents" } ] }, { "value": 116, "name": "EAPOLController.bundle", "path": "SystemConfiguration/EAPOLController.bundle", "children": [ { "value": 116, "name": "Contents", "path": "SystemConfiguration/EAPOLController.bundle/Contents" } ] }, { "value": 0, "name": "InterfaceNamer.bundle", "path": "SystemConfiguration/InterfaceNamer.bundle", "children": [ { "value": 0, "name": "Contents", "path": "SystemConfiguration/InterfaceNamer.bundle/Contents" } ] }, { "value": 132, "name": "IPConfiguration.bundle", "path": "SystemConfiguration/IPConfiguration.bundle", "children": [ { "value": 132, "name": "Contents", "path": "SystemConfiguration/IPConfiguration.bundle/Contents" } ] }, { "value": 0, "name": "IPMonitor.bundle", "path": "SystemConfiguration/IPMonitor.bundle", "children": [ { "value": 0, "name": "Contents", "path": "SystemConfiguration/IPMonitor.bundle/Contents" } ] }, { "value": 0, "name": "KernelEventMonitor.bundle", "path": "SystemConfiguration/KernelEventMonitor.bundle", "children": [ { "value": 0, "name": "Contents", "path": "SystemConfiguration/KernelEventMonitor.bundle/Contents" } ] }, { "value": 0, "name": "LinkConfiguration.bundle", "path": "SystemConfiguration/LinkConfiguration.bundle", "children": [ { "value": 0, "name": "Contents", "path": "SystemConfiguration/LinkConfiguration.bundle/Contents" } ] }, { "value": 20, "name": "Logger.bundle", "path": "SystemConfiguration/Logger.bundle", "children": [ { "value": 20, "name": "Contents", "path": "SystemConfiguration/Logger.bundle/Contents" } ] }, { "value": 2804, "name": "PPPController.bundle", "path": "SystemConfiguration/PPPController.bundle", "children": [ { "value": 2804, "name": "Contents", "path": "SystemConfiguration/PPPController.bundle/Contents" } ] }, { "value": 0, "name": "PreferencesMonitor.bundle", "path": "SystemConfiguration/PreferencesMonitor.bundle", "children": [ { "value": 0, "name": "Contents", "path": "SystemConfiguration/PreferencesMonitor.bundle/Contents" } ] }, { "value": 76, "name": "PrinterNotifications.bundle", "path": "SystemConfiguration/PrinterNotifications.bundle", "children": [ { "value": 76, "name": "Contents", "path": "SystemConfiguration/PrinterNotifications.bundle/Contents" } ] }, { "value": 0, "name": "SCNetworkReachability.bundle", "path": "SystemConfiguration/SCNetworkReachability.bundle", "children": [ { "value": 0, "name": "Contents", "path": "SystemConfiguration/SCNetworkReachability.bundle/Contents" } ] } ] }, { "value": 1520, "name": "SystemProfiler", "path": "SystemProfiler", "children": [ { "value": 84, "name": "SPAirPortReporter.spreporter", "path": "SystemProfiler/SPAirPortReporter.spreporter", "children": [ { "value": 84, "name": "Contents", "path": "SystemProfiler/SPAirPortReporter.spreporter/Contents" } ] }, { "value": 8, "name": "SPApplicationsReporter.spreporter", "path": "SystemProfiler/SPApplicationsReporter.spreporter", "children": [ { "value": 8, "name": "Contents", "path": "SystemProfiler/SPApplicationsReporter.spreporter/Contents" } ] }, { "value": 28, "name": "SPAudioReporter.spreporter", "path": "SystemProfiler/SPAudioReporter.spreporter", "children": [ { "value": 28, "name": "Contents", "path": "SystemProfiler/SPAudioReporter.spreporter/Contents" } ] }, { "value": 16, "name": "SPBluetoothReporter.spreporter", "path": "SystemProfiler/SPBluetoothReporter.spreporter", "children": [ { "value": 16, "name": "Contents", "path": "SystemProfiler/SPBluetoothReporter.spreporter/Contents" } ] }, { "value": 8, "name": "SPCameraReporter.spreporter", "path": "SystemProfiler/SPCameraReporter.spreporter", "children": [ { "value": 8, "name": "Contents", "path": "SystemProfiler/SPCameraReporter.spreporter/Contents" } ] }, { "value": 12, "name": "SPCardReaderReporter.spreporter", "path": "SystemProfiler/SPCardReaderReporter.spreporter", "children": [ { "value": 12, "name": "Contents", "path": "SystemProfiler/SPCardReaderReporter.spreporter/Contents" } ] }, { "value": 28, "name": "SPComponentReporter.spreporter", "path": "SystemProfiler/SPComponentReporter.spreporter", "children": [ { "value": 28, "name": "Contents", "path": "SystemProfiler/SPComponentReporter.spreporter/Contents" } ] }, { "value": 28, "name": "SPConfigurationProfileReporter.spreporter", "path": "SystemProfiler/SPConfigurationProfileReporter.spreporter", "children": [ { "value": 28, "name": "Contents", "path": "SystemProfiler/SPConfigurationProfileReporter.spreporter/Contents" } ] }, { "value": 12, "name": "SPDeveloperToolsReporter.spreporter", "path": "SystemProfiler/SPDeveloperToolsReporter.spreporter", "children": [ { "value": 12, "name": "Contents", "path": "SystemProfiler/SPDeveloperToolsReporter.spreporter/Contents" } ] }, { "value": 16, "name": "SPDiagnosticsReporter.spreporter", "path": "SystemProfiler/SPDiagnosticsReporter.spreporter", "children": [ { "value": 16, "name": "Contents", "path": "SystemProfiler/SPDiagnosticsReporter.spreporter/Contents" } ] }, { "value": 12, "name": "SPDisabledApplicationsReporter.spreporter", "path": "SystemProfiler/SPDisabledApplicationsReporter.spreporter", "children": [ { "value": 12, "name": "Contents", "path": "SystemProfiler/SPDisabledApplicationsReporter.spreporter/Contents" } ] }, { "value": 12, "name": "SPDiscBurningReporter.spreporter", "path": "SystemProfiler/SPDiscBurningReporter.spreporter", "children": [ { "value": 12, "name": "Contents", "path": "SystemProfiler/SPDiscBurningReporter.spreporter/Contents" } ] }, { "value": 284, "name": "SPDisplaysReporter.spreporter", "path": "SystemProfiler/SPDisplaysReporter.spreporter", "children": [ { "value": 284, "name": "Contents", "path": "SystemProfiler/SPDisplaysReporter.spreporter/Contents" } ] }, { "value": 16, "name": "SPEthernetReporter.spreporter", "path": "SystemProfiler/SPEthernetReporter.spreporter", "children": [ { "value": 16, "name": "Contents", "path": "SystemProfiler/SPEthernetReporter.spreporter/Contents" } ] }, { "value": 12, "name": "SPExtensionsReporter.spreporter", "path": "SystemProfiler/SPExtensionsReporter.spreporter", "children": [ { "value": 12, "name": "Contents", "path": "SystemProfiler/SPExtensionsReporter.spreporter/Contents" } ] }, { "value": 12, "name": "SPFibreChannelReporter.spreporter", "path": "SystemProfiler/SPFibreChannelReporter.spreporter", "children": [ { "value": 12, "name": "Contents", "path": "SystemProfiler/SPFibreChannelReporter.spreporter/Contents" } ] }, { "value": 12, "name": "SPFirewallReporter.spreporter", "path": "SystemProfiler/SPFirewallReporter.spreporter", "children": [ { "value": 12, "name": "Contents", "path": "SystemProfiler/SPFirewallReporter.spreporter/Contents" } ] }, { "value": 16, "name": "SPFireWireReporter.spreporter", "path": "SystemProfiler/SPFireWireReporter.spreporter", "children": [ { "value": 16, "name": "Contents", "path": "SystemProfiler/SPFireWireReporter.spreporter/Contents" } ] }, { "value": 12, "name": "SPFontReporter.spreporter", "path": "SystemProfiler/SPFontReporter.spreporter", "children": [ { "value": 12, "name": "Contents", "path": "SystemProfiler/SPFontReporter.spreporter/Contents" } ] }, { "value": 8, "name": "SPFrameworksReporter.spreporter", "path": "SystemProfiler/SPFrameworksReporter.spreporter", "children": [ { "value": 8, "name": "Contents", "path": "SystemProfiler/SPFrameworksReporter.spreporter/Contents" } ] }, { "value": 16, "name": "SPHardwareRAIDReporter.spreporter", "path": "SystemProfiler/SPHardwareRAIDReporter.spreporter", "children": [ { "value": 16, "name": "Contents", "path": "SystemProfiler/SPHardwareRAIDReporter.spreporter/Contents" } ] }, { "value": 8, "name": "SPInstallHistoryReporter.spreporter", "path": "SystemProfiler/SPInstallHistoryReporter.spreporter", "children": [ { "value": 8, "name": "Contents", "path": "SystemProfiler/SPInstallHistoryReporter.spreporter/Contents" } ] }, { "value": 12, "name": "SPLogsReporter.spreporter", "path": "SystemProfiler/SPLogsReporter.spreporter", "children": [ { "value": 12, "name": "Contents", "path": "SystemProfiler/SPLogsReporter.spreporter/Contents" } ] }, { "value": 16, "name": "SPManagedClientReporter.spreporter", "path": "SystemProfiler/SPManagedClientReporter.spreporter", "children": [ { "value": 16, "name": "Contents", "path": "SystemProfiler/SPManagedClientReporter.spreporter/Contents" } ] }, { "value": 12, "name": "SPMemoryReporter.spreporter", "path": "SystemProfiler/SPMemoryReporter.spreporter", "children": [ { "value": 12, "name": "Contents", "path": "SystemProfiler/SPMemoryReporter.spreporter/Contents" } ] }, { "value": 264, "name": "SPNetworkLocationReporter.spreporter", "path": "SystemProfiler/SPNetworkLocationReporter.spreporter", "children": [ { "value": 264, "name": "Contents", "path": "SystemProfiler/SPNetworkLocationReporter.spreporter/Contents" } ] }, { "value": 268, "name": "SPNetworkReporter.spreporter", "path": "SystemProfiler/SPNetworkReporter.spreporter", "children": [ { "value": 268, "name": "Contents", "path": "SystemProfiler/SPNetworkReporter.spreporter/Contents" } ] }, { "value": 8, "name": "SPNetworkVolumeReporter.spreporter", "path": "SystemProfiler/SPNetworkVolumeReporter.spreporter", "children": [ { "value": 8, "name": "Contents", "path": "SystemProfiler/SPNetworkVolumeReporter.spreporter/Contents" } ] }, { "value": 8, "name": "SPOSReporter.spreporter", "path": "SystemProfiler/SPOSReporter.spreporter", "children": [ { "value": 8, "name": "Contents", "path": "SystemProfiler/SPOSReporter.spreporter/Contents" } ] }, { "value": 12, "name": "SPParallelATAReporter.spreporter", "path": "SystemProfiler/SPParallelATAReporter.spreporter", "children": [ { "value": 12, "name": "Contents", "path": "SystemProfiler/SPParallelATAReporter.spreporter/Contents" } ] }, { "value": 16, "name": "SPParallelSCSIReporter.spreporter", "path": "SystemProfiler/SPParallelSCSIReporter.spreporter", "children": [ { "value": 16, "name": "Contents", "path": "SystemProfiler/SPParallelSCSIReporter.spreporter/Contents" } ] }, { "value": 12, "name": "SPPCIReporter.spreporter", "path": "SystemProfiler/SPPCIReporter.spreporter", "children": [ { "value": 12, "name": "Contents", "path": "SystemProfiler/SPPCIReporter.spreporter/Contents" } ] }, { "value": 12, "name": "SPPlatformReporter.spreporter", "path": "SystemProfiler/SPPlatformReporter.spreporter", "children": [ { "value": 12, "name": "Contents", "path": "SystemProfiler/SPPlatformReporter.spreporter/Contents" } ] }, { "value": 12, "name": "SPPowerReporter.spreporter", "path": "SystemProfiler/SPPowerReporter.spreporter", "children": [ { "value": 12, "name": "Contents", "path": "SystemProfiler/SPPowerReporter.spreporter/Contents" } ] }, { "value": 8, "name": "SPPrefPaneReporter.spreporter", "path": "SystemProfiler/SPPrefPaneReporter.spreporter", "children": [ { "value": 8, "name": "Contents", "path": "SystemProfiler/SPPrefPaneReporter.spreporter/Contents" } ] }, { "value": 16, "name": "SPPrintersReporter.spreporter", "path": "SystemProfiler/SPPrintersReporter.spreporter", "children": [ { "value": 16, "name": "Contents", "path": "SystemProfiler/SPPrintersReporter.spreporter/Contents" } ] }, { "value": 12, "name": "SPPrintersSoftwareReporter.spreporter", "path": "SystemProfiler/SPPrintersSoftwareReporter.spreporter", "children": [ { "value": 12, "name": "Contents", "path": "SystemProfiler/SPPrintersSoftwareReporter.spreporter/Contents" } ] }, { "value": 12, "name": "SPSASReporter.spreporter", "path": "SystemProfiler/SPSASReporter.spreporter", "children": [ { "value": 12, "name": "Contents", "path": "SystemProfiler/SPSASReporter.spreporter/Contents" } ] }, { "value": 16, "name": "SPSerialATAReporter.spreporter", "path": "SystemProfiler/SPSerialATAReporter.spreporter", "children": [ { "value": 16, "name": "Contents", "path": "SystemProfiler/SPSerialATAReporter.spreporter/Contents" } ] }, { "value": 8, "name": "SPSPIReporter.spreporter", "path": "SystemProfiler/SPSPIReporter.spreporter", "children": [ { "value": 8, "name": "Contents", "path": "SystemProfiler/SPSPIReporter.spreporter/Contents" } ] }, { "value": 8, "name": "SPStartupItemReporter.spreporter", "path": "SystemProfiler/SPStartupItemReporter.spreporter", "children": [ { "value": 8, "name": "Contents", "path": "SystemProfiler/SPStartupItemReporter.spreporter/Contents" } ] }, { "value": 12, "name": "SPStorageReporter.spreporter", "path": "SystemProfiler/SPStorageReporter.spreporter", "children": [ { "value": 12, "name": "Contents", "path": "SystemProfiler/SPStorageReporter.spreporter/Contents" } ] }, { "value": 12, "name": "SPSyncReporter.spreporter", "path": "SystemProfiler/SPSyncReporter.spreporter", "children": [ { "value": 12, "name": "Contents", "path": "SystemProfiler/SPSyncReporter.spreporter/Contents" } ] }, { "value": 28, "name": "SPThunderboltReporter.spreporter", "path": "SystemProfiler/SPThunderboltReporter.spreporter", "children": [ { "value": 28, "name": "Contents", "path": "SystemProfiler/SPThunderboltReporter.spreporter/Contents" } ] }, { "value": 8, "name": "SPUniversalAccessReporter.spreporter", "path": "SystemProfiler/SPUniversalAccessReporter.spreporter", "children": [ { "value": 8, "name": "Contents", "path": "SystemProfiler/SPUniversalAccessReporter.spreporter/Contents" } ] }, { "value": 40, "name": "SPUSBReporter.spreporter", "path": "SystemProfiler/SPUSBReporter.spreporter", "children": [ { "value": 40, "name": "Contents", "path": "SystemProfiler/SPUSBReporter.spreporter/Contents" } ] }, { "value": 28, "name": "SPWWANReporter.spreporter", "path": "SystemProfiler/SPWWANReporter.spreporter", "children": [ { "value": 28, "name": "Contents", "path": "SystemProfiler/SPWWANReporter.spreporter/Contents" } ] } ] }, { "value": 9608, "name": "Tcl", "path": "Tcl", "children": [ { "value": 3568, "name": "8.4", "path": "Tcl/8.4", "children": [ { "value": 156, "name": "expect5.45", "path": "Tcl/8.4/expect5.45" }, { "value": 28, "name": "Ffidl0.6.1", "path": "Tcl/8.4/Ffidl0.6.1" }, { "value": 784, "name": "Img1.4", "path": "Tcl/8.4/Img1.4" }, { "value": 88, "name": "itcl3.4", "path": "Tcl/8.4/itcl3.4" }, { "value": 24, "name": "itk3.4", "path": "Tcl/8.4/itk3.4" }, { "value": 28, "name": "Memchan2.2.1", "path": "Tcl/8.4/Memchan2.2.1" }, { "value": 228, "name": "Mk4tcl2.4.9.7", "path": "Tcl/8.4/Mk4tcl2.4.9.7" }, { "value": 96, "name": "QuickTimeTcl3.2", "path": "Tcl/8.4/QuickTimeTcl3.2" }, { "value": 196, "name": "snack2.2", "path": "Tcl/8.4/snack2.2" }, { "value": 24, "name": "tbcload1.7", "path": "Tcl/8.4/tbcload1.7" }, { "value": 76, "name": "tclAE2.0.5", "path": "Tcl/8.4/tclAE2.0.5" }, { "value": 20, "name": "Tclapplescript1.0", "path": "Tcl/8.4/Tclapplescript1.0" }, { "value": 56, "name": "Tcldom2.6", "path": "Tcl/8.4/Tcldom2.6" }, { "value": 56, "name": "tcldomxml2.6", "path": "Tcl/8.4/tcldomxml2.6" }, { "value": 108, "name": "Tclexpat2.6", "path": "Tcl/8.4/Tclexpat2.6" }, { "value": 16, "name": "Tclresource1.1.2", "path": "Tcl/8.4/Tclresource1.1.2" }, { "value": 288, "name": "tclx8.4", "path": "Tcl/8.4/tclx8.4" }, { "value": 60, "name": "Tclxml2.6", "path": "Tcl/8.4/Tclxml2.6" }, { "value": 20, "name": "Tclxslt2.6", "path": "Tcl/8.4/Tclxslt2.6" }, { "value": 396, "name": "tdom0.8.3", "path": "Tcl/8.4/tdom0.8.3" }, { "value": 80, "name": "thread2.6.6", "path": "Tcl/8.4/thread2.6.6" }, { "value": 68, "name": "Tktable2.10", "path": "Tcl/8.4/Tktable2.10" }, { "value": 36, "name": "tls1.6.1", "path": "Tcl/8.4/tls1.6.1" }, { "value": 32, "name": "tnc0.3.0", "path": "Tcl/8.4/tnc0.3.0" }, { "value": 180, "name": "treectrl2.2.10", "path": "Tcl/8.4/treectrl2.2.10" }, { "value": 120, "name": "Trf2.1.4", "path": "Tcl/8.4/Trf2.1.4" }, { "value": 108, "name": "vfs1.4.1", "path": "Tcl/8.4/vfs1.4.1" }, { "value": 196, "name": "xotcl1.6.6", "path": "Tcl/8.4/xotcl1.6.6" } ] }, { "value": 3384, "name": "8.5", "path": "Tcl/8.5", "children": [ { "value": 156, "name": "expect5.45", "path": "Tcl/8.5/expect5.45" }, { "value": 32, "name": "Ffidl0.6.1", "path": "Tcl/8.5/Ffidl0.6.1" }, { "value": 972, "name": "Img1.4", "path": "Tcl/8.5/Img1.4" }, { "value": 88, "name": "itcl3.4", "path": "Tcl/8.5/itcl3.4" }, { "value": 44, "name": "itk3.4", "path": "Tcl/8.5/itk3.4" }, { "value": 32, "name": "Memchan2.2.1", "path": "Tcl/8.5/Memchan2.2.1" }, { "value": 228, "name": "Mk4tcl2.4.9.7", "path": "Tcl/8.5/Mk4tcl2.4.9.7" }, { "value": 24, "name": "tbcload1.7", "path": "Tcl/8.5/tbcload1.7" }, { "value": 76, "name": "tclAE2.0.5", "path": "Tcl/8.5/tclAE2.0.5" }, { "value": 56, "name": "Tcldom2.6", "path": "Tcl/8.5/Tcldom2.6" }, { "value": 56, "name": "tcldomxml2.6", "path": "Tcl/8.5/tcldomxml2.6" }, { "value": 108, "name": "Tclexpat2.6", "path": "Tcl/8.5/Tclexpat2.6" }, { "value": 336, "name": "tclx8.4", "path": "Tcl/8.5/tclx8.4" }, { "value": 60, "name": "Tclxml2.6", "path": "Tcl/8.5/Tclxml2.6" }, { "value": 20, "name": "Tclxslt2.6", "path": "Tcl/8.5/Tclxslt2.6" }, { "value": 400, "name": "tdom0.8.3", "path": "Tcl/8.5/tdom0.8.3" }, { "value": 80, "name": "thread2.6.6", "path": "Tcl/8.5/thread2.6.6" }, { "value": 124, "name": "Tktable2.10", "path": "Tcl/8.5/Tktable2.10" }, { "value": 36, "name": "tls1.6.1", "path": "Tcl/8.5/tls1.6.1" }, { "value": 32, "name": "tnc0.3.0", "path": "Tcl/8.5/tnc0.3.0" }, { "value": 120, "name": "Trf2.1.4", "path": "Tcl/8.5/Trf2.1.4" }, { "value": 108, "name": "vfs1.4.1", "path": "Tcl/8.5/vfs1.4.1" }, { "value": 196, "name": "xotcl1.6.6", "path": "Tcl/8.5/xotcl1.6.6" } ] }, { "value": 80, "name": "bin", "path": "Tcl/bin" }, { "value": 224, "name": "bwidget1.9.1", "path": "Tcl/bwidget1.9.1", "children": [ { "value": 100, "name": "images", "path": "Tcl/bwidget1.9.1/images" }, { "value": 0, "name": "lang", "path": "Tcl/bwidget1.9.1/lang" } ] }, { "value": 324, "name": "iwidgets4.0.2", "path": "Tcl/iwidgets4.0.2", "children": [ { "value": 324, "name": "scripts", "path": "Tcl/iwidgets4.0.2/scripts" } ] }, { "value": 40, "name": "sqlite3", "path": "Tcl/sqlite3" }, { "value": 1456, "name": "tcllib1.12", "path": "Tcl/tcllib1.12", "children": [ { "value": 8, "name": "aes", "path": "Tcl/tcllib1.12/aes" }, { "value": 16, "name": "amazon-s3", "path": "Tcl/tcllib1.12/amazon-s3" }, { "value": 12, "name": "asn", "path": "Tcl/tcllib1.12/asn" }, { "value": 0, "name": "base32", "path": "Tcl/tcllib1.12/base32" }, { "value": 0, "name": "base64", "path": "Tcl/tcllib1.12/base64" }, { "value": 8, "name": "bee", "path": "Tcl/tcllib1.12/bee" }, { "value": 16, "name": "bench", "path": "Tcl/tcllib1.12/bench" }, { "value": 8, "name": "bibtex", "path": "Tcl/tcllib1.12/bibtex" }, { "value": 12, "name": "blowfish", "path": "Tcl/tcllib1.12/blowfish" }, { "value": 0, "name": "cache", "path": "Tcl/tcllib1.12/cache" }, { "value": 8, "name": "cmdline", "path": "Tcl/tcllib1.12/cmdline" }, { "value": 16, "name": "comm", "path": "Tcl/tcllib1.12/comm" }, { "value": 0, "name": "control", "path": "Tcl/tcllib1.12/control" }, { "value": 0, "name": "coroutine", "path": "Tcl/tcllib1.12/coroutine" }, { "value": 12, "name": "counter", "path": "Tcl/tcllib1.12/counter" }, { "value": 8, "name": "crc", "path": "Tcl/tcllib1.12/crc" }, { "value": 8, "name": "csv", "path": "Tcl/tcllib1.12/csv" }, { "value": 24, "name": "des", "path": "Tcl/tcllib1.12/des" }, { "value": 36, "name": "dns", "path": "Tcl/tcllib1.12/dns" }, { "value": 0, "name": "docstrip", "path": "Tcl/tcllib1.12/docstrip" }, { "value": 44, "name": "doctools", "path": "Tcl/tcllib1.12/doctools" }, { "value": 8, "name": "doctools2base", "path": "Tcl/tcllib1.12/doctools2base" }, { "value": 12, "name": "doctools2idx", "path": "Tcl/tcllib1.12/doctools2idx" }, { "value": 12, "name": "doctools2toc", "path": "Tcl/tcllib1.12/doctools2toc" }, { "value": 36, "name": "fileutil", "path": "Tcl/tcllib1.12/fileutil" }, { "value": 16, "name": "ftp", "path": "Tcl/tcllib1.12/ftp" }, { "value": 16, "name": "ftpd", "path": "Tcl/tcllib1.12/ftpd" }, { "value": 84, "name": "fumagic", "path": "Tcl/tcllib1.12/fumagic" }, { "value": 0, "name": "gpx", "path": "Tcl/tcllib1.12/gpx" }, { "value": 20, "name": "grammar_fa", "path": "Tcl/tcllib1.12/grammar_fa" }, { "value": 8, "name": "grammar_me", "path": "Tcl/tcllib1.12/grammar_me" }, { "value": 8, "name": "grammar_peg", "path": "Tcl/tcllib1.12/grammar_peg" }, { "value": 12, "name": "html", "path": "Tcl/tcllib1.12/html" }, { "value": 12, "name": "htmlparse", "path": "Tcl/tcllib1.12/htmlparse" }, { "value": 8, "name": "http", "path": "Tcl/tcllib1.12/http" }, { "value": 0, "name": "ident", "path": "Tcl/tcllib1.12/ident" }, { "value": 12, "name": "imap4", "path": "Tcl/tcllib1.12/imap4" }, { "value": 0, "name": "inifile", "path": "Tcl/tcllib1.12/inifile" }, { "value": 0, "name": "interp", "path": "Tcl/tcllib1.12/interp" }, { "value": 0, "name": "irc", "path": "Tcl/tcllib1.12/irc" }, { "value": 0, "name": "javascript", "path": "Tcl/tcllib1.12/javascript" }, { "value": 12, "name": "jpeg", "path": "Tcl/tcllib1.12/jpeg" }, { "value": 0, "name": "json", "path": "Tcl/tcllib1.12/json" }, { "value": 28, "name": "ldap", "path": "Tcl/tcllib1.12/ldap" }, { "value": 20, "name": "log", "path": "Tcl/tcllib1.12/log" }, { "value": 0, "name": "map", "path": "Tcl/tcllib1.12/map" }, { "value": 12, "name": "mapproj", "path": "Tcl/tcllib1.12/mapproj" }, { "value": 140, "name": "math", "path": "Tcl/tcllib1.12/math" }, { "value": 8, "name": "md4", "path": "Tcl/tcllib1.12/md4" }, { "value": 16, "name": "md5", "path": "Tcl/tcllib1.12/md5" }, { "value": 0, "name": "md5crypt", "path": "Tcl/tcllib1.12/md5crypt" }, { "value": 36, "name": "mime", "path": "Tcl/tcllib1.12/mime" }, { "value": 0, "name": "multiplexer", "path": "Tcl/tcllib1.12/multiplexer" }, { "value": 0, "name": "namespacex", "path": "Tcl/tcllib1.12/namespacex" }, { "value": 12, "name": "ncgi", "path": "Tcl/tcllib1.12/ncgi" }, { "value": 0, "name": "nmea", "path": "Tcl/tcllib1.12/nmea" }, { "value": 8, "name": "nns", "path": "Tcl/tcllib1.12/nns" }, { "value": 8, "name": "nntp", "path": "Tcl/tcllib1.12/nntp" }, { "value": 0, "name": "ntp", "path": "Tcl/tcllib1.12/ntp" }, { "value": 8, "name": "otp", "path": "Tcl/tcllib1.12/otp" }, { "value": 48, "name": "page", "path": "Tcl/tcllib1.12/page" }, { "value": 0, "name": "pluginmgr", "path": "Tcl/tcllib1.12/pluginmgr" }, { "value": 0, "name": "png", "path": "Tcl/tcllib1.12/png" }, { "value": 8, "name": "pop3", "path": "Tcl/tcllib1.12/pop3" }, { "value": 8, "name": "pop3d", "path": "Tcl/tcllib1.12/pop3d" }, { "value": 8, "name": "profiler", "path": "Tcl/tcllib1.12/profiler" }, { "value": 72, "name": "pt", "path": "Tcl/tcllib1.12/pt" }, { "value": 0, "name": "rc4", "path": "Tcl/tcllib1.12/rc4" }, { "value": 0, "name": "rcs", "path": "Tcl/tcllib1.12/rcs" }, { "value": 12, "name": "report", "path": "Tcl/tcllib1.12/report" }, { "value": 8, "name": "rest", "path": "Tcl/tcllib1.12/rest" }, { "value": 16, "name": "ripemd", "path": "Tcl/tcllib1.12/ripemd" }, { "value": 8, "name": "sasl", "path": "Tcl/tcllib1.12/sasl" }, { "value": 24, "name": "sha1", "path": "Tcl/tcllib1.12/sha1" }, { "value": 0, "name": "simulation", "path": "Tcl/tcllib1.12/simulation" }, { "value": 8, "name": "smtpd", "path": "Tcl/tcllib1.12/smtpd" }, { "value": 84, "name": "snit", "path": "Tcl/tcllib1.12/snit" }, { "value": 0, "name": "soundex", "path": "Tcl/tcllib1.12/soundex" }, { "value": 12, "name": "stooop", "path": "Tcl/tcllib1.12/stooop" }, { "value": 48, "name": "stringprep", "path": "Tcl/tcllib1.12/stringprep" }, { "value": 156, "name": "struct", "path": "Tcl/tcllib1.12/struct" }, { "value": 0, "name": "tar", "path": "Tcl/tcllib1.12/tar" }, { "value": 24, "name": "tepam", "path": "Tcl/tcllib1.12/tepam" }, { "value": 0, "name": "term", "path": "Tcl/tcllib1.12/term" }, { "value": 52, "name": "textutil", "path": "Tcl/tcllib1.12/textutil" }, { "value": 0, "name": "tie", "path": "Tcl/tcllib1.12/tie" }, { "value": 8, "name": "tiff", "path": "Tcl/tcllib1.12/tiff" }, { "value": 0, "name": "transfer", "path": "Tcl/tcllib1.12/transfer" }, { "value": 0, "name": "treeql", "path": "Tcl/tcllib1.12/treeql" }, { "value": 0, "name": "uev", "path": "Tcl/tcllib1.12/uev" }, { "value": 8, "name": "units", "path": "Tcl/tcllib1.12/units" }, { "value": 8, "name": "uri", "path": "Tcl/tcllib1.12/uri" }, { "value": 0, "name": "uuid", "path": "Tcl/tcllib1.12/uuid" }, { "value": 0, "name": "virtchannel_base", "path": "Tcl/tcllib1.12/virtchannel_base" }, { "value": 0, "name": "virtchannel_core", "path": "Tcl/tcllib1.12/virtchannel_core" }, { "value": 0, "name": "virtchannel_transform", "path": "Tcl/tcllib1.12/virtchannel_transform" }, { "value": 16, "name": "wip", "path": "Tcl/tcllib1.12/wip" }, { "value": 12, "name": "yaml", "path": "Tcl/tcllib1.12/yaml" } ] }, { "value": 60, "name": "tclsoap1.6.8", "path": "Tcl/tclsoap1.6.8", "children": [ { "value": 0, "name": "interop", "path": "Tcl/tclsoap1.6.8/interop" } ] }, { "value": 56, "name": "tkcon2.6", "path": "Tcl/tkcon2.6" }, { "value": 412, "name": "tklib0.5", "path": "Tcl/tklib0.5", "children": [ { "value": 0, "name": "autoscroll", "path": "Tcl/tklib0.5/autoscroll" }, { "value": 8, "name": "canvas", "path": "Tcl/tklib0.5/canvas" }, { "value": 8, "name": "chatwidget", "path": "Tcl/tklib0.5/chatwidget" }, { "value": 28, "name": "controlwidget", "path": "Tcl/tklib0.5/controlwidget" }, { "value": 0, "name": "crosshair", "path": "Tcl/tklib0.5/crosshair" }, { "value": 8, "name": "ctext", "path": "Tcl/tklib0.5/ctext" }, { "value": 0, "name": "cursor", "path": "Tcl/tklib0.5/cursor" }, { "value": 0, "name": "datefield", "path": "Tcl/tklib0.5/datefield" }, { "value": 24, "name": "diagrams", "path": "Tcl/tklib0.5/diagrams" }, { "value": 0, "name": "getstring", "path": "Tcl/tklib0.5/getstring" }, { "value": 0, "name": "history", "path": "Tcl/tklib0.5/history" }, { "value": 24, "name": "ico", "path": "Tcl/tklib0.5/ico" }, { "value": 8, "name": "ipentry", "path": "Tcl/tklib0.5/ipentry" }, { "value": 16, "name": "khim", "path": "Tcl/tklib0.5/khim" }, { "value": 20, "name": "menubar", "path": "Tcl/tklib0.5/menubar" }, { "value": 16, "name": "ntext", "path": "Tcl/tklib0.5/ntext" }, { "value": 48, "name": "plotchart", "path": "Tcl/tklib0.5/plotchart" }, { "value": 8, "name": "style", "path": "Tcl/tklib0.5/style" }, { "value": 0, "name": "swaplist", "path": "Tcl/tklib0.5/swaplist" }, { "value": 148, "name": "tablelist", "path": "Tcl/tklib0.5/tablelist" }, { "value": 8, "name": "tkpiechart", "path": "Tcl/tklib0.5/tkpiechart" }, { "value": 8, "name": "tooltip", "path": "Tcl/tklib0.5/tooltip" }, { "value": 32, "name": "widget", "path": "Tcl/tklib0.5/widget" } ] } ] }, { "value": 80, "name": "TextEncodings", "path": "TextEncodings", "children": [ { "value": 0, "name": "ArabicEncodings.bundle", "path": "TextEncodings/ArabicEncodings.bundle", "children": [ { "value": 0, "name": "Contents", "path": "TextEncodings/ArabicEncodings.bundle/Contents" } ] }, { "value": 0, "name": "CentralEuropean Encodings.bundle", "path": "TextEncodings/CentralEuropean Encodings.bundle", "children": [ { "value": 0, "name": "Contents", "path": "TextEncodings/CentralEuropean Encodings.bundle/Contents" } ] }, { "value": 0, "name": "ChineseEncodings Supplement.bundle", "path": "TextEncodings/ChineseEncodings Supplement.bundle", "children": [ { "value": 0, "name": "Contents", "path": "TextEncodings/ChineseEncodings Supplement.bundle/Contents" } ] }, { "value": 28, "name": "ChineseEncodings.bundle", "path": "TextEncodings/ChineseEncodings.bundle", "children": [ { "value": 28, "name": "Contents", "path": "TextEncodings/ChineseEncodings.bundle/Contents" } ] }, { "value": 0, "name": "CoreEncodings.bundle", "path": "TextEncodings/CoreEncodings.bundle", "children": [ { "value": 0, "name": "Contents", "path": "TextEncodings/CoreEncodings.bundle/Contents" } ] }, { "value": 0, "name": "CyrillicEncodings.bundle", "path": "TextEncodings/CyrillicEncodings.bundle", "children": [ { "value": 0, "name": "Contents", "path": "TextEncodings/CyrillicEncodings.bundle/Contents" } ] }, { "value": 0, "name": "GreekEncodings.bundle", "path": "TextEncodings/GreekEncodings.bundle", "children": [ { "value": 0, "name": "Contents", "path": "TextEncodings/GreekEncodings.bundle/Contents" } ] }, { "value": 0, "name": "HebrewEncodings.bundle", "path": "TextEncodings/HebrewEncodings.bundle", "children": [ { "value": 0, "name": "Contents", "path": "TextEncodings/HebrewEncodings.bundle/Contents" } ] }, { "value": 0, "name": "IndicEncodings.bundle", "path": "TextEncodings/IndicEncodings.bundle", "children": [ { "value": 0, "name": "Contents", "path": "TextEncodings/IndicEncodings.bundle/Contents" } ] }, { "value": 20, "name": "JapaneseEncodings.bundle", "path": "TextEncodings/JapaneseEncodings.bundle", "children": [ { "value": 20, "name": "Contents", "path": "TextEncodings/JapaneseEncodings.bundle/Contents" } ] }, { "value": 16, "name": "KoreanEncodings.bundle", "path": "TextEncodings/KoreanEncodings.bundle", "children": [ { "value": 16, "name": "Contents", "path": "TextEncodings/KoreanEncodings.bundle/Contents" } ] }, { "value": 0, "name": "SymbolEncodings.bundle", "path": "TextEncodings/SymbolEncodings.bundle", "children": [ { "value": 0, "name": "Contents", "path": "TextEncodings/SymbolEncodings.bundle/Contents" } ] }, { "value": 0, "name": "ThaiEncodings.bundle", "path": "TextEncodings/ThaiEncodings.bundle", "children": [ { "value": 0, "name": "Contents", "path": "TextEncodings/ThaiEncodings.bundle/Contents" } ] }, { "value": 0, "name": "TurkishEncodings.bundle", "path": "TextEncodings/TurkishEncodings.bundle", "children": [ { "value": 0, "name": "Contents", "path": "TextEncodings/TurkishEncodings.bundle/Contents" } ] }, { "value": 16, "name": "UnicodeEncodings.bundle", "path": "TextEncodings/UnicodeEncodings.bundle", "children": [ { "value": 16, "name": "Contents", "path": "TextEncodings/UnicodeEncodings.bundle/Contents" } ] }, { "value": 0, "name": "WesternLanguage Encodings.bundle", "path": "TextEncodings/WesternLanguage Encodings.bundle", "children": [ { "value": 0, "name": "Contents", "path": "TextEncodings/WesternLanguage Encodings.bundle/Contents" } ] } ] }, { "value": 600, "name": "UserEventPlugins", "path": "UserEventPlugins", "children": [ { "value": 60, "name": "ACRRDaemon.plugin", "path": "UserEventPlugins/ACRRDaemon.plugin", "children": [ { "value": 60, "name": "Contents", "path": "UserEventPlugins/ACRRDaemon.plugin/Contents" } ] }, { "value": 16, "name": "AirPortUserAgent.plugin", "path": "UserEventPlugins/AirPortUserAgent.plugin", "children": [ { "value": 16, "name": "Contents", "path": "UserEventPlugins/AirPortUserAgent.plugin/Contents" } ] }, { "value": 0, "name": "alfUIplugin.plugin", "path": "UserEventPlugins/alfUIplugin.plugin", "children": [ { "value": 0, "name": "Contents", "path": "UserEventPlugins/alfUIplugin.plugin/Contents" } ] }, { "value": 12, "name": "AppleHIDMouseAgent.plugin", "path": "UserEventPlugins/AppleHIDMouseAgent.plugin", "children": [ { "value": 12, "name": "Contents", "path": "UserEventPlugins/AppleHIDMouseAgent.plugin/Contents" } ] }, { "value": 12, "name": "AssistantUEA.plugin", "path": "UserEventPlugins/AssistantUEA.plugin", "children": [ { "value": 12, "name": "Contents", "path": "UserEventPlugins/AssistantUEA.plugin/Contents" } ] }, { "value": 16, "name": "AutoTimeZone.plugin", "path": "UserEventPlugins/AutoTimeZone.plugin", "children": [ { "value": 16, "name": "Contents", "path": "UserEventPlugins/AutoTimeZone.plugin/Contents" } ] }, { "value": 20, "name": "BluetoothUserAgent-Plugin.plugin", "path": "UserEventPlugins/BluetoothUserAgent-Plugin.plugin", "children": [ { "value": 20, "name": "Contents", "path": "UserEventPlugins/BluetoothUserAgent-Plugin.plugin/Contents" } ] }, { "value": 12, "name": "BonjourEvents.plugin", "path": "UserEventPlugins/BonjourEvents.plugin", "children": [ { "value": 12, "name": "Contents", "path": "UserEventPlugins/BonjourEvents.plugin/Contents" } ] }, { "value": 16, "name": "BTMMPortInUseAgent.plugin", "path": "UserEventPlugins/BTMMPortInUseAgent.plugin", "children": [ { "value": 16, "name": "Contents", "path": "UserEventPlugins/BTMMPortInUseAgent.plugin/Contents" } ] }, { "value": 8, "name": "CalendarMonitor.plugin", "path": "UserEventPlugins/CalendarMonitor.plugin", "children": [ { "value": 8, "name": "Contents", "path": "UserEventPlugins/CalendarMonitor.plugin/Contents" } ] }, { "value": 88, "name": "CaptiveSystemAgent.plugin", "path": "UserEventPlugins/CaptiveSystemAgent.plugin", "children": [ { "value": 88, "name": "Contents", "path": "UserEventPlugins/CaptiveSystemAgent.plugin/Contents" } ] }, { "value": 12, "name": "CaptiveUserAgent.plugin", "path": "UserEventPlugins/CaptiveUserAgent.plugin", "children": [ { "value": 12, "name": "Contents", "path": "UserEventPlugins/CaptiveUserAgent.plugin/Contents" } ] }, { "value": 8, "name": "com.apple.bonjour.plugin", "path": "UserEventPlugins/com.apple.bonjour.plugin", "children": [ { "value": 8, "name": "Contents", "path": "UserEventPlugins/com.apple.bonjour.plugin/Contents" } ] }, { "value": 8, "name": "com.apple.cfnotification.plugin", "path": "UserEventPlugins/com.apple.cfnotification.plugin", "children": [ { "value": 8, "name": "Contents", "path": "UserEventPlugins/com.apple.cfnotification.plugin/Contents" } ] }, { "value": 8, "name": "com.apple.diskarbitration.plugin", "path": "UserEventPlugins/com.apple.diskarbitration.plugin", "children": [ { "value": 8, "name": "Contents", "path": "UserEventPlugins/com.apple.diskarbitration.plugin/Contents" } ] }, { "value": 8, "name": "com.apple.dispatch.vfs.plugin", "path": "UserEventPlugins/com.apple.dispatch.vfs.plugin", "children": [ { "value": 8, "name": "Contents", "path": "UserEventPlugins/com.apple.dispatch.vfs.plugin/Contents" } ] }, { "value": 12, "name": "com.apple.fsevents.matching.plugin", "path": "UserEventPlugins/com.apple.fsevents.matching.plugin", "children": [ { "value": 12, "name": "Contents", "path": "UserEventPlugins/com.apple.fsevents.matching.plugin/Contents" } ] }, { "value": 8, "name": "com.apple.iokit.matching.plugin", "path": "UserEventPlugins/com.apple.iokit.matching.plugin", "children": [ { "value": 8, "name": "Contents", "path": "UserEventPlugins/com.apple.iokit.matching.plugin/Contents" } ] }, { "value": 8, "name": "com.apple.KeyStore.plugin", "path": "UserEventPlugins/com.apple.KeyStore.plugin", "children": [ { "value": 8, "name": "Contents", "path": "UserEventPlugins/com.apple.KeyStore.plugin/Contents" } ] }, { "value": 8, "name": "com.apple.launchd.helper.plugin", "path": "UserEventPlugins/com.apple.launchd.helper.plugin", "children": [ { "value": 8, "name": "Contents", "path": "UserEventPlugins/com.apple.launchd.helper.plugin/Contents" } ] }, { "value": 8, "name": "com.apple.locationd.events.plugin", "path": "UserEventPlugins/com.apple.locationd.events.plugin", "children": [ { "value": 8, "name": "Contents", "path": "UserEventPlugins/com.apple.locationd.events.plugin/Contents" } ] }, { "value": 8, "name": "com.apple.notifyd.matching.plugin", "path": "UserEventPlugins/com.apple.notifyd.matching.plugin", "children": [ { "value": 8, "name": "Contents", "path": "UserEventPlugins/com.apple.notifyd.matching.plugin/Contents" } ] }, { "value": 8, "name": "com.apple.opendirectory.matching.plugin", "path": "UserEventPlugins/com.apple.opendirectory.matching.plugin", "children": [ { "value": 8, "name": "Contents", "path": "UserEventPlugins/com.apple.opendirectory.matching.plugin/Contents" } ] }, { "value": 12, "name": "com.apple.rcdevent.matching.plugin", "path": "UserEventPlugins/com.apple.rcdevent.matching.plugin", "children": [ { "value": 12, "name": "Contents", "path": "UserEventPlugins/com.apple.rcdevent.matching.plugin/Contents" } ] }, { "value": 8, "name": "com.apple.reachability.plugin", "path": "UserEventPlugins/com.apple.reachability.plugin", "children": [ { "value": 8, "name": "Contents", "path": "UserEventPlugins/com.apple.reachability.plugin/Contents" } ] }, { "value": 8, "name": "com.apple.systemconfiguration.plugin", "path": "UserEventPlugins/com.apple.systemconfiguration.plugin", "children": [ { "value": 8, "name": "Contents", "path": "UserEventPlugins/com.apple.systemconfiguration.plugin/Contents" } ] }, { "value": 44, "name": "com.apple.telemetry.plugin", "path": "UserEventPlugins/com.apple.telemetry.plugin", "children": [ { "value": 44, "name": "Contents", "path": "UserEventPlugins/com.apple.telemetry.plugin/Contents" } ] }, { "value": 24, "name": "com.apple.time.plugin", "path": "UserEventPlugins/com.apple.time.plugin", "children": [ { "value": 24, "name": "Contents", "path": "UserEventPlugins/com.apple.time.plugin/Contents" } ] }, { "value": 12, "name": "com.apple.TimeMachine.plugin", "path": "UserEventPlugins/com.apple.TimeMachine.plugin", "children": [ { "value": 12, "name": "Contents", "path": "UserEventPlugins/com.apple.TimeMachine.plugin/Contents" } ] }, { "value": 20, "name": "com.apple.TimeMachine.System.plugin", "path": "UserEventPlugins/com.apple.TimeMachine.System.plugin", "children": [ { "value": 20, "name": "Contents", "path": "UserEventPlugins/com.apple.TimeMachine.System.plugin/Contents" } ] }, { "value": 12, "name": "com.apple.universalaccess.events.plugin", "path": "UserEventPlugins/com.apple.universalaccess.events.plugin", "children": [ { "value": 12, "name": "Contents", "path": "UserEventPlugins/com.apple.universalaccess.events.plugin/Contents" } ] }, { "value": 8, "name": "com.apple.usernotificationcenter.matching.plugin", "path": "UserEventPlugins/com.apple.usernotificationcenter.matching.plugin", "children": [ { "value": 8, "name": "Contents", "path": "UserEventPlugins/com.apple.usernotificationcenter.matching.plugin/Contents" } ] }, { "value": 12, "name": "com.apple.WorkstationService.plugin", "path": "UserEventPlugins/com.apple.WorkstationService.plugin", "children": [ { "value": 12, "name": "Contents", "path": "UserEventPlugins/com.apple.WorkstationService.plugin/Contents" } ] }, { "value": 28, "name": "EAPOLMonitor.plugin", "path": "UserEventPlugins/EAPOLMonitor.plugin", "children": [ { "value": 28, "name": "Contents", "path": "UserEventPlugins/EAPOLMonitor.plugin/Contents" } ] }, { "value": 8, "name": "GSSNotificationForwarder.plugin", "path": "UserEventPlugins/GSSNotificationForwarder.plugin", "children": [ { "value": 8, "name": "Contents", "path": "UserEventPlugins/GSSNotificationForwarder.plugin/Contents" } ] }, { "value": 12, "name": "LocationMenu.plugin", "path": "UserEventPlugins/LocationMenu.plugin", "children": [ { "value": 12, "name": "Contents", "path": "UserEventPlugins/LocationMenu.plugin/Contents" } ] }, { "value": 12, "name": "PrinterMonitor.plugin", "path": "UserEventPlugins/PrinterMonitor.plugin", "children": [ { "value": 12, "name": "Contents", "path": "UserEventPlugins/PrinterMonitor.plugin/Contents" } ] }, { "value": 16, "name": "SCMonitor.plugin", "path": "UserEventPlugins/SCMonitor.plugin", "children": [ { "value": 16, "name": "Contents", "path": "UserEventPlugins/SCMonitor.plugin/Contents" } ] } ] }, { "value": 536, "name": "Video", "path": "Video", "children": [ { "value": 536, "name": "Plug-Ins", "path": "Video/Plug-Ins", "children": [ { "value": 536, "name": "AppleProResCodec.bundle", "path": "Video/Plug-Ins/AppleProResCodec.bundle" } ] } ] }, { "value": 272, "name": "WidgetResources", "path": "WidgetResources", "children": [ { "value": 16, "name": ".parsers", "path": "WidgetResources/.parsers" }, { "value": 172, "name": "AppleClasses", "path": "WidgetResources/AppleClasses", "children": [ { "value": 156, "name": "Images", "path": "WidgetResources/AppleClasses/Images" } ] }, { "value": 0, "name": "AppleParser", "path": "WidgetResources/AppleParser" }, { "value": 48, "name": "button", "path": "WidgetResources/button" }, { "value": 32, "name": "ibutton", "path": "WidgetResources/ibutton" } ] } ] );
redmed/echarts-www
related/ppt/asset/data/disk-tree.json.js
JavaScript
bsd-3-clause
750,572
// Copyright 2019 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "src/torque/torque-compiler.h" #include <fstream> #include "src/torque/declarable.h" #include "src/torque/declaration-visitor.h" #include "src/torque/global-context.h" #include "src/torque/implementation-visitor.h" #include "src/torque/torque-parser.h" #include "src/torque/type-oracle.h" namespace v8 { namespace internal { namespace torque { namespace { base::Optional<std::string> ReadFile(const std::string& path) { std::ifstream file_stream(path); if (!file_stream.good()) return base::nullopt; return std::string{std::istreambuf_iterator<char>(file_stream), std::istreambuf_iterator<char>()}; } void ReadAndParseTorqueFile(const std::string& path) { SourceId source_id = SourceFileMap::AddSource(path); CurrentSourceFile::Scope source_id_scope(source_id); // path might be either a normal file path or an encoded URI. auto maybe_content = ReadFile(SourceFileMap::AbsolutePath(source_id)); if (!maybe_content) { if (auto maybe_path = FileUriDecode(path)) { maybe_content = ReadFile(*maybe_path); } } if (!maybe_content) { Error("Cannot open file path/uri: ", path).Throw(); } ParseTorque(*maybe_content); } void CompileCurrentAst(TorqueCompilerOptions options) { GlobalContext::Scope global_context(std::move(CurrentAst::Get())); if (options.collect_language_server_data) { GlobalContext::SetCollectLanguageServerData(); } if (options.force_assert_statements) { GlobalContext::SetForceAssertStatements(); } TargetArchitecture::Scope target_architecture(options.force_32bit_output); TypeOracle::Scope type_oracle; // Two-step process of predeclaration + resolution allows to resolve type // declarations independent of the order they are given. PredeclarationVisitor::Predeclare(GlobalContext::ast()); PredeclarationVisitor::ResolvePredeclarations(); // Process other declarations. DeclarationVisitor::Visit(GlobalContext::ast()); // A class types' fields are resolved here, which allows two class fields to // mutually refer to each others. TypeOracle::FinalizeAggregateTypes(); std::string output_directory = options.output_directory; ImplementationVisitor implementation_visitor; implementation_visitor.SetDryRun(output_directory.length() == 0); implementation_visitor.GenerateInstanceTypes(output_directory); implementation_visitor.BeginCSAFiles(); implementation_visitor.VisitAllDeclarables(); ReportAllUnusedMacros(); implementation_visitor.GenerateBuiltinDefinitionsAndInterfaceDescriptors( output_directory); implementation_visitor.GenerateClassFieldOffsets(output_directory); implementation_visitor.GenerateBitFields(output_directory); implementation_visitor.GeneratePrintDefinitions(output_directory); implementation_visitor.GenerateClassDefinitions(output_directory); implementation_visitor.GenerateClassVerifiers(output_directory); implementation_visitor.GenerateClassDebugReaders(output_directory); implementation_visitor.GenerateEnumVerifiers(output_directory); implementation_visitor.GenerateBodyDescriptors(output_directory); implementation_visitor.GenerateExportedMacrosAssembler(output_directory); implementation_visitor.GenerateCSATypes(output_directory); implementation_visitor.EndCSAFiles(); implementation_visitor.GenerateImplementation(output_directory); if (GlobalContext::collect_language_server_data()) { LanguageServerData::SetGlobalContext(std::move(GlobalContext::Get())); LanguageServerData::SetTypeOracle(std::move(TypeOracle::Get())); } } } // namespace TorqueCompilerResult CompileTorque(const std::string& source, TorqueCompilerOptions options) { SourceFileMap::Scope source_map_scope(options.v8_root); CurrentSourceFile::Scope no_file_scope( SourceFileMap::AddSource("dummy-filename.tq")); CurrentAst::Scope ast_scope; TorqueMessages::Scope messages_scope; LanguageServerData::Scope server_data_scope; TorqueCompilerResult result; try { ParseTorque(source); CompileCurrentAst(options); } catch (TorqueAbortCompilation&) { // Do nothing. The relevant TorqueMessage is part of the // TorqueMessages contextual. } result.source_file_map = SourceFileMap::Get(); result.language_server_data = std::move(LanguageServerData::Get()); result.messages = std::move(TorqueMessages::Get()); return result; } TorqueCompilerResult CompileTorque(std::vector<std::string> files, TorqueCompilerOptions options) { SourceFileMap::Scope source_map_scope(options.v8_root); CurrentSourceFile::Scope unknown_source_file_scope(SourceId::Invalid()); CurrentAst::Scope ast_scope; TorqueMessages::Scope messages_scope; LanguageServerData::Scope server_data_scope; TorqueCompilerResult result; try { for (const auto& path : files) { ReadAndParseTorqueFile(path); } CompileCurrentAst(options); } catch (TorqueAbortCompilation&) { // Do nothing. The relevant TorqueMessage is part of the // TorqueMessages contextual. } result.source_file_map = SourceFileMap::Get(); result.language_server_data = std::move(LanguageServerData::Get()); result.messages = std::move(TorqueMessages::Get()); return result; } } // namespace torque } // namespace internal } // namespace v8
endlessm/chromium-browser
v8/src/torque/torque-compiler.cc
C++
bsd-3-clause
5,519
# -*- coding: utf-8 -*- # Copyright (C) 2012, Almar Klein # # Visvis is distributed under the terms of the (new) BSD License. # The full license can be found in 'license.txt'. import visvis as vv import numpy as np import os # Try importing imageio imageio = None try: import imageio except ImportError: pass def volread(filename): """ volread(filename) Read volume from a file. If filename is 'stent', read a dedicated test dataset. For reading any other kind of volume, the imageio package is required. """ if filename == 'stent': # Get full filename path = vv.misc.getResourceDir() filename2 = os.path.join(path, 'stent_vol.ssdf') if os.path.isfile(filename2): filename = filename2 else: raise IOError("File '%s' does not exist." % filename) # Load s = vv.ssdf.load(filename) return s.vol.astype('int16') * s.colorscale elif imageio is not None: return imageio.volread(filename) else: raise RuntimeError("visvis.volread needs the imageio package to read arbitrary files.") if __name__ == '__main__': vol = vv.volread('stent') t = vv.volshow(vol) t.renderStyle = 'mip' # maximum intensity projection (is the default)
chrisidefix/visvis
functions/volread.py
Python
bsd-3-clause
1,322
// Copyright 2018 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/usb/usb_policy_allowed_devices.h" #include <string> #include <vector> #include "base/bind.h" #include "base/strings/string_split.h" #include "base/values.h" #include "components/content_settings/core/common/pref_names.h" #include "components/prefs/pref_service.h" #include "services/device/public/mojom/usb_device.mojom.h" #include "services/device/public/mojom/usb_manager.mojom.h" #include "url/gurl.h" namespace { constexpr char kPrefDevicesKey[] = "devices"; constexpr char kPrefUrlsKey[] = "urls"; constexpr char kPrefVendorIdKey[] = "vendor_id"; constexpr char kPrefProductIdKey[] = "product_id"; } // namespace UsbPolicyAllowedDevices::UsbPolicyAllowedDevices(PrefService* pref_service) { pref_change_registrar_.Init(pref_service); // Add an observer for |kManagedWebUsbAllowDevicesForUrls| to call // CreateOrUpdateMap when the value is changed. The lifetime of // |pref_change_registrar_| is managed by this class, therefore it is safe to // use base::Unretained here. pref_change_registrar_.Add( prefs::kManagedWebUsbAllowDevicesForUrls, base::BindRepeating(&UsbPolicyAllowedDevices::CreateOrUpdateMap, base::Unretained(this))); CreateOrUpdateMap(); } UsbPolicyAllowedDevices::~UsbPolicyAllowedDevices() {} bool UsbPolicyAllowedDevices::IsDeviceAllowed( const url::Origin& origin, const device::mojom::UsbDeviceInfo& device_info) { return IsDeviceAllowed( origin, std::make_pair(device_info.vendor_id, device_info.product_id)); } bool UsbPolicyAllowedDevices::IsDeviceAllowed( const url::Origin& origin, const std::pair<int, int>& device_ids) { // Search through each set of URL pair that match the given device. The // keys correspond to the following URL pair sets: // * (vendor_id, product_id): A set corresponding to the exact device. // * (vendor_id, -1): A set corresponding to any device with |vendor_id|. // * (-1, -1): A set corresponding to any device. const std::pair<int, int> set_keys[] = { std::make_pair(device_ids.first, device_ids.second), std::make_pair(device_ids.first, -1), std::make_pair(-1, -1)}; for (const auto& key : set_keys) { const auto entry = usb_device_ids_to_urls_.find(key); if (entry == usb_device_ids_to_urls_.cend()) continue; if (entry->second.find(origin) != entry->second.end()) return true; } return false; } void UsbPolicyAllowedDevices::CreateOrUpdateMap() { const base::Value* pref_value = pref_change_registrar_.prefs()->Get( prefs::kManagedWebUsbAllowDevicesForUrls); usb_device_ids_to_urls_.clear(); // A policy has not been assigned. if (!pref_value) { return; } // The pref value has already been validated by the policy handler, so it is // safe to assume that |pref_value| follows the policy template. for (const auto& item : pref_value->GetList()) { const base::Value* urls_list = item.FindKey(kPrefUrlsKey); std::set<url::Origin> parsed_set; // A urls item can contain a pair of URLs that are delimited by a comma. If // it does not contain a second URL, set the embedding URL to an empty GURL // to signify a wildcard embedded URL. for (const auto& urls_value : urls_list->GetList()) { std::vector<std::string> urls = base::SplitString(urls_value.GetString(), ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); // Skip invalid URL entries. if (urls.empty()) continue; auto requesting_origin = url::Origin::Create(GURL(urls[0])); absl::optional<url::Origin> embedding_origin; if (urls.size() == 2 && !urls[1].empty()) embedding_origin = url::Origin::Create(GURL(urls[1])); // In order to be compatible with legacy (requesting,embedding) entries // without breaking any access specified, we will grant the permission to // the embedder if present because under permission delegation the // top-level origin has the permission. If only the requesting origin is // present, use that instead. auto origin = embedding_origin.has_value() ? embedding_origin.value() : requesting_origin; parsed_set.insert(std::move(origin)); } // Ignore items with empty parsed URLs. if (parsed_set.empty()) continue; // For each device entry in the map, create or update its respective URL // set. const base::Value* devices = item.FindKey(kPrefDevicesKey); for (const auto& device : devices->GetList()) { // A missing ID signifies a wildcard for that ID, so a sentinel value of // -1 is assigned. const base::Value* vendor_id_value = device.FindKey(kPrefVendorIdKey); const base::Value* product_id_value = device.FindKey(kPrefProductIdKey); int vendor_id = vendor_id_value ? vendor_id_value->GetInt() : -1; int product_id = product_id_value ? product_id_value->GetInt() : -1; DCHECK(vendor_id != -1 || product_id == -1); auto key = std::make_pair(vendor_id, product_id); usb_device_ids_to_urls_[key].insert(parsed_set.begin(), parsed_set.end()); } } }
ric2b/Vivaldi-browser
chromium/chrome/browser/usb/usb_policy_allowed_devices.cc
C++
bsd-3-clause
5,366
/* * Copyright (c) 2012-2014 The Khronos Group Inc. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and/or associated documentation files (the * "Materials"), to deal in the Materials without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Materials, and to * permit persons to whom the Materials are furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Materials. * * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. */ #define LOG_TAG "Node_JNI" #include "openvx_jni.h" namespace android { //************************************************************************** // LOCAL VARIABLES //************************************************************************** //************************************************************************** // EXPORTED FUNCTIONS //************************************************************************** static void Initialize(JNIEnv *env, jobject obj, jlong g, jlong k) { vx_graph graph = (vx_graph)g; vx_kernel kernel = (vx_kernel)k; vx_node n = vxCreateGenericNode(graph, kernel); SetHandle(env, obj, NodeClass, parentName, g); SetHandle(env, obj, NodeClass, handleName, (jlong)n); } static void Finalize(JNIEnv *env, jobject obj) { vx_node n = (vx_node)GetHandle(env, obj, NodeClass, handleName); vxReleaseNode(&n); SetHandle(env, obj, NodeClass, handleName, 0); } static jobject getParameter(JNIEnv *env, jobject obj, jint i) { vx_node n = (vx_node)GetHandle(env, obj, NodeClass, handleName); jclass c = env->FindClass(ParameterClass); jmethodID id = env->GetMethodID(c, "<init>", "(JI)"OBJECT(Parameter)); jobject p = env->NewObject(c, id, (jlong)n, i); return p; } static jint setParameter(JNIEnv *env, jobject obj, jint index, jlong ref) { vx_node n = (vx_node)GetHandle(env, obj, NodeClass, handleName); return vxSetParameterByIndex(n, index, (vx_reference)ref); } static JNINativeMethod method_table[] = { // { name, signature, function_pointer } { "create", "(JJ)V", (void *)Initialize }, { "destroy", "()V", (void *)Finalize }, { "getParameter", "(I)"OBJECT(Parameter), (void *)getParameter }, { "_setParameter", "(IJ)I", (void *)setParameter }, }; int register_org_khronos_OpenVX_Node(JNIEnv *env) { PrintJNITable(LOG_TAG, NodeClass, method_table, NELEM(method_table)); return jniRegisterNativeMethods(env, NodeClass, method_table, NELEM(method_table)); } };
hy3440/HOG-OpenVX
sample/bindings/java/jni/Node.cpp
C++
mit
3,492
# frozen_string_literal: true require 'csv' class CourseStudentsCsvBuilder def initialize(course) @course = course end def generate_csv csv_data = [CSV_HEADERS] courses_users.each do |courses_user| csv_data << row(courses_user) end CSV.generate { |csv| csv_data.each { |line| csv << line } } end private def courses_users @course.courses_users.where(role: CoursesUsers::Roles::STUDENT_ROLE).includes(:user) end CSV_HEADERS = %w[ username enrollment_timestamp registered_at revisions_during_project mainspace_bytes_added userpace_bytes_added draft_space_bytes_added registered_during_project ].freeze def row(courses_user) row = [courses_user.user.username] row << courses_user.created_at row << courses_user.user.registered_at row << courses_user.revision_count row << courses_user.character_sum_ms row << courses_user.character_sum_us row << courses_user.character_sum_draft row << newbie?(courses_user.user) end def newbie?(user) (@course.start..@course.end).cover? user.registered_at end end
alpha721/WikiEduDashboard
lib/analytics/course_students_csv_builder.rb
Ruby
mit
1,126
/** * window.c.ProjectSuggestedContributions component * A Project-show page helper to show suggested amounts of contributions * * Example of use: * view: () => { * ... * m.component(c.ProjectSuggestedContributions, {project: project}) * ... * } */ import m from 'mithril'; import _ from 'underscore'; const projectSuggestedContributions = { view(ctrl, args) { const project = args.project(); const suggestionUrl = amount => `/projects/${project.project_id}/contributions/new?amount=${amount}`, suggestedValues = [10, 25, 50, 100]; return m('#suggestions', _.map(suggestedValues, amount => project ? m(`a[href="${suggestionUrl(amount)}"].card-reward.card-big.card-secondary.u-marginbottom-20`, [ m('.fontsize-larger', `R$ ${amount}`) ]) : '')); } }; export default projectSuggestedContributions;
vicnicius/catarse_admin
src/c/project-suggested-contributions.js
JavaScript
mit
881
""" Copyright (c) 2012-2016 Ben Croston Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ from RPi._GPIO import * VERSION = '0.6.3'
anatolieGhebea/contatore
python/RPi.GPIO-0.6.3/RPi/GPIO/__init__.py
Python
mit
1,112
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Threading; namespace GSoft.Dynamite.Collections { /// <summary> /// A list that supports synchronized reading and writing. /// </summary> /// <typeparam name="T">The type of object contained in the list.</typeparam> [Serializable] [SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix", Justification = "This is actually a list.")] public class ConcurrentList<T> : IList<T>, IList { #region Fields private readonly List<T> _underlyingList = new List<T>(); [NonSerialized] private volatile ReaderWriterLockSlim _lock; #endregion #region Properties /// <summary> /// Gets the number of elements contained in the <see cref="T:System.Collections.Generic.ICollection`1"/>. /// </summary> /// <returns> /// The number of elements contained in the <see cref="T:System.Collections.Generic.ICollection`1"/>. /// </returns> public int Count { get { this.Lock.EnterReadLock(); try { return this._underlyingList.Count; } finally { this.Lock.ExitReadLock(); } } } /// <summary> /// Gets a value indicating whether the <see cref="T:System.Collections.Generic.ICollection`1"/> is read-only. /// </summary> /// <returns>true if the <see cref="T:System.Collections.Generic.ICollection`1"/> is read-only; otherwise, false. /// </returns> public bool IsReadOnly { get { this.Lock.EnterReadLock(); try { return ((IList)this._underlyingList).IsReadOnly; } finally { this.Lock.ExitReadLock(); } } } /// <summary> /// Gets a value indicating whether the <see cref="T:System.Collections.IList"/> has a fixed size. /// </summary> /// <returns>true if the <see cref="T:System.Collections.IList"/> has a fixed size; otherwise, false.</returns> [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes", Justification = "Not part of IList of T.")] bool IList.IsFixedSize { get { return false; } } /// <summary> /// Gets a value indicating whether access to the <see cref="T:System.Collections.ICollection"/> is synchronized (thread safe). /// </summary> /// <returns>true if access to the <see cref="T:System.Collections.ICollection"/> is synchronized (thread safe); otherwise, false.</returns> [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes", Justification = "Not part of IList of T.")] bool ICollection.IsSynchronized { get { return true; } } /// <summary> /// Gets an object that can be used to synchronize access to the <see cref="T:System.Collections.ICollection"/>. /// </summary> /// <returns>An object that can be used to synchronize access to the <see cref="T:System.Collections.ICollection"/>.</returns> [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes", Justification = "Not part of IList of T.")] object ICollection.SyncRoot { get { return this; } } /// <summary> /// Gets the lock used for synchronization. /// </summary> private ReaderWriterLockSlim Lock { get { if (this._lock == null) { lock (this) { if (this._lock == null) { this._lock = new ReaderWriterLockSlim(); } } } return this._lock; } } /// <summary> /// Gets or sets the element at the specified index. /// </summary> /// <param name="index">The index to add the item at.</param> /// <returns> /// The element at the specified index. /// </returns> /// <exception cref="T:System.ArgumentOutOfRangeException"><paramref name="index"/> is not a valid index in the <see cref="T:System.Collections.Generic.IList`1"/>.</exception> /// <exception cref="T:System.NotSupportedException"> /// The property is set and the <see cref="T:System.Collections.Generic.IList`1"/> is read-only. /// </exception> object IList.this[int index] { get { return this[index]; } set { this[index] = (T)value; } } /// <summary> /// Gets or sets the element at the specified index. /// </summary> /// <param name="index">The index to add the item at.</param> /// <returns> /// The element at the specified index. /// </returns> /// <exception cref="T:System.ArgumentOutOfRangeException"><paramref name="index"/> is not a valid index in the <see cref="T:System.Collections.Generic.IList`1"/>.</exception> /// <exception cref="T:System.NotSupportedException">The property is set and the <see cref="T:System.Collections.Generic.IList`1"/> is read-only.</exception> public T this[int index] { get { this.Lock.EnterReadLock(); try { return this._underlyingList[index]; } finally { this.Lock.ExitReadLock(); } } set { this.Lock.EnterWriteLock(); try { this._underlyingList[index] = value; } finally { this.Lock.ExitWriteLock(); } } } #endregion #region Methods /// <summary> /// Determines the index of a specific item in the <see cref="T:System.Collections.Generic.IList`1"/>. /// </summary> /// <param name="item">The object to locate in the <see cref="T:System.Collections.Generic.IList`1"/>.</param> /// <returns> /// The index of <paramref name="item"/> if found in the list; otherwise, -1. /// </returns> public int IndexOf(T item) { this.Lock.EnterReadLock(); try { return this._underlyingList.IndexOf(item); } finally { this.Lock.ExitReadLock(); } } /// <summary> /// Inserts an item to the <see cref="T:System.Collections.Generic.IList`1"/> at the specified index. /// </summary> /// <param name="index">The zero-based index at which <paramref name="item"/> should be inserted.</param> /// <param name="item">The object to insert into the <see cref="T:System.Collections.Generic.IList`1"/>.</param> /// <exception cref="T:System.ArgumentOutOfRangeException"><paramref name="index"/> is not a valid index in the <see cref="T:System.Collections.Generic.IList`1"/>.</exception> /// <exception cref="T:System.NotSupportedException"> /// The <see cref="T:System.Collections.Generic.IList`1"/> is read-only. /// </exception> public void Insert(int index, T item) { this.Lock.EnterWriteLock(); try { this._underlyingList.Insert(index, item); } finally { this.Lock.ExitWriteLock(); } } /// <summary> /// Removes the <see cref="T:System.Collections.Generic.IList`1"/> item at the specified index. /// </summary> /// <param name="index">The zero-based index of the item to remove.</param> /// <exception cref="T:System.ArgumentOutOfRangeException"><paramref name="index"/> is not a valid index in the <see cref="T:System.Collections.Generic.IList`1"/>. /// </exception> /// <exception cref="T:System.NotSupportedException"> /// The <see cref="T:System.Collections.Generic.IList`1"/> is read-only. /// </exception> public void RemoveAt(int index) { this.Lock.EnterWriteLock(); try { this._underlyingList.RemoveAt(index); } finally { this.Lock.ExitWriteLock(); } } /// <summary> /// Adds an item to the <see cref="T:System.Collections.Generic.ICollection`1"/>. /// </summary> /// <param name="item">The object to add to the <see cref="T:System.Collections.Generic.ICollection`1"/>.</param> /// <exception cref="T:System.NotSupportedException"> /// The <see cref="T:System.Collections.Generic.ICollection`1"/> is read-only. /// </exception> public void Add(T item) { this.Lock.EnterWriteLock(); try { this._underlyingList.Add(item); } finally { this.Lock.ExitWriteLock(); } } /// <summary> /// Removes all items from the <see cref="T:System.Collections.Generic.ICollection`1"/>. /// </summary> /// <exception cref="T:System.NotSupportedException"> /// The <see cref="T:System.Collections.Generic.ICollection`1"/> is read-only. /// </exception> public void Clear() { this.Lock.EnterWriteLock(); try { this._underlyingList.Clear(); } finally { this.Lock.ExitWriteLock(); } } /// <summary> /// Determines whether the <see cref="T:System.Collections.Generic.ICollection`1"/> contains a specific value. /// </summary> /// <param name="item">The object to locate in the <see cref="T:System.Collections.Generic.ICollection`1"/>.</param> /// <returns> /// true if <paramref name="item"/> is found in the <see cref="T:System.Collections.Generic.ICollection`1"/>; otherwise, false. /// </returns> public bool Contains(T item) { this.Lock.EnterReadLock(); try { return this._underlyingList.Contains(item); } finally { this.Lock.ExitReadLock(); } } /// <summary> /// Copies to. /// </summary> /// <param name="array">The array.</param> /// <param name="arrayIndex">Index of the array.</param> public void CopyTo(T[] array, int arrayIndex) { ((IList)this).CopyTo(array, arrayIndex); } /// <summary> /// Removes the first occurrence of a specific object from the <see cref="T:System.Collections.Generic.ICollection`1"/>. /// </summary> /// <param name="item">The object to remove from the <see cref="T:System.Collections.Generic.ICollection`1"/>.</param> /// <returns> /// true if <paramref name="item"/> was successfully removed from the <see cref="T:System.Collections.Generic.ICollection`1"/>; otherwise, false. This method also returns false if <paramref name="item"/> is not found in the original <see cref="T:System.Collections.Generic.ICollection`1"/>. /// </returns> /// <exception cref="T:System.NotSupportedException"> /// The <see cref="T:System.Collections.Generic.ICollection`1"/> is read-only. /// </exception> public bool Remove(T item) { this.Lock.EnterWriteLock(); try { return this._underlyingList.Remove(item); } finally { this.Lock.ExitWriteLock(); } } /// <summary> /// Returns an enumerator that iterates through the collection. /// </summary> /// <returns> /// A <see cref="T:System.Collections.Generic.IEnumerator`1"/> that can be used to iterate through the collection. /// </returns> public virtual IEnumerator<T> GetEnumerator() { this.Lock.EnterReadLock(); return new ReadLockedEnumerator<T>(this.Lock, this._underlyingList.GetEnumerator()); } /// <summary> /// Adds an item to the <see cref="T:System.Collections.IList"/>. /// </summary> /// <param name="value">The object to add to the <see cref="T:System.Collections.IList"/>.</param> /// <returns> /// The position into which the new element was inserted, or -1 to indicate that the item was not inserted into the collection, /// </returns> /// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.IList"/> is read-only.-or- The <see cref="T:System.Collections.IList"/> has a fixed size. </exception> int IList.Add(object value) { this.Lock.EnterWriteLock(); try { return ((IList)this._underlyingList).Add(value); } finally { this.Lock.ExitWriteLock(); } } /// <summary> /// Determines whether the <see cref="T:System.Collections.IList"/> contains a specific value. /// </summary> /// <param name="value">The object to locate in the <see cref="T:System.Collections.IList"/>.</param> /// <returns> /// true if the <see cref="T:System.Object"/> is found in the <see cref="T:System.Collections.IList"/>; otherwise, false. /// </returns> bool IList.Contains(object value) { return this.Contains((T)value); } /// <summary> /// Determines the index of a specific item in the <see cref="T:System.Collections.IList"/>. /// </summary> /// <param name="value">The object to locate in the <see cref="T:System.Collections.IList"/>.</param> /// <returns> /// The index of <paramref name="value"/> if found in the list; otherwise, -1. /// </returns> int IList.IndexOf(object value) { return this.IndexOf((T)value); } /// <summary> /// Inserts an item to the <see cref="T:System.Collections.IList"/> at the specified index. /// </summary> /// <param name="index">The zero-based index at which <paramref name="value"/> should be inserted.</param> /// <param name="value">The object to insert into the <see cref="T:System.Collections.IList"/>.</param> /// <exception cref="T:System.ArgumentOutOfRangeException"> /// <paramref name="index"/> is not a valid index in the <see cref="T:System.Collections.IList"/>. </exception> /// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.IList"/> is read-only.-or- The <see cref="T:System.Collections.IList"/> has a fixed size. </exception> /// <exception cref="T:System.NullReferenceException"> /// <paramref name="value"/> is null reference in the <see cref="T:System.Collections.IList"/>.</exception> void IList.Insert(int index, object value) { this.Insert(index, (T)value); } /// <summary> /// Removes the first occurrence of a specific object from the <see cref="T:System.Collections.IList"/>. /// </summary> /// <param name="value">The object to remove from the <see cref="T:System.Collections.IList"/>.</param> /// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.IList"/> is read-only.-or- The <see cref="T:System.Collections.IList"/> has a fixed size. </exception> void IList.Remove(object value) { this.Remove((T)value); } /// <summary> /// Copies the elements of the <see cref="T:System.Collections.ICollection"/> to an <see cref="T:System.Array"/>, starting at a particular <see cref="T:System.Array"/> index. /// </summary> /// <param name="array">The one-dimensional <see cref="T:System.Array"/> that is the destination of the elements copied from <see cref="T:System.Collections.ICollection"/>. The <see cref="T:System.Array"/> must have zero-based indexing.</param> /// <param name="index">The zero-based index in <paramref name="array"/> at which copying begins.</param> /// <exception cref="T:System.ArgumentNullException"> /// <paramref name="array"/> is null. </exception> /// <exception cref="T:System.ArgumentOutOfRangeException"> /// <paramref name="index"/> is less than zero. </exception> /// <exception cref="T:System.ArgumentException"> /// <paramref name="array"/> is multidimensional.-or- The number of elements in the source <see cref="T:System.Collections.ICollection"/> is greater than the available space from <paramref name="index"/> to the end of the destination <paramref name="array"/>. </exception> /// <exception cref="T:System.ArgumentException">The type of the source <see cref="T:System.Collections.ICollection"/> cannot be cast automatically to the type of the destination <paramref name="array"/>. </exception> void ICollection.CopyTo(Array array, int index) { this.Lock.EnterReadLock(); try { ((IList)this._underlyingList).CopyTo(array, index); } finally { this.Lock.ExitReadLock(); } } /// <summary> /// Returns an enumerator that iterates through a collection. /// </summary> /// <returns> /// An <see cref="T:System.Collections.IEnumerator"/> object that can be used to iterate through the collection. /// </returns> IEnumerator IEnumerable.GetEnumerator() { return this.GetEnumerator(); } #endregion #region Nested classes /// <summary> /// An enumerator that releases a read lock when Disposing. /// </summary> /// <typeparam name="TItem">The type of the item.</typeparam> private class ReadLockedEnumerator<TItem> : IEnumerator<TItem> { private readonly ReaderWriterLockSlim _syncRoot; private readonly IEnumerator<TItem> _underlyingEnumerator; /// <summary> /// Initializes a new instance of the <see cref="ConcurrentList&lt;T&gt;.ReadLockedEnumerator&lt;TItem&gt;"/> class. /// </summary> /// <param name="syncRoot">The sync root.</param> /// <param name="underlyingEnumerator">The underlying enumerator.</param> public ReadLockedEnumerator(ReaderWriterLockSlim syncRoot, IEnumerator<TItem> underlyingEnumerator) { this._syncRoot = syncRoot; this._underlyingEnumerator = underlyingEnumerator; } /// <summary> /// Gets the element in the collection at the current position of the enumerator. /// </summary> /// <returns> /// The element in the collection at the current position of the enumerator. /// </returns> public TItem Current { get { return this._underlyingEnumerator.Current; } } /// <summary> /// Gets the element in the collection at the current position of the enumerator. /// </summary> /// <returns> /// The element in the collection at the current position of the enumerator. /// </returns> object IEnumerator.Current { get { return this.Current; } } /// <summary> /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. /// </summary> public void Dispose() { this._syncRoot.ExitReadLock(); } /// <summary> /// Advances the enumerator to the next element of the collection. /// </summary> /// <returns> /// true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. /// </returns> /// <exception cref="T:System.InvalidOperationException">The collection was modified after the enumerator was created. </exception> public bool MoveNext() { return this._underlyingEnumerator.MoveNext(); } /// <summary> /// Sets the enumerator to its initial position, which is before the first element in the collection. /// </summary> /// <exception cref="T:System.InvalidOperationException">The collection was modified after the enumerator was created. </exception> public void Reset() { this._underlyingEnumerator.Reset(); } } #endregion } }
GSoft-SharePoint/Dynamite
Source/GSoft.Dynamite/Collections/ConcurrentList.cs
C#
mit
22,033
<?php namespace Oro\Bundle\IntegrationBundle\Provider; use Oro\Bundle\IntegrationBundle\Entity\Channel as Integration; interface SyncProcessorInterface { /** * @param Integration $integration * @param $connector * @param array $connectorParameters * * @return bool */ public function process(Integration $integration, $connector, array $connectorParameters = []); }
Djamy/platform
src/Oro/Bundle/IntegrationBundle/Provider/SyncProcessorInterface.php
PHP
mit
407
import { get } from '../get' export function getSearchData(page, cityName, category, keyword) { const keywordStr = keyword ? '/' + keyword : '' const result = get('/api/search/' + page + '/' + cityName + '/' + category + keywordStr) return result }
su-chang/react-web-app
app/fetch/search/search.js
JavaScript
mit
261
/*global define*/ /*jslint white:true,browser:true*/ define([ 'bluebird', // CDN 'kb_common/html', // LOCAL 'common/ui', 'common/runtime', 'common/events', 'common/props', // Wrapper for inputs './inputWrapperWidget', 'widgets/appWidgets/fieldWidget', // Display widgets 'widgets/appWidgets/paramDisplayResolver' ], function ( Promise, html, UI, Runtime, Events, Props, //Wrappers RowWidget, FieldWidget, ParamResolver ) { 'use strict'; var t = html.tag, form = t('form'), span = t('span'), div = t('div'); function factory(config) { var runtime = Runtime.make(), parentBus = config.bus, cellId = config.cellId, workspaceInfo = config.workspaceInfo, container, ui, bus, places, model = Props.make(), inputBusses = [], settings = { showAdvanced: null }, paramResolver = ParamResolver.make(); // DATA /* * The input control widget is selected based on these parameters: * - data type - (text, int, float, workspaceObject (ref, name) * - input app - input, select */ // RENDERING function makeFieldWidget(parameterSpec, value) { var bus = runtime.bus().makeChannelBus(null, 'Params view input bus comm widget'), inputWidget = paramResolver.getWidgetFactory(parameterSpec); inputBusses.push(bus); // An input widget may ask for the current model value at any time. bus.on('sync', function () { parentBus.emit('parameter-sync', { parameter: parameterSpec.id() }); }); parentBus.listen({ key: { type: 'update', parameter: parameterSpec.id() }, handle: function (message) { bus.emit('update', { value: message.value }); } }); // Just pass the update along to the input widget. // TODO: commented out, is it even used? // parentBus.listen({ // test: function (message) { // var pass = (message.type === 'update' && message.parameter === parameterSpec.id()); // return pass; // }, // handle: function (message) { // bus.send(message); // } // }); return FieldWidget.make({ inputControlFactory: inputWidget, showHint: true, useRowHighight: true, initialValue: value, parameterSpec: parameterSpec, bus: bus, workspaceId: workspaceInfo.id }); } function renderAdvanced() { var advancedInputs = container.querySelectorAll('[data-advanced-parameter]'); if (advancedInputs.length === 0) { return; } var removeClass = (settings.showAdvanced ? 'advanced-parameter-hidden' : 'advanced-parameter-showing'), addClass = (settings.showAdvanced ? 'advanced-parameter-showing' : 'advanced-parameter-hidden'); for (var i = 0; i < advancedInputs.length; i += 1) { var input = advancedInputs[i]; input.classList.remove(removeClass); input.classList.add(addClass); } // How many advanaced? // Also update the button var button = container.querySelector('[data-button="toggle-advanced"]'); button.innerHTML = (settings.showAdvanced ? 'Hide Advanced' : 'Show Advanced (' + advancedInputs.length + ' hidden)'); // Also update the } function renderLayout() { var events = Events.make(), content = form({dataElement: 'input-widget-form'}, [ ui.buildPanel({ type: 'default', classes: 'kb-panel-light', body: [ ui.makeButton('Show Advanced', 'toggle-advanced', {events: events}) ] }), ui.buildPanel({ title: 'Inputs', body: div({dataElement: 'input-fields'}), classes: ['kb-panel-container'] }), ui.buildPanel({ title: span(['Parameters', span({dataElement: 'advanced-hidden'})]), body: div({dataElement: 'parameter-fields'}), classes: ['kb-panel-container'] }), ui.buildPanel({ title: 'Outputs', body: div({dataElement: 'output-fields'}), classes: ['kb-panel-container'] }) ]); return { content: content, events: events }; } // MESSAGE HANDLERS function doAttach(node) { container = node; ui = UI.make({ node: container, bus: bus }); var layout = renderLayout(); container.innerHTML = layout.content; layout.events.attachEvents(container); places = { inputFields: ui.getElement('input-fields'), outputFields: ui.getElement('output-fields'), parameterFields: ui.getElement('parameter-fields'), advancedParameterFields: ui.getElement('advanced-parameter-fields') }; } // EVENTS function attachEvents() { bus.on('reset-to-defaults', function () { inputBusses.forEach(function (inputBus) { inputBus.send({ type: 'reset-to-defaults' }); }); }); bus.on('toggle-advanced', function () { settings.showAdvanced = !settings.showAdvanced; renderAdvanced(); }); } // LIFECYCLE API function renderParameters(params) { var widgets = []; // First get the app specs, which is stashed in the model, // with the parameters returned. // Separate out the params into the primary groups. var params = model.getItem('parameters'), inputParams = params.filter(function (spec) { return (spec.spec.ui_class === 'input'); }), outputParams = params.filter(function (spec) { return (spec.spec.ui_class === 'output'); }), parameterParams = params.filter(function (spec) { return (spec.spec.ui_class === 'parameter'); }); return Promise.resolve() .then(function () { if (inputParams.length === 0) { places.inputFields.innerHTML = span({style: {fontStyle: 'italic'}}, 'No input objects for this app'); } else { return Promise.all(inputParams.map(function (spec) { var fieldWidget = makeFieldWidget(spec, model.getItem(['params', spec.name()])), rowWidget = RowWidget.make({widget: fieldWidget, spec: spec}), rowNode = document.createElement('div'); places.inputFields.appendChild(rowNode); widgets.push(rowWidget); rowWidget.attach(rowNode); })); } }) .then(function () { if (outputParams.length === 0) { places.outputFields.innerHTML = span({style: {fontStyle: 'italic'}}, 'No output objects for this app'); } else { return Promise.all(outputParams.map(function (spec) { var fieldWidget = makeFieldWidget(spec, model.getItem(['params', spec.name()])), rowWidget = RowWidget.make({widget: fieldWidget, spec: spec}), rowNode = document.createElement('div'); places.outputFields.appendChild(rowNode); widgets.push(rowWidget); rowWidget.attach(rowNode); })); } }) .then(function () { if (parameterParams.length === 0) { ui.setContent('parameter-fields', span({style: {fontStyle: 'italic'}}, 'No parameters for this app')); } else { return Promise.all(parameterParams.map(function (spec) { var fieldWidget = makeFieldWidget(spec, model.getItem(['params', spec.name()])), rowWidget = RowWidget.make({widget: fieldWidget, spec: spec}), rowNode = document.createElement('div'); places.parameterFields.appendChild(rowNode); widgets.push(rowWidget); rowWidget.attach(rowNode); })); } }) .then(function () { return Promise.all(widgets.map(function (widget) { return widget.start(); })); }) .then(function () { return Promise.all(widgets.map(function (widget) { return widget.run(params); })); }) .then(function () { renderAdvanced(); }); } function start() { // send parent the ready message return Promise.try(function () { parentBus.emit('ready'); // parent will send us our initial parameters parentBus.on('run', function (message) { doAttach(message.node); model.setItem('parameters', message.parameters); // we then create our widgets renderParameters() .then(function () { // do something after success attachEvents(); }) .catch(function (err) { // do somethig with the error. console.error('ERROR in start', err); }); }); }); } function stop() { return Promise.try(function () { // unregister listerrs... }); } // CONSTRUCTION bus = runtime.bus().makeChannelBus(null, 'params view own bus'); return { start: start, stop: stop, bus: function () { return bus; } }; } return { make: function (config) { return factory(config); } }; });
msneddon/narrative
nbextensions/editorCell_bill/widgets/editorParamsViewWidget.js
JavaScript
mit
11,747
package com.hearthsim.card.basic.spell; import com.hearthsim.card.spellcard.SpellTargetableCard; import com.hearthsim.event.effect.EffectCharacter; import com.hearthsim.event.effect.EffectCharacterBuffTemp; import com.hearthsim.event.filter.FilterCharacter; import com.hearthsim.event.filter.FilterCharacterTargetedSpell; public class HeroicStrike extends SpellTargetableCard { private final static EffectCharacter effect = new EffectCharacterBuffTemp(4); /** * Constructor * * Defaults to hasBeenUsed = false */ public HeroicStrike() { super(); } @Override public FilterCharacter getTargetableFilter() { return FilterCharacterTargetedSpell.SELF; } /** * Heroic Strike * * Gives the hero +4 attack this turn * * * * @param side * @param boardState The BoardState before this card has performed its action. It will be manipulated and returned. * * @return The boardState is manipulated and returned */ @Override public EffectCharacter getTargetableEffect() { return HeroicStrike.effect; } }
oyachai/HearthSim
src/main/java/com/hearthsim/card/basic/spell/HeroicStrike.java
Java
mit
1,140
module SS::Reference::Site extend ActiveSupport::Concern extend SS::Translation included do cattr_accessor :site_required, instance_accessor: false self.site_required = true attr_accessor :cur_site belongs_to :site, class_name: "SS::Site" validates :site_id, presence: true, if: ->{ self.class.site_required } before_validation :set_site_id, if: ->{ @cur_site } end module ClassMethods # define scope by class method instead of scope to be able to override by subclass def site(site) where(site_id: site.id) end end private def set_site_id self.site_id ||= @cur_site.id end end
ShinjiTanimoto/shirasagi
app/models/concerns/ss/reference/site.rb
Ruby
mit
649
using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Net; using Mindscape.Raygun4Net.Messages; using System.Threading; using System.Reflection; using Mindscape.Raygun4Net.Builders; namespace Mindscape.Raygun4Net { public class RaygunClient : RaygunClientBase { private readonly string _apiKey; private readonly List<Type> _wrapperExceptions = new List<Type>(); /// <summary> /// Initializes a new instance of the <see cref="RaygunClient" /> class. /// </summary> /// <param name="apiKey">The API key.</param> public RaygunClient(string apiKey) { _apiKey = apiKey; _wrapperExceptions.Add(typeof(TargetInvocationException)); } /// <summary> /// Initializes a new instance of the <see cref="RaygunClient" /> class. /// Uses the ApiKey specified in the config file. /// </summary> public RaygunClient() : this(RaygunSettings.Settings.ApiKey) { } protected bool ValidateApiKey() { if (string.IsNullOrEmpty(_apiKey)) { System.Diagnostics.Debug.WriteLine("ApiKey has not been provided, exception will not be logged"); return false; } return true; } /// <summary> /// Gets or sets the username/password credentials which are used to authenticate with the system default Proxy server, if one is set /// and requires credentials. /// </summary> public ICredentials ProxyCredentials { get; set; } /// <summary> /// Gets or sets an IWebProxy instance which can be used to override the default system proxy server settings /// </summary> public IWebProxy WebProxy { get; set; } /// <summary> /// Adds a list of outer exceptions that will be stripped, leaving only the valuable inner exception. /// This can be used when a wrapper exception, e.g. TargetInvocationException or HttpUnhandledException, /// contains the actual exception as the InnerException. The message and stack trace of the inner exception will then /// be used by Raygun for grouping and display. The above two do not need to be added manually, /// but if you have other wrapper exceptions that you want stripped you can pass them in here. /// </summary> /// <param name="wrapperExceptions">Exception types that you want removed and replaced with their inner exception.</param> public void AddWrapperExceptions(params Type[] wrapperExceptions) { foreach (Type wrapper in wrapperExceptions) { if (!_wrapperExceptions.Contains(wrapper)) { _wrapperExceptions.Add(wrapper); } } } /// <summary> /// Specifies types of wrapper exceptions that Raygun should send rather than stripping out and sending the inner exception. /// This can be used to remove the default wrapper exceptions (TargetInvocationException and HttpUnhandledException). /// </summary> /// <param name="wrapperExceptions">Exception types that should no longer be stripped away.</param> public void RemoveWrapperExceptions(params Type[] wrapperExceptions) { foreach (Type wrapper in wrapperExceptions) { _wrapperExceptions.Remove(wrapper); } } /// <summary> /// Transmits an exception to Raygun.io synchronously, using the version number of the originating assembly. /// </summary> /// <param name="exception">The exception to deliver.</param> public override void Send(Exception exception) { Send(exception, null, (IDictionary)null, null); } /// <summary> /// Transmits an exception to Raygun.io synchronously specifying a list of string tags associated /// with the message for identification. This uses the version number of the originating assembly. /// </summary> /// <param name="exception">The exception to deliver.</param> /// <param name="tags">A list of strings associated with the message.</param> public void Send(Exception exception, IList<string> tags) { Send(exception, tags, (IDictionary)null, null); } /// <summary> /// Transmits an exception to Raygun.io synchronously specifying a list of string tags associated /// with the message for identification, as well as sending a key-value collection of custom data. /// This uses the version number of the originating assembly. /// </summary> /// <param name="exception">The exception to deliver.</param> /// <param name="tags">A list of strings associated with the message.</param> /// <param name="userCustomData">A key-value collection of custom data that will be added to the payload.</param> public void Send(Exception exception, IList<string> tags, IDictionary userCustomData) { Send(exception, tags, userCustomData, null); } /// <summary> /// Transmits an exception to Raygun.io synchronously specifying a list of string tags associated /// with the message for identification, as well as sending a key-value collection of custom data. /// This uses the version number of the originating assembly. /// </summary> /// <param name="exception">The exception to deliver.</param> /// <param name="tags">A list of strings associated with the message.</param> /// <param name="userCustomData">A key-value collection of custom data that will be added to the payload.</param> /// <param name="userInfo">Information about the user including the identity string.</param> public void Send(Exception exception, IList<string> tags, IDictionary userCustomData, RaygunIdentifierMessage userInfo) { if (CanSend(exception)) { StripAndSend(exception, tags, userCustomData, userInfo, null); FlagAsSent(exception); } } /// <summary> /// Asynchronously transmits a message to Raygun.io. /// </summary> /// <param name="exception">The exception to deliver.</param> public void SendInBackground(Exception exception) { SendInBackground(exception, null, (IDictionary)null, null); } /// <summary> /// Asynchronously transmits an exception to Raygun.io. /// </summary> /// <param name="exception">The exception to deliver.</param> /// <param name="tags">A list of strings associated with the message.</param> public void SendInBackground(Exception exception, IList<string> tags) { SendInBackground(exception, tags, (IDictionary)null, null); } /// <summary> /// Asynchronously transmits an exception to Raygun.io. /// </summary> /// <param name="exception">The exception to deliver.</param> /// <param name="tags">A list of strings associated with the message.</param> /// <param name="userCustomData">A key-value collection of custom data that will be added to the payload.</param> public void SendInBackground(Exception exception, IList<string> tags, IDictionary userCustomData) { SendInBackground(exception, tags, userCustomData, null); } /// <summary> /// Asynchronously transmits an exception to Raygun.io. /// </summary> /// <param name="exception">The exception to deliver.</param> /// <param name="tags">A list of strings associated with the message.</param> /// <param name="userCustomData">A key-value collection of custom data that will be added to the payload.</param> /// <param name="userInfo">Information about the user including the identity string.</param> public void SendInBackground(Exception exception, IList<string> tags, IDictionary userCustomData, RaygunIdentifierMessage userInfo) { DateTime? currentTime = DateTime.UtcNow; if (CanSend(exception)) { ThreadPool.QueueUserWorkItem(c => { try { StripAndSend(exception, tags, userCustomData, userInfo, currentTime); } catch (Exception) { // This will swallow any unhandled exceptions unless we explicitly want to throw on error. // Otherwise this can bring the whole process down. if (RaygunSettings.Settings.ThrowOnError) { throw; } } }); FlagAsSent(exception); } } /// <summary> /// Asynchronously transmits a message to Raygun.io. /// </summary> /// <param name="raygunMessage">The RaygunMessage to send. This needs its OccurredOn property /// set to a valid DateTime and as much of the Details property as is available.</param> public void SendInBackground(RaygunMessage raygunMessage) { ThreadPool.QueueUserWorkItem(c => Send(raygunMessage)); } protected RaygunMessage BuildMessage(Exception exception, IList<string> tags, IDictionary userCustomData) { return BuildMessage(exception, tags, userCustomData, null, null); } protected RaygunMessage BuildMessage(Exception exception, IList<string> tags, IDictionary userCustomData, RaygunIdentifierMessage userInfoMessage) { return BuildMessage(exception, tags, userCustomData, userInfoMessage, null); } protected RaygunMessage BuildMessage(Exception exception, IList<string> tags, IDictionary userCustomData, RaygunIdentifierMessage userInfoMessage, DateTime? currentTime) { var message = RaygunMessageBuilder.New .SetEnvironmentDetails() .SetTimeStamp(currentTime) .SetMachineName(Environment.MachineName) .SetExceptionDetails(exception) .SetClientDetails() .SetVersion(ApplicationVersion) .SetTags(tags) .SetUserCustomData(userCustomData) .SetUser(userInfoMessage ?? UserInfo ?? (!String.IsNullOrEmpty(User) ? new RaygunIdentifierMessage(User) : null)) .Build(); return message; } private void StripAndSend(Exception exception, IList<string> tags, IDictionary userCustomData, RaygunIdentifierMessage userInfo, DateTime? currentTime) { foreach (Exception e in StripWrapperExceptions(exception)) { Send(BuildMessage(e, tags, userCustomData, userInfo, currentTime)); } } protected IEnumerable<Exception> StripWrapperExceptions(Exception exception) { if (exception != null && _wrapperExceptions.Any(wrapperException => exception.GetType() == wrapperException && exception.InnerException != null)) { AggregateException aggregate = exception as AggregateException; if (aggregate != null) { foreach (Exception e in aggregate.InnerExceptions) { foreach (Exception ex in StripWrapperExceptions(e)) { yield return ex; } } } else { foreach (Exception e in StripWrapperExceptions(exception.InnerException)) { yield return e; } } } else { yield return exception; } } /// <summary> /// Posts a RaygunMessage to the Raygun.io api endpoint. /// </summary> /// <param name="raygunMessage">The RaygunMessage to send. This needs its OccurredOn property /// set to a valid DateTime and as much of the Details property as is available.</param> public override void Send(RaygunMessage raygunMessage) { if (ValidateApiKey()) { bool canSend = OnSendingMessage(raygunMessage); if (canSend) { using (var client = CreateWebClient()) { try { var message = SimpleJson.SerializeObject(raygunMessage); client.UploadString(RaygunSettings.Settings.ApiEndpoint, message); } catch (Exception ex) { System.Diagnostics.Trace.WriteLine(string.Format("Error Logging Exception to Raygun.io {0}", ex.Message)); if (RaygunSettings.Settings.ThrowOnError) { throw; } } } } } } protected WebClient CreateWebClient() { var client = new WebClient(); client.Headers.Add("X-ApiKey", _apiKey); client.Headers.Add("content-type", "application/json; charset=utf-8"); client.Encoding = System.Text.Encoding.UTF8; if (WebProxy != null) { client.Proxy = WebProxy; } else if (WebRequest.DefaultWebProxy != null) { Uri proxyUri = WebRequest.DefaultWebProxy.GetProxy(new Uri(RaygunSettings.Settings.ApiEndpoint.ToString())); if (proxyUri != null && proxyUri.AbsoluteUri != RaygunSettings.Settings.ApiEndpoint.ToString()) { client.Proxy = new WebProxy(proxyUri, false); if (ProxyCredentials == null) { client.UseDefaultCredentials = true; client.Proxy.Credentials = CredentialCache.DefaultCredentials; } else { client.UseDefaultCredentials = false; client.Proxy.Credentials = ProxyCredentials; } } } return client; } } }
nelsonsar/raygun4net
Mindscape.Raygun4Net4.ClientProfile/RaygunClient.cs
C#
mit
13,094
// Copyright (c) Microsoft Corporation // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "pch.h" #include "ProfileService_winrt.h" #include "Utils_WinRT.h" using namespace pplx; using namespace Windows::Foundation; using namespace Windows::Foundation::Collections; using namespace Platform; using namespace Platform::Collections; using namespace Microsoft::Xbox::Services::System; using namespace xbox::services::social; using namespace xbox::services; NAMESPACE_MICROSOFT_XBOX_SERVICES_SOCIAL_BEGIN ProfileService::ProfileService( _In_ profile_service cppObj ): m_cppObj(std::move(cppObj)) { } IAsyncOperation<XboxUserProfile^>^ ProfileService::GetUserProfileAsync( _In_ String^ xboxUserId ) { auto task = m_cppObj.get_user_profile( STRING_T_FROM_PLATFORM_STRING(xboxUserId) ) .then([](xbox::services::xbox_live_result<xbox_user_profile> cppUserProfile) { THROW_HR_IF_ERR(cppUserProfile.err()); return ref new XboxUserProfile(cppUserProfile.payload()); }); return ASYNC_FROM_TASK(task); } IAsyncOperation<IVectorView<XboxUserProfile^>^>^ ProfileService::GetUserProfilesAsync( _In_ IVectorView<String^>^ xboxUserIds ) { std::vector<string_t> vecXboxUserIds = UtilsWinRT::CovertVectorViewToStdVectorString(xboxUserIds); auto task = m_cppObj.get_user_profiles(vecXboxUserIds) .then([](xbox::services::xbox_live_result<std::vector<xbox_user_profile>> cppUserProfiles) { THROW_HR_IF_ERR(cppUserProfiles.err()); Vector<XboxUserProfile^>^ responseVector = ref new Vector<XboxUserProfile^>(); const auto& result = cppUserProfiles.payload(); for (auto& cppUserProfile : result) { auto userProfile = ref new XboxUserProfile(cppUserProfile); responseVector->Append(userProfile); } return responseVector->GetView(); }); return ASYNC_FROM_TASK(task); } IAsyncOperation<IVectorView<XboxUserProfile^>^>^ ProfileService::GetUserProfilesForSocialGroupAsync( _In_ Platform::String^ socialGroup ) { auto task = m_cppObj.get_user_profiles_for_social_group(STRING_T_FROM_PLATFORM_STRING(socialGroup)) .then([](xbox_live_result<std::vector<xbox_user_profile>> cppUserProfileList) { THROW_IF_ERR(cppUserProfileList); Vector<XboxUserProfile^>^ responseVector = ref new Vector<XboxUserProfile^>(); for (auto& cppUserProfile : cppUserProfileList.payload()) { XboxUserProfile^ userProfile = ref new XboxUserProfile(cppUserProfile); responseVector->Append(userProfile); } return responseVector->GetView(); }); return ASYNC_FROM_TASK(task); } NAMESPACE_MICROSOFT_XBOX_SERVICES_SOCIAL_END
jicailiu/xbox-live-api
Source/Services/Social/WinRT/ProfileService_WinRT.cpp
C++
mit
2,818
// Copyright 2011 Splunk, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"): you may // not use this file except in compliance with the License. You may obtain // a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the // License for the specific language governing permissions and limitations // under the License. (function() { var Http = require('../../http'); var utils = require('../../utils'); var root = exports || this; var getHeaders = function(headersString) { var headers = {}; var headerLines = headersString.split("\n"); for(var i = 0; i < headerLines.length; i++) { if (utils.trim(headerLines[i]) !== "") { var headerParts = headerLines[i].split(": "); headers[headerParts[0]] = headerParts[1]; } } return headers; }; root.JQueryHttp = Http.extend({ init: function(isSplunk) { this._super(isSplunk); }, makeRequest: function(url, message, callback) { var that = this; var params = { url: url, type: message.method, headers: message.headers, data: message.body || "", timeout: message.timeout || 0, dataType: "json", success: utils.bind(this, function(data, error, res) { var response = { statusCode: res.status, headers: getHeaders(res.getAllResponseHeaders()) }; var complete_response = this._buildResponse(error, response, data); callback(complete_response); }), error: function(res, data, error) { var response = { statusCode: res.status, headers: getHeaders(res.getAllResponseHeaders()) }; if (data === "abort") { response.statusCode = "abort"; res.responseText = "{}"; } var json = JSON.parse(res.responseText); var complete_response = that._buildResponse(error, response, json); callback(complete_response); } }; return $.ajax(params); }, parseJson: function(json) { // JQuery does this for us return json; } }); })();
Christopheraburns/projecttelemetry
node_modules/splunk-sdk/lib/platform/client/jquery_http.js
JavaScript
mit
2,820
// Copyright (c) 2011-2013 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "optionsdialog.h" #include "ui_optionsdialog.h" #include "bitcoinunits.h" #include "monitoreddatamapper.h" #include "netbase.h" #include "optionsmodel.h" #include <QDir> #include <QIntValidator> #include <QLocale> #include <QMessageBox> OptionsDialog::OptionsDialog(QWidget *parent) : QDialog(parent), ui(new Ui::OptionsDialog), model(0), mapper(0), fRestartWarningDisplayed_Proxy(false), fRestartWarningDisplayed_Lang(false), fProxyIpValid(true) { ui->setupUi(this); /* Network elements init */ #ifndef USE_UPNP ui->mapPortUpnp->setEnabled(false); #endif ui->proxyIp->setEnabled(false); ui->proxyPort->setEnabled(false); ui->proxyPort->setValidator(new QIntValidator(1, 65535, this)); ui->socksVersion->setEnabled(false); ui->socksVersion->addItem("5", 5); ui->socksVersion->addItem("4", 4); ui->socksVersion->setCurrentIndex(0); connect(ui->connectSocks, SIGNAL(toggled(bool)), ui->proxyIp, SLOT(setEnabled(bool))); connect(ui->connectSocks, SIGNAL(toggled(bool)), ui->proxyPort, SLOT(setEnabled(bool))); connect(ui->connectSocks, SIGNAL(toggled(bool)), ui->socksVersion, SLOT(setEnabled(bool))); connect(ui->connectSocks, SIGNAL(clicked(bool)), this, SLOT(showRestartWarning_Proxy())); ui->proxyIp->installEventFilter(this); /* Window elements init */ #ifdef Q_OS_MAC /* remove Window tab on Mac */ ui->tabWidget->removeTab(ui->tabWidget->indexOf(ui->tabWindow)); #endif /* Display elements init */ QDir translations(":translations"); ui->lang->addItem(QString("(") + tr("default") + QString(")"), QVariant("")); foreach(const QString &langStr, translations.entryList()) { QLocale locale(langStr); /** check if the locale name consists of 2 parts (language_country) */ if(langStr.contains("_")) { #if QT_VERSION >= 0x040800 /** display language strings as "native language - native country (locale name)", e.g. "Deutsch - Deutschland (de)" */ ui->lang->addItem(locale.nativeLanguageName() + QString(" - ") + locale.nativeCountryName() + QString(" (") + langStr + QString(")"), QVariant(langStr)); #else /** display language strings as "language - country (locale name)", e.g. "German - Germany (de)" */ ui->lang->addItem(QLocale::languageToString(locale.language()) + QString(" - ") + QLocale::countryToString(locale.country()) + QString(" (") + langStr + QString(")"), QVariant(langStr)); #endif } else { #if QT_VERSION >= 0x040800 /** display language strings as "native language (locale name)", e.g. "Deutsch (de)" */ ui->lang->addItem(locale.nativeLanguageName() + QString(" (") + langStr + QString(")"), QVariant(langStr)); #else /** display language strings as "language (locale name)", e.g. "German (de)" */ ui->lang->addItem(QLocale::languageToString(locale.language()) + QString(" (") + langStr + QString(")"), QVariant(langStr)); #endif } } ui->unit->setModel(new BitcoinUnits(this)); /* Widget-to-option mapper */ mapper = new MonitoredDataMapper(this); mapper->setSubmitPolicy(QDataWidgetMapper::ManualSubmit); mapper->setOrientation(Qt::Vertical); /* enable apply button when data modified */ connect(mapper, SIGNAL(viewModified()), this, SLOT(enableApplyButton())); /* disable apply button when new data loaded */ connect(mapper, SIGNAL(currentIndexChanged(int)), this, SLOT(disableApplyButton())); /* setup/change UI elements when proxy IP is invalid/valid */ connect(this, SIGNAL(proxyIpValid(QValidatedLineEdit *, bool)), this, SLOT(handleProxyIpValid(QValidatedLineEdit *, bool))); } OptionsDialog::~OptionsDialog() { delete ui; } void OptionsDialog::setModel(OptionsModel *model) { this->model = model; if(model) { connect(model, SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit())); mapper->setModel(model); setMapper(); mapper->toFirst(); } /* update the display unit, to not use the default ("BTC") */ updateDisplayUnit(); /* warn only when language selection changes by user action (placed here so init via mapper doesn't trigger this) */ connect(ui->lang, SIGNAL(valueChanged()), this, SLOT(showRestartWarning_Lang())); /* disable apply button after settings are loaded as there is nothing to save */ disableApplyButton(); } void OptionsDialog::setMapper() { /* Main */ mapper->addMapping(ui->bitcoinAtStartup, OptionsModel::StartAtStartup); /* Wallet */ mapper->addMapping(ui->transactionFee, OptionsModel::Fee); mapper->addMapping(ui->spendZeroConfChange, OptionsModel::SpendZeroConfChange); /* Network */ mapper->addMapping(ui->mapPortUpnp, OptionsModel::MapPortUPnP); mapper->addMapping(ui->connectSocks, OptionsModel::ProxyUse); mapper->addMapping(ui->proxyIp, OptionsModel::ProxyIP); mapper->addMapping(ui->proxyPort, OptionsModel::ProxyPort); mapper->addMapping(ui->socksVersion, OptionsModel::ProxySocksVersion); /* Window */ #ifndef Q_OS_MAC mapper->addMapping(ui->minimizeToTray, OptionsModel::MinimizeToTray); mapper->addMapping(ui->minimizeOnClose, OptionsModel::MinimizeOnClose); #endif /* Display */ mapper->addMapping(ui->lang, OptionsModel::Language); mapper->addMapping(ui->unit, OptionsModel::DisplayUnit); mapper->addMapping(ui->displayAddresses, OptionsModel::DisplayAddresses); mapper->addMapping(ui->coinControlFeatures, OptionsModel::CoinControlFeatures); } void OptionsDialog::enableApplyButton() { ui->applyButton->setEnabled(true); } void OptionsDialog::disableApplyButton() { ui->applyButton->setEnabled(false); } void OptionsDialog::enableSaveButtons() { /* prevent enabling of the save buttons when data modified, if there is an invalid proxy address present */ if(fProxyIpValid) setSaveButtonState(true); } void OptionsDialog::disableSaveButtons() { setSaveButtonState(false); } void OptionsDialog::setSaveButtonState(bool fState) { ui->applyButton->setEnabled(fState); ui->okButton->setEnabled(fState); } void OptionsDialog::on_resetButton_clicked() { if(model) { // confirmation dialog QMessageBox::StandardButton btnRetVal = QMessageBox::question(this, tr("Confirm options reset"), tr("Some settings may require a client restart to take effect.") + "<br><br>" + tr("Do you want to proceed?"), QMessageBox::Yes | QMessageBox::Cancel, QMessageBox::Cancel); if(btnRetVal == QMessageBox::Cancel) return; disableApplyButton(); /* disable restart warning messages display */ fRestartWarningDisplayed_Lang = fRestartWarningDisplayed_Proxy = true; /* reset all options and save the default values (QSettings) */ model->Reset(); mapper->toFirst(); mapper->submit(); /* re-enable restart warning messages display */ fRestartWarningDisplayed_Lang = fRestartWarningDisplayed_Proxy = false; } } void OptionsDialog::on_okButton_clicked() { mapper->submit(); accept(); } void OptionsDialog::on_cancelButton_clicked() { reject(); } void OptionsDialog::on_applyButton_clicked() { mapper->submit(); disableApplyButton(); } void OptionsDialog::showRestartWarning_Proxy() { if(!fRestartWarningDisplayed_Proxy) { QMessageBox::warning(this, tr("Warning"), tr("This setting will take effect after restarting Potcoin."), QMessageBox::Ok); fRestartWarningDisplayed_Proxy = true; } } void OptionsDialog::showRestartWarning_Lang() { if(!fRestartWarningDisplayed_Lang) { QMessageBox::warning(this, tr("Warning"), tr("This setting will take effect after restarting Potcoin."), QMessageBox::Ok); fRestartWarningDisplayed_Lang = true; } } void OptionsDialog::updateDisplayUnit() { if(model) { /* Update transactionFee with the current unit */ ui->transactionFee->setDisplayUnit(model->getDisplayUnit()); } } void OptionsDialog::handleProxyIpValid(QValidatedLineEdit *object, bool fState) { // this is used in a check before re-enabling the save buttons fProxyIpValid = fState; if(fProxyIpValid) { enableSaveButtons(); ui->statusLabel->clear(); } else { disableSaveButtons(); object->setValid(fProxyIpValid); ui->statusLabel->setStyleSheet("QLabel { color: red; }"); ui->statusLabel->setText(tr("The supplied proxy address is invalid.")); } } bool OptionsDialog::eventFilter(QObject *object, QEvent *event) { if(event->type() == QEvent::FocusOut) { if(object == ui->proxyIp) { CService addr; /* Check proxyIp for a valid IPv4/IPv6 address and emit the proxyIpValid signal */ emit proxyIpValid(ui->proxyIp, LookupNumeric(ui->proxyIp->text().toStdString().c_str(), addr)); } } return QDialog::eventFilter(object, event); }
bankonme/Potcoin-1
src/qt/optionsdialog.cpp
C++
mit
9,332
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2016 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #if defined(HAVE_CONFIG_H) #include "config/bitcoin-config.h" #endif #include "init.h" #include "addrman.h" #include "amount.h" #include "chain.h" #include "chainparams.h" #include "checkpoints.h" #include "compat/sanity.h" #include "consensus/validation.h" #include "httpserver.h" #include "httprpc.h" #include "key.h" #include "validation.h" #include "miner.h" #include "netbase.h" #include "net.h" #include "net_processing.h" #include "policy/policy.h" #include "rpc/server.h" #include "rpc/register.h" #include "script/standard.h" #include "script/sigcache.h" #include "scheduler.h" #include "timedata.h" #include "txdb.h" #include "txmempool.h" #include "torcontrol.h" #include "ui_interface.h" #include "util.h" #include "utilmoneystr.h" #include "validationinterface.h" #ifdef ENABLE_WALLET #include "wallet/wallet.h" #endif #include "warnings.h" #include <stdint.h> #include <stdio.h> #include <memory> #ifndef WIN32 #include <signal.h> #endif #include <boost/algorithm/string/classification.hpp> #include <boost/algorithm/string/predicate.hpp> #include <boost/algorithm/string/replace.hpp> #include <boost/algorithm/string/split.hpp> #include <boost/bind.hpp> #include <boost/filesystem.hpp> #include <boost/function.hpp> #include <boost/interprocess/sync/file_lock.hpp> #include <boost/thread.hpp> #include <openssl/crypto.h> #if ENABLE_ZMQ #include "zmq/zmqnotificationinterface.h" #endif bool fFeeEstimatesInitialized = false; static const bool DEFAULT_PROXYRANDOMIZE = true; static const bool DEFAULT_REST_ENABLE = false; static const bool DEFAULT_DISABLE_SAFEMODE = false; static const bool DEFAULT_STOPAFTERBLOCKIMPORT = false; std::unique_ptr<CConnman> g_connman; std::unique_ptr<PeerLogicValidation> peerLogic; #if ENABLE_ZMQ static CZMQNotificationInterface* pzmqNotificationInterface = NULL; #endif #ifdef WIN32 // Win32 LevelDB doesn't use filedescriptors, and the ones used for // accessing block files don't count towards the fd_set size limit // anyway. #define MIN_CORE_FILEDESCRIPTORS 0 #else #define MIN_CORE_FILEDESCRIPTORS 150 #endif /** Used to pass flags to the Bind() function */ enum BindFlags { BF_NONE = 0, BF_EXPLICIT = (1U << 0), BF_REPORT_ERROR = (1U << 1), BF_WHITELIST = (1U << 2), }; static const char* FEE_ESTIMATES_FILENAME="fee_estimates.dat"; ////////////////////////////////////////////////////////////////////////////// // // Shutdown // // // Thread management and startup/shutdown: // // The network-processing threads are all part of a thread group // created by AppInit() or the Qt main() function. // // A clean exit happens when StartShutdown() or the SIGTERM // signal handler sets fRequestShutdown, which triggers // the DetectShutdownThread(), which interrupts the main thread group. // DetectShutdownThread() then exits, which causes AppInit() to // continue (it .joins the shutdown thread). // Shutdown() is then // called to clean up database connections, and stop other // threads that should only be stopped after the main network-processing // threads have exited. // // Shutdown for Qt is very similar, only it uses a QTimer to detect // fRequestShutdown getting set, and then does the normal Qt // shutdown thing. // std::atomic<bool> fRequestShutdown(false); std::atomic<bool> fDumpMempoolLater(false); void StartShutdown() { fRequestShutdown = true; } bool ShutdownRequested() { return fRequestShutdown; } /** * This is a minimally invasive approach to shutdown on LevelDB read errors from the * chainstate, while keeping user interface out of the common library, which is shared * between bitcoind, and bitcoin-qt and non-server tools. */ class CCoinsViewErrorCatcher : public CCoinsViewBacked { public: CCoinsViewErrorCatcher(CCoinsView* view) : CCoinsViewBacked(view) {} bool GetCoins(const uint256 &txid, CCoins &coins) const { try { return CCoinsViewBacked::GetCoins(txid, coins); } catch(const std::runtime_error& e) { uiInterface.ThreadSafeMessageBox(_("Error reading from database, shutting down."), "", CClientUIInterface::MSG_ERROR); LogPrintf("Error reading from database: %s\n", e.what()); // Starting the shutdown sequence and returning false to the caller would be // interpreted as 'entry not found' (as opposed to unable to read data), and // could lead to invalid interpretation. Just exit immediately, as we can't // continue anyway, and all writes should be atomic. abort(); } } // Writes do not need similar protection, as failure to write is handled by the caller. }; static CCoinsViewDB *pcoinsdbview = NULL; static CCoinsViewErrorCatcher *pcoinscatcher = NULL; static std::unique_ptr<ECCVerifyHandle> globalVerifyHandle; void Interrupt(boost::thread_group& threadGroup) { InterruptHTTPServer(); InterruptHTTPRPC(); InterruptRPC(); InterruptREST(); InterruptTorControl(); if (g_connman) g_connman->Interrupt(); threadGroup.interrupt_all(); } void Shutdown() { LogPrintf("%s: In progress...\n", __func__); static CCriticalSection cs_Shutdown; TRY_LOCK(cs_Shutdown, lockShutdown); if (!lockShutdown) return; /// Note: Shutdown() must be able to handle cases in which initialization failed part of the way, /// for example if the data directory was found to be locked. /// Be sure that anything that writes files or flushes caches only does this if the respective /// module was initialized. RenameThread("bitcoin-shutoff"); mempool.AddTransactionsUpdated(1); StopHTTPRPC(); StopREST(); StopRPC(); StopHTTPServer(); #ifdef ENABLE_WALLET if (pwalletMain) pwalletMain->Flush(false); #endif MapPort(false); UnregisterValidationInterface(peerLogic.get()); peerLogic.reset(); g_connman.reset(); StopTorControl(); UnregisterNodeSignals(GetNodeSignals()); if (fDumpMempoolLater) DumpMempool(); if (fFeeEstimatesInitialized) { boost::filesystem::path est_path = GetDataDir() / FEE_ESTIMATES_FILENAME; CAutoFile est_fileout(fopen(est_path.string().c_str(), "wb"), SER_DISK, CLIENT_VERSION); if (!est_fileout.IsNull()) mempool.WriteFeeEstimates(est_fileout); else LogPrintf("%s: Failed to write fee estimates to %s\n", __func__, est_path.string()); fFeeEstimatesInitialized = false; } { LOCK(cs_main); if (pcoinsTip != NULL) { FlushStateToDisk(); } delete pcoinsTip; pcoinsTip = NULL; delete pcoinscatcher; pcoinscatcher = NULL; delete pcoinsdbview; pcoinsdbview = NULL; delete pblocktree; pblocktree = NULL; } #ifdef ENABLE_WALLET if (pwalletMain) pwalletMain->Flush(true); #endif #if ENABLE_ZMQ if (pzmqNotificationInterface) { UnregisterValidationInterface(pzmqNotificationInterface); delete pzmqNotificationInterface; pzmqNotificationInterface = NULL; } #endif #ifndef WIN32 try { boost::filesystem::remove(GetPidFile()); } catch (const boost::filesystem::filesystem_error& e) { LogPrintf("%s: Unable to remove pidfile: %s\n", __func__, e.what()); } #endif UnregisterAllValidationInterfaces(); #ifdef ENABLE_WALLET delete pwalletMain; pwalletMain = NULL; #endif globalVerifyHandle.reset(); ECC_Stop(); LogPrintf("%s: done\n", __func__); } /** * Signal handlers are very limited in what they are allowed to do, so: */ void HandleSIGTERM(int) { fRequestShutdown = true; } void HandleSIGHUP(int) { fReopenDebugLog = true; } bool static Bind(CConnman& connman, const CService &addr, unsigned int flags) { if (!(flags & BF_EXPLICIT) && IsLimited(addr)) return false; std::string strError; if (!connman.BindListenPort(addr, strError, (flags & BF_WHITELIST) != 0)) { if (flags & BF_REPORT_ERROR) return InitError(strError); return false; } return true; } void OnRPCStarted() { uiInterface.NotifyBlockTip.connect(&RPCNotifyBlockChange); } void OnRPCStopped() { uiInterface.NotifyBlockTip.disconnect(&RPCNotifyBlockChange); RPCNotifyBlockChange(false, nullptr); cvBlockChange.notify_all(); LogPrint("rpc", "RPC stopped.\n"); } void OnRPCPreCommand(const CRPCCommand& cmd) { // Observe safe mode std::string strWarning = GetWarnings("rpc"); if (strWarning != "" && !GetBoolArg("-disablesafemode", DEFAULT_DISABLE_SAFEMODE) && !cmd.okSafeMode) throw JSONRPCError(RPC_FORBIDDEN_BY_SAFE_MODE, std::string("Safe mode: ") + strWarning); } std::string HelpMessage(HelpMessageMode mode) { const bool showDebug = GetBoolArg("-help-debug", false); // When adding new options to the categories, please keep and ensure alphabetical ordering. // Do not translate _(...) -help-debug options, Many technical terms, and only a very small audience, so is unnecessary stress to translators. std::string strUsage = HelpMessageGroup(_("Options:")); strUsage += HelpMessageOpt("-?", _("Print this help message and exit")); strUsage += HelpMessageOpt("-version", _("Print version and exit")); strUsage += HelpMessageOpt("-alertnotify=<cmd>", _("Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)")); strUsage += HelpMessageOpt("-blocknotify=<cmd>", _("Execute command when the best block changes (%s in cmd is replaced by block hash)")); if (showDebug) strUsage += HelpMessageOpt("-blocksonly", strprintf(_("Whether to operate in a blocks only mode (default: %u)"), DEFAULT_BLOCKSONLY)); strUsage +=HelpMessageOpt("-assumevalid=<hex>", strprintf(_("If this block is in the chain assume that it and its ancestors are valid and potentially skip their script verification (0 to verify all, default: %s, testnet: %s)"), Params(CBaseChainParams::MAIN).GetConsensus().defaultAssumeValid.GetHex(), Params(CBaseChainParams::TESTNET).GetConsensus().defaultAssumeValid.GetHex())); strUsage += HelpMessageOpt("-conf=<file>", strprintf(_("Specify configuration file (default: %s)"), BITCOIN_CONF_FILENAME)); if (mode == HMM_BITCOIND) { #if HAVE_DECL_DAEMON strUsage += HelpMessageOpt("-daemon", _("Run in the background as a daemon and accept commands")); #endif } strUsage += HelpMessageOpt("-datadir=<dir>", _("Specify data directory")); strUsage += HelpMessageOpt("-dbcache=<n>", strprintf(_("Set database cache size in megabytes (%d to %d, default: %d)"), nMinDbCache, nMaxDbCache, nDefaultDbCache)); if (showDebug) strUsage += HelpMessageOpt("-feefilter", strprintf("Tell other nodes to filter invs to us by our mempool min fee (default: %u)", DEFAULT_FEEFILTER)); strUsage += HelpMessageOpt("-loadblock=<file>", _("Imports blocks from external blk000??.dat file on startup")); strUsage += HelpMessageOpt("-maxorphantx=<n>", strprintf(_("Keep at most <n> unconnectable transactions in memory (default: %u)"), DEFAULT_MAX_ORPHAN_TRANSACTIONS)); strUsage += HelpMessageOpt("-maxmempool=<n>", strprintf(_("Keep the transaction memory pool below <n> megabytes (default: %u)"), DEFAULT_MAX_MEMPOOL_SIZE)); strUsage += HelpMessageOpt("-mempoolexpiry=<n>", strprintf(_("Do not keep transactions in the mempool longer than <n> hours (default: %u)"), DEFAULT_MEMPOOL_EXPIRY)); strUsage += HelpMessageOpt("-blockreconstructionextratxn=<n>", strprintf(_("Extra transactions to keep in memory for compact block reconstructions (default: %u)"), DEFAULT_BLOCK_RECONSTRUCTION_EXTRA_TXN)); strUsage += HelpMessageOpt("-par=<n>", strprintf(_("Set the number of script verification threads (%u to %d, 0 = auto, <0 = leave that many cores free, default: %d)"), -GetNumCores(), MAX_SCRIPTCHECK_THREADS, DEFAULT_SCRIPTCHECK_THREADS)); #ifndef WIN32 strUsage += HelpMessageOpt("-pid=<file>", strprintf(_("Specify pid file (default: %s)"), BITCOIN_PID_FILENAME)); #endif strUsage += HelpMessageOpt("-prune=<n>", strprintf(_("Reduce storage requirements by enabling pruning (deleting) of old blocks. This allows the pruneblockchain RPC to be called to delete specific blocks, and enables automatic pruning of old blocks if a target size in MiB is provided. This mode is incompatible with -txindex and -rescan. " "Warning: Reverting this setting requires re-downloading the entire blockchain. " "(default: 0 = disable pruning blocks, 1 = allow manual pruning via RPC, >%u = automatically prune block files to stay under the specified target size in MiB)"), MIN_DISK_SPACE_FOR_BLOCK_FILES / 1024 / 1024)); strUsage += HelpMessageOpt("-reindex-chainstate", _("Rebuild chain state from the currently indexed blocks")); strUsage += HelpMessageOpt("-reindex", _("Rebuild chain state and block index from the blk*.dat files on disk")); #ifndef WIN32 strUsage += HelpMessageOpt("-sysperms", _("Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)")); #endif strUsage += HelpMessageOpt("-txindex", strprintf(_("Maintain a full transaction index, used by the getrawtransaction rpc call (default: %u)"), DEFAULT_TXINDEX)); strUsage += HelpMessageGroup(_("Connection options:")); strUsage += HelpMessageOpt("-addnode=<ip>", _("Add a node to connect to and attempt to keep the connection open")); strUsage += HelpMessageOpt("-banscore=<n>", strprintf(_("Threshold for disconnecting misbehaving peers (default: %u)"), DEFAULT_BANSCORE_THRESHOLD)); strUsage += HelpMessageOpt("-bantime=<n>", strprintf(_("Number of seconds to keep misbehaving peers from reconnecting (default: %u)"), DEFAULT_MISBEHAVING_BANTIME)); strUsage += HelpMessageOpt("-bind=<addr>", _("Bind to given address and always listen on it. Use [host]:port notation for IPv6")); strUsage += HelpMessageOpt("-connect=<ip>", _("Connect only to the specified node(s); -noconnect or -connect=0 alone to disable automatic connections")); strUsage += HelpMessageOpt("-discover", _("Discover own IP addresses (default: 1 when listening and no -externalip or -proxy)")); strUsage += HelpMessageOpt("-dns", _("Allow DNS lookups for -addnode, -seednode and -connect") + " " + strprintf(_("(default: %u)"), DEFAULT_NAME_LOOKUP)); strUsage += HelpMessageOpt("-dnsseed", _("Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect/-noconnect)")); strUsage += HelpMessageOpt("-externalip=<ip>", _("Specify your own public address")); strUsage += HelpMessageOpt("-forcednsseed", strprintf(_("Always query for peer addresses via DNS lookup (default: %u)"), DEFAULT_FORCEDNSSEED)); strUsage += HelpMessageOpt("-listen", _("Accept connections from outside (default: 1 if no -proxy or -connect/-noconnect)")); strUsage += HelpMessageOpt("-listenonion", strprintf(_("Automatically create Tor hidden service (default: %d)"), DEFAULT_LISTEN_ONION)); strUsage += HelpMessageOpt("-maxconnections=<n>", strprintf(_("Maintain at most <n> connections to peers (default: %u)"), DEFAULT_MAX_PEER_CONNECTIONS)); strUsage += HelpMessageOpt("-maxreceivebuffer=<n>", strprintf(_("Maximum per-connection receive buffer, <n>*1000 bytes (default: %u)"), DEFAULT_MAXRECEIVEBUFFER)); strUsage += HelpMessageOpt("-maxsendbuffer=<n>", strprintf(_("Maximum per-connection send buffer, <n>*1000 bytes (default: %u)"), DEFAULT_MAXSENDBUFFER)); strUsage += HelpMessageOpt("-maxtimeadjustment", strprintf(_("Maximum allowed median peer time offset adjustment. Local perspective of time may be influenced by peers forward or backward by this amount. (default: %u seconds)"), DEFAULT_MAX_TIME_ADJUSTMENT)); strUsage += HelpMessageOpt("-onion=<ip:port>", strprintf(_("Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)"), "-proxy")); strUsage += HelpMessageOpt("-onlynet=<net>", _("Only connect to nodes in network <net> (ipv4, ipv6 or onion)")); strUsage += HelpMessageOpt("-permitbaremultisig", strprintf(_("Relay non-P2SH multisig (default: %u)"), DEFAULT_PERMIT_BAREMULTISIG)); strUsage += HelpMessageOpt("-peerbloomfilters", strprintf(_("Support filtering of blocks and transaction with bloom filters (default: %u)"), DEFAULT_PEERBLOOMFILTERS)); strUsage += HelpMessageOpt("-port=<port>", strprintf(_("Listen for connections on <port> (default: %u or testnet: %u)"), Params(CBaseChainParams::MAIN).GetDefaultPort(), Params(CBaseChainParams::TESTNET).GetDefaultPort())); strUsage += HelpMessageOpt("-proxy=<ip:port>", _("Connect through SOCKS5 proxy")); strUsage += HelpMessageOpt("-proxyrandomize", strprintf(_("Randomize credentials for every proxy connection. This enables Tor stream isolation (default: %u)"), DEFAULT_PROXYRANDOMIZE)); strUsage += HelpMessageOpt("-rpcserialversion", strprintf(_("Sets the serialization of raw transaction or block hex returned in non-verbose mode, non-segwit(0) or segwit(1) (default: %d)"), DEFAULT_RPC_SERIALIZE_VERSION)); strUsage += HelpMessageOpt("-seednode=<ip>", _("Connect to a node to retrieve peer addresses, and disconnect")); strUsage += HelpMessageOpt("-timeout=<n>", strprintf(_("Specify connection timeout in milliseconds (minimum: 1, default: %d)"), DEFAULT_CONNECT_TIMEOUT)); strUsage += HelpMessageOpt("-torcontrol=<ip>:<port>", strprintf(_("Tor control port to use if onion listening enabled (default: %s)"), DEFAULT_TOR_CONTROL)); strUsage += HelpMessageOpt("-torpassword=<pass>", _("Tor control port password (default: empty)")); #ifdef USE_UPNP #if USE_UPNP strUsage += HelpMessageOpt("-upnp", _("Use UPnP to map the listening port (default: 1 when listening and no -proxy)")); #else strUsage += HelpMessageOpt("-upnp", strprintf(_("Use UPnP to map the listening port (default: %u)"), 0)); #endif #endif strUsage += HelpMessageOpt("-whitebind=<addr>", _("Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6")); strUsage += HelpMessageOpt("-whitelist=<IP address or network>", _("Whitelist peers connecting from the given IP address (e.g. 1.2.3.4) or CIDR notated network (e.g. 1.2.3.0/24). Can be specified multiple times.") + " " + _("Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway")); strUsage += HelpMessageOpt("-whitelistrelay", strprintf(_("Accept relayed transactions received from whitelisted peers even when not relaying transactions (default: %d)"), DEFAULT_WHITELISTRELAY)); strUsage += HelpMessageOpt("-whitelistforcerelay", strprintf(_("Force relay of transactions from whitelisted peers even if they violate local relay policy (default: %d)"), DEFAULT_WHITELISTFORCERELAY)); strUsage += HelpMessageOpt("-maxuploadtarget=<n>", strprintf(_("Tries to keep outbound traffic under the given target (in MiB per 24h), 0 = no limit (default: %d)"), DEFAULT_MAX_UPLOAD_TARGET)); #ifdef ENABLE_WALLET strUsage += CWallet::GetWalletHelpString(showDebug); #endif #if ENABLE_ZMQ strUsage += HelpMessageGroup(_("ZeroMQ notification options:")); strUsage += HelpMessageOpt("-zmqpubhashblock=<address>", _("Enable publish hash block in <address>")); strUsage += HelpMessageOpt("-zmqpubhashtx=<address>", _("Enable publish hash transaction in <address>")); strUsage += HelpMessageOpt("-zmqpubrawblock=<address>", _("Enable publish raw block in <address>")); strUsage += HelpMessageOpt("-zmqpubrawtx=<address>", _("Enable publish raw transaction in <address>")); #endif strUsage += HelpMessageGroup(_("Debugging/Testing options:")); strUsage += HelpMessageOpt("-uacomment=<cmt>", _("Append comment to the user agent string")); if (showDebug) { strUsage += HelpMessageOpt("-checkblocks=<n>", strprintf(_("How many blocks to check at startup (default: %u, 0 = all)"), DEFAULT_CHECKBLOCKS)); strUsage += HelpMessageOpt("-checklevel=<n>", strprintf(_("How thorough the block verification of -checkblocks is (0-4, default: %u)"), DEFAULT_CHECKLEVEL)); strUsage += HelpMessageOpt("-checkblockindex", strprintf("Do a full consistency check for mapBlockIndex, setBlockIndexCandidates, chainActive and mapBlocksUnlinked occasionally. Also sets -checkmempool (default: %u)", Params(CBaseChainParams::MAIN).DefaultConsistencyChecks())); strUsage += HelpMessageOpt("-checkmempool=<n>", strprintf("Run checks every <n> transactions (default: %u)", Params(CBaseChainParams::MAIN).DefaultConsistencyChecks())); strUsage += HelpMessageOpt("-checkpoints", strprintf("Disable expensive verification for known chain history (default: %u)", DEFAULT_CHECKPOINTS_ENABLED)); strUsage += HelpMessageOpt("-disablesafemode", strprintf("Disable safemode, override a real safe mode event (default: %u)", DEFAULT_DISABLE_SAFEMODE)); strUsage += HelpMessageOpt("-testsafemode", strprintf("Force safe mode (default: %u)", DEFAULT_TESTSAFEMODE)); strUsage += HelpMessageOpt("-dropmessagestest=<n>", "Randomly drop 1 of every <n> network messages"); strUsage += HelpMessageOpt("-fuzzmessagestest=<n>", "Randomly fuzz 1 of every <n> network messages"); strUsage += HelpMessageOpt("-stopafterblockimport", strprintf("Stop running after importing blocks from disk (default: %u)", DEFAULT_STOPAFTERBLOCKIMPORT)); strUsage += HelpMessageOpt("-limitancestorcount=<n>", strprintf("Do not accept transactions if number of in-mempool ancestors is <n> or more (default: %u)", DEFAULT_ANCESTOR_LIMIT)); strUsage += HelpMessageOpt("-limitancestorsize=<n>", strprintf("Do not accept transactions whose size with all in-mempool ancestors exceeds <n> kilobytes (default: %u)", DEFAULT_ANCESTOR_SIZE_LIMIT)); strUsage += HelpMessageOpt("-limitdescendantcount=<n>", strprintf("Do not accept transactions if any ancestor would have <n> or more in-mempool descendants (default: %u)", DEFAULT_DESCENDANT_LIMIT)); strUsage += HelpMessageOpt("-limitdescendantsize=<n>", strprintf("Do not accept transactions if any ancestor would have more than <n> kilobytes of in-mempool descendants (default: %u).", DEFAULT_DESCENDANT_SIZE_LIMIT)); strUsage += HelpMessageOpt("-bip9params=deployment:start:end", "Use given start/end times for specified BIP9 deployment (regtest-only)"); } std::string debugCategories = "addrman, alert, bench, cmpctblock, coindb, db, http, leveldb, libevent, lock, mempool, mempoolrej, net, proxy, prune, rand, reindex, rpc, selectcoins, tor, zmq"; // Don't translate these and qt below if (mode == HMM_BITCOIN_QT) debugCategories += ", qt"; strUsage += HelpMessageOpt("-debug=<category>", strprintf(_("Output debugging information (default: %u, supplying <category> is optional)"), 0) + ". " + _("If <category> is not supplied or if <category> = 1, output all debugging information.") + _("<category> can be:") + " " + debugCategories + "."); if (showDebug) strUsage += HelpMessageOpt("-nodebug", "Turn off debugging messages, same as -debug=0"); strUsage += HelpMessageOpt("-help-debug", _("Show all debugging options (usage: --help -help-debug)")); strUsage += HelpMessageOpt("-logips", strprintf(_("Include IP addresses in debug output (default: %u)"), DEFAULT_LOGIPS)); strUsage += HelpMessageOpt("-logtimestamps", strprintf(_("Prepend debug output with timestamp (default: %u)"), DEFAULT_LOGTIMESTAMPS)); if (showDebug) { strUsage += HelpMessageOpt("-logtimemicros", strprintf("Add microsecond precision to debug timestamps (default: %u)", DEFAULT_LOGTIMEMICROS)); strUsage += HelpMessageOpt("-mocktime=<n>", "Replace actual time with <n> seconds since epoch (default: 0)"); strUsage += HelpMessageOpt("-maxsigcachesize=<n>", strprintf("Limit size of signature cache to <n> MiB (default: %u)", DEFAULT_MAX_SIG_CACHE_SIZE)); strUsage += HelpMessageOpt("-maxtipage=<n>", strprintf("Maximum tip age in seconds to consider node in initial block download (default: %u)", DEFAULT_MAX_TIP_AGE)); } strUsage += HelpMessageOpt("-minrelaytxfee=<amt>", strprintf(_("Fees (in %s/kB) smaller than this are considered zero fee for relaying, mining and transaction creation (default: %s)"), CURRENCY_UNIT, FormatMoney(DEFAULT_MIN_RELAY_TX_FEE))); strUsage += HelpMessageOpt("-maxtxfee=<amt>", strprintf(_("Maximum total fees (in %s) to use in a single wallet transaction or raw transaction; setting this too low may abort large transactions (default: %s)"), CURRENCY_UNIT, FormatMoney(DEFAULT_TRANSACTION_MAXFEE))); strUsage += HelpMessageOpt("-printtoconsole", _("Send trace/debug info to console instead of debug.log file")); if (showDebug) { strUsage += HelpMessageOpt("-printpriority", strprintf("Log transaction fee per kB when mining blocks (default: %u)", DEFAULT_PRINTPRIORITY)); } strUsage += HelpMessageOpt("-shrinkdebugfile", _("Shrink debug.log file on client startup (default: 1 when no -debug)")); AppendParamsHelpMessages(strUsage, showDebug); strUsage += HelpMessageGroup(_("Node relay options:")); if (showDebug) { strUsage += HelpMessageOpt("-acceptnonstdtxn", strprintf("Relay and mine \"non-standard\" transactions (%sdefault: %u)", "testnet/regtest only; ", !Params(CBaseChainParams::TESTNET).RequireStandard())); strUsage += HelpMessageOpt("-incrementalrelayfee=<amt>", strprintf("Fee rate (in %s/kB) used to define cost of relay, used for mempool limiting and BIP 125 replacement. (default: %s)", CURRENCY_UNIT, FormatMoney(DEFAULT_INCREMENTAL_RELAY_FEE))); strUsage += HelpMessageOpt("-dustrelayfee=<amt>", strprintf("Fee rate (in %s/kB) used to defined dust, the value of an output such that it will cost about 1/3 of its value in fees at this fee rate to spend it. (default: %s)", CURRENCY_UNIT, FormatMoney(DUST_RELAY_TX_FEE))); } strUsage += HelpMessageOpt("-bytespersigop", strprintf(_("Equivalent bytes per sigop in transactions for relay and mining (default: %u)"), DEFAULT_BYTES_PER_SIGOP)); strUsage += HelpMessageOpt("-datacarrier", strprintf(_("Relay and mine data carrier transactions (default: %u)"), DEFAULT_ACCEPT_DATACARRIER)); strUsage += HelpMessageOpt("-datacarriersize", strprintf(_("Maximum size of data in data carrier transactions we relay and mine (default: %u)"), MAX_OP_RETURN_RELAY)); strUsage += HelpMessageOpt("-mempoolreplacement", strprintf(_("Enable transaction replacement in the memory pool (default: %u)"), DEFAULT_ENABLE_REPLACEMENT)); strUsage += HelpMessageGroup(_("Block creation options:")); strUsage += HelpMessageOpt("-blockmaxweight=<n>", strprintf(_("Set maximum BIP141 block weight (default: %d)"), DEFAULT_BLOCK_MAX_WEIGHT)); strUsage += HelpMessageOpt("-blockmaxsize=<n>", strprintf(_("Set maximum block size in bytes (default: %d)"), DEFAULT_BLOCK_MAX_SIZE)); strUsage += HelpMessageOpt("-blockmintxfee=<amt>", strprintf(_("Set lowest fee rate (in %s/kB) for transactions to be included in block creation. (default: %s)"), CURRENCY_UNIT, FormatMoney(DEFAULT_BLOCK_MIN_TX_FEE))); if (showDebug) strUsage += HelpMessageOpt("-blockversion=<n>", "Override block version to test forking scenarios"); strUsage += HelpMessageGroup(_("RPC server options:")); strUsage += HelpMessageOpt("-server", _("Accept command line and JSON-RPC commands")); strUsage += HelpMessageOpt("-rest", strprintf(_("Accept public REST requests (default: %u)"), DEFAULT_REST_ENABLE)); strUsage += HelpMessageOpt("-rpcbind=<addr>[:port]", _("Bind to given address to listen for JSON-RPC connections. This option is ignored unless -rpcallowip is also passed. Port is optional and overrides -rpcport. Use [host]:port notation for IPv6. This option can be specified multiple times (default: 127.0.0.1 and ::1 i.e., localhost, or if -rpcallowip has been specified, 0.0.0.0 and :: i.e., all addresses)")); strUsage += HelpMessageOpt("-rpccookiefile=<loc>", _("Location of the auth cookie (default: data dir)")); strUsage += HelpMessageOpt("-rpcuser=<user>", _("Username for JSON-RPC connections")); strUsage += HelpMessageOpt("-rpcpassword=<pw>", _("Password for JSON-RPC connections")); strUsage += HelpMessageOpt("-rpcauth=<userpw>", _("Username and hashed password for JSON-RPC connections. The field <userpw> comes in the format: <USERNAME>:<SALT>$<HASH>. A canonical python script is included in share/rpcuser. The client then connects normally using the rpcuser=<USERNAME>/rpcpassword=<PASSWORD> pair of arguments. This option can be specified multiple times")); strUsage += HelpMessageOpt("-rpcport=<port>", strprintf(_("Listen for JSON-RPC connections on <port> (default: %u or testnet: %u)"), BaseParams(CBaseChainParams::MAIN).RPCPort(), BaseParams(CBaseChainParams::TESTNET).RPCPort())); strUsage += HelpMessageOpt("-rpcallowip=<ip>", _("Allow JSON-RPC connections from specified source. Valid for <ip> are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times")); strUsage += HelpMessageOpt("-rpcthreads=<n>", strprintf(_("Set the number of threads to service RPC calls (default: %d)"), DEFAULT_HTTP_THREADS)); if (showDebug) { strUsage += HelpMessageOpt("-rpcworkqueue=<n>", strprintf("Set the depth of the work queue to service RPC calls (default: %d)", DEFAULT_HTTP_WORKQUEUE)); strUsage += HelpMessageOpt("-rpcservertimeout=<n>", strprintf("Timeout during HTTP requests (default: %d)", DEFAULT_HTTP_SERVER_TIMEOUT)); } return strUsage; } std::string LicenseInfo() { const std::string URL_SOURCE_CODE = "<https://github.com/bitcoin/bitcoin>"; const std::string URL_WEBSITE = "<https://bitcoincore.org>"; return CopyrightHolders(strprintf(_("Copyright (C) %i-%i"), 2009, COPYRIGHT_YEAR) + " ") + "\n" + "\n" + strprintf(_("Please contribute if you find %s useful. " "Visit %s for further information about the software."), PACKAGE_NAME, URL_WEBSITE) + "\n" + strprintf(_("The source code is available from %s."), URL_SOURCE_CODE) + "\n" + "\n" + _("This is experimental software.") + "\n" + strprintf(_("Distributed under the MIT software license, see the accompanying file %s or %s"), "COPYING", "<https://opensource.org/licenses/MIT>") + "\n" + "\n" + strprintf(_("This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit %s and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard."), "<https://www.openssl.org>") + "\n"; } static void BlockNotifyCallback(bool initialSync, const CBlockIndex *pBlockIndex) { if (initialSync || !pBlockIndex) return; std::string strCmd = GetArg("-blocknotify", ""); boost::replace_all(strCmd, "%s", pBlockIndex->GetBlockHash().GetHex()); boost::thread t(runCommand, strCmd); // thread runs free } static bool fHaveGenesis = false; static boost::mutex cs_GenesisWait; static CConditionVariable condvar_GenesisWait; static void BlockNotifyGenesisWait(bool, const CBlockIndex *pBlockIndex) { if (pBlockIndex != NULL) { { boost::unique_lock<boost::mutex> lock_GenesisWait(cs_GenesisWait); fHaveGenesis = true; } condvar_GenesisWait.notify_all(); } } struct CImportingNow { CImportingNow() { assert(fImporting == false); fImporting = true; } ~CImportingNow() { assert(fImporting == true); fImporting = false; } }; // If we're using -prune with -reindex, then delete block files that will be ignored by the // reindex. Since reindexing works by starting at block file 0 and looping until a blockfile // is missing, do the same here to delete any later block files after a gap. Also delete all // rev files since they'll be rewritten by the reindex anyway. This ensures that vinfoBlockFile // is in sync with what's actually on disk by the time we start downloading, so that pruning // works correctly. void CleanupBlockRevFiles() { std::map<std::string, boost::filesystem::path> mapBlockFiles; // Glob all blk?????.dat and rev?????.dat files from the blocks directory. // Remove the rev files immediately and insert the blk file paths into an // ordered map keyed by block file index. LogPrintf("Removing unusable blk?????.dat and rev?????.dat files for -reindex with -prune\n"); boost::filesystem::path blocksdir = GetDataDir() / "blocks"; for (boost::filesystem::directory_iterator it(blocksdir); it != boost::filesystem::directory_iterator(); it++) { if (is_regular_file(*it) && it->path().filename().string().length() == 12 && it->path().filename().string().substr(8,4) == ".dat") { if (it->path().filename().string().substr(0,3) == "blk") mapBlockFiles[it->path().filename().string().substr(3,5)] = it->path(); else if (it->path().filename().string().substr(0,3) == "rev") remove(it->path()); } } // Remove all block files that aren't part of a contiguous set starting at // zero by walking the ordered map (keys are block file indices) by // keeping a separate counter. Once we hit a gap (or if 0 doesn't exist) // start removing block files. int nContigCounter = 0; BOOST_FOREACH(const PAIRTYPE(std::string, boost::filesystem::path)& item, mapBlockFiles) { if (atoi(item.first) == nContigCounter) { nContigCounter++; continue; } remove(item.second); } } void ThreadImport(std::vector<boost::filesystem::path> vImportFiles) { const CChainParams& chainparams = Params(); RenameThread("bitcoin-loadblk"); { CImportingNow imp; // -reindex if (fReindex) { int nFile = 0; while (true) { CDiskBlockPos pos(nFile, 0); if (!boost::filesystem::exists(GetBlockPosFilename(pos, "blk"))) break; // No block files left to reindex FILE *file = OpenBlockFile(pos, true); if (!file) break; // This error is logged in OpenBlockFile LogPrintf("Reindexing block file blk%05u.dat...\n", (unsigned int)nFile); LoadExternalBlockFile(chainparams, file, &pos); nFile++; } pblocktree->WriteReindexing(false); fReindex = false; LogPrintf("Reindexing finished\n"); // To avoid ending up in a situation without genesis block, re-try initializing (no-op if reindexing worked): InitBlockIndex(chainparams); } // hardcoded $DATADIR/bootstrap.dat boost::filesystem::path pathBootstrap = GetDataDir() / "bootstrap.dat"; if (boost::filesystem::exists(pathBootstrap)) { FILE *file = fopen(pathBootstrap.string().c_str(), "rb"); if (file) { boost::filesystem::path pathBootstrapOld = GetDataDir() / "bootstrap.dat.old"; LogPrintf("Importing bootstrap.dat...\n"); LoadExternalBlockFile(chainparams, file); RenameOver(pathBootstrap, pathBootstrapOld); } else { LogPrintf("Warning: Could not open bootstrap file %s\n", pathBootstrap.string()); } } // -loadblock= BOOST_FOREACH(const boost::filesystem::path& path, vImportFiles) { FILE *file = fopen(path.string().c_str(), "rb"); if (file) { LogPrintf("Importing blocks file %s...\n", path.string()); LoadExternalBlockFile(chainparams, file); } else { LogPrintf("Warning: Could not open blocks file %s\n", path.string()); } } // scan for better chains in the block chain database, that are not yet connected in the active best chain CValidationState state; if (!ActivateBestChain(state, chainparams)) { LogPrintf("Failed to connect best block"); StartShutdown(); } if (GetBoolArg("-stopafterblockimport", DEFAULT_STOPAFTERBLOCKIMPORT)) { LogPrintf("Stopping after block import\n"); StartShutdown(); } } // End scope of CImportingNow LoadMempool(); fDumpMempoolLater = !fRequestShutdown; } /** Sanity checks * Ensure that Bitcoin is running in a usable environment with all * necessary library support. */ bool InitSanityCheck(void) { if(!ECC_InitSanityCheck()) { InitError("Elliptic curve cryptography sanity check failure. Aborting."); return false; } if (!glibc_sanity_test() || !glibcxx_sanity_test()) return false; if (!Random_SanityCheck()) { InitError("OS cryptographic RNG sanity check failure. Aborting."); return false; } return true; } bool AppInitServers(boost::thread_group& threadGroup) { RPCServer::OnStarted(&OnRPCStarted); RPCServer::OnStopped(&OnRPCStopped); RPCServer::OnPreCommand(&OnRPCPreCommand); if (!InitHTTPServer()) return false; if (!StartRPC()) return false; if (!StartHTTPRPC()) return false; if (GetBoolArg("-rest", DEFAULT_REST_ENABLE) && !StartREST()) return false; if (!StartHTTPServer()) return false; return true; } // Parameter interaction based on rules void InitParameterInteraction() { // when specifying an explicit binding address, you want to listen on it // even when -connect or -proxy is specified if (IsArgSet("-bind")) { if (SoftSetBoolArg("-listen", true)) LogPrintf("%s: parameter interaction: -bind set -> setting -listen=1\n", __func__); } if (IsArgSet("-whitebind")) { if (SoftSetBoolArg("-listen", true)) LogPrintf("%s: parameter interaction: -whitebind set -> setting -listen=1\n", __func__); } if (mapMultiArgs.count("-connect") && mapMultiArgs.at("-connect").size() > 0) { // when only connecting to trusted nodes, do not seed via DNS, or listen by default if (SoftSetBoolArg("-dnsseed", false)) LogPrintf("%s: parameter interaction: -connect set -> setting -dnsseed=0\n", __func__); if (SoftSetBoolArg("-listen", false)) LogPrintf("%s: parameter interaction: -connect set -> setting -listen=0\n", __func__); } if (IsArgSet("-proxy")) { // to protect privacy, do not listen by default if a default proxy server is specified if (SoftSetBoolArg("-listen", false)) LogPrintf("%s: parameter interaction: -proxy set -> setting -listen=0\n", __func__); // to protect privacy, do not use UPNP when a proxy is set. The user may still specify -listen=1 // to listen locally, so don't rely on this happening through -listen below. if (SoftSetBoolArg("-upnp", false)) LogPrintf("%s: parameter interaction: -proxy set -> setting -upnp=0\n", __func__); // to protect privacy, do not discover addresses by default if (SoftSetBoolArg("-discover", false)) LogPrintf("%s: parameter interaction: -proxy set -> setting -discover=0\n", __func__); } if (!GetBoolArg("-listen", DEFAULT_LISTEN)) { // do not map ports or try to retrieve public IP when not listening (pointless) if (SoftSetBoolArg("-upnp", false)) LogPrintf("%s: parameter interaction: -listen=0 -> setting -upnp=0\n", __func__); if (SoftSetBoolArg("-discover", false)) LogPrintf("%s: parameter interaction: -listen=0 -> setting -discover=0\n", __func__); if (SoftSetBoolArg("-listenonion", false)) LogPrintf("%s: parameter interaction: -listen=0 -> setting -listenonion=0\n", __func__); } if (IsArgSet("-externalip")) { // if an explicit public IP is specified, do not try to find others if (SoftSetBoolArg("-discover", false)) LogPrintf("%s: parameter interaction: -externalip set -> setting -discover=0\n", __func__); } // disable whitelistrelay in blocksonly mode if (GetBoolArg("-blocksonly", DEFAULT_BLOCKSONLY)) { if (SoftSetBoolArg("-whitelistrelay", false)) LogPrintf("%s: parameter interaction: -blocksonly=1 -> setting -whitelistrelay=0\n", __func__); } // Forcing relay from whitelisted hosts implies we will accept relays from them in the first place. if (GetBoolArg("-whitelistforcerelay", DEFAULT_WHITELISTFORCERELAY)) { if (SoftSetBoolArg("-whitelistrelay", true)) LogPrintf("%s: parameter interaction: -whitelistforcerelay=1 -> setting -whitelistrelay=1\n", __func__); } } static std::string ResolveErrMsg(const char * const optname, const std::string& strBind) { return strprintf(_("Cannot resolve -%s address: '%s'"), optname, strBind); } void InitLogging() { fPrintToConsole = GetBoolArg("-printtoconsole", false); fLogTimestamps = GetBoolArg("-logtimestamps", DEFAULT_LOGTIMESTAMPS); fLogTimeMicros = GetBoolArg("-logtimemicros", DEFAULT_LOGTIMEMICROS); fLogIPs = GetBoolArg("-logips", DEFAULT_LOGIPS); LogPrintf("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"); LogPrintf("Bitcoin version %s\n", FormatFullVersion()); } namespace { // Variables internal to initialization process only ServiceFlags nRelevantServices = NODE_NETWORK; int nMaxConnections; int nUserMaxConnections; int nFD; ServiceFlags nLocalServices = NODE_NETWORK; } [[noreturn]] static void new_handler_terminate() { // Rather than throwing std::bad-alloc if allocation fails, terminate // immediately to (try to) avoid chain corruption. // Since LogPrintf may itself allocate memory, set the handler directly // to terminate first. std::set_new_handler(std::terminate); LogPrintf("Error: Out of memory. Terminating.\n"); // The log was successful, terminate now. std::terminate(); }; bool AppInitBasicSetup() { // ********************************************************* Step 1: setup #ifdef _MSC_VER // Turn off Microsoft heap dump noise _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE); _CrtSetReportFile(_CRT_WARN, CreateFileA("NUL", GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0)); #endif #if _MSC_VER >= 1400 // Disable confusing "helpful" text message on abort, Ctrl-C _set_abort_behavior(0, _WRITE_ABORT_MSG | _CALL_REPORTFAULT); #endif #ifdef WIN32 // Enable Data Execution Prevention (DEP) // Minimum supported OS versions: WinXP SP3, WinVista >= SP1, Win Server 2008 // A failure is non-critical and needs no further attention! #ifndef PROCESS_DEP_ENABLE // We define this here, because GCCs winbase.h limits this to _WIN32_WINNT >= 0x0601 (Windows 7), // which is not correct. Can be removed, when GCCs winbase.h is fixed! #define PROCESS_DEP_ENABLE 0x00000001 #endif typedef BOOL (WINAPI *PSETPROCDEPPOL)(DWORD); PSETPROCDEPPOL setProcDEPPol = (PSETPROCDEPPOL)GetProcAddress(GetModuleHandleA("Kernel32.dll"), "SetProcessDEPPolicy"); if (setProcDEPPol != NULL) setProcDEPPol(PROCESS_DEP_ENABLE); #endif if (!SetupNetworking()) return InitError("Initializing networking failed"); #ifndef WIN32 if (!GetBoolArg("-sysperms", false)) { umask(077); } // Clean shutdown on SIGTERM struct sigaction sa; sa.sa_handler = HandleSIGTERM; sigemptyset(&sa.sa_mask); sa.sa_flags = 0; sigaction(SIGTERM, &sa, NULL); sigaction(SIGINT, &sa, NULL); // Reopen debug.log on SIGHUP struct sigaction sa_hup; sa_hup.sa_handler = HandleSIGHUP; sigemptyset(&sa_hup.sa_mask); sa_hup.sa_flags = 0; sigaction(SIGHUP, &sa_hup, NULL); // Ignore SIGPIPE, otherwise it will bring the daemon down if the client closes unexpectedly signal(SIGPIPE, SIG_IGN); #endif std::set_new_handler(new_handler_terminate); return true; } bool AppInitParameterInteraction() { const CChainParams& chainparams = Params(); // ********************************************************* Step 2: parameter interactions // also see: InitParameterInteraction() // if using block pruning, then disallow txindex if (GetArg("-prune", 0)) { if (GetBoolArg("-txindex", DEFAULT_TXINDEX)) return InitError(_("Prune mode is incompatible with -txindex.")); } // Make sure enough file descriptors are available int nBind = std::max( (mapMultiArgs.count("-bind") ? mapMultiArgs.at("-bind").size() : 0) + (mapMultiArgs.count("-whitebind") ? mapMultiArgs.at("-whitebind").size() : 0), size_t(1)); nUserMaxConnections = GetArg("-maxconnections", DEFAULT_MAX_PEER_CONNECTIONS); nMaxConnections = std::max(nUserMaxConnections, 0); // Trim requested connection counts, to fit into system limitations nMaxConnections = std::max(std::min(nMaxConnections, (int)(FD_SETSIZE - nBind - MIN_CORE_FILEDESCRIPTORS - MAX_ADDNODE_CONNECTIONS)), 0); nFD = RaiseFileDescriptorLimit(nMaxConnections + MIN_CORE_FILEDESCRIPTORS + MAX_ADDNODE_CONNECTIONS); if (nFD < MIN_CORE_FILEDESCRIPTORS) return InitError(_("Not enough file descriptors available.")); nMaxConnections = std::min(nFD - MIN_CORE_FILEDESCRIPTORS - MAX_ADDNODE_CONNECTIONS, nMaxConnections); if (nMaxConnections < nUserMaxConnections) InitWarning(strprintf(_("Reducing -maxconnections from %d to %d, because of system limitations."), nUserMaxConnections, nMaxConnections)); // ********************************************************* Step 3: parameter-to-internal-flags fDebug = mapMultiArgs.count("-debug"); // Special-case: if -debug=0/-nodebug is set, turn off debugging messages if (fDebug) { const std::vector<std::string>& categories = mapMultiArgs.at("-debug"); if (GetBoolArg("-nodebug", false) || find(categories.begin(), categories.end(), std::string("0")) != categories.end()) fDebug = false; } // Check for -debugnet if (GetBoolArg("-debugnet", false)) InitWarning(_("Unsupported argument -debugnet ignored, use -debug=net.")); // Check for -socks - as this is a privacy risk to continue, exit here if (IsArgSet("-socks")) return InitError(_("Unsupported argument -socks found. Setting SOCKS version isn't possible anymore, only SOCKS5 proxies are supported.")); // Check for -tor - as this is a privacy risk to continue, exit here if (GetBoolArg("-tor", false)) return InitError(_("Unsupported argument -tor found, use -onion.")); if (GetBoolArg("-benchmark", false)) InitWarning(_("Unsupported argument -benchmark ignored, use -debug=bench.")); if (GetBoolArg("-whitelistalwaysrelay", false)) InitWarning(_("Unsupported argument -whitelistalwaysrelay ignored, use -whitelistrelay and/or -whitelistforcerelay.")); if (IsArgSet("-blockminsize")) InitWarning("Unsupported argument -blockminsize ignored."); // Checkmempool and checkblockindex default to true in regtest mode int ratio = std::min<int>(std::max<int>(GetArg("-checkmempool", chainparams.DefaultConsistencyChecks() ? 1 : 0), 0), 1000000); if (ratio != 0) { mempool.setSanityCheck(1.0 / ratio); } fCheckBlockIndex = GetBoolArg("-checkblockindex", chainparams.DefaultConsistencyChecks()); fCheckpointsEnabled = GetBoolArg("-checkpoints", DEFAULT_CHECKPOINTS_ENABLED); hashAssumeValid = uint256S(GetArg("-assumevalid", chainparams.GetConsensus().defaultAssumeValid.GetHex())); if (!hashAssumeValid.IsNull()) LogPrintf("Assuming ancestors of block %s have valid signatures.\n", hashAssumeValid.GetHex()); else LogPrintf("Validating signatures for all blocks.\n"); // mempool limits int64_t nMempoolSizeMax = GetArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000; int64_t nMempoolSizeMin = GetArg("-limitdescendantsize", DEFAULT_DESCENDANT_SIZE_LIMIT) * 1000 * 40; if (nMempoolSizeMax < 0 || nMempoolSizeMax < nMempoolSizeMin) return InitError(strprintf(_("-maxmempool must be at least %d MB"), std::ceil(nMempoolSizeMin / 1000000.0))); // incremental relay fee sets the minimum feerate increase necessary for BIP 125 replacement in the mempool // and the amount the mempool min fee increases above the feerate of txs evicted due to mempool limiting. if (IsArgSet("-incrementalrelayfee")) { CAmount n = 0; if (!ParseMoney(GetArg("-incrementalrelayfee", ""), n)) return InitError(AmountErrMsg("incrementalrelayfee", GetArg("-incrementalrelayfee", ""))); incrementalRelayFee = CFeeRate(n); } // -par=0 means autodetect, but nScriptCheckThreads==0 means no concurrency nScriptCheckThreads = GetArg("-par", DEFAULT_SCRIPTCHECK_THREADS); if (nScriptCheckThreads <= 0) nScriptCheckThreads += GetNumCores(); if (nScriptCheckThreads <= 1) nScriptCheckThreads = 0; else if (nScriptCheckThreads > MAX_SCRIPTCHECK_THREADS) nScriptCheckThreads = MAX_SCRIPTCHECK_THREADS; // block pruning; get the amount of disk space (in MiB) to allot for block & undo files int64_t nPruneArg = GetArg("-prune", 0); if (nPruneArg < 0) { return InitError(_("Prune cannot be configured with a negative value.")); } nPruneTarget = (uint64_t) nPruneArg * 1024 * 1024; if (nPruneArg == 1) { // manual pruning: -prune=1 LogPrintf("Block pruning enabled. Use RPC call pruneblockchain(height) to manually prune block and undo files.\n"); nPruneTarget = std::numeric_limits<uint64_t>::max(); fPruneMode = true; } else if (nPruneTarget) { if (nPruneTarget < MIN_DISK_SPACE_FOR_BLOCK_FILES) { return InitError(strprintf(_("Prune configured below the minimum of %d MiB. Please use a higher number."), MIN_DISK_SPACE_FOR_BLOCK_FILES / 1024 / 1024)); } LogPrintf("Prune configured to target %uMiB on disk for block and undo files.\n", nPruneTarget / 1024 / 1024); fPruneMode = true; } RegisterAllCoreRPCCommands(tableRPC); #ifdef ENABLE_WALLET RegisterWalletRPCCommands(tableRPC); #endif nConnectTimeout = GetArg("-timeout", DEFAULT_CONNECT_TIMEOUT); if (nConnectTimeout <= 0) nConnectTimeout = DEFAULT_CONNECT_TIMEOUT; // Fee-per-kilobyte amount required for mempool acceptance and relay // If you are mining, be careful setting this: // if you set it to zero then // a transaction spammer can cheaply fill blocks using // 0-fee transactions. It should be set above the real // cost to you of processing a transaction. if (IsArgSet("-minrelaytxfee")) { CAmount n = 0; if (!ParseMoney(GetArg("-minrelaytxfee", ""), n)) { return InitError(AmountErrMsg("minrelaytxfee", GetArg("-minrelaytxfee", ""))); } // High fee check is done afterward in CWallet::ParameterInteraction() ::minRelayTxFee = CFeeRate(n); } else if (incrementalRelayFee > ::minRelayTxFee) { // Allow only setting incrementalRelayFee to control both ::minRelayTxFee = incrementalRelayFee; LogPrintf("Increasing minrelaytxfee to %s to match incrementalrelayfee\n",::minRelayTxFee.ToString()); } // Sanity check argument for min fee for including tx in block // TODO: Harmonize which arguments need sanity checking and where that happens if (IsArgSet("-blockmintxfee")) { CAmount n = 0; if (!ParseMoney(GetArg("-blockmintxfee", ""), n)) return InitError(AmountErrMsg("blockmintxfee", GetArg("-blockmintxfee", ""))); } // Feerate used to define dust. Shouldn't be changed lightly as old // implementations may inadvertently create non-standard transactions if (IsArgSet("-dustrelayfee")) { CAmount n = 0; if (!ParseMoney(GetArg("-dustrelayfee", ""), n) || 0 == n) return InitError(AmountErrMsg("dustrelayfee", GetArg("-dustrelayfee", ""))); dustRelayFee = CFeeRate(n); } fRequireStandard = !GetBoolArg("-acceptnonstdtxn", !chainparams.RequireStandard()); if (chainparams.RequireStandard() && !fRequireStandard) return InitError(strprintf("acceptnonstdtxn is not currently supported for %s chain", chainparams.NetworkIDString())); nBytesPerSigOp = GetArg("-bytespersigop", nBytesPerSigOp); #ifdef ENABLE_WALLET if (!CWallet::ParameterInteraction()) return false; #endif fIsBareMultisigStd = GetBoolArg("-permitbaremultisig", DEFAULT_PERMIT_BAREMULTISIG); fAcceptDatacarrier = GetBoolArg("-datacarrier", DEFAULT_ACCEPT_DATACARRIER); nMaxDatacarrierBytes = GetArg("-datacarriersize", nMaxDatacarrierBytes); // Option to startup with mocktime set (used for regression testing): SetMockTime(GetArg("-mocktime", 0)); // SetMockTime(0) is a no-op if (GetBoolArg("-peerbloomfilters", DEFAULT_PEERBLOOMFILTERS)) nLocalServices = ServiceFlags(nLocalServices | NODE_BLOOM); if (GetArg("-rpcserialversion", DEFAULT_RPC_SERIALIZE_VERSION) < 0) return InitError("rpcserialversion must be non-negative."); if (GetArg("-rpcserialversion", DEFAULT_RPC_SERIALIZE_VERSION) > 1) return InitError("unknown rpcserialversion requested."); nMaxTipAge = GetArg("-maxtipage", DEFAULT_MAX_TIP_AGE); fEnableReplacement = GetBoolArg("-mempoolreplacement", DEFAULT_ENABLE_REPLACEMENT); if ((!fEnableReplacement) && IsArgSet("-mempoolreplacement")) { // Minimal effort at forwards compatibility std::string strReplacementModeList = GetArg("-mempoolreplacement", ""); // default is impossible std::vector<std::string> vstrReplacementModes; boost::split(vstrReplacementModes, strReplacementModeList, boost::is_any_of(",")); fEnableReplacement = (std::find(vstrReplacementModes.begin(), vstrReplacementModes.end(), "fee") != vstrReplacementModes.end()); } if (mapMultiArgs.count("-bip9params")) { // Allow overriding BIP9 parameters for testing if (!chainparams.MineBlocksOnDemand()) { return InitError("BIP9 parameters may only be overridden on regtest."); } const std::vector<std::string>& deployments = mapMultiArgs.at("-bip9params"); for (auto i : deployments) { std::vector<std::string> vDeploymentParams; boost::split(vDeploymentParams, i, boost::is_any_of(":")); if (vDeploymentParams.size() != 3) { return InitError("BIP9 parameters malformed, expecting deployment:start:end"); } int64_t nStartTime, nTimeout; if (!ParseInt64(vDeploymentParams[1], &nStartTime)) { return InitError(strprintf("Invalid nStartTime (%s)", vDeploymentParams[1])); } if (!ParseInt64(vDeploymentParams[2], &nTimeout)) { return InitError(strprintf("Invalid nTimeout (%s)", vDeploymentParams[2])); } bool found = false; for (int j=0; j<(int)Consensus::MAX_VERSION_BITS_DEPLOYMENTS; ++j) { if (vDeploymentParams[0].compare(VersionBitsDeploymentInfo[j].name) == 0) { UpdateRegtestBIP9Parameters(Consensus::DeploymentPos(j), nStartTime, nTimeout); found = true; LogPrintf("Setting BIP9 activation parameters for %s to start=%ld, timeout=%ld\n", vDeploymentParams[0], nStartTime, nTimeout); break; } } if (!found) { return InitError(strprintf("Invalid deployment (%s)", vDeploymentParams[0])); } } } return true; } static bool LockDataDirectory(bool probeOnly) { std::string strDataDir = GetDataDir().string(); // Make sure only a single Bitcoin process is using the data directory. boost::filesystem::path pathLockFile = GetDataDir() / ".lock"; FILE* file = fopen(pathLockFile.string().c_str(), "a"); // empty lock file; created if it doesn't exist. if (file) fclose(file); try { static boost::interprocess::file_lock lock(pathLockFile.string().c_str()); if (!lock.try_lock()) { return InitError(strprintf(_("Cannot obtain a lock on data directory %s. %s is probably already running."), strDataDir, _(PACKAGE_NAME))); } if (probeOnly) { lock.unlock(); } } catch(const boost::interprocess::interprocess_exception& e) { return InitError(strprintf(_("Cannot obtain a lock on data directory %s. %s is probably already running.") + " %s.", strDataDir, _(PACKAGE_NAME), e.what())); } return true; } bool AppInitSanityChecks() { // ********************************************************* Step 4: sanity checks // Initialize elliptic curve code ECC_Start(); globalVerifyHandle.reset(new ECCVerifyHandle()); // Sanity check if (!InitSanityCheck()) return InitError(strprintf(_("Initialization sanity check failed. %s is shutting down."), _(PACKAGE_NAME))); // Probe the data directory lock to give an early error message, if possible return LockDataDirectory(true); } bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler) { const CChainParams& chainparams = Params(); // ********************************************************* Step 4a: application initialization // After daemonization get the data directory lock again and hold on to it until exit // This creates a slight window for a race condition to happen, however this condition is harmless: it // will at most make us exit without printing a message to console. if (!LockDataDirectory(false)) { // Detailed error printed inside LockDataDirectory return false; } #ifndef WIN32 CreatePidFile(GetPidFile(), getpid()); #endif if (GetBoolArg("-shrinkdebugfile", !fDebug)) { // Do this first since it both loads a bunch of debug.log into memory, // and because this needs to happen before any other debug.log printing ShrinkDebugFile(); } if (fPrintToDebugLog) OpenDebugLog(); if (!fLogTimestamps) LogPrintf("Startup time: %s\n", DateTimeStrFormat("%Y-%m-%d %H:%M:%S", GetTime())); LogPrintf("Default data directory %s\n", GetDefaultDataDir().string()); LogPrintf("Using data directory %s\n", GetDataDir().string()); LogPrintf("Using config file %s\n", GetConfigFile(GetArg("-conf", BITCOIN_CONF_FILENAME)).string()); LogPrintf("Using at most %i automatic connections (%i file descriptors available)\n", nMaxConnections, nFD); InitSignatureCache(); LogPrintf("Using %u threads for script verification\n", nScriptCheckThreads); if (nScriptCheckThreads) { for (int i=0; i<nScriptCheckThreads-1; i++) threadGroup.create_thread(&ThreadScriptCheck); } // Start the lightweight task scheduler thread CScheduler::Function serviceLoop = boost::bind(&CScheduler::serviceQueue, &scheduler); threadGroup.create_thread(boost::bind(&TraceThread<CScheduler::Function>, "scheduler", serviceLoop)); /* Start the RPC server already. It will be started in "warmup" mode * and not really process calls already (but it will signify connections * that the server is there and will be ready later). Warmup mode will * be disabled when initialisation is finished. */ if (GetBoolArg("-server", false)) { uiInterface.InitMessage.connect(SetRPCWarmupStatus); if (!AppInitServers(threadGroup)) return InitError(_("Unable to start HTTP server. See debug log for details.")); } int64_t nStart; // ********************************************************* Step 5: verify wallet database integrity #ifdef ENABLE_WALLET if (!CWallet::Verify()) return false; #endif // ********************************************************* Step 6: network initialization // Note that we absolutely cannot open any actual connections // until the very end ("start node") as the UTXO/block state // is not yet setup and may end up being set up twice if we // need to reindex later. assert(!g_connman); g_connman = std::unique_ptr<CConnman>(new CConnman(GetRand(std::numeric_limits<uint64_t>::max()), GetRand(std::numeric_limits<uint64_t>::max()))); CConnman& connman = *g_connman; peerLogic.reset(new PeerLogicValidation(&connman)); RegisterValidationInterface(peerLogic.get()); RegisterNodeSignals(GetNodeSignals()); // sanitize comments per BIP-0014, format user agent and check total size std::vector<std::string> uacomments; if (mapMultiArgs.count("-uacomment")) { BOOST_FOREACH(std::string cmt, mapMultiArgs.at("-uacomment")) { if (cmt != SanitizeString(cmt, SAFE_CHARS_UA_COMMENT)) return InitError(strprintf(_("User Agent comment (%s) contains unsafe characters."), cmt)); uacomments.push_back(cmt); } } strSubVersion = FormatSubVersion(CLIENT_NAME, CLIENT_VERSION, uacomments); if (strSubVersion.size() > MAX_SUBVERSION_LENGTH) { return InitError(strprintf(_("Total length of network version string (%i) exceeds maximum length (%i). Reduce the number or size of uacomments."), strSubVersion.size(), MAX_SUBVERSION_LENGTH)); } if (mapMultiArgs.count("-onlynet")) { std::set<enum Network> nets; BOOST_FOREACH(const std::string& snet, mapMultiArgs.at("-onlynet")) { enum Network net = ParseNetwork(snet); if (net == NET_UNROUTABLE) return InitError(strprintf(_("Unknown network specified in -onlynet: '%s'"), snet)); nets.insert(net); } for (int n = 0; n < NET_MAX; n++) { enum Network net = (enum Network)n; if (!nets.count(net)) SetLimited(net); } } if (mapMultiArgs.count("-whitelist")) { BOOST_FOREACH(const std::string& net, mapMultiArgs.at("-whitelist")) { CSubNet subnet; LookupSubNet(net.c_str(), subnet); if (!subnet.IsValid()) return InitError(strprintf(_("Invalid netmask specified in -whitelist: '%s'"), net)); connman.AddWhitelistedRange(subnet); } } // Check for host lookup allowed before parsing any network related parameters fNameLookup = GetBoolArg("-dns", DEFAULT_NAME_LOOKUP); bool proxyRandomize = GetBoolArg("-proxyrandomize", DEFAULT_PROXYRANDOMIZE); // -proxy sets a proxy for all outgoing network traffic // -noproxy (or -proxy=0) as well as the empty string can be used to not set a proxy, this is the default std::string proxyArg = GetArg("-proxy", ""); SetLimited(NET_TOR); if (proxyArg != "" && proxyArg != "0") { CService proxyAddr; if (!Lookup(proxyArg.c_str(), proxyAddr, 9050, fNameLookup)) { return InitError(strprintf(_("Invalid -proxy address or hostname: '%s'"), proxyArg)); } proxyType addrProxy = proxyType(proxyAddr, proxyRandomize); if (!addrProxy.IsValid()) return InitError(strprintf(_("Invalid -proxy address or hostname: '%s'"), proxyArg)); SetProxy(NET_IPV4, addrProxy); SetProxy(NET_IPV6, addrProxy); SetProxy(NET_TOR, addrProxy); SetNameProxy(addrProxy); SetLimited(NET_TOR, false); // by default, -proxy sets onion as reachable, unless -noonion later } // -onion can be used to set only a proxy for .onion, or override normal proxy for .onion addresses // -noonion (or -onion=0) disables connecting to .onion entirely // An empty string is used to not override the onion proxy (in which case it defaults to -proxy set above, or none) std::string onionArg = GetArg("-onion", ""); if (onionArg != "") { if (onionArg == "0") { // Handle -noonion/-onion=0 SetLimited(NET_TOR); // set onions as unreachable } else { CService onionProxy; if (!Lookup(onionArg.c_str(), onionProxy, 9050, fNameLookup)) { return InitError(strprintf(_("Invalid -onion address or hostname: '%s'"), onionArg)); } proxyType addrOnion = proxyType(onionProxy, proxyRandomize); if (!addrOnion.IsValid()) return InitError(strprintf(_("Invalid -onion address or hostname: '%s'"), onionArg)); SetProxy(NET_TOR, addrOnion); SetLimited(NET_TOR, false); } } // see Step 2: parameter interactions for more information about these fListen = GetBoolArg("-listen", DEFAULT_LISTEN); fDiscover = GetBoolArg("-discover", true); fRelayTxes = !GetBoolArg("-blocksonly", DEFAULT_BLOCKSONLY); if (fListen) { bool fBound = false; if (mapMultiArgs.count("-bind")) { BOOST_FOREACH(const std::string& strBind, mapMultiArgs.at("-bind")) { CService addrBind; if (!Lookup(strBind.c_str(), addrBind, GetListenPort(), false)) return InitError(ResolveErrMsg("bind", strBind)); fBound |= Bind(connman, addrBind, (BF_EXPLICIT | BF_REPORT_ERROR)); } } if (mapMultiArgs.count("-whitebind")) { BOOST_FOREACH(const std::string& strBind, mapMultiArgs.at("-whitebind")) { CService addrBind; if (!Lookup(strBind.c_str(), addrBind, 0, false)) return InitError(ResolveErrMsg("whitebind", strBind)); if (addrBind.GetPort() == 0) return InitError(strprintf(_("Need to specify a port with -whitebind: '%s'"), strBind)); fBound |= Bind(connman, addrBind, (BF_EXPLICIT | BF_REPORT_ERROR | BF_WHITELIST)); } } if (!mapMultiArgs.count("-bind") && !mapMultiArgs.count("-whitebind")) { struct in_addr inaddr_any; inaddr_any.s_addr = INADDR_ANY; fBound |= Bind(connman, CService(in6addr_any, GetListenPort()), BF_NONE); fBound |= Bind(connman, CService(inaddr_any, GetListenPort()), !fBound ? BF_REPORT_ERROR : BF_NONE); } if (!fBound) return InitError(_("Failed to listen on any port. Use -listen=0 if you want this.")); } if (mapMultiArgs.count("-externalip")) { BOOST_FOREACH(const std::string& strAddr, mapMultiArgs.at("-externalip")) { CService addrLocal; if (Lookup(strAddr.c_str(), addrLocal, GetListenPort(), fNameLookup) && addrLocal.IsValid()) AddLocal(addrLocal, LOCAL_MANUAL); else return InitError(ResolveErrMsg("externalip", strAddr)); } } if (mapMultiArgs.count("-seednode")) { BOOST_FOREACH(const std::string& strDest, mapMultiArgs.at("-seednode")) connman.AddOneShot(strDest); } #if ENABLE_ZMQ pzmqNotificationInterface = CZMQNotificationInterface::Create(); if (pzmqNotificationInterface) { RegisterValidationInterface(pzmqNotificationInterface); } #endif uint64_t nMaxOutboundLimit = 0; //unlimited unless -maxuploadtarget is set uint64_t nMaxOutboundTimeframe = MAX_UPLOAD_TIMEFRAME; if (IsArgSet("-maxuploadtarget")) { nMaxOutboundLimit = GetArg("-maxuploadtarget", DEFAULT_MAX_UPLOAD_TARGET)*1024*1024; } // ********************************************************* Step 7: load block chain fReindex = GetBoolArg("-reindex", false); bool fReindexChainState = GetBoolArg("-reindex-chainstate", false); boost::filesystem::create_directories(GetDataDir() / "blocks"); // cache size calculations int64_t nTotalCache = (GetArg("-dbcache", nDefaultDbCache) << 20); nTotalCache = std::max(nTotalCache, nMinDbCache << 20); // total cache cannot be less than nMinDbCache nTotalCache = std::min(nTotalCache, nMaxDbCache << 20); // total cache cannot be greater than nMaxDbcache int64_t nBlockTreeDBCache = nTotalCache / 8; nBlockTreeDBCache = std::min(nBlockTreeDBCache, (GetBoolArg("-txindex", DEFAULT_TXINDEX) ? nMaxBlockDBAndTxIndexCache : nMaxBlockDBCache) << 20); nTotalCache -= nBlockTreeDBCache; int64_t nCoinDBCache = std::min(nTotalCache / 2, (nTotalCache / 4) + (1 << 23)); // use 25%-50% of the remainder for disk cache nCoinDBCache = std::min(nCoinDBCache, nMaxCoinsDBCache << 20); // cap total coins db cache nTotalCache -= nCoinDBCache; nCoinCacheUsage = nTotalCache; // the rest goes to in-memory cache int64_t nMempoolSizeMax = GetArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000; LogPrintf("Cache configuration:\n"); LogPrintf("* Using %.1fMiB for block index database\n", nBlockTreeDBCache * (1.0 / 1024 / 1024)); LogPrintf("* Using %.1fMiB for chain state database\n", nCoinDBCache * (1.0 / 1024 / 1024)); LogPrintf("* Using %.1fMiB for in-memory UTXO set (plus up to %.1fMiB of unused mempool space)\n", nCoinCacheUsage * (1.0 / 1024 / 1024), nMempoolSizeMax * (1.0 / 1024 / 1024)); bool fLoaded = false; while (!fLoaded) { bool fReset = fReindex; std::string strLoadError; uiInterface.InitMessage(_("Loading block index...")); nStart = GetTimeMillis(); do { try { UnloadBlockIndex(); delete pcoinsTip; delete pcoinsdbview; delete pcoinscatcher; delete pblocktree; pblocktree = new CBlockTreeDB(nBlockTreeDBCache, false, fReindex); pcoinsdbview = new CCoinsViewDB(nCoinDBCache, false, fReindex || fReindexChainState); pcoinscatcher = new CCoinsViewErrorCatcher(pcoinsdbview); pcoinsTip = new CCoinsViewCache(pcoinscatcher); if (fReindex) { pblocktree->WriteReindexing(true); //If we're reindexing in prune mode, wipe away unusable block files and all undo data files if (fPruneMode) CleanupBlockRevFiles(); } if (!LoadBlockIndex(chainparams)) { strLoadError = _("Error loading block database"); break; } // If the loaded chain has a wrong genesis, bail out immediately // (we're likely using a testnet datadir, or the other way around). if (!mapBlockIndex.empty() && mapBlockIndex.count(chainparams.GetConsensus().hashGenesisBlock) == 0) return InitError(_("Incorrect or no genesis block found. Wrong datadir for network?")); // Initialize the block index (no-op if non-empty database was already loaded) if (!InitBlockIndex(chainparams)) { strLoadError = _("Error initializing block database"); break; } // Check for changed -txindex state if (fTxIndex != GetBoolArg("-txindex", DEFAULT_TXINDEX)) { strLoadError = _("You need to rebuild the database using -reindex-chainstate to change -txindex"); break; } // Check for changed -prune state. What we are concerned about is a user who has pruned blocks // in the past, but is now trying to run unpruned. if (fHavePruned && !fPruneMode) { strLoadError = _("You need to rebuild the database using -reindex to go back to unpruned mode. This will redownload the entire blockchain"); break; } if (!fReindex && chainActive.Tip() != NULL) { uiInterface.InitMessage(_("Rewinding blocks...")); if (!RewindBlockIndex(chainparams)) { strLoadError = _("Unable to rewind the database to a pre-fork state. You will need to redownload the blockchain"); break; } } uiInterface.InitMessage(_("Verifying blocks...")); if (fHavePruned && GetArg("-checkblocks", DEFAULT_CHECKBLOCKS) > MIN_BLOCKS_TO_KEEP) { LogPrintf("Prune: pruned datadir may not have more than %d blocks; only checking available blocks", MIN_BLOCKS_TO_KEEP); } { LOCK(cs_main); CBlockIndex* tip = chainActive.Tip(); RPCNotifyBlockChange(true, tip); if (tip && tip->nTime > GetAdjustedTime() + 2 * 60 * 60) { strLoadError = _("The block database contains a block which appears to be from the future. " "This may be due to your computer's date and time being set incorrectly. " "Only rebuild the block database if you are sure that your computer's date and time are correct"); break; } } if (!CVerifyDB().VerifyDB(chainparams, pcoinsdbview, GetArg("-checklevel", DEFAULT_CHECKLEVEL), GetArg("-checkblocks", DEFAULT_CHECKBLOCKS))) { strLoadError = _("Corrupted block database detected"); break; } } catch (const std::exception& e) { if (fDebug) LogPrintf("%s\n", e.what()); strLoadError = _("Error opening block database"); break; } fLoaded = true; } while(false); if (!fLoaded) { // first suggest a reindex if (!fReset) { bool fRet = uiInterface.ThreadSafeQuestion( strLoadError + ".\n\n" + _("Do you want to rebuild the block database now?"), strLoadError + ".\nPlease restart with -reindex or -reindex-chainstate to recover.", "", CClientUIInterface::MSG_ERROR | CClientUIInterface::BTN_ABORT); if (fRet) { fReindex = true; fRequestShutdown = false; } else { LogPrintf("Aborted block database rebuild. Exiting.\n"); return false; } } else { return InitError(strLoadError); } } } // As LoadBlockIndex can take several minutes, it's possible the user // requested to kill the GUI during the last operation. If so, exit. // As the program has not fully started yet, Shutdown() is possibly overkill. if (fRequestShutdown) { LogPrintf("Shutdown requested. Exiting.\n"); return false; } LogPrintf(" block index %15dms\n", GetTimeMillis() - nStart); boost::filesystem::path est_path = GetDataDir() / FEE_ESTIMATES_FILENAME; CAutoFile est_filein(fopen(est_path.string().c_str(), "rb"), SER_DISK, CLIENT_VERSION); // Allowed to fail as this file IS missing on first startup. if (!est_filein.IsNull()) mempool.ReadFeeEstimates(est_filein); fFeeEstimatesInitialized = true; // ********************************************************* Step 8: load wallet #ifdef ENABLE_WALLET if (!CWallet::InitLoadWallet()) return false; #else LogPrintf("No wallet support compiled in!\n"); #endif // ********************************************************* Step 9: data directory maintenance // if pruning, unset the service bit and perform the initial blockstore prune // after any wallet rescanning has taken place. if (fPruneMode) { LogPrintf("Unsetting NODE_NETWORK on prune mode\n"); nLocalServices = ServiceFlags(nLocalServices & ~NODE_NETWORK); if (!fReindex) { uiInterface.InitMessage(_("Pruning blockstore...")); PruneAndFlush(); } } if (chainparams.GetConsensus().vDeployments[Consensus::DEPLOYMENT_SEGWIT].nTimeout != 0) { // Only advertise witness capabilities if they have a reasonable start time. // This allows us to have the code merged without a defined softfork, by setting its // end time to 0. // Note that setting NODE_WITNESS is never required: the only downside from not // doing so is that after activation, no upgraded nodes will fetch from you. nLocalServices = ServiceFlags(nLocalServices | NODE_WITNESS); // Only care about others providing witness capabilities if there is a softfork // defined. nRelevantServices = ServiceFlags(nRelevantServices | NODE_WITNESS); } // ********************************************************* Step 10: import blocks if (!CheckDiskSpace()) return false; // Either install a handler to notify us when genesis activates, or set fHaveGenesis directly. // No locking, as this happens before any background thread is started. if (chainActive.Tip() == NULL) { uiInterface.NotifyBlockTip.connect(BlockNotifyGenesisWait); } else { fHaveGenesis = true; } if (IsArgSet("-blocknotify")) uiInterface.NotifyBlockTip.connect(BlockNotifyCallback); std::vector<boost::filesystem::path> vImportFiles; if (mapMultiArgs.count("-loadblock")) { BOOST_FOREACH(const std::string& strFile, mapMultiArgs.at("-loadblock")) vImportFiles.push_back(strFile); } threadGroup.create_thread(boost::bind(&ThreadImport, vImportFiles)); // Wait for genesis block to be processed { boost::unique_lock<boost::mutex> lock(cs_GenesisWait); while (!fHaveGenesis) { condvar_GenesisWait.wait(lock); } uiInterface.NotifyBlockTip.disconnect(BlockNotifyGenesisWait); } // ********************************************************* Step 11: start node //// debug print LogPrintf("mapBlockIndex.size() = %u\n", mapBlockIndex.size()); LogPrintf("nBestHeight = %d\n", chainActive.Height()); if (GetBoolArg("-listenonion", DEFAULT_LISTEN_ONION)) StartTorControl(threadGroup, scheduler); Discover(threadGroup); // Map ports with UPnP MapPort(GetBoolArg("-upnp", DEFAULT_UPNP)); std::string strNodeError; CConnman::Options connOptions; connOptions.nLocalServices = nLocalServices; connOptions.nRelevantServices = nRelevantServices; connOptions.nMaxConnections = nMaxConnections; connOptions.nMaxOutbound = std::min(MAX_OUTBOUND_CONNECTIONS, connOptions.nMaxConnections); connOptions.nMaxAddnode = MAX_ADDNODE_CONNECTIONS; connOptions.nMaxFeeler = 1; connOptions.nBestHeight = chainActive.Height(); connOptions.uiInterface = &uiInterface; connOptions.nSendBufferMaxSize = 1000*GetArg("-maxsendbuffer", DEFAULT_MAXSENDBUFFER); connOptions.nReceiveFloodSize = 1000*GetArg("-maxreceivebuffer", DEFAULT_MAXRECEIVEBUFFER); connOptions.nMaxOutboundTimeframe = nMaxOutboundTimeframe; connOptions.nMaxOutboundLimit = nMaxOutboundLimit; if (!connman.Start(scheduler, strNodeError, connOptions)) return InitError(strNodeError); // ********************************************************* Step 12: finished SetRPCWarmupFinished(); uiInterface.InitMessage(_("Done loading")); #ifdef ENABLE_WALLET if (pwalletMain) pwalletMain->postInitProcess(scheduler); #endif return !fRequestShutdown; }
s-matthew-english/bitcoin
src/init.cpp
C++
mit
80,293
<?php namespace esperanto\UserBundle\Entity; use Doctrine\ORM\Mapping as ORM; use FOS\UserBundle\Model\Group as BaseGroup; /** * Group */ class Group extends BaseGroup { /** * @var integer */ protected $id; /** * @var \Doctrine\Common\Collections\Collection */ private $users; /** * Constructor */ public function __construct() { parent::__construct('', array()); $this->users = new \Doctrine\Common\Collections\ArrayCollection(); } /** * Get id * * @return integer */ public function getId() { return $this->id; } /** * Add users * * @param \esperanto\UserBundle\Entity\User $users * @return Group */ public function addUser(\esperanto\UserBundle\Entity\User $users) { $this->users[] = $users; return $this; } /** * Remove users * * @param \esperanto\UserBundle\Entity\User $users */ public function removeUser(\esperanto\UserBundle\Entity\User $users) { $this->users->removeElement($users); } /** * Get users * * @return \Doctrine\Common\Collections\Collection */ public function getUsers() { return $this->users; } }
gseidel/esperanto-cms
src/esperanto/UserBundle/Entity/Group.php
PHP
mit
1,301
@extends('admin.layouts.modal') {{-- Content --}} @section('content') <!-- Tabs --> <ul class="nav nav-tabs"> <li class="active"><a href="#tab-general" data-toggle="tab">General</a></li> </ul> <!-- ./ tabs --> {{-- Delete User Form --}} <form class="form-horizontal" method="post" action="" autocomplete="off"> <!-- CSRF Token --> <input type="hidden" name="_token" value="{{{ csrf_token() }}}" /> <input type="hidden" name="id" value="{{ $user->id }}" /> <!-- ./ csrf token --> <!-- Form Actions --> <div class="control-group"> <div class="controls"> <element class="btn-cancel close_popup">Cancel</element> <button type="submit" class="btn btn-danger close_popup">Delete</button> </div> </div> <!-- ./ form actions --> </form> @stop
mgathu1/groceryshopper
laravel/app/views/admin/users/delete.blade.php
PHP
mit
905
package org.multibit.hd.core.events; /** * <p>Signature interface to provide the following to Core Event API:</p> * <ul> * <li>Identification of core events</li> * </ul> * <p>A core event should be named using a noun as the first part of the name (e.g. ExchangeRateChangedEvent)</p> * <p>A core event can occur at any time and will not be synchronized with other events.</p> * * @since 0.0.1 *   */ public interface CoreEvent { }
oscarguindzberg/multibit-hd
mbhd-core/src/main/java/org/multibit/hd/core/events/CoreEvent.java
Java
mit
449
var fs = require('fs'); var PNG = require('../lib/png').PNG; var test = require('tape'); var noLargeOption = process.argv.indexOf("nolarge") >= 0; fs.readdir(__dirname + '/in/', function (err, files) { if (err) throw err; files = files.filter(function (file) { return (!noLargeOption || !file.match(/large/i)) && Boolean(file.match(/\.png$/i)); }); console.log("Converting images"); files.forEach(function (file) { var expectedError = false; if (file.match(/^x/)) { expectedError = true; } test('convert sync - ' + file, function (t) { t.timeoutAfter(1000 * 60 * 5); var data = fs.readFileSync(__dirname + '/in/' + file); try { var png = PNG.sync.read(data); } catch (e) { if (!expectedError) { t.fail('Unexpected error parsing..' + file + '\n' + e.message + "\n" + e.stack); } else { t.pass("completed"); } return t.end(); } if (expectedError) { t.fail("Sync: Error expected, parsed fine .. - " + file); return t.end(); } var outpng = new PNG(); outpng.gamma = png.gamma; outpng.data = png.data; outpng.width = png.width; outpng.height = png.height; outpng.pack() .pipe(fs.createWriteStream(__dirname + '/outsync/' + file) .on("finish", function () { t.pass("completed"); t.end(); })); }); test('convert async - ' + file, function (t) { t.timeoutAfter(1000 * 60 * 5); fs.createReadStream(__dirname + '/in/' + file) .pipe(new PNG()) .on('error', function (err) { if (!expectedError) { t.fail("Async: Unexpected error parsing.." + file + '\n' + err.message + '\n' + err.stack); } else { t.pass("completed"); } t.end(); }) .on('parsed', function () { if (expectedError) { t.fail("Async: Error expected, parsed fine .." + file); return t.end(); } this.pack() .pipe( fs.createWriteStream(__dirname + '/out/' + file) .on("finish", function () { t.pass("completed"); t.end(); })); }); }); }); });
lukeapage/pngjs2
test/convert-images-spec.js
JavaScript
mit
2,317
/*************************************************************************************** Extended WPF Toolkit Copyright (C) 2007-2014 Xceed Software Inc. This program is provided to you under the terms of the Microsoft Public License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license For more features, controls, and fast professional support, pick up the Plus Edition at http://xceed.com/wpf_toolkit Stay informed: follow @datagrid on Twitter or Like http://facebook.com/datagrids ************************************************************************************/ using System; using System.IO; using System.Windows; using System.Windows.Resources; namespace Xceed.Wpf.Toolkit.LiveExplorer.Samples.Magnifier.Views { /// <summary> /// Interaction logic for MagnifierView.xaml /// </summary> public partial class MagnifierView : DemoView { public MagnifierView() { InitializeComponent(); // Load and display the RTF file. Uri uri = new Uri( "pack://application:,,,/Xceed.Wpf.Toolkit.LiveExplorer;component/Samples/Magnifier/Resources/SampleText.rtf" ); StreamResourceInfo info = Application.GetResourceStream( uri ); using( StreamReader txtReader = new StreamReader( info.Stream ) ) { _txtContent.Text = txtReader.ReadToEnd(); } } } }
BenInCOSprings/WpfDockingWindowsApplicationTemplate
wpftoolkit-110921/Main/Source/ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit.LiveExplorer/Samples/Magnifier/Views/MagnifierView.xaml.cs
C#
mit
1,404
var assert = require('assert'); var Q = require('q'); var R = require('..'); describe('pipeP', function() { function a(x) {return x + 'A';} function b(x) {return x + 'B';} it('handles promises', function() { var plusOne = function(a) {return a + 1;}; var multAsync = function(a, b) {return Q.when(a * b);}; return R.pipeP(multAsync, plusOne)(2, 3) .then(function(result) { assert.strictEqual(result, 7); }); }); it('returns a function with arity == leftmost argument', function() { function a2(x, y) { void y; return 'A2'; } function a3(x, y) { void y; return Q.when('A2'); } function a4(x, y) { void y; return 'A2'; } var f1 = R.pipeP(a, b); assert.strictEqual(f1.length, a.length); var f2 = R.pipeP(a2, b); assert.strictEqual(f2.length, a2.length); var f3 = R.pipeP(a3, b); assert.strictEqual(f3.length, a3.length); var f4 = R.pipeP(a4, b); assert.strictEqual(f4.length, a4.length); }); });
donnut/ramda
test/pipeP.js
JavaScript
mit
988
<?php namespace Illuminate\Tests\Support; use DateTime; use DateTimeInterface; use BadMethodCallException; use Carbon\CarbonImmutable; use Illuminate\Support\Carbon; use PHPUnit\Framework\TestCase; use Carbon\Carbon as BaseCarbon; class SupportCarbonTest extends TestCase { /** * @var \Illuminate\Support\Carbon */ protected $now; protected function setUp(): void { parent::setUp(); Carbon::setTestNow($this->now = Carbon::create(2017, 6, 27, 13, 14, 15, 'UTC')); } protected function tearDown(): void { Carbon::setTestNow(); Carbon::serializeUsing(null); parent::tearDown(); } public function testInstance() { $this->assertInstanceOf(DateTime::class, $this->now); $this->assertInstanceOf(DateTimeInterface::class, $this->now); $this->assertInstanceOf(BaseCarbon::class, $this->now); $this->assertInstanceOf(Carbon::class, $this->now); } public function testCarbonIsMacroableWhenNotCalledStatically() { Carbon::macro('diffInDecades', function (Carbon $dt = null, $abs = true) { return (int) ($this->diffInYears($dt, $abs) / 10); }); $this->assertSame(2, $this->now->diffInDecades(Carbon::now()->addYears(25))); } public function testCarbonIsMacroableWhenCalledStatically() { Carbon::macro('twoDaysAgoAtNoon', function () { return Carbon::now()->subDays(2)->setTime(12, 0, 0); }); $this->assertSame('2017-06-25 12:00:00', Carbon::twoDaysAgoAtNoon()->toDateTimeString()); } public function testCarbonRaisesExceptionWhenStaticMacroIsNotFound() { $this->expectException(BadMethodCallException::class); $this->expectExceptionMessage('nonExistingStaticMacro does not exist.'); Carbon::nonExistingStaticMacro(); } public function testCarbonRaisesExceptionWhenMacroIsNotFound() { $this->expectException(BadMethodCallException::class); $this->expectExceptionMessage('nonExistingMacro does not exist.'); Carbon::now()->nonExistingMacro(); } public function testCarbonAllowsCustomSerializer() { Carbon::serializeUsing(function (Carbon $carbon) { return $carbon->getTimestamp(); }); $result = json_decode(json_encode($this->now), true); $this->assertSame(1498569255, $result); } public function testCarbonCanSerializeToJson() { $this->assertSame(class_exists(CarbonImmutable::class) ? '2017-06-27T13:14:15.000000Z' : [ 'date' => '2017-06-27 13:14:15.000000', 'timezone_type' => 3, 'timezone' => 'UTC', ], $this->now->jsonSerialize()); } public function testSetStateReturnsCorrectType() { $carbon = Carbon::__set_state([ 'date' => '2017-06-27 13:14:15.000000', 'timezone_type' => 3, 'timezone' => 'UTC', ]); $this->assertInstanceOf(Carbon::class, $carbon); } public function testDeserializationOccursCorrectly() { $carbon = new Carbon('2017-06-27 13:14:15.000000'); $serialized = 'return '.var_export($carbon, true).';'; $deserialized = eval($serialized); $this->assertInstanceOf(Carbon::class, $deserialized); } }
cviebrock/framework
tests/Support/SupportCarbonTest.php
PHP
mit
3,356
from __future__ import print_function from .patchpipette import PatchPipette
pbmanis/acq4
acq4/devices/PatchPipette/__init__.py
Python
mit
77
<?php /** * Subclass for representing a row from the 'sf_simple_forum_category' table. * * * * @package plugins.sfSimpleForumPlugin.lib.model */ class sfSimpleForumCategory extends PluginsfSimpleForumCategory { }
Symfony-Plugins/sfSimpleForum2Plugin
lib/model/sfSimpleForumCategory.php
PHP
mit
222
var _ = require('underscore'); /* A rule should contain explain and rule methods */ // TODO explain explain // TODO explain missing // TODO explain assert function assert (options, password) { return !!password && options.minLength <= password.length; } function explain(options) { if (options.minLength === 1) { return { message: 'Non-empty password required', code: 'nonEmpty' }; } return { message: 'At least %d characters in length', format: [options.minLength], code: 'lengthAtLeast' }; } module.exports = { validate: function (options) { if (!_.isObject(options)) { throw new Error('options should be an object'); } if (!_.isNumber(options.minLength) || _.isNaN(options.minLength)) { throw new Error('length expects minLength to be a non-zero number'); } return true; }, explain: explain, missing: function (options, password) { var explained = explain(options); explained.verified = !!assert(options, password); return explained; }, assert: assert };
nherzalla/ProfileX-1
node_modules/password-sheriff/lib/rules/length.js
JavaScript
mit
1,063
<?php /** * @package CleverStyle CMS * @author Nazar Mokrynskyi <nazar@mokrynskyi.com> * @copyright Copyright (c) 2011-2014, Nazar Mokrynskyi * @license MIT License, see license.txt */ namespace cs; use ArrayAccess, SimpleXMLElement; /** * False_class is used for chained calling, when some method may return false. * * Usage of class is simple, just return his instance instead of real boolean <i>false</i>. * On every call of any method or getting of any property or getting any element of array instance of the this class will be returned. * Access to anything of this class instance will be casted to boolean <i>false</i> * * Inherits SimpleXMLElement in order to be casted from object to boolean as <i>false</i> * * @property string $error */ class False_class extends SimpleXMLElement implements ArrayAccess { /** * Use this method to obtain correct instance * * @return False_class */ static function instance () { static $instance; if (!isset($instance)) { $instance = new self('<?xml version=\'1.0\'?><cs></cs>'); } return $instance; } /** * Getting any property * * @param string $item * * @return False_class */ function __get ($item) { return $this; } /** * Calling of any method * * @param string $method * @param mixed[] $params * * @return False_class */ function __call ($method, $params) { return $this; } /** * @return string */ function __toString () { return '0'; } /** * If item exists */ function offsetExists ($offset) { return false; } /** * Get item */ function offsetGet ($offset) { return $this; } /** * Set item */ public function offsetSet ($offset, $value) {} /** * Delete item */ public function offsetUnset ($offset) {} }
nazar-pc/cherrytea.org-old
core/classes/False_class.php
PHP
mit
1,775
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is JavaScript Engine testing utilities. * * The Initial Developer of the Original Code is * Mozilla Foundation. * Portions created by the Initial Developer are Copyright (C) 2008 * the Initial Developer. All Rights Reserved. * * Contributor(s): Jesse Ruderman * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ var gTestfile = 'regress-463259.js'; //----------------------------------------------------------------------------- var BUGNUMBER = 463259; var summary = 'Do not assert: VALUE_IS_FUNCTION(cx, fval)'; var actual = ''; var expect = ''; printBugNumber(BUGNUMBER); printStatus (summary); jit(true); try { (function(){ eval("(function(){ for (var j=0;j<4;++j) if (j==3) undefined(); })();"); })(); } catch(ex) { } jit(false); reportCompare(expect, actual, summary);
jubos/meguro
deps/spidermonkey/tests/js1_5/Regress/regress-463259.js
JavaScript
mit
2,273
/* * Farseer Physics Engine: * Copyright (c) 2012 Ian Qvist * * Original source Box2D: * Copyright (c) 2006-2011 Erin Catto http://www.box2d.org * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. */ using System; using System.Diagnostics; using FarseerPhysics.Common; using Microsoft.Xna.Framework; namespace FarseerPhysics.Dynamics.Joints { // 1-D rained system // m (v2 - v1) = lambda // v2 + (beta/h) * x1 + gamma * lambda = 0, gamma has units of inverse mass. // x2 = x1 + h * v2 // 1-D mass-damper-spring system // m (v2 - v1) + h * d * v2 + h * k * // C = norm(p2 - p1) - L // u = (p2 - p1) / norm(p2 - p1) // Cdot = dot(u, v2 + cross(w2, r2) - v1 - cross(w1, r1)) // J = [-u -cross(r1, u) u cross(r2, u)] // K = J * invM * JT // = invMass1 + invI1 * cross(r1, u)^2 + invMass2 + invI2 * cross(r2, u)^2 /// <summary> /// A distance joint rains two points on two bodies /// to remain at a fixed distance from each other. You can view /// this as a massless, rigid rod. /// </summary> public class DistanceJoint : Joint { #region Properties/Fields /// <summary> /// The local anchor point relative to bodyA's origin. /// </summary> public Vector2 localAnchorA; /// <summary> /// The local anchor point relative to bodyB's origin. /// </summary> public Vector2 localAnchorB; public override sealed Vector2 worldAnchorA { get { return bodyA.getWorldPoint( localAnchorA ); } set { Debug.Assert( false, "You can't set the world anchor on this joint type." ); } } public override sealed Vector2 worldAnchorB { get { return bodyB.getWorldPoint( localAnchorB ); } set { Debug.Assert( false, "You can't set the world anchor on this joint type." ); } } /// <summary> /// The natural length between the anchor points. /// Manipulating the length can lead to non-physical behavior when the frequency is zero. /// </summary> public float length; /// <summary> /// The mass-spring-damper frequency in Hertz. A value of 0 /// disables softness. /// </summary> public float frequency; /// <summary> /// The damping ratio. 0 = no damping, 1 = critical damping. /// </summary> public float dampingRatio; // Solver shared float _bias; float _gamma; float _impulse; // Solver temp int _indexA; int _indexB; Vector2 _u; Vector2 _rA; Vector2 _rB; Vector2 _localCenterA; Vector2 _localCenterB; float _invMassA; float _invMassB; float _invIA; float _invIB; float _mass; #endregion internal DistanceJoint() { jointType = JointType.Distance; } /// <summary> /// This requires defining an /// anchor point on both bodies and the non-zero length of the /// distance joint. If you don't supply a length, the local anchor points /// is used so that the initial configuration can violate the constraint /// slightly. This helps when saving and loading a game. /// Warning Do not use a zero or short length. /// </summary> /// <param name="bodyA">The first body</param> /// <param name="bodyB">The second body</param> /// <param name="anchorA">The first body anchor</param> /// <param name="anchorB">The second body anchor</param> /// <param name="useWorldCoordinates">Set to true if you are using world coordinates as anchors.</param> public DistanceJoint( Body bodyA, Body bodyB, Vector2 anchorA, Vector2 anchorB, bool useWorldCoordinates = false ) : base( bodyA, bodyB ) { jointType = JointType.Distance; if( useWorldCoordinates ) { localAnchorA = bodyA.getLocalPoint( ref anchorA ); localAnchorB = bodyB.getLocalPoint( ref anchorB ); length = ( anchorB - anchorA ).Length(); } else { localAnchorA = anchorA; localAnchorB = anchorB; length = ( base.bodyB.getWorldPoint( ref anchorB ) - base.bodyA.getWorldPoint( ref anchorA ) ).Length(); } } /// <summary> /// Get the reaction force given the inverse time step. Unit is N. /// </summary> /// <param name="invDt"></param> /// <returns></returns> public override Vector2 getReactionForce( float invDt ) { Vector2 F = ( invDt * _impulse ) * _u; return F; } /// <summary> /// Get the reaction torque given the inverse time step. /// Unit is N*m. This is always zero for a distance joint. /// </summary> /// <param name="invDt"></param> /// <returns></returns> public override float getReactionTorque( float invDt ) { return 0.0f; } internal override void initVelocityConstraints( ref SolverData data ) { _indexA = bodyA.islandIndex; _indexB = bodyB.islandIndex; _localCenterA = bodyA._sweep.localCenter; _localCenterB = bodyB._sweep.localCenter; _invMassA = bodyA._invMass; _invMassB = bodyB._invMass; _invIA = bodyA._invI; _invIB = bodyB._invI; Vector2 cA = data.positions[_indexA].c; float aA = data.positions[_indexA].a; Vector2 vA = data.velocities[_indexA].v; float wA = data.velocities[_indexA].w; Vector2 cB = data.positions[_indexB].c; float aB = data.positions[_indexB].a; Vector2 vB = data.velocities[_indexB].v; float wB = data.velocities[_indexB].w; Rot qA = new Rot( aA ), qB = new Rot( aB ); _rA = MathUtils.mul( qA, localAnchorA - _localCenterA ); _rB = MathUtils.mul( qB, localAnchorB - _localCenterB ); _u = cB + _rB - cA - _rA; // Handle singularity. float length = _u.Length(); if( length > Settings.linearSlop ) { _u *= 1.0f / length; } else { _u = Vector2.Zero; } float crAu = MathUtils.cross( _rA, _u ); float crBu = MathUtils.cross( _rB, _u ); float invMass = _invMassA + _invIA * crAu * crAu + _invMassB + _invIB * crBu * crBu; // Compute the effective mass matrix. _mass = invMass != 0.0f ? 1.0f / invMass : 0.0f; if( frequency > 0.0f ) { float C = length - this.length; // Frequency float omega = 2.0f * Settings.pi * frequency; // Damping coefficient float d = 2.0f * _mass * dampingRatio * omega; // Spring stiffness float k = _mass * omega * omega; // magic formulas float h = data.step.dt; _gamma = h * ( d + h * k ); _gamma = _gamma != 0.0f ? 1.0f / _gamma : 0.0f; _bias = C * h * k * _gamma; invMass += _gamma; _mass = invMass != 0.0f ? 1.0f / invMass : 0.0f; } else { _gamma = 0.0f; _bias = 0.0f; } if( Settings.enableWarmstarting ) { // Scale the impulse to support a variable time step. _impulse *= data.step.dtRatio; Vector2 P = _impulse * _u; vA -= _invMassA * P; wA -= _invIA * MathUtils.cross( _rA, P ); vB += _invMassB * P; wB += _invIB * MathUtils.cross( _rB, P ); } else { _impulse = 0.0f; } data.velocities[_indexA].v = vA; data.velocities[_indexA].w = wA; data.velocities[_indexB].v = vB; data.velocities[_indexB].w = wB; } internal override void solveVelocityConstraints( ref SolverData data ) { Vector2 vA = data.velocities[_indexA].v; float wA = data.velocities[_indexA].w; Vector2 vB = data.velocities[_indexB].v; float wB = data.velocities[_indexB].w; // Cdot = dot(u, v + cross(w, r)) Vector2 vpA = vA + MathUtils.cross( wA, _rA ); Vector2 vpB = vB + MathUtils.cross( wB, _rB ); float Cdot = Vector2.Dot( _u, vpB - vpA ); float impulse = -_mass * ( Cdot + _bias + _gamma * _impulse ); _impulse += impulse; Vector2 P = impulse * _u; vA -= _invMassA * P; wA -= _invIA * MathUtils.cross( _rA, P ); vB += _invMassB * P; wB += _invIB * MathUtils.cross( _rB, P ); data.velocities[_indexA].v = vA; data.velocities[_indexA].w = wA; data.velocities[_indexB].v = vB; data.velocities[_indexB].w = wB; } internal override bool solvePositionConstraints( ref SolverData data ) { if( frequency > 0.0f ) { // There is no position correction for soft distance constraints. return true; } var cA = data.positions[_indexA].c; var aA = data.positions[_indexA].a; var cB = data.positions[_indexB].c; var aB = data.positions[_indexB].a; Rot qA = new Rot( aA ), qB = new Rot( aB ); var rA = MathUtils.mul( qA, localAnchorA - _localCenterA ); var rB = MathUtils.mul( qB, localAnchorB - _localCenterB ); var u = cB + rB - cA - rA; var length = u.Length(); Nez.Vector2Ext.normalize( ref u ); var C = length - this.length; C = MathUtils.clamp( C, -Settings.maxLinearCorrection, Settings.maxLinearCorrection ); var impulse = -_mass * C; var P = impulse * u; cA -= _invMassA * P; aA -= _invIA * MathUtils.cross( rA, P ); cB += _invMassB * P; aB += _invIB * MathUtils.cross( rB, P ); data.positions[_indexA].c = cA; data.positions[_indexA].a = aA; data.positions[_indexB].c = cB; data.positions[_indexB].a = aB; return Math.Abs( C ) < Settings.linearSlop; } } }
Blucky87/Nez
Nez.FarseerPhysics/Farseer/Dynamics/Joints/DistanceJoint.cs
C#
mit
9,625
<?php /* WebProfilerBundle:Profiler:toolbar_js.html.twig */ class __TwigTemplate_5c613b42836f9a825aea4138cba148e6 extends Twig_Template { protected function doGetParent(array $context) { return false; } protected function doDisplay(array $context, array $blocks = array()) { // line 1 echo "<div id=\"sfwdt"; echo twig_escape_filter($this->env, $this->getContext($context, "token"), "html", null, true); echo "\" style=\"display: none\"></div> <script type=\"text/javascript\">/*<![CDATA[*/ (function () { var wdt, xhr; wdt = document.getElementById('sfwdt"; // line 5 echo twig_escape_filter($this->env, $this->getContext($context, "token"), "html", null, true); echo "'); if (window.XMLHttpRequest) { xhr = new XMLHttpRequest(); } else { xhr = new ActiveXObject('Microsoft.XMLHTTP'); } xhr.open('GET', '"; // line 11 echo twig_escape_filter($this->env, $this->env->getExtension('routing')->getPath("_wdt", array("token" => $this->getContext($context, "token"))), "html", null, true); echo "', true); xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest'); xhr.onreadystatechange = function(state) { if (4 === xhr.readyState && 200 === xhr.status && -1 !== xhr.responseText.indexOf('sf-toolbarreset')) { wdt.innerHTML = xhr.responseText; wdt.style.display = 'block'; } }; xhr.send(''); })(); /*]]>*/</script> "; } public function getTemplateName() { return "WebProfilerBundle:Profiler:toolbar_js.html.twig"; } public function isTraitable() { return false; } }
ksrinivasancomo/symfony2
app/cache/dev_old/twig/5c/61/3b42836f9a825aea4138cba148e6.php
PHP
mit
1,789
package utils import ( "io/ioutil" "net/http" "encoding/json" "fmt" "github.com/juju/errors" ) // GetRequestBody reads request and returns bytes func GetRequestBody(r *http.Request) ([]byte, error) { body, err := ioutil.ReadAll(r.Body) if err != nil { return nil, errors.Trace(err) } return body, nil } // Respond sends HTTP response func Respond(w http.ResponseWriter, data interface{}, code int) error { w.WriteHeader(code) var resp []byte var err error resp, err = json.Marshal(data) // No need HAL, if input is not valid JSON if err != nil { return errors.Trace(err) } fmt.Fprintln(w, string(resp)) return nil } // UnmarshalRequest unmarshal HTTP request to given struct func UnmarshalRequest(r *http.Request, v interface{}) error { body, err := GetRequestBody(r) if err != nil { return errors.Trace(err) } if err := json.Unmarshal(body, v); err != nil { return errors.Trace(err) } return nil }
nildev/tools
vendor/github.com/nildev/lib/utils/http.go
GO
mit
943
// +build linux // +build 386 amd64 arm arm64 package ras import ( "database/sql" "fmt" "os" "strconv" "strings" "time" _ "modernc.org/sqlite" //to register SQLite driver "github.com/influxdata/telegraf" "github.com/influxdata/telegraf/plugins/inputs" ) // Ras plugin gathers and counts errors provided by RASDaemon type Ras struct { DBPath string `toml:"db_path"` Log telegraf.Logger `toml:"-"` db *sql.DB `toml:"-"` latestTimestamp time.Time `toml:"-"` cpuSocketCounters map[int]metricCounters `toml:"-"` serverCounters metricCounters `toml:"-"` } type machineCheckError struct { ID int Timestamp string SocketID int ErrorMsg string MciStatusMsg string } type metricCounters map[string]int64 const ( mceQuery = ` SELECT id, timestamp, error_msg, mcistatus_msg, socketid FROM mce_record WHERE timestamp > ? ` defaultDbPath = "/var/lib/rasdaemon/ras-mc_event.db" dateLayout = "2006-01-02 15:04:05 -0700" memoryReadCorrected = "memory_read_corrected_errors" memoryReadUncorrected = "memory_read_uncorrectable_errors" memoryWriteCorrected = "memory_write_corrected_errors" memoryWriteUncorrected = "memory_write_uncorrectable_errors" instructionCache = "cache_l0_l1_errors" instructionTLB = "tlb_instruction_errors" levelTwoCache = "cache_l2_errors" upi = "upi_errors" processorBase = "processor_base_errors" processorBus = "processor_bus_errors" internalTimer = "internal_timer_errors" smmHandlerCode = "smm_handler_code_access_violation_errors" internalParity = "internal_parity_errors" frc = "frc_errors" externalMCEBase = "external_mce_errors" microcodeROMParity = "microcode_rom_parity_errors" unclassifiedMCEBase = "unclassified_mce_errors" ) // SampleConfig returns sample configuration for this plugin. func (r *Ras) SampleConfig() string { return ` ## Optional path to RASDaemon sqlite3 database. ## Default: /var/lib/rasdaemon/ras-mc_event.db # db_path = "" ` } // Description returns the plugin description. func (r *Ras) Description() string { return "RAS plugin exposes counter metrics for Machine Check Errors provided by RASDaemon (sqlite3 output is required)." } // Start initializes connection to DB, metrics are gathered in Gather func (r *Ras) Start(telegraf.Accumulator) error { err := validateDbPath(r.DBPath) if err != nil { return err } r.db, err = connectToDB(r.DBPath) if err != nil { return err } return nil } // Stop closes any existing DB connection func (r *Ras) Stop() { if r.db != nil { err := r.db.Close() if err != nil { r.Log.Errorf("Error appeared during closing DB (%s): %v", r.DBPath, err) } } } // Gather reads the stats provided by RASDaemon and writes it to the Accumulator. func (r *Ras) Gather(acc telegraf.Accumulator) error { rows, err := r.db.Query(mceQuery, r.latestTimestamp) if err != nil { return err } defer rows.Close() for rows.Next() { mcError, err := fetchMachineCheckError(rows) if err != nil { return err } tsErr := r.updateLatestTimestamp(mcError.Timestamp) if tsErr != nil { return err } r.updateCounters(mcError) } addCPUSocketMetrics(acc, r.cpuSocketCounters) addServerMetrics(acc, r.serverCounters) return nil } func (r *Ras) updateLatestTimestamp(timestamp string) error { ts, err := parseDate(timestamp) if err != nil { return err } if ts.After(r.latestTimestamp) { r.latestTimestamp = ts } return nil } func (r *Ras) updateCounters(mcError *machineCheckError) { if strings.Contains(mcError.ErrorMsg, "No Error") { return } r.initializeCPUMetricDataIfRequired(mcError.SocketID) r.updateSocketCounters(mcError) r.updateServerCounters(mcError) } func newMetricCounters() *metricCounters { return &metricCounters{ memoryReadCorrected: 0, memoryReadUncorrected: 0, memoryWriteCorrected: 0, memoryWriteUncorrected: 0, instructionCache: 0, instructionTLB: 0, processorBase: 0, processorBus: 0, internalTimer: 0, smmHandlerCode: 0, internalParity: 0, frc: 0, externalMCEBase: 0, microcodeROMParity: 0, unclassifiedMCEBase: 0, } } func (r *Ras) updateServerCounters(mcError *machineCheckError) { if strings.Contains(mcError.ErrorMsg, "CACHE Level-2") && strings.Contains(mcError.ErrorMsg, "Error") { r.serverCounters[levelTwoCache]++ } if strings.Contains(mcError.ErrorMsg, "UPI:") { r.serverCounters[upi]++ } } func validateDbPath(dbPath string) error { pathInfo, err := os.Stat(dbPath) if os.IsNotExist(err) { return fmt.Errorf("provided db_path does not exist: [%s]", dbPath) } if err != nil { return fmt.Errorf("cannot get system information for db_path file: [%s] - %v", dbPath, err) } if mode := pathInfo.Mode(); !mode.IsRegular() { return fmt.Errorf("provided db_path does not point to a regular file: [%s]", dbPath) } return nil } func connectToDB(dbPath string) (*sql.DB, error) { return sql.Open("sqlite", dbPath) } func (r *Ras) initializeCPUMetricDataIfRequired(socketID int) { if _, ok := r.cpuSocketCounters[socketID]; !ok { r.cpuSocketCounters[socketID] = *newMetricCounters() } } func (r *Ras) updateSocketCounters(mcError *machineCheckError) { r.updateMemoryCounters(mcError) r.updateProcessorBaseCounters(mcError) if strings.Contains(mcError.ErrorMsg, "Instruction TLB") && strings.Contains(mcError.ErrorMsg, "Error") { r.cpuSocketCounters[mcError.SocketID][instructionTLB]++ } if strings.Contains(mcError.ErrorMsg, "BUS") && strings.Contains(mcError.ErrorMsg, "Error") { r.cpuSocketCounters[mcError.SocketID][processorBus]++ } if (strings.Contains(mcError.ErrorMsg, "CACHE Level-0") || strings.Contains(mcError.ErrorMsg, "CACHE Level-1")) && strings.Contains(mcError.ErrorMsg, "Error") { r.cpuSocketCounters[mcError.SocketID][instructionCache]++ } } func (r *Ras) updateProcessorBaseCounters(mcError *machineCheckError) { if strings.Contains(mcError.ErrorMsg, "Internal Timer error") { r.cpuSocketCounters[mcError.SocketID][internalTimer]++ r.cpuSocketCounters[mcError.SocketID][processorBase]++ } if strings.Contains(mcError.ErrorMsg, "SMM Handler Code Access Violation") { r.cpuSocketCounters[mcError.SocketID][smmHandlerCode]++ r.cpuSocketCounters[mcError.SocketID][processorBase]++ } if strings.Contains(mcError.ErrorMsg, "Internal parity error") { r.cpuSocketCounters[mcError.SocketID][internalParity]++ r.cpuSocketCounters[mcError.SocketID][processorBase]++ } if strings.Contains(mcError.ErrorMsg, "FRC error") { r.cpuSocketCounters[mcError.SocketID][frc]++ r.cpuSocketCounters[mcError.SocketID][processorBase]++ } if strings.Contains(mcError.ErrorMsg, "External error") { r.cpuSocketCounters[mcError.SocketID][externalMCEBase]++ r.cpuSocketCounters[mcError.SocketID][processorBase]++ } if strings.Contains(mcError.ErrorMsg, "Microcode ROM parity error") { r.cpuSocketCounters[mcError.SocketID][microcodeROMParity]++ r.cpuSocketCounters[mcError.SocketID][processorBase]++ } if strings.Contains(mcError.ErrorMsg, "Unclassified") || strings.Contains(mcError.ErrorMsg, "Internal unclassified") { r.cpuSocketCounters[mcError.SocketID][unclassifiedMCEBase]++ r.cpuSocketCounters[mcError.SocketID][processorBase]++ } } func (r *Ras) updateMemoryCounters(mcError *machineCheckError) { if strings.Contains(mcError.ErrorMsg, "Memory read error") { if strings.Contains(mcError.MciStatusMsg, "Corrected_error") { r.cpuSocketCounters[mcError.SocketID][memoryReadCorrected]++ } else { r.cpuSocketCounters[mcError.SocketID][memoryReadUncorrected]++ } } if strings.Contains(mcError.ErrorMsg, "Memory write error") { if strings.Contains(mcError.MciStatusMsg, "Corrected_error") { r.cpuSocketCounters[mcError.SocketID][memoryWriteCorrected]++ } else { r.cpuSocketCounters[mcError.SocketID][memoryWriteUncorrected]++ } } } func addCPUSocketMetrics(acc telegraf.Accumulator, cpuSocketCounters map[int]metricCounters) { for socketID, data := range cpuSocketCounters { tags := map[string]string{ "socket_id": strconv.Itoa(socketID), } fields := make(map[string]interface{}) for errorName, count := range data { fields[errorName] = count } acc.AddCounter("ras", fields, tags) } } func addServerMetrics(acc telegraf.Accumulator, counters map[string]int64) { fields := make(map[string]interface{}) for errorName, count := range counters { fields[errorName] = count } acc.AddCounter("ras", fields, map[string]string{}) } func fetchMachineCheckError(rows *sql.Rows) (*machineCheckError, error) { mcError := &machineCheckError{} err := rows.Scan(&mcError.ID, &mcError.Timestamp, &mcError.ErrorMsg, &mcError.MciStatusMsg, &mcError.SocketID) if err != nil { return nil, err } return mcError, nil } func parseDate(date string) (time.Time, error) { return time.Parse(dateLayout, date) } func init() { inputs.Add("ras", func() telegraf.Input { defaultTimestamp, _ := parseDate("1970-01-01 00:00:01 -0700") return &Ras{ DBPath: defaultDbPath, latestTimestamp: defaultTimestamp, cpuSocketCounters: map[int]metricCounters{ 0: *newMetricCounters(), }, serverCounters: map[string]int64{ levelTwoCache: 0, upi: 0, }, } }) }
m4ce/telegraf
plugins/inputs/ras/ras.go
GO
mit
9,486
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; using System.Linq; using Cake.Core; using Cake.Core.IO; namespace Cake.Common.Tools.Chocolatey { /// <summary> /// Contains Chocolatey path resolver functionality. /// </summary> public sealed class ChocolateyToolResolver : IChocolateyToolResolver { private readonly IFileSystem _fileSystem; private readonly ICakeEnvironment _environment; private IFile _cachedPath; /// <summary> /// Initializes a new instance of the <see cref="ChocolateyToolResolver" /> class. /// </summary> /// <param name="fileSystem">The file system.</param> /// <param name="environment">The environment.</param> public ChocolateyToolResolver(IFileSystem fileSystem, ICakeEnvironment environment) { _fileSystem = fileSystem; _environment = environment; if (fileSystem == null) { throw new ArgumentNullException(nameof(fileSystem)); } if (environment == null) { throw new ArgumentNullException(nameof(environment)); } } /// <inheritdoc/> public FilePath ResolvePath() { // Check if path already resolved if (_cachedPath != null && _cachedPath.Exists) { return _cachedPath.Path; } // Check if path set to environment variable var chocolateyInstallationFolder = _environment.GetEnvironmentVariable("ChocolateyInstall"); if (!string.IsNullOrWhiteSpace(chocolateyInstallationFolder)) { var envFile = _fileSystem.GetFile(PathHelper.Combine(chocolateyInstallationFolder, "choco.exe")); if (envFile.Exists) { _cachedPath = envFile; return _cachedPath.Path; } } // Last resort try path var envPath = _environment.GetEnvironmentVariable("path"); if (!string.IsNullOrWhiteSpace(envPath)) { var pathFile = envPath .Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries) .Select(path => _fileSystem.GetDirectory(path)) .Where(path => path.Exists) .Select(path => path.Path.CombineWithFilePath("choco.exe")) .Select(_fileSystem.GetFile) .FirstOrDefault(file => file.Exists); if (pathFile != null) { _cachedPath = pathFile; return _cachedPath.Path; } } throw new CakeException("Could not locate choco.exe."); } } }
patriksvensson/cake
src/Cake.Common/Tools/Chocolatey/ChocolateyToolResolver.cs
C#
mit
3,004
#region Copyright // // DotNetNuke® - http://www.dnnsoftware.com // Copyright (c) 2002-2018 // by DotNetNuke Corporation // // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated // documentation files (the "Software"), to deal in the Software without restriction, including without limitation // the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and // to permit persons to whom the Software is furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in all copies or substantial portions // of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED // TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF // CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. #endregion using System; namespace Dnn.ExportImport.Dto.Users { public class ExportUser : BasicExportImportDto { public int RowId { get; set; } public int UserId { get; set; } public string Username { get; set; } public string FirstName { get; set; } public string LastName { get; set; } public bool IsSuperUser { get; set; } public int? AffiliateId { get; set; } public string Email { get; set; } public string DisplayName { get; set; } public bool UpdatePassword { get; set; } public string LastIpAddress { get; set; } public bool IsDeletedPortal { get; set; } public int CreatedByUserId { get; set; } //How do we insert this value? public string CreatedByUserName { get; set; }//This could be used to find "CreatedByUserId" public DateTime? CreatedOnDate { get; set; } public int LastModifiedByUserId { get; set; } //How do we insert this value? public string LastModifiedByUserName { get; set; }//This could be used to find "LastModifiedByUserId" public DateTime? LastModifiedOnDate { get; set; } public Guid? PasswordResetToken { get; set; } public DateTime? PasswordResetExpiration { get; set; } } }
RichardHowells/Dnn.Platform
DNN Platform/Modules/DnnExportImportLibrary/Dto/Users/ExportUser.cs
C#
mit
2,486
<?php /* * This file is part of PhpSpec, A php toolset to drive emergent * design by specification. * * (c) Marcello Duarte <marcello.duarte@gmail.com> * (c) Konstantin Kudryashov <ever.zet@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PhpSpec\CodeGenerator\Generator; use PhpSpec\CodeGenerator\TemplateRenderer; use ReflectionMethod; class ExistingConstructorTemplate { private $templates; private $class; private $className; private $arguments; private $methodName; public function __construct(TemplateRenderer $templates, string $methodName, array $arguments, string $className, string $class) { $this->templates = $templates; $this->class = $class; $this->className = $className; $this->arguments = $arguments; $this->methodName = $methodName; } public function getContent() : string { if (!$this->numberOfConstructorArgumentsMatchMethod()) { return $this->getExceptionContent(); } return $this->getCreateObjectContent(); } private function numberOfConstructorArgumentsMatchMethod() : bool { $constructorArguments = 0; $constructor = new ReflectionMethod($this->class, '__construct'); $params = $constructor->getParameters(); foreach ($params as $param) { if (!$param->isOptional()) { $constructorArguments++; } } return $constructorArguments == \count($this->arguments); } private function getExceptionContent() : string { $values = $this->getValues(); if (!$content = $this->templates->render('named_constructor_exception', $values)) { $content = $this->templates->renderString( $this->getExceptionTemplate(), $values ); } return $content; } private function getCreateObjectContent() : string { $values = $this->getValues(true); if (!$content = $this->templates->render('named_constructor_create_object', $values)) { $content = $this->templates->renderString( $this->getCreateObjectTemplate(), $values ); } return $content; } /** * @return string[] */ private function getValues(bool $constructorArguments = false) : array { $argString = \count($this->arguments) ? '$argument'.implode(', $argument', range(1, \count($this->arguments))) : '' ; return array( '%methodName%' => $this->methodName, '%arguments%' => $argString, '%returnVar%' => '$'.lcfirst($this->className), '%className%' => $this->className, '%constructorArguments%' => $constructorArguments ? $argString : '' ); } /** * @return string */ private function getCreateObjectTemplate(): string { return file_get_contents(__DIR__.'/templates/named_constructor_create_object.template'); } /** * @return string */ private function getExceptionTemplate(): string { return file_get_contents(__DIR__.'/templates/named_constructor_exception.template'); } }
mheki/phpspec
src/PhpSpec/CodeGenerator/Generator/ExistingConstructorTemplate.php
PHP
mit
3,432
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information namespace DotNetNuke.Services.Connections { public enum ConnectorCategories { Social = 0, FileSystem = 1, Analytics = 2, Marketting = 3, Other = 4, } }
dnnsoftware/Dnn.Platform
DNN Platform/Library/Services/Connections/ConnectorCategories.cs
C#
mit
414
<? header('Location: http://www.diridarek.com'); ?>
seriux55/loweeb00069
src/Base/DiridarekBundle/Resources/public/images/press/index.php
PHP
mit
51
from io import BytesIO import tempfile import os import time import shutil from contextlib import contextmanager import six import sys from netlib import utils, tcp, http def treader(bytes): """ Construct a tcp.Read object from bytes. """ fp = BytesIO(bytes) return tcp.Reader(fp) @contextmanager def tmpdir(*args, **kwargs): orig_workdir = os.getcwd() temp_workdir = tempfile.mkdtemp(*args, **kwargs) os.chdir(temp_workdir) yield temp_workdir os.chdir(orig_workdir) shutil.rmtree(temp_workdir) def _check_exception(expected, actual, exc_tb): if isinstance(expected, six.string_types): if expected.lower() not in str(actual).lower(): six.reraise(AssertionError, AssertionError( "Expected %s, but caught %s" % ( repr(expected), repr(actual) ) ), exc_tb) else: if not isinstance(actual, expected): six.reraise(AssertionError, AssertionError( "Expected %s, but caught %s %s" % ( expected.__name__, actual.__class__.__name__, repr(actual) ) ), exc_tb) def raises(expected_exception, obj=None, *args, **kwargs): """ Assert that a callable raises a specified exception. :exc An exception class or a string. If a class, assert that an exception of this type is raised. If a string, assert that the string occurs in the string representation of the exception, based on a case-insenstivie match. :obj A callable object. :args Arguments to be passsed to the callable. :kwargs Arguments to be passed to the callable. """ if obj is None: return RaisesContext(expected_exception) else: try: ret = obj(*args, **kwargs) except Exception as actual: _check_exception(expected_exception, actual, sys.exc_info()[2]) else: raise AssertionError("No exception raised. Return value: {}".format(ret)) class RaisesContext(object): def __init__(self, expected_exception): self.expected_exception = expected_exception def __enter__(self): return def __exit__(self, exc_type, exc_val, exc_tb): if not exc_type: raise AssertionError("No exception raised.") else: _check_exception(self.expected_exception, exc_val, exc_tb) return True test_data = utils.Data(__name__) # FIXME: Temporary workaround during repo merge. test_data.dirname = os.path.join(test_data.dirname, "..", "test", "netlib") def treq(**kwargs): """ Returns: netlib.http.Request """ default = dict( first_line_format="relative", method=b"GET", scheme=b"http", host=b"address", port=22, path=b"/path", http_version=b"HTTP/1.1", headers=http.Headers(((b"header", b"qvalue"), (b"content-length", b"7"))), content=b"content" ) default.update(kwargs) return http.Request(**default) def tresp(**kwargs): """ Returns: netlib.http.Response """ default = dict( http_version=b"HTTP/1.1", status_code=200, reason=b"OK", headers=http.Headers(((b"header-response", b"svalue"), (b"content-length", b"7"))), content=b"message", timestamp_start=time.time(), timestamp_end=time.time(), ) default.update(kwargs) return http.Response(**default)
tdickers/mitmproxy
netlib/tutils.py
Python
mit
3,536
import { rectangle } from 'leaflet'; import boundsType from './types/bounds'; import Path from './Path'; export default class Rectangle extends Path { static propTypes = { bounds: boundsType.isRequired, }; componentWillMount() { super.componentWillMount(); const { bounds, map, ...props } = this.props; this.leafletElement = rectangle(bounds, props); } componentDidUpdate(prevProps) { if (this.props.bounds !== prevProps.bounds) { this.leafletElement.setBounds(this.props.bounds); } this.setStyleIfChanged(prevProps, this.props); } }
TaiwanStat/react-leaflet
src/Rectangle.js
JavaScript
mit
584
require 'spec_helper' require Rails.root.join('db', 'post_migrate', '20170921101004_normalize_ldap_extern_uids') describe NormalizeLdapExternUids, :migration, :sidekiq do let!(:identities) { table(:identities) } around do |example| Timecop.freeze { example.run } end before do stub_const("Gitlab::Database::MigrationHelpers::BACKGROUND_MIGRATION_BATCH_SIZE", 2) stub_const("Gitlab::Database::MigrationHelpers::BACKGROUND_MIGRATION_JOB_BUFFER_SIZE", 2) # LDAP identities (1..4).each do |i| identities.create!(id: i, provider: 'ldapmain', extern_uid: " uid = foo #{i}, ou = People, dc = example, dc = com ", user_id: i) end # Non-LDAP identity identities.create!(id: 5, provider: 'foo', extern_uid: " uid = foo 5, ou = People, dc = example, dc = com ", user_id: 5) end it 'correctly schedules background migrations' do Sidekiq::Testing.fake! do Timecop.freeze do migrate! expect(BackgroundMigrationWorker.jobs[0]['args']).to eq([described_class::MIGRATION, [1, 2]]) expect(BackgroundMigrationWorker.jobs[0]['at']).to eq(2.minutes.from_now.to_f) expect(BackgroundMigrationWorker.jobs[1]['args']).to eq([described_class::MIGRATION, [3, 4]]) expect(BackgroundMigrationWorker.jobs[1]['at']).to eq(4.minutes.from_now.to_f) expect(BackgroundMigrationWorker.jobs[2]['args']).to eq([described_class::MIGRATION, [5, 5]]) expect(BackgroundMigrationWorker.jobs[2]['at']).to eq(6.minutes.from_now.to_f) expect(BackgroundMigrationWorker.jobs.size).to eq 3 end end end it 'migrates the LDAP identities' do perform_enqueued_jobs do migrate! identities.where(id: 1..4).each do |identity| expect(identity.extern_uid).to eq("uid=foo #{identity.id},ou=people,dc=example,dc=com") end end end it 'does not modify non-LDAP identities' do perform_enqueued_jobs do migrate! identity = identities.last expect(identity.extern_uid).to eq(" uid = foo 5, ou = People, dc = example, dc = com ") end end end
iiet/iiet-git
spec/migrations/normalize_ldap_extern_uids_spec.rb
Ruby
mit
2,088
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Bundle\WebProfilerBundle\Csp; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; /** * Handles Content-Security-Policy HTTP header for the WebProfiler Bundle. * * @author Romain Neutron <imprec@gmail.com> * * @internal */ class ContentSecurityPolicyHandler { private $nonceGenerator; private $cspDisabled = false; public function __construct(NonceGenerator $nonceGenerator) { $this->nonceGenerator = $nonceGenerator; } /** * Returns an array of nonces to be used in Twig templates and Content-Security-Policy headers. * * Nonce can be provided by; * - The request - In case HTML content is fetched via AJAX and inserted in DOM, it must use the same nonce as origin * - The response - A call to getNonces() has already been done previously. Same nonce are returned * - They are otherwise randomly generated */ public function getNonces(Request $request, Response $response): array { if ($request->headers->has('X-SymfonyProfiler-Script-Nonce') && $request->headers->has('X-SymfonyProfiler-Style-Nonce')) { return [ 'csp_script_nonce' => $request->headers->get('X-SymfonyProfiler-Script-Nonce'), 'csp_style_nonce' => $request->headers->get('X-SymfonyProfiler-Style-Nonce'), ]; } if ($response->headers->has('X-SymfonyProfiler-Script-Nonce') && $response->headers->has('X-SymfonyProfiler-Style-Nonce')) { return [ 'csp_script_nonce' => $response->headers->get('X-SymfonyProfiler-Script-Nonce'), 'csp_style_nonce' => $response->headers->get('X-SymfonyProfiler-Style-Nonce'), ]; } $nonces = [ 'csp_script_nonce' => $this->generateNonce(), 'csp_style_nonce' => $this->generateNonce(), ]; $response->headers->set('X-SymfonyProfiler-Script-Nonce', $nonces['csp_script_nonce']); $response->headers->set('X-SymfonyProfiler-Style-Nonce', $nonces['csp_style_nonce']); return $nonces; } /** * Disables Content-Security-Policy. * * All related headers will be removed. */ public function disableCsp() { $this->cspDisabled = true; } /** * Cleanup temporary headers and updates Content-Security-Policy headers. * * @return array Nonces used by the bundle in Content-Security-Policy header */ public function updateResponseHeaders(Request $request, Response $response): array { if ($this->cspDisabled) { $this->removeCspHeaders($response); return []; } $nonces = $this->getNonces($request, $response); $this->cleanHeaders($response); $this->updateCspHeaders($response, $nonces); return $nonces; } private function cleanHeaders(Response $response) { $response->headers->remove('X-SymfonyProfiler-Script-Nonce'); $response->headers->remove('X-SymfonyProfiler-Style-Nonce'); } private function removeCspHeaders(Response $response) { $response->headers->remove('X-Content-Security-Policy'); $response->headers->remove('Content-Security-Policy'); $response->headers->remove('Content-Security-Policy-Report-Only'); } /** * Updates Content-Security-Policy headers in a response. */ private function updateCspHeaders(Response $response, array $nonces = []): array { $nonces = array_replace([ 'csp_script_nonce' => $this->generateNonce(), 'csp_style_nonce' => $this->generateNonce(), ], $nonces); $ruleIsSet = false; $headers = $this->getCspHeaders($response); foreach ($headers as $header => $directives) { foreach (['script-src' => 'csp_script_nonce', 'script-src-elem' => 'csp_script_nonce', 'style-src' => 'csp_style_nonce', 'style-src-elem' => 'csp_style_nonce'] as $type => $tokenName) { if ($this->authorizesInline($directives, $type)) { continue; } if (!isset($headers[$header][$type])) { if (isset($headers[$header]['default-src'])) { $headers[$header][$type] = $headers[$header]['default-src']; } else { // If there is no script-src/style-src and no default-src, no additional rules required. continue; } } $ruleIsSet = true; if (!\in_array('\'unsafe-inline\'', $headers[$header][$type], true)) { $headers[$header][$type][] = '\'unsafe-inline\''; } $headers[$header][$type][] = sprintf('\'nonce-%s\'', $nonces[$tokenName]); } } if (!$ruleIsSet) { return $nonces; } foreach ($headers as $header => $directives) { $response->headers->set($header, $this->generateCspHeader($directives)); } return $nonces; } /** * Generates a valid Content-Security-Policy nonce. */ private function generateNonce(): string { return $this->nonceGenerator->generate(); } /** * Converts a directive set array into Content-Security-Policy header. */ private function generateCspHeader(array $directives): string { return array_reduce(array_keys($directives), function ($res, $name) use ($directives) { return ('' !== $res ? $res.'; ' : '').sprintf('%s %s', $name, implode(' ', $directives[$name])); }, ''); } /** * Converts a Content-Security-Policy header value into a directive set array. */ private function parseDirectives(string $header): array { $directives = []; foreach (explode(';', $header) as $directive) { $parts = explode(' ', trim($directive)); if (\count($parts) < 1) { continue; } $name = array_shift($parts); $directives[$name] = $parts; } return $directives; } /** * Detects if the 'unsafe-inline' is prevented for a directive within the directive set. */ private function authorizesInline(array $directivesSet, string $type): bool { if (isset($directivesSet[$type])) { $directives = $directivesSet[$type]; } elseif (isset($directivesSet['default-src'])) { $directives = $directivesSet['default-src']; } else { return false; } return \in_array('\'unsafe-inline\'', $directives, true) && !$this->hasHashOrNonce($directives); } private function hasHashOrNonce(array $directives): bool { foreach ($directives as $directive) { if ('\'' !== substr($directive, -1)) { continue; } if ('\'nonce-' === substr($directive, 0, 7)) { return true; } if (\in_array(substr($directive, 0, 8), ['\'sha256-', '\'sha384-', '\'sha512-'], true)) { return true; } } return false; } /** * Retrieves the Content-Security-Policy headers (either X-Content-Security-Policy or Content-Security-Policy) from * a response. */ private function getCspHeaders(Response $response): array { $headers = []; if ($response->headers->has('Content-Security-Policy')) { $headers['Content-Security-Policy'] = $this->parseDirectives($response->headers->get('Content-Security-Policy')); } if ($response->headers->has('Content-Security-Policy-Report-Only')) { $headers['Content-Security-Policy-Report-Only'] = $this->parseDirectives($response->headers->get('Content-Security-Policy-Report-Only')); } if ($response->headers->has('X-Content-Security-Policy')) { $headers['X-Content-Security-Policy'] = $this->parseDirectives($response->headers->get('X-Content-Security-Policy')); } return $headers; } }
localheinz/symfony
src/Symfony/Bundle/WebProfilerBundle/Csp/ContentSecurityPolicyHandler.php
PHP
mit
8,478
using System; using Ionic.Zlib; using UnityEngine; namespace VoiceChat { public static class VoiceChatUtils { static void ToShortArray(this float[] input, short[] output) { if (output.Length < input.Length) { throw new System.ArgumentException("in: " + input.Length + ", out: " + output.Length); } for (int i = 0; i < input.Length; ++i) { output[i] = (short)Mathf.Clamp((int)(input[i] * 32767.0f), short.MinValue, short.MaxValue); } } static void ToFloatArray(this short[] input, float[] output, int length) { if (output.Length < length || input.Length < length) { throw new System.ArgumentException(); } for (int i = 0; i < length; ++i) { output[i] = input[i] / (float)short.MaxValue; } } static byte[] ZlibCompress(byte[] input, int length) { using (var ms = new System.IO.MemoryStream()) { using (var compressor = new Ionic.Zlib.ZlibStream(ms, CompressionMode.Compress, CompressionLevel.BestCompression)) { compressor.Write(input, 0, length); } return ms.ToArray(); } } static byte[] ZlibDecompress(byte[] input, int length) { using (var ms = new System.IO.MemoryStream()) { using (var compressor = new Ionic.Zlib.ZlibStream(ms, CompressionMode.Decompress, CompressionLevel.BestCompression)) { compressor.Write(input, 0, length); } return ms.ToArray(); } } static byte[] ALawCompress(float[] input) { byte[] output = VoiceChatBytePool.Instance.Get(); for (int i = 0; i < input.Length; ++i) { int scaled = (int)(input[i] * 32767.0f); short clamped = (short)Mathf.Clamp(scaled, short.MinValue, short.MaxValue); output[i] = NAudio.Codecs.ALawEncoder.LinearToALawSample(clamped); } return output; } static float[] ALawDecompress(byte[] input, int length) { float[] output = VoiceChatFloatPool.Instance.Get(); for (int i = 0; i < length; ++i) { short alaw = NAudio.Codecs.ALawDecoder.ALawToLinearSample(input[i]); output[i] = alaw / (float)short.MaxValue; } return output; } static NSpeex.SpeexEncoder speexEnc = new NSpeex.SpeexEncoder(NSpeex.BandMode.Narrow); static byte[] SpeexCompress(float[] input, out int length) { short[] shortBuffer = VoiceChatShortPool.Instance.Get(); byte[] encoded = VoiceChatBytePool.Instance.Get(); input.ToShortArray(shortBuffer); length = speexEnc.Encode(shortBuffer, 0, input.Length, encoded, 0, encoded.Length); VoiceChatShortPool.Instance.Return(shortBuffer); return encoded; } static float[] SpeexDecompress(NSpeex.SpeexDecoder speexDec, byte[] data, int dataLength) { float[] decoded = VoiceChatFloatPool.Instance.Get(); short[] shortBuffer = VoiceChatShortPool.Instance.Get(); speexDec.Decode(data, 0, dataLength, shortBuffer, 0, false); shortBuffer.ToFloatArray(decoded, shortBuffer.Length); VoiceChatShortPool.Instance.Return(shortBuffer); return decoded; } public static VoiceChatPacket Compress(float[] sample) { VoiceChatPacket packet = new VoiceChatPacket(); packet.Compression = VoiceChatSettings.Instance.Compression; switch (packet.Compression) { /* case VoiceChatCompression.Raw: { short[] buffer = VoiceChatShortPool.Instance.Get(); packet.Length = sample.Length * 2; sample.ToShortArray(shortBuffer); Buffer.BlockCopy(shortBuffer, 0, byteBuffer, 0, packet.Length); } break; case VoiceChatCompression.RawZlib: { packet.Length = sample.Length * 2; sample.ToShortArray(shortBuffer); Buffer.BlockCopy(shortBuffer, 0, byteBuffer, 0, packet.Length); packet.Data = ZlibCompress(byteBuffer, packet.Length); packet.Length = packet.Data.Length; } break; */ case VoiceChatCompression.Alaw: { packet.Length = sample.Length; packet.Data = ALawCompress(sample); } break; case VoiceChatCompression.AlawZlib: { byte[] alaw = ALawCompress(sample); packet.Data = ZlibCompress(alaw, sample.Length); packet.Length = packet.Data.Length; VoiceChatBytePool.Instance.Return(alaw); } break; case VoiceChatCompression.Speex: { packet.Data = SpeexCompress(sample, out packet.Length); } break; } return packet; } public static int Decompress(VoiceChatPacket packet, out float[] data) { return Decompress(null, packet, out data); } public static int Decompress(NSpeex.SpeexDecoder speexDecoder, VoiceChatPacket packet, out float[] data) { switch (packet.Compression) { /* case VoiceChatCompression.Raw: { short[9 buffer Buffer.BlockCopy(packet.Data, 0, shortBuffer, 0, packet.Length); shortBuffer.ToFloatArray(data, packet.Length / 2); return packet.Length / 2; } case VoiceChatCompression.RawZlib: { byte[] unzipedData = ZlibDecompress(packet.Data, packet.Length); Buffer.BlockCopy(unzipedData, 0, shortBuffer, 0, unzipedData.Length); shortBuffer.ToFloatArray(data, unzipedData.Length / 2); return unzipedData.Length / 2; } */ case VoiceChatCompression.Speex: { data = SpeexDecompress(speexDecoder, packet.Data, packet.Length); return data.Length; } case VoiceChatCompression.Alaw: { data = ALawDecompress(packet.Data, packet.Length); return packet.Length; } case VoiceChatCompression.AlawZlib: { byte[] alaw = ZlibDecompress(packet.Data, packet.Length); data = ALawDecompress(alaw, alaw.Length); return alaw.Length; } } data = new float[0]; return 0; } public static int ClosestPowerOfTwo(int value) { int i = 1; while (i < value) { i <<= 1; } return i; } } }
jonathanrlouie/unity-vr-livestream
TutorClient/Assets/VoiceChat/Scripts/VoiceChatUtils.cs
C#
mit
7,916
/* YUI 3.8.0pr2 (build 154) Copyright 2012 Yahoo! Inc. All rights reserved. Licensed under the BSD License. http://yuilibrary.com/license/ */ YUI.add("dd-drop-plugin",function(e,t){var n=function(e){e.node=e.host,n.superclass.constructor.apply(this,arguments)};n.NAME="dd-drop-plugin",n.NS="drop",e.extend(n,e.DD.Drop),e.namespace("Plugin"),e.Plugin.Drop=n},"3.8.0pr2",{requires:["dd-drop"]});
SHMEDIALIMITED/tallest-tower
node_modules/grunt-contrib/node_modules/grunt-contrib-yuidoc/node_modules/yuidocjs/node_modules/yui/dd-drop-plugin/dd-drop-plugin-min.js
JavaScript
mit
394
/* This file was generated by SableCC (http://www.sablecc.org/). */ package com.bju.cps450.node; import com.bju.cps450.analysis.*; @SuppressWarnings("nls") public final class TPlus extends Token { public TPlus() { super.setText("+"); } public TPlus(int line, int pos) { super.setText("+"); setLine(line); setPos(pos); } @Override public Object clone() { return new TPlus(getLine(), getPos()); } @Override public void apply(Switch sw) { ((Analysis) sw).caseTPlus(this); } @Override public void setText(@SuppressWarnings("unused") String text) { throw new RuntimeException("Cannot change TPlus text."); } }
asdfzt/CPS450-MiniJava
MiniJavaParserWithAST/gen-src/com/bju/cps450/node/TPlus.java
Java
mit
738
# https://github.com/plataformatec/devise#test-helpers RSpec.configure do |config| config.include Devise::TestHelpers, :type => :controller end
cngondo/bestmix
server/spec/support/devise.rb
Ruby
mit
146
class ChangeOrderAttributes < ActiveRecord::Migration def up change_column_default :orders, :front_end_change, nil rename_column :orders, :front_end_change, :change remove_column :orders, :refunded remove_column :orders, :total_is_locked remove_column :orders, :tax_is_locked remove_column :orders, :subtotal_is_locked remove_column :orders, :cash_register_daily_id remove_column :orders, :by_card remove_column :orders, :refunded_at remove_column :orders, :refunded_by remove_column :orders, :refunded_by_type remove_column :orders, :discount_amount remove_column :orders, :tax_free change_column_default :orders, :qnr, nil end def down end end
a0ali0taha/pos
vendor/db/migrate/20130701104221_change_order_attributes.rb
Ruby
mit
711
# extension imports from _NetworKit import PageRankNibble, GCE
fmaschler/networkit
networkit/scd.py
Python
mit
62
//= require d3/d3 //= require jquery.qtip.min //= require simple_statistics gfw.ui.model.CountriesEmbedOverview = cdb.core.Model.extend({ defaults: { graph: 'total_loss', years: true, class: null } }); gfw.ui.view.CountriesEmbedOverview = cdb.core.View.extend({ el: document.body, events: { 'click .graph_tab': '_updateGraph' }, initialize: function() { this.model = new gfw.ui.model.CountriesEmbedOverview(); this.$graph = $('.overview_graph__area'); this.$years = $('.overview_graph__years'); var m = this.m = 40, w = this.w = this.$graph.width()+(m*2), h = this.h = this.$graph.height(), vertical_m = this.vertical_m = 20; this.x_scale = d3.scale.linear() .range([m, w-m]) .domain([2001, 2012]); this.grid_scale = d3.scale.linear() .range([vertical_m, h-vertical_m]) .domain([0, 1]); this.model.bind('change:graph', this._redrawGraph, this); this.model.bind('change:years', this._toggleYears, this); this.model.bind('change:class', this._toggleClass, this); this._initViews(); }, _initViews: function() { this.tooltip = d3.select('body') .append('div') .attr('class', 'tooltip'); this._drawYears(); this._drawGraph(); }, _toggleYears: function() { var that = this; if(this.model.get('years') === false) { this.$years.slideUp(250, function() { $('.overview_graph__axis').slideDown(); }); } else { $('.overview_graph__axis').slideUp(250, function() { that.$years.slideDown(); }); } }, _showYears: function() { if (!this.model.get('years')) { this.model.set('years', true); } }, _hideYears: function() { if (this.model.get('years')) { this.model.set('years', false); } }, _updateGraph: function(e) { e.preventDefault(); var $target = $(e.target).closest('.graph_tab'), graph = $target.attr('data-slug'); if (graph === this.model.get('graph')) { return; } else { $('.graph_tab').removeClass('selected'); $target.addClass('selected'); this.model.set('graph', graph); } }, _redrawGraph: function() { var graph = this.model.get('graph'); $('.overview_graph__title').html(config.GRAPHS[graph].title); $('.overview_graph__legend p').html(config.GRAPHS[graph].subtitle); $('.overview_graph__legend .info').attr('data-source', graph); this.$graph.find('.'+graph); this.$graph.find('.chart').hide(); this.$graph.find('.'+graph).fadeIn(); this._drawGraph(); }, _drawYears: function() { var markup_years = ''; for (var y = 2001; y<=2012; y += 1) { var y_ = this.x_scale(y); if (y === 2001) { y_ -= 25; } else if (y === 2012) { y_ -= 55; } else { y_ -= 40; } markup_years += '<span class="year" style="left:'+y_+'px">'+y+'</span>'; } this.$years.html(markup_years); }, _drawGraph: function() { var that = this; var w = this.w, h = this.h, vertical_m = this.vertical_m, m = this.m, x_scale = this.x_scale; var grid_scale = d3.scale.linear() .range([vertical_m, h-vertical_m]) .domain([1, 0]); d3.select('#chart').remove(); var svg = d3.select('.overview_graph__area') .append('svg:svg') .attr('id', 'chart') .attr('width', w) .attr('height', h); // grid svg.selectAll('line.grid_h') .data(grid_scale.ticks(4)) .enter() .append('line') .attr({ 'class': 'grid grid_h', 'x1': 0, 'x2': w, 'y1': function(d, i) { return grid_scale(d); }, 'y2': function(d, i) { return grid_scale(d); } }); svg.selectAll('line.grid_v') .data(x_scale.ticks(12)) .enter() .append('line') .attr({ 'class': 'grid grid_v', 'y1': h, 'y2': 0, 'x1': function(d) { return x_scale(d); }, 'x2': function(d) { return x_scale(d); } }); var gradient = svg.append('svg:defs') .append('svg:linearGradient') .attr('id', 'gradient') .attr('x1', '0%') .attr('y1', '0%') .attr('x2', '0%') .attr('y2', '100%') .attr('spreadMethod', 'pad'); gradient.append('svg:stop') .attr('offset', '0%') .attr('stop-color', '#CA46FF') .attr('stop-opacity', .5); gradient.append('svg:stop') .attr('offset', '100%') .attr('stop-color', '#D24DFF') .attr('stop-opacity', 1); if (this.model.get('graph') === 'total_loss') { this._showYears(); svg.append('text') .attr('class', 'axis') .attr('id', 'axis_y') .text('Mha') .attr('x', -h/2) .attr('y', 30) .attr('transform', 'rotate(-90)'); var sql = 'SELECT '; for(var y = 2001; y < 2012; y++) { sql += 'SUM(y'+y+') as y'+y+', ' } sql += 'SUM(y2012) as y2012, (SELECT SUM(y2001_y2012)\ FROM countries_gain) as gain\ FROM loss_gt_0'; d3.json('https://wri-01.cartodb.com/api/v2/sql?q='+sql, function(error, json) { var data = json.rows[0]; var data_ = [], gain = null; _.each(data, function(val, key) { if (key === 'gain') { gain = val/12; } else { data_.push({ 'year': key.replace('y',''), 'value': val }); } }); var y_scale = d3.scale.linear() .range([vertical_m, h-vertical_m]) .domain([d3.max(data_, function(d) { return d.value; }), 0]); // area var area = d3.svg.area() .x(function(d) { return x_scale(d.year); }) .y0(h) .y1(function(d) { return y_scale(d.value); }); svg.append('path') .datum(data_) .attr('class', 'area') .attr('d', area) .style('fill', 'url(#gradient)'); // circles svg.selectAll('circle') .data(data_) .enter() .append('svg:circle') .attr('class', 'linedot') .attr('cx', function(d) { return x_scale(d.year); }) .attr('cy', function(d){ return y_scale(d.value); }) .attr('r', 6) .attr('name', function(d) { return '<span>'+d.year+'</span>'+formatNumber(parseFloat(d.value/1000000).toFixed(1))+' Mha'; }) .on('mouseover', function(d) { that.tooltip.html($(this).attr('name')) .style('visibility', 'visible') .style('top', $(this).offset().top-100+'px') .style('left', $(this).offset().left-$('.tooltip').width()/2-4+'px') .attr('class', 'tooltip'); d3.select(this) .transition() .duration(100) .attr('r', 7); // TODO: highlighting the legend }) .on('mouseout', function(d) { that.tooltip.style('visibility', 'hidden'); d3.select(this) .transition() .duration(100) .attr('r', 6); // TODO: highlighting the legend }); var data_gain_ = [ { year: 2001, value: gain }, { year: 2012, value: gain } ]; // line svg.selectAll('line.overview_line') .data(data_gain_) .enter() .append('line') .attr({ 'class': 'overview_line', 'x1': m, 'x2': w-m, 'y1': function(d) { return y_scale(gain); }, 'y2': function(d) { return y_scale(gain); } }); svg.selectAll('circle.gain') .data(data_gain_) .enter() .append('svg:circle') .attr('class', 'linedot gain') .attr('cx', function(d) { return x_scale(d.year); }) .attr('cy', function(d){ return y_scale(d.value); }) .attr('r', 6) .attr('name', function(d) { return '<span>2001-2012</span>'+formatNumber(parseFloat(d.value/1000000).toFixed(1))+' Mha'; }) .on('mouseover', function(d) { that.tooltip.html($(this).attr('name')) .style('visibility', 'visible') .style('top', $(this).offset().top-100+'px') .style('left', $(this).offset().left-$('.tooltip').width()/2-4+'px') .attr('class', 'tooltip gain_tooltip'); d3.select(this) .transition() .duration(100) .attr('r', 7); // TODO: highlighting the legend }) .on('mouseout', function(d) { that.tooltip.style('visibility', 'hidden'); d3.select(this) .transition() .duration(100) .attr('r', 6); // TODO: highlighting the legend }); }); } else if (this.model.get('graph') === 'percent_loss') { this._showYears(); svg.append('text') .attr('class', 'axis') .attr('id', 'axis_y') .text('%') .attr('x', -h/2) .attr('y', 30) .attr('transform', 'rotate(-90)'); var sql = 'WITH loss as (SELECT '; for(var y = 2001; y < 2012; y++) { sql += 'SUM(y'+y+') as sum_loss_y'+y+', '; } sql += 'SUM(y2012) as sum_loss_y2012\ FROM loss_gt_25), extent as (SELECT '; for(var y = 2001; y < 2012; y++) { sql += 'SUM(y'+y+') as sum_extent_y'+y+', '; } sql += 'SUM(y2012) as sum_extent_y2012\ FROM extent_gt_25)\ SELECT '; for(var y = 2001; y < 2012; y++) { sql += 'sum_loss_y'+y+'/sum_extent_y'+y+' as percent_loss_'+y+', '; } sql += 'sum_loss_y2012/sum_extent_y2012 as percent_loss_2012, (SELECT SUM(y2001_y2012)/('; for(var y = 2001; y < 2012; y++) { sql += 'sum_extent_y'+y+' + '; } sql += 'sum_extent_y2012)\ FROM countries_gain) as gain\ FROM loss, extent'; d3.json('https://wri-01.cartodb.com/api/v2/sql?q='+encodeURIComponent(sql), function(json) { var data = json.rows[0]; var data_ = [], gain = null; _.each(data, function(val, key) { if (key === 'gain') { gain = val/12; } else { data_.push({ 'year': key.replace('percent_loss_',''), 'value': val }); } }); var y_scale = grid_scale; // area var area = d3.svg.area() .x(function(d) { return x_scale(d.year); }) .y0(h) .y1(function(d) { return y_scale(d.value*100); }); svg.append('path') .datum(data_) .attr('class', 'area') .attr('d', area) .style('fill', 'url(#gradient)'); // circles svg.selectAll('circle') .data(data_) .enter() .append('svg:circle') .attr('class', 'linedot') .attr('cx', function(d) { return x_scale(d.year); }) .attr('cy', function(d){ return y_scale(d.value*100); }) .attr('r', 6) .attr('name', function(d) { return '<span>'+d.year+'</span>'+parseFloat(d.value*100).toFixed(2)+' %'; }) .on('mouseover', function(d) { that.tooltip.html($(this).attr('name')) .style('visibility', 'visible') .style('top', $(this).offset().top-100+'px') .style('left', $(this).offset().left-$('.tooltip').width()/2-4+'px') .attr('class', 'tooltip'); d3.select(this) .transition() .duration(100) .attr('r', 7); // TODO: highlighting the legend }) .on('mouseout', function(d) { that.tooltip.style('visibility', 'hidden'); d3.select(this) .transition() .duration(100) .attr('r', 6); // TODO: highlighting the legend }); var data_gain_ = [ { year: 2001, value: gain }, { year: 2012, value: gain } ]; // line svg.selectAll('line.overview_line') .data(data_gain_) .enter() .append('line') .attr({ 'class': 'overview_line', 'x1': m, 'x2': w-m, 'y1': function(d) { return y_scale(gain*100); }, 'y2': function(d) { return y_scale(gain*100); } }); // circles svg.selectAll('circle.gain') .data(data_gain_) .enter() .append('svg:circle') .attr('class', 'linedot gain') .attr('cx', function(d) { return x_scale(d.year); }) .attr('cy', function(d){ return y_scale(d.value*100); }) .attr('r', 6) .attr('name', function(d) { return '<span>2001-2012</span>'+parseFloat(d.value*100).toFixed(2)+' %'; }) .on('mouseover', function(d) { that.tooltip.html($(this).attr('name')) .style('visibility', 'visible') .style('top', $(this).offset().top-100+'px') .style('left', $(this).offset().left-$('.tooltip').width()/2-4+'px') .attr('class', 'tooltip gain_tooltip'); d3.select(this) .transition() .duration(100) .attr('r', 7); // TODO: highlighting the legend }) .on('mouseout', function(d) { that.tooltip.style('visibility', 'hidden'); d3.select(this) .transition() .duration(100) .attr('r', 6); // TODO: highlighting the legend }); }); } else if (this.model.get('graph') === 'total_extent') { this._showYears(); svg.append('text') .attr('class', 'axis') .attr('id', 'axis_y') .text('Mha') .attr('x', -h/2) .attr('y', 30) .attr('transform', 'rotate(-90)'); var gradient_extent = svg.append('svg:defs') .append('svg:linearGradient') .attr('id', 'gradient_extent') .attr('x1', '0%') .attr('y1', '0%') .attr('x2', '0%') .attr('y2', '100%') .attr('spreadMethod', 'pad'); gradient_extent.append('svg:stop') .attr('offset', '0%') .attr('stop-color', '#98BD17') .attr('stop-opacity', .5); gradient_extent.append('svg:stop') .attr('offset', '100%') .attr('stop-color', '#98BD17') .attr('stop-opacity', 1); var sql = 'SELECT '; for(var y = 2001; y < 2012; y++) { sql += 'SUM(loss.y'+y+') as loss_y'+y+', '; } sql += 'SUM(loss.y2012) as loss_y2012, '; for(var y = 2001; y < 2012; y++) { sql += 'SUM(extent.y'+y+') as extent_y'+y+', '; } sql += 'SUM(extent.y2012) as extent_y2012\ FROM loss_gt_25 loss, extent_gt_25 extent\ WHERE loss.iso = extent.iso'; d3.json('https://wri-01.cartodb.com/api/v2/sql?q='+encodeURIComponent(sql), function(json) { var data = json.rows[0]; var data_ = [], data_loss_ = [], data_extent_ = []; _.each(data, function(val, key) { var year = key.split('_y')[1]; var obj = _.find(data_, function(obj) { return obj.year == year; }); if(obj === undefined) { data_.push({ 'year': year }); } if (key.indexOf('loss_y') != -1) { data_loss_.push({ 'year': key.split('_y')[1], 'value': val }); } if (key.indexOf('extent_y') != -1) { data_extent_.push({ 'year': key.split('extent_y')[1], 'value': val }); } }); _.each(data_, function(val) { var loss = _.find(data_loss_, function(obj) { return obj.year == val.year; }), extent = _.find(data_extent_, function(obj) { return obj.year == val.year; }); _.extend(val, { 'loss': loss.value, 'extent': extent.value }); }); var domain = [d3.max(data_, function(d) { return d.extent; }), 0]; var y_scale = d3.scale.linear() .range([vertical_m, h-vertical_m]) .domain(domain); // area var area_loss = d3.svg.area() .x(function(d) { return x_scale(d.year); }) .y0(h) .y1(function(d) { return y_scale(d.loss); }); var area_extent = d3.svg.area() .x(function(d) { return x_scale(d.year); }) .y0(function(d) { return y_scale(d.extent); }) .y1(function(d) { return y_scale(d.loss); }); svg.append('path') .datum(data_) .attr('class', 'area') .attr('d', area_loss) .style('fill', 'url(#gradient)'); svg.append('path') .datum(data_) .attr('class', 'area') .attr('d', area_extent) .style('fill', 'url(#gradient_extent)'); // circles svg.selectAll('circle') .data(data_loss_) .enter() .append('svg:circle') .attr('class', 'linedot') .attr('cx', function(d) { return x_scale(d.year); }) .attr('cy', function(d){ return y_scale(d.value); }) .attr('r', 6) .attr('name', function(d) { return '<span>'+d.year+'</span>'+formatNumber(parseFloat(d.value/1000000).toFixed(1))+' Mha'; }) .on('mouseover', function(d) { that.tooltip.html($(this).attr('name')) .style('visibility', 'visible') .style('top', $(this).offset().top-100+'px') .style('left', $(this).offset().left-$('.tooltip').width()/2-4+'px') .attr('class', 'tooltip'); d3.select(this) .transition() .duration(100) .attr('r', 7); // TODO: highlighting the legend }) .on('mouseout', function(d) { that.tooltip.style('visibility', 'hidden'); d3.select(this) .transition() .duration(100) .attr('r', 6); // TODO: highlighting the legend }); svg.selectAll('circle.gain') .data(data_extent_) .enter() .append('svg:circle') .attr('class', 'linedot gain') .attr('cx', function(d) { return x_scale(d.year); }) .attr('cy', function(d){ return y_scale(d.value); }) .attr('r', 6) .attr('name', function(d) { return '<span>'+d.year+'</span>'+formatNumber(parseFloat(d.value/1000000).toFixed(1))+' Mha'; }) .on('mouseover', function(d) { that.tooltip.html($(this).attr('name')) .style('visibility', 'visible') .style('top', $(this).offset().top-100+'px') .style('left', $(this).offset().left-$('.tooltip').width()/2-4+'px') .attr('class', 'tooltip gain_tooltip'); d3.select(this) .transition() .duration(100) .attr('r', 7); // TODO: highlighting the legend }) .on('mouseout', function(d) { that.tooltip.style('visibility', 'hidden'); d3.select(this) .transition() .duration(100) .attr('r', 6); // TODO: highlighting the legend }); }); } else if (this.model.get('graph') === 'ratio') { this._hideYears(); svg.append('text') .attr('class', 'axis light') .attr('id', 'axis_y') .text('Cover gain 2001-2012') .attr('x', -(h/2)) .attr('y', 30) .attr('transform', 'rotate(-90)'); var shadow = svg.append('svg:defs') .append('svg:filter') .attr('id', 'shadow') .attr('x', '0%') .attr('y', '0%') .attr('width', '200%') .attr('height', '200%') shadow.append('svg:feOffset') .attr('result', 'offOut') .attr('in', 'SourceAlpha') .attr('dx', 0) .attr('dy', 0); shadow.append('svg:feGaussianBlur') .attr('result', 'blurOut') .attr('in', 'offOut') .attr('stdDeviation', 1); shadow.append('svg:feBlend') .attr('in', 'SourceGraphic') .attr('in2', 'blurOut') .attr('mode', 'normal'); var sql = 'WITH loss as (SELECT iso, SUM('; for(var y = 2001; y < 2012; y++) { sql += 'loss.y'+y+' + '; } sql += 'loss.y2012) as sum_loss\ FROM loss_gt_50 loss\ GROUP BY iso), gain as (SELECT g.iso, SUM(y2001_y2012) as sum_gain\ FROM countries_gain g, loss_gt_50 loss\ WHERE loss.iso = g.iso\ GROUP BY g.iso), ratio as ('; sql += 'SELECT c.iso, c.name, c.enabled, loss.sum_loss as loss, gain.sum_gain as gain, loss.sum_loss/gain.sum_gain as ratio\ FROM loss, gain, gfw2_countries c\ WHERE sum_gain IS NOT null\ AND NOT sum_gain = 0\ AND c.iso = gain.iso\ AND c.iso = loss.iso\ ORDER BY loss.sum_loss DESC\ LIMIT 50) '; sql += 'SELECT *\ FROM ratio\ WHERE ratio IS NOT null\ ORDER BY ratio DESC'; d3.json('https://wri-01.cartodb.com/api/v2/sql?q='+encodeURIComponent(sql), function(json) { var data = json.rows; var log_m = 50; var y_scale = d3.scale.linear() .range([h, 0]) .domain([0, d3.max(data, function(d) { return d.gain; })]); var x_scale = d3.scale.linear() .range([m, w-m]) .domain([d3.min(data, function(d) { return d.loss; }), d3.max(data, function(d) { return d.loss; })]); var x_log_scale = d3.scale.log() .range([m, w-m]) .domain([d3.min(data, function(d) { return d.loss; }), d3.max(data, function(d) { return d.loss; })]); var y_log_scale = d3.scale.log() .range([h-log_m, m]) .domain([d3.min(data, function(d) { return d.gain; }), d3.max(data, function(d) { return d.gain; })]); var r_scale = d3.scale.linear() .range(['yellow', 'red']) .domain([0, d3.max(data, function(d) { return d.ratio; })]); that.linearRegressionLine(svg, json, x_scale, y_scale); // circles w/ magic numbers :( var circle_attr = { 'cx': function(d) { return d.loss >= 1 ? x_log_scale(d.loss) : m; }, 'cy': function(d) { return d.gain >= 1 ? y_log_scale(d.gain) : h-log_m; }, 'r': '5', 'name': function(d) { return d.name; }, 'class': function(d) { return d.enabled ? 'ball ball_link' : 'ball ball_nolink'; } }; var data_ = [], data_link_ = [], exclude = ['Saint Barthélemy', 'Saint Kitts and Nevis', 'Saint Pierre and Miquelon', 'Virgin Islands', 'Oman', 'Gibraltar', 'Saudi Arabia', 'French Polynesia', 'Samoa', 'Western Sahara', 'United Arab Emirates']; _.each(data, function(row) { if (!_.contains(exclude, row.name)) { if (row.enabled === true) { data_link_.push(row); } else { data_.push(row); } } }); var circles_link = svg.selectAll('circle.ball_link') .data(data_link_) .enter() .append('a') .attr('xlink:href', function(d) { return '/country/' + d.iso }) .attr('target', '_blank') .append('svg:circle') .attr(circle_attr) .style('fill', function(d) { return r_scale(d.ratio); }) .style('filter', 'url(#shadow)') .on('mouseover', function() { d3.select(d3.event.target) .transition() .attr('r', '7') .style('opacity', 1); var t = $(this).offset().top - 80, l = $(this).offset().left, r = $(this).attr('r'), tip = $('.tooltip').width()/2; that.tooltip.html($(this).attr('name')) .style('visibility', 'visible') .style('top', parseInt(t, 10)+'px') .style('left', parseInt(l, 10)+parseInt(r, 10)-parseInt(tip, 10)-10+'px') .attr('class', 'tooltip gain_tooltip'); }) .on('mouseenter', function() { d3.select(d3.event.target) .transition() .attr('r', '7') .style('opacity', 1); var t = $(this).offset().top - 80, l = $(this).offset().left, r = $(this).attr('r'), tip = $('.tooltip').width()/2; that.tooltip.html($(this).attr('name')) .style('visibility', 'visible') .style('top', parseInt(t, 10)+'px') .style('left', parseInt(l, 10)+parseInt(r, 10)-parseInt(tip, 10)+'px') .attr('class', 'tooltip gain_tooltip'); }) .on('mouseout', function() { d3.select(d3.event.target) .transition() .attr('r', '5') .style('opacity', .8); that.tooltip.style('visibility', 'hidden'); }); var circles = svg.selectAll('circle.ball_nolink') .data(data_) .enter() .append('svg:circle') .attr(circle_attr) .style('filter', 'url(#shadow)') .on('mouseover', function() { d3.select(d3.event.target) .transition() .attr('r', '7') .style('opacity', 1); var t = $(this).offset().top - 80, l = $(this).offset().left, r = $(this).attr('r'), tip = $('.tooltip').width()/2; that.tooltip.html($(this).attr('name')) .style('visibility', 'visible') .style('top', parseInt(t, 10)+'px') .style('left', parseInt(l, 10)+parseInt(r, 10)-parseInt(tip, 10)-10+'px') .attr('class', 'tooltip gain_tooltip'); }) .on('mouseenter', function() { d3.select(d3.event.target) .transition() .attr('r', '7') .style('opacity', 1); var t = $(this).offset().top - 80, l = $(this).offset().left, r = $(this).attr('r'), tip = $('.tooltip').width()/2; that.tooltip.html($(this).attr('name')) .style('visibility', 'visible') .style('top', parseInt(t, 10)+'px') .style('left', parseInt(l, 10)+parseInt(r, 10)-parseInt(tip, 10)+'px') .attr('class', 'tooltip gain_tooltip'); }) .on('mouseout', function() { d3.select(d3.event.target) .transition() .attr('r', '5') .style('opacity', .8); that.tooltip.style('visibility', 'hidden'); }); }); } else if (this.model.get('graph') === 'domains') { this._showYears(); var sql = 'SELECT name, '; for(var y = 2001; y < 2012; y++) { sql += 'y'+y+', ' } sql += 'y2012, GREATEST(' for(var y = 2001; y < 2012; y++) { sql += 'y'+y+', ' } sql += 'y2012) as max\ FROM countries_domains'; d3.json('https://wri-01.cartodb.com/api/v2/sql?q='+sql, function(error, json) { var data = json.rows; var r_scale = d3.scale.linear() .range([5, 30]) // max ball radius .domain([0, d3.max(data, function(d) { return d.max; })]) for(var j = 0; j < data.length; j++) { var data_ = [], domain = ''; _.each(data[j], function(val, key) { if (key !== 'max') { if (key === 'name') { domain = val.toLowerCase(); } else { data_.push({ 'year': key.replace('y',''), 'value': val }); } } }); svg.append('text') .attr('class', 'label') .attr('id', 'label_'+domain) .text(domain) .attr('x', function() { var l = x_scale(2002) - $(this).width()/2; return l; }) .attr('y', (h/5)*(j+.6)); var circle_attr = { 'cx': function(d, i) { return x_scale(2001 + i); }, 'cy': function(d) { return (h/5)*(j+1); }, 'r': function(d) { return r_scale(d.value); }, 'class': function(d) { return 'ball'; } }; svg.selectAll('circle.domain_'+domain) .data(data_) .enter() .append('svg:circle') .attr(circle_attr) .attr('data-slug', domain) .attr('name', function(d) { return '<span>'+d.year+'</span>'+formatNumber(parseFloat(d.value/1000000).toFixed(1))+' Mha'; }) .style('fill', function(d) { return config.GRAPHCOLORS[domain]; }) .on('mouseover', function() { d3.select(d3.event.target) .transition() .attr('r', function(d) { return circle_attr.r(d) + 2; }) .style('opacity', 1); var t = $(this).offset().top - 100, l = $(this).offset().left, r = $(this).attr('r'), tip = $('.tooltip').width()/2, slug = $(this).attr('data-slug'); that.tooltip.html($(this).attr('name')) .style('visibility', 'visible') .style('top', parseInt(t, 10)+'px') .style('left', parseInt(l, 10)+parseInt(r, 10)-parseInt(tip, 10)-10+'px') .attr('class', 'tooltip') .attr('data-slug', 'tooltip') .style('color', function() { if (slug === 'subtropical') { return '#FFC926' } else { return config.GRAPHCOLORS[slug]; } }); }) .on('mouseenter', function() { d3.select(d3.event.target) .transition() .attr('r', function(d) { return circle_attr.r(d) + 2; }) .style('opacity', 1); var t = $(this).offset().top - 80, l = $(this).offset().left, r = $(this).attr('r'), tip = $('.tooltip').width()/2, slug = $(this).attr('data-slug'); that.tooltip.html($(this).attr('name')) .style('visibility', 'visible') .style('top', parseInt(t, 10)+'px') .style('left', parseInt(l, 10)+parseInt(r, 10)-parseInt(tip, 10)-10+'px') .attr('class', 'tooltip') .attr('data-slug', 'tooltip') .style('color', function() { if (domain === 'subtropical') { return config.GRAPHCOLORS[domain]; } }); }) .on('mouseout', function() { d3.select(d3.event.target) .transition() .attr('r', function(d) { return circle_attr.r(d); }) .style('opacity', .8); that.tooltip .style('color', '') .style('visibility', 'hidden'); }); } }); } }, linearRegressionLine: function(svg, dataset, x_log_scale, y_log_scale) { var that = this; // linear regresion line var lr_line = ss.linear_regression() .data(dataset.rows.map(function(d) { return [d.loss, d.gain]; })) .line(); var line = d3.svg.line() .x(x_log_scale) .y(function(d) { return that.y_log_scale(lr_line(d));} ) var x0 = x_log_scale.domain()[0]; var x1 = x_log_scale.domain()[1]; var lr = svg.selectAll('.linear_regression').data([0]); var attrs = { "x1": x_log_scale(x0), "y1": y_log_scale(lr_line(x0)), "x2": x_log_scale(x1), "y2": y_log_scale(lr_line(x1)), "stroke-width": 1.3, "stroke": "white", "stroke-dasharray": "7,5" }; lr.enter() .append("line") .attr('class', 'linear_regression') .attr(attrs); lr.transition().attr(attrs); } }); gfw.ui.view.CountriesEmbedShow = cdb.core.View.extend({ el: document.body, events: { 'click .forma_dropdown-link': '_openDropdown', 'click .hansen_dropdown-link': '_openDropdown', 'click .hansen_dropdown-menu a': '_redrawCircle' }, initialize: function() { this.iso = this.options.iso; this._initViews(); this._initHansenDropdown(); }, _initViews: function() { this._drawCircle('forma', 'lines', { iso: this.iso }); this._drawCircle('forest_loss', 'bars', { iso: this.iso, dataset: 'loss' }); }, _initFormaDropdown: function() { $('.forma_dropdown-link').qtip({ show: 'click', hide: { event: 'click unfocus' }, content: { text: $('.forma_dropdown-menu') }, position: { my: 'bottom right', at: 'top right', target: $('.forma_dropdown-link'), adjust: { x: -10 } }, style: { tip: { corner: 'bottom right', mimic: 'bottom center', border: 1, width: 10, height: 6 } } }); }, _initHansenDropdown: function() { this.dropdown = $('.hansen_dropdown-link').qtip({ show: 'click', hide: { event: 'click unfocus' }, content: { text: $('.hansen_dropdown-menu') }, position: { my: 'top right', at: 'bottom right', target: $('.hansen_dropdown-link'), adjust: { x: 10 } }, style: { tip: { corner: 'top right', mimic: 'top center', border: 1, width: 10, height: 6 } } }); }, _openDropdown: function(e) { e.preventDefault(); }, _redrawCircle: function(e) { e.preventDefault(); var dataset = $(e.target).attr('data-slug'), subtitle = $(e.target).text(); var api = this.dropdown.qtip('api'); api.hide(); $('.hansen_dropdown-link').html(subtitle); if(dataset === 'countries_gain') { this._drawCircle('forest_loss', 'comp', { iso: this.iso }); } else { this._drawCircle('forest_loss', 'bars', { iso: this.iso, dataset: dataset }); } }, _drawCircle: function(id, type, options) { var that = this; var $graph = $('.'+id), $amount = $('.'+id+' .graph-amount'), $date = $('.'+id+' .graph-date'), $coming_soon = $('.'+id+' .coming_soon'), $action = $('.'+id+' .action'); $('.graph.'+id+' .frame_bkg').empty(); $graph.addClass('ghost'); $amount.html(''); $date.html(''); $coming_soon.hide(); var width = options.width || 256, height = options.height || width, h = 100, // maxHeight radius = width / 2; var graph = d3.select('.graph.'+id+' .frame_bkg') .append('svg:svg') .attr('class', type) .attr('width', width) .attr('height', height); var dashedLines = [ { x1:17, y:height/4, x2:239, color: '#ccc' }, { x1:0, y:height/2, x2:width, color: '#ccc' }, { x1:17, y:3*height/4, x2:239, color: '#ccc' } ]; // Adds the dotted lines _.each(dashedLines, function(line) { graph.append('svg:line') .attr('x1', line.x1) .attr('y1', line.y) .attr('x2', line.x2) .attr('y2', line.y) .style('stroke-dasharray', '2,2') .style('stroke', line.color); }); var sql = ["SELECT date_trunc('month', date) as date, COUNT(*) as alerts", 'FROM forma_api', "WHERE iso = '"+options.iso+"'", "GROUP BY date_trunc('month', date)", "ORDER BY date_trunc('month', date) ASC"].join(' '); if (type === 'lines') { d3.json('https://wri-01.cartodb.com/api/v2/sql?q='+sql, function(json) { if(json && json.rows.length > 0) { $graph.removeClass('ghost'); $action.removeClass('disabled'); that._initFormaDropdown(); var data = json.rows.slice(1, json.rows.length - 1); } else { $coming_soon.show(); return; } var x_scale = d3.scale.linear() .domain([0, data.length - 1]) .range([0, width - 80]); var max = d3.max(data, function(d) { return parseFloat(d.alerts); }); if (max === d3.min(data, function(d) { return parseFloat(d.alerts); })) { h = h/2; } var y_scale = d3.scale.linear() .domain([0, max]) .range([0, h]); var line = d3.svg.line() .x(function(d, i) { return x_scale(i); }) .y(function(d, i) { return h - y_scale(d.alerts); }) .interpolate('basis'); var marginLeft = 40, marginTop = radius - h/2; $amount.html('<span>'+formatNumber(data[data.length - 1].alerts)+'</span>'); var date = new Date(data[data.length - 1].date), form_date = 'Alerts in ' + config.MONTHNAMES[date.getMonth()] + ' ' + date.getFullYear(); $date.html(form_date); graph.append('svg:path') .attr('transform', 'translate(' + marginLeft + ',' + marginTop + ')') .attr('d', line(data)) .on('mousemove', function(d) { var index = Math.round(x_scale.invert(d3.mouse(this)[0])); if (data[index]) { // if there's data $amount.html('<span>'+formatNumber(data[index].alerts)+'</span>'); var date = new Date(data[index].date), form_date = 'Alerts in ' + config.MONTHNAMES[date.getMonth()] + ' ' + date.getFullYear(); $date.html(form_date); var cx = d3.mouse(this)[0] + marginLeft; var cy = h - y_scale(data[index].alerts) + marginTop; graph.select('.forma_marker') .attr('cx', cx) .attr('cy', cy); } }); graph.append('svg:circle') .attr('class', 'forma_marker') .attr('cx', -10000) .attr('cy',100) .attr('r', 5); }); } else if (type === 'bars') { var sql = "SELECT "; if (options.dataset === 'loss') { sql += "year, loss_gt_0 loss FROM umd WHERE iso='"+options.iso+"'"; } else if (options.dataset === 'extent') { sql += "year, extent_gt_25 extent FROM umd WHERE iso='"+options.iso+"'"; } d3.json('https://wri-01.cartodb.com/api/v2/sql?q='+sql, function(json) { if(json) { $graph.removeClass('ghost'); var data = json.rows; } else { $coming_soon.show(); return; } var data_ = []; _.each(data, function(val, key) { if (val.year >= 2001) { data_.push({ 'year': val.year, 'value': eval('val.'+options.dataset) }); } }); $amount.html('<span>'+formatNumber(parseInt(data_[data_.length - 1].value, 10))+'</span>'); $date.html('Hectares in ' + data_[data_.length - 1].year); var marginLeft = 40, marginTop = radius - h/2 + 5; var y_scale = d3.scale.linear() .domain([0, d3.max(data_, function(d) { return parseFloat(d.value); })]) .range([height, marginTop*2]); var barWidth = (width - 80) / data_.length; var bar = graph.selectAll('g') .data(data_) .enter() .append('g') .attr('transform', function(d, i) { return 'translate(' + (marginLeft + i * barWidth) + ','+ -marginTop+')'; }); bar.append('svg:rect') .attr('class', function(d, i) { if(i === 11) { // last year index return 'last bar' } else { return 'bar' } }) .attr('y', function(d) { return y_scale(d.value); }) .attr('height', function(d) { return height - y_scale(d.value); }) .attr('width', barWidth - 1) .on('mouseover', function(d) { d3.selectAll('.bar').style('opacity', '.5'); d3.select(this).style('opacity', '1'); $amount.html('<span>'+formatNumber(parseInt(d.value, 10))+'</span>'); $date.html('Hectares in ' + d.year); }); }); } else if (type === 'comp') { var sql = "SELECT iso, sum(umd.loss_gt_0) loss, max(umd.gain) gain FROM umd WHERE iso='"+options.iso+"' GROUP BY iso"; d3.json('https://wri-01.cartodb.com/api/v2/sql?q='+encodeURIComponent(sql), function(json) { if(json) { $graph.removeClass('ghost'); var data = json.rows[0]; } else { $coming_soon.show(); return; } var data_ = [{ 'key': 'Tree cover gain', 'value': data.gain }, { 'key': 'Tree cover loss', 'value': data.loss }]; $amount.html('<span>'+formatNumber(parseInt(data_[data_.length - 1].value, 10))+'</span>'); $date.html('Ha '+data_[data_.length - 1].key); var barWidth = (width - 80) / 12; var marginLeft = 40 + barWidth*5, marginTop = radius - h/2 + 5; var y_scale = d3.scale.linear() .domain([0, d3.max(data_, function(d) { return parseFloat(d.value); })]) .range([height, marginTop*2]); var bar = graph.selectAll('g') .data(data_) .enter() .append('g') .attr('transform', function(d, i) { return 'translate(' + (marginLeft + i * barWidth) + ',' + -marginTop + ')'; }); bar.append('svg:rect') .attr('class', function(d, i) { if (i === 1) { // last bar index return 'last bar' } else { return 'bar' } }) .attr('y', function(d) { return y_scale(d.value); }) .attr('height', function(d) { return height - y_scale(d.value); }) .attr('width', barWidth - 1) .style('fill', '#FFC926') .style('shape-rendering', 'crispEdges') .on('mouseover', function(d) { d3.selectAll('.bar').style('opacity', '.5'); d3.select(this).style('opacity', '1'); $amount.html('<span>'+formatNumber(parseFloat(d.value).toFixed(1))+'</span>'); $date.html('Ha '+d.key); }); }); } } });
apercas/gfw
app/assets/javascripts/embed_countries.js
JavaScript
mit
43,948
/* * @(#)LayouterSample.java * * Copyright (c) 1996-2010 by the original authors of JHotDraw and all its * contributors. All rights reserved. * * You may not use, copy or modify this file, except in compliance with the * license agreement you entered into with the copyright holders. For details * see accompanying license terms. */ package org.jhotdraw.samples.mini; import org.jhotdraw.draw.tool.DelegationSelectionTool; import org.jhotdraw.draw.layouter.VerticalLayouter; import javax.swing.*; import org.jhotdraw.draw.*; /** * Example showing how to layout two editable text figures and a line figure * within a graphical composite figure. * * @author Werner Randelshofer * @version $Id: LayouterSample.java 718 2010-11-21 17:49:53Z rawcoder $ */ public class LayouterSample { public static void main(String[] args) { SwingUtilities.invokeLater(new Runnable() { @Override public void run() { // Create a graphical composite figure. GraphicalCompositeFigure composite = new GraphicalCompositeFigure(); // Add child figures to the composite figure composite.add(new TextFigure("Above the line")); composite.add(new LineFigure()); composite.add(new TextFigure("Below the line")); // Set a layouter and perform the layout composite.setLayouter(new VerticalLayouter()); composite.layout(); // Add the composite figure to a drawing Drawing drawing = new DefaultDrawing(); drawing.add(composite); // Create a frame with a drawing view and a drawing editor JFrame f = new JFrame("My Drawing"); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); f.setSize(400, 300); DrawingView view = new DefaultDrawingView(); view.setDrawing(drawing); f.getContentPane().add(view.getComponent()); DrawingEditor editor = new DefaultDrawingEditor(); editor.add(view); editor.setTool(new DelegationSelectionTool()); f.setVisible(true); } }); } }
ahmedvc/umple
Umplificator/UmplifiedProjects/jhotdraw7/src/main/java/org/jhotdraw/samples/mini/LayouterSample.java
Java
mit
2,276
package com.iluwatar.front.controller; /** * * Command for archers. * */ public class ArcherCommand implements Command { @Override public void process() { new ArcherView().display(); } }
dlee0113/java-design-patterns
front-controller/src/main/java/com/iluwatar/front/controller/ArcherCommand.java
Java
mit
204