identifier
stringlengths
42
383
collection
stringclasses
1 value
open_type
stringclasses
1 value
license
stringlengths
0
1.81k
date
float64
1.99k
2.02k
title
stringlengths
0
100
creator
stringlengths
1
39
language
stringclasses
157 values
language_type
stringclasses
2 values
word_count
int64
1
20k
token_count
int64
4
1.32M
text
stringlengths
5
1.53M
__index_level_0__
int64
0
57.5k
https://github.com/invisibleboy/mycompiler/blob/master/scripts/find_bench_dir
Github Open Source
Open Source
NCSA
2,014
mycompiler
invisibleboy
Shell
Code
736
1,664
#!/bin/sh ############################################################################### ## ## Illinois Open Source License ## University of Illinois/NCSA ## Open Source License ## ## Copyright (c) 2004, The University of Illinois at Urbana-Champaign. ## All rights reserved. ## ## Developed by: ## ## IMPACT Research Group ## ## University of Illinois at Urbana-Champaign ## ## http://www.crhc.uiuc.edu/IMPACT ## http://www.gelato.org ## ## Permission is hereby granted, free of charge, to any person ## obtaining a copy of this software and associated documentation ## files (the "Software"), to deal with the Software without ## restriction, including without limitation the rights to use, copy, ## modify, merge, publish, distribute, sublicense, and/or sell copies ## of the Software, and to permit persons to whom the Software is ## furnished to do so, subject to the following conditions: ## ## Redistributions of source code must retain the above copyright ## notice, this list of conditions and the following disclaimers. ## ## Redistributions in binary form must reproduce the above copyright ## notice, this list of conditions and the following disclaimers in ## the documentation and/or other materials provided with the ## distribution. ## ## Neither the names of the IMPACT Research Group, the University of ## Illinois, nor the names of its contributors may be used to endorse ## or promote products derived from this Software without specific ## prior written permission. THE SOFTWARE IS PROVIDED "AS IS", ## WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT ## LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A ## PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ## CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES ## OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR ## OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE ## OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. ## ############################################################################### ############################################################################### # # This script searches the benchmark info search path (defined # by various environment variables) for the first directory that # contains a subdirectory with the specified benchmark name. # This script returns this path, or an error message (exit value 1). # # Run this script with no arguments for usage information. # # Script created by John Gyllenhaal, Wen-mei Hwu 10/02/98 # ERROR_FLAG=0; SUPPRESS_USAGE=0; # Get fixed argument(s) if [ $# -eq 1 ]; then # The first argument must be the benchmark name BENCHMARK="$1"; else ERROR_FLAG=1; fi # Find path if not already in error mode if [ $ERROR_FLAG -eq 0 ]; then # Set Trimaran's default benchmark path if TRIMARAN_REL_PATH defined if [ "${TRIMARAN_REL_PATH}" != "" ] ; then TRIMARAN_DEFAULT_BENCH_PATH="${TRIMARAN_REL_PATH}/benchmarks"; else TRIMARAN_DEFAULT_BENCH_PATH=""; fi # Set IMPACT's default benchmark path if IMPACT_REL_PATH defined if [ "${IMPACT_REL_PATH}" != "" ] ; then IMPACT_DEFAULT_BENCH_PATH="${IMPACT_REL_PATH}/benchmarks"; else IMPACT_DEFAULT_BENCH_PATH=""; fi # Search for BENCHMARK subdirectory in all the following paths # Note: /bin/sh ignores undefined paths, so we get the desired behavior BENCH_FOUND=0; for BENCH_PATH in $USER_BENCH_PATH1 $USER_BENCH_PATH2 $USER_BENCH_PATH3 \ $USER_BENCH_PATH4 $TRIMARAN_DEFAULT_BENCH_PATH \ $IMPACT_DEFAULT_BENCH_PATH do if [ -d ${BENCH_PATH}/${BENCHMARK} ] ; then # Found it! Print path and exit with 0 echo "${BENCH_PATH}/${BENCHMARK}" exit 0; fi done # If got here, didn't find it, so must have error echo " "; echo "> Error: find_bench_dir unable to find '${BENCHMARK}' subdirectory!" echo " "; SUPPRESS_USAGE=1; fi # # If got here, must have error, print usage # if [ $SUPPRESS_USAGE -eq 0 ]; then echo "> Usage: find_bench_dir benchmark"; echo "> "; echo "> Searches for the presence of a 'benchmark' subdirectory the following " echo "> environment-variable-specified directories, in the order specified below."; echo "> "; echo "> Prints path to the first 'benchmark' subdirectory found and returns 0."; echo "> If subdirectory is not found, prints error message and returns 1."; echo "> "; fi echo "> Environment Variable Used Current Value"; echo "> ---------------------------- ----------------------------------------------" if [ "${USER_BENCH_PATH1}" != "" ]; then echo "> USER_BENCH_PATH1 ${USER_BENCH_PATH1}"; else echo "> USER_BENCH_PATH1 (undefined)"; fi if [ "${USER_BENCH_PATH2}" != "" ]; then echo "> USER_BENCH_PATH2 ${USER_BENCH_PATH2}"; else echo "> USER_BENCH_PATH2 (undefined)"; fi if [ "${USER_BENCH_PATH3}" != "" ]; then echo "> USER_BENCH_PATH3 ${USER_BENCH_PATH3}"; else echo "> USER_BENCH_PATH3 (undefined)"; fi if [ "${USER_BENCH_PATH4}" != "" ]; then echo "> USER_BENCH_PATH4 ${USER_BENCH_PATH4}"; else echo "> USER_BENCH_PATH4 (undefined)"; fi if [ "${TRIMARAN_REL_PATH}" != "" ]; then echo "> TRIMARAN_REL_PATH/benchmarks ${TRIMARAN_REL_PATH}/benchmarks"; else echo "> TRIMARAN_REL_PATH/benchmarks (undefined)"; fi if [ "${IMPACT_REL_PATH}" != "" ]; then echo "> IMPACT_REL_PATH/benchmarks ${IMPACT_REL_PATH}/benchmarks"; else echo "> IMPACT_REL_PATH/benchmarks (undefined)"; fi exit 1;
8,882
https://github.com/EddieChoCho/spring-amqp/blob/master/spring-rabbit/src/main/java/org/springframework/amqp/rabbit/retry/RejectAndDontRequeueRecoverer.java
Github Open Source
Open Source
Apache-2.0
2,022
spring-amqp
EddieChoCho
Java
Code
289
721
/* * Copyright 2002-2021 the original author or authors. * * 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 * * https://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. */ package org.springframework.amqp.rabbit.retry; import java.util.function.Supplier; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.amqp.AmqpRejectAndDontRequeueException; import org.springframework.amqp.core.Message; import org.springframework.amqp.rabbit.support.ListenerExecutionFailedException; import org.springframework.util.Assert; /** * MessageRecover that causes the listener container to reject * the message without requeuing. This enables failed messages * to be sent to a Dead Letter Exchange/Queue, if the broker is * so configured. * * @author Gary Russell * @since 1.1.2 * */ public class RejectAndDontRequeueRecoverer implements MessageRecoverer { private final Supplier<String> messageSupplier; protected final Log logger = LogFactory.getLog(getClass()); // NOSONAR protected /** * Construct an instance with the default exception message. */ public RejectAndDontRequeueRecoverer() { this(() -> "Retry Policy Exhausted"); } /** * Construct an instance with the provided exception message. * @param message the message. * @since 2.3.7 */ public RejectAndDontRequeueRecoverer(String message) { this(() -> message); } /** * Construct an instance with the provided exception message supplier. * @param messageSupplier the message supplier. * @since 2.3.7 */ public RejectAndDontRequeueRecoverer(Supplier<String> messageSupplier) { Assert.notNull(messageSupplier, "'messageSupplier' cannot be null"); this.messageSupplier = messageSupplier; } @Override public void recover(Message message, Throwable cause) { if (this.logger.isWarnEnabled()) { this.logger.warn("Retries exhausted for message " + message, cause); } throw new ListenerExecutionFailedException(this.messageSupplier.get(), new AmqpRejectAndDontRequeueException(cause), message); } }
24,983
https://github.com/tefra/xsdata-w3c-tests/blob/master/output/instances/msData/particles/particlesIf006.py
Github Open Source
Open Source
MIT
2,023
xsdata-w3c-tests
tefra
Python
Code
9
46
from output.models.ms_data.particles.particles_if006_xsd.particles_if006 import Doc obj = Doc( e1_or_e2="" )
27,113
https://github.com/yantrajs/yantra/blob/master/YantraJS.Core.Tests/Generator/Files/es5/Function/class.js
Github Open Source
Open Source
Apache-2.0
2,022
yantra
yantrajs
JavaScript
Code
21
72
var AmdLoader = (function () { function AmdLoader() { this.name = "loader"; }; AmdLoader.instance = new AmdLoader(); return AmdLoader; }()); assert.strictEqual(AmdLoader.instance.name,"loader");
49,186
https://github.com/bluestone029/epub-reader/blob/master/app/js/renderer/main.jsx
Github Open Source
Open Source
MIT
2,019
epub-reader
bluestone029
JavaScript
Code
85
258
import React from 'react'; import ReactDOM from 'react-dom'; import { applyMiddleware, createStore } from 'redux'; import { Provider } from 'react-redux'; import { createLogger } from 'redux-logger'; import thunk from 'redux-thunk'; import Api from './mainApi'; import App from './containers/app_container'; import { reducer, prepareSavedState } from './redux/reducers'; Api.registerServiceApi(); Api.getSavedState(prepareSavedState, initialState => { const docRoot = document.getElementById('root'); const logger = createLogger({ collapsed: true, duration: true, diff: true }); const store = createStore( reducer, initialState, applyMiddleware(thunk, logger) ); Api.setReduxStore(store); ReactDOM.render( <Provider store={store}> <App /> </Provider>, docRoot ); });
20,395
https://github.com/mortenbakkedal/SharpMath/blob/master/SharpMath/LinearAlgebra/AlgLib/ablasf.cs
Github Open Source
Open Source
MIT
2,016
SharpMath
mortenbakkedal
C#
Code
745
1,986
// SharpMath - C# Mathematical Library /************************************************************************* Copyright (c) 2009, Sergey Bochkanov (ALGLIB project). >>> SOURCE LICENSE >>> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation (www.fsf.org); either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. A copy of the GNU General Public License is available at http://www.fsf.org/licensing/licenses >>> END OF LICENSE >>> *************************************************************************/ using System; namespace SharpMath.LinearAlgebra.AlgLib { internal class ablasf { /************************************************************************* Fast kernel -- ALGLIB routine -- 19.01.2010 Bochkanov Sergey *************************************************************************/ public static bool cmatrixrank1f(int m, int n, ref AP.Complex[,] a, int ia, int ja, ref AP.Complex[] u, int iu, ref AP.Complex[] v, int iv) { bool result = new bool(); result = false; return result; } /************************************************************************* Fast kernel -- ALGLIB routine -- 19.01.2010 Bochkanov Sergey *************************************************************************/ public static bool rmatrixrank1f(int m, int n, ref double[,] a, int ia, int ja, ref double[] u, int iu, ref double[] v, int iv) { bool result = new bool(); result = false; return result; } /************************************************************************* Fast kernel -- ALGLIB routine -- 19.01.2010 Bochkanov Sergey *************************************************************************/ public static bool cmatrixmvf(int m, int n, ref AP.Complex[,] a, int ia, int ja, int opa, ref AP.Complex[] x, int ix, ref AP.Complex[] y, int iy) { bool result = new bool(); result = false; return result; } /************************************************************************* Fast kernel -- ALGLIB routine -- 19.01.2010 Bochkanov Sergey *************************************************************************/ public static bool rmatrixmvf(int m, int n, ref double[,] a, int ia, int ja, int opa, ref double[] x, int ix, ref double[] y, int iy) { bool result = new bool(); result = false; return result; } /************************************************************************* Fast kernel -- ALGLIB routine -- 19.01.2010 Bochkanov Sergey *************************************************************************/ public static bool cmatrixrighttrsmf(int m, int n, ref AP.Complex[,] a, int i1, int j1, bool isupper, bool isunit, int optype, ref AP.Complex[,] x, int i2, int j2) { bool result = new bool(); result = false; return result; } /************************************************************************* Fast kernel -- ALGLIB routine -- 19.01.2010 Bochkanov Sergey *************************************************************************/ public static bool cmatrixlefttrsmf(int m, int n, ref AP.Complex[,] a, int i1, int j1, bool isupper, bool isunit, int optype, ref AP.Complex[,] x, int i2, int j2) { bool result = new bool(); result = false; return result; } /************************************************************************* Fast kernel -- ALGLIB routine -- 19.01.2010 Bochkanov Sergey *************************************************************************/ public static bool rmatrixrighttrsmf(int m, int n, ref double[,] a, int i1, int j1, bool isupper, bool isunit, int optype, ref double[,] x, int i2, int j2) { bool result = new bool(); result = false; return result; } /************************************************************************* Fast kernel -- ALGLIB routine -- 19.01.2010 Bochkanov Sergey *************************************************************************/ public static bool rmatrixlefttrsmf(int m, int n, ref double[,] a, int i1, int j1, bool isupper, bool isunit, int optype, ref double[,] x, int i2, int j2) { bool result = new bool(); result = false; return result; } /************************************************************************* Fast kernel -- ALGLIB routine -- 19.01.2010 Bochkanov Sergey *************************************************************************/ public static bool cmatrixsyrkf(int n, int k, double alpha, ref AP.Complex[,] a, int ia, int ja, int optypea, double beta, ref AP.Complex[,] c, int ic, int jc, bool isupper) { bool result = new bool(); result = false; return result; } /************************************************************************* Fast kernel -- ALGLIB routine -- 19.01.2010 Bochkanov Sergey *************************************************************************/ public static bool rmatrixsyrkf(int n, int k, double alpha, ref double[,] a, int ia, int ja, int optypea, double beta, ref double[,] c, int ic, int jc, bool isupper) { bool result = new bool(); result = false; return result; } /************************************************************************* Fast kernel -- ALGLIB routine -- 19.01.2010 Bochkanov Sergey *************************************************************************/ public static bool rmatrixgemmf(int m, int n, int k, double alpha, ref double[,] a, int ia, int ja, int optypea, ref double[,] b, int ib, int jb, int optypeb, double beta, ref double[,] c, int ic, int jc) { bool result = new bool(); result = false; return result; } /************************************************************************* Fast kernel -- ALGLIB routine -- 19.01.2010 Bochkanov Sergey *************************************************************************/ public static bool cmatrixgemmf(int m, int n, int k, AP.Complex alpha, ref AP.Complex[,] a, int ia, int ja, int optypea, ref AP.Complex[,] b, int ib, int jb, int optypeb, AP.Complex beta, ref AP.Complex[,] c, int ic, int jc) { bool result = new bool(); result = false; return result; } } }
42,049
https://github.com/feliposz/sicp-solutions/blob/master/section3_5_exercise3_73.scm
Github Open Source
Open Source
MIT
2,020
sicp-solutions
feliposz
Scheme
Code
194
686
; Procedures (define (add-streams s1 s2) (cond ((empty-stream? s1) s2) ((empty-stream? s2) s1) (else (cons-stream (+ (head s1) (head s2)) (add-streams (tail s1) (tail s2)))))) (define (scale-stream c s) (stream-map (lambda (x) (* x c)) s)) (define (integral integrand initial-value dt) (define int (cons-stream initial-value (add-streams (scale-stream dt integrand) int))) int) ; Exercise 3.73 ; RC circuit (define (rc res cap dt) (lambda (s) (add-streams (scale-stream res s) (integral (scale-stream (/ 1 cap) s) (stream-car s) dt)))) (define rc1 (rc 5 1 0.5)) ;(print-n (rc1 integers) 10) ; Exercise 3.74 ; Original (define (make-zero-crossings input-stream last-value) (cons-stream (sign-change-detector (stream-car input-stream) last-value) (make-zero-crossings (stream-cdr input-stream) (stream-car input-stream)))) (define zero-crossings (make-zero-crossings sense-data 0)) ; Map version (define zero-crossings (stream-map sign-change-detector sense-data (cons-stream 0 sense-data))) ; Exercise 3.75 (define (make-zero-crossings input-stream last-value last-avpt) (let ((avpt (/ (+ (stream-car input-stream) last-value) 2))) (cons-stream (sign-change-detector avpt last-avpt) (make-zero-crossings (stream-cdr input-stream) (stream-car input-stream) avpt)))) ; Exercise 3.76 (define (average x y) (/ (+ x y) 2)) (define (smooth-stream proc s) (define (smoother s last) (cons-stream (proc (stream-car s) last) (smoother (stream-cdr s) (stream-car s)))) (smoother s 0)) (define smoothed-sense-data (smooth-stream average sense-data)) (define zero-crossings (stream-map sign-change-detector smoothed-sense-data (cons-stream 0 smoothed-sense-data)))
8,137
https://github.com/mukeshbpatel/SocietyManagement/blob/master/SocietyManagement/SocietyManagement/obj/Release/Package/PackageTmp/Views/ForumComment/Details.cshtml
Github Open Source
Open Source
Apache-2.0
null
SocietyManagement
mukeshbpatel
C#
Code
137
700
@model SocietyManagement.Models.ForumComment @{ ViewBag.Title = "Details"; } <h2>Details</h2> <div> <h4>ForumComment</h4> <hr /> <dl class="dl-horizontal"> <dt> @Html.DisplayNameFor(model => model.Comment) </dt> <dd> @Html.DisplayFor(model => model.Comment) </dd> <dt> @Html.DisplayNameFor(model => model.IsDeleted) </dt> <dd> @Html.DisplayFor(model => model.IsDeleted) </dd> <dt> @Html.DisplayNameFor(model => model.UDK1) </dt> <dd> @Html.DisplayFor(model => model.UDK1) </dd> <dt> @Html.DisplayNameFor(model => model.UDK2) </dt> <dd> @Html.DisplayFor(model => model.UDK2) </dd> <dt> @Html.DisplayNameFor(model => model.UDK3) </dt> <dd> @Html.DisplayFor(model => model.UDK3) </dd> <dt> @Html.DisplayNameFor(model => model.UserID) </dt> <dd> @Html.DisplayFor(model => model.UserID) </dd> <dt> @Html.DisplayNameFor(model => model.CreatedDate) </dt> <dd> @Html.DisplayFor(model => model.CreatedDate) </dd> <dt> @Html.DisplayNameFor(model => model.ModifiedDate) </dt> <dd> @Html.DisplayFor(model => model.ModifiedDate) </dd> <dt> @Html.DisplayNameFor(model => model.Author.Name) </dt> <dd> @Html.DisplayFor(model => model.Author.Name) </dd> <dt> @Html.DisplayNameFor(model => model.Forum.AuthorID) </dt> <dd> @Html.DisplayFor(model => model.Forum.AuthorID) </dd> </dl> </div> <p> @Html.ActionLink("Edit", "Edit", new { id = Model.CommentID }) | <a class="btn btn-success" href="#" onclick="goBack()" title="Go Back"><span class="fa fa-backward"></span> Back</a> </p>
19,128
https://github.com/appolloford/UCLCHEM/blob/master/src/chemistry.f90
Github Open Source
Open Source
MIT
2,020
UCLCHEM
appolloford
Fortran Free Form
Code
1,117
4,132
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! Chemistry module of UCL_CHEM. ! ! Contains all the core machinery of the code, not really intended to be altered in standard ! ! use. Use a (custom) physics module to alter temp/density behaviour etc. ! ! ! ! chemistry module contains rates.f90, a series of subroutines to calculate all reaction rates! ! when updateChemistry is called from main, these rates are calculated, the ODEs are solved ! ! from currentTime to targetTime to get abundances at targetTime and then all abundances are ! ! written to the fullOutput file. ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! MODULE chemistry USE physics USE dvode_f90_m USE network USE photoreactions USE surfacereactions USE constants IMPLICIT NONE !These integers store the array index of important species and reactions, x is for ions INTEGER :: njunk,evapevents,ngrainco,readAbunds !loop counters INTEGER :: i,j,l,writeStep,writeCounter=0 !Flags to control desorption processes INTEGER :: h2desorb,crdesorb,uvdesorb,desorb,thermdesorb !Array to store reaction rates REAL(dp) :: rate(nreac) !Option column output character(LEN=15),ALLOCATABLE :: outSpecies(:) logical :: columnOutput=.False.,fullOutput=.False. INTEGER :: nout INTEGER, ALLOCATABLE :: outIndx(:) !DLSODE variables INTEGER :: ITASK,ISTATE,NEQ,MXSTEP REAL(dp) :: reltol REAL(dp), ALLOCATABLE :: abstol(:) TYPE(VODE_OPTS) :: OPTIONS !initial fractional elemental abudances and arrays to store abundances REAL(dp) :: fh,fd,fhe,fc,fo,fn,fs,fmg,fsi,fcl,fp,ff,fli,fna,fpah,f15n,f13c,f18O REAL(dp) :: h2col,cocol,ccol REAL(dp),ALLOCATABLE :: abund(:,:),mantle(:) !Variables controlling chemistry REAL(dp) :: radfield,zeta,fr,omega,grainArea,cion,h2form,h2dis,lastTemp=0.0 REAL(dp) :: ebmaxh2,epsilon,ebmaxcrf,ebmaxcr,phi,ebmaxuvcr,uv_yield,uvcreff REAL(dp), ALLOCATABLE ::vdiff(:) REAL(dp) :: turbVel=1.0 CONTAINS !This gets called immediately by main so put anything here that you want to happen before the time loop begins, reader is necessary. SUBROUTINE initializeChemistry NEQ=nspec+1 IF (ALLOCATED(abund)) DEALLOCATE(abund,vdiff,mantle) ALLOCATE(abund(NEQ,points),vdiff(SIZE(grainList))) CALL fileSetup !if this is the first step of the first phase, set initial abundances !otherwise reader will fix it IF (readAbunds.eq.0) THEN !ensure abund is initially zero abund= 0. !As default, have half in molecular hydrogen and half in atomic hydrogen abund(nh2,:) = 0.5*(1.0e0-fh) abund(nh,:) = fh !some elements default to atoms abund(nd,:)=fd abund(nhe,:) = fhe abund(no,:) = fo abund(nn,:) = fn abund(nmg,:) = fmg abund(np,:) = fp abund(nf,:) = ff abund(nna,:) = fna abund(nli,:) = fli abund(npah,:) = fpah !others to ions abund(nsx,:) = fs abund(nsix,:) = fsi abund(nclx,:) = fcl !isotopes abund(n18o,:) = f18o abund(n15n,:) = f15n abund(n13c,:) = f13c abund(nspec+1,:)=density !Decide how much carbon is initiall ionized using parameters.f90 SELECT CASE (ion) CASE(0) abund(nc,:)=fc abund(ncx,:)=1.d-10 CASE(1) abund(nc,:)=fc*0.5 abund(ncx,:)=fc*0.5 CASE(2) abund(nc,:)=1.d-10 abund(ncx,:)=fc END SELECT abund(nspec,:)=abund(ncx,:)+abund(nsix,:)+abund(nsx,:)+abund(nclx,:) ENDIF !Initial calculations of diffusion frequency for each species bound to grain !and other parameters required for diffusion reactions DO i=lbound(grainList,1),ubound(grainList,1) j=grainList(i) vdiff(i)=VDIFF_PREFACTOR*bindingEnergy(i)/mass(j) vdiff(i)=dsqrt(vdiff(i)) END DO !h2 formation rate initially set h2form = h2FormRate(gasTemp(dstep),dustTemp(dstep)) ALLOCATE(mantle(points)) DO l=1,points mantle(l)=sum(abund(grainList,l)) END DO !DVODE SETTINGS ISTATE=1;;ITASK=1 reltol=1e-4;MXSTEP=10000 IF (.NOT. ALLOCATED(abstol)) THEN ALLOCATE(abstol(NEQ)) END IF !OPTIONS = SET_OPTS(METHOD_FLAG=22, ABSERR_VECTOR=abstol, RELERR=reltol,USER_SUPPLIED_JACOBIAN=.FALSE.) END SUBROUTINE initializeChemistry !Reads input reaction and species files as well as the final step of previous run if this is phase 2 SUBROUTINE fileSetup IMPLICIT NONE integer i,j,l,m REAL(dp) junktemp INQUIRE(UNIT=11, OPENED=columnOutput) IF (columnOutput) write(11,333) specName(outIndx) 333 format("Time,Density,gasTemp,av,",(999(A,:,','))) INQUIRE(UNIT=10, OPENED=fullOutput ) IF (fullOutput) THEN write(10,334) fc,fo,fn,fs write(10,*) "Radfield ", radfield, " Zeta ",zeta write(10,335) specName END IF 335 format("Time,Density,gasTemp,av,point,",(999(A,:,','))) 334 format("Elemental abundances, C:",1pe15.5e3," O:",1pe15.5e3," N:",1pe15.5e3," S:",1pe15.5e3) !read start file if choosing to use abundances from previous run ! IF (readAbunds .eq. 1) THEN DO l=1,points READ(7,*) fhe,fc,fo,fn,fs,fmg READ(7,*) abund(:nspec,l) REWIND(7) abund(nspec+1,l)=density(l) END DO 7010 format((999(1pe15.5,:,','))) END IF END SUBROUTINE fileSetup !Writes physical variables and fractional abundances to output file, called every time step. SUBROUTINE output IF (fullOutput) THEN write(10,8020) timeInYears,density(dstep),gasTemp(dstep),av(dstep),dstep,abund(:neq-1,dstep) 8020 format(1pe11.3,',',1pe11.4,',',0pf8.2,',',1pe11.4,',',I4,',',(999(1pe15.5,:,','))) END IF !If this is the last time step of phase I, write a start file for phase II IF (readAbunds .eq. 0) THEN IF (switch .eq. 0 .and. timeInYears .ge. finalTime& &.or. switch .eq. 1 .and.density(dstep) .ge. finalDens) THEN write(7,*) fhe,fc,fo,fn,fs,fmg write(7,8010) abund(:neq-1,dstep) ENDIF ENDIF 8010 format((999(1pe15.5,:,','))) !Every 'writestep' timesteps, write the chosen species out to separate file !choose species you're interested in by looking at parameters.f90 IF (writeCounter==writeStep .and. columnOutput) THEN writeCounter=1 write(11,8030) timeInYears,density(dstep),gasTemp(dstep),av(dstep),abund(outIndx,dstep) 8030 format(1pe11.3,',',1pe11.4,',',0pf8.2,',',1pe11.4,',',(999(1pe15.5,:,','))) ELSE writeCounter=writeCounter+1 END IF END SUBROUTINE output SUBROUTINE updateChemistry !Called every time/depth step and updates the abundances of all the species !allow option for dens to have been changed elsewhere. IF (collapse .ne. 1) abund(nspec+1,dstep)=density(dstep) !y is at final value of previous depth iteration so set to initial values of this depth with abund !reset other variables for good measure h2form = h2FormRate(gasTemp(dstep),dustTemp(dstep)) !Sum of abundaces of all mantle species. mantleindx stores the indices of mantle species. mantle(dstep)=sum(abund(grainList,dstep)) !evaluate co and h2 column densities for use in rate calculations !sum column densities of each point up to dstep. boxlength and dens are pulled out of the sum as common factors IF (dstep.gt.1) THEN h2col=(sum(abund(nh2,:dstep-1)*density(:dstep-1))+0.5*abund(nh2,dstep)*density(dstep))*(cloudSize/real(points)) cocol=(sum(abund(nco,:dstep-1)*density(:dstep-1))+0.5*abund(nco,dstep)*density(dstep))*(cloudSize/real(points)) ccol=(sum(abund(nc,:dstep-1)*density(:dstep-1))+0.5*abund(nc,dstep)*density(dstep))*(cloudSize/real(points)) ELSE h2col=0.5*abund(nh2,dstep)*density(dstep)*(cloudSize/real(points)) cocol=0.5*abund(nco,dstep)*density(dstep)*(cloudSize/real(points)) ccol=0.5*abund(nc,dstep)*density(dstep)*(cloudSize/real(points)) ENDIF !call the actual ODE integrator CALL integrate !1.d-30 stops numbers getting too small for fortran. WHERE(abund<1.0d-30) abund=1.0d-30 density(dstep)=abund(NEQ,dstep) END SUBROUTINE updateChemistry SUBROUTINE integrate !This subroutine calls DVODE (3rd party ODE solver) until it can reach targetTime with acceptable errors (reltol/abstol) DO WHILE(currentTime .lt. targetTime) !reset parameters for DVODE ITASK=1 !try to integrate to targetTime ISTATE=1 !pretend every step is the first reltol=1e-4 !relative tolerance effectively sets decimal place accuracy abstol=1.0d-14*abund(:,dstep) !absolute tolerances depend on value of abundance WHERE(abstol<1d-30) abstol=1d-30 ! to a minimum degree !get reaction rates for this iteration CALL calculateReactionRates !Call the integrator. OPTIONS = SET_OPTS(METHOD_FLAG=22, ABSERR_VECTOR=abstol, RELERR=reltol,USER_SUPPLIED_JACOBIAN=.FALSE.,MXSTEP=MXSTEP) CALL DVODE_F90(F,NEQ,abund(:,dstep),currentTime,targetTime,ITASK,ISTATE,OPTIONS) SELECT CASE(ISTATE) CASE(-1) !More steps required for this problem MXSTEP=MXSTEP*2 CASE(-2) !Tolerances are too small for machine but succesful to current currentTime abstol=abstol*10.0 CASE(-3) write(*,*) "DVODE found invalid inputs" write(*,*) "abstol:" write(*,*) abstol STOP CASE(-4) !Successful as far as currentTime but many errors. !Make targetTime smaller and just go again targetTime=currentTime+10.0*SECONDS_PER_YEAR CASE(-5) targetTime=currentTime*1.01 END SELECT END DO END SUBROUTINE integrate !This is where reacrates subroutine is hidden include 'rates.f90' SUBROUTINE F (NEQ, T, Y, YDOT) INTEGER, PARAMETER :: WP = KIND(1.0D0) INTEGER NEQ REAL(WP) T REAL(WP), DIMENSION(NEQ) :: Y, YDOT INTENT(IN) :: NEQ, T, Y INTENT(OUT) :: YDOT REAL(dp) :: D,loss,prod !Set D to the gas density for use in the ODEs D=y(NEQ) ydot=0.0 !The ODEs created by MakeRates go here, they are essentially sums of terms that look like k(1,2)*y(1)*y(2)*dens. Each species ODE is made up !of the reactions between it and every other species it reacts with. INCLUDE 'odes.f90' !H2 formation should occur at both steps - however note that here there is no !temperature dependence. y(nh) is hydrogen fractional abundance. ydot(nh) = ydot(nh) - 2.0*( h2form*y(nh)*D - h2dis*y(nh2) ) ! h2 formation - h2-photodissociation ydot(nh2) = ydot(nh2) + h2form*y(nh)*D - h2dis*y(nh2) ! h2 formation - h2-photodissociation ! get density change from physics module to send to DLSODE IF (collapse .eq. 1) ydot(NEQ)=densdot(y(NEQ)) END SUBROUTINE F SUBROUTINE debugout open(79,file='output/debuglog',status='unknown') !debug file. write(79,*) "Integrator failed, printing relevant debugging information" write(79,*) "dens",density(dstep) write(79,*) "density in integration array",abund(nspec+1,dstep) write(79,*) "Av", av(dstep) write(79,*) "Mantle", mantle(dstep) write(79,*) "Temp", gasTemp(dstep) DO i=1,nreac if (rate(i) .ge. huge(i)) write(79,*) "Rate(",i,") is potentially infinite" END DO END SUBROUTINE debugout END MODULE chemistry
39,338
https://github.com/itancio/cs195-project/blob/master/src/ui/js/components/Menu.js
Github Open Source
Open Source
Unlicense
null
cs195-project
itancio
JavaScript
Code
82
292
import storage from "../storage.js"; /** * This interface represents the main landing title and level selection screen. */ const Menu = { render(root) { const menuHTML = ` <div id="menu"> <h1>Sokoban</h1> <div class="attribution"> <em>by Irvin, Juan, Severin & Greg</em> </div> <ul> ${[...Array(Module.ccall("sokoban_levels_size"))].map((_, i) => ` <li> <a href="#${i + 1}"> <span class="material-symbols-outlined"> ${storage.bestScore(i) === undefined ? "check_box_outline_blank" : "check_box"} </span> <span>level ${i + 1}</span> <span>best: ${storage.bestScore(i) || "n/a"}</span> </a> </li> `).join("")} </ul> </div> `; root.innerHTML = menuHTML; } }; export default Menu;
41,178
https://github.com/tulindo/home-assistant/blob/master/homeassistant/helpers/network.py
Github Open Source
Open Source
Apache-2.0
null
home-assistant
tulindo
Python
Code
538
2,015
"""Network helpers.""" from ipaddress import ip_address from typing import cast import yarl from homeassistant.core import HomeAssistant, callback from homeassistant.exceptions import HomeAssistantError from homeassistant.loader import bind_hass from homeassistant.util.network import ( is_ip_address, is_local, is_loopback, is_private, normalize_url, ) TYPE_URL_INTERNAL = "internal_url" TYPE_URL_EXTERNAL = "external_url" class NoURLAvailableError(HomeAssistantError): """An URL to the Home Assistant instance is not available.""" @bind_hass @callback def async_get_url( hass: HomeAssistant, *, require_ssl: bool = False, require_standard_port: bool = False, allow_internal: bool = True, allow_external: bool = True, allow_cloud: bool = True, allow_ip: bool = True, prefer_external: bool = False, prefer_cloud: bool = False, ) -> str: """Get a URL to this instance.""" order = [TYPE_URL_INTERNAL, TYPE_URL_EXTERNAL] if prefer_external: order.reverse() # Try finding an URL in the order specified for url_type in order: if allow_internal and url_type == TYPE_URL_INTERNAL: try: return _async_get_internal_url( hass, allow_ip=allow_ip, require_ssl=require_ssl, require_standard_port=require_standard_port, ) except NoURLAvailableError: pass if allow_external and url_type == TYPE_URL_EXTERNAL: try: return _async_get_external_url( hass, allow_cloud=allow_cloud, allow_ip=allow_ip, prefer_cloud=prefer_cloud, require_ssl=require_ssl, require_standard_port=require_standard_port, ) except NoURLAvailableError: pass # We have to be honest now, we have no viable option available raise NoURLAvailableError @bind_hass @callback def _async_get_internal_url( hass: HomeAssistant, *, allow_ip: bool = True, require_ssl: bool = False, require_standard_port: bool = False, ) -> str: """Get internal URL of this instance.""" if hass.config.internal_url: internal_url = yarl.URL(hass.config.internal_url) if ( (not require_ssl or internal_url.scheme == "https") and (not require_standard_port or internal_url.is_default_port()) and (allow_ip or not is_ip_address(str(internal_url.host))) ): return normalize_url(str(internal_url)) # Fallback to old base_url try: return _async_get_deprecated_base_url( hass, internal=True, allow_ip=allow_ip, require_ssl=require_ssl, require_standard_port=require_standard_port, ) except NoURLAvailableError: pass # Fallback to detected local IP if allow_ip and not ( require_ssl or hass.config.api is None or hass.config.api.use_ssl ): ip_url = yarl.URL.build( scheme="http", host=hass.config.api.local_ip, port=hass.config.api.port ) if not is_loopback(ip_address(ip_url.host)) and ( not require_standard_port or ip_url.is_default_port() ): return normalize_url(str(ip_url)) raise NoURLAvailableError @bind_hass @callback def _async_get_external_url( hass: HomeAssistant, *, allow_cloud: bool = True, allow_ip: bool = True, prefer_cloud: bool = False, require_ssl: bool = False, require_standard_port: bool = False, ) -> str: """Get external URL of this instance.""" if prefer_cloud and allow_cloud: try: return _async_get_cloud_url(hass) except NoURLAvailableError: pass if hass.config.external_url: external_url = yarl.URL(hass.config.external_url) if ( (allow_ip or not is_ip_address(str(external_url.host))) and (not require_standard_port or external_url.is_default_port()) and ( not require_ssl or ( external_url.scheme == "https" and not is_ip_address(str(external_url.host)) ) ) ): return normalize_url(str(external_url)) try: return _async_get_deprecated_base_url( hass, allow_ip=allow_ip, require_ssl=require_ssl, require_standard_port=require_standard_port, ) except NoURLAvailableError: pass if allow_cloud: try: return _async_get_cloud_url(hass) except NoURLAvailableError: pass raise NoURLAvailableError @bind_hass @callback def _async_get_cloud_url(hass: HomeAssistant) -> str: """Get external Home Assistant Cloud URL of this instance.""" if "cloud" in hass.config.components: try: return cast(str, hass.components.cloud.async_remote_ui_url()) except hass.components.cloud.CloudNotAvailable: pass raise NoURLAvailableError @bind_hass @callback def _async_get_deprecated_base_url( hass: HomeAssistant, *, internal: bool = False, allow_ip: bool = True, require_ssl: bool = False, require_standard_port: bool = False, ) -> str: """Work with the deprecated `base_url`, used as fallback.""" if hass.config.api is None or not hass.config.api.deprecated_base_url: raise NoURLAvailableError base_url = yarl.URL(hass.config.api.deprecated_base_url) # Rules that apply to both internal and external if ( (allow_ip or not is_ip_address(str(base_url.host))) and (not require_ssl or base_url.scheme == "https") and (not require_standard_port or base_url.is_default_port()) ): # Check to ensure an internal URL if internal and ( str(base_url.host).endswith(".local") or ( is_ip_address(str(base_url.host)) and not is_loopback(ip_address(base_url.host)) and is_private(ip_address(base_url.host)) ) ): return normalize_url(str(base_url)) # Check to ensure an external URL (a little) if ( not internal and not str(base_url.host).endswith(".local") and not ( is_ip_address(str(base_url.host)) and is_local(ip_address(str(base_url.host))) ) ): return normalize_url(str(base_url)) raise NoURLAvailableError
31,477
https://github.com/phpchap/symfony14-beauty-salon/blob/master/apps/backend/modules/SpecialOffer/actions/actions.class.php
Github Open Source
Open Source
MIT
2,013
symfony14-beauty-salon
phpchap
PHP
Code
38
144
<?php require_once dirname(__FILE__).'/../lib/SpecialOfferGeneratorConfiguration.class.php'; require_once dirname(__FILE__).'/../lib/SpecialOfferGeneratorHelper.class.php'; /** * SpecialOffer actions. * * @package sf_sandbox * @subpackage SpecialOffer * @author Your name here * @version SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $ */ class SpecialOfferActions extends autoSpecialOfferActions { }
32,196
https://github.com/danielSoler93/modtox/blob/master/modtox/retrievers/retrieverABC.py
Github Open Source
Open Source
Apache-2.0
2,020
modtox
danielSoler93
Python
Code
35
94
from abc import ABC, abstractmethod from dataclasses import dataclass class Retriever(ABC): def __init__(self) -> None: self.ids = dict() self.activities = list() @abstractmethod def retrieve_by_target(self): """Accepts UniProt accession code as argument. Sets self.ids and self.activities attributes."""
13,564
https://github.com/pseudovector/Linkis/blob/master/linkis-engineconn-plugins/linkis-engineconn-plugin-framework/linkis-engineconn-plugin-loader/src/main/java/com/webank/wedatasphere/linkis/manager/engineplugin/manager/loaders/DefaultEngineConnPluginLoader.java
Github Open Source
Open Source
Apache-2.0
2,020
Linkis
pseudovector
Java
Code
816
2,846
/* * Copyright 2019 WeBank * * 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. */ package com.webank.wedatasphere.linkis.manager.engineplugin.manager.loaders; import com.webank.wedatasphere.linkis.common.exception.ErrorException; import com.webank.wedatasphere.linkis.manager.engineplugin.common.EngineConnPlugin; import com.webank.wedatasphere.linkis.manager.engineplugin.common.loader.entity.EngineConnPluginInfo; import com.webank.wedatasphere.linkis.manager.engineplugin.common.loader.entity.EngineConnPluginInstance; import com.webank.wedatasphere.linkis.manager.engineplugin.common.loader.exception.EngineConnPluginLoadException; import com.webank.wedatasphere.linkis.manager.engineplugin.common.loader.exception.EngineConnPluginNotFoundException; import com.webank.wedatasphere.linkis.manager.engineplugin.manager.classloader.EngineConnPluginClassLoader; import com.webank.wedatasphere.linkis.manager.engineplugin.manager.config.EngineConnPluginLoaderConf; import com.webank.wedatasphere.linkis.manager.engineplugin.manager.loaders.resource.LocalEngineConnPluginResourceLoader; import com.webank.wedatasphere.linkis.manager.engineplugin.manager.loaders.resource.PluginResource; import com.webank.wedatasphere.linkis.manager.engineplugin.manager.utils.EngineConnPluginUtils; import com.webank.wedatasphere.linkis.manager.engineplugin.manager.utils.ExceptionHelper; import com.webank.wedatasphere.linkis.manager.label.entity.engine.EngineTypeLabel; import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOException; import java.lang.reflect.Constructor; import java.net.URI; import java.net.URISyntaxException; import java.util.*; public class DefaultEngineConnPluginLoader extends CacheablesEngineConnPluginLoader { private static final Logger LOG = LoggerFactory.getLogger(DefaultEngineConnPluginLoader.class); private final List<EngineConnPluginsResourceLoader> resourceLoaders = new ArrayList<>(); private String rootStorePath; private String pluginPropsName; private static final String PLUGIN_DIR = "plugin"; public DefaultEngineConnPluginLoader() throws ErrorException { //Check store path (is necessary) String storePath = EngineConnPluginLoaderConf.ENGINE_PLUGIN_STORE_PATH().getValue(); if (StringUtils.isBlank(storePath)) { ExceptionHelper.dealErrorException(70061, "You should defined [" + EngineConnPluginLoaderConf.ENGINE_PLUGIN_STORE_PATH().key() + "] in properties file", null); } //The path can be uri try { URI storeUri = new URI(storePath); if(null != storeUri.getScheme()){ File storeDir = new File(storeUri); storePath = storeDir.getAbsolutePath(); } } catch (URISyntaxException e) { //Ignore } catch (IllegalArgumentException e){ ExceptionHelper.dealErrorException(70061, "The value:[" + storePath +"] of [" + EngineConnPluginLoaderConf.ENGINE_PLUGIN_STORE_PATH().key() + "] is incorrect", e); } this.rootStorePath = storePath; this.pluginPropsName = EngineConnPluginLoaderConf.ENGINE_PLUGIN_PROPERTIES_NAME().getValue(); //Prepare inner loaders // resourceLoaders.add(new BmlEngineConnPluginResourceLoader()); resourceLoaders.add(new LocalEngineConnPluginResourceLoader()); } @Override protected EngineConnPluginInstance loadEngineConnPluginInternal(EngineConnPluginInfo enginePluginInfo) throws Exception { //Build save path String savePath = rootStorePath; EngineTypeLabel typeLabel = enginePluginInfo.typeLabel(); if (!savePath.endsWith(String.valueOf(IOUtils.DIR_SEPARATOR))) { savePath += IOUtils.DIR_SEPARATOR; } savePath += IOUtils.DIR_SEPARATOR + typeLabel.getEngineType() + IOUtils.DIR_SEPARATOR + PLUGIN_DIR + IOUtils.DIR_SEPARATOR; if (StringUtils.isNoneBlank(typeLabel.getVersion())) { savePath += typeLabel.getVersion() + IOUtils.DIR_SEPARATOR; } //Try to fetch resourceId from configuration /* if (StringUtils.isBlank(enginePluginInfo.resourceId())) { String identify = EngineConnPluginLoaderConf.ENGINE_PLUGIN_RESOURCE_ID_NAME_PREFIX() + typeLabel.getEngineType() + "-" + typeLabel.getVersion(); String resourceIdInConf = BDPConfiguration.get(identify); if (StringUtils.isNotBlank(resourceIdInConf)) { LOG.info("Fetch resourceId:[" + resourceIdInConf + "] from properties:[" + identify + "]"); enginePluginInfo.resourceId_$eq(resourceIdInConf); } }*/ EngineConnPlugin enginePlugin = null; //Load the resource of engine plugin PluginResource pluginResource = null; for (int i = 0; i < resourceLoaders.size(); i++) { PluginResource resource = resourceLoaders.get(i).loadEngineConnPluginResource(enginePluginInfo, savePath); if (null != resource) { if (null == pluginResource) { pluginResource = resource; } else { //Merge plugin resource pluginResource.merge(pluginResource); } } } if (null != pluginResource && null != pluginResource.getUrls() && pluginResource.getUrls().length > 0) { //Load engine plugin properties file Map<String, Object> props = readFromProperties(savePath + pluginPropsName); //Build engine classloader ClassLoader currentClassLoader = Thread.currentThread().getContextClassLoader(); EngineConnPluginClassLoader enginePluginClassLoader = new EngineConnPluginClassLoader(pluginResource.getUrls(), currentClassLoader); //Load the engine plugin object enginePlugin = loadEngineConnPlugin(enginePluginClassLoader, props); if(null != enginePlugin){ //Need to init engine plugin ? LOG.info("Init engine conn plugin:[name: " + typeLabel.getEngineType() + ", version: " + typeLabel.getVersion() + "], invoke method init() "); initEngineConnPlugin(enginePlugin, props); //New another plugin info EngineConnPluginInfo newPluginInfo = new EngineConnPluginInfo(typeLabel, pluginResource.getUpdateTime(), pluginResource.getId(), pluginResource.getVersion(), enginePluginClassLoader); return new EngineConnPluginInstance(newPluginInfo, enginePlugin); } } throw new EngineConnPluginNotFoundException("No plugin found, please check your configuration", null); } /** * Init plugin * @param plugin plugin instance * @param props parameters */ private void initEngineConnPlugin(EngineConnPlugin plugin, Map<String, Object> props) throws EngineConnPluginLoadException { try { //Only one method plugin.init(props); }catch(Exception e){ throw new EngineConnPluginLoadException("Failed to init engine conn plugin instance", e); } } private EngineConnPlugin loadEngineConnPlugin(EngineConnPluginClassLoader enginePluginClassLoader, Map<String, Object> props) throws EngineConnPluginLoadException { //First try to load from spi EngineConnPlugin enginePlugin = EngineConnPluginUtils.loadSubEngineConnPluginInSpi(enginePluginClassLoader); if(null == enginePlugin){ //Second, try to find plugin class String pluginClass = EngineConnPluginUtils.getEngineConnPluginClass(enginePluginClassLoader); //Not contain plugin class if(StringUtils.isNotBlank(pluginClass)){ Class<? extends EngineConnPlugin> enginePluginClass = loadEngineConnPluginClass(pluginClass, enginePluginClassLoader); return loadEngineConnPlugin(enginePluginClass, enginePluginClassLoader, props); } } return null; } private EngineConnPlugin loadEngineConnPlugin(Class<? extends EngineConnPlugin> pluginClass, EngineConnPluginClassLoader enginePluginClassLoader, Map<String, Object> props) throws EngineConnPluginLoadException { ClassLoader storeClassLoader = Thread.currentThread().getContextClassLoader(); Thread.currentThread().setContextClassLoader(enginePluginClassLoader); try{ final Constructor<?>[] constructors = pluginClass.getConstructors(); if(constructors.length == 0){ throw new EngineConnPluginLoadException("No public constructor in pluginClass [" + pluginClass.getName() + "]", null); } //Choose the first one Constructor<?> constructor = constructors[0]; Class<?>[] parameters = constructor.getParameterTypes(); try { if (constructor.getParameterCount() == 0) { return (EngineConnPlugin)constructor.newInstance(); }else if (constructor.getParameterCount() == 1 && parameters[0] == Map.class){ return (EngineConnPlugin)constructor.newInstance(props); }else{ throw new EngineConnPluginLoadException("Illegal arguments in constructor of pluginClass [" + pluginClass.getName() + "]", null); } }catch(Exception e){ if(e instanceof EngineConnPluginLoadException){ throw (EngineConnPluginLoadException) e; } throw new EngineConnPluginLoadException("Unable to construct pluginClass [" + pluginClass.getName() + "]", null); } }finally{ Thread.currentThread().setContextClassLoader(storeClassLoader); } } private Class<? extends EngineConnPlugin> loadEngineConnPluginClass(String pluginClass, EngineConnPluginClassLoader classLoader) throws EngineConnPluginLoadException { try { return classLoader.loadClass(pluginClass).asSubclass(EngineConnPlugin.class); } catch (ClassNotFoundException e) { throw new EngineConnPluginLoadException("Unable to load class:[" + pluginClass + "]", e); } } @SuppressWarnings(value = {"unchecked", "rawtypes"}) private Map<String, Object> readFromProperties(String propertiesFile) { Map<String, Object> map = new HashMap<>(); Properties properties = new Properties(); try { BufferedReader reader = new BufferedReader(new FileReader(propertiesFile)); properties.load(reader); map = new HashMap<String, Object>((Map) properties); }catch(IOException e){ //Just warn } return map; } }
20,439
https://github.com/hieudoanm/hieudoanm.github.io/blob/master/gatsby-config.js
Github Open Source
Open Source
MIT
null
hieudoanm.github.io
hieudoanm
JavaScript
Code
868
2,953
module.exports = { siteMetadata: { siteUrl: 'https://hieudoanm.github.io/', title: 'HIEU DOAN (hieudoanm)', description: 'Full-stack Node.js Developer', profiles: [ { href: 'mailto:hieumdoan@gmail.com', title: 'Email' }, { href: 'https://www.linkedin.com/in/hieudoanm', title: 'LinkedIn' }, { href: 'https://github.com/hieudoanm', title: 'GitHub' }, { href: 'https://www.instagram.com/hieudoan.com.vn/', title: 'Instagram', }, { href: 'https://zalo.me/hieudoanm', title: 'Zalo' }, { href: 'https://t.me/hieudoanm', title: 'Telegram' }, { href: 'https://www.facebook.com/hieudoanm', title: 'Facebook' }, ], author: { name: 'HIEU DOAN', summary: 'Full-stack Node.js Developer', }, about: { cta: { id: 'cta', title: 'Interested', subtitle: 'If you want to contact me for new opportunity, send me an email!', backgroundImage: '/images/jpg/background/cta.jpg', cta: 'Email Me!', }, experiences: { id: 'experiences', title: 'Experiences', subtitle: 'My Experiences', experiences: [ { company: 'NAB (National Australia Bank)', period: '2021/08 - NOW', city: 'Ho Chi Minh City, Vietnam', title: 'Full-stack Developer', }, { company: 'FPT Software', period: '2021/04 - 2021/07', city: 'Ho Chi Minh City, Vietnam', title: 'Full-stack Developer', }, { company: 'BoostCommerce', period: '2019/03 - 2021/03', city: 'Hanoi, Vietnam', title: 'Full-stack Developer', }, { company: 'Admetrics', period: '2017/03 - 2019/02', city: 'Frankfurt am Main, Germany', title: 'Front-end Developer', }, { company: 'Witrafi', period: '2015/01 - 2017/02', city: 'Helsinki, Finland', title: 'Front-end Developer', }, ], }, hero: { id: 'hero', title: 'HIEU DOAN', subtitle: 'Full-stack Node.js Developer', backgroundImage: '/images/jpg/background/hero.jpg', }, interests: { id: 'interests', title: 'Interests', subtitle: 'The interests that guide my career.', features: [ { placeholder: 'JS', title: 'Node.js Developer', description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce eleifend leo ut vehicula placerat. In condimentum quam non dolor semper.', }, { placeholder: 'FT', title: 'Fintech Focus', description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce eleifend leo ut vehicula placerat. In condimentum quam non dolor semper.', }, { placeholder: 'FF', title: 'Football Fan', description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce eleifend leo ut vehicula placerat. In condimentum quam non dolor semper.', }, { placeholder: 'ML', title: 'M.L. Enthusiastist', description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce eleifend leo ut vehicula placerat. In condimentum quam non dolor semper.', }, ], }, newsletter: { id: 'newsletter', title: 'Sign up to my newsletter.', subtitle: 'No spam. No data breach. You may opt out at any time.', }, projects: { id: 'projects', title: 'Projects', subtitle: 'Personal projects that suits my interests.', logos: [ { href: 'https://hieudoanm.github.io/hieudoan.news/', image: '/images/jpg/projects/mobius.jpg', title: 'news', }, { href: 'https://github.com/hieudoanm/hieudoan.fi', image: '/images/jpg/projects/atomic.jpg', title: 'finance', }, { href: 'https://vleague.vercel.app/', image: '/images/jpg/projects/vleague.png', title: 'v.league', }, { href: 'https://github.com/hieudoanm', image: '/images/jpg/projects/hieu.jpg', title: 'HIEU', }, ], }, stats: { id: 'stats', title: 'Statistics', subtitle: 'My experiences in number.', stats: [ { value: (2022 - 2015 + 1).toString(), title: 'Years', subtitle: 'of Experiences', }, { value: '4', title: 'Projects', subtitle: 'Vietnam - V.League - Vi', }, { value: '3', title: 'Programming Languages', subtitle: 'TypeScript - Python - Golang', }, { value: '2', title: 'Foreign Languages', subtitle: 'English - Korean', }, ], }, techstack: { id: 'techstack', title: 'Techstack', subtitle: 'Programming Languages - Frameworks - Libraries', team: [ { image: 'https://raw.githubusercontent.com/hieudoanm/react-icons/master/svg/development/front-end-framework/react.svg', title: 'React', position: 'Front-end Framework', homepage: 'https://reactjs.org/', }, { image: 'https://raw.githubusercontent.com/hieudoanm/react-icons/master/svg/development/runtime/node.js.svg', title: 'Node.js', position: 'Back-end', homepage: 'https://nodejs.org/en/', }, { image: 'https://raw.githubusercontent.com/hieudoanm/react-icons/master/svg/development/version-control/git.svg', title: 'Git', position: 'Version Control', homepage: 'https://git-scm.com/', }, { image: 'https://raw.githubusercontent.com/hieudoanm/react-icons/master/svg/big-tech/amazon/aws.svg', title: 'AWS', position: 'Cloud Computing', homepage: 'https://aws.amazon.com/', }, ], }, testimonials: { id: 'testimonials', title: 'Testimonials', subtitle: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin porttitor.', testimonials: [ { quote: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec lacus ex, interdum quis leo vitae, viverra bibendum neque. Suspendisse convallis vel purus ut elementum. Vestibulum id nulla scelerisque, hendrerit sem.', author: 'John Doe', position: 'Colleague at ABC', }, ], }, }, contact: { contact: { id: 'contact', title: 'Contact', subtitle: 'Reach out to me' }, pricing: { id: 'pricing', title: 'Pricing', subtitle: '"If you are\'re good at something, never do it for free" - Joker -', plans: [ { title: 'Consultant', description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla finibus.', price: { vnd: { value: '100K', unit: 'VND' }, usd: { value: '$5', unit: 'USD' }, }, timeUnit: 'hour', features: [ 'Networking', 'Web Development', 'App Development', 'AWS Certificates', ], }, { title: 'Web Development', description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla finibus.', price: { vnd: { value: '200K', unit: 'VND' }, usd: { value: '$10', unit: 'USD' }, }, timeUnit: 'hour', features: [ 'HTML5', 'CSS/SASS.', 'Bootstrap & Tailwind.', 'React & Angular.', 'WordPress & Haravan.', ], }, { title: 'App Development', description: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla finibus.', price: { vnd: { value: '300K', unit: 'VND' }, usd: { value: '$15', unit: 'USD' }, }, timeUnit: 'hour', features: [ 'Node.js (express.js)', 'Java (Spring Boot).', 'RESTful APIs', 'GraphQL (Apollo).', 'Redis', 'MongoDB', 'PostgreSQL.', '(Apache) Kafka.', 'Microservices', ], }, { title: 'AWS Education', description: 'An AWS Certified Solutions Architect – Associate.', price: { vnd: { value: '400K', unit: 'VND' }, usd: { value: '$20', unit: 'USD' }, }, timeUnit: 'hour', features: [ 'EC2 (Elastic Compute Cloud).', 'ECS (Elastic Container Service).', 'S3 (Simple Storage Service).', 'Lambda (Serverless).', 'CloudFormation.', ], }, ], }, }, }, plugins: [ 'gatsby-plugin-image', 'gatsby-plugin-sass', 'gatsby-plugin-sharp', 'gatsby-plugin-postcss', { resolve: 'gatsby-source-filesystem', options: { name: 'blogs', path: __dirname + '/docs/', }, }, { resolve: 'gatsby-plugin-mdx', options: { extensions: ['.mdx', '.md'], gatsbyRemarkPlugins: [{ resolve: 'gatsby-remark-highlight-code' }], }, }, ], };
22,682
https://github.com/samtags/hsfg-website/blob/master/screen/documents/baptismal/Preview.js
Github Open Source
Open Source
MIT
null
hsfg-website
samtags
JavaScript
Code
347
1,576
import { useDispatch, useSelector } from "react-redux"; import Button from "../../../components/Button"; import { MODEL, PARENTS_INFO, CHILD_INFO, BAPTISMAL_INFO, CONTACT_INFO } from "./store"; import { FiEdit3 } from "react-icons/fi"; import { useEffect } from "react"; export default function Preview() { const dispatch = useDispatch(); const handleOnSubmit = (e) => { e?.preventDefault(); dispatch[MODEL].request(); }; const fathers_name = useSelector((s) => s[MODEL].fathers_name); const fathers_lastname = useSelector((s) => s[MODEL].fathers_lastname); const fathers_middlename = useSelector((s) => s[MODEL].fathers_middlename); const mothers_name = useSelector((s) => s[MODEL].mothers_name); const mothers_lastname = useSelector((s) => s[MODEL].mothers_lastname); const mothers_middlename = useSelector((s) => s[MODEL].mothers_middlename); const childs_name = useSelector((s) => s[MODEL].childs_name); const childs_lastname = useSelector((s) => s[MODEL].childs_lastname); const childs_middlename = useSelector((s) => s[MODEL].childs_middlename); const childs_birthday = useSelector((s) => s[MODEL].childs_birthday); const childs_birthplace = useSelector((s) => s[MODEL].childs_birthplace); const dedication_date = useSelector((s) => s[MODEL].dedication_date); const dedication_place = useSelector((s) => s[MODEL].dedication_place); const contact_name = useSelector((state) => state[MODEL].contact_name); const contact_email = useSelector((state) => state[MODEL].contact_email); const contact_number = useSelector((state) => state[MODEL].contact_number); const isRequesting = useSelector((state) => state[MODEL].isRequesting); useEffect(() => { window.scrollTo(0, 0); }, []); return ( <form onSubmit={handleOnSubmit}> <h1>Preview</h1> <section className="text-center md:text-left"> <header className="relative"> Parent's Information <button disabled={isRequesting} className="preview-edit absolute right-0 top-0 mt-n4" onClick={() => dispatch[MODEL].setScreen(PARENTS_INFO)} > <FiEdit3 color="#FFFFFF" /> </button> </header> <p> <div> {fathers_name} {fathers_middlename} {fathers_lastname} </div> <label>Father</label> </p> <p className="mt-6"> <div> {mothers_name} {mothers_middlename} {mothers_lastname} </div> <label>Mother</label> </p> </section> <div className="horizontal-line my-12" /> <section className="text-center md:text-left"> <header className="relative"> Child's Information <button disabled={isRequesting} className="preview-edit absolute right-0 top-0 mt-n4" onClick={() => dispatch[MODEL].setScreen(CHILD_INFO)} > <FiEdit3 color="#FFFFFF" /> </button> </header> <p> <div> {childs_name} {childs_middlename} {childs_lastname} </div> <label>Child</label> </p> <p className="mt-6"> <div>{childs_birthday}</div> <label>Birthday</label> </p> <p className="mt-6"> <div>{childs_birthplace}</div> <label>Birthplace</label> </p> </section> <div className="horizontal-line my-12" /> <section className="text-center md:text-left"> <header className="relative"> Baptismal Information <button disabled={isRequesting} className="preview-edit absolute right-0 top-0 mt-n4" onClick={() => dispatch[MODEL].setScreen(BAPTISMAL_INFO)} > <FiEdit3 color="#FFFFFF" /> </button> </header> <p> <div>{dedication_date}</div> <label>Date of Dedication</label> </p> <p className="mt-6"> <div>{dedication_place}</div> <label>Place of dedication / baptism</label> </p> </section> <div className="horizontal-line my-12" /> <section className="text-center md:text-left"> <header className="relative"> Contact Information <button disabled={isRequesting} className="preview-edit absolute right-0 top-0 mt-n4" onClick={() => dispatch[MODEL].setScreen(CONTACT_INFO)} > <FiEdit3 color="#FFFFFF" /> </button> </header> <p> <div>{contact_name}</div> <label>Requester</label> </p> <p className="mt-6"> <div>{contact_email}</div> <label>Email Address</label> </p> <p className="mt-6"> <div>{contact_number}</div> <label>Mobile Number</label> </p> </section> <div className="mt-8" /> <Button disabled={isRequesting}>Submit</Button> </form> ); }
979
https://github.com/ekut-es/pico-cnn/blob/master/onnx_import/code_templates/tensor_operations/pico_cnn_concat.cpp
Github Open Source
Open Source
BSD-3-Clause
2,021
pico-cnn
ekut-es
C++
Code
4
39
{{input_declaration}} {{output_buffer.name}}->concatenate_from({{num_inputs}}, {{inputs}}, {{dimension}});
9,417
https://github.com/hueng/sharingan/blob/master/replayer-agent/utils/protocol/pmysql/common/packet_test.go
Github Open Source
Open Source
Apache-2.0
2,020
sharingan
hueng
Go
Code
142
590
package common import ( "bytes" "testing" "github.com/modern-go/parse" "github.com/stretchr/testify/require" ) func TestGetStringNull(t *testing.T) { var testCase = []struct { in []byte expect string }{ { in: []byte{0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x00}, expect: "hello world", }, { in: []byte{0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x00, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64}, expect: "hello world", }, { in: []byte{0x00, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x00, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64}, expect: "", }, { in: []byte{0x49, 0x6c, 0x6f, 0x76, 0x65, 0x44, 0x69, 0x64, 0x69, 0x00}, expect: "IloveDidi", }, } should := require.New(t) for idx, tc := range testCase { token, err := parse.NewSource(bytes.NewReader(tc.in), 10) should.NoError(err) actual := GetStringNull(token) should.Equal(tc.expect, actual, "case #%d fail", idx) } }
1,133
https://github.com/RamoramaInteractive/Memory-Game/blob/master/app/src/main/java/com/example/fdai3744/memorygame3/MainActivity.java
Github Open Source
Open Source
LicenseRef-scancode-public-domain
2,021
Memory-Game
RamoramaInteractive
Java
Code
208
875
package com.example.fdai3744.memorygame3; import android.annotation.SuppressLint; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import androidx.core.app.ActivityCompat; import androidx.constraintlayout.widget.ConstraintLayout; import android.os.Bundle; import android.view.MotionEvent; import android.view.View; import android.widget.Button; import androidx.appcompat.app.AppCompatActivity; public class MainActivity extends AppCompatActivity { private int backgroundButton; private Button toPlayMenu; private Button toSettingsMenu; private Button quit; @SuppressLint("ClickableViewAccessibility") @Override protected void onCreate(Bundle savedInstanceState) { SharedPreferences settings = getSharedPreferences("app_settings", Context.MODE_PRIVATE); int theme = settings.getInt("THEME", R.style.AppTheme); setTheme(theme); super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); backgroundButton = settings.getInt("BUTTONCOLOR", R.drawable.button_red); toPlayMenu = findViewById(R.id.toPlayMenu); toPlayMenu.setBackgroundResource(backgroundButton); toSettingsMenu = findViewById(R.id.toSettingsMenu); toSettingsMenu.setBackgroundResource(backgroundButton); quit = findViewById(R.id.quit); quit.setBackgroundResource(backgroundButton); toPlayMenu.setOnTouchListener((v, event) -> { if (event.getAction() == MotionEvent.ACTION_DOWN) { // change color toPlayMenu.setBackgroundResource(R.drawable.button_highlight); toPlayMenu(v); } else if (event.getAction() == MotionEvent.ACTION_UP) { // set to normal color toPlayMenu.setBackgroundResource(backgroundButton); } return true; }); toSettingsMenu.setOnTouchListener((v, event) -> { if (event.getAction() == MotionEvent.ACTION_DOWN) { // change color toSettingsMenu.setBackgroundResource(R.drawable.button_highlight); toSettingsMenu(v); } else if (event.getAction() == MotionEvent.ACTION_UP) { // set to normal color toSettingsMenu.setBackgroundResource(backgroundButton); } return true; }); quit.setOnTouchListener((v, event) -> { if (event.getAction() == MotionEvent.ACTION_DOWN) { // change color quit.setBackgroundResource(R.drawable.button_highlight); } else if (event.getAction() == MotionEvent.ACTION_UP) { // set to normal color quit.setBackgroundResource(backgroundButton); quit(v); } return true; }); } public void toPlayMenu(View v) { Intent a = new Intent(this, FirstMenu.class); this.startActivity(a); finish(); } public void toSettingsMenu(View v) { Intent in = new Intent(this, Settings.class); this.startActivity(in); finish(); } public void quit(View v) { finish(); } }
21,258
https://github.com/IzzDarki/Ino/blob/master/docs/documentation/html/structstd_1_1remove__all__extents_3_01___ty_0f_0e_4.js
Github Open Source
Open Source
MIT
null
Ino
IzzDarki
JavaScript
Code
10
92
var structstd_1_1remove__all__extents_3_01___ty_0f_0e_4 = [ [ "type", "structstd_1_1remove__all__extents_3_01___ty_0f_0e_4.html#a7ada027a4aa09c090a8f1a4fa69ed032", null ] ];
29,258
https://github.com/pplu/azure-sdk-perl/blob/master/auto-lib/Azure/StorSimple/NetworkSettings.pm
Github Open Source
Open Source
Apache-2.0
null
azure-sdk-perl
pplu
Perl
Code
75
204
package Azure::StorSimple::NetworkSettings; use Moose; has 'id' => (is => 'ro', isa => 'Str' ); has 'kind' => (is => 'ro', isa => 'Str' ); has 'name' => (is => 'ro', isa => 'Str' ); has 'type' => (is => 'ro', isa => 'Str' ); has 'dnsSettings' => (is => 'ro', isa => 'Azure::StorSimple::DNSSettings' ); has 'networkAdapters' => (is => 'ro', isa => 'Azure::StorSimple::NetworkAdapterList' ); has 'webproxySettings' => (is => 'ro', isa => 'Azure::StorSimple::WebproxySettings' ); 1;
6
https://github.com/SarahMehddi/HelloWorld/blob/master/webapp/src/main/java/org/apache/atlas/web/filters/AuditFilter.java
Github Open Source
Open Source
Apache-2.0, BSD-3-Clause
null
HelloWorld
SarahMehddi
Java
Code
446
1,128
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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. */ package org.apache.atlas.web.filters; import com.google.inject.Singleton; import org.apache.atlas.AtlasClient; import org.apache.atlas.web.util.DateTimeHelper; import org.apache.atlas.web.util.Servlets; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.Date; import java.util.UUID; /** * This records audit information as part of the filter after processing the request * and also introduces a UUID into request and response for tracing requests in logs. */ @Singleton public class AuditFilter implements Filter { private static final Logger AUDIT_LOG = LoggerFactory.getLogger("AUDIT"); private static final Logger LOG = LoggerFactory.getLogger(AuditFilter.class); @Override public void init(FilterConfig filterConfig) throws ServletException { LOG.info("AuditFilter initialization started"); } @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain) throws IOException, ServletException { final String requestTimeISO9601 = DateTimeHelper.formatDateUTC(new Date()); final HttpServletRequest httpRequest = (HttpServletRequest) request; final String requestId = UUID.randomUUID().toString(); final Thread currentThread = Thread.currentThread(); final String oldName = currentThread.getName(); try { currentThread.setName(formatName(oldName, requestId)); recordAudit(httpRequest, requestTimeISO9601); filterChain.doFilter(request, response); } finally { // put the request id into the response so users can trace logs for this request ((HttpServletResponse) response).setHeader(AtlasClient.REQUEST_ID, requestId); currentThread.setName(oldName); } } private String formatName(String oldName, String requestId) { return oldName + " - " + requestId; } private void recordAudit(HttpServletRequest httpRequest, String whenISO9601) { final String who = getUserFromRequest(httpRequest); final String fromHost = httpRequest.getRemoteHost(); final String fromAddress = httpRequest.getRemoteAddr(); final String whatRequest = httpRequest.getMethod(); final String whatURL = Servlets.getRequestURL(httpRequest); final String whatAddrs = httpRequest.getLocalAddr(); LOG.debug("Audit: {}/{} performed request {} {} ({}) at time {}", who, fromAddress, whatRequest, whatURL, whatAddrs, whenISO9601); audit(who, fromAddress, fromHost, whatURL, whatAddrs, whenISO9601); } private String getUserFromRequest(HttpServletRequest httpRequest) { // look for the user in the request final String userFromRequest = Servlets.getUserFromRequest(httpRequest); return userFromRequest == null ? "UNKNOWN" : userFromRequest; } private void audit(String who, String fromAddress, String fromHost, String whatURL, String whatAddrs, String whenISO9601) { AUDIT_LOG.info("Audit: {}/{}-{} performed request {} ({}) at time {}", who, fromAddress, fromHost, whatURL, whatAddrs, whenISO9601); } @Override public void destroy() { // do nothing } }
27,607
https://github.com/UniversalAdministrator/dialogflow-web-master/blob/master/src/main.js
Github Open Source
Open Source
MIT
2,018
dialogflow-web-master
UniversalAdministrator
JavaScript
Code
49
153
import Vue from 'vue' import { Vue2Dragula } from 'vue2-dragula' import App from './App.vue' Vue.use(VueCarousel) new Vue({ el: '#app', render: h => h(App) }).$mount('#app') Vue.use(Vue2Dragula, { logging: { service: true // to only log methods in service (DragulaService) new Vue({ el: '#app', render: h => h(App) }).$mount('#app') } });
49,427
https://github.com/schroedinger-survey/backend/blob/master/scripts/010_alter_default_values.sql
Github Open Source
Open Source
MIT
2,020
backend
schroedinger-survey
SQL
Code
199
558
CREATE EXTENSION IF NOT EXISTS pg_stat_statements; ALTER TABLE IF EXISTS surveys ALTER COLUMN start_date SET DEFAULT CURRENT_TIMESTAMP, ALTER COLUMN end_date SET DEFAULT null; ALTER TABLE IF EXISTS users ALTER COLUMN created SET DEFAULT CURRENT_TIMESTAMP, ALTER COLUMN last_edited SET DEFAULT CURRENT_TIMESTAMP, ALTER COLUMN last_changed_password SET DEFAULT CURRENT_TIMESTAMP; ALTER TABLE IF EXISTS surveys ALTER COLUMN created SET DEFAULT CURRENT_TIMESTAMP, ALTER COLUMN last_edited SET DEFAULT CURRENT_TIMESTAMP; ALTER TABLE IF EXISTS tokens ALTER COLUMN created SET DEFAULT CURRENT_TIMESTAMP, ALTER COLUMN last_edited SET DEFAULT CURRENT_TIMESTAMP; ALTER TABLE IF EXISTS constrained_questions ALTER COLUMN created SET DEFAULT CURRENT_TIMESTAMP, ALTER COLUMN last_edited SET DEFAULT CURRENT_TIMESTAMP; ALTER TABLE IF EXISTS constrained_questions_options ALTER COLUMN created SET DEFAULT CURRENT_TIMESTAMP, ALTER COLUMN last_edited SET DEFAULT CURRENT_TIMESTAMP; ALTER TABLE IF EXISTS freestyle_questions ALTER COLUMN created SET DEFAULT CURRENT_TIMESTAMP, ALTER COLUMN last_edited SET DEFAULT CURRENT_TIMESTAMP; ALTER TABLE IF EXISTS submissions ALTER COLUMN created SET DEFAULT CURRENT_TIMESTAMP, ALTER COLUMN last_edited SET DEFAULT CURRENT_TIMESTAMP; ALTER TABLE IF EXISTS freestyle_answers ALTER COLUMN created SET DEFAULT CURRENT_TIMESTAMP, ALTER COLUMN last_edited SET DEFAULT CURRENT_TIMESTAMP; ALTER TABLE IF EXISTS constrained_answers ALTER COLUMN created SET DEFAULT CURRENT_TIMESTAMP, ALTER COLUMN last_edited SET DEFAULT CURRENT_TIMESTAMP; ALTER TABLE IF EXISTS reset_password_tokens ALTER COLUMN created SET DEFAULT CURRENT_TIMESTAMP, ALTER COLUMN last_edited SET DEFAULT CURRENT_TIMESTAMP;
22,961
https://github.com/zaerald/aws-toolkit-jetbrains/blob/master/jetbrains-rider/protocol.gradle
Github Open Source
Open Source
Apache-2.0
2,020
aws-toolkit-jetbrains
zaerald
Gradle
Code
563
2,130
// Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 def protocolGroup = 'protocol' ext.csDaemonGeneratedOutput = new File(resharperPluginPath, "src/AWS.Daemon/Protocol") ext.csPsiGeneratedOutput = new File(resharperPluginPath, "src/AWS.Psi/Protocol") ext.csAwsSettingGeneratedOutput = new File(resharperPluginPath, "src/AWS.Settings/Protocol") ext.csAwsProjectGeneratedOutput = new File(resharperPluginPath, "src/AWS.Project/Protocol") ext.riderGeneratedSources = "$buildDir/generated-src/software/aws/toolkits/jetbrains/protocol" ext.modelDir = new File(projectDir, "protocol/model") ext.rdgenDir = file("${project.buildDir}/rdgen/") rdgenDir.mkdirs() task generateDaemonModel(type: tasks.getByName("rdgen").class) { def daemonModelSource = new File(modelDir, "daemon").canonicalPath def ktOutput = new File(riderGeneratedSources, "DaemonProtocol") inputs.property("rdgen", rdGenVersion()) inputs.dir(daemonModelSource) outputs.dirs(ktOutput, csDaemonGeneratedOutput) // NOTE: classpath is evaluated lazily, at execution time, because it comes from the unzipped // intellij SDK, which is extracted in afterEvaluate params { verbose = true hashFolder = rdgenDir logger.info("Configuring rdgen params") classpath { logger.info("Calculating classpath for rdgen, intellij.ideaDependency is: ${intellij.ideaDependency}") def sdkPath = intellij.ideaDependency.classes def rdLibDirectory = new File(sdkPath, "lib/rd").canonicalFile "$rdLibDirectory/rider-model.jar" } sources daemonModelSource packages = "protocol.model.daemon" generator { language = "kotlin" transform = "asis" root = "com.jetbrains.rider.model.nova.ide.IdeRoot" namespace = "com.jetbrains.rider.model" directory = "$ktOutput" } generator { language = "csharp" transform = "reversed" root = "com.jetbrains.rider.model.nova.ide.IdeRoot" namespace = "JetBrains.Rider.Model" directory = "$csDaemonGeneratedOutput" } } } task generatePsiModel(type: tasks.getByName("rdgen").class) { def psiModelSource = new File(modelDir, "psi").canonicalPath def ktOutput = new File(riderGeneratedSources, "PsiProtocol") inputs.property("rdgen", rdGenVersion()) inputs.dir(psiModelSource) outputs.dirs(ktOutput, csPsiGeneratedOutput) // NOTE: classpath is evaluated lazily, at execution time, because it comes from the unzipped // intellij SDK, which is extracted in afterEvaluate params { verbose = true hashFolder = rdgenDir logger.info("Configuring rdgen params") classpath { logger.info("Calculating classpath for rdgen, intellij.ideaDependency is: ${intellij.ideaDependency}") def sdkPath = intellij.ideaDependency.classes def rdLibDirectory = new File(sdkPath, "lib/rd").canonicalFile "$rdLibDirectory/rider-model.jar" } sources psiModelSource packages = "protocol.model.psi" generator { language = "kotlin" transform = "asis" root = "com.jetbrains.rider.model.nova.ide.IdeRoot" namespace = "com.jetbrains.rider.model" directory = "$ktOutput" } generator { language = "csharp" transform = "reversed" root = "com.jetbrains.rider.model.nova.ide.IdeRoot" namespace = "JetBrains.Rider.Model" directory = "$csPsiGeneratedOutput" } } } task generateAwsSettingModel(type: tasks.getByName("rdgen").class) { def settingModelSource = new File(modelDir, "setting").canonicalPath def ktOutput = new File(riderGeneratedSources, "AwsSettingsProtocol") inputs.property("rdgen", rdGenVersion()) inputs.dir(settingModelSource) outputs.dirs(ktOutput, csAwsSettingGeneratedOutput) // NOTE: classpath is evaluated lazily, at execution time, because it comes from the unzipped // intellij SDK, which is extracted in afterEvaluate params { verbose = true hashFolder = rdgenDir logger.info("Configuring rdgen params") classpath { logger.info("Calculating classpath for rdgen, intellij.ideaDependency is: ${intellij.ideaDependency}") def sdkPath = intellij.ideaDependency.classes def rdLibDirectory = new File(sdkPath, "lib/rd").canonicalFile "$rdLibDirectory/rider-model.jar" } sources settingModelSource packages = "protocol.model.setting" generator { language = "kotlin" transform = "asis" root = "com.jetbrains.rider.model.nova.ide.IdeRoot" namespace = "com.jetbrains.rider.model" directory = "$ktOutput" } generator { language = "csharp" transform = "reversed" root = "com.jetbrains.rider.model.nova.ide.IdeRoot" namespace = "JetBrains.Rider.Model" directory = "$csAwsSettingGeneratedOutput" } } } task generateAwsProjectModel(type: tasks.getByName("rdgen").class) { def projectModelSource = new File(modelDir, "project").canonicalPath def ktOutput = new File(riderGeneratedSources, "AwsProjectProtocol") inputs.property("rdgen", rdGenVersion()) inputs.dir(projectModelSource) outputs.dirs(ktOutput, csAwsProjectGeneratedOutput) // NOTE: classpath is evaluated lazily, at execution time, because it comes from the unzipped // intellij SDK, which is extracted in afterEvaluate params { verbose = true hashFolder = rdgenDir logger.info("Configuring rdgen params") classpath { logger.info("Calculating classpath for rdgen, intellij.ideaDependency is: ${intellij.ideaDependency}") def sdkPath = intellij.ideaDependency.classes def rdLibDirectory = new File(sdkPath, "lib/rd").canonicalFile "$rdLibDirectory/rider-model.jar" } sources projectModelSource packages = "protocol.model.project" generator { language = "kotlin" transform = "asis" root = "com.jetbrains.rider.model.nova.ide.IdeRoot" namespace = "com.jetbrains.rider.model" directory = "$ktOutput" } generator { language = "csharp" transform = "reversed" root = "com.jetbrains.rider.model.nova.ide.IdeRoot" namespace = "JetBrains.Rider.Model" directory = "$csAwsProjectGeneratedOutput" } } } task generateModels { group = protocolGroup description = 'Generates protocol models' dependsOn generateDaemonModel, generatePsiModel, generateAwsSettingModel, generateAwsProjectModel } task cleanGenerateModels { group = protocolGroup description = 'Clean up generated protocol models' dependsOn cleanGenerateDaemonModel, cleanGeneratePsiModel, cleanGenerateAwsSettingModel, cleanGenerateAwsProjectModel } project.tasks.clean.dependsOn(cleanGenerateModels)
24,813
https://github.com/RChehowski/juepak2/blob/master/src/main/java/com/vizor/unreal/util/UE4Serializable.java
Github Open Source
Open Source
Apache-2.0
2,018
juepak2
RChehowski
Java
Code
63
146
package com.vizor.unreal.util; import com.vizor.unreal.annotations.FStruct; import java.nio.ByteBuffer; /** * Trivially deserializable UE4 structure. * 'Trivially' means that all fields are accessible and should serialized in order of appearance. * * NOTE: Target class must be annotated with {@link FStruct} */ public interface UE4Serializable { /** * Called once the instance is being serialized. * @param b Drain byte buffer. */ void Serialize(ByteBuffer b); }
14,409
https://github.com/zhaoyangzhou/PermissionLibrary/blob/master/src/main/java/com/zzy/learn/aspectj/aspect/TraceAspect.java
Github Open Source
Open Source
Apache-2.0
null
PermissionLibrary
zhaoyangzhou
Java
Code
210
761
package com.zzy.learn.aspectj.aspect; import android.util.Log; import org.aspectj.lang.JoinPoint; import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Before; import org.aspectj.lang.annotation.Pointcut; import org.aspectj.lang.reflect.MethodSignature; /** * Package: com.zzy.learn.aspectj.aspect * Class: TraceAspect * Description: 方法拦截切面 * Author: zhaoyangzhou * Email: zhaoyangzhou@126.com * Created on: 2017/12/18 9:49 */ @Aspect public class TraceAspect { private static final String POINT_METHOD = "execution(* com.example.app.LoginActivity.*(..))"; private static final String POINT_CALLMETHOD = "call(* com.example.app.LoginActivity.*(..))"; @Pointcut(POINT_METHOD) public void methodAnnotated() { } @Pointcut(POINT_CALLMETHOD) public void methodCallAnnotated() { } /** * Method: aroundJoinPoint * Description: 织入点 * @param joinPoint * @return Object 原方法返回值 * @exception/throws Throwable */ @Around("methodAnnotated()") public Object aronudWeaverPoint(ProceedingJoinPoint joinPoint) throws Throwable { MethodSignature methodSignature = (MethodSignature) joinPoint.getSignature(); String className = methodSignature.getDeclaringType().getSimpleName(); String methodName = methodSignature.getName(); final long startTime = System.currentTimeMillis(); Object result = joinPoint.proceed(); final long endTime = System.currentTimeMillis(); Log.d(className, buildLogMessage(methodName, endTime - startTime)); return result; } /** * Method: aroundJoinPoint * Description: 织入点 * @param joinPoint * @return void */ @Before("methodCallAnnotated()") public void beforecall(JoinPoint joinPoint) { MethodSignature methodSignature = (MethodSignature) joinPoint.getSignature(); String className = methodSignature.getDeclaringType().getSimpleName(); String methodName = methodSignature.getName(); Log.e(className, String.format("before run %s", methodName)); } /** * Method: buildLogMessage * Description: 构造日志信息 * @param methodName 方法名 * @param methodDuration 方法执行耗时时间 毫秒 * @return String */ private static String buildLogMessage(String methodName, long methodDuration) { return String.format("%s run time:%d ms", methodName, methodDuration); } }
27,388
https://github.com/asvid/FirebaseLogin/blob/master/settings.gradle
Github Open Source
Open Source
MIT
2,018
FirebaseLogin
asvid
Gradle
Code
3
13
include ':app', ':firebaselogin'
4,619
https://github.com/zhmu/ananas/blob/master/external/gcc-12.1.0/gcc/testsuite/g++.dg/init/new27.C
Github Open Source
Open Source
FSFAP, LGPL-2.1-only, LGPL-3.0-only, GPL-3.0-only, GPL-2.0-only, GCC-exception-3.1, LGPL-2.0-or-later, Zlib, LicenseRef-scancode-public-domain
2,022
ananas
zhmu
C
Code
117
266
// PR c++/34862 // { dg-do run } // { dg-options "-O2" } typedef __SIZE_TYPE__ size_t; extern "C" void abort (); struct T { void *operator new (size_t, char *&); T () { i[0] = 1; i[1] = 2; } int i[2]; }; void * T::operator new (size_t size, char *&p) { void *o = (void *) p; p += size; return o; } T * f (char *&x) { return new (x) T (); } char buf[10 * sizeof (T)] __attribute__((aligned (__alignof (T)))); int main () { char *p = buf; T *t = f (p); if (p != buf + sizeof (T)) abort (); if (t->i[0] != 1 || t->i[1] != 2) abort (); }
27,570
https://github.com/syns2191/gauzy/blob/master/apps/gauzy/src/app/pages/employment-types/employment-types.module.ts
Github Open Source
Open Source
PostgreSQL
null
gauzy
syns2191
TypeScript
Code
124
511
import { NgModule } from '@angular/core'; import { ThemeModule } from '../../@theme/theme.module'; import { NbCardModule, NbButtonModule, NbInputModule, NbIconModule, NbDialogModule, NbActionsModule } from '@nebular/theme'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { TagsColorInputModule } from '../../@shared/tags/tags-color-input/tags-color-input.module'; import { TableComponentsModule } from '../../@shared/table-components/table-components.module'; import { SharedModule } from '../../@shared/shared.module'; import { OrganizationEmploymentTypesService } from '../../@core/services/organization-employment-types.service'; import { EmploymentTypesRoutingModule } from './employment-types-routing.module'; import { EmploymentTypesComponent } from './employment-types.component'; import { CardGridModule } from '../../@shared/card-grid/card-grid.module'; import { Ng2SmartTableModule } from 'ng2-smart-table'; import { TranslateModule } from '../../@shared/translate/translate.module'; import { HeaderTitleModule } from '../../@shared/components/header-title/header-title.module'; @NgModule({ imports: [ SharedModule, ThemeModule, NbCardModule, FormsModule, ReactiveFormsModule, NbButtonModule, EmploymentTypesRoutingModule, NbInputModule, NbIconModule, TagsColorInputModule, NbActionsModule, TableComponentsModule, CardGridModule, NbDialogModule, Ng2SmartTableModule, NbActionsModule, NbDialogModule.forChild(), TranslateModule, HeaderTitleModule ], declarations: [EmploymentTypesComponent], entryComponents: [], providers: [OrganizationEmploymentTypesService] }) export class EmploymentTypesModule {}
30,129
https://github.com/infrastrukt/Gisto/blob/master/src/components/layout/Main.js
Github Open Source
Open Source
MIT
2,018
Gisto
infrastrukt
JavaScript
Code
138
454
import React from 'react'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import { get } from 'lodash/fp'; import styled from 'styled-components'; import Sidebar from 'components/layout/sidebar/Sidebar'; import Content from 'components/layout/Content'; import * as snippetActions from 'actions/snippets'; import * as emojiActions from 'actions/emoji'; import { gaEvent } from 'utils/ga'; const MainWrapper = styled.div` display: flex; flex-direction: row; justify-content: space-between; height: 100%; `; export class Main extends React.Component { componentDidMount() { this.props.getStarredSnippets(); this.props.getSnippets(); this.props.getEmoji(); gaEvent({ category: 'general', action: 'App loaded' }); } render() { const { edit } = this.props; return ( <MainWrapper> { !edit && <Sidebar/> } <Content/> </MainWrapper> ); } } const mapStateToProps = (state) => ({ edit: get(['ui', 'snippets', 'edit'], state) }); Main.propTypes = { edit: PropTypes.bool, getSnippets: PropTypes.func, getStarredSnippets: PropTypes.func, getEmoji: PropTypes.func }; export default connect(mapStateToProps, { getSnippets: snippetActions.getSnippets, getEmoji: emojiActions.getEmoji, getStarredSnippets: snippetActions.getStarredSnippets })(Main);
1,908
https://github.com/GeorgeDubuque/Pokey/blob/master/Assets/Tools/Playtime Painter/Shaders/PlaytimePainter_Test_Projector.shader
Github Open Source
Open Source
MIT
null
Pokey
GeorgeDubuque
GLSL
Code
411
1,556
Shader "Playtime Painter/Editor/ProjectorTest" { Properties{ _MainTex("Albedo (RGB)", 2D) = "white" {} [Toggle(_DEBUG)] debugOn("Debug", Float) = 0 } SubShader{ Tags { "RenderType" = "Opaque" } Pass { CGPROGRAM #include "PlaytimePainter_cg.cginc" #pragma vertex vert #pragma fragment frag #pragma multi_compile_instancing #pragma shader_feature ____ _DEBUG #pragma multi_compile ______ USE_NOISE_TEXTURE #pragma target 3.0 struct v2f { float4 pos : SV_POSITION; float4 worldPos : TEXCOORD0; float3 normal : TEXCOORD1; float2 texcoord : TEXCOORD2; float4 shadowCoords : TEXCOORD6; float4 color: COLOR; }; uniform float4 _MainTex_ST; sampler2D _MainTex; sampler2D _Global_Noise_Lookup; v2f vert(appdata_full v) { v2f o; UNITY_SETUP_INSTANCE_ID(v); o.normal.xyz = UnityObjectToWorldNormal(v.normal); o.pos = UnityObjectToClipPos(v.vertex); o.worldPos = mul(unity_ObjectToWorld, float4(v.vertex.xyz,1.0f)); o.texcoord = TRANSFORM_TEX(v.texcoord, _MainTex); o.color = v.color; o.shadowCoords = mul(pp_ProjectorMatrix, o.worldPos); return o; } float4 frag(v2f o) : COLOR{ float camAspectRatio = pp_ProjectorConfiguration.x; float camFOVDegrees = pp_ProjectorConfiguration.y; float deFar = pp_ProjectorConfiguration.w; o.shadowCoords.xy /= o.shadowCoords.w; float alpha = max(0, sign(o.shadowCoords.w) - dot(o.shadowCoords.xy, o.shadowCoords.xy)); float viewPos = length(float3(o.shadowCoords.xy * camFOVDegrees,1))*camAspectRatio; float true01Range = length(o.worldPos - pp_ProjectorPosition.xyz) * deFar; //Reverse Distance float predictedDepth = 1-(((viewPos / true01Range) - pp_ProjectorClipPrecompute.y) * pp_ProjectorClipPrecompute.z); //End Reverse Distance // Linear Distance: //float range01 = viewPos / (pp_ProjectorClipPrecompute.x * (1 - depth) + pp_ProjectorClipPrecompute.y); //return max(0, alpha - abs(true01Range - range01) * 100); float2 uv = (o.shadowCoords.xy + 1) * 0.5; float2 pointUV = (floor(uv * pp_DepthProjection_TexelSize.zw) + 0.5) * pp_DepthProjection_TexelSize.xy; float2 off = pp_DepthProjection_TexelSize.xy; float d0p = tex2D(pp_DepthProjection, pointUV).r - predictedDepth; /*float d1p = tex2D(pp_DepthProjection, pointUV - off ).r - predictedDepth; float d2p = tex2D(pp_DepthProjection, pointUV + off ).r - predictedDepth; float d3p = tex2D(pp_DepthProjection, pointUV + float2(off.x, -off.y)).r - predictedDepth; float d4p = tex2D(pp_DepthProjection, pointUV - float2(off.x, -off.y)).r - predictedDepth;*/ off *= 1.5; float d0 = tex2D(pp_DepthProjection, uv).r - predictedDepth; /*float d1 = tex2D(pp_DepthProjection, uv - off).r - predictedDepth; float d2 = tex2D(pp_DepthProjection, uv + off).r - predictedDepth; float d3 = tex2D(pp_DepthProjection, uv + float2(off.x, -off.y)).r - predictedDepth; float d4 = tex2D(pp_DepthProjection, uv - float2(off.x, -off.y)).r - predictedDepth;*/ float maxDp = d0p; //max(0, max(d0p, max(max(d1p, d2p), max(d3p, d4p))));// +noise.x*0.00001; //float depthP = (d0p + d1p + d2p + d3p + d4p) * 0.2; float depth = d0; //(d0 + d1 + d2 + d3 + d4) * 0.2 + 0.00001; // return depth; depth = saturate(depth * 10 / max(0.005, d0p)); // float ambient = saturate(d0 * 6000000 * saturate(0.001 - maxDp)); // return ambient; // return max(0, minD)*10000; //return minD; return alpha - depth*0.5; //max(0, // max(depth,ambient ) //- max(0, minD)*10000 //- shadow //) * 0.5; //+ //max(0,ambient) //* 1000; } ENDCG } } FallBack "Diffuse" }
3,715
https://github.com/kmdtmyk/rparams/blob/master/spec/dummy/spec/lib/memory_spec.rb
Github Open Source
Open Source
MIT
null
rparams
kmdtmyk
Ruby
Code
425
1,351
# frozen_string_literal: true require 'rails_helper' RSpec.describe Rparam::Memory do include ActiveSupport::Testing::TimeHelpers describe 'read' do example 'without type' do memory = Rparam::Memory.new({ value: 'foo' }) expect(memory.read :value).to eq 'foo' end context 'relative date' do example do travel_to Date.new(2018, 10, 15) memory = Rparam::Memory.new({ value: 5 }) expect(memory.read :value, :relative_date).to eq '2018-10-20' end example 'blank' do memory = Rparam::Memory.new({ value: '' }) expect(memory.read :value, :relative_date).to eq '' end example 'invalid value' do memory = Rparam::Memory.new({ value: 'invalid' }) expect(memory.read :value, :relative_date).to eq '' end example 'nil' do memory = Rparam::Memory.new({ value: nil }) expect(memory.read :value, :relative_date).to eq '' end end context 'relative month' do example do travel_to Date.new(2018, 10, 15) memory = Rparam::Memory.new({ value: 2 }) expect(memory.read :value, :relative_month).to eq '2018-12' end example 'blank' do memory = Rparam::Memory.new({ value: '' }) expect(memory.read :value, :relative_month).to eq '' end example 'invalid value' do memory = Rparam::Memory.new({ value: 'invalid' }) expect(memory.read :value, :relative_month).to eq '' end example 'nil' do memory = Rparam::Memory.new({ value: nil }) expect(memory.read :value, :relative_month).to eq '' end end context 'relative year' do example do travel_to Date.new(2018, 10, 15) memory = Rparam::Memory.new({ value: 2 }) expect(memory.read :value, :relative_year).to eq '2020' end example 'blank' do memory = Rparam::Memory.new({ value: '' }) expect(memory.read :value, :relative_year).to eq '' end example 'invalid value' do memory = Rparam::Memory.new({ value: 'invalid' }) expect(memory.read :value, :relative_year).to eq '' end example 'nil' do memory = Rparam::Memory.new({ value: nil }) expect(memory.read :value, :relative_year).to eq '' end end example 'empty' do memory = Rparam::Memory.new expect(memory.read :value).to eq nil expect(memory.read :value, :relative_date).to eq nil expect(memory.read :value, :relative_month).to eq nil expect(memory.read :value, :relative_year).to eq nil end example 'invalid type' do memory = Rparam::Memory.new expect(memory.read :value, :invalid).to eq nil end end describe 'write' do let(:memory){ Rparam::Memory.new } example 'without type' do memory.write :value, 'foo' expect(memory[:value]).to eq 'foo' end context 'relative date' do let(:type){ :relative_date } example do travel_to Date.new(2018, 10, 15) memory.write :value, '2018-10-20', type expect(memory[:value]).to eq 5 end example 'nil' do memory.write :value, nil, type expect(memory.to_h).to eq({value: nil}) end end context 'relative month' do let(:type){ :relative_month } example do travel_to Date.new(2018, 10, 15) memory.write :value, '2018-11', type expect(memory[:value]).to eq 1 end example 'nil' do memory.write :value, nil, type expect(memory.to_h).to eq({value: nil}) end end context 'relative year' do let(:type){ :relative_year } example do travel_to Date.new(2018, 10, 15) memory.write :value, '2018', type expect(memory[:value]).to eq 0 end example 'nil' do memory.write :value, nil, type expect(memory.to_h).to eq({value: nil}) end end example 'invalid value' do %i(relative_date relative_month relative_year).each do |type| memory.write :value, 'invalid', type expect(memory[:value]).to eq nil memory.write :value, '', type expect(memory[:value]).to eq nil memory.write :value, nil, type expect(memory[:value]).to eq nil end end end end
45,884
https://github.com/youngchan1988/dartfx/blob/master/js/jsfx.test.ts
Github Open Source
Open Source
BSD-3-Clause
2,022
dartfx
youngchan1988
TypeScript
Code
1,022
3,702
// Copyright (c) 2022, the dartfx project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. import './d8'; import { fx, fxWithEnvs, fxAssignment, fxSetFunctionResolver } from './jsfx'; test('Test arithmetic', () => { var result = fx('1+(2+3)*7 - 4/2'); expect(result).toBe(34); }); test('Test remainder', () => { var result = fx('9%4'); expect(result).toBe(1); }); test('Test divide to integer', () => { var result = fx('9~/4'); expect(result).toBe(2); }); test('Test negative', () => { var result = fx('-3+9'); expect(result).toBe(6); }); test('Test great', () => { var result = fx('3>0 && 3>=3'); expect(result).toBe(true); }); test('Test less', () => { var result = fx('3<0 && 3<=3'); expect(result).toBe(false); }); test('Test equal', () => { var result = fx('3==3'); expect(result).toBe(true); }); test('Test not equal', () => { var result = fx('3!=3'); expect(result).toBe(false); }); test('Test and or not', () => { var result = fx('(3>0 && 3>1) || !(0<-1)'); expect(result).toBe(true); }); test('Test and calc', () => { var result = fx('0x22 & 0x07'); expect(result).toBe(0x02); }); test('Test or calc', () => { var result = fx('0x22 | 0x05'); expect(result).toBe(0x27); }); test('Test not calc', () => { var result = fx('~0x22&0xFF'); expect(result).toBe(0xDD); }); test('Test not or calc', () => { var result = fx('0x22 ^ 0x07'); expect(result).toBe(0x25); }); test('Test left move', () => { var result = fx('0x22 << 2'); expect(result).toBe(0x88); }); test('Test right move', () => { var result = fx('0x22 >> 1'); expect(result).toBe(0x11); }); test('Test condition', () => { var result = fx('3>0 && 1<3 ? "yes": "no"'); expect(result).toBe("yes"); }); test('Test env value', () => { var envs = { "43858": { "message": "单位" }, "43859": { "currency": "100", "unitName": "人民币" } }; var result = fxWithEnvs('\$43859.currency\$+\$43859.unitName\$', envs); expect(result).toBe("100人民币"); }); test('Test env assignment', () => { var envs = { "43858": { "message": "单位" }, "43859": { "currency": "100", "unitName": "人民币" } }; fxAssignment( '\$43858.message\$=\$43859.currency\$+\$43859.unitName\$', envs); expect(envs["43858"]!["message"]).toBe("100人民币"); }); test('Test +=', () => { var envs = { "43858": { "number": 100 }, "43859": { "currency": 100, "unitName": "人民币" } }; fxAssignment('\$43858.number\$+=\$43859.currency\$', envs); expect(envs["43858"]!["number"]).toBe(200); }); test('Test -=', () => { var envs = { "43858": { "number": 100 }, "43859": { "currency": 100, "unitName": "人民币" } }; fxAssignment('\$43858.number\$-=\$43859.currency\$', envs); expect(envs["43858"]!["number"]).toBe(0); }); test('Test *=', () => { var envs = { "43858": { "number": 100 }, "43859": { "currency": 100, "unitName": "人民币" } }; fxAssignment('\$43858.number\$*=\$43859.currency\$', envs); expect(envs["43858"]!["number"]).toBe(10000); }); test('Test %=', () => { var envs = { "43858": { "number": 100 }, "43859": { "currency": 100, "unitName": "人民币" } }; fxAssignment('\$43858.number\$%=8', envs); expect(envs["43858"]!["number"]).toBe(4); }); test('Test &=', () => { var envs = { "43858": { "number": 100 }, "43859": { "currency": 100, "unitName": "人民币" } }; fxAssignment('\$43858.number\$&=0x07', envs); expect(envs["43858"]!["number"]).toBe(4); }); test('Test |=', () => { var envs = { "43858": { "number": 100 }, "43859": { "currency": 100, "unitName": "人民币" } }; fxAssignment('\$43858.number\$|=0x07', envs); expect(envs["43858"]!["number"]).toBe(103); }); test('Test ^=', () => { var envs = { "43858": { "number": 100 }, "43859": { "currency": 100, "unitName": "人民币" } }; fxAssignment('\$43858.number\$^=0x07', envs); expect(envs["43858"]!["number"]).toBe(99); }); test('Test >>=', () => { var envs = { "43858": { "number": 100 }, "43859": { "currency": 100, "unitName": "人民币" } }; fxAssignment('\$43858.number\$>>=2', envs); expect(envs["43858"]!["number"]).toBe(25); }); test('Test <<=', () => { var envs = { "43858": { "number": 100 }, "43859": { "currency": 100, "unitName": "人民币" } }; fxAssignment('\$43858.number\$<<=2', envs); expect(envs["43858"]!["number"]).toBe(400); }); test('Test SUM', () => { var envs = { "column": [1, 2, 0.3, 4.5, 6] }; var result = fxWithEnvs('SUM(\$column\$)', envs); expect(result).toBe(13.8); }); test('Test AVERAGE', () => { var envs = { "column": [1, 2, 3, 4, 6] }; var result = fxWithEnvs('AVERAGE(\$column\$)', envs); expect(result).toBe(3.2); }); test('Test MAX', () => { var result = fx('MAX(1, 2, 6, 4, 5.2)'); expect(result).toBe(6); result = fx('MAX(-1, -2, -6, -4, -5.2)'); expect(result).toBe(-1); }); test('Test MIN', () => { var result = fx('MIN(1, 2, 6, 4, 5.2)'); expect(result).toBe(1); result = fx('MIN(-1, -2, 6, -4, -5.2)'); expect(result).toBe(-5.2); }); test('Test ABS', () => { var result = fx('ABS(10)'); expect(result).toBe(10); result = fx('ABS(-10)'); expect(result).toBe(10); }); test('Test ROUND', () => { var result = fx('ROUND(123.45643234, 3)'); expect(result).toBe(123.456); }); test('Test FIXED', () => { var result = fx('FIXED(123.45643234, 2)'); expect(result).toBe("123.46"); }); test('Test INTFLOOR', () => { var result = fx('INTFLOOR(123.66)'); expect(result).toBe(123); }); test('Test INTCEIL', () => { var result = fx('INTCEIL(123.12)'); expect(result).toBe(124); }); test('Test VALUE', () => { var result = fx('VALUE("100")'); expect(result).toBe(100); result = fx('VALUE("100.23")'); expect(result).toBe(100.23); }); test('Test TIMESTAMP', () => { var result = fx('TIMESTAMP("2022/01/13 20:13:22", "yyyy/MM/dd HH:mm:ss")'); var dateTime = new Date(result); expect(dateTime.getFullYear()).toBe(2022); expect(dateTime.getMonth() + 1).toBe(1); expect(dateTime.getDate()).toBe(13); expect(dateTime.getHours()).toBe(20); expect(dateTime.getMinutes()).toBe(13); expect(dateTime.getSeconds()).toBe(22); }); test('Test TIMEFORMAT', () => { var result = fx('TIMEFORMAT(1642059246000, "yyyy/MM/dd HH:mm:ss")'); expect(result).toBe("2022/01/13 15:34:06"); }); test('Test ISEMPTY', () => { var result = fx('ISEMPTY("hello")'); expect(result).toBe(false); result = fx('ISEMPTY("")'); expect(result).toBe(true); var listEnvs = { "column": [1, 2, 0.3, 4.5, 6], "row": [], }; result = fxWithEnvs('ISEMPTY(\$column\$)', listEnvs); expect(result).toBe(false); result = fxWithEnvs('ISEMPTY(\$row\$)', listEnvs); expect(result).toBe(true); var mapEnvs = { "object": { "name": "Jeniffer", }, "none": {}, }; result = fxWithEnvs('ISEMPTY(\$object\$)', mapEnvs); expect(result).toBe(false); result = fxWithEnvs('ISEMPTY(\$none\$)', mapEnvs); expect(result).toBe(true); }); test('Test SUBSTRING', () => { var result = fx('SUBSTRING("hello world", 3)'); expect(result).toBe("lo world"); result = fx('SUBSTRING("hello world", 3, 4)'); expect(result).toBe("lo w"); }); test('Test REPLACESTRING', () => { var result = fx('REPLACESTRING("hello world", "world", "newcore")'); expect(result).toBe("hello newcore"); }); test('Test REGMATCH', () => { var result = fx('REGMATCH("18721788876", r"1[0-9]\\d{9}$")'); expect(result).toBe(true); result = fx('REGMATCH("zhan.yanyang@xinheyun.com", r"1[0-9]\\d{9}$")'); expect(result).toBe(false); }); test('Test MAX and SUM and INTFLOOR and FIXED', () => { var envs = { "column": [1, 2, 0.3, 4.5, 6] }; var result = fxWithEnvs( '"hello" + FIXED(MAX(SUM(\$column\$), 1.2, 8 + 2, INTFLOOR(10.9)), 2)', envs); expect(result).toBe("hello13.8"); }); test('Test RMB', () => { fxSetFunctionResolver((...args) => { var funcName = args[0]; if (funcName == 'RMB') { var value = args[1]; return `¥${value}`; } }); var result = fx('RMB(100)'); expect(result).toBe("¥100"); }); test('Test POW', () => { var result = fx('POW(2, 3)'); expect(result).toBe(8); }); test('Test SQRT', () => { var result = fx('SQRT(9)'); expect(result).toBe(3); }); test('Test CONTAIN', () => { var envs = { "cities": ["北京", "上海", "广州", "深圳", "重庆"], }; var result = fxWithEnvs('CONTAIN(\$cities\$, ["上海"])', envs); expect(result).toBe(true); }); test('Test fx onGetEnvValue', () => { var result = fx('\$alice.name\$', (envVar) => { if (envVar == "alice.name") { return "Alice"; } else { return "Unknown"; } }); expect(result).toBe("Alice"); })
38,082
https://github.com/blockbitsio/smart-contracts/blob/master/build-merger/ApplicationEntity.sol
Github Open Source
Open Source
MIT
2,021
smart-contracts
blockbitsio
Solidity
Code
3,926
11,367
pragma solidity ^0.4.17; /* * source https://github.com/blockbitsio/ * @name Application Entity Generic Contract * @package BlockBitsIO * @author Micky Socaci <micky@nowlive.ro> Used for the ABI interface when assets need to call Application Entity. This is required, otherwise we end up loading the assets themselves when we load the ApplicationEntity contract and end up in a loop */ contract ApplicationEntityABI { address public ProposalsEntity; address public FundingEntity; address public MilestonesEntity; address public MeetingsEntity; address public BountyManagerEntity; address public TokenManagerEntity; address public ListingContractEntity; address public FundingManagerEntity; address public NewsContractEntity; bool public _initialized = false; bool public _locked = false; uint8 public CurrentEntityState; uint8 public AssetCollectionNum; address public GatewayInterfaceAddress; address public deployerAddress; address testAddressAllowUpgradeFrom; mapping (bytes32 => uint8) public EntityStates; mapping (bytes32 => address) public AssetCollection; mapping (uint8 => bytes32) public AssetCollectionIdToName; mapping (bytes32 => uint256) public BylawsUint256; mapping (bytes32 => bytes32) public BylawsBytes32; function ApplicationEntity() public; function getEntityState(bytes32 name) public view returns (uint8); function linkToGateway( address _GatewayInterfaceAddress, bytes32 _sourceCodeUrl ) external; function setUpgradeState(uint8 state) public ; function addAssetProposals(address _assetAddresses) external; function addAssetFunding(address _assetAddresses) external; function addAssetMilestones(address _assetAddresses) external; function addAssetMeetings(address _assetAddresses) external; function addAssetBountyManager(address _assetAddresses) external; function addAssetTokenManager(address _assetAddresses) external; function addAssetFundingManager(address _assetAddresses) external; function addAssetListingContract(address _assetAddresses) external; function addAssetNewsContract(address _assetAddresses) external; function getAssetAddressByName(bytes32 _name) public view returns (address); function setBylawUint256(bytes32 name, uint256 value) public; function getBylawUint256(bytes32 name) public view returns (uint256); function setBylawBytes32(bytes32 name, bytes32 value) public; function getBylawBytes32(bytes32 name) public view returns (bytes32); function initialize() external returns (bool); function getParentAddress() external view returns(address); function createCodeUpgradeProposal( address _newAddress, bytes32 _sourceCodeUrl ) external returns (uint256); function acceptCodeUpgradeProposal(address _newAddress) external; function initializeAssetsToThisApplication() external returns (bool); function transferAssetsToNewApplication(address _newAddress) external returns (bool); function lock() external returns (bool); function canInitiateCodeUpgrade(address _sender) public view returns(bool); function doStateChanges() public; function hasRequiredStateChanges() public view returns (bool); function anyAssetHasChanges() public view returns (bool); function extendedAnyAssetHasChanges() internal view returns (bool); function getRequiredStateChanges() public view returns (uint8, uint8); function getTimestamp() view public returns (uint256); } /* * source https://github.com/blockbitsio/ * @name Gateway Interface Contract * @package BlockBitsIO * @author Micky Socaci <micky@nowlive.ro> Used as a resolver to retrieve the latest deployed version of the Application ENS: gateway.main.blockbits.eth will point directly to this contract. ADD ENS domain ownership / transfer methods */ contract ABIGatewayInterface { address public currentApplicationEntityAddress; ApplicationEntityABI private currentApp; address public deployerAddress; function getApplicationAddress() external view returns (address); function requestCodeUpgrade( address _newAddress, bytes32 _sourceCodeUrl ) external returns (bool); function approveCodeUpgrade( address _newAddress ) external returns (bool); function link( address _newAddress ) internal returns (bool); function getNewsContractAddress() external view returns (address); function getListingContractAddress() external view returns (address); } /* * source https://github.com/blockbitsio/ * @name Application Asset Contract ABI * @package BlockBitsIO * @author Micky Socaci <micky@nowlive.ro> Any contract inheriting this will be usable as an Asset in the Application Entity */ contract ABIApplicationAsset { bytes32 public assetName; uint8 public CurrentEntityState; uint8 public RecordNum; bool public _initialized; bool public _settingsApplied; address public owner; address public deployerAddress; mapping (bytes32 => uint8) public EntityStates; mapping (bytes32 => uint8) public RecordStates; function setInitialApplicationAddress(address _ownerAddress) public; function setInitialOwnerAndName(bytes32 _name) external returns (bool); function getRecordState(bytes32 name) public view returns (uint8); function getEntityState(bytes32 name) public view returns (uint8); function applyAndLockSettings() public returns(bool); function transferToNewOwner(address _newOwner) public returns (bool); function getApplicationAssetAddressByName(bytes32 _name) public returns(address); function getApplicationState() public view returns (uint8); function getApplicationEntityState(bytes32 name) public view returns (uint8); function getAppBylawUint256(bytes32 name) public view returns (uint256); function getAppBylawBytes32(bytes32 name) public view returns (bytes32); function getTimestamp() view public returns (uint256); } /* * source https://github.com/blockbitsio/ * @name Proposals Contract * @package BlockBitsIO * @author Micky Socaci <micky@nowlive.ro> Contains the Proposals Contract code deployed and linked to the Application Entity */ contract ABIProposals is ABIApplicationAsset { address public Application; address public ListingContractEntity; address public FundingEntity; address public FundingManagerEntity; address public TokenManagerEntity; address public TokenEntity; address public MilestonesEntity; struct ProposalRecord { address creator; bytes32 name; uint8 actionType; uint8 state; bytes32 hash; // action name + args hash address addr; bytes32 sourceCodeUrl; uint256 extra; uint256 time_start; uint256 time_end; uint256 index; } struct VoteStruct { address voter; uint256 time; bool vote; uint256 power; bool annulled; uint256 index; } struct ResultRecord { uint256 totalAvailable; uint256 requiredForResult; uint256 totalSoFar; uint256 yes; uint256 no; bool requiresCounting; } uint8 public ActiveProposalNum; uint256 public VoteCountPerProcess; bool public EmergencyFundingReleaseApproved; mapping (bytes32 => uint8) public ActionTypes; mapping (uint8 => uint256) public ActiveProposalIds; mapping (uint256 => bool) public ExpiredProposalIds; mapping (uint256 => ProposalRecord) public ProposalsById; mapping (bytes32 => uint256) public ProposalIdByHash; mapping (uint256 => mapping (uint256 => VoteStruct) ) public VotesByProposalId; mapping (uint256 => mapping (address => VoteStruct) ) public VotesByCaster; mapping (uint256 => uint256) public VotesNumByProposalId; mapping (uint256 => ResultRecord ) public ResultsByProposalId; mapping (uint256 => uint256) public lastProcessedVoteIdByProposal; mapping (uint256 => uint256) public ProcessedVotesByProposal; mapping (uint256 => uint256) public VoteCountAtProcessingStartByProposal; function getRecordState(bytes32 name) public view returns (uint8); function getActionType(bytes32 name) public view returns (uint8); function getProposalState(uint256 _proposalId) public view returns (uint8); function getBylawsProposalVotingDuration() public view returns (uint256); function getBylawsMilestoneMinPostponing() public view returns (uint256); function getBylawsMilestoneMaxPostponing() public view returns (uint256); function getHash(uint8 actionType, bytes32 arg1, bytes32 arg2) public pure returns ( bytes32 ); function process() public; function hasRequiredStateChanges() public view returns (bool); function getRequiredStateChanges() public view returns (uint8); function addCodeUpgradeProposal(address _addr, bytes32 _sourceCodeUrl) external returns (uint256); function createMilestoneAcceptanceProposal() external returns (uint256); function createMilestonePostponingProposal(uint256 _duration) external returns (uint256); function getCurrentMilestonePostponingProposalDuration() public view returns (uint256); function getCurrentMilestoneProposalStatusForType(uint8 _actionType ) public view returns (uint8); function createEmergencyFundReleaseProposal() external returns (uint256); function createDelistingProposal(uint256 _projectId) external returns (uint256); function RegisterVote(uint256 _proposalId, bool _myVote) public; function hasPreviousVote(uint256 _proposalId, address _voter) public view returns (bool); function getTotalTokenVotingPower(address _voter) public view returns ( uint256 ); function getVotingPower(uint256 _proposalId, address _voter) public view returns ( uint256 ); function setVoteCountPerProcess(uint256 _perProcess) external; function ProcessVoteTotals(uint256 _proposalId, uint256 length) public; function canEndVoting(uint256 _proposalId) public view returns (bool); function getProposalType(uint256 _proposalId) public view returns (uint8); function expiryChangesState(uint256 _proposalId) public view returns (bool); function needsProcessing(uint256 _proposalId) public view returns (bool); function getMyVoteForCurrentMilestoneRelease(address _voter) public view returns (bool); function getHasVoteForCurrentMilestoneRelease(address _voter) public view returns (bool); function getMyVote(uint256 _proposalId, address _voter) public view returns (bool); } /* * source https://github.com/blockbitsio/ * @name Funding Contract ABI * @package BlockBitsIO * @author Micky Socaci <micky@nowlive.ro> Contains the Funding Contract code deployed and linked to the Application Entity !!! Links directly to Milestones */ contract ABIFunding is ABIApplicationAsset { address public multiSigOutputAddress; address public DirectInput; address public MilestoneInput; address public TokenManagerEntity; address public FundingManagerEntity; struct FundingStage { bytes32 name; uint8 state; uint256 time_start; uint256 time_end; uint256 amount_cap_soft; // 0 = not enforced uint256 amount_cap_hard; // 0 = not enforced uint256 amount_raised; // 0 = not enforced // funding method settings uint256 minimum_entry; uint8 methods; // FundingMethodIds // token settings uint256 fixed_tokens; uint8 price_addition_percentage; // uint8 token_share_percentage; uint8 index; } mapping (uint8 => FundingStage) public Collection; uint8 public FundingStageNum; uint8 public currentFundingStage; uint256 public AmountRaised; uint256 public MilestoneAmountRaised; uint256 public GlobalAmountCapSoft; uint256 public GlobalAmountCapHard; uint8 public TokenSellPercentage; uint256 public Funding_Setting_funding_time_start; uint256 public Funding_Setting_funding_time_end; uint256 public Funding_Setting_cashback_time_start; uint256 public Funding_Setting_cashback_time_end; uint256 public Funding_Setting_cashback_before_start_wait_duration; uint256 public Funding_Setting_cashback_duration; function addFundingStage( bytes32 _name, uint256 _time_start, uint256 _time_end, uint256 _amount_cap_soft, uint256 _amount_cap_hard, // required > 0 uint8 _methods, uint256 _minimum_entry, uint256 _fixed_tokens, uint8 _price_addition_percentage, uint8 _token_share_percentage ) public; function addSettings(address _outputAddress, uint256 soft_cap, uint256 hard_cap, uint8 sale_percentage, address _direct, address _milestone ) public; function getStageAmount(uint8 StageId) public view returns ( uint256 ); function allowedPaymentMethod(uint8 _payment_method) public pure returns (bool); function receivePayment(address _sender, uint8 _payment_method) payable public returns(bool); function canAcceptPayment(uint256 _amount) public view returns (bool); function getValueOverCurrentCap(uint256 _amount) public view returns (uint256); function isFundingStageUpdateAllowed(uint8 _new_state ) public view returns (bool); function getRecordStateRequiredChanges() public view returns (uint8); function doStateChanges() public; function hasRequiredStateChanges() public view returns (bool); function getRequiredStateChanges() public view returns (uint8, uint8, uint8); } /* * source https://github.com/blockbitsio/ * @name Meetings Contract ABI * @package BlockBitsIO * @author Micky Socaci <micky@nowlive.ro> Contains the Meetings Contract code deployed and linked to the Application Entity */ contract ABIMeetings is ABIApplicationAsset { struct Record { bytes32 hash; bytes32 name; uint8 state; uint256 time_start; // start at unixtimestamp uint256 duration; uint8 index; } mapping (uint8 => Record) public Collection; } /* * source https://github.com/blockbitsio/ * @name Milestones Contract * @package BlockBitsIO * @author Micky Socaci <micky@nowlive.ro> Contains the Milestones Contract code deployed and linked to the Application Entity */ contract ABIMilestones is ABIApplicationAsset { struct Record { bytes32 name; string description; // will change to hash pointer ( external storage ) uint8 state; uint256 duration; uint256 time_start; // start at unixtimestamp uint256 last_state_change_time; // time of last state change uint256 time_end; // estimated end time >> can be increased by proposal uint256 time_ended; // actual end time uint256 meeting_time; uint8 funding_percentage; uint8 index; } uint8 public currentRecord; uint256 public MilestoneCashBackTime = 0; mapping (uint8 => Record) public Collection; mapping (bytes32 => bool) public MilestonePostponingHash; mapping (bytes32 => uint256) public ProposalIdByHash; function getBylawsProjectDevelopmentStart() public view returns (uint256); function getBylawsMinTimeInTheFutureForMeetingCreation() public view returns (uint256); function getBylawsCashBackVoteRejectedDuration() public view returns (uint256); function addRecord( bytes32 _name, string _description, uint256 _duration, uint8 _perc ) public; function getMilestoneFundingPercentage(uint8 recordId) public view returns (uint8); function doStateChanges() public; function getRecordStateRequiredChanges() public view returns (uint8); function hasRequiredStateChanges() public view returns (bool); function afterVoteNoCashBackTime() public view returns ( bool ); function getHash(uint8 actionType, bytes32 arg1, bytes32 arg2) public pure returns ( bytes32 ); function getCurrentHash() public view returns ( bytes32 ); function getCurrentProposalId() internal view returns ( uint256 ); function setCurrentMilestoneMeetingTime(uint256 _meeting_time) public; function isRecordUpdateAllowed(uint8 _new_state ) public view returns (bool); function getRequiredStateChanges() public view returns (uint8, uint8, uint8); function ApplicationIsInDevelopment() public view returns(bool); function MeetingTimeSetFailure() public view returns (bool); } /* * source https://github.com/blockbitsio/ * @name Bounty Program Contract ABI * @package BlockBitsIO * @author Micky Socaci <micky@nowlive.ro> Bounty program contract that holds and distributes tokens upon successful funding. */ contract ABIBountyManager is ABIApplicationAsset { function sendBounty( address _receiver, uint256 _amount ) public; } /* * source https://github.com/blockbitsio/ * @name Token Manager Contract * @package BlockBitsIO * @author Micky Socaci <micky@nowlive.ro> */ contract ABITokenManager is ABIApplicationAsset { address public TokenSCADAEntity; address public TokenEntity; address public MarketingMethodAddress; bool OwnerTokenBalancesReleased = false; function addSettings(address _scadaAddress, address _tokenAddress, address _marketing ) public; function getTokenSCADARequiresHardCap() public view returns (bool); function mint(address _to, uint256 _amount) public returns (bool); function finishMinting() public returns (bool); function mintForMarketingPool(address _to, uint256 _amount) external returns (bool); function ReleaseOwnersLockedTokens(address _multiSigOutputAddress) public returns (bool); } /* * source https://github.com/blockbitsio/ * @name Funding Contract ABI * @package BlockBitsIO * @author Micky Socaci <micky@nowlive.ro> Contains the Funding Contract code deployed and linked to the Application Entity */ contract ABIFundingManager is ABIApplicationAsset { bool public fundingProcessed; bool FundingPoolBalancesAllocated; uint8 public VaultCountPerProcess; uint256 public lastProcessedVaultId; uint256 public vaultNum; uint256 public LockedVotingTokens; bytes32 public currentTask; mapping (bytes32 => bool) public taskByHash; mapping (address => address) public vaultList; mapping (uint256 => address) public vaultById; function receivePayment(address _sender, uint8 _payment_method, uint8 _funding_stage) payable public returns(bool); function getMyVaultAddress(address _sender) public view returns (address); function setVaultCountPerProcess(uint8 _perProcess) external; function getHash(bytes32 actionType, bytes32 arg1) public pure returns ( bytes32 ); function getCurrentMilestoneProcessed() public view returns (bool); function processFundingFailedFinished() public view returns (bool); function processFundingSuccessfulFinished() public view returns (bool); function getCurrentMilestoneIdHash() internal view returns (bytes32); function processMilestoneFinished() public view returns (bool); function processEmergencyFundReleaseFinished() public view returns (bool); function getAfterTransferLockedTokenBalances(address vaultAddress, bool excludeCurrent) public view returns (uint256); function VaultRequestedUpdateForLockedVotingTokens(address owner) public; function doStateChanges() public; function hasRequiredStateChanges() public view returns (bool); function getRequiredStateChanges() public view returns (uint8, uint8); function ApplicationInFundingOrDevelopment() public view returns(bool); } /* * source https://github.com/blockbitsio/ * @name Listing Contract ABI * @package BlockBitsIO * @author Micky Socaci <micky@nowlive.ro> */ contract ABIListingContract is ABIApplicationAsset { address public managerAddress; // child items struct item { bytes32 name; address itemAddress; bool status; uint256 index; } mapping ( uint256 => item ) public items; uint256 public itemNum; function setManagerAddress(address _manager) public; function addItem(bytes32 _name, address _address) public; function getNewsContractAddress(uint256 _childId) external view returns (address); function canBeDelisted(uint256 _childId) public view returns (bool); function getChildStatus( uint256 _childId ) public view returns (bool); function delistChild( uint256 _childId ) public; } /* * source https://github.com/blockbitsio/ * @name News Contract ABI * @package BlockBitsIO * @author Micky Socaci <micky@nowlive.ro> */ contract ABINewsContract is ABIApplicationAsset { struct item { string hash; uint8 itemType; uint256 length; } uint256 public itemNum = 0; mapping ( uint256 => item ) public items; function addInternalMessage(uint8 state) public; function addItem(string _hash, uint256 _length) public; } /* * source https://github.com/blockbitsio/ * @name Application Entity Contract * @package BlockBitsIO * @author Micky Socaci <micky@nowlive.ro> Contains the main company Entity Contract code deployed and linked to the Gateway Interface. */ contract ApplicationEntity { /* Source Code Url */ bytes32 sourceCodeUrl; /* Entity initialised or not */ bool public _initialized = false; /* Entity locked or not */ bool public _locked = false; /* Current Entity State */ uint8 public CurrentEntityState; /* Available Entity State */ mapping (bytes32 => uint8) public EntityStates; /* GatewayInterface address */ address public GatewayInterfaceAddress; /* Parent Entity Instance */ ABIGatewayInterface GatewayInterfaceEntity; /* Asset Entities */ ABIProposals public ProposalsEntity; ABIFunding public FundingEntity; ABIMilestones public MilestonesEntity; ABIMeetings public MeetingsEntity; ABIBountyManager public BountyManagerEntity; ABITokenManager public TokenManagerEntity; ABIListingContract public ListingContractEntity; ABIFundingManager public FundingManagerEntity; ABINewsContract public NewsContractEntity; /* Asset Collection */ mapping (bytes32 => address) public AssetCollection; mapping (uint8 => bytes32) public AssetCollectionIdToName; uint8 public AssetCollectionNum = 0; event EventAppEntityReady ( address indexed _address ); event EventAppEntityCodeUpgradeProposal ( address indexed _address, bytes32 indexed _sourceCodeUrl ); event EventAppEntityInitAsset ( bytes32 indexed _name, address indexed _address ); event EventAppEntityInitAssetsToThis ( uint8 indexed _assetNum ); event EventAppEntityAssetsToNewApplication ( address indexed _address ); event EventAppEntityLocked ( address indexed _address ); address public deployerAddress; function ApplicationEntity() public { deployerAddress = msg.sender; setEntityStates(); CurrentEntityState = getEntityState("NEW"); } function setEntityStates() internal { // ApplicationEntity States EntityStates["__IGNORED__"] = 0; EntityStates["NEW"] = 1; EntityStates["WAITING"] = 2; EntityStates["IN_FUNDING"] = 3; EntityStates["IN_DEVELOPMENT"] = 5; EntityStates["IN_CODE_UPGRADE"] = 50; EntityStates["UPGRADED"] = 100; EntityStates["IN_GLOBAL_CASHBACK"] = 150; EntityStates["LOCKED"] = 200; EntityStates["DEVELOPMENT_COMPLETE"] = 250; } function getEntityState(bytes32 name) public view returns (uint8) { return EntityStates[name]; } /* * Initialize Application and it's assets * If gateway is freshly deployed, just link * else, create a voting proposal that needs to be accepted for the linking * * @param address _newAddress * @param bytes32 _sourceCodeUrl * * @modifiers requireNoParent, requireNotInitialised */ function linkToGateway( address _GatewayInterfaceAddress, bytes32 _sourceCodeUrl ) external requireNoParent requireNotInitialised onlyDeployer { GatewayInterfaceAddress = _GatewayInterfaceAddress; sourceCodeUrl = _sourceCodeUrl; // init gateway entity and set app address GatewayInterfaceEntity = ABIGatewayInterface(GatewayInterfaceAddress); GatewayInterfaceEntity.requestCodeUpgrade( address(this), sourceCodeUrl ); } function setUpgradeState(uint8 state) public onlyGatewayInterface { CurrentEntityState = state; } /* For the sake of simplicity, and solidity warnings about "unknown gas usage" do this.. instead of sending an array of addresses */ function addAssetProposals(address _assetAddresses) external requireNotInitialised onlyDeployer { ProposalsEntity = ABIProposals(_assetAddresses); assetInitialized("Proposals", _assetAddresses); } function addAssetFunding(address _assetAddresses) external requireNotInitialised onlyDeployer { FundingEntity = ABIFunding(_assetAddresses); assetInitialized("Funding", _assetAddresses); } function addAssetMilestones(address _assetAddresses) external requireNotInitialised onlyDeployer { MilestonesEntity = ABIMilestones(_assetAddresses); assetInitialized("Milestones", _assetAddresses); } function addAssetMeetings(address _assetAddresses) external requireNotInitialised onlyDeployer { MeetingsEntity = ABIMeetings(_assetAddresses); assetInitialized("Meetings", _assetAddresses); } function addAssetBountyManager(address _assetAddresses) external requireNotInitialised onlyDeployer { BountyManagerEntity = ABIBountyManager(_assetAddresses); assetInitialized("BountyManager", _assetAddresses); } function addAssetTokenManager(address _assetAddresses) external requireNotInitialised onlyDeployer { TokenManagerEntity = ABITokenManager(_assetAddresses); assetInitialized("TokenManager", _assetAddresses); } function addAssetFundingManager(address _assetAddresses) external requireNotInitialised onlyDeployer { FundingManagerEntity = ABIFundingManager(_assetAddresses); assetInitialized("FundingManager", _assetAddresses); } function addAssetListingContract(address _assetAddresses) external requireNotInitialised onlyDeployer { ListingContractEntity = ABIListingContract(_assetAddresses); assetInitialized("ListingContract", _assetAddresses); } function addAssetNewsContract(address _assetAddresses) external requireNotInitialised onlyDeployer { NewsContractEntity = ABINewsContract(_assetAddresses); assetInitialized("NewsContract", _assetAddresses); } function assetInitialized(bytes32 name, address _assetAddresses) internal { if(AssetCollection[name] == 0x0) { AssetCollectionIdToName[AssetCollectionNum] = name; AssetCollection[name] = _assetAddresses; AssetCollectionNum++; } else { // just replace AssetCollection[name] = _assetAddresses; } EventAppEntityInitAsset(name, _assetAddresses); } function getAssetAddressByName(bytes32 _name) public view returns (address) { return AssetCollection[_name]; } /* Application Bylaws mapping */ mapping (bytes32 => uint256) public BylawsUint256; mapping (bytes32 => bytes32) public BylawsBytes32; function setBylawUint256(bytes32 name, uint256 value) public requireNotInitialised onlyDeployer { BylawsUint256[name] = value; } function getBylawUint256(bytes32 name) public view requireInitialised returns (uint256) { return BylawsUint256[name]; } function setBylawBytes32(bytes32 name, bytes32 value) public requireNotInitialised onlyDeployer { BylawsBytes32[name] = value; } function getBylawBytes32(bytes32 name) public view requireInitialised returns (bytes32) { return BylawsBytes32[name]; } function initialize() external requireNotInitialised onlyGatewayInterface returns (bool) { _initialized = true; EventAppEntityReady( address(this) ); return true; } function getParentAddress() external view returns(address) { return GatewayInterfaceAddress; } function createCodeUpgradeProposal( address _newAddress, bytes32 _sourceCodeUrl ) external requireInitialised onlyGatewayInterface returns (uint256) { // proposals create new.. code upgrade proposal EventAppEntityCodeUpgradeProposal ( _newAddress, _sourceCodeUrl ); // return true; return ProposalsEntity.addCodeUpgradeProposal(_newAddress, _sourceCodeUrl); } /* * Only a proposal can update the ApplicationEntity Contract address * * @param address _newAddress * @modifiers onlyProposalsAsset */ function acceptCodeUpgradeProposal(address _newAddress) external onlyProposalsAsset { GatewayInterfaceEntity.approveCodeUpgrade( _newAddress ); } function initializeAssetsToThisApplication() external onlyGatewayInterface returns (bool) { for(uint8 i = 0; i < AssetCollectionNum; i++ ) { bytes32 _name = AssetCollectionIdToName[i]; address current = AssetCollection[_name]; if(current != address(0x0)) { if(!current.call(bytes4(keccak256("setInitialOwnerAndName(bytes32)")), _name) ) { revert(); } } else { revert(); } } EventAppEntityInitAssetsToThis( AssetCollectionNum ); return true; } function transferAssetsToNewApplication(address _newAddress) external onlyGatewayInterface returns (bool){ for(uint8 i = 0; i < AssetCollectionNum; i++ ) { bytes32 _name = AssetCollectionIdToName[i]; address current = AssetCollection[_name]; if(current != address(0x0)) { if(!current.call(bytes4(keccak256("transferToNewOwner(address)")), _newAddress) ) { revert(); } } else { revert(); } } EventAppEntityAssetsToNewApplication ( _newAddress ); return true; } /* * Only the gateway interface can lock current app after a successful code upgrade proposal * * @modifiers onlyGatewayInterface */ function lock() external onlyGatewayInterface returns (bool) { _locked = true; CurrentEntityState = getEntityState("UPGRADED"); EventAppEntityLocked(address(this)); return true; } /* DUMMY METHOD, to be replaced in a future Code Upgrade with a check to determine if sender should be able to initiate a code upgrade specifically used after milestone development completes */ address testAddressAllowUpgradeFrom; function canInitiateCodeUpgrade(address _sender) public view returns(bool) { // suppress warning if(testAddressAllowUpgradeFrom != 0x0 && testAddressAllowUpgradeFrom == _sender) { return true; } return false; } /* * Throws if called by any other entity except GatewayInterface */ modifier onlyGatewayInterface() { require(GatewayInterfaceAddress != address(0) && msg.sender == GatewayInterfaceAddress); _; } /* * Throws if called by any other entity except Proposals Asset Contract */ modifier onlyProposalsAsset() { require(msg.sender == address(ProposalsEntity)); _; } modifier requireNoParent() { require(GatewayInterfaceAddress == address(0x0)); _; } modifier requireNotInitialised() { require(_initialized == false && _locked == false); _; } modifier requireInitialised() { require(_initialized == true && _locked == false); _; } modifier onlyDeployer() { require(msg.sender == deployerAddress); _; } event DebugApplicationRequiredChanges( uint8 indexed _current, uint8 indexed _required ); event EventApplicationEntityProcessor(uint8 indexed _current, uint8 indexed _required); /* We could create a generic method that iterates through all assets, and using assembly language get the return value of the "hasRequiredStateChanges" method on each asset. Based on return, run doStateChanges on them or not. Or we could be using a generic ABI contract that only defines the "hasRequiredStateChanges" and "doStateChanges" methods thus not requiring any assembly variable / memory management Problem with both cases is the fact that our application needs to change only specific asset states depending on it's own current state, thus making a generic call wasteful in gas usage. Let's stay away from that and follow the same approach as we do inside an asset. - view method: -> get required state changes - view method: -> has state changes - processor that does the actual changes. - doStateChanges recursive method that runs the processor if views require it to. // pretty similar to FundingManager */ function doStateChanges() public { if(!_locked) { // process assets first so we can initialize them from NEW to WAITING AssetProcessor(); var (returnedCurrentEntityState, EntityStateRequired) = getRequiredStateChanges(); bool callAgain = false; DebugApplicationRequiredChanges( returnedCurrentEntityState, EntityStateRequired ); if(EntityStateRequired != getEntityState("__IGNORED__") ) { EntityProcessor(EntityStateRequired); callAgain = true; } } else { revert(); } } function hasRequiredStateChanges() public view returns (bool) { bool hasChanges = false; if(!_locked) { var (returnedCurrentEntityState, EntityStateRequired) = getRequiredStateChanges(); // suppress unused local variable warning returnedCurrentEntityState = 0; if(EntityStateRequired != getEntityState("__IGNORED__") ) { hasChanges = true; } if(anyAssetHasChanges()) { hasChanges = true; } } return hasChanges; } function anyAssetHasChanges() public view returns (bool) { if( FundingEntity.hasRequiredStateChanges() ) { return true; } if( FundingManagerEntity.hasRequiredStateChanges() ) { return true; } if( MilestonesEntity.hasRequiredStateChanges() ) { return true; } if( ProposalsEntity.hasRequiredStateChanges() ) { return true; } return extendedAnyAssetHasChanges(); } // use this when extending "has changes" function extendedAnyAssetHasChanges() internal view returns (bool) { if(_initialized) {} return false; } // use this when extending "asset state processor" function extendedAssetProcessor() internal { // does not exist, but we check anyway to bypass compier warning about function state mutability if ( CurrentEntityState == 255 ) { ProposalsEntity.process(); } } // view methods decide if changes are to be made // in case of tasks, we do them in the Processors. function AssetProcessor() internal { if ( CurrentEntityState == getEntityState("NEW") ) { // move all assets that have states to "WAITING" if(FundingEntity.hasRequiredStateChanges()) { FundingEntity.doStateChanges(); } if(FundingManagerEntity.hasRequiredStateChanges()) { FundingManagerEntity.doStateChanges(); } if( MilestonesEntity.hasRequiredStateChanges() ) { MilestonesEntity.doStateChanges(); } } else if ( CurrentEntityState == getEntityState("WAITING") ) { if( FundingEntity.hasRequiredStateChanges() ) { FundingEntity.doStateChanges(); } } else if ( CurrentEntityState == getEntityState("IN_FUNDING") ) { if( FundingEntity.hasRequiredStateChanges() ) { FundingEntity.doStateChanges(); } if( FundingManagerEntity.hasRequiredStateChanges() ) { FundingManagerEntity.doStateChanges(); } } else if ( CurrentEntityState == getEntityState("IN_DEVELOPMENT") ) { if( FundingManagerEntity.hasRequiredStateChanges() ) { FundingManagerEntity.doStateChanges(); } if(MilestonesEntity.hasRequiredStateChanges()) { MilestonesEntity.doStateChanges(); } if(ProposalsEntity.hasRequiredStateChanges()) { ProposalsEntity.process(); } } else if ( CurrentEntityState == getEntityState("DEVELOPMENT_COMPLETE") ) { if(ProposalsEntity.hasRequiredStateChanges()) { ProposalsEntity.process(); } } extendedAssetProcessor(); } function EntityProcessor(uint8 EntityStateRequired) internal { EventApplicationEntityProcessor( CurrentEntityState, EntityStateRequired ); // Update our Entity State CurrentEntityState = EntityStateRequired; // Do State Specific Updates if ( EntityStateRequired == getEntityState("IN_FUNDING") ) { // run Funding state changer // doStateChanges } // EntityStateRequired = getEntityState("IN_FUNDING"); // Funding Failed /* if ( EntityStateRequired == getEntityState("FUNDING_FAILED_START") ) { // set ProcessVaultList Task currentTask = getHash("FUNDING_FAILED_START", ""); CurrentEntityState = getEntityState("FUNDING_FAILED_PROGRESS"); } else if ( EntityStateRequired == getEntityState("FUNDING_FAILED_PROGRESS") ) { ProcessVaultList(VaultCountPerProcess); // Funding Successful } else if ( EntityStateRequired == getEntityState("FUNDING_SUCCESSFUL_START") ) { // init SCADA variable cache. if(TokenSCADAEntity.initCacheForVariables()) { // start processing vaults currentTask = getHash("FUNDING_SUCCESSFUL_START", ""); CurrentEntityState = getEntityState("FUNDING_SUCCESSFUL_PROGRESS"); } else { // something went really wrong, just bail out for now CurrentEntityState = getEntityState("FUNDING_FAILED_START"); } } else if ( EntityStateRequired == getEntityState("FUNDING_SUCCESSFUL_PROGRESS") ) { ProcessVaultList(VaultCountPerProcess); // Milestones } else if ( EntityStateRequired == getEntityState("MILESTONE_PROCESS_START") ) { currentTask = getHash("MILESTONE_PROCESS_START", getCurrentMilestoneId() ); CurrentEntityState = getEntityState("MILESTONE_PROCESS_PROGRESS"); } else if ( EntityStateRequired == getEntityState("MILESTONE_PROCESS_PROGRESS") ) { ProcessVaultList(VaultCountPerProcess); // Completion } else if ( EntityStateRequired == getEntityState("COMPLETE_PROCESS_START") ) { currentTask = getHash("COMPLETE_PROCESS_START", ""); CurrentEntityState = getEntityState("COMPLETE_PROCESS_PROGRESS"); } else if ( EntityStateRequired == getEntityState("COMPLETE_PROCESS_PROGRESS") ) { ProcessVaultList(VaultCountPerProcess); } */ } /* * Method: Get Entity Required State Changes * * @access public * @type method * * @return ( uint8 CurrentEntityState, uint8 EntityStateRequired ) */ function getRequiredStateChanges() public view returns (uint8, uint8) { uint8 EntityStateRequired = getEntityState("__IGNORED__"); if( CurrentEntityState == getEntityState("NEW") ) { // general so we know we initialized EntityStateRequired = getEntityState("WAITING"); } else if ( CurrentEntityState == getEntityState("WAITING") ) { // Funding Started if( FundingEntity.CurrentEntityState() == FundingEntity.getEntityState("IN_PROGRESS") ) { EntityStateRequired = getEntityState("IN_FUNDING"); } } else if ( CurrentEntityState == getEntityState("IN_FUNDING") ) { if(FundingEntity.CurrentEntityState() == FundingEntity.getEntityState("SUCCESSFUL_FINAL")) { // SUCCESSFUL_FINAL means FUNDING was successful, and FundingManager has finished distributing tokens and ether EntityStateRequired = getEntityState("IN_DEVELOPMENT"); } else if(FundingEntity.CurrentEntityState() == FundingEntity.getEntityState("FAILED_FINAL")) { // Funding failed.. EntityStateRequired = getEntityState("IN_GLOBAL_CASHBACK"); } } else if ( CurrentEntityState == getEntityState("IN_DEVELOPMENT") ) { // this is where most things happen // milestones get developed // code upgrades get initiated // proposals get created and voted /* if(ProposalsEntity.CurrentEntityState() == ProposalsEntity.getEntityState("CODE_UPGRADE_ACCEPTED")) { // check if we have an upgrade proposal that is accepted and move into said state EntityStateRequired = getEntityState("START_CODE_UPGRADE"); } else */ if(MilestonesEntity.CurrentEntityState() == MilestonesEntity.getEntityState("DEVELOPMENT_COMPLETE")) { // check if we finished developing all milestones .. and if so move state to complete. EntityStateRequired = getEntityState("DEVELOPMENT_COMPLETE"); } if(MilestonesEntity.CurrentEntityState() == MilestonesEntity.getEntityState("DEADLINE_MEETING_TIME_FAILED")) { EntityStateRequired = getEntityState("IN_GLOBAL_CASHBACK"); } } else if ( CurrentEntityState == getEntityState("START_CODE_UPGRADE") ) { // check stuff to move into IN_CODE_UPGRADE // EntityStateRequired = getEntityState("IN_CODE_UPGRADE"); } else if ( CurrentEntityState == getEntityState("IN_CODE_UPGRADE") ) { // check stuff to finish // EntityStateRequired = getEntityState("FINISHED_CODE_UPGRADE"); } else if ( CurrentEntityState == getEntityState("FINISHED_CODE_UPGRADE") ) { // move to IN_DEVELOPMENT or DEVELOPMENT_COMPLETE based on state before START_CODE_UPGRADE. // EntityStateRequired = getEntityState("DEVELOPMENT_COMPLETE"); // EntityStateRequired = getEntityState("FINISHED_CODE_UPGRADE"); } return (CurrentEntityState, EntityStateRequired); } function getTimestamp() view public returns (uint256) { return now; } }
42,933
https://github.com/LiShenglin/LoveFreshBeen/blob/master/爱鲜蜂/baseFramework/Third/CHRefresh/UIScrollView+Extension.m
Github Open Source
Open Source
Apache-2.0
2,016
LoveFreshBeen
LiShenglin
Objective-C
Code
311
1,261
// // UIScrollView+Extension.m // baseFramework // // Created by chenangel on 16/6/12. // Copyright © 2016年 chuhan. All rights reserved. // #import "UIScrollView+Extension.h" @implementation UIScrollView (Extension) /** 下拉刷新 第一个参数是方向 */ - (void)headerViewPullToRefresh:(CHRefreashDirection)direction callback:(void(^)())callback{ // 创建headerview CHRefreshHeaderView * headerView = [CHRefreshHeaderView headerView]; headerView.viewDirection = direction; [self addSubview:headerView]; headerView.beginRefreshingCallback = callback; headerView.State = RefreshStateNormal; } /** 开始下拉刷新 */ - (void)headerViewBeginRefreshing{ for (UIView* ve in self.subviews) { if ([ve isKindOfClass:[CHRefreshHeaderView class]]) { CHRefreshHeaderView * view = (CHRefreshHeaderView *)ve; [view beginRefreshing]; } } } /** * 结束下拉刷新 */ - (void)headerViewStopPullToRefresh{ for (UIView *ve in self.subviews){ if([ve isKindOfClass:[CHRefreshHeaderView class]]){ CHRefreshHeaderView *view = (CHRefreshHeaderView*)ve; [view endRefreshing]; } } } /** 移除下拉刷新 */ -(void)removeHeaderView{ for(UIView *ve in self.subviews){ if ([ve isKindOfClass:[CHRefreshHeaderView class]]){ [ve removeFromSuperview]; } } } -(void)setHeaderHidden:(BOOL)hidden { for(UIView *ve in self.subviews){ if ([ve isKindOfClass:[CHRefreshHeaderView class]]){ CHRefreshHeaderView* view = (CHRefreshHeaderView*)ve; view.hidden = hidden; } } } -(BOOL)isHeaderHidden { for(UIView *ve in self.subviews){ if ([ve isKindOfClass:[CHRefreshHeaderView class]]){ CHRefreshHeaderView *view = (CHRefreshHeaderView*)ve; return view.hidden; } } return nil; } /** 上拉加载更多 */ -(void)footerViewPullToRefresh:(CHRefreashDirection)direction callback:(void(^)())callback { CHRefreshFooterView *footView = [[CHRefreshFooterView alloc]init]; if (direction == CHRefreshDirectionHorizontal){ footView.frame = CGRectMake(0, 0, CHRefreshViewHeight, SCREEN_HEIGHT); } else { footView.frame = CGRectMake(0, 0, SCREEN_WIDTH, CHRefreshViewHeight); } footView.viewDirection = direction; [self addSubview:footView]; footView.beginRefreshingCallback = callback; footView.State = RefreshStateNormal; } /** 开始上拉加载更多 */ -(void)footerBeginRefreshing { for (UIView *ve in self.subviews) { if ([ve isKindOfClass:[CHRefreshFooterView class]]){ CHRefreshFooterView *view = (CHRefreshFooterView*)ve; [view beginRefreshing]; } } } /** 结束上拉加载更多 */ -(void)footerEndRefreshing { for (UIView *ve in self.subviews){ if ([ve isKindOfClass:[CHRefreshFooterView class]]){ CHRefreshFooterView *view = (CHRefreshFooterView*)ve; [view beginRefreshing]; } } } /** 移除脚步 */ -(void)removeFooterView{ for(UIView *ve in self.subviews){ if([ve isKindOfClass:[CHRefreshFooterView class]]){ [ve removeFromSuperview]; } } } -(void)setFooterHidden:(BOOL)hidden { for(UIView *ve in self.subviews){ if ([ve isKindOfClass: [CHRefreshFooterView class]]){ CHRefreshFooterView *view = (CHRefreshFooterView*)ve; view.hidden = hidden; } } } -(BOOL)isFooterHidden { for(UIView *ve in self.subviews){ if ([ve isKindOfClass: [CHRefreshFooterView class]]){ CHRefreshFooterView *view = (CHRefreshFooterView*)ve; return view.hidden; } } return nil; } @end
23,220
https://github.com/cagatayturkann/matriksmobil/blob/master/platforms/android/build/generated/source/r/F0F1/debug/org/nativescript/Matriks/R.java
Github Open Source
Open Source
MIT
null
matriksmobil
cagatayturkann
Java
Code
20,000
70,649
/* AUTO-GENERATED FILE. DO NOT MODIFY. * * This class was automatically generated by the * aapt tool from the resource data it found. It * should not be modified by hand. */ package org.nativescript.Matriks; public final class R { public static final class anim { public static final int abc_fade_in=0x7f040000; public static final int abc_fade_out=0x7f040001; public static final int abc_grow_fade_in_from_bottom=0x7f040002; public static final int abc_popup_enter=0x7f040003; public static final int abc_popup_exit=0x7f040004; public static final int abc_shrink_fade_out_from_bottom=0x7f040005; public static final int abc_slide_in_bottom=0x7f040006; public static final int abc_slide_in_top=0x7f040007; public static final int abc_slide_out_bottom=0x7f040008; public static final int abc_slide_out_top=0x7f040009; public static final int design_bottom_sheet_slide_in=0x7f04000a; public static final int design_bottom_sheet_slide_out=0x7f04000b; public static final int design_fab_in=0x7f04000c; public static final int design_fab_out=0x7f04000d; public static final int design_snackbar_in=0x7f04000e; public static final int design_snackbar_out=0x7f04000f; public static final int drawer_slide_in_top=0x7f040010; public static final int drawer_slide_out_top=0x7f040011; } public static final class attr { /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int AreaSeriesStyle=0x7f0100cb; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int AxisStyle=0x7f0100bf; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int BarSeriesStyle=0x7f0100c7; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int CartesianAxisStyle=0x7f0100c0; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int CartesianCustomAnnotationStyle=0x7f0100cf; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int CartesianPlotBandAnnotationStyle=0x7f0100ce; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int CartesianStrokedAnnotationStyle=0x7f0100cd; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int CategoricalAxisStyle=0x7f0100c1; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int CategoricalSeriesStyle=0x7f0100c9; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int CategoricalStrokedSeriesStyle=0x7f0100ca; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int ChartAnnotationStyle=0x7f0100cc; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int ChartSeriesStyle=0x7f0100c5; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int DateTimeCategoricalAxisStyle=0x7f0100c2; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int DateTimeContinuousAxisStyle=0x7f0100c3; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int LineAxisStyle=0x7f0100c6; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int RadChartBaseStyle=0x7f0100c4; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int RangeBarSeriesStyle=0x7f0100c8; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int TestBarSeriesStyle=0x7f0100d0; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionBarDivider=0x7f01004f; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionBarItemBackground=0x7f010050; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionBarPopupTheme=0x7f010049; /** <p>May be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. <p>May be one of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>wrap_content</code></td><td>0</td><td></td></tr> </table> */ public static final int actionBarSize=0x7f01004e; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionBarSplitStyle=0x7f01004b; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionBarStyle=0x7f01004a; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionBarTabBarStyle=0x7f010045; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionBarTabStyle=0x7f010044; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionBarTabTextStyle=0x7f010046; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionBarTheme=0x7f01004c; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionBarWidgetTheme=0x7f01004d; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionButtonStyle=0x7f010069; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionDropDownStyle=0x7f010065; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionLayout=0x7f010103; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionMenuTextAppearance=0x7f010051; /** <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". */ public static final int actionMenuTextColor=0x7f010052; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionModeBackground=0x7f010055; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionModeCloseButtonStyle=0x7f010054; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionModeCloseDrawable=0x7f010057; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionModeCopyDrawable=0x7f010059; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionModeCutDrawable=0x7f010058; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionModeFindDrawable=0x7f01005d; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionModePasteDrawable=0x7f01005a; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionModePopupWindowStyle=0x7f01005f; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionModeSelectAllDrawable=0x7f01005b; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionModeShareDrawable=0x7f01005c; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionModeSplitBackground=0x7f010056; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionModeStyle=0x7f010053; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionModeWebSearchDrawable=0x7f01005e; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionOverflowButtonStyle=0x7f010047; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int actionOverflowMenuStyle=0x7f010048; /** <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int actionProviderClass=0x7f010105; /** <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int actionViewClass=0x7f010104; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int activityChooserViewStyle=0x7f010071; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int alertDialogButtonGroupStyle=0x7f010094; /** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int alertDialogCenterButtons=0x7f010095; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int alertDialogStyle=0x7f010093; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int alertDialogTheme=0x7f010096; /** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int allowStacking=0x7f0100b2; /** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int applyDefaultPalette=0x7f010000; /** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int areBarsRounded=0x7f010001; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int arrowHeadLength=0x7f0100f4; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int arrowShaftLength=0x7f0100f5; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int autoCompleteTextViewStyle=0x7f01009b; /** <p>Must be one of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>None</code></td><td>0</td><td></td></tr> <tr><td><code>Multiline</code></td><td>1</td><td></td></tr> <tr><td><code>Rotate</code></td><td>2</td><td></td></tr> </table> */ public static final int axisLabelFitMode=0x7f0100ac; /** <p>Must be one of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>Visible</code></td><td>0</td><td></td></tr> <tr><td><code>Hidden</code></td><td>1</td><td></td></tr> <tr><td><code>Clip</code></td><td>2</td><td></td></tr> </table> */ public static final int axisLastLabelVisibility=0x7f0100a9; /** <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int axisTitle=0x7f0100ad; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int background=0x7f01001d; /** <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". */ public static final int backgroundSplit=0x7f01001f; /** <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". */ public static final int backgroundStacked=0x7f01001e; /** <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int backgroundTint=0x7f01016a; /** <p>Must be one of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>src_over</code></td><td>3</td><td></td></tr> <tr><td><code>src_in</code></td><td>5</td><td></td></tr> <tr><td><code>src_atop</code></td><td>9</td><td></td></tr> <tr><td><code>multiply</code></td><td>14</td><td></td></tr> <tr><td><code>screen</code></td><td>15</td><td></td></tr> </table> */ public static final int backgroundTintMode=0x7f01016b; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int barLength=0x7f0100f6; /** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int behavior_hideable=0x7f0100b1; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int behavior_overlapTop=0x7f010129; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int behavior_peekHeight=0x7f0100b0; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int borderWidth=0x7f0100fb; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int borderlessButtonStyle=0x7f01006e; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int bottomSheetDialogTheme=0x7f0100ed; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int bottomSheetStyle=0x7f0100ee; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int buttonBarButtonStyle=0x7f01006b; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int buttonBarNegativeButtonStyle=0x7f010099; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int buttonBarNeutralButtonStyle=0x7f01009a; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int buttonBarPositiveButtonStyle=0x7f010098; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int buttonBarStyle=0x7f01006a; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int buttonPanelSideLayout=0x7f010030; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int buttonStyle=0x7f01009c; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int buttonStyleSmall=0x7f01009d; /** <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int buttonTint=0x7f0100e0; /** <p>Must be one of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>src_over</code></td><td>3</td><td></td></tr> <tr><td><code>src_in</code></td><td>5</td><td></td></tr> <tr><td><code>src_atop</code></td><td>9</td><td></td></tr> <tr><td><code>multiply</code></td><td>14</td><td></td></tr> <tr><td><code>screen</code></td><td>15</td><td></td></tr> </table> */ public static final int buttonTintMode=0x7f0100e1; /** <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int calendarBackground=0x7f010112; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int calendarStyle=0x7f0100b4; /** <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int chartZoom=0x7f01011c; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int checkboxStyle=0x7f01009e; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int checkedTextViewStyle=0x7f01009f; /** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int clipToBounds=0x7f01011e; /** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int clipToPlotArea=0x7f010002; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int closeIcon=0x7f01012e; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int closeItemLayout=0x7f01002d; /** <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int collapseContentDescription=0x7f010161; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int collapseIcon=0x7f010160; /** <p>Must be one or more (separated by '|') of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>top</code></td><td>0x30</td><td></td></tr> <tr><td><code>bottom</code></td><td>0x50</td><td></td></tr> <tr><td><code>left</code></td><td>0x03</td><td></td></tr> <tr><td><code>right</code></td><td>0x05</td><td></td></tr> <tr><td><code>center_vertical</code></td><td>0x10</td><td></td></tr> <tr><td><code>fill_vertical</code></td><td>0x70</td><td></td></tr> <tr><td><code>center_horizontal</code></td><td>0x01</td><td></td></tr> <tr><td><code>center</code></td><td>0x11</td><td></td></tr> <tr><td><code>start</code></td><td>0x00800003</td><td></td></tr> <tr><td><code>end</code></td><td>0x00800005</td><td></td></tr> </table> */ public static final int collapsedTitleGravity=0x7f0100dd; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int collapsedTitleTextAppearance=0x7f0100d9; /** <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int color=0x7f0100f0; /** <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int colorAccent=0x7f01008c; /** <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int colorButtonNormal=0x7f010090; /** <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int colorControlActivated=0x7f01008e; /** <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int colorControlHighlight=0x7f01008f; /** <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int colorControlNormal=0x7f01008d; /** <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int colorPrimary=0x7f01008a; /** <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int colorPrimaryDark=0x7f01008b; /** <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int colorSwitchThumbNormal=0x7f010091; /** <p>Must be one of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>None</code></td><td>0</td><td></td></tr> <tr><td><code>Cluster</code></td><td>1</td><td></td></tr> <tr><td><code>Stack</code></td><td>2</td><td></td></tr> <tr><td><code>Stack100</code></td><td>3</td><td></td></tr> </table> */ public static final int combineMode=0x7f0100be; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int commitIcon=0x7f010133; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int content=0x7f0100b9; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int contentInsetEnd=0x7f010028; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int contentInsetLeft=0x7f010029; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int contentInsetRight=0x7f01002a; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int contentInsetStart=0x7f010027; /** <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int contentScrim=0x7f0100da; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int controlBackground=0x7f010092; /** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int counterEnabled=0x7f010153; /** <p>Must be an integer value, such as "<code>100</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int counterMaxLength=0x7f010154; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int counterOverflowTextAppearance=0x7f010156; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int counterTextAppearance=0x7f010155; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int customNavigationLayout=0x7f010020; /** <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int dateFormat=0x7f0100e8; /** <p>Must be one of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>Year</code></td><td>0</td><td></td></tr> <tr><td><code>Quarter</code></td><td>1</td><td></td></tr> <tr><td><code>Month</code></td><td>2</td><td></td></tr> <tr><td><code>Week</code></td><td>3</td><td></td></tr> <tr><td><code>Hour</code></td><td>4</td><td></td></tr> <tr><td><code>Minute</code></td><td>5</td><td></td></tr> <tr><td><code>Second</code></td><td>6</td><td></td></tr> <tr><td><code>Millisecond</code></td><td>7</td><td></td></tr> <tr><td><code>Date</code></td><td>8</td><td></td></tr> <tr><td><code>TimeOfDay</code></td><td>9</td><td></td></tr> <tr><td><code>Day</code></td><td>10</td><td></td></tr> <tr><td><code>DayOfWeek</code></td><td>11</td><td></td></tr> <tr><td><code>DayOfYear</code></td><td>12</td><td></td></tr> </table> */ public static final int dateTimeComponent=0x7f0100e9; /** <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int defaultQueryHint=0x7f01012d; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int dialogPreferredPadding=0x7f010063; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int dialogTheme=0x7f010062; /** <p>Must be one of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>Month</code></td><td>0</td><td></td></tr> <tr><td><code>Year</code></td><td>1</td><td></td></tr> <tr><td><code>Week</code></td><td>2</td><td></td></tr> </table> */ public static final int displayMode=0x7f010118; /** <p>Must be one or more (separated by '|') of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>none</code></td><td>0</td><td></td></tr> <tr><td><code>useLogo</code></td><td>0x1</td><td></td></tr> <tr><td><code>showHome</code></td><td>0x2</td><td></td></tr> <tr><td><code>homeAsUp</code></td><td>0x4</td><td></td></tr> <tr><td><code>showTitle</code></td><td>0x8</td><td></td></tr> <tr><td><code>showCustom</code></td><td>0x10</td><td></td></tr> <tr><td><code>disableHome</code></td><td>0x20</td><td></td></tr> </table> */ public static final int displayOptions=0x7f010016; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int divider=0x7f01001c; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int dividerHorizontal=0x7f010070; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int dividerPadding=0x7f010101; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int dividerVertical=0x7f01006f; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int drawableSize=0x7f0100f2; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int drawerArrowStyle=0x7f010003; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int dropDownListViewStyle=0x7f010082; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int dropdownListPreferredItemHeight=0x7f010066; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int editTextBackground=0x7f010077; /** <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". */ public static final int editTextColor=0x7f010076; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int editTextStyle=0x7f0100a0; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int elevation=0x7f01002b; /** <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int emptyContent=0x7f01011f; /** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int errorEnabled=0x7f010151; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int errorTextAppearance=0x7f010152; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int expandActivityOverflowButtonDrawable=0x7f01002f; /** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int expanded=0x7f010035; /** <p>Must be one or more (separated by '|') of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>top</code></td><td>0x30</td><td></td></tr> <tr><td><code>bottom</code></td><td>0x50</td><td></td></tr> <tr><td><code>left</code></td><td>0x03</td><td></td></tr> <tr><td><code>right</code></td><td>0x05</td><td></td></tr> <tr><td><code>center_vertical</code></td><td>0x10</td><td></td></tr> <tr><td><code>fill_vertical</code></td><td>0x70</td><td></td></tr> <tr><td><code>center_horizontal</code></td><td>0x01</td><td></td></tr> <tr><td><code>center</code></td><td>0x11</td><td></td></tr> <tr><td><code>start</code></td><td>0x00800003</td><td></td></tr> <tr><td><code>end</code></td><td>0x00800005</td><td></td></tr> </table> */ public static final int expandedTitleGravity=0x7f0100de; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int expandedTitleMargin=0x7f0100d3; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int expandedTitleMarginBottom=0x7f0100d7; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int expandedTitleMarginEnd=0x7f0100d6; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int expandedTitleMarginStart=0x7f0100d4; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int expandedTitleMarginTop=0x7f0100d5; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int expandedTitleTextAppearance=0x7f0100d8; /** <p>Must be one of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>normal</code></td><td>0</td><td></td></tr> <tr><td><code>mini</code></td><td>1</td><td></td></tr> </table> */ public static final int fabSize=0x7f0100f9; /** <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int fillColor=0x7f010004; /** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int fillViewport=0x7f010121; /** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int foregroundInsidePadding=0x7f0100fd; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int gapBetweenBars=0x7f0100f3; /** <p>Must be a floating point value, such as "<code>1.2</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int gapLength=0x7f010005; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int goIcon=0x7f01012f; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int headerLayout=0x7f01010c; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int height=0x7f010006; /** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int hideOnContentScroll=0x7f010026; /** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int hintAnimationEnabled=0x7f010157; /** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int hintEnabled=0x7f010150; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int hintTextAppearance=0x7f01014f; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int homeAsUpIndicator=0x7f010068; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int homeLayout=0x7f010021; /** <p>Must be one of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>left</code></td><td>0</td><td></td></tr> <tr><td><code>center</code></td><td>1</td><td></td></tr> <tr><td><code>right</code></td><td>2</td><td></td></tr> </table> */ public static final int horizontalAlignment=0x7f0100ba; /** <p>Must be one of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>Left</code></td><td>0</td><td></td></tr> <tr><td><code>Right</code></td><td>1</td><td></td></tr> </table> */ public static final int horizontalLocation=0x7f0100b5; /** <p>Must be a floating point value, such as "<code>1.2</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int horizontalOffset=0x7f0100b7; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int icon=0x7f01001a; /** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int iconifiedByDefault=0x7f01012b; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int imageButtonStyle=0x7f010078; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int indeterminateProgressStyle=0x7f010023; /** <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int initialActivityCount=0x7f01002e; /** <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". */ public static final int insetForeground=0x7f010128; /** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int isLightTheme=0x7f010007; /** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int isYearModeCompact=0x7f01011a; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int itemBackground=0x7f01010a; /** <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int itemIconTint=0x7f010108; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int itemPadding=0x7f010025; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int itemTextAppearance=0x7f01010b; /** <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int itemTextColor=0x7f010109; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int keylines=0x7f0100e2; /** <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int label=0x7f0100bc; /** <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int labelColor=0x7f010008; /** <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int labelFont=0x7f010009; /** <p>Must be an integer value, such as "<code>100</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int labelFontStyle=0x7f01000a; /** <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int labelFormat=0x7f01000b; /** <p>Must be an integer value, such as "<code>100</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int labelInterval=0x7f0100af; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int labelMargin=0x7f01000c; /** <p>Must be an integer value, such as "<code>100</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int labelOffset=0x7f0100ab; /** <p>Must be a floating point value, such as "<code>1.2</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int labelRotationAngle=0x7f0100a8; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int labelSize=0x7f01000d; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int layout=0x7f01012a; /** <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int layoutManager=0x7f010124; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int layout_anchor=0x7f0100e5; /** <p>Must be one or more (separated by '|') of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>top</code></td><td>0x30</td><td></td></tr> <tr><td><code>bottom</code></td><td>0x50</td><td></td></tr> <tr><td><code>left</code></td><td>0x03</td><td></td></tr> <tr><td><code>right</code></td><td>0x05</td><td></td></tr> <tr><td><code>center_vertical</code></td><td>0x10</td><td></td></tr> <tr><td><code>fill_vertical</code></td><td>0x70</td><td></td></tr> <tr><td><code>center_horizontal</code></td><td>0x01</td><td></td></tr> <tr><td><code>fill_horizontal</code></td><td>0x07</td><td></td></tr> <tr><td><code>center</code></td><td>0x11</td><td></td></tr> <tr><td><code>fill</code></td><td>0x77</td><td></td></tr> <tr><td><code>clip_vertical</code></td><td>0x80</td><td></td></tr> <tr><td><code>clip_horizontal</code></td><td>0x08</td><td></td></tr> <tr><td><code>start</code></td><td>0x00800003</td><td></td></tr> <tr><td><code>end</code></td><td>0x00800005</td><td></td></tr> </table> */ public static final int layout_anchorGravity=0x7f0100e7; /** <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int layout_behavior=0x7f0100e4; /** <p>Must be one of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>none</code></td><td>0</td><td></td></tr> <tr><td><code>pin</code></td><td>1</td><td></td></tr> <tr><td><code>parallax</code></td><td>2</td><td></td></tr> </table> */ public static final int layout_collapseMode=0x7f0100d1; /** <p>Must be a floating point value, such as "<code>1.2</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int layout_collapseParallaxMultiplier=0x7f0100d2; /** <p>Must be an integer value, such as "<code>100</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int layout_keyline=0x7f0100e6; /** <p>Must be one or more (separated by '|') of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>scroll</code></td><td>0x1</td><td></td></tr> <tr><td><code>exitUntilCollapsed</code></td><td>0x2</td><td></td></tr> <tr><td><code>enterAlways</code></td><td>0x4</td><td></td></tr> <tr><td><code>enterAlwaysCollapsed</code></td><td>0x8</td><td></td></tr> <tr><td><code>snap</code></td><td>0x10</td><td></td></tr> </table> */ public static final int layout_scrollFlags=0x7f010036; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int layout_scrollInterpolator=0x7f010037; /** <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int lineColor=0x7f0100fe; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int lineThickness=0x7f01000e; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int listChoiceBackgroundIndicator=0x7f010089; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int listDividerAlertDialog=0x7f010064; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int listItemLayout=0x7f010034; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int listLayout=0x7f010031; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int listPopupWindowStyle=0x7f010083; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int listPreferredItemHeight=0x7f01007d; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int listPreferredItemHeightLarge=0x7f01007f; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int listPreferredItemHeightSmall=0x7f01007e; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int listPreferredItemPaddingLeft=0x7f010080; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int listPreferredItemPaddingRight=0x7f010081; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int logo=0x7f01001b; /** <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int logoDescription=0x7f010164; /** <p>Must be a floating point value, such as "<code>1.2</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int majorStep=0x7f0100eb; /** <p>Must be one of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>Year</code></td><td>0</td><td></td></tr> <tr><td><code>Quarter</code></td><td>1</td><td></td></tr> <tr><td><code>Month</code></td><td>2</td><td></td></tr> <tr><td><code>Week</code></td><td>3</td><td></td></tr> <tr><td><code>Day</code></td><td>4</td><td></td></tr> <tr><td><code>Hour</code></td><td>5</td><td></td></tr> <tr><td><code>Minute</code></td><td>6</td><td></td></tr> <tr><td><code>Second</code></td><td>7</td><td></td></tr> <tr><td><code>Millisecond</code></td><td>8</td><td></td></tr> </table> */ public static final int majorStepUnit=0x7f0100ec; /** <p>Must be an integer value, such as "<code>100</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int majorTickInterval=0x7f0100bd; /** <p>Must be an integer value, such as "<code>100</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int majorTickOffset=0x7f0100aa; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int maxActionInlineWidth=0x7f010137; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int maxButtonHeight=0x7f01015f; /** <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int maxZoom=0x7f01011d; /** <p>Must be an integer value, such as "<code>100</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int maximumTicks=0x7f0100ea; /** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int measureWithLargestChild=0x7f0100ff; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int menu=0x7f010107; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int multiChoiceItemLayout=0x7f010032; /** <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int navigationContentDescription=0x7f010163; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int navigationIcon=0x7f010162; /** <p>Must be one of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>normal</code></td><td>0</td><td></td></tr> <tr><td><code>listMode</code></td><td>1</td><td></td></tr> <tr><td><code>tabMode</code></td><td>2</td><td></td></tr> </table> */ public static final int navigationMode=0x7f010015; /** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int overlapAnchor=0x7f010110; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int paddingEnd=0x7f010168; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int paddingStart=0x7f010167; /** <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int palette=0x7f010120; /** <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int pan=0x7f01011b; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int panelBackground=0x7f010086; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int panelMenuListTheme=0x7f010088; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int panelMenuListWidth=0x7f010087; /** <p>Must be one of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>BetweenTicks</code></td><td>0</td><td></td></tr> <tr><td><code>OnTicks</code></td><td>1</td><td></td></tr> <tr><td><code>OnTicksPadded</code></td><td>2</td><td></td></tr> </table> */ public static final int plotMode=0x7f01000f; /** <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int pointerFill=0x7f01010f; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int pointerMargin=0x7f01010e; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int pointerSize=0x7f01010d; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int popupMenuStyle=0x7f010074; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int popupTheme=0x7f01002c; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int popupWindowStyle=0x7f010075; /** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int preserveIconSpacing=0x7f010106; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int pressedTranslationZ=0x7f0100fa; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int progressBarPadding=0x7f010024; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int progressBarStyle=0x7f010022; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int queryBackground=0x7f010135; /** <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int queryHint=0x7f01012c; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int radScrollViewStyle=0x7f010123; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int radioButtonStyle=0x7f0100a1; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int ratingBarStyle=0x7f0100a2; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int ratingBarStyleIndicator=0x7f0100a3; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int ratingBarStyleSmall=0x7f0100a4; /** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int reverseLayout=0x7f010126; /** <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int rippleColor=0x7f0100f8; /** <p>Must be a floating point value, such as "<code>1.2</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int roundBarsRadius=0x7f010010; /** <p>Must be one or more (separated by '|') of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>vertical</code></td><td>1</td><td></td></tr> <tr><td><code>horizontal</code></td><td>2</td><td></td></tr> </table> */ public static final int scrollMode=0x7f010122; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int searchHintIcon=0x7f010131; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int searchIcon=0x7f010130; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int searchViewStyle=0x7f01007c; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int seekBarStyle=0x7f0100a5; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int selectableItemBackground=0x7f01006c; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int selectableItemBackgroundBorderless=0x7f01006d; /** <p>Must be one of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>Single</code></td><td>0</td><td></td></tr> <tr><td><code>Range</code></td><td>1</td><td></td></tr> <tr><td><code>Multiple</code></td><td>2</td><td></td></tr> </table> */ public static final int selectionMode=0x7f010117; /** <p>Must be one or more (separated by '|') of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>never</code></td><td>0</td><td></td></tr> <tr><td><code>ifRoom</code></td><td>1</td><td></td></tr> <tr><td><code>always</code></td><td>2</td><td></td></tr> <tr><td><code>withText</code></td><td>4</td><td></td></tr> <tr><td><code>collapseActionView</code></td><td>8</td><td></td></tr> </table> */ public static final int showAsAction=0x7f010102; /** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int showCellDecorations=0x7f010116; /** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int showDayNames=0x7f010114; /** <p>Must be one or more (separated by '|') of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>none</code></td><td>0</td><td></td></tr> <tr><td><code>beginning</code></td><td>1</td><td></td></tr> <tr><td><code>middle</code></td><td>2</td><td></td></tr> <tr><td><code>end</code></td><td>4</td><td></td></tr> </table> */ public static final int showDividers=0x7f010100; /** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int showGridLines=0x7f010115; /** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int showLabels=0x7f010011; /** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int showText=0x7f01013e; /** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int showTitle=0x7f010113; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int singleChoiceItemLayout=0x7f010033; /** <p>Must be an integer value, such as "<code>100</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int spanCount=0x7f010125; /** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int spinBars=0x7f0100f1; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int spinnerDropDownItemStyle=0x7f010067; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int spinnerStyle=0x7f0100a6; /** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int splitTrack=0x7f01013d; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int srcCompat=0x7f010038; /** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int stackFromEnd=0x7f010127; /** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int state_above_anchor=0x7f010111; /** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int state_calendar_cell_today=0x7f0100b3; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int statusBarBackground=0x7f0100e3; /** <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int statusBarScrim=0x7f0100db; /** <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int strokeColor=0x7f010012; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int strokeWidth=0x7f010013; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int submitBackground=0x7f010136; /** <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int subtitle=0x7f010017; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int subtitleTextAppearance=0x7f010159; /** <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int subtitleTextColor=0x7f010166; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int subtitleTextStyle=0x7f010019; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int suggestionRowLayout=0x7f010134; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int switchMinWidth=0x7f01013b; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int switchPadding=0x7f01013c; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int switchStyle=0x7f0100a7; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int switchTextAppearance=0x7f01013a; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int tabBackground=0x7f010142; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int tabContentStart=0x7f010141; /** <p>Must be one of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>fill</code></td><td>0</td><td></td></tr> <tr><td><code>center</code></td><td>1</td><td></td></tr> </table> */ public static final int tabGravity=0x7f010144; /** <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int tabIndicatorColor=0x7f01013f; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int tabIndicatorHeight=0x7f010140; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int tabMaxWidth=0x7f010146; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int tabMinWidth=0x7f010145; /** <p>Must be one of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>scrollable</code></td><td>0</td><td></td></tr> <tr><td><code>fixed</code></td><td>1</td><td></td></tr> </table> */ public static final int tabMode=0x7f010143; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int tabPadding=0x7f01014e; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int tabPaddingBottom=0x7f01014d; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int tabPaddingEnd=0x7f01014c; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int tabPaddingStart=0x7f01014a; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int tabPaddingTop=0x7f01014b; /** <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int tabSelectedTextColor=0x7f010149; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int tabTextAppearance=0x7f010147; /** <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int tabTextColor=0x7f010148; /** <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a boolean value, either "<code>true</code>" or "<code>false</code>". */ public static final int textAllCaps=0x7f010039; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int textAppearanceLargePopupMenu=0x7f010060; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int textAppearanceListItem=0x7f010084; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int textAppearanceListItemSmall=0x7f010085; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int textAppearanceSearchResultSubtitle=0x7f01007a; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int textAppearanceSearchResultTitle=0x7f010079; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int textAppearanceSmallPopupMenu=0x7f010061; /** <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". */ public static final int textColorAlertDialogListItem=0x7f010097; /** <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int textColorError=0x7f0100ef; /** <p>May be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". <p>May be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". */ public static final int textColorSearchUrl=0x7f01007b; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int theme=0x7f010169; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int thickness=0x7f0100f7; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int thumbTextPadding=0x7f010139; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int tickThickness=0x7f0100ae; /** <p>Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int title=0x7f010014; /** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int titleEnabled=0x7f0100df; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int titleMarginBottom=0x7f01015e; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int titleMarginEnd=0x7f01015c; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int titleMarginStart=0x7f01015b; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int titleMarginTop=0x7f01015d; /** <p>Must be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int titleMargins=0x7f01015a; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int titleTextAppearance=0x7f010158; /** <p>Must be a color value, in the form of "<code>#<i>rgb</i></code>", "<code>#<i>argb</i></code>", "<code>#<i>rrggbb</i></code>", or "<code>#<i>aarrggbb</i></code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int titleTextColor=0x7f010165; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int titleTextStyle=0x7f010018; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int toolbarId=0x7f0100dc; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int toolbarNavigationButtonStyle=0x7f010073; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int toolbarStyle=0x7f010072; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int track=0x7f010138; /** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int useCompatPadding=0x7f0100fc; /** <p>Must be one of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>top</code></td><td>0</td><td></td></tr> <tr><td><code>bottom</code></td><td>1</td><td></td></tr> <tr><td><code>center</code></td><td>2</td><td></td></tr> </table> */ public static final int verticalAlignment=0x7f0100bb; /** <p>Must be one of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>Bottom</code></td><td>0</td><td></td></tr> <tr><td><code>Top</code></td><td>1</td><td></td></tr> </table> */ public static final int verticalLocation=0x7f0100b6; /** <p>Must be a floating point value, such as "<code>1.2</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int verticalOffset=0x7f0100b8; /** <p>Must be a reference to another resource, in the form "<code>@[+][<i>package</i>:]<i>type</i>:<i>name</i></code>" or to a theme attribute in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>". */ public static final int voiceIcon=0x7f010132; /** <p>Must be one of the following constant values.</p> <table> <colgroup align="left" /> <colgroup align="left" /> <colgroup align="left" /> <tr><th>Constant</th><th>Value</th><th>Description</th></tr> <tr><td><code>None</code></td><td>0</td><td></td></tr> <tr><td><code>Inline</code></td><td>1</td><td></td></tr> <tr><td><code>Block</code></td><td>2</td><td></td></tr> </table> */ public static final int weekNumberDisplayMode=0x7f010119; /** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int windowActionBar=0x7f01003a; /** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int windowActionBarOverlay=0x7f01003c; /** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int windowActionModeOverlay=0x7f01003d; /** <p>May be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>May be a fractional value, which is a floating point number appended with either % or %p, such as "<code>14.5%</code>". The % suffix always means a percentage of the base size; the optional %p suffix provides a size relative to some parent container. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int windowFixedHeightMajor=0x7f010041; /** <p>May be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>May be a fractional value, which is a floating point number appended with either % or %p, such as "<code>14.5%</code>". The % suffix always means a percentage of the base size; the optional %p suffix provides a size relative to some parent container. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int windowFixedHeightMinor=0x7f01003f; /** <p>May be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>May be a fractional value, which is a floating point number appended with either % or %p, such as "<code>14.5%</code>". The % suffix always means a percentage of the base size; the optional %p suffix provides a size relative to some parent container. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int windowFixedWidthMajor=0x7f01003e; /** <p>May be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>May be a fractional value, which is a floating point number appended with either % or %p, such as "<code>14.5%</code>". The % suffix always means a percentage of the base size; the optional %p suffix provides a size relative to some parent container. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int windowFixedWidthMinor=0x7f010040; /** <p>May be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>May be a fractional value, which is a floating point number appended with either % or %p, such as "<code>14.5%</code>". The % suffix always means a percentage of the base size; the optional %p suffix provides a size relative to some parent container. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int windowMinWidthMajor=0x7f010042; /** <p>May be a dimension value, which is a floating point number appended with a unit such as "<code>14.5sp</code>". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). <p>May be a fractional value, which is a floating point number appended with either % or %p, such as "<code>14.5%</code>". The % suffix always means a percentage of the base size; the optional %p suffix provides a size relative to some parent container. <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int windowMinWidthMinor=0x7f010043; /** <p>Must be a boolean value, either "<code>true</code>" or "<code>false</code>". <p>This may also be a reference to a resource (in the form "<code>@[<i>package</i>:]<i>type</i>:<i>name</i></code>") or theme attribute (in the form "<code>?[<i>package</i>:][<i>type</i>:]<i>name</i></code>") containing a value of this type. */ public static final int windowNoTitle=0x7f01003b; } public static final class bool { public static final int abc_action_bar_embed_tabs=0x7f070003; public static final int abc_action_bar_embed_tabs_pre_jb=0x7f070001; public static final int abc_action_bar_expanded_action_views_exclusive=0x7f070004; public static final int abc_allow_stacked_button_bar=0x7f070000; public static final int abc_config_actionMenuItemAllCaps=0x7f070005; public static final int abc_config_allowActionMenuItemTextWithIcon=0x7f070002; public static final int abc_config_closeDialogWhenTouchOutside=0x7f070006; public static final int abc_config_showMenuShortcutsWhenKeyboardPresent=0x7f070007; } public static final class color { public static final int abc_background_cache_hint_selector_material_dark=0x7f0b0064; public static final int abc_background_cache_hint_selector_material_light=0x7f0b0065; public static final int abc_color_highlight_material=0x7f0b0066; public static final int abc_input_method_navigation_guard=0x7f0b0001; public static final int abc_primary_text_disable_only_material_dark=0x7f0b0067; public static final int abc_primary_text_disable_only_material_light=0x7f0b0068; public static final int abc_primary_text_material_dark=0x7f0b0069; public static final int abc_primary_text_material_light=0x7f0b006a; public static final int abc_search_url_text=0x7f0b006b; public static final int abc_search_url_text_normal=0x7f0b0002; public static final int abc_search_url_text_pressed=0x7f0b0003; public static final int abc_search_url_text_selected=0x7f0b0004; public static final int abc_secondary_text_material_dark=0x7f0b006c; public static final int abc_secondary_text_material_light=0x7f0b006d; public static final int accent_material_dark=0x7f0b0005; public static final int accent_material_light=0x7f0b0006; public static final int autocomplete_primary=0x7f0b0007; public static final int background_floating_material_dark=0x7f0b0008; public static final int background_floating_material_light=0x7f0b0009; public static final int background_material_dark=0x7f0b000a; public static final int background_material_light=0x7f0b000b; public static final int black=0x7f0b000c; public static final int bright_foreground_disabled_material_dark=0x7f0b000d; public static final int bright_foreground_disabled_material_light=0x7f0b000e; public static final int bright_foreground_inverse_material_dark=0x7f0b000f; public static final int bright_foreground_inverse_material_light=0x7f0b0010; public static final int bright_foreground_material_dark=0x7f0b0011; public static final int bright_foreground_material_light=0x7f0b0012; public static final int button_material_dark=0x7f0b0013; public static final int button_material_light=0x7f0b0014; public static final int dark_grey_text_color=0x7f0b0015; public static final int data_form_invalid_validation_color=0x7f0b0016; public static final int data_form_list_selected=0x7f0b0017; public static final int data_form_valid_validation_color=0x7f0b0018; public static final int design_fab_shadow_end_color=0x7f0b0019; public static final int design_fab_shadow_mid_color=0x7f0b001a; public static final int design_fab_shadow_start_color=0x7f0b001b; public static final int design_fab_stroke_end_inner_color=0x7f0b001c; public static final int design_fab_stroke_end_outer_color=0x7f0b001d; public static final int design_fab_stroke_top_inner_color=0x7f0b001e; public static final int design_fab_stroke_top_outer_color=0x7f0b001f; public static final int design_snackbar_background_color=0x7f0b0020; public static final int design_textinput_error_color_dark=0x7f0b0021; public static final int design_textinput_error_color_light=0x7f0b0022; public static final int dim_foreground_disabled_material_dark=0x7f0b0023; public static final int dim_foreground_disabled_material_light=0x7f0b0024; public static final int dim_foreground_material_dark=0x7f0b0025; public static final int dim_foreground_material_light=0x7f0b0026; public static final int foreground_material_dark=0x7f0b0027; public static final int foreground_material_light=0x7f0b0028; public static final int grey_text_color=0x7f0b0029; public static final int groupHeaderTextColor=0x7f0b002a; public static final int highlighted_text_material_dark=0x7f0b002b; public static final int highlighted_text_material_light=0x7f0b002c; public static final int hint_foreground_material_dark=0x7f0b002d; public static final int hint_foreground_material_light=0x7f0b002e; public static final int light_blue=0x7f0b002f; public static final int light_grey=0x7f0b0030; public static final int listAccentColor=0x7f0b0031; public static final int listItemTextColor=0x7f0b0032; public static final int material_blue_grey_800=0x7f0b0033; public static final int material_blue_grey_900=0x7f0b0034; public static final int material_blue_grey_950=0x7f0b0035; public static final int material_deep_teal_200=0x7f0b0036; public static final int material_deep_teal_500=0x7f0b0037; public static final int material_grey_100=0x7f0b0038; public static final int material_grey_300=0x7f0b0039; public static final int material_grey_50=0x7f0b003a; public static final int material_grey_600=0x7f0b003b; public static final int material_grey_800=0x7f0b003c; public static final int material_grey_850=0x7f0b003d; public static final int material_grey_900=0x7f0b003e; public static final int nativescript_blue=0x7f0b003f; public static final int ns_accent=0x7f0b0000; public static final int ns_blue=0x7f0b0040; public static final int ns_primary=0x7f0b0041; public static final int ns_primaryDark=0x7f0b0042; public static final int pressedColor=0x7f0b0043; public static final int primary_dark_material_dark=0x7f0b0044; public static final int primary_dark_material_light=0x7f0b0045; public static final int primary_material_dark=0x7f0b0046; public static final int primary_material_light=0x7f0b0047; public static final int primary_text_default_material_dark=0x7f0b0048; public static final int primary_text_default_material_light=0x7f0b0049; public static final int primary_text_disabled_material_dark=0x7f0b004a; public static final int primary_text_disabled_material_light=0x7f0b004b; public static final int progress_bar_background=0x7f0b004c; public static final int red=0x7f0b004d; public static final int ripple_material_dark=0x7f0b004e; public static final int ripple_material_light=0x7f0b004f; public static final int secondary_text_default_material_dark=0x7f0b0050; public static final int secondary_text_default_material_light=0x7f0b0051; public static final int secondary_text_disabled_material_dark=0x7f0b0052; public static final int secondary_text_disabled_material_light=0x7f0b0053; public static final int selectionColor=0x7f0b0054; public static final int shadeColor=0x7f0b0055; public static final int shadeColorCenter=0x7f0b0056; public static final int status_open_color=0x7f0b0057; public static final int status_resolved_color=0x7f0b0058; public static final int switch_thumb_disabled_material_dark=0x7f0b0059; public static final int switch_thumb_disabled_material_light=0x7f0b005a; public static final int switch_thumb_material_dark=0x7f0b006e; public static final int switch_thumb_material_light=0x7f0b006f; public static final int switch_thumb_normal_material_dark=0x7f0b005b; public static final int switch_thumb_normal_material_light=0x7f0b005c; public static final int text_editor_background=0x7f0b005d; public static final int token_normal=0x7f0b005e; public static final int token_selected=0x7f0b005f; public static final int transparent=0x7f0b0060; public static final int view_feedback_item_comments_background=0x7f0b0061; public static final int view_feedback_item_text_color=0x7f0b0062; public static final int white=0x7f0b0063; } public static final class dimen { public static final int abc_action_bar_content_inset_material=0x7f08000e; public static final int abc_action_bar_default_height_material=0x7f080001; public static final int abc_action_bar_default_padding_end_material=0x7f08000f; public static final int abc_action_bar_default_padding_start_material=0x7f080010; public static final int abc_action_bar_icon_vertical_padding_material=0x7f08001b; public static final int abc_action_bar_overflow_padding_end_material=0x7f08001c; public static final int abc_action_bar_overflow_padding_start_material=0x7f08001d; public static final int abc_action_bar_progress_bar_size=0x7f080002; public static final int abc_action_bar_stacked_max_height=0x7f08001e; public static final int abc_action_bar_stacked_tab_max_width=0x7f08001f; public static final int abc_action_bar_subtitle_bottom_margin_material=0x7f080020; public static final int abc_action_bar_subtitle_top_margin_material=0x7f080021; public static final int abc_action_button_min_height_material=0x7f080022; public static final int abc_action_button_min_width_material=0x7f080023; public static final int abc_action_button_min_width_overflow_material=0x7f080024; public static final int abc_alert_dialog_button_bar_height=0x7f080000; public static final int abc_button_inset_horizontal_material=0x7f080025; public static final int abc_button_inset_vertical_material=0x7f080026; public static final int abc_button_padding_horizontal_material=0x7f080027; public static final int abc_button_padding_vertical_material=0x7f080028; public static final int abc_config_prefDialogWidth=0x7f080005; public static final int abc_control_corner_material=0x7f080029; public static final int abc_control_inset_material=0x7f08002a; public static final int abc_control_padding_material=0x7f08002b; public static final int abc_dialog_fixed_height_major=0x7f080006; public static final int abc_dialog_fixed_height_minor=0x7f080007; public static final int abc_dialog_fixed_width_major=0x7f080008; public static final int abc_dialog_fixed_width_minor=0x7f080009; public static final int abc_dialog_list_padding_vertical_material=0x7f08002c; public static final int abc_dialog_min_width_major=0x7f08000a; public static final int abc_dialog_min_width_minor=0x7f08000b; public static final int abc_dialog_padding_material=0x7f08002d; public static final int abc_dialog_padding_top_material=0x7f08002e; public static final int abc_disabled_alpha_material_dark=0x7f08002f; public static final int abc_disabled_alpha_material_light=0x7f080030; public static final int abc_dropdownitem_icon_width=0x7f080031; public static final int abc_dropdownitem_text_padding_left=0x7f080032; public static final int abc_dropdownitem_text_padding_right=0x7f080033; public static final int abc_edit_text_inset_bottom_material=0x7f080034; public static final int abc_edit_text_inset_horizontal_material=0x7f080035; public static final int abc_edit_text_inset_top_material=0x7f080036; public static final int abc_floating_window_z=0x7f080037; public static final int abc_list_item_padding_horizontal_material=0x7f080038; public static final int abc_panel_menu_list_width=0x7f080039; public static final int abc_search_view_preferred_width=0x7f08003a; public static final int abc_search_view_text_min_width=0x7f08000c; public static final int abc_seekbar_track_background_height_material=0x7f08003b; public static final int abc_seekbar_track_progress_height_material=0x7f08003c; public static final int abc_select_dialog_padding_start_material=0x7f08003d; public static final int abc_switch_padding=0x7f080019; public static final int abc_text_size_body_1_material=0x7f08003e; public static final int abc_text_size_body_2_material=0x7f08003f; public static final int abc_text_size_button_material=0x7f080040; public static final int abc_text_size_caption_material=0x7f080041; public static final int abc_text_size_display_1_material=0x7f080042; public static final int abc_text_size_display_2_material=0x7f080043; public static final int abc_text_size_display_3_material=0x7f080044; public static final int abc_text_size_display_4_material=0x7f080045; public static final int abc_text_size_headline_material=0x7f080046; public static final int abc_text_size_large_material=0x7f080047; public static final int abc_text_size_medium_material=0x7f080048; public static final int abc_text_size_menu_material=0x7f080049; public static final int abc_text_size_small_material=0x7f08004a; public static final int abc_text_size_subhead_material=0x7f08004b; public static final int abc_text_size_subtitle_material_toolbar=0x7f080003; public static final int abc_text_size_title_material=0x7f08004c; public static final int abc_text_size_title_material_toolbar=0x7f080004; public static final int activity_horizontal_margin=0x7f08001a; public static final int card_deck_translation=0x7f08004d; public static final int data_form_editor_header_text_size=0x7f08004e; public static final int data_form_editor_margin_horizontal=0x7f08004f; public static final int data_form_editor_padding_horizontal=0x7f080050; public static final int data_form_editor_padding_vertical=0x7f080051; public static final int data_form_editor_text_size=0x7f080052; public static final int data_form_editor_validation_text_size=0x7f080053; public static final int date_text_size_year_mode=0x7f08000d; public static final int design_appbar_elevation=0x7f080054; public static final int design_bottom_sheet_modal_elevation=0x7f080055; public static final int design_bottom_sheet_modal_peek_height=0x7f080056; public static final int design_fab_border_width=0x7f080057; public static final int design_fab_elevation=0x7f080058; public static final int design_fab_image_size=0x7f080059; public static final int design_fab_size_mini=0x7f08005a; public static final int design_fab_size_normal=0x7f08005b; public static final int design_fab_translation_z_pressed=0x7f08005c; public static final int design_navigation_elevation=0x7f08005d; public static final int design_navigation_icon_padding=0x7f08005e; public static final int design_navigation_icon_size=0x7f08005f; public static final int design_navigation_max_width=0x7f080011; public static final int design_navigation_padding_bottom=0x7f080060; public static final int design_navigation_separator_vertical_padding=0x7f080061; public static final int design_snackbar_action_inline_max_width=0x7f080012; public static final int design_snackbar_background_corner_radius=0x7f080013; public static final int design_snackbar_elevation=0x7f080062; public static final int design_snackbar_extra_spacing_horizontal=0x7f080014; public static final int design_snackbar_max_width=0x7f080015; public static final int design_snackbar_min_width=0x7f080016; public static final int design_snackbar_padding_horizontal=0x7f080063; public static final int design_snackbar_padding_vertical=0x7f080064; public static final int design_snackbar_padding_vertical_2lines=0x7f080017; public static final int design_snackbar_text_size=0x7f080065; public static final int design_tab_max_width=0x7f080066; public static final int design_tab_scrollable_min_width=0x7f080018; public static final int design_tab_text_size=0x7f080067; public static final int design_tab_text_size_2line=0x7f080068; public static final int disabled_alpha_material_dark=0x7f080069; public static final int disabled_alpha_material_light=0x7f08006a; public static final int feedback_indicator_size=0x7f08006b; public static final int highlight_alpha_material_colored=0x7f08006c; public static final int highlight_alpha_material_dark=0x7f08006d; public static final int highlight_alpha_material_light=0x7f08006e; public static final int item_touch_helper_max_drag_scroll_per_frame=0x7f08006f; public static final int item_touch_helper_swipe_escape_max_velocity=0x7f080070; public static final int item_touch_helper_swipe_escape_velocity=0x7f080071; public static final int legend_stroke_width=0x7f080072; public static final int notification_large_icon_height=0x7f080073; public static final int notification_large_icon_width=0x7f080074; public static final int notification_subtext_size=0x7f080075; public static final int pager_tab_strip_padding=0x7f080076; public static final int trackball_indicator_radius=0x7f080077; } public static final class drawable { public static final int abc_ab_share_pack_mtrl_alpha=0x7f020000; public static final int abc_action_bar_item_background_material=0x7f020001; public static final int abc_btn_borderless_material=0x7f020002; public static final int abc_btn_check_material=0x7f020003; public static final int abc_btn_check_to_on_mtrl_000=0x7f020004; public static final int abc_btn_check_to_on_mtrl_015=0x7f020005; public static final int abc_btn_colored_material=0x7f020006; public static final int abc_btn_default_mtrl_shape=0x7f020007; public static final int abc_btn_radio_material=0x7f020008; public static final int abc_btn_radio_to_on_mtrl_000=0x7f020009; public static final int abc_btn_radio_to_on_mtrl_015=0x7f02000a; public static final int abc_btn_rating_star_off_mtrl_alpha=0x7f02000b; public static final int abc_btn_rating_star_on_mtrl_alpha=0x7f02000c; public static final int abc_btn_switch_to_on_mtrl_00001=0x7f02000d; public static final int abc_btn_switch_to_on_mtrl_00012=0x7f02000e; public static final int abc_cab_background_internal_bg=0x7f02000f; public static final int abc_cab_background_top_material=0x7f020010; public static final int abc_cab_background_top_mtrl_alpha=0x7f020011; public static final int abc_control_background_material=0x7f020012; public static final int abc_dialog_material_background_dark=0x7f020013; public static final int abc_dialog_material_background_light=0x7f020014; public static final int abc_edit_text_material=0x7f020015; public static final int abc_ic_ab_back_mtrl_am_alpha=0x7f020016; public static final int abc_ic_clear_mtrl_alpha=0x7f020017; public static final int abc_ic_commit_search_api_mtrl_alpha=0x7f020018; public static final int abc_ic_go_search_api_mtrl_alpha=0x7f020019; public static final int abc_ic_menu_copy_mtrl_am_alpha=0x7f02001a; public static final int abc_ic_menu_cut_mtrl_alpha=0x7f02001b; public static final int abc_ic_menu_moreoverflow_mtrl_alpha=0x7f02001c; public static final int abc_ic_menu_paste_mtrl_am_alpha=0x7f02001d; public static final int abc_ic_menu_selectall_mtrl_alpha=0x7f02001e; public static final int abc_ic_menu_share_mtrl_alpha=0x7f02001f; public static final int abc_ic_search_api_mtrl_alpha=0x7f020020; public static final int abc_ic_star_black_16dp=0x7f020021; public static final int abc_ic_star_black_36dp=0x7f020022; public static final int abc_ic_star_half_black_16dp=0x7f020023; public static final int abc_ic_star_half_black_36dp=0x7f020024; public static final int abc_ic_voice_search_api_mtrl_alpha=0x7f020025; public static final int abc_item_background_holo_dark=0x7f020026; public static final int abc_item_background_holo_light=0x7f020027; public static final int abc_list_divider_mtrl_alpha=0x7f020028; public static final int abc_list_focused_holo=0x7f020029; public static final int abc_list_longpressed_holo=0x7f02002a; public static final int abc_list_pressed_holo_dark=0x7f02002b; public static final int abc_list_pressed_holo_light=0x7f02002c; public static final int abc_list_selector_background_transition_holo_dark=0x7f02002d; public static final int abc_list_selector_background_transition_holo_light=0x7f02002e; public static final int abc_list_selector_disabled_holo_dark=0x7f02002f; public static final int abc_list_selector_disabled_holo_light=0x7f020030; public static final int abc_list_selector_holo_dark=0x7f020031; public static final int abc_list_selector_holo_light=0x7f020032; public static final int abc_menu_hardkey_panel_mtrl_mult=0x7f020033; public static final int abc_popup_background_mtrl_mult=0x7f020034; public static final int abc_ratingbar_full_material=0x7f020035; public static final int abc_ratingbar_indicator_material=0x7f020036; public static final int abc_ratingbar_small_material=0x7f020037; public static final int abc_scrubber_control_off_mtrl_alpha=0x7f020038; public static final int abc_scrubber_control_to_pressed_mtrl_000=0x7f020039; public static final int abc_scrubber_control_to_pressed_mtrl_005=0x7f02003a; public static final int abc_scrubber_primary_mtrl_alpha=0x7f02003b; public static final int abc_scrubber_track_mtrl_alpha=0x7f02003c; public static final int abc_seekbar_thumb_material=0x7f02003d; public static final int abc_seekbar_track_material=0x7f02003e; public static final int abc_spinner_mtrl_am_alpha=0x7f02003f; public static final int abc_spinner_textfield_background_material=0x7f020040; public static final int abc_switch_thumb_material=0x7f020041; public static final int abc_switch_track_mtrl_alpha=0x7f020042; public static final int abc_tab_indicator_material=0x7f020043; public static final int abc_tab_indicator_mtrl_alpha=0x7f020044; public static final int abc_text_cursor_material=0x7f020045; public static final int abc_textfield_activated_mtrl_alpha=0x7f020046; public static final int abc_textfield_default_mtrl_alpha=0x7f020047; public static final int abc_textfield_search_activated_mtrl_alpha=0x7f020048; public static final int abc_textfield_search_default_mtrl_alpha=0x7f020049; public static final int abc_textfield_search_material=0x7f02004a; public static final int autocomplete_default_backgound=0x7f02004b; public static final int background=0x7f02004c; public static final int comment_indicator=0x7f02004d; public static final int data_form_invalid_background=0x7f02004e; public static final int data_form_invalid_icon=0x7f02004f; public static final int data_form_list_item_states=0x7f020050; public static final int data_form_segment_checked=0x7f020051; public static final int data_form_segment_item=0x7f020052; public static final int data_form_segment_unchecked=0x7f020053; public static final int data_form_valid_background=0x7f020054; public static final int data_form_valid_icon=0x7f020055; public static final int dataform_number_picker_background=0x7f020056; public static final int design_fab_background=0x7f020057; public static final int design_snackbar_background=0x7f020058; public static final int done_button=0x7f020059; public static final int events_popup_bg=0x7f02005a; public static final int feedback_prompt_background=0x7f02005b; public static final int gingerbread_background=0x7f02005c; public static final int hamburger=0x7f02005d; public static final int hmb=0x7f02005e; public static final int ic_clear=0x7f02005f; public static final int ic_collapse=0x7f020060; public static final int ic_collapse_dataform_group=0x7f020061; public static final int ic_done=0x7f020062; public static final int ic_exit_to_app_white_24dp=0x7f020063; public static final int ic_expand=0x7f020064; public static final int ic_expand_dataform_group=0x7f020065; public static final int ic_feedback_sync=0x7f020066; public static final int ic_list_to_app_white_24dp=0x7f020067; public static final int ic_search_to_app_white_24dp=0x7f020068; public static final int ic_send=0x7f020069; public static final int ic_token_remove=0x7f02006a; public static final int ic_token_remove_pressed=0x7f02006b; public static final int icon=0x7f02006c; public static final int logo=0x7f02006d; public static final int notification_template_icon_bg=0x7f020079; public static final int pressable_item_background=0x7f02006e; public static final int resize_logo=0x7f02006f; public static final int selectable_item_background=0x7f020070; public static final int shade_bottom=0x7f020071; public static final int shade_corner=0x7f020072; public static final int shade_right=0x7f020073; public static final int splash_screen=0x7f020074; public static final int token_bg=0x7f020075; public static final int token_default=0x7f020076; public static final int token_selected=0x7f020077; public static final int token_text_color=0x7f020078; } public static final class id { public static final int BetweenTicks=0x7f0c000b; public static final int Block=0x7f0c0058; public static final int Bottom=0x7f0c0026; public static final int Clip=0x7f0c001e; public static final int Cluster=0x7f0c002d; public static final int Date=0x7f0c0040; public static final int Day=0x7f0c0041; public static final int DayOfWeek=0x7f0c0042; public static final int DayOfYear=0x7f0c0043; public static final int Hidden=0x7f0c001f; public static final int Hour=0x7f0c0044; public static final int Inline=0x7f0c0059; public static final int Left=0x7f0c0024; public static final int Millisecond=0x7f0c0045; public static final int Minute=0x7f0c0046; public static final int Month=0x7f0c0047; public static final int Multiline=0x7f0c0021; public static final int Multiple=0x7f0c0055; public static final int None=0x7f0c0022; public static final int OnTicks=0x7f0c000c; public static final int OnTicksPadded=0x7f0c000d; public static final int Quarter=0x7f0c0048; public static final int Range=0x7f0c0056; public static final int Right=0x7f0c0025; public static final int Rotate=0x7f0c0023; public static final int Second=0x7f0c0049; public static final int Single=0x7f0c0057; public static final int Stack=0x7f0c002e; public static final int Stack100=0x7f0c002f; public static final int TimeOfDay=0x7f0c004a; public static final int Top=0x7f0c0027; public static final int Visible=0x7f0c0020; public static final int Week=0x7f0c004b; public static final int Year=0x7f0c004c; public static final int action0=0x7f0c00e9; public static final int action_bar=0x7f0c007e; public static final int action_bar_activity_content=0x7f0c0000; public static final int action_bar_container=0x7f0c007d; public static final int action_bar_root=0x7f0c0079; public static final int action_bar_spinner=0x7f0c0001; public static final int action_bar_subtitle=0x7f0c005f; public static final int action_bar_title=0x7f0c005e; public static final int action_context_bar=0x7f0c007f; public static final int action_divider=0x7f0c00ed; public static final int action_menu_divider=0x7f0c0002; public static final int action_menu_presenter=0x7f0c0003; public static final int action_mode_bar=0x7f0c007b; public static final int action_mode_bar_stub=0x7f0c007a; public static final int action_mode_close_button=0x7f0c0060; public static final int action_refresh=0x7f0c010d; public static final int action_send=0x7f0c010c; public static final int action_settings=0x7f0c010b; public static final int activity_chooser_view_content=0x7f0c0061; public static final int addCommentPanel=0x7f0c009d; public static final int alertTitle=0x7f0c006d; public static final int always=0x7f0c0050; public static final int areaText=0x7f0c00c2; public static final int beginning=0x7f0c004e; public static final int bottom=0x7f0c002b; public static final int btnCommentDone=0x7f0c0094; public static final int btnCopyException=0x7f0c00d3; public static final int btnCopyLogcat=0x7f0c00e1; public static final int buttonPanel=0x7f0c0068; public static final int cancel_action=0x7f0c00ea; public static final int center=0x7f0c0028; public static final int center_horizontal=0x7f0c0032; public static final int center_vertical=0x7f0c0033; public static final int chart_data_point_content_container=0x7f0c010a; public static final int chart_layout_root=0x7f0c00fc; public static final int chart_tooltip_category=0x7f0c00ba; public static final int chart_tooltip_pointer=0x7f0c0109; public static final int chart_tooltip_value=0x7f0c00bb; public static final int chart_trackball_category=0x7f0c00c3; public static final int chart_trackball_value=0x7f0c00c5; public static final int checkbox=0x7f0c0076; public static final int chronometer=0x7f0c00f0; public static final int clip_horizontal=0x7f0c003c; public static final int clip_vertical=0x7f0c003d; public static final int closeText=0x7f0c00be; public static final int collapseActionView=0x7f0c0051; public static final int contentHolder=0x7f0c008f; public static final int contentPanel=0x7f0c006e; public static final int custom=0x7f0c0074; public static final int customPanel=0x7f0c0073; public static final int data_form_autocomplete_editor=0x7f0c009e; public static final int data_form_checkbox_editor=0x7f0c009f; public static final int data_form_date_editor=0x7f0c00a0; public static final int data_form_decimal_editor=0x7f0c00a1; public static final int data_form_editor_container=0x7f0c00a9; public static final int data_form_editor_group_container=0x7f0c00a4; public static final int data_form_editor_image=0x7f0c00a6; public static final int data_form_expandable_group_expand_button=0x7f0c00ac; public static final int data_form_group_header=0x7f0c00a3; public static final int data_form_group_header_container=0x7f0c00a2; public static final int data_form_header_container=0x7f0c00a7; public static final int data_form_integer_editor=0x7f0c00ad; public static final int data_form_list_editor=0x7f0c00ae; public static final int data_form_number_picker_editor=0x7f0c00af; public static final int data_form_radio_group=0x7f0c00b0; public static final int data_form_root_layout=0x7f0c00b1; public static final int data_form_seekbar_editor=0x7f0c00b2; public static final int data_form_spinner_editor=0x7f0c00b3; public static final int data_form_switch_editor=0x7f0c00b4; public static final int data_form_text_editor=0x7f0c00b5; public static final int data_form_text_viewer=0x7f0c00b6; public static final int data_form_text_viewer_header=0x7f0c00a5; public static final int data_form_time_editor=0x7f0c00b7; public static final int data_form_toggle_editor=0x7f0c00b8; public static final int data_form_validation_container=0x7f0c00aa; public static final int data_form_validation_icon=0x7f0c00a8; public static final int data_form_validation_message_view=0x7f0c00ab; public static final int decor_content_parent=0x7f0c007c; public static final int default_activity_button=0x7f0c0064; public static final int design_bottom_sheet=0x7f0c00c7; public static final int design_menu_item_action_area=0x7f0c00ce; public static final int design_menu_item_action_area_stub=0x7f0c00cd; public static final int design_menu_item_text=0x7f0c00cc; public static final int design_navigation_view=0x7f0c00cb; public static final int disableHome=0x7f0c0011; public static final int editCommentPanel=0x7f0c0092; public static final int edit_query=0x7f0c0080; public static final int emptyContent=0x7f0c00fd; public static final int end=0x7f0c0034; public static final int end_padder=0x7f0c00f5; public static final int enterAlways=0x7f0c0018; public static final int enterAlwaysCollapsed=0x7f0c0019; public static final int exitUntilCollapsed=0x7f0c001a; public static final int expand_activities_button=0x7f0c0062; public static final int expanded_menu=0x7f0c0075; public static final int fill=0x7f0c003e; public static final int fill_horizontal=0x7f0c003f; public static final int fill_vertical=0x7f0c0035; public static final int fixed=0x7f0c005c; public static final int groupHeaderCollapseImage=0x7f0c0100; public static final int groupHeaderText=0x7f0c0101; public static final int highText=0x7f0c00bc; public static final int home=0x7f0c0004; public static final int homeAsUp=0x7f0c0012; public static final int horizontal=0x7f0c005a; public static final int icon=0x7f0c0066; public static final int ifRoom=0x7f0c0052; public static final int image=0x7f0c0063; public static final int imageView=0x7f0c00cf; public static final int indicatorContainer=0x7f0c0091; public static final int info=0x7f0c00f4; public static final int inline_event_end=0x7f0c00dd; public static final int inline_event_start=0x7f0c00dc; public static final int inline_event_title=0x7f0c00de; public static final int itemImage=0x7f0c009a; public static final int item_touch_helper_previous_elevation=0x7f0c0005; public static final int left=0x7f0c0029; public static final int legendItemIconView=0x7f0c00df; public static final int legendItemTitleView=0x7f0c00e0; public static final int legendListView=0x7f0c00ff; public static final int line1=0x7f0c00ee; public static final int line3=0x7f0c00f2; public static final int linearLayout=0x7f0c00d4; public static final int listComments=0x7f0c009c; public static final int listItems=0x7f0c00db; public static final int listMode=0x7f0c000e; public static final int list_item=0x7f0c0065; public static final int logcatLinearLayout=0x7f0c00e2; public static final int logcatMsg=0x7f0c00e3; public static final int lowText=0x7f0c00bf; public static final int media_actions=0x7f0c00ec; public static final int menuList=0x7f0c00e4; public static final int middle=0x7f0c004f; public static final int mini=0x7f0c004d; public static final int multiply=0x7f0c0037; public static final int name=0x7f0c0105; public static final int navItemsLayout=0x7f0c00e7; public static final int navigationItemText=0x7f0c00e8; public static final int navigation_header_container=0x7f0c00ca; public static final int never=0x7f0c0053; public static final int none=0x7f0c0013; public static final int normal=0x7f0c000f; public static final int number_picker_minus=0x7f0c00f7; public static final int number_picker_plus=0x7f0c00f9; public static final int number_picker_root=0x7f0c00f6; public static final int number_picker_view=0x7f0c00f8; public static final int openText=0x7f0c00bd; public static final int pager=0x7f0c00d1; public static final int parallax=0x7f0c0030; public static final int parentPanel=0x7f0c006a; public static final int pin=0x7f0c0031; public static final int popup_event_time=0x7f0c00fa; public static final int popup_event_title=0x7f0c00fb; public static final int progressBar=0x7f0c0095; public static final int progress_circular=0x7f0c0006; public static final int progress_horizontal=0x7f0c0007; public static final int radio=0x7f0c0078; public static final int renderSurface=0x7f0c00fe; public static final int right=0x7f0c002a; public static final int screen=0x7f0c0038; public static final int screenshotImage=0x7f0c0090; public static final int scroll=0x7f0c001b; public static final int scrollIndicatorDown=0x7f0c0072; public static final int scrollIndicatorUp=0x7f0c006f; public static final int scrollView=0x7f0c0070; public static final int scrollable=0x7f0c005d; public static final int search_badge=0x7f0c0082; public static final int search_bar=0x7f0c0081; public static final int search_button=0x7f0c0083; public static final int search_close_btn=0x7f0c0088; public static final int search_edit_frame=0x7f0c0084; public static final int search_go_btn=0x7f0c008a; public static final int search_mag_icon=0x7f0c0085; public static final int search_plate=0x7f0c0086; public static final int search_src_text=0x7f0c0087; public static final int search_voice_btn=0x7f0c008b; public static final int select_dialog_listview=0x7f0c008c; public static final int shortcut=0x7f0c0077; public static final int showCustom=0x7f0c0014; public static final int showHome=0x7f0c0015; public static final int showTitle=0x7f0c0016; public static final int snackbar_action=0x7f0c00c9; public static final int snackbar_text=0x7f0c00c8; public static final int snap=0x7f0c001c; public static final int spacer=0x7f0c0069; public static final int split_action_bar=0x7f0c0008; public static final int src_atop=0x7f0c0039; public static final int src_in=0x7f0c003a; public static final int src_over=0x7f0c003b; public static final int start=0x7f0c0036; public static final int status_bar_latest_event_content=0x7f0c00eb; public static final int submit_area=0x7f0c0089; public static final int suggestion_img=0x7f0c0103; public static final int suggestion_text=0x7f0c0104; public static final int tabLayout=0x7f0c00d2; public static final int tabMode=0x7f0c0010; public static final int text=0x7f0c00f3; public static final int text1=0x7f0c0102; public static final int text2=0x7f0c00f1; public static final int textSpacerNoButtons=0x7f0c0071; public static final int time=0x7f0c00ef; public static final int title=0x7f0c0067; public static final int title_template=0x7f0c006c; public static final int tokenimage=0x7f0c0106; public static final int tokentext=0x7f0c0107; public static final int toolbar=0x7f0c00d0; public static final int tooltip_content_container=0x7f0c00b9; public static final int top=0x7f0c002c; public static final int topLabel=0x7f0c008e; public static final int topPanel=0x7f0c006b; public static final int touch_outside=0x7f0c00c6; public static final int trackball_points_list=0x7f0c00c4; public static final int txtAuthor=0x7f0c00d6; public static final int txtAuthorName=0x7f0c008d; public static final int txtCommentText=0x7f0c00d7; public static final int txtCommentsCount=0x7f0c00d9; public static final int txtCommentsLabel=0x7f0c009b; public static final int txtDate=0x7f0c0097; public static final int txtDescription=0x7f0c00e6; public static final int txtEditComment=0x7f0c0093; public static final int txtErrorMsg=0x7f0c00d5; public static final int txtFeedbackText=0x7f0c0099; public static final int txtNoItems=0x7f0c00da; public static final int txtStatus=0x7f0c0098; public static final int txtText=0x7f0c00d8; public static final int txtTitle=0x7f0c00e5; public static final int up=0x7f0c0009; public static final int useLogo=0x7f0c0017; public static final int vertical=0x7f0c005b; public static final int viewPager=0x7f0c0096; public static final int view_offset_helper=0x7f0c000a; public static final int withText=0x7f0c0054; public static final int wrap_content=0x7f0c001d; public static final int xText=0x7f0c00c0; public static final int xview=0x7f0c0108; public static final int yText=0x7f0c00c1; } public static final class integer { public static final int abc_config_activityDefaultDur=0x7f0a0002; public static final int abc_config_activityShortDur=0x7f0a0003; public static final int abc_max_action_buttons=0x7f0a0000; public static final int bottom_sheet_slide_duration=0x7f0a0004; public static final int cancel_button_image_alpha=0x7f0a0005; public static final int design_snackbar_text_max_lines=0x7f0a0001; public static final int status_bar_notification_info_maxnum=0x7f0a0006; } public static final class layout { public static final int abc_action_bar_title_item=0x7f030000; public static final int abc_action_bar_up_container=0x7f030001; public static final int abc_action_bar_view_list_nav_layout=0x7f030002; public static final int abc_action_menu_item_layout=0x7f030003; public static final int abc_action_menu_layout=0x7f030004; public static final int abc_action_mode_bar=0x7f030005; public static final int abc_action_mode_close_item_material=0x7f030006; public static final int abc_activity_chooser_view=0x7f030007; public static final int abc_activity_chooser_view_list_item=0x7f030008; public static final int abc_alert_dialog_button_bar_material=0x7f030009; public static final int abc_alert_dialog_material=0x7f03000a; public static final int abc_dialog_title_material=0x7f03000b; public static final int abc_expanded_menu_layout=0x7f03000c; public static final int abc_list_menu_item_checkbox=0x7f03000d; public static final int abc_list_menu_item_icon=0x7f03000e; public static final int abc_list_menu_item_layout=0x7f03000f; public static final int abc_list_menu_item_radio=0x7f030010; public static final int abc_popup_menu_item_layout=0x7f030011; public static final int abc_screen_content_include=0x7f030012; public static final int abc_screen_simple=0x7f030013; public static final int abc_screen_simple_overlay_action_mode=0x7f030014; public static final int abc_screen_toolbar=0x7f030015; public static final int abc_search_dropdown_item_icons_2line=0x7f030016; public static final int abc_search_view=0x7f030017; public static final int abc_select_dialog_material=0x7f030018; public static final int activity_edit_details=0x7f030019; public static final int activity_send_feedback=0x7f03001a; public static final int activity_view_feedback=0x7f03001b; public static final int activity_view_feedback_item=0x7f03001c; public static final int data_form_autocomplete_editor=0x7f03001d; public static final int data_form_checkbox_editor=0x7f03001e; public static final int data_form_date_editor=0x7f03001f; public static final int data_form_decimal_editor=0x7f030020; public static final int data_form_default_group_layout=0x7f030021; public static final int data_form_editor_header_layout_1=0x7f030022; public static final int data_form_editor_header_layout_2=0x7f030023; public static final int data_form_editor_layout_1=0x7f030024; public static final int data_form_editor_layout_2=0x7f030025; public static final int data_form_editor_validation_layout_1=0x7f030026; public static final int data_form_expandable_group_layout=0x7f030027; public static final int data_form_group_layout=0x7f030028; public static final int data_form_integer_editor=0x7f030029; public static final int data_form_linear_layout=0x7f03002a; public static final int data_form_list_editor=0x7f03002b; public static final int data_form_list_editor_item=0x7f03002c; public static final int data_form_number_picker=0x7f03002d; public static final int data_form_radio_group_editor=0x7f03002e; public static final int data_form_root_layout=0x7f03002f; public static final int data_form_seek_bar_editor=0x7f030030; public static final int data_form_segmented_editor=0x7f030031; public static final int data_form_spinner_editor=0x7f030032; public static final int data_form_spinner_item=0x7f030033; public static final int data_form_switch_editor=0x7f030034; public static final int data_form_text_editor=0x7f030035; public static final int data_form_text_viewer=0x7f030036; public static final int data_form_time_editor=0x7f030037; public static final int data_form_toggle_button_editor=0x7f030038; public static final int default_tooltip_content=0x7f030039; public static final int default_tooltip_ohlc_content=0x7f03003a; public static final int default_tooltip_scatter_bubble_content=0x7f03003b; public static final int default_tooltip_scatter_content=0x7f03003c; public static final int default_trackball_content=0x7f03003d; public static final int default_trackball_item_content=0x7f03003e; public static final int design_bottom_sheet_dialog=0x7f03003f; public static final int design_layout_snackbar=0x7f030040; public static final int design_layout_snackbar_include=0x7f030041; public static final int design_layout_tab_icon=0x7f030042; public static final int design_layout_tab_text=0x7f030043; public static final int design_menu_item_action_area=0x7f030044; public static final int design_navigation_item=0x7f030045; public static final int design_navigation_item_header=0x7f030046; public static final int design_navigation_item_separator=0x7f030047; public static final int design_navigation_item_subheader=0x7f030048; public static final int design_navigation_menu=0x7f030049; public static final int design_navigation_menu_item=0x7f03004a; public static final int drawer_blur_fade_layer=0x7f03004b; public static final int error_activity=0x7f03004c; public static final int exception_tab=0x7f03004d; public static final int feedback_comment=0x7f03004e; public static final int feedback_indicator=0x7f03004f; public static final int feedback_item=0x7f030050; public static final int fragment_feedback_items=0x7f030051; public static final int inline_event=0x7f030052; public static final int legend_item_view=0x7f030053; public static final int list_progress_indicator=0x7f030054; public static final int logcat_tab=0x7f030055; public static final int main_menu_content=0x7f030056; public static final int main_menu_list_item=0x7f030057; public static final int navigation_drawer_content=0x7f030058; public static final int navigation_item_view=0x7f030059; public static final int notification_media_action=0x7f03005a; public static final int notification_media_cancel_action=0x7f03005b; public static final int notification_template_big_media=0x7f03005c; public static final int notification_template_big_media_narrow=0x7f03005d; public static final int notification_template_lines=0x7f03005e; public static final int notification_template_media=0x7f03005f; public static final int notification_template_part_chronometer=0x7f030060; public static final int notification_template_part_time=0x7f030061; public static final int number_picker=0x7f030062; public static final int ohlc_trackball_item_content=0x7f030063; public static final int on_demand_automatic=0x7f030064; public static final int on_demand_manual=0x7f030065; public static final int popup_edit_details=0x7f030066; public static final int popup_event=0x7f030067; public static final int radchartbase=0x7f030068; public static final int radlegendcontrol=0x7f030069; public static final int range_trackball_item_content=0x7f03006a; public static final int select_dialog_item_material=0x7f03006b; public static final int select_dialog_multichoice_material=0x7f03006c; public static final int select_dialog_singlechoice_material=0x7f03006d; public static final int simple_empty_content=0x7f03006e; public static final int simple_group_header_item=0x7f03006f; public static final int simple_list_item=0x7f030070; public static final int suggestion_item_layout=0x7f030071; public static final int support_simple_spinner_dropdown_item=0x7f030072; public static final int token=0x7f030073; public static final int tooltip_container=0x7f030074; public static final int trackball_container=0x7f030075; public static final int trial_message=0x7f030076; } public static final class menu { public static final int edit_details=0x7f0d0000; public static final int send_feedback_activity_menu=0x7f0d0001; public static final int view_feedback_items_activity_menu=0x7f0d0002; } public static final class string { public static final int abc_action_bar_home_description=0x7f060000; public static final int abc_action_bar_home_description_format=0x7f060001; public static final int abc_action_bar_home_subtitle_description_format=0x7f060002; public static final int abc_action_bar_up_description=0x7f060003; public static final int abc_action_menu_overflow_description=0x7f060004; public static final int abc_action_mode_done=0x7f060005; public static final int abc_activity_chooser_view_see_all=0x7f060006; public static final int abc_activitychooserview_choose_application=0x7f060007; public static final int abc_capital_off=0x7f060008; public static final int abc_capital_on=0x7f060009; public static final int abc_search_hint=0x7f06000a; public static final int abc_searchview_description_clear=0x7f06000b; public static final int abc_searchview_description_query=0x7f06000c; public static final int abc_searchview_description_search=0x7f06000d; public static final int abc_searchview_description_submit=0x7f06000e; public static final int abc_searchview_description_voice=0x7f06000f; public static final int abc_shareactionprovider_share_with=0x7f060010; public static final int abc_shareactionprovider_share_with_application=0x7f060011; public static final int abc_toolbar_collapse_description=0x7f060012; public static final int action_edit_settings=0x7f060014; public static final int action_send_feedback=0x7f060015; public static final int action_settings=0x7f060016; public static final int action_view_feedback=0x7f060017; public static final int add_feedback_hint_text=0x7f060018; public static final int app_name=0x7f060019; public static final int appbar_scrolling_view_behavior=0x7f06001a; public static final int author_name_tip=0x7f06001b; public static final int bottom_sheet_behavior=0x7f06001c; public static final int character_counter_pattern=0x7f06001d; public static final int date_time_format_string=0x7f06001e; public static final int date_time_label_format_string=0x7f06001f; public static final int edit_settings_desc=0x7f060020; public static final int feedback_activity_multiple_comments_label_format=0x7f060021; public static final int feedback_activity_single_comment_label_format=0x7f060022; public static final int feedback_add_comment_reminder=0x7f060023; public static final int feedback_author_anonymous=0x7f060024; public static final int feedback_author_name_hint=0x7f060025; public static final int feedback_button_text_anonymous=0x7f060026; public static final int feedback_comment_not_sent=0x7f060027; public static final int feedback_comment_sent=0x7f060028; public static final int feedback_comments_not_retrieved=0x7f060029; public static final int feedback_continue_info=0x7f06002a; public static final int feedback_multiple_comments_label_format=0x7f06002b; public static final int feedback_no_data_ready=0x7f06002c; public static final int feedback_not_retrieved=0x7f06002d; public static final int feedback_not_sent=0x7f06002e; public static final int feedback_refresh_title=0x7f06002f; public static final int feedback_screenshot_load_error=0x7f060030; public static final int feedback_send_title=0x7f060031; public static final int feedback_sent=0x7f060032; public static final int feedback_single_comment_label_format=0x7f060033; public static final int feedback_your_comment_hint=0x7f060034; public static final int label_comments_cap=0x7f060035; public static final int list_view_default_empty_content=0x7f060036; public static final int no_feedback_items_text=0x7f060037; public static final int on_demand_manual_button_busy=0x7f060038; public static final int on_demand_manual_button_idle=0x7f060039; public static final int send_feedback_activity_feedback_hint=0x7f06003a; public static final int send_feedback_desc=0x7f06003b; public static final int status_bar_notification_info_overflow=0x7f060013; public static final int status_open=0x7f06003c; public static final int status_resolved=0x7f06003d; public static final int title_activity_edit_details=0x7f06003e; public static final int title_activity_kimera=0x7f06003f; public static final int title_activity_send_feedback=0x7f060040; public static final int title_activity_view_feedback=0x7f060041; public static final int title_activity_view_item_feedback=0x7f060042; public static final int trial_message=0x7f060043; public static final int trial_message_caption=0x7f060044; public static final int view_feedback_desc=0x7f060045; public static final int view_feedback_tab_all=0x7f060046; public static final int view_feedback_tab_open=0x7f060047; public static final int view_feedback_tab_resolved=0x7f060048; } public static final class style { public static final int AlertDialog_AppCompat=0x7f09008c; public static final int AlertDialog_AppCompat_Light=0x7f09008d; public static final int Animation_AppCompat_Dialog=0x7f09008e; public static final int Animation_AppCompat_DropDownUp=0x7f09008f; public static final int Animation_Design_BottomSheetDialog=0x7f090090; public static final int AppCompatTheme=0x7f090037; public static final int AppTheme=0x7f090038; public static final int AppThemeBase=0x7f090091; public static final int AxisStyle=0x7f090092; public static final int AxisStyle_LineAxisStyle=0x7f090093; public static final int AxisStyle_LineAxisStyle_CartesianAxisStyle=0x7f090094; public static final int AxisStyle_LineAxisStyle_CartesianAxisStyle_CategoricalAxisStyle=0x7f090095; public static final int AxisStyle_LineAxisStyle_CartesianAxisStyle_CategoricalAxisStyle_DateTimeCategoricalAxisStyle=0x7f090096; public static final int AxisStyle_LineAxisStyle_CartesianAxisStyle_CategoricalAxisStyle_TestDateTimeCategoricalAxisStyle=0x7f090097; public static final int AxisStyle_LineAxisStyle_CartesianAxisStyle_DateTimeContinuousAxisStyle=0x7f090098; public static final int Base_AlertDialog_AppCompat=0x7f090099; public static final int Base_AlertDialog_AppCompat_Light=0x7f09009a; public static final int Base_Animation_AppCompat_Dialog=0x7f09009b; public static final int Base_Animation_AppCompat_DropDownUp=0x7f09009c; public static final int Base_DialogWindowTitle_AppCompat=0x7f09009d; public static final int Base_DialogWindowTitleBackground_AppCompat=0x7f09009e; public static final int Base_TextAppearance_AppCompat=0x7f090039; public static final int Base_TextAppearance_AppCompat_Body1=0x7f09003a; public static final int Base_TextAppearance_AppCompat_Body2=0x7f09003b; public static final int Base_TextAppearance_AppCompat_Button=0x7f090021; public static final int Base_TextAppearance_AppCompat_Caption=0x7f09003c; public static final int Base_TextAppearance_AppCompat_Display1=0x7f09003d; public static final int Base_TextAppearance_AppCompat_Display2=0x7f09003e; public static final int Base_TextAppearance_AppCompat_Display3=0x7f09003f; public static final int Base_TextAppearance_AppCompat_Display4=0x7f090040; public static final int Base_TextAppearance_AppCompat_Headline=0x7f090041; public static final int Base_TextAppearance_AppCompat_Inverse=0x7f09000c; public static final int Base_TextAppearance_AppCompat_Large=0x7f090042; public static final int Base_TextAppearance_AppCompat_Large_Inverse=0x7f09000d; public static final int Base_TextAppearance_AppCompat_Light_Widget_PopupMenu_Large=0x7f090043; public static final int Base_TextAppearance_AppCompat_Light_Widget_PopupMenu_Small=0x7f090044; public static final int Base_TextAppearance_AppCompat_Medium=0x7f090045; public static final int Base_TextAppearance_AppCompat_Medium_Inverse=0x7f09000e; public static final int Base_TextAppearance_AppCompat_Menu=0x7f090046; public static final int Base_TextAppearance_AppCompat_SearchResult=0x7f09009f; public static final int Base_TextAppearance_AppCompat_SearchResult_Subtitle=0x7f090047; public static final int Base_TextAppearance_AppCompat_SearchResult_Title=0x7f090048; public static final int Base_TextAppearance_AppCompat_Small=0x7f090049; public static final int Base_TextAppearance_AppCompat_Small_Inverse=0x7f09000f; public static final int Base_TextAppearance_AppCompat_Subhead=0x7f09004a; public static final int Base_TextAppearance_AppCompat_Subhead_Inverse=0x7f090010; public static final int Base_TextAppearance_AppCompat_Title=0x7f09004b; public static final int Base_TextAppearance_AppCompat_Title_Inverse=0x7f090011; public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Menu=0x7f090085; public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Subtitle=0x7f09004c; public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse=0x7f09004d; public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Title=0x7f09004e; public static final int Base_TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse=0x7f09004f; public static final int Base_TextAppearance_AppCompat_Widget_ActionMode_Subtitle=0x7f090050; public static final int Base_TextAppearance_AppCompat_Widget_ActionMode_Title=0x7f090051; public static final int Base_TextAppearance_AppCompat_Widget_Button=0x7f090052; public static final int Base_TextAppearance_AppCompat_Widget_Button_Inverse=0x7f090086; public static final int Base_TextAppearance_AppCompat_Widget_DropDownItem=0x7f0900a0; public static final int Base_TextAppearance_AppCompat_Widget_PopupMenu_Large=0x7f090053; public static final int Base_TextAppearance_AppCompat_Widget_PopupMenu_Small=0x7f090054; public static final int Base_TextAppearance_AppCompat_Widget_Switch=0x7f090055; public static final int Base_TextAppearance_AppCompat_Widget_TextView_SpinnerItem=0x7f090056; public static final int Base_TextAppearance_Widget_AppCompat_ExpandedMenu_Item=0x7f0900a1; public static final int Base_TextAppearance_Widget_AppCompat_Toolbar_Subtitle=0x7f090057; public static final int Base_TextAppearance_Widget_AppCompat_Toolbar_Title=0x7f090058; public static final int Base_Theme_AppCompat=0x7f090059; public static final int Base_Theme_AppCompat_CompactMenu=0x7f0900a2; public static final int Base_Theme_AppCompat_Dialog=0x7f090012; public static final int Base_Theme_AppCompat_Dialog_Alert=0x7f0900a3; public static final int Base_Theme_AppCompat_Dialog_FixedSize=0x7f0900a4; public static final int Base_Theme_AppCompat_Dialog_MinWidth=0x7f0900a5; public
16,094
https://github.com/SapirLastimoza-Dooley/Tamu.GeoInnovation.js.monorepo/blob/master/libs/oidc/provider/src/lib/typings/oidc-provider/index.d.ts
Github Open Source
Open Source
MIT
2,020
Tamu.GeoInnovation.js.monorepo
SapirLastimoza-Dooley
TypeScript
Code
446
1,498
declare module 'oidc-provider' { import { Request, Response, Handler } from 'express'; import express, { Router } from 'express'; import { IncomingMessage, ServerResponse } from 'http'; import EventEmitter from 'events'; interface AuthorizationCodeData { accountId: string; authTime: number; claims: { /* id_token: { email: string | null; family_name: { essential: boolean }; gender: { essential: boolean }; given_name: { value: string }; locale: { values: string[] }; middle_name: {}; }; */ }; clientId: string; grantId: string; nonce: string; redirectUri: string; scope: string; } interface AccessTokenData { accountId: string; claims: { /* id_token: { email: null, family_name: [Object], gender: [Object], given_name: [Object], locale: [Object], middle_name: {} } */ }; clientId: string; grantId: string; scope: string; } class AuthorizationCode { consumed: Date; constructor(data: AuthorizationCodeData); consume(): Promise<void>; save(): Promise<AuthorizationCode>; find( search: AuthorizationCode, options?: { ignoreExpiration?: boolean; } ): Promise<AuthorizationCode>; destroy(): Promise<void>; } class AccessToken { constructor(data: AccessTokenData); save(): Promise<AccessToken>; find( search: AccessToken, options?: { ignoreExpiration?: boolean; } ): Promise<AccessToken>; destroy(): Promise<void>; } export interface IClient { applicationType: 'web' | 'native'; grantTypes: string[]; // [ "authorization_code" ] idTokenSignedResponseAlg: 'RS256'; requireAuthTime: false; responseTypes: string[]; // [ "code" ] subjectType: 'public'; tokenEndpointAuthMethod: 'none'; requestUris: string[]; clientId: string; clientSecret: string; redirectUris: string[]; introspectionEndpointAuthMethod: 'none'; modules: any[]; // My custom property signText?: string; } export interface Session { _id: string; accountId: string | null; expiresAt: Date; save(time: number): Promise<void>; sidFor(client_id: string): boolean; login: {}; interaction: { error?: 'login_required'; error_description: string; reason: 'no_session' | 'consent_prompt' | 'client_not_authorized'; reason_description: string; }; params: { client_id: string; redirect_uri: string; response_mode: 'query'; response_type: 'code'; login_hint?: string; scope: 'openid'; state: string; }; returnTo: string; signed: null; uuid: string; id: string; } class Provider extends EventEmitter { public app: express.Application; public uuid: string; public domain: {}; public AuthorizationCode: AuthorizationCode; public AccessToken: AccessToken; public callback: Handler; public Client: { find: (id: string) => IClient; }; public client: IClient; public issuer: string; public session: Session; public Session: { find: (sessionId: string) => Session; }; public params: { response_type: 'none'; }; public result: boolean; public proxy: boolean; constructor(url: string, config?: {}); public initialize(config: {}): Promise<this>; public listen(port: string | number): void; public interactionDetails(ctx: IncomingMessage): Promise<Session>; public setProviderSession(req: IncomingMessage, res: ServerResponse, {}): Promise<any>; public interactionFinished(req: IncomingMessage, res: ServerResponse, {}): Promise<void>; public interactionResult(req: IncomingMessage, res: ServerResponse, {}): Promise<any>; public use(fn: Function): void; public addListener(event: OIDCListenerEvent, callback: Handler); } export default Provider; } type OIDCListenerEvent = | 'server_error' | 'authorization.accepted' | 'interaction.started' | 'interaction.ended' | 'authorization.success' | 'authorization.error' | 'grant.success' | 'grant.error' | 'certificates.error' | 'discovery.error' | 'introspection.error' | 'revocation.error' | 'registration_create.success' | 'registration_create.error' | 'registration_read.error' | 'registration_update.success' | 'registration_update.error' | 'registration_delete.success' | 'registration_delete.error' | 'userinfo.error' | 'check_session.error' | 'check_session_origin.error' | 'webfinger.error' | 'token.issued' | 'token.consumed' | 'token.revoked' | 'grant.revoked' | 'end_session.success' | 'end_session.error' | 'backchannel.success' | 'backchannel.error';
21,351
https://github.com/noob-26/signature_saas/blob/master/client/src/pages/Pages/Careers/PageJobCompany.js
Github Open Source
Open Source
MIT
2,021
signature_saas
noob-26
JavaScript
Code
973
3,704
import React, { Component } from "react"; import { Link } from "react-router-dom"; import { Container, Row, Col, Modal, ModalHeader, ModalBody, Form, Input, Label, } from "reactstrap"; //Import Icons import FeatherIcon from "feather-icons-react"; //Import Images import imgbg from "../../../assets/images/job/company.jpg"; import profile from "../../../assets/images/job/Circleci.svg"; class PageJobCompany extends Component { constructor(props) { super(props); this.state = { jobs: [ { title: "Senior Web Developer", icon: "monitor", location: "London, UK", }, { title: "Front-End Developer", icon: "airplay", location: "Brasilia, Brazil", }, { title: "Back-End Developer", icon: "cpu", location: "Ottawa, Canada", }, { title: "UI Designer", icon: "square", location: "Beijing, Chin" }, { title: "UX Designer", icon: "monitor", location: "Bogota, Colombia" }, { title: "Php Developer", icon: "crop", location: "Havana, Cuba" }, ], modal: false, }; this.togglemodal.bind(this); } componentDidMount() { document.body.classList = ""; document.getElementById("top-menu").classList.add("nav-light"); document.getElementById("buyButton").className = "btn btn-light"; window.addEventListener("scroll", this.scrollNavigation, true); } // Make sure to remove the DOM listener when the component is unmounted. componentWillUnmount() { window.removeEventListener("scroll", this.scrollNavigation, true); } scrollNavigation = () => { var doc = document.documentElement; var top = (window.pageYOffset || doc.scrollTop) - (doc.clientTop || 0); if (top > 80) { document.getElementById("topnav").classList.add("nav-sticky"); document.getElementById("buyButton").className = "btn btn-primary"; } else { document.getElementById("topnav").classList.remove("nav-sticky"); document.getElementById("buyButton").className = "btn btn-light"; } }; togglemodal = () => { this.setState((prevState) => ({ modal: !prevState.modal, })); }; render() { return ( <React.Fragment> <section className="bg-half-260 d-table w-100" style={{ background: `url(${imgbg}) center center` }} > <div className="bg-overlay"></div> </section> <section className="section"> <Container> <Row> <Col lg="4" md="5" xs="12"> <div className="job-profile position-relative"> <div className="rounded shadow bg-white"> <div className="text-center py-5 border-bottom"> <img src={profile} className="avatar avatar-medium mx-auto rounded-circle d-block" alt="" /> <h5 className="mt-3 mb-0">CircleCi</h5> <p className="text-muted mb-0">Internet Services</p> </div> <div className="p-4"> <h5>Company Details :</h5> <ul className="list-unstyled mb-4"> <li className="h6"> <i> <FeatherIcon icon="map-pin" className="fea icon-sm text-warning me-3" /> </i> <span className="text-muted">Location :</span> San Francisco </li> <li className="h6"> <i> <FeatherIcon icon="link" className="fea icon-sm text-warning me-3" /> </i> <span className="text-muted">Comapny :</span>{" "} circleci.com </li> <li className="h6"> <i> <FeatherIcon icon="dollar-sign" className="fea icon-sm text-warning me-3" /> </i> <span className="text-muted">Revenue :</span> $ 5M / Annual </li> <li className="h6"> <i> <FeatherIcon icon="users" className="fea icon-sm text-warning me-3" /> </i> <span className="text-muted">No. of employees :</span>{" "} 200 </li> </ul> <div className="d-grid"> <Link to="#" onClick={this.togglemodal} className="btn btn-primary" > Apply Now </Link> </div> </div> </div> <div className="map mt-4 pt-2"> <iframe title="uniqueTitle" src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3152.9459036900826!2d-122.39420768440696!3d37.79130751898054!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x8085806516341641%3A0x3f1e44c262252836!2sCircleCI!5e0!3m2!1sen!2sin!4v1575034257139!5m2!1sen!2sin" style={{ border: "0" }} className="rounded" allowFullScreen="" ></iframe> </div> </div> </Col> <Col lg="8" md="7" xs="12" className="mt-4 mt-sm-0 pt-2 pt-sm-0"> <div className="ms-md-4"> <h4>About us :</h4> <p className="text-muted"> Almost no business is immune from the need for quality software development. The act of building quality software, and shipping it quickly, has become the core engine of value creation in companies across all industries. CircleCI allows teams to rapidly release code they trust by automating the build, test, and delivery process. Thousands of leading companies, including Samsung, Ford Motor Company, Spotify, Lyft, Coinbase, PagerDuty, Stitch Fix, and BuzzFeed rely on CircleCI to accelerate delivery and improve quality. </p> <p className="text-muted"> CircleCI was named a Leader in cloud-native continuous integration by Forrester in 2019 and has been named to multiple Best DevOps Tools lists. CircleCI is the first CI/CD tool to become FedRAMP certified and processes more than 30 million builds each month across Linux, macOS, Docker and Windows build environments. </p> <p className="text-muted mb-0"> Founded in 2011 and headquartered in San Francisco with a global remote workforce, CircleCI is venture-backed by Scale Venture Partners, Threshold Ventures (formerly DFJ), Baseline Ventures, Top Tier Capital, Industry Ventures, Heavybit, Harrison Metal Capital, Owl Rock Capital Partners, and NextEquity Partners. </p> <h4 className="mt-lg-5 mt-4">Join The Team :</h4> <p className="text-muted mb-0"> Started in 2011, we have grown to over 200 employees all over the world. Headquartered in San Francisco, we have offices in London, Tokyo, Toronto, Boston, and Denver, with team members working across 50+ cities and 13 countries. </p> <Row> {this.state.jobs.map((job, key) => ( <Col lg="6" key={key} className="mt-4 pt-2"> <Link to="/page-job-detail" className="text-dark"> <div className="key-feature d-flex align-items-center p-3 bg-white rounded shadow"> <div className="icon text-center rounded-circle me-3"> <i> <FeatherIcon icon={job.icon} className="fea icon-ex-md text-primary" /> </i> </div> <div className="content"> <h4 className="title mb-0">{job.title}</h4> <p className="text-muted mb-0">{job.location}</p> </div> </div> </Link> </Col> ))} <Col xs="12" className="mt-4 pt-2"> <Link to="/page-jobs" className="btn btn-primary"> See All Jobs <i className="uil uil-angle-right-b align-middle"></i> </Link> </Col> </Row> </div> </Col> </Row> </Container> </section> <Modal isOpen={this.state.modal} role="dialog" centered={true} id="trialform" > <ModalHeader toggle={this.togglemodal}>Apply now</ModalHeader> <ModalBody className="p-4"> <Form> <Row> <Col md="6"> <div className="mb-3"> <Label className="form-label"> Your Name :<span className="text-danger">*</span> </Label> <div className="form-icon position-relative"> <i> <FeatherIcon icon="user" className="fea icon-sm icons" /> </i> <Input name="name" id="name" type="text" className="form-control ps-5" required placeholder="First Name :" /> </div> </div> </Col> <Col md="6"> <div className="mb-3"> <Label className="form-label"> Your Email :<span className="text-danger">*</span> </Label> <div className="form-icon position-relative"> <i> <FeatherIcon icon="mail" className="fea icon-sm icons" /> </i> <Input name="email" id="email" type="email" className="form-control ps-5" required placeholder="Your email :" /> </div> </div> </Col> <Col md="6"> <div className="mb-3"> <Label className="form-label"> Your Phone no. :<span className="text-danger">*</span> </Label> <div className="form-icon position-relative"> <i> <FeatherIcon icon="phone" className="fea icon-sm icons" /> </i> <Input name="number" id="number" type="number" className="form-control ps-5" required placeholder="Your phone no. :" /> </div> </div> </Col> <Col md="6"> <div className="mb-3"> <Label className="form-label">Job Title :</Label> <div className="form-icon position-relative"> <i> <FeatherIcon icon="book" className="fea icon-sm icons" /> </i> <Input name="subject" id="subject" className="form-control ps-5" required placeholder="Title :" /> </div> </div> </Col> <Col md="6"> <div className="mb-3"> <Label className="form-label">Types of jobs :</Label> <select className="form-select form-control" id="Sortbylist-job" > <option>All Jobs</option> <option>Full Time</option> <option>Half Time</option> <option>Remote</option> <option>In Office</option> </select> </div> </Col> <Col md="12"> <div className="mb-3"> <Label className="form-label">Description :</Label> <div className="form-icon position-relative"> <i> <FeatherIcon icon="message-circle" className="fea icon-sm icons" /> </i> <textarea name="comments" id="comments" rows="4" className="form-control ps-5" required placeholder="Describe the job :" ></textarea> </div> </div> </Col> <Col md="12"> <div className="mb-3"> <Label className="form-label">Upload Your Cv / Resume :</Label> <Input type="file" className="form-control" required id="fileupload" /> </div> </Col> <Col md="12"> <div className="mb-3"> <div className="form-check"> <Input type="checkbox" className="form-check-input" id="customCheck1" /> <Label className="form-check-label" for="customCheck1" > I Accept{" "} <Link to="#" className="text-primary"> Terms And Condition </Link> </Label> </div> </div> </Col> </Row> <Row> <Col sm="12"> <input type="submit" id="submit" name="send" className="submitBnt btn btn-primary" value="Apply Now" /> </Col> </Row> </Form> </ModalBody> </Modal> </React.Fragment> ); } } export default PageJobCompany;
10,673
https://github.com/171906502/wetM2.0/blob/master/backend/modules/core/views/logmanager/index.php
Github Open Source
Open Source
BSD-3-Clause
null
wetM2.0
171906502
PHP
Code
112
550
<?php use yii\helpers\Url; ?> <div class="bjui-pageHeader"> <form id="pagerForm" data-toggle="ajaxsearch" action="<?= Url::toRoute('index') ?>" method="get"> <input type="hidden" name="pageSize" value="10"> <input type="hidden" name="pageCurrent" value="1"> <input type="hidden" name="orderField" value="created_at"> <input type="hidden" name="orderDirection" value="desc"> <div class="bjui-searchBar"> </div> </form> </div> <div class="bjui-pageContent tableContent"> <table data-toggle="tablefixed" data-width="100%"> <thead> <tr> <th align="center" data-order-field="id" width="50">id</th> <th align="center">日志内容</th> </tr> </thead> <tbody> <?php foreach ($models as $model) {?> <tr data-id="<?= $model['id'] ?>"> <td ><?= $model['id'] ?></td> <td ><?= $model['data'] ?></td> </tr> <?php }?> </tbody> </table> </div> <div class="bjui-pageFooter"> <div class="pages"> <span>每页&nbsp;</span> <div class="selectPagesize"> <select data-toggle="selectpicker" data-toggle-change="changepagesize"> <option value="10">10</option> <option value="20">20</option> <option value="50">50</option> <option value="100">100</option> </select> </div> <span>&nbsp;条,共 <?= $pages->totalCount ?> 条</span> </div> <div class="pagination-box" data-toggle="pagination" data-total="<?= $pages->totalCount ?>" data-page-size="<?= $pages->pageSize ?>" data-page-current="1"></div> </div>
3,258
https://github.com/WEBZCC/ohloh-ui/blob/master/app/decorators/people_decorator.rb
Github Open Source
Open Source
Apache-2.0
2,022
ohloh-ui
WEBZCC
Ruby
Code
32
150
# frozen_string_literal: true class PeopleDecorator def initialize(people) @people = people end def commits_by_project_map @people.each_with_object({}) do |person, cbp_map| account_decorator = person.account.decorate sorted_cbp = account_decorator.sorted_commits_by_project cbp_map[person.account_id] = [sorted_cbp.first(3).map(&:first), sorted_cbp.length - 3] end end end
24,832
https://github.com/Dima22564/cs-lucky-dev/blob/master/resources/sass/components/_scroll.sass
Github Open Source
Open Source
MIT
null
cs-lucky-dev
Dima22564
Sass
Code
99
409
@import '../_var' .vb > .vb-dragger z-index: 5 width: 12px right: 0 .vb > .vb-dragger > .vb-dragger-styler -webkit-backface-visibility: hidden backface-visibility: hidden -webkit-transform: rotate3d(0,0,0,0) transform: rotate3d(0,0,0,0) -webkit-transition: background-color 100ms ease-out, margin 100ms ease-out, height 100ms ease-out transition: background-color 100ms ease-out, margin 100ms ease-out, height 100ms ease-out background: $main-gradient margin: 5px 5px 5px 0 border-radius: 20px height: calc(100% - 10px) display: block .vb.vb-scrolling-phantom > .vb-dragger > .vb-dragger-styler background: $main-gradient .vb > .vb-dragger:hover > .vb-dragger-styler background: $main-gradient margin: 0 height: 100% cursor: pointer .vb.vb-dragging > .vb-dragger > .vb-dragger-styler background-color: $main-color margin: 0px height: 100% .vb.vb-dragging-phantom > .vb-dragger > .vb-dragger-styler background-color: $main-color cursor: pointer
3,251
https://github.com/c910335/twitter-crystal/blob/master/src/twitter/rest/friends_and_followers.cr
Github Open Source
Open Source
Apache-2.0
2,020
twitter-crystal
c910335
Crystal
Code
173
565
require "json" require "../user" module Twitter module REST module FriendsAndFollowers def follow(user_id : Int32 | Int64, options = {} of String => String) : Twitter::User response = post("/1.1/friendships/create.json", options.merge({"user_id" => user_id.to_s})) Twitter::User.from_json(response) end def follow(screen_name : String, options = {} of String => String) : Twitter::User response = post("/1.1/friendships/create.json", options.merge({"screen_name" => screen_name})) Twitter::User.from_json(response) end def follow(user : Twitter::User, options = {} of String => String) : Twitter::User follow(user.id, options) end def unfollow(user_id : Int32 | Int64, options = {} of String => String) : Twitter::User response = post("/1.1/friendships/destroy.json", options.merge({"user_id" => user_id.to_s})) Twitter::User.from_json(response) end def unfollow(screen_name : String, options = {} of String => String) : Twitter::User response = post("/1.1/friendships/destroy.json", options.merge({"screen_name" => screen_name})) Twitter::User.from_json(response) end def unfollow(user : Twitter::User, options = {} of String => String) : Twitter::User unfollow(user.id, options) end def friend_ids(options = {} of String => String) : Array(Int64) response = get("/1.1/friends/ids.json", options) JSON.parse(response)["ids"].as_a.map { |friend_id| friend_id.as_i64 } end def follower_ids(options = {} of String => String) : Array(Int64) response = get("/1.1/followers/ids.json", options) JSON.parse(response)["ids"].as_a.map { |follower_id| follower_id.as_i64 } end end end end
34,631
https://github.com/eshansaif/www.e-dailydeals.com/blob/master/app/Http/Controllers/CouponController.php
Github Open Source
Open Source
MIT
2,019
www.e-dailydeals.com
eshansaif
PHP
Code
228
965
<?php namespace App\Http\Controllers; use App\Coupon; use Illuminate\Http\Request; class CouponController extends Controller { public function index(Request $request) { $data['title'] = 'Coupon List'; $coupon = new Coupon(); $coupon = $coupon->withTrashed(); if ($request->has('search') && $request->search != null){ $coupon = $coupon->where('coupon_code','like','%'.$request->search.'%'); } if ($request->has('status') && $request->status != null) { $coupon = $coupon->where('status',$request->status ); } $coupon = $coupon->orderBy('id','DESC')->paginate(3); $data['coupons'] = $coupon; if (isset($request->status) || $request->search) { $render['status'] = $request->status; $render['search'] = $request->search; $coupon = $coupon->appends($render); } $data['serial'] = managePagination($coupon); return view('admin.coupon.index',$data); } public function create() { $data['title'] = 'Create new Coupon'; return view('admin.coupon.create',$data); } public function store(Request $request) { $request->validate([ 'coupon_code' => 'required', 'amount' => 'required', 'amount_type' => 'required', 'expiry_date' => 'required', 'status' => 'required', ]); $coupon= $request->except('_token'); //dd($coupon); $coupon['created_by'] = 1; Coupon::create($coupon); session()->flash('message','Coupon Code is created successfully!'); return redirect()->route('coupon.index'); } public function show(Coupon $coupon) { } public function edit(Coupon $coupon) { $data['title'] = 'Edit Coupon'; $data['coupon'] = $coupon; return view('admin.coupon.edit',$data); } public function update(Request $request, Coupon $coupon) { $request->validate([ 'coupon_code' => 'required', 'amount' => 'required', 'amount_type' => 'required', 'expiry_date' => 'required', 'status' => 'required', ]); $coupon_data= $request->except('_token','_method'); $coupon_data['updated_by'] = 1; $coupon->update($coupon_data); session()->flash('message','Category is updated successfully!'); return redirect()->route('coupon.index'); } public function destroy(Coupon $coupon) { $coupon->delete(); session()->flash('error_message','Coupon is deleted successfully!'); return redirect()->route('coupon.index'); } public function restore($id) { $coupon = Coupon::onlyTrashed()->findOrFail($id); $coupon->restore(); session()->flash('message','Coupon is restored successfully!'); return redirect()->route('coupon.index'); } public function permanent_delete($id) { $coupon = Coupon::onlyTrashed()->findOrFail($id); $coupon->forceDelete(); session()->flash('error_message','Coupon is permanently deleted!'); return redirect()->route('coupon.index'); } }
9,531
https://github.com/codeghj/supermail/blob/master/src/view/detials/childComps/DetialsBaseInfo.vue
Github Open Source
Open Source
MIT
2,020
supermail
codeghj
Vue
Code
173
803
<!-- --> <template> <div class="baseinfo" v-if="Object.keys(goods).length !==0"> <div class="info-title">{{goods.title}}</div> <div class="info-price"> <span class="n-price">{{goods.newprice}}</span> <span class="o-price">{{goods.oldprice}}</span> <span v-if="goods.discount" class="discount">{{goods.discount}}</span> </div> <div class="info-other"> <span>{{goods.columns[0]}}</span> <span>{{goods.columns[1]}}</span> <span>{{goods.services[goods.services.length-1].name}}</span> </div> <div class="info-service"> <span class="info-service-item" v-for="index in goods.services.length-1" :key="index"> <img :src="goods.services[index-1].icon" alt=""> <span>{{goods.services[index-1].name}}</span> </span> </div> </div> </template> <script> export default { name:"DetialsBaseInfo", data () { return { } }, props:{ goods:{ type:Object, default(){ return {} } } } } </script> <style scoped> .baseinfo{ margin-top: 10px; } .info-title{ font-size: 15px; color: black; margin-bottom: 10px; text-indent: 2em; } .info-price{ margin-bottom: 20px; } .n-price{ color: rgb(255,87,119); font-size: 20px; padding-right: 5px; padding-left: 5px; } .o-price{ font-size: 10px; color: black; text-decoration: line-through; margin-right: 4px; } .discount{ display: inline-block; text-align: center; font-size: 15px; background-color: rgb(255,87,119); color: white; border-radius: 5px; position: relative; top:-5px; } .info-other{ display: flex; font-size: 13px; box-shadow: 0px 1px 1px #eee; padding-bottom: 5px; } .info-other span{ flex:1; padding: 0 8px; } .info-service{ display: flex; text-align: center; height: 50px; box-shadow: 0px 3px 2px #eee; } .info-service span{ flex: 1; line-height: 50px; font-size: 12px; color: black; } .info-service img{ width: 10px; height: 10px; } </style>
32,855
https://github.com/animeshdml/arduino_cartpole/blob/master/scripts/serial_monitor.py
Github Open Source
Open Source
MIT
2,018
arduino_cartpole
animeshdml
Python
Code
302
1,126
from __future__ import print_function import glob import struct import time import numpy as np import threading import serial import sys # the interface stuff from PyQt4 import QtCore, QtGui import pyqtgraph as pg from data_plot_widget import DataPlotWidget def look_for_available_ports(): """ find available serial ports to Arduino """ available_ports = glob.glob('/dev/ttyACM*') print("Available porst: ") print(available_ports) return available_ports def get_time_millis(): return(int(round(time.time() * 1000))) def get_time_seconds(): return(int(round(time.time() * 1000000))) def print_values(values): print("------ ONE MORE MEASUREMENT ------") print("Accelerations: ") print(values[0:2]) print("Offsets: ") print(values[3:6]) print("Angular rate: ") print(values[2]) print("State: ") print(values[6:11]) print("Zero angle info:") print(values[14:16]) class ReadFromArduino(object): """A class to read the serial messages from Arduino. The code running on Arduino can for example be the ArduinoSide_LSM9DS0 sketch.""" def __init__(self, port, SIZE_STRUCT=64, verbose=0): self.port = port self.millis = get_time_millis() self.SIZE_STRUCT = SIZE_STRUCT self.verbose = verbose self.latest_values = -1 self.t_init = get_time_millis() self.t = 0 self.port.flushInput() def read_one_value(self): """Wait for next serial message from the Arduino, and read the whole message as a structure.""" read = False while not read: myByte = self.port.read(1) if myByte == 'S': data = self.port.read(self.SIZE_STRUCT) myByte = self.port.read(1) print(data, myByte) if myByte == 'E': self.t = (get_time_millis() - self.t_init) / 1000.0 # is a valid message struct new_values = struct.unpack('<ffffffffffffffff', data) current_time = get_time_millis() time_elapsed = current_time - self.millis self.millis = current_time read = True self.latest_values = np.array(new_values) if self.verbose > 1: print("Time elapsed since last (ms): " + str(time_elapsed)) print_values(new_values) return(True) return(False) if __name__ == "__main__": ports = look_for_available_ports() usb_port = serial.Serial(ports[0], baudrate=115200, timeout=0.5) reader = ReadFromArduino(usb_port, verbose=10) app = QtGui.QApplication(sys.argv) window = QtGui.QWidget() windowLayout = QtGui.QHBoxLayout() statePlotter = DataPlotWidget(5, title="States", alsoNumeric=True, histLength=1000) windowLayout.addWidget(statePlotter) window.setLayout(windowLayout) window.show() keep_going = True def readerThread(): while (keep_going): if reader.read_one_value(): t = time.time() statePlotter.addDataPoint(0, t, reader.latest_values[6]) statePlotter.addDataPoint(1, t, reader.latest_values[7]) statePlotter.addDataPoint(2, t, reader.latest_values[8]) statePlotter.addDataPoint(3, t, reader.latest_values[9]) statePlotter.addDataPoint(4, t, reader.latest_values[10]) t = threading.Thread(target=readerThread) t.start() app.exec_() keep_going = False t.join()
19,299
https://github.com/GralhaAzul/EPIwebInventoryControl/blob/master/lib/screens/base/base_screen.dart
Github Open Source
Open Source
MIT
null
EPIwebInventoryControl
GralhaAzul
Dart
Code
81
357
import 'package:EPIwebInventoryControl/screens/inventory_control/baixa_stoque_screen.dart'; import 'package:flutter/material.dart'; import 'package:get_it/get_it.dart'; import 'package:mobx/mobx.dart'; import 'package:EPIwebInventoryControl/screens/home/home_screen.dart'; import 'package:EPIwebInventoryControl/stores/page_store.dart'; class BaseScreen extends StatefulWidget { BaseScreen({Key key}) : super(key: key); @override _BaseScreenState createState() => _BaseScreenState(); } class _BaseScreenState extends State<BaseScreen> { final PageController pageController = PageController(); final PageStore pageStore = GetIt.I<PageStore>(); @override void initState() { super.initState(); reaction((_) => pageStore.page, (page) => pageController.jumpToPage(page)); } @override Widget build(BuildContext context) { return Scaffold( body: PageView( controller: pageController, physics: NeverScrollableScrollPhysics(), children: [ HomeScreen(), BaixaStoqueScreen(), Container(color: Colors.purple), Container(color: Colors.brown) ], ), ); } }
1,455
https://github.com/Eli-Levi/CPP-Messageboard-part-b/blob/master/Test.cpp
Github Open Source
Open Source
MIT
null
CPP-Messageboard-part-b
Eli-Levi
C++
Code
672
2,008
#include "doctest.h" #include "Direction.hpp" #include "Board.hpp" #include <iostream> using namespace std; using namespace ariel; TEST_CASE("good input - horizontal message") { Board board; board.post(0, 0, Direction::Horizontal, "bla"); CHECK(board.read(0, 0, Direction::Horizontal, 3) == "bla"); } TEST_CASE("good input - vertical message") { Board board; board.post(0, 0, Direction::Vertical, "vertical bla"); CHECK(board.read(0, 0, Direction::Vertical, 12) == "vertical bla"); } TEST_CASE("horizontal post overwrites part of a vertical message - T form") { Board board; board.post(0, 0, Direction::Vertical, "dad"); board.post(0, 0, Direction::Horizontal, "bard"); CHECK(board.read(0, 0, Direction::Vertical, 3) == "bad"); CHECK(board.read(0, 0, Direction::Horizontal, 4) == "bard"); } TEST_CASE("horizontal post overwrites part of a vertical message - + form") { Board board; board.post(10, 10, Direction::Horizontal, "supercalifragilisticexpialidocious"); // char len = 34 board.post(9, 15, Direction::Vertical, "excaliber"); CHECK(board.read(10, 10, Direction::Horizontal, 34) == "supexcalifragilisticexpialidocious"); CHECK(board.read(9, 15, Direction::Vertical, 9) == "excaliber"); } TEST_CASE("vertical post overwrites part of a horizontal message - T form") { Board board; board.post(0, 0, Direction::Horizontal, "bard"); board.post(0, 0, Direction::Vertical, "caduceus"); CHECK(board.read(0, 0, Direction::Horizontal, 4) == "card"); CHECK(board.read(0, 0, Direction::Vertical, 8) == "caduceus"); } TEST_CASE("vertical post overwrites part of a horizontal message - + form") { Board board; board.post(10, 10, Direction::Horizontal, "beholder"); board.post(8, 14, Direction::Vertical, "boomerang"); CHECK(board.read(10, 10, Direction::Horizontal, 8) == "behooder"); CHECK(board.read(8, 14, Direction::Vertical, 9) == "boomerang"); } TEST_CASE("using an empty string input to try and overide existing message - nothing changed") { Board board; board.post(0, 0, Direction::Horizontal, "blue eyes white dragon"); board.post(0, 0, Direction::Vertical, ""); CHECK(board.read(0, 0, Direction::Horizontal, 22) == "blue eyes white dragon"); } TEST_CASE("read with size 0 chars returns an empty string") { Board board; board.post(0, 0, Direction::Horizontal, "Sonata Arctica"); CHECK(board.read(0, 0, Direction::Horizontal, 0) == ""); } TEST_CASE("reading more then string size will return string + _____") { Board board; board.post(0, 0, Direction::Horizontal, "test"); CHECK(board.read(0, 0, Direction::Horizontal, 7) == "test___"); } TEST_CASE("checks to see that ' ' is placed horizontally on the board") { Board board; board.post(0, 0, Direction::Horizontal, " "); CHECK(board.read(0, 0, Direction::Horizontal, 2) == " _"); } TEST_CASE("checks to see that ' ' is placed vertically on the board") { Board board; board.post(0, 0, Direction::Vertical, " "); CHECK(board.read(0, 0, Direction::Vertical, 2) == " _"); } TEST_CASE("properly read part of vertical message") { Board board; board.post(0, 0, Direction::Vertical, "big bumbling baboon"); CHECK(board.read(0, 5, Direction::Vertical, 8) == "bumbling"); } TEST_CASE("properly read part of a horizontal message") { Board board; board.post(0, 0, Direction::Horizontal, "a meh string"); CHECK(board.read(0, 3, Direction::Horizontal, 3) == "meh"); } TEST_CASE("vertical posts - short post partialy & properly overiders original post") { Board board; board.post(0, 0, Direction::Vertical, "hamburger"); board.post(0, 0, Direction::Vertical, "pizza"); CHECK(board.read(0, 0, Direction::Vertical, 9) == "pizzarger"); } TEST_CASE("horizontal posts - short post partialy & properly overiders original post") { Board board; board.post(0, 0, Direction::Horizontal, "woodpecker"); board.post(0, 0, Direction::Horizontal, "berserker"); CHECK(board.read(0, 0, Direction::Horizontal, 9) == "berserkerr"); } TEST_CASE("vertical posts - long post completely overiders original post") { Board board; board.post(0, 0, Direction::Vertical, "pizza"); board.post(0, 0, Direction::Vertical, "hamburger"); CHECK(board.read(0, 0, Direction::Vertical, 9) == "hamburger"); } TEST_CASE("horizontal posts - long post completely overiders original post") { Board board; board.post(0, 0, Direction::Horizontal, "berserker"); board.post(0, 0, Direction::Horizontal, "woodpecker"); CHECK(board.read(0, 0, Direction::Horizontal, 9) == "woodpecker"); } TEST_CASE("reading horizontally from an empty board should return \"____\"") { Board board; CHECK(board.read(0, 0, Direction::Horizontal, 5) == "_____"); } TEST_CASE("reading vertically from an empty board should return \"____\"") { Board board; CHECK(board.read(0, 0, Direction::Vertical, 5) == "_____"); } TEST_CASE("Checks that \\n is read as a char an not a new line horizontally") { Board board; board.post(0, 0, Direction::Horizontal, "no \n new line"); CHECK(board.read(0, 0, Direction::Horizontal, 13) == "no \n new line"); } TEST_CASE("Checks that \\n is read as a char an not a new line vertically") { Board board; board.post(0, 0, Direction::Vertical, "no \n new line"); CHECK(board.read(0, 0, Direction::Vertical, 13) == "no \\n new line"); } TEST_CASE("Checks that \\t is read as a char an not a tabbed line vertically") { Board board; board.post(0, 0, Direction::Vertical, "no \t tabbed line"); CHECK(board.read(0, 0, Direction::Vertical, 16) == "no \\t tabbed line"); } TEST_CASE("Checks that \\t is read as a char an not a tabbed line horizontally") { Board board; board.post(0, 0, Direction::Horizontal, "no \t tabbed line"); CHECK(board.read(0, 0, Direction::Horizontal, 16) == "no \\t tabbed line"); }
8,422
https://github.com/r89m/pdf-anonymisation/blob/master/setup.py
Github Open Source
Open Source
Apache-2.0
null
pdf-anonymisation
r89m
Python
Code
19
79
from distutils.core import setup import py2exe setup( options={"py2exe": { "bundle_files": 1, "compressed": True, "excludes": ["Tkinter"] }}, console=["pdf-anon.py"], zipfile=None )
1,217
https://github.com/sintefmath/Jutul.jl/blob/master/src/simulator/relaxation.jl
Github Open Source
Open Source
MIT
2,023
Jutul.jl
sintefmath
Julia
Code
109
390
function select_nonlinear_relaxation(sim::Simulator, rel_type, reports, relaxation) return select_nonlinear_relaxation_model(sim.model, rel_type, reports, relaxation) end function select_nonlinear_relaxation(sim::JutulSimulator, rel_type, reports, relaxation) return relaxation end function select_nonlinear_relaxation_model(model, rel_type, reports, relaxation) return relaxation end function select_nonlinear_relaxation_model(model, rel_type::SimpleRelaxation, reports, ω) if length(reports) > 1 (; tol, dw_decrease, dw_increase, w_max, w_min) = rel_type e_old = error_sum_scaled(model, reports[end-1][:errors]) e_new = error_sum_scaled(model, reports[end][:errors]) if (e_old - e_new)/max(e_old, 1e-20) < tol ω = ω - dw_decrease else ω = ω + dw_increase end ω = clamp(ω, w_min, w_max) end return ω end function error_sum_scaled(model, rep) err_sum = 0.0 for r in rep tol = r.tolerances crit = r.criterions for (k, v) in tol err_sum += maximum(crit[k].errors)/v end end return err_sum end
23,616
https://github.com/msrocka/ilcd/blob/master/zipr.go
Github Open Source
Open Source
MIT
2,018
ilcd
msrocka
Go
Code
831
1,970
package ilcd import ( "archive/zip" "strings" ) // ZipReader can read data sets from ILCD packages. type ZipReader struct { r *zip.ReadCloser } // NewZipReader creates a new package reader. func NewZipReader(filePath string) (*ZipReader, error) { r, err := zip.OpenReader(filePath) return &ZipReader{r: r}, err } // Close closes the pack reader. func (r *ZipReader) Close() error { return r.r.Close() } // FindDataSet searches for a data set of the give type and with the given // uuid and returns the corresponding zip file. If nothing is found, it returns // nil. func (r *ZipReader) FindDataSet(dsType DataSetType, uuid string) *ZipFile { dsFolder := dsType.Folder() files := r.r.File for i := range files { f := files[i] path := strings.ToLower(f.Name) if !strings.Contains(path, dsFolder) { continue } if !strings.HasSuffix(path, ".xml") { continue } if strings.Contains(path, uuid) { return newZipFile(f) } } return nil } // EachModel iterates over each life cycle model in the package unless // the given handler returns false. func (r *ZipReader) EachModel(fn func(*Model) bool) error { var gerr error r.EachFile(func(f *ZipFile) bool { if !IsModelPath(f.Path()) { return true } val, err := f.ReadModel() if err != nil { gerr = err return false } return fn(val) }) return gerr } // EachMethod iterates over each Method data set in the package unless // the given handler returns false. func (r *ZipReader) EachMethod(fn func(*Method) bool) error { var gerr error r.EachFile(func(f *ZipFile) bool { if !IsMethodPath(f.Path()) { return true } val, err := f.ReadMethod() if err != nil { gerr = err return false } return fn(val) }) return gerr } // EachProcess iterates over each Process data set in the package unless // the given handler returns false. func (r *ZipReader) EachProcess(fn func(*Process) bool) error { var gerr error r.EachFile(func(f *ZipFile) bool { if !IsProcessPath(f.Path()) { return true } val, err := f.ReadProcess() if err != nil { gerr = err return false } return fn(val) }) return gerr } // EachFlow iterates over each Flow data set in the package unless // the given handler returns false. func (r *ZipReader) EachFlow(fn func(*Flow) bool) error { var gerr error r.EachFile(func(f *ZipFile) bool { if !IsFlowPath(f.Path()) { return true } val, err := f.ReadFlow() if err != nil { gerr = err return false } return fn(val) }) return gerr } // EachFlowProperty iterates over each FlowProperty data set in the package unless // the given handler returns false. func (r *ZipReader) EachFlowProperty(fn func(*FlowProperty) bool) error { var gerr error r.EachFile(func(f *ZipFile) bool { if !IsFlowPropertyPath(f.Path()) { return true } val, err := f.ReadFlowProperty() if err != nil { gerr = err return false } return fn(val) }) return gerr } // EachUnitGroup iterates over each UnitGroup data set in the package unless // the given handler returns false. func (r *ZipReader) EachUnitGroup(fn func(*UnitGroup) bool) error { var gerr error r.EachFile(func(f *ZipFile) bool { if !IsUnitGroupPath(f.Path()) { return true } val, err := f.ReadUnitGroup() if err != nil { gerr = err return false } return fn(val) }) return gerr } // EachSource iterates over each Source data set in the package unless // the given handler returns false. func (r *ZipReader) EachSource(fn func(*Source) bool) error { var gerr error r.EachFile(func(f *ZipFile) bool { if !IsSourcePath(f.Path()) { return true } val, err := f.ReadSource() if err != nil { gerr = err return false } return fn(val) }) return gerr } // EachContact iterates over each Contact data set in the package unless // the given handler returns false. func (r *ZipReader) EachContact(fn func(*Contact) bool) error { var gerr error r.EachFile(func(f *ZipFile) bool { if !IsContactPath(f.Path()) { return true } val, err := f.ReadContact() if err != nil { gerr = err return false } return fn(val) }) return gerr } // EachFile calls the given function for each file in the zip package. It stops // when the function returns false or when there are no more files in the // package. func (r *ZipReader) EachFile(fn func(f *ZipFile) bool) { files := r.r.File for i := range files { file := files[i] if file.FileInfo().IsDir() { continue } zf := newZipFile(file) if !fn(zf) { break } } } type zDataEntry struct { path string data []byte } // Map applies the given function to all entries in the zip file and writes // the function's output to the given writer. // // The result of a function call is the path and the data that should be written // to the writer. If the path or data are empty, nothing will be written. The // given function is executed in a separate Go routine. func (r *ZipReader) Map(w *ZipWriter, fn func(file *ZipFile) (string, []byte)) { if w == nil { return } c := make(chan *zDataEntry) go func() { r.EachFile(func(zf *ZipFile) bool { path, data := fn(zf) if path != "" && len(data) > 0 { c <- &zDataEntry{path, data} } return true }) close(c) }() for { entry, more := <-c if !more { break } w.Write(entry.path, entry.data) } }
19,332
https://github.com/myzhang1029/WabbitStudio-Old/blob/master/WabbitCode/WCSourceRulerView.h
Github Open Source
Open Source
MIT
2,021
WabbitStudio-Old
myzhang1029
C
Code
249
656
// // WCSourceRulerView.h // WabbitEdit // // Created by William Towe on 12/26/11. // Copyright (c) 2011 Revolution Software. // // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // #import "WCLineNumberRulerView.h" #import "WCSourceRulerViewDelegate.h" #import "RSToolTipView.h" @class WCFold,WCSourceTextView,WCFileBreakpoint,WCBuildIssue,WCEditBreakpointViewController; @interface WCSourceRulerView : WCLineNumberRulerView <RSToolTipView> { __unsafe_unretained id <WCSourceRulerViewDelegate> _delegate; NSUInteger _clickedLineNumber; NSTrackingArea *_codeFoldingTrackingArea; WCFold *_foldToHighlight; WCFileBreakpoint *_clickedFileBreakpoint; WCBuildIssue *_clickedBuildIssue; WCEditBreakpointViewController *_editBreakpointViewController; NSIndexSet *_lineStartIndexesWithBuildIssues; struct { unsigned int clickedFileBreakpointHasMoved:1; unsigned int RESERVED:31; } _sourceRulerViewFlags; } @property (readwrite,assign,nonatomic) id <WCSourceRulerViewDelegate> delegate; @property (readonly,nonatomic) WCSourceTextView *sourceTextView; - (void)drawCodeFoldingRibbonInRect:(NSRect)ribbonRect; - (void)drawBuildIssuesInRect:(NSRect)buildIssueRect; - (void)drawFileBreakpointsInRect:(NSRect)breakpointRect; - (void)drawBookmarksInRect:(NSRect)bookmarkRect; @end
10,201
https://github.com/safie/spkpn22/blob/master/routes/web.php
Github Open Source
Open Source
MIT
null
spkpn22
safie
PHP
Code
216
2,385
<?php use Illuminate\Support\Facades\Route; use Illuminate\Support\Facades\Auth; /* |-------------------------------------------------------------------------- | Web Routes |-------------------------------------------------------------------------- | | Here is where you can register web routes for your application. These | routes are loaded by the RouteServiceProvider within a group which | contains the "web" middleware group. Now create something great! | */ Route::get('/', function () { return view('auth.login'); }); Auth::routes(); Route::get('/home', [App\Http\Controllers\HomeController::class, 'index'])->name('home'); Route::get('/kampung/', [App\Http\Controllers\KampungController::class, 'index'])->name('kampung@index'); Route::get('/kampung/cari', [App\Http\Controllers\KampungController::class, 'cari'])->name('kampung@cari'); Route::get('/modul_a/index', [App\Http\Controllers\ModulAController::class, 'index'])->name('modula@index'); Route::get('/modul_b/index', [App\Http\Controllers\ModulBController::class, 'index'])->name('modulb@index'); Route::get('/modul_c/index', [App\Http\Controllers\ModulCController::class, 'index'])->name('modulc@index'); Route::get('/modul_d/penduduk', [App\Http\Controllers\ModulDController::class, 'penduduk'])->name('moduld@penduduk'); Route::get('/modul_d/umur', [App\Http\Controllers\ModulDController::class, 'umur'])->name('moduld@umur'); Route::get('/modul_d/pendidikan', [App\Http\Controllers\ModulDController::class, 'pendidikan'])->name('moduld@pendidikan'); Route::get('/modul_d/pendapatan', [App\Http\Controllers\ModulDController::class, 'pendapatan'])->name('moduld@pendapatan'); Route::get('/modul_d/pekerjaan', [App\Http\Controllers\ModulDController::class, 'pekerjaan'])->name('moduld@pekerjaan'); Route::get('/modul_d/golongankhas', [App\Http\Controllers\ModulDController::class, 'golongankhas'])->name('moduld@golongankhas'); Route::get('/modul_e/tanah', [App\Http\Controllers\ModulEController::class, 'tanah'])->name('module@tanah'); Route::get('/modul_e/hakmilik', [App\Http\Controllers\ModulEController::class, 'hakMilik'])->name('module@hakmilk'); Route::get('/modul_e/tanahterbiar', [App\Http\Controllers\ModulEController::class, 'tanahTerbiar'])->name('module@tanahterbiar'); Route::get('/modul_e/tanahusaha', [App\Http\Controllers\ModulEController::class, 'tanahDiusaha'])->name('module@tanahdiusaha'); Route::get('/modul_f/kemudahanniaga', [App\Http\Controllers\ModulFController::class, 'kemudahanPerniagaan'])->name('modulf@kemudahanperniagaan'); Route::get('/modul_f/pertanian', [App\Http\Controllers\ModulFController::class, 'pertanian'])->name('modulf@pertanian'); Route::get('/modul_f/ternakperikanan', [App\Http\Controllers\ModulFController::class, 'ternakPerikanan'])->name('modulf@ternakperikanan'); Route::get('/modul_f/perniagaan', [App\Http\Controllers\ModulFController::class, 'perniagaan'])->name('modulf@perniagaan'); Route::get('/modul_f/premisniaga', [App\Http\Controllers\ModulFController::class, 'premisNiaga'])->name('modulf@premisniaga'); Route::get('/modul_f/pamminyak', [App\Http\Controllers\ModulFController::class, 'pamMinyak'])->name('modulf@pamminyak'); Route::get('/modul_f/koperasi', [App\Http\Controllers\ModulFController::class, 'koperasi'])->name('modulf@koperasi'); Route::get('/modul_g/rumah', [App\Http\Controllers\ModulGController::class, 'rumah'])->name('modulg@rumah'); Route::get('/modul_g/kenderaan', [App\Http\Controllers\ModulGController::class, 'kenderaan'])->name('modulg@kenderaan'); Route::get('/modul_h/infrastruktur', [App\Http\Controllers\ModulHController::class, 'infrastruktur'])->name('modulh@infrastruktur'); Route::get('/modul_h/air', [App\Http\Controllers\ModulHController::class, 'air'])->name('modulh@air'); Route::get('/modul_h/elektrik', [App\Http\Controllers\ModulHController::class, 'elektrik'])->name('modulh@elektrik'); Route::get('/modul_h/pembentungan', [App\Http\Controllers\ModulHController::class, 'pembentungan'])->name('modulh@pembentungan'); Route::get('/modul_h/pusatpendidikan', [App\Http\Controllers\ModulHController::class, 'pusatPendidikan'])->name('modulh@pusatpendidikan'); Route::get('/modul_h/aksesliputan', [App\Http\Controllers\ModulHController::class, 'aksesLiputan'])->name('modulh@aksesliputan'); Route::get('/modul_h/masyarakat', [App\Http\Controllers\ModulHController::class, 'kemudahanMasyarakat'])->name('modulh@masyarakat'); Route::get('/modul_h/pusatjagaan', [App\Http\Controllers\ModulHController::class, 'pusatJagaan'])->name('modulh@pusatjagaan'); Route::get('/modul_h/sampah', [App\Http\Controllers\ModulHController::class, 'sampah'])->name('modulh@sampah'); Route::get('/modul_h/pengangkutanawam', [App\Http\Controllers\ModulHController::class, 'pengangkutanAwam'])->name('modulh@penangkutanawam'); Route::get('/modul_i/aktiviti', [App\Http\Controllers\ModulIController::class, 'aktiviti'])->name('moduli@aktiviti'); Route::get('/modul_i/kursus', [App\Http\Controllers\ModulIController::class, 'kursus'])->name('moduli@kursus'); Route::get('/modul_i/alam', [App\Http\Controllers\ModulIController::class, 'alamSekitar'])->name('moduli@alamsekitar'); Route::get('/modul_i/penyakit', [App\Http\Controllers\ModulIController::class, 'penyakit'])->name('moduli@penyakit'); Route::get('/modul_i/projek', [App\Http\Controllers\ModulIController::class, 'projekEkonomi'])->name('moduli@projekekonomi'); Route::get('/modul_i/sosial', [App\Http\Controllers\ModulIController::class, 'masalahSosial'])->name('moduli@masalahsosial'); Route::get('/modul_j/organisasi', [App\Http\Controllers\ModulJController::class, 'organisasi'])->name('modulj@organisasi'); Route::get('/modul_k/individu', [App\Http\Controllers\ModulKController::class, 'individu'])->name('modulk@individu'); Route::get('/modul_k/kampung', [App\Http\Controllers\ModulKController::class, 'kampung'])->name('modulk@kampung'); Route::get('/modul_k/potensi', [App\Http\Controllers\ModulKController::class, 'potensi'])->name('modulk@potensi'); Route::get('/modul_l/isu', [App\Http\Controllers\ModulLController::class, 'isu'])->name('modull@isu'); Route::get('/modul_m/kursus', [App\Http\Controllers\ModulMController::class, 'kursus'])->name('modulm@kursus'); // route untuk js dapatkan data json Route::get('daerahbyidnegeri/{id}', [App\Http\Controllers\KampungController::class, 'daerahbyidnegeri']); Route::get('mukimbyiddaerah/{id}', [App\Http\Controllers\KampungController::class, 'mukimbyiddaerah']); Route::get('agensikawalselia/{id}', [App\Http\Controllers\KampungController::class, 'agensipenyelaras']); Route::get('dunidparlimen/{id}', [App\Http\Controllers\KampungController::class, 'dun']);
21,465
https://github.com/mythsunwind/appcenter-plugin/blob/master/src/test/java/io/jenkins/plugins/appcenter/validator/UsernameValidatorTest.java
Github Open Source
Open Source
MIT
2,021
appcenter-plugin
mythsunwind
Java
Code
189
653
package io.jenkins.plugins.appcenter.validator; import org.junit.Before; import org.junit.Test; import static com.google.common.truth.Truth.assertThat; public class UsernameValidatorTest { private Validator validator; @Before public void setUp() { validator = new UsernameValidator(); } @Test public void should_ReturnTrue_When_ApiTokenIsLowerCaseLettersOnly() { // Given final String value = "johndoe"; // When final boolean result = validator.isValid(value); // Then assertThat(result).isTrue(); } @Test public void should_ReturnTrue_When_ApiTokenIsUpperCaseLettersOnly() { // Given final String value = "JOHNDOE"; // When final boolean result = validator.isValid(value); // Then assertThat(result).isTrue(); } @Test public void should_ReturnTrue_When_ApiTokenIsNumbersOnly() { // Given final String value = "1234567890"; // When final boolean result = validator.isValid(value); // Then assertThat(result).isTrue(); } @Test public void should_ReturnTrue_When_ApiTokenIsMixOfNumbersAndLetters() { // Given final String value = "j0hNDo3"; // When final boolean result = validator.isValid(value); // Then assertThat(result).isTrue(); } @Test public void should_ReturnTrue_When_ApiTokenIsMixOfNumbersAndLettersAndDashesAndDotsAndUnderscores() { // Given final String value = "j0hNDo3-._"; // When final boolean result = validator.isValid(value); // Then assertThat(result).isTrue(); } @Test public void should_ReturnFalse_When_ApiTokenIsBlank() { // Given final String value = " "; // When final boolean result = validator.isValid(value); // Then assertThat(result).isFalse(); } @Test public void should_ReturnFalse_When_ApiTokenContainsExclamation() { // Given final String value = "johndoe!"; // When final boolean result = validator.isValid(value); // Then assertThat(result).isFalse(); } }
22,188
https://github.com/mattatwork26/inferno/blob/master/packages/inferno/src/DOM/utils.ts
Github Open Source
Open Source
MIT
null
inferno
mattatwork26
TypeScript
Code
815
2,213
import { isArray, isFunction, isInvalid, isNullOrUndef, isStringOrNumber, isUndefined, LifecycleClass, throwError } from 'inferno-shared'; import VNodeFlags from 'inferno-vnode-flags'; import options from '../core/options'; import { VNode, Props } from '../core/VNodes'; import { cloneVNode, createTextVNode, createVoidVNode } from '../core/VNodes'; import { svgNS } from './constants'; import { mount } from './mounting'; import { patch } from './patching'; import { componentToDOMNodeMap } from './rendering'; import { unmount } from './unmounting'; // We need EMPTY_OBJ defined in one place. // Its used for comparison so we cant inline it into shared export const EMPTY_OBJ = {}; if (process.env.NODE_ENV !== 'production') { Object.freeze(EMPTY_OBJ); } export function createClassComponentInstance(vNode: VNode, Component, props: Props, context: Object, isSVG: boolean) { if (isUndefined(context)) { context = EMPTY_OBJ; // Context should not be mutable } const instance = new Component(props, context); instance.context = context; if (instance.props === EMPTY_OBJ) { instance.props = props; } instance._patch = patch; if (options.findDOMNodeEnabled) { instance._componentToDOMNodeMap = componentToDOMNodeMap; } instance._unmounted = false; instance._pendingSetState = true; instance._isSVG = isSVG; if (isFunction(instance.componentWillMount)) { instance.componentWillMount(); } const childContext = instance.getChildContext(); if (isNullOrUndef(childContext)) { instance._childContext = context; } else { instance._childContext = Object.assign({}, context, childContext); } options.beforeRender && options.beforeRender(instance); let input = instance.render(props, instance.state, context); options.afterRender && options.afterRender(instance); if (isArray(input)) { if (process.env.NODE_ENV !== 'production') { throwError('a valid Inferno VNode (or null) must be returned from a component render. You may have returned an array or an invalid object.'); } throwError(); } else if (isInvalid(input)) { input = createVoidVNode(); } else if (isStringOrNumber(input)) { input = createTextVNode(input); } else { if (input.dom) { input = cloneVNode(input); } if (input.flags & VNodeFlags.Component) { // if we have an input that is also a component, we run into a tricky situation // where the root vNode needs to always have the correct DOM entry // so we break monomorphism on our input and supply it our vNode as parentVNode // we can optimise this in the future, but this gets us out of a lot of issues input.parentVNode = vNode; } } instance._pendingSetState = false; instance._lastInput = input; return instance; } export function replaceLastChildAndUnmount(lastInput, nextInput, parentDom, lifecycle: LifecycleClass, context: Object, isSVG: boolean, isRecycling: boolean) { replaceVNode(parentDom, mount(nextInput, null, lifecycle, context, isSVG), lastInput, lifecycle, isRecycling); } export function replaceVNode(parentDom, dom, vNode, lifecycle: LifecycleClass, isRecycling) { let shallowUnmount = false; // we cannot cache nodeType here as vNode might be re-assigned below if (vNode.flags & VNodeFlags.Component) { // if we are accessing a stateful or stateless component, we want to access their last rendered input // accessing their DOM node is not useful to us here unmount(vNode, null, lifecycle, false, isRecycling); vNode = vNode.children._lastInput || vNode.children; shallowUnmount = true; } replaceChild(parentDom, dom, vNode.dom); unmount(vNode, null, lifecycle, false, isRecycling); } export function createFunctionalComponentInput(vNode: VNode, component, props: Props, context: Object) { let input = component(props, context); if (isArray(input)) { if (process.env.NODE_ENV !== 'production') { throwError('a valid Inferno VNode (or null) must be returned from a component render. You may have returned an array or an invalid object.'); } throwError(); } else if (isInvalid(input)) { input = createVoidVNode(); } else if (isStringOrNumber(input)) { input = createTextVNode(input); } else { if (input.dom) { input = cloneVNode(input); } if (input.flags & VNodeFlags.Component) { // if we have an input that is also a component, we run into a tricky situation // where the root vNode needs to always have the correct DOM entry // so we break monomorphism on our input and supply it our vNode as parentVNode // we can optimise this in the future, but this gets us out of a lot of issues input.parentVNode = vNode; } } return input; } export function setTextContent(dom, text: string | number) { if (text !== '') { dom.textContent = text; } else { dom.appendChild(document.createTextNode('')); } } export function updateTextContent(dom, text: string) { dom.firstChild.nodeValue = text; } export function appendChild(parentDom, dom) { parentDom.appendChild(dom); } export function insertOrAppend(parentDom, newNode, nextNode) { if (isNullOrUndef(nextNode)) { appendChild(parentDom, newNode); } else { parentDom.insertBefore(newNode, nextNode); } } export function documentCreateElement(tag, isSVG): Element { if (isSVG === true) { return document.createElementNS(svgNS, tag); } else { return document.createElement(tag); } } export function replaceWithNewNode(lastNode, nextNode, parentDom, lifecycle: LifecycleClass, context: Object, isSVG: boolean, isRecycling: boolean) { unmount(lastNode, null, lifecycle, false, isRecycling); const dom = mount(nextNode, null, lifecycle, context, isSVG); nextNode.dom = dom; replaceChild(parentDom, dom, lastNode.dom); } export function replaceChild(parentDom, nextDom, lastDom) { if (!parentDom) { parentDom = lastDom.parentNode; } parentDom.replaceChild(nextDom, lastDom); } export function removeChild(parentDom: Element, dom: Element) { parentDom.removeChild(dom); } export function removeAllChildren(dom: Element, children, lifecycle: LifecycleClass, isRecycling: boolean) { dom.textContent = ''; if (!options.recyclingEnabled || (options.recyclingEnabled && !isRecycling)) { removeChildren(null, children, lifecycle, isRecycling); } } export function removeChildren(dom: Element, children, lifecycle: LifecycleClass, isRecycling: boolean) { for (let i = 0, len = children.length; i < len; i++) { const child = children[i]; if (!isInvalid(child)) { unmount(child, dom, lifecycle, true, isRecycling); } } } export function isKeyed(lastChildren: VNode[], nextChildren: VNode[]): boolean { return nextChildren.length && !isNullOrUndef(nextChildren[0]) && !isNullOrUndef(nextChildren[0].key) && lastChildren.length && !isNullOrUndef(lastChildren[0]) && !isNullOrUndef(lastChildren[0].key); }
34,347
https://github.com/monnhoccon/Plugin-play-videojs/blob/master/Player.php
Github Open Source
Open Source
Apache-2.0
2,015
Plugin-play-videojs
monnhoccon
PHP
Code
269
735
<?php if (!defined('Check')) { header('HTTP/1.1 404 Not Found'); exit(); } ### Tạo đường dẫn đến các file js và css phục vụ cho videojs ### $GLOBALS['css'] = 'Player/temp/player_style.css'; // Link CSS videojs $GLOBALS['js'] = 'Player/temp/player_script.js'; // Link JS videojs $GLOBALS['ie8'] = 'Player/ie8/videojs-ie8.min.js'; // Link hỗ trợ IE8 videojs $GLOBALS['quality_js'] = 'Player/temp/quality.js'; $GLOBALS['quality_css'] = 'Player/temp/quality.css'; ### Tạo đường dẫn đến các file js và css phục vụ cho videojs ### ### Chỉnh sửa các tùy chọn cho player videojs ### $GLOBALS['flash'] = 0; // Nếu muốn dùng flash thì thay đổi thành 1, ngược lại nếu muốn dùng html5 thì đổi lại thành 0 // Lưu ý: Do player nghiêng khá nhiều về html5 nên khi sử dụng FLASH sẽ không hiển thị chất lượng phim, mặc định sẽ play chất lượng cao nhất, còn với HTML5 thì vô tư // Bạn nào muốn sử dụng FLASH mà có hiển thị chất lượng thì hãy thay player và link quality :) // Mặc định sẽ tắt chế độ FLASH để player có thể hiển thị đầy đủ nhất có thể! $GLOBALS['width'] = '1000'; // Chiều rộng của player $GLOBALS['height'] = '500'; // Chiều cao của player $GLOBALS['text'] = 'Kh&ocirc;ng h&#7895; tr&#7907; HTML5'; // Text hiển thị khi trình duyệt của người dùng không hỗ trợ HTML5 ### Chỉnh sửa các tùy chọn cho player videojs ### ### Cấu hình cache link phim ### $GLOBALS['Cache'] = 1; // 1: Mở cache ; 2: Tắt cache $GLOBALS['Cache_Folder'] = 'Cache/'; // Luôn có dấu "/" ở sau cùng $GLOBALS['Cache_Time'] = '2000'; // Tính bằng giây ### Cấu hình cache link phim ### ?>
12,882
https://github.com/itspriddle/generate-password.lbaction/blob/master/Contents/Resources/keepass-password-generator-0.1.1/.gitignore
Github Open Source
Open Source
MIT
2,018
generate-password.lbaction
itspriddle
Ignore List
Code
7
27
*.gem .bundle .yardoc .rvmrc Gemfile.lock doc pkg
43,253
https://github.com/mlcodepatterns/mlcodepatterns.github.io/blob/master/icse_sp4/7/62259/289317852.dot
Github Open Source
Open Source
Apache-2.0
2,022
mlcodepatterns.github.io
mlcodepatterns
Graphviz (DOT)
Code
82
290
digraph G { subgraph cluster0 { 1 [label="zscore" a="32" s="1705,1720" l="7,1" shape="box"]; 5 [label="Assignment:=" a="7" s="1698" l="1" shape="box"]; label = "Old"; style="dotted"; } subgraph cluster1 { 2 [label="IfStatement" a="25" s="3418,3452" l="4,2" shape="diamond"]; 3 [label="()" a="106" s="3572" l="31" shape="box"]; 4 [label="Assignment:=" a="7" s="3648" l="2" shape="box"]; 6 [label="SimpleName" a="42" s="" l="" shape="ellipse"]; 7 [label="InfixExpression:r" a="27" s="3427" l="3" shape="box"]; label = "New"; style="dotted"; } 1 -> 5 [label="_para_"]; 2 -> 3 [label="_control_"]; 2 -> 4 [label="_control_"]; 6 -> 2 [label="_cond_"]; 7 -> 6 [label="_def_"]; }
5,602
https://github.com/One-sixth/SLAESR/blob/master/dataset_reader/NoTagFaceDatasetReader.py
Github Open Source
Open Source
MIT
2,019
SLAESR
One-sixth
Python
Code
236
872
import os import glob import imageio import cv2 import numpy as np from torch.utils.data import Dataset, DataLoader def center_crop(im): h, w = im.shape[:2] s0 = max(h, w) s1 = min(h, w) s2 = s1 // 2 center_yx = h // 2, w // 2 start_yx = (max(center_yx[0] - s2, 0), max(center_yx[1] - s2, 0)) end_yx = (start_yx[0] + s1, start_yx[1] + s1) im = im[start_yx[0]:end_yx[0], start_yx[1]:end_yx[1]] return im class NoTagFaceDatasetReader(Dataset): def __init__(self, path=r'../datasets/faces', img_hw=(128, 128), iter_count=1000000, random_horizontal_flip=False, mini_dataset=0, use_random=True): assert mini_dataset >= 0, 'mini_dataset must be equal or big than 0' self.use_random = use_random suffix = {'.jpg', '.png', '.bmp'} self.imgs_path = [] for p in glob.iglob('%s/**' % path, recursive=True): if os.path.splitext(p)[1].lower() in suffix: self.imgs_path.append(p) if mini_dataset > 0: np.random.shuffle(self.imgs_path) self.imgs_path = self.imgs_path[:mini_dataset] self.img_hw = img_hw self.iter_count = iter_count self.random_horizontal_flip = random_horizontal_flip def __getitem__(self, item): if self.use_random: item = np.random.randint(0, len(self.imgs_path)) impath = self.imgs_path[item] im = imageio.imread(impath) im = center_crop(im) im = cv2.resize(im, self.img_hw, interpolation=cv2.INTER_CUBIC) if self.random_horizontal_flip and np.random.uniform() > 0.5: im = np.array(im[:, ::-1]) if im.ndim == 2: im = np.tile(im[..., None], (1, 1, 3)) elif im.shape[-1] == 4: im = im[..., :3] return im def __len__(self): if self.use_random: return self.iter_count else: return len(self.imgs_path) if __name__ == '__main__': data = NoTagFaceDatasetReader(r'../datasets/moeimouto-faces', random_horizontal_flip=True) for i in range(len(data)): a = data[i] print(a.shape) if a.shape != (3, 128, 128): raise AssertionError('img shape is not equal (3, 128, 128)') cv2.imshow('test', ((a.transpose([1,2,0]) + 1) / 2 * 255).astype(np.uint8)[:, :, ::-1]) cv2.waitKey(16)
5,347
https://github.com/chrislconover/Sectional/blob/master/Sources/Sectional/collection/delegate/CompositeCollectionDelegate.swift
Github Open Source
Open Source
Apache-2.0
2,021
Sectional
chrislconover
Swift
Code
1,581
5,608
// // CompositeCollectionDelegate.swift // Curious Applications // // Created by Chris Conover on 9/17/18. // import UIKit // MARK: UICollectionViewDelegate public class CollectionViewCompositeDelegate: NSObject, CollectionOffset, UICollectionViewDelegate { public var baseOffset: IndexPath = IndexPath(item: 0, section: 0) public var rebase: () -> Void = {} public var totalSections: () -> Int = { 0 } public var shouldHighlightItemAt: ((UICollectionView, IndexPathOffset) -> Bool)? public var didHighlightItemAt: ((UICollectionView, IndexPathOffset) -> Void)? public var didUnhighlightItemAt: ((UICollectionView, IndexPathOffset) -> Void)? public var shouldSelectItemAt: ((UICollectionView, IndexPathOffset) -> Bool)? public var shouldDeselectItemAt: ((UICollectionView, IndexPathOffset) -> Bool)? // called when the user taps on an already-selected item in multi-select mode public var didSelectItemAt: ((UICollectionView, IndexPathOffset) -> Void)? public var didDeselectItemAt: ((UICollectionView, IndexPathOffset) -> Void)? public var willDisplay: ((UICollectionView, UICollectionViewCell, IndexPathOffset) -> Void)? public var willDisplaySupplementaryView: ((UICollectionView, UICollectionReusableView, String, IndexPathOffset) -> Void)? public var didEndDisplaying: ((UICollectionView, UICollectionViewCell, IndexPathOffset) -> Void)? public var didEndDisplayingSupplementaryView: ((UICollectionView, UICollectionReusableView, String, IndexPathOffset) -> Void)? public var shouldShowMenuForItemAt: ((UICollectionView, IndexPathOffset) -> Bool)? public var canPerformAction: ((UICollectionView, Selector, IndexPathOffset, Any?) -> Bool)? public var performAction: ((UICollectionView, Selector, IndexPathOffset, Any?) -> Void)? // support for custom transition layout public var transitionLayoutForOldLayout: ((UICollectionView, UICollectionViewLayout, UICollectionViewLayout) -> UICollectionViewTransitionLayout)? // Focus public var canFocusItemAt: ((UICollectionView, IndexPathOffset) -> Bool)? { didSet { supportedSelectors[Selector.canFocusItemAt] = true }} public var shouldUpdateFocusIn: ((UICollectionView, UICollectionViewFocusUpdateContext) -> Bool)? { didSet { supportedSelectors[Selector.shouldUpdateFocusIn] = true }} public var didUpdateFocusIn: ((UICollectionView, UICollectionViewFocusUpdateContext, UIFocusAnimationCoordinator) -> Void)? { didSet { supportedSelectors[Selector.didUpdateFocusIn] = true }} public var indexPathForPreferredFocusedView: ((UICollectionView) -> IndexPath?)? { didSet { supportedSelectors[Selector.indexPathForPreferredFocusedView] = true }} /// MARK: Target content offset public var targetIndexPathForMoveFromItemAt: ((UICollectionView, IndexPath, IndexPath) -> IndexPath)? { didSet { supportedSelectors[Selector.targetIndexPathForMoveFromItemAt] = true }} public var targetContentOffsetForProposedContentOffset: ((UICollectionView, CGPoint) -> CGPoint)? /// MARK: Spring loading public var shouldSpringLoadItemAt: ((UICollectionView, IndexPathOffset, UISpringLoadedInteractionContext) -> Bool)? { didSet { supportedSelectors[Selector.shouldSpringLoadItemAt] = true }} // UICollectionViewDelegateFlowLayout public var sizeForItemWithLayoutAt: ((UICollectionView, UICollectionViewLayout, IndexPath) -> CGSize)? { didSet { supportedSelectors[Selector.sizeForItemAt] = true }} public var insetForSectionAt: ((UICollectionView, UICollectionViewLayout, Int) -> UIEdgeInsets)? { didSet { supportedSelectors[.insetForSectionAt] = true } } public var minimumLineSpacingForSectionAt: ((UICollectionView, UICollectionViewLayout, Int) -> CGFloat)? { didSet { supportedSelectors[.minimumLineSpacingForSectionAt] = true } } public var minimumInteritemSpacingForSectionAt: ((UICollectionView, UICollectionViewLayout, Int) -> CGFloat)? { didSet { supportedSelectors[.minimumInteritemSpacingForSectionAt] = true } } public var referenceSizeForHeaderInSection: ((UICollectionView, UICollectionViewLayout, Int) -> CGSize)? { didSet { supportedSelectors[.referenceSizeForHeaderInSection] = true } } public var referenceSizeForFooterInSection: ((UICollectionView, UICollectionViewLayout, Int) -> CGSize)? { didSet { supportedSelectors[.referenceSizeForFooterInSection] = true } } // MARK: highlighting public func collectionView(_ collectionView: UICollectionView, shouldHighlightItemAt indexPath: IndexPath) -> Bool { return behavior(indexPath)?.collectionView?(collectionView, shouldHighlightItemAt: indexPath) ?? shouldHighlightItemAt?(collectionView, pathOffset(absolute: indexPath)) ?? true } public func collectionView(_ collectionView: UICollectionView, didHighlightItemAt indexPath: IndexPath) { behavior(indexPath)?.collectionView?(collectionView, didHighlightItemAt: indexPath) ?? didHighlightItemAt?(collectionView, pathOffset(absolute: indexPath)) } public func collectionView(_ collectionView: UICollectionView, didUnhighlightItemAt indexPath: IndexPath) { behavior(indexPath)?.collectionView?(collectionView, didUnhighlightItemAt: indexPath) ?? didUnhighlightItemAt?(collectionView, pathOffset(absolute: indexPath)) } // MARK: selection public func collectionView(_ collectionView: UICollectionView, shouldSelectItemAt indexPath: IndexPath) -> Bool { return behavior(indexPath)?.collectionView?(collectionView, shouldSelectItemAt: indexPath) ?? shouldSelectItemAt?(collectionView, pathOffset(absolute: indexPath)) ?? true } public func collectionView(_ collectionView: UICollectionView, shouldDeselectItemAt indexPath: IndexPath) -> Bool { return behavior(indexPath)?.collectionView?(collectionView, shouldDeselectItemAt: indexPath) ?? shouldDeselectItemAt?(collectionView, pathOffset(absolute: indexPath)) ?? true } public func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { behavior(indexPath)?.collectionView?(collectionView, didSelectItemAt: indexPath) ?? didSelectItemAt?(collectionView, pathOffset(absolute: indexPath)) } public func collectionView(_ collectionView: UICollectionView, didDeselectItemAt indexPath: IndexPath) { behavior(indexPath)?.collectionView?(collectionView, didDeselectItemAt: indexPath) ?? didDeselectItemAt?(collectionView, pathOffset(absolute: indexPath)) } // MARK: display public func collectionView(_ collectionView: UICollectionView, willDisplay cell: UICollectionViewCell, forItemAt indexPath: IndexPath) { behavior(indexPath)?.collectionView?(collectionView, willDisplay: cell, forItemAt: indexPath) ?? willDisplay?(collectionView, cell, pathOffset(absolute: indexPath)) } public func collectionView(_ collectionView: UICollectionView, willDisplaySupplementaryView view: UICollectionReusableView, forElementKind elementKind: String, at indexPath: IndexPath) { behavior(indexPath)?.collectionView?(collectionView, willDisplaySupplementaryView: view, forElementKind: elementKind, at: indexPath) ?? willDisplaySupplementaryView?(collectionView, view, elementKind, pathOffset(absolute: indexPath)) } public func collectionView(_ collectionView: UICollectionView, didEndDisplaying cell: UICollectionViewCell, forItemAt indexPath: IndexPath) { behavior(indexPath)?.collectionView?(collectionView, didEndDisplaying: cell, forItemAt: indexPath) ?? didEndDisplaying?(collectionView, cell, pathOffset(absolute: indexPath)) } public func collectionView(_ collectionView: UICollectionView, didEndDisplayingSupplementaryView view: UICollectionReusableView, forElementOfKind elementKind: String, at indexPath: IndexPath) { behavior(indexPath)?.collectionView?(collectionView, didEndDisplayingSupplementaryView: view, forElementOfKind: elementKind, at: indexPath) ?? didEndDisplayingSupplementaryView?(collectionView, view, elementKind, pathOffset(absolute: indexPath)) } // MARK: copy / paste // These methods provide support for copy/paste actions on cells. // All three should be implemented if any are. public func collectionView(_ collectionView: UICollectionView, shouldShowMenuForItemAt indexPath: IndexPath) -> Bool { return behavior(indexPath)?.collectionView?(collectionView, shouldShowMenuForItemAt: indexPath) ?? shouldShowMenuForItemAt?(collectionView, pathOffset(absolute: indexPath)) ?? false } public func collectionView(_ collectionView: UICollectionView, canPerformAction action: Selector, forItemAt indexPath: IndexPath, withSender sender: Any?) -> Bool { return behavior(indexPath)?.collectionView?( collectionView, canPerformAction: action, forItemAt: indexPath, withSender: sender) ?? canPerformAction?(collectionView, action, pathOffset(absolute: indexPath), sender) ?? false } public func collectionView(_ collectionView: UICollectionView, performAction action: Selector, forItemAt indexPath: IndexPath, withSender sender: Any?) { behavior(indexPath)?.collectionView?(collectionView, performAction: action, forItemAt: indexPath, withSender: sender) ?? performAction?(collectionView, action, pathOffset(absolute: indexPath), sender) } // MARK: support for custom transition layout public func collectionView(_ collectionView: UICollectionView, transitionLayoutForOldLayout fromLayout: UICollectionViewLayout, newLayout toLayout: UICollectionViewLayout) -> UICollectionViewTransitionLayout { return transitionLayoutForOldLayout?(collectionView, fromLayout, toLayout) ?? UICollectionViewTransitionLayout(currentLayout: fromLayout, nextLayout: toLayout) } // MARK: focus public func collectionView(_ collectionView: UICollectionView, canFocusItemAt indexPath: IndexPath) -> Bool { return behavior(indexPath)?.collectionView?(collectionView, canFocusItemAt: indexPath) ?? canFocusItemAt?(collectionView, pathOffset(absolute: indexPath)) ?? true } public func collectionView(_ collectionView: UICollectionView, shouldUpdateFocusIn context: UICollectionViewFocusUpdateContext) -> Bool { return shouldUpdateFocusIn?(collectionView, context) ?? true } public func collectionView(_ collectionView: UICollectionView, didUpdateFocusIn context: UICollectionViewFocusUpdateContext, with coordinator: UIFocusAnimationCoordinator) { didUpdateFocusIn?(collectionView, context, coordinator) } public func indexPathForPreferredFocusedView(in collectionView: UICollectionView) -> IndexPath? { guard let indexPathForPreferredFocusedView = indexPathForPreferredFocusedView else { fatalError("implement if remembersLastFocusedIndex is false") } return indexPathForPreferredFocusedView(collectionView) } // MARK: moving cell public func collectionView(_ collectionView: UICollectionView, targetIndexPathForMoveFromItemAt originalIndexPath: IndexPath, toProposedIndexPath proposedIndexPath: IndexPath) -> IndexPath { let ourCollectionLevelBehavior:() -> IndexPath = { [unowned self] in return self.targetIndexPathForMoveFromItemAt?( collectionView, originalIndexPath, proposedIndexPath) ?? proposedIndexPath } // if move is within the same section if let fromSection = behavior(originalIndexPath), let sameSection = behavior(proposedIndexPath), fromSection === sameSection { return sameSection.collectionView?(collectionView, targetIndexPathForMoveFromItemAt: originalIndexPath, toProposedIndexPath: proposedIndexPath) ?? ourCollectionLevelBehavior() } return ourCollectionLevelBehavior() } // customize the content offset to be applied during transition or update animations public func collectionView(_ collectionView: UICollectionView, targetContentOffsetForProposedContentOffset proposedContentOffset: CGPoint) -> CGPoint { return targetContentOffsetForProposedContentOffset?(collectionView, proposedContentOffset) ?? proposedContentOffset } // Spring Loading public func collectionView(_ collectionView: UICollectionView, shouldSpringLoadItemAt indexPath: IndexPath, with context: UISpringLoadedInteractionContext) -> Bool { return behavior(indexPath)?.collectionView?( collectionView, shouldSpringLoadItemAt: indexPath, with: context) ?? shouldSpringLoadItemAt?(collectionView, pathOffset(absolute: indexPath), context) ?? true } internal init(collectionView: UICollectionView, models: [CollectionViewNestedConfiguration]) { self.collectionView = collectionView self.models = models super.init() configure() } func configure() { var totalSections = 0 for model in models { let sectionsInModel = model.dataSource.numberOfSections?(in: collectionView) ?? 0 guard let delegate = model.delegate else { totalSections += sectionsInModel continue } delegate.baseOffset = IndexPath(row: 0, section: totalSections) delegate.totalSections = { totalSections /* final total */ } delegate.rebase = configure for section in totalSections ..< totalSections + sectionsInModel { self.behaviors[section] = delegate // add index for this section } for selector in Selector.flowLayoutDelegate { // if any delegate supports a given selector if delegate.responds(to: selector) { // then we must declare support supportedSelectors[selector] = true } } totalSections += sectionsInModel } supportedSelectors[Selector.sizeForItemAt] = supportedSelectors[Selector.sizeForItemAt] ?? false || behaviors.contains { _, delegate in delegate.responds(to: Selector.sizeForItemAt) } || false } private func behavior(_ path: IndexPath) -> UICollectionViewDelegateFlowLayout? { return behaviors[path.section] ?? defaultBehavior } private func behavior(_ section: Int) -> UICollectionViewDelegateFlowLayout? { return behaviors[section] ?? defaultBehavior } // default selector support to false private var supportedSelectors: [Selector: Bool] = Dictionary(Selector.flowLayoutDelegate.map { ($0, false) }, uniquingKeysWith: { $1 }) var defaultBehavior: UICollectionViewDelegateFlowLayout? private var behaviors = [Int: CollectionViewNestedDelegateType]() private var models = [CollectionViewNestedConfiguration]() private unowned var collectionView: UICollectionView } /// MARK: UICollectionViewDelegate extension Selector { static let shouldSelectItemAt = #selector(UICollectionViewDelegate.collectionView(_:shouldSelectItemAt:)) static let didSelectItemAt = #selector(UICollectionViewDelegate.collectionView(_:didSelectItemAt:)) static let shouldDeselectItemAt = #selector(UICollectionViewDelegate.collectionView(_:shouldDeselectItemAt:)) static let didDeselectItemAt = #selector(UICollectionViewDelegate.collectionView(_:didDeselectItemAt:)) } extension Selector { @available(iOS 14.0, *) static let indexTitles = #selector(UICollectionViewDataSource.indexTitles(for:)) @available(iOS 14.0, *) static let indexPathForIndexTitleAt = #selector(UICollectionViewDataSource.collectionView(_:indexPathForIndexTitle:at:)) static let canFocusItemAt = #selector(UICollectionViewDelegateFlowLayout.collectionView(_:canFocusItemAt:)) static let shouldUpdateFocusIn = #selector(UICollectionViewDelegateFlowLayout.collectionView(_:shouldUpdateFocusIn:)) static let didUpdateFocusIn = #selector(UICollectionViewDelegateFlowLayout.collectionView(_:didUpdateFocusIn:with:)) static let indexPathForPreferredFocusedView = #selector(UICollectionViewDelegateFlowLayout.indexPathForPreferredFocusedView(in:)) static let targetIndexPathForMoveFromItemAt = #selector(UICollectionViewDelegateFlowLayout.collectionView(_:targetIndexPathForMoveFromItemAt:toProposedIndexPath:)) static let shouldSpringLoadItemAt = #selector(UICollectionViewDelegateFlowLayout.collectionView(_:shouldSpringLoadItemAt:with:)) static let sizeForItemAt = #selector(UICollectionViewDelegateFlowLayout.collectionView(_:layout:sizeForItemAt:)) static let insetForSectionAt = #selector(UICollectionViewDelegateFlowLayout.collectionView(_:layout:insetForSectionAt:)) static let minimumLineSpacingForSectionAt = #selector(UICollectionViewDelegateFlowLayout.collectionView(_:layout:minimumLineSpacingForSectionAt:)) static let minimumInteritemSpacingForSectionAt = #selector(UICollectionViewDelegateFlowLayout.collectionView(_:layout:minimumInteritemSpacingForSectionAt:)) static let referenceSizeForHeaderInSection = #selector(UICollectionViewDelegateFlowLayout.collectionView(_:layout:referenceSizeForHeaderInSection:)) static let referenceSizeForFooterInSection = #selector(UICollectionViewDelegateFlowLayout.collectionView(_:layout:referenceSizeForFooterInSection:)) static var flowLayoutDelegate: [Selector] { return [ sizeForItemAt, insetForSectionAt, minimumLineSpacingForSectionAt, minimumInteritemSpacingForSectionAt, referenceSizeForHeaderInSection, referenceSizeForFooterInSection ] } } extension CollectionViewCompositeDelegate { public override func responds(to aSelector: Selector!) -> Bool { return supportedSelectors[aSelector] ?? super.responds(to: aSelector) } } extension CollectionViewCompositeDelegate: UICollectionViewDelegateFlowLayout { public func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { let error: () -> CGSize = { fatalError("If any section implements \(Selector.sizeForItemAt), it must be handled for all cases") } return behavior(indexPath)? .collectionView?(collectionView, layout: collectionViewLayout, sizeForItemAt: indexPath) ?? sizeForItemWithLayoutAt?(collectionView, collectionViewLayout, indexPath) ?? error() } public func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets { let error: () -> UIEdgeInsets = { fatalError("If any section implements \(Selector.insetForSectionAt), it must be handled for all cases") } return behavior(section)? .collectionView?(collectionView, layout: collectionViewLayout, insetForSectionAt: section) ?? insetForSectionAt?(collectionView, collectionViewLayout, section) ?? error() } public func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumLineSpacingForSectionAt section: Int) -> CGFloat { let error: () -> CGFloat = { fatalError("If any section implements \(Selector.minimumLineSpacingForSectionAt), it must be handled for all cases") } return behavior(section)? .collectionView?(collectionView, layout: collectionViewLayout, minimumLineSpacingForSectionAt: section) ?? minimumLineSpacingForSectionAt?(collectionView, collectionViewLayout, section) ?? error() } public func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumInteritemSpacingForSectionAt section: Int) -> CGFloat { let error: () -> CGFloat = { fatalError("If any section implements \(Selector.minimumInteritemSpacingForSectionAt), it must be handled for all cases") } return behavior(section)? .collectionView?(collectionView, layout: collectionViewLayout, minimumInteritemSpacingForSectionAt: section) ?? minimumInteritemSpacingForSectionAt?(collectionView, collectionViewLayout, section) ?? error() } public func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, referenceSizeForHeaderInSection section: Int) -> CGSize { behavior(section)?.collectionView?(collectionView, layout: collectionViewLayout, referenceSizeForHeaderInSection: section) ?? referenceSizeForHeaderInSection?(collectionView, collectionViewLayout, section) ?? .zero } public func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, referenceSizeForFooterInSection section: Int) -> CGSize { return behavior(section)? .collectionView?(collectionView, layout: collectionViewLayout, referenceSizeForFooterInSection: section) ?? referenceSizeForFooterInSection?(collectionView, collectionViewLayout, section) ?? .zero } }
15,099
https://github.com/richardswinbank/sprockit/blob/master/SprockitViz/SprockitViz/Visualiser/PbiDatasetRenderer.cs
Github Open Source
Open Source
MIT
2,022
sprockit
richardswinbank
C#
Code
44
183
using FireFive.SprockitViz.PipelineGraph; using FireFive.SprockitViz.Visualiser; namespace FireFive.SprockitViz { public class PbiDatasetRenderer : NodeRenderer { public override string GetTooltip(Node n) { return $"{n.Name} -- Power BI shared dataset"; } public override string GetLabel(Node n) { return $"<<TABLE border=\"0\"><TR><TD WIDTH=\"30\" HEIGHT=\"30\" FIXEDSIZE=\"TRUE\"><img SCALE=\"TRUE\" src=\"aas.svg\"/></TD><TD>{n.Name}</TD></TR></TABLE>>"; } } }
28,971
https://github.com/dckesler/wallet/blob/master/packages/cloud-functions/src/paymentRequests/test.ts
Github Open Source
Open Source
Apache-2.0
2,021
wallet
dckesler
TypeScript
Code
155
538
import { notifyPaymentRequest, PaymentRequestStatus } from '.' const saveRequestMock = jest.fn() const sendNotificationMock = jest.fn() jest.mock('../firebase', () => ({ database: () => ({ ref: jest.fn((path: string) => ({ update: (payload: any) => saveRequestMock(path, payload), })), }), })) jest.mock('../notifications', () => ({ getTranslatorForAddress: () => Promise.resolve(jest.fn((x) => x)), sendNotification: (...args: any[]) => sendNotificationMock(...args), })) const mockId = '123' const mockAmount = '10' const requesterAddress = '0x345' const requesteeAddress = '0x654' function createMockPaymentRequest(overrides: any = {}) { return { amount: mockAmount, requesterAddress, requesteeAddress, status: PaymentRequestStatus.REQUESTED, notified: true, ...overrides, } } describe('notifyPaymentRequests', () => { beforeEach(() => { jest.clearAllMocks() }) it('skip when already notified', async () => { await notifyPaymentRequest(mockId, createMockPaymentRequest({ notified: true })) expect(saveRequestMock).not.toHaveBeenCalled() expect(sendNotificationMock).not.toHaveBeenCalled() }) it('sends notification and marks as notified if not notified', async () => { await notifyPaymentRequest(mockId, createMockPaymentRequest({ notified: false })) expect(saveRequestMock).toHaveBeenCalledWith(`/pendingRequests/${mockId}`, { notified: true, }) expect(sendNotificationMock).toHaveBeenCalledWith( 'paymentRequestedTitle', 'paymentRequestedBody', requesteeAddress, expect.objectContaining({ uid: mockId, requesterAddress, requesteeAddress, amount: mockAmount, status: PaymentRequestStatus.REQUESTED, }) ) }) })
40,198
https://github.com/BorderTech/webfriends/blob/master/webfriends-selenium-elements/src/main/java/com/github/bordertech/webfriends/selenium/common/feature/Clickable.java
Github Open Source
Open Source
MIT
null
webfriends
BorderTech
Java
Code
60
182
package com.github.bordertech.webfriends.selenium.common.feature; import com.github.bordertech.webfriends.selenium.element.SElement; /** * Element can be clicked. */ public interface Clickable extends SElement { /** * Click the element and wait for the page to be ready. */ default void click() { getDriver().focusWindow(); getWebElement().click(); getDriver().waitForPageReady(); } /** * Click the element and do not wait for page ready. */ default void clickNoWait() { getDriver().focusWindow(); getWebElement().click(); } }
43,286
https://github.com/marcog83/pajamas/blob/master/dist/pajamas.js
Github Open Source
Open Source
MIT
2,014
pajamas
marcog83
JavaScript
Code
1,679
4,495
/*! pajamas - v1.6.1 - 2013-11-04 * http://documentup.com/geowa4/pajamas * Copyright (c) 2013 ; Licensed MIT */ (function (factory) { if (typeof module !== 'undefined' && typeof module.exports === 'object') module.exports = factory(require('q')) else if (typeof define === 'function' && define.amd) define(['q'], factory) else this['pj'] = factory(this['Q']) } (function (Q) { var win = window , doc = document , rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/ , readyState = 'readyState' , xmlHttpRequest = 'XMLHttpRequest' , xhr = win[xmlHttpRequest] ? function () { return new win[xmlHttpRequest]() } : function () { return new win.ActiveXObject('Microsoft.XMLHTTP') } , corsSupported = ('withCredentials' in xhr()) , contentType = 'Content-Type' , requestedWith = 'X-Requested-With' , defaultHeaders = { contentType : 'application/x-www-form-urlencoded; charset=UTF-8' , Accept : { '*' : 'text/javascript, text/html, application/xml,' + ' text/xml, */*' , xml : 'application/xml, text/xml' , html : 'text/html' , text : 'text/plain' , json : 'application/json, text/javascript' , script : 'text/javascript, application/javascript,' + ' application/ecmascript, application/x-ecmascript' } , requestedWith: xmlHttpRequest } , hasOwn = function (o, p) { return o.hasOwnProperty(p) } , isArray = Array.isArray || function (obj) { return obj instanceof Array } , isFunction = typeof (/-/) !== 'function' ? function (obj) { return typeof obj === 'function' } : function (obj) { return Object.prototype.toString.call(obj) === '[object Function]' } , isNumeric = function (n) { return !isNaN(parseFloat(n)) && isFinite(n) } , defaults = function (o, d) { var prop for (prop in d) if (!hasOwn(o, prop) && hasOwn(d, prop)) o[prop] = d[prop] return o } , inferDataType = function (url) { var extension = url.substr(url.lastIndexOf('.') + 1) if (extension === url) return 'json' else if (extension === 'js') return 'script' else if (extension === 'txt') return 'text' else return extension } , urlAppend = function (url, dataString) { if (typeof dataString !== 'string') return url return url + (url.indexOf('?') !== -1 ? '&' : '?') + dataString } , setHeaders = function (http, options) { var headers = options.headers || {} , accept = 'Accept' , h if (!hasOwn(headers, accept)) { headers[accept] = defaultHeaders[accept][options.dataType] || defaultHeaders[accept]['*'] } else if (!headers[accept]) delete headers[accept] if (!hasOwn(headers, requestedWith)) { if (!options.crossDomain) headers[requestedWith] = defaultHeaders.requestedWith } else if (!headers[requestedWith]) delete headers[requestedWith] if (!hasOwn(headers, contentType)) { headers[contentType] = options.contentType || defaultHeaders.contentType } else if (!headers[contentType]) delete headers[contentType] for (h in headers) if (hasOwn(headers, h)) http.setRequestHeader(h, headers[h]) } , makeResolution = function (http, response, verboseResolution) { if (verboseResolution) return { response : response , status : http.status , xhr : http } else return response } , responseParsers = { json : function () { var r = this.responseText try { return win.JSON ? win.JSON.parse(r) : eval('(' + r + ')') } catch (err) { throw new Error('Could not parse JSON in response.') } } , script : function () { return eval(this.responseText) } , text : function () { return String(this.responseText) } , html : function () { return this.responseText } , xml : function () { var r = this.responseXML // Chrome makes `responseXML` null; // IE makes `documentElement` null; // FF makes up an element; // this is my attempt at standardization if (r === null || r.documentElement === null || r.documentElement.nodeName === 'parsererror') return null else return r } } , isCrossDomain = function (url, defaultUrl) { var parts = rurl.exec(url) , defaultParts = rurl.exec(defaultUrl) return !!(parts && (parts[1] !== defaultParts[1] || parts[2] !== defaultParts[2] || (parts[3] || (parts[1] === 'http:' ? 80 : 443)) !== (defaultParts[3] || (defaultParts[1] === 'http:' ? 80 : 443 )))) } , sendLocal = function (o, deferred) { var http = isFunction(o.xhr) ? o.xhr() : xhr() , timeoutVal , send = function () { try { http.send(o.data) } catch (err) { err.xhr = http deferred.reject(err) } } http.open(o.type, o.url, true) setHeaders(http, o) http.onreadystatechange = function () { var status , parser , err timeoutVal && clearTimeout(timeoutVal) if (http && http[readyState] === 4) { status = http.status if (status >= 200 && status < 300 || status === 304 || status === 0 && http.responseText !== '') { if (http.responseText) { try { parser = responseParsers[o.dataType] deferred.resolve(makeResolution( http , parser ? parser.call(http) : http , o.verboseResolution)) } catch (e) { e.xhr = http deferred.reject(e) } } else deferred.resolve(makeResolution( http , null , o.verboseResolution)) } else { err = new Error(o.type + ' ' + o.url + ': ' + http.status + ' ' + http.statusText) err.type = o.type err.url = o.url err.status = http.status err.statusText = http.statusText err.xhr = http deferred.reject(err) } } } if (isNumeric(o.timeout)) { timeoutVal = setTimeout(function() { var e = new Error('timeout') e.xhr = http http.abort() deferred.reject(e) }, o.timeout) } isNumeric(o.delay) ? setTimeout(function () { send() }, o.delay) : send() } , sendRemote = function (o, deferred) { var head = document.head || document.getElementsByTagName('head')[0] || document.documentElement , script = document.createElement('script') , callbackName , callback , timeoutVal , send = function () { script && head.appendChild(script) } script.async = 'async' if (o.dataType === 'jsonp') { callbackName = o.jsonp || 'pajamas' + (Math.floor(Math.random()*1000)) + (Date.now || function () { return (new Date()).getTime() }).call() callback = function (data) { window[callbackName] = undefined try { delete window[callbackName] } catch (e) {} deferred.resolve(data) } window[callbackName] = callback o.url += (o.url.indexOf('?') > -1 ? '&' : '?') + (o.jsonp || 'callback') + '=' + callbackName script.src = o.url } else { script.src = o.url } script.onload = script.onreadystatechange = function(_, isAbort) { if (isAbort || !script.readyState || /loaded|complete/.test(script.readyState)) { script.onload = script.onreadystatechange = null; if (head && script.parentNode) { head.removeChild(script) } script = undefined timeoutVal && clearTimeout(timeoutVal) if (!isAbort) { if (o.dataType !== 'jsonp') deferred.resolve() } else { deferred.reject(new Error(o.url + ' aborted')) } } } script.onerror = function () { deferred.reject(new Error('Error loading ' + o.url)) } if (isNumeric(o.timeout)) { timeoutVal = setTimeout(function() { script.onload(0, 1) deferred.reject(new Error('timeout')) }, o.timeout) } isNumeric(o.delay) ? setTimeout(function () { send() }, o.delay) : send() } , pajamas = function (options) { var deferred = Q.defer() , promise = deferred.promise , o = options == null ? {} : defaults({}, options) , defaultUrl = (function () { var anchor try { return location.href } catch (e) { anchor = doc.createElement('a') anchor.href = '' return anchor.href } } ()) o.type = o.type ? o.type.toUpperCase() : 'GET' o.url || (o.url = defaultUrl) o.data = (o.data && o.processData !== false && typeof o.data !== 'string') ? pajamas.param(o.data) : (o.data || null) o.dataType || (o.dataType = inferDataType(o.url)) o.crossDomain != null || (o.crossDomain = isCrossDomain(o.url, defaultUrl)) if (o.data && typeof o.data === 'string' && o.type === 'GET') { o.url = urlAppend(o.url, o.data) o.data = null } if (o.dataType === 'jsonp' || (o.dataType === 'script' && o.crossDomain) || (o.crossDomain && !corsSupported)) sendRemote(o, deferred) else sendLocal(o, deferred) return promise .then(function (value) { var ret = o.success && o.success(value) return ret || value }, function (reason) { var ret // retry as many times as desired if (isNumeric(o.retry) && o.retry > 0) { o.retry-- return pajamas(o) } else if (o.retry === Object(o.retry)) { return pajamas(o.retry) } ret = o.error && o.error(reason) if (ret) return ret // throw reason if o.error didn't throw or return throw reason }) } pajamas.partial = function (outer) { return function (inner) { var outerClone = defaults({}, outer) return pajamas(defaults(outerClone, inner || {})) } } pajamas.param = function (data) { var prefix , queryStringBuilder = [] , push = function(key, value) { var enc = encodeURIComponent value = isFunction(value) ? value() : (value == null ? '' : value) queryStringBuilder.push(enc(key) + '=' + enc(value)) } , buildParams = function (prefix, obj) { var name , i , v if (isArray(obj)) { for (i = 0; i < obj.length; i++) { v = obj[i] if (/\[\]$/.test(prefix)) { push(prefix, v) } else { buildParams( prefix + '[' + (typeof v === 'object' ? i : '') + ']' , v) } } } else if (obj && typeof obj === 'object') { for (name in obj) { if (hasOwn(obj, name)) buildParams(prefix + '[' + name + ']', obj[name]) } } else push(prefix, obj) } if (isArray(data)) { // assume output from serializeArray for (prefix = 0; prefix < data.length; prefix++) { push(data[prefix].name, data[prefix].value) } } else { for (prefix in data) { if (hasOwn(data, prefix)) buildParams(prefix, data[prefix]) } } return queryStringBuilder.join('&').replace(/%20/g, '+') } pajamas.val = function (el) { var v if (el.nodeName.toLowerCase() === 'select') { v = (function () { var v , vals = [] , selectedIndex = el.selectedIndex , opt , options = el.options , isSingleSelect = el.type === 'select-one' , i , max if (selectedIndex < 0) return null i = isSingleSelect ? selectedIndex : 0; max = isSingleSelect ? selectedIndex + 1 : options.length; for (; i < max; i++) { opt = options[i] if (opt.selected && !opt.disabled && (!opt.parentNode.disabled || opt.parentNode.nodeName.toLowerCase() !== 'optgroup')) { v = pajamas.val(opt) if (isSingleSelect) return v vals.push(v) } } return vals } ()) } else if (el.nodeName.toLowerCase() === 'option') { v = el.attributes.value; return !v || v.specified ? el.value : el.text; } else if (el.type === 'button' || el.nodeName.toLowerCase() === 'button') { v = el.getAttributeNode('value') return v ? v.value : undefined } else if (el.type === 'radio' || el.type === 'checkbox') { return el.getAttribute('value') === null ? 'on' : el.value } else { v = el.value; } return typeof v === 'string' ? v.replace(/\r/g, '') : v == null ? '' : v; } pajamas.serializeArray = function () { var arr = [] , i , el , crlf = /\r?\n/g , checkableType = /radio|checkbox/i , pushAll = function (elems) { var el , v , i , j for (i = 0; i < elems.length; i++) { el = elems[i] if (el.name && !el.disabled && (checkableType.test(el.type) ? el.checked : true)) { v = pajamas.val(el) if (v != null) { if (isArray(v)) { // from multiple select, for instance for (j = 0; j < v.length; j++) { arr.push({ name : el.name , value : v[j].replace(crlf, '\r\n') }) } } else { arr.push({ name : el.name , value : v.replace(crlf, '\r\n') }) } } } } } for (i = 0; i < arguments.length; i++) { el = arguments[i] el.elements ? pushAll(el.elements) : pushAll([el]) } return arr } pajamas.serialize = function (){ return pajamas.param(pajamas.serializeArray.apply(null, arguments)) } return pajamas }));
1,256
https://github.com/hakubox/haku-vue/blob/master/src/api/index.ts
Github Open Source
Open Source
BSD-2-Clause
null
haku-vue
hakubox
TypeScript
Code
74
229
import * as authorize from '@/api/authorize'; import * as file from '@/api/file'; import * as funcation from '@/api/funcation'; import * as order from '@/api/order'; import * as product from '@/api/product'; import * as role from '@/api/role'; import * as user from '@/api/user'; export default { /** 系统访问授权模块 */ authorize, /** 文件上传控制器 */ file, /** 系统功能操作模块 */ funcation, /** 采购单相关操作模块 */ order, /** 产品信息操作模块 */ product, /** 角色信息操作模块 */ role, /** 用户数据操作模块 */ user, }
27,857
https://github.com/johan--/commcare-hq/blob/master/corehq/apps/casegroups/models.py
Github Open Source
Open Source
BSD-3-Clause
null
commcare-hq
johan--
Python
Code
167
578
from couchdbkit.ext.django.schema import StringProperty, ListProperty from casexml.apps.case.models import CommCareCase from dimagi.ext.couchdbkit import Document from dimagi.utils.couch.database import iter_docs from dimagi.utils.couch.undo import UndoableDocument, DeleteDocRecord class CommCareCaseGroup(UndoableDocument): """ This is a group of CommCareCases. Useful for managing cases in larger projects. """ name = StringProperty() domain = StringProperty() cases = ListProperty() timezone = StringProperty() def get_time_zone(self): # Necessary for the CommCareCaseGroup to interact with CommConnect, as if using the CommCareMobileContactMixin # However, the entire mixin is not necessary. return self.timezone def get_cases(self, limit=None, skip=None): case_ids = self.cases if skip is not None: case_ids = case_ids[skip:] if limit is not None: case_ids = case_ids[:limit] for case_doc in iter_docs(CommCareCase.get_db(), case_ids): # don't let CommCareCase-Deleted get through if case_doc['doc_type'] == 'CommCareCase': yield CommCareCase.wrap(case_doc) def get_total_cases(self, clean_list=False): if clean_list: self.clean_cases() return len(self.cases) def clean_cases(self): cleaned_list = [] for case_doc in iter_docs(CommCareCase.get_db(), self.cases): # don't let CommCareCase-Deleted get through if case_doc['doc_type'] == 'CommCareCase': cleaned_list.append(case_doc['_id']) if len(self.cases) != len(cleaned_list): self.cases = cleaned_list self.save() def create_delete_record(self, *args, **kwargs): return DeleteCaseGroupRecord(*args, **kwargs) class DeleteCaseGroupRecord(DeleteDocRecord): def get_doc(self): return CommCareCaseGroup.get(self.doc_id)
34,595
https://github.com/FeodorFitsner/learning_computer-science/blob/master/src/InterviewBit/src/Courses/Programming/Level5_Hashing/Problems/HashingTwoPointer/WindowString/Python/test_solution.py
Github Open Source
Open Source
MIT
2,022
learning_computer-science
FeodorFitsner
Python
Code
28
107
import solution import unittest class TrivialCase(unittest.TestCase): def testTrivialCase1(self): """"trivial case 1""" expected = "BANC" sol = solution.Solution() actual = sol.minWindow("ADOBECODEBANC", "ABC") self.assertEqual(expected, actual) if __name__ == "__main__": unittest.main()
15,119
https://github.com/winedepot/pinot/blob/master/pinot-core/src/main/java/org/apache/pinot/core/startree/OffHeapStarTreeBuilder.java
Github Open Source
Open Source
Apache-2.0, BSD-3-Clause, LicenseRef-scancode-free-unknown, CC-PDDC, LGPL-2.1-only, LicenseRef-scancode-other-permissive, MIT, LicenseRef-scancode-public-domain, LicenseRef-scancode-unknown-license-reference, CPL-1.0, CDDL-1.1, EPL-1.0, BSD-2-Clause, EPL-2.0, CDDL-1.0
2,019
pinot
winedepot
Java
Code
2,972
9,637
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you 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. */ package org.apache.pinot.core.startree; import com.google.common.collect.BiMap; import com.google.common.collect.HashBiMap; import it.unimi.dsi.fastutil.ints.Int2ObjectMap; import java.io.BufferedOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.RandomAccessFile; import java.nio.channels.FileChannel; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; import org.apache.commons.io.FileUtils; import org.apache.commons.lang3.tuple.ImmutablePair; import org.apache.commons.lang3.tuple.Pair; import org.apache.pinot.common.data.FieldSpec; import org.apache.pinot.common.data.MetricFieldSpec; import org.apache.pinot.common.data.Schema; import org.apache.pinot.common.utils.Pairs.IntPair; import org.apache.pinot.core.data.GenericRow; import org.apache.pinot.core.segment.creator.ColumnIndexCreationInfo; import org.apache.pinot.core.segment.creator.impl.V1Constants; import org.apache.pinot.core.segment.memory.PinotDataBuffer; import org.apache.pinot.core.startree.StarTreeBuilderUtils.TreeNode; import org.apache.pinot.core.startree.hll.HllUtil; import org.joda.time.DateTime; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * Uses file to build the star tree. Each row is divided into dimension and metrics. Time is added * to dimension list. * We use the split order to build the tree. In most cases, split order will be ranked depending on * the cardinality (descending order). * Time column will be excluded or last entry in split order irrespective of its cardinality * This is a recursive algorithm where we branch on one dimension at every level. * <b>Psuedo algo</b> * <code> * * build(){ * let table(1,N) consists of N input rows * table.sort(1,N) //sort the table on all dimensions, according to split order * constructTree(table, 0, N, 0); * } * constructTree(table,start,end, level){ * splitDimensionName = dimensionsSplitOrder[level] * groupByResult<dimName, length> = table.groupBy(dimensionsSplitOrder[level]); //returns the number of rows for each value in splitDimension * int rangeStart = 0; * for each ( entry<dimName,length> groupByResult){ * if(entry.length > minThreshold){ * constructTree(table, rangeStart, rangeStart + entry.length, level +1); * } * rangeStart = rangeStart + entry.length; * updateStarTree() //add new child * } * * //create a star tree node * * aggregatedRows = table.uniqueAfterRemovingAttributeAndAggregateMetrics(start,end, splitDimensionName); * for(each row in aggregatedRows_ * table.add(row); * if(aggregateRows.size > minThreshold) { * table.sort(end, end + aggregatedRows.size); * constructStarTree(table, end, end + aggregatedRows.size, level +1); * } * } * </code> */ public class OffHeapStarTreeBuilder implements StarTreeBuilder { private static final Logger LOGGER = LoggerFactory.getLogger(OffHeapStarTreeBuilder.class); // If the temporary buffer needed is larger than 500M, use MMAP, otherwise use DIRECT private static final long MMAP_SIZE_THRESHOLD = 500_000_000; private File _tempDir; private File _dataFile; private BufferedOutputStream _outputStream; private Schema _schema; private List<MetricFieldSpec> _metricFieldSpecs; private List<Integer> _dimensionsSplitOrder; private Set<Integer> _skipStarNodeCreationDimensions; private Set<Integer> _skipMaterializationDimensions; private int _skipMaterializationCardinalityThreshold; private int _maxNumLeafRecords; private boolean _excludeSkipMaterializationDimensionsForStarTreeIndex; private int _numRawDocs; private int _numAggregatedDocs; private TreeNode _rootNode; private int _numNodes; // Dimensions private int _numDimensions; private final List<String> _dimensionNames = new ArrayList<>(); private final List<Object> _dimensionStarValues = new ArrayList<>(); private final List<BiMap<Object, Integer>> _dimensionDictionaries = new ArrayList<>(); private int _dimensionSize; // Metrics private int _numMetrics; private final List<String> _metricNames = new ArrayList<>(); private int _metricSize; private long _docSizeLong; private int[] _sortOrder; // Store data tables that need to be closed in close() private final Set<StarTreeDataTable> _dataTablesToClose = new HashSet<>(); @Override public void init(StarTreeBuilderConfig builderConfig) throws IOException { _tempDir = builderConfig.getOutDir(); if (_tempDir == null) { _tempDir = new File(FileUtils.getTempDirectory(), V1Constants.STAR_TREE_INDEX_DIR + "_" + DateTime.now()); } FileUtils.forceMkdir(_tempDir); LOGGER.info("Star tree temporary directory: {}", _tempDir); _dataFile = new File(_tempDir, "star-tree.buf"); LOGGER.info("Star tree data file: {}", _dataFile); _outputStream = new BufferedOutputStream(new FileOutputStream(_dataFile)); _schema = builderConfig.getSchema(); _metricFieldSpecs = _schema.getMetricFieldSpecs(); _skipMaterializationCardinalityThreshold = builderConfig.getSkipMaterializationCardinalityThreshold(); _maxNumLeafRecords = builderConfig.getMaxNumLeafRecords(); _excludeSkipMaterializationDimensionsForStarTreeIndex = builderConfig.isExcludeSkipMaterializationDimensionsForStarTreeIndex(); // Dimension fields for (FieldSpec fieldSpec : _schema.getAllFieldSpecs()) { // Count all fields that are not metrics as dimensions if (fieldSpec.getFieldType() != FieldSpec.FieldType.METRIC) { String dimensionName = fieldSpec.getName(); _numDimensions++; _dimensionNames.add(dimensionName); _dimensionStarValues.add(fieldSpec.getDefaultNullValue()); _dimensionDictionaries.add(HashBiMap.create()); } } _dimensionSize = _numDimensions * Integer.BYTES; // Convert string based config to index based config List<String> dimensionsSplitOrder = builderConfig.getDimensionsSplitOrder(); if (dimensionsSplitOrder != null) { _dimensionsSplitOrder = new ArrayList<>(dimensionsSplitOrder.size()); for (String dimensionName : dimensionsSplitOrder) { _dimensionsSplitOrder.add(_dimensionNames.indexOf(dimensionName)); } } Set<String> skipStarNodeCreationDimensions = builderConfig.getSkipStarNodeCreationDimensions(); if (skipStarNodeCreationDimensions != null) { _skipStarNodeCreationDimensions = getDimensionIdSet(skipStarNodeCreationDimensions); } Set<String> skipMaterializationDimensions = builderConfig.getSkipMaterializationDimensions(); if (skipMaterializationDimensions != null) { _skipMaterializationDimensions = getDimensionIdSet(skipMaterializationDimensions); } // Metric fields // NOTE: the order of _metricNames should be the same as _metricFieldSpecs for (MetricFieldSpec metricFieldSpec : _metricFieldSpecs) { _numMetrics++; _metricNames.add(metricFieldSpec.getName()); _metricSize += metricFieldSpec.getFieldSize(); } LOGGER.info("Dimension Names: {}", _dimensionNames); LOGGER.info("Metric Names: {}", _metricNames); _docSizeLong = _dimensionSize + _metricSize; // Initialize the root node _rootNode = new TreeNode(); _numNodes++; } private Set<Integer> getDimensionIdSet(Set<String> dimensionNameSet) { Set<Integer> dimensionIdSet = new HashSet<>(dimensionNameSet.size()); for (int i = 0; i < _numDimensions; i++) { if (dimensionNameSet.contains(_dimensionNames.get(i))) { dimensionIdSet.add(i); } } return dimensionIdSet; } @Override public void append(GenericRow row) throws IOException { // Dimensions DimensionBuffer dimensions = new DimensionBuffer(_numDimensions); for (int i = 0; i < _numDimensions; i++) { String dimensionName = _dimensionNames.get(i); Object dimensionValue = row.getValue(dimensionName); BiMap<Object, Integer> dimensionDictionary = _dimensionDictionaries.get(i); Integer dictId = dimensionDictionary.get(dimensionValue); if (dictId == null) { dictId = dimensionDictionary.size(); dimensionDictionary.put(dimensionValue, dictId); } dimensions.setDictId(i, dictId); } // Metrics Object[] metricValues = new Object[_numMetrics]; for (int i = 0; i < _numMetrics; i++) { String metricName = _metricNames.get(i); Object metricValue = row.getValue(metricName); if (_metricFieldSpecs.get(i).getDerivedMetricType() == MetricFieldSpec.DerivedMetricType.HLL) { // Convert HLL field from string format to HyperLogLog metricValues[i] = HllUtil.convertStringToHll((String) metricValue); } else { // No conversion for standard data types metricValues[i] = metricValue; } } MetricBuffer metrics = new MetricBuffer(metricValues, _metricFieldSpecs); appendToRawBuffer(dimensions, metrics); } private void appendToRawBuffer(DimensionBuffer dimensions, MetricBuffer metrics) throws IOException { appendToBuffer(dimensions, metrics); _numRawDocs++; } private void appendToAggBuffer(DimensionBuffer dimensions, MetricBuffer metrics) throws IOException { appendToBuffer(dimensions, metrics); _numAggregatedDocs++; } private void appendToBuffer(DimensionBuffer dimensions, MetricBuffer metrics) throws IOException { _outputStream.write(dimensions.toBytes(), 0, _dimensionSize); _outputStream.write(metrics.toBytes(_metricSize), 0, _metricSize); } @Override public void build() throws IOException { // From this point, all raw documents have been appended _outputStream.flush(); if (_skipMaterializationDimensions == null) { _skipMaterializationDimensions = computeDefaultDimensionsToSkipMaterialization(); } // For default split order, give preference to skipMaterializationForDimensions. // For user-defined split order, give preference to split-order. if (_dimensionsSplitOrder == null || _dimensionsSplitOrder.isEmpty()) { _dimensionsSplitOrder = computeDefaultSplitOrder(); } else { _skipMaterializationDimensions.removeAll(_dimensionsSplitOrder); } LOGGER.info("Split Order: {}", _dimensionsSplitOrder); LOGGER.info("Skip Materialization Dimensions: {}", _skipMaterializationDimensions); // Compute the sort order // Add dimensions in the split order first List<Integer> sortOrderList = new ArrayList<>(_dimensionsSplitOrder); // Add dimensions that are not part of dimensionsSplitOrder or skipMaterializationForDimensions for (int i = 0; i < _numDimensions; i++) { if (!_dimensionsSplitOrder.contains(i) && !_skipMaterializationDimensions.contains(i)) { sortOrderList.add(i); } } int numDimensionsInSortOrder = sortOrderList.size(); _sortOrder = new int[numDimensionsInSortOrder]; for (int i = 0; i < numDimensionsInSortOrder; i++) { _sortOrder[i] = sortOrderList.get(i); } long start = System.currentTimeMillis(); if (!_skipMaterializationDimensions.isEmpty() && _excludeSkipMaterializationDimensionsForStarTreeIndex) { // Remove the skip materialization dimensions removeSkipMaterializationDimensions(); // Recursively construct the star tree constructStarTree(_rootNode, _numRawDocs, _numRawDocs + _numAggregatedDocs, 0); } else { // Sort the documents try (StarTreeDataTable dataTable = new StarTreeDataTable(PinotDataBuffer .mapFile(_dataFile, false, 0, _dataFile.length(), PinotDataBuffer.NATIVE_ORDER, "OffHeapStarTreeBuilder#build: data buffer"), _dimensionSize, _metricSize, 0)) { dataTable.sort(0, _numRawDocs, _sortOrder); } // Recursively construct the star tree constructStarTree(_rootNode, 0, _numRawDocs, 0); } splitLeafNodesOnTimeColumn(); // Create aggregate rows for all nodes in the tree createAggregatedDocForAllNodes(); long end = System.currentTimeMillis(); LOGGER.info("Took {}ms to build star tree index with {} raw documents and {} aggregated documents", (end - start), _numRawDocs, _numAggregatedDocs); } private void removeSkipMaterializationDimensions() throws IOException { try (StarTreeDataTable dataTable = new StarTreeDataTable(PinotDataBuffer .mapFile(_dataFile, false, 0, _dataFile.length(), PinotDataBuffer.NATIVE_ORDER, "OffHeapStarTreeBuilder#removeSkipMaterializationDimensions: data buffer"), _dimensionSize, _metricSize, 0)) { dataTable.sort(0, _numRawDocs, _sortOrder); Iterator<Pair<byte[], byte[]>> iterator = dataTable.iterator(0, _numRawDocs); DimensionBuffer currentDimensions = null; MetricBuffer currentMetrics = null; while (iterator.hasNext()) { Pair<byte[], byte[]> next = iterator.next(); byte[] dimensionBytes = next.getLeft(); DimensionBuffer dimensions = DimensionBuffer.fromBytes(dimensionBytes); MetricBuffer metrics = MetricBuffer.fromBytes(next.getRight(), _metricFieldSpecs); for (int i = 0; i < _numDimensions; i++) { if (_skipMaterializationDimensions.contains(i)) { dimensions.setDictId(i, StarTreeNode.ALL); } } if (currentDimensions == null) { currentDimensions = dimensions; currentMetrics = metrics; } else { if (currentDimensions.hasSameBytes(dimensionBytes)) { currentMetrics.aggregate(metrics); } else { appendToAggBuffer(currentDimensions, currentMetrics); currentDimensions = dimensions; currentMetrics = metrics; } } } appendToAggBuffer(currentDimensions, currentMetrics); } _outputStream.flush(); } private void createAggregatedDocForAllNodes() throws IOException { try (StarTreeDataTable dataTable = new StarTreeDataTable(PinotDataBuffer .mapFile(_dataFile, true, 0, _dataFile.length(), PinotDataBuffer.NATIVE_ORDER, "OffHeapStarTreeBuilder#createAggregatedDocForAllNodes: data buffer"), _dimensionSize, _metricSize, 0)) { DimensionBuffer dimensions = new DimensionBuffer(_numDimensions); for (int i = 0; i < _numDimensions; i++) { dimensions.setDictId(i, StarTreeNode.ALL); } createAggregatedDocForAllNodesHelper(dataTable, _rootNode, dimensions); } _outputStream.flush(); } private MetricBuffer createAggregatedDocForAllNodesHelper(StarTreeDataTable dataTable, TreeNode node, DimensionBuffer dimensions) throws IOException { MetricBuffer aggregatedMetrics = null; if (node._children == null) { // Leaf node Iterator<Pair<byte[], byte[]>> iterator = dataTable.iterator(node._startDocId, node._endDocId); Pair<byte[], byte[]> first = iterator.next(); aggregatedMetrics = MetricBuffer.fromBytes(first.getRight(), _metricFieldSpecs); while (iterator.hasNext()) { Pair<byte[], byte[]> next = iterator.next(); MetricBuffer metricBuffer = MetricBuffer.fromBytes(next.getRight(), _metricFieldSpecs); aggregatedMetrics.aggregate(metricBuffer); } } else { // Non-leaf node int childDimensionId = node._childDimensionId; for (Map.Entry<Integer, TreeNode> entry : node._children.entrySet()) { int childDimensionValue = entry.getKey(); TreeNode child = entry.getValue(); dimensions.setDictId(childDimensionId, childDimensionValue); MetricBuffer childAggregatedMetrics = createAggregatedDocForAllNodesHelper(dataTable, child, dimensions); // Skip star node value when computing aggregate for the parent if (childDimensionValue != StarTreeNode.ALL) { if (aggregatedMetrics == null) { aggregatedMetrics = childAggregatedMetrics; } else { aggregatedMetrics.aggregate(childAggregatedMetrics); } } } dimensions.setDictId(childDimensionId, StarTreeNode.ALL); } node._aggregatedDocId = _numRawDocs + _numAggregatedDocs; appendToAggBuffer(dimensions, aggregatedMetrics); return aggregatedMetrics; } /** * Split the leaf nodes on time column if we have not split on time-column name yet, and time column is still * preserved (i.e. not replaced by StarTreeNode.all()). * <p>The method visits each leaf node does the following: * <ul> * <li>Re-order the documents under the leaf node based on time column</li> * <li>Create children nodes for each time value under this leaf node</li> * </ul> */ private void splitLeafNodesOnTimeColumn() throws IOException { String timeColumnName = _schema.getTimeColumnName(); if (timeColumnName != null) { int timeColumnId = _dimensionNames.indexOf(timeColumnName); if (!_skipMaterializationDimensions.contains(timeColumnId) && !_dimensionsSplitOrder.contains(timeColumnId)) { try (StarTreeDataTable dataTable = new StarTreeDataTable(PinotDataBuffer .mapFile(_dataFile, false, 0, _dataFile.length(), PinotDataBuffer.NATIVE_ORDER, "OffHeapStarTreeBuilder#splitLeafNodesOnTimeColumn: data buffer"), _dimensionSize, _metricSize, 0)) { splitLeafNodesOnTimeColumnHelper(dataTable, _rootNode, 0, timeColumnId); } } } } private void splitLeafNodesOnTimeColumnHelper(StarTreeDataTable dataTable, TreeNode node, int level, int timeColumnId) { if (node._children == null) { // Leaf node int startDocId = node._startDocId; int endDocId = node._endDocId; dataTable.sort(startDocId, endDocId, getNewSortOrder(timeColumnId, level)); Int2ObjectMap<IntPair> timeColumnRangeMap = dataTable.groupOnDimension(startDocId, endDocId, timeColumnId); node._childDimensionId = timeColumnId; Map<Integer, TreeNode> children = new HashMap<>(timeColumnRangeMap.size()); node._children = children; for (Int2ObjectMap.Entry<IntPair> entry : timeColumnRangeMap.int2ObjectEntrySet()) { int timeValue = entry.getIntKey(); IntPair range = entry.getValue(); TreeNode child = new TreeNode(); _numNodes++; children.put(timeValue, child); child._dimensionId = timeColumnId; child._dimensionValue = timeValue; child._startDocId = range.getLeft(); child._endDocId = range.getRight(); } } else { // Non-leaf node for (TreeNode child : node._children.values()) { splitLeafNodesOnTimeColumnHelper(dataTable, child, level + 1, timeColumnId); } } } /** * Move the value in the sort order to the new index, keep the order of other values the same. */ private int[] getNewSortOrder(int value, int newIndex) { int length = _sortOrder.length; int[] newSortOrder = new int[length]; int sortOrderIndex = 0; for (int i = 0; i < length; i++) { if (i == newIndex) { newSortOrder[i] = value; } else { if (_sortOrder[sortOrderIndex] == value) { sortOrderIndex++; } newSortOrder[i] = _sortOrder[sortOrderIndex++]; } } return newSortOrder; } private Set<Integer> computeDefaultDimensionsToSkipMaterialization() { Set<Integer> skipDimensions = new HashSet<>(); for (int i = 0; i < _numDimensions; i++) { if (_dimensionDictionaries.get(i).size() > _skipMaterializationCardinalityThreshold) { skipDimensions.add(i); } } return skipDimensions; } private List<Integer> computeDefaultSplitOrder() { List<Integer> defaultSplitOrder = new ArrayList<>(); // Sort on all non-time dimensions that are not skipped in descending order Set<String> timeDimensions = new HashSet<>(_schema.getDateTimeNames()); String timeColumnName = _schema.getTimeColumnName(); if (timeColumnName != null) { timeDimensions.add(timeColumnName); } for (int i = 0; i < _numDimensions; i++) { if (!_skipMaterializationDimensions.contains(i) && !timeDimensions.contains(_dimensionNames.get(i))) { defaultSplitOrder.add(i); } } defaultSplitOrder.sort((o1, o2) -> { // Descending order return _dimensionDictionaries.get(o2).size() - _dimensionDictionaries.get(o1).size(); }); return defaultSplitOrder; } private void constructStarTree(TreeNode node, int startDocId, int endDocId, int level) throws IOException { if (level == _dimensionsSplitOrder.size()) { return; } int splitDimensionId = _dimensionsSplitOrder.get(level); LOGGER.debug("Building tree at level: {} from startDoc: {} endDocId: {} splitting on dimension id: {}", level, startDocId, endDocId, splitDimensionId); int numDocs = endDocId - startDocId; Int2ObjectMap<IntPair> dimensionRangeMap; try (StarTreeDataTable dataTable = new StarTreeDataTable(PinotDataBuffer .mapFile(_dataFile, true, startDocId * _docSizeLong, numDocs * _docSizeLong, PinotDataBuffer.NATIVE_ORDER, "OffHeapStarTreeBuilder#constructStarTree: data buffer"), _dimensionSize, _metricSize, startDocId)) { dimensionRangeMap = dataTable.groupOnDimension(startDocId, endDocId, splitDimensionId); } LOGGER.debug("Group stats:{}", dimensionRangeMap); node._childDimensionId = splitDimensionId; // Reserve one space for star node Map<Integer, TreeNode> children = new HashMap<>(dimensionRangeMap.size() + 1); node._children = children; for (Int2ObjectMap.Entry<IntPair> entry : dimensionRangeMap.int2ObjectEntrySet()) { int childDimensionValue = entry.getIntKey(); TreeNode child = new TreeNode(); _numNodes++; children.put(childDimensionValue, child); // The range pair value is the relative value to the start document id IntPair range = dimensionRangeMap.get(childDimensionValue); int childStartDocId = range.getLeft(); child._startDocId = childStartDocId; int childEndDocId = range.getRight(); child._endDocId = childEndDocId; if (childEndDocId - childStartDocId > _maxNumLeafRecords) { constructStarTree(child, childStartDocId, childEndDocId, level + 1); } } // Directly return if we don't need to create star-node if (_skipStarNodeCreationDimensions != null && _skipStarNodeCreationDimensions.contains(splitDimensionId)) { return; } // Create star node TreeNode starChild = new TreeNode(); _numNodes++; children.put(StarTreeNode.ALL, starChild); starChild._dimensionId = splitDimensionId; starChild._dimensionValue = StarTreeNode.ALL; Iterator<Pair<DimensionBuffer, MetricBuffer>> iterator = getUniqueCombinations(startDocId, endDocId, splitDimensionId); int starChildStartDocId = _numRawDocs + _numAggregatedDocs; while (iterator.hasNext()) { Pair<DimensionBuffer, MetricBuffer> next = iterator.next(); DimensionBuffer dimensions = next.getLeft(); MetricBuffer metrics = next.getRight(); appendToAggBuffer(dimensions, metrics); } _outputStream.flush(); int starChildEndDocId = _numRawDocs + _numAggregatedDocs; starChild._startDocId = starChildStartDocId; starChild._endDocId = starChildEndDocId; if (starChildEndDocId - starChildStartDocId > _maxNumLeafRecords) { constructStarTree(starChild, starChildStartDocId, starChildEndDocId, level + 1); } } /** * Get the unique combinations after removing a specified dimension. * <p>Here we assume the data file is already sorted. * <p>Aggregates the metrics for each unique combination. */ private Iterator<Pair<DimensionBuffer, MetricBuffer>> getUniqueCombinations(final int startDocId, final int endDocId, int dimensionIdToRemove) throws IOException { long tempBufferSize = (endDocId - startDocId) * _docSizeLong; PinotDataBuffer tempBuffer; if (tempBufferSize > MMAP_SIZE_THRESHOLD) { // MMAP File tempFile = new File(_tempDir, startDocId + "_" + endDocId + ".unique.tmp"); try (FileChannel src = new RandomAccessFile(_dataFile, "r").getChannel(); FileChannel dest = new RandomAccessFile(tempFile, "rw").getChannel()) { org.apache.pinot.common.utils.FileUtils.transferBytes(src, startDocId * _docSizeLong, tempBufferSize, dest); } tempBuffer = PinotDataBuffer.mapFile(tempFile, false, 0, tempBufferSize, PinotDataBuffer.NATIVE_ORDER, "OffHeapStarTreeBuilder#getUniqueCombinations: temp buffer"); } else { // DIRECT tempBuffer = PinotDataBuffer .loadFile(_dataFile, startDocId * _docSizeLong, tempBufferSize, PinotDataBuffer.NATIVE_ORDER, "OffHeapStarTreeBuilder#getUniqueCombinations: temp buffer"); } final StarTreeDataTable dataTable = new StarTreeDataTable(tempBuffer, _dimensionSize, _metricSize, startDocId); _dataTablesToClose.add(dataTable); // Need to set skip materialization dimensions value to ALL before sorting if (!_skipMaterializationDimensions.isEmpty() && !_excludeSkipMaterializationDimensionsForStarTreeIndex) { for (int dimensionIdToSkip : _skipMaterializationDimensions) { dataTable.setDimensionValue(dimensionIdToSkip, StarTreeNode.ALL); } } dataTable.setDimensionValue(dimensionIdToRemove, StarTreeNode.ALL); dataTable.sort(startDocId, endDocId, _sortOrder); return new Iterator<Pair<DimensionBuffer, MetricBuffer>>() { final Iterator<Pair<byte[], byte[]>> _iterator = dataTable.iterator(startDocId, endDocId); DimensionBuffer _currentDimensions; MetricBuffer _currentMetrics; boolean _hasNext = true; @Override public boolean hasNext() { return _hasNext; } @Override public Pair<DimensionBuffer, MetricBuffer> next() { while (_iterator.hasNext()) { Pair<byte[], byte[]> next = _iterator.next(); byte[] dimensionBytes = next.getLeft(); MetricBuffer metrics = MetricBuffer.fromBytes(next.getRight(), _metricFieldSpecs); if (_currentDimensions == null) { _currentDimensions = DimensionBuffer.fromBytes(dimensionBytes); _currentMetrics = metrics; } else { if (_currentDimensions.hasSameBytes(dimensionBytes)) { _currentMetrics.aggregate(metrics); } else { ImmutablePair<DimensionBuffer, MetricBuffer> ret = new ImmutablePair<>(_currentDimensions, _currentMetrics); _currentDimensions = DimensionBuffer.fromBytes(dimensionBytes); _currentMetrics = metrics; return ret; } } } _hasNext = false; closeDataTable(dataTable); return new ImmutablePair<>(_currentDimensions, _currentMetrics); } @Override public void remove() { throw new UnsupportedOperationException(); } }; } @Override public Iterator<GenericRow> iterator(final int startDocId, final int endDocId) throws IOException { final StarTreeDataTable dataTable = new StarTreeDataTable(PinotDataBuffer .mapFile(_dataFile, true, startDocId * _docSizeLong, (endDocId - startDocId) * _docSizeLong, PinotDataBuffer.NATIVE_ORDER, "OffHeapStarTreeBuilder#iterator: data buffer"), _dimensionSize, _metricSize, startDocId); _dataTablesToClose.add(dataTable); return new Iterator<GenericRow>() { private final Iterator<Pair<byte[], byte[]>> _iterator = dataTable.iterator(startDocId, endDocId); @Override public boolean hasNext() { boolean hasNext = _iterator.hasNext(); if (!hasNext) { closeDataTable(dataTable); } return hasNext; } @Override public GenericRow next() { Pair<byte[], byte[]> pair = _iterator.next(); DimensionBuffer dimensions = DimensionBuffer.fromBytes(pair.getLeft()); MetricBuffer metrics = MetricBuffer.fromBytes(pair.getRight(), _metricFieldSpecs); return toGenericRow(dimensions, metrics); } @Override public void remove() { throw new UnsupportedOperationException(); } }; } private void closeDataTable(StarTreeDataTable dataTable) { try { dataTable.close(); } catch (IOException e) { throw new RuntimeException(e); } _dataTablesToClose.remove(dataTable); } private GenericRow toGenericRow(DimensionBuffer dimensions, MetricBuffer metrics) { GenericRow row = new GenericRow(); Map<String, Object> map = new HashMap<>(); for (int i = 0; i < _numDimensions; i++) { String dimensionName = _dimensionNames.get(i); int dictId = dimensions.getDictId(i); if (dictId == StarTreeNode.ALL) { map.put(dimensionName, _dimensionStarValues.get(i)); } else { map.put(dimensionName, _dimensionDictionaries.get(i).inverse().get(dictId)); } } for (int i = 0; i < _numMetrics; i++) { map.put(_metricNames.get(i), metrics.getValueConformToDataType(i)); } row.init(map); return row; } @Override public void serializeTree(File starTreeFile, Map<String, ColumnIndexCreationInfo> indexCreationInfoMap) throws IOException { // Update the star tree with the segment dictionary updateTree(_rootNode, indexCreationInfoMap); // Serialize the star tree into a file StarTreeBuilderUtils .serializeTree(starTreeFile, _rootNode, _dimensionNames.toArray(new String[_numDimensions]), _numNodes); LOGGER.info("Finish serializing star tree into file: {}", starTreeFile); } private void updateTree(TreeNode node, Map<String, ColumnIndexCreationInfo> indexCreationInfoMap) { // Only need to update children map because the caller already updates the node Map<Integer, TreeNode> children = node._children; if (children != null) { Map<Integer, TreeNode> newChildren = new HashMap<>(children.size()); node._children = newChildren; int childDimensionId = node._childDimensionId; BiMap<Integer, Object> dimensionDictionary = _dimensionDictionaries.get(childDimensionId).inverse(); String childDimensionName = _dimensionNames.get(childDimensionId); Object segmentDictionary = indexCreationInfoMap.get(childDimensionName).getSortedUniqueElementsArray(); for (Map.Entry<Integer, TreeNode> entry : children.entrySet()) { int childDimensionValue = entry.getKey(); TreeNode childNode = entry.getValue(); int dictId = StarTreeNode.ALL; // Only need to update the value for non-star node if (childDimensionValue != StarTreeNode.ALL) { dictId = indexOf(segmentDictionary, dimensionDictionary.get(childDimensionValue)); childNode._dimensionValue = dictId; } newChildren.put(dictId, childNode); updateTree(childNode, indexCreationInfoMap); } } } /** * Helper method to binary-search the index of a given value in an array. */ private static int indexOf(Object array, Object value) { if (array instanceof int[]) { return Arrays.binarySearch((int[]) array, (Integer) value); } else if (array instanceof long[]) { return Arrays.binarySearch((long[]) array, (Long) value); } else if (array instanceof float[]) { return Arrays.binarySearch((float[]) array, (Float) value); } else if (array instanceof double[]) { return Arrays.binarySearch((double[]) array, (Double) value); } else if (array instanceof String[]) { return Arrays.binarySearch((String[]) array, value); } else { throw new IllegalStateException(); } } @Override public int getTotalRawDocumentCount() { return _numRawDocs; } @Override public int getTotalAggregateDocumentCount() { return _numAggregatedDocs; } @Override public List<String> getDimensionsSplitOrder() { List<String> dimensionsSplitOrder = new ArrayList<>(_dimensionsSplitOrder.size()); for (int dimensionId : _dimensionsSplitOrder) { dimensionsSplitOrder.add(_dimensionNames.get(dimensionId)); } return dimensionsSplitOrder; } @Override public Set<String> getSkipMaterializationDimensions() { Set<String> skipMaterializationDimensions = new HashSet<>(_skipMaterializationDimensions.size()); for (int dimensionId : _skipMaterializationDimensions) { skipMaterializationDimensions.add(_dimensionNames.get(dimensionId)); } return skipMaterializationDimensions; } @Override public List<String> getDimensionNames() { return _dimensionNames; } @Override public List<BiMap<Object, Integer>> getDimensionDictionaries() { return _dimensionDictionaries; } @Override public void close() throws IOException { _outputStream.close(); for (StarTreeDataTable dataTable : _dataTablesToClose) { dataTable.close(); } _dataTablesToClose.clear(); FileUtils.deleteDirectory(_tempDir); } }
23,654
https://github.com/luisgandrade/TCCSharpRecSys/blob/master/UnsupervisedLearning/Instance.cs
Github Open Source
Open Source
MIT
null
TCCSharpRecSys
luisgandrade
C#
Code
77
260
using Lib; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace UnsupervisedLearning { /// <summary> /// Representa uma instância (i.e., <see cref="Movie"/>) com seus respectivos atributos (i.e., <see cref="TagRelevance"/>). /// </summary> public class Instance { public Movie movie { get; private set; } public IList<TagRelevance> tag_relevances { get; private set; } public Instance(IList<TagRelevance> tag_relevances) { if (tag_relevances == null) throw new ArgumentException("tag_relevances"); this.movie = tag_relevances.Select(tr => tr.movie).Distinct().Single(); this.tag_relevances = tag_relevances.OrderBy(tr => tr.tag.id).ToList(); } } }
31,341
https://github.com/mthmulders/enterprise-beers/blob/master/frontend/app/src/pages/home.tsx
Github Open Source
Open Source
Apache-2.0
2,020
enterprise-beers
mthmulders
TypeScript
Code
21
62
import React from 'react'; const Home = () => ( <> <br /> <img src='img/Two-pints-beer-main.jpg' alt=''></img> </> ) export default Home;
39,578
https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/transforms/remapper/remapping_helper.h
Github Open Source
Open Source
Apache-2.0, LicenseRef-scancode-generic-cla, BSD-2-Clause
2,023
tensorflow
tensorflow
C++
Code
873
2,678
/* Copyright 2022 The TensorFlow Authors. All Rights Reserved. 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 TENSORFLOW_CORE_TRANSFORMS_REMAPPER_REMAPPING_HELPER_H_ #define TENSORFLOW_CORE_TRANSFORMS_REMAPPER_REMAPPING_HELPER_H_ #include <string> #include "tensorflow/core/framework/types.h" #include "tensorflow/core/transforms/utils/op_cat_helper.h" #include "tensorflow/core/transforms/utils/utils.h" namespace mlir { namespace tfg { // The following structures store info of the operations to be fused. These // are mainly used for combining operands info and attributes for a fused // operation. They are also used for some predicate functions like // `IsCpuCompatible` and `IsGpuCompatible` to check if the relevant fusion is // supported on CPU and GPU, respectively. Another reason to keep these // structures is to follow similar logics in current grappler-remapper. // TODO(intel-tf): Remove redundancies once the similar functionality is // achieved by tfg-remapper. struct ContractionBiasAdd { Operation* contraction; Operation* bias_add; }; struct ContractionBiasAddActivation { Operation* contraction; Operation* bias_add; Operation* activation; }; struct ContractionBiasAddAdd { Operation* contraction; Operation* bias_add; Operation* add; }; struct ContractionBiasAddAddActivation { Operation* contraction; Operation* bias_add; Operation* add; Operation* activation; }; struct FusedBatchNormEx { Operation* fused_batch_norm; Value side_input; Operation* activation; }; class OpPropertyHelper : public OpCatHelper { public: OpPropertyHelper() = default; explicit OpPropertyHelper(TFGraphDialect* dialect, bool onednn_enabled = false, bool xla_auto_clustering = false) : OpCatHelper(dialect), is_onednn_enabled_(onednn_enabled), is_xla_auto_clustering_enabled_(xla_auto_clustering) {} bool HasControlOperandsOrResultUsers(Operation* op) const { TFOp wrapper_op(op); bool has_ctl_operands = !(wrapper_op.getControlOperands().empty()); bool has_ctl_ret_users = !(wrapper_op.controlRet().getUsers().empty()); if (has_ctl_operands || has_ctl_ret_users) return true; else return false; } // This function is to be used for an operation that has at least 1 // non-control result. bool HasAtMostOneUserOfResult0(Operation* op) const { // All tfg operation has 1 control result. When the operation has at least 1 // non-control result, the number of results should be at least 2. return op->getNumResults() > 1 && (op->getResult(0).hasOneUse() || op->getResult(0).use_empty()); } bool IsContraction(Operation* op) const { return dialect_->IsConv2D(op) || dialect_->IsConv3D(op) || dialect_->IsDepthwiseConv2dNative(op) || dialect_->IsMatMul(op); } bool HaveSameDataType(Operation* lhs_op, Operation* rhs_op, StringRef attr_name = "T") const { auto lhs_attr = lhs_op->getAttrOfType<TypeAttr>(attr_name); auto rhs_attr = rhs_op->getAttrOfType<TypeAttr>(attr_name); if (!lhs_attr || !rhs_attr) return false; return lhs_attr == rhs_attr; } // This function is currently used by contraction ops. bool IsGpuCompatibleDataType(Operation* contraction_op, StringRef attr_name = "T") const { auto attr = contraction_op->getAttrOfType<TypeAttr>(attr_name); if (!attr) return false; Type dtype = attr.getValue(); if (dialect_->IsConv2D(contraction_op)) { return dtype.isa<Float32Type>(); } else if (dialect_->IsMatMul(contraction_op)) { return dtype.isa<Float32Type, Float64Type>(); } else { return false; } } // This function is currently used by contraction ops. bool IsCpuCompatibleDataType(Operation* contraction_op, StringRef attr_name = "T") const { auto attr = contraction_op->getAttrOfType<TypeAttr>(attr_name); if (!attr) return false; Type dtype = attr.getValue(); if (is_onednn_enabled_) { // Only contraction ops (MatMul, Conv2D, Conv3D, and // DepthwiseConv2dNative) and BatchMatMul are supported. BatchMatMul // fusions are handled differently than contraction ops. bool is_supported = IsContraction(contraction_op) || dialect_->IsAnyBatchMatMul(contraction_op); return is_supported && dtype.isa<Float32Type, BFloat16Type>(); } if (dialect_->IsConv2D(contraction_op)) { return dtype.isa<Float32Type, Float64Type>(); } else if (dialect_->IsMatMul(contraction_op)) { return dtype.isa<Float32Type>(); } else { return false; } } // This function is currently used by convolution type op bool IsGpuCompatibleDataFormat(Operation* conv_op, StringRef attr_name = "data_format") const { StringRef data_format; if (auto attr = conv_op->getAttrOfType<StringAttr>(attr_name)) { data_format = attr.getValue(); } else { return false; } if (dialect_->IsConv2D(conv_op)) { return data_format == "NHWC" || data_format == "NCHW"; } else { return false; } } // This function is currently used by convolution type op bool IsCpuCompatibleDataFormat(Operation* conv_op, StringRef attr_name = "data_format") const { StringRef data_format; if (auto attr = conv_op->getAttrOfType<StringAttr>(attr_name)) { data_format = attr.getValue(); } else { return false; } if (dialect_->IsConv2D(conv_op)) { return data_format == "NHWC" || (is_onednn_enabled_ && data_format == "NCHW"); } else if (dialect_->IsConv3D(conv_op)) { return data_format == "NDHWC" || (is_onednn_enabled_ && data_format == "NCDHW"); } else { return false; } } bool IsGpuCompatible(const ContractionBiasAddActivation& pattern) const { #if TENSORFLOW_USE_ROCM // ROCm does not support _FusedConv2D. Does it suppport _FusedMatMul? return false; #endif // The TF->XLA bridge does not support `_FusedMatMul` so we avoid creating // this op. Furthermore, XLA already does this fusion internally so there // is no true benefit from doing this optimization if XLA is going to // compile the unfused operations anyway. if (is_xla_auto_clustering_enabled_) return false; if (!util::OpHasDevice(pattern.contraction, tensorflow::DEVICE_GPU)) return false; if (!dialect_->IsRelu(pattern.activation)) return false; if (dialect_->IsMatMul(pattern.contraction)) { return IsGpuCompatibleDataType(pattern.contraction); } else { // TODO(intel-tf): Add spatial convolution support on GPU return false; } } // Currently GPU does not supprt contraction + bias_add bool IsGpuCompatible(const ContractionBiasAdd&) const { return false; } bool IsCpuCompatible(Operation* contraction_op) const { if (!util::OpHasDevice(contraction_op, tensorflow::DEVICE_CPU)) return false; if (dialect_->IsConv2D(contraction_op) || dialect_->IsConv3D(contraction_op)) { return IsCpuCompatibleDataType(contraction_op) && IsCpuCompatibleDataFormat(contraction_op); } else if (dialect_->IsMatMul(contraction_op) || dialect_->IsAnyBatchMatMul(contraction_op) || dialect_->IsDepthwiseConv2dNative(contraction_op)) { return IsCpuCompatibleDataType(contraction_op); } else { return false; } } template <typename Pattern> bool IsDeviceCompatible(const Pattern& pattern) const { // Currently, this function is used by contraction based fussion. if constexpr (!std::is_same<Pattern, ContractionBiasAdd>::value && !std::is_same<Pattern, ContractionBiasAddActivation>::value && !std::is_same<Pattern, ContractionBiasAddAdd>::value && !std::is_same<Pattern, ContractionBiasAddActivation>::value) { return false; } return IsGpuCompatible(pattern) || IsCpuCompatible(pattern.contraction); } bool isOneDNNEnabled() const { return is_onednn_enabled_; } private: bool is_onednn_enabled_; bool is_xla_auto_clustering_enabled_; }; } // namespace tfg } // namespace mlir #endif // TENSORFLOW_CORE_TRANSFORMS_REMAPPER_REMAPPING_HELPER_H_
6,213
https://github.com/SaxionMechatronics/Firmware/blob/master/src/drivers/barometer/tcbp001ta/tcbp001ta_main.cpp
Github Open Source
Open Source
BSD-3-Clause
2,020
Firmware
SaxionMechatronics
C++
Code
631
1,751
/**************************************************************************** * * Copyright (c) 2020 PX4 Development Team. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name PX4 nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * ****************************************************************************/ #include <px4_platform_common/px4_config.h> #include <px4_platform_common/getopt.h> #include "tcbp001ta.hpp" enum class TCBP001TA_BUS { SPI_INTERNAL = 0 }; namespace tcbp001ta { // list of supported bus configurations struct tcbp001ta_bus_option { TCBP001TA_BUS busid; TCBP001TA_constructor interface_constructor; uint8_t busnum; uint32_t address; TCBP001TA *dev; } bus_options[] = { { TCBP001TA_BUS::SPI_INTERNAL, &tcbp001ta_spi_interface, PX4_SPI_BUS_BARO, PX4_SPIDEV_BARO, nullptr }, }; // find a bus structure for a busid static struct tcbp001ta_bus_option *find_bus(TCBP001TA_BUS busid) { for (tcbp001ta_bus_option &bus_option : bus_options) { if (( busid == bus_option.busid) && bus_option.dev != nullptr) { return &bus_option; } } return nullptr; } static bool start_bus(tcbp001ta_bus_option &bus) { tcbp001ta::ITCBP001TA *interface = bus.interface_constructor(bus.busnum, bus.address); if ((interface == nullptr) || (interface->init() != PX4_OK)) { PX4_WARN("no device on bus %u", (unsigned)bus.busid); delete interface; return false; } TCBP001TA *dev = new TCBP001TA(interface); if (dev == nullptr) { PX4_ERR("driver allocate failed"); delete interface; return false; } if (dev->init() != PX4_OK) { PX4_ERR("driver start failed"); delete dev; // TCBP001TA deletes the interface return false; } bus.dev = dev; return true; } static int start(TCBP001TA_BUS busid) { for (tcbp001ta_bus_option &bus_option : bus_options) { if (bus_option.dev != nullptr) { // this device is already started PX4_WARN("already started"); continue; } if (bus_option.busid != busid) { // not the one that is asked for continue; } if (start_bus(bus_option)) { return PX4_OK; } } return PX4_ERROR; } static int stop(TCBP001TA_BUS busid) { tcbp001ta_bus_option *bus = find_bus(busid); if (bus != nullptr && bus->dev != nullptr) { delete bus->dev; bus->dev = nullptr; } else { PX4_WARN("driver not running"); return PX4_ERROR; } return PX4_OK; } static int status(TCBP001TA_BUS busid) { tcbp001ta_bus_option *bus = find_bus(busid); if (bus != nullptr && bus->dev != nullptr) { bus->dev->print_info(); return PX4_OK; } PX4_WARN("driver not running"); return PX4_ERROR; } static int usage() { PX4_INFO("missing command: try 'start', 'stop', 'status'"); PX4_INFO("options:"); PX4_INFO(" -X (i2c external bus)"); PX4_INFO(" -I (i2c internal bus)"); PX4_INFO(" -s (spi internal bus)"); PX4_INFO(" -S (spi external bus)"); return 0; } } // namespace extern "C" int tcbp001ta_main(int argc, char *argv[]) { int myoptind = 1; // int ch; // const char *myoptarg = nullptr; TCBP001TA_BUS busid; busid = TCBP001TA_BUS::SPI_INTERNAL; // if (myoptind >= argc) { // return tcbp001ta::usage(); // } const char *verb = argv[myoptind]; if (!strcmp(verb, "start")) { PX4_INFO("start"); return tcbp001ta::start(busid); } else if (!strcmp(verb, "stop")) { return tcbp001ta::stop(busid); } else if (!strcmp(verb, "status")) { return tcbp001ta::status(busid); } return tcbp001ta::usage(); }
48,256
https://github.com/luccluna/myportifolio/blob/master/application/views/site/alojamento/pagina.php
Github Open Source
Open Source
MIT
2,021
myportifolio
luccluna
PHP
Code
204
950
<section id="page-title" class="page-title-mini"> <div class="container clearfix"> <h1>Alojamentos</h1> <span>Everything you need to know about our Company</span> <ol class="breadcrumb"> <li class="breadcrumb-item"><a href="<?php echo base_url('') ?>">Home</a></li> <li class="breadcrumb-item"> <strong><a href="javascript:void(0)">agenda</a></strong></li> </ol> </div> </section> <section id="content"> <div class="content-wrap"> <div class="container clearfix"> <div id="posts" class="post-grid grid-container post-masonry clearfix"> <?php foreach ($alojamentos as $key => $alojamento): ?> <div class="entry clearfix"> <div class="entry-image"> <a href="<?php echo base_url('alojamento-detalhes') ?>?id=<?php echo $alojamento->id ?> "><img style=" height: 100px !important; min-height: 150px !important; max-height: 182px !important; /* width: 199px !important; */ max-width: 100%!important; object-fit: cover !important; object-position: 50% 50% !important; " class="image_fade" src="<?php echo base_url() ?>public/imagens/alojamentos/<?php echo $alojamento->imagem ?>" alt="<?php echo $alojamento->titulo ?>"></a> </div> <div class="entry-title"> <h2><a href="<?php echo base_url('alojamento-detalhes') ?>?id=<?php echo $alojamento->id ?> "><?php echo $alojamento->titulo ?></a></h2> </div> <ul class="entry-meta clearfix"> <li>Dia: <?php echo $alojamento->data ?></li> <li>Vagas: <?php echo $alojamento->vagas ?></li> </ul> <div class="entry-content"> <p><?php echo $alojamento->texto_breve ?></p> <a href="<?php echo base_url('alojamento-detalhes') ?>?id=<?php echo $alojamento->id ?> "class="more-link">Acessar</a> </div> </div> <?php endforeach ?> </div> <div class="page-load-status"> <div class="css3-spinner infinite-scroll-request"> <div class="css3-spinner-ball-pulse-sync"> <div></div> <div></div> <div></div> </div> </div> <div class="alert alert-warning center infinite-scroll-last mx-auto" style="max-width: 20rem;">End of content</div> <div class="alert alert-warning center infinite-scroll-error mx-auto" style="max-width: 20rem;">No more pages to load</div> </div> <div class="center d-none"> <a href="blog-masonry-page-2.html" class="button button-3d button-dark button-large button-rounded load-next-posts">Load more..</a> </div> </div> </div> </section>
29,157
https://github.com/touchhome/touchhome-bundle-api/blob/master/src/main/java/org/touchhome/bundle/api/ui/field/action/v1/UIInputEntity.java
Github Open Source
Open Source
MIT
2,021
touchhome-bundle-api
touchhome
Java
Code
15
61
package org.touchhome.bundle.api.ui.field.action.v1; public interface UIInputEntity { String getEntityID(); String getTitle(); String getItemType(); int getOrder(); }
29,494
https://github.com/aboutbits/react-material-icons/blob/master/src/IconCandlestickChartTwoTone.tsx
Github Open Source
Open Source
LicenseRef-scancode-unknown-license-reference, MIT
2,023
react-material-icons
aboutbits
TSX
Code
76
343
import React from 'react' import { IconProps } from './types' const IconCandlestickChartTwoTone: React.FC<IconProps> = ({ ...props }) => ( <svg xmlns="http://www.w3.org/2000/svg" enableBackground="new 0 0 24 24" viewBox="0 0 24 24" {...props} > {props.title && <title>{props.title}</title>} <g> <rect fill="none" height="24" width="24" /> </g> <g> <g> <path d="M9,4H7v2H5v12h2v2h2v-2h2V6H9V4z M9,16H7V8h2V16z" /> <rect height="8" opacity=".3" width="2" x="7" y="8" /> <rect height="3" opacity=".3" width="2" x="15" y="10" /> <path d="M19,8h-2V4h-2v4h-2v7h2v5h2v-5h2V8z M17,13h-2v-3h2V13z" /> </g> </g> </svg> ) export { IconCandlestickChartTwoTone as default }
20
https://github.com/lor6/tutorials/blob/master/patterns-modules/design-patterns-creational/src/test/java/com/baeldung/flyweight/FlyweightUnitTest.java
Github Open Source
Open Source
MIT
2,023
tutorials
lor6
Java
Code
155
420
package com.baeldung.flyweight; import java.awt.Color; import org.junit.Assert; import org.junit.Test; /** * Unit test for {@link VehicleFactory}. * * @author Donato Rimenti */ public class FlyweightUnitTest { /** * Checks that when the {@link VehicleFactory} is asked to provide two * vehicles of different colors, the objects returned are different. */ @Test public void givenDifferentFlyweightObjects_whenEquals_thenFalse() { Vehicle blackVehicle = VehicleFactory.createVehicle(Color.BLACK); Vehicle blueVehicle = VehicleFactory.createVehicle(Color.BLUE); Assert.assertNotNull("Object returned by the factory is null!", blackVehicle); Assert.assertNotNull("Object returned by the factory is null!", blueVehicle); Assert.assertNotEquals("Objects returned by the factory are equals!", blackVehicle, blueVehicle); } /** * Checks that when the {@link VehicleFactory} is asked to provide two * vehicles of the same colors, the same object is returned twice. */ @Test public void givenSameFlyweightObjects_whenEquals_thenTrue() { Vehicle blackVehicle = VehicleFactory.createVehicle(Color.BLACK); Vehicle anotherBlackVehicle = VehicleFactory.createVehicle(Color.BLACK); Assert.assertNotNull("Object returned by the factory is null!", blackVehicle); Assert.assertNotNull("Object returned by the factory is null!", anotherBlackVehicle); Assert.assertEquals("Objects returned by the factory are not equals!", blackVehicle, anotherBlackVehicle); } }
29,518
https://github.com/ScalablyTyped/SlinkyTyped/blob/master/w/webix/src/main/scala/typingsSlinky/webix/webix/ui/datafilter.scala
Github Open Source
Open Source
MIT
2,021
SlinkyTyped
ScalablyTyped
Scala
Code
166
570
package typingsSlinky.webix.webix.ui import org.scalablytyped.runtime.StringDictionary import org.scalajs.dom.raw.HTMLElement import org.scalablytyped.runtime.StObject import scala.scalajs.js import scala.scalajs.js.`|` import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSImport, JSName, JSBracketAccess} object datafilter { type columnGroup = textFilter type dateFilter = textFilter type dateRangeFilter = textFilter type datepickerFilter = textFilter type masterCheckbox = textFilter type multiComboFilter = textFilter type multiSelectFilter = textFilter type numberFilter = textFilter type selectFilter = textFilter type serverFilter = textFilter type serverMultiSelectFilter = textFilter type serverSelectFilter = textFilter type summColumn = textFilter @js.native trait textFilter extends WebixFilter { def getInputNode(node: HTMLElement): HTMLElement = js.native } object textFilter { @scala.inline def apply( getInputNode: HTMLElement => HTMLElement, getValue: HTMLElement => js.Any, refresh: (baseview, HTMLElement, js.Any) => Unit, render: (baseview, StringDictionary[js.Any]) => String, setValue: (HTMLElement, js.Any) => js.Any ): textFilter = { val __obj = js.Dynamic.literal(getInputNode = js.Any.fromFunction1(getInputNode), getValue = js.Any.fromFunction1(getValue), refresh = js.Any.fromFunction3(refresh), render = js.Any.fromFunction2(render), setValue = js.Any.fromFunction2(setValue)) __obj.asInstanceOf[textFilter] } @scala.inline implicit class textFilterMutableBuilder[Self <: textFilter] (val x: Self) extends AnyVal { @scala.inline def setGetInputNode(value: HTMLElement => HTMLElement): Self = StObject.set(x, "getInputNode", js.Any.fromFunction1(value)) } } }
31,060
https://github.com/fostor/Ginkgo/blob/master/src/Fostor.Ginkgo.Web.Mvc/Controllers/RolesController.cs
Github Open Source
Open Source
MIT
2,020
Ginkgo
fostor
C#
Code
278
1,016
using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Abp.Application.Services.Dto; using Abp.AspNetCore.Mvc.Authorization; using Fostor.Ginkgo.Authorization; using Fostor.Ginkgo.Controllers; using Fostor.Ginkgo.Roles; using Fostor.Ginkgo.Roles.Dto; using Fostor.Ginkgo.Web.Models.Roles; using System.Linq; using System.Collections.Generic; namespace Fostor.Ginkgo.Web.Controllers { //[AbpMvcAuthorize(PermissionNames.Pages_Roles)] public class RolesController : GinkgoControllerBase { private readonly IRoleAppService _roleAppService; public RolesController(IRoleAppService roleAppService) { _roleAppService = roleAppService; } public async Task<IActionResult> Index() { var roles = (await _roleAppService.GetRolesAsync(new GetRolesInput())).Items; var permissions = (await _roleAppService.GetAllPermissions()).Items; var model = new RoleListViewModel { Roles = roles, Permissions = permissions }; return View(model); } public async Task<ActionResult> EditRoleModal(int roleId) { var role = await _roleAppService.Get(new EntityDto(roleId)); var permissions = (await _roleAppService.GetAllPermissions()).Items; //修正admin登录时,admin角色的权限缓存导致权限列表显示异常 role.Permissions = await _roleAppService.GetRoleGrantedPermissionNames(role.Name); var model = new EditRoleModalViewModel { Role = role, Permissions = permissions, PermissionNodes = GetPermissionTree(permissions, role) }; return View("_EditRoleModal", model); } public async Task<ActionResult> RoleMembers(int roleId) { var role = await _roleAppService.Get(new EntityDto(roleId)); if (role != null) { ViewBag.RoleId = role.Id; ViewBag.RoleName = role.Name; } return View("_RoleUsersModal"); } private List<PermissionNodeViewModel> GetPermissionTree(IReadOnlyList<Roles.Dto.PermissionDto> permissions, RoleDto role) { List<PermissionNodeViewModel> list = new List<PermissionNodeViewModel>(); List<PermissionDto> listAll = new List<PermissionDto>(); foreach (PermissionDto p in permissions) { listAll.Add(p); } var firstLevelList = listAll.FindAll(t => t.Name.Contains(".") == false); foreach (var p in firstLevelList) { PermissionNodeViewModel pn = new PermissionNodeViewModel { Id = p.Name, Text = p.DisplayName }; pn.State.Checked = HasPermission(p, role); AddChildNode(listAll, pn, role); list.Add(pn); } return list; } void AddChildNode(List<PermissionDto> perms, PermissionNodeViewModel currentNode, RoleDto role) { var childList = perms.FindAll(t => t.Name.StartsWith(currentNode.Id + ".") && t.Name.Replace(currentNode.Id + ".", "").Contains(".") == false); foreach (var c in childList) { PermissionNodeViewModel pn = new PermissionNodeViewModel { Id = c.Name, Text = c.DisplayName }; pn.State.Checked = HasPermission(c, role); AddChildNode(perms, pn, role); currentNode.Nodes.Add(pn); } } private bool HasPermission(PermissionDto permission, RoleDto role) { return role.Permissions.Any(p => p == permission.Name); } } }
46,647
https://github.com/FidelityInternational/stratos/blob/master/src/frontend/app/features/cloud-foundry/edit-organization/edit-organization-step/edit-organization-step.component.ts
Github Open Source
Open Source
Apache-2.0
2,021
stratos
FidelityInternational
TypeScript
Code
398
1,403
import { Component, OnDestroy, OnInit } from '@angular/core'; import { AbstractControl, FormControl, FormGroup, ValidatorFn, Validators } from '@angular/forms'; import { Store } from '@ngrx/store'; import { Observable, Subscription } from 'rxjs'; import { filter, map, take, tap } from 'rxjs/operators'; import { IOrganization } from '../../../../core/cf-api.types'; import { StepOnNextFunction } from '../../../../shared/components/stepper/step/step.component'; import { PaginationMonitorFactory } from '../../../../shared/monitors/pagination-monitor.factory'; import { UpdateOrganization } from '../../../../store/actions/organization.actions'; import { AppState } from '../../../../store/app-state'; import { entityFactory, organizationSchemaKey } from '../../../../store/helpers/entity-factory'; import { getPaginationObservables } from '../../../../store/reducers/pagination-reducer/pagination-reducer.helper'; import { selectRequestInfo } from '../../../../store/selectors/api.selectors'; import { APIResource } from '../../../../store/types/api.types'; import { getActiveRouteCfOrgSpaceProvider } from '../../cf.helpers'; import { CloudFoundryEndpointService } from '../../services/cloud-foundry-endpoint.service'; import { CloudFoundryOrganizationService } from '../../services/cloud-foundry-organization.service'; const enum OrgStatus { ACTIVE = 'active', SUSPENDED = 'suspended' } @Component({ selector: 'app-edit-organization-step', templateUrl: './edit-organization-step.component.html', styleUrls: ['./edit-organization-step.component.scss'], providers: [ getActiveRouteCfOrgSpaceProvider, CloudFoundryOrganizationService ] }) export class EditOrganizationStepComponent implements OnInit, OnDestroy { fetchOrgsSub: Subscription; allOrgsInEndpoint: any; allOrgsInEndpoint$: Observable<any>; orgSubscription: Subscription; currentStatus: string; originalName: string; orgName: string; org$: Observable<IOrganization>; editOrgName: FormGroup; status: boolean; cfGuid: string; orgGuid: string; constructor( private store: Store<AppState>, private paginationMonitorFactory: PaginationMonitorFactory, private cfOrgService: CloudFoundryOrganizationService ) { this.orgGuid = cfOrgService.orgGuid; this.cfGuid = cfOrgService.cfGuid; this.status = false; this.editOrgName = new FormGroup({ orgName: new FormControl('', [<any>Validators.required, this.nameTakenValidator()]) // toggleStatus: new FormControl(false), }); this.org$ = this.cfOrgService.org$.pipe( map(o => o.entity.entity), take(1), tap(n => { this.orgName = n.name; this.originalName = n.name; this.status = n.status === OrgStatus.ACTIVE ? true : false; this.currentStatus = n.status; }) ); this.orgSubscription = this.org$.subscribe(); } nameTakenValidator = (): ValidatorFn => { return (formField: AbstractControl): { [key: string]: any } => { const nameValid = this.validate(formField.value); return !nameValid ? { 'nameTaken': { value: formField.value } } : null; }; } ngOnInit() { const action = CloudFoundryEndpointService.createGetAllOrganizations(this.cfGuid); this.allOrgsInEndpoint$ = getPaginationObservables<APIResource>( { store: this.store, action, paginationMonitor: this.paginationMonitorFactory.create( action.paginationKey, entityFactory(organizationSchemaKey) ) }, true ).entities$.pipe( filter(o => !!o), map(o => o.map(org => org.entity.name)), tap((o) => this.allOrgsInEndpoint = o) ); this.fetchOrgsSub = this.allOrgsInEndpoint$.subscribe(); } validate = (value: string = null) => { if (this.allOrgsInEndpoint) { return this.allOrgsInEndpoint .filter(o => o !== this.originalName) .indexOf(value ? value : this.orgName) === -1; } return true; } submit: StepOnNextFunction = () => { this.store.dispatch(new UpdateOrganization(this.orgGuid, this.cfGuid, { name: this.orgName, status: this.status ? OrgStatus.ACTIVE : OrgStatus.SUSPENDED })); // Update action return this.store.select(selectRequestInfo(organizationSchemaKey, this.orgGuid)).pipe( filter(o => !!o && !o.updating[UpdateOrganization.UpdateExistingOrg].busy), map(o => o.updating[UpdateOrganization.UpdateExistingOrg]), map(o => ({ success: !o.error, redirect: !o.error, message: !o.error ? '' : `Failed to update organization: ${o.message}` })) ); } ngOnDestroy(): void { this.fetchOrgsSub.unsubscribe(); } }
25,158
https://github.com/ScalablyTyped/SlinkyTyped/blob/master/c/cypress/src/main/scala/typingsSlinky/cypress/Mocha/reporters/Base/cursor.scala
Github Open Source
Open Source
MIT
2,021
SlinkyTyped
ScalablyTyped
Scala
Code
28
127
package typingsSlinky.cypress.Mocha.reporters.Base import scala.scalajs.js import scala.scalajs.js.`|` import scala.scalajs.js.annotation._ /** * ANSI TTY control sequences common among reporters. * * @see https://mochajs.org/api/module-base#.cursor */ @JSGlobal("Mocha.reporters.Base.cursor") @js.native object cursor extends js.Object
17,920
https://github.com/bytescout/ByteScout-SDK-SourceCode/blob/master/PDF Extractor SDK/VBScript/ZUGFeRD Invoice Extraction/ExtractEmbeddedFilesFromPDF.vbs
Github Open Source
Open Source
Apache-2.0
2,023
ByteScout-SDK-SourceCode
bytescout
VBScript
Code
108
302
'*******************************************************************************************' ' ' ' Download Free Evaluation Version From: https://bytescout.com/download/web-installer ' ' ' ' Also available as Web API! Get free API Key https://app.pdf.co/signup ' ' ' ' Copyright © 2017-2020 ByteScout, Inc. All rights reserved. ' ' https://www.bytescout.com ' ' https://www.pdf.co ' '*******************************************************************************************' ' Create Bytescout.PDFExtractor.AttachmentExtractor object Set AttachmentExtractor = CreateObject("Bytescout.PDFExtractor.AttachmentExtractor") AttachmentExtractor.RegistrationName = "demo" AttachmentExtractor.RegistrationKey = "demo" ' Load sample PDF document with embedded attachments AttachmentExtractor.LoadDocumentFromFile("ZUGFeRD-invoice.pdf") ' Walk through attachments and save them For i = 0 To AttachmentExtractor.Count - 1 ' Save file to current folder with original name AttachmentExtractor.Save i, AttachmentExtractor.GetFileName(i) Next WScript.Echo "Done! Click OK to open the XML invoice" Set extractor = Nothing
34,377
https://github.com/vucrr/mobile-next/blob/master/src/actions/myTrade/exchange/return.ts
Github Open Source
Open Source
MIT
null
mobile-next
vucrr
TypeScript
Code
302
924
import { getHeaders2 } from 'actions/actionHelper' import { Toast } from 'antd-mobile' import { FETCH_EXCHANGE_RETURN_INFO, FETCH_EXCHANGE_STORE_INFO, SAVE_EXCHANGE_RETURN_INFO, SAVE_EXCHANGE_TAB_SHOW, } from 'constant/index' import { GetReturnInfo, GetStore, SaveCreate } from 'interfaces/exchange' import cookies from 'js-cookie' import Router from 'next/router' import { Action, Dispatch } from 'redux' import { createAction } from 'redux-actions' import { axios, tools } from 'utils' import { createStrategyPay } from '../order/pay' // import { ClientRequest } from 'interfaces/router' export const fetchReplaceReturn = ({ query, req }: any) => async (dispatch: Dispatch<Action>) => { const url = 'node-api/trade/exchange/getReturn' const headers = getHeaders2(req) try { const { data } = await axios.post(url, { ...query }, { headers }) if (data) { dispatch(createAction<GetReturnInfo>(FETCH_EXCHANGE_RETURN_INFO)(data)) return data } } catch (err) { tools.ErrorLog(err) } } export const saveTab = ({ query }: any) => async (dispatch: Dispatch<Action>) => { const tab = query.tab return tab && dispatch(createAction(SAVE_EXCHANGE_TAB_SHOW)(tab)).payload } export const FetchStore = ({ query }: any) => async (dispatch: Dispatch<Action>) => { const url = 'node-api/trade/exchange/store' const headers = getHeaders2() try { const res = await axios.get<GetStore>(url, { params: query, headers }) return res && dispatch(createAction(FETCH_EXCHANGE_STORE_INFO)(res)).payload } catch (err) { tools.ErrorLog(err) } } export const saveReplaceReturn = ({ query }: any) => async (dispatch: Dispatch<any>) => { const url = 'node-api/trade/exchange/saveReturn' const headers = getHeaders2() try { const phoneNumber = cookies.get('phone_number') const vasParams = phoneNumber ? { vas_params: JSON.stringify({ phone_number: JSON.parse(phoneNumber) }) } : null const { data } = await axios.post(url, { ...query, ...vasParams }, { headers }) if (data) { if (data.errorMsg) { Toast.info(data.errorMsg) } else if (data.replacment_trade_no) { // 选号去除 cookies.remove('phone_number') // operation_type 1、调策略支付接口 , 2、去担保方式页面,, 3、调策略支付接口直接完成 if (data.operation_type === 2) { const url = `/mytrade/order/pay?trade_no=${data.replacment_trade_no}` await Router.push(url) } else { dispatch( createStrategyPay({ trade_no: data.replacment_trade_no, pis_code: data.pis_code, }), ) } } dispatch(createAction<SaveCreate>(SAVE_EXCHANGE_RETURN_INFO)(data)) return data } } catch (err) { tools.ErrorLog(err) } }
42,629
https://github.com/wfansh/google-ads-java/blob/master/google-ads-stubs-v10/src/main/java/com/google/ads/googleads/v10/resources/KeywordPlanCampaignProto.java
Github Open Source
Open Source
Apache-2.0
2,022
google-ads-java
wfansh
Java
Code
221
1,938
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/ads/googleads/v10/resources/keyword_plan_campaign.proto package com.google.ads.googleads.v10.resources; public final class KeywordPlanCampaignProto { private KeywordPlanCampaignProto() {} public static void registerAllExtensions( com.google.protobuf.ExtensionRegistryLite registry) { } public static void registerAllExtensions( com.google.protobuf.ExtensionRegistry registry) { registerAllExtensions( (com.google.protobuf.ExtensionRegistryLite) registry); } static final com.google.protobuf.Descriptors.Descriptor internal_static_google_ads_googleads_v10_resources_KeywordPlanCampaign_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_ads_googleads_v10_resources_KeywordPlanCampaign_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_ads_googleads_v10_resources_KeywordPlanGeoTarget_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_ads_googleads_v10_resources_KeywordPlanGeoTarget_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; } private static com.google.protobuf.Descriptors.FileDescriptor descriptor; static { java.lang.String[] descriptorData = { "\n>google/ads/googleads/v10/resources/key" + "word_plan_campaign.proto\022\"google.ads.goo" + "gleads.v10.resources\0329google/ads/googlea" + "ds/v10/enums/keyword_plan_network.proto\032" + "\034google/api/annotations.proto\032\037google/ap" + "i/field_behavior.proto\032\031google/api/resou" + "rce.proto\"\242\005\n\023KeywordPlanCampaign\022K\n\rres" + "ource_name\030\001 \001(\tB4\340A\005\372A.\n,googleads.goog" + "leapis.com/KeywordPlanCampaign\022D\n\014keywor" + "d_plan\030\t \001(\tB)\372A&\n$googleads.googleapis." + "com/KeywordPlanH\000\210\001\001\022\024\n\002id\030\n \001(\003B\003\340A\003H\001\210" + "\001\001\022\021\n\004name\030\013 \001(\tH\002\210\001\001\022J\n\022language_consta" + "nts\030\014 \003(\tB.\372A+\n)googleads.googleapis.com" + "/LanguageConstant\022g\n\024keyword_plan_networ" + "k\030\006 \001(\0162I.google.ads.googleads.v10.enums" + ".KeywordPlanNetworkEnum.KeywordPlanNetwo" + "rk\022\033\n\016cpc_bid_micros\030\r \001(\003H\003\210\001\001\022M\n\013geo_t" + "argets\030\010 \003(\01328.google.ads.googleads.v10." + "resources.KeywordPlanGeoTarget:z\352Aw\n,goo" + "gleads.googleapis.com/KeywordPlanCampaig" + "n\022Gcustomers/{customer_id}/keywordPlanCa" + "mpaigns/{keyword_plan_campaign_id}B\017\n\r_k" + "eyword_planB\005\n\003_idB\007\n\005_nameB\021\n\017_cpc_bid_" + "micros\"\201\001\n\024KeywordPlanGeoTarget\022Q\n\023geo_t" + "arget_constant\030\002 \001(\tB/\372A,\n*googleads.goo" + "gleapis.com/GeoTargetConstantH\000\210\001\001B\026\n\024_g" + "eo_target_constantB\212\002\n&com.google.ads.go" + "ogleads.v10.resourcesB\030KeywordPlanCampai" + "gnProtoP\001ZKgoogle.golang.org/genproto/go" + "ogleapis/ads/googleads/v10/resources;res" + "ources\242\002\003GAA\252\002\"Google.Ads.GoogleAds.V10." + "Resources\312\002\"Google\\Ads\\GoogleAds\\V10\\Res" + "ources\352\002&Google::Ads::GoogleAds::V10::Re" + "sourcesb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { com.google.ads.googleads.v10.enums.KeywordPlanNetworkProto.getDescriptor(), com.google.api.AnnotationsProto.getDescriptor(), com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), }); internal_static_google_ads_googleads_v10_resources_KeywordPlanCampaign_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_google_ads_googleads_v10_resources_KeywordPlanCampaign_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_ads_googleads_v10_resources_KeywordPlanCampaign_descriptor, new java.lang.String[] { "ResourceName", "KeywordPlan", "Id", "Name", "LanguageConstants", "KeywordPlanNetwork", "CpcBidMicros", "GeoTargets", "KeywordPlan", "Id", "Name", "CpcBidMicros", }); internal_static_google_ads_googleads_v10_resources_KeywordPlanGeoTarget_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_google_ads_googleads_v10_resources_KeywordPlanGeoTarget_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_ads_googleads_v10_resources_KeywordPlanGeoTarget_descriptor, new java.lang.String[] { "GeoTargetConstant", "GeoTargetConstant", }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); registry.add(com.google.api.ResourceProto.resource); registry.add(com.google.api.ResourceProto.resourceReference); com.google.protobuf.Descriptors.FileDescriptor .internalUpdateFileDescriptor(descriptor, registry); com.google.ads.googleads.v10.enums.KeywordPlanNetworkProto.getDescriptor(); com.google.api.AnnotationsProto.getDescriptor(); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) }
31,804
https://github.com/inthehand/32feet/blob/master/InTheHand.Net.Bluetooth/Sdp/ServiceAttribute.cs
Github Open Source
Open Source
MIT, LicenseRef-scancode-proprietary-license
2,023
32feet
inthehand
C#
Code
396
1,094
// 32feet.NET - Personal Area Networking for .NET // // InTheHand.Net.Bluetooth.ServiceAttribute // // Copyright (c) 2003-2022 In The Hand Ltd, All rights reserved. // This source code is licensed under the MIT License using InTheHand.Net.Bluetooth.AttributeIds; using System; namespace InTheHand.Net.Bluetooth.Sdp { /// <summary> /// Holds an attribute from an SDP service record. /// </summary> /// - /// <remarks> /// Access its SDP Data Element through the /// <see cref="P:InTheHand.Net.Bluetooth.ServiceElement.Value"/> property and read the /// data value through the methods and properties on the returned /// <see cref="T:InTheHand.Net.Bluetooth.ServiceElement"/>. /// </remarks> #if CODE_ANALYSIS [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1711:IdentifiersShouldNotHaveIncorrectSuffix")] #endif public sealed class ServiceAttribute { //-------------------------------------------------------------- readonly ServiceAttributeId m_id; readonly ServiceElement m_element; //-------------------------------------------------------------- /// <summary> /// Initializes a new instance of the <see cref="T:InTheHand.Net.Bluetooth.ServiceAttribute"/> class. /// </summary> /// - /// <param name="id">The Attribute Id as a <see cref="T:InTheHand.Net.Bluetooth.ServiceAttributeId"/>.</param> /// <param name="value">The value as a <see cref="T:InTheHand.Net.Bluetooth.ServiceElement"/>.</param> public ServiceAttribute(ServiceAttributeId id, ServiceElement value) { m_id = id; m_element = value; } /// <summary> /// Initializes a new instance of the <see cref="T:InTheHand.Net.Bluetooth.ServiceAttribute"/> class. /// </summary> /// - /// <param name="id">The Attribute Id as a <see cref="T:System.UInt16"/>.</param> /// <param name="value">The value as a <see cref="T:InTheHand.Net.Bluetooth.ServiceElement"/>.</param> public ServiceAttribute(ushort id, ServiceElement value) : this(unchecked((ServiceAttributeId)(Int16)id), value) { } //-------------------------------------------------------------- /// <summary> /// Get the Attribute Id for this attribute. /// </summary> /// - /// <remarks> /// <note >Id is a <em>unsigned</em> 32-bit integer but we use return it /// is a <em>signed</em> 32-bit integer for CLS Compliance reasons. It /// should not thus be used for ordering etc, for example 0xFFFF will sort /// before 0x0001 which is backwards. /// </note> /// </remarks> public ServiceAttributeId Id { [System.Diagnostics.DebuggerStepThrough] get { return m_id; } } /// <summary> /// Get the Attribute Id as a number, e.g. for comparison. /// </summary> /// - /// <remarks> /// <para>Property <see cref="P:Id"/> should be used as an identifier, /// but not as a number. That#x2019;s because the range is <em>unsigned</em> /// 32-bit integer but we use return it is a <em>signed</em> 32-bit integer. /// Thus an example list will sort as { 0xFFFF, 0x8001, 0x0001, 0x0302 } /// when it should sort as { 0x0001, 0x0302, 0x8001,0xFFFF } /// </para> /// </remarks> internal Int64 IdAsOrdinalNumber { get { var u32 = unchecked((UInt32)m_id); return u32; } } /// <summary> /// Get the value of this attributes as a <see cref="T:InTheHand.Net.Bluetooth.ServiceElement"/> /// </summary> public ServiceElement Value { [System.Diagnostics.DebuggerStepThrough] get { return m_element; } } }//class }
39,059
https://github.com/cameric/8weike-iOS/blob/master/Weike/UI/UIDesign.swift
Github Open Source
Open Source
AML, Info-ZIP
null
8weike-iOS
cameric
Swift
Code
91
216
// // UIDesign.swift // Weike // // Created by Weiyu Zhou on 8/2/16. // Copyright © 2016 Cameric. All rights reserved. // enum UITheme { case none case holiday } class UIDesign: NSObject { // MARK: Icons static func logo() -> UIImage { let image = UIImage(named: "logo") return image == nil ? self.defaultImage() : image! } // MARK: Third Party static func wechatLogo() -> UIImage { let image = UIImage(named: "wechat") return image == nil ? self.defaultImage() : image! } static func defaultImage() -> UIImage { return UIImage() } }
29,123
https://github.com/NedimRenesalis/demblock/blob/master/common/mail/predracun-html.php
Github Open Source
Open Source
BSD-3-Clause
null
demblock
NedimRenesalis
PHP
Code
130
348
<?php /* @var $this yii\web\View */ /* @var $user common\models\User */ /* @var $user common\models\Advert */ use yii\helpers\Url; ?> <?php $payment = "Po predračunu / uplatnicom - Banküberweisung - Payment / deposit slip"; if ($advert->payment == 3) { $payment = "Kreditna kartica - Kreditkarte - Creditcard"; } $moneyType = " KM"; if($user->language == "DE" || $user->language == "EN" ){ $moneyType = " €"; } $advertType = "Oglas prema kategoriji - Stellenanzeige i. d. Liste - Job Post inside Category"; if( $advert->type == 1){ $advertType = "Platinum oglas - Platinum-Stellenanzeige - Platinum Campaign"; }else if($advert->type == 2){ $advertType = "Izdvojeni oglas - Hervorgeh. Arbeitgeber - Featured Employer"; } ?> <center> <br> Hello <br> <br><b><?= $user->company_name; ?></b> <br> <br>Your listing is online. <br> <br> <br>Best regards <br> The DemBlock Terminal team </center>
47,411
https://github.com/lbct/scrumtrooperssc/blob/master/resources/views/sidebar/administrador.blade.php
Github Open Source
Open Source
MIT
null
scrumtrooperssc
lbct
PHP
Code
246
1,270
<!--Opciones de Administrador--> @if($usuario->tieneRol(1)) <span class="nav_title">Administrador</span> <li class="nav-item"> <router-link :to="{ name: 'AdministradorInicio' }" class="nav-link" data-toggle="offcanvas"> <i class="fas fa-fw fa-home menu-icon"></i> <span class="menu-title">Inicio</span> </router-link> </li> <li class="nav-item"> <router-link :to="{ name: 'AdministradorGestiones' }" class="nav-link" data-toggle="offcanvas"> <i class="fas fa-tasks menu-icon"></i> <span class="menu-title">Gestiones</span> </router-link> </li> <li class="nav-item"> <router-link :to="{ name: 'AdministradorFechasInscripcion' }" class="nav-link" data-toggle="offcanvas"> <i class="fas fa-calendar-day menu-icon"></i> <span class="menu-title">Fechas de Inscripción</span> </router-link> </li> <li class="nav-item"> <router-link :to="{ name: 'AdministradorAulas' }" class="nav-link" data-toggle="offcanvas"> <i class="fas fa-school menu-icon"></i> <span class="menu-title">Aulas</span> </router-link> </li> <li class="nav-item"> <router-link :to="{ name: 'AdministradorMaterias' }" class="nav-link" data-toggle="offcanvas"> <i class="fas fa-pencil-alt menu-icon"></i> <span class="menu-title">Materias</span> </router-link> </li> <li class="nav-item"> <router-link :to="{ name: 'AdministradorGruposDocentes' }" class="nav-link" data-toggle="offcanvas"> <i class="fas fa-users-cog menu-icon"></i> <span class="menu-title">Grupos Docentes</span> </router-link> </li> <li class="nav-item"> <router-link :to="{ name: 'AdministradorClases' }" class="nav-link" data-toggle="offcanvas"> <i class="fas fa-graduation-cap menu-icon"></i> <span class="menu-title">Clases</span> </router-link> </li> <li class="nav-item"> <a class="nav-link" data-toggle="collapse" href="#administrador_usuarios" aria-expanded="false" aria-controls="administrador_usuarios"> <i class="fas fa-users menu-icon"></i> <span class="menu-title">Usuarios</span> <i class="menu-arrow"></i> </a> <div class="collapse" id="administrador_usuarios"> <ul class="nav flex-column sub-menu"> <li class="nav-item"> <router-link :to="{ name: 'AdministradorAgregarUsuario' }" class="nav-link" data-toggle="offcanvas"> Añadir Usuario </router-link> </li> <li class="nav-item"> <router-link :to="{ name: 'AdministradorAdministradores' }" class="nav-link" data-toggle="offcanvas"> Administradores </router-link> </li> <li class="nav-item"> <router-link :to="{ name: 'AdministradorDocentes' }" class="nav-link" data-toggle="offcanvas"> Docentes </router-link> </li> <li class="nav-item"> <router-link :to="{ name: 'AdministradorAuxiliaresTerminal' }" class="nav-link" data-toggle="offcanvas"> Auxiliares de Terminal </router-link> </li> <li class="nav-item"> <router-link :to="{ name: 'AdministradorAuxiliaresLaboratorio' }" class="nav-link" data-toggle="offcanvas"> Auxiliares de Laboratorio </router-link> </li> <li class="nav-item"> <router-link :to="{ name: 'AdministradorEstudiantes' }" class="nav-link" data-toggle="offcanvas"> Estudiantes </router-link> </li> <li class="nav-item"> <router-link :to="{ name: 'AdministradorTodosUsuarios' }" class="nav-link" data-toggle="offcanvas"> Todos </router-link> </li> </ul> </div> </li> @endif
9,821
https://github.com/roclasi/svyChartJS/blob/master/svyChartJSExample/forms/chartJSMain.frm
Github Open Source
Open Source
MIT
2,016
svyChartJS
roclasi
Visual Basic
Code
149
1,572
customProperties:"formComponent:false", extendsID:"E8B2A839-18F1-4D54-9A85-9CB949C9841E", items:[ { extendsID:"2A5F4A4C-AB7B-4911-B94F-34313023357A", items:[ { containsFormID:"77F951EC-65FA-4D1F-936E-D3F4E5F9A18C", location:"442,485", text:"Treemap", typeid:15, uuid:"08254882-7E0F-403B-A853-97BE5B35BF03" }, { containsFormID:"A0EBB72D-85D8-4BB9-85B9-54CD44A642F9", location:"302,425", text:"Stacked Bar", typeid:15, uuid:"0D455AFF-BC08-47DF-86BE-FF510E0D7BEB" }, { containsFormID:"5A9CAA9B-BD4D-42B5-A908-138298FEC787", location:"337,440", text:"Responsive", typeid:15, uuid:"0E21DFB2-6AC9-4175-BB35-B631EE4A9DF6" }, { containsFormID:"4AB69896-951C-45D2-8FB1-799ADCAB4144", location:"113,239", text:"Donuts", typeid:15, uuid:"13660949-D6E6-4FF1-80AE-843030553780" }, { containsFormID:"7EDC5E58-F14A-464D-A191-1FCDFCAAF776", location:"237,350", text:"Custom Plugin 2", typeid:15, uuid:"2B15294E-E619-4F84-8B54-9888FE14E2C2" }, { containsFormID:"7138D8EA-AD7F-42E2-A83D-C4F40F0F9AE9", location:"51,173", text:"Bar", typeid:15, uuid:"449F9CF8-BE3F-4393-8589-CC394064C8AC" }, { containsFormID:"D02DCF44-3AAD-4384-A444-A8BA3F960A77", location:"20,140", text:"Foundset Chart", typeid:15, uuid:"4D72FBA6-E2EA-4838-A698-F8880BE436E0" }, { containsFormID:"B27D5E78-ED76-4201-A244-167EDAF66DDB", location:"175,305", text:"Pie", typeid:15, uuid:"4D88462C-01BC-4BA5-9DD5-059128571121" }, { containsFormID:"09962BA4-AF64-469D-9AD5-B2BD4039A33D", location:"191,315", text:"Pie w/ Custom Legend", typeid:15, uuid:"55849BE5-DE0D-416D-A70E-BAF9ACC74973" }, { containsFormID:"7FBEC311-34A1-4F10-A15D-F6B612585820", location:"407,470", text:"Funnel", typeid:15, uuid:"84D34676-3544-423F-AD97-32049A1C5BF6" }, { containsFormID:"05FBE711-A836-4D21-98A6-298282A78047", location:"216,333", text:"Custom Plugin 1", typeid:15, uuid:"90A4EAB7-B22F-4EC7-B141-B950FBE53550" }, { containsFormID:"E0CAEE7A-1D2D-4303-96DE-592A834C8E06", location:"372,455", text:"Custom Plugin 3", typeid:15, uuid:"9DCD11BC-0D8A-44B3-9D1B-721FEEB641A3" }, { containsFormID:"664130BB-6190-47EE-A927-BAA985182CD3", location:"82,206", text:"Bar-Line Combo", typeid:15, uuid:"B1DDB41F-91F0-4540-A33E-4E5C281BEE90" }, { containsFormID:"763E4CB6-A31E-4EE5-93D2-1346708A953C", location:"271,392", text:"Radar", typeid:15, uuid:"CE08E6FA-98D0-459D-8BDE-23C872BCBA62" }, { containsFormID:"18E82C2F-B8F3-47DD-BD01-615722BF52F6", location:"144,272", text:"Line", typeid:15, uuid:"DA0BA1E7-9742-4A4B-B34E-55FE416F44E4" }, { containsFormID:"997E4F10-820E-4F28-874F-C1925D681CBD", location:"477,500", text:"Data Labels", typeid:15, uuid:"DAEAF8F6-94A5-4678-B6AB-469069FFABCE" }, { containsFormID:"858B2A94-1D04-4EFE-A6A6-02EF24F43565", location:"254,374", text:"Polar Area", typeid:15, uuid:"F25AEC23-839D-4344-A14F-05A548841B98" } ], location:"20,110", size:"600,350", typeid:16, uuid:"E3C4C577-AEC0-4276-AC26-65E13934A2BA" } ], name:"chartJSMain", typeid:3, uuid:"B7383919-D76C-4772-9B68-62DE1CB0146C"
41,432
https://github.com/funbiscuit/pdf-convert/blob/master/src/main/java/com/funbiscuit/pdfconvert/PdfConvertCommand.java
Github Open Source
Open Source
MIT
null
pdf-convert
funbiscuit
Java
Code
441
1,303
package com.funbiscuit.pdfconvert; import me.tongfei.progressbar.ProgressBar; import me.tongfei.progressbar.ProgressBarBuilder; import me.tongfei.progressbar.ProgressBarStyle; import org.apache.pdfbox.rendering.ImageType; import org.apache.pdfbox.rendering.PDFRenderer; import picocli.CommandLine.Command; import picocli.CommandLine.Option; import picocli.CommandLine.Parameters; import javax.imageio.ImageIO; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import java.util.Optional; import java.util.concurrent.Callable; @Command(name = "pdf-convert", mixinStandardHelpOptions = true, version = "pdf-convert 0.1", description = "Converts pdf document to png images.") class PdfConvertCommand implements Callable<Integer> { ProgressBar progressBar; @Parameters(index = "0", description = "The pdf to convert.") private File file; @Option(names = {"--dpi"}, description = "300, 600, ...") private int dpi = 300; @Option(names = {"-p", "--progress"}, description = "Display progress of conversion") private boolean progress = false; @Option(names = {"--out-dir"}, description = "Where to store generated files (current directory by default)") private String outputDir = ""; @Option(names = {"-t", "--threads"}, description = "Number of threads to use for conversion") private int numThreads = Runtime.getRuntime().availableProcessors(); @Option(names = {"--page", "--pages"}, description = "Pages to convert (one of the following formats):\n" + "7\t\t- convert page 7\n" + "2:6\t\t- convert pages from 2 to 6\n" + "1:3:10\t- convert pages 1, 4, 7 and 10 (1 to 10 with step 3)\n" + "5:2:end\t- convert odd pages from 5 to the end\n" + "5:end-2\t- convert pages from 5 to the end (not including last two pages)\n" + "1,3,8,9\t- convert pages 1,3,8,9\n" + "1,5:end\t- convert page 1 and from 5 to the end (comma separated list of different formats)" ) private String pages = "1:end"; @Override public Integer call() throws Exception { long start = System.currentTimeMillis(); if (outputDir.isEmpty()) { outputDir = "."; } String filename = file.getName(); if (!filename.toLowerCase().endsWith(".pdf")) { System.out.println("Invalid pdf filename: '" + filename + "'"); return -1; } filename = filename.substring(0, filename.length() - 4); outputDir += "/" + filename + "/"; File parentDir = new File(outputDir); if (!parentDir.exists() && !parentDir.mkdirs()) { System.out.println("Can't create output directory '" + outputDir + "'"); return -1; } IntRange pageRange; try { pageRange = IntRange.of(pages); } catch (IllegalArgumentException e) { System.out.println("Invalid page range: '" + pages + "'"); return -1; } try (PdfDocProcessor docProcessor = new PdfDocProcessor(file, numThreads)) { if (progress) { progressBar = new ProgressBarBuilder() .setTaskName("Convert to PNG") .setUpdateIntervalMillis(500) .setStyle(ProgressBarStyle.ASCII).build(); docProcessor.setOnClose(progressBar::close); } docProcessor.processPages(pageRange, (page, total, document) -> { if (progressBar != null) { progressBar.maxHint(total); progressBar.step(); } PDFRenderer pdfRenderer = new PDFRenderer(document); renderPage(page, pdfRenderer) .ifPresent(img -> saveImage(img, parentDir, page + 1)); }); } double dur = (double) System.currentTimeMillis() - start; dur /= 1000; System.out.println("Conversion took: " + dur + "s"); return 0; } private Optional<BufferedImage> renderPage(int pageIndex, PDFRenderer pdfRenderer) { try { return Optional.of(pdfRenderer.renderImageWithDPI(pageIndex, dpi, ImageType.RGB)); } catch (IOException e) { return Optional.empty(); } } private void saveImage(BufferedImage image, File parentDir, int index) { try { ImageIO.write(image, "png", new File(parentDir, String.format("%d.%s", index, "png"))); } catch (IOException e) { e.printStackTrace(); } } }
26,015
https://github.com/masbicudo/Experimental-Polymethods/blob/master/Masb.Languages.Experimentals.PolyMethodic/Tokenizer/TokenType.cs
Github Open Source
Open Source
Apache-2.0
null
Experimental-Polymethods
masbicudo
C#
Code
16
65
namespace Masb.Languages.Experimentals.PolyMethodic { public enum TokenType { IdentifierOrKeyword, Number, String, Symbol, Space, EndFile, StartFile } }
45,401
https://github.com/telerik/kendo-react-accessibility/blob/master/src/components/notification.tsx
Github Open Source
Open Source
MIT
null
kendo-react-accessibility
telerik
TypeScript
Code
372
1,424
import * as React from 'react'; import { Notification, NotificationGroup } from '@progress/kendo-react-notification'; import { Fade } from '@progress/kendo-react-animation'; import '@progress/kendo-theme-default/dist/all.css'; class NotificationDemo extends React.Component<{}, {show: boolean}> { state = { show: false }; componentDidMount() { this.setState({show: true}); } onClose = () => { this.setState({show: false}); } render() { // https://github.com/telerik/kendo-themes/blob/develop/tests/visual/notification.html // tslint:disable:max-line-length const content = <>Your data has been saved. <strong>Time for beer!</strong></>; const { show } = this.state; return ( <React.Fragment> {/* top left */} <NotificationGroup style={{ top: 0, left: 0, alignItems: 'flex-start' }} > <Notification>{content}</Notification> <Fade enter={true} exit={true}> {show && <Notification closable={true} onClose={this.onClose} type={{style: 'success', icon: true}}>{content}</Notification>} </Fade> <Notification type={{style: 'success', icon: true}}>{content}</Notification> <Notification type={{style: 'error', icon: true}}>{content}</Notification> <Notification type={{style: 'info', icon: true}}>{content}</Notification> <Notification type={{style: 'warning', icon: true}}>{content}</Notification> </NotificationGroup> {/* bottom left */} <NotificationGroup style={{ left: 0, bottom: 0, alignItems: 'flex-start' }} > <Notification>{content}</Notification> {show && <Notification closable={true} onClose={this.onClose} type={{style: 'success', icon: false}}>{content}</Notification>} <Notification type={{style: 'success', icon: true}}>{content}</Notification> <Notification type={{style: 'error', icon: true}} closable={true} >{content}</Notification> <Notification type={{style: 'info', icon: true}}>{content}</Notification> <Notification type={{style: 'warning', icon: true}}>{content}</Notification> </NotificationGroup> {/* top center */} <NotificationGroup style={{ top: 0, left: '50%', transform: 'translateX(-50%)' }} > <Notification>{content}</Notification> <Fade enter={true} exit={true}> {show && <Notification closable={true} onClose={this.onClose} type={{style: 'success', icon: false}}>{content}</Notification>} </Fade> <Notification type={{style: 'success', icon: true}}>{content}</Notification> <Notification type={{style: 'error', icon: true}} closable={true}>{content}</Notification> <Notification type={{style: 'info', icon: true}}>{content}</Notification> <Notification type={{style: 'warning', icon: true}}>{content}</Notification> </NotificationGroup> {/* bottom center */} <NotificationGroup style={{ bottom: 0, left: '50%', transform: 'translateX(-50%)' }} > <Notification type={{style: 'success', icon: true}}>{content}</Notification> <Notification type={{style: 'error', icon: true}}>{content}</Notification> {show && <Notification closable={true} onClose={this.onClose} type={{style: 'info', icon: true}}>{content}</Notification>} <Notification type={{style: 'warning', icon: true}}>{content}</Notification> <Fade enter={true} exit={true}> {show && <Notification>{content}</Notification>} </Fade> <Notification type={{style: 'success', icon: false}}>{content}</Notification> </NotificationGroup> {/* top right */} <NotificationGroup style={{ top: 0, right: 0, alignItems: 'flex-end' }} > <Notification type={{style: 'success', icon: false}}>{content}</Notification> <Notification type={{style: 'success', icon: true}}>{content}</Notification> <Fade enter={true} exit={true}> {show && <Notification closable={true} onClose={this.onClose}>{content}</Notification>} </Fade> <Notification type={{style: 'error', icon: true}}>{content}</Notification> <Notification type={{style: 'info', icon: true}}>{content}</Notification> <Notification type={{style: 'warning', icon: true}}>{content}</Notification> </NotificationGroup> {/* bottom right */} <NotificationGroup style={{ bottom: 0, right: 0, alignItems: 'flex-end' }} > <Notification>{content}</Notification> {show && <Notification closable={true} onClose={this.onClose} type={{style: 'success', icon: false}}>{content}</Notification>} <Notification type={{style: 'success', icon: true}}>{content}</Notification> <Notification type={{style: 'error', icon: true}} closable={true}>{content}</Notification> <Notification type={{style: 'info', icon: true}}>{content}</Notification> <Notification type={{style: 'warning', icon: true}}>{content}</Notification> </NotificationGroup> </React.Fragment> ); } } export default NotificationDemo;
16,379
https://github.com/michaelbmorris/MvcGrid.Net/blob/master/MichaelBrandonMorris.MvcGrid/Models/RenderingMode.cs
Github Open Source
Open Source
MIT
null
MvcGrid.Net
michaelbmorris
C#
Code
57
136
namespace MichaelBrandonMorris.MvcGrid.Models { /// <summary> /// Enum RenderingMode /// </summary> /// TODO Edit XML Comment Template for RenderingMode public enum RenderingMode { /// <summary> /// The rendering engine /// </summary> /// TODO Edit XML Comment Template for RenderingEngine RenderingEngine, /// <summary> /// The controller /// </summary> /// TODO Edit XML Comment Template for Controller Controller } }
30,549
https://github.com/VishalKandala/Cantera-1.7/blob/master/tools/doc/doxyinput/demoequil.cpp
Github Open Source
Open Source
BSD-3-Clause
null
Cantera-1.7
VishalKandala
C++
Code
37
167
#include <cantera/Cantera.h> #include <cantera/equilibrium.h> void equil_demo() { ThermoPhase* gas = newPhase("h2o2.cti","ohmech"); gas->setState_TPX(1500.0, 2.0*OneAtm, "O2:1.0, H2:3.0, AR:1.0"); equilibrate(*gas, "TP"); cout << report(*gas) << endl; } int main() { try { equil_demo(); } catch (CanteraError) { showErrors(); } }
30,928
https://github.com/cinlogic/sql-index-console/blob/master/SqlIndexConsole/FixIndexesDialog.cs
Github Open Source
Open Source
MIT
2,015
sql-index-console
cinlogic
C#
Code
185
696
using SqlIndexConsole.Data.Actions; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows.Forms; namespace SqlIndexConsole { public partial class FixIndexesDialog : Form { public IEnumerable<SqlAction> Actions { get; set; } public FixIndexesDialog() { InitializeComponent(); } private void FixNowButton_Click(object sender, EventArgs e) { DialogResult = DialogResult.OK; Close(); } private void CancelFormButton_Click(object sender, EventArgs e) { DialogResult = DialogResult.Cancel; Close(); } private void FixIndexesDialog_Load(object sender, EventArgs e) { DisplaySummary(); DisplaySqlScript(); } private void DisplaySummary() { SummaryTextBox.Text = string.Join(Environment.NewLine, Actions.Select(x => x.GetDescription())); } private void DisplaySqlScript() { var sb = new StringBuilder(); string previousDatabaseName = string.Empty; foreach (var action in Actions) { var sql = action.GetSql(); if (!string.IsNullOrWhiteSpace(sql)) { if (!action.DatabaseName.Equals(previousDatabaseName, StringComparison.OrdinalIgnoreCase)) { sb.AppendLine(string.Format("USE [{0}]", action.DatabaseName)); sb.AppendLine("GO"); sb.AppendLine(); previousDatabaseName = action.DatabaseName; } sb.AppendLine(string.Format("PRINT '{0}';", action.GetStatus().Replace("'", "''"))); sb.AppendLine(sql); sb.AppendLine("GO"); sb.AppendLine(); } } SqlScriptTextBox.Text = sb.ToString(); } private void CopySqlScriptToClipboardButton_Click(object sender, EventArgs e) { Clipboard.SetText(SqlScriptTextBox.Text); } private void CopySummaryToClipboardButton_Click(object sender, EventArgs e) { Clipboard.SetText(SummaryTextBox.Text); } private void SummaryTextBox_KeyDown(object sender, KeyEventArgs e) { if (e.Control && e.KeyCode == Keys.A) { SummaryTextBox.SelectAll(); } } private void SqlScriptTextBox_KeyDown(object sender, KeyEventArgs e) { if (e.Control && e.KeyCode == Keys.A) { SqlScriptTextBox.SelectAll(); } } } }
38,901
https://github.com/PRkudupu/Algo-python/blob/master/maps_hash/longest_consecutive_subsequence.ipynb
Github Open Source
Open Source
MIT
2,022
Algo-python
PRkudupu
Jupyter Notebook
Code
543
1,829
{ "cells": [ { "cell_type": "markdown", "metadata": { "graffitiCellId": "id_vhxf50c" }, "source": [ "### Problem Statement\n", "\n", "Given list of integers that contain numbers in random order, write a program to find the longest possible sub sequence of consecutive numbers in the array. Return this subsequence in sorted order. The solution must take O(n) time\n", "\n", "For e.g. given the list `5, 4, 7, 10, 1, 3, 55, 2`, the output should be `1, 2, 3, 4, 5`\n", "\n", "*Note- If two arrays are of equal length return the array whose index of smallest element comes first.*\n", "\n" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "graffitiCellId": "id_eaee7mz" }, "outputs": [], "source": [ "def longest_consecutive_subsequence(input_list):\n", " #Write longest consecutive subsequence solution\n", " #iterate over the list and store element in a suitable data structure\n", " #traverse / go over the data structure in a reasonable order to determine the solution\n", " element_dict = dict()\n", "\n", " for index, element in enumerate(input_list):\n", " element_dict[element] = index\n", "\n", " max_length = -1\n", " starts_at = len(input_list)\n", "\n", " for index, element in enumerate(input_list):\n", " current_starts = index\n", " element_dict[element] = -1\n", "\n", " current_count = 1\n", "\n", " # check upwards\n", " current = element + 1\n", "\n", " while current in element_dict and element_dict[current] > 0:\n", " current_count += 1\n", " element_dict[current] = -1\n", " current = current + 1\n", "\n", " # check downwards\n", " current = element - 1\n", " while current in element_dict and element_dict[current] > 0:\n", " current_starts = element_dict[current]\n", " current_count += 1\n", " element_dict[current] = -1\n", " current = current - 1\n", "\n", " if current_count >= max_length:\n", " if current_count == max_length and current_starts > starts_at:\n", " continue\n", " starts_at = current_starts\n", " max_length = current_count\n", "\n", " start_element = input_list[starts_at]\n", " return [element for element in range(start_element, start_element + max_length)]\n" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "graffitiCellId": "id_hlznh6q" }, "outputs": [], "source": [ "def test_function(test_case):\n", " output = longest_consecutive_subsequence(test_case[0])\n", " if output == test_case[1]:\n", " print(\"Pass\")\n", " else:\n", " print(\"Fail\")\n", " " ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "graffitiCellId": "id_z2y7gsr" }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Pass\n" ] } ], "source": [ "test_case_1 = [[5, 4, 7, 10, 1, 3, 55, 2], [1, 2, 3, 4, 5]]\n", "test_function(test_case_1)" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "graffitiCellId": "id_a3yf5ol" }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Pass\n" ] } ], "source": [ "test_case_2 = [[2, 12, 9, 16, 10, 5, 3, 20, 25, 11, 1, 8, 6 ], [8, 9, 10, 11, 12]]\n", "test_function(test_case_2)" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "graffitiCellId": "id_u5rs0q7" }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Pass\n" ] } ], "source": [ "test_case_3 = [[0, 1, 2, 3, 4], [0, 1, 2, 3, 4]]\n", "test_function(test_case_3)" ] }, { "cell_type": "markdown", "metadata": { "graffitiCellId": "id_et1ek54" }, "source": [ "<span class=\"graffiti-highlight graffiti-id_et1ek54-id_r15x1vg\"><i></i><button>Show Solution</button></span>" ] } ], "metadata": { "graffiti": { "firstAuthorId": "10694620118", "id": "id_alotytm", "language": "EN" }, "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.0" } }, "nbformat": 4, "nbformat_minor": 2 }
3,133
https://github.com/Norbert515/flutter_villains/blob/master/.gitignore
Github Open Source
Open Source
MIT
2,022
flutter_villains
Norbert515
Ignore List
Code
26
112
# Miscellaneous *.class *.lock *.log *.pyc *.swp .DS_Store .atom/ .buildlog/ .history .svn/ # IntelliJ related *.iml *.ipr *.iws .idea/ .dart_tool/ .packages .pub/ build/ ios/.generated/ ios/Flutter/Generated.xcconfig ios/Runner/GeneratedPluginRegistrant.*
36,487
https://github.com/NikoKalbitzer/speech_processing_v2/blob/master/nlp/locust/locustfile.py
Github Open Source
Open Source
MIT
null
speech_processing_v2
NikoKalbitzer
Python
Code
120
286
from locust import HttpLocust, TaskSet, task from random import randint instructions = [ "Play.", "Stop.", "Pause.", "Play David Bowie.", "Play Heroes from David Bowie.", "Play not David Bowie.", "Play David Bowie, Iron Maiden or Five Finger Death Punch.", "Play not David Bowie, but Iron Maiden.", "Don't play David Bowie.", "Playing David Bowie would be nice.", "My grandmother wants me to play David Bowie.", "Don't stop.", "Don't pause.", "Resume.", "Don't resume.", "Play rock music or electro house.", "Continue.", "Stop playing." ] #define simulated behavior class UserBehavior(TaskSet): @task(5) def index(self): # Make a HTTP-GET request, encode spaces (' ') with '%20' # select instructions randomly self.client.get("/" + instructions[randint(0, len(instructions)-1)].replace(" ", "%20")) class WebsiteUser(HttpLocust): task_set = UserBehavior min_wait = 5000 max_wait = 9000
3,783
https://github.com/alanmcgovern/adventofcode/blob/master/2021/csharp/day1/Program.cs
Github Open Source
Open Source
MIT
null
adventofcode
alanmcgovern
C#
Code
82
272
 var sum = File.ReadAllLines("input.txt") .Select(int.Parse) .Pairwise(2) .Sum(tuple => tuple[0] < tuple[1] ? 1 : 0); Console.WriteLine($"Answer Challenge 1: {sum}"); sum = File.ReadAllLines("input.txt") .Select(int.Parse) .Pairwise(3) .Select(triplet => triplet.Sum ()) .Pairwise(2) .Sum(pair => pair[0] < pair[1] ? 1 : 0); Console.WriteLine($"Answer Challenge 2: {sum}"); public static class Extensions { public static IEnumerable<T?[]> Pairwise<T>(this IEnumerable<T?> input, int n) { var values = new List<T?>(n); foreach (var v in input) { values.Add(v); if (values.Count == n) { yield return values.ToArray(); values.RemoveAt(0); } } } }
4,701
https://github.com/hmcts/div-case-orchestration-service/blob/master/src/main/java/uk/gov/hmcts/reform/divorce/orchestration/domain/model/pay/validation/PBAOrganisationResponse.java
Github Open Source
Open Source
MIT
2,023
div-case-orchestration-service
hmcts
Java
Code
30
148
package uk.gov.hmcts.reform.divorce.orchestration.domain.model.pay.validation; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; @Data @Builder @NoArgsConstructor @AllArgsConstructor @JsonIgnoreProperties(ignoreUnknown = true) public class PBAOrganisationResponse { @JsonProperty private OrganisationEntityResponse organisationEntityResponse; }
28,884
https://github.com/gokayay/Product-Price-Tracking-System-Client/blob/master/src/app/data.service.ts
Github Open Source
Open Source
MIT
null
Product-Price-Tracking-System-Client
gokayay
TypeScript
Code
361
1,900
import { Injectable } from '@angular/core'; import { HttpClient, HttpHeaders } from '@angular/common/http'; import { Observable } from 'rxjs'; import { Product } from './models/product.model'; import { environment } from 'environments/environment'; import { Site } from './models/site.model'; import { ProductAddress } from './models/productaddress.model'; import { Price } from './models/price.model'; import { map } from 'rxjs/operators'; import { PageProduct } from './models/page-models/page-product.model'; import { PageSite } from './models/page-models/page-site.model'; import { PageProductAddress } from './models/page-models/page-productaddress.model'; import { PagePrice } from './models/page-models/page-price.model'; @Injectable({ providedIn: 'root' }) export class DataService { constructor(private _http: HttpClient) { } httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', }), responseType: 'text' as 'json' }; // Product getProducts(page,size) :Observable<PageProduct>{ return this._http.get<PageProduct>(`${environment.productUrl}/?page=${page}&size=${size}&sort=id,ASC`).pipe( map(response => { const data = response; console.log(data); return data ; })); } getSearchingProducts(productname,page,size):Observable<PageProduct>{ return this._http.get<PageProduct>(`${environment.productSearchUrl}?product_name=${productname}&page=${page}&size=${size}&sort=id,ASC`).pipe( map(response => { const data = response; console.log(data); return data ; })); } getOneProduct(id) :Observable<Product[]>{ return this._http.get<Product[]>(`${environment.productUrl}/${id}`); } postProduct(product : Product) :Observable<Product[]>{ console.log(product); return this._http.post<Product[]>(environment.productUrl, product, this.httpOptions); } putProduct(id, Product) :Observable<Product[]>{ return this._http.put<Product[]>(`${environment.productUrl}/${id}`, Product, this.httpOptions); } deleteProduct(id) :Observable<Product[]>{ return this._http.delete<Product[]>(`${environment.productUrl}/${id}`); } // Site getSites(page,size) :Observable<PageSite>{ return this._http.get<PageSite>(`${environment.siteUrl}/?page=${page}&size=${size}&sort=id,ASC`).pipe( map(response => { const data = response; console.log(data); return data ; })); } getSearchingSites(sitename,page,size):Observable<PageSite>{ return this._http.get<PageSite>(`${environment.siteSearchUrl}?site_name=${sitename}&page=${page}&size=${size}&sort=id,ASC`).pipe( map(response => { const data = response; console.log(data); return data ; })); } getOneSite(id) :Observable<Site[]>{ return this._http.get<Site[]>(`${environment.siteUrl}/${id}`); } postSite(site : Site) :Observable<Site[]>{ console.log(site); return this._http.post<Site[]>(environment.siteUrl, site, this.httpOptions); } putSite(id,Site) :Observable<Site[]>{ return this._http.put<Site[]>(`${environment.siteUrl}/${id}`, Site ,this.httpOptions); } deleteSite(id) :Observable<Site[]>{ return this._http.delete<Site[]>(`${environment.siteUrl}/${id}`); } // ProductAddresses getProductAddresses(page,size) :Observable<PageProductAddress>{ return this._http.get<PageProductAddress>(`${environment.productAddressUrl}/?page=${page}&size=${size}&sort=id,ASC`).pipe( map(response => { const data = response; console.log(data); return data ; })); } getSearchingProductAddress(productpath,page,size):Observable<PageProductAddress>{ return this._http.get<PageProductAddress>(`${environment.productAddressSearchUrl}?product_path=${productpath}&page=${page}&size=${size}&sort=id,ASC`).pipe( map(response => { const data = response; console.log(data); return data ; })); } getOneProductAddress(id) :Observable<ProductAddress>{ return this._http.get<ProductAddress>(`${environment.productAddressUrl}/${id}`); } postProductAddress(productaddress : ProductAddress) :Observable<ProductAddress>{ console.log(productaddress); return this._http.post<ProductAddress>(environment.productAddressUrl, productaddress, this.httpOptions); } putProductAddress(id, ProductAddress) :Observable<ProductAddress[]>{ return this._http.put<ProductAddress[]>(`${environment.productAddressUrl}/${id}`, ProductAddress, this.httpOptions); } deleteProductAddress(id) :Observable<ProductAddress[]>{ return this._http.delete<ProductAddress[]>(`${environment.productAddressUrl}/${id}`); } // Price getPrices(page,size) :Observable<PagePrice>{ return this._http.get<PagePrice>(`${environment.priceUrl}/?page=${page}&size=${size}&sort=id,ASC`).pipe( map(response => { const data = response; console.log(data); return data ; })); } getSearchingPrices(productId,page,size):Observable<PagePrice>{ return this._http.get<PagePrice>(`${environment.priceByProductUrl}${productId}?page=${page}&size=${size}&sort=id,ASC`).pipe( map(response => { const data = response; console.log(data); return data ; })); } getOnePrice(id) :Observable<Price[]>{ return this._http.get<Price[]>(`${environment.priceUrl}/${id}`); } putPrice(id) :Observable<Price[]>{ return this._http.put<Price[]>(`${environment.priceUrl}/${id}`, Price); } deletePrice(id) :Observable<Price[]>{ return this._http.delete<Price[]>(`${environment.priceUrl}/${id}`); } getDailyPrices(productId,page,size):Observable<PagePrice>{ return this._http.get<PagePrice>(`${environment.dailyPrice}${productId}?page=${page}&size=${size}`).pipe( map(response => { const data = response; return data ; })); } }
30,148