text
stringlengths
4
5.48M
meta
stringlengths
14
6.54k
namespace ash { ModeIndicatorObserver::ModeIndicatorObserver() : active_widget_(nullptr) {} ModeIndicatorObserver::~ModeIndicatorObserver() { if (active_widget_) active_widget_->RemoveObserver(this); CHECK(!IsInObserverList()); } void ModeIndicatorObserver::AddModeIndicatorWidget(views::Widget* widget) { // If other active mode indicator widget is shown, close it immediately // without fading animation. Then store this widget as the active widget. DCHECK(widget); if (active_widget_) active_widget_->Close(); active_widget_ = widget; widget->AddObserver(this); } void ModeIndicatorObserver::OnWidgetDestroying(views::Widget* widget) { if (widget == active_widget_) active_widget_ = nullptr; } } // namespace ash
{'content_hash': '29bfe0248379b19c5f5bc2e046ddd2e7', 'timestamp': '', 'source': 'github', 'line_count': 26, 'max_line_length': 76, 'avg_line_length': 28.96153846153846, 'alnum_prop': 0.7330677290836654, 'repo_name': 'scheib/chromium', 'id': 'c9f59df421706089d0f59fa02e563774603337c4', 'size': '1002', 'binary': False, 'copies': '2', 'ref': 'refs/heads/main', 'path': 'ash/ime/mode_indicator_observer.cc', 'mode': '33188', 'license': 'bsd-3-clause', 'language': []}
package org.apache.jackrabbit.oak.plugins.index.lucene; import static com.google.common.base.Preconditions.checkState; import static org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexConstants.INDEX_DATA_CHILD_NAME; import static org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexConstants.PERSISTENCE_FILE; import static org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexConstants.PERSISTENCE_NAME; import static org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexConstants.PERSISTENCE_PATH; import java.io.File; import java.io.IOException; import java.util.concurrent.locks.ReadWriteLock; import java.util.concurrent.locks.ReentrantReadWriteLock; import javax.annotation.Nullable; import org.apache.jackrabbit.oak.commons.PathUtils; import org.apache.jackrabbit.oak.plugins.index.lucene.util.SuggestHelper; import org.apache.jackrabbit.oak.spi.state.NodeState; import org.apache.jackrabbit.oak.spi.state.ReadOnlyBuilder; import org.apache.lucene.index.DirectoryReader; import org.apache.lucene.index.IndexReader; import org.apache.lucene.search.IndexSearcher; import org.apache.lucene.search.suggest.analyzing.AnalyzingInfixSuggester; import org.apache.lucene.store.Directory; import org.apache.lucene.store.FSDirectory; class IndexNode { static IndexNode open(String indexPath, NodeState root, NodeState defnNodeState, @Nullable IndexCopier cloner) throws IOException { Directory directory = null; IndexDefinition definition = new IndexDefinition(root, defnNodeState, indexPath); NodeState data = defnNodeState.getChildNode(INDEX_DATA_CHILD_NAME); if (data.exists()) { directory = new OakDirectory(new ReadOnlyBuilder(defnNodeState), definition, true); if (cloner != null) { directory = cloner.wrapForRead(indexPath, definition, directory); } } else if (PERSISTENCE_FILE.equalsIgnoreCase(defnNodeState.getString(PERSISTENCE_NAME))) { String path = defnNodeState.getString(PERSISTENCE_PATH); if (path != null && new File(path).exists()) { directory = FSDirectory.open(new File(path)); } } if (directory != null) { try { OakDirectory suggestDirectory = null; if (definition.isSuggestEnabled()) { suggestDirectory = new OakDirectory(defnNodeState.builder(), ":suggest-data", definition, false); } IndexNode index = new IndexNode(PathUtils.getName(indexPath), definition, directory, suggestDirectory); directory = null; // closed in Index.close() return index; } finally { if (directory != null) { directory.close(); } } } return null; } private final String name; private final IndexDefinition definition; private final Directory directory; private final Directory suggestDirectory; private final IndexReader reader; private final IndexSearcher searcher; private final ReadWriteLock lock = new ReentrantReadWriteLock(); private final AnalyzingInfixSuggester lookup; private boolean closed = false; IndexNode(String name, IndexDefinition definition, Directory directory, final OakDirectory suggestDirectory) throws IOException { this.name = name; this.definition = definition; this.directory = directory; this.reader = DirectoryReader.open(directory); this.searcher = new IndexSearcher(reader); this.suggestDirectory = suggestDirectory; if (suggestDirectory != null) { this.lookup = SuggestHelper.getLookup(suggestDirectory, definition.getAnalyzer()); } else { this.lookup = null; } } String getName() { return name; } IndexDefinition getDefinition() { return definition; } IndexSearcher getSearcher() { return searcher; } Directory getSuggestDirectory() { return suggestDirectory; } AnalyzingInfixSuggester getLookup() { return lookup; } boolean acquire() { lock.readLock().lock(); if (closed) { lock.readLock().unlock(); return false; } else { return true; } } void release() { lock.readLock().unlock(); } void close() throws IOException { lock.writeLock().lock(); try { checkState(!closed); closed = true; } finally { lock.writeLock().unlock(); } try { reader.close(); } finally { directory.close(); } } }
{'content_hash': '937d561c1de2144e6f7a067d6338c34b', 'timestamp': '', 'source': 'github', 'line_count': 150, 'max_line_length': 119, 'avg_line_length': 32.11333333333334, 'alnum_prop': 0.6518580029063733, 'repo_name': 'joansmith/jackrabbit-oak', 'id': '957fbc73c9dac3538985a2238c89967c2eec2f49', 'size': '5618', 'binary': False, 'copies': '1', 'ref': 'refs/heads/trunk', 'path': 'oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/IndexNode.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'CSS', 'bytes': '21361'}, {'name': 'Groovy', 'bytes': '110634'}, {'name': 'HTML', 'bytes': '1406'}, {'name': 'Java', 'bytes': '17222498'}, {'name': 'JavaScript', 'bytes': '41753'}, {'name': 'Perl', 'bytes': '7585'}, {'name': 'Shell', 'bytes': '17322'}]}
/** @file */ /* * ratools: Router Advertisement Tools * * Copyright 2013-2014 Dan Luedtke <[email protected]> * * 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. */ #ifndef __RATOOLS_NETLINK_H #define __RATOOLS_NETLINK_H #include "ratools.h" #include "database.h" #include <linux/rtnetlink.h> /** buffer for receiving netlink and rtnetlink messages */ #define RAT_NL_REPLYBUFSIZE 4096 /** netlink request */ struct rat_nl_rtreq { /** netlink message header */ struct nlmsghdr req_nlmsg; /** actual netlink message */ union { /** link-layer information */ struct ifinfomsg req_un_ifi; /** network-layer information */ struct ifaddrmsg req_un_ifa; } req_un; /** link-layer information */ # define req_ifi req_un.req_un_ifi /** network-layer information */ # define req_ifa req_un.req_un_ifa }; extern int rat_nl_init_db (struct rat_db *); extern void *rat_nl_listener (void *); #endif /* __RATOOLS_NETLINK_H */
{'content_hash': '556890a62231d1bfc7c57e5d9540e4c1', 'timestamp': '', 'source': 'github', 'line_count': 57, 'max_line_length': 75, 'avg_line_length': 27.157894736842106, 'alnum_prop': 0.6576227390180879, 'repo_name': 'florianl/ratools', 'id': '612927a06fbd77721cbfb7a38bfd762ebe01ded3', 'size': '1548', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/netlink.h', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'C', 'bytes': '385724'}, {'name': 'Makefile', 'bytes': '2394'}]}
package build_test import ( "bytes" "context" "errors" "fmt" "io" "net" "path/filepath" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/credentials/insecure" "google.golang.org/grpc/status" . "github.com/tsuru/deploy-agent/pkg/build" "github.com/tsuru/deploy-agent/pkg/build/fake" pb "github.com/tsuru/deploy-agent/pkg/build/grpc_build_v1" ) func TestBuild(t *testing.T) { t.Parallel() cases := map[string]struct { ctx context.Context builder Builder req *pb.BuildRequest assert func(t *testing.T, stream pb.Build_BuildClient, err error) }{ "w/ context canceled": { ctx: func() context.Context { ctx, cancel := context.WithCancel(context.TODO()) cancel() return ctx }(), assert: func(t *testing.T, _ pb.Build_BuildClient, err error) { assert.Error(t, err) assert.EqualError(t, err, status.Error(codes.Canceled, "context canceled").Error()) }, }, "missing source image": { req: &pb.BuildRequest{}, assert: func(t *testing.T, stream pb.Build_BuildClient, err error) { require.NoError(t, err) require.NotNil(t, stream) _, _, err = readResponse(t, stream) assert.Error(t, err) assert.EqualError(t, err, status.Error(codes.InvalidArgument, "source image cannot be empty").Error()) }, }, "missing destination images": { req: &pb.BuildRequest{ SourceImage: "tsuru/scratch:latest", }, assert: func(t *testing.T, stream pb.Build_BuildClient, err error) { require.NoError(t, err) require.NotNil(t, stream) _, _, err = readResponse(t, stream) assert.Error(t, err) assert.EqualError(t, err, status.Error(codes.InvalidArgument, "destination images not provided").Error()) }, }, "destionation images w/ empty element": { req: &pb.BuildRequest{ SourceImage: "tsuru/scratch:latest", DestinationImages: []string{"registry.example.com/tsuru/app-my-app:v1", ""}, }, assert: func(t *testing.T, stream pb.Build_BuildClient, err error) { require.NoError(t, err) require.NotNil(t, stream) _, _, err = readResponse(t, stream) assert.Error(t, err) assert.EqualError(t, err, status.Error(codes.InvalidArgument, "destination image cannot be empty").Error()) }, }, "invalid deploy origin": { req: &pb.BuildRequest{ SourceImage: "tsuru/scratch:latest", DestinationImages: []string{"registry.example.com/tsuru/app-my-app:v1"}, DeployOrigin: pb.DeployOrigin(1000), }, assert: func(t *testing.T, stream pb.Build_BuildClient, err error) { require.NoError(t, err) require.NotNil(t, stream) _, _, err = readResponse(t, stream) assert.EqualError(t, err, status.Error(codes.InvalidArgument, "invalid deploy origin").Error()) }, }, "deploy from source code, empty app source data": { req: &pb.BuildRequest{ SourceImage: "tsuru/scratch:latest", DestinationImages: []string{"registry.example.com/tsuru/app-my-app:v1"}, DeployOrigin: pb.DeployOrigin_DEPLOY_ORIGIN_SOURCE_FILES, }, assert: func(t *testing.T, stream pb.Build_BuildClient, err error) { require.NoError(t, err) require.NotNil(t, stream) _, _, err = readResponse(t, stream) assert.EqualError(t, err, status.Error(codes.InvalidArgument, "app source data not provided").Error()) }, }, "when builder returns an error": { builder: &fake.FakeBuilder{ OnBuild: func(ctx context.Context, r *pb.BuildRequest, w io.Writer) (*pb.TsuruConfig, error) { return nil, errors.New("some error") }, }, req: &pb.BuildRequest{ SourceImage: "tsuru/scratch:latest", DestinationImages: []string{"registry.example.com/tsuru/app-my-app:v1"}, DeployOrigin: pb.DeployOrigin_DEPLOY_ORIGIN_CONTAINER_IMAGE, }, assert: func(t *testing.T, stream pb.Build_BuildClient, err error) { require.NoError(t, err) require.NotNil(t, stream) _, _, err = readResponse(t, stream) assert.EqualError(t, err, status.Error(codes.Unknown, "some error").Error()) }, }, "build successful": { builder: &fake.FakeBuilder{ OnBuild: func(ctx context.Context, r *pb.BuildRequest, w io.Writer) (*pb.TsuruConfig, error) { assert.NotNil(t, ctx) assert.NotNil(t, r) assert.NotNil(t, w) fmt.Fprintln(w, "--- EXECUTING BUILD ---") return &pb.TsuruConfig{ Procfile: "web: ./path/to/server.sh --addr :${PORT}", TsuruYaml: "healthcheck:\n path: /healthz", }, nil }, }, req: &pb.BuildRequest{ SourceImage: "tsuru/scratch:latest", DestinationImages: []string{"registry.example.com/tsuru/app-my-app:v1"}, DeployOrigin: pb.DeployOrigin_DEPLOY_ORIGIN_SOURCE_FILES, Data: []byte("fake data :P"), }, assert: func(t *testing.T, stream pb.Build_BuildClient, err error) { require.NoError(t, err) require.NotNil(t, stream) tsuruConfig, output, err := readResponse(t, stream) require.NoError(t, err) require.NotNil(t, tsuruConfig) assert.Equal(t, &pb.TsuruConfig{Procfile: "web: ./path/to/server.sh --addr :${PORT}", TsuruYaml: "healthcheck:\n path: /healthz"}, tsuruConfig) assert.Regexp(t, `(.*)--- EXECUTING BUILD ---(.*)`, output) }, }, } for name, tt := range cases { t.Run(name, func(t *testing.T) { require.NotNil(t, tt.assert, "assert function not provided") serverAddr := setupServer(t, NewServer(tt.builder)) c := setupClient(t, serverAddr) ctx := context.Background() if tt.ctx != nil { ctx = tt.ctx } resp, err := c.Build(ctx, tt.req) tt.assert(t, resp, err) }) } } func setupServer(t *testing.T, bs pb.BuildServer) string { t.Helper() l, err := net.Listen("unix", filepath.Join(t.TempDir(), "server.sock")) require.NoError(t, err) s := grpc.NewServer() t.Cleanup(func() { s.Stop() }) pb.RegisterBuildServer(s, bs) go func() { nerr := s.Serve(l) require.NoError(t, nerr) }() return filepath.Join("unix://", l.Addr().String()) } func setupClient(t *testing.T, address string) pb.BuildClient { t.Helper() conn, err := grpc.Dial(address, grpc.WithTransportCredentials(insecure.NewCredentials())) require.NoError(t, err) t.Cleanup(func() { conn.Close() }) return pb.NewBuildClient(conn) } func readResponse(t *testing.T, stream pb.Build_BuildClient) (*pb.TsuruConfig, string, error) { t.Helper() var tc *pb.TsuruConfig var buffer bytes.Buffer for { r, err := stream.Recv() if errors.Is(err, io.EOF) { break } if err != nil { return nil, "", err } switch r.Data.(type) { case *pb.BuildResponse_TsuruConfig: tc = r.GetTsuruConfig() case *pb.BuildResponse_Output: _, err = io.WriteString(&buffer, r.GetOutput()) require.NoError(t, err) } } return tc, buffer.String(), nil }
{'content_hash': '996c76b3f30e67e4666dd3fc51b1c71e', 'timestamp': '', 'source': 'github', 'line_count': 236, 'max_line_length': 148, 'avg_line_length': 29.18220338983051, 'alnum_prop': 0.6528241614636271, 'repo_name': 'tsuru/deploy-agent', 'id': '930c61959ef9167922b7ab28b4585f051608bd90', 'size': '7046', 'binary': False, 'copies': '1', 'ref': 'refs/heads/main', 'path': 'pkg/build/server_test.go', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'Dockerfile', 'bytes': '1263'}, {'name': 'Go', 'bytes': '48481'}, {'name': 'Makefile', 'bytes': '845'}]}
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>alien4cloud</groupId> <artifactId>alien4cloud-parent</artifactId> <version>1.2.0-SM4-SNAPSHOT</version> </parent> <artifactId>alien4cloud-rest-it-compatibility</artifactId> <name>Alien 4 Cloud REST Integration Test Compatibility</name> <description>Integration tests for previous Alien's REST API.</description> <properties> <alien.previous.version>1.1.0</alien.previous.version> <sonar.language>java</sonar.language> <sonar.jacoco.itReportPath>${project.basedir}/../target/jacoco-it.exec</sonar.jacoco.itReportPath> <jclouds.version>1.9.1</jclouds.version> </properties> <dependencies> <dependency> <groupId>alien4cloud</groupId> <artifactId>alien4cloud-rest-it</artifactId> <version>${project.version}</version> <type>war</type> <scope>provided</scope> </dependency> <dependency> <groupId>alien4cloud</groupId> <artifactId>alien4cloud-rest-it</artifactId> <version>${alien.previous.version}</version> <classifier>tests</classifier> <scope>test</scope> </dependency> <dependency> <groupId>info.cukes</groupId> <artifactId>cucumber-picocontainer</artifactId> <version>1.2.2</version> <scope>test</scope> </dependency> <dependency> <groupId>info.cukes</groupId> <artifactId>cucumber-junit</artifactId> <version>1.2.2</version> <scope>test</scope> </dependency> <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <version>${lombok.version}</version> <scope>provided</scope> </dependency> </dependencies> <repositories> <repository> <id>sonatype-snapshot</id> <name>Sonatype snapshot</name> <url>https://oss.sonatype.org/content/repositories/snapshots/</url> </repository> </repositories> <build> <testResources> <testResource> <directory>${project.basedir}/src/test/resources</directory> </testResource> <testResource> <directory>${project.basedir}/src/test/resources</directory> </testResource> </testResources> <plugins> <plugin> <!-- We use the dependency plugin to fetch the sources of the previous version tests and we unpack it to the directory we will use for tests. --> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <version>2.10</version> <executions> <execution> <id>unpack</id> <phase>generate-sources</phase> <goals> <goal>unpack</goal> </goals> <configuration> <artifactItems> <artifactItem> <groupId>alien4cloud</groupId> <artifactId>alien4cloud-rest-it</artifactId> <version>${alien.previous.version}</version> <classifier>tests</classifier> <includes>**/*</includes> <excludes>alien/, data/, README.txt, META-INF/, alien4cloud-config.yml, elasticsearch.yml, alien4cloud/it/RunAuditIT.class</excludes> <outputDirectory>src/test/java</outputDirectory> </artifactItem> <artifactItem> <groupId>alien4cloud</groupId> <artifactId>alien4cloud-rest-it</artifactId> <version>${alien.previous.version}</version> <classifier>tests</classifier> <includes>**/*</includes> <excludes>alien4cloud, META-INF, alien4cloud/it/RunAuditIT.class, alien/rest/suggestion/suggestion.feature</excludes> <outputDirectory>src/test/resources</outputDirectory> </artifactItem> <artifactItem> <groupId>alien4cloud</groupId> <artifactId>alien4cloud-rest-it</artifactId> <version>${alien.previous.version}</version> <classifier>tests</classifier> <excludes>**/*</excludes> <outputDirectory>src/main/resources</outputDirectory> </artifactItem> </artifactItems> </configuration> </execution> </executions> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>1.3.2</version> <executions> <execution> <id>cleanup-test-sources</id> <phase>clean</phase> <goals><goal>exec</goal></goals> <configuration> <executable>${project.basedir}/scripts/prepare-compatibility-test.sh</executable> <arguments> <argument>${project.basedir}</argument> <argument>${alien.previous.version}</argument> </arguments> </configuration> </execution> <execution> <id>prepare-test-data</id> <phase>pre-integration-test</phase> <goals> <goal>java</goal> </goals> <configuration> <mainClass>alien4cloud.it.setup.PrepareTestData</mainClass> <classpathScope>test</classpathScope> <arguments> <argument>${project.basedir}</argument> </arguments> </configuration> </execution> <execution> <id>merge-reports</id> <phase>post-integration-test</phase> <goals> <goal>java</goal> </goals> <configuration> <mainClass>alien4cloud.cucumber.report.ReportMerger</mainClass> <classpathScope>test</classpathScope> <arguments> <argument>${project.basedir}/target/cucumber</argument> </arguments> </configuration> </execution> </executions> </plugin> </plugins> </build> <profiles> <profile> <id>do-test</id> <activation> <property> <name>doTest</name> </property> </activation> <build> <plugins> <plugin> <artifactId>maven-antrun-plugin</artifactId> <version>1.7</version> <executions> <execution> <id>clean-test-data</id> <phase>pre-integration-test</phase> <configuration> <tasks> <delete includeemptydirs="true" failonerror="false"> <fileset dir="${user.home}/.alien" includes="**/*" /> </delete> </tasks> </configuration> <goals> <goal>run</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.codehaus.cargo</groupId> <artifactId>cargo-maven2-plugin</artifactId> <version>${maven.cargo.version}</version> <executions> <execution> <id>start-jetty</id> <phase>pre-integration-test</phase> <goals> <goal>start</goal> </goals> </execution> <execution> <id>stop-jetty</id> <phase>post-integration-test</phase> <goals> <goal>stop</goal> </goals> </execution> </executions> <configuration> <container> <containerId>jetty9x</containerId> <artifactInstaller> <groupId>org.eclipse.jetty</groupId> <artifactId>jetty-distribution</artifactId> <version>${jetty.version}</version> </artifactInstaller> <log>${basedir}/target/cargo.log</log> <output>${basedir}/target/jetty.log</output> <timeout>180000</timeout> </container> <configuration> <properties> <cargo.servlet.port>8088</cargo.servlet.port> <cargo.logging>high</cargo.logging> <cargo.jvmargs>${jacocoargline} -Denv=ittest -Dspring.profiles.active=security-demo -Xdebug </cargo.jvmargs> </properties> </configuration> <deployables> <deployable> <groupId>alien4cloud</groupId> <artifactId>alien4cloud-rest-it</artifactId> <type>war</type> <pingURL>http://localhost:8088/rest/auth/status</pingURL> <pingTimeout>60000</pingTimeout> <!-- 5 min, time to deploy --> <properties> <context>/</context> </properties> </deployable> </deployables> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-failsafe-plugin</artifactId> <version>2.16</version> <configuration> <argLine>-Xmx1024m -XX:MaxPermSize=256m ${jacocoargline}</argLine> </configuration> <executions> <execution> <goals> <goal>integration-test</goal> <goal>verify</goal> </goals> </execution> </executions> </plugin> </plugins> </build> </profile> <profile> <id>coverage</id> <activation> <property> <name>coverage</name> </property> </activation> <build> <plugins> <plugin> <!-- redo configuration from parent - use itReportPath --> <groupId>org.jacoco</groupId> <artifactId>jacoco-maven-plugin</artifactId> <version>0.6.4.201312101107</version> <configuration> <propertyName>jacocoargline</propertyName> <includes> <include>alien4cloud.*</include> </includes> <destFile>${sonar.jacoco.itReportPath}</destFile> <dataFile>${sonar.jacoco.itReportPath}</dataFile> <append>true</append> </configuration> <executions> <execution> <id>pre-test</id> <goals> <goal>prepare-agent</goal> </goals> </execution> <execution> <id>post-test</id> <goals> <goal>report</goal> </goals> </execution> </executions> </plugin> </plugins> </build> </profile> </profiles> </project>
{'content_hash': '1c8f2527f50c8bf091673928848f6095', 'timestamp': '', 'source': 'github', 'line_count': 317, 'max_line_length': 204, 'avg_line_length': 46.81703470031546, 'alnum_prop': 0.40078161848932015, 'repo_name': 'PierreLemordant/alien4cloud', 'id': 'e0ef52886bcea53f145728229a4eb439b7e8ec6a', 'size': '14841', 'binary': False, 'copies': '1', 'ref': 'refs/heads/develop', 'path': 'alien4cloud-rest-it-compatibility/pom.xml', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'ApacheConf', 'bytes': '59321'}, {'name': 'Batchfile', 'bytes': '653'}, {'name': 'CSS', 'bytes': '75960'}, {'name': 'Cucumber', 'bytes': '393298'}, {'name': 'Groovy', 'bytes': '139435'}, {'name': 'HTML', 'bytes': '410513'}, {'name': 'Java', 'bytes': '3031093'}, {'name': 'JavaScript', 'bytes': '1496709'}, {'name': 'Shell', 'bytes': '42418'}]}
package javacommon.util.extjs; import java.io.IOException; import java.io.PrintWriter; import java.sql.Date; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import net.sf.json.JSONArray; import net.sf.json.JSONObject; import net.sf.json.JsonConfig; import net.sf.json.util.CycleDetectionStrategy; import org.apache.struts2.ServletActionContext; public class Struts2JsonHelper { public static HttpServletResponse getResponse() { return ServletActionContext.getResponse(); } public static HttpServletRequest getRequest() { return ServletActionContext.getRequest(); } public static void outJsonString(String str) { getResponse().setContentType("text/javascript;charset=UTF-8"); outString(str); } /** * JSON 时间解析器具 * * @param datePattern * @return */ public static JsonConfig configJson(String datePattern) { JsonConfig jsonConfig = new JsonConfig(); jsonConfig.setExcludes(new String[] { "" }); jsonConfig.setIgnoreDefaultExcludes(false); jsonConfig.setCycleDetectionStrategy(CycleDetectionStrategy.LENIENT); jsonConfig.registerJsonValueProcessor(Date.class, new JsonDateValueProcessor(datePattern)); return jsonConfig; } public static void outJson(Object obj) { JsonConfig jsonConfig = configJson("yyyy-MM-dd HH:mm:ss"); outJsonString(JSONObject.fromObject(obj,jsonConfig).toString()); } public static void outJsonArray(Object array) { outJsonString(JSONArray.fromObject(array).toString()); } public static void outString(String str) { try { PrintWriter out = getResponse().getWriter(); out.write(str); } catch (IOException e) { } } public static void outXMLString(String xmlStr) { getResponse().setContentType("application/xml;charset=UTF-8"); outString(xmlStr); } }
{'content_hash': '536099d054b050b8fc847cd78e9000ad', 'timestamp': '', 'source': 'github', 'line_count': 72, 'max_line_length': 81, 'avg_line_length': 27.01388888888889, 'alnum_prop': 0.7053984575835476, 'repo_name': 'neolfdev/dlscxx', 'id': 'ff49633931bd18c05ac00484e84a0cd4d0a47634', 'size': '1957', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'java_src/javacommon/util/extjs/Struts2JsonHelper.java', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'ASP', 'bytes': '400'}, {'name': 'C#', 'bytes': '2785'}, {'name': 'Java', 'bytes': '2084580'}, {'name': 'JavaScript', 'bytes': '4007143'}, {'name': 'PHP', 'bytes': '24990'}, {'name': 'Python', 'bytes': '7875'}, {'name': 'Ruby', 'bytes': '2587'}, {'name': 'Shell', 'bytes': '6460'}]}
package org.apache.geode.internal.cache.ha; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.concurrent.RejectedExecutionException; import org.apache.logging.log4j.Logger; import org.apache.geode.CancelException; import org.apache.geode.DataSerializer; import org.apache.geode.cache.CacheException; import org.apache.geode.cache.RegionDestroyedException; import org.apache.geode.distributed.internal.DistributionManager; import org.apache.geode.distributed.internal.PooledDistributionMessage; import org.apache.geode.internal.cache.EventID; import org.apache.geode.internal.cache.GemFireCacheImpl; import org.apache.geode.internal.cache.HARegion; import org.apache.geode.internal.cache.InternalCache; import org.apache.geode.internal.cache.LocalRegion; import org.apache.geode.internal.i18n.LocalizedStrings; import org.apache.geode.internal.logging.LogService; import org.apache.geode.internal.logging.log4j.LocalizedMessage; /** * This message is sent to all the nodes in the DistributedSystem. It contains the list of messages * that have been dispatched by this node. The messages are received by other nodes and the * processing is handed over to an executor */ public class QueueRemovalMessage extends PooledDistributionMessage { private static final Logger logger = LogService.getLogger(); /** * List of messages (String[] ) */ private List messagesList; /** * Constructor : Set the recipient list to ALL_RECIPIENTS */ public QueueRemovalMessage() { this.setRecipient(ALL_RECIPIENTS); } /** * Set the message list */ public void setMessagesList(List messages) { this.messagesList = messages; } /** * Extracts the region from the message list and hands over the message removal task to the * executor */ @Override protected void process(DistributionManager dm) { final InternalCache cache = dm.getCache(); if (cache != null) { Iterator iterator = this.messagesList.iterator(); int oldLevel = LocalRegion.setThreadInitLevelRequirement(LocalRegion.BEFORE_INITIAL_IMAGE); try { while (iterator.hasNext()) { final String regionName = (String) iterator.next(); final int size = (Integer) iterator.next(); final LocalRegion region = (LocalRegion) cache.getRegion(regionName); final HARegionQueue hrq; if (region == null || !region.isInitialized()) { hrq = null; } else { HARegionQueue tmp = ((HARegion) region).getOwner(); if (tmp != null && tmp.isQueueInitialized()) { hrq = tmp; } else { hrq = null; } } // we have to iterate even if the hrq isn't available since there are // a bunch of event IDs to go through for (int i = 0; i < size; i++) { final EventID id = (EventID) iterator.next(); boolean interrupted = Thread.interrupted(); if (hrq == null || !hrq.isQueueInitialized()) { continue; } try { // Fix for bug 39516: inline removal of events by QRM. // dm.getWaitingThreadPool().execute(new Runnable() { // public void run() // { try { if (logger.isTraceEnabled()) { logger.trace("QueueRemovalMessage: removing dispatched events on queue {} for {}", regionName, id); } hrq.removeDispatchedEvents(id); } catch (RegionDestroyedException ignore) { logger.info(LocalizedMessage.create( LocalizedStrings.QueueRemovalMessage_QUEUE_FOUND_DESTROYED_WHILE_PROCESSING_THE_LAST_DISPTACHED_SEQUENCE_ID_FOR_A_HAREGIONQUEUES_DACE_THE_EVENT_ID_IS_0_FOR_HAREGION_WITH_NAME_1, new Object[] {id, regionName})); } catch (CancelException ignore) { return; // cache or DS is closing } catch (CacheException e) { logger.error(LocalizedMessage.create( LocalizedStrings.QueueRemovalMessage_QUEUEREMOVALMESSAGEPROCESSEXCEPTION_IN_PROCESSING_THE_LAST_DISPTACHED_SEQUENCE_ID_FOR_A_HAREGIONQUEUES_DACE_THE_PROBLEM_IS_WITH_EVENT_ID__0_FOR_HAREGION_WITH_NAME_1, new Object[] {regionName, id}), e); } catch (InterruptedException ignore) { return; // interrupt occurs during shutdown. this runs in an executor, so just stop // processing } } catch (RejectedExecutionException ignore) { interrupted = true; } finally { if (interrupted) { Thread.currentThread().interrupt(); } } } // if } // for } finally { LocalRegion.setThreadInitLevelRequirement(oldLevel); } } // cache != null } @Override public void toData(DataOutput out) throws IOException { /* * first write the total list size then in a loop write the region name, number of eventIds and * the event ids */ super.toData(out); // write the size of the data list DataSerializer.writeInteger(this.messagesList.size(), out); Iterator iterator = messagesList.iterator(); String regionName = null; Integer numberOfIds = null; Object eventId = null; int maxVal; while (iterator.hasNext()) { regionName = (String) iterator.next(); // write the regionName DataSerializer.writeString(regionName, out); numberOfIds = (Integer) iterator.next(); // write the number of event ids DataSerializer.writeInteger(numberOfIds, out); maxVal = numberOfIds; // write the event ids for (int i = 0; i < maxVal; i++) { eventId = iterator.next(); DataSerializer.writeObject(eventId, out); } } } public int getDSFID() { return QUEUE_REMOVAL_MESSAGE; } @Override public void fromData(DataInput in) throws IOException, ClassNotFoundException { /* * read the total list size, reconstruct the message list in a loop by reading the region name, * number of eventIds and the event ids */ super.fromData(in); // read the size of the message int size = DataSerializer.readInteger(in); this.messagesList = new LinkedList(); int eventIdSizeInt; for (int i = 0; i < size; i++) { // read the region name this.messagesList.add(DataSerializer.readString(in)); // read the datasize Integer eventIdSize = DataSerializer.readInteger(in); this.messagesList.add(eventIdSize); eventIdSizeInt = eventIdSize; // read the total number of events for (int j = 0; j < eventIdSizeInt; j++) { this.messagesList.add(DataSerializer.readObject(in)); } // increment i by adding the total number of ids read and 1 for // the length of the message // i = i + eventIdSizeInt + 1; } } @Override public String toString() { return "QueueRemovalMessage" + this.messagesList; } }
{'content_hash': '90e94590d1b5821e17c71f33bbf74b7b', 'timestamp': '', 'source': 'github', 'line_count': 197, 'max_line_length': 222, 'avg_line_length': 36.944162436548226, 'alnum_prop': 0.6397361912613355, 'repo_name': 'charliemblack/geode', 'id': 'bdefdb57e29b5b45a8c35468b369a98a5f3a8c73', 'size': '8067', 'binary': False, 'copies': '2', 'ref': 'refs/heads/develop', 'path': 'geode-core/src/main/java/org/apache/geode/internal/cache/ha/QueueRemovalMessage.java', 'mode': '33261', 'license': 'apache-2.0', 'language': [{'name': 'CSS', 'bytes': '106707'}, {'name': 'Groovy', 'bytes': '2928'}, {'name': 'HTML', 'bytes': '4038525'}, {'name': 'Java', 'bytes': '27161748'}, {'name': 'JavaScript', 'bytes': '1781013'}, {'name': 'Protocol Buffer', 'bytes': '8963'}, {'name': 'Ruby', 'bytes': '6677'}, {'name': 'Shell', 'bytes': '21474'}]}
""" DocuSign REST API The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. # noqa: E501 OpenAPI spec version: v2.1 Contact: [email protected] Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six from docusign_esign.client.configuration import Configuration class BulkSendBatchSummaries(object): """NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ """ Attributes: swagger_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value is json key in definition. """ swagger_types = { 'batch_size_limit': 'str', 'bulk_batch_summaries': 'list[BulkSendBatchSummary]', 'bulk_process_queue_limit': 'str', 'bulk_process_total_queued': 'str', 'end_position': 'str', 'next_uri': 'str', 'previous_uri': 'str', 'queue_limit': 'str', 'result_set_size': 'str', 'start_position': 'str', 'total_queued': 'str', 'total_set_size': 'str' } attribute_map = { 'batch_size_limit': 'batchSizeLimit', 'bulk_batch_summaries': 'bulkBatchSummaries', 'bulk_process_queue_limit': 'bulkProcessQueueLimit', 'bulk_process_total_queued': 'bulkProcessTotalQueued', 'end_position': 'endPosition', 'next_uri': 'nextUri', 'previous_uri': 'previousUri', 'queue_limit': 'queueLimit', 'result_set_size': 'resultSetSize', 'start_position': 'startPosition', 'total_queued': 'totalQueued', 'total_set_size': 'totalSetSize' } def __init__(self, _configuration=None, **kwargs): # noqa: E501 """BulkSendBatchSummaries - a model defined in Swagger""" # noqa: E501 if _configuration is None: _configuration = Configuration() self._configuration = _configuration self._batch_size_limit = None self._bulk_batch_summaries = None self._bulk_process_queue_limit = None self._bulk_process_total_queued = None self._end_position = None self._next_uri = None self._previous_uri = None self._queue_limit = None self._result_set_size = None self._start_position = None self._total_queued = None self._total_set_size = None self.discriminator = None setattr(self, "_{}".format('batch_size_limit'), kwargs.get('batch_size_limit', None)) setattr(self, "_{}".format('bulk_batch_summaries'), kwargs.get('bulk_batch_summaries', None)) setattr(self, "_{}".format('bulk_process_queue_limit'), kwargs.get('bulk_process_queue_limit', None)) setattr(self, "_{}".format('bulk_process_total_queued'), kwargs.get('bulk_process_total_queued', None)) setattr(self, "_{}".format('end_position'), kwargs.get('end_position', None)) setattr(self, "_{}".format('next_uri'), kwargs.get('next_uri', None)) setattr(self, "_{}".format('previous_uri'), kwargs.get('previous_uri', None)) setattr(self, "_{}".format('queue_limit'), kwargs.get('queue_limit', None)) setattr(self, "_{}".format('result_set_size'), kwargs.get('result_set_size', None)) setattr(self, "_{}".format('start_position'), kwargs.get('start_position', None)) setattr(self, "_{}".format('total_queued'), kwargs.get('total_queued', None)) setattr(self, "_{}".format('total_set_size'), kwargs.get('total_set_size', None)) @property def batch_size_limit(self): """Gets the batch_size_limit of this BulkSendBatchSummaries. # noqa: E501 # noqa: E501 :return: The batch_size_limit of this BulkSendBatchSummaries. # noqa: E501 :rtype: str """ return self._batch_size_limit @batch_size_limit.setter def batch_size_limit(self, batch_size_limit): """Sets the batch_size_limit of this BulkSendBatchSummaries. # noqa: E501 :param batch_size_limit: The batch_size_limit of this BulkSendBatchSummaries. # noqa: E501 :type: str """ self._batch_size_limit = batch_size_limit @property def bulk_batch_summaries(self): """Gets the bulk_batch_summaries of this BulkSendBatchSummaries. # noqa: E501 # noqa: E501 :return: The bulk_batch_summaries of this BulkSendBatchSummaries. # noqa: E501 :rtype: list[BulkSendBatchSummary] """ return self._bulk_batch_summaries @bulk_batch_summaries.setter def bulk_batch_summaries(self, bulk_batch_summaries): """Sets the bulk_batch_summaries of this BulkSendBatchSummaries. # noqa: E501 :param bulk_batch_summaries: The bulk_batch_summaries of this BulkSendBatchSummaries. # noqa: E501 :type: list[BulkSendBatchSummary] """ self._bulk_batch_summaries = bulk_batch_summaries @property def bulk_process_queue_limit(self): """Gets the bulk_process_queue_limit of this BulkSendBatchSummaries. # noqa: E501 # noqa: E501 :return: The bulk_process_queue_limit of this BulkSendBatchSummaries. # noqa: E501 :rtype: str """ return self._bulk_process_queue_limit @bulk_process_queue_limit.setter def bulk_process_queue_limit(self, bulk_process_queue_limit): """Sets the bulk_process_queue_limit of this BulkSendBatchSummaries. # noqa: E501 :param bulk_process_queue_limit: The bulk_process_queue_limit of this BulkSendBatchSummaries. # noqa: E501 :type: str """ self._bulk_process_queue_limit = bulk_process_queue_limit @property def bulk_process_total_queued(self): """Gets the bulk_process_total_queued of this BulkSendBatchSummaries. # noqa: E501 # noqa: E501 :return: The bulk_process_total_queued of this BulkSendBatchSummaries. # noqa: E501 :rtype: str """ return self._bulk_process_total_queued @bulk_process_total_queued.setter def bulk_process_total_queued(self, bulk_process_total_queued): """Sets the bulk_process_total_queued of this BulkSendBatchSummaries. # noqa: E501 :param bulk_process_total_queued: The bulk_process_total_queued of this BulkSendBatchSummaries. # noqa: E501 :type: str """ self._bulk_process_total_queued = bulk_process_total_queued @property def end_position(self): """Gets the end_position of this BulkSendBatchSummaries. # noqa: E501 The last position in the result set. # noqa: E501 :return: The end_position of this BulkSendBatchSummaries. # noqa: E501 :rtype: str """ return self._end_position @end_position.setter def end_position(self, end_position): """Sets the end_position of this BulkSendBatchSummaries. The last position in the result set. # noqa: E501 :param end_position: The end_position of this BulkSendBatchSummaries. # noqa: E501 :type: str """ self._end_position = end_position @property def next_uri(self): """Gets the next_uri of this BulkSendBatchSummaries. # noqa: E501 The URI to the next chunk of records based on the search request. If the endPosition is the entire results of the search, this is null. # noqa: E501 :return: The next_uri of this BulkSendBatchSummaries. # noqa: E501 :rtype: str """ return self._next_uri @next_uri.setter def next_uri(self, next_uri): """Sets the next_uri of this BulkSendBatchSummaries. The URI to the next chunk of records based on the search request. If the endPosition is the entire results of the search, this is null. # noqa: E501 :param next_uri: The next_uri of this BulkSendBatchSummaries. # noqa: E501 :type: str """ self._next_uri = next_uri @property def previous_uri(self): """Gets the previous_uri of this BulkSendBatchSummaries. # noqa: E501 The postal code for the billing address. # noqa: E501 :return: The previous_uri of this BulkSendBatchSummaries. # noqa: E501 :rtype: str """ return self._previous_uri @previous_uri.setter def previous_uri(self, previous_uri): """Sets the previous_uri of this BulkSendBatchSummaries. The postal code for the billing address. # noqa: E501 :param previous_uri: The previous_uri of this BulkSendBatchSummaries. # noqa: E501 :type: str """ self._previous_uri = previous_uri @property def queue_limit(self): """Gets the queue_limit of this BulkSendBatchSummaries. # noqa: E501 # noqa: E501 :return: The queue_limit of this BulkSendBatchSummaries. # noqa: E501 :rtype: str """ return self._queue_limit @queue_limit.setter def queue_limit(self, queue_limit): """Sets the queue_limit of this BulkSendBatchSummaries. # noqa: E501 :param queue_limit: The queue_limit of this BulkSendBatchSummaries. # noqa: E501 :type: str """ self._queue_limit = queue_limit @property def result_set_size(self): """Gets the result_set_size of this BulkSendBatchSummaries. # noqa: E501 The number of results returned in this response. # noqa: E501 :return: The result_set_size of this BulkSendBatchSummaries. # noqa: E501 :rtype: str """ return self._result_set_size @result_set_size.setter def result_set_size(self, result_set_size): """Sets the result_set_size of this BulkSendBatchSummaries. The number of results returned in this response. # noqa: E501 :param result_set_size: The result_set_size of this BulkSendBatchSummaries. # noqa: E501 :type: str """ self._result_set_size = result_set_size @property def start_position(self): """Gets the start_position of this BulkSendBatchSummaries. # noqa: E501 Starting position of the current result set. # noqa: E501 :return: The start_position of this BulkSendBatchSummaries. # noqa: E501 :rtype: str """ return self._start_position @start_position.setter def start_position(self, start_position): """Sets the start_position of this BulkSendBatchSummaries. Starting position of the current result set. # noqa: E501 :param start_position: The start_position of this BulkSendBatchSummaries. # noqa: E501 :type: str """ self._start_position = start_position @property def total_queued(self): """Gets the total_queued of this BulkSendBatchSummaries. # noqa: E501 # noqa: E501 :return: The total_queued of this BulkSendBatchSummaries. # noqa: E501 :rtype: str """ return self._total_queued @total_queued.setter def total_queued(self, total_queued): """Sets the total_queued of this BulkSendBatchSummaries. # noqa: E501 :param total_queued: The total_queued of this BulkSendBatchSummaries. # noqa: E501 :type: str """ self._total_queued = total_queued @property def total_set_size(self): """Gets the total_set_size of this BulkSendBatchSummaries. # noqa: E501 The total number of items available in the result set. This will always be greater than or equal to the value of the property returning the results in the in the response. # noqa: E501 :return: The total_set_size of this BulkSendBatchSummaries. # noqa: E501 :rtype: str """ return self._total_set_size @total_set_size.setter def total_set_size(self, total_set_size): """Sets the total_set_size of this BulkSendBatchSummaries. The total number of items available in the result set. This will always be greater than or equal to the value of the property returning the results in the in the response. # noqa: E501 :param total_set_size: The total_set_size of this BulkSendBatchSummaries. # noqa: E501 :type: str """ self._total_set_size = total_set_size def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() elif isinstance(value, dict): result[attr] = dict(map( lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item, value.items() )) else: result[attr] = value if issubclass(BulkSendBatchSummaries, dict): for key, value in self.items(): result[key] = value return result def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict()) def __repr__(self): """For `print` and `pprint`""" return self.to_str() def __eq__(self, other): """Returns true if both objects are equal""" if not isinstance(other, BulkSendBatchSummaries): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" if not isinstance(other, BulkSendBatchSummaries): return True return self.to_dict() != other.to_dict()
{'content_hash': 'd67627183aec21c3cc6b862f6202171a', 'timestamp': '', 'source': 'github', 'line_count': 419, 'max_line_length': 193, 'avg_line_length': 33.99761336515513, 'alnum_prop': 0.6138996138996139, 'repo_name': 'docusign/docusign-python-client', 'id': '680e629b62a16589df1f0ac43010009927c528e1', 'size': '14262', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'docusign_esign/models/bulk_send_batch_summaries.py', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Python', 'bytes': '9687716'}]}
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = isLeapYear; var _index = require('../toDate/index.js'); var _index2 = _interopRequireDefault(_index); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * @name isLeapYear * @category Year Helpers * @summary Is the given date in the leap year? * * @description * Is the given date in the leap year? * * @param {Date|String|Number} date - the date to check * @param {Options} [options] - the object with options. See [Options]{@link https://date-fns.org/docs/Options} * @param {0|1|2} [options.additionalDigits=2] - passed to `toDate`. See [toDate]{@link https://date-fns.org/docs/toDate} * @returns {Boolean} the date is in the leap year * @throws {TypeError} 1 argument required * @throws {RangeError} `options.additionalDigits` must be 0, 1 or 2 * * @example * // Is 1 September 2012 in the leap year? * var result = isLeapYear(new Date(2012, 8, 1)) * //=> true */ function isLeapYear(dirtyDate, dirtyOptions) { if (arguments.length < 1) { throw new TypeError('1 argument required, but only ' + arguments.length + ' present'); } var date = (0, _index2.default)(dirtyDate, dirtyOptions); var year = date.getFullYear(); return year % 400 === 0 || year % 4 === 0 && year % 100 !== 0; } module.exports = exports['default'];
{'content_hash': 'f4661c990444dc4c5c0b5656c09b5648', 'timestamp': '', 'source': 'github', 'line_count': 43, 'max_line_length': 121, 'avg_line_length': 32.69767441860465, 'alnum_prop': 0.6692745376955903, 'repo_name': 'lucionei/chamadotecnico', 'id': '9a83973954309ab1ecbc756622fe70ce896e3860', 'size': '1406', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'chamadosTecnicosFinal-app/node_modules/date-fns/isLeapYear/index.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '4187'}, {'name': 'HTML', 'bytes': '18078'}, {'name': 'Java', 'bytes': '30643'}, {'name': 'JavaScript', 'bytes': '23666'}]}
package com.thinkbiganalytics.spark; import com.beust.jcommander.Parameter; import com.beust.jcommander.Parameters; /** * Command-line options for the Spark Shell client. */ @Parameters(separators = " =") public class SparkShellOptions { /** * Indicates the timeout is disabled */ public static final int INDEFINITE_TIMEOUT = 0; /** * Indicates no port number was specified */ public static final int NO_PORT = -1; /** * Time to wait for a request before terminating */ @Parameter(names = "--idle-timeout", description = "Time to wait for a request before terminating") private int idleTimeout = INDEFINITE_TIMEOUT; /** * Process marker used by the run script */ @Parameter(names = "--pgrep-marker", description = "Not used") private String marker; /** * Maximum port number to listen on */ @Parameter(names = "--port-max", description = "Maximum port number to listen on") private int portMax = NO_PORT; /** * Minimum port number to listen on */ @Parameter(names = "--port-min", description = "Minimum port number to listen on") private int portMin = NO_PORT; /** * Path to keystore */ @Parameter(names = "--server-keystore-path", description = "Path to keystore for registration server") private String serverKeystorePath; /** * Password for keystore */ @Parameter(names = "--server-keystore-password", description = "Password for keystore") private String serverKeystorePassword; /** * Registration URL */ @Parameter(names = "--server-url", description = "Registration URL") private String serverUrl; /** * Indicates the amount of time in seconds to wait for a user request before terminating a Spark Shell process. A value of {@link #INDEFINITE_TIMEOUT} should disable the timeout. * * @return the idle timeout */ public int getIdleTimeout() { return idleTimeout; } /** * Gets the maximum port number that a Spark Shell process may listen on. * * @return the maximum port number */ public int getPortMax() { return portMax; } /** * Gets the minimum port number that a Spark Shell process may listen on. * * @return the minimum port number */ public int getPortMin() { return portMin; } /** * Gets the password for the keystore. */ public String getServerKeystorePassword() { return serverKeystorePassword; } /** * Gets the path to the keystore for the registration server. */ public String getServerKeystorePath() { return serverKeystorePath; } /** * Gets the registration URL. */ public String getServerUrl() { return serverUrl; } }
{'content_hash': '43cf486780e8fa0c73f2a9b119a5aba6', 'timestamp': '', 'source': 'github', 'line_count': 113, 'max_line_length': 182, 'avg_line_length': 25.300884955752213, 'alnum_prop': 0.627841902763204, 'repo_name': 'Teradata/kylo', 'id': '4933243bd3d96280faa7e1cc0b46700425d84c92', 'size': '3521', 'binary': False, 'copies': '4', 'ref': 'refs/heads/master', 'path': 'integrations/spark/spark-shell-client/spark-shell-client-app/src/main/java/com/thinkbiganalytics/spark/SparkShellOptions.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'CSS', 'bytes': '206880'}, {'name': 'FreeMarker', 'bytes': '785'}, {'name': 'HTML', 'bytes': '1076578'}, {'name': 'Java', 'bytes': '13931541'}, {'name': 'JavaScript', 'bytes': '1956411'}, {'name': 'PLpgSQL', 'bytes': '46248'}, {'name': 'SQLPL', 'bytes': '8898'}, {'name': 'Scala', 'bytes': '72686'}, {'name': 'Shell', 'bytes': '124425'}, {'name': 'TypeScript', 'bytes': '3763974'}]}
package app.models.api.base; import app.models.api.domains.CreatedBy; import app.models.api.domains.UpdatedBy; import leap.lang.enums.Bool; import leap.lang.meta.annotation.Creatable; import leap.lang.meta.annotation.Property; import leap.lang.meta.annotation.Sortable; import leap.orm.annotation.Column; import leap.orm.annotation.Id; import leap.orm.annotation.domain.CreatedAt; import leap.orm.annotation.domain.UpdatedAt; import leap.orm.model.Model; import java.util.Date; public abstract class ModelBase extends Model { @Id(generator = "shortid") @CreatedBy protected String id; @Column @Property(filterable = Bool.TRUE, creatable = Bool.FALSE, updatable = Bool.FALSE) protected String createdBy; @Column @UpdatedBy @Property(filterable = Bool.TRUE, creatable = Bool.FALSE, updatable = Bool.FALSE) protected String updatedBy; @Column @CreatedAt @Sortable @Property(filterable = Bool.TRUE, creatable = Bool.FALSE, updatable = Bool.FALSE) protected Date createdAt; @Column @UpdatedAt @Property(filterable = Bool.TRUE, creatable = Bool.FALSE, updatable = Bool.FALSE) protected Date updatedAt; public String getId() { return id; } public void setId(String id) { this.id = id; } public Date getCreatedAt() { return createdAt; } public void setCreatedAt(Date createdAt) { this.createdAt = createdAt; } public Date getUpdatedAt() { return updatedAt; } public void setUpdatedAt(Date updatedAt) { this.updatedAt = updatedAt; } public String getCreatedBy() { return createdBy; } public void setCreatedBy(String createdBy) { this.createdBy = createdBy; } public String getUpdatedBy() { return updatedBy; } public void setUpdatedBy(String updatedBy) { this.updatedBy = updatedBy; } }
{'content_hash': '7053e381fbfc804d69ce10a1cde7d6be', 'timestamp': '', 'source': 'github', 'line_count': 84, 'max_line_length': 85, 'avg_line_length': 23.011904761904763, 'alnum_prop': 0.6813243662700466, 'repo_name': 'leapframework/framework', 'id': '131cf108309dd5e224904c49c04ab547e6d8ad96', 'size': '2593', 'binary': False, 'copies': '1', 'ref': 'refs/heads/dev', 'path': 'tests/webapi-test/src/main/java/app/models/api/base/ModelBase.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'CSS', 'bytes': '355'}, {'name': 'HTML', 'bytes': '645766'}, {'name': 'Java', 'bytes': '13020209'}, {'name': 'JavaScript', 'bytes': '167'}, {'name': 'PLSQL', 'bytes': '30834'}, {'name': 'Shell', 'bytes': '66'}]}
import { Injectable, Inject } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { IAppConfig, APP_CONFIG } from '../app.config'; import { AuthService } from './auth.service'; import { MasterService } from './master.service'; import { Observable } from 'rxjs/Observable'; @Injectable() export class SalesOrderItemService extends MasterService { constructor(private anHttp: HttpClient, @Inject(APP_CONFIG) private aConfig: IAppConfig, private anAuthService: AuthService) { super(anHttp, aConfig, anAuthService); this.setApiUrl('salesOrderItems/'); } getSalesOrderBookPage(customer, customerItem, salesOrder, startDate, endDate, page, size): Observable<any> { return this.http.get(this.apiUrl + 'salesOrderBook?customer=' + customer+ '&customerItem=' + customerItem + '&salesOrder=' + salesOrder +'&startDate=' + startDate + '&endDate=' + endDate + '&page=' + page + '&size=' + size, { headers: this.getJsonHeaders() }) .catch(err => this.handleError(err)); } }
{'content_hash': 'e3892274d328df5d718960c91fb9c634', 'timestamp': '', 'source': 'github', 'line_count': 20, 'max_line_length': 263, 'avg_line_length': 50.9, 'alnum_prop': 0.7141453831041258, 'repo_name': 'thilina01/kpi-client', 'id': '81c6a9182fba8d36034bb8ad4a8c2b8e9651f8ca', 'size': '1018', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/app/services/salesOrderItem.service.ts', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Batchfile', 'bytes': '52'}, {'name': 'CSS', 'bytes': '115830'}, {'name': 'Dockerfile', 'bytes': '381'}, {'name': 'HTML', 'bytes': '775116'}, {'name': 'JavaScript', 'bytes': '38435'}, {'name': 'SCSS', 'bytes': '109026'}, {'name': 'Shell', 'bytes': '269'}, {'name': 'TypeScript', 'bytes': '1428974'}]}
using System.Collections.Generic; using System.Linq; using Chiro.Gap.Domain; using Chiro.Gap.Poco.Model; using Chiro.Gap.Poco.Model.Exceptions; using Chiro.Gap.Test; using NUnit.Framework; namespace Chiro.Gap.Workers.Test { /// <summary> /// Dit is een testclass voor Unit Tests van FunctiesManagerTest, /// to contain all FunctiesManagerTest Unit Tests /// </summary> [TestFixture] public class FunctiesManagerTest: ChiroTest { #pragma warning disable CS0168 // Variable is declared but never used Services.Dev.AdServiceMock blablabla; #pragma warning restore CS0168 // Variable is declared but never used /// <summary> /// Opsporen functie met te veel aantal members /// </summary> [Test] public void TweeKeerUniekeFunctieToekennenTestVerschillendLid() { // ARRANGE var groepsWerkJaar = new GroepsWerkJaar { Groep = new ChiroGroep(), WerkJaar = 2012 }; groepsWerkJaar.Groep.GroepsWerkJaar.Add(groepsWerkJaar); var uniekeFunctie = new Functie { MaxAantal = 1, Groep = groepsWerkJaar.Groep, Niveau = Niveau.Groep }; var lid1 = new Leiding { GroepsWerkJaar = groepsWerkJaar, Functie = new List<Functie> { uniekeFunctie } }; var lid2 = new Leiding { GroepsWerkJaar = groepsWerkJaar }; uniekeFunctie.Lid.Add(lid1); groepsWerkJaar.Lid.Add(lid1); groepsWerkJaar.Lid.Add(lid2); // ACT var functiesManager = Factory.Maak<FunctiesManager>(); functiesManager.Toekennen(lid2, new List<Functie> { uniekeFunctie }); // ASSERT var issues = functiesManager.AantallenControleren(groepsWerkJaar, new List<Functie> {uniekeFunctie}); Assert.IsTrue(issues.Select(src=>src.ID).Contains(uniekeFunctie.ID)); } /// <summary> /// Als een functie maar 1 keer mag voorkomen, maar ze wordt 2 keer toegekend aan dezelfde /// persoon, dan moet dat zonder problemen kunnen. /// </summary> [Test] public void TweeKeerUniekeFunctieToekennenTestZelfdeLid() { // Arrange // Genereer de situatie var groep = new ChiroGroep(); var groepsWerkJaar = new GroepsWerkJaar {Groep = groep}; groep.GroepsWerkJaar = new List<GroepsWerkJaar> {groepsWerkJaar}; var leider = new Leiding {GroepsWerkJaar = groepsWerkJaar}; var functie = new Functie { MaxAantal = 1, Type = LidType.Alles, IsNationaal = true, Niveau = Niveau.Alles }; var fm = Factory.Maak<FunctiesManager>(); // Act fm.Toekennen(leider, new[]{functie}); fm.Toekennen(leider, new[]{functie}); // Assert var problemen = fm.AantallenControleren(groepsWerkJaar, new[]{functie}); Assert.AreEqual(problemen.Count(), 0); } /// <summary> /// Het toekennen van een functie die niet geldig is in het huidige werkjaar, moet /// een exception opleveren /// </summary> [Test] public void ToekennenFunctieOngeldigWerkJaar() { // ARRANGE var groepsWerkJaar = new GroepsWerkJaar { Groep = new ChiroGroep(), WerkJaar = 2012 }; groepsWerkJaar.Groep.GroepsWerkJaar.Add(groepsWerkJaar); var lid = new Leiding {GroepsWerkJaar = groepsWerkJaar}; var vervallenFunctie = new Functie { WerkJaarTot = groepsWerkJaar.WerkJaar - 1, MinAantal = 1, Groep = groepsWerkJaar.Groep, Niveau = Niveau.Groep }; var functiesManager = Factory.Maak<FunctiesManager>(); // ASSERT Assert.Throws<FoutNummerException>(() => functiesManager.Toekennen(lid, new List<Functie>{vervallenFunctie})); // Als er geen exception gethrowd worden, zal de test failen. } /// <summary> /// Functies voor leiding mogen niet aan een kind toegewezen worden. /// </summary> [Test] public void ToekennenLidFunctieAanLeiding() { // Arrange var fm = Factory.Maak<FunctiesManager>(); Groep groep = new ChiroGroep { Functie = new List<Functie>() }; var functie = new Functie { Groep = groep, MaxAantal = 1, MinAantal = 0, Niveau = Niveau.LidInGroep }; groep.Functie.Add(functie); var leider = new Leiding { GroepsWerkJaar = new GroepsWerkJaar {Groep = groep} }; groep.GroepsWerkJaar.Add(leider.GroepsWerkJaar); // Assert Assert.Throws<FoutNummerException>(() => fm.Toekennen(leider, new List<Functie> {functie})); } /// <summary> /// Verplichte functie die niet toegekend wordt /// </summary> [Test] public void NietToegekendeVerplichteFunctie() { // ARRANGE var g = new ChiroGroep(); // een (eigen) functie waarvan er precies 1 moet zijn var f = new Functie { MinAantal = 1, Type = LidType.Alles, ID = 1, IsNationaal = false, Niveau = Niveau.Alles, Groep = g, }; // groepswerkjaar zonder leden var gwj = new GroepsWerkJaar { Lid = new List<Lid>(), Groep = g }; // Maak een functiesmanager var fm = Factory.Maak<FunctiesManager>(); // ACT var problemen = fm.AantallenControleren(gwj, new[] {f}); // ASSERT Assert.IsTrue(problemen.Any(prb => prb.ID == f.ID)); } /// <summary> /// Kijkt na of de verplichte aantallen genegeerd worden voor functies die niet geldig zijn /// in het gegeven groepswerkjaar. /// </summary> [Test] public void IrrelevanteVerplichteFunctie() { // ARRANGE var groepsWerkJaar = new GroepsWerkJaar {Groep = new ChiroGroep(), WerkJaar = 2012}; var vervallenFunctie = new Functie { WerkJaarTot = groepsWerkJaar.WerkJaar - 1, MinAantal = 1, Groep = groepsWerkJaar.Groep }; // ACT var functiesManager = Factory.Maak<FunctiesManager>(); var probleemIDs = functiesManager.AantallenControleren(groepsWerkJaar, new List<Functie> {vervallenFunctie}).Select(src => src.ID); // ASSERT Assert.IsFalse(probleemIDs.Contains(vervallenFunctie.ID)); } /// <summary> /// Kijkt na of er een exception opgeworpen wordt als iemand zonder e-mailadres contactpersoon wil worden. /// </summary> [Test] public void ContactZonderEmail() { // ARRANGE var groepsWerkJaar = new GroepsWerkJaar { Groep = new ChiroGroep(), WerkJaar = 2012 }; groepsWerkJaar.Groep.GroepsWerkJaar.Add(groepsWerkJaar); var contactPersoonFunctie = new Functie { ID = (int)NationaleFunctie.ContactPersoon, MinAantal = 1, IsNationaal = true, Niveau = Niveau.LeidingInGroep, }; var lid = new Leiding { GroepsWerkJaar = groepsWerkJaar, GelieerdePersoon = new GelieerdePersoon() }; var functiesManager = Factory.Maak<FunctiesManager>(); // ASSERT var ex = Assert.Throws<FoutNummerException>( () => functiesManager.Toekennen(lid, new List<Functie> {contactPersoonFunctie})); Assert.AreEqual(FoutNummer.EMailVerplicht, ex.FoutNummer); } /// <summary> /// Standaard 'AantallenControleren'. Nakijken of rekening wordt gehouden /// met nationaal bepaalde functies. /// </summary> [Test] public void OntbrekendeNationaalBepaaldeFuncties() { // ARRANGE // een nationale functie waarvan er precies 1 moet zijn var f = new Functie { MinAantal = 1, Type = LidType.Alles, ID = 1, IsNationaal = true, Niveau = Niveau.Alles }; // groepswerkjaar zonder leden var gwj = new GroepsWerkJaar { Lid = new List<Lid>() }; // Maak een functiesmanager var fm = Factory.Maak<FunctiesManager>(); // ACT var problemen = fm.AantallenControleren(gwj, new[] { f }); // ASSERT Assert.IsTrue(problemen.Any(prb => prb.ID == f.ID)); } /// <summary> /// Testfuncties vervangen /// </summary> [Test] public void FunctiesVervangen() { // Arrange // testdata var gwj = new GroepsWerkJaar(); var groep = new ChiroGroep { GroepsWerkJaar = new List<GroepsWerkJaar> { gwj } }; gwj.Groep = groep; var contactPersoon = new Functie { ID = 1, IsNationaal = true, Niveau = Niveau.Alles, Naam = "Contactpersoon", Type = LidType.Leiding }; var finVer = new Functie { ID = 2, IsNationaal = true, Niveau = Niveau.Alles, Naam = "FinancieelVerantwoordelijke", Type = LidType.Leiding }; var vb = new Functie { ID = 3, IsNationaal = true, Niveau = Niveau.Alles, Naam = "VB", Type = LidType.Leiding }; var redactie = new Functie { ID = 4, IsNationaal = false, Niveau = Niveau.Groep, Naam = "RED", Type = LidType.Leiding, Groep = groep }; var leiding = new Leiding { ID = 100, GroepsWerkJaar = gwj, Functie = new List<Functie> { contactPersoon, redactie }, GelieerdePersoon = new GelieerdePersoon { Groep = groep } }; var functiesMgr = Factory.Maak<FunctiesManager>(); // ACT var leidingsFuncties = leiding.Functie; // bewaren voor latere referentie functiesMgr.Vervangen(leiding, new List<Functie> { finVer, vb, redactie }); // ASSERT Assert.AreEqual(leiding.Functie.Count(), 3); Assert.IsTrue(leiding.Functie.Contains(finVer)); Assert.IsTrue(leiding.Functie.Contains(vb)); Assert.IsTrue(leiding.Functie.Contains(redactie)); // om problemen te vermijden met entity framework, mag je bestaande collecties niet zomaar vervangen; // je moet entiteiten toevoegen aan/verwijderen uit bestaande collecties. Assert.AreEqual(leiding.Functie, leidingsFuncties); } /// <summary> /// probeert een functie die dit jaar in gebruik is te verwijderen. We verwachten een exception. /// </summary> [Test] public void FunctieDitJaarInGebruikVerwijderenTest() { // arrange // testsituatie creeren var functie = new Functie(); var groepswerkjaar = new GroepsWerkJaar { ID = 11, Groep = new ChiroGroep { ID = 1, GroepsWerkJaar = new List<GroepsWerkJaar>() } }; groepswerkjaar.Groep.GroepsWerkJaar.Add(groepswerkjaar); functie.Groep = groepswerkjaar.Groep; var lid = new Leiding {Functie = new List<Functie>() {functie}, GroepsWerkJaar = groepswerkjaar}; functie.Lid.Add(lid); var mgr = Factory.Maak<FunctiesManager>(); // assert Assert.Throws<BlokkerendeObjectenException<Lid>>(() => mgr.Verwijderen(functie, false)); } /// <summary> /// probeert een functie die zowel dit jaar als vorig jaar gebruikt is, /// geforceerd te verwijderen. We verwachten dat het 'werkJaar tot' wordt /// ingevuld. /// </summary> [Test] public void FunctieLangerInGebruikGeforceerdVerwijderenTest() { // ARRANGE // model var groep = new ChiroGroep(); var vorigWerkJaar = new GroepsWerkJaar {WerkJaar = 2011, Groep = groep, ID = 2}; var ditWerkJaar = new GroepsWerkJaar {WerkJaar = 2012, Groep = groep, ID = 3}; groep.GroepsWerkJaar.Add(vorigWerkJaar); groep.GroepsWerkJaar.Add(ditWerkJaar); var functie = new Functie {Groep = groep, ID = 1}; groep.Functie.Add(functie); var gelieerdePersoon = new GelieerdePersoon {Groep = groep}; groep.GelieerdePersoon.Add(gelieerdePersoon); var leidingToen = new Leiding {GelieerdePersoon = gelieerdePersoon, GroepsWerkJaar = vorigWerkJaar}; var leidingNu = new Leiding {GelieerdePersoon = gelieerdePersoon, GroepsWerkJaar = ditWerkJaar}; vorigWerkJaar.Lid.Add(leidingToen); ditWerkJaar.Lid.Add(leidingNu); leidingToen.Functie.Add(functie); leidingNu.Functie.Add(functie); functie.Lid.Add(leidingToen); functie.Lid.Add(leidingNu); // ACT var mgr = Factory.Maak<FunctiesManager>(); var result = mgr.Verwijderen(functie, true); // ASSERT // functie niet meer geldig Assert.IsTrue(groep.Functie.Contains(functie)); Assert.AreEqual(result.WerkJaarTot, ditWerkJaar.WerkJaar - 1); // enkel het lid van dit werkJaar blijft over Assert.AreEqual(result.Lid.Count, 1); } /// <summary> /// Bekijkt AantallenControleren wel degelijk enkel de angeleverde functies? /// </summary> [Test] public void AantallenControlerenBeperkTest() { // ARRANGE var functie1 = new Functie {MaxAantal = 1}; var functie2 = new Functie(); var groepsWerkJaar = new GroepsWerkJaar(); groepsWerkJaar.Lid.Add(new Leiding {Functie = new List<Functie> {functie1}}); groepsWerkJaar.Lid.Add(new Leiding {Functie = new List<Functie> {functie1}}); // 2 personen met de functie // ACT var target = Factory.Maak<FunctiesManager>(); var actual = target.AantallenControleren(groepsWerkJaar, new List<Functie>{functie2}); // controleer enkel op functie2. // ASSERT Assert.AreEqual(0, actual.Count); } /// <summary> /// Test op het controleren van maximum aantal leden met gegeven functie. ///</summary> [Test] public void AantallenControlerenBovengrensTest() { // ARRANGE var functie = new Functie { IsNationaal = true, MaxAantal = 1 }; var groepsWerkJaar1 = new GroepsWerkJaar(); var leiding1 = new Leiding {Functie = new List<Functie> {functie}}; functie.Lid.Add(leiding1); groepsWerkJaar1.Lid.Add(leiding1); var groepsWerkJaar2 = new GroepsWerkJaar(); var leiding2 = new Leiding { Functie = new List<Functie> { functie } }; functie.Lid.Add(leiding2); groepsWerkJaar2.Lid.Add(leiding2); // ACT var target = Factory.Maak<FunctiesManager>(); var actual = target.AantallenControleren(groepsWerkJaar1, new List<Functie> { functie }); // controleer enkel op functie2. // ASSERT Assert.AreEqual(0, actual.Count); } } }
{'content_hash': '0d5c61380a04385a15f9f45b31815bff', 'timestamp': '', 'source': 'github', 'line_count': 520, 'max_line_length': 143, 'avg_line_length': 33.738461538461536, 'alnum_prop': 0.5148198814409485, 'repo_name': 'Chirojeugd-Vlaanderen/gap', 'id': '91d5c5edf7a8ae19fd258c5776056816944948d5', 'size': '18272', 'binary': False, 'copies': '1', 'ref': 'refs/heads/dev', 'path': 'Solution/TestProjecten/Chiro.Gap.Workers.Test/FunctiesManagerTest.cs', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'ASP', 'bytes': '412956'}, {'name': 'C#', 'bytes': '2255924'}, {'name': 'CSS', 'bytes': '28536'}, {'name': 'JavaScript', 'bytes': '51309'}, {'name': 'PLSQL', 'bytes': '1032'}, {'name': 'PLpgSQL', 'bytes': '339'}, {'name': 'SQLPL', 'bytes': '17329'}, {'name': 'Shell', 'bytes': '96'}]}
;(function() { var highest_temp = 0; var lowest_temp = Number.MAX_VALUE; $('#webgl_container').height($(window).height() - $('#webgl_container').offset().top - 20); asterank3d = new Asterank3D({ container: document.getElementById('webgl_container'), camera_position: [0, -65, 65], camera_fly_around: false, sun_scale: 25, jed_step_interval: .15, custom_object_fn: function(obj) { var heatcolor; if (obj['p_temp'] < 323.16 && obj['p_temp'] > 273.16 && obj['p_radius'] < 100) { // goldilocks green heatcolor = new THREE.Color(0x00ff00); } else { var pct_temp = obj['p_temp'] / (highest_temp - lowest_temp) * 100; // red hottest, blue coolest (colloquial interpretation) heatcolor = new THREE.Color(getColorFromPercent(pct_temp, 0xff0000, 0x0000ff)); } // size var size = obj['p_radius'] / 2; return { color: 0xcccccc, display_color: heatcolor, width: 2, object_size: size }; }, object_texture_path: "/static/img/cloud_defined.png", not_supported_callback: function() { $('#intro').remove(); $('#webgl-not-supported').show(); } }); asterank3d.clearRankings(); $.getJSON('/api/exoplanets?query={"a":{"$ne":"", "$gt": 0.1}}&limit=3000', function(data) { $.each(data, function() { highest_temp = Math.max(highest_temp, this['p_temp']); lowest_temp = Math.min(lowest_temp, this['p_temp']); }); asterank3d.processAsteroidRankings(data); }); })();
{'content_hash': '479d69c1934303c74fcc09be2c78b12d', 'timestamp': '', 'source': 'github', 'line_count': 56, 'max_line_length': 93, 'avg_line_length': 28.0, 'alnum_prop': 0.5771683673469388, 'repo_name': 'xkxx/last-voyage', 'id': '565cb494577dd2f444eba7503dacae83b897c859', 'size': '1569', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'static/js/3d/kepler3d.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '7519'}, {'name': 'HTML', 'bytes': '2841554'}, {'name': 'JavaScript', 'bytes': '233554'}, {'name': 'Python', 'bytes': '91279'}, {'name': 'Shell', 'bytes': '20606'}]}
@class JunitFrameworkTestResult; #include "J2ObjC_header.h" #include "junit/framework/Assert.h" #include "junit/framework/Test.h" @interface JunitExtensionsTestDecorator : JunitFrameworkAssert < JunitFrameworkTest > { @public id<JunitFrameworkTest> fTest_; } - (instancetype)initWithJunitFrameworkTest:(id<JunitFrameworkTest>)test; - (void)basicRunWithJunitFrameworkTestResult:(JunitFrameworkTestResult *)result; - (jint)countTestCases; - (void)runWithJunitFrameworkTestResult:(JunitFrameworkTestResult *)result; - (NSString *)description; - (id<JunitFrameworkTest>)getTest; @end J2OBJC_EMPTY_STATIC_INIT(JunitExtensionsTestDecorator) J2OBJC_FIELD_SETTER(JunitExtensionsTestDecorator, fTest_, id<JunitFrameworkTest>) CF_EXTERN_C_BEGIN CF_EXTERN_C_END J2OBJC_TYPE_LITERAL_HEADER(JunitExtensionsTestDecorator) #endif // _JunitExtensionsTestDecorator_H_
{'content_hash': 'fc36ca879698de01b15c0189bfe30397', 'timestamp': '', 'source': 'github', 'line_count': 35, 'max_line_length': 87, 'avg_line_length': 24.8, 'alnum_prop': 0.8099078341013825, 'repo_name': 'hambroperks/pollexor', 'id': '7d7825062de25ff81c6ade28cfe4a713570b84be', 'size': '1108', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'Pods/J2ObjC/dist/include/junit/extensions/TestDecorator.h', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'CSS', 'bytes': '1040'}, {'name': 'HTML', 'bytes': '4169'}, {'name': 'Java', 'bytes': '59016'}, {'name': 'Objective-C', 'bytes': '87524'}, {'name': 'Ruby', 'bytes': '1420'}, {'name': 'Shell', 'bytes': '2482'}]}
<Record> <Term>Treloxinate</Term> <SemanticType>Pharmacologic Substance</SemanticType> <ParentTerm>Antilipidemic Agent</ParentTerm> <ClassificationPath>Chemicals_and_Drugs_Kind/Drug, Food, Chemical or Biomedical Material/Pharmacologic Substance/Adjuvant/Antilipidemic Agent/Treloxinate</ClassificationPath> <BroaderTerm>Treloxinate</BroaderTerm> <BroaderTerm>Chemicals_and_Drugs_Kind</BroaderTerm> <BroaderTerm>Pharmacologic Substance</BroaderTerm> <BroaderTerm>Adjuvant</BroaderTerm> <BroaderTerm>Antilipidemic Agent</BroaderTerm> <BroaderTerm>Drug, Food, Chemical or Biomedical Material</BroaderTerm> <Synonym>TRELOXINATE</Synonym> <Synonym>Treloxinate</Synonym> <Source>NCI Thesaurus</Source> </Record>
{'content_hash': '6ae932ed2f51c1596113c376a673fc88', 'timestamp': '', 'source': 'github', 'line_count': 15, 'max_line_length': 174, 'avg_line_length': 48.06666666666667, 'alnum_prop': 0.8169209431345353, 'repo_name': 'detnavillus/modular-informatic-designs', 'id': 'a2f2f635cfdc7633bed773fba6e7a075e680ebb1', 'size': '721', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'pipeline/src/test/resources/thesaurus/pharmacologicsubstance/treloxinate.xml', 'mode': '33261', 'license': 'apache-2.0', 'language': [{'name': 'Java', 'bytes': '2069134'}]}
package net.glowstone.net.message.play.entity; import com.flowpowered.network.Message; import lombok.Data; import lombok.RequiredArgsConstructor; import org.bukkit.EntityEffect; @Data @RequiredArgsConstructor public final class EntityStatusMessage implements Message { // statuses not included in Bukkit's EntityEffect public static final int MYSTERY_LIVING = 0; public static final int MYSTERY_PLAYER = 1; public static final int GOLEM_FLING_ARMS = 4; public static final int EATING_ACCEPTED = 9; public static final int ANIMAL_HEARTS = 18; public static final int ENABLE_REDUCED_DEBUG_INFO = 22; public static final int DISABLE_REDUCED_DEBUG_INFO = 23; public static final int OP_LEVEL_0 = 24; public static final int OP_LEVEL_1 = 25; public static final int OP_LEVEL_2 = 26; public static final int OP_LEVEL_3 = 27; public static final int OP_LEVEL_4 = 28; private final int id, status; public EntityStatusMessage(int id, EntityEffect effect) { this(id, effect.getData()); } }
{'content_hash': '14e18f79c205da9df8aefd8b82100a39', 'timestamp': '', 'source': 'github', 'line_count': 32, 'max_line_length': 61, 'avg_line_length': 33.0625, 'alnum_prop': 0.7287334593572778, 'repo_name': 'GreenBeard/GlowstonePlusPlus', 'id': 'e7d6fa779e1e34d101dce5b61a8650f5c8ce62df', 'size': '1058', 'binary': False, 'copies': '3', 'ref': 'refs/heads/master', 'path': 'src/main/java/net/glowstone/net/message/play/entity/EntityStatusMessage.java', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Java', 'bytes': '2375948'}, {'name': 'Python', 'bytes': '1031'}, {'name': 'Ruby', 'bytes': '335'}, {'name': 'Shell', 'bytes': '2214'}]}
<?php //google fonts //class MyHandler(webapp.RequestHandler): function add_index($fieldname, $fields, $type = '', $overwrite = false) { $this->init_table_info(); if (!is_array($fields)) { $fields = array($fields); } /* // this error is hard to work with, especially with the upgrade script stuff, // so let this case fall through and through a SQL error $badfields = array(); foreach ($fields AS $name) { if (empty($this->table_field_data["$name"])) { $badfields[] = $name; } } if (!empty($badfields)) { $this->set_error(ERRDB_FIELD_DOES_NOT_EXIST, implode(', ', $badfields)); return false; }*/ $failed = false; if (!empty($this->table_index_data["$fieldname"])) { // this looks for an existing index that matches what we want to create and uses it, Not exact .. doesn't check for defined length i.e. char(10) if (count($fields) == count($this->table_index_data["$fieldname"])) { foreach($fields AS $name) { if (empty($this->table_index_data["$fieldname"]["$name"]) OR $this->table_index_data["$fieldname"]["$name"]['Index_type'] != strtoupper($type)) { $failed = true; } } } else { $failed = true; } if (!$failed) { return true; } else if ($overwrite) { $this->drop_index($fieldname); return $this->add_index($fieldname, $fields, $type); } else { $this->set_error(ERRDB_FIELD_EXISTS, $fieldname); return false; } } else { if (strtolower($type) == 'fulltext') { if (strtoupper($this->table_status_data[1]) != 'MYISAM') { // only myisam supports fulltext... $this->convert_table_type('MYISAM'); } $type = 'FULLTEXT'; } else if (strtolower($type) == 'unique') { $type = 'UNIQUE'; } else { $type = ''; } $this->db->hide_errors(); // CREATE INDEX needs INDEX permission and ALTER TABLE ADD INDEX doesn't? #$this->sql = "CREATE $type INDEX " . $this->db->escape_string($fieldname) . " ON " . TABLE_PREFIX . $this->db->escape_string($this->table_name) . " (" . implode(',', $fields) . ")"; $this->sql = "ALTER TABLE " . TABLE_PREFIX . $this->db->escape_string($this->table_name) . " ADD $type INDEX " . $this->db->escape_string($fieldname) . " (" . implode(',', $fields) . ")"; $this->db->query_write($this->sql); $this->db->show_errors(); if ($this->db->errno()) { $this->set_error(ERRDB_MYSQL, $this->db->error()); return false; } else { // refresh table_index_data with current information $this->fetch_table_info(); return true; } } } ?>
{'content_hash': 'e9251245f8e32c1729e9404cdeb256bc', 'timestamp': '', 'source': 'github', 'line_count': 107, 'max_line_length': 190, 'avg_line_length': 24.61682242990654, 'alnum_prop': 0.5755504935459378, 'repo_name': 'tsuibin/php', 'id': 'd9fa4cdde190f56da89a4bc40e58c649b68184bb', 'size': '2634', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'php/test.php', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Assembly', 'bytes': '1203'}, {'name': 'CSS', 'bytes': '266074'}, {'name': 'HTML', 'bytes': '1535670'}, {'name': 'JavaScript', 'bytes': '90191'}, {'name': 'PHP', 'bytes': '4830410'}, {'name': 'Smarty', 'bytes': '11598'}, {'name': 'XSLT', 'bytes': '84258'}]}
SYNONYM #### According to The Catalogue of Life, 3rd January 2011 #### Published in null #### Original name null ### Remarks null
{'content_hash': '17903aecd0ea7e8fe710ea8e08a7bdc4', 'timestamp': '', 'source': 'github', 'line_count': 13, 'max_line_length': 39, 'avg_line_length': 10.23076923076923, 'alnum_prop': 0.6917293233082706, 'repo_name': 'mdoering/backbone', 'id': 'bd88fc02aa1f932d3f51d26f510102ab7b77dae7', 'size': '186', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'life/Chromista/Ochrophyta/Phaeophyceae/Fucales/Sargassaceae/Sargassum/Sargassum serratifolium/ Syn. Halochloa longifolia/README.md', 'mode': '33188', 'license': 'apache-2.0', 'language': []}
if defined?(::Rails::Engine) module KF5 class Engine < ::Rails::Engine initializer "kf5" do ActiveSupport.on_load :action_controller do include KF5::ControllerHelper end ActiveSupport.on_load :action_view do include KF5::ViewHelper end Rails.application.config.assets.precompile += %w( kf5.js ) end end end end
{'content_hash': '7c30ec5ffb0a003d3ec3e5e66eabb736', 'timestamp': '', 'source': 'github', 'line_count': 15, 'max_line_length': 66, 'avg_line_length': 26.333333333333332, 'alnum_prop': 0.6151898734177215, 'repo_name': 'emn178/kf5', 'id': '13fea35002b491c052b2bc79187eaaeb2b378ac4', 'size': '395', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'lib/kf5/engine.rb', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'JavaScript', 'bytes': '19437'}, {'name': 'Ruby', 'bytes': '10558'}]}
if [ "$ANT_HOME" = "" ] then UIMA_ANT_CALL=ant else UIMA_ANT_CALL="$ANT_HOME/bin/ant" fi $UIMA_ANT_CALL -buildfile "${0%packageAllJavaSourcesIntoJar.sh}/packageAllJavaSourcesIntoJar.xml"
{'content_hash': '9533b64480990d14fc6717b81e3c3dfd', 'timestamp': '', 'source': 'github', 'line_count': 8, 'max_line_length': 97, 'avg_line_length': 23.875, 'alnum_prop': 0.7277486910994765, 'repo_name': 'apache/uima-uimaj', 'id': 'c6c422929075a4001e27b0bc247b58bb4144b09e', 'size': '1019', 'binary': False, 'copies': '2', 'ref': 'refs/heads/main', 'path': 'src/main/readme_src/packageAllJavaSourcesIntoJar.sh', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Batchfile', 'bytes': '34274'}, {'name': 'HTML', 'bytes': '97356'}, {'name': 'Java', 'bytes': '15703955'}, {'name': 'JavaScript', 'bytes': '4760'}, {'name': 'Rich Text Format', 'bytes': '716'}, {'name': 'Shell', 'bytes': '33783'}, {'name': 'TypeScript', 'bytes': '41803'}, {'name': 'XSLT', 'bytes': '9770'}]}
package com.crossover.trial.weather.service; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import org.junit.Before; import org.junit.Test; import com.crossover.trial.weather.WeatherException; import com.crossover.trial.weather.domain.Airport; import com.crossover.trial.weather.domain.Weather; public class WeatherRepositoryTest { private WeatherRepository target = new WeatherRepository(); private Airport dummyAirport = new Airport("code1", 0,0); @Before public void insertDummyAirport() { target.saveAirport(dummyAirport); } @Test public void findInexistentReturnsNull() { assertNull(target.findAirport("code2")); } @Test(expected=WeatherException.class) public void findInexistentThrowsError() { target.getAirport("code2"); } @Test public void addDuplicateOverwritesAirportDataAndPreservesWeatherInfo() { Weather weather = new Weather(); dummyAirport.setWeather(weather); target.saveAirport(new Airport("code1", 0,0)); assertEquals(weather, target.getAirport("code1").getWeather()); } @Test public void getAllAirportsOk() { target.saveAirport(new Airport("code2", 0,0)); assertEquals(2, target.getAllAirports().size()); } @Test public void removeAirportOk() { assertNotNull(target.findAirport("code1")); target.removeAirport("code1"); assertNull(target.findAirport("code1")); } @Test(expected=WeatherException.class) public void removeUnexistendAirportFails() { target.removeAirport("code1"); target.removeAirport("code1"); } }
{'content_hash': '31c930bb7c7f6971211f982fdf0483de', 'timestamp': '', 'source': 'github', 'line_count': 62, 'max_line_length': 73, 'avg_line_length': 25.693548387096776, 'alnum_prop': 0.7633396107972379, 'repo_name': 'victorrentea/training', 'id': 'fdfaec8fdc8f470d41c0d992f1f76579ae3b9b28', 'size': '1593', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'kata/assignment-weather-done/src/test/java/com/crossover/trial/weather/service/WeatherRepositoryTest.java', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'AutoHotkey', 'bytes': '3856'}, {'name': 'Batchfile', 'bytes': '1040'}, {'name': 'C', 'bytes': '15431'}, {'name': 'C#', 'bytes': '13349'}, {'name': 'CSS', 'bytes': '38816'}, {'name': 'Gherkin', 'bytes': '21686'}, {'name': 'HTML', 'bytes': '226792'}, {'name': 'Java', 'bytes': '1431746'}, {'name': 'JavaScript', 'bytes': '48379'}, {'name': 'PHP', 'bytes': '472696'}, {'name': 'Scala', 'bytes': '11587'}, {'name': 'Shell', 'bytes': '1123'}, {'name': 'Smalltalk', 'bytes': '3'}, {'name': 'TSQL', 'bytes': '1146'}]}
<?php namespace Google\Service\ApiKeysService; class V2ServerKeyRestrictions extends \Google\Collection { protected $collection_key = 'allowedIps'; /** * @var string[] */ public $allowedIps; /** * @param string[] */ public function setAllowedIps($allowedIps) { $this->allowedIps = $allowedIps; } /** * @return string[] */ public function getAllowedIps() { return $this->allowedIps; } } // Adding a class alias for backwards compatibility with the previous class name. class_alias(V2ServerKeyRestrictions::class, 'Google_Service_ApiKeysService_V2ServerKeyRestrictions');
{'content_hash': '01e260ea98698cf8abe6340e9bb88074', 'timestamp': '', 'source': 'github', 'line_count': 31, 'max_line_length': 101, 'avg_line_length': 20.096774193548388, 'alnum_prop': 0.6934189406099518, 'repo_name': 'googleapis/google-api-php-client-services', 'id': 'fad4cc2648624d1cc025ae6486276c7f440e41f9', 'size': '1213', 'binary': False, 'copies': '6', 'ref': 'refs/heads/main', 'path': 'src/ApiKeysService/V2ServerKeyRestrictions.php', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'PHP', 'bytes': '55414116'}, {'name': 'Python', 'bytes': '427325'}, {'name': 'Shell', 'bytes': '787'}]}
package brooklyn.entity.brooklynnode; import static com.google.common.base.Preconditions.checkNotNull; import static java.lang.String.format; import java.io.ByteArrayInputStream; import java.io.File; import java.io.InputStream; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import brooklyn.entity.basic.Entities; import brooklyn.entity.brooklynnode.BrooklynNode.ExistingFileBehaviour; import brooklyn.entity.drivers.downloads.DownloadResolver; import brooklyn.entity.java.JavaSoftwareProcessSshDriver; import brooklyn.entity.software.SshEffectorTasks; import brooklyn.location.basic.SshMachineLocation; import brooklyn.util.collections.MutableMap; import brooklyn.util.file.ArchiveBuilder; import brooklyn.util.file.ArchiveUtils; import brooklyn.util.net.Networking; import brooklyn.util.net.Urls; import brooklyn.util.os.Os; import brooklyn.util.ssh.BashCommands; import brooklyn.util.task.DynamicTasks; import brooklyn.util.text.Identifiers; import brooklyn.util.text.Strings; import com.google.common.base.Objects; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Lists; public class BrooklynNodeSshDriver extends JavaSoftwareProcessSshDriver implements BrooklynNodeDriver { public BrooklynNodeSshDriver(BrooklynNodeImpl entity, SshMachineLocation machine) { super(entity, machine); } @Override public BrooklynNodeImpl getEntity() { return (BrooklynNodeImpl) super.getEntity(); } public String getBrooklynHome() { return getRunDir(); } @Override protected String getLogFileLocation() { return format("%s/console", getRunDir()); } private String getPidFile() { return "pid_java"; } @Override protected String getInstallLabelExtraSalt() { return Identifiers.makeIdFromHash(Objects.hashCode(entity.getConfig(BrooklynNode.DOWNLOAD_URL), entity.getConfig(BrooklynNode.DISTRO_UPLOAD_URL))); } @Override public void install() { String uploadUrl = entity.getConfig(BrooklynNode.DISTRO_UPLOAD_URL); // Need to explicitly give file, because for snapshot URLs you don't get a clean filename from the URL. // This filename is used to generate the first URL to try: // file://$HOME/.brooklyn/repository/BrooklynNode/0.6.0-SNAPSHOT/brooklyn-0.6.0-SNAPSHOT-dist.tar.gz // (DOWNLOAD_URL overrides this and has a default which comes from maven) DownloadResolver resolver = Entities.newDownloader(this); List<String> urls = resolver.getTargets(); String saveAs = resolver.getFilename(); String subpath = entity.getConfig(BrooklynNode.SUBPATH_IN_ARCHIVE); if (Strings.isBlank(subpath)) subpath = format("brooklyn-%s", getVersion()); setExpandedInstallDir(getInstallDir()+"/"+resolver.getUnpackedDirectoryName(subpath)); newScript("createInstallDir") .body.append("mkdir -p "+getInstallDir()) .failOnNonZeroResultCode() .execute(); List<String> commands = Lists.newArrayList(); // TODO use machine.installTo ... but that only works w a single location currently if (uploadUrl != null) { // Only upload if not already installed boolean exists = newScript("checkIfInstalled") .body.append("cd "+getInstallDir(), "test -f BROOKLYN") .execute() == 0; if (!exists) { InputStream distroStream = resource.getResourceFromUrl(uploadUrl); getMachine().copyTo(distroStream, getInstallDir()+"/"+saveAs); } } else { commands.addAll(BashCommands.commandsToDownloadUrlsAs(urls, saveAs)); } commands.add(BashCommands.INSTALL_TAR); commands.add("tar xzfv " + saveAs); newScript(INSTALLING). failOnNonZeroResultCode(). body.append(commands).execute(); } @Override public void customize() { newScript(CUSTOMIZING) .failOnNonZeroResultCode() .body.append( // workaround for AMP distribution placing everything in the root of this archive, but // brooklyn distribution placing everything in a subdirectory: check to see if subdirectory // with expected name exists; symlink to same directory if it doesn't // FIXME remove when all downstream usages don't use this format("[ -d %1$s ] || ln -s . %1$s", getExpandedInstallDir(), getExpandedInstallDir()), // previously we only copied bin,conf and set BROOKLYN_HOME to the install dir; // but that does not play nicely if installing dists other than brooklyn // (such as what is built by our artifact) format("cp -R %s/* .", getExpandedInstallDir()), "mkdir -p ./lib/") .execute(); SshMachineLocation machine = getMachine(); BrooklynNode entity = getEntity(); String brooklynGlobalPropertiesRemotePath = entity.getConfig(BrooklynNode.BROOKLYN_GLOBAL_PROPERTIES_REMOTE_PATH); String brooklynGlobalPropertiesContents = entity.getConfig(BrooklynNode.BROOKLYN_GLOBAL_PROPERTIES_CONTENTS); String brooklynGlobalPropertiesUri = entity.getConfig(BrooklynNode.BROOKLYN_GLOBAL_PROPERTIES_URI); String brooklynLocalPropertiesRemotePath = processTemplateContents(entity.getConfig(BrooklynNode.BROOKLYN_LOCAL_PROPERTIES_REMOTE_PATH)); String brooklynLocalPropertiesContents = entity.getConfig(BrooklynNode.BROOKLYN_LOCAL_PROPERTIES_CONTENTS); String brooklynLocalPropertiesUri = entity.getConfig(BrooklynNode.BROOKLYN_LOCAL_PROPERTIES_URI); String brooklynCatalogRemotePath = entity.getConfig(BrooklynNode.BROOKLYN_CATALOG_REMOTE_PATH); String brooklynCatalogContents = entity.getConfig(BrooklynNode.BROOKLYN_CATALOG_CONTENTS); String brooklynCatalogUri = entity.getConfig(BrooklynNode.BROOKLYN_CATALOG_URI); // Override the ~/.brooklyn/brooklyn.properties if required if (brooklynGlobalPropertiesContents != null || brooklynGlobalPropertiesUri != null) { Integer checkExists = DynamicTasks.queue(SshEffectorTasks.ssh("ls \""+brooklynGlobalPropertiesRemotePath+"\"").allowingNonZeroExitCode()).get(); boolean doUpload = true; if (checkExists==0) { ExistingFileBehaviour response = entity.getConfig(BrooklynNode.ON_EXISTING_PROPERTIES_FILE); switch (response) { case USE_EXISTING: doUpload = false; break; case OVERWRITE: break; case FAIL: throw new IllegalStateException("Properties file "+brooklynCatalogRemotePath+" already exists and "+ BrooklynNode.ON_EXISTING_PROPERTIES_FILE+" response is to fail"); default: throw new IllegalStateException("Properties file "+brooklynCatalogRemotePath+" already exists and "+ BrooklynNode.ON_EXISTING_PROPERTIES_FILE+" response "+response+" is unknown"); } } if (doUpload) uploadFileContents(brooklynGlobalPropertiesContents, brooklynGlobalPropertiesUri, brooklynGlobalPropertiesRemotePath); } // Upload a local-brooklyn.properties if required if (brooklynLocalPropertiesContents != null || brooklynLocalPropertiesUri != null) { uploadFileContents(brooklynLocalPropertiesContents, brooklynLocalPropertiesUri, brooklynLocalPropertiesRemotePath); } // Override the ~/.brooklyn/catalog.xml if required if (brooklynCatalogContents != null || brooklynCatalogUri != null) { uploadFileContents(brooklynCatalogContents, brooklynCatalogUri, brooklynCatalogRemotePath); } // Copy additional resources to the server for (Map.Entry<String,String> entry : getEntity().getAttribute(BrooklynNode.COPY_TO_RUNDIR).entrySet()) { Map<String, String> substitutions = ImmutableMap.of("RUN", getRunDir()); String localResource = entry.getKey(); String remotePath = entry.getValue(); String resolvedRemotePath = remotePath; for (Map.Entry<String,String> substitution : substitutions.entrySet()) { String key = substitution.getKey(); String val = substitution.getValue(); resolvedRemotePath = resolvedRemotePath.replace("${"+key+"}", val).replace("$"+key, val); } machine.copyTo(MutableMap.of("permissions", "0600"), resource.getResourceFromUrl(localResource), resolvedRemotePath); } for (String entry : getEntity().getClasspath()) { // If a local folder, then create archive from contents first if (Urls.isDirectory(entry)) { File jarFile = ArchiveBuilder.jar().add(entry).create(); entry = jarFile.getAbsolutePath(); } // Determine filename String destFile = entry.contains("?") ? entry.substring(0, entry.indexOf('?')) : entry; destFile = destFile.substring(destFile.lastIndexOf('/') + 1); ArchiveUtils.deploy(MutableMap.<String, Object>of(), entry, machine, getRunDir(), Os.mergePaths(getRunDir(), "lib"), destFile); } String cmd = entity.getConfig(BrooklynNode.EXTRA_CUSTOMIZATION_SCRIPT); if (!Strings.isBlank(cmd)) { DynamicTasks.queueIfPossible( SshEffectorTasks.ssh(cmd).summary("Bespoke BrooklynNode customization script") .requiringExitCodeZero() ) .orSubmitAndBlock(getEntity()); } } @Override public void launch() { String app = getEntity().getAttribute(BrooklynNode.APP); String locations = getEntity().getAttribute(BrooklynNode.LOCATIONS); boolean hasLocalBrooklynProperties = getEntity().getConfig(BrooklynNode.BROOKLYN_LOCAL_PROPERTIES_CONTENTS) != null || getEntity().getConfig(BrooklynNode.BROOKLYN_LOCAL_PROPERTIES_URI) != null; String localBrooklynPropertiesPath = processTemplateContents(getEntity().getConfig(BrooklynNode.BROOKLYN_LOCAL_PROPERTIES_REMOTE_PATH)); String bindAddress = getEntity().getAttribute(BrooklynNode.WEB_CONSOLE_BIND_ADDRESS); String cmd = entity.getConfig(BrooklynNode.LAUNCH_COMMAND); if (Strings.isBlank(cmd)) cmd = "./bin/brooklyn"; cmd = "nohup " + cmd + " launch"; if (app != null) { cmd += " --app "+app; } if (locations != null) { cmd += " --locations "+locations; } if (hasLocalBrooklynProperties) { cmd += " --localBrooklynProperties "+localBrooklynPropertiesPath; } Integer webPort = null; if (getEntity().isHttpProtocolEnabled("http")) { webPort = getEntity().getAttribute(BrooklynNode.HTTP_PORT); Networking.checkPortsValid(ImmutableMap.of("webPort", webPort)); } else if (getEntity().isHttpProtocolEnabled("https")) { webPort = getEntity().getAttribute(BrooklynNode.HTTPS_PORT); Networking.checkPortsValid(ImmutableMap.of("webPort", webPort)); } if (webPort!=null) { cmd += " --port "+webPort; } else if (getEntity().getEnabledHttpProtocols().isEmpty()) { // TODO sensors will probably not work in this mode cmd += " --noConsole"; } else { throw new IllegalStateException("Unknown web protocol in "+BrooklynNode.ENABLED_HTTP_PROTOCOLS+" " + "("+getEntity().getEnabledHttpProtocols()+"); expecting 'http' or 'https'"); } if (Strings.isNonEmpty(bindAddress)) { cmd += " --bindAddress "+bindAddress; } if (getEntity().getAttribute(BrooklynNode.NO_WEB_CONSOLE_AUTHENTICATION)) { cmd += " --noConsoleSecurity"; } if (getEntity().getConfig(BrooklynNode.NO_SHUTDOWN_ON_EXIT)) { cmd += " --noShutdownOnExit "; } cmd += format(" >> %s/console 2>&1 </dev/null &", getRunDir()); log.info("Starting brooklyn on {} using command {}", getMachine(), cmd); // relies on brooklyn script creating pid file newScript(ImmutableMap.of("usePidFile", entity.getConfig(BrooklynNode.LAUNCH_COMMAND_CREATES_PID_FILE) ? false : getPidFile()), LAUNCHING). body.append( format("export BROOKLYN_CLASSPATH=%s", getRunDir()+"/lib/\"*\""), format("export BROOKLYN_HOME=%s", getBrooklynHome()), format(cmd) ).failOnNonZeroResultCode().execute(); } @Override public boolean isRunning() { Map<String,String> flags = ImmutableMap.of("usePidFile", getPidFile()); int result = newScript(flags, CHECK_RUNNING).execute(); return result == 0; } @Override public void stop() { Map<String,String> flags = ImmutableMap.of("usePidFile", getPidFile()); newScript(flags, STOPPING).execute(); } @Override public void kill() { Map<String,String> flags = ImmutableMap.of("usePidFile", getPidFile()); newScript(flags, KILLING).execute(); } @Override public Map<String, String> getShellEnvironment() { Map<String, String> orig = super.getShellEnvironment(); String origClasspath = orig.get("CLASSPATH"); String newClasspath = (origClasspath == null ? "" : origClasspath+":") + getRunDir()+"/conf/" + ":" + getRunDir()+"/lib/\"*\""; Map<String,String> results = new LinkedHashMap<String,String>(); results.putAll(orig); results.put("BROOKLYN_CLASSPATH", newClasspath); results.put("BROOKLYN_HOME", getBrooklynHome()); results.put("RUN", getRunDir()); return results; } private void uploadFileContents(String contents, String alternativeUri, String remotePath) { checkNotNull(remotePath, "remotePath"); SshMachineLocation machine = getMachine(); String tempRemotePath = String.format("%s/upload.tmp", getRunDir()); if (contents != null) { machine.copyTo(new ByteArrayInputStream(contents.getBytes()), tempRemotePath); } else if (alternativeUri != null) { InputStream propertiesStream = resource.getResourceFromUrl(alternativeUri); machine.copyTo(propertiesStream, tempRemotePath); } else { throw new IllegalStateException("No contents supplied for file "+remotePath); } newScript(CUSTOMIZING) .failOnNonZeroResultCode() .body.append( format("mkdir -p %s", remotePath.subSequence(0, remotePath.lastIndexOf("/"))), format("cp -p %s %s", tempRemotePath, remotePath), format("rm -f %s", tempRemotePath)) .execute(); } }
{'content_hash': 'c4dd95a49420936217e2f468086d5dc0', 'timestamp': '', 'source': 'github', 'line_count': 323, 'max_line_length': 201, 'avg_line_length': 47.65325077399381, 'alnum_prop': 0.6385135135135135, 'repo_name': 'aledsage/legacy-brooklyn', 'id': 'f8e21c88c33375bc1ed087cdd3f98b39451f3b06', 'size': '15392', 'binary': False, 'copies': '3', 'ref': 'refs/heads/master', 'path': 'software/base/src/main/java/brooklyn/entity/brooklynnode/BrooklynNodeSshDriver.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'CSS', 'bytes': '99157'}, {'name': 'Groovy', 'bytes': '342075'}, {'name': 'Java', 'bytes': '9087326'}, {'name': 'JavaScript', 'bytes': '2051025'}, {'name': 'PHP', 'bytes': '4472'}, {'name': 'Perl', 'bytes': '8072'}, {'name': 'PowerShell', 'bytes': '4237'}, {'name': 'Ruby', 'bytes': '5931'}, {'name': 'Shell', 'bytes': '28598'}, {'name': 'TypeScript', 'bytes': '1316'}]}
import 'should'; import { valueOfTypeByState, parseCommand, getParams, matchCommand, getHint, validateCommand, execCommand } from '../public/js/lib/commands.js'; import Todo from '../public/js/models/Todo'; const state = { focusId: null, lastFocusId: 1, filter: null, lastInsertId: null, cancelId: null, clipboard: null, todos: [ new Todo(0, 'Learn React'), new Todo(1, 'Learn Redux', true, [ new Todo(4, 'Read manual'), new Todo(5, 'Write the code'), ]), new Todo(18, 'Send feature request @mrjazz #todo'), new Todo(19, 'Star repository #todo') ] }; describe('commands test', function() { it('exec paste action', () => { let result = null; const store = { getState: () => {return {todos: state}}, dispatch: (action) => {result = action} }; execCommand('paste', store); result.type.should.equal('PASTE_TODO'); result.id.should.equal(1); }); it('exec copy action', () => { let result = null; const store = { getState: () => {return {todos: state}}, dispatch: (action) => {result = action} }; execCommand('copy', store); result.type.should.equal('COPY_TODO'); result.id.should.equal(1); }); it('mutliple params test 2', () => { const result = validateCommand('addAsChild', state); result[0].action.should.equal('addAsChild'); const hint = getHint(result); hint.should.equal('<b>addAsChild</b> [<i>id : "Learn Redux"?</i>], [<i>text : "some text"</i>]'); }); it('exec addBelow action', () => { let result = null; const store = { getState: () => {return {todos: state}}, dispatch: (action) => {result = action} }; execCommand('addB "learn redux" "test1"', store); result.type.should.equal('ADD_BELOW'); result.id.should.equal(1); result.text.should.equal('test1'); }); it('id and parentId values matching', () => { const checkResult = (result) => { (result instanceof Todo).should.true(); result.id.should.equal(0); result.text.should.equal('Learn React'); }; checkResult(valueOfTypeByState('learn react', 'id', state).value); checkResult(valueOfTypeByState('react', 'id', state).options[0]); const emptyValue = valueOfTypeByState('', 'id', state); (emptyValue.value === null).should.true(); emptyValue.options.length.should.equal(1); emptyValue.type.should.equal('id'); }); it('param with id1', () => { const result = validateCommand('addB react', state); const hint = getHint(result); hint.should.equal('<b>addBelow</b> [<i>id : "Learn React"?</i>], [<i>text : "some text"</i>]'); }); it('param with id2', () => { const result = validateCommand('addB re', state); const hint = getHint(result); hint.should.equal('<b>addBelow</b> [<i>id : "Learn React"?</i>], [<i>text : "some text"</i>]'); }); it('param with id defined', () => { const result = validateCommand('addB "learn react"', state); const hint = getHint(result); hint.should.equal('<b>addBelow</b> [<b>id : "Learn React"</b>], [<i>text : "some text"</i>]'); }); it('one param', () => { const result = validateCommand('add something', state); const hint = getHint(result); hint.should.equal('<b>addTodo</b> [<b>text : "something"</b>], addBelow [item] [text], pasteAsChildTodo [parentId]'); }); it('mutliple params highlight', () => { const result = validateCommand('add', state); const hint = getHint(result); hint.should.equal('<b>addTodo</b> [<i>text : "some text"</i>], addBelow [item] [text], addAsChild [item] [text]'); }); it('mutliple params test', () => { const result = validateCommand('addAsChild "learn react" "learn webpack"', state); result[0].signature.id.value.id.should.equal(0); result[0].signature.text.value.should.equal('learn webpack'); const hint = getHint(result); hint.should.equal('<b>addAsChild</b> [<b>id : "Learn React"</b>], [<b>text : "learn webpack"</b>]'); }); it('date type matching', () => { (valueOfTypeByState('tomorrow', 'date', state).value instanceof Date).should.true(); (valueOfTypeByState('qwe', 'date', state).value == null).should.true(); }); it('filter type matching', () => { valueOfTypeByState('all', 'filter', state).value.should.equal('All'); valueOfTypeByState('todo', 'filter', state).value.should.equal('Todo'); (valueOfTypeByState('act', 'filter', state).value == null).should.true(); valueOfTypeByState('act', 'filter', state).options.length.should.equal(1); valueOfTypeByState('act', 'filter', state).options[0].should.equal('Active'); }); it('suggestions1', () => { const result = validateCommand('aT', state); result[0].action.should.equal('addTodo'); }); it('suggestions2', () => { const result = validateCommand('aT some task', state); result[0].action.should.equal('addTodo'); }); it('suggestions3', () => { validateCommand().length.should.equal(0); validateCommand('').length.should.equal(0); validateCommand(' ').length.should.equal(0); const result = validateCommand('add', state); result.length.should.equal(3); result[0].action.should.equal('addTodo'); result[1].action.should.equal('addBelow'); result[2].action.should.equal('addAsChild'); result[1].toString().should.equal('addBelow [item] [text]'); }); it('checking strings', () => { matchCommand('addSomeThing', 'add some thing like test').relevance.should.equal(35); matchCommand('addSomeThing', 'addST').relevance.should.equal(18); matchCommand('addSomeThing', 'addst').relevance.should.equal(12); matchCommand('updateTodo', 'add').relevance.should.equal(-1); matchCommand('addSomeThing', 'addSTo').relevance.should.equal(18); matchCommand('addSomeThing', 'addThing').relevance.should.equal(24); matchCommand('addSomeThing', 'addsomething').relevance.should.equal(35); matchCommand('addSomeThing', 'ADDSOMETHING').relevance.should.equal(41); }); it('parse params', () => { getParams('get').should.equal(''); getParams('get ').should.equal(''); getParams('get something').should.equal('something'); getParams('get something new').should.equal('something new'); getParams('get something new ').should.equal('something new'); }); it('parse command', () => { parseCommand('add'); }); });
{'content_hash': '2afb6f5fa7193d05a2aa52a32587c4e4', 'timestamp': '', 'source': 'github', 'line_count': 202, 'max_line_length': 121, 'avg_line_length': 31.871287128712872, 'alnum_prop': 0.6208449829139484, 'repo_name': 'mrjazz/todo', 'id': '7d48fd7e968744d9536915898e73177897874c8c', 'size': '6438', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'tests/commands.spec.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Batchfile', 'bytes': '101'}, {'name': 'CSS', 'bytes': '3510'}, {'name': 'HTML', 'bytes': '284'}, {'name': 'JavaScript', 'bytes': '196251'}, {'name': 'PHP', 'bytes': '3413'}]}
#ifndef DALI_INTERNAL_RENDER_TEXTURE_H #define DALI_INTERNAL_RENDER_TEXTURE_H // EXTERNAL INCLUDES #include <cstdint> // uint16_t, uint32_t #include <string> // INTERNAL INCLUDES #include <dali/public-api/images/image-operations.h> // Dali::ImageDimensions #include <dali/public-api/rendering/sampler.h> #include <dali/public-api/rendering/texture.h> #include <dali/graphics-api/graphics-controller.h> #include <dali/graphics-api/graphics-texture-create-info.h> #include <dali/graphics-api/graphics-texture.h> #include <dali/graphics-api/graphics-types.h> #include <dali/internal/event/rendering/texture-impl.h> #include <dali/internal/render/renderers/render-sampler.h> namespace Dali { namespace Internal { namespace Render { struct Sampler; class Texture { public: using Type = Dali::TextureType::Type; /** * Constructor * @param[in] type The type of the texture * @param[in] format The format of the pixel data * @param[in] size The size of the texture */ Texture(Type type, Pixel::Format format, ImageDimensions size); /** * Constructor from native image * @param[in] nativeImageInterface The native image */ explicit Texture(NativeImageInterfacePtr nativeImageInterface); /** * Destructor */ ~Texture(); /** * Stores the graphics controller for use when required. * * @param[in] graphicsController The graphics controller to use */ void Initialize(Graphics::Controller& graphicsController); /** * Create the texture without a buffer * @param[in] usage How texture will be used */ void Create(Graphics::TextureUsageFlags usage); /** * Create a texture with a buffer if non-null * @param[in] usage How texture will be used * @param[in] buffer Buffer to copy */ void CreateWithData(Graphics::TextureUsageFlags usage, uint8_t* buffer, uint32_t bufferSize); /** * Deletes the texture from the GPU */ void Destroy(); /** * Uploads data to the texture. * @param[in] pixelData A pixel data object * @param[in] params Upload parameters. See UploadParams */ void Upload(PixelDataPtr pixelData, const Internal::Texture::UploadParams& params); /** * Auto generates mipmaps for the texture */ void GenerateMipmaps(); /** * Retrieve whether the texture has an alpha channel * @return True if the texture has alpha channel, false otherwise */ [[nodiscard]] bool HasAlphaChannel() const; /** * Get the graphics object associated with this texture */ [[nodiscard]] Graphics::Texture* GetGraphicsObject() const; /** * Get the type of the texture * @return Type of the texture */ [[nodiscard]] Type GetType() const { return mType; } /** * Check if the texture is a native image * @return if the texture is a native image */ [[nodiscard]] bool IsNativeImage() const { return static_cast<bool>(mNativeImage); } private: /** * Helper method to apply a sampler to the texture * @param[in] sampler The sampler */ void ApplySampler(Render::Sampler* sampler); private: Graphics::Controller* mGraphicsController; Graphics::UniquePtr<Graphics::Texture> mGraphicsTexture; NativeImageInterfacePtr mNativeImage; ///< Pointer to native image Render::Sampler mSampler; ///< The current sampler state Pixel::Format mPixelFormat; ///< Pixel format of the texture uint16_t mWidth; ///< Width of the texture uint16_t mHeight; ///< Height of the texture Type mType : 3; ///< Type of the texture bool mHasAlpha : 1; ///< Whether the format has an alpha channel }; } // namespace Render } // namespace Internal } // namespace Dali #endif // DALI_INTERNAL_RENDER_TEXTURE_H
{'content_hash': 'cd143c922fda6cb2d0633dc16e8dc70a', 'timestamp': '', 'source': 'github', 'line_count': 147, 'max_line_length': 95, 'avg_line_length': 25.598639455782312, 'alnum_prop': 0.6861546638320489, 'repo_name': 'dalihub/dali-core', 'id': 'a3945d866fd7311ec6d7e71a34bd22051c1d5593', 'size': '4375', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'dali/internal/render/renderers/render-texture.h', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'C', 'bytes': '79160'}, {'name': 'C++', 'bytes': '9092932'}, {'name': 'CMake', 'bytes': '23530'}, {'name': 'Perl', 'bytes': '66369'}, {'name': 'Shell', 'bytes': '30243'}]}
<?php class Dotdigitalgroup_Email_Block_Adminhtml_System_Dynamic_Addressbookbutton extends Mage_Adminhtml_Block_System_Config_Form_Field { /** * @param $title * @return mixed */ protected function _getAddRowButtonHtml($title) { return $this->getLayout()->createBlock('adminhtml/widget_button') ->setType('button') ->setLabel($this->__($title)) ->setOnClick("createAddressbook(this.form, this);") ->toHtml(); } /** * @param Varien_Data_Form_Element_Abstract $element * @return mixed */ protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) { $this->setElement($element); $originalData = $element->getOriginalData(); return $this->_getAddRowButtonHtml( $this->__($originalData['button_label']) ); } }
{'content_hash': '927488c1d882fdac6501ead59173de80', 'timestamp': '', 'source': 'github', 'line_count': 33, 'max_line_length': 82, 'avg_line_length': 27.060606060606062, 'alnum_prop': 0.6002239641657335, 'repo_name': 'cdiacon/dotmailer-magento-extension', 'id': '58645a1e64f5136067f78ba80385a6f7201d1778', 'size': '893', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'code/Dotdigitalgroup/Email/Block/Adminhtml/System/Dynamic/Addressbookbutton.php', 'mode': '33261', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '1878'}, {'name': 'HTML', 'bytes': '104311'}, {'name': 'JavaScript', 'bytes': '74620'}, {'name': 'PHP', 'bytes': '1392873'}, {'name': 'XSLT', 'bytes': '33245'}]}
<?php namespace Github\Tests\Api; use Github\Api\AbstractApi; class AbstractApiTest extends \PHPUnit_Framework_TestCase { /** * @test */ public function shouldPassGETRequestToClient() { $expectedArray = array('value'); $httpClient = $this->getHttpMock(); $httpClient ->expects($this->any()) ->method('get') ->with('/path', array('param1' => 'param1value'), array('header1' => 'header1value')) ->will($this->returnValue($expectedArray)); $client = $this->getClientMock(); $client->setHttpClient($httpClient); $api = $this->getAbstractApiObject($client); $this->assertEquals($expectedArray, $api->get('/path', array('param1' => 'param1value'), array('header1' => 'header1value'))); } /** * @test */ public function shouldPassPOSTRequestToClient() { $expectedArray = array('value'); $httpClient = $this->getHttpMock(); $httpClient ->expects($this->once()) ->method('post') ->with('/path', array('param1' => 'param1value'), array('option1' => 'option1value')) ->will($this->returnValue($expectedArray)); $client = $this->getClientMock(); $client->setHttpClient($httpClient); $api = $this->getAbstractApiObject($client); $this->assertEquals($expectedArray, $api->post('/path', array('param1' => 'param1value'), array('option1' => 'option1value'))); } /** * @test */ public function shouldPassPATCHRequestToClient() { $expectedArray = array('value'); $httpClient = $this->getHttpMock(); $httpClient ->expects($this->once()) ->method('patch') ->with('/path', array('param1' => 'param1value'), array('option1' => 'option1value')) ->will($this->returnValue($expectedArray)); $client = $this->getClientMock(); $client->setHttpClient($httpClient); $api = $this->getAbstractApiObject($client); $this->assertEquals($expectedArray, $api->patch('/path', array('param1' => 'param1value'), array('option1' => 'option1value'))); } /** * @test */ public function shouldPassPUTRequestToClient() { $expectedArray = array('value'); $httpClient = $this->getHttpMock(); $httpClient ->expects($this->once()) ->method('put') ->with('/path', array('param1' => 'param1value'), array('option1' => 'option1value')) ->will($this->returnValue($expectedArray)); $client = $this->getClientMock(); $client->setHttpClient($httpClient); $api = $this->getAbstractApiObject($client); $this->assertEquals($expectedArray, $api->put('/path', array('param1' => 'param1value'), array('option1' => 'option1value'))); } /** * @test */ public function shouldPassDELETERequestToClient() { $expectedArray = array('value'); $httpClient = $this->getHttpMock(); $httpClient ->expects($this->once()) ->method('delete') ->with('/path', array('param1' => 'param1value'), array('option1' => 'option1value')) ->will($this->returnValue($expectedArray)); $client = $this->getClientMock(); $client->setHttpClient($httpClient); $api = $this->getAbstractApiObject($client); $this->assertEquals($expectedArray, $api->delete('/path', array('param1' => 'param1value'), array('option1' => 'option1value'))); } protected function getAbstractApiObject($client) { return new AbstractApiTestInstance($client); } /** * @return \Github\Client */ protected function getClientMock() { return new \Github\Client($this->getHttpMock()); } /** * @return \Github\HttpClient\HttpClientInterface */ protected function getHttpMock() { return $this->getMock('Github\HttpClient\HttpClient', array(), array(array(), $this->getHttpClientMock())); } protected function getHttpClientMock() { $mock = $this->getMock('Guzzle\Http\Client', array('send')); $mock ->expects($this->any()) ->method('send'); return $mock; } } class AbstractApiTestInstance extends AbstractApi { /** * {@inheritDoc} */ public function get($path, array $parameters = array(), $requestHeaders = array()) { return $this->client->getHttpClient()->get($path, $parameters, $requestHeaders); } /** * {@inheritDoc} */ public function post($path, array $parameters = array(), $requestHeaders = array()) { return $this->client->getHttpClient()->post($path, $parameters, $requestHeaders); } /** * {@inheritDoc} */ public function postRaw($path, $body, $requestHeaders = array()) { return $this->client->getHttpClient()->post($path, $body, $requestHeaders); } /** * {@inheritDoc} */ public function patch($path, array $parameters = array(), $requestHeaders = array()) { return $this->client->getHttpClient()->patch($path, $parameters, $requestHeaders); } /** * {@inheritDoc} */ public function put($path, array $parameters = array(), $requestHeaders = array()) { return $this->client->getHttpClient()->put($path, $parameters, $requestHeaders); } /** * {@inheritDoc} */ public function delete($path, array $parameters = array(), $requestHeaders = array()) { return $this->client->getHttpClient()->delete($path, $parameters, $requestHeaders); } }
{'content_hash': '447eca116c3bf89849f2016f8b48d49a', 'timestamp': '', 'source': 'github', 'line_count': 195, 'max_line_length': 137, 'avg_line_length': 29.512820512820515, 'alnum_prop': 0.5704604691572546, 'repo_name': 'NoUseFreak/php-github-api', 'id': '7dff2e0dd53511984635e16a2236efad7e6a1b20', 'size': '5755', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'test/Github/Tests/Api/AbstractApiTest.php', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'PHP', 'bytes': '338113'}]}
/* -*- 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) 2007 * the Initial Developer. All Rights Reserved. * * Contributor(s): Brian Crowder * * 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-352604.js'; //----------------------------------------------------------------------------- var BUGNUMBER = 352604; var summary = 'Do not assert: !OBJ_GET_PROTO(cx, ctor)'; var actual = 'No Crash'; var expect = 'No Crash'; //----------------------------------------------------------------------------- test(); //----------------------------------------------------------------------------- function test() { enterFunc ('test'); printBugNumber(BUGNUMBER); printStatus (summary); function f() {} delete Function; var g = new Function(''); expect = f.__proto__; actual = g.__proto__; reportCompare(expect, actual, summary); exitFunc ('test'); }
{'content_hash': 'a65a7b3942d91ec2381535ec194c64b3', 'timestamp': '', 'source': 'github', 'line_count': 66, 'max_line_length': 79, 'avg_line_length': 37.75757575757576, 'alnum_prop': 0.6388443017656501, 'repo_name': 'baslr/ArangoDB', 'id': '5520dcd383fd3f7484acff5c229d187a474c1768', 'size': '2492', 'binary': False, 'copies': '5', 'ref': 'refs/heads/3.1-silent', 'path': '3rdParty/V8/V8-5.0.71.39/test/mozilla/data/js1_5/extensions/regress-352604.js', 'mode': '33261', 'license': 'apache-2.0', 'language': [{'name': 'Ada', 'bytes': '89080'}, {'name': 'Assembly', 'bytes': '391227'}, {'name': 'Awk', 'bytes': '4272'}, {'name': 'Batchfile', 'bytes': '62892'}, {'name': 'C', 'bytes': '7932707'}, {'name': 'C#', 'bytes': '96430'}, {'name': 'C++', 'bytes': '284363933'}, {'name': 'CLIPS', 'bytes': '5291'}, {'name': 'CMake', 'bytes': '681903'}, {'name': 'CSS', 'bytes': '1036656'}, {'name': 'CWeb', 'bytes': '174166'}, {'name': 'Cuda', 'bytes': '52444'}, {'name': 'DIGITAL Command Language', 'bytes': '259402'}, {'name': 'Emacs Lisp', 'bytes': '14637'}, {'name': 'Fortran', 'bytes': '1856'}, {'name': 'Groovy', 'bytes': '131'}, {'name': 'HTML', 'bytes': '2318016'}, {'name': 'Java', 'bytes': '2325801'}, {'name': 'JavaScript', 'bytes': '67878359'}, {'name': 'LLVM', 'bytes': '24129'}, {'name': 'Lex', 'bytes': '1231'}, {'name': 'Lua', 'bytes': '16189'}, {'name': 'M4', 'bytes': '600550'}, {'name': 'Makefile', 'bytes': '509612'}, {'name': 'Max', 'bytes': '36857'}, {'name': 'Module Management System', 'bytes': '1545'}, {'name': 'NSIS', 'bytes': '28404'}, {'name': 'Objective-C', 'bytes': '19321'}, {'name': 'Objective-C++', 'bytes': '2503'}, {'name': 'PHP', 'bytes': '98503'}, {'name': 'Pascal', 'bytes': '145688'}, {'name': 'Perl', 'bytes': '720157'}, {'name': 'Perl 6', 'bytes': '9918'}, {'name': 'Python', 'bytes': '5859911'}, {'name': 'QMake', 'bytes': '16692'}, {'name': 'R', 'bytes': '5123'}, {'name': 'Rebol', 'bytes': '354'}, {'name': 'Roff', 'bytes': '1010686'}, {'name': 'Ruby', 'bytes': '922159'}, {'name': 'SAS', 'bytes': '1847'}, {'name': 'Scheme', 'bytes': '10604'}, {'name': 'Shell', 'bytes': '511077'}, {'name': 'Swift', 'bytes': '116'}, {'name': 'Tcl', 'bytes': '1172'}, {'name': 'TeX', 'bytes': '32117'}, {'name': 'Vim script', 'bytes': '4075'}, {'name': 'Visual Basic', 'bytes': '11568'}, {'name': 'XSLT', 'bytes': '551977'}, {'name': 'Yacc', 'bytes': '53005'}]}
package de.zalando.model import de.zalando.apifirst.Application._ import de.zalando.apifirst.Domain._ import de.zalando.apifirst.ParameterPlace import de.zalando.apifirst.naming._ import de.zalando.apifirst.Hypermedia._ import de.zalando.apifirst.Http._ import de.zalando.apifirst.Security import java.net.URL import Security._ //noinspection ScalaStyle object numbers_validation_yaml extends WithModel { def types = Map[Reference, Type]( Reference("⌿paths⌿/⌿get⌿double_optional") → Opt(Dbl(TypeMeta(Some("double"), List("max(10.toDouble, true)", "min(0.toDouble, true)", "multipleOf(5.toDouble)"))), TypeMeta(None, List())), Reference("⌿paths⌿/⌿get⌿integer_required") → Intgr(TypeMeta(Some("int32"), List("max(10.toInt, false)", "min(0.toInt, false)", "multipleOf(5.toInt)"))), Reference("⌿paths⌿/⌿get⌿integer_optional") → Opt(Intgr(TypeMeta(Some("int32"), List("max(10.toInt, true)", "min(-10.toInt, true)", "multipleOf(5.toInt)"))), TypeMeta(None, List())), Reference("⌿paths⌿/⌿get⌿double_required") → Dbl(TypeMeta(Some("double"), List("max(10.toDouble, false)", "min(2.toDouble, false)", "multipleOf(5.toDouble)"))), Reference("⌿paths⌿/⌿get⌿long_optional") → Opt(Lng(TypeMeta(Some("int64"), List("max(10.toLong, true)", "min(10.toLong, true)", "multipleOf(10.toLong)"))), TypeMeta(None, List())), Reference("⌿paths⌿/⌿get⌿float_required") → Flt(TypeMeta(Some("float"), List("max(10.toFloat, true)", "min(10.toFloat, true)", "multipleOf(5.toFloat)"))), Reference("⌿paths⌿/⌿get⌿float_optional") → Opt(Flt(TypeMeta(Some("float"), List("max(10.toFloat, false)", "min(1.toFloat, false)", "multipleOf(5.toFloat)"))), TypeMeta(None, List())), Reference("⌿paths⌿/⌿get⌿long_required") → Lng(TypeMeta(Some("int64"), List("max(10.toLong, true)", "min(0.toLong, true)", "multipleOf(5.toLong)"))), Reference("⌿paths⌿/⌿get⌿responses⌿200") → Null(TypeMeta(None, List())) ) def parameters = Map[ParameterRef, Parameter]( ParameterRef( Reference("⌿paths⌿/⌿get⌿float_required")) → Parameter("float_required", Flt(TypeMeta(Some("float"), List("max(10.toFloat, true)", "min(10.toFloat, true)", "multipleOf(5.toFloat)"))), None, None, ".+", encode = true, ParameterPlace.withName("query")), ParameterRef( Reference("⌿paths⌿/⌿get⌿double_required")) → Parameter("double_required", Dbl(TypeMeta(Some("double"), List("max(10.toDouble, false)", "min(2.toDouble, false)", "multipleOf(5.toDouble)"))), None, None, ".+", encode = true, ParameterPlace.withName("query")), ParameterRef( Reference("⌿paths⌿/⌿get⌿integer_optional")) → Parameter("integer_optional", TypeRef(Reference("⌿paths⌿/⌿get⌿integer_optional")), None, None, ".+", encode = true, ParameterPlace.withName("query")), ParameterRef( Reference("⌿paths⌿/⌿get⌿long_required")) → Parameter("long_required", Lng(TypeMeta(Some("int64"), List("max(10.toLong, true)", "min(0.toLong, true)", "multipleOf(5.toLong)"))), None, None, ".+", encode = true, ParameterPlace.withName("query")), ParameterRef( Reference("⌿paths⌿/⌿get⌿integer_required")) → Parameter("integer_required", Intgr(TypeMeta(Some("int32"), List("max(10.toInt, false)", "min(0.toInt, false)", "multipleOf(5.toInt)"))), None, None, ".+", encode = true, ParameterPlace.withName("query")), ParameterRef( Reference("⌿paths⌿/⌿get⌿float_optional")) → Parameter("float_optional", TypeRef(Reference("⌿paths⌿/⌿get⌿float_optional")), None, None, ".+", encode = true, ParameterPlace.withName("query")), ParameterRef( Reference("⌿paths⌿/⌿get⌿double_optional")) → Parameter("double_optional", TypeRef(Reference("⌿paths⌿/⌿get⌿double_optional")), None, None, ".+", encode = true, ParameterPlace.withName("query")), ParameterRef( Reference("⌿paths⌿/⌿get⌿long_optional")) → Parameter("long_optional", TypeRef(Reference("⌿paths⌿/⌿get⌿long_optional")), None, None, ".+", encode = true, ParameterPlace.withName("query")) ) def basePath: String =null def discriminators: DiscriminatorLookupTable = Map[Reference, Reference]( ) def securityDefinitions: SecurityDefinitionsTable = Map[String, Security.Definition]( ) def stateTransitions: StateTransitionsTable = Map[State, Map[State, TransitionProperties]]() def calls: Seq[ApiCall] = Seq( ApiCall(GET, Path(Reference("⌿")), HandlerCall( "numbers_validation.yaml", "Numbers_validationYaml", instantiate = false, "get",parameters = Seq( ParameterRef(Reference("⌿paths⌿/⌿get⌿float_required")), ParameterRef(Reference("⌿paths⌿/⌿get⌿double_required")), ParameterRef(Reference("⌿paths⌿/⌿get⌿integer_optional")), ParameterRef(Reference("⌿paths⌿/⌿get⌿long_required")), ParameterRef(Reference("⌿paths⌿/⌿get⌿integer_required")), ParameterRef(Reference("⌿paths⌿/⌿get⌿float_optional")), ParameterRef(Reference("⌿paths⌿/⌿get⌿double_optional")), ParameterRef(Reference("⌿paths⌿/⌿get⌿long_optional")) ) ), Set.empty[MimeType], Set(MimeType("application/json"), MimeType("application/yaml")), Map.empty[String, Seq[Class[Exception]]], TypesResponseInfo( Map[Int, ParameterRef]( 200 -> ParameterRef(Reference("⌿paths⌿/⌿get⌿responses⌿200")) ), None), StateResponseInfo( Map[Int, State]( 200 -> Self ), None), Set.empty[Security.Constraint])) def packageName: Option[String] = Some("numbers_validation.yaml") def model = new StrictModel(calls, types, parameters, discriminators, basePath, packageName, stateTransitions, securityDefinitions) }
{'content_hash': '0e1d6e7fc736ea5092ce37735f7bd99d', 'timestamp': '', 'source': 'github', 'line_count': 87, 'max_line_length': 272, 'avg_line_length': 62.18390804597701, 'alnum_prop': 0.6994454713493531, 'repo_name': 'zalando/play-swagger', 'id': '76423fe63780d817de914fbc9b527d538ef146d5', 'size': '5690', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'play-scala-generator/src/test/scala/model/resources.numbers_validation_yaml.scala', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'HTML', 'bytes': '37811'}, {'name': 'Scala', 'bytes': '4511915'}]}
<?php namespace Core; class Template implements TemplateInterface { const TEMPLATES_FOLDER = 'Templates/'; const TEMPLATES_EXTENSION = '.php'; public function render(string $templateName, $data, $count) { require_once self::TEMPLATES_FOLDER.$templateName.self::TEMPLATES_EXTENSION; } }
{'content_hash': 'e136159ad57f5ec33194a72949a82721', 'timestamp': '', 'source': 'github', 'line_count': 17, 'max_line_length': 84, 'avg_line_length': 18.764705882352942, 'alnum_prop': 0.6959247648902821, 'repo_name': 'stoyantodorovbg/PHP-Web-Development-Basics', 'id': '5a4f352ff7c727a0df5ba1a14d6756c7624764c9', 'size': '319', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'Exam Preparation – Task Management System/Core/Template.php', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '8312'}, {'name': 'HTML', 'bytes': '5671'}, {'name': 'PHP', 'bytes': '426690'}, {'name': 'PLpgSQL', 'bytes': '1589'}]}
package org.ike.wechat.core.message.domain.simple; import org.dom4j.Document; import org.dom4j.DocumentHelper; import org.dom4j.Element; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; import java.util.ArrayList; import java.util.Collections; import java.util.List; /** * Class Name: AbstractMessage * Create Date: 2016/6/30 18:19 * Creator: Xuejia * Version: v1.0 * Updater: * Date Time: * Description: */ public abstract class AbstractMessage implements IMessage { private String ToUserName = null; private String FromUserName = null; private Long CreateTime = null; private String MsgType = null; public String getToUserName() { return ToUserName; } public void setToUserName(String toUserName) { ToUserName = toUserName; } public String getFromUserName() { return FromUserName; } public void setFromUserName(String fromUserName) { FromUserName = fromUserName; } public Long getCreateTime() { return CreateTime; } public void setCreateTime(Long createTime) { CreateTime = createTime; } public String getMsgType() { return MsgType; } public void setMsgType(String msgType) { MsgType = msgType; } public IMessage reverse() { String user = ToUserName; ToUserName = FromUserName; FromUserName = user; CreateTime = System.currentTimeMillis(); return this; } @SuppressWarnings("unchecked") public String toXml() { String clzName = this.getClass().getName(); Document document = DocumentHelper.createDocument(); Element element = document.addElement("xml"); List<Field> fieldList = new ArrayList<Field>(); Class tmpClz; Class msgClz; try { tmpClz = Class.forName(clzName); msgClz = tmpClz; do { Collections.addAll(fieldList, tmpClz.getDeclaredFields()); } while ((tmpClz = tmpClz.getSuperclass()) != null); } catch (ClassNotFoundException e) { return "success"; } Object val; String getFieldName; Element tmpElement; for (Field field : fieldList) { getFieldName = "get" + field.getName().substring(0, 1).toUpperCase() + field.getName().substring(1); try { val = msgClz.getMethod(getFieldName).invoke(this); tmpElement = element.addElement(field.getName()); if (String.class.getName().equals(field.getName())) { tmpElement.addCDATA(val == null ? "" : val.toString()); } else { tmpElement.addText(val == null ? "" : val.toString()); } } catch (IllegalAccessException e) { return "success"; } catch (InvocationTargetException e) { return "success"; } catch (NoSuchMethodException e) { return "success"; } } return document.asXML(); } }
{'content_hash': '22575211f1d2237a82e2e8b979bf238a', 'timestamp': '', 'source': 'github', 'line_count': 111, 'max_line_length': 112, 'avg_line_length': 28.18918918918919, 'alnum_prop': 0.5963566634707574, 'repo_name': 'xuejiacore/IkeChat', 'id': 'a889597e015725ccdfc20d6650b0d19b5fa28331', 'size': '3320', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'IkeChat/src/main/java/org/ike/wechat/core/message/domain/simple/AbstractMessage.java', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Java', 'bytes': '310029'}]}
package qdr const TypeNameConnector string = "org.apache.qpid.dispatch.connector" const TypeNameLinkRoute string = "org.apache.qpid.dispatch.router.config.linkRoute" const TypeNameSslProfile string = "org.apache.qpid.dispatch.sslProfile" type RouterResource interface { GetType() string GetName() string } type typeAndNameInfo struct { _type string _name string } func (r typeAndNameInfo) GetType() string { return r._type } func (r typeAndNameInfo) GetName() string { return r._name } func TypeAndName(Type string, Name string) RouterResource { return typeAndNameInfo{_type: Type, _name: Name} } func NamedLinkRoute(Name string) RouterResource { return TypeAndName(TypeNameLinkRoute, Name) } func NamedConnector(Name string) RouterResource { return TypeAndName(TypeNameConnector, Name) } func NamedSslProfile(Name string) RouterResource { return TypeAndName(TypeNameSslProfile, Name) } type NamedResource struct { Name string `json:"name"` } func (r NamedResource) GetName() string { return r.Name } // link route type LinkRoute struct { NamedResource Connection string `json:"connection"` Direction string `json:"direction"` Pattern string `json:"pattern"` } func (r LinkRoute) GetType() string { return TypeNameLinkRoute } // connector type Connector struct { NamedResource Host string `json:"host"` Port string `json:"port"` // yes, port is a string, as it could be a named port Role string `json:"role"` SASLUsername string `json:"saslUsername,omitempty"` SASLPassword string `json:"saslPassword,omitempty"` SSLProfile string `json:"sslProfile,omitempty"` } func (r Connector) GetType() string { return TypeNameConnector } // SSL profile type SslProfile struct { NamedResource CertificatePath string `json:"certFile,omitempty"` CACertificatePath string `json:"caCertFile,omitempty"` } func (r SslProfile) GetType() string { return TypeNameSslProfile }
{'content_hash': '07738c9efb2367a13d303c40778d0d84', 'timestamp': '', 'source': 'github', 'line_count': 90, 'max_line_length': 88, 'avg_line_length': 21.555555555555557, 'alnum_prop': 0.7515463917525773, 'repo_name': 'jenmalloy/enmasse', 'id': '86eb35cb56c011518b543281622557015c9bc2ca', 'size': '2084', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'pkg/qdr/model.go', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'CSS', 'bytes': '946'}, {'name': 'Dockerfile', 'bytes': '8306'}, {'name': 'Go', 'bytes': '1208268'}, {'name': 'Groovy', 'bytes': '8925'}, {'name': 'HTML', 'bytes': '3345'}, {'name': 'Java', 'bytes': '4217294'}, {'name': 'JavaScript', 'bytes': '922369'}, {'name': 'Makefile', 'bytes': '23788'}, {'name': 'Python', 'bytes': '6730'}, {'name': 'Ragel', 'bytes': '3778'}, {'name': 'Shell', 'bytes': '73871'}, {'name': 'TSQL', 'bytes': '2790'}, {'name': 'TypeScript', 'bytes': '407558'}, {'name': 'XSLT', 'bytes': '11077'}, {'name': 'Yacc', 'bytes': '5306'}]}
module GatewaySignup class Registry def initialize(args) @config = ConfigEngine.source args[:format], args[:location] end def gateways @config.gateways end def gateway_list @config.gateway_list end def countries @config.countries end def fields_for(gateway) @config.fields_for gateway end def details(gateway) @config.details gateway end def for_country(country) @config.for_country country end end end
{'content_hash': '3722daea9ed52e04c99a9823d6f88f38', 'timestamp': '', 'source': 'github', 'line_count': 31, 'max_line_length': 66, 'avg_line_length': 16.483870967741936, 'alnum_prop': 0.6379647749510763, 'repo_name': 'atpay/gateway_signup', 'id': 'c11f697a8793c96086369946a8151bc2daa99e98', 'size': '511', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'lib/gateway_signup/registry.rb', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Ruby', 'bytes': '3352'}]}
'use strict'; const _ = require('ramda'); // HTML element is represented by an array: [ "tag", {attributes}, content... ] const html = ["html", {}, ["head", {}, ["title", {}, "An example document"]], ["body", {}, ["p", {}, "Some content"], ["p", {}, "More content"]]]; // totally ok to return parts of the tree if they're not ever supposed // to be modified function subelements_by_tag(tag, element) { if (!_.isArrayLike(element)) return []; if (element[0] === tag) return [element]; return _.chain(_.partial(subelements_by_tag, tag), element.slice(2)); } console.log(subelements_by_tag("p", html)); // can construct new tree using parts of old one function replace_by_path(indices, element, new_element) { if (indices.length === 0) return new_element; return _.map(index => index === indices[0] ? replace_by_path(_.tail(indices), element[index], new_element) : element[index], _.range(0, element.length)); } // change the tag of first paragraph to header console.log(replace_by_path([3, 2, 0], html, "h1"));
{'content_hash': 'ef5dfa6e323fb6fdb3b140e9df2f7d9a', 'timestamp': '', 'source': 'github', 'line_count': 31, 'max_line_length': 79, 'avg_line_length': 33.774193548387096, 'alnum_prop': 0.6351480420248329, 'repo_name': 'pkalliok/fp-presentation', 'id': '56e8268d8993e5b6e4d4836146f32168b3e5635f', 'size': '1047', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': '3-data-structures/ex-1.js', 'mode': '33188', 'license': 'bsd-2-clause', 'language': [{'name': 'Clojure', 'bytes': '1837'}, {'name': 'JavaScript', 'bytes': '15157'}, {'name': 'Python', 'bytes': '1166'}]}
package org.pageobject.core.driver.vnc import org.pageobject.core.driver.DriverFactoryList import org.pageobject.core.driver.FixedLocation import org.pageobject.core.driver.LoggingDriverFactory import org.pageobject.core.driver.RemoteDriverFactory import org.pageobject.core.driver.TakeScreenshot import org.pageobject.core.driver.ThreadNameNumberingDriverFactory import org.pageobject.core.driver.TracedRemoteDriverFactory /** * Traits used by all VncDriverFactories */ trait DefaultVncDriverTraits extends FixedLocation with TakeScreenshot with TracedRemoteDriverFactory with LoggingDriverFactory with ThreadNameNumberingDriverFactory { this: RemoteDriverFactory => } /** * This DriverFactory will launch a VNC Server, start the selenium server inside * and the creates a Chrome Browser with matching RemoteWebDriver to connect into the VNC Server. */ object DefaultVncChromeDriverFactory extends VncChromeDriverFactory(DefaultVncServerManager) with DefaultVncDriverTraits /** * This DriverFactory will launch a VNC Server, start the selenium server inside * and the creates a Firefox Browser with matching RemoteWebDriver to connect into the VNC Server. */ object DefaultVncFirefoxDriverFactory extends VncFirefoxDriverFactory(DefaultVncServerManager) with DefaultVncDriverTraits
{'content_hash': 'dce3067ada337fbf03129f2d8635620d', 'timestamp': '', 'source': 'github', 'line_count': 32, 'max_line_length': 120, 'avg_line_length': 40.71875, 'alnum_prop': 0.8465080583269379, 'repo_name': 'agido/pageobject', 'id': '6f4576748629060b39f1d4ceed551c7a1cd11978', 'size': '1896', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'core/src/main/scala/org/pageobject/core/driver/vnc/DefaultVncDriverFactoryList.scala', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Batchfile', 'bytes': '206'}, {'name': 'HTML', 'bytes': '2078'}, {'name': 'Java', 'bytes': '4237'}, {'name': 'Scala', 'bytes': '303137'}, {'name': 'Shell', 'bytes': '10815'}]}
import op_test import numpy as np import unittest import paddle import paddle.fluid.core as core from paddle.distributed.models.moe import utils from paddle.fluid.framework import _test_eager_guard def count(x, upper_num): res = np.zeros((upper_num,)).astype(int) for i in x.reshape(-1): if i >= 0 and i < len(res): res[i] += 1 return res @unittest.skipIf( not core.is_compiled_with_cuda(), "core is not compiled with CUDA" ) class TestNumberCountOpInt64(op_test.OpTest): def setUp(self): upper_num = 16 self.op_type = "number_count" x = np.random.randint(-1, upper_num, size=(1000, 2)).astype('int64') self.inputs = {'numbers': x} self.outputs = {'Out': count(x, upper_num)} self.attrs = {"upper_range": upper_num} def test_forward(self): self.check_output_with_place(paddle.CUDAPlace(0)) @unittest.skipIf( not core.is_compiled_with_cuda(), "core is not compiled with CUDA" ) class TestNumberCountAPI(unittest.TestCase): def setUp(self): self.upper_num = 320 self.x = np.random.randint(-1, self.upper_num, size=(6000, 200)).astype( 'int64' ) self.out = count(self.x, self.upper_num) self.place = paddle.CUDAPlace(0) def test_api_static(self): paddle.enable_static() with paddle.static.program_guard(paddle.static.Program()): x = paddle.fluid.data('x', self.x.shape, dtype="int64") out = utils._number_count(x, self.upper_num) exe = paddle.static.Executor(self.place) res = exe.run(feed={'x': self.x}, fetch_list=[out]) assert np.allclose(res, self.out) def func_api_dygraph(self): paddle.disable_static() x = paddle.to_tensor(self.x) out = utils._number_count(x, self.upper_num) assert np.allclose(out.numpy(), self.out) def test_api_dygraph(self): with _test_eager_guard(): self.func_api_dygraph() self.func_api_dygraph() if __name__ == '__main__': paddle.enable_static() unittest.main()
{'content_hash': '6545ee09704b9db0b21e3a3a46c70ab6', 'timestamp': '', 'source': 'github', 'line_count': 69, 'max_line_length': 80, 'avg_line_length': 30.695652173913043, 'alnum_prop': 0.6109537299339, 'repo_name': 'PaddlePaddle/Paddle', 'id': 'a31fb1a5978c12cba3f4133c48c7a9baf8364314', 'size': '2731', 'binary': False, 'copies': '2', 'ref': 'refs/heads/develop', 'path': 'python/paddle/fluid/tests/unittests/test_number_count_op.py', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Batchfile', 'bytes': '58544'}, {'name': 'C', 'bytes': '210300'}, {'name': 'C++', 'bytes': '36848680'}, {'name': 'CMake', 'bytes': '902619'}, {'name': 'Cuda', 'bytes': '5227207'}, {'name': 'Dockerfile', 'bytes': '4361'}, {'name': 'Go', 'bytes': '49796'}, {'name': 'Java', 'bytes': '16630'}, {'name': 'Jinja', 'bytes': '23852'}, {'name': 'MLIR', 'bytes': '39982'}, {'name': 'Python', 'bytes': '36203874'}, {'name': 'R', 'bytes': '1332'}, {'name': 'Shell', 'bytes': '553177'}]}
using System; using System.Drawing; using System.Runtime.InteropServices; using System.Windows.Forms; using System.Windows.Forms.Design; namespace SqlNotebook; [ToolStripItemDesignerAvailability(ToolStripItemDesignerAvailability.ToolStrip)] public sealed class CueToolStripTextBox : ToolStripControlHost { public CueToolStripTextBox() : base(new StyledTextBox()) { InnerTextBox.Width = 150; Font = new Font("Segoe UI", 9); } public TextBox InnerTextBox { get { return (TextBox)Control; } } public override string Text { get { return InnerTextBox.Text; } set { InnerTextBox.Text = value; } } public string CueText { set { SetCueText(InnerTextBox, value); } } public void SelectAll() { InnerTextBox.SelectAll(); } public static void SetCueText(TextBox self, string text) { if (self.IsHandleCreated) { NativeMethods.SendMessage(self.Handle, NativeMethods.EM_SETCUEBANNER, (IntPtr)1, text ?? ""); } else { self.HandleCreated += (sender, e) => SetCueText(self, text); } } private static class NativeMethods { public const uint ECM_FIRST = 0x1500; public const uint EM_SETCUEBANNER = ECM_FIRST + 1; public const int WM_NCPAINT = 0x85; [DllImport("user32")] public static extern IntPtr GetWindowDC(IntPtr hwnd); [DllImport("user32.dll", CharSet = CharSet.Unicode)] public static extern IntPtr SendMessage(IntPtr hWnd, UInt32 msg, IntPtr wp, string lp); } private sealed class StyledTextBox : TextBox { private static readonly Pen _unfocusedPen = new Pen(Color.FromArgb(230, 230, 230)); private static readonly Pen _focusedPen = new Pen(Color.FromArgb(0, 120, 215)); protected override void WndProc(ref Message m) { base.WndProc(ref m); if (m.Msg == NativeMethods.WM_NCPAINT) { var dc = NativeMethods.GetWindowDC(Handle); using (Graphics g = Graphics.FromHdc(dc)) { g.DrawRectangle(Focused ? _focusedPen : _unfocusedPen, 0, 0, Width - 1, Height - 1); } } } } }
{'content_hash': 'ba04b1c94917ec1e2aede672306c3318', 'timestamp': '', 'source': 'github', 'line_count': 82, 'max_line_length': 105, 'avg_line_length': 28.26829268292683, 'alnum_prop': 0.6069887834339949, 'repo_name': 'electroly/sqlnotebook', 'id': 'fb9ad12d29080e5c6aa4e3ffb65f287bcf4b3bce', 'size': '2320', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/SqlNotebook/CueToolStripTextBox.cs', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'C', 'bytes': '1927'}, {'name': 'C#', 'bytes': '1590882'}, {'name': 'CSS', 'bytes': '2741'}, {'name': 'HTML', 'bytes': '99495'}, {'name': 'PowerShell', 'bytes': '31584'}, {'name': 'TSQL', 'bytes': '7066'}]}
<?php namespace app\controllers; use Yii; use app\models\Places; use app\models\PlacesSearch; use yii\web\Controller; use yii\web\NotFoundHttpException; use yii\filters\VerbFilter; use yii\filters\AccessControl; /** * PlaceController implements the CRUD actions for Places model. */ class PlaceController extends Controller { public function behaviors() { return [ 'access' => [ 'class' => AccessControl::className(), 'rules' => [ [ 'allow' => true, 'roles' => ['@'], ], ], ], 'verbs' => [ 'class' => VerbFilter::className(), 'actions' => [ 'delete' => ['post'], ], ], ]; } /** * Lists all Places models. * @return mixed */ public function actionIndex() { $searchModel = new PlacesSearch(); $dataProvider = $searchModel->search(Yii::$app->request->queryParams); return $this->render('index', [ 'searchModel' => $searchModel, 'dataProvider' => $dataProvider, ]); } /** * Displays a single Places model. * @param integer $id * @return mixed */ public function actionView($id) { return $this->render('view', [ 'model' => $this->findModel($id), ]); } /** * Creates a new Places model. * If creation is successful, the browser will be redirected to the 'view' page. * @return mixed */ public function actionCreate() { $model = new Places(); if ($model->load(Yii::$app->request->post()) && $model->save()) { return $this->redirect(['view', 'id' => $model->id]); } else { return $this->render('create', [ 'model' => $model, ]); } } /** * Updates an existing Places model. * If update is successful, the browser will be redirected to the 'view' page. * @param integer $id * @return mixed */ public function actionUpdate($id) { $model = $this->findModel($id); if ($model->load(Yii::$app->request->post()) && $model->save()) { return $this->redirect(['view', 'id' => $model->id]); } else { return $this->render('update', [ 'model' => $model, ]); } } /** * Deletes an existing Places model. * If deletion is successful, the browser will be redirected to the 'index' page. * @param integer $id * @return mixed */ public function actionDelete($id) { $this->findModel($id)->delete(); return $this->redirect(['index']); } /** * Finds the Places model based on its primary key value. * If the model is not found, a 404 HTTP exception will be thrown. * @param integer $id * @return Places the loaded model * @throws NotFoundHttpException if the model cannot be found */ protected function findModel($id) { if (($model = Places::findOne($id)) !== null) { return $model; } else { throw new NotFoundHttpException('The requested page does not exist.'); } } }
{'content_hash': '8c8bd839a5f2aec90c6065468113cf45', 'timestamp': '', 'source': 'github', 'line_count': 131, 'max_line_length': 85, 'avg_line_length': 25.801526717557252, 'alnum_prop': 0.5047337278106508, 'repo_name': 'tpmanc/football', 'id': '124c93ebdf3060d090b81013d30d432a8f2b5d96', 'size': '3380', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'controllers/PlaceController.php', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'CSS', 'bytes': '62072'}, {'name': 'JavaScript', 'bytes': '31141'}, {'name': 'PHP', 'bytes': '138328'}, {'name': 'Shell', 'bytes': '1030'}]}
<?php /** * @license see LICENSE */ namespace UForm\Test\Filter; use UForm\Filter\LeftTrim; class LeftTrimTest extends \PHPUnit_Framework_TestCase { public function testFilter() { $filter = new LeftTrim(); $this->assertEquals("foo ", $filter->filter(" foo ")); $filter = new LeftTrim("-+"); $this->assertEquals("foo+-+", $filter->filter("+-+foo+-+")); $this->assertNull($filter->filter(null)); } }
{'content_hash': '8ca525aaed745d1677d187e33935f9d5', 'timestamp': '', 'source': 'github', 'line_count': 24, 'max_line_length': 68, 'avg_line_length': 19.125, 'alnum_prop': 0.5882352941176471, 'repo_name': 'kayladnls/UForm', 'id': 'fe7ad14f9402ced0fb1b1ac07cda215450f1e657', 'size': '459', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'test/suites/UForm/Test/Filter/LeftTrimTest.php', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'HTML', 'bytes': '1458'}, {'name': 'PHP', 'bytes': '217415'}, {'name': 'Shell', 'bytes': '924'}]}
.oo-ui-icon-add { background-image: url('themes/wikimediaui/images/icons/add.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/add.svg'); } .oo-ui-image-invert.oo-ui-icon-add { background-image: url('themes/wikimediaui/images/icons/add-invert.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/add-invert.svg'); } .oo-ui-image-progressive.oo-ui-icon-add { background-image: url('themes/wikimediaui/images/icons/add-progressive.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/add-progressive.svg'); } .oo-ui-icon-advanced { background-image: url('themes/wikimediaui/images/icons/settings.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/settings.svg'); } .oo-ui-image-invert.oo-ui-icon-advanced { background-image: url('themes/wikimediaui/images/icons/settings-invert.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/settings-invert.svg'); } .oo-ui-image-progressive.oo-ui-icon-advanced { background-image: url('themes/wikimediaui/images/icons/settings-progressive.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/settings-progressive.svg'); } .oo-ui-icon-browser { background-image: url('themes/wikimediaui/images/icons/browser-rtl.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/browser-rtl.svg'); } .oo-ui-image-invert.oo-ui-icon-browser { background-image: url('themes/wikimediaui/images/icons/browser-rtl-invert.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/browser-rtl-invert.svg'); } .oo-ui-image-progressive.oo-ui-icon-browser { background-image: url('themes/wikimediaui/images/icons/browser-rtl-progressive.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/browser-rtl-progressive.svg'); } .oo-ui-icon-cancel { background-image: url('themes/wikimediaui/images/icons/cancel.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/cancel.svg'); } .oo-ui-image-destructive.oo-ui-icon-cancel { background-image: url('themes/wikimediaui/images/icons/cancel-destructive.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/cancel-destructive.svg'); } .oo-ui-image-invert.oo-ui-icon-cancel { background-image: url('themes/wikimediaui/images/icons/cancel-invert.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/cancel-invert.svg'); } .oo-ui-image-progressive.oo-ui-icon-cancel { background-image: url('themes/wikimediaui/images/icons/cancel-progressive.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/cancel-progressive.svg'); } .oo-ui-icon-check { background-image: url('themes/wikimediaui/images/icons/check.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/check.svg'); } .oo-ui-image-destructive.oo-ui-icon-check { background-image: url('themes/wikimediaui/images/icons/check-destructive.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/check-destructive.svg'); } .oo-ui-image-invert.oo-ui-icon-check { background-image: url('themes/wikimediaui/images/icons/check-invert.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/check-invert.svg'); } .oo-ui-image-progressive.oo-ui-icon-check { background-image: url('themes/wikimediaui/images/icons/check-progressive.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/check-progressive.svg'); } .oo-ui-icon-checkAll { background-image: url('themes/wikimediaui/images/icons/checkAll.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/checkAll.svg'); } .oo-ui-image-invert.oo-ui-icon-checkAll { background-image: url('themes/wikimediaui/images/icons/checkAll-invert.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/checkAll-invert.svg'); } .oo-ui-image-progressive.oo-ui-icon-checkAll { background-image: url('themes/wikimediaui/images/icons/checkAll-progressive.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/checkAll-progressive.svg'); } .oo-ui-icon-clear { background-image: url('themes/wikimediaui/images/icons/clear.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/clear.svg'); } .oo-ui-image-invert.oo-ui-icon-clear { background-image: url('themes/wikimediaui/images/icons/clear-invert.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/clear-invert.svg'); } .oo-ui-image-progressive.oo-ui-icon-clear { background-image: url('themes/wikimediaui/images/icons/clear-progressive.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/clear-progressive.svg'); } .oo-ui-icon-clock { background-image: url('themes/wikimediaui/images/icons/clock.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/clock.svg'); } .oo-ui-image-invert.oo-ui-icon-clock { background-image: url('themes/wikimediaui/images/icons/clock-invert.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/clock-invert.svg'); } .oo-ui-image-progressive.oo-ui-icon-clock { background-image: url('themes/wikimediaui/images/icons/clock-progressive.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/clock-progressive.svg'); } .oo-ui-icon-close { background-image: url('themes/wikimediaui/images/icons/close.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/close.svg'); } .oo-ui-image-invert.oo-ui-icon-close { background-image: url('themes/wikimediaui/images/icons/close-invert.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/close-invert.svg'); } .oo-ui-image-progressive.oo-ui-icon-close { background-image: url('themes/wikimediaui/images/icons/close-progressive.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/close-progressive.svg'); } .oo-ui-icon-ellipsis { background-image: url('themes/wikimediaui/images/icons/ellipsis.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/ellipsis.svg'); } .oo-ui-image-invert.oo-ui-icon-ellipsis { background-image: url('themes/wikimediaui/images/icons/ellipsis-invert.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/ellipsis-invert.svg'); } .oo-ui-image-progressive.oo-ui-icon-ellipsis { background-image: url('themes/wikimediaui/images/icons/ellipsis-progressive.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/ellipsis-progressive.svg'); } .oo-ui-icon-feedback { background-image: url('themes/wikimediaui/images/icons/feedback-rtl.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/feedback-rtl.svg'); } .oo-ui-image-invert.oo-ui-icon-feedback { background-image: url('themes/wikimediaui/images/icons/feedback-rtl-invert.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/feedback-rtl-invert.svg'); } .oo-ui-image-progressive.oo-ui-icon-feedback { background-image: url('themes/wikimediaui/images/icons/feedback-rtl-progressive.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/feedback-rtl-progressive.svg'); } .oo-ui-icon-funnel { background-image: url('themes/wikimediaui/images/icons/funnel-rtl.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/funnel-rtl.svg'); } .oo-ui-image-invert.oo-ui-icon-funnel { background-image: url('themes/wikimediaui/images/icons/funnel-rtl-invert.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/funnel-rtl-invert.svg'); } .oo-ui-image-progressive.oo-ui-icon-funnel { background-image: url('themes/wikimediaui/images/icons/funnel-rtl-progressive.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/funnel-rtl-progressive.svg'); } .oo-ui-icon-heart { background-image: url('themes/wikimediaui/images/icons/heart.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/heart.svg'); } .oo-ui-image-invert.oo-ui-icon-heart { background-image: url('themes/wikimediaui/images/icons/heart-invert.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/heart-invert.svg'); } .oo-ui-image-progressive.oo-ui-icon-heart { background-image: url('themes/wikimediaui/images/icons/heart-progressive.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/heart-progressive.svg'); } .oo-ui-icon-help { background-image: url('themes/wikimediaui/images/icons/help-rtl.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/help-rtl.svg'); } /* @noflip */ .oo-ui-icon-help:lang(he) { background-image: url('themes/wikimediaui/images/icons/help-ltr.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/help-ltr.svg'); } /* @noflip */ .oo-ui-icon-help:lang(yi) { background-image: url('themes/wikimediaui/images/icons/help-ltr.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/help-ltr.svg'); } .oo-ui-image-invert.oo-ui-icon-help { background-image: url('themes/wikimediaui/images/icons/help-rtl-invert.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/help-rtl-invert.svg'); } /* @noflip */ .oo-ui-image-invert.oo-ui-icon-help:lang(he) { background-image: url('themes/wikimediaui/images/icons/help-ltr-invert.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/help-ltr-invert.svg'); } /* @noflip */ .oo-ui-image-invert.oo-ui-icon-help:lang(yi) { background-image: url('themes/wikimediaui/images/icons/help-ltr-invert.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/help-ltr-invert.svg'); } .oo-ui-image-progressive.oo-ui-icon-help { background-image: url('themes/wikimediaui/images/icons/help-rtl-progressive.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/help-rtl-progressive.svg'); } /* @noflip */ .oo-ui-image-progressive.oo-ui-icon-help:lang(he) { background-image: url('themes/wikimediaui/images/icons/help-ltr-progressive.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/help-ltr-progressive.svg'); } /* @noflip */ .oo-ui-image-progressive.oo-ui-icon-help:lang(yi) { background-image: url('themes/wikimediaui/images/icons/help-ltr-progressive.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/help-ltr-progressive.svg'); } .oo-ui-icon-helpNotice { background-image: url('themes/wikimediaui/images/icons/helpOutlined-rtl.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/helpOutlined-rtl.svg'); } /* @noflip */ .oo-ui-icon-helpNotice:lang(he) { background-image: url('themes/wikimediaui/images/icons/helpOutlined-ltr.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/helpOutlined-ltr.svg'); } /* @noflip */ .oo-ui-icon-helpNotice:lang(yi) { background-image: url('themes/wikimediaui/images/icons/helpOutlined-ltr.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/helpOutlined-ltr.svg'); } .oo-ui-image-invert.oo-ui-icon-helpNotice { background-image: url('themes/wikimediaui/images/icons/helpOutlined-rtl-invert.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/helpOutlined-rtl-invert.svg'); } /* @noflip */ .oo-ui-image-invert.oo-ui-icon-helpNotice:lang(he) { background-image: url('themes/wikimediaui/images/icons/helpOutlined-ltr-invert.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/helpOutlined-ltr-invert.svg'); } /* @noflip */ .oo-ui-image-invert.oo-ui-icon-helpNotice:lang(yi) { background-image: url('themes/wikimediaui/images/icons/helpOutlined-ltr-invert.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/helpOutlined-ltr-invert.svg'); } .oo-ui-image-progressive.oo-ui-icon-helpNotice { background-image: url('themes/wikimediaui/images/icons/helpOutlined-rtl-progressive.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/helpOutlined-rtl-progressive.svg'); } /* @noflip */ .oo-ui-image-progressive.oo-ui-icon-helpNotice:lang(he) { background-image: url('themes/wikimediaui/images/icons/helpOutlined-ltr-progressive.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/helpOutlined-ltr-progressive.svg'); } /* @noflip */ .oo-ui-image-progressive.oo-ui-icon-helpNotice:lang(yi) { background-image: url('themes/wikimediaui/images/icons/helpOutlined-ltr-progressive.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/helpOutlined-ltr-progressive.svg'); } .oo-ui-icon-key { background-image: url('themes/wikimediaui/images/icons/key.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/key.svg'); } .oo-ui-image-invert.oo-ui-icon-key { background-image: url('themes/wikimediaui/images/icons/key-invert.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/key-invert.svg'); } .oo-ui-image-progressive.oo-ui-icon-key { background-image: url('themes/wikimediaui/images/icons/key-progressive.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/key-progressive.svg'); } .oo-ui-icon-keyboard { background-image: url('themes/wikimediaui/images/icons/keyboard.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/keyboard.svg'); } .oo-ui-image-invert.oo-ui-icon-keyboard { background-image: url('themes/wikimediaui/images/icons/keyboard-invert.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/keyboard-invert.svg'); } .oo-ui-image-progressive.oo-ui-icon-keyboard { background-image: url('themes/wikimediaui/images/icons/keyboard-progressive.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/keyboard-progressive.svg'); } .oo-ui-icon-lightbulb { background-image: url('themes/wikimediaui/images/icons/lightbulb.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/lightbulb.svg'); } .oo-ui-image-invert.oo-ui-icon-lightbulb { background-image: url('themes/wikimediaui/images/icons/lightbulb-invert.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/lightbulb-invert.svg'); } .oo-ui-image-progressive.oo-ui-icon-lightbulb { background-image: url('themes/wikimediaui/images/icons/lightbulb-progressive.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/lightbulb-progressive.svg'); } .oo-ui-icon-logOut { background-image: url('themes/wikimediaui/images/icons/logOut-rtl.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/logOut-rtl.svg'); } .oo-ui-image-invert.oo-ui-icon-logOut { background-image: url('themes/wikimediaui/images/icons/logOut-rtl-invert.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/logOut-rtl-invert.svg'); } .oo-ui-image-progressive.oo-ui-icon-logOut { background-image: url('themes/wikimediaui/images/icons/logOut-rtl-progressive.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/logOut-rtl-progressive.svg'); } .oo-ui-icon-newWindow { background-image: url('themes/wikimediaui/images/icons/newWindow-rtl.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/newWindow-rtl.svg'); } .oo-ui-image-invert.oo-ui-icon-newWindow { background-image: url('themes/wikimediaui/images/icons/newWindow-rtl-invert.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/newWindow-rtl-invert.svg'); } .oo-ui-image-progressive.oo-ui-icon-newWindow { background-image: url('themes/wikimediaui/images/icons/newWindow-rtl-progressive.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/newWindow-rtl-progressive.svg'); } .oo-ui-icon-pageSettings { background-image: url('themes/wikimediaui/images/icons/pageSettings.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/pageSettings.svg'); } .oo-ui-image-invert.oo-ui-icon-pageSettings { background-image: url('themes/wikimediaui/images/icons/pageSettings-invert.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/pageSettings-invert.svg'); } .oo-ui-image-progressive.oo-ui-icon-pageSettings { background-image: url('themes/wikimediaui/images/icons/pageSettings-progressive.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/pageSettings-progressive.svg'); } .oo-ui-icon-printer { background-image: url('themes/wikimediaui/images/icons/printer.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/printer.svg'); } .oo-ui-image-invert.oo-ui-icon-printer { background-image: url('themes/wikimediaui/images/icons/printer-invert.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/printer-invert.svg'); } .oo-ui-image-progressive.oo-ui-icon-printer { background-image: url('themes/wikimediaui/images/icons/printer-progressive.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/printer-progressive.svg'); } .oo-ui-icon-reload { background-image: url('themes/wikimediaui/images/icons/reload.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/reload.svg'); } .oo-ui-image-invert.oo-ui-icon-reload { background-image: url('themes/wikimediaui/images/icons/reload-invert.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/reload-invert.svg'); } .oo-ui-image-progressive.oo-ui-icon-reload { background-image: url('themes/wikimediaui/images/icons/reload-progressive.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/reload-progressive.svg'); } .oo-ui-icon-search { background-image: url('themes/wikimediaui/images/icons/search.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/search.svg'); } .oo-ui-image-invert.oo-ui-icon-search { background-image: url('themes/wikimediaui/images/icons/search-invert.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/search-invert.svg'); } .oo-ui-image-progressive.oo-ui-icon-search { background-image: url('themes/wikimediaui/images/icons/search-progressive.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/search-progressive.svg'); } .oo-ui-icon-settings { background-image: url('themes/wikimediaui/images/icons/settings.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/settings.svg'); } .oo-ui-image-invert.oo-ui-icon-settings { background-image: url('themes/wikimediaui/images/icons/settings-invert.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/settings-invert.svg'); } .oo-ui-image-progressive.oo-ui-icon-settings { background-image: url('themes/wikimediaui/images/icons/settings-progressive.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/settings-progressive.svg'); } .oo-ui-icon-subtract { background-image: url('themes/wikimediaui/images/icons/subtract.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/subtract.svg'); } .oo-ui-image-destructive.oo-ui-icon-subtract { background-image: url('themes/wikimediaui/images/icons/subtract-destructive.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/subtract-destructive.svg'); } .oo-ui-image-invert.oo-ui-icon-subtract { background-image: url('themes/wikimediaui/images/icons/subtract-invert.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/subtract-invert.svg'); } .oo-ui-image-progressive.oo-ui-icon-subtract { background-image: url('themes/wikimediaui/images/icons/subtract-progressive.png'); background-image: linear-gradient(transparent, transparent), /* @embed */ url('themes/wikimediaui/images/icons/subtract-progressive.svg'); }
{'content_hash': '1f4500467bff5657771920326d82bca4', 'timestamp': '', 'source': 'github', 'line_count': 385, 'max_line_length': 148, 'avg_line_length': 62.114285714285714, 'alnum_prop': 0.7580914945220373, 'repo_name': 'joeyparrish/cdnjs', 'id': '1a7cd93eb70a2102d3c00d39b867fe87a73560b0', 'size': '24136', 'binary': False, 'copies': '4', 'ref': 'refs/heads/master', 'path': 'ajax/libs/oojs-ui/0.29.4/oojs-ui-wikimediaui-icons-interactions.rtl.css', 'mode': '33188', 'license': 'mit', 'language': []}
package org.aries.process; import java.util.HashMap; import java.util.Map; import javax.xml.ws.WebServiceContext; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.aries.bean.ProxyLocator; import org.aries.client.Client; import org.aries.runtime.BeanContext; import org.aries.util.UUIDGenerator; import org.aries.util.concurrent.FutureResult; public abstract class AbstractProcess implements Process { Log log = LogFactory.getLog(getClass()); //@Resource protected WebServiceContext webServiceContext; //protected AbstractStateManager<? extends ServiceState> stateManager; private Map<String, Object> values = new HashMap<String, Object>(); private FutureResult<Boolean> futureResult = new FutureResult<Boolean>(); public AbstractProcess() { this(UUIDGenerator.generateRandomUUIDString()); } public AbstractProcess(String correlationId) { setCorrelationId(correlationId); } public String getCorrelationId() { return getValue("correlationId"); } public void setCorrelationId(Object correlationId) { setValue("correlationId", correlationId); } // public String getTransactionId() { // return getValue("transactionId"); // } // // public void setTransactionId(String transactionId) { // setValue("transactionId", transactionId); // } public String getName() { return getValue("name"); } public void setName(String name) { setValue("name", name); } public String getVersion() { return getValue("name"); } public void setVersion(String version) { setValue("version", version); } @SuppressWarnings("unchecked") public <T> T getValue(String key) { return (T) values.get(key); } public void setValue(String key, Object value) { values.put(key, value); } protected <T> T getClient(String clientId) { String proxyKey = clientId; ProxyLocator proxyLocator = BeanContext.get("org.aries.proxyLocator"); T client = proxyLocator.get(proxyKey); //if (client == null) // System.out.println(); ((Client) client).setCorrelationId(getCorrelationId()); return client; } // protected Responder getResponder(String proxyKey) { // Map<String, Serializable> conversationState = ConversationRegistry.getInstance().getConversationState(getCorrelationId()); // Assert.notNull(conversationState, "ConversationState not found: "+getCorrelationId()); // String originatingTransport = (String) conversationState.get("originatingTransport"); // Responder responder = getResponder(proxyKey, originatingTransport); // // if (originatingTransport.equals("JMS")) { // Destination jmsReplyTo = (Destination) conversationState.get("replyToDestination"); // JmsClient jmsClient = (JmsClient) responder; // jmsClient.setDestination(jmsReplyTo); // } // // return responder; // } // // //TODO use transport to return correct proxy // protected Responder getResponder(String proxyKey, String transport) { // Responder responder = getClient(proxyKey); // return responder; // } public boolean waitForTermination() throws Exception { return futureResult.get(); } public boolean waitForTermination(long timeout) throws Exception { return futureResult.get(timeout); } public void exit() { futureResult.set(true); } public void abort() { futureResult.set(false); } }
{'content_hash': 'aa7e065f94242bb95b60d182c35d75bc', 'timestamp': '', 'source': 'github', 'line_count': 127, 'max_line_length': 126, 'avg_line_length': 25.968503937007874, 'alnum_prop': 0.7431776834445118, 'repo_name': 'tfisher1226/ARIES', 'id': '20831a79820856b6df54aad55d1b5627392f357b', 'size': '3298', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'aries/common/common-process/src/main/java/org/aries/process/AbstractProcess.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Batchfile', 'bytes': '1606'}, {'name': 'CSS', 'bytes': '660469'}, {'name': 'Common Lisp', 'bytes': '91717'}, {'name': 'Emacs Lisp', 'bytes': '12403'}, {'name': 'GAP', 'bytes': '86009'}, {'name': 'HTML', 'bytes': '9381408'}, {'name': 'Java', 'bytes': '25671734'}, {'name': 'JavaScript', 'bytes': '304513'}, {'name': 'Shell', 'bytes': '51942'}]}
package au.com.dius.pact.provider.junit; import au.com.dius.pact.provider.junit.loader.PactFolder; import au.com.dius.pact.provider.junit.target.HttpTarget; import au.com.dius.pact.provider.junit.target.Target; import au.com.dius.pact.provider.junit.target.TestTarget; import com.github.restdriver.clientdriver.ClientDriverRule; import org.apache.commons.io.IOUtils; import org.junit.Before; import org.junit.ClassRule; import org.junit.runner.RunWith; import java.io.IOException; import java.nio.charset.Charset; import static com.github.restdriver.clientdriver.RestClientDriver.giveEmptyResponse; import static com.github.restdriver.clientdriver.RestClientDriver.giveResponse; import static com.github.restdriver.clientdriver.RestClientDriver.onRequestTo; @RunWith(PactRunner.class) @Provider("ArticlesProvider") @PactFolder("../pact-jvm-consumer-junit/build/2.11/pacts") public class ArticlesContractTest { @TestTarget public final Target target = new HttpTarget(8000); @ClassRule public static final ClientDriverRule embeddedService = new ClientDriverRule(8000); @Before public void before() throws IOException { String json = IOUtils.toString(getClass().getResourceAsStream("/articles.json"), Charset.defaultCharset()); embeddedService.addExpectation( onRequestTo("/articles.json"), giveResponse(json, "application/json") ); } @State("Pact for Issue 313") public void stateChange() {} }
{'content_hash': 'f553c7c1311d153c78ef1a1117889899', 'timestamp': '', 'source': 'github', 'line_count': 40, 'max_line_length': 111, 'avg_line_length': 35.875, 'alnum_prop': 0.794425087108014, 'repo_name': 'Fitzoh/pact-jvm', 'id': 'f7fef5dc2897e77e1eb59c61617734b59b988b42', 'size': '1435', 'binary': False, 'copies': '3', 'ref': 'refs/heads/master', 'path': 'pact-jvm-provider-junit/src/test/java/au/com/dius/pact/provider/junit/ArticlesContractTest.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Clojure', 'bytes': '7506'}, {'name': 'Groovy', 'bytes': '532538'}, {'name': 'Java', 'bytes': '483180'}, {'name': 'Kotlin', 'bytes': '69243'}, {'name': 'Scala', 'bytes': '186192'}]}
FactoryGirl.define do factory :reminder do init_valid_for_n_days Faker::Number.number(1) init_notification_text Faker::Lorem.paragraph notification_text Faker::Lorem.paragraph init_deadline_text Faker::Lorem.paragraph deadline_text Faker::Lorem.paragraph name Faker::Commerce.product_name end end
{'content_hash': '413c7546fe0870f69ce0835eb6ace5fe', 'timestamp': '', 'source': 'github', 'line_count': 10, 'max_line_length': 49, 'avg_line_length': 32.5, 'alnum_prop': 0.7538461538461538, 'repo_name': 'netguru/reminders', 'id': '9f1fa07b3064429e6c0d4149b7e96e05d57d2ff8', 'size': '325', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'spec/factories/reminder_factory.rb', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '38238'}, {'name': 'CoffeeScript', 'bytes': '3413'}, {'name': 'HTML', 'bytes': '29792'}, {'name': 'JavaScript', 'bytes': '1043'}, {'name': 'Ruby', 'bytes': '296532'}]}
/* * When testing with webpack and ES6, we have to do some extra * things to get testing to work right. Because we are gonna write tests * in ES6 too, we have to compile those as well. That's handled in * karma.conf.js with the karma-webpack plugin. This is the entry * file for webpack test. Just like webpack will create a bundle.js * file for our client, when we run test, it will compile and bundle them * all here! Crazy huh. So we need to do some setup */ Error.stackTraceLimit = Infinity; require('core-js/es6'); require('core-js/es7/reflect'); // Typescript emit helpers polyfill require('ts-helpers'); require('zone.js/dist/zone'); require('zone.js/dist/long-stack-trace-zone'); require('zone.js/dist/async-test'); require('zone.js/dist/fake-async-test'); require('zone.js/dist/sync-test'); require('zone.js/dist/proxy'); // since zone.js 0.6.15 require('zone.js/dist/jasmine-patch'); // put here since zone.js 0.6.14 // RxJS require('rxjs/Rx'); var testing = require('@angular/core/testing'); var browser = require('@angular/platform-browser-dynamic/testing'); testing.TestBed.initTestEnvironment( browser.BrowserDynamicTestingModule, browser.platformBrowserDynamicTesting() ); /* * Ok, this is kinda crazy. We can use the context method on * require that webpack created in order to tell webpack * what files we actually want to require or import. * Below, context will be a function/object with file names as keys. * Using that regex we are saying look in ../src then find * any file that ends with spec.ts and get its path. By passing in true * we say do this recursively */ var testContext = require.context('../ontimize', true, /\.spec\.ts/); /* * get all the files, for each file, call the context function * that will require the file and load it up here. Context will * loop and require those spec files here */ function requireAll(requireContext) { return requireContext.keys().map(requireContext); } // requires and returns all modules that match var modules = requireAll(testContext);
{'content_hash': 'f91031e690e933524fcd12d8a0cbdf6d', 'timestamp': '', 'source': 'github', 'line_count': 58, 'max_line_length': 73, 'avg_line_length': 35.172413793103445, 'alnum_prop': 0.7357843137254902, 'repo_name': 'OntimizeWeb/ontimize-web-ngx', 'id': '007a705d5ea806cf668f0e24886ae8038f5c8d57', 'size': '2040', 'binary': False, 'copies': '2', 'ref': 'refs/heads/8.x.x', 'path': 'projects/ontimize-web-ngx/config/spec-bundle.js', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'HTML', 'bytes': '190381'}, {'name': 'JavaScript', 'bytes': '7594'}, {'name': 'SCSS', 'bytes': '125972'}, {'name': 'TypeScript', 'bytes': '1533764'}]}
package com.liangmayong.base.airbus.listener; /** * Created by LiangMaYong on 2017/4/28. */ public interface AirBusListener { /** * onAirBus * * @param event event */ void onAirBus(Object event); }
{'content_hash': 'e7e8759034c0552819979a05e6fd94d6', 'timestamp': '', 'source': 'github', 'line_count': 15, 'max_line_length': 45, 'avg_line_length': 15.4, 'alnum_prop': 0.6190476190476191, 'repo_name': 'LiangMaYong/android-base', 'id': '667a5d39af647d79f620a4064c7b4602b1aa9dd3', 'size': '231', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'base/src/main/java/com/liangmayong/base/airbus/listener/AirBusListener.java', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Batchfile', 'bytes': '64'}, {'name': 'CSS', 'bytes': '8643'}, {'name': 'HTML', 'bytes': '41228'}, {'name': 'Java', 'bytes': '1009177'}, {'name': 'JavaScript', 'bytes': '28344'}]}
<!-- Auto Generated Below --> ## Dependencies ### Used by - [dnn-rm-right-pane](../dnn-rm-right-pane) ### Depends on - dnn-vertical-overflow-menu - [dnn-action-create-folder](../actions/dnn-action-create-folder) - [dnn-action-upload-file](../actions/dnn-action-upload-file) - [dnn-action-edit-item](../actions/dnn-action-edit-item) - [dnn-action-move-items](../actions/dnn-action-move-items) - [dnn-action-delete-items](../actions/dnn-action-delete-items) - [dnn-action-unlink-items](../actions/dnn-action-unlink-items) - [dnn-action-copy-url](../actions/dnn-action-copy-url) - [dnn-action-download-item](../actions/dnn-action-download-item) - dnn-collapsible ### Graph ```mermaid graph TD; dnn-rm-actions-bar --> dnn-vertical-overflow-menu dnn-rm-actions-bar --> dnn-action-create-folder dnn-rm-actions-bar --> dnn-action-upload-file dnn-rm-actions-bar --> dnn-action-edit-item dnn-rm-actions-bar --> dnn-action-move-items dnn-rm-actions-bar --> dnn-action-delete-items dnn-rm-actions-bar --> dnn-action-unlink-items dnn-rm-actions-bar --> dnn-action-copy-url dnn-rm-actions-bar --> dnn-action-download-item dnn-rm-actions-bar --> dnn-collapsible dnn-action-create-folder --> dnn-modal dnn-action-create-folder --> dnn-rm-create-folder dnn-rm-create-folder --> dnn-button dnn-button --> dnn-modal dnn-button --> dnn-button dnn-action-upload-file --> dnn-modal dnn-action-upload-file --> dnn-rm-upload-file dnn-rm-upload-file --> dnn-checkbox dnn-rm-upload-file --> dnn-dropzone dnn-rm-upload-file --> dnn-rm-queued-file dnn-rm-queued-file --> dnn-button dnn-action-edit-item --> dnn-modal dnn-action-edit-item --> dnn-rm-edit-folder dnn-action-edit-item --> dnn-rm-edit-file dnn-rm-edit-folder --> dnn-tabs dnn-rm-edit-folder --> dnn-tab dnn-rm-edit-folder --> dnn-permissions-grid dnn-rm-edit-folder --> dnn-button dnn-permissions-grid --> dnn-checkbox dnn-permissions-grid --> dnn-button dnn-permissions-grid --> dnn-searchbox dnn-permissions-grid --> dnn-collapsible dnn-rm-edit-file --> dnn-tabs dnn-rm-edit-file --> dnn-tab dnn-rm-edit-file --> dnn-button dnn-action-move-items --> dnn-modal dnn-action-move-items --> dnn-rm-move-items dnn-rm-move-items --> dnn-rm-folder-list dnn-rm-move-items --> dnn-rm-progress-bar dnn-rm-move-items --> dnn-button dnn-rm-folder-list --> dnn-rm-folder-list-item dnn-rm-folder-list-item --> dnn-collapsible dnn-rm-folder-list-item --> dnn-rm-folder-context-menu dnn-rm-folder-list-item --> dnn-treeview-item dnn-rm-folder-list-item --> dnn-rm-folder-list-item dnn-rm-folder-context-menu --> dnn-action-create-folder dnn-rm-folder-context-menu --> dnn-action-edit-item dnn-rm-folder-context-menu --> dnn-action-move-items dnn-rm-folder-context-menu --> dnn-action-delete-items dnn-rm-folder-context-menu --> dnn-action-unlink-items dnn-action-delete-items --> dnn-modal dnn-action-delete-items --> dnn-rm-delete-items dnn-rm-delete-items --> dnn-rm-progress-bar dnn-rm-delete-items --> dnn-button dnn-action-unlink-items --> dnn-modal dnn-action-unlink-items --> dnn-rm-unlink-items dnn-rm-unlink-items --> dnn-rm-progress-bar dnn-rm-unlink-items --> dnn-button dnn-treeview-item --> dnn-collapsible dnn-rm-right-pane --> dnn-rm-actions-bar style dnn-rm-actions-bar fill:#f9f,stroke:#333,stroke-width:4px ``` ---------------------------------------------- *Built with [StencilJS](https://stenciljs.com/)*
{'content_hash': 'd3ba1cd643d29beed02b1ecf5489cdd6', 'timestamp': '', 'source': 'github', 'line_count': 91, 'max_line_length': 65, 'avg_line_length': 38.21978021978022, 'alnum_prop': 0.6900517538815412, 'repo_name': 'dnnsoftware/Dnn.Platform', 'id': '33d497771bc4272ccb3e5a14b23d84607001f362', 'size': '3502', 'binary': False, 'copies': '3', 'ref': 'refs/heads/develop', 'path': 'DNN Platform/Modules/ResourceManager/ResourceManager.Web/src/components/dnn-rm-actions-bar/readme.md', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'ASP.NET', 'bytes': '522038'}, {'name': 'Batchfile', 'bytes': '289'}, {'name': 'C#', 'bytes': '21895919'}, {'name': 'CSS', 'bytes': '920009'}, {'name': 'HTML', 'bytes': '543211'}, {'name': 'JavaScript', 'bytes': '8406477'}, {'name': 'Less', 'bytes': '566334'}, {'name': 'PowerShell', 'bytes': '5984'}, {'name': 'SCSS', 'bytes': '12527'}, {'name': 'Shell', 'bytes': '1429'}, {'name': 'TSQL', 'bytes': '128041'}, {'name': 'TypeScript', 'bytes': '135977'}, {'name': 'Visual Basic .NET', 'bytes': '114706'}, {'name': 'XSLT', 'bytes': '11388'}]}
import time from gym import Wrapper import logging logger = logging.getLogger(__name__) class TimeLimit(Wrapper): def __init__(self, env, max_episode_seconds=None, max_episode_steps=None): super(TimeLimit, self).__init__(env) self._max_episode_seconds = max_episode_seconds self._max_episode_steps = max_episode_steps self._elapsed_steps = 0 self._episode_started_at = None @property def _elapsed_seconds(self): return time.time() - self._episode_started_at def _past_limit(self): """Return true if we are past our limit""" if self._max_episode_steps is not None and self._max_episode_steps <= self._elapsed_steps: logger.debug("Env has passed the step limit defined by TimeLimit.") return True if self._max_episode_seconds is not None and self._max_episode_seconds <= self._elapsed_seconds: logger.debug("Env has passed the seconds limit defined by TimeLimit.") return True return False def _step(self, action): assert self._episode_started_at is not None, "Cannot call env.step() before calling reset()" observation, reward, done, info = self.env.step(action) self._elapsed_steps += 1 if self._past_limit(): if self.metadata.get('semantics.autoreset'): _ = self.reset() # automatically reset the env done = True return observation, reward, done, info def _reset(self): self._episode_started_at = time.time() self._elapsed_steps = 0 return self.env.reset()
{'content_hash': '9e546b94100a56d03538b8cd56e8681b', 'timestamp': '', 'source': 'github', 'line_count': 49, 'max_line_length': 104, 'avg_line_length': 33.224489795918366, 'alnum_prop': 0.6234643734643734, 'repo_name': 'hparik11/Deep-Learning-Nanodegree-Foundation-Repository', 'id': '77520f5520292ee36fb4d56ea86db6035b17af58', 'size': '1628', 'binary': False, 'copies': '4', 'ref': 'refs/heads/master', 'path': 'reinforcement/gym/gym/wrappers/time_limit.py', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'HTML', 'bytes': '3994519'}, {'name': 'Jupyter Notebook', 'bytes': '26097389'}, {'name': 'Makefile', 'bytes': '461'}, {'name': 'Python', 'bytes': '651374'}, {'name': 'Shell', 'bytes': '711'}]}
<!DOCTYPE html> <html lang="en-us"> <head> <meta charset="UTF-8"> <title>React-formatted-amount by jtassin</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'> <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/codemirror/5.0.0/codemirror.min.css"/> <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/codemirror/5.0.0/theme/monokai.min.css"/> </head> <body> <section class="page-header"> <h1 class="project-name">React-formatted-amount</h1> <h2 class="project-tagline"></h2> <a href="https://github.com/jtassin/react-formatted-amount" class="btn">View on GitHub</a> <a href="https://github.com/jtassin/react-formatted-amount/zipball/master" class="btn">Download .zip</a> <a href="https://github.com/jtassin/react-formatted-amount/tarball/master" class="btn">Download .tar.gz</a> </section> <section class="main-content"> <div class="container"> <div class="row"> <h2>Example with positive amount</h2> <div class="col-12"> <div class="box-example"> <div id="example1"> <p> To install React, follow the instructions on <a href="https://github.com/facebook/react/">GitHub</a>. </p> <p> If you can see this, React is <strong>not</strong> working right. If you checked out the source from GitHub make sure to run <code>npm install</code>. </p> </div> </div> </div> </div> <div class="row"> <h2>Example with negative amount</h2> <div class="col-12"> <div class="box-example"> <div id="example2"> <p> To install React, follow the instructions on <a href="https://github.com/facebook/react/">GitHub</a>. </p> <p> If you can see this, React is <strong>not</strong> working right. If you checked out the source from GitHub make sure to run <code>npm install</code>. </p> </div> </div> </div> </div> <div class="row"> <h2>Example with big amount</h2> <div class="col-12"> <div class="box-example"> <div id="example3"> <p> To install React, follow the instructions on <a href="https://github.com/facebook/react/">GitHub</a>. </p> <p> If you can see this, React is <strong>not</strong> working right. If you checked out the source from GitHub make sure to run <code>npm install</code>. </p> </div> </div> </div> </div> </div> <div class="row"> <footer class="site-footer"> <span class="site-footer-owner"><a href="https://github.com/jtassin/react-formatted-amount">React-formatted-amount</a> is maintained by <a href="https://github.com/jtassin">jtassin</a>.</span> <span class="site-footer-credits">This page was generated by <a href="https://pages.github.com">GitHub Pages</a> using the <a href="https://github.com/jasonlong/cayman-theme">Cayman theme</a> by <a href="https://twitter.com/jasonlong">Jason Long</a>.</span> </footer> </div> </section> <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/codemirror/5.0.0/codemirror.min.js"></script> <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/codemirror/5.0.0/mode/javascript/javascript.min.js"></script> </body> </html>
{'content_hash': '017478db79a9d79228267757aeaa9bc1', 'timestamp': '', 'source': 'github', 'line_count': 94, 'max_line_length': 146, 'avg_line_length': 35.702127659574465, 'alnum_prop': 0.648092967818832, 'repo_name': 'jtassin/react-formatted-amount', 'id': '0a90c398deee9e56dca70771daa68d4f0acdcab8', 'size': '3356', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'examples/src/index.html', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'JavaScript', 'bytes': '15543'}]}
export GOROOT=$(go env GOROOT) GOOS=linux GOARCH=amd64 gb build GOOS=windows GOARCH=amd64 gb build GOOS=darwin GOARCH=amd64 gb build
{'content_hash': '02f91d5d8e8064e42d656f3f72d45f1b', 'timestamp': '', 'source': 'github', 'line_count': 6, 'max_line_length': 34, 'avg_line_length': 22.5, 'alnum_prop': 0.7925925925925926, 'repo_name': 'cmars/ltt', 'id': '8afdb54fcc747619534329e5ddb9452dfed2efe2', 'size': '152', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'build.bash', 'mode': '33261', 'license': 'mit', 'language': [{'name': 'Go', 'bytes': '9451'}, {'name': 'Shell', 'bytes': '185'}]}
**Note:** It's a breaking change, that can affect your SVG files in unexpected ways. Please read the text below to know what exactly changed, including an example to preserve the old behaviour. For more details [check out this diff][diff]. ## Plugins that became active by default ```js ['removeTitle', 'removeViewBox']; ``` ## Plugins that got new params ```js [ 'cleanupIDs', 'convertPathData', 'convertShapeToPath', 'convertStyleToAttrs', 'mergePaths', 'minifyStyles', 'removeAttrs', 'removeDesc', 'removeHiddenElems', 'removeUnknownsAndDefaults', 'removeUselessStrokeAndFill', 'sortAttrs', ]; ``` To see params changes [check out this diff][diff]. ## Removed plugins ```js ['transformsWithOnePath']; ``` ## New plugins ```js [ 'addAttributesToSVGElement', 'convertEllipseToCircle', 'inlineStyles', 'prefixIds', 'removeAttributesBySelector', 'removeElementsByAttr', 'removeOffCanvasPaths', 'removeScriptElement', 'removeXMLNS', 'reusePaths', 'sortDefsChildren', ]; ``` ## How to recover the old behaviour If you use `broccoli-svg-optimizer` directly: ```js var SVGOptimizer = require('broccoli-svg-optimizer'); var outputNode = new SVGOptimizer(inputNode, { svgoConfig: { plugins: [{ removeTitle: false }, { removeViewBox: false }], }, }); ``` If you use [ember-svg-jar](https://github.com/ivanvotti/ember-svg-jar): ```js let app = new EmberApp(defaults, { svgJar: { optimizer: { plugins: [{ removeTitle: false }, { removeViewBox: false }], }, }, }); ``` [diff]: https://github.com/ivanvotti/broccoli-svg-optimizer/commit/58057a2cd521160b1eaba058303774f427cdd1f0#diff-e5d4ccd3cd14c513eca40fc7a5f48182
{'content_hash': 'c4cabde170a404aebd170d3c7ad5ddf0', 'timestamp': '', 'source': 'github', 'line_count': 81, 'max_line_length': 193, 'avg_line_length': 20.88888888888889, 'alnum_prop': 0.7021276595744681, 'repo_name': 'ivanvotti/broccoli-svg-optimizer', 'id': 'c4b6f26503e5bbcfbf0bef9f84d95707ba0aa094', 'size': '1754', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'docs/0.6.6-to-1.3.0.md', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'JavaScript', 'bytes': '8035'}]}
package org.archive.hadoop; import java.io.IOException; import java.util.logging.Logger; import org.apache.hadoop.fs.FSDataInputStream; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.mapreduce.InputSplit; import org.apache.hadoop.mapreduce.RecordReader; import org.apache.hadoop.mapreduce.TaskAttemptContext; import org.apache.hadoop.mapreduce.lib.input.FileSplit; import org.archive.extract.ExtractingResourceFactoryMapper; import org.archive.extract.ExtractingResourceProducer; import org.archive.extract.ResourceFactoryMapper; import org.archive.format.gzip.GZIPMemberSeries; import org.archive.resource.MetaData; import org.archive.resource.Resource; import org.archive.resource.ResourceParseException; import org.archive.resource.ResourceProducer; import org.archive.resource.TransformingResourceProducer; import org.archive.resource.arc.ARCResourceFactory; import org.archive.resource.gzip.GZIPResourceContainer; import org.archive.resource.warc.WARCResourceFactory; import org.archive.streamcontext.HDFSStream; import org.archive.streamcontext.Stream; import org.archive.util.StreamCopy; public class ResourceRecordReader extends RecordReader<ResourceContext, MetaData>{ private final static Logger LOG = Logger.getLogger(ResourceRecordReader.class.getName()); WARCResourceFactory wf = new WARCResourceFactory(); ARCResourceFactory af = new ARCResourceFactory(); Stream stream; GZIPMemberSeries series; private ResourceProducer producer; // private ResourceExtractor extractor; private String name; private long startOffset; private long length; private ResourceContext cachedK; private MetaData cachedV; @Override public void close() throws IOException { producer.close(); } @Override public ResourceContext getCurrentKey() throws IOException, InterruptedException { return cachedK; } @Override public MetaData getCurrentValue() throws IOException, InterruptedException { return cachedV; } @Override public float getProgress() throws IOException, InterruptedException { if(length == 0) { return 0; } long curOffset = stream.getOffset(); float amtDone = curOffset - startOffset; float flen = (float) length; return amtDone / flen; } @Override public void initialize(InputSplit inputSplit, TaskAttemptContext context) throws IOException, InterruptedException { if(inputSplit instanceof FileSplit) { FileSplit fs = (FileSplit) inputSplit; Path fsPath = fs.getPath(); FileSystem fSys = fsPath.getFileSystem(context.getConfiguration()); FSDataInputStream fsdis = fSys.open(fsPath); String path = fsPath.getName(); name = fsPath.getName(); stream = new HDFSStream(fsdis); startOffset = fs.getStart(); length = fs.getLength(); long endOffset = startOffset + length; stream.setOffset(startOffset); series = new GZIPMemberSeries(stream, name, startOffset); GZIPResourceContainer prod = new GZIPResourceContainer(series,endOffset); ResourceProducer envelope; if(path.endsWith(".warc.gz") || path.endsWith(".wat.gz")) { envelope = new TransformingResourceProducer(prod,wf); } else if(path.endsWith(".arc.gz")) { envelope = new TransformingResourceProducer(prod,af); } else { throw new IOException("arguments must be arc.gz or warc.gz"); } ResourceFactoryMapper mapper = new ExtractingResourceFactoryMapper(); producer = new ExtractingResourceProducer(envelope, mapper); } else { throw new IOException("Need FileSplit input..."); } } @Override public boolean nextKeyValue() throws IOException, InterruptedException { // TODO: loop while getting resourceparseexceptions: try { Resource r = producer.getNext(); if(r != null) { StreamCopy.readToEOF(r.getInputStream()); LOG.info(String.format("Extracted offset %d\n", series.getCurrentMemberStartOffset())); cachedK = new ResourceContext(name, series.getCurrentMemberStartOffset()); cachedV = r.getMetaData().getTopMetaData(); return true; } } catch (ResourceParseException e) { e.printStackTrace(); throw new IOException( String.format("ResourceParseException at(%s)(%d)", name,series.getCurrentMemberStartOffset()), e); } return false; } }
{'content_hash': '51f3020f70de02b3bb5573c90529c70c', 'timestamp': '', 'source': 'github', 'line_count': 131, 'max_line_length': 82, 'avg_line_length': 32.89312977099237, 'alnum_prop': 0.7581805523323277, 'repo_name': 'internetarchive/webarchive-commons', 'id': '06d3ce2e62ee25ea68bd6750d3151ccb6e113891', 'size': '4309', 'binary': False, 'copies': '5', 'ref': 'refs/heads/master', 'path': 'src/main/java/org/archive/hadoop/ResourceRecordReader.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'HTML', 'bytes': '5139'}, {'name': 'Java', 'bytes': '1535784'}]}
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <link rel="SHORTCUT ICON" href="../../../../../img/clover.ico" /> <link rel="stylesheet" href="../../../../../aui/css/aui.min.css" media="all"/> <link rel="stylesheet" href="../../../../../aui/css/aui-experimental.min.css" media="all"/> <!--[if IE 9]><link rel="stylesheet" href="../../../../../aui/css/aui-ie9.min.css" media="all"/><![endif]--> <style type="text/css" media="all"> @import url('../../../../../style.css'); @import url('../../../../../tree.css'); </style> <script src="../../../../../jquery-1.8.3.min.js" type="text/javascript"></script> <script src="../../../../../aui/js/aui.min.js" type="text/javascript"></script> <script src="../../../../../aui/js/aui-experimental.min.js" type="text/javascript"></script> <script src="../../../../../aui/js/aui-soy.min.js" type="text/javascript"></script> <script src="../../../../../package-nodes-tree.js" type="text/javascript"></script> <script src="../../../../../clover-tree.js" type="text/javascript"></script> <script src="../../../../../clover.js" type="text/javascript"></script> <script src="../../../../../clover-descriptions.js" type="text/javascript"></script> <script src="../../../../../cloud.js" type="text/javascript"></script> <title>ABA Route Transit Number Validator 1.0.1-SNAPSHOT</title> </head> <body> <div id="page"> <header id="header" role="banner"> <nav class="aui-header aui-dropdown2-trigger-group" role="navigation"> <div class="aui-header-inner"> <div class="aui-header-primary"> <h1 id="logo" class="aui-header-logo aui-header-logo-clover"> <a href="http://openclover.org" title="Visit OpenClover home page"><span class="aui-header-logo-device">OpenClover</span></a> </h1> </div> <div class="aui-header-secondary"> <ul class="aui-nav"> <li id="system-help-menu"> <a class="aui-nav-link" title="Open online documentation" target="_blank" href="http://openclover.org/documentation"> <span class="aui-icon aui-icon-small aui-iconfont-help">&#160;Help</span> </a> </li> </ul> </div> </div> </nav> </header> <div class="aui-page-panel"> <div class="aui-page-panel-inner"> <div class="aui-page-panel-nav aui-page-panel-nav-clover"> <div class="aui-page-header-inner" style="margin-bottom: 20px;"> <div class="aui-page-header-image"> <a href="http://cardatechnologies.com" target="_top"> <div class="aui-avatar aui-avatar-large aui-avatar-project"> <div class="aui-avatar-inner"> <img src="../../../../../img/clover_logo_large.png" alt="Clover icon"/> </div> </div> </a> </div> <div class="aui-page-header-main" > <h1> <a href="http://cardatechnologies.com" target="_top"> ABA Route Transit Number Validator 1.0.1-SNAPSHOT </a> </h1> </div> </div> <nav class="aui-navgroup aui-navgroup-vertical"> <div class="aui-navgroup-inner"> <ul class="aui-nav"> <li class=""> <a href="../../../../../dashboard.html">Project overview</a> </li> </ul> <div class="aui-nav-heading packages-nav-heading"> <strong>Packages</strong> </div> <div class="aui-nav project-packages"> <form method="get" action="#" class="aui package-filter-container"> <input type="text" autocomplete="off" class="package-filter text" placeholder="Type to filter packages..." name="package-filter" id="package-filter" title="Start typing package name (or part of the name) to search through the tree. Use arrow keys and the Enter key to navigate."/> </form> <p class="package-filter-no-results-message hidden"> <small>No results found.</small> </p> <div class="packages-tree-wrapper" data-root-relative="../../../../../" data-package-name="com.cardatechnologies.utils.validators.abaroutevalidator"> <div class="packages-tree-container"></div> <div class="clover-packages-lozenges"></div> </div> </div> </div> </nav> </div> <section class="aui-page-panel-content"> <div class="aui-page-panel-content-clover"> <div class="aui-page-header-main"><ol class="aui-nav aui-nav-breadcrumbs"> <li><a href="../../../../../dashboard.html"> Project Clover database Sat Aug 7 2021 12:29:33 MDT</a></li> <li><a href="test-pkg-summary.html">Package com.cardatechnologies.utils.validators.abaroutevalidator</a></li> <li><a href="test-Test_AbaRouteValidator_10.html">Class Test_AbaRouteValidator_10</a></li> </ol></div> <h1 class="aui-h2-clover"> Test testAbaNumberCheck_21276_bad </h1> <table class="aui"> <thead> <tr> <th>Test</th> <th><label title="The test result. Either a Pass, Fail or Error.">Status</label></th> <th><label title="When the test execution was started">Start time</label></th> <th><label title="The total time in seconds taken to run this test.">Time (seconds)</label></th> <th><label title="A failure or error message if the test is not successful.">Message</label></th> </tr> </thead> <tbody> <tr> <td> <a href="../../../../../com/cardatechnologies/utils/validators/abaroutevalidator/Test_AbaRouteValidator_10.html?line=30689#src-30689" >testAbaNumberCheck_21276_bad</a> </td> <td> <span class="sortValue">1</span><span class="aui-lozenge aui-lozenge-success">PASS</span> </td> <td> 7 Aug 12:40:05 </td> <td> 0.0 </td> <td> <div></div> <div class="errorMessage"></div> </td> </tr> </tbody> </table> <div>&#160;</div> <table class="aui aui-table-sortable"> <thead> <tr> <th style="white-space:nowrap;"><label title="A class that was directly hit by this test.">Target Class</label></th> <th colspan="4"><label title="The percentage of coverage contributed by each single test.">Coverage contributed by</label> testAbaNumberCheck_21276_bad</th> </tr> </thead> <tbody> <tr> <td> <span class="sortValue">com.cardatechnologies.utils.validators.abaroutevalidator.exceptions.AbaRouteValidationException</span> &#160;&#160;<a href="../../../../../com/cardatechnologies/utils/validators/abaroutevalidator/exceptions/AbaRouteValidationException.html?id=16497#AbaRouteValidationException" title="AbaRouteValidationException" name="sl-43">com.cardatechnologies.utils.validators.abaroutevalidator.exceptions.AbaRouteValidationException</a> </td> <td> <span class="sortValue">0.5714286</span>57.1% </td> <td class="align-middle" style="width: 100%" colspan="3"> <div> <div title="57.1% Covered" style="min-width:40px;" class="barNegative contribBarNegative contribBarNegative"><div class="barPositive contribBarPositive contribBarPositive" style="width:57.1%"></div></div></div> </td> </tr> <tr> <td> <span class="sortValue">com.cardatechnologies.utils.validators.abaroutevalidator.ErrorCodes</span> &#160;&#160;<a href="../../../../../com/cardatechnologies/utils/validators/abaroutevalidator/ErrorCodes.html?id=16497#ErrorCodes" title="ErrorCodes" name="sl-42">com.cardatechnologies.utils.validators.abaroutevalidator.ErrorCodes</a> </td> <td> <span class="sortValue">0.5714286</span>57.1% </td> <td class="align-middle" style="width: 100%" colspan="3"> <div> <div title="57.1% Covered" style="min-width:40px;" class="barNegative contribBarNegative contribBarNegative"><div class="barPositive contribBarPositive contribBarPositive" style="width:57.1%"></div></div></div> </td> </tr> <tr> <td> <span class="sortValue">com.cardatechnologies.utils.validators.abaroutevalidator.AbaRouteValidator</span> &#160;&#160;<a href="../../../../../com/cardatechnologies/utils/validators/abaroutevalidator/AbaRouteValidator.html?id=16497#AbaRouteValidator" title="AbaRouteValidator" name="sl-47">com.cardatechnologies.utils.validators.abaroutevalidator.AbaRouteValidator</a> </td> <td> <span class="sortValue">0.29411766</span>29.4% </td> <td class="align-middle" style="width: 100%" colspan="3"> <div> <div title="29.4% Covered" style="min-width:40px;" class="barNegative contribBarNegative contribBarNegative"><div class="barPositive contribBarPositive contribBarPositive" style="width:29.4%"></div></div></div> </td> </tr> </tbody> </table> </div> <!-- class="aui-page-panel-content-clover" --> <footer id="footer" role="contentinfo"> <section class="footer-body"> <ul> <li> Report generated by <a target="_new" href="http://openclover.org">OpenClover</a> v 4.4.1 on Sat Aug 7 2021 12:49:26 MDT using coverage data from Sat Aug 7 2021 12:47:23 MDT. </li> </ul> <ul> <li>OpenClover is free and open-source software. </li> </ul> </section> </footer> </section> <!-- class="aui-page-panel-content" --> </div> <!-- class="aui-page-panel-inner" --> </div> <!-- class="aui-page-panel" --> </div> <!-- id="page" --> </body> </html>
{'content_hash': '54409e2084765a5389d2974d67eb6bb8', 'timestamp': '', 'source': 'github', 'line_count': 235, 'max_line_length': 359, 'avg_line_length': 46.753191489361704, 'alnum_prop': 0.5303540547920269, 'repo_name': 'dcarda/aba.route.validator', 'id': 'ce1e5ba2aae315ed7c9a4edf61f7a5c52225d538', 'size': '10987', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'target13/site/clover/com/cardatechnologies/utils/validators/abaroutevalidator/Test_AbaRouteValidator_10_testAbaNumberCheck_21276_bad_cq9.html', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Java', 'bytes': '18715254'}]}
using System.Runtime.Serialization.Formatters.Tests; using Xunit; namespace System.Resources.Tests { public partial class MissingManifestResourceExceptionTests { [Fact] public void Serialization() { const string message = "FATAL ERROR: The pizza could not be found."; var ex = new MissingManifestResourceException(message); BinaryFormatterHelpers.AssertRoundtrips(ex); } } }
{'content_hash': '10ee52d75000e36a31a484de183747c8', 'timestamp': '', 'source': 'github', 'line_count': 16, 'max_line_length': 80, 'avg_line_length': 28.5, 'alnum_prop': 0.668859649122807, 'repo_name': 'marksmeltzer/corefx', 'id': '299ae31e69b81e52fe4cdc4de9fa288845888072', 'size': '660', 'binary': False, 'copies': '11', 'ref': 'refs/heads/master', 'path': 'src/System.Resources.ResourceManager/tests/MissingManifestResourceExceptionTests.netstandard.cs', 'mode': '33188', 'license': 'mit', 'language': [{'name': '1C Enterprise', 'bytes': '903'}, {'name': 'ASP', 'bytes': '1687'}, {'name': 'Batchfile', 'bytes': '24464'}, {'name': 'C', 'bytes': '1113146'}, {'name': 'C#', 'bytes': '132165939'}, {'name': 'C++', 'bytes': '706197'}, {'name': 'CMake', 'bytes': '63680'}, {'name': 'DIGITAL Command Language', 'bytes': '26402'}, {'name': 'Groovy', 'bytes': '34849'}, {'name': 'HTML', 'bytes': '653'}, {'name': 'Makefile', 'bytes': '9085'}, {'name': 'Objective-C', 'bytes': '9948'}, {'name': 'OpenEdge ABL', 'bytes': '139178'}, {'name': 'Perl', 'bytes': '3895'}, {'name': 'PowerShell', 'bytes': '42677'}, {'name': 'Python', 'bytes': '1535'}, {'name': 'Roff', 'bytes': '4236'}, {'name': 'Shell', 'bytes': '74577'}, {'name': 'Visual Basic', 'bytes': '827102'}, {'name': 'XSLT', 'bytes': '462336'}]}
import json from collections import OrderedDict from datetime import datetime from io import BytesIO from . import amqptypes from . import serialisation class Message(object): """ An AMQP Basic message. Some of the constructor parameters are ignored by the AMQP broker and are provided just for the convenience of user applications. They are marked "for applications" in the list below. :param body: :func:`bytes` , :class:`str` or :class:`dict` representing the body of the message. Strings will be encoded according to the content_encoding parameter; dicts will be converted to a string using JSON. :param dict headers: a dictionary of message headers :param str content_type: MIME content type (defaults to 'application/json' if :code:`body` is a :class:`dict`, or 'application/octet-stream' otherwise) :param str content_encoding: MIME encoding (defaults to 'utf-8') :param int delivery_mode: 1 for non-persistent, 2 for persistent :param int priority: message priority - integer between 0 and 9 :param str correlation_id: correlation id of the message *(for applications)* :param str reply_to: reply-to address *(for applications)* :param str expiration: expiration specification *(for applications)* :param str message_id: unique id of the message *(for applications)* :param datetime.datetime timestamp: :class:`~datetime.datetime` of when the message was sent (default: :meth:`datetime.now() <datetime.datetime.now>`) :param str type: message type *(for applications)* :param str user_id: ID of the user sending the message *(for applications)* :param str app_id: ID of the application sending the message *(for applications)* Attributes are the same as the constructor parameters. """ property_types = OrderedDict( [("content_type", amqptypes.ShortStr), ("content_encoding", amqptypes.ShortStr), ("headers", amqptypes.Table), ("delivery_mode", amqptypes.Octet), ("priority", amqptypes.Octet), ("correlation_id", amqptypes.ShortStr), ("reply_to", amqptypes.ShortStr), ("expiration", amqptypes.ShortStr), ("message_id", amqptypes.ShortStr), ("timestamp", amqptypes.Timestamp), ("type", amqptypes.ShortStr), ("user_id", amqptypes.ShortStr), ("app_id", amqptypes.ShortStr)] ) def __init__(self, body, *, headers=None, content_type=None, content_encoding=None, delivery_mode=None, priority=None, correlation_id=None, reply_to=None, expiration=None, message_id=None, timestamp=None, type=None, user_id=None, app_id=None): if content_encoding is None: content_encoding = 'utf-8' if isinstance(body, dict): body = json.dumps(body) if content_type is None: content_type = 'application/json' elif content_type is None: content_type = 'application/octet-stream' if isinstance(body, bytes): self.body = body else: self.body = body.encode(content_encoding) timestamp = timestamp if timestamp is not None else datetime.now() self._properties = OrderedDict() for name, amqptype in self.property_types.items(): value = locals()[name] if value is not None: value = amqptype(value) self._properties[name] = value def __eq__(self, other): return (self.body == other.body and self._properties == other._properties) def __getattr__(self, name): try: return self._properties[name] except KeyError as e: raise AttributeError from e def __setattr__(self, name, value): amqptype = self.property_types.get(name) if amqptype is not None: self._properties[name] = value if isinstance(value, amqptype) else amqptype(value) return super().__setattr__(name, value) def json(self): """ Parse the message body as JSON. :return: the parsed JSON. """ return json.loads(self.body.decode(self.content_encoding)) class IncomingMessage(Message): """ A message that has been delivered to the client. Subclass of :class:`Message`. .. attribute::delivery_tag The *delivery tag* assigned to this message by the AMQP broker. .. attribute::exchange_name The name of the exchange to which the message was originally published. .. attribute::routing_key The routing key under which the message was originally published. """ def __init__(self, *args, sender, delivery_tag, exchange_name, routing_key, **kwargs): super().__init__(*args, **kwargs) self.sender = sender self.delivery_tag = delivery_tag self.exchange_name = exchange_name self.routing_key = routing_key def ack(self): """ Acknowledge the message. """ self.sender.send_BasicAck(self.delivery_tag) def reject(self, *, requeue=True): """ Reject the message. :keyword bool requeue: if true, the broker will attempt to requeue the message and deliver it to an alternate consumer. """ self.sender.send_BasicReject(self.delivery_tag, requeue) def get_header_payload(message, class_id): return ContentHeaderPayload(class_id, len(message.body), list(message._properties.values())) # NB: the total frame size will be 8 bytes larger than frame_body_size def get_frame_payloads(message, frame_body_size): frames = [] remaining = message.body while remaining: frame = remaining[:frame_body_size] remaining = remaining[frame_body_size:] frames.append(frame) return frames class ContentHeaderPayload(object): synchronous = True def __init__(self, class_id, body_length, properties): self.class_id = class_id self.body_length = body_length self.properties = properties def __eq__(self, other): return (self.class_id == other.class_id and self.body_length == other.body_length and self.properties == other.properties) def write(self, stream): stream.write(serialisation.pack_unsigned_short(self.class_id)) stream.write(serialisation.pack_unsigned_short(0)) # weight stream.write(serialisation.pack_unsigned_long_long(self.body_length)) bytesio = BytesIO() property_flags = 0 bitshift = 15 for val in self.properties: if val is not None: property_flags |= (1 << bitshift) val.write(bytesio) bitshift -= 1 stream.write(serialisation.pack_unsigned_short(property_flags)) stream.write(bytesio.getvalue()) @classmethod def read(cls, raw): bytesio = BytesIO(raw) class_id = serialisation.read_unsigned_short(bytesio) weight = serialisation.read_unsigned_short(bytesio) assert weight == 0 body_length = serialisation.read_unsigned_long_long(bytesio) property_flags_short = serialisation.read_unsigned_short(bytesio) properties = [] for i, amqptype in enumerate(Message.property_types.values()): pos = 15 - i # We started from `content_type` witch has pos==15 if property_flags_short & (1 << pos): properties.append(amqptype.read(bytesio)) else: properties.append(None) return cls(class_id, body_length, properties) class MessageBuilder(object): def __init__(self, sender, delivery_tag, redelivered, exchange_name, routing_key, consumer_tag=None): self.sender = sender self.delivery_tag = delivery_tag self.body = b'' self.consumer_tag = consumer_tag self.exchange_name = exchange_name self.routing_key = routing_key def set_header(self, header): self.body_length = header.body_length self.properties = {} for name, prop in zip(IncomingMessage.property_types, header.properties): self.properties[name] = prop def add_body_chunk(self, chunk): self.body += chunk def done(self): return len(self.body) == self.body_length def build(self): return IncomingMessage( self.body, sender=self.sender, delivery_tag=self.delivery_tag, exchange_name=self.exchange_name, routing_key=self.routing_key, **self.properties)
{'content_hash': '3703f87082aa870ae86dfd7b81a7b655', 'timestamp': '', 'source': 'github', 'line_count': 250, 'max_line_length': 105, 'avg_line_length': 35.152, 'alnum_prop': 0.6240327719617661, 'repo_name': 'TarasLevelUp/asynqp', 'id': '426b6f6184063a927e8ff711901b91f6eca7e12d', 'size': '8788', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/asynqp/message.py', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Python', 'bytes': '214582'}]}
package com.rictacius.makeAMinigame.minigame.script; import java.util.HashMap; import com.rictacius.makeAMinigame.data.MPlayer; import com.rictacius.makeAMinigame.minigame.script.operation.ErrorOperation; import com.rictacius.makeAMinigame.minigame.script.operation.MPlayerOperation; import com.rictacius.makeAMinigame.minigame.script.operation.MathOperation; import com.rictacius.makeAMinigame.minigame.script.operation.NullOperation; import com.rictacius.makeAMinigame.minigame.script.operation.Operation; import com.rictacius.makeAMinigame.minigame.script.operation.ReturnOperation; import com.rictacius.makeAMinigame.minigame.script.operation.SetOperation; import com.rictacius.makeAMinigame.util.Log; public class ScriptLine { private String line; private String raw; private Script.Section section; private Script.Section.EVENT event; private boolean isevent; private int number; private Script script; public ScriptLine(String line, Script.Section section, int number, Script script) { this.line = line.trim(); this.raw = line; this.number = number; this.script = script; } public ScriptLine(String line, Script.Section section, Script.Section.EVENT event, int number, Script script) { this.line = line.trim(); this.raw = line; this.number = number; this.script = script; this.isevent = true; this.event = event; } public String getLine() { return line; } public Script.Section getSection() { return section; } public Operation parse() { if (!validate()) { return new ErrorOperation(raw, "ScriptLine " + number + " (" + line + ") is invalid!", this, Log.Level.FATAL); } line = ScriptUtils.removeKeys(line); try { if (line.startsWith("var")) { line = line.substring(3).trim(); String name = line.replaceAll(" ", ""); boolean set = script.addVariable(name); if (!set) { return new ErrorOperation(raw, "Variable " + name + " already exisits in " + script.getName() + "!", this, Log.Level.FATAL); } return new NullOperation(raw); } else if (line.startsWith("set")) { line = line.substring(3).trim(); String[] data = line.split("="); String left = data[0].trim(); String right = data[1].trim(); return new SetOperation(raw, left, right, script, this); } else if (line.startsWith("return")) { line = line.substring(6).trim(); return new ReturnOperation(raw, line, script); } else if (line.startsWith("math")) { line = line.substring(4).trim(); return new MathOperation(raw, "", script, line); } else if (line.startsWith("mplayer")) { line = line.substring(7).trim(); String command = line.split(" ")[0]; if (command.equals("create")) { return new MPlayerOperation.Create(raw, line.split(" ")[1], script); } else if (command.equals("message")) { String[] data = line.split(" "); String parg = data[1]; MPlayer player = (MPlayer) script.getVariable(parg); int length = data[0].length() + data[1].length() + 2; String message = line.substring(length); HashMap<String, Object> vars = script.getVariables(); for (String key : vars.keySet()) { Object value = vars.get(key); message = message.replaceAll("%" + key + "%", String.valueOf(value)); } return new MPlayerOperation.Message(raw, player, message); } } else if (line.startsWith("player")) { } } catch (Exception e) { return new ErrorOperation(raw, "ScriptLine " + number + " (" + raw + ") is invalid!", this, Log.Level.FATAL, e); } return null; } public boolean validate() { boolean valid; valid = ScriptUtils.checkPointers(line); return valid; } public Script.Section.EVENT getEvent() { return event; } public boolean isEvent() { return isevent; } public int getLineNumber() { return number; } public Script getScript() { return script; } }
{'content_hash': '7bc3cba77415b9f19b159fe095787f2c', 'timestamp': '', 'source': 'github', 'line_count': 125, 'max_line_length': 112, 'avg_line_length': 32.016, 'alnum_prop': 0.6604197901049476, 'repo_name': 'DeveloperRic/MakeAMinigame', 'id': '0abf559650228031caa0460abfd2f421cf8f14c9', 'size': '4002', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/com/rictacius/makeAMinigame/minigame/script/ScriptLine.java', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Java', 'bytes': '101060'}]}
ACCEPTED #### According to Index Fungorum #### Published in null #### Original name Metasphaeria hederae f. corticola Feltgen ### Remarks null
{'content_hash': '944a7bf42c405ff98917905606b6261f', 'timestamp': '', 'source': 'github', 'line_count': 13, 'max_line_length': 41, 'avg_line_length': 11.23076923076923, 'alnum_prop': 0.726027397260274, 'repo_name': 'mdoering/backbone', 'id': '63e1db48aef5a4e1ca613e8250443ea30fc49089', 'size': '208', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'life/Fungi/Ascomycota/Dothideomycetes/Dothideales/Dothioraceae/Metasphaeria/Metasphaeria hederae/Metasphaeria hederae corticola/README.md', 'mode': '33188', 'license': 'apache-2.0', 'language': []}
// This file was generated by jmlunit on Mon Nov 09 10:47:01 GMT 2009. package election.tally; import ie.lero.evoting.test.data.TestDataGenerator; /** Supply test data for the JML and JUnit based testing of * AbstractCountStatus. * * <p>Test data is supplied by overriding methods in this class. See * the JML documentation and the comments below about how to do this. * * <p>This class is also the place to override the <kbd>setUp()</kbd> * and <kbd>tearDown()</kbd> methods if your testing needs some * actions to be taken before and after each test is executed. * * <p>This class is never rewritten by jmlunit. */ public abstract class AbstractCountStatus_JML_TestData extends junit.framework.TestCase { /** Initialize this class. */ public AbstractCountStatus_JML_TestData(java.lang.String name) { super(name); } /** Return the overall test suite for accumulating tests; the * result will hold every test that will be run. This factory * method can be altered to provide filtering of test suites, as * they are added to this overall test suite, based on various * criteria. The test driver will first call the method * addTestSuite to add a test suite formed from custom programmed * test methods (named testX for some X), which you can add to * this class; this initial test suite will also include a method * to check that the code being tested was compiled with jmlc. * After that, for each method to be tested, a test suite * containing tests for that method will be added to this overall * test suite, using the addTest method. Test suites added for a * method will have some subtype of TestSuite and that method's * name as their name. So, if you want to control the overall * suite of tests for testing some method, e.g., to limit the * number of tests for each method, return a special-purpose * subclass of {@link junit.framework.TestSuite} in which you override the * addTest method. * @see junit.framework.TestSuite */ //@ assignable objectState; //@ ensures \result != null; public junit.framework.TestSuite overallTestSuite() { return new junit.framework.TestSuite("Overall tests for AbstractCountStatus"); } /** Return an empty test suite for accumulating tests for the * named method. This factory method can be altered to provide * filtering or limiting of the tests for the named method, as * they are added to the test suite for this method. The driver * will add individual tests using the addTest method. So, if you * want to filter individual tests, return a subclass of TestSuite * in which you override the addTest method. * @param methodName The method the tests in this suite are for. * @see junit.framework.TestSuite * @see org.jmlspecs.jmlunit.strategies.LimitedTestSuite */ //@ assignable objectState; //@ ensures \result != null; public junit.framework.TestSuite emptyTestSuiteFor (java.lang.String methodName) { return new junit.framework.TestSuite(methodName); } // TEST DATA SUPPLY SECTION // You should edit the following code to supply test data. In the // skeleton originally supplied below, the jmlunit tool made a // guess as to a minimal strategy for generating test data for // each type of object used as a receiver, and each type used as // an argument. There is a library of strategies for generating // test data in org.jmlspecs.jmlunit.strategies, which are used in // the tool's guesses. See the documentation for JML and in // particular for the org.jmlspecs.jmlunit.strategies package for // a general discussion of how to do this. (This package's // documentation is available through the JML.html file in the top // of the JML release, and also in the package.html file that // ships with the package.) // // In the code below, you can change the strategies from those // that were guessed by the jmlunit tool, and you can also define // new ones to suit your needs. You can also delete any useless // sample test data that has been generated for you to show you // the pattern of how to add your own test data. The only // requirement is that you implement the methods below. // // If you change the type being tested in a way that introduces // new types of arguments for some methods, then you will have to // introduce (by hand) definitions that are similar to the ones // below, because jmlunit never rewrites this file. /** Return a new, freshly allocated indefinite iterator that * produces test data of type * election.tally.AbstractCountStatus * for testing the method named by the String methodName in * a loop that encloses loopsThisSurrounds many other loops. * @param methodName name of the method for which this * test data will be used. * @param loopsThisSurrounds number of loops that the test * contains inside this one. */ //@ requires methodName != null && loopsThisSurrounds >= 0; //@ ensures \fresh(\result); protected org.jmlspecs.jmlunit.strategies.IndefiniteIterator velection_tally_AbstractCountStatusIter (java.lang.String methodName, int loopsThisSurrounds) { return velection_tally_AbstractCountStatusStrategy.iterator(); } /** The strategy for generating test data of type * election.tally.AbstractCountStatus. */ private org.jmlspecs.jmlunit.strategies.StrategyType velection_tally_AbstractCountStatusStrategy = new org.jmlspecs.jmlunit.strategies.NewObjectAbstractStrategy() { protected Object make(int n) { return TestDataGenerator.getAbstractCountStatus(n); } }; /** Return a new, freshly allocated indefinite iterator that * produces test data of type * int * for testing the method named by the String methodName in * a loop that encloses loopsThisSurrounds many other loops. * @param methodName name of the method for which this * test data will be used. * @param loopsThisSurrounds number of loops that the test * contains inside this one. */ //@ requires methodName != null && loopsThisSurrounds >= 0; //@ ensures \fresh(\result); protected org.jmlspecs.jmlunit.strategies.IntIterator vintIter (java.lang.String methodName, int loopsThisSurrounds) { return vintStrategy.intIterator(); } /** The strategy for generating test data of type * int. */ private org.jmlspecs.jmlunit.strategies.IntStrategyType vintStrategy = new org.jmlspecs.jmlunit.strategies.IntBigStrategy() { protected int[] addData() { return TestDataGenerator.getIntArray(); } }; }
{'content_hash': '931169cf8759ed6531ae98db3744c475', 'timestamp': '', 'source': 'github', 'line_count': 158, 'max_line_length': 86, 'avg_line_length': 45.00632911392405, 'alnum_prop': 0.6790887357614963, 'repo_name': 'GaloisInc/Votail', 'id': 'b0102d4d22c913eb5f9e6ce888680de0f511f653', 'size': '7111', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'jmlunit_src/election/tally/AbstractCountStatus_JML_TestData.java', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Alloy', 'bytes': '32228'}, {'name': 'CSS', 'bytes': '10932'}, {'name': 'Emacs Lisp', 'bytes': '9610'}, {'name': 'Java', 'bytes': '6598330'}, {'name': 'Makefile', 'bytes': '86211'}, {'name': 'Ruby', 'bytes': '2120'}, {'name': 'Shell', 'bytes': '165685'}, {'name': 'TeX', 'bytes': '3971'}]}
<!doctype html> <html class="default no-js"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>NativeTimeTextBox | ninejs</title> <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="../assets/css/main.css"> <script src="../assets/js/modernizr.js"></script> </head> <body> <header> <div class="tsd-page-toolbar"> <div class="container"> <div class="table-wrap"> <div class="table-cell" id="tsd-search" data-index="../assets/js/search.js" data-base=".."> <div class="field"> <label for="tsd-search-field" class="tsd-widget search no-caption">Search</label> <input id="tsd-search-field" type="text" /> </div> <ul class="results"> <li class="state loading">Preparing search index...</li> <li class="state failure">The search index is not available</li> </ul> <a href="../index.html" class="title">ninejs</a> </div> <div class="table-cell" id="tsd-widgets"> <div id="tsd-filter"> <a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a> <div class="tsd-filter-group"> <div class="tsd-select" id="tsd-filter-visibility"> <span class="tsd-select-label">All</span> <ul class="tsd-select-list"> <li data-value="public">Public</li> <li data-value="protected">Public/Protected</li> <li data-value="private" class="selected">All</li> </ul> </div> <input type="checkbox" id="tsd-filter-inherited" checked /> <label class="tsd-widget" for="tsd-filter-inherited">Inherited</label> <input type="checkbox" id="tsd-filter-only-exported" /> <label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label> </div> </div> <a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a> </div> </div> </div> </div> <div class="tsd-page-title"> <div class="container"> <ul class="tsd-breadcrumb"> <li> <a href="../globals.html">Globals</a> </li> <li> <a href="../modules/_ui_editor_.html">&quot;ui/Editor&quot;</a> </li> <li> <a href="_ui_editor_.nativetimetextbox.html">NativeTimeTextBox</a> </li> </ul> <h1>Class NativeTimeTextBox</h1> </div> </div> </header> <div class="container container-main"> <div class="row"> <div class="col-8 col-content"> <section class="tsd-panel tsd-hierarchy"> <h3>Hierarchy</h3> <ul class="tsd-hierarchy"> <li> <a href="_ui_editor_.controlbase.html" class="tsd-signature-type">ControlBase</a> <ul class="tsd-hierarchy"> <li> <span class="target">NativeTimeTextBox</span> </li> </ul> </li> </ul> </section> <section class="tsd-panel tsd-kind-class tsd-parent-kind-external-module"> <h3 class="tsd-before-signature">Indexable</h3> <div class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">[</span>name: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">]: </span><span class="tsd-signature-type">any</span></div> </section> <section class="tsd-panel-group tsd-index-group"> <h2>Index</h2> <section class="tsd-panel tsd-index-panel"> <div class="tsd-index-content"> <section class="tsd-index-section "> <h3>Constructors</h3> <ul class="tsd-index-list"> <li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite"><a href="_ui_editor_.nativetimetextbox.html#constructor" class="tsd-kind-icon">constructor</a></li> </ul> </section> <section class="tsd-index-section tsd-is-inherited"> <h3>Properties</h3> <ul class="tsd-index-list"> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="_ui_editor_.nativetimetextbox.html#_njschildwidgets" class="tsd-kind-icon">$njs<wbr>Child<wbr>Widgets</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="_ui_editor_.nativetimetextbox.html#_njscollect" class="tsd-kind-icon">$njs<wbr>Collect</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="_ui_editor_.nativetimetextbox.html#_njsconstructors" class="tsd-kind-icon">$njs<wbr>Constructors</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="_ui_editor_.nativetimetextbox.html#_njseventlistenerhandlers" class="tsd-kind-icon">$njs<wbr>Event<wbr>Listener<wbr>Handlers</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="_ui_editor_.nativetimetextbox.html#_njseventlisteners" class="tsd-kind-icon">$njs<wbr>Event<wbr>Listeners</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="_ui_editor_.nativetimetextbox.html#_njsshowdefer" class="tsd-kind-icon">$njs<wbr>Show<wbr>Defer</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="_ui_editor_.nativetimetextbox.html#_njswatch" class="tsd-kind-icon">$njs<wbr>Watch</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="_ui_editor_.nativetimetextbox.html#_njswidget" class="tsd-kind-icon">$njs<wbr>Widget</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="_ui_editor_.nativetimetextbox.html#currentskin" class="tsd-kind-icon">current<wbr>Skin</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="_ui_editor_.nativetimetextbox.html#domnode" class="tsd-kind-icon">dom<wbr>Node</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="_ui_editor_.nativetimetextbox.html#name" class="tsd-kind-icon">name</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="_ui_editor_.nativetimetextbox.html#skin" class="tsd-kind-icon">skin</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="_ui_editor_.nativetimetextbox.html#skincontract" class="tsd-kind-icon">skin<wbr>Contract</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="_ui_editor_.nativetimetextbox.html#value" class="tsd-kind-icon">value</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="_ui_editor_.nativetimetextbox.html#waitnode" class="tsd-kind-icon">wait<wbr>Node</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="_ui_editor_.nativetimetextbox.html#waitskin" class="tsd-kind-icon">wait<wbr>Skin</a></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="_ui_editor_.nativetimetextbox.html#waiting" class="tsd-kind-icon">waiting</a></li> </ul> </section> <section class="tsd-index-section tsd-is-inherited"> <h3>Methods</h3> <ul class="tsd-index-list"> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="_ui_editor_.nativetimetextbox.html#classsetter" class="tsd-kind-icon">class<wbr>Setter</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="_ui_editor_.nativetimetextbox.html#collect" class="tsd-kind-icon">collect</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="_ui_editor_.nativetimetextbox.html#destroy" class="tsd-kind-icon">destroy</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="_ui_editor_.nativetimetextbox.html#destroyrecursive" class="tsd-kind-icon">destroy<wbr>Recursive</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="_ui_editor_.nativetimetextbox.html#emit" class="tsd-kind-icon">emit</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="_ui_editor_.nativetimetextbox.html#focus" class="tsd-kind-icon">focus</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="_ui_editor_.nativetimetextbox.html#forceupdateskin" class="tsd-kind-icon">force<wbr>Update<wbr>Skin</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="_ui_editor_.nativetimetextbox.html#get" class="tsd-kind-icon">get</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="_ui_editor_.nativetimetextbox.html#idsetter" class="tsd-kind-icon">id<wbr>Setter</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="_ui_editor_.nativetimetextbox.html#loadskin" class="tsd-kind-icon">load<wbr>Skin</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="_ui_editor_.nativetimetextbox.html#mixinproperties" class="tsd-kind-icon">mixin<wbr>Properties</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="_ui_editor_.nativetimetextbox.html#mixinrecursive" class="tsd-kind-icon">mixin<wbr>Recursive</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="_ui_editor_.nativetimetextbox.html#namesetter" class="tsd-kind-icon">name<wbr>Setter</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-inherited"><a href="_ui_editor_.nativetimetextbox.html#on" class="tsd-kind-icon">on</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="_ui_editor_.nativetimetextbox.html#onupdatedskin" class="tsd-kind-icon">on<wbr>Updated<wbr>Skin</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="_ui_editor_.nativetimetextbox.html#own" class="tsd-kind-icon">own</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="_ui_editor_.nativetimetextbox.html#registerchildwidget" class="tsd-kind-icon">register<wbr>Child<wbr>Widget</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="_ui_editor_.nativetimetextbox.html#remove" class="tsd-kind-icon">remove</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="_ui_editor_.nativetimetextbox.html#set" class="tsd-kind-icon">set</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="_ui_editor_.nativetimetextbox.html#show" class="tsd-kind-icon">show</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="_ui_editor_.nativetimetextbox.html#skinsetter" class="tsd-kind-icon">skin<wbr>Setter</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="_ui_editor_.nativetimetextbox.html#startup" class="tsd-kind-icon">startup</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="_ui_editor_.nativetimetextbox.html#stylesetter" class="tsd-kind-icon">style<wbr>Setter</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="_ui_editor_.nativetimetextbox.html#subscribe" class="tsd-kind-icon">subscribe</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="_ui_editor_.nativetimetextbox.html#updateskin" class="tsd-kind-icon">update<wbr>Skin</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="_ui_editor_.nativetimetextbox.html#valuegetter" class="tsd-kind-icon">value<wbr>Getter</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="_ui_editor_.nativetimetextbox.html#valuesetter" class="tsd-kind-icon">value<wbr>Setter</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="_ui_editor_.nativetimetextbox.html#wait" class="tsd-kind-icon">wait</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="_ui_editor_.nativetimetextbox.html#watch" class="tsd-kind-icon">watch</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static"><a href="_ui_editor_.nativetimetextbox.html#extend" class="tsd-kind-icon">extend</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static"><a href="_ui_editor_.nativetimetextbox.html#getobject" class="tsd-kind-icon">get<wbr>Object</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static"><a href="_ui_editor_.nativetimetextbox.html#mixin" class="tsd-kind-icon">mixin</a></li> </ul> </section> </div> </section> </section> <section class="tsd-panel-group tsd-member-group "> <h2>Constructors</h2> <section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite"> <a name="constructor" class="tsd-anchor"></a> <h3>constructor</h3> <ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite"> <li class="tsd-signature tsd-kind-icon">new <wbr>Native<wbr>Time<wbr>Text<wbr>Box<span class="tsd-signature-symbol">(</span>args<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_ui_editor_.nativetimetextbox.html" class="tsd-signature-type">NativeTimeTextBox</a></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Overwrites <a href="_ui_editor_.controlbase.html">ControlBase</a>.<a href="_ui_editor_.controlbase.html#constructor">constructor</a></p> <ul> <li>Defined in <a href="https://github.com/ninejs/ninejs/blob/master/ui/Editor.ts#L286">ui/Editor.ts:286</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>args: <span class="tsd-signature-type">any</span></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <a href="_ui_editor_.nativetimetextbox.html" class="tsd-signature-type">NativeTimeTextBox</a></h4> </li> </ul> </section> </section> <section class="tsd-panel-group tsd-member-group tsd-is-inherited"> <h2>Properties</h2> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited"> <a name="_njschildwidgets" class="tsd-anchor"></a> <h3>$njs<wbr>Child<wbr>Widgets</h3> <div class="tsd-signature tsd-kind-icon">$njs<wbr>Child<wbr>Widgets<span class="tsd-signature-symbol">:</span> <a href="_ui_widget_.widget.html" class="tsd-signature-type">Widget</a><span class="tsd-signature-symbol">[]</span></div> <aside class="tsd-sources"> <p>Inherited from <a href="_ui_widget_.widget.html">Widget</a>.<a href="_ui_widget_.widget.html#_njschildwidgets">$njsChildWidgets</a></p> <ul> <li>Defined in <a href="https://github.com/ninejs/ninejs/blob/master/ui/Widget.ts#L71">ui/Widget.ts:71</a></li> </ul> </aside> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited"> <a name="_njscollect" class="tsd-anchor"></a> <h3>$njs<wbr>Collect</h3> <div class="tsd-signature tsd-kind-icon">$njs<wbr>Collect<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">object</span></div> <aside class="tsd-sources"> <p>Inherited from <a href="_ui_widget_.widget.html">Widget</a>.<a href="_ui_widget_.widget.html#_njscollect">$njsCollect</a></p> <ul> <li>Defined in <a href="https://github.com/ninejs/ninejs/blob/master/ui/Widget.ts#L72">ui/Widget.ts:72</a></li> </ul> </aside> <div class="tsd-type-declaration"> <h4>Type declaration</h4> <ul class="tsd-parameters"> <li class="tsd-parameter-index-signature"> <h5><span class="tsd-signature-symbol">[</span>name: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">]: </span><span class="tsd-signature-type">function</span><span class="tsd-signature-symbol">[]</span></h5> <ul class="tsd-parameters"> <li class="tsd-parameter-siganture"> <ul class="tsd-signatures tsd-kind-type-literal tsd-is-not-exported"> <li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>data<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>data: <span class="tsd-signature-type">any</span></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4> </li> </ul> </li> </ul> </li> </ul> </div> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited"> <a name="_njsconstructors" class="tsd-anchor"></a> <h3>$njs<wbr>Constructors</h3> <div class="tsd-signature tsd-kind-icon">$njs<wbr>Constructors<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">function</span><span class="tsd-signature-symbol">[]</span></div> <aside class="tsd-sources"> <p>Inherited from <a href="_core_ext_properties_.default.html">default</a>.<a href="_core_ext_properties_.default.html#_njsconstructors">$njsConstructors</a></p> <ul> <li>Defined in <a href="https://github.com/ninejs/ninejs/blob/master/core/ext/Properties.ts#L206">core/ext/Properties.ts:206</a></li> </ul> </aside> <div class="tsd-type-declaration"> <h4>Type declaration</h4> <ul class="tsd-parameters"> <li class="tsd-parameter-siganture"> <ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-property tsd-is-not-exported"> <li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>args<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>args: <span class="tsd-signature-type">any</span></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4> </li> </ul> </li> </ul> </div> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited"> <a name="_njseventlistenerhandlers" class="tsd-anchor"></a> <h3>$njs<wbr>Event<wbr>Listener<wbr>Handlers</h3> <div class="tsd-signature tsd-kind-icon">$njs<wbr>Event<wbr>Listener<wbr>Handlers<span class="tsd-signature-symbol">:</span> <a href="../interfaces/_core_on_.removabletype.html" class="tsd-signature-type">RemovableType</a><span class="tsd-signature-symbol">[]</span></div> <aside class="tsd-sources"> <p>Inherited from <a href="_ui_widget_.widget.html">Widget</a>.<a href="_ui_widget_.widget.html#_njseventlistenerhandlers">$njsEventListenerHandlers</a></p> <ul> <li>Defined in <a href="https://github.com/ninejs/ninejs/blob/master/ui/Widget.ts#L73">ui/Widget.ts:73</a></li> </ul> </aside> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited"> <a name="_njseventlisteners" class="tsd-anchor"></a> <h3>$njs<wbr>Event<wbr>Listeners</h3> <div class="tsd-signature tsd-kind-icon">$njs<wbr>Event<wbr>Listeners<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">object</span></div> <aside class="tsd-sources"> <p>Inherited from <a href="_ui_widget_.widget.html">Widget</a>.<a href="_ui_widget_.widget.html#_njseventlisteners">$njsEventListeners</a></p> <ul> <li>Defined in <a href="https://github.com/ninejs/ninejs/blob/master/ui/Widget.ts#L74">ui/Widget.ts:74</a></li> </ul> </aside> <div class="tsd-type-declaration"> <h4>Type declaration</h4> <ul class="tsd-parameters"> <li class="tsd-parameter-index-signature"> <h5><span class="tsd-signature-symbol">[</span>name: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">]: </span><a href="_core_on_.eventhandler.html" class="tsd-signature-type">EventHandler</a><span class="tsd-signature-symbol">[]</span></h5> </li> </ul> </div> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited"> <a name="_njsshowdefer" class="tsd-anchor"></a> <h3>$njs<wbr>Show<wbr>Defer</h3> <div class="tsd-signature tsd-kind-icon">$njs<wbr>Show<wbr>Defer<span class="tsd-signature-symbol">:</span> <a href="../interfaces/_core_deferredutils_.promiseconstructortype.html" class="tsd-signature-type">PromiseConstructorType</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">HTMLElement</span><span class="tsd-signature-symbol">&gt;</span></div> <aside class="tsd-sources"> <p>Inherited from <a href="_ui_widget_.widget.html">Widget</a>.<a href="_ui_widget_.widget.html#_njsshowdefer">$njsShowDefer</a></p> <ul> <li>Defined in <a href="https://github.com/ninejs/ninejs/blob/master/ui/Widget.ts#L75">ui/Widget.ts:75</a></li> </ul> </aside> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited"> <a name="_njswatch" class="tsd-anchor"></a> <h3>$njs<wbr>Watch</h3> <div class="tsd-signature tsd-kind-icon">$njs<wbr>Watch<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">object</span></div> <aside class="tsd-sources"> <p>Inherited from <a href="_core_ext_properties_.default.html">default</a>.<a href="_core_ext_properties_.default.html#_njswatch">$njsWatch</a></p> <ul> <li>Defined in <a href="https://github.com/ninejs/ninejs/blob/master/core/ext/Properties.ts#L203">core/ext/Properties.ts:203</a></li> </ul> </aside> <div class="tsd-type-declaration"> <h4>Type declaration</h4> <ul class="tsd-parameters"> <li class="tsd-parameter-index-signature"> <h5><span class="tsd-signature-symbol">[</span>name: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">]: </span><span class="tsd-signature-type">object</span><span class="tsd-signature-symbol">[]</span></h5> <ul class="tsd-parameters"> <li class="tsd-parameter"> <h5>action<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">function</span></h5> <ul class="tsd-parameters"> <li class="tsd-parameter-siganture"> <ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-variable tsd-is-not-exported"> <li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, oldValue<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span>, newValue<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>name: <span class="tsd-signature-type">string</span></h5> </li> <li> <h5>oldValue: <span class="tsd-signature-type">any</span></h5> </li> <li> <h5>newValue: <span class="tsd-signature-type">any</span></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4> </li> </ul> </li> </ul> </li> <li class="tsd-parameter"> <h5>remove<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">function</span></h5> <ul class="tsd-parameters"> <li class="tsd-parameter-siganture"> <ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-variable tsd-is-not-exported"> <li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4> </li> </ul> </li> </ul> </li> </ul> </li> </ul> </div> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited"> <a name="_njswidget" class="tsd-anchor"></a> <h3>$njs<wbr>Widget</h3> <div class="tsd-signature tsd-kind-icon">$njs<wbr>Widget<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div> <aside class="tsd-sources"> <p>Inherited from <a href="_ui_widget_.widget.html">Widget</a>.<a href="_ui_widget_.widget.html#_njswidget">$njsWidget</a></p> <ul> <li>Defined in <a href="https://github.com/ninejs/ninejs/blob/master/ui/Widget.ts#L70">ui/Widget.ts:70</a></li> </ul> </aside> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited"> <a name="currentskin" class="tsd-anchor"></a> <h3>current<wbr>Skin</h3> <div class="tsd-signature tsd-kind-icon">current<wbr>Skin<span class="tsd-signature-symbol">:</span> <a href="_ui_skin_.skin.html" class="tsd-signature-type">Skin</a></div> <aside class="tsd-sources"> <p>Inherited from <a href="_ui_widget_.widget.html">Widget</a>.<a href="_ui_widget_.widget.html#currentskin">currentSkin</a></p> <ul> <li>Defined in <a href="https://github.com/ninejs/ninejs/blob/master/ui/Widget.ts#L76">ui/Widget.ts:76</a></li> </ul> </aside> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited"> <a name="domnode" class="tsd-anchor"></a> <h3>dom<wbr>Node</h3> <div class="tsd-signature tsd-kind-icon">dom<wbr>Node<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">HTMLElement</span><span class="tsd-signature-symbol"> | </span><a href="../modules/_core_deferredutils_.html#promisetype" class="tsd-signature-type">PromiseType</a></div> <aside class="tsd-sources"> <p>Inherited from <a href="_ui_widget_.widget.html">Widget</a>.<a href="_ui_widget_.widget.html#domnode">domNode</a></p> <ul> <li>Defined in <a href="https://github.com/ninejs/ninejs/blob/master/ui/Widget.ts#L81">ui/Widget.ts:81</a></li> </ul> </aside> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited"> <a name="name" class="tsd-anchor"></a> <h3>name</h3> <div class="tsd-signature tsd-kind-icon">name<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div> <aside class="tsd-sources"> <p>Inherited from <a href="_ui_editor_.controlbase.html">ControlBase</a>.<a href="_ui_editor_.controlbase.html#name">name</a></p> <ul> <li>Defined in <a href="https://github.com/ninejs/ninejs/blob/master/ui/Editor.ts#L153">ui/Editor.ts:153</a></li> </ul> </aside> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited"> <a name="skin" class="tsd-anchor"></a> <h3>skin</h3> <div class="tsd-signature tsd-kind-icon">skin<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span></div> <aside class="tsd-sources"> <p>Inherited from <a href="_ui_widget_.widget.html">Widget</a>.<a href="_ui_widget_.widget.html#skin">skin</a></p> <ul> <li>Defined in <a href="https://github.com/ninejs/ninejs/blob/master/ui/Widget.ts#L82">ui/Widget.ts:82</a></li> </ul> </aside> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited"> <a name="skincontract" class="tsd-anchor"></a> <h3>skin<wbr>Contract</h3> <div class="tsd-signature tsd-kind-icon">skin<wbr>Contract<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">object</span></div> <aside class="tsd-sources"> <p>Inherited from <a href="_ui_widget_.widget.html">Widget</a>.<a href="_ui_widget_.widget.html#skincontract">skinContract</a></p> <ul> <li>Defined in <a href="https://github.com/ninejs/ninejs/blob/master/ui/Widget.ts#L83">ui/Widget.ts:83</a></li> </ul> </aside> <div class="tsd-type-declaration"> <h4>Type declaration</h4> <ul class="tsd-parameters"> <li class="tsd-parameter-index-signature"> <h5><span class="tsd-signature-symbol">[</span>name: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">]: </span><span class="tsd-signature-type">object</span></h5> <ul class="tsd-parameters"> <li class="tsd-parameter"> <h5>type<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5> </li> </ul> </li> </ul> </div> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited"> <a name="value" class="tsd-anchor"></a> <h3>value</h3> <div class="tsd-signature tsd-kind-icon">value<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span></div> <aside class="tsd-sources"> <p>Inherited from <a href="_ui_editor_.controlbase.html">ControlBase</a>.<a href="_ui_editor_.controlbase.html#value">value</a></p> <ul> <li>Defined in <a href="https://github.com/ninejs/ninejs/blob/master/ui/Editor.ts#L152">ui/Editor.ts:152</a></li> </ul> </aside> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited"> <a name="waitnode" class="tsd-anchor"></a> <h3>wait<wbr>Node</h3> <div class="tsd-signature tsd-kind-icon">wait<wbr>Node<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">HTMLElement</span></div> <aside class="tsd-sources"> <p>Inherited from <a href="_ui_widget_.widget.html">Widget</a>.<a href="_ui_widget_.widget.html#waitnode">waitNode</a></p> <ul> <li>Defined in <a href="https://github.com/ninejs/ninejs/blob/master/ui/Widget.ts#L84">ui/Widget.ts:84</a></li> </ul> </aside> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited"> <a name="waitskin" class="tsd-anchor"></a> <h3>wait<wbr>Skin</h3> <div class="tsd-signature tsd-kind-icon">wait<wbr>Skin<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span></div> <aside class="tsd-sources"> <p>Inherited from <a href="_ui_widget_.widget.html">Widget</a>.<a href="_ui_widget_.widget.html#waitskin">waitSkin</a></p> <ul> <li>Defined in <a href="https://github.com/ninejs/ninejs/blob/master/ui/Widget.ts#L85">ui/Widget.ts:85</a></li> </ul> </aside> </section> <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited"> <a name="waiting" class="tsd-anchor"></a> <h3>waiting</h3> <div class="tsd-signature tsd-kind-icon">waiting<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div> <aside class="tsd-sources"> <p>Inherited from <a href="_ui_widget_.widget.html">Widget</a>.<a href="_ui_widget_.widget.html#waiting">waiting</a></p> <ul> <li>Defined in <a href="https://github.com/ninejs/ninejs/blob/master/ui/Widget.ts#L77">ui/Widget.ts:77</a></li> </ul> </aside> </section> </section> <section class="tsd-panel-group tsd-member-group tsd-is-inherited"> <h2>Methods</h2> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a name="classsetter" class="tsd-anchor"></a> <h3>class<wbr>Setter</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <li class="tsd-signature tsd-kind-icon">class<wbr>Setter<span class="tsd-signature-symbol">(</span>v<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">HTMLElement</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="_ui_widget_.widget.html">Widget</a>.<a href="_ui_widget_.widget.html#classsetter">classSetter</a></p> <ul> <li>Defined in <a href="https://github.com/ninejs/ninejs/blob/master/ui/Widget.ts#L176">ui/Widget.ts:176</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Sets the given css class (or classes separated by space). If the domNode exists the assigment is performed imnediately, otherwise is executed on the &#39;updateSkin&#39; event (only once.)</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>v: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p>Single or space-separated list of CSS classes</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">HTMLElement</span><span class="tsd-signature-symbol">&gt;</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a name="collect" class="tsd-anchor"></a> <h3>collect</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <li class="tsd-signature tsd-kind-icon">collect<span class="tsd-signature-symbol">(</span>type<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, data<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Array</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="_ui_widget_.widget.html">Widget</a>.<a href="_ui_widget_.widget.html#collect">collect</a></p> <ul> <li>Defined in <a href="https://github.com/ninejs/ninejs/blob/master/ui/Widget.ts#L459">ui/Widget.ts:459</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>type: <span class="tsd-signature-type">string</span></h5> </li> <li> <h5>data: <span class="tsd-signature-type">any</span></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Array</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a name="destroy" class="tsd-anchor"></a> <h3>destroy</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <li class="tsd-signature tsd-kind-icon">destroy<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="_ui_widget_.widget.html">Widget</a>.<a href="_ui_widget_.widget.html#destroy">destroy</a></p> <ul> <li>Defined in <a href="https://github.com/ninejs/ninejs/blob/master/ui/Widget.ts#L95">ui/Widget.ts:95</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Calls destroy() on every registered child, and later removes all event listeners. Extend this function in order to do any implementation specific destroy logic,like finalizing non-ninejs child components.</p> </div> </div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a name="destroyrecursive" class="tsd-anchor"></a> <h3>destroy<wbr>Recursive</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <li class="tsd-signature tsd-kind-icon">destroy<wbr>Recursive<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="_ui_editor_.controlbase.html">ControlBase</a>.<a href="_ui_editor_.controlbase.html#destroyrecursive">destroyRecursive</a></p> <ul> <li>Defined in <a href="https://github.com/ninejs/ninejs/blob/master/ui/Editor.ts#L161">ui/Editor.ts:161</a></li> </ul> </aside> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a name="emit" class="tsd-anchor"></a> <h3>emit</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <li class="tsd-signature tsd-kind-icon">emit<span class="tsd-signature-symbol">(</span>type<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, data<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="_ui_widget_.widget.html">Widget</a>.<a href="_ui_widget_.widget.html#emit">emit</a></p> <ul> <li>Defined in <a href="https://github.com/ninejs/ninejs/blob/master/ui/Widget.ts#L439">ui/Widget.ts:439</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Short hand for on.emit(this.domNode, type, data)</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>type: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p>Type of event/message being emitted</p> </div> </li> <li> <h5>data: <span class="tsd-signature-type">any</span></h5> <div class="tsd-comment tsd-typography"> <p>Event/message data</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a name="focus" class="tsd-anchor"></a> <h3>focus</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <li class="tsd-signature tsd-kind-icon">focus<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="_ui_editor_.controlbase.html">ControlBase</a>.<a href="_ui_editor_.controlbase.html#focus">focus</a></p> <ul> <li>Defined in <a href="https://github.com/ninejs/ninejs/blob/master/ui/Editor.ts#L167">ui/Editor.ts:167</a></li> </ul> </aside> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a name="forceupdateskin" class="tsd-anchor"></a> <h3>force<wbr>Update<wbr>Skin</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <li class="tsd-signature tsd-kind-icon">force<wbr>Update<wbr>Skin<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="_ui_widget_.widget.html">Widget</a>.<a href="_ui_widget_.widget.html#forceupdateskin">forceUpdateSkin</a></p> <ul> <li>Defined in <a href="https://github.com/ninejs/ninejs/blob/master/ui/Widget.ts#L295">ui/Widget.ts:295</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>If currentSkin is defined it gets disabled. After that currentSkin is set to null and updateSkin() is called.</p> </div> </div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4> <p>same as updateSkin()</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a name="get" class="tsd-anchor"></a> <h3>get</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <li class="tsd-signature tsd-kind-icon">get<span class="tsd-signature-symbol">(</span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="_core_ext_properties_.default.html">default</a>.<a href="_core_ext_properties_.default.html#get">get</a></p> <ul> <li>Defined in <a href="https://github.com/ninejs/ninejs/blob/master/core/ext/Properties.ts#L138">core/ext/Properties.ts:138</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>name: <span class="tsd-signature-type">string</span></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a name="idsetter" class="tsd-anchor"></a> <h3>id<wbr>Setter</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <li class="tsd-signature tsd-kind-icon">id<wbr>Setter<span class="tsd-signature-symbol">(</span>v<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">HTMLElement</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="_ui_widget_.widget.html">Widget</a>.<a href="_ui_widget_.widget.html#idsetter">idSetter</a></p> <ul> <li>Defined in <a href="https://github.com/ninejs/ninejs/blob/master/ui/Widget.ts#L189">ui/Widget.ts:189</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Sets the given id to the domNoe. If the domNode exists the assigment is performed imnediately, otherwise is executed on the &#39;updateSkin&#39; event (only once.)</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>v: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p>dom id for this component</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">HTMLElement</span><span class="tsd-signature-symbol">&gt;</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a name="loadskin" class="tsd-anchor"></a> <h3>load<wbr>Skin</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <li class="tsd-signature tsd-kind-icon">load<wbr>Skin<span class="tsd-signature-symbol">(</span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="_ui_skin_.skin.html" class="tsd-signature-type">Skin</a><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="_ui_widget_.widget.html">Widget</a>.<a href="_ui_widget_.widget.html#loadskin">loadSkin</a></p> <ul> <li>Defined in <a href="https://github.com/ninejs/ninejs/blob/master/ui/Widget.ts#L307">ui/Widget.ts:307</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Wraps the skin within a promise and calls &#39;skin&#39; setter. Then the module represented by &#39;name&#39; is required and resolved to the actual value.</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>name: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p>Skin component AMD path</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="_ui_skin_.skin.html" class="tsd-signature-type">Skin</a><span class="tsd-signature-symbol">&gt;</span></h4> <p>The promise used to wraps the skin</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a name="mixinproperties" class="tsd-anchor"></a> <h3>mixin<wbr>Properties</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <li class="tsd-signature tsd-kind-icon">mixin<wbr>Properties<span class="tsd-signature-symbol">(</span>target<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_core_ext_properties_.default.html" class="tsd-signature-type">default</a></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="_core_ext_properties_.default.html">default</a>.<a href="_core_ext_properties_.default.html#mixinproperties">mixinProperties</a></p> <ul> <li>Defined in <a href="https://github.com/ninejs/ninejs/blob/master/core/ext/Properties.ts#L195">core/ext/Properties.ts:195</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>target: <span class="tsd-signature-type">any</span></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <a href="_core_ext_properties_.default.html" class="tsd-signature-type">default</a></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a name="mixinrecursive" class="tsd-anchor"></a> <h3>mixin<wbr>Recursive</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <li class="tsd-signature tsd-kind-icon">mixin<wbr>Recursive<span class="tsd-signature-symbol">(</span>target<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_core_ext_properties_.default.html" class="tsd-signature-type">default</a></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="_core_ext_properties_.default.html">default</a>.<a href="_core_ext_properties_.default.html#mixinrecursive">mixinRecursive</a></p> <ul> <li>Defined in <a href="https://github.com/ninejs/ninejs/blob/master/core/ext/Properties.ts#L199">core/ext/Properties.ts:199</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>target: <span class="tsd-signature-type">any</span></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <a href="_core_ext_properties_.default.html" class="tsd-signature-type">default</a></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a name="namesetter" class="tsd-anchor"></a> <h3>name<wbr>Setter</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <li class="tsd-signature tsd-kind-icon">name<wbr>Setter<span class="tsd-signature-symbol">(</span>v<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="_ui_editor_.controlbase.html">ControlBase</a>.<a href="_ui_editor_.controlbase.html#namesetter">nameSetter</a></p> <ul> <li>Defined in <a href="https://github.com/ninejs/ninejs/blob/master/ui/Editor.ts#L176">ui/Editor.ts:176</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>v: <span class="tsd-signature-type">string</span></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-inherited"> <a name="on" class="tsd-anchor"></a> <h3>on</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-inherited"> <li class="tsd-signature tsd-kind-icon">on<span class="tsd-signature-symbol">(</span>type<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, action<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">function</span>, persistEvent<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/_core_on_.removabletype.html" class="tsd-signature-type">RemovableType</a></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="_ui_editor_.controlbase.html">ControlBase</a>.<a href="_ui_editor_.controlbase.html#on">on</a></p> <p>Overwrites <a href="_ui_widget_.widget.html">Widget</a>.<a href="_ui_widget_.widget.html#on">on</a></p> <ul> <li>Defined in <a href="https://github.com/ninejs/ninejs/blob/master/ui/Editor.ts#L154">ui/Editor.ts:154</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>type: <span class="tsd-signature-type">string</span></h5> </li> <li> <h5>action: <span class="tsd-signature-type">function</span></h5> <ul class="tsd-parameters"> <li class="tsd-parameter-siganture"> <ul class="tsd-signatures tsd-kind-type-literal tsd-is-not-exported"> <li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>e<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5><span class="tsd-flag ts-flagOptional">Optional</span> e: <span class="tsd-signature-type">any</span></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4> </li> </ul> </li> </ul> </li> <li> <h5><span class="tsd-flag ts-flagOptional">Optional</span> persistEvent: <span class="tsd-signature-type">boolean</span></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <a href="../interfaces/_core_on_.removabletype.html" class="tsd-signature-type">RemovableType</a></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a name="onupdatedskin" class="tsd-anchor"></a> <h3>on<wbr>Updated<wbr>Skin</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <li class="tsd-signature tsd-kind-icon">on<wbr>Updated<wbr>Skin<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="_ui_widget_.widget.html">Widget</a>.<a href="_ui_widget_.widget.html#onupdatedskin">onUpdatedSkin</a></p> <ul> <li>Defined in <a href="https://github.com/ninejs/ninejs/blob/master/ui/Widget.ts#L283">ui/Widget.ts:283</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Calls update over the currentSkin and then emits an &#39;updatedSkin&#39; event without data.</p> </div> </div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a name="own" class="tsd-anchor"></a> <h3>own</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <li class="tsd-signature tsd-kind-icon">own<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span>args<span class="tsd-signature-symbol">: </span><a href="../interfaces/_core_on_.removabletype.html" class="tsd-signature-type">RemovableType</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="_ui_widget_.widget.html">Widget</a>.<a href="_ui_widget_.widget.html#own">own</a></p> <ul> <li>Defined in <a href="https://github.com/ninejs/ninejs/blob/master/ui/Widget.ts#L323">ui/Widget.ts:323</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Adds all arguments to the Event Listener Handlers list. This list is later used when destroying the widget to call remove over all handlers.</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5><span class="tsd-flag ts-flagRest">Rest</span> <span class="tsd-signature-symbol">...</span>args: <a href="../interfaces/_core_on_.removabletype.html" class="tsd-signature-type">RemovableType</a><span class="tsd-signature-symbol">[]</span></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a name="registerchildwidget" class="tsd-anchor"></a> <h3>register<wbr>Child<wbr>Widget</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <li class="tsd-signature tsd-kind-icon">register<wbr>Child<wbr>Widget<span class="tsd-signature-symbol">(</span>w<span class="tsd-signature-symbol">: </span><a href="_ui_widget_.widget.html" class="tsd-signature-type">Widget</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="_ui_widget_.widget.html">Widget</a>.<a href="_ui_widget_.widget.html#registerchildwidget">registerChildWidget</a></p> <ul> <li>Defined in <a href="https://github.com/ninejs/ninejs/blob/master/ui/Widget.ts#L112">ui/Widget.ts:112</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Registers a new child widget.</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>w: <a href="_ui_widget_.widget.html" class="tsd-signature-type">Widget</a></h5> <div class="tsd-comment tsd-typography"> <p>the new child to be added.</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a name="remove" class="tsd-anchor"></a> <h3>remove</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <li class="tsd-signature tsd-kind-icon">remove<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="_ui_widget_.widget.html">Widget</a>.<a href="_ui_widget_.widget.html#remove">remove</a></p> <ul> <li>Defined in <a href="https://github.com/ninejs/ninejs/blob/master/ui/Widget.ts#L121">ui/Widget.ts:121</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Remove this Widget from its parent, if this.domNode and this.domNode.parentNode are defined. Also emits a &#39;removing&#39; event with an empty data. This method is used during destroying sequence in order to detach child and parent widgets.</p> </div> </div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4> <p>true if the component was removed from its parent; false otherwise.</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a name="set" class="tsd-anchor"></a> <h3>set</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <li class="tsd-signature tsd-kind-icon">set<span class="tsd-signature-symbol">(</span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span>, <span class="tsd-signature-symbol">...</span>values<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="_core_ext_properties_.default.html">default</a>.<a href="_core_ext_properties_.default.html#set">set</a></p> <ul> <li>Defined in <a href="https://github.com/ninejs/ninejs/blob/master/core/ext/Properties.ts#L149">core/ext/Properties.ts:149</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>name: <span class="tsd-signature-type">any</span></h5> </li> <li> <h5><span class="tsd-flag ts-flagRest">Rest</span> <span class="tsd-signature-symbol">...</span>values: <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a name="show" class="tsd-anchor"></a> <h3>show</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <li class="tsd-signature tsd-kind-icon">show<span class="tsd-signature-symbol">(</span>parentNode<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">HTMLElement</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../modules/_core_deferredutils_.html#promisetype" class="tsd-signature-type">PromiseType</a></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="_ui_widget_.widget.html">Widget</a>.<a href="_ui_widget_.widget.html#show">show</a></p> <ul> <li>Defined in <a href="https://github.com/ninejs/ninejs/blob/master/ui/Widget.ts#L336">ui/Widget.ts:336</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>If the widget has a currentSkin then it is appended (as text or domNode) to the parent node. If the widget does not have a skin yet, then a promise is returned that resolves when updateSkin() finished; at that point all event listeners are moved (for the old domNode) and attached to the new one. The node is appended to the parent node and a self referece is returned.</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5><span class="tsd-flag ts-flagOptional">Optional</span> parentNode: <span class="tsd-signature-type">HTMLElement</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p>The id of the dom element, or the element itself</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <a href="../modules/_core_deferredutils_.html#promisetype" class="tsd-signature-type">PromiseType</a></h4> <p>This widget or a promise</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a name="skinsetter" class="tsd-anchor"></a> <h3>skin<wbr>Setter</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <li class="tsd-signature tsd-kind-icon">skin<wbr>Setter<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><a href="_ui_skin_.skin.html" class="tsd-signature-type">Skin</a><span class="tsd-signature-symbol"> | </span><a href="../modules/_core_deferredutils_.html#promisetype" class="tsd-signature-type">PromiseType</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="_ui_skin_.skin.html" class="tsd-signature-type">Skin</a><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="_ui_widget_.widget.html">Widget</a>.<a href="_ui_widget_.widget.html#skinsetter">skinSetter</a></p> <ul> <li>Defined in <a href="https://github.com/ninejs/ninejs/blob/master/ui/Widget.ts#L137">ui/Widget.ts:137</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Sets the new Skin. If value is a string just returns loadSkin(value); otherwise the following checks are performed: If this widget has a skinContract; then every function and property of the current skinContract must have a match on the new skin.</p> </div> <dl class="tsd-comment-tags"> <dt>throws</dt> <dd><p>{Error} If one function or property is not found</p> </dd> </dl> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>value: <a href="_ui_skin_.skin.html" class="tsd-signature-type">Skin</a><span class="tsd-signature-symbol"> | </span><a href="../modules/_core_deferredutils_.html#promisetype" class="tsd-signature-type">PromiseType</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p>New skin</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="_ui_skin_.skin.html" class="tsd-signature-type">Skin</a><span class="tsd-signature-symbol">&gt;</span></h4> <p>A promise (if loadSkin() was called); or the actual skin value (object or string)</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a name="startup" class="tsd-anchor"></a> <h3>startup</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <li class="tsd-signature tsd-kind-icon">startup<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="_ui_editor_.controlbase.html">ControlBase</a>.<a href="_ui_editor_.controlbase.html#startup">startup</a></p> <ul> <li>Defined in <a href="https://github.com/ninejs/ninejs/blob/master/ui/Editor.ts#L164">ui/Editor.ts:164</a></li> </ul> </aside> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a name="stylesetter" class="tsd-anchor"></a> <h3>style<wbr>Setter</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <li class="tsd-signature tsd-kind-icon">style<wbr>Setter<span class="tsd-signature-symbol">(</span>v<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">HTMLElement</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="_ui_widget_.widget.html">Widget</a>.<a href="_ui_widget_.widget.html#stylesetter">styleSetter</a></p> <ul> <li>Defined in <a href="https://github.com/ninejs/ninejs/blob/master/ui/Widget.ts#L201">ui/Widget.ts:201</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Sets the given style to the domNode. If the domNode exists the assigment is performed imnediately, otherwise is executed on the &#39;updateSkin&#39; event (only once.)</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>v: <span class="tsd-signature-type">string</span></h5> <div class="tsd-comment tsd-typography"> <p>Style for widget&#39;s domNode</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">HTMLElement</span><span class="tsd-signature-symbol">&gt;</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a name="subscribe" class="tsd-anchor"></a> <h3>subscribe</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <li class="tsd-signature tsd-kind-icon">subscribe<span class="tsd-signature-symbol">(</span>type<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, action<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">function</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="_ui_widget_.widget.html">Widget</a>.<a href="_ui_widget_.widget.html#subscribe">subscribe</a></p> <ul> <li>Defined in <a href="https://github.com/ninejs/ninejs/blob/master/ui/Widget.ts#L453">ui/Widget.ts:453</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>type: <span class="tsd-signature-type">string</span></h5> </li> <li> <h5>action: <span class="tsd-signature-type">function</span></h5> <ul class="tsd-parameters"> <li class="tsd-parameter-siganture"> <ul class="tsd-signatures tsd-kind-type-literal tsd-is-not-exported"> <li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>data<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>data: <span class="tsd-signature-type">any</span></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4> </li> </ul> </li> </ul> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a name="updateskin" class="tsd-anchor"></a> <h3>update<wbr>Skin</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <li class="tsd-signature tsd-kind-icon">update<wbr>Skin<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="_ui_widget_.widget.html">Widget</a>.<a href="_ui_widget_.widget.html#updateskin">updateSkin</a></p> <ul> <li>Defined in <a href="https://github.com/ninejs/ninejs/blob/master/ui/Widget.ts#L218">ui/Widget.ts:218</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>If the current skin is a single object (not an array) and it applies (skin.applies() is true) then is cosindered the current option to be applied.</p> </div> <p>If the current skin is an array then all elements are checked to see if any one applies, the first one that applies is considered the one to be applied.</p> <p>If some skin was selected to be applied and is different from the currentSkin the following steps are performed: (1) If currentSkin is defined an &#39;updatingSkin&#39; event is emitted; and all other skins (the ones that did not apply) are disabled. (2) A promise is built using skin.enable().</p> </div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4> <p>A promise that gets resoved when skin.enable(); after that the new skin is assigned to currentSkin and onUpdatedSkin() gets called.</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a name="valuegetter" class="tsd-anchor"></a> <h3>value<wbr>Getter</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <li class="tsd-signature tsd-kind-icon">value<wbr>Getter<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="_ui_editor_.controlbase.html">ControlBase</a>.<a href="_ui_editor_.controlbase.html#valuegetter">valueGetter</a></p> <ul> <li>Defined in <a href="https://github.com/ninejs/ninejs/blob/master/ui/Editor.ts#L173">ui/Editor.ts:173</a></li> </ul> </aside> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a name="valuesetter" class="tsd-anchor"></a> <h3>value<wbr>Setter</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <li class="tsd-signature tsd-kind-icon">value<wbr>Setter<span class="tsd-signature-symbol">(</span>v<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="_ui_editor_.controlbase.html">ControlBase</a>.<a href="_ui_editor_.controlbase.html#valuesetter">valueSetter</a></p> <ul> <li>Defined in <a href="https://github.com/ninejs/ninejs/blob/master/ui/Editor.ts#L170">ui/Editor.ts:170</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>v: <span class="tsd-signature-type">any</span></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a name="wait" class="tsd-anchor"></a> <h3>wait</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <li class="tsd-signature tsd-kind-icon">wait<span class="tsd-signature-symbol">(</span>_defer<span class="tsd-signature-symbol">: </span><a href="../modules/_core_deferredutils_.html#promisetype" class="tsd-signature-type">PromiseType</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="_ui_widget_.widget.html">Widget</a>.<a href="_ui_widget_.widget.html#wait">wait</a></p> <ul> <li>Defined in <a href="https://github.com/ninejs/ninejs/blob/master/ui/Widget.ts#L467">ui/Widget.ts:467</a></li> </ul> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Allows a Widget to display a state while waiting for a promise.</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>_defer: <a href="../modules/_core_deferredutils_.html#promisetype" class="tsd-signature-type">PromiseType</a></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a name="watch" class="tsd-anchor"></a> <h3>watch</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <li class="tsd-signature tsd-kind-icon">watch<span class="tsd-signature-symbol">(</span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, action<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">function</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/_core_ext_properties_.watchhandle.html" class="tsd-signature-type">WatchHandle</a></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="_core_ext_properties_.default.html">default</a>.<a href="_core_ext_properties_.default.html#watch">watch</a></p> <ul> <li>Defined in <a href="https://github.com/ninejs/ninejs/blob/master/core/ext/Properties.ts#L185">core/ext/Properties.ts:185</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>name: <span class="tsd-signature-type">string</span></h5> </li> <li> <h5>action: <span class="tsd-signature-type">function</span></h5> <ul class="tsd-parameters"> <li class="tsd-parameter-siganture"> <ul class="tsd-signatures tsd-kind-type-literal tsd-is-not-exported"> <li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, oldValue<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span>, newValue<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>name: <span class="tsd-signature-type">string</span></h5> </li> <li> <h5>oldValue: <span class="tsd-signature-type">any</span></h5> </li> <li> <h5>newValue: <span class="tsd-signature-type">any</span></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4> </li> </ul> </li> </ul> </li> </ul> <h4 class="tsd-returns-title">Returns <a href="../interfaces/_core_ext_properties_.watchhandle.html" class="tsd-signature-type">WatchHandle</a></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static"> <a name="extend" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagStatic">Static</span> extend</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static"> <li class="tsd-signature tsd-kind-icon">extend<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span>args<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="_ui_widget_.widget.html">Widget</a>.<a href="_ui_widget_.widget.html#extend">extend</a></p> <ul> <li>Defined in <a href="https://github.com/ninejs/ninejs/blob/master/ui/Widget.ts#L86">ui/Widget.ts:86</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5><span class="tsd-flag ts-flagRest">Rest</span> <span class="tsd-signature-symbol">...</span>args: <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static"> <a name="getobject" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagStatic">Static</span> get<wbr>Object</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static"> <li class="tsd-signature tsd-kind-icon">get<wbr>Object<span class="tsd-signature-symbol">(</span>obj<span class="tsd-signature-symbol">: </span><a href="_core_ext_properties_.default.html" class="tsd-signature-type">default</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="_core_ext_properties_.default.html">default</a>.<a href="_core_ext_properties_.default.html#getobject">getObject</a></p> <ul> <li>Defined in <a href="https://github.com/ninejs/ninejs/blob/master/core/ext/Properties.ts#L242">core/ext/Properties.ts:242</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>obj: <a href="_core_ext_properties_.default.html" class="tsd-signature-type">default</a></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static"> <a name="mixin" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagStatic">Static</span> mixin</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static"> <li class="tsd-signature tsd-kind-icon">mixin<span class="tsd-signature-symbol">(</span>target<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">(Anonymous function)</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> <p>Inherited from <a href="_core_ext_properties_.default.html">default</a>.<a href="_core_ext_properties_.default.html#mixin">mixin</a></p> <ul> <li>Defined in <a href="https://github.com/ninejs/ninejs/blob/master/core/ext/Properties.ts#L233">core/ext/Properties.ts:233</a></li> </ul> </aside> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>target: <span class="tsd-signature-type">any</span></h5> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">(Anonymous function)</span></h4> </li> </ul> </section> </section> </div> <div class="col-4 col-menu menu-sticky-wrap menu-highlight"> <nav class="tsd-navigation primary"> <ul> <li class="globals "> <a href="../globals.html"><em>Globals</em></a> </li> <li class="current tsd-kind-external-module"> <a href="../modules/_ui_editor_.html">"ui/<wbr>Editor"</a> </li> </ul> </nav> <nav class="tsd-navigation secondary menu-sticky"> <ul class="before-current"> </ul> <ul class="current"> <li class="current tsd-kind-class tsd-parent-kind-external-module"> <a href="_ui_editor_.nativetimetextbox.html" class="tsd-kind-icon">Native<wbr>Time<wbr>Text<wbr>Box</a> <ul> <li class=" tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite"> <a href="_ui_editor_.nativetimetextbox.html#constructor" class="tsd-kind-icon">constructor</a> </li> <li class=" tsd-kind-property tsd-parent-kind-class tsd-is-inherited"> <a href="_ui_editor_.nativetimetextbox.html#_njschildwidgets" class="tsd-kind-icon">$njs<wbr>Child<wbr>Widgets</a> </li> <li class=" tsd-kind-property tsd-parent-kind-class tsd-is-inherited"> <a href="_ui_editor_.nativetimetextbox.html#_njscollect" class="tsd-kind-icon">$njs<wbr>Collect</a> </li> <li class=" tsd-kind-property tsd-parent-kind-class tsd-is-inherited"> <a href="_ui_editor_.nativetimetextbox.html#_njsconstructors" class="tsd-kind-icon">$njs<wbr>Constructors</a> </li> <li class=" tsd-kind-property tsd-parent-kind-class tsd-is-inherited"> <a href="_ui_editor_.nativetimetextbox.html#_njseventlistenerhandlers" class="tsd-kind-icon">$njs<wbr>Event<wbr>Listener<wbr>Handlers</a> </li> <li class=" tsd-kind-property tsd-parent-kind-class tsd-is-inherited"> <a href="_ui_editor_.nativetimetextbox.html#_njseventlisteners" class="tsd-kind-icon">$njs<wbr>Event<wbr>Listeners</a> </li> <li class=" tsd-kind-property tsd-parent-kind-class tsd-is-inherited"> <a href="_ui_editor_.nativetimetextbox.html#_njsshowdefer" class="tsd-kind-icon">$njs<wbr>Show<wbr>Defer</a> </li> <li class=" tsd-kind-property tsd-parent-kind-class tsd-is-inherited"> <a href="_ui_editor_.nativetimetextbox.html#_njswatch" class="tsd-kind-icon">$njs<wbr>Watch</a> </li> <li class=" tsd-kind-property tsd-parent-kind-class tsd-is-inherited"> <a href="_ui_editor_.nativetimetextbox.html#_njswidget" class="tsd-kind-icon">$njs<wbr>Widget</a> </li> <li class=" tsd-kind-property tsd-parent-kind-class tsd-is-inherited"> <a href="_ui_editor_.nativetimetextbox.html#currentskin" class="tsd-kind-icon">current<wbr>Skin</a> </li> <li class=" tsd-kind-property tsd-parent-kind-class tsd-is-inherited"> <a href="_ui_editor_.nativetimetextbox.html#domnode" class="tsd-kind-icon">dom<wbr>Node</a> </li> <li class=" tsd-kind-property tsd-parent-kind-class tsd-is-inherited"> <a href="_ui_editor_.nativetimetextbox.html#name" class="tsd-kind-icon">name</a> </li> <li class=" tsd-kind-property tsd-parent-kind-class tsd-is-inherited"> <a href="_ui_editor_.nativetimetextbox.html#skin" class="tsd-kind-icon">skin</a> </li> <li class=" tsd-kind-property tsd-parent-kind-class tsd-is-inherited"> <a href="_ui_editor_.nativetimetextbox.html#skincontract" class="tsd-kind-icon">skin<wbr>Contract</a> </li> <li class=" tsd-kind-property tsd-parent-kind-class tsd-is-inherited"> <a href="_ui_editor_.nativetimetextbox.html#value" class="tsd-kind-icon">value</a> </li> <li class=" tsd-kind-property tsd-parent-kind-class tsd-is-inherited"> <a href="_ui_editor_.nativetimetextbox.html#waitnode" class="tsd-kind-icon">wait<wbr>Node</a> </li> <li class=" tsd-kind-property tsd-parent-kind-class tsd-is-inherited"> <a href="_ui_editor_.nativetimetextbox.html#waitskin" class="tsd-kind-icon">wait<wbr>Skin</a> </li> <li class=" tsd-kind-property tsd-parent-kind-class tsd-is-inherited"> <a href="_ui_editor_.nativetimetextbox.html#waiting" class="tsd-kind-icon">waiting</a> </li> <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a href="_ui_editor_.nativetimetextbox.html#classsetter" class="tsd-kind-icon">class<wbr>Setter</a> </li> <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a href="_ui_editor_.nativetimetextbox.html#collect" class="tsd-kind-icon">collect</a> </li> <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a href="_ui_editor_.nativetimetextbox.html#destroy" class="tsd-kind-icon">destroy</a> </li> <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a href="_ui_editor_.nativetimetextbox.html#destroyrecursive" class="tsd-kind-icon">destroy<wbr>Recursive</a> </li> <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a href="_ui_editor_.nativetimetextbox.html#emit" class="tsd-kind-icon">emit</a> </li> <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a href="_ui_editor_.nativetimetextbox.html#focus" class="tsd-kind-icon">focus</a> </li> <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a href="_ui_editor_.nativetimetextbox.html#forceupdateskin" class="tsd-kind-icon">force<wbr>Update<wbr>Skin</a> </li> <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a href="_ui_editor_.nativetimetextbox.html#get" class="tsd-kind-icon">get</a> </li> <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a href="_ui_editor_.nativetimetextbox.html#idsetter" class="tsd-kind-icon">id<wbr>Setter</a> </li> <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a href="_ui_editor_.nativetimetextbox.html#loadskin" class="tsd-kind-icon">load<wbr>Skin</a> </li> <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a href="_ui_editor_.nativetimetextbox.html#mixinproperties" class="tsd-kind-icon">mixin<wbr>Properties</a> </li> <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a href="_ui_editor_.nativetimetextbox.html#mixinrecursive" class="tsd-kind-icon">mixin<wbr>Recursive</a> </li> <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a href="_ui_editor_.nativetimetextbox.html#namesetter" class="tsd-kind-icon">name<wbr>Setter</a> </li> <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-inherited"> <a href="_ui_editor_.nativetimetextbox.html#on" class="tsd-kind-icon">on</a> </li> <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a href="_ui_editor_.nativetimetextbox.html#onupdatedskin" class="tsd-kind-icon">on<wbr>Updated<wbr>Skin</a> </li> <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a href="_ui_editor_.nativetimetextbox.html#own" class="tsd-kind-icon">own</a> </li> <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a href="_ui_editor_.nativetimetextbox.html#registerchildwidget" class="tsd-kind-icon">register<wbr>Child<wbr>Widget</a> </li> <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a href="_ui_editor_.nativetimetextbox.html#remove" class="tsd-kind-icon">remove</a> </li> <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a href="_ui_editor_.nativetimetextbox.html#set" class="tsd-kind-icon">set</a> </li> <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a href="_ui_editor_.nativetimetextbox.html#show" class="tsd-kind-icon">show</a> </li> <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a href="_ui_editor_.nativetimetextbox.html#skinsetter" class="tsd-kind-icon">skin<wbr>Setter</a> </li> <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a href="_ui_editor_.nativetimetextbox.html#startup" class="tsd-kind-icon">startup</a> </li> <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a href="_ui_editor_.nativetimetextbox.html#stylesetter" class="tsd-kind-icon">style<wbr>Setter</a> </li> <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a href="_ui_editor_.nativetimetextbox.html#subscribe" class="tsd-kind-icon">subscribe</a> </li> <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a href="_ui_editor_.nativetimetextbox.html#updateskin" class="tsd-kind-icon">update<wbr>Skin</a> </li> <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a href="_ui_editor_.nativetimetextbox.html#valuegetter" class="tsd-kind-icon">value<wbr>Getter</a> </li> <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a href="_ui_editor_.nativetimetextbox.html#valuesetter" class="tsd-kind-icon">value<wbr>Setter</a> </li> <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a href="_ui_editor_.nativetimetextbox.html#wait" class="tsd-kind-icon">wait</a> </li> <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited"> <a href="_ui_editor_.nativetimetextbox.html#watch" class="tsd-kind-icon">watch</a> </li> <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static"> <a href="_ui_editor_.nativetimetextbox.html#extend" class="tsd-kind-icon">extend</a> </li> <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static"> <a href="_ui_editor_.nativetimetextbox.html#getobject" class="tsd-kind-icon">get<wbr>Object</a> </li> <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static"> <a href="_ui_editor_.nativetimetextbox.html#mixin" class="tsd-kind-icon">mixin</a> </li> </ul> </li> </ul> <ul class="after-current"> </ul> </nav> </div> </div> </div> <footer class="with-border-bottom"> <div class="container"> <h2>Legend</h2> <div class="tsd-legend-group"> <ul class="tsd-legend"> <li class="tsd-kind-module"><span class="tsd-kind-icon">Module</span></li> <li class="tsd-kind-object-literal"><span class="tsd-kind-icon">Object literal</span></li> <li class="tsd-kind-variable"><span class="tsd-kind-icon">Variable</span></li> <li class="tsd-kind-function"><span class="tsd-kind-icon">Function</span></li> <li class="tsd-kind-function tsd-has-type-parameter"><span class="tsd-kind-icon">Function with type parameter</span></li> <li class="tsd-kind-index-signature"><span class="tsd-kind-icon">Index signature</span></li> <li class="tsd-kind-type-alias"><span class="tsd-kind-icon">Type alias</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-enum"><span class="tsd-kind-icon">Enumeration</span></li> <li class="tsd-kind-enum-member"><span class="tsd-kind-icon">Enumeration member</span></li> <li class="tsd-kind-property tsd-parent-kind-enum"><span class="tsd-kind-icon">Property</span></li> <li class="tsd-kind-method tsd-parent-kind-enum"><span class="tsd-kind-icon">Method</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-interface"><span class="tsd-kind-icon">Interface</span></li> <li class="tsd-kind-interface tsd-has-type-parameter"><span class="tsd-kind-icon">Interface with type parameter</span></li> <li class="tsd-kind-constructor tsd-parent-kind-interface"><span class="tsd-kind-icon">Constructor</span></li> <li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li> <li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li> <li class="tsd-kind-index-signature tsd-parent-kind-interface"><span class="tsd-kind-icon">Index signature</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-class"><span class="tsd-kind-icon">Class</span></li> <li class="tsd-kind-class tsd-has-type-parameter"><span class="tsd-kind-icon">Class with type parameter</span></li> <li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li> <li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li> <li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li> <li class="tsd-kind-accessor tsd-parent-kind-class"><span class="tsd-kind-icon">Accessor</span></li> <li class="tsd-kind-index-signature tsd-parent-kind-class"><span class="tsd-kind-icon">Index signature</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited constructor</span></li> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li> <li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited accessor</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected property</span></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected method</span></li> <li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected accessor</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private method</span></li> <li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private accessor</span></li> </ul> <ul class="tsd-legend"> <li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li> <li class="tsd-kind-call-signature tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li> </ul> </div> </div> </footer> <div class="container tsd-generator"> <p>Generated using <a href="http://typedoc.io" target="_blank">TypeDoc</a></p> </div> <div class="overlay"></div> <script src="../assets/js/main.js"></script> <script>if (location.protocol == 'file:') document.write('<script src="../assets/js/search.js"><' + '/script>');</script> </body> </html>
{'content_hash': 'ae75b94d4e1cfbd3302ea5740c8f70a6', 'timestamp': '', 'source': 'github', 'line_count': 1665, 'max_line_length': 751, 'avg_line_length': 63.51831831831832, 'alnum_prop': 0.644811740010212, 'repo_name': 'ninejs/ninejs', 'id': 'a8b3c5a7ad14fd3a4c88970b76cb152d2ba5fd48', 'size': '105758', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'docs/classes/_ui_editor_.nativetimetextbox.html', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '29582'}, {'name': 'HTML', 'bytes': '36322'}, {'name': 'JavaScript', 'bytes': '473382'}, {'name': 'TypeScript', 'bytes': '479939'}]}
import re, datetime import hangups from hangupsbot.utils import word_in_text, text_to_segments from hangupsbot.handlers import handler from .MensaGiessenParser import Menu def find_keyword(kw, text): """Return True if keyword is in text""" if kw == "*": return True elif kw.lower().startswith("regex:") and re.search(kw[6:], text, re.DOTALL | re.IGNORECASE): return True elif word_in_text(kw, text): return True else: return False def find_mensa(text: str): text = text.lower() locs = Menu.available_locations for mensa in locs: for synom in locs[mensa]: if isinstance(synom, list): isIn = True for item in synom: if not re.compile(".*" + item + ".*").match(text): isIn = False break if isIn: return mensa else: if re.compile(".*" + synom + ".*").match(text): return mensa return None def find_date_offset(text: str): if re.compile(".*[üu]bermorgen.*").match(text): return 2 if re.compile(".*morgen.*").match(text): return 1 p = re.compile(".*in\s+?[+-]?(\d+)\s?tagen?.*") m = p.match(text) if m and m.group(1): return int(m.group(1)) return 0 @handler.register(priority=7, event=hangups.ChatMessageEvent) def handle_mensa_question(bot, event): """Handle autoreplies to keywords in messages""" # Test if message is not empty if not event.text: return # Test if autoreplies are enabled if not bot.get_config_suboption(event.conv_id, 'THMensa_enabled'): return # Test if there are actually any autoreplies keyWords = bot.get_config_suboption(event.conv_id, 'THMensa') if not keyWords: return for keyWord in keyWords: if find_keyword(keyWord, event.text): mensa = find_mensa(event.text) if not mensa: yield from event.conv.send_message(text_to_segments("Ich kenne deine Mensa nicht, tut mir leid :(")) return yield from event.conv.send_message(text_to_segments("Einen Moment bitte, ich schaue im Speiseplan nach.")) date_offset = find_date_offset(event.text) s_date = str(datetime.date.today() + datetime.timedelta(days=date_offset)) entries = Menu.parse(location=mensa, date=s_date) if len(entries) == 0: yield from event.conv.send_message(text_to_segments("Hmm... scheinbar hat deine Mensa am **%s** geschlossen, tut mir leid :(" % s_date)) else: yield from event.conv.send_message(text_to_segments("Am **%s** gibt es folgendes: " % s_date)) for entry in entries: image_id = None if entry.image: image_id_list = yield from bot.upload_images([entry.image]) for id in image_id_list: image_id = id break yield from event.conv.send_message(text_to_segments(entry.to_markdown()), image_id=image_id) break
{'content_hash': '22125c3c52b0a1e356a65df1ffa58105', 'timestamp': '', 'source': 'github', 'line_count': 86, 'max_line_length': 140, 'avg_line_length': 31.25581395348837, 'alnum_prop': 0.6793154761904762, 'repo_name': 'hobbypunk90/OurHangupsbotPlugins', 'id': '45c1e9e8617edeb40e317d06a2664205c0954959', 'size': '2689', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'handlers/THMensa.py', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Python', 'bytes': '2689'}]}
/* Includes ------------------------------------------------------------------*/ #include "misc.h" /** @addtogroup STM32F10x_StdPeriph_Driver * @{ */ /** @defgroup MISC * @brief MISC driver modules * @{ */ /** @defgroup MISC_Private_TypesDefinitions * @{ */ /** * @} */ /** @defgroup MISC_Private_Defines * @{ */ #define AIRCR_VECTKEY_MASK ((uint32_t)0x05FA0000) /** * @} */ /** @defgroup MISC_Private_Macros * @{ */ /** * @} */ /** @defgroup MISC_Private_Variables * @{ */ /** * @} */ /** @defgroup MISC_Private_FunctionPrototypes * @{ */ /** * @} */ /** @defgroup MISC_Private_Functions * @{ */ /** * @brief Configures the priority grouping: pre-emption priority and subpriority. * @param NVIC_PriorityGroup: specifies the priority grouping bits length. * This parameter can be one of the following values: * @arg NVIC_PriorityGroup_0: 0 bits for pre-emption priority * 4 bits for subpriority * @arg NVIC_PriorityGroup_1: 1 bits for pre-emption priority * 3 bits for subpriority * @arg NVIC_PriorityGroup_2: 2 bits for pre-emption priority * 2 bits for subpriority * @arg NVIC_PriorityGroup_3: 3 bits for pre-emption priority * 1 bits for subpriority * @arg NVIC_PriorityGroup_4: 4 bits for pre-emption priority * 0 bits for subpriority * @retval None */ void NVIC_PriorityGroupConfig(uint32_t NVIC_PriorityGroup) { /* Check the parameters */ assert_param(IS_NVIC_PRIORITY_GROUP(NVIC_PriorityGroup)); /* Set the PRIGROUP[10:8] bits according to NVIC_PriorityGroup value */ SCB->AIRCR = AIRCR_VECTKEY_MASK | NVIC_PriorityGroup; } /** * @brief Initializes the NVIC peripheral according to the specified * parameters in the NVIC_InitStruct. * @param NVIC_InitStruct: pointer to a NVIC_InitTypeDef structure that contains * the configuration information for the specified NVIC peripheral. * @retval None */ void NVIC_Init(NVIC_InitTypeDef* NVIC_InitStruct) { uint32_t tmppriority = 0x00, tmppre = 0x00, tmpsub = 0x0F; /* Check the parameters */ assert_param(IS_FUNCTIONAL_STATE(NVIC_InitStruct->NVIC_IRQChannelCmd)); assert_param(IS_NVIC_PREEMPTION_PRIORITY(NVIC_InitStruct->NVIC_IRQChannelPreemptionPriority)); assert_param(IS_NVIC_SUB_PRIORITY(NVIC_InitStruct->NVIC_IRQChannelSubPriority)); if (NVIC_InitStruct->NVIC_IRQChannelCmd != DISABLE) { /* Compute the Corresponding IRQ Priority --------------------------------*/ tmppriority = (0x700 - ((SCB->AIRCR) & (uint32_t)0x700))>> 0x08; tmppre = (0x4 - tmppriority); tmpsub = tmpsub >> tmppriority; tmppriority = (uint32_t)NVIC_InitStruct->NVIC_IRQChannelPreemptionPriority << tmppre; tmppriority |= NVIC_InitStruct->NVIC_IRQChannelSubPriority & tmpsub; tmppriority = tmppriority << 0x04; NVIC->IP[NVIC_InitStruct->NVIC_IRQChannel] = tmppriority; /* Enable the Selected IRQ Channels --------------------------------------*/ NVIC->ISER[NVIC_InitStruct->NVIC_IRQChannel >> 0x05] = (uint32_t)0x01 << (NVIC_InitStruct->NVIC_IRQChannel & (uint8_t)0x1F); } else { /* Disable the Selected IRQ Channels -------------------------------------*/ NVIC->ICER[NVIC_InitStruct->NVIC_IRQChannel >> 0x05] = (uint32_t)0x01 << (NVIC_InitStruct->NVIC_IRQChannel & (uint8_t)0x1F); } } /** * @brief Sets the vector table location and Offset. * @param NVIC_VectTab: specifies if the vector table is in RAM or FLASH memory. * This parameter can be one of the following values: * @arg NVIC_VectTab_RAM * @arg NVIC_VectTab_FLASH * @param Offset: Vector Table base offset field. This value must be a multiple of 0x100. * @retval None */ void NVIC_SetVectorTable(uint32_t NVIC_VectTab, uint32_t Offset) { /* Check the parameters */ assert_param(IS_NVIC_VECTTAB(NVIC_VectTab)); assert_param(IS_NVIC_OFFSET(Offset)); SCB->VTOR = NVIC_VectTab | (Offset & (uint32_t)0x1FFFFF80); } /** * @brief Selects the condition for the system to enter low power mode. * @param LowPowerMode: Specifies the new mode for the system to enter low power mode. * This parameter can be one of the following values: * @arg NVIC_LP_SEVONPEND * @arg NVIC_LP_SLEEPDEEP * @arg NVIC_LP_SLEEPONEXIT * @param NewState: new state of LP condition. This parameter can be: ENABLE or DISABLE. * @retval None */ void NVIC_SystemLPConfig(uint8_t LowPowerMode, FunctionalState NewState) { /* Check the parameters */ assert_param(IS_NVIC_LP(LowPowerMode)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) { SCB->SCR |= LowPowerMode; } else { SCB->SCR &= (uint32_t)(~(uint32_t)LowPowerMode); } } /** * @brief Configures the SysTick clock source. * @param SysTick_CLKSource: specifies the SysTick clock source. * This parameter can be one of the following values: * @arg SysTick_CLKSource_HCLK_Div8: AHB clock divided by 8 selected as SysTick clock source. * @arg SysTick_CLKSource_HCLK: AHB clock selected as SysTick clock source. * @retval None */ void SysTick_CLKSourceConfig(uint32_t SysTick_CLKSource) { /* Check the parameters */ assert_param(IS_SYSTICK_CLK_SOURCE(SysTick_CLKSource)); if (SysTick_CLKSource == SysTick_CLKSource_HCLK) { SysTick->CTRL |= SysTick_CLKSource_HCLK; } else { SysTick->CTRL &= SysTick_CLKSource_HCLK_Div8; } } /** * @} */ /** * @} */ /** * @} */ /******************* (C) COPYRIGHT 2009 STMicroelectronics *****END OF FILE****/
{'content_hash': 'ad1ccea45221ac39a4a7796b667dd449', 'timestamp': '', 'source': 'github', 'line_count': 204, 'max_line_length': 98, 'avg_line_length': 28.274509803921568, 'alnum_prop': 0.6274271844660194, 'repo_name': 'rijn/HardwareWorks', 'id': '764fa723398b3989237e5bad243f4c4ed28dfa96', 'size': '6708', 'binary': False, 'copies': '6', 'ref': 'refs/heads/master', 'path': 'PJ12 - Sensor/firmware/lib/STM32F10x_StdPeriph_Driver/src/misc.c', 'mode': '33261', 'license': 'mit', 'language': [{'name': 'Assembly', 'bytes': '3299846'}, {'name': 'C', 'bytes': '29242313'}, {'name': 'C++', 'bytes': '1663024'}, {'name': 'Eagle', 'bytes': '8376241'}, {'name': 'HTML', 'bytes': '1338780'}, {'name': 'Makefile', 'bytes': '191168'}, {'name': 'Objective-C', 'bytes': '110935'}, {'name': 'Python', 'bytes': '38927'}, {'name': 'Shell', 'bytes': '3094'}]}
/* Diff preferences */ #prefs fieldset { margin: 1em .5em .5em; padding: .5em 1em 0 } /* Diff/change overview */ #overview { line-height: 130%; margin-top: 1em; padding: .5em .5em .5em 0 } #overview dt.property { clear: left; float: left; font-weight: bold; text-align: right; width: 7.75em; } #overview dd { margin-left: 8.5em } #overview .message { padding: 1em 0 1px } #overview dd.message p, #overview dd.message ul, #overview dd.message ol, #overview dd.message pre { margin-bottom: 1em; margin-top: 0; } /* Colors for change types */ .chglist .edit, #overview .mod, .diff .legend .mod { background: #fd8 } .chglist .delete, #overview .rem, .diff .legend .rem { background: #f88 } .chglist .add, #overview .add, .diff .legend .add { background: #bfb } .chglist .copy, #overview .cp, .diff .legend .cp { background: #88f } .chglist .move, #overview .mv, .diff .legend .mv { background: #ccc } .chglist .unknown { background: #fff } /* Legend for diff and file colors */ .legend { font-size: 9px; line-height: 1em; padding: .5em 0; } .legend h3 { display: none; } .legend dt { background: #fff; border: 1px solid #999; float: left; margin: .1em .5em .1em 0; overflow: hidden; width: .8em; height: .8em; } .legend dl { display: inline; padding: 0; margin: 0; margin-right: .5em; } .legend dd { display: inline; float: left; padding: 0; margin: 0; margin-right: 2em; } #diff-legend { float: left; clear: right; margin: 1em .5em; } #file-legend dd { margin-left: 0; } /* Styles for the list of diffs */ .diff ul.entries { clear: both; margin: 0; padding: 0 } .diff li.entry { background: #f7f7f7; border: 1px solid #d7d7d7; list-style-type: none; margin: 0 0 2em; padding: 2px; position: relative; width: 100%; } .diff h2 { color: #333; font-size: 14px; letter-spacing: normal; margin: 0 auto; padding: .1em 0 .25em .5em; } .diff h2 .switch { color: #999; float: right; font-size: 75%; line-height: 1.6; } .diff h2 .switch span { border-left: 1px solid #ccc; cursor: pointer; padding: 0 1em; } .diff h2 .switch span:first-child { border: none; } .diff h2 .switch span.active { color: #333; cursor: default; } /* Styles for the actual diff tables (side-by-side and inline) */ .diff table.trac-diff { border: 1px solid #ddd; border-spacing: 0; border-top: 0; empty-cells: show; font-size: 12px; line-height: 130%; padding: 0; margin: 0 auto; table-layout: fixed; width: 100%; } .diff table.trac-diff col.lineno { width: 4em } .diff table.trac-diff th { border-right: 1px solid #d7d7d7; border-bottom: 1px solid #998; font-size: 11px; } .diff table.trac-diff thead th { background: #eee; border-top: 1px solid #d7d7d7; color: #999; padding: 0 .25em; text-align: center; white-space: nowrap; } .diff table.trac-diff tbody th { background: #eed; color: #886; font-weight: normal; padding: 0 .5em; text-align: right; vertical-align: top; } .diff table.trac-diff td { background: #fff; font: normal 11px monospace; overflow: visible; padding: 1px 2px; vertical-align: top; } .diff table.trac-diff tbody tr:hover td { background: #eed; } .diff table.trac-diff tbody.mod tr:hover td, .diff table.trac-diff tbody.add tr:hover td, .diff table.trac-diff tbody.rem tr:hover td { background: #ddc; } .diff table.trac-diff tbody.mod tr:hover td del, .diff table.trac-diff tbody.mod tr:hover td ins { background: #bb9; } .diff table.trac-diff tbody.skipped td, .diff table.trac-diff thead td { background: #f7f7f7; border: 1px solid #d7d7d7; } .diff td ins, .diff td del {text-decoration: none;} /* Styles for the inline diff */ pre.diff .rem { background: #fdd; } pre.diff .add { background: #dfd; } .diff table.inline tbody.mod td.l, .diff table.inline tbody.rem td.l { background: #fdd; border-color: #c00; border-style: solid; border-width: 0 1px 0 1px; } .diff table.inline tbody.mod td.r, .diff table.inline tbody.add td.r { background: #dfd; border-color: #0a0; border-style: solid; border-width: 0 1px 0 1px; } .diff table.inline tbody.mod tr.first td.l, .diff table.inline tbody.rem tr.first td.l { border-top-width: 1px } .diff table.inline tbody.mod tr.last td.l, .diff table.inline tbody.rem tr.last td.l { border-bottom-width: 1px } .diff table.inline tbody.mod tr.first td.r, .diff table.inline tbody.add tr.first td.r { border-top-width: 1px } .diff table.inline tbody.mod tr.last td.r, .diff table.inline tbody.add tr.last td.r { border-bottom-width: 1px } .diff table.inline tbody.mod td del { background: #e99; color: #000; } .diff table.inline tbody.mod td ins { background: #9e9; color: #000; } /* Styles for the side-by-side diff */ .diff table.sidebyside colgroup.content { width: 50% } .diff table.sidebyside tbody.mod td.l { background: #fe9 } .diff table.sidebyside tbody.mod td.r { background: #fd8 } .diff table.sidebyside tbody.add td.l { background: #dfd } .diff table.sidebyside tbody.add td.r { background: #cfc } .diff table.sidebyside tbody.rem td.l { background: #f88 } .diff table.sidebyside tbody.rem td.r { background: #faa } .diff table.sidebyside tbody.mod del, .diff table.sidebyside tbody.mod ins { background: #fc0; } /* Styles for the plain-text diff view */ .diff pre { background: #fff; border: 1px solid #ddd; font-size: 85%; margin: 0; } /* Styles for the property diffs */ .diff table.props td { padding: 2px 0.5em }
{'content_hash': '38b8784e53dbe4d1dc86aaaac706e825', 'timestamp': '', 'source': 'github', 'line_count': 202, 'max_line_length': 76, 'avg_line_length': 26.504950495049506, 'alnum_prop': 0.6862159133358237, 'repo_name': 'jun66j5/trac-ja', 'id': 'eaa2756ef623521d7f6d1068cca95356ec7c8285', 'size': '5354', 'binary': False, 'copies': '3', 'ref': 'refs/heads/trac-ja/1.0.2', 'path': 'trac/htdocs/css/diff.css', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'C#', 'bytes': '11618'}, {'name': 'JavaScript', 'bytes': '52431'}, {'name': 'Python', 'bytes': '2570150'}, {'name': 'Shell', 'bytes': '11226'}]}
local function upgrade_v6_to_v7() end
{'content_hash': 'b2e9f2281fd73e770a7f6b2d883bedf3', 'timestamp': '', 'source': 'github', 'line_count': 3, 'max_line_length': 33, 'avg_line_length': 13.0, 'alnum_prop': 0.7435897435897436, 'repo_name': 'mhenrixon/sidekiq-unique-jobs', 'id': '28d69805b609714728aecebdbb1261f35dc05ac1', 'size': '39', 'binary': False, 'copies': '1', 'ref': 'refs/heads/main', 'path': 'lib/sidekiq_unique_jobs/lua/shared/_upgrades.lua', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '686'}, {'name': 'Dockerfile', 'bytes': '736'}, {'name': 'HTML', 'bytes': '12439'}, {'name': 'JavaScript', 'bytes': '661'}, {'name': 'Lua', 'bytes': '29943'}, {'name': 'Procfile', 'bytes': '145'}, {'name': 'Ruby', 'bytes': '579791'}, {'name': 'Shell', 'bytes': '4429'}, {'name': 'Slim', 'bytes': '260'}]}
package mujava.op.basic; import mujava.op.util.TraditionalMutantCodeWriter; import openjava.ptree.*; import java.io.*; /** * <p>Output and log LOI mutants to files </p> * @author Yu-Seung Ma * @version 1.0 */ public class LOI_Writer extends TraditionalMutantCodeWriter { Variable original_var; FieldAccess original_field; public LOI_Writer( String file_name, PrintWriter out ) { super(file_name, out); } /** * Set original source code * @param exp1 */ public void setMutant(Variable exp1) { original_var = exp1; } /** * Set original source code * @param exp1 */ public void setMutant(FieldAccess exp1) { original_field = exp1; } /** * Log mutated line */ public void visit( Variable p ) throws ParseTreeException { if (isSameObject(p, original_var)) { out.print("~"+p.toString()); // ----------------------------------------------------------- mutated_line = line_num; String log_str = p.toString() + " => " + "~"+p.toString(); writeLog(removeNewline(log_str)); // ------------------------------------------------------------- } else { super.visit(p); } } /** * Log mutated line */ public void visit( FieldAccess p ) throws ParseTreeException { if (isSameObject(p, original_field)) { out.print("~" + p.toString()); // ----------------------------------------------------------- mutated_line = line_num; String log_str = p.toString() + " => " + "~"+p.toString(); writeLog(removeNewline(log_str)); // ------------------------------------------------------------- } else { super.visit(p); } } }
{'content_hash': 'ac94a580298a347a6dce0b69c315932a', 'timestamp': '', 'source': 'github', 'line_count': 83, 'max_line_length': 73, 'avg_line_length': 22.06024096385542, 'alnum_prop': 0.4691425450573457, 'repo_name': 'vrthra/muJava', 'id': '3168c8f90177c1cac77fbf96cf62a19394475d82', 'size': '2447', 'binary': False, 'copies': '4', 'ref': 'refs/heads/master', 'path': 'src/mujava/op/basic/LOI_Writer.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Java', 'bytes': '1197185'}, {'name': 'Shell', 'bytes': '129'}]}
from joblib import Parallel, delayed from sklearn import cross_validation from sklearn.grid_search import GridSearchCV from sknn.mlp import Classifier, Layer import data_util as util import matplotlib.pyplot as plt import numpy as np bc_data_train, bc_data_test, bc_target_train, bc_target_test = util.load_breast_cancer() v_data_train, v_data_test, v_target_train, v_target_test = util.load_vowel() PORTIONS = np.arange(.1, 1.1, .1) ITERATIONS = [1, 5, 10, 50, 100, 150, 200] ITERATIONS.extend(np.arange(250, 20250, 250)) def ann_n_iter(): print "n_iter" print "---v---" Parallel(n_jobs=-1)( delayed(_ann_n_iter)( v_data_train, v_data_test, v_target_train, v_target_test, n_iter) for n_iter in ITERATIONS if n_iter < 2500) print "---bc---" Parallel(n_jobs=-1)( delayed(_ann_n_iter)( bc_data_train, bc_data_test, bc_target_train, bc_target_test, n_iter) for n_iter in ITERATIONS) def _ann_n_iter(data, data_test, target, target_test, n_iter): nn = Classifier( layers=[ Layer("Sigmoid", units=100), Layer("Softmax")], n_iter=n_iter) train_score = np.mean(cross_validation.cross_val_score(nn, data, target, cv=10)) nn.fit(data, target) test_score = nn.score(data_test, target_test) print n_iter, train_score, test_score def ann_train_size(): print "train_size" print "---v---" Parallel(n_jobs=-1)( delayed(_ann_train_size)( v_data_train, v_data_test, v_target_train, v_target_test, train_size) for train_size in PORTIONS) print "---bc---" Parallel(n_jobs=-1)( delayed(_ann_train_size)( bc_data_train, bc_data_test, bc_target_train, bc_target_test, train_size) for train_size in PORTIONS) def _ann_train_size(data, data_test, target, target_test, train_size): nn = Classifier( layers=[ Layer("Sigmoid", units=100), Layer("Softmax")]) if train_size < 1: X_train, _, y_train, _ = cross_validation.train_test_split( data, target, train_size=train_size, stratify=target) else: X_train, y_train = data, target nn.fit(X_train, y_train) train_score = nn.score(X_train, y_train) test_score = nn.score(data_test, target_test) print train_size, train_score, test_score if __name__ == "__main__": ann_train_size() ann_n_iter()
{'content_hash': '21798b5e04fbea0b24b56bb9efd594cb', 'timestamp': '', 'source': 'github', 'line_count': 86, 'max_line_length': 88, 'avg_line_length': 30.13953488372093, 'alnum_prop': 0.5802469135802469, 'repo_name': 'jessrosenfield/supervised_learning', 'id': '54b25e33ff2d40ede79faae1de6d9c64a3c9f677', 'size': '2592', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'ann.py', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'Python', 'bytes': '14436'}]}
(function () { 'use strict'; var Extension = require('./extension'), ParseError = require('./extensionParseError'); var BrContent = Extension.create({ parseNode: function parseNode(node) { return node.block; } }); module.exports = BrContent; }());
{'content_hash': '7eed3734053c4d6c1ab15330dbef5039', 'timestamp': '', 'source': 'github', 'line_count': 14, 'max_line_length': 54, 'avg_line_length': 21.928571428571427, 'alnum_prop': 0.5700325732899023, 'repo_name': 'bitjutsu/Braces', 'id': '4034afa8b8e161fc79e8117f4a40cc8a076cefab', 'size': '307', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'extensions/br-content.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'JavaScript', 'bytes': '21044'}]}
package com.facebook.buck.android; import com.facebook.buck.jvm.java.JavaLibrary; import com.facebook.buck.rules.BuildRule; import com.facebook.buck.rules.SourcePath; import com.facebook.buck.util.immutables.BuckStyleImmutable; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.collect.ImmutableSortedSet; import java.util.Optional; import org.immutables.value.Value; @Value.Immutable @BuckStyleImmutable interface AbstractAndroidGraphEnhancementResult { AndroidPackageableCollection getPackageableCollection(); Optional<ImmutableMap<APKModule, CopyNativeLibraries>> getCopyNativeLibraries(); Optional<PackageStringAssets> getPackageStringAssets(); Optional<PreDexMerge> getPreDexMerge(); Optional<ComputeExopackageDepsAbi> getComputeExopackageDepsAbi(); ImmutableList<SourcePath> getProguardConfigs(); Optional<Boolean> getPackageAssetLibraries(); SourcePath getPrimaryResourcesApkPath(); ImmutableList<SourcePath> getPrimaryApkAssetZips(); ImmutableList<SourcePath> getExoResources(); /** * Compiled R.java for use by ProGuard. This should go away if/when we create a separate rule for * ProGuard. */ JavaLibrary getCompiledUberRDotJava(); /** * This includes everything from the corresponding {@link * AndroidPackageableCollection#getClasspathEntriesToDex}, and may include additional entries due * to {@link AndroidBuildConfig}s (or R.java, in the future). */ ImmutableSet<SourcePath> getClasspathEntriesToDex(); SourcePath getAndroidManifestPath(); SourcePath getSourcePathToAaptGeneratedProguardConfigFile(); ImmutableSortedSet<BuildRule> getFinalDeps(); APKModuleGraph getAPKModuleGraph(); }
{'content_hash': 'c733aa267cdd402256b351b20af2e0e4', 'timestamp': '', 'source': 'github', 'line_count': 59, 'max_line_length': 99, 'avg_line_length': 30.372881355932204, 'alnum_prop': 0.8063616071428571, 'repo_name': 'marcinkwiatkowski/buck', 'id': 'eab2b3fc9d3ca554e0f7fe35cf6df750e0c0ad68', 'size': '2397', 'binary': False, 'copies': '3', 'ref': 'refs/heads/master', 'path': 'src/com/facebook/buck/android/AbstractAndroidGraphEnhancementResult.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Assembly', 'bytes': '793'}, {'name': 'Batchfile', 'bytes': '2093'}, {'name': 'C', 'bytes': '256972'}, {'name': 'C#', 'bytes': '237'}, {'name': 'C++', 'bytes': '11350'}, {'name': 'CSS', 'bytes': '54863'}, {'name': 'D', 'bytes': '1017'}, {'name': 'Go', 'bytes': '16819'}, {'name': 'Groovy', 'bytes': '3362'}, {'name': 'HTML', 'bytes': '8740'}, {'name': 'Haskell', 'bytes': '971'}, {'name': 'IDL', 'bytes': '385'}, {'name': 'Java', 'bytes': '20429303'}, {'name': 'JavaScript', 'bytes': '934020'}, {'name': 'Kotlin', 'bytes': '2396'}, {'name': 'Lex', 'bytes': '2731'}, {'name': 'Makefile', 'bytes': '1816'}, {'name': 'Matlab', 'bytes': '47'}, {'name': 'OCaml', 'bytes': '4384'}, {'name': 'Objective-C', 'bytes': '138399'}, {'name': 'Objective-C++', 'bytes': '34'}, {'name': 'PowerShell', 'bytes': '244'}, {'name': 'Prolog', 'bytes': '858'}, {'name': 'Python', 'bytes': '1804683'}, {'name': 'Roff', 'bytes': '1109'}, {'name': 'Rust', 'bytes': '3618'}, {'name': 'Scala', 'bytes': '4906'}, {'name': 'Shell', 'bytes': '50443'}, {'name': 'Smalltalk', 'bytes': '3495'}, {'name': 'Standard ML', 'bytes': '15'}, {'name': 'Swift', 'bytes': '6947'}, {'name': 'Thrift', 'bytes': '27738'}, {'name': 'Yacc', 'bytes': '323'}]}
const geocoding = { apiKey: '', baseUrl: 'http://google.com/maps', }; export default geocoding;
{'content_hash': '3c4d1838d6915fd053ad80f440e4def0', 'timestamp': '', 'source': 'github', 'line_count': 6, 'max_line_length': 36, 'avg_line_length': 16.833333333333332, 'alnum_prop': 0.6534653465346535, 'repo_name': 'yarikgenza/WhereToGo-Lviv', 'id': 'b7252d9f2bb34f310a903a2312e69c7ad72b249d', 'size': '101', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/Config/geocoding.config.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Java', 'bytes': '1409'}, {'name': 'JavaScript', 'bytes': '141118'}, {'name': 'Objective-C', 'bytes': '4425'}, {'name': 'Python', 'bytes': '1728'}]}
'use strict'; module.exports = function(options) { if (!options.test) { var ssl = options.ssl ? '?ssl=true' : ''; return `${options.DATABASE_URL}${ssl}`; } // This configuration works on Travis CI. It's also straightforward to setup // locally. Just make sure that a superuser named `postgres` exists: // `createuser -s postgres` else { return { host: 'localhost', user: 'postgres', database: 'api_pls_test_db', password: undefined }; } };
{'content_hash': '2e66e9f418929068e00f559a90f648c3', 'timestamp': '', 'source': 'github', 'line_count': 20, 'max_line_length': 78, 'avg_line_length': 24.8, 'alnum_prop': 0.6129032258064516, 'repo_name': 'jmeas/api-pls', 'id': '6142d24e24c89025fdc6d54c012467e331fb7ba2', 'size': '496', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'packages/api-pls-postgres-adapter/database/config.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'JavaScript', 'bytes': '239907'}, {'name': 'PLpgSQL', 'bytes': '211'}]}
package eu.bcvsolutions.idm.core.security.api.domain; import java.util.List; /** * Group permission could contain {@link BasePermission}. * * @author Radek Tomiška */ public interface GroupPermission extends BasePermission { List<BasePermission> getPermissions(); }
{'content_hash': '2d55722d7822e5340fcb24623df185c8', 'timestamp': '', 'source': 'github', 'line_count': 13, 'max_line_length': 58, 'avg_line_length': 21.23076923076923, 'alnum_prop': 0.7572463768115942, 'repo_name': 'bcvsolutions/CzechIdMng', 'id': '6b391dac27c3aeb46e8ce5853e72c15024cbc4cc', 'size': '277', 'binary': False, 'copies': '1', 'ref': 'refs/heads/develop', 'path': 'Realization/backend/core/core-api/src/main/java/eu/bcvsolutions/idm/core/security/api/domain/GroupPermission.java', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '20553'}, {'name': 'HTML', 'bytes': '1826'}, {'name': 'Java', 'bytes': '17776464'}, {'name': 'JavaScript', 'bytes': '4985617'}, {'name': 'Less', 'bytes': '56975'}, {'name': 'Shell', 'bytes': '2793'}, {'name': 'TSQL', 'bytes': '114398'}]}
module QuadraticEquationSpec where import Test.Hspec import QuadraticEquation main :: IO () main = hspec $ do describe "equationRoots" $ do context "when equation has non-complex solution" $ do it "returns two roots of equation" $ do equationRoots (QEquation 1.0 5.0 6.0) `shouldBe` [-2.0, -3.0] describe "substituteUnknown" $ do it "substitutes x with the specified value" $ do substituteUnknown (QEquation 1.0 5.0 6.0) (-3.0) `shouldBe` 0.0 describe "naturalRoots" $ do it "returns roots only if they are natural numbers" $ do naturalRoots (QEquation 0.5 0.5 (-40755.0)) `shouldBe` [285]
{'content_hash': '37eae4c6128afc30322c650a13f760e8', 'timestamp': '', 'source': 'github', 'line_count': 19, 'max_line_length': 69, 'avg_line_length': 33.578947368421055, 'alnum_prop': 0.6833855799373041, 'repo_name': 'kliuchnikau/project-euler', 'id': '7abbc693778f3e8bf0d34e96623457fc7ab41268', 'size': '638', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'lib/QuadraticEquationSpec.hs', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Haskell', 'bytes': '45940'}]}
import mimetypes from django.http import HttpResponse from django import shortcuts from sample import models def serve_mongo_download(request, mongo_id): obj = shortcuts.get_object_or_404(models.SampleModel, content=mongo_id) return get_mongo_response(obj.content) def get_mongo_response(file_object, chunks=10000): """ Prepares a Django HttpResponse to deliver the stored file. parameters: - file_object: the file object from our model's MongoFileField. (ie. model.content in the sample models included) - chunks: how big of chunk size to read and deliver the file """ mimetype, encoding = mimetypes.guess_type(file_object.file_name) mimetype = mimetype or 'application/octet-stream' response = HttpResponse(file_object.chunks(chunks), mimetype=mimetype) response['Content-Length'] = file_object.size response['Content-Disposition'] = "inline; filename = %s; " % file_object.file_name if encoding: response['Content-Encoding'] = encoding return response
{'content_hash': '08a2baa8c070e5624f5f3cd8222faa82', 'timestamp': '', 'source': 'github', 'line_count': 29, 'max_line_length': 87, 'avg_line_length': 36.206896551724135, 'alnum_prop': 0.7152380952380952, 'repo_name': 'madisona/django-mongo-storage', 'id': 'eebe2d146596451479ee87cb93bc865187bfd5b4', 'size': '1077', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'sample/views.py', 'mode': '33188', 'license': 'bsd-2-clause', 'language': [{'name': 'Python', 'bytes': '20876'}]}
import Inferno from 'inferno' import createElement from 'inferno-create-element' import Component from 'inferno-component' import ContainerFactory from './Container' import StateContainerFactory from './StateContainer' import HocFactory from './Hoc' import connectFactory, { decoratorFactory } from './connect' Inferno.createElement = createElement Inferno.Component = Component export const Container = ContainerFactory(Inferno) export const StateContainer = StateContainerFactory(Inferno) export const connect = connectFactory(HocFactory(Inferno)) export const decorator = decoratorFactory(HocFactory(Inferno))
{'content_hash': '88ddec37e54952a3c9a74bf079b85ac4', 'timestamp': '', 'source': 'github', 'line_count': 15, 'max_line_length': 62, 'avg_line_length': 41.0, 'alnum_prop': 0.8260162601626017, 'repo_name': 'FWeinb/cerebral', 'id': '90e2063acb9cd9261e13b23099dfa978866ca3fb', 'size': '615', 'binary': False, 'copies': '3', 'ref': 'refs/heads/master', 'path': 'packages/cerebral/src/viewFactories/inferno.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '29368'}, {'name': 'HTML', 'bytes': '25398'}, {'name': 'JavaScript', 'bytes': '660063'}]}
using System.Collections.Generic; using System.Collections.ObjectModel; namespace SalesApp.Web.Areas.HelpPage.ModelDescriptions { public class EnumTypeModelDescription : ModelDescription { public EnumTypeModelDescription() { Values = new Collection<EnumValueDescription>(); } public Collection<EnumValueDescription> Values { get; private set; } } }
{'content_hash': '984525f67af47fbd21ccc93a9eaf121d', 'timestamp': '', 'source': 'github', 'line_count': 15, 'max_line_length': 76, 'avg_line_length': 28.0, 'alnum_prop': 0.6833333333333333, 'repo_name': 'huanlin/Examples', 'id': 'dcfd80701b5ca57fb66dd414a7c799794adaf725', 'size': '420', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'DotNet/Web/CQRS Demo/SalesApp.Web/Areas/HelpPage/ModelDescriptions/EnumTypeModelDescription.cs', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'ASP.NET', 'bytes': '7864'}, {'name': 'C', 'bytes': '7229'}, {'name': 'C#', 'bytes': '815053'}, {'name': 'C++', 'bytes': '360577'}, {'name': 'CSS', 'bytes': '27580'}, {'name': 'HTML', 'bytes': '65651'}, {'name': 'JavaScript', 'bytes': '4859624'}, {'name': 'Pascal', 'bytes': '38856'}, {'name': 'Pawn', 'bytes': '911'}, {'name': 'PowerShell', 'bytes': '846'}, {'name': 'QMake', 'bytes': '7744'}, {'name': 'Ruby', 'bytes': '5958'}, {'name': 'VBA', 'bytes': '5920'}]}
package com.navercorp.pinpoint.web.alarm.checker; import static org.junit.Assert.*; import java.util.LinkedList; import java.util.List; import org.junit.BeforeClass; import org.junit.Test; import com.navercorp.pinpoint.common.bo.AgentStatCpuLoadBo; import com.navercorp.pinpoint.common.bo.AgentStatMemoryGcBo; import com.navercorp.pinpoint.common.trace.ServiceType; import com.navercorp.pinpoint.web.alarm.CheckerCategory; import com.navercorp.pinpoint.web.alarm.DataCollectorFactory; import com.navercorp.pinpoint.web.alarm.DataCollectorFactory.DataCollectorCategory; import com.navercorp.pinpoint.web.alarm.checker.AgentChecker; import com.navercorp.pinpoint.web.alarm.checker.GcCountChecker; import com.navercorp.pinpoint.web.alarm.collector.AgentStatDataCollector; import com.navercorp.pinpoint.web.alarm.vo.Rule; import com.navercorp.pinpoint.web.dao.AgentStatDao; import com.navercorp.pinpoint.web.dao.ApplicationIndexDao; import com.navercorp.pinpoint.web.vo.AgentStat; import com.navercorp.pinpoint.web.vo.Application; import com.navercorp.pinpoint.web.vo.Range; public class GcCountCheckerTest { private static final String SERVICE_NAME = "local_service"; private static final String SERVICE_TYPE = "tomcat"; private static ApplicationIndexDao applicationIndexDao; private static AgentStatDao agentStatDao; @BeforeClass public static void before() { agentStatDao = new AgentStatDao() { @Override public List<AgentStat> scanAgentStatList(String agentId, Range range) { List<AgentStat> AgentStatList = new LinkedList<AgentStat>(); for (int i = 36; i > 0; i--) { AgentStatMemoryGcBo.Builder memoryBuilder = new AgentStatMemoryGcBo.Builder("AGETNT_NAME", 0L, 1L); memoryBuilder.jvmGcOldCount(i); AgentStatMemoryGcBo memoryBo = memoryBuilder.build(); AgentStatCpuLoadBo.Builder cpuBuilder = new AgentStatCpuLoadBo.Builder("AGETNT_NAME", 0L, 1L); AgentStatCpuLoadBo cpuLoadBo = cpuBuilder.build(); AgentStat stat = new AgentStat(); stat.setMemoryGc(memoryBo); stat.setCpuLoad(cpuLoadBo); AgentStatList.add(stat); } return AgentStatList; } }; applicationIndexDao = new ApplicationIndexDao() { @Override public List<Application> selectAllApplicationNames() { throw new UnsupportedOperationException(); } @Override public List<String> selectAgentIds(String applicationName) { if (SERVICE_NAME.equals(applicationName)) { List<String> agentIds = new LinkedList<String>(); agentIds.add("local_tomcat"); return agentIds; } throw new IllegalArgumentException(); } @Override public void deleteApplicationName(String applicationName) { throw new UnsupportedOperationException(); } @Override public void deleteAgentId(String applicationName, String agentId) { throw new UnsupportedOperationException(); } }; } @Test public void checkTest1() { Rule rule = new Rule(SERVICE_NAME, SERVICE_TYPE, CheckerCategory.GC_COUNT.getName(), 35, "testGroup", false, false, ""); Application application = new Application(SERVICE_NAME, ServiceType.STAND_ALONE); AgentStatDataCollector collector = new AgentStatDataCollector(DataCollectorCategory.AGENT_STAT, application, agentStatDao, applicationIndexDao, System.currentTimeMillis(), DataCollectorFactory.SLOT_INTERVAL_FIVE_MIN); AgentChecker checker = new GcCountChecker(collector, rule); checker.check(); assertTrue(checker.isDetected()); } @Test public void checkTest2() { Rule rule = new Rule(SERVICE_NAME, SERVICE_TYPE, CheckerCategory.GC_COUNT.getName(), 36, "testGroup", false, false, ""); Application application = new Application(SERVICE_NAME, ServiceType.STAND_ALONE); AgentStatDataCollector collector = new AgentStatDataCollector(DataCollectorCategory.AGENT_STAT, application, agentStatDao, applicationIndexDao, System.currentTimeMillis(), DataCollectorFactory.SLOT_INTERVAL_FIVE_MIN); AgentChecker checker = new GcCountChecker(collector, rule); checker.check(); assertFalse(checker.isDetected()); } }
{'content_hash': 'ecc2d8dd8ec64cdf36d6c65b09ae4890', 'timestamp': '', 'source': 'github', 'line_count': 119, 'max_line_length': 225, 'avg_line_length': 41.075630252100844, 'alnum_prop': 0.640139116202946, 'repo_name': 'shuvigoss/pinpoint', 'id': '42203bfc80a0d7ff917d1bf410cff9e8e27a532d', 'size': '5496', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'web/src/test/java/com/navercorp/pinpoint/web/alarm/checker/GcCountCheckerTest.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Batchfile', 'bytes': '27977'}, {'name': 'CSS', 'bytes': '175616'}, {'name': 'CoffeeScript', 'bytes': '10124'}, {'name': 'Groovy', 'bytes': '1423'}, {'name': 'HTML', 'bytes': '1004716'}, {'name': 'Java', 'bytes': '6117249'}, {'name': 'JavaScript', 'bytes': '3322406'}, {'name': 'Makefile', 'bytes': '15427'}, {'name': 'Python', 'bytes': '11423'}, {'name': 'Ruby', 'bytes': '943'}, {'name': 'Shell', 'bytes': '29813'}, {'name': 'Thrift', 'bytes': '6069'}]}
package order import ( "encoding/xml" "errors" "github.com/silenceper/wechat/v2/pay/notify" "github.com/silenceper/wechat/v2/util" ) var queryGateway = "https://api.mch.weixin.qq.com/pay/orderquery" // QueryParams 传入的参数 type QueryParams struct { OutTradeNo string // 商户订单号 SignType string // 签名类型 TransactionID string // 微信订单号 } // queryRequest 接口请求参数 type queryRequest struct { AppID string `xml:"appid"` // 公众账号ID MchID string `xml:"mch_id"` // 商户号 NonceStr string `xml:"nonce_str"` // 随机字符串 Sign string `xml:"sign"` // 签名 SignType string `xml:"sign_type,omitempty"` // 签名类型 TransactionID string `xml:"transaction_id"` // 微信订单号 OutTradeNo string `xml:"out_trade_no"` // 商户订单号 } // QueryOrder 查询订单 func (o *Order) QueryOrder(p *QueryParams) (paidResult notify.PaidResult, err error) { nonceStr := util.RandomStr(32) // 签名类型 if p.SignType == "" { p.SignType = "MD5" } params := make(map[string]string) params["appid"] = o.AppID params["mch_id"] = o.MchID params["nonce_str"] = nonceStr params["out_trade_no"] = p.OutTradeNo params["sign_type"] = p.SignType params["transaction_id"] = p.TransactionID sign, err := util.ParamSign(params, o.Key) if err != nil { return } request := queryRequest{ AppID: o.AppID, MchID: o.MchID, NonceStr: nonceStr, Sign: sign, OutTradeNo: p.OutTradeNo, TransactionID: p.TransactionID, SignType: p.SignType, } rawRet, err := util.PostXML(queryGateway, request) if err != nil { return } err = xml.Unmarshal(rawRet, &paidResult) if err != nil { return } if *paidResult.ReturnCode == SUCCESS { // query success if *paidResult.ResultCode == SUCCESS { err = nil return } err = errors.New(*paidResult.ErrCode + *paidResult.ErrCodeDes) return } err = errors.New("[msg : xmlUnmarshalError] [rawReturn : " + string(rawRet) + "] [sign : " + sign + "]") return }
{'content_hash': 'ec98d467be99aba985725f538667578c', 'timestamp': '', 'source': 'github', 'line_count': 82, 'max_line_length': 105, 'avg_line_length': 24.609756097560975, 'alnum_prop': 0.6293359762140733, 'repo_name': 'silenceper/wechat', 'id': '2801c80e38ea74f4c090cb94896802549177155d', 'size': '2140', 'binary': False, 'copies': '1', 'ref': 'refs/heads/v2', 'path': 'pay/order/query.go', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'C', 'bytes': '5412'}, {'name': 'C++', 'bytes': '7508'}, {'name': 'Go', 'bytes': '542418'}]}
ACCEPTED #### According to The Catalogue of Life, 3rd January 2011 #### Published in null #### Original name null ### Remarks null
{'content_hash': 'b0ff9529388ba34b680b0905885c58f8', 'timestamp': '', 'source': 'github', 'line_count': 13, 'max_line_length': 39, 'avg_line_length': 10.307692307692308, 'alnum_prop': 0.6940298507462687, 'repo_name': 'mdoering/backbone', 'id': 'dba5b182c373f28f9cbbfca6583429230c109951', 'size': '214', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'life/Plantae/Magnoliophyta/Liliopsida/Asparagales/Orchidaceae/Encyclia/Encyclia santanae/README.md', 'mode': '33188', 'license': 'apache-2.0', 'language': []}
<!DOCTYPE html> <meta charset="utf-8"> <title>CSS Grid Layout Test: Evaluate the behavior of a grid container as Flexbox item</title> <link rel="author" title="Javier Fernandez Garcia-Boente" href="mailto:[email protected]"> <link rel="help" href="https://drafts.csswg.org/css-grid/#layout-algorithm"> <link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#flex-lines"> <link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#propdef-flex-wrap"> <link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#propdef-align-content"> <link rel="help" href="https://drafts.csswg.org/css-flexbox-1/#propdef-align-self"> <link rel="help" href="https://drafts.csswg.org/css-align-3/#align-flex"> <link rel="help" href="https://drafts.csswg.org/css-align-3/#align-grid"> <link rel="match" href="../../reference/ref-filled-green-100px-square.xht"> <meta name="assert" content="A single-line column flexbox shouldn't shrink-to-fit since its flex item is stretching in the main-axis, honoring the 'align-self: normal (behaves as 'stretch')'. The grid item's inline-size should be stretched as well, honoring its justify-self: 'normal' (behaves as 'stretch')"> <style> body { overflow: hidden; } .flexbox { display: flex; flex-flow: column nowrap; align-content: flex-start; width: 100px; height: 100px; background: red; } .grid { display: grid; align-items: start; } .gridItem { background: green; height: 100px; } </style> <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> <div class="flexbox"> <div class="grid"> <div class="gridItem"></div> </div> </div>
{'content_hash': '79c4076667554a58374957e04b953dc5', 'timestamp': '', 'source': 'github', 'line_count': 38, 'max_line_length': 309, 'avg_line_length': 45.36842105263158, 'alnum_prop': 0.6722737819025522, 'repo_name': 'nwjs/chromium.src', 'id': '4443314950835c4586f2edd805b47a4074f36c7b', 'size': '1724', 'binary': False, 'copies': '24', 'ref': 'refs/heads/nw70', 'path': 'third_party/blink/web_tests/external/wpt/css/css-grid/layout-algorithm/grid-as-flex-item-should-not-shrink-to-fit-005.html', 'mode': '33188', 'license': 'bsd-3-clause', 'language': []}
require 'pathname' Puppet::Type.newtype(:dsc_spirmsettings) do require Pathname.new(__FILE__).dirname + '../../' + 'puppet/type/base_dsc' require Pathname.new(__FILE__).dirname + '../../puppet_x/puppetlabs/dsc_type_helpers' @doc = %q{ The DSC SPIrmSettings resource type. Automatically generated from 'SharePointDsc/DSCResources/MSFT_SPIrmSettings/MSFT_SPIrmSettings.schema.mof' To learn more about PowerShell Desired State Configuration, please visit https://technet.microsoft.com/en-us/library/dn249912.aspx. For more information about built-in DSC Resources, please visit https://technet.microsoft.com/en-us/library/dn249921.aspx. For more information about xDsc Resources, please visit https://github.com/PowerShell/DscResources. } validate do fail('dsc_ensure is a required attribute') if self[:dsc_ensure].nil? end def dscmeta_resource_friendly_name; 'SPIrmSettings' end def dscmeta_resource_name; 'MSFT_SPIrmSettings' end def dscmeta_module_name; 'SharePointDsc' end def dscmeta_module_version; '1.6.0.0' end newparam(:name, :namevar => true ) do end ensurable do newvalue(:exists?) { provider.exists? } newvalue(:present) { provider.create } newvalue(:absent) { provider.destroy } defaultto { :present } end # Name: PsDscRunAsCredential # Type: MSFT_Credential # IsMandatory: False # Values: None newparam(:dsc_psdscrunascredential) do def mof_type; 'MSFT_Credential' end def mof_is_embedded?; true end desc "PsDscRunAsCredential" validate do |value| unless value.kind_of?(Hash) fail("Invalid value '#{value}'. Should be a hash") end PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("Credential", value) end end # Name: Ensure # Type: string # IsMandatory: True # Values: ["Present", "Absent"] newparam(:dsc_ensure) do def mof_type; 'string' end def mof_is_embedded?; false end desc "Ensure - Enable or Disable IRM on this farm Valid values are Present, Absent." isrequired validate do |value| resource[:ensure] = value.downcase unless value.kind_of?(String) fail("Invalid value '#{value}'. Should be a string") end unless ['Present', 'present', 'Absent', 'absent'].include?(value) fail("Invalid value '#{value}'. Valid values are Present, Absent") end end end # Name: UseADRMS # Type: boolean # IsMandatory: False # Values: None newparam(:dsc_useadrms) do def mof_type; 'boolean' end def mof_is_embedded?; false end desc "UseADRMS - Use the RMS server published in this farm's Active Directory" validate do |value| end newvalues(true, false) munge do |value| PuppetX::Dsc::TypeHelpers.munge_boolean(value.to_s) end end # Name: RMSserver # Type: string # IsMandatory: False # Values: None newparam(:dsc_rmsserver) do def mof_type; 'string' end def mof_is_embedded?; false end desc "RMSserver - Use the specified RMS server, must provide in URL format" validate do |value| unless value.kind_of?(String) fail("Invalid value '#{value}'. Should be a string") end end end # Name: InstallAccount # Type: MSFT_Credential # IsMandatory: False # Values: None newparam(:dsc_installaccount) do def mof_type; 'MSFT_Credential' end def mof_is_embedded?; true end desc "InstallAccount - POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5" validate do |value| unless value.kind_of?(Hash) fail("Invalid value '#{value}'. Should be a hash") end PuppetX::Dsc::TypeHelpers.validate_MSFT_Credential("InstallAccount", value) end end def builddepends pending_relations = super() PuppetX::Dsc::TypeHelpers.ensure_reboot_relationship(self, pending_relations) end end Puppet::Type.type(:dsc_spirmsettings).provide :powershell, :parent => Puppet::Type.type(:base_dsc).provider(:powershell) do confine :true => (Gem::Version.new(Facter.value(:powershell_version)) >= Gem::Version.new('5.0.10240.16384')) defaultfor :operatingsystem => :windows mk_resource_methods end
{'content_hash': '218c3ddce69f6107fdc5524f797a5726', 'timestamp': '', 'source': 'github', 'line_count': 137, 'max_line_length': 130, 'avg_line_length': 31.708029197080293, 'alnum_prop': 0.6645948434622467, 'repo_name': 'ConclusionMC/puppetlabs-dsc', 'id': '4c05afdb514250799d496f9e7262f15d1acff68a', 'size': '4344', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'lib/puppet/type/dsc_spirmsettings.rb', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'C#', 'bytes': '11740'}, {'name': 'HTML', 'bytes': '18507'}, {'name': 'JavaScript', 'bytes': '1578'}, {'name': 'NSIS', 'bytes': '1454'}, {'name': 'PowerShell', 'bytes': '5702318'}, {'name': 'Puppet', 'bytes': '431'}, {'name': 'Ruby', 'bytes': '3147373'}, {'name': 'Shell', 'bytes': '3568'}]}
#ifndef FS_HANDLER_H #define FS_HANDLER_H #include "../HTTPRequestHandler.h" #include "mbed.h" #include "EthernetInterface.h" #include <map> using std::map; #include <string> using std::string; class FSHandler : public HTTPRequestHandler { public: FSHandler(const char* rootPath, const char* path, TCPSocketConnection* pTCPSocketConnection); virtual ~FSHandler(); static void mount(const string& fsPath, const string& rootPath); //protected: static inline HTTPRequestHandler* inst(const char* rootPath, const char* path, TCPSocketConnection* pTCPSocketConnection) { return new FSHandler(rootPath, path, pTCPSocketConnection); } //if we ever could do static virtual functions, this would be one virtual void doGet(); virtual void doPost(); virtual void doHead(); virtual void onReadable(); //Data has been read virtual void onWriteable(); //Data has been written & buf is free virtual void onClose(); //Connection is closing private: FILE* m_fp; bool m_err404; static map<string,string> m_lFsPath; }; #endif
{'content_hash': 'd55d27000260d6c1c60e1132ed1441ac', 'timestamp': '', 'source': 'github', 'line_count': 40, 'max_line_length': 252, 'avg_line_length': 27.225, 'alnum_prop': 0.7125803489439853, 'repo_name': 'mc-b/IoTKitV2', 'id': '3ce536ac17d16ba9df0ebed4a887cf0fc9e79baf', 'size': '2137', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'lib/HttpServer/Handler/FSHandler.h', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'C', 'bytes': '70975'}, {'name': 'C++', 'bytes': '667421'}, {'name': 'CSS', 'bytes': '7594'}, {'name': 'Dockerfile', 'bytes': '178'}, {'name': 'HTML', 'bytes': '9096'}, {'name': 'JavaScript', 'bytes': '647'}, {'name': 'Ruby', 'bytes': '3589'}, {'name': 'Shell', 'bytes': '2073'}]}
You can execute tests using the following programmatical API ```javascript const nightwatch = require('nightwatch') nightwatch.runner({ _: [], // Run single feature file config: 'nightwatch.conf.js', env: 'default', filter: '', tag: '' }, () => { console.log('done'); }) ```
{'content_hash': 'd320ad35839580de252a059c1ef32d4a', 'timestamp': '', 'source': 'github', 'line_count': 15, 'max_line_length': 60, 'avg_line_length': 19.266666666666666, 'alnum_prop': 0.6401384083044983, 'repo_name': 'mucsi96/nightwatch-cucumber', 'id': '01973badfc015dc25b937b6629118cf1253f3fef', 'size': '318', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'site/data/running-tests/programmatical-execution.md', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '8944'}, {'name': 'HTML', 'bytes': '7463'}, {'name': 'JavaScript', 'bytes': '141070'}]}
////////////////////////////// fe_Single ////////////////////////////// // class fe_Single : public fe_Wnd { ///////////////////////////////////////////////// // INTERFACE public: ///////////////////////////////////////////////// // Data members protected: gfx_Surface* m_Surfaces[ 5 ]; ///////////////////////////////////////////////// // Event Handlers virtual BOOL OnCreate(); virtual void OnDestroy(); virtual DWORD OnWndMessage( wnd_Window* pSender, DWORD dwMessage, DWORD dwParamA, DWORD dwParamB ); ///////////////////////////////////////////////// // Default Constructor/Deconstructor public: fe_Single(); virtual ~fe_Single(); ///////////////////////////////////////////////// }; // End class - fe_Single ///////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////// #endif // !defined(_FE_SINGLE_H_)
{'content_hash': '70face7cc4cc535f87b4d087a95f0aa1', 'timestamp': '', 'source': 'github', 'line_count': 41, 'max_line_length': 100, 'avg_line_length': 23.170731707317074, 'alnum_prop': 0.33263157894736844, 'repo_name': 'loganjones/nTA-Total-Annihilation-Clone', 'id': '6f6a98a16a2c1078287e5cdd74b91e2a9740567e', 'size': '1308', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'nTA/Source/fe_Single.h', 'mode': '33261', 'license': 'mit', 'language': [{'name': 'C', 'bytes': '130330'}, {'name': 'C++', 'bytes': '2125642'}, {'name': 'Lex', 'bytes': '3690'}, {'name': 'Objective-C', 'bytes': '6558'}, {'name': 'Yacc', 'bytes': '3290'}]}
package workflow import ( "encoding/json" "fmt" "net/http" log "github.com/golang/glog" "github.com/gorilla/websocket" "golang.org/x/net/context" "github.com/youtube/vitess/go/acl" ) var upgrader = websocket.Upgrader{} // use default options // HandleHTTPWebSocket registers the WebSocket handler. func (m *Manager) HandleHTTPWebSocket(pattern string) { log.Infof("workflow Manager listening to websocket traffic at %v", pattern) http.HandleFunc(pattern, func(w http.ResponseWriter, r *http.Request) { defer func() { if x := recover(); x != nil { errMsg := fmt.Sprintf("uncaught panic: %v", x) log.Error(errMsg) http.Error(w, errMsg, http.StatusInternalServerError) } }() // Check ACL. if err := acl.CheckAccessHTTP(r, acl.ADMIN); err != nil { msg := fmt.Sprintf("WorkflowManager acl.CheckAccessHTTP failed: %v", err) log.Error(msg) http.Error(w, msg, http.StatusUnauthorized) return } // Upgrade to WebSocket. c, err := upgrader.Upgrade(w, r, nil) if err != nil { log.Errorf("upgrade error: %v", err) return } defer c.Close() // Register the handler. notifications := make(chan []byte, 10) tree, i, err := m.NodeManager().GetAndWatchFullTree(notifications) if err != nil { log.Warningf("GetAndWatchFullTree failed: %v", err) return } defer m.NodeManager().CloseWatcher(i) // First we send the full dump if err := c.WriteMessage(websocket.TextMessage, tree); err != nil { log.Warningf("WriteMessage(tree) failed: %v", err) return } // Start a go routine to get messages, send them to a channel. recv := make(chan *ActionParameters, 10) go func() { for { mt, message, err := c.ReadMessage() if err != nil { log.Warningf("failed to read message from websocket: %v", err) close(recv) return } if mt != websocket.TextMessage { log.Warningf("weird message type: %v", mt) } ap := &ActionParameters{} if err := json.Unmarshal(message, ap); err != nil { log.Warningf("failed to JSON-decode message from websocket: %v", err) close(recv) return } recv <- ap } }() // Let's listen to the channels until we're done. for { select { case ap, ok := <-recv: if !ok { // The websocket was most likely closed. return } ctx := context.TODO() if err := m.NodeManager().Action(ctx, ap); err != nil { log.Warningf("Action failed: %v", err) } case message, ok := <-notifications: if !ok { // We ran out of space on the update // channel, so we had to close it. return } if err := c.WriteMessage(websocket.TextMessage, message); err != nil { log.Warningf("WriteMessage(tree) failed: %v", err) return } } } }) }
{'content_hash': 'd058e3e2e55ac66c810d8dbf09c24ce6', 'timestamp': '', 'source': 'github', 'line_count': 111, 'max_line_length': 76, 'avg_line_length': 25.00900900900901, 'alnum_prop': 0.6311239193083573, 'repo_name': 'dumbunny/vitess', 'id': '384da7828b1bedd50f3d0809d02ab1ebfbc374a2', 'size': '2776', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'go/vt/workflow/websocket.go', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'C', 'bytes': '10253'}, {'name': 'CSS', 'bytes': '213430'}, {'name': 'Go', 'bytes': '5610269'}, {'name': 'HTML', 'bytes': '56352'}, {'name': 'Java', 'bytes': '721917'}, {'name': 'JavaScript', 'bytes': '41385'}, {'name': 'Liquid', 'bytes': '7198'}, {'name': 'Makefile', 'bytes': '7952'}, {'name': 'PHP', 'bytes': '1159452'}, {'name': 'Protocol Buffer', 'bytes': '109156'}, {'name': 'Python', 'bytes': '854168'}, {'name': 'Ruby', 'bytes': '466'}, {'name': 'Shell', 'bytes': '41663'}, {'name': 'TypeScript', 'bytes': '142029'}, {'name': 'Yacc', 'bytes': '21577'}]}
<?php /** * Created by PhpStorm. * User: karachungen * Date: 6/22/14 * Time: 1:14 AM */ namespace Shukay\StuffBundle\Listener; use Oneup\UploaderBundle\Event\PostUploadEvent; use Oneup\UploaderBundle\Event\PreUploadEvent; use Symfony\Component\DependencyInjection\Container; use Symfony\Component\Filesystem\Exception\IOExceptionInterface; use Symfony\Component\Security\Core\SecurityContext; class UploadListener { private $user; private $container; public function __construct(Container $container, SecurityContext $user) { $this->container = $container; $this->user = $user; } public function onPostUpload(PostUploadEvent $event) { $response = $event->getResponse(); // $userName = $this->container->get("security.context")->getToken()->getUsername(); // // $uploadDir = $this->container->get("path")->getUploadsDir()."stuff/"; // // $uploadedFile = $uploadDir.$userName."/temp/".$response["filename"]; // // $file = new File($uploadedFile); // $file->move($uploadDir.$response["filename"]); } public function onPreUpload(PreUploadEvent $event) { } }
{'content_hash': 'c101bb2589846987e1dc443898f20788', 'timestamp': '', 'source': 'github', 'line_count': 54, 'max_line_length': 93, 'avg_line_length': 20.88888888888889, 'alnum_prop': 0.6959219858156028, 'repo_name': 'lukashenka/shukay', 'id': '7dfdfcfdc94bbf3db58ec160e2a47b88d8873257', 'size': '1128', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/Shukay/StuffBundle/Listener/UploadListener.php', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '868403'}, {'name': 'JavaScript', 'bytes': '1614359'}, {'name': 'PHP', 'bytes': '152824'}, {'name': 'Perl', 'bytes': '2621'}]}
<?php namespace PSX\Sql\Provider\DBAL; use Doctrine\DBAL\Connection; use PSX\Sql\Provider\PDO\PDOAbstract; /** * DBALAbstract * * @author Christoph Kappestein <[email protected]> * @license http://www.apache.org/licenses/LICENSE-2.0 * @link https://phpsx.org */ abstract class DBALAbstract { protected Connection $connection; protected string $sql; protected array $parameters; protected mixed $definition; public function __construct(Connection $connection, string $sql, array $parameters, mixed $definition) { $this->connection = $connection; $this->sql = $sql; $this->parameters = $parameters; $this->definition = $definition; } public function getDefinition(): mixed { return $this->definition; } /** * Returns an array of PDO type corresponding to the parameter array */ public static function getTypes(array $parameters): array { $types = []; foreach ($parameters as $parameter) { $types[] = self::getType($parameter); } return $types; } private static function getType(mixed $parameter): int { if (is_bool($parameter)) { return \PDO::PARAM_BOOL; } elseif ($parameter === null) { return \PDO::PARAM_NULL; } elseif (is_int($parameter)) { return \PDO::PARAM_INT; } else { return \PDO::PARAM_STR; } } }
{'content_hash': 'c3a0c91a8d79e1d28e8c909cb24b48a7', 'timestamp': '', 'source': 'github', 'line_count': 60, 'max_line_length': 106, 'avg_line_length': 24.9, 'alnum_prop': 0.5957161981258366, 'repo_name': 'apioo/psx-sql', 'id': '970e5ddf0311f3d61c3e3edbc840458589dcc990', 'size': '2271', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/Provider/DBAL/DBALAbstract.php', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'PHP', 'bytes': '267060'}]}
layout: page title: Frank Conley's 64th Birthday date: 2016-05-24 author: Frances Phelps tags: weekly links, java status: published summary: Mauris tempor ex lectus, id pulvinar dui. banner: images/banner/meeting-01.jpg booking: startDate: 10/05/2019 endDate: 10/06/2019 ctyhocn: TULSOHX groupCode: FC6B published: true --- Sed fermentum tortor sit amet sem sodales facilisis. Pellentesque lacinia at tellus nec mollis. Etiam sit amet elit id odio dictum suscipit fringilla blandit nulla. Donec quis malesuada ligula. Sed sit amet nibh lobortis, vehicula sem pretium, placerat quam. Donec urna est, interdum nec purus ut, suscipit scelerisque quam. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nam volutpat tempor metus, a consequat dui bibendum vitae. Nunc gravida risus gravida ligula blandit, quis ultricies eros rhoncus. Nulla et libero id libero vestibulum sollicitudin nec eget odio. Morbi at tellus ut velit consectetur porta. Ut at pharetra risus, eu laoreet dui. Donec tincidunt dignissim pulvinar. Sed sit amet libero ac ligula pellentesque pellentesque. Aliquam rutrum fringilla posuere. Nulla finibus iaculis orci at euismod. 1 Vivamus viverra ex dapibus nulla rutrum porta 1 Vivamus mattis urna viverra efficitur pulvinar. Ut consequat tellus et mi varius feugiat ut vitae nulla. Donec ac nunc hendrerit, pharetra arcu eget, ornare eros. Mauris ut imperdiet lorem. In hac habitasse platea dictumst. Pellentesque ante neque, consectetur quis velit at, congue vulputate arcu. Aenean venenatis molestie nisl, nec tincidunt nibh accumsan in. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum quis massa volutpat, lobortis felis sit amet, aliquet eros. Suspendisse aliquet, tortor in lobortis semper, massa purus tempor eros, ut semper metus nisi eget lectus. Pellentesque viverra ultrices rutrum. Cras non dictum nulla.
{'content_hash': '425ccf0632c054eab83ba8667e49df66', 'timestamp': '', 'source': 'github', 'line_count': 21, 'max_line_length': 856, 'avg_line_length': 92.23809523809524, 'alnum_prop': 0.8131130614352091, 'repo_name': 'KlishGroup/prose-pogs', 'id': 'df325a3fd71f59c4df4054c98a457dac23000820', 'size': '1941', 'binary': False, 'copies': '1', 'ref': 'refs/heads/gh-pages', 'path': 'pogs/T/TULSOHX/FC6B/index.md', 'mode': '33188', 'license': 'mit', 'language': []}
package it.reply.orchestrator.service.commands; import it.reply.orchestrator.dto.deployment.DeploymentMessage; import it.reply.orchestrator.utils.WorkflowConstants; import org.flowable.engine.delegate.DelegateExecution; import org.springframework.stereotype.Component; @Component(WorkflowConstants.Delegate.PROVIDER_TIMEOUT) public class ProviderTimeout extends BaseDeployCommand { @Override public void execute(DelegateExecution execution, DeploymentMessage deploymentMessage) { getDeploymentProviderService(deploymentMessage).doProviderTimeout(deploymentMessage); } @Override protected String getErrorMessagePrefix() { return "Provider timeout"; } }
{'content_hash': '3768fe84dc117393525e30a5057028c5', 'timestamp': '', 'source': 'github', 'line_count': 24, 'max_line_length': 89, 'avg_line_length': 28.333333333333332, 'alnum_prop': 0.8264705882352941, 'repo_name': 'indigo-dc/orchestrator', 'id': '516f396bef18373f8211716921a11e1d6a56a43e', 'size': '1325', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/main/java/it/reply/orchestrator/service/commands/ProviderTimeout.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Dockerfile', 'bytes': '1641'}, {'name': 'Java', 'bytes': '1778503'}, {'name': 'Shell', 'bytes': '4281'}]}
@interface ____Tests : XCTestCase @end @implementation ____Tests - (void)setUp { [super setUp]; // Put setup code here. This method is called before the invocation of each test method in the class. } - (void)tearDown { // Put teardown code here. This method is called after the invocation of each test method in the class. [super tearDown]; } - (void)testExample { // This is an example of a functional test case. // Use XCTAssert and related functions to verify your tests produce the correct results. } - (void)testPerformanceExample { // This is an example of a performance test case. [self measureBlock:^{ // Put the code you want to measure the time of here. }]; } @end
{'content_hash': 'd4cc63487a6dc32ec458f5f4e6cda045', 'timestamp': '', 'source': 'github', 'line_count': 29, 'max_line_length': 107, 'avg_line_length': 25.03448275862069, 'alnum_prop': 0.6804407713498623, 'repo_name': 'huang303513/UILayoutOfiOS', 'id': 'a9928effac5bca32ff6c206c2aa3fa714ea5b040', 'size': '901', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': '第二章NSLayoutConstraint布局/约束相关Tests/____Tests.m', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Objective-C', 'bytes': '930255'}, {'name': 'Swift', 'bytes': '16962'}]}
[![Build Status](https://travis-ci.org/db-journey/postgresql-driver.svg?branch=master)](https://travis-ci.org/db-journey/postgresql-driver) [![GoDoc](https://godoc.org/github.com/db-journey/journey?status.svg)](https://godoc.org/github.com/db-journey/journey) * Runs migrations in transactions. That means that if a migration fails, it will be safely rolled back. * Tries to return helpful error messages. * Stores migration version details in table ``schema_migrations``. This table will be auto-generated. ## Usage ```bash journey -url postgres://user@host:port/database -path ./db/migrations create add_field_to_table journey -url postgres://user@host:port/database -path ./db/migrations up journey help # for more info ## Disable DDL transactions Some queries, like `alter type ... add value` cannot be executed inside a transaction block. Since all migrations are executed in a transaction block by default (per migration file), a special option must be specified inside the migration file: ```sql -- disable_ddl_transaction alter type ...; ``` The option `disable_ddl_transaction` must be in a sql comment of the first line of the migration file. Please note that you can't put several `alter type ... add value ...` in a single file. Doing so will result in a `ERROR 25001: ALTER TYPE ... ADD cannot be executed from a function or multi-command string` sql exception during migration. Since the file will be executed without transaction, it's probably not a good idea to exec more than one statement anyway. If the last statement of the file fails, chances to run again the migration without error will be very limited.
{'content_hash': '4f7c9b9153633d624e409049900bf78f', 'timestamp': '', 'source': 'github', 'line_count': 33, 'max_line_length': 238, 'avg_line_length': 49.75757575757576, 'alnum_prop': 0.7637028014616322, 'repo_name': 'db-journey/postgresql-driver', 'id': 'bada6ac1c25e45823cbb1891780020cf06a714e3', 'size': '1663', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'README.md', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Go', 'bytes': '9672'}, {'name': 'Makefile', 'bytes': '75'}]}
function [mean_PLV, mean_peak_segments, total_peaks] = peak_averaged_PLV_batch_parallel(listnames, analysis_name, peak_freq, peak_freq_cycles, sampling_freq) % Finds peaks in trace filtered at frequency peak_freq, spaced at least % no_target_cycles cycles (at frequency target_freq) apart. Selects data % segments around peaks, computes wavelet transform. Returns mean wavelet % transform in a matrix. mkdir(analysis_name) segment_length=floor(peak_freq_cycles*sampling_freq/peak_freq); if mod(segment_length,2)==0 segment_length = segment_length + 1; end t=(1:segment_length)-floor(segment_length/2)-1; t=t/sampling_freq; freqs = 1:200; no_freqs = length(freqs); if isempty(listnames) [listnames{1}, ~]=uigetfile('*list', 'Choose first list of files to calculate peak-averaged signal.'); [listnames{2}, conditions_path]=uigetfile('*list', 'Choose second list of files to calculate peak-averaged signal.'); else conditions_path = pwd; end mean_PLV = nan(no_freqs, segment_length); mean_peak_segments = nan(segment_length, 1); filenames = cell(2, 1); filenum = nan(2, 1); for c=1:2 filenames{c} = text_read([conditions_path, '/', listnames{c}],'%s'); filenum(c) = length(filenames{c}); end if range(filenum) == 0 filenum = mean(filenum); All_PLV = nan(no_freqs, segment_length, filenum); All_mean_peak_segments = nan(filenum, segment_length, 2); no_peaks = nan(filenum, 1); parfor f=1:filenum data1 = load(filenames{1}{f}); data2 = load(filenames{2}{f}); [~, ~, file_PLV, file_mean_peak_segment, file_peak_no] = peak_averaged_PLV(data1, data2, peak_freq, peak_freq_cycles, sampling_freq, 0, ''); All_PLV(:, :, f) = file_PLV*file_peak_no; All_mean_peak_segments(f, :, :) = reshape(file_mean_peak_segment, [1 size(file_mean_peak_segment)])*file_peak_no; no_peaks(f) = file_peak_no; end save([analysis_name,'/',analysis_name,'_',num2str(peak_freq),'_peak_PLV.mat'],... 'All_PLV','All_mean_peak_segments','no_peaks','peak_freq','sampling_freq','peak_freq_cycles') total_peaks = sum(no_peaks); mean_PLV = sum(All_PLV,3)/sum(no_peaks); mean_peak_segments = reshape(sum(All_mean_peak_segments), [size(All_mean_peak_segments, 2) size(All_mean_peak_segments, 3)])'/sum(no_peaks); figure; subplot(2,1,1) imagesc(t,freqs,zscore(mean_PLV(:,:)')') c_axis = caxis; caxis([0 c_axis(2)]) set(gca,'YDir','normal'); xlabel('Time (s)'); ylabel('Frequency (Hz)'); title([num2str(peak_freq),' Hz Peak-Triggered Phase-Locking Value (Mean)']) subplot(2,1,2) plot(t,mean_peak_segments) axis('tight'); box off; xlabel('Time (s)'); ylabel('mV'); title([num2str(peak_freq),' Hz Peak-Triggered Mean Waveform']) legend(listnames) save_as_pdf(gcf, [analysis_name,'/',analysis_name,'_',num2str(peak_freq),'_peak_PLV']) else display('The two lists given in the cell listnames must contain the same number of elements.') return end
{'content_hash': 'a1dbd50a2d9b1a12c8c7e5ae597952eb', 'timestamp': '', 'source': 'github', 'line_count': 102, 'max_line_length': 157, 'avg_line_length': 30.84313725490196, 'alnum_prop': 0.6341385886840433, 'repo_name': 'benpolletta/MBP-Code', 'id': '3ab8b7a8af06931ae032fdaf0bd503926483e516', 'size': '3146', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'CFC/peak_averaged_PLV_batch_parallel.m', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'C', 'bytes': '55822'}, {'name': 'C++', 'bytes': '9053'}, {'name': 'HTML', 'bytes': '1150470'}, {'name': 'M', 'bytes': '2433'}, {'name': 'Matlab', 'bytes': '9715217'}, {'name': 'Objective-C', 'bytes': '162'}, {'name': 'Scala', 'bytes': '3945'}]}
package org.apache.naming.factory; import java.util.Hashtable; import javax.naming.Context; import javax.naming.Name; import javax.naming.NamingException; import javax.naming.RefAddr; import javax.naming.Reference; import javax.naming.spi.ObjectFactory; import org.apache.naming.ResourceRef; /** * Object factory for Resources. * * @author Remy Maucherat * @version $Id: ResourceFactory.java 1056946 2011-01-09 14:48:08Z markt $ */ public class ResourceFactory implements ObjectFactory { // ----------------------------------------------------------- Constructors // -------------------------------------------------------------- Constants // ----------------------------------------------------- Instance Variables // --------------------------------------------------------- Public Methods // -------------------------------------------------- ObjectFactory Methods /** * Crete a new DataSource instance. * * @param obj The reference object describing the DataSource */ @Override public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable<?,?> environment) throws Exception { if (obj instanceof ResourceRef) { Reference ref = (Reference) obj; ObjectFactory factory = null; RefAddr factoryRefAddr = ref.get(Constants.FACTORY); if (factoryRefAddr != null) { // Using the specified factory String factoryClassName = factoryRefAddr.getContent().toString(); // Loading factory ClassLoader tcl = Thread.currentThread().getContextClassLoader(); Class<?> factoryClass = null; if (tcl != null) { try { factoryClass = tcl.loadClass(factoryClassName); } catch(ClassNotFoundException e) { NamingException ex = new NamingException ("Could not load resource factory class"); ex.initCause(e); throw ex; } } else { try { factoryClass = Class.forName(factoryClassName); } catch(ClassNotFoundException e) { NamingException ex = new NamingException ("Could not load resource factory class"); ex.initCause(e); throw ex; } } if (factoryClass != null) { try { factory = (ObjectFactory) factoryClass.newInstance(); } catch (Exception e) { if (e instanceof NamingException) throw (NamingException) e; NamingException ex = new NamingException ("Could not create resource factory instance"); ex.initCause(e); throw ex; } } } else { if (ref.getClassName().equals("javax.sql.DataSource")) { String javaxSqlDataSourceFactoryClassName = System.getProperty("javax.sql.DataSource.Factory", Constants.DBCP_DATASOURCE_FACTORY); try { factory = (ObjectFactory) Class.forName(javaxSqlDataSourceFactoryClassName) .newInstance(); } catch (Exception e) { NamingException ex = new NamingException ("Could not create resource factory instance"); ex.initCause(e); throw ex; } } else if (ref.getClassName().equals("javax.mail.Session")) { String javaxMailSessionFactoryClassName = System.getProperty("javax.mail.Session.Factory", "org.apache.naming.factory.MailSessionFactory"); try { factory = (ObjectFactory) Class.forName(javaxMailSessionFactoryClassName) .newInstance(); } catch(Throwable t) { NamingException ex = new NamingException ("Could not create resource factory instance"); ex.initCause(t); throw ex; } } } if (factory != null) { return factory.getObjectInstance (obj, name, nameCtx, environment); } else { throw new NamingException ("Cannot create resource instance"); } } return null; } }
{'content_hash': 'a304afaf3e24d678baca7c7cdcea7277', 'timestamp': '', 'source': 'github', 'line_count': 142, 'max_line_length': 91, 'avg_line_length': 36.29577464788732, 'alnum_prop': 0.4487776484284051, 'repo_name': 'WhiteBearSolutions/WBSAirback', 'id': '8d0d43204e5256156d11722bce2ee34a24cb8cd7', 'size': '5958', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'packages/wbsairback-tomcat/wbsairback-tomcat-7.0.22/java/org/apache/naming/factory/ResourceFactory.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Java', 'bytes': '4780982'}]}
using std::vector; using std::string; struct FAR_File; struct FAR_Dir; struct FAR_Entry; typedef vector<FAR_Entry*> entryvector; typedef entryvector::iterator entryiter; struct FAR_Entry { word_t flags; word_t nameoff, entryoff; string name, fullname; entryvector* subentries; word_t size; int nTotalEntries; FAR_Entry() : flags(0), entryoff(~0), subentries(NULL), size(0), nTotalEntries(0) { } ~FAR_Entry(); }; struct FAR_Builder { FAR_Entry topdir; int nameSize, nEntries; FAR_Builder() : nameSize(0), nEntries(0) { } int ScanDir(const char* path); int OutputFile(const char* path); int OutputFile(FileClass& f); }; #define die(msg) do { fputs(msg "\n\n", stderr); return 1; } while(0) #define safe_call(a) do { int rc = a; if(rc != 0) return rc; } while(0)
{'content_hash': '3c722623c3890695a4b7e039a4aeb169', 'timestamp': '', 'source': 'github', 'line_count': 37, 'max_line_length': 86, 'avg_line_length': 21.135135135135137, 'alnum_prop': 0.690537084398977, 'repo_name': 'fincs/FeOS-v2', 'id': 'cb27fdcb48328bba6690d6ec495fcb7f7a58741e', 'size': '952', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'sdk/source/tools/fartool/source/farbuild.h', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Assembly', 'bytes': '5843'}, {'name': 'C', 'bytes': '357640'}, {'name': 'C++', 'bytes': '68112'}, {'name': 'Objective-C', 'bytes': '5816'}, {'name': 'Perl', 'bytes': '1653'}, {'name': 'Shell', 'bytes': '333'}]}
FOUNDATION_EXPORT double Pods_JLAccordion_ExampleVersionNumber; FOUNDATION_EXPORT const unsigned char Pods_JLAccordion_ExampleVersionString[];
{'content_hash': 'b0d8be56e6c490c5f2ed16ccba01c980', 'timestamp': '', 'source': 'github', 'line_count': 3, 'max_line_length': 78, 'avg_line_length': 48.0, 'alnum_prop': 0.8680555555555556, 'repo_name': 'buhikon/JLAccordion', 'id': '3cda06c5708688a0755293c4468d9795fa7adf8b', 'size': '170', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'Example/Pods/Target Support Files/Pods-JLAccordion_Example/Pods-JLAccordion_Example-umbrella.h', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Objective-C', 'bytes': '34365'}, {'name': 'Ruby', 'bytes': '1841'}, {'name': 'Shell', 'bytes': '16368'}]}
codec = getcodec() assert isinstance(codec, dict) assert len(codec) > 0 codes = codec.keys() assert all(isinstance(c, int) and (c >= 0) for c in codes) names = codec.values() assert all(isinstance(n, str) and (len(n) > 0) for n in names) # System variables assert '#state_system_mode' in names assert '#stimDisplayUpdate' in names # Experiment variables assert 'foo' in names assert 'bar' in names # Reverse codec reverse_codec = get_reverse_codec() assert isinstance(reverse_codec, dict) assert reverse_codec == dict((n, c) for c, n in codec.items())
{'content_hash': '475ba7356009b0d3de286a47a1a66c74', 'timestamp': '', 'source': 'github', 'line_count': 22, 'max_line_length': 62, 'avg_line_length': 25.318181818181817, 'alnum_prop': 0.718132854578097, 'repo_name': 'mworks/mworks', 'id': 'c526c65841dd48c9c9c01b64ab38f5321deac02f', 'size': '557', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'examples/Tests/Action/Python/getcodec.py', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'C', 'bytes': '241110'}, {'name': 'C++', 'bytes': '2564939'}, {'name': 'HTML', 'bytes': '128054'}, {'name': 'Java', 'bytes': '38100'}, {'name': 'M', 'bytes': '424'}, {'name': 'MATLAB', 'bytes': '23144'}, {'name': 'Makefile', 'bytes': '3634'}, {'name': 'Metal', 'bytes': '23463'}, {'name': 'Objective-C', 'bytes': '454609'}, {'name': 'Perl', 'bytes': '35594'}, {'name': 'Python', 'bytes': '558518'}, {'name': 'Rich Text Format', 'bytes': '1306'}, {'name': 'Shell', 'bytes': '25366'}, {'name': 'Swift', 'bytes': '10460'}, {'name': 'XSLT', 'bytes': '52495'}]}
Melp::Application.configure do # Settings specified here will take precedence over those in config/application.rb. # In the development environment your application's code is reloaded on # every request. This slows down response time but is perfect for development # since you don't have to restart the web server when you make code changes. config.cache_classes = false # Do not eager load code on boot. config.eager_load = false # Show full error reports and disable caching. config.consider_all_requests_local = true config.action_controller.perform_caching = false # Don't care if the mailer can't send. config.action_mailer.raise_delivery_errors = true # Print deprecation notices to the Rails logger. config.active_support.deprecation = :log # Debug mode disables concatenation and preprocessing of assets. # This option may cause significant delays in view rendering with a large # number of complex assets. config.assets.debug = true # Add Rack::LiveReload to the bottom of the middleware stack with the default options. # config.middleware.use Rack::LiveReload end
{'content_hash': 'dcb4d7f21bec5305485f5152a9e03dc2', 'timestamp': '', 'source': 'github', 'line_count': 30, 'max_line_length': 88, 'avg_line_length': 37.6, 'alnum_prop': 0.7588652482269503, 'repo_name': 'ggveronika/bali', 'id': 'f41f73dd0b1a8154b94527a1e72df18f1d89a895', 'size': '1128', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'config/environments/development.rb', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '150874'}, {'name': 'JavaScript', 'bytes': '98072'}, {'name': 'Ruby', 'bytes': '70744'}, {'name': 'Shell', 'bytes': '1475'}]}
import { Component, OnInit } from '@angular/core'; import { COMMON_DIRECTIVES } from '@angular/common'; import { ROUTER_DIRECTIVES } from '@angular/router'; @Component({ moduleId: module.id, selector: 'app-header', templateUrl: 'header.component.html', styleUrls: ['header.component.css'], directives: [ COMMON_DIRECTIVES, ROUTER_DIRECTIVES, ] }) export class HeaderComponent implements OnInit { constructor() {} ngOnInit() { } }
{'content_hash': '04d814a09e81886aef19bf7b4fe446ec', 'timestamp': '', 'source': 'github', 'line_count': 22, 'max_line_length': 52, 'avg_line_length': 20.90909090909091, 'alnum_prop': 0.6869565217391305, 'repo_name': 'sonicparke/ng2-sudoku', 'id': 'e8994a4cde3e5d954058f0b3a0a60c4d0a109f39', 'size': '460', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/app/header/header.component.ts', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '48121'}, {'name': 'HTML', 'bytes': '4880'}, {'name': 'JavaScript', 'bytes': '4246'}, {'name': 'TypeScript', 'bytes': '43847'}]}
<script> $(document).ready(function(e) { $("#hide").click(function(e) { $("#option").css("position","static"); }); }); $("#menu-toggle").click(function(e) { e.preventDefault(); $("#wrapper").toggleClass("toggled"); }); $("#menu-toggle-2").click(function(e) { e.preventDefault(); $("#wrapper").toggleClass("toggled-2"); $('#menu ul').hide(); }); function initMenu() { $('#menu ul').hide(); $('#menu ul').children('.current').parent().show(); //$('#menu ul:first').show(); $('#menu li a').click( function() { var checkElement = $(this).next(); if((checkElement.is('ul')) && (checkElement.is(':visible'))) { return false; } if((checkElement.is('ul')) && (!checkElement.is(':visible'))) { $('#menu ul:visible').slideUp('normal'); checkElement.slideDown('normal'); return false; } } ); } $(document).ready(function() {initMenu();}); $(document).ready(function(e) { $("#member").click(function(e) { $("#content").load("pages/member.php"); }); $("#home").click(function(e) { $("#content").load("pages/home.php"); }); $("#video").click(function(e) { $("#content").load("pages/video.php"); }); $("#photo").click(function(e) { $("#content").load("pages/photo.php"); }); $("#forum").click(function(e) { $("#content").load("pages/forum.php"); }); }); $(document).ready(function(){ $('[data-toggle="popover"]').popover(); }); function fileSelected() { var file = document.getElementById('fileToUpload').files[0]; if (file) { var fileSize = 0; if (file.size > 1024 * 1024) fileSize = (Math.round(file.size * 100 / (1024 * 1024)) / 100).toString() + 'MB'; else fileSize = (Math.round(file.size * 100 / 1024) / 100).toString() + 'KB'; document.getElementById('fileName').innerHTML = 'Name: ' + file.name; document.getElementById('fileSize').innerHTML = 'Size: ' + fileSize; document.getElementById('fileType').innerHTML = 'Type: ' + file.type; } } function uploadFile() { var fd = new FormData(); fd.append("fileToUpload", document.getElementById('fileToUpload').files[0]); var xhr = new XMLHttpRequest(); xhr.upload.addEventListener("progress", uploadProgress, false); xhr.addEventListener("load", uploadComplete, false); xhr.addEventListener("error", uploadFailed, false); xhr.addEventListener("abort", uploadCanceled, false); xhr.open("POST", "images/logo"); xhr.send(fd); } function uploadProgress(evt) { if (evt.lengthComputable) { var percentComplete = Math.round(evt.loaded * 100 / evt.total); document.getElementById('progressNumber').innerHTML = percentComplete.toString() + '%'; } else { document.getElementById('progressNumber').innerHTML = 'unable to compute'; } } function uploadComplete(evt) { /* This event is raised when the server send back a response */ alert(evt.target.responseText); } function uploadFailed(evt) { alert("There was an error attempting to upload the file."); } function uploadCanceled(evt) { alert("The upload has been canceled by the user or the browser dropped the connection."); } </script> <!-- end .gridContainer clearFlix --></div> <div class="footer"> <center> <h5 style="color:#999; padding-top:1em;padding-bottom:1em;"><b>&copy; 2016 All Right Reserved Zulham azwar achmad </b></h5> </center> </div> </div> </body> </html>
{'content_hash': 'e72e694bea405f125d0368a1a3e0b43f', 'timestamp': '', 'source': 'github', 'line_count': 115, 'max_line_length': 125, 'avg_line_length': 33.91304347826087, 'alnum_prop': 0.5425641025641026, 'repo_name': 'mahluz/hookyouup', 'id': '912acba501cbf2564a41f5c03bd62936776674b3', 'size': '3900', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'application/views/main/footer.php', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'ApacheConf', 'bytes': '429'}, {'name': 'CSS', 'bytes': '291145'}, {'name': 'HTML', 'bytes': '8278149'}, {'name': 'JavaScript', 'bytes': '357427'}, {'name': 'PHP', 'bytes': '1906661'}]}
from element.plugins.profiler.profiler import * from element.plugins.profiler.pycallgraph import *
{'content_hash': '23980ab4ae7c11ecf937ea354d22a40a', 'timestamp': '', 'source': 'github', 'line_count': 2, 'max_line_length': 50, 'avg_line_length': 49.0, 'alnum_prop': 0.8469387755102041, 'repo_name': 'rande/python-element', 'id': '2e6815264a7acb77cb1262e9bc04984d10deecab', 'size': '700', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'element/plugins/profiler/__init__.py', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'CSS', 'bytes': '120475'}, {'name': 'HTML', 'bytes': '93511'}, {'name': 'JavaScript', 'bytes': '2830'}, {'name': 'Makefile', 'bytes': '789'}, {'name': 'Nginx', 'bytes': '410'}, {'name': 'Perl', 'bytes': '2987'}, {'name': 'Python', 'bytes': '303084'}]}
require_relative '../../minitest_helper' require 'bmff/box' require 'stringio' class TestBMFFBoxMovieFragmentRandomAccessOffset < Minitest::Test def test_parse io = StringIO.new("", "r+:ascii-8bit") io.extend(BMFF::BinaryAccessor) io.write_uint32(0) io.write_ascii("mfro") io.write_uint8(0) # version io.write_uint24(0) # flags io.write_uint32(1) # mfra_size size = io.pos io.pos = 0 io.write_uint32(size) io.pos = 0 box = BMFF::Box.get_box(io, nil) assert_instance_of(BMFF::Box::MovieFragmentRandomAccessOffset, box) assert_equal(size, box.actual_size) assert_equal("mfro", box.type) assert_equal(0, box.version) assert_equal(0, box.flags) assert_equal(1, box.mfra_size) end end
{'content_hash': '7a1a201f137b352ca00a42826ab96b2c', 'timestamp': '', 'source': 'github', 'line_count': 27, 'max_line_length': 71, 'avg_line_length': 28.074074074074073, 'alnum_prop': 0.6675461741424802, 'repo_name': 'zuku/bmff', 'id': 'fe106e8262cf31c9db7132944c87e00eb3203b17', 'size': '845', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'test/bmff/box/test_movie_fragment_random_access_offset.rb', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Ruby', 'bytes': '234623'}]}
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>mne.time_frequency.morlet &mdash; MNE 0.11.0 documentation</title> <link rel="stylesheet" href="../_static/basic.css" type="text/css" /> <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> <link rel="stylesheet" href="../_static/gallery.css" type="text/css" /> <link rel="stylesheet" href="../_static/bootswatch-3.3.4/flatly/bootstrap.min.css" type="text/css" /> <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" /> <link rel="stylesheet" href="../_static/style.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '../', VERSION: '0.11.0', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true }; </script> <script type="text/javascript" src="../_static/jquery.js"></script> <script type="text/javascript" src="../_static/underscore.js"></script> <script type="text/javascript" src="../_static/doctools.js"></script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> <script type="text/javascript" src="../_static/js/jquery-1.11.0.min.js"></script> <script type="text/javascript" src="../_static/js/jquery-fix.js"></script> <script type="text/javascript" src="../_static/bootstrap-3.3.4/js/bootstrap.min.js"></script> <script type="text/javascript" src="../_static/bootstrap-sphinx.js"></script> <link rel="shortcut icon" href="../_static/favicon.ico"/> <link rel="top" title="MNE 0.11.0 documentation" href="../index.html" /> <link rel="up" title="API Reference" href="../python_reference.html" /> <link rel="next" title="mne.time_frequency.multitaper_psd" href="mne.time_frequency.multitaper_psd.html" /> <link rel="prev" title="mne.time_frequency.dpss_windows" href="mne.time_frequency.dpss_windows.html" /> <link href='http://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700' rel='stylesheet' type='text/css'> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-37225609-1']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> <script type="text/javascript"> !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s); js.id=id;js.src="http://platform.twitter.com/widgets.js"; fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs"); </script> <script type="text/javascript"> (function() { var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; po.src = 'https://apis.google.com/js/plusone.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); })(); </script> <link rel="canonical" href="https://mne.tools/stable/index.html" /> </head> <body role="document"> <div id="navbar" class="navbar navbar-default navbar-fixed-top"> <div class="container"> <div class="navbar-header"> <!-- .btn-navbar is used as the toggle for collapsed navbar content --> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="../index.html"><img src="../_static/mne_logo_small.png"> </a> <span class="navbar-text navbar-version pull-left"><b>0.11.0</b></span> </div> <div class="collapse navbar-collapse nav-collapse"> <ul class="nav navbar-nav"> <li><a href="../tutorials.html">Tutorials</a></li> <li><a href="../auto_examples/index.html">Gallery</a></li> <li><a href="../manual/index.html">Manual</a></li> <li><a href="../python_reference.html">API</a></li> <li><a href="../faq.html">FAQ</a></li> <li><a href="../cite.html">Cite</a></li> <li class="dropdown globaltoc-container"> <a role="button" id="dLabelGlobalToc" data-toggle="dropdown" data-target="#" href="../index.html">Site <b class="caret"></b></a> <ul class="dropdown-menu globaltoc" role="menu" aria-labelledby="dLabelGlobalToc"><ul class="current"> <li class="toctree-l1"><a class="reference internal" href="../getting_started.html">Getting Started</a></li> <li class="toctree-l1"><a class="reference internal" href="../whats_new.html">What&#8217;s new</a></li> <li class="toctree-l1"><a class="reference internal" href="../cite.html">Cite MNE</a></li> <li class="toctree-l1"><a class="reference internal" href="../references.html">Related publications</a></li> <li class="toctree-l1"><a class="reference internal" href="../tutorials.html">Tutorials</a></li> <li class="toctree-l1"><a class="reference internal" href="../auto_examples/index.html">Examples Gallery</a></li> <li class="toctree-l1"><a class="reference internal" href="../manual/index.html">Manual</a></li> <li class="toctree-l1 current"><a class="reference internal" href="../python_reference.html">API Reference</a></li> <li class="toctree-l1"><a class="reference internal" href="../faq.html">Frequently Asked Questions</a></li> <li class="toctree-l1"><a class="reference internal" href="../advanced_setup.html">Advanced installation and setup</a></li> <li class="toctree-l1"><a class="reference internal" href="../mne_cpp.html">MNE with CPP</a></li> </ul> </ul> </li> <li class="dropdown"> <a role="button" id="dLabelLocalToc" data-toggle="dropdown" data-target="#" href="#">Page <b class="caret"></b></a> <ul class="dropdown-menu localtoc" role="menu" aria-labelledby="dLabelLocalToc"><ul> <li><a class="reference internal" href="#">mne.time_frequency.morlet</a></li> </ul> </ul> </li> </ul> <form class="navbar-form navbar-right" action="../search.html" method="get"> <div class="form-group"> <input type="text" name="q" class="form-control" placeholder="Search" /> </div> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> </div> </div> </div> <div class="container"> <div class="row"> <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> <div class="sphinxsidebarwrapper"> <p class="logo"><a href="../index.html"> <img class="logo" src="../_static/mne_logo_small.png" alt="Logo"/> </a></p><ul> <li><a class="reference internal" href="#">mne.time_frequency.morlet</a></li> </ul> <li> <a href="mne.time_frequency.dpss_windows.html" title="Previous Chapter: mne.time_frequency.dpss_windows"><span class="glyphicon glyphicon-chevron-left visible-sm"></span><span class="hidden-sm hidden-tablet">&laquo; mne.time_freq...</span> </a> </li> <li> <a href="mne.time_frequency.multitaper_psd.html" title="Next Chapter: mne.time_frequency.multitaper_psd"><span class="glyphicon glyphicon-chevron-right visible-sm"></span><span class="hidden-sm hidden-tablet">mne.time_freq... &raquo;</span> </a> </li> <form action="../search.html" method="get"> <div class="form-group"> <input type="text" name="q" class="form-control" placeholder="Search" /> </div> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> </div> </div> <div class="col-md-12"> <div class="section" id="mne-time-frequency-morlet"> <h1>mne.time_frequency.morlet<a class="headerlink" href="#mne-time-frequency-morlet" title="Permalink to this headline">¶</a></h1> <dl class="function"> <dt id="mne.time_frequency.morlet"> <code class="descclassname">mne.time_frequency.</code><code class="descname">morlet</code><span class="sig-paren">(</span><em>sfreq</em>, <em>freqs</em>, <em>n_cycles=7</em>, <em>sigma=None</em>, <em>zero_mean=False</em><span class="sig-paren">)</span><a class="headerlink" href="#mne.time_frequency.morlet" title="Permalink to this definition">¶</a></dt> <dd><p>Compute Wavelets for the given frequency range</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>sfreq</strong> : float</p> <blockquote> <div><p>Sampling Frequency</p> </div></blockquote> <p><strong>freqs</strong> : array</p> <blockquote> <div><p>frequency range of interest (1 x Frequencies)</p> </div></blockquote> <p><strong>n_cycles: float | array of float</strong> :</p> <blockquote> <div><p>Number of cycles. Fixed number or one per frequency.</p> </div></blockquote> <p><strong>sigma</strong> : float, (optional)</p> <blockquote> <div><p>It controls the width of the wavelet ie its temporal resolution. If sigma is None the temporal resolution is adapted with the frequency like for all wavelet transform. The higher the frequency the shorter is the wavelet. If sigma is fixed the temporal resolution is fixed like for the short time Fourier transform and the number of oscillations increases with the frequency.</p> </div></blockquote> <p><strong>zero_mean</strong> : bool</p> <blockquote> <div><p>Make sure the wavelet is zero mean</p> </div></blockquote> </td> </tr> <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>Ws</strong> : list of array</p> <blockquote class="last"> <div><p>Wavelets time series</p> </div></blockquote> </td> </tr> </tbody> </table> <div class="admonition seealso"> <p class="first admonition-title">See also</p> <dl class="last docutils"> <dt><a class="reference internal" href="mne.time_frequency.cwt_morlet.html#mne.time_frequency.cwt_morlet" title="mne.time_frequency.cwt_morlet"><code class="xref py py-obj docutils literal"><span class="pre">mne.time_frequency.cwt_morlet</span></code></a></dt> <dd>Compute time-frequency decomposition with Morlet wavelets</dd> </dl> </div> </dd></dl> </div> </div> </div> </div> <footer class="footer"> <div class="container"> <p class="pull-right"> <a href="#">Back to top</a> <br/> </p> <p> &copy; Copyright 2012-2015, MNE Developers.<br/> </p> </div> </footer> <script src="https://mne.tools/versionwarning.js"></script> </body> </html>
{'content_hash': '33b4a60b564f3476cabdafd9a421702e', 'timestamp': '', 'source': 'github', 'line_count': 273, 'max_line_length': 355, 'avg_line_length': 41.315018315018314, 'alnum_prop': 0.6343647486479298, 'repo_name': 'mne-tools/mne-tools.github.io', 'id': '410fc63619c8b4f53c8813f2b5b1f45e5c13910f', 'size': '11281', 'binary': False, 'copies': '1', 'ref': 'refs/heads/main', 'path': '0.11/generated/mne.time_frequency.morlet.html', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'CSS', 'bytes': '708696'}, {'name': 'Dockerfile', 'bytes': '1820'}, {'name': 'HTML', 'bytes': '1526247783'}, {'name': 'JavaScript', 'bytes': '1323087'}, {'name': 'Jupyter Notebook', 'bytes': '24820047'}, {'name': 'Python', 'bytes': '18575494'}]}