code
stringlengths
3
1.01M
repo_name
stringlengths
5
116
path
stringlengths
3
311
language
stringclasses
30 values
license
stringclasses
15 values
size
int64
3
1.01M
(function (global, factory) { if (typeof define === "function" && define.amd) { define(['exports', '../node_modules/skatejs/lib/index'], factory); } else if (typeof exports !== "undefined") { factory(exports, require('../node_modules/skatejs/lib/index')); } else { var mod = { exports: {} }; factory(mod.exports, global.index); global.properties = mod.exports; } })(this, function (exports, _index) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.string = exports.number = exports.boolean = exports.array = undefined; var _index2 = _interopRequireDefault(_index); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var props = _index2.default.properties; var array = props.array; var boolean = props.boolean; var number = props.number; var string = props.string; exports.default = props; exports.array = array; exports.boolean = boolean; exports.number = number; exports.string = string; });
skatejs/kickflip
lib/properties.js
JavaScript
mit
1,069
//************************************************************************// // API "congo": Model Helpers // // Generated with goagen v0.0.1, command line: // $ goagen // --out=$(GOPATH)/src/github.com/gopheracademy/congo // --design=github.com/gopheracademy/congo/design // // The content of this file is auto-generated, DO NOT MODIFY //************************************************************************// package models import ( "github.com/goadesign/goa" "github.com/gopheracademy/congo/app" "github.com/jinzhu/gorm" "golang.org/x/net/context" "time" ) // MediaType Retrieval Functions // ListEvent returns an array of view: default. func (m *EventDB) ListEvent(ctx context.Context, tenantID int) []*app.Event { defer goa.MeasureSince([]string{"goa", "db", "event", "listevent"}, time.Now()) var native []*Event var objs []*app.Event err := m.Db.Scopes(EventFilterByTenant(tenantID, &m.Db)).Table(m.TableName()).Find(&native).Error if err != nil { goa.LogError(ctx, "error listing Event", "error", err.Error()) return objs } for _, t := range native { objs = append(objs, t.EventToEvent()) } return objs } // EventToEvent returns the Event representation of Event. func (m *Event) EventToEvent() *app.Event { event := &app.Event{} event.EndDate = m.EndDate event.ID = &m.ID event.Name = &m.Name for _, k := range m.Presentations { event.Presentations = append(event.Presentations, k.PresentationToPresentation()) } for _, k := range m.Speakers { event.Speakers = append(event.Speakers, k.SpeakerToSpeaker()) } event.StartDate = m.StartDate event.URL = m.URL return event } // OneEvent returns an array of view: default. func (m *EventDB) OneEvent(ctx context.Context, id int, tenantID int) (*app.Event, error) { defer goa.MeasureSince([]string{"goa", "db", "event", "oneevent"}, time.Now()) var native Event err := m.Db.Scopes(EventFilterByTenant(tenantID, &m.Db)).Table(m.TableName()).Preload("Presentations").Preload("Speakers").Preload("Tenant").Where("id = ?", id).Find(&native).Error if err != nil && err != gorm.ErrRecordNotFound { goa.LogError(ctx, "error getting Event", "error", err.Error()) return nil, err } view := *native.EventToEvent() return &view, err }
gopheracademy/congo
models/event_helper.go
GO
mit
2,240
package ga import ( "bytes" "crypto/hmac" "crypto/sha256" "encoding/base64" "encoding/json" "fmt" "io/ioutil" "log" "net/http" "runtime" "time" ) const ( // PkgVersion is the current version of this package. Follows major, minor and // patch conventions PkgVersion = "0.0.2" // APIVersion is the current version supported by GameAnalytics APIVersion = 2 // SDKVersion is the current version supported by GameAnalytics SDKVersion = "rest api v2" // InitRoute is the url part for the init request InitRoute = "init" // EventsRoute is the url part for events request EventsRoute = "events" // SandboxGameKey is the game key for the GameAnalytics sandbox-api SandboxGameKey = "5c6bcb5402204249437fb5a7a80a4959" // SandboxSecretKey is the secret key for the GameAnalytics sandbox-api SandboxSecretKey = "16813a12f718bc5c620f56944e1abc3ea13ccbac" ) // APIStatus is the GameAnalytics response of the init event. If Enabled is // false, the server shouldn't send any events. type APIStatus struct { Enabled bool ServerTimestamp int `json:"server_ts"` Flags []string } // Server wraps the API endpoint and allows events to be sent type Server struct { // GameKey provided by GameAnalytics for the account GameKey string `json:"-"` // SecretKey provided by GameAnalytics for the account SecretKey string `json:"-"` // URL endpoint for GameAnalytics API URL string `json:"-"` // Platform represents the platform of the SDK Platform string `json:"platform"` // OSVersion represents the Operational System Version of the SDK OSVersion string `json:"os_version"` // SDKVersion is the version of the SDK SDKVersion string `json:"sdk_version"` // Offset from GameAnalytics API and this server TimestampOffset int `json:"-"` APIStatus } // NewServer returns a server with default values for the GameAnalytics // custom SDK implementation. func NewServer(gameKey, secretKey string) *Server { return &Server{ URL: fmt.Sprintf("http://api.gameanalytics.com/v%d", APIVersion), SDKVersion: SDKVersion, OSVersion: runtime.Version(), Platform: "go", GameKey: gameKey, SecretKey: secretKey, } } // NewSandboxServer return a server with default values for the GameAnalytics // sandbox API func NewSandboxServer() *Server { return &Server{ URL: fmt.Sprintf("http://sandbox-api.gameanalytics.com/v%d", APIVersion), SDKVersion: SDKVersion, OSVersion: runtime.Version(), Platform: "go", GameKey: SandboxGameKey, SecretKey: SandboxSecretKey, } } // Start does the initial request to GameAnalytics API func (s *Server) Start() error { payload, err := json.Marshal(s) if err != nil { return fmt.Errorf("Init marshal payload failed (%v)", err) } body, err := s.post(InitRoute, payload) if err != nil { return err } err = json.Unmarshal([]byte(body), &s.APIStatus) if err != nil { return fmt.Errorf("APIStatus unmarshal failed (%v)", err) } if !s.Enabled { return fmt.Errorf("API is disabled. Server can't send any events") } epoch := int(time.Now().Unix()) s.TimestampOffset = s.ServerTimestamp - epoch return nil } // SendEvent posts a single event to GameAnalytics using the server config func (s *Server) SendEvent(e Event) error { return s.SendEvents([]Event{e}) } // SendEvents posts one or more events to GameAnalytics using the server config func (s *Server) SendEvents(e []Event) error { payload, err := json.Marshal(e) if err != nil { return fmt.Errorf("Init marshal payload failed (%v)", err) } result, err := s.post(EventsRoute, payload) if err != nil { return err } log.Printf("[INFO] Event sent (%s), response: %s\n", payload, result) return nil } // Post sends a payload using the server config func (s *Server) post(route string, payload []byte) ([]byte, error) { url := fmt.Sprintf("%s/%s/%s", s.URL, s.GameKey, route) req, err := http.NewRequest("POST", url, bytes.NewBuffer(payload)) if err != nil { return nil, fmt.Errorf("Preparing request failed (%v)", err) } auth := computeHmac256(payload, s.SecretKey) req.Header.Set("Authorization", auth) req.Header.Set("Accept", "application/json") req.Header.Set("Content-Type", "application/json") req.Header.Set("Content-Encoding", "application/json") //TODO add gzip compression client := &http.Client{} res, err := client.Do(req) if err != nil { return nil, fmt.Errorf("Server request failed (%v)", err) } defer res.Body.Close() body, err := ioutil.ReadAll(res.Body) if err != nil { return nil, err } if res.StatusCode != 200 { return nil, fmt.Errorf("Expected status code 200, got %d. Body: %s", res.StatusCode, body) } return []byte(body), nil } // computeHmac256 returns the raw body content from the request using the secret // key (private key) as the hashing key and then encoding it using base64. func computeHmac256(payload []byte, key string) string { h := hmac.New(sha256.New, []byte(key)) h.Write([]byte(payload)) return base64.StdEncoding.EncodeToString(h.Sum(nil)) }
replaygaming/gameanalytics
server.go
GO
mit
5,032
## Return the linear predictor vector function linpred!(out, p::LinPred, f::Real=1.) if f == 0 A_mul_B!(out, p.X, p.beta0) else beta0 = p.beta0 delbeta = p.delbeta scbeta = p.scratchbeta @inbounds for i = 1:length(scbeta) scbeta[i] = beta0[i] + f*delbeta[i] end A_mul_B!(out, p.X, scbeta) end end linpred(p::LinPred, f::Real=1.) = linpred!(Array(eltype(p.X), size(p.X, 1)), p, f) ## Install beta0 + f*delbeta as beta0 and zero out delbeta function installbeta!(p::LinPred, f::Real=1.) beta0 = p.beta0 delbeta = p.delbeta @inbounds for i = 1:length(beta0) beta0[i] += delbeta[i]*f delbeta[i] = 0 end p.beta0 end @compat typealias BlasReal Union{Float32,Float64} type DensePredQR{T<:BlasReal} <: DensePred X::Matrix{T} # model matrix beta0::Vector{T} # base coefficient vector delbeta::Vector{T} # coefficient increment scratchbeta::Vector{T} qr::QRCompactWY{T} function DensePredQR(X::Matrix{T}, beta0::Vector{T}) n, p = size(X) length(beta0) == p || error("dimension mismatch") new(X, beta0, zeros(T,p), zeros(T,p), qrfact(X)) end end convert{T}(::Type{DensePredQR{T}}, X::Matrix{T}) = DensePredQR{T}(X, zeros(T, size(X, 2))) delbeta!{T<:BlasReal}(p::DensePredQR{T}, r::Vector{T}) = (p.delbeta = p.qr\r; p) type DensePredChol{T<:BlasReal,C} <: DensePred X::Matrix{T} # model matrix beta0::Vector{T} # base vector for coefficients delbeta::Vector{T} # coefficient increment scratchbeta::Vector{T} chol::C scratch::Matrix{T} end DensePredChol{T<:BlasReal}(X::Matrix{T}) = DensePredChol(X, zeros(T, size(X, 2)), zeros(T, size(X, 2)), zeros(T, size(X, 2)), cholfact!(X'X), similar(X)) cholpred(X::Matrix) = DensePredChol(X) if VERSION >= v"0.4.0-dev+4356" cholfactors(c::Cholesky) = c.factors else cholfactors(c::Cholesky) = c.UL end Base.LinAlg.cholfact!{T<:FP}(p::DensePredChol{T}) = p.chol if v"0.4.0-dev+122" <= VERSION < v"0.4.0-dev+4356" Base.LinAlg.cholfact{T<:FP}(p::DensePredQR{T}) = Cholesky{T,Matrix{T},:U}(copy(p.qr[:R])) Base.LinAlg.cholfact{T<:FP}(p::DensePredChol{T}) = (c = p.chol; typeof(c)(copy(c.UL))) Base.LinAlg.cholfact!{T<:FP}(p::DensePredQR{T}) = Cholesky{T,Matrix{T},:U}(p.qr[:R]) else Base.LinAlg.cholfact{T<:FP}(p::DensePredQR{T}) = Cholesky(copy(p.qr[:R]), 'U') Base.LinAlg.cholfact{T<:FP}(p::DensePredChol{T}) = (c = p.chol; Cholesky(copy(cholfactors(c)), c.uplo)) Base.LinAlg.cholfact!{T<:FP}(p::DensePredQR{T}) = Cholesky(p.qr[:R], 'U') end """ Evaluate the increment in the coefficient vector. """ function delbeta!{T<:BlasReal}(p::DensePredChol{T}, r::Vector{T}) A_ldiv_B!(p.chol, At_mul_B!(p.delbeta, p.X, r)) p end """ Evaluate the increment in the coefficient vector. """ function delbeta!{T<:BlasReal}(p::DensePredChol{T}, r::Vector{T}, wt::Vector{T}) scr = scale!(p.scratch, wt, p.X) cholfact!(At_mul_B!(cholfactors(p.chol), scr, p.X), :U) A_ldiv_B!(p.chol, At_mul_B!(p.delbeta, scr, r)) p end type SparsePredChol{T,M<:SparseMatrixCSC,C} <: GLM.LinPred X::M # model matrix Xt::M # X' beta0::Vector{T} # base vector for coefficients delbeta::Vector{T} # coefficient increment scratchbeta::Vector{T} chol::C scratch::M end function SparsePredChol{T}(X::SparseMatrixCSC{T}) chol = cholfact(speye(size(X, 2))) SparsePredChol{eltype(X),typeof(X),typeof(chol)}(X, X', zeros(T, size(X, 2)), zeros(T, size(X, 2)), zeros(T, size(X, 2)), chol, similar(X)) end cholpred(X::SparseMatrixCSC) = SparsePredChol(X) @eval function delbeta!{T}(p::SparsePredChol{T}, r::Vector{T}, wt::Vector{T}) scr = scale!(p.scratch, wt, p.X) XtWX = p.Xt*scr c = p.chol = $(if VERSION >= v"0.4.0-dev+3307" :(cholfact(Symmetric{eltype(XtWX),typeof(XtWX)}(XtWX, 'L'))) else :(cholfact(scale!(XtWX + XtWX', convert(eltype(XtWX), 1/2)))) end) p.delbeta = c\Ac_mul_B!(p.delbeta, scr, r) end Base.cholfact{T}(p::SparsePredChol{T}) = copy(p.chol) Base.cholfact!{T}(p::SparsePredChol{T}) = p.chol """ Extract the estimates of the coefficients in the model """ coef(x::LinPred) = x.beta0 coef(x::LinPredModel) = coef(x.pp) """ Degrees of freedom for residuals, when meaningful """ df_residual(x::LinPredModel) = df_residual(x.pp) df_residual(x::@compat(Union{DensePred,SparsePredChol})) = size(x.X, 1) - length(x.beta0) invchol(x::DensePred) = inv(cholfact!(x)) invchol(x::SparsePredChol) = cholfact!(x)\eye(size(x.X, 2)) """ Estimated variance-covariance matrix of the coefficient estimates. """ vcov(x::LinPredModel) = scale!(invchol(x.pp), scale(x,true)) #vcov(x::DensePredChol) = inv(x.chol) #vcov(x::DensePredQR) = copytri!(potri!('U', x.qr[:R]), 'U') function cor(x::LinPredModel) Σ = vcov(x) invstd = similar(Σ, size(Σ, 1)) for i = 1:size(Σ, 1) invstd[i] = 1/sqrt(Σ[i, i]) end scale!(invstd, scale!(Σ, invstd)) end """ Standard errors of the coefficients. """ stderr(x::LinPredModel) = sqrt(diag(vcov(x))) function show(io::IO, obj::LinPredModel) println(io, "$(typeof(obj)):\n\nCoefficients:\n", coeftable(obj)) end ## function show(io::IO, obj::GlmMod) ## cc = coef(obj) ## se = stderr(obj) ## zz = cc ./ se ## pp = 2.0 * ccdf(Normal(), abs(zz)) ## @printf("\n%s\n\nCoefficients:\n", obj.fr.formula) ## @printf(" Term Estimate Std. Error t value Pr(>|t|)\n") ## N = length(cc) ## for i = 1:N ## @printf(" %12s%12.5f%12.5f%12.3f%12.3f %-3s\n", ## obj.mm.model_colnames[i], ## cc[i], ## se[i], ## zz[i], ## pp[i], ## p_value_stars(pp[i])) ## end ## println("---\nSignif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1\n") ## @printf("R-squared: %0.4f\n", 0.0) # TODO: obj.r_squared) ## end ## function p_value_stars(p_value::Float64) ## if p_value < 0.001 ## return "***" ## elseif p_value < 0.01 ## return "**" ## elseif p_value < 0.05 ## return "*" ## elseif p_value < 0.1 ## return "." ## else ## return " " ## end ## end ModelFrame(obj::LinPredModel) = obj.fr ModelMatrix(obj::LinPredModel) = obj.pp.X model_response(obj::LinPredModel) = obj.rr.y fitted(m::LinPredModel) = m.rr.mu predict(mm::LinPredModel) = fitted(mm) """ Extract the formula from a model. """ formula(obj::LinPredModel) = ModelFrame(obj).formula """ Total number of observations. """ nobs(obj::LinPredModel) = length(model_response(obj)) residuals(obj::LinPredModel) = residuals(obj.rr)
abhijithch/GLM.jl
src/linpred.jl
Julia
mit
6,870
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>flocq: Not compatible 👼</title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / released</a></li> <li class="active"><a href="">8.10.0 / flocq - 4.0.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> flocq <small> 4.0.0 <span class="label label-info">Not compatible 👼</span> </small> </h1> <p>📅 <em><script>document.write(moment("2021-12-09 07:56:05 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-12-09 07:56:05 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-threads base base-unix base conf-findutils 1 Virtual package relying on findutils coq 8.10.0 Formal proof management system num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic ocaml 4.06.1 The OCaml compiler (virtual package) ocaml-base-compiler 4.06.1 Official 4.06.1 release ocaml-config 1 OCaml Switch Configuration ocamlfind 1.9.1 A library manager for OCaml # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;guillaume.melquiond@inria.fr&quot; homepage: &quot;https://flocq.gitlabpages.inria.fr/&quot; dev-repo: &quot;git+https://gitlab.inria.fr/flocq/flocq.git&quot; bug-reports: &quot;https://gitlab.inria.fr/flocq/flocq/issues&quot; license: &quot;LGPL-3.0-or-later&quot; build: [ [&quot;autoconf&quot;] {dev} [&quot;./configure&quot;] [&quot;./remake&quot; &quot;-j%{jobs}%&quot;] ] install: [&quot;./remake&quot; &quot;install&quot;] depends: [ &quot;coq&quot; {&gt;= &quot;8.12&quot;} &quot;conf-autoconf&quot; {build &amp; dev} (&quot;conf-g++&quot; {build} | &quot;conf-clang&quot; {build}) ] tags: [ &quot;keyword:floating-point arithmetic&quot; &quot;logpath:Flocq&quot; &quot;date:2021-11-05&quot; ] authors: [ &quot;Sylvie Boldo &lt;sylvie.boldo@inria.fr&gt;&quot; &quot;Guillaume Melquiond &lt;guillaume.melquiond@inria.fr&gt;&quot; ] synopsis: &quot;A formalization of floating-point arithmetic for the Coq system&quot; url { src: &quot;https://flocq.gitlabpages.inria.fr/releases/flocq-4.0.0.tar.gz&quot; checksum: &quot;sha512=fa58ea6d735cdb0b65dd7cd11daaebc3172145626d8e0accabddaf336c486f8e54b4af246aabb0c1731ebb8fe0d37c9e7a3892128b9aa3e744f93af48f923f05&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install 🏜️</h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action coq-flocq.4.0.0 coq.8.10.0</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.10.0). The following dependencies couldn&#39;t be met: - coq-flocq -&gt; coq &gt;= 8.12 Your request can&#39;t be satisfied: - No available version of coq satisfies the constraints No solution found, exiting </pre></dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-flocq.4.0.0</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Install 🚀</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Installation size</h2> <p>No files were installed.</p> <h2>Uninstall 🧹</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> Sources are on <a href="https://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣 </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
coq-bench/coq-bench.github.io
clean/Linux-x86_64-4.06.1-2.0.5/released/8.10.0/flocq/4.0.0.html
HTML
mit
6,793
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>chinese: Not compatible</title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / extra-dev</a></li> <li class="active"><a href="">dev / chinese - 8.5.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> chinese <small> 8.5.0 <span class="label label-info">Not compatible</span> </small> </h1> <p><em><script>document.write(moment("2020-04-14 10:21:03 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2020-04-14 10:21:03 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-threads base base-unix base conf-findutils 1 Virtual package relying on findutils conf-m4 1 Virtual package relying on m4 coq dev Formal proof management system num 1.3 The legacy Num library for arbitrary-precision integer and rational arithmetic ocaml 4.10.0 The OCaml compiler (virtual package) ocaml-base-compiler 4.10.0 Official release 4.10.0 ocaml-config 1 OCaml Switch Configuration ocamlfind 1.8.1 A library manager for OCaml # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;matej.kosik@inria.fr&quot; homepage: &quot;https://github.com/coq-contribs/chinese&quot; license: &quot;Proprietary&quot; build: [make &quot;-j%{jobs}%&quot;] install: [make &quot;install&quot;] remove: [&quot;rm&quot; &quot;-R&quot; &quot;%{lib}%/coq/user-contrib/Chinese&quot;] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.5&quot; &amp; &lt; &quot;8.6~&quot;} ] tags: [ &quot;keyword:number theory&quot; &quot;keyword:chinese remainder&quot; &quot;keyword:primality&quot; &quot;keyword:prime numbers&quot; &quot;category:Mathematics/Arithmetic and Number Theory/Number theory&quot; ] authors: [ &quot;Valérie Ménissier-Morain &lt;&gt;&quot; ] bug-reports: &quot;https://github.com/coq-contribs/chinese/issues&quot; dev-repo: &quot;git+https://github.com/coq-contribs/chinese.git&quot; synopsis: &quot;A proof of the Chinese Remainder Lemma&quot; description: &quot;This is a rewriting of the contribution chinese-lemma using Zarith&quot; flags: light-uninstall url { src: &quot;https://github.com/coq-contribs/chinese/archive/v8.5.0.tar.gz&quot; checksum: &quot;md5=b6e251c230ce200767af2efeb55613ba&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install</h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action coq-chinese.8.5.0 coq.dev</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is dev). The following dependencies couldn&#39;t be met: - coq-chinese -&gt; coq &lt; 8.6~ -&gt; ocaml &lt; 4.06.0 base of this switch (use `--unlock-base&#39; to force) Your request can&#39;t be satisfied: - No available version of coq satisfies the constraints No solution found, exiting </pre></dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-chinese.8.5.0</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Install</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Installation size</h2> <p>No files were installed.</p> <h2>Uninstall</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> <small>Sources are on <a href="https://github.com/coq-bench">GitHub</a>. © Guillaume Claret.</small> </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
coq-bench/coq-bench.github.io
clean/Linux-x86_64-4.10.0-2.0.6/extra-dev/dev/chinese/8.5.0.html
HTML
mit
6,861
<?php namespace Phpmvc\Comment; /** * To attach comments-flow to a page or some content. * */ class CommentsInSession implements \Anax\DI\IInjectionAware { use \Anax\DI\TInjectable; /** * Add a new comment. * * @param array $comment with all details. * * @return void */ public function add($comment) { $comments = $this->session->get('comments', []); $comments[] = $comment; $this->session->set('comments', $comments); } /** * Find and return all comments for a specific page. * * @param $pageID to find comments. * * @return array with all comments. */ public function findAll($pageID) { $comments = $this->session->get('comments', []); foreach ($comments as $key => $val) { if ($val['page']!=$pageID){ unset ($comments[$key]); } } return $comments; } /** * Find and return a comment. * * @param $commentID to find. * * @return array with the comment. */ public function findComment($commentID) { $comments = $this->session->get('comments', []); $comment = $comments[$commentID]; return $comment; } /** * Delete all comments on a specific page. * * @param $pageID to delete all comments. * * @return void */ public function deleteAll($pageID) { $comments = $this->session->get('comments', []); foreach ($comments as $key => $val) { if ($val['page']==$pageID){ unset ($comments[$key]); } } $this->session->set('comments', $comments); } /** * Delete a comment. * * @param $commentID to remove. * * @return void */ public function deleteSelected($commentID) { $comments = $this->session->get('comments', []); unset($comments[$commentID]); // remove comment by ID $this->session->set('comments', $comments); } /** * Save an edited comment. * * @param array $comment with all details. * @param $commentID to save. * * @return void */ public function saveEdited($comment, $commentID) { $comments = $this->session->get('comments', []); $comments[$commentID] = $comment; $this->session->set('comments', $comments); } }
pmn834/wgtotw
Anax-MVC/app/src/Comment/CommentsInSession.php
PHP
mit
2,466
jQuery(document).ready(function(){ /** * add a category */ jQuery("#submitCategory").on("click", function(){ var category_name = jQuery("#category_name").attr("value"); if(!category_name) { alert("category input filde is empty please enter a category name"); return false; } jQuery.ajax({ url:phpToJsPath.ajaxurl, type:"POST", data:{ action:"add_category", category_name: category_name }, success:function(response){ location.reload(); jQuery("#message").show(); }, error:function(err) { location.reload(); jQuery("#errMessage").show(); } }); }); /** * delete a category */ jQuery(".delete-category").on("click", function(){ var confitMessage = confirm("would you like deleted this category ?"); if(!confitMessage) return false; var category_id = jQuery(this).attr("data-id"); jQuery.ajax({ url:phpToJsPath.ajaxurl, type:"POST", data:{ action:"delete_category", category_id:category_id }, success:function(response){ location.reload(); console.log(response); }, error:function(err){ location.reload(); console.log(err); } }); }); /** * update a category */ jQuery(".update-category").on("click",function(){ var category_id = jQuery(this).attr("data-id"); var category_name = prompt("please add a new name for category and click on OK for update category name !!"); if(category_name == "" || category_name==null) { return false; } jQuery.ajax({ url:phpToJsPath.ajaxurl, type:"POST", data:{ action:"update_category", category_id:category_id, category_name:category_name }, success:function(response){ location.reload(); console.log(response); }, error:function(err){ location.reload(); console.log(err); } }); }); /** * add a slide */ jQuery("#uploadSlide").on("click", function(){ var selectFile = jQuery("input[name=slide_image]"); var imageToUpload = selectFile[0].files[0]; var slide_caption = jQuery("#slide_caption").val(); var slide_alt_description = jQuery("#slide_alt_description").val(); var category_id = jQuery("#category_id").val(); var slide_status = jQuery("#slide_status").is(':checked'); var slide_time = jQuery("#slide_time").val(); var slide_update = jQuery("#slide_update").val(); var slide_width = jQuery("#slide_width").val(); var slide_height = jQuery("#slide_height").val(); var slide_description = jQuery("#slide_description").val(); if(imageToUpload == "" || imageToUpload == null) { alert("please select a file and submit file to upload !"); return false; } if(category_id == "" || category_id == null) { alert("please choose a category and submit file to upload !"); return false; } if(slide_time == "" || slide_time == null) { alert("please reload this upload form !"); return false; } var formData = new FormData(); formData.append("action", "image_upload"); formData.append("image_slide", imageToUpload); formData.append("slide_caption", slide_caption); formData.append("slide_alt_description", slide_alt_description); formData.append("category_id", category_id); formData.append("slide_status", slide_status); formData.append("slide_time", slide_time); formData.append("slide_update", slide_update); formData.append("slide_width", slide_width); formData.append("slide_height", slide_height); formData.append("slide_description", slide_description); jQuery("#loading").fadeIn(); jQuery.ajax({ url:phpToJsPath.ajaxurl, type:"POST", processData:false, contentType:false, data:formData, success : function(response){ jQuery("#messageSuccessAddSlide").fadeIn(); jQuery("#loading").fadeOut(); jQuery("#slide_caption").val(""); jQuery("#slide_alt_description").val(""); jQuery("#category_id").val(""); jQuery("#slide_update").val(""); jQuery("#slide_width").val(""); jQuery("#slide_height").val(""); jQuery("#slide_description").val(""); console.log(response); }, error : function(err){ jQuery("#messageSuccessAddSlide").fadeIn(); console.log(err); } }); }); // php delete slide jQuery(".delete-slide").on("click", function(){ // ask a question for delete slide var askQuestion = confirm("Are you sure remove this is slide ?"); if(!askQuestion) { return false; } var slide_id = jQuery(this).attr("data-id"); jQuery.ajax({ url:phpToJsPath.ajaxurl, type:"POST", data:{ action:"delete_slide", id:slide_id, }, success:function(res){ console.log(res); location.reload(); jQuery("") }, error:function(err){ console.log(err); } }); }); /** * jqury ui update form init */ jQuery( function() { var dialog, form, updateSlideId; var slide_id = jQuery("#upload-slide_id"); var slide_caption = jQuery("#update-slide-caption"); var slide_description = jQuery("#update-slide-description"); var slide_alt_tag = jQuery("#update-slide-alt-tag"); var slide_category = jQuery("#update-slide-category"); var slide_status = jQuery("#update-slide-status"); var slide_time = jQuery("#upload-slide-time"); var slide_update = jQuery("#upload-slide_update"); var slide_width = jQuery("#update-slide-width"); var slide_height = jQuery("#update-slide-height"); function updateTips( t ) { tips .text( t ) .addClass( "ui-state-highlight" ); setTimeout(function() { tips.removeClass( "ui-state-highlight", 1500 ); }, 500 ); } function updateSlide() { var valid = true; var checkBoxIsChecked = slide_status.is(':checked'); jQuery.ajax({ url:phpToJsPath.ajaxurl, type:"POST", data:{ action:"update_form_submit", slide_id:slide_id.val(), slide_alt_tag:slide_alt_tag.val(), slide_caption:slide_caption.val(), slide_category:slide_category.val(), slide_status:checkBoxIsChecked, slide_time:slide_time.val(), slide_update:slide_update.val(), slide_width:slide_width.val(), slide_height:slide_height.val(), slide_description:slide_description.val() }, success:function(res){ location.reload(); console.log(res); }, error:function(err){ location.reload(); console.log(err); } }); console.log("click on update information"); } dialog = jQuery( "#dialog-form" ).dialog({ autoOpen: false, height: 400, width: 350, title: 'Update slide information', modal: true, buttons: { "Update informaion": updateSlide, Cancel: function() { dialog.dialog( "close" ); } }, close: function() { form[ 0 ].reset(); } }); form = dialog.find( "form" ).on( "submit", function( event ) { console.log("you click on submit"); }); jQuery( ".update-slide" ).on( "click", function() { updateSlideId = jQuery(this).attr("data-id"); jQuery.ajax({ url:phpToJsPath.ajaxurl, type:"Post", data:{ action:"get_Slide_Info_By_Id", slideId:updateSlideId }, success:function(res){ var dataRes = jQuery.parseJSON(res); slide_id.val(updateSlideId); slide_caption.val(dataRes[0].kiki_slide_header); slide_description.val(dataRes[0].kiki_slide_content); slide_alt_tag.val(dataRes[0].kiki_slide_img_alt); slide_status.val(dataRes[0].kiki_slide_status); slide_time.val(dataRes[0].kiki_slide_date); slide_update.val(Date.now()); slide_category.val(dataRes[0].kiki_slide_category_id); slide_width.val(dataRes[0].kiki_slide_width); slide_height.val(dataRes[0].kiki_slide_height); // check checkbox is checked if(dataRes[0].kiki_slide_status == "1") { jQuery("#update-slide-status").attr('checked', true); } else { jQuery("#update-slide-status").removeAttr('checked'); } }, error:function(err){ console.log(err); } }); dialog.dialog( "open" ); }); } ); });
vheidari/kiki-slider
assets/js/admin_ajax.js
JavaScript
mit
11,952
<?php /** * For licensing information, please see the LICENSE file accompanied with this file. * * @author Gerard van Helden <drm@melp.nl> * @copyright 2012 Gerard van Helden <http://melp.nl> */ namespace Melp\Vcs; /** * Common base class for the SVN implementations. */ abstract class SvnAbstract implements ClientInterface { /** * Remote SVN url. * * @var string */ protected $remote; /** * Initializes the interface with the passed adapter implementation to use for SVN communication * * @param Svn\AdapterInterface $adapter */ function __construct(Svn\AdapterInterface $adapter) { $this->adapter = $adapter; } /** * Returns commit details for the passed revision number. * * @param string $commit * @param string $path * @return mixed */ function getCommit($commit, $path = null) { $entry = simplexml_load_string($this->adapter->exec('log', '-c' . $commit, '--xml', $this->remote . '/' . $path)); if ($entry = $entry->logentry) { return array( 'commit' => (string)$entry['revision'], 'author' => (string)$entry->author, 'date' => new \DateTime((string)$entry->date), 'message' => (string)$entry->msg ); } return null; } /** * Helper function to split an SVN URL into the pseudo root and trunk, branch, or tag. * * Example: * svn://host/path/trunk will split into ['svn://host/path', 'trunk'] * svn://host/path/branches/ticket123 will split into ['svn://host/path', 'branches/ticket123'] * * The part parameter is a utility parameter to directly return the specified element in the array. * * @param string $url * @param null $part * @param int $part * @return mixed */ static function splitUrl($url, $part = null) { if (!preg_match('~(.*)((branches|tags)/[^/]+|trunk)/?$~', $url, $m)) { throw new \UnexpectedValueException("Can not find pseudo root for url {$url}"); } $ret = array(rtrim($m[1], '/'), $m[2]); if (null !== $part) { $ret = $ret[$part]; } return $ret; } /** * Returns the branch url for the specified branch name. * * @param string $name * @return string */ function getBranchUrl($name) { return $this->getPseudoRoot() . '/branches/' . $name; } /** * Returns the tag url for the specified tag name. * * @param $name * @return string */ function getTagUrl($name) { return $this->getPseudoRoot() . '/tags/' . $name; } /** * Returns the trunk url * * @return string */ function getTrunkUrl() { return $this->getPseudoRoot() . '/trunk'; } /** * Returns the pseudo root of the repository; i.e. the part before 'branches', 'trunk' or 'tags'. * * @return mixed */ private function getPseudoRoot() { return self::splitUrl($this->remote, 0); } /** * Helper method to pass the svn command to the adapter. * * @return mixed */ protected function svn() { return call_user_func_array( array($this->adapter, 'exec'), func_get_args() ); } /** * Parses an XML response of the SVN client into a list of directory entries. * * @param \SimpleXMLElement $response * @return array */ public function parseLs($response) { $ret = array(); foreach ($response->list as $list) { foreach ($list as $entry) { $ret[(string)$entry->name] = array( 'type' => (string)$entry['kind'], 'commit' => (string)$entry->commit['revision'], 'author' => (string)$entry->commit->author, 'date' => new \DateTime((string)$entry->commit->date) ); } } return $ret; } /** * Parses a log into a list of commits. * * @param \SimpleXMLElement $response * @return array */ public function parseLog($response) { $ret = array(); foreach ($response->logentry as $entry) { $ret[] = array( 'commit' => (string)$entry['revision'], 'author' => (string)$entry->author, 'date' => new \DateTime((string)$entry->date), 'message' => (string)$entry->msg ); } return $ret; } }
drm/MelpVcs
src/Melp/Vcs/SvnAbstract.php
PHP
mit
4,674
<HTML> <BODY BGCOLOR="white"> <PRE> <FONT color="green">001</FONT> /**<a name="line.1"></a> <FONT color="green">002</FONT> * Copyright 2007-2010 Arthur Blake<a name="line.2"></a> <FONT color="green">003</FONT> *<a name="line.3"></a> <FONT color="green">004</FONT> * Licensed under the Apache License, Version 2.0 (the "License");<a name="line.4"></a> <FONT color="green">005</FONT> * you may not use this file except in compliance with the License.<a name="line.5"></a> <FONT color="green">006</FONT> * You may obtain a copy of the License at<a name="line.6"></a> <FONT color="green">007</FONT> *<a name="line.7"></a> <FONT color="green">008</FONT> * http://www.apache.org/licenses/LICENSE-2.0<a name="line.8"></a> <FONT color="green">009</FONT> *<a name="line.9"></a> <FONT color="green">010</FONT> * Unless required by applicable law or agreed to in writing, software<a name="line.10"></a> <FONT color="green">011</FONT> * distributed under the License is distributed on an "AS IS" BASIS,<a name="line.11"></a> <FONT color="green">012</FONT> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<a name="line.12"></a> <FONT color="green">013</FONT> * See the License for the specific language governing permissions and<a name="line.13"></a> <FONT color="green">014</FONT> * limitations under the License.<a name="line.14"></a> <FONT color="green">015</FONT> */<a name="line.15"></a> <FONT color="green">016</FONT> package net.sf.log4jdbc;<a name="line.16"></a> <FONT color="green">017</FONT> <a name="line.17"></a> <FONT color="green">018</FONT> import java.io.InputStream;<a name="line.18"></a> <FONT color="green">019</FONT> import java.io.Reader;<a name="line.19"></a> <FONT color="green">020</FONT> import java.math.BigDecimal;<a name="line.20"></a> <FONT color="green">021</FONT> import java.net.URL;<a name="line.21"></a> <FONT color="green">022</FONT> import java.sql.Array;<a name="line.22"></a> <FONT color="green">023</FONT> import java.sql.Blob;<a name="line.23"></a> <FONT color="green">024</FONT> import java.sql.Clob;<a name="line.24"></a> <FONT color="green">025</FONT> import java.sql.Date;<a name="line.25"></a> <FONT color="green">026</FONT> import java.sql.NClob;<a name="line.26"></a> <FONT color="green">027</FONT> import java.sql.Ref;<a name="line.27"></a> <FONT color="green">028</FONT> import java.sql.RowId;<a name="line.28"></a> <FONT color="green">029</FONT> import java.sql.ResultSet;<a name="line.29"></a> <FONT color="green">030</FONT> import java.sql.ResultSetMetaData;<a name="line.30"></a> <FONT color="green">031</FONT> import java.sql.SQLException;<a name="line.31"></a> <FONT color="green">032</FONT> import java.sql.SQLWarning;<a name="line.32"></a> <FONT color="green">033</FONT> import java.sql.SQLXML;<a name="line.33"></a> <FONT color="green">034</FONT> import java.sql.Statement;<a name="line.34"></a> <FONT color="green">035</FONT> import java.sql.Time;<a name="line.35"></a> <FONT color="green">036</FONT> import java.sql.Timestamp;<a name="line.36"></a> <FONT color="green">037</FONT> import java.util.Calendar;<a name="line.37"></a> <FONT color="green">038</FONT> import java.util.Map;<a name="line.38"></a> <FONT color="green">039</FONT> <a name="line.39"></a> <FONT color="green">040</FONT> /**<a name="line.40"></a> <FONT color="green">041</FONT> * Wraps a ResultSet and reports method calls, returns and exceptions.<a name="line.41"></a> <FONT color="green">042</FONT> *<a name="line.42"></a> <FONT color="green">043</FONT> * JDBC 4 version.<a name="line.43"></a> <FONT color="green">044</FONT> *<a name="line.44"></a> <FONT color="green">045</FONT> * @author Arthur Blake<a name="line.45"></a> <FONT color="green">046</FONT> */<a name="line.46"></a> <FONT color="green">047</FONT> public class ResultSetSpy implements ResultSet, Spy<a name="line.47"></a> <FONT color="green">048</FONT> {<a name="line.48"></a> <FONT color="green">049</FONT> private final SpyLogDelegator log;<a name="line.49"></a> <FONT color="green">050</FONT> <a name="line.50"></a> <FONT color="green">051</FONT> /**<a name="line.51"></a> <FONT color="green">052</FONT> * Report an exception to be logged.<a name="line.52"></a> <FONT color="green">053</FONT> *<a name="line.53"></a> <FONT color="green">054</FONT> * @param methodCall description of method call and arguments passed to it that generated the exception.<a name="line.54"></a> <FONT color="green">055</FONT> * @param exception exception that was generated<a name="line.55"></a> <FONT color="green">056</FONT> */<a name="line.56"></a> <FONT color="green">057</FONT> protected void reportException(String methodCall, SQLException exception)<a name="line.57"></a> <FONT color="green">058</FONT> {<a name="line.58"></a> <FONT color="green">059</FONT> log.exceptionOccured(this, methodCall, exception, null, -1L);<a name="line.59"></a> <FONT color="green">060</FONT> }<a name="line.60"></a> <FONT color="green">061</FONT> <a name="line.61"></a> <FONT color="green">062</FONT> /**<a name="line.62"></a> <FONT color="green">063</FONT> * Report (for logging) that a method returned. All the other reportReturn methods are conveniance methods that call<a name="line.63"></a> <FONT color="green">064</FONT> * this method.<a name="line.64"></a> <FONT color="green">065</FONT> *<a name="line.65"></a> <FONT color="green">066</FONT> * @param methodCall description of method call and arguments passed to it that returned.<a name="line.66"></a> <FONT color="green">067</FONT> * @param msg description of what the return value that was returned. may be an empty String for void return types.<a name="line.67"></a> <FONT color="green">068</FONT> */<a name="line.68"></a> <FONT color="green">069</FONT> protected void reportAllReturns(String methodCall, String msg)<a name="line.69"></a> <FONT color="green">070</FONT> {<a name="line.70"></a> <FONT color="green">071</FONT> log.methodReturned(this, methodCall, msg);<a name="line.71"></a> <FONT color="green">072</FONT> }<a name="line.72"></a> <FONT color="green">073</FONT> <a name="line.73"></a> <FONT color="green">074</FONT> private ResultSet realResultSet;<a name="line.74"></a> <FONT color="green">075</FONT> <a name="line.75"></a> <FONT color="green">076</FONT> /**<a name="line.76"></a> <FONT color="green">077</FONT> * Get the real ResultSet that this ResultSetSpy wraps.<a name="line.77"></a> <FONT color="green">078</FONT> *<a name="line.78"></a> <FONT color="green">079</FONT> * @return the real ResultSet that this ResultSetSpy wraps.<a name="line.79"></a> <FONT color="green">080</FONT> */<a name="line.80"></a> <FONT color="green">081</FONT> public ResultSet getRealResultSet()<a name="line.81"></a> <FONT color="green">082</FONT> {<a name="line.82"></a> <FONT color="green">083</FONT> return realResultSet;<a name="line.83"></a> <FONT color="green">084</FONT> }<a name="line.84"></a> <FONT color="green">085</FONT> <a name="line.85"></a> <FONT color="green">086</FONT> private StatementSpy parent;<a name="line.86"></a> <FONT color="green">087</FONT> <a name="line.87"></a> <FONT color="green">088</FONT> /**<a name="line.88"></a> <FONT color="green">089</FONT> * Create a new ResultSetSpy that wraps another ResultSet object, that logs all method calls, expceptions, etc.<a name="line.89"></a> <FONT color="green">090</FONT> *<a name="line.90"></a> <FONT color="green">091</FONT> * @param parent Statement that generated this ResultSet.<a name="line.91"></a> <FONT color="green">092</FONT> * @param realResultSet real underlying ResultSet that is being wrapped.<a name="line.92"></a> <FONT color="green">093</FONT> */<a name="line.93"></a> <FONT color="green">094</FONT> public ResultSetSpy(StatementSpy parent, ResultSet realResultSet)<a name="line.94"></a> <FONT color="green">095</FONT> {<a name="line.95"></a> <FONT color="green">096</FONT> if (realResultSet == null)<a name="line.96"></a> <FONT color="green">097</FONT> {<a name="line.97"></a> <FONT color="green">098</FONT> throw new IllegalArgumentException("Must provide a non null real ResultSet");<a name="line.98"></a> <FONT color="green">099</FONT> }<a name="line.99"></a> <FONT color="green">100</FONT> this.realResultSet = realResultSet;<a name="line.100"></a> <FONT color="green">101</FONT> this.parent = parent;<a name="line.101"></a> <FONT color="green">102</FONT> log = SpyLogFactory.getSpyLogDelegator();<a name="line.102"></a> <FONT color="green">103</FONT> reportReturn("new ResultSet");<a name="line.103"></a> <FONT color="green">104</FONT> }<a name="line.104"></a> <FONT color="green">105</FONT> <a name="line.105"></a> <FONT color="green">106</FONT> /**<a name="line.106"></a> <FONT color="green">107</FONT> * Description for ResultSet class type.<a name="line.107"></a> <FONT color="green">108</FONT> */<a name="line.108"></a> <FONT color="green">109</FONT> public static final String classTypeDescription = "ResultSet";<a name="line.109"></a> <FONT color="green">110</FONT> <a name="line.110"></a> <FONT color="green">111</FONT> public String getClassType()<a name="line.111"></a> <FONT color="green">112</FONT> {<a name="line.112"></a> <FONT color="green">113</FONT> return classTypeDescription;<a name="line.113"></a> <FONT color="green">114</FONT> }<a name="line.114"></a> <FONT color="green">115</FONT> <a name="line.115"></a> <FONT color="green">116</FONT> public Integer getConnectionNumber()<a name="line.116"></a> <FONT color="green">117</FONT> {<a name="line.117"></a> <FONT color="green">118</FONT> return parent.getConnectionNumber();<a name="line.118"></a> <FONT color="green">119</FONT> }<a name="line.119"></a> <FONT color="green">120</FONT> <a name="line.120"></a> <FONT color="green">121</FONT> /**<a name="line.121"></a> <FONT color="green">122</FONT> * Conveniance method to report (for logging) that a method returned a boolean value.<a name="line.122"></a> <FONT color="green">123</FONT> *<a name="line.123"></a> <FONT color="green">124</FONT> * @param methodCall description of method call and arguments passed to it that returned.<a name="line.124"></a> <FONT color="green">125</FONT> * @param value boolean return value.<a name="line.125"></a> <FONT color="green">126</FONT> * @return the boolean return value as passed in.<a name="line.126"></a> <FONT color="green">127</FONT> */<a name="line.127"></a> <FONT color="green">128</FONT> protected boolean reportReturn(String methodCall, boolean value)<a name="line.128"></a> <FONT color="green">129</FONT> {<a name="line.129"></a> <FONT color="green">130</FONT> reportAllReturns(methodCall, "" + value);<a name="line.130"></a> <FONT color="green">131</FONT> return value;<a name="line.131"></a> <FONT color="green">132</FONT> }<a name="line.132"></a> <FONT color="green">133</FONT> <a name="line.133"></a> <FONT color="green">134</FONT> /**<a name="line.134"></a> <FONT color="green">135</FONT> * Conveniance method to report (for logging) that a method returned a byte value.<a name="line.135"></a> <FONT color="green">136</FONT> *<a name="line.136"></a> <FONT color="green">137</FONT> * @param methodCall description of method call and arguments passed to it that returned.<a name="line.137"></a> <FONT color="green">138</FONT> * @param value byte return value.<a name="line.138"></a> <FONT color="green">139</FONT> * @return the byte return value as passed in.<a name="line.139"></a> <FONT color="green">140</FONT> */<a name="line.140"></a> <FONT color="green">141</FONT> protected byte reportReturn(String methodCall, byte value)<a name="line.141"></a> <FONT color="green">142</FONT> {<a name="line.142"></a> <FONT color="green">143</FONT> reportAllReturns(methodCall, "" + value);<a name="line.143"></a> <FONT color="green">144</FONT> return value;<a name="line.144"></a> <FONT color="green">145</FONT> }<a name="line.145"></a> <FONT color="green">146</FONT> <a name="line.146"></a> <FONT color="green">147</FONT> /**<a name="line.147"></a> <FONT color="green">148</FONT> * Conveniance method to report (for logging) that a method returned a int value.<a name="line.148"></a> <FONT color="green">149</FONT> *<a name="line.149"></a> <FONT color="green">150</FONT> * @param methodCall description of method call and arguments passed to it that returned.<a name="line.150"></a> <FONT color="green">151</FONT> * @param value int return value.<a name="line.151"></a> <FONT color="green">152</FONT> * @return the int return value as passed in.<a name="line.152"></a> <FONT color="green">153</FONT> */<a name="line.153"></a> <FONT color="green">154</FONT> protected int reportReturn(String methodCall, int value)<a name="line.154"></a> <FONT color="green">155</FONT> {<a name="line.155"></a> <FONT color="green">156</FONT> reportAllReturns(methodCall, "" + value);<a name="line.156"></a> <FONT color="green">157</FONT> return value;<a name="line.157"></a> <FONT color="green">158</FONT> }<a name="line.158"></a> <FONT color="green">159</FONT> <a name="line.159"></a> <FONT color="green">160</FONT> /**<a name="line.160"></a> <FONT color="green">161</FONT> * Conveniance method to report (for logging) that a method returned a double value.<a name="line.161"></a> <FONT color="green">162</FONT> *<a name="line.162"></a> <FONT color="green">163</FONT> * @param methodCall description of method call and arguments passed to it that returned.<a name="line.163"></a> <FONT color="green">164</FONT> * @param value double return value.<a name="line.164"></a> <FONT color="green">165</FONT> * @return the double return value as passed in.<a name="line.165"></a> <FONT color="green">166</FONT> */<a name="line.166"></a> <FONT color="green">167</FONT> protected double reportReturn(String methodCall, double value)<a name="line.167"></a> <FONT color="green">168</FONT> {<a name="line.168"></a> <FONT color="green">169</FONT> reportAllReturns(methodCall, "" + value);<a name="line.169"></a> <FONT color="green">170</FONT> return value;<a name="line.170"></a> <FONT color="green">171</FONT> }<a name="line.171"></a> <FONT color="green">172</FONT> <a name="line.172"></a> <FONT color="green">173</FONT> /**<a name="line.173"></a> <FONT color="green">174</FONT> * Conveniance method to report (for logging) that a method returned a short value.<a name="line.174"></a> <FONT color="green">175</FONT> *<a name="line.175"></a> <FONT color="green">176</FONT> * @param methodCall description of method call and arguments passed to it that returned.<a name="line.176"></a> <FONT color="green">177</FONT> * @param value short return value.<a name="line.177"></a> <FONT color="green">178</FONT> * @return the short return value as passed in.<a name="line.178"></a> <FONT color="green">179</FONT> */<a name="line.179"></a> <FONT color="green">180</FONT> protected short reportReturn(String methodCall, short value)<a name="line.180"></a> <FONT color="green">181</FONT> {<a name="line.181"></a> <FONT color="green">182</FONT> reportAllReturns(methodCall, "" + value);<a name="line.182"></a> <FONT color="green">183</FONT> return value;<a name="line.183"></a> <FONT color="green">184</FONT> }<a name="line.184"></a> <FONT color="green">185</FONT> <a name="line.185"></a> <FONT color="green">186</FONT> /**<a name="line.186"></a> <FONT color="green">187</FONT> * Conveniance method to report (for logging) that a method returned a long value.<a name="line.187"></a> <FONT color="green">188</FONT> *<a name="line.188"></a> <FONT color="green">189</FONT> * @param methodCall description of method call and arguments passed to it that returned.<a name="line.189"></a> <FONT color="green">190</FONT> * @param value long return value.<a name="line.190"></a> <FONT color="green">191</FONT> * @return the long return value as passed in.<a name="line.191"></a> <FONT color="green">192</FONT> */<a name="line.192"></a> <FONT color="green">193</FONT> protected long reportReturn(String methodCall, long value)<a name="line.193"></a> <FONT color="green">194</FONT> {<a name="line.194"></a> <FONT color="green">195</FONT> reportAllReturns(methodCall, "" + value);<a name="line.195"></a> <FONT color="green">196</FONT> return value;<a name="line.196"></a> <FONT color="green">197</FONT> }<a name="line.197"></a> <FONT color="green">198</FONT> <a name="line.198"></a> <FONT color="green">199</FONT> /**<a name="line.199"></a> <FONT color="green">200</FONT> * Conveniance method to report (for logging) that a method returned a float value.<a name="line.200"></a> <FONT color="green">201</FONT> *<a name="line.201"></a> <FONT color="green">202</FONT> * @param methodCall description of method call and arguments passed to it that returned.<a name="line.202"></a> <FONT color="green">203</FONT> * @param value float return value.<a name="line.203"></a> <FONT color="green">204</FONT> * @return the float return value as passed in.<a name="line.204"></a> <FONT color="green">205</FONT> */<a name="line.205"></a> <FONT color="green">206</FONT> protected float reportReturn(String methodCall, float value)<a name="line.206"></a> <FONT color="green">207</FONT> {<a name="line.207"></a> <FONT color="green">208</FONT> reportAllReturns(methodCall, "" + value);<a name="line.208"></a> <FONT color="green">209</FONT> return value;<a name="line.209"></a> <FONT color="green">210</FONT> }<a name="line.210"></a> <FONT color="green">211</FONT> <a name="line.211"></a> <FONT color="green">212</FONT> /**<a name="line.212"></a> <FONT color="green">213</FONT> * Conveniance method to report (for logging) that a method returned an Object.<a name="line.213"></a> <FONT color="green">214</FONT> *<a name="line.214"></a> <FONT color="green">215</FONT> * @param methodCall description of method call and arguments passed to it that returned.<a name="line.215"></a> <FONT color="green">216</FONT> * @param value return Object.<a name="line.216"></a> <FONT color="green">217</FONT> * @return the return Object as passed in.<a name="line.217"></a> <FONT color="green">218</FONT> */<a name="line.218"></a> <FONT color="green">219</FONT> protected Object reportReturn(String methodCall, Object value)<a name="line.219"></a> <FONT color="green">220</FONT> {<a name="line.220"></a> <FONT color="green">221</FONT> reportAllReturns(methodCall, "" + value);<a name="line.221"></a> <FONT color="green">222</FONT> return value;<a name="line.222"></a> <FONT color="green">223</FONT> }<a name="line.223"></a> <FONT color="green">224</FONT> <a name="line.224"></a> <FONT color="green">225</FONT> /**<a name="line.225"></a> <FONT color="green">226</FONT> * Conveniance method to report (for logging) that a method returned (void return type).<a name="line.226"></a> <FONT color="green">227</FONT> *<a name="line.227"></a> <FONT color="green">228</FONT> * @param methodCall description of method call and arguments passed to it that returned.<a name="line.228"></a> <FONT color="green">229</FONT> */<a name="line.229"></a> <FONT color="green">230</FONT> protected void reportReturn(String methodCall)<a name="line.230"></a> <FONT color="green">231</FONT> {<a name="line.231"></a> <FONT color="green">232</FONT> reportAllReturns(methodCall, "");<a name="line.232"></a> <FONT color="green">233</FONT> }<a name="line.233"></a> <FONT color="green">234</FONT> <a name="line.234"></a> <FONT color="green">235</FONT> // forwarding methods<a name="line.235"></a> <FONT color="green">236</FONT> <a name="line.236"></a> <FONT color="green">237</FONT> public void updateAsciiStream(int columnIndex, InputStream x, int length) throws SQLException<a name="line.237"></a> <FONT color="green">238</FONT> {<a name="line.238"></a> <FONT color="green">239</FONT> String methodCall = "updateAsciiStream(" + columnIndex + ", " + x + ", " + length + ")";<a name="line.239"></a> <FONT color="green">240</FONT> try<a name="line.240"></a> <FONT color="green">241</FONT> {<a name="line.241"></a> <FONT color="green">242</FONT> realResultSet.updateAsciiStream(columnIndex, x, length);<a name="line.242"></a> <FONT color="green">243</FONT> }<a name="line.243"></a> <FONT color="green">244</FONT> catch (SQLException s)<a name="line.244"></a> <FONT color="green">245</FONT> {<a name="line.245"></a> <FONT color="green">246</FONT> reportException(methodCall, s);<a name="line.246"></a> <FONT color="green">247</FONT> throw s;<a name="line.247"></a> <FONT color="green">248</FONT> }<a name="line.248"></a> <FONT color="green">249</FONT> reportReturn(methodCall);<a name="line.249"></a> <FONT color="green">250</FONT> }<a name="line.250"></a> <FONT color="green">251</FONT> <a name="line.251"></a> <FONT color="green">252</FONT> public void updateAsciiStream(String columnName, InputStream x, int length) throws SQLException<a name="line.252"></a> <FONT color="green">253</FONT> {<a name="line.253"></a> <FONT color="green">254</FONT> String methodCall = "updateAsciiStream(" + columnName + ", " + x + ", " + length + ")";<a name="line.254"></a> <FONT color="green">255</FONT> try<a name="line.255"></a> <FONT color="green">256</FONT> {<a name="line.256"></a> <FONT color="green">257</FONT> realResultSet.updateAsciiStream(columnName, x, length);<a name="line.257"></a> <FONT color="green">258</FONT> }<a name="line.258"></a> <FONT color="green">259</FONT> catch (SQLException s)<a name="line.259"></a> <FONT color="green">260</FONT> {<a name="line.260"></a> <FONT color="green">261</FONT> reportException(methodCall, s);<a name="line.261"></a> <FONT color="green">262</FONT> throw s;<a name="line.262"></a> <FONT color="green">263</FONT> }<a name="line.263"></a> <FONT color="green">264</FONT> reportReturn(methodCall);<a name="line.264"></a> <FONT color="green">265</FONT> }<a name="line.265"></a> <FONT color="green">266</FONT> <a name="line.266"></a> <FONT color="green">267</FONT> public int getRow() throws SQLException<a name="line.267"></a> <FONT color="green">268</FONT> {<a name="line.268"></a> <FONT color="green">269</FONT> String methodCall = "getRow()";<a name="line.269"></a> <FONT color="green">270</FONT> try<a name="line.270"></a> <FONT color="green">271</FONT> {<a name="line.271"></a> <FONT color="green">272</FONT> return reportReturn(methodCall, realResultSet.getRow());<a name="line.272"></a> <FONT color="green">273</FONT> }<a name="line.273"></a> <FONT color="green">274</FONT> catch (SQLException s)<a name="line.274"></a> <FONT color="green">275</FONT> {<a name="line.275"></a> <FONT color="green">276</FONT> reportException(methodCall, s);<a name="line.276"></a> <FONT color="green">277</FONT> throw s;<a name="line.277"></a> <FONT color="green">278</FONT> }<a name="line.278"></a> <FONT color="green">279</FONT> }<a name="line.279"></a> <FONT color="green">280</FONT> <a name="line.280"></a> <FONT color="green">281</FONT> public void cancelRowUpdates() throws SQLException<a name="line.281"></a> <FONT color="green">282</FONT> {<a name="line.282"></a> <FONT color="green">283</FONT> String methodCall = "cancelRowUpdates()";<a name="line.283"></a> <FONT color="green">284</FONT> try<a name="line.284"></a> <FONT color="green">285</FONT> {<a name="line.285"></a> <FONT color="green">286</FONT> realResultSet.cancelRowUpdates();<a name="line.286"></a> <FONT color="green">287</FONT> }<a name="line.287"></a> <FONT color="green">288</FONT> catch (SQLException s)<a name="line.288"></a> <FONT color="green">289</FONT> {<a name="line.289"></a> <FONT color="green">290</FONT> reportException(methodCall, s);<a name="line.290"></a> <FONT color="green">291</FONT> throw s;<a name="line.291"></a> <FONT color="green">292</FONT> }<a name="line.292"></a> <FONT color="green">293</FONT> reportReturn(methodCall);<a name="line.293"></a> <FONT color="green">294</FONT> }<a name="line.294"></a> <FONT color="green">295</FONT> <a name="line.295"></a> <FONT color="green">296</FONT> public Time getTime(int columnIndex) throws SQLException<a name="line.296"></a> <FONT color="green">297</FONT> {<a name="line.297"></a> <FONT color="green">298</FONT> String methodCall = "getTime(" + columnIndex + ")";<a name="line.298"></a> <FONT color="green">299</FONT> try<a name="line.299"></a> <FONT color="green">300</FONT> {<a name="line.300"></a> <FONT color="green">301</FONT> return (Time) reportReturn(methodCall, realResultSet.getTime(columnIndex));<a name="line.301"></a> <FONT color="green">302</FONT> }<a name="line.302"></a> <FONT color="green">303</FONT> catch (SQLException s)<a name="line.303"></a> <FONT color="green">304</FONT> {<a name="line.304"></a> <FONT color="green">305</FONT> reportException(methodCall, s);<a name="line.305"></a> <FONT color="green">306</FONT> throw s;<a name="line.306"></a> <FONT color="green">307</FONT> }<a name="line.307"></a> <FONT color="green">308</FONT> }<a name="line.308"></a> <FONT color="green">309</FONT> <a name="line.309"></a> <FONT color="green">310</FONT> public Time getTime(String columnName) throws SQLException<a name="line.310"></a> <FONT color="green">311</FONT> {<a name="line.311"></a> <FONT color="green">312</FONT> String methodCall = "getTime(" + columnName + ")";<a name="line.312"></a> <FONT color="green">313</FONT> try<a name="line.313"></a> <FONT color="green">314</FONT> {<a name="line.314"></a> <FONT color="green">315</FONT> return (Time) reportReturn(methodCall, realResultSet.getTime(columnName));<a name="line.315"></a> <FONT color="green">316</FONT> }<a name="line.316"></a> <FONT color="green">317</FONT> catch (SQLException s)<a name="line.317"></a> <FONT color="green">318</FONT> {<a name="line.318"></a> <FONT color="green">319</FONT> reportException(methodCall, s);<a name="line.319"></a> <FONT color="green">320</FONT> throw s;<a name="line.320"></a> <FONT color="green">321</FONT> }<a name="line.321"></a> <FONT color="green">322</FONT> }<a name="line.322"></a> <FONT color="green">323</FONT> <a name="line.323"></a> <FONT color="green">324</FONT> public Time getTime(int columnIndex, Calendar cal) throws SQLException<a name="line.324"></a> <FONT color="green">325</FONT> {<a name="line.325"></a> <FONT color="green">326</FONT> String methodCall = "getTime(" + columnIndex + ", " + cal + ")";<a name="line.326"></a> <FONT color="green">327</FONT> try<a name="line.327"></a> <FONT color="green">328</FONT> {<a name="line.328"></a> <FONT color="green">329</FONT> return (Time) reportReturn(methodCall, realResultSet.getTime(columnIndex, cal));<a name="line.329"></a> <FONT color="green">330</FONT> }<a name="line.330"></a> <FONT color="green">331</FONT> catch (SQLException s)<a name="line.331"></a> <FONT color="green">332</FONT> {<a name="line.332"></a> <FONT color="green">333</FONT> reportException(methodCall, s);<a name="line.333"></a> <FONT color="green">334</FONT> throw s;<a name="line.334"></a> <FONT color="green">335</FONT> }<a name="line.335"></a> <FONT color="green">336</FONT> }<a name="line.336"></a> <FONT color="green">337</FONT> <a name="line.337"></a> <FONT color="green">338</FONT> public Time getTime(String columnName, Calendar cal) throws SQLException<a name="line.338"></a> <FONT color="green">339</FONT> {<a name="line.339"></a> <FONT color="green">340</FONT> String methodCall = "getTime(" + columnName + ", " + cal + ")";<a name="line.340"></a> <FONT color="green">341</FONT> try<a name="line.341"></a> <FONT color="green">342</FONT> {<a name="line.342"></a> <FONT color="green">343</FONT> return (Time) reportReturn(methodCall, realResultSet.getTime(columnName, cal));<a name="line.343"></a> <FONT color="green">344</FONT> }<a name="line.344"></a> <FONT color="green">345</FONT> catch (SQLException s)<a name="line.345"></a> <FONT color="green">346</FONT> {<a name="line.346"></a> <FONT color="green">347</FONT> reportException(methodCall, s);<a name="line.347"></a> <FONT color="green">348</FONT> throw s;<a name="line.348"></a> <FONT color="green">349</FONT> }<a name="line.349"></a> <FONT color="green">350</FONT> }<a name="line.350"></a> <FONT color="green">351</FONT> <a name="line.351"></a> <FONT color="green">352</FONT> public boolean absolute(int row) throws SQLException<a name="line.352"></a> <FONT color="green">353</FONT> {<a name="line.353"></a> <FONT color="green">354</FONT> String methodCall = "absolute(" + row + ")";<a name="line.354"></a> <FONT color="green">355</FONT> try<a name="line.355"></a> <FONT color="green">356</FONT> {<a name="line.356"></a> <FONT color="green">357</FONT> return reportReturn(methodCall, realResultSet.absolute(row));<a name="line.357"></a> <FONT color="green">358</FONT> }<a name="line.358"></a> <FONT color="green">359</FONT> catch (SQLException s)<a name="line.359"></a> <FONT color="green">360</FONT> {<a name="line.360"></a> <FONT color="green">361</FONT> reportException(methodCall, s);<a name="line.361"></a> <FONT color="green">362</FONT> throw s;<a name="line.362"></a> <FONT color="green">363</FONT> }<a name="line.363"></a> <FONT color="green">364</FONT> }<a name="line.364"></a> <FONT color="green">365</FONT> <a name="line.365"></a> <FONT color="green">366</FONT> public Timestamp getTimestamp(int columnIndex) throws SQLException<a name="line.366"></a> <FONT color="green">367</FONT> {<a name="line.367"></a> <FONT color="green">368</FONT> String methodCall = "getTimestamp(" + columnIndex + ")";<a name="line.368"></a> <FONT color="green">369</FONT> try<a name="line.369"></a> <FONT color="green">370</FONT> {<a name="line.370"></a> <FONT color="green">371</FONT> return (Timestamp) reportReturn(methodCall, realResultSet.getTimestamp(columnIndex));<a name="line.371"></a> <FONT color="green">372</FONT> }<a name="line.372"></a> <FONT color="green">373</FONT> catch (SQLException s)<a name="line.373"></a> <FONT color="green">374</FONT> {<a name="line.374"></a> <FONT color="green">375</FONT> reportException(methodCall, s);<a name="line.375"></a> <FONT color="green">376</FONT> throw s;<a name="line.376"></a> <FONT color="green">377</FONT> }<a name="line.377"></a> <FONT color="green">378</FONT> }<a name="line.378"></a> <FONT color="green">379</FONT> <a name="line.379"></a> <FONT color="green">380</FONT> public Timestamp getTimestamp(String columnName) throws SQLException<a name="line.380"></a> <FONT color="green">381</FONT> {<a name="line.381"></a> <FONT color="green">382</FONT> String methodCall = "getTimestamp(" + columnName + ")";<a name="line.382"></a> <FONT color="green">383</FONT> try<a name="line.383"></a> <FONT color="green">384</FONT> {<a name="line.384"></a> <FONT color="green">385</FONT> return (Timestamp) reportReturn(methodCall, realResultSet.getTimestamp(columnName));<a name="line.385"></a> <FONT color="green">386</FONT> }<a name="line.386"></a> <FONT color="green">387</FONT> catch (SQLException s)<a name="line.387"></a> <FONT color="green">388</FONT> {<a name="line.388"></a> <FONT color="green">389</FONT> reportException(methodCall, s);<a name="line.389"></a> <FONT color="green">390</FONT> throw s;<a name="line.390"></a> <FONT color="green">391</FONT> }<a name="line.391"></a> <FONT color="green">392</FONT> <a name="line.392"></a> <FONT color="green">393</FONT> }<a name="line.393"></a> <FONT color="green">394</FONT> <a name="line.394"></a> <FONT color="green">395</FONT> public Timestamp getTimestamp(int columnIndex, Calendar cal) throws SQLException<a name="line.395"></a> <FONT color="green">396</FONT> {<a name="line.396"></a> <FONT color="green">397</FONT> String methodCall = "getTimestamp(" + columnIndex + ", " + cal + ")";<a name="line.397"></a> <FONT color="green">398</FONT> try<a name="line.398"></a> <FONT color="green">399</FONT> {<a name="line.399"></a> <FONT color="green">400</FONT> return (Timestamp) reportReturn(methodCall, realResultSet.getTimestamp(columnIndex, cal));<a name="line.400"></a> <FONT color="green">401</FONT> }<a name="line.401"></a> <FONT color="green">402</FONT> catch (SQLException s)<a name="line.402"></a> <FONT color="green">403</FONT> {<a name="line.403"></a> <FONT color="green">404</FONT> reportException(methodCall, s);<a name="line.404"></a> <FONT color="green">405</FONT> throw s;<a name="line.405"></a> <FONT color="green">406</FONT> }<a name="line.406"></a> <FONT color="green">407</FONT> <a name="line.407"></a> <FONT color="green">408</FONT> }<a name="line.408"></a> <FONT color="green">409</FONT> <a name="line.409"></a> <FONT color="green">410</FONT> public Timestamp getTimestamp(String columnName, Calendar cal) throws SQLException<a name="line.410"></a> <FONT color="green">411</FONT> {<a name="line.411"></a> <FONT color="green">412</FONT> String methodCall = "getTimestamp(" + columnName + ", " + cal + ")";<a name="line.412"></a> <FONT color="green">413</FONT> try<a name="line.413"></a> <FONT color="green">414</FONT> {<a name="line.414"></a> <FONT color="green">415</FONT> return (Timestamp) reportReturn(methodCall, realResultSet.getTimestamp(columnName, cal));<a name="line.415"></a> <FONT color="green">416</FONT> }<a name="line.416"></a> <FONT color="green">417</FONT> catch (SQLException s)<a name="line.417"></a> <FONT color="green">418</FONT> {<a name="line.418"></a> <FONT color="green">419</FONT> reportException(methodCall, s);<a name="line.419"></a> <FONT color="green">420</FONT> throw s;<a name="line.420"></a> <FONT color="green">421</FONT> }<a name="line.421"></a> <FONT color="green">422</FONT> }<a name="line.422"></a> <FONT color="green">423</FONT> <a name="line.423"></a> <FONT color="green">424</FONT> public void moveToInsertRow() throws SQLException<a name="line.424"></a> <FONT color="green">425</FONT> {<a name="line.425"></a> <FONT color="green">426</FONT> String methodCall = "moveToInsertRow()";<a name="line.426"></a> <FONT color="green">427</FONT> try<a name="line.427"></a> <FONT color="green">428</FONT> {<a name="line.428"></a> <FONT color="green">429</FONT> realResultSet.moveToInsertRow();<a name="line.429"></a> <FONT color="green">430</FONT> }<a name="line.430"></a> <FONT color="green">431</FONT> catch (SQLException s)<a name="line.431"></a> <FONT color="green">432</FONT> {<a name="line.432"></a> <FONT color="green">433</FONT> reportException(methodCall, s);<a name="line.433"></a> <FONT color="green">434</FONT> throw s;<a name="line.434"></a> <FONT color="green">435</FONT> }<a name="line.435"></a> <FONT color="green">436</FONT> reportReturn(methodCall);<a name="line.436"></a> <FONT color="green">437</FONT> }<a name="line.437"></a> <FONT color="green">438</FONT> <a name="line.438"></a> <FONT color="green">439</FONT> public boolean relative(int rows) throws SQLException<a name="line.439"></a> <FONT color="green">440</FONT> {<a name="line.440"></a> <FONT color="green">441</FONT> String methodCall = "relative(" + rows + ")";<a name="line.441"></a> <FONT color="green">442</FONT> try<a name="line.442"></a> <FONT color="green">443</FONT> {<a name="line.443"></a> <FONT color="green">444</FONT> return reportReturn(methodCall, realResultSet.relative(rows));<a name="line.444"></a> <FONT color="green">445</FONT> }<a name="line.445"></a> <FONT color="green">446</FONT> catch (SQLException s)<a name="line.446"></a> <FONT color="green">447</FONT> {<a name="line.447"></a> <FONT color="green">448</FONT> reportException(methodCall, s);<a name="line.448"></a> <FONT color="green">449</FONT> throw s;<a name="line.449"></a> <FONT color="green">450</FONT> }<a name="line.450"></a> <FONT color="green">451</FONT> }<a name="line.451"></a> <FONT color="green">452</FONT> <a name="line.452"></a> <FONT color="green">453</FONT> public boolean previous() throws SQLException<a name="line.453"></a> <FONT color="green">454</FONT> {<a name="line.454"></a> <FONT color="green">455</FONT> String methodCall = "previous()";<a name="line.455"></a> <FONT color="green">456</FONT> try<a name="line.456"></a> <FONT color="green">457</FONT> {<a name="line.457"></a> <FONT color="green">458</FONT> return reportReturn(methodCall, realResultSet.previous());<a name="line.458"></a> <FONT color="green">459</FONT> }<a name="line.459"></a> <FONT color="green">460</FONT> catch (SQLException s)<a name="line.460"></a> <FONT color="green">461</FONT> {<a name="line.461"></a> <FONT color="green">462</FONT> reportException(methodCall, s);<a name="line.462"></a> <FONT color="green">463</FONT> throw s;<a name="line.463"></a> <FONT color="green">464</FONT> }<a name="line.464"></a> <FONT color="green">465</FONT> }<a name="line.465"></a> <FONT color="green">466</FONT> <a name="line.466"></a> <FONT color="green">467</FONT> public void moveToCurrentRow() throws SQLException<a name="line.467"></a> <FONT color="green">468</FONT> {<a name="line.468"></a> <FONT color="green">469</FONT> String methodCall = "moveToCurrentRow()";<a name="line.469"></a> <FONT color="green">470</FONT> try<a name="line.470"></a> <FONT color="green">471</FONT> {<a name="line.471"></a> <FONT color="green">472</FONT> realResultSet.moveToCurrentRow();<a name="line.472"></a> <FONT color="green">473</FONT> }<a name="line.473"></a> <FONT color="green">474</FONT> catch (SQLException s)<a name="line.474"></a> <FONT color="green">475</FONT> {<a name="line.475"></a> <FONT color="green">476</FONT> reportException(methodCall, s);<a name="line.476"></a> <FONT color="green">477</FONT> throw s;<a name="line.477"></a> <FONT color="green">478</FONT> }<a name="line.478"></a> <FONT color="green">479</FONT> reportReturn(methodCall);<a name="line.479"></a> <FONT color="green">480</FONT> }<a name="line.480"></a> <FONT color="green">481</FONT> <a name="line.481"></a> <FONT color="green">482</FONT> public Ref getRef(int i) throws SQLException<a name="line.482"></a> <FONT color="green">483</FONT> {<a name="line.483"></a> <FONT color="green">484</FONT> String methodCall = "getRef(" + i + ")";<a name="line.484"></a> <FONT color="green">485</FONT> try<a name="line.485"></a> <FONT color="green">486</FONT> {<a name="line.486"></a> <FONT color="green">487</FONT> return (Ref) reportReturn(methodCall, realResultSet.getRef(i));<a name="line.487"></a> <FONT color="green">488</FONT> }<a name="line.488"></a> <FONT color="green">489</FONT> catch (SQLException s)<a name="line.489"></a> <FONT color="green">490</FONT> {<a name="line.490"></a> <FONT color="green">491</FONT> reportException(methodCall, s);<a name="line.491"></a> <FONT color="green">492</FONT> throw s;<a name="line.492"></a> <FONT color="green">493</FONT> }<a name="line.493"></a> <FONT color="green">494</FONT> }<a name="line.494"></a> <FONT color="green">495</FONT> <a name="line.495"></a> <FONT color="green">496</FONT> public void updateRef(int columnIndex, Ref x) throws SQLException<a name="line.496"></a> <FONT color="green">497</FONT> {<a name="line.497"></a> <FONT color="green">498</FONT> String methodCall = "updateRef(" + columnIndex + ", " + x + ")";<a name="line.498"></a> <FONT color="green">499</FONT> try<a name="line.499"></a> <FONT color="green">500</FONT> {<a name="line.500"></a> <FONT color="green">501</FONT> realResultSet.updateRef(columnIndex, x);<a name="line.501"></a> <FONT color="green">502</FONT> }<a name="line.502"></a> <FONT color="green">503</FONT> catch (SQLException s)<a name="line.503"></a> <FONT color="green">504</FONT> {<a name="line.504"></a> <FONT color="green">505</FONT> reportException(methodCall, s);<a name="line.505"></a> <FONT color="green">506</FONT> throw s;<a name="line.506"></a> <FONT color="green">507</FONT> }<a name="line.507"></a> <FONT color="green">508</FONT> reportReturn(methodCall);<a name="line.508"></a> <FONT color="green">509</FONT> }<a name="line.509"></a> <FONT color="green">510</FONT> <a name="line.510"></a> <FONT color="green">511</FONT> public Ref getRef(String colName) throws SQLException<a name="line.511"></a> <FONT color="green">512</FONT> {<a name="line.512"></a> <FONT color="green">513</FONT> String methodCall = "getRef(" + colName + ")";<a name="line.513"></a> <FONT color="green">514</FONT> try<a name="line.514"></a> <FONT color="green">515</FONT> {<a name="line.515"></a> <FONT color="green">516</FONT> return (Ref) reportReturn(methodCall, realResultSet.getRef(colName));<a name="line.516"></a> <FONT color="green">517</FONT> }<a name="line.517"></a> <FONT color="green">518</FONT> catch (SQLException s)<a name="line.518"></a> <FONT color="green">519</FONT> {<a name="line.519"></a> <FONT color="green">520</FONT> reportException(methodCall, s);<a name="line.520"></a> <FONT color="green">521</FONT> throw s;<a name="line.521"></a> <FONT color="green">522</FONT> }<a name="line.522"></a> <FONT color="green">523</FONT> }<a name="line.523"></a> <FONT color="green">524</FONT> <a name="line.524"></a> <FONT color="green">525</FONT> public void updateRef(String columnName, Ref x) throws SQLException<a name="line.525"></a> <FONT color="green">526</FONT> {<a name="line.526"></a> <FONT color="green">527</FONT> String methodCall = "updateRef(" + columnName + ", " + x + ")";<a name="line.527"></a> <FONT color="green">528</FONT> try<a name="line.528"></a> <FONT color="green">529</FONT> {<a name="line.529"></a> <FONT color="green">530</FONT> realResultSet.updateRef(columnName, x);<a name="line.530"></a> <FONT color="green">531</FONT> }<a name="line.531"></a> <FONT color="green">532</FONT> catch (SQLException s)<a name="line.532"></a> <FONT color="green">533</FONT> {<a name="line.533"></a> <FONT color="green">534</FONT> reportException(methodCall, s);<a name="line.534"></a> <FONT color="green">535</FONT> throw s;<a name="line.535"></a> <FONT color="green">536</FONT> }<a name="line.536"></a> <FONT color="green">537</FONT> reportReturn(methodCall);<a name="line.537"></a> <FONT color="green">538</FONT> }<a name="line.538"></a> <FONT color="green">539</FONT> <a name="line.539"></a> <FONT color="green">540</FONT> public Blob getBlob(int i) throws SQLException<a name="line.540"></a> <FONT color="green">541</FONT> {<a name="line.541"></a> <FONT color="green">542</FONT> String methodCall = "getBlob(" + i + ")";<a name="line.542"></a> <FONT color="green">543</FONT> try<a name="line.543"></a> <FONT color="green">544</FONT> {<a name="line.544"></a> <FONT color="green">545</FONT> return (Blob) reportReturn(methodCall, realResultSet.getBlob(i));<a name="line.545"></a> <FONT color="green">546</FONT> }<a name="line.546"></a> <FONT color="green">547</FONT> catch (SQLException s)<a name="line.547"></a> <FONT color="green">548</FONT> {<a name="line.548"></a> <FONT color="green">549</FONT> reportException(methodCall, s);<a name="line.549"></a> <FONT color="green">550</FONT> throw s;<a name="line.550"></a> <FONT color="green">551</FONT> }<a name="line.551"></a> <FONT color="green">552</FONT> }<a name="line.552"></a> <FONT color="green">553</FONT> <a name="line.553"></a> <FONT color="green">554</FONT> public void updateBlob(int columnIndex, Blob x) throws SQLException<a name="line.554"></a> <FONT color="green">555</FONT> {<a name="line.555"></a> <FONT color="green">556</FONT> String methodCall = "updateBlob(" + columnIndex + ", " + x + ")";<a name="line.556"></a> <FONT color="green">557</FONT> try<a name="line.557"></a> <FONT color="green">558</FONT> {<a name="line.558"></a> <FONT color="green">559</FONT> realResultSet.updateBlob(columnIndex, x);<a name="line.559"></a> <FONT color="green">560</FONT> }<a name="line.560"></a> <FONT color="green">561</FONT> catch (SQLException s)<a name="line.561"></a> <FONT color="green">562</FONT> {<a name="line.562"></a> <FONT color="green">563</FONT> reportException(methodCall, s);<a name="line.563"></a> <FONT color="green">564</FONT> throw s;<a name="line.564"></a> <FONT color="green">565</FONT> }<a name="line.565"></a> <FONT color="green">566</FONT> reportReturn(methodCall);<a name="line.566"></a> <FONT color="green">567</FONT> }<a name="line.567"></a> <FONT color="green">568</FONT> <a name="line.568"></a> <FONT color="green">569</FONT> public Blob getBlob(String colName) throws SQLException<a name="line.569"></a> <FONT color="green">570</FONT> {<a name="line.570"></a> <FONT color="green">571</FONT> String methodCall = "getBlob(" + colName + ")";<a name="line.571"></a> <FONT color="green">572</FONT> try<a name="line.572"></a> <FONT color="green">573</FONT> {<a name="line.573"></a> <FONT color="green">574</FONT> return (Blob) reportReturn(methodCall, realResultSet.getBlob(colName));<a name="line.574"></a> <FONT color="green">575</FONT> }<a name="line.575"></a> <FONT color="green">576</FONT> catch (SQLException s)<a name="line.576"></a> <FONT color="green">577</FONT> {<a name="line.577"></a> <FONT color="green">578</FONT> reportException(methodCall, s);<a name="line.578"></a> <FONT color="green">579</FONT> throw s;<a name="line.579"></a> <FONT color="green">580</FONT> }<a name="line.580"></a> <FONT color="green">581</FONT> }<a name="line.581"></a> <FONT color="green">582</FONT> <a name="line.582"></a> <FONT color="green">583</FONT> public void updateBlob(String columnName, Blob x) throws SQLException<a name="line.583"></a> <FONT color="green">584</FONT> {<a name="line.584"></a> <FONT color="green">585</FONT> String methodCall = "updateBlob(" + columnName + ", " + x + ")";<a name="line.585"></a> <FONT color="green">586</FONT> try<a name="line.586"></a> <FONT color="green">587</FONT> {<a name="line.587"></a> <FONT color="green">588</FONT> realResultSet.updateBlob(columnName, x);<a name="line.588"></a> <FONT color="green">589</FONT> }<a name="line.589"></a> <FONT color="green">590</FONT> catch (SQLException s)<a name="line.590"></a> <FONT color="green">591</FONT> {<a name="line.591"></a> <FONT color="green">592</FONT> reportException(methodCall, s);<a name="line.592"></a> <FONT color="green">593</FONT> throw s;<a name="line.593"></a> <FONT color="green">594</FONT> }<a name="line.594"></a> <FONT color="green">595</FONT> reportReturn(methodCall);<a name="line.595"></a> <FONT color="green">596</FONT> }<a name="line.596"></a> <FONT color="green">597</FONT> <a name="line.597"></a> <FONT color="green">598</FONT> public Clob getClob(int i) throws SQLException<a name="line.598"></a> <FONT color="green">599</FONT> {<a name="line.599"></a> <FONT color="green">600</FONT> String methodCall = "getClob(" + i + ")";<a name="line.600"></a> <FONT color="green">601</FONT> try<a name="line.601"></a> <FONT color="green">602</FONT> {<a name="line.602"></a> <FONT color="green">603</FONT> return (Clob) reportReturn(methodCall, realResultSet.getClob(i));<a name="line.603"></a> <FONT color="green">604</FONT> }<a name="line.604"></a> <FONT color="green">605</FONT> catch (SQLException s)<a name="line.605"></a> <FONT color="green">606</FONT> {<a name="line.606"></a> <FONT color="green">607</FONT> reportException(methodCall, s);<a name="line.607"></a> <FONT color="green">608</FONT> throw s;<a name="line.608"></a> <FONT color="green">609</FONT> }<a name="line.609"></a> <FONT color="green">610</FONT> }<a name="line.610"></a> <FONT color="green">611</FONT> <a name="line.611"></a> <FONT color="green">612</FONT> public void updateClob(int columnIndex, Clob x) throws SQLException<a name="line.612"></a> <FONT color="green">613</FONT> {<a name="line.613"></a> <FONT color="green">614</FONT> String methodCall = "updateClob(" + columnIndex + ", " + x + ")";<a name="line.614"></a> <FONT color="green">615</FONT> try<a name="line.615"></a> <FONT color="green">616</FONT> {<a name="line.616"></a> <FONT color="green">617</FONT> realResultSet.updateClob(columnIndex, x);<a name="line.617"></a> <FONT color="green">618</FONT> }<a name="line.618"></a> <FONT color="green">619</FONT> catch (SQLException s)<a name="line.619"></a> <FONT color="green">620</FONT> {<a name="line.620"></a> <FONT color="green">621</FONT> reportException(methodCall, s);<a name="line.621"></a> <FONT color="green">622</FONT> throw s;<a name="line.622"></a> <FONT color="green">623</FONT> }<a name="line.623"></a> <FONT color="green">624</FONT> reportReturn(methodCall);<a name="line.624"></a> <FONT color="green">625</FONT> }<a name="line.625"></a> <FONT color="green">626</FONT> <a name="line.626"></a> <FONT color="green">627</FONT> public Clob getClob(String colName) throws SQLException<a name="line.627"></a> <FONT color="green">628</FONT> {<a name="line.628"></a> <FONT color="green">629</FONT> String methodCall = "getClob(" + colName + ")";<a name="line.629"></a> <FONT color="green">630</FONT> try<a name="line.630"></a> <FONT color="green">631</FONT> {<a name="line.631"></a> <FONT color="green">632</FONT> return (Clob) reportReturn(methodCall, realResultSet.getClob(colName));<a name="line.632"></a> <FONT color="green">633</FONT> }<a name="line.633"></a> <FONT color="green">634</FONT> catch (SQLException s)<a name="line.634"></a> <FONT color="green">635</FONT> {<a name="line.635"></a> <FONT color="green">636</FONT> reportException(methodCall, s);<a name="line.636"></a> <FONT color="green">637</FONT> throw s;<a name="line.637"></a> <FONT color="green">638</FONT> }<a name="line.638"></a> <FONT color="green">639</FONT> }<a name="line.639"></a> <FONT color="green">640</FONT> <a name="line.640"></a> <FONT color="green">641</FONT> public void updateClob(String columnName, Clob x) throws SQLException<a name="line.641"></a> <FONT color="green">642</FONT> {<a name="line.642"></a> <FONT color="green">643</FONT> String methodCall = "updateClob(" + columnName + ", " + x + ")";<a name="line.643"></a> <FONT color="green">644</FONT> try<a name="line.644"></a> <FONT color="green">645</FONT> {<a name="line.645"></a> <FONT color="green">646</FONT> realResultSet.updateClob(columnName, x);<a name="line.646"></a> <FONT color="green">647</FONT> }<a name="line.647"></a> <FONT color="green">648</FONT> catch (SQLException s)<a name="line.648"></a> <FONT color="green">649</FONT> {<a name="line.649"></a> <FONT color="green">650</FONT> reportException(methodCall, s);<a name="line.650"></a> <FONT color="green">651</FONT> throw s;<a name="line.651"></a> <FONT color="green">652</FONT> }<a name="line.652"></a> <FONT color="green">653</FONT> reportReturn(methodCall);<a name="line.653"></a> <FONT color="green">654</FONT> }<a name="line.654"></a> <FONT color="green">655</FONT> <a name="line.655"></a> <FONT color="green">656</FONT> public boolean getBoolean(int columnIndex) throws SQLException<a name="line.656"></a> <FONT color="green">657</FONT> {<a name="line.657"></a> <FONT color="green">658</FONT> String methodCall = "getBoolean(" + columnIndex + ")";<a name="line.658"></a> <FONT color="green">659</FONT> try<a name="line.659"></a> <FONT color="green">660</FONT> {<a name="line.660"></a> <FONT color="green">661</FONT> return reportReturn(methodCall, realResultSet.getBoolean(columnIndex));<a name="line.661"></a> <FONT color="green">662</FONT> }<a name="line.662"></a> <FONT color="green">663</FONT> catch (SQLException s)<a name="line.663"></a> <FONT color="green">664</FONT> {<a name="line.664"></a> <FONT color="green">665</FONT> reportException(methodCall, s);<a name="line.665"></a> <FONT color="green">666</FONT> throw s;<a name="line.666"></a> <FONT color="green">667</FONT> }<a name="line.667"></a> <FONT color="green">668</FONT> }<a name="line.668"></a> <FONT color="green">669</FONT> <a name="line.669"></a> <FONT color="green">670</FONT> public boolean getBoolean(String columnName) throws SQLException<a name="line.670"></a> <FONT color="green">671</FONT> {<a name="line.671"></a> <FONT color="green">672</FONT> String methodCall = "getBoolean(" + columnName + ")";<a name="line.672"></a> <FONT color="green">673</FONT> try<a name="line.673"></a> <FONT color="green">674</FONT> {<a name="line.674"></a> <FONT color="green">675</FONT> return reportReturn(methodCall, realResultSet.getBoolean(columnName));<a name="line.675"></a> <FONT color="green">676</FONT> }<a name="line.676"></a> <FONT color="green">677</FONT> catch (SQLException s)<a name="line.677"></a> <FONT color="green">678</FONT> {<a name="line.678"></a> <FONT color="green">679</FONT> reportException(methodCall, s);<a name="line.679"></a> <FONT color="green">680</FONT> throw s;<a name="line.680"></a> <FONT color="green">681</FONT> }<a name="line.681"></a> <FONT color="green">682</FONT> }<a name="line.682"></a> <FONT color="green">683</FONT> <a name="line.683"></a> <FONT color="green">684</FONT> public Array getArray(int i) throws SQLException<a name="line.684"></a> <FONT color="green">685</FONT> {<a name="line.685"></a> <FONT color="green">686</FONT> String methodCall = "getArray(" + i + ")";<a name="line.686"></a> <FONT color="green">687</FONT> try<a name="line.687"></a> <FONT color="green">688</FONT> {<a name="line.688"></a> <FONT color="green">689</FONT> return (Array) reportReturn(methodCall, realResultSet.getArray(i));<a name="line.689"></a> <FONT color="green">690</FONT> }<a name="line.690"></a> <FONT color="green">691</FONT> catch (SQLException s)<a name="line.691"></a> <FONT color="green">692</FONT> {<a name="line.692"></a> <FONT color="green">693</FONT> reportException(methodCall, s);<a name="line.693"></a> <FONT color="green">694</FONT> throw s;<a name="line.694"></a> <FONT color="green">695</FONT> }<a name="line.695"></a> <FONT color="green">696</FONT> }<a name="line.696"></a> <FONT color="green">697</FONT> <a name="line.697"></a> <FONT color="green">698</FONT> public void updateArray(int columnIndex, Array x) throws SQLException<a name="line.698"></a> <FONT color="green">699</FONT> {<a name="line.699"></a> <FONT color="green">700</FONT> String methodCall = "updateArray(" + columnIndex + ", " + x + ")";<a name="line.700"></a> <FONT color="green">701</FONT> try<a name="line.701"></a> <FONT color="green">702</FONT> {<a name="line.702"></a> <FONT color="green">703</FONT> realResultSet.updateArray(columnIndex, x);<a name="line.703"></a> <FONT color="green">704</FONT> }<a name="line.704"></a> <FONT color="green">705</FONT> catch (SQLException s)<a name="line.705"></a> <FONT color="green">706</FONT> {<a name="line.706"></a> <FONT color="green">707</FONT> reportException(methodCall, s);<a name="line.707"></a> <FONT color="green">708</FONT> throw s;<a name="line.708"></a> <FONT color="green">709</FONT> }<a name="line.709"></a> <FONT color="green">710</FONT> reportReturn(methodCall);<a name="line.710"></a> <FONT color="green">711</FONT> }<a name="line.711"></a> <FONT color="green">712</FONT> <a name="line.712"></a> <FONT color="green">713</FONT> public Array getArray(String colName) throws SQLException<a name="line.713"></a> <FONT color="green">714</FONT> {<a name="line.714"></a> <FONT color="green">715</FONT> String methodCall = "getArray(" + colName + ")";<a name="line.715"></a> <FONT color="green">716</FONT> try<a name="line.716"></a> <FONT color="green">717</FONT> {<a name="line.717"></a> <FONT color="green">718</FONT> return (Array) reportReturn(methodCall, realResultSet.getArray(colName));<a name="line.718"></a> <FONT color="green">719</FONT> }<a name="line.719"></a> <FONT color="green">720</FONT> catch (SQLException s)<a name="line.720"></a> <FONT color="green">721</FONT> {<a name="line.721"></a> <FONT color="green">722</FONT> reportException(methodCall, s);<a name="line.722"></a> <FONT color="green">723</FONT> throw s;<a name="line.723"></a> <FONT color="green">724</FONT> }<a name="line.724"></a> <FONT color="green">725</FONT> }<a name="line.725"></a> <FONT color="green">726</FONT> <a name="line.726"></a> <FONT color="green">727</FONT> public void updateArray(String columnName, Array x) throws SQLException<a name="line.727"></a> <FONT color="green">728</FONT> {<a name="line.728"></a> <FONT color="green">729</FONT> String methodCall = "updateArray(" + columnName + ", " + x + ")";<a name="line.729"></a> <FONT color="green">730</FONT> try<a name="line.730"></a> <FONT color="green">731</FONT> {<a name="line.731"></a> <FONT color="green">732</FONT> realResultSet.updateArray(columnName, x);<a name="line.732"></a> <FONT color="green">733</FONT> }<a name="line.733"></a> <FONT color="green">734</FONT> catch (SQLException s)<a name="line.734"></a> <FONT color="green">735</FONT> {<a name="line.735"></a> <FONT color="green">736</FONT> reportException(methodCall, s);<a name="line.736"></a> <FONT color="green">737</FONT> throw s;<a name="line.737"></a> <FONT color="green">738</FONT> }<a name="line.738"></a> <FONT color="green">739</FONT> reportReturn(methodCall);<a name="line.739"></a> <FONT color="green">740</FONT> }<a name="line.740"></a> <FONT color="green">741</FONT> <a name="line.741"></a> <FONT color="green">742</FONT> public RowId getRowId(int columnIndex) throws SQLException {<a name="line.742"></a> <FONT color="green">743</FONT> String methodCall = "getRowId(" + columnIndex + ")";<a name="line.743"></a> <FONT color="green">744</FONT> try<a name="line.744"></a> <FONT color="green">745</FONT> {<a name="line.745"></a> <FONT color="green">746</FONT> return (RowId) reportReturn(methodCall, realResultSet.getRowId(columnIndex));<a name="line.746"></a> <FONT color="green">747</FONT> }<a name="line.747"></a> <FONT color="green">748</FONT> catch (SQLException s)<a name="line.748"></a> <FONT color="green">749</FONT> {<a name="line.749"></a> <FONT color="green">750</FONT> reportException(methodCall, s);<a name="line.750"></a> <FONT color="green">751</FONT> throw s;<a name="line.751"></a> <FONT color="green">752</FONT> }<a name="line.752"></a> <FONT color="green">753</FONT> }<a name="line.753"></a> <FONT color="green">754</FONT> <a name="line.754"></a> <FONT color="green">755</FONT> public RowId getRowId(String columnLabel) throws SQLException {<a name="line.755"></a> <FONT color="green">756</FONT> String methodCall = "getRowId(" + columnLabel + ")";<a name="line.756"></a> <FONT color="green">757</FONT> try<a name="line.757"></a> <FONT color="green">758</FONT> {<a name="line.758"></a> <FONT color="green">759</FONT> return (RowId) reportReturn(methodCall, realResultSet.getRowId(columnLabel));<a name="line.759"></a> <FONT color="green">760</FONT> }<a name="line.760"></a> <FONT color="green">761</FONT> catch (SQLException s)<a name="line.761"></a> <FONT color="green">762</FONT> {<a name="line.762"></a> <FONT color="green">763</FONT> reportException(methodCall, s);<a name="line.763"></a> <FONT color="green">764</FONT> throw s;<a name="line.764"></a> <FONT color="green">765</FONT> }<a name="line.765"></a> <FONT color="green">766</FONT> }<a name="line.766"></a> <FONT color="green">767</FONT> <a name="line.767"></a> <FONT color="green">768</FONT> public void updateRowId(int columnIndex, RowId x) throws SQLException {<a name="line.768"></a> <FONT color="green">769</FONT> String methodCall = "updateRowId(" + columnIndex + ", " + x + ")";<a name="line.769"></a> <FONT color="green">770</FONT> try<a name="line.770"></a> <FONT color="green">771</FONT> {<a name="line.771"></a> <FONT color="green">772</FONT> realResultSet.updateRowId(columnIndex, x);<a name="line.772"></a> <FONT color="green">773</FONT> }<a name="line.773"></a> <FONT color="green">774</FONT> catch (SQLException s)<a name="line.774"></a> <FONT color="green">775</FONT> {<a name="line.775"></a> <FONT color="green">776</FONT> reportException(methodCall, s);<a name="line.776"></a> <FONT color="green">777</FONT> throw s;<a name="line.777"></a> <FONT color="green">778</FONT> }<a name="line.778"></a> <FONT color="green">779</FONT> reportReturn(methodCall);<a name="line.779"></a> <FONT color="green">780</FONT> }<a name="line.780"></a> <FONT color="green">781</FONT> <a name="line.781"></a> <FONT color="green">782</FONT> public void updateRowId(String columnLabel, RowId x) throws SQLException {<a name="line.782"></a> <FONT color="green">783</FONT> String methodCall = "updateRowId(" + columnLabel + ", " + x + ")";<a name="line.783"></a> <FONT color="green">784</FONT> try<a name="line.784"></a> <FONT color="green">785</FONT> {<a name="line.785"></a> <FONT color="green">786</FONT> realResultSet.updateRowId(columnLabel, x);<a name="line.786"></a> <FONT color="green">787</FONT> }<a name="line.787"></a> <FONT color="green">788</FONT> catch (SQLException s)<a name="line.788"></a> <FONT color="green">789</FONT> {<a name="line.789"></a> <FONT color="green">790</FONT> reportException(methodCall, s);<a name="line.790"></a> <FONT color="green">791</FONT> throw s;<a name="line.791"></a> <FONT color="green">792</FONT> }<a name="line.792"></a> <FONT color="green">793</FONT> reportReturn(methodCall);<a name="line.793"></a> <FONT color="green">794</FONT> }<a name="line.794"></a> <FONT color="green">795</FONT> <a name="line.795"></a> <FONT color="green">796</FONT> public int getHoldability() throws SQLException {<a name="line.796"></a> <FONT color="green">797</FONT> String methodCall = "getHoldability()";<a name="line.797"></a> <FONT color="green">798</FONT> try<a name="line.798"></a> <FONT color="green">799</FONT> {<a name="line.799"></a> <FONT color="green">800</FONT> return reportReturn(methodCall, realResultSet.getHoldability());<a name="line.800"></a> <FONT color="green">801</FONT> }<a name="line.801"></a> <FONT color="green">802</FONT> catch (SQLException s)<a name="line.802"></a> <FONT color="green">803</FONT> {<a name="line.803"></a> <FONT color="green">804</FONT> reportException(methodCall, s);<a name="line.804"></a> <FONT color="green">805</FONT> throw s;<a name="line.805"></a> <FONT color="green">806</FONT> }<a name="line.806"></a> <FONT color="green">807</FONT> }<a name="line.807"></a> <FONT color="green">808</FONT> <a name="line.808"></a> <FONT color="green">809</FONT> public boolean isClosed() throws SQLException {<a name="line.809"></a> <FONT color="green">810</FONT> String methodCall = "isClosed()";<a name="line.810"></a> <FONT color="green">811</FONT> try<a name="line.811"></a> <FONT color="green">812</FONT> {<a name="line.812"></a> <FONT color="green">813</FONT> return reportReturn(methodCall, realResultSet.isClosed());<a name="line.813"></a> <FONT color="green">814</FONT> }<a name="line.814"></a> <FONT color="green">815</FONT> catch (SQLException s)<a name="line.815"></a> <FONT color="green">816</FONT> {<a name="line.816"></a> <FONT color="green">817</FONT> reportException(methodCall, s);<a name="line.817"></a> <FONT color="green">818</FONT> throw s;<a name="line.818"></a> <FONT color="green">819</FONT> }<a name="line.819"></a> <FONT color="green">820</FONT> }<a name="line.820"></a> <FONT color="green">821</FONT> <a name="line.821"></a> <FONT color="green">822</FONT> public void updateNString(int columnIndex, String nString) throws SQLException {<a name="line.822"></a> <FONT color="green">823</FONT> String methodCall = "updateNString(" + columnIndex + ", " + nString + ")";<a name="line.823"></a> <FONT color="green">824</FONT> try<a name="line.824"></a> <FONT color="green">825</FONT> {<a name="line.825"></a> <FONT color="green">826</FONT> realResultSet.updateNString(columnIndex, nString);<a name="line.826"></a> <FONT color="green">827</FONT> }<a name="line.827"></a> <FONT color="green">828</FONT> catch (SQLException s)<a name="line.828"></a> <FONT color="green">829</FONT> {<a name="line.829"></a> <FONT color="green">830</FONT> reportException(methodCall, s);<a name="line.830"></a> <FONT color="green">831</FONT> throw s;<a name="line.831"></a> <FONT color="green">832</FONT> }<a name="line.832"></a> <FONT color="green">833</FONT> reportReturn(methodCall);<a name="line.833"></a> <FONT color="green">834</FONT> }<a name="line.834"></a> <FONT color="green">835</FONT> <a name="line.835"></a> <FONT color="green">836</FONT> public void updateNString(String columnLabel, String nString) throws SQLException {<a name="line.836"></a> <FONT color="green">837</FONT> String methodCall = "updateNString(" + columnLabel + ", " + nString + ")";<a name="line.837"></a> <FONT color="green">838</FONT> try<a name="line.838"></a> <FONT color="green">839</FONT> {<a name="line.839"></a> <FONT color="green">840</FONT> realResultSet.updateNString(columnLabel, nString);<a name="line.840"></a> <FONT color="green">841</FONT> }<a name="line.841"></a> <FONT color="green">842</FONT> catch (SQLException s)<a name="line.842"></a> <FONT color="green">843</FONT> {<a name="line.843"></a> <FONT color="green">844</FONT> reportException(methodCall, s);<a name="line.844"></a> <FONT color="green">845</FONT> throw s;<a name="line.845"></a> <FONT color="green">846</FONT> }<a name="line.846"></a> <FONT color="green">847</FONT> reportReturn(methodCall);<a name="line.847"></a> <FONT color="green">848</FONT> }<a name="line.848"></a> <FONT color="green">849</FONT> <a name="line.849"></a> <FONT color="green">850</FONT> public void updateNClob(int columnIndex, NClob nClob) throws SQLException {<a name="line.850"></a> <FONT color="green">851</FONT> String methodCall = "updateNClob(" + columnIndex + ", " + nClob + ")";<a name="line.851"></a> <FONT color="green">852</FONT> try<a name="line.852"></a> <FONT color="green">853</FONT> {<a name="line.853"></a> <FONT color="green">854</FONT> realResultSet.updateNClob(columnIndex, nClob);<a name="line.854"></a> <FONT color="green">855</FONT> }<a name="line.855"></a> <FONT color="green">856</FONT> catch (SQLException s)<a name="line.856"></a> <FONT color="green">857</FONT> {<a name="line.857"></a> <FONT color="green">858</FONT> reportException(methodCall, s);<a name="line.858"></a> <FONT color="green">859</FONT> throw s;<a name="line.859"></a> <FONT color="green">860</FONT> }<a name="line.860"></a> <FONT color="green">861</FONT> reportReturn(methodCall);<a name="line.861"></a> <FONT color="green">862</FONT> }<a name="line.862"></a> <FONT color="green">863</FONT> <a name="line.863"></a> <FONT color="green">864</FONT> public void updateNClob(String columnLabel, NClob nClob) throws SQLException {<a name="line.864"></a> <FONT color="green">865</FONT> String methodCall = "updateNClob(" + columnLabel + ", " + nClob + ")";<a name="line.865"></a> <FONT color="green">866</FONT> try<a name="line.866"></a> <FONT color="green">867</FONT> {<a name="line.867"></a> <FONT color="green">868</FONT> realResultSet.updateNClob(columnLabel, nClob);<a name="line.868"></a> <FONT color="green">869</FONT> }<a name="line.869"></a> <FONT color="green">870</FONT> catch (SQLException s)<a name="line.870"></a> <FONT color="green">871</FONT> {<a name="line.871"></a> <FONT color="green">872</FONT> reportException(methodCall, s);<a name="line.872"></a> <FONT color="green">873</FONT> throw s;<a name="line.873"></a> <FONT color="green">874</FONT> }<a name="line.874"></a> <FONT color="green">875</FONT> reportReturn(methodCall);<a name="line.875"></a> <FONT color="green">876</FONT> }<a name="line.876"></a> <FONT color="green">877</FONT> <a name="line.877"></a> <FONT color="green">878</FONT> public NClob getNClob(int columnIndex) throws SQLException {<a name="line.878"></a> <FONT color="green">879</FONT> String methodCall = "getNClob(" + columnIndex + ")";<a name="line.879"></a> <FONT color="green">880</FONT> try<a name="line.880"></a> <FONT color="green">881</FONT> {<a name="line.881"></a> <FONT color="green">882</FONT> return (NClob) reportReturn(methodCall, realResultSet.getNClob(columnIndex));<a name="line.882"></a> <FONT color="green">883</FONT> }<a name="line.883"></a> <FONT color="green">884</FONT> catch (SQLException s)<a name="line.884"></a> <FONT color="green">885</FONT> {<a name="line.885"></a> <FONT color="green">886</FONT> reportException(methodCall, s);<a name="line.886"></a> <FONT color="green">887</FONT> throw s;<a name="line.887"></a> <FONT color="green">888</FONT> }<a name="line.888"></a> <FONT color="green">889</FONT> }<a name="line.889"></a> <FONT color="green">890</FONT> <a name="line.890"></a> <FONT color="green">891</FONT> public NClob getNClob(String columnLabel) throws SQLException {<a name="line.891"></a> <FONT color="green">892</FONT> String methodCall = "getNClob(" + columnLabel + ")";<a name="line.892"></a> <FONT color="green">893</FONT> try<a name="line.893"></a> <FONT color="green">894</FONT> {<a name="line.894"></a> <FONT color="green">895</FONT> return (NClob) reportReturn(methodCall, realResultSet.getNClob(columnLabel));<a name="line.895"></a> <FONT color="green">896</FONT> }<a name="line.896"></a> <FONT color="green">897</FONT> catch (SQLException s)<a name="line.897"></a> <FONT color="green">898</FONT> {<a name="line.898"></a> <FONT color="green">899</FONT> reportException(methodCall, s);<a name="line.899"></a> <FONT color="green">900</FONT> throw s;<a name="line.900"></a> <FONT color="green">901</FONT> }<a name="line.901"></a> <FONT color="green">902</FONT> }<a name="line.902"></a> <FONT color="green">903</FONT> <a name="line.903"></a> <FONT color="green">904</FONT> public SQLXML getSQLXML(int columnIndex) throws SQLException {<a name="line.904"></a> <FONT color="green">905</FONT> String methodCall = "getSQLXML(" + columnIndex + ")";<a name="line.905"></a> <FONT color="green">906</FONT> try<a name="line.906"></a> <FONT color="green">907</FONT> {<a name="line.907"></a> <FONT color="green">908</FONT> return (SQLXML) reportReturn(methodCall, realResultSet.getSQLXML(columnIndex));<a name="line.908"></a> <FONT color="green">909</FONT> }<a name="line.909"></a> <FONT color="green">910</FONT> catch (SQLException s)<a name="line.910"></a> <FONT color="green">911</FONT> {<a name="line.911"></a> <FONT color="green">912</FONT> reportException(methodCall, s);<a name="line.912"></a> <FONT color="green">913</FONT> throw s;<a name="line.913"></a> <FONT color="green">914</FONT> }<a name="line.914"></a> <FONT color="green">915</FONT> }<a name="line.915"></a> <FONT color="green">916</FONT> <a name="line.916"></a> <FONT color="green">917</FONT> public SQLXML getSQLXML(String columnLabel) throws SQLException {<a name="line.917"></a> <FONT color="green">918</FONT> String methodCall = "getSQLXML(" + columnLabel + ")";<a name="line.918"></a> <FONT color="green">919</FONT> try<a name="line.919"></a> <FONT color="green">920</FONT> {<a name="line.920"></a> <FONT color="green">921</FONT> return (SQLXML) reportReturn(methodCall, realResultSet.getSQLXML(columnLabel));<a name="line.921"></a> <FONT color="green">922</FONT> }<a name="line.922"></a> <FONT color="green">923</FONT> catch (SQLException s)<a name="line.923"></a> <FONT color="green">924</FONT> {<a name="line.924"></a> <FONT color="green">925</FONT> reportException(methodCall, s);<a name="line.925"></a> <FONT color="green">926</FONT> throw s;<a name="line.926"></a> <FONT color="green">927</FONT> }<a name="line.927"></a> <FONT color="green">928</FONT> }<a name="line.928"></a> <FONT color="green">929</FONT> <a name="line.929"></a> <FONT color="green">930</FONT> public void updateSQLXML(int columnIndex, SQLXML xmlObject) throws SQLException {<a name="line.930"></a> <FONT color="green">931</FONT> String methodCall = "updateSQLXML(" + columnIndex + ", " + xmlObject + ")";<a name="line.931"></a> <FONT color="green">932</FONT> try<a name="line.932"></a> <FONT color="green">933</FONT> {<a name="line.933"></a> <FONT color="green">934</FONT> realResultSet.updateSQLXML(columnIndex, xmlObject);<a name="line.934"></a> <FONT color="green">935</FONT> }<a name="line.935"></a> <FONT color="green">936</FONT> catch (SQLException s)<a name="line.936"></a> <FONT color="green">937</FONT> {<a name="line.937"></a> <FONT color="green">938</FONT> reportException(methodCall, s);<a name="line.938"></a> <FONT color="green">939</FONT> throw s;<a name="line.939"></a> <FONT color="green">940</FONT> }<a name="line.940"></a> <FONT color="green">941</FONT> reportReturn(methodCall);<a name="line.941"></a> <FONT color="green">942</FONT> }<a name="line.942"></a> <FONT color="green">943</FONT> <a name="line.943"></a> <FONT color="green">944</FONT> public void updateSQLXML(String columnLabel, SQLXML xmlObject) throws SQLException {<a name="line.944"></a> <FONT color="green">945</FONT> String methodCall = "updateSQLXML(" + columnLabel + ", " + xmlObject + ")";<a name="line.945"></a> <FONT color="green">946</FONT> try<a name="line.946"></a> <FONT color="green">947</FONT> {<a name="line.947"></a> <FONT color="green">948</FONT> realResultSet.updateSQLXML(columnLabel, xmlObject);<a name="line.948"></a> <FONT color="green">949</FONT> }<a name="line.949"></a> <FONT color="green">950</FONT> catch (SQLException s)<a name="line.950"></a> <FONT color="green">951</FONT> {<a name="line.951"></a> <FONT color="green">952</FONT> reportException(methodCall, s);<a name="line.952"></a> <FONT color="green">953</FONT> throw s;<a name="line.953"></a> <FONT color="green">954</FONT> }<a name="line.954"></a> <FONT color="green">955</FONT> reportReturn(methodCall);<a name="line.955"></a> <FONT color="green">956</FONT> }<a name="line.956"></a> <FONT color="green">957</FONT> <a name="line.957"></a> <FONT color="green">958</FONT> public String getNString(int columnIndex) throws SQLException {<a name="line.958"></a> <FONT color="green">959</FONT> String methodCall = "getNString(" + columnIndex + ")";<a name="line.959"></a> <FONT color="green">960</FONT> try<a name="line.960"></a> <FONT color="green">961</FONT> {<a name="line.961"></a> <FONT color="green">962</FONT> return (String) reportReturn(methodCall, realResultSet.getNString(columnIndex));<a name="line.962"></a> <FONT color="green">963</FONT> }<a name="line.963"></a> <FONT color="green">964</FONT> catch (SQLException s)<a name="line.964"></a> <FONT color="green">965</FONT> {<a name="line.965"></a> <FONT color="green">966</FONT> reportException(methodCall, s);<a name="line.966"></a> <FONT color="green">967</FONT> throw s;<a name="line.967"></a> <FONT color="green">968</FONT> }<a name="line.968"></a> <FONT color="green">969</FONT> }<a name="line.969"></a> <FONT color="green">970</FONT> <a name="line.970"></a> <FONT color="green">971</FONT> public String getNString(String columnLabel) throws SQLException {<a name="line.971"></a> <FONT color="green">972</FONT> String methodCall = "getNString(" + columnLabel + ")";<a name="line.972"></a> <FONT color="green">973</FONT> try<a name="line.973"></a> <FONT color="green">974</FONT> {<a name="line.974"></a> <FONT color="green">975</FONT> return (String) reportReturn(methodCall, realResultSet.getNString(columnLabel));<a name="line.975"></a> <FONT color="green">976</FONT> }<a name="line.976"></a> <FONT color="green">977</FONT> catch (SQLException s)<a name="line.977"></a> <FONT color="green">978</FONT> {<a name="line.978"></a> <FONT color="green">979</FONT> reportException(methodCall, s);<a name="line.979"></a> <FONT color="green">980</FONT> throw s;<a name="line.980"></a> <FONT color="green">981</FONT> }<a name="line.981"></a> <FONT color="green">982</FONT> }<a name="line.982"></a> <FONT color="green">983</FONT> <a name="line.983"></a> <FONT color="green">984</FONT> public Reader getNCharacterStream(int columnIndex) throws SQLException {<a name="line.984"></a> <FONT color="green">985</FONT> String methodCall = "getNCharacterStream(" + columnIndex + ")";<a name="line.985"></a> <FONT color="green">986</FONT> try<a name="line.986"></a> <FONT color="green">987</FONT> {<a name="line.987"></a> <FONT color="green">988</FONT> return (Reader) reportReturn(methodCall, realResultSet.getNCharacterStream(columnIndex));<a name="line.988"></a> <FONT color="green">989</FONT> }<a name="line.989"></a> <FONT color="green">990</FONT> catch (SQLException s)<a name="line.990"></a> <FONT color="green">991</FONT> {<a name="line.991"></a> <FONT color="green">992</FONT> reportException(methodCall, s);<a name="line.992"></a> <FONT color="green">993</FONT> throw s;<a name="line.993"></a> <FONT color="green">994</FONT> }<a name="line.994"></a> <FONT color="green">995</FONT> }<a name="line.995"></a> <FONT color="green">996</FONT> <a name="line.996"></a> <FONT color="green">997</FONT> public Reader getNCharacterStream(String columnLabel) throws SQLException {<a name="line.997"></a> <FONT color="green">998</FONT> String methodCall = "getNCharacterStream(" + columnLabel + ")";<a name="line.998"></a> <FONT color="green">999</FONT> try<a name="line.999"></a> <FONT color="green">1000</FONT> {<a name="line.1000"></a> <FONT color="green">1001</FONT> return (Reader) reportReturn(methodCall, realResultSet.getNCharacterStream(columnLabel));<a name="line.1001"></a> <FONT color="green">1002</FONT> }<a name="line.1002"></a> <FONT color="green">1003</FONT> catch (SQLException s)<a name="line.1003"></a> <FONT color="green">1004</FONT> {<a name="line.1004"></a> <FONT color="green">1005</FONT> reportException(methodCall, s);<a name="line.1005"></a> <FONT color="green">1006</FONT> throw s;<a name="line.1006"></a> <FONT color="green">1007</FONT> }<a name="line.1007"></a> <FONT color="green">1008</FONT> }<a name="line.1008"></a> <FONT color="green">1009</FONT> <a name="line.1009"></a> <FONT color="green">1010</FONT> public void updateNCharacterStream(int columnIndex, Reader x, long length) throws SQLException {<a name="line.1010"></a> <FONT color="green">1011</FONT> String methodCall = "updateNCharacterStream(" + columnIndex + ", " + x + ", " + length + ")";<a name="line.1011"></a> <FONT color="green">1012</FONT> try<a name="line.1012"></a> <FONT color="green">1013</FONT> {<a name="line.1013"></a> <FONT color="green">1014</FONT> realResultSet.updateNCharacterStream(columnIndex, x, length);<a name="line.1014"></a> <FONT color="green">1015</FONT> }<a name="line.1015"></a> <FONT color="green">1016</FONT> catch (SQLException s)<a name="line.1016"></a> <FONT color="green">1017</FONT> {<a name="line.1017"></a> <FONT color="green">1018</FONT> reportException(methodCall, s);<a name="line.1018"></a> <FONT color="green">1019</FONT> throw s;<a name="line.1019"></a> <FONT color="green">1020</FONT> }<a name="line.1020"></a> <FONT color="green">1021</FONT> reportReturn(methodCall);<a name="line.1021"></a> <FONT color="green">1022</FONT> }<a name="line.1022"></a> <FONT color="green">1023</FONT> <a name="line.1023"></a> <FONT color="green">1024</FONT> public void updateNCharacterStream(String columnLabel, Reader reader, long length) throws SQLException {<a name="line.1024"></a> <FONT color="green">1025</FONT> String methodCall = "updateNCharacterStream(" + columnLabel + ", " + reader + ", " + length + ")";<a name="line.1025"></a> <FONT color="green">1026</FONT> try<a name="line.1026"></a> <FONT color="green">1027</FONT> {<a name="line.1027"></a> <FONT color="green">1028</FONT> realResultSet.updateNCharacterStream(columnLabel, reader, length);<a name="line.1028"></a> <FONT color="green">1029</FONT> }<a name="line.1029"></a> <FONT color="green">1030</FONT> catch (SQLException s)<a name="line.1030"></a> <FONT color="green">1031</FONT> {<a name="line.1031"></a> <FONT color="green">1032</FONT> reportException(methodCall, s);<a name="line.1032"></a> <FONT color="green">1033</FONT> throw s;<a name="line.1033"></a> <FONT color="green">1034</FONT> }<a name="line.1034"></a> <FONT color="green">1035</FONT> reportReturn(methodCall);<a name="line.1035"></a> <FONT color="green">1036</FONT> }<a name="line.1036"></a> <FONT color="green">1037</FONT> <a name="line.1037"></a> <FONT color="green">1038</FONT> public void updateAsciiStream(int columnIndex, InputStream x, long length) throws SQLException {<a name="line.1038"></a> <FONT color="green">1039</FONT> String methodCall = "updateAsciiStream(" + columnIndex + ", " + x + ", " + length + ")";<a name="line.1039"></a> <FONT color="green">1040</FONT> try<a name="line.1040"></a> <FONT color="green">1041</FONT> {<a name="line.1041"></a> <FONT color="green">1042</FONT> realResultSet.updateAsciiStream(columnIndex, x, length);<a name="line.1042"></a> <FONT color="green">1043</FONT> }<a name="line.1043"></a> <FONT color="green">1044</FONT> catch (SQLException s)<a name="line.1044"></a> <FONT color="green">1045</FONT> {<a name="line.1045"></a> <FONT color="green">1046</FONT> reportException(methodCall, s);<a name="line.1046"></a> <FONT color="green">1047</FONT> throw s;<a name="line.1047"></a> <FONT color="green">1048</FONT> }<a name="line.1048"></a> <FONT color="green">1049</FONT> reportReturn(methodCall);<a name="line.1049"></a> <FONT color="green">1050</FONT> }<a name="line.1050"></a> <FONT color="green">1051</FONT> <a name="line.1051"></a> <FONT color="green">1052</FONT> public void updateBinaryStream(int columnIndex, InputStream x, long length) throws SQLException {<a name="line.1052"></a> <FONT color="green">1053</FONT> String methodCall = "updateBinaryStream(" + columnIndex + ", " + x + ", " + length + ")";<a name="line.1053"></a> <FONT color="green">1054</FONT> try<a name="line.1054"></a> <FONT color="green">1055</FONT> {<a name="line.1055"></a> <FONT color="green">1056</FONT> realResultSet.updateBinaryStream(columnIndex, x, length);<a name="line.1056"></a> <FONT color="green">1057</FONT> }<a name="line.1057"></a> <FONT color="green">1058</FONT> catch (SQLException s)<a name="line.1058"></a> <FONT color="green">1059</FONT> {<a name="line.1059"></a> <FONT color="green">1060</FONT> reportException(methodCall, s);<a name="line.1060"></a> <FONT color="green">1061</FONT> throw s;<a name="line.1061"></a> <FONT color="green">1062</FONT> }<a name="line.1062"></a> <FONT color="green">1063</FONT> reportReturn(methodCall);<a name="line.1063"></a> <FONT color="green">1064</FONT> }<a name="line.1064"></a> <FONT color="green">1065</FONT> <a name="line.1065"></a> <FONT color="green">1066</FONT> public void updateCharacterStream(int columnIndex, Reader x, long length) throws SQLException {<a name="line.1066"></a> <FONT color="green">1067</FONT> String methodCall = "updateCharacterStream(" + columnIndex + ", " + x + ", " + length + ")";<a name="line.1067"></a> <FONT color="green">1068</FONT> try<a name="line.1068"></a> <FONT color="green">1069</FONT> {<a name="line.1069"></a> <FONT color="green">1070</FONT> realResultSet.updateCharacterStream(columnIndex, x, length);<a name="line.1070"></a> <FONT color="green">1071</FONT> }<a name="line.1071"></a> <FONT color="green">1072</FONT> catch (SQLException s)<a name="line.1072"></a> <FONT color="green">1073</FONT> {<a name="line.1073"></a> <FONT color="green">1074</FONT> reportException(methodCall, s);<a name="line.1074"></a> <FONT color="green">1075</FONT> throw s;<a name="line.1075"></a> <FONT color="green">1076</FONT> }<a name="line.1076"></a> <FONT color="green">1077</FONT> reportReturn(methodCall);<a name="line.1077"></a> <FONT color="green">1078</FONT> }<a name="line.1078"></a> <FONT color="green">1079</FONT> <a name="line.1079"></a> <FONT color="green">1080</FONT> public void updateAsciiStream(String columnLabel, InputStream x, long length) throws SQLException {<a name="line.1080"></a> <FONT color="green">1081</FONT> String methodCall = "updateAsciiStream(" + columnLabel + ", " + x + ", " + length + ")";<a name="line.1081"></a> <FONT color="green">1082</FONT> try<a name="line.1082"></a> <FONT color="green">1083</FONT> {<a name="line.1083"></a> <FONT color="green">1084</FONT> realResultSet.updateAsciiStream(columnLabel, x, length);<a name="line.1084"></a> <FONT color="green">1085</FONT> }<a name="line.1085"></a> <FONT color="green">1086</FONT> catch (SQLException s)<a name="line.1086"></a> <FONT color="green">1087</FONT> {<a name="line.1087"></a> <FONT color="green">1088</FONT> reportException(methodCall, s);<a name="line.1088"></a> <FONT color="green">1089</FONT> throw s;<a name="line.1089"></a> <FONT color="green">1090</FONT> }<a name="line.1090"></a> <FONT color="green">1091</FONT> reportReturn(methodCall);<a name="line.1091"></a> <FONT color="green">1092</FONT> }<a name="line.1092"></a> <FONT color="green">1093</FONT> <a name="line.1093"></a> <FONT color="green">1094</FONT> public void updateBinaryStream(String columnLabel, InputStream x, long length) throws SQLException {<a name="line.1094"></a> <FONT color="green">1095</FONT> String methodCall = "updateBinaryStream(" + columnLabel + ", " + x + ", " + length + ")";<a name="line.1095"></a> <FONT color="green">1096</FONT> try<a name="line.1096"></a> <FONT color="green">1097</FONT> {<a name="line.1097"></a> <FONT color="green">1098</FONT> realResultSet.updateBinaryStream(columnLabel, x, length);<a name="line.1098"></a> <FONT color="green">1099</FONT> }<a name="line.1099"></a> <FONT color="green">1100</FONT> catch (SQLException s)<a name="line.1100"></a> <FONT color="green">1101</FONT> {<a name="line.1101"></a> <FONT color="green">1102</FONT> reportException(methodCall, s);<a name="line.1102"></a> <FONT color="green">1103</FONT> throw s;<a name="line.1103"></a> <FONT color="green">1104</FONT> }<a name="line.1104"></a> <FONT color="green">1105</FONT> reportReturn(methodCall);<a name="line.1105"></a> <FONT color="green">1106</FONT> }<a name="line.1106"></a> <FONT color="green">1107</FONT> <a name="line.1107"></a> <FONT color="green">1108</FONT> public void updateCharacterStream(String columnLabel, Reader reader, long length) throws SQLException {<a name="line.1108"></a> <FONT color="green">1109</FONT> String methodCall = "updateCharacterStream(" + columnLabel + ", " + reader + ", " + length + ")";<a name="line.1109"></a> <FONT color="green">1110</FONT> try<a name="line.1110"></a> <FONT color="green">1111</FONT> {<a name="line.1111"></a> <FONT color="green">1112</FONT> realResultSet.updateCharacterStream(columnLabel, reader, length);<a name="line.1112"></a> <FONT color="green">1113</FONT> }<a name="line.1113"></a> <FONT color="green">1114</FONT> catch (SQLException s)<a name="line.1114"></a> <FONT color="green">1115</FONT> {<a name="line.1115"></a> <FONT color="green">1116</FONT> reportException(methodCall, s);<a name="line.1116"></a> <FONT color="green">1117</FONT> throw s;<a name="line.1117"></a> <FONT color="green">1118</FONT> }<a name="line.1118"></a> <FONT color="green">1119</FONT> reportReturn(methodCall);<a name="line.1119"></a> <FONT color="green">1120</FONT> }<a name="line.1120"></a> <FONT color="green">1121</FONT> <a name="line.1121"></a> <FONT color="green">1122</FONT> public void updateBlob(int columnIndex, InputStream inputStream, long length) throws SQLException {<a name="line.1122"></a> <FONT color="green">1123</FONT> String methodCall = "updateBlob(" + columnIndex + ", " + inputStream + ", " + length + ")";<a name="line.1123"></a> <FONT color="green">1124</FONT> try<a name="line.1124"></a> <FONT color="green">1125</FONT> {<a name="line.1125"></a> <FONT color="green">1126</FONT> realResultSet.updateBlob(columnIndex, inputStream, length);<a name="line.1126"></a> <FONT color="green">1127</FONT> }<a name="line.1127"></a> <FONT color="green">1128</FONT> catch (SQLException s)<a name="line.1128"></a> <FONT color="green">1129</FONT> {<a name="line.1129"></a> <FONT color="green">1130</FONT> reportException(methodCall, s);<a name="line.1130"></a> <FONT color="green">1131</FONT> throw s;<a name="line.1131"></a> <FONT color="green">1132</FONT> }<a name="line.1132"></a> <FONT color="green">1133</FONT> reportReturn(methodCall);<a name="line.1133"></a> <FONT color="green">1134</FONT> }<a name="line.1134"></a> <FONT color="green">1135</FONT> <a name="line.1135"></a> <FONT color="green">1136</FONT> public void updateBlob(String columnLabel, InputStream inputStream, long length) throws SQLException {<a name="line.1136"></a> <FONT color="green">1137</FONT> String methodCall = "updateBlob(" + columnLabel + ", " + inputStream + ", " + length + ")";<a name="line.1137"></a> <FONT color="green">1138</FONT> try<a name="line.1138"></a> <FONT color="green">1139</FONT> {<a name="line.1139"></a> <FONT color="green">1140</FONT> realResultSet.updateBlob(columnLabel, inputStream, length);<a name="line.1140"></a> <FONT color="green">1141</FONT> }<a name="line.1141"></a> <FONT color="green">1142</FONT> catch (SQLException s)<a name="line.1142"></a> <FONT color="green">1143</FONT> {<a name="line.1143"></a> <FONT color="green">1144</FONT> reportException(methodCall, s);<a name="line.1144"></a> <FONT color="green">1145</FONT> throw s;<a name="line.1145"></a> <FONT color="green">1146</FONT> }<a name="line.1146"></a> <FONT color="green">1147</FONT> reportReturn(methodCall);<a name="line.1147"></a> <FONT color="green">1148</FONT> }<a name="line.1148"></a> <FONT color="green">1149</FONT> <a name="line.1149"></a> <FONT color="green">1150</FONT> public void updateClob(int columnIndex, Reader reader, long length) throws SQLException {<a name="line.1150"></a> <FONT color="green">1151</FONT> String methodCall = "updateClob(" + columnIndex + ", " + reader + ", " + length + ")";<a name="line.1151"></a> <FONT color="green">1152</FONT> try<a name="line.1152"></a> <FONT color="green">1153</FONT> {<a name="line.1153"></a> <FONT color="green">1154</FONT> realResultSet.updateClob(columnIndex, reader, length);<a name="line.1154"></a> <FONT color="green">1155</FONT> }<a name="line.1155"></a> <FONT color="green">1156</FONT> catch (SQLException s)<a name="line.1156"></a> <FONT color="green">1157</FONT> {<a name="line.1157"></a> <FONT color="green">1158</FONT> reportException(methodCall, s);<a name="line.1158"></a> <FONT color="green">1159</FONT> throw s;<a name="line.1159"></a> <FONT color="green">1160</FONT> }<a name="line.1160"></a> <FONT color="green">1161</FONT> reportReturn(methodCall);<a name="line.1161"></a> <FONT color="green">1162</FONT> }<a name="line.1162"></a> <FONT color="green">1163</FONT> <a name="line.1163"></a> <FONT color="green">1164</FONT> public void updateClob(String columnLabel, Reader reader, long length) throws SQLException {<a name="line.1164"></a> <FONT color="green">1165</FONT> String methodCall = "updateClob(" + columnLabel + ", " + reader + ", " + length + ")";<a name="line.1165"></a> <FONT color="green">1166</FONT> try<a name="line.1166"></a> <FONT color="green">1167</FONT> {<a name="line.1167"></a> <FONT color="green">1168</FONT> realResultSet.updateClob(columnLabel, reader, length);<a name="line.1168"></a> <FONT color="green">1169</FONT> }<a name="line.1169"></a> <FONT color="green">1170</FONT> catch (SQLException s)<a name="line.1170"></a> <FONT color="green">1171</FONT> {<a name="line.1171"></a> <FONT color="green">1172</FONT> reportException(methodCall, s);<a name="line.1172"></a> <FONT color="green">1173</FONT> throw s;<a name="line.1173"></a> <FONT color="green">1174</FONT> }<a name="line.1174"></a> <FONT color="green">1175</FONT> reportReturn(methodCall);<a name="line.1175"></a> <FONT color="green">1176</FONT> }<a name="line.1176"></a> <FONT color="green">1177</FONT> <a name="line.1177"></a> <FONT color="green">1178</FONT> public void updateNClob(int columnIndex, Reader reader, long length) throws SQLException {<a name="line.1178"></a> <FONT color="green">1179</FONT> String methodCall = "updateNClob(" + columnIndex + ", " + reader + ", " + length + ")";<a name="line.1179"></a> <FONT color="green">1180</FONT> try<a name="line.1180"></a> <FONT color="green">1181</FONT> {<a name="line.1181"></a> <FONT color="green">1182</FONT> realResultSet.updateNClob(columnIndex, reader, length);<a name="line.1182"></a> <FONT color="green">1183</FONT> }<a name="line.1183"></a> <FONT color="green">1184</FONT> catch (SQLException s)<a name="line.1184"></a> <FONT color="green">1185</FONT> {<a name="line.1185"></a> <FONT color="green">1186</FONT> reportException(methodCall, s);<a name="line.1186"></a> <FONT color="green">1187</FONT> throw s;<a name="line.1187"></a> <FONT color="green">1188</FONT> }<a name="line.1188"></a> <FONT color="green">1189</FONT> reportReturn(methodCall);<a name="line.1189"></a> <FONT color="green">1190</FONT> }<a name="line.1190"></a> <FONT color="green">1191</FONT> <a name="line.1191"></a> <FONT color="green">1192</FONT> public void updateNClob(String columnLabel, Reader reader, long length) throws SQLException {<a name="line.1192"></a> <FONT color="green">1193</FONT> String methodCall = "updateNClob(" + columnLabel + ", " + reader + ", " + length + ")";<a name="line.1193"></a> <FONT color="green">1194</FONT> try<a name="line.1194"></a> <FONT color="green">1195</FONT> {<a name="line.1195"></a> <FONT color="green">1196</FONT> realResultSet.updateNClob(columnLabel, reader, length);<a name="line.1196"></a> <FONT color="green">1197</FONT> }<a name="line.1197"></a> <FONT color="green">1198</FONT> catch (SQLException s)<a name="line.1198"></a> <FONT color="green">1199</FONT> {<a name="line.1199"></a> <FONT color="green">1200</FONT> reportException(methodCall, s);<a name="line.1200"></a> <FONT color="green">1201</FONT> throw s;<a name="line.1201"></a> <FONT color="green">1202</FONT> }<a name="line.1202"></a> <FONT color="green">1203</FONT> reportReturn(methodCall);<a name="line.1203"></a> <FONT color="green">1204</FONT> }<a name="line.1204"></a> <FONT color="green">1205</FONT> <a name="line.1205"></a> <FONT color="green">1206</FONT> public void updateNCharacterStream(int columnIndex, Reader reader) throws SQLException {<a name="line.1206"></a> <FONT color="green">1207</FONT> String methodCall = "updateNCharacterStream(" + columnIndex + ", " + reader + ")";<a name="line.1207"></a> <FONT color="green">1208</FONT> try<a name="line.1208"></a> <FONT color="green">1209</FONT> {<a name="line.1209"></a> <FONT color="green">1210</FONT> realResultSet.updateNCharacterStream(columnIndex, reader);<a name="line.1210"></a> <FONT color="green">1211</FONT> }<a name="line.1211"></a> <FONT color="green">1212</FONT> catch (SQLException s)<a name="line.1212"></a> <FONT color="green">1213</FONT> {<a name="line.1213"></a> <FONT color="green">1214</FONT> reportException(methodCall, s);<a name="line.1214"></a> <FONT color="green">1215</FONT> throw s;<a name="line.1215"></a> <FONT color="green">1216</FONT> }<a name="line.1216"></a> <FONT color="green">1217</FONT> reportReturn(methodCall);<a name="line.1217"></a> <FONT color="green">1218</FONT> }<a name="line.1218"></a> <FONT color="green">1219</FONT> <a name="line.1219"></a> <FONT color="green">1220</FONT> public void updateNCharacterStream(String columnLabel, Reader reader) throws SQLException {<a name="line.1220"></a> <FONT color="green">1221</FONT> String methodCall = "updateNCharacterStream(" + columnLabel + ", " + reader + ")";<a name="line.1221"></a> <FONT color="green">1222</FONT> try<a name="line.1222"></a> <FONT color="green">1223</FONT> {<a name="line.1223"></a> <FONT color="green">1224</FONT> realResultSet.updateNCharacterStream(columnLabel, reader);<a name="line.1224"></a> <FONT color="green">1225</FONT> }<a name="line.1225"></a> <FONT color="green">1226</FONT> catch (SQLException s)<a name="line.1226"></a> <FONT color="green">1227</FONT> {<a name="line.1227"></a> <FONT color="green">1228</FONT> reportException(methodCall, s);<a name="line.1228"></a> <FONT color="green">1229</FONT> throw s;<a name="line.1229"></a> <FONT color="green">1230</FONT> }<a name="line.1230"></a> <FONT color="green">1231</FONT> reportReturn(methodCall);<a name="line.1231"></a> <FONT color="green">1232</FONT> }<a name="line.1232"></a> <FONT color="green">1233</FONT> <a name="line.1233"></a> <FONT color="green">1234</FONT> public void updateAsciiStream(int columnIndex, InputStream x) throws SQLException {<a name="line.1234"></a> <FONT color="green">1235</FONT> String methodCall = "updateAsciiStream(" + columnIndex + ", " + x + ")";<a name="line.1235"></a> <FONT color="green">1236</FONT> try<a name="line.1236"></a> <FONT color="green">1237</FONT> {<a name="line.1237"></a> <FONT color="green">1238</FONT> realResultSet.updateAsciiStream(columnIndex, x);<a name="line.1238"></a> <FONT color="green">1239</FONT> }<a name="line.1239"></a> <FONT color="green">1240</FONT> catch (SQLException s)<a name="line.1240"></a> <FONT color="green">1241</FONT> {<a name="line.1241"></a> <FONT color="green">1242</FONT> reportException(methodCall, s);<a name="line.1242"></a> <FONT color="green">1243</FONT> throw s;<a name="line.1243"></a> <FONT color="green">1244</FONT> }<a name="line.1244"></a> <FONT color="green">1245</FONT> reportReturn(methodCall);<a name="line.1245"></a> <FONT color="green">1246</FONT> }<a name="line.1246"></a> <FONT color="green">1247</FONT> <a name="line.1247"></a> <FONT color="green">1248</FONT> public void updateBinaryStream(int columnIndex, InputStream x) throws SQLException {<a name="line.1248"></a> <FONT color="green">1249</FONT> String methodCall = "updateBinaryStream(" + columnIndex + ", " + x + ")";<a name="line.1249"></a> <FONT color="green">1250</FONT> try<a name="line.1250"></a> <FONT color="green">1251</FONT> {<a name="line.1251"></a> <FONT color="green">1252</FONT> realResultSet.updateBinaryStream(columnIndex, x);<a name="line.1252"></a> <FONT color="green">1253</FONT> }<a name="line.1253"></a> <FONT color="green">1254</FONT> catch (SQLException s)<a name="line.1254"></a> <FONT color="green">1255</FONT> {<a name="line.1255"></a> <FONT color="green">1256</FONT> reportException(methodCall, s);<a name="line.1256"></a> <FONT color="green">1257</FONT> throw s;<a name="line.1257"></a> <FONT color="green">1258</FONT> }<a name="line.1258"></a> <FONT color="green">1259</FONT> reportReturn(methodCall);<a name="line.1259"></a> <FONT color="green">1260</FONT> }<a name="line.1260"></a> <FONT color="green">1261</FONT> <a name="line.1261"></a> <FONT color="green">1262</FONT> public void updateCharacterStream(int columnIndex, Reader x) throws SQLException {<a name="line.1262"></a> <FONT color="green">1263</FONT> String methodCall = "updateCharacterStream(" + columnIndex + ", " + x + ")";<a name="line.1263"></a> <FONT color="green">1264</FONT> try<a name="line.1264"></a> <FONT color="green">1265</FONT> {<a name="line.1265"></a> <FONT color="green">1266</FONT> realResultSet.updateCharacterStream(columnIndex, x);<a name="line.1266"></a> <FONT color="green">1267</FONT> }<a name="line.1267"></a> <FONT color="green">1268</FONT> catch (SQLException s)<a name="line.1268"></a> <FONT color="green">1269</FONT> {<a name="line.1269"></a> <FONT color="green">1270</FONT> reportException(methodCall, s);<a name="line.1270"></a> <FONT color="green">1271</FONT> throw s;<a name="line.1271"></a> <FONT color="green">1272</FONT> }<a name="line.1272"></a> <FONT color="green">1273</FONT> reportReturn(methodCall);<a name="line.1273"></a> <FONT color="green">1274</FONT> }<a name="line.1274"></a> <FONT color="green">1275</FONT> <a name="line.1275"></a> <FONT color="green">1276</FONT> public void updateAsciiStream(String columnLabel, InputStream x) throws SQLException {<a name="line.1276"></a> <FONT color="green">1277</FONT> String methodCall = "updateAsciiStream(" + columnLabel + ", " + x + ")";<a name="line.1277"></a> <FONT color="green">1278</FONT> try<a name="line.1278"></a> <FONT color="green">1279</FONT> {<a name="line.1279"></a> <FONT color="green">1280</FONT> realResultSet.updateAsciiStream(columnLabel, x);<a name="line.1280"></a> <FONT color="green">1281</FONT> }<a name="line.1281"></a> <FONT color="green">1282</FONT> catch (SQLException s)<a name="line.1282"></a> <FONT color="green">1283</FONT> {<a name="line.1283"></a> <FONT color="green">1284</FONT> reportException(methodCall, s);<a name="line.1284"></a> <FONT color="green">1285</FONT> throw s;<a name="line.1285"></a> <FONT color="green">1286</FONT> }<a name="line.1286"></a> <FONT color="green">1287</FONT> reportReturn(methodCall);<a name="line.1287"></a> <FONT color="green">1288</FONT> }<a name="line.1288"></a> <FONT color="green">1289</FONT> <a name="line.1289"></a> <FONT color="green">1290</FONT> public void updateBinaryStream(String columnLabel, InputStream x) throws SQLException {<a name="line.1290"></a> <FONT color="green">1291</FONT> String methodCall = "updateBinaryStream(" + columnLabel + ", " + x + ")";<a name="line.1291"></a> <FONT color="green">1292</FONT> try<a name="line.1292"></a> <FONT color="green">1293</FONT> {<a name="line.1293"></a> <FONT color="green">1294</FONT> realResultSet.updateBinaryStream(columnLabel, x);<a name="line.1294"></a> <FONT color="green">1295</FONT> }<a name="line.1295"></a> <FONT color="green">1296</FONT> catch (SQLException s)<a name="line.1296"></a> <FONT color="green">1297</FONT> {<a name="line.1297"></a> <FONT color="green">1298</FONT> reportException(methodCall, s);<a name="line.1298"></a> <FONT color="green">1299</FONT> throw s;<a name="line.1299"></a> <FONT color="green">1300</FONT> }<a name="line.1300"></a> <FONT color="green">1301</FONT> reportReturn(methodCall);<a name="line.1301"></a> <FONT color="green">1302</FONT> }<a name="line.1302"></a> <FONT color="green">1303</FONT> <a name="line.1303"></a> <FONT color="green">1304</FONT> public void updateCharacterStream(String columnLabel, Reader reader) throws SQLException {<a name="line.1304"></a> <FONT color="green">1305</FONT> String methodCall = "updateCharacterStream(" + columnLabel + ", " + reader + ")";<a name="line.1305"></a> <FONT color="green">1306</FONT> try<a name="line.1306"></a> <FONT color="green">1307</FONT> {<a name="line.1307"></a> <FONT color="green">1308</FONT> realResultSet.updateCharacterStream(columnLabel, reader);<a name="line.1308"></a> <FONT color="green">1309</FONT> }<a name="line.1309"></a> <FONT color="green">1310</FONT> catch (SQLException s)<a name="line.1310"></a> <FONT color="green">1311</FONT> {<a name="line.1311"></a> <FONT color="green">1312</FONT> reportException(methodCall, s);<a name="line.1312"></a> <FONT color="green">1313</FONT> throw s;<a name="line.1313"></a> <FONT color="green">1314</FONT> }<a name="line.1314"></a> <FONT color="green">1315</FONT> reportReturn(methodCall);<a name="line.1315"></a> <FONT color="green">1316</FONT> }<a name="line.1316"></a> <FONT color="green">1317</FONT> <a name="line.1317"></a> <FONT color="green">1318</FONT> public void updateBlob(int columnIndex, InputStream inputStream) throws SQLException {<a name="line.1318"></a> <FONT color="green">1319</FONT> String methodCall = "updateBlob(" + columnIndex + ", " + inputStream + ")";<a name="line.1319"></a> <FONT color="green">1320</FONT> try<a name="line.1320"></a> <FONT color="green">1321</FONT> {<a name="line.1321"></a> <FONT color="green">1322</FONT> realResultSet.updateBlob(columnIndex, inputStream);<a name="line.1322"></a> <FONT color="green">1323</FONT> }<a name="line.1323"></a> <FONT color="green">1324</FONT> catch (SQLException s)<a name="line.1324"></a> <FONT color="green">1325</FONT> {<a name="line.1325"></a> <FONT color="green">1326</FONT> reportException(methodCall, s);<a name="line.1326"></a> <FONT color="green">1327</FONT> throw s;<a name="line.1327"></a> <FONT color="green">1328</FONT> }<a name="line.1328"></a> <FONT color="green">1329</FONT> reportReturn(methodCall);<a name="line.1329"></a> <FONT color="green">1330</FONT> }<a name="line.1330"></a> <FONT color="green">1331</FONT> <a name="line.1331"></a> <FONT color="green">1332</FONT> public void updateBlob(String columnLabel, InputStream inputStream) throws SQLException {<a name="line.1332"></a> <FONT color="green">1333</FONT> String methodCall = "updateBlob(" + columnLabel + ", " + inputStream + ")";<a name="line.1333"></a> <FONT color="green">1334</FONT> try<a name="line.1334"></a> <FONT color="green">1335</FONT> {<a name="line.1335"></a> <FONT color="green">1336</FONT> realResultSet.updateBlob(columnLabel, inputStream);<a name="line.1336"></a> <FONT color="green">1337</FONT> }<a name="line.1337"></a> <FONT color="green">1338</FONT> catch (SQLException s)<a name="line.1338"></a> <FONT color="green">1339</FONT> {<a name="line.1339"></a> <FONT color="green">1340</FONT> reportException(methodCall, s);<a name="line.1340"></a> <FONT color="green">1341</FONT> throw s;<a name="line.1341"></a> <FONT color="green">1342</FONT> }<a name="line.1342"></a> <FONT color="green">1343</FONT> reportReturn(methodCall);<a name="line.1343"></a> <FONT color="green">1344</FONT> }<a name="line.1344"></a> <FONT color="green">1345</FONT> <a name="line.1345"></a> <FONT color="green">1346</FONT> public void updateClob(int columnIndex, Reader reader) throws SQLException {<a name="line.1346"></a> <FONT color="green">1347</FONT> String methodCall = "updateClob(" + columnIndex + ", " + reader + ")";<a name="line.1347"></a> <FONT color="green">1348</FONT> try<a name="line.1348"></a> <FONT color="green">1349</FONT> {<a name="line.1349"></a> <FONT color="green">1350</FONT> realResultSet.updateClob(columnIndex, reader);<a name="line.1350"></a> <FONT color="green">1351</FONT> }<a name="line.1351"></a> <FONT color="green">1352</FONT> catch (SQLException s)<a name="line.1352"></a> <FONT color="green">1353</FONT> {<a name="line.1353"></a> <FONT color="green">1354</FONT> reportException(methodCall, s);<a name="line.1354"></a> <FONT color="green">1355</FONT> throw s;<a name="line.1355"></a> <FONT color="green">1356</FONT> }<a name="line.1356"></a> <FONT color="green">1357</FONT> reportReturn(methodCall);<a name="line.1357"></a> <FONT color="green">1358</FONT> }<a name="line.1358"></a> <FONT color="green">1359</FONT> <a name="line.1359"></a> <FONT color="green">1360</FONT> public void updateClob(String columnLabel, Reader reader) throws SQLException {<a name="line.1360"></a> <FONT color="green">1361</FONT> String methodCall = "updateClob(" + columnLabel + ", " + reader + ")";<a name="line.1361"></a> <FONT color="green">1362</FONT> try<a name="line.1362"></a> <FONT color="green">1363</FONT> {<a name="line.1363"></a> <FONT color="green">1364</FONT> realResultSet.updateClob(columnLabel, reader);<a name="line.1364"></a> <FONT color="green">1365</FONT> }<a name="line.1365"></a> <FONT color="green">1366</FONT> catch (SQLException s)<a name="line.1366"></a> <FONT color="green">1367</FONT> {<a name="line.1367"></a> <FONT color="green">1368</FONT> reportException(methodCall, s);<a name="line.1368"></a> <FONT color="green">1369</FONT> throw s;<a name="line.1369"></a> <FONT color="green">1370</FONT> }<a name="line.1370"></a> <FONT color="green">1371</FONT> reportReturn(methodCall);<a name="line.1371"></a> <FONT color="green">1372</FONT> }<a name="line.1372"></a> <FONT color="green">1373</FONT> <a name="line.1373"></a> <FONT color="green">1374</FONT> public void updateNClob(int columnIndex, Reader reader) throws SQLException {<a name="line.1374"></a> <FONT color="green">1375</FONT> String methodCall = "updateNClob(" + columnIndex + ", " + reader + ")";<a name="line.1375"></a> <FONT color="green">1376</FONT> try<a name="line.1376"></a> <FONT color="green">1377</FONT> {<a name="line.1377"></a> <FONT color="green">1378</FONT> realResultSet.updateNClob(columnIndex, reader);<a name="line.1378"></a> <FONT color="green">1379</FONT> }<a name="line.1379"></a> <FONT color="green">1380</FONT> catch (SQLException s)<a name="line.1380"></a> <FONT color="green">1381</FONT> {<a name="line.1381"></a> <FONT color="green">1382</FONT> reportException(methodCall, s);<a name="line.1382"></a> <FONT color="green">1383</FONT> throw s;<a name="line.1383"></a> <FONT color="green">1384</FONT> }<a name="line.1384"></a> <FONT color="green">1385</FONT> reportReturn(methodCall);<a name="line.1385"></a> <FONT color="green">1386</FONT> }<a name="line.1386"></a> <FONT color="green">1387</FONT> <a name="line.1387"></a> <FONT color="green">1388</FONT> public void updateNClob(String columnLabel, Reader reader) throws SQLException {<a name="line.1388"></a> <FONT color="green">1389</FONT> String methodCall = "updateNClob(" + columnLabel + ", " + reader + ")";<a name="line.1389"></a> <FONT color="green">1390</FONT> try<a name="line.1390"></a> <FONT color="green">1391</FONT> {<a name="line.1391"></a> <FONT color="green">1392</FONT> realResultSet.updateNClob(columnLabel, reader);<a name="line.1392"></a> <FONT color="green">1393</FONT> }<a name="line.1393"></a> <FONT color="green">1394</FONT> catch (SQLException s)<a name="line.1394"></a> <FONT color="green">1395</FONT> {<a name="line.1395"></a> <FONT color="green">1396</FONT> reportException(methodCall, s);<a name="line.1396"></a> <FONT color="green">1397</FONT> throw s;<a name="line.1397"></a> <FONT color="green">1398</FONT> }<a name="line.1398"></a> <FONT color="green">1399</FONT> reportReturn(methodCall);<a name="line.1399"></a> <FONT color="green">1400</FONT> }<a name="line.1400"></a> <FONT color="green">1401</FONT> <a name="line.1401"></a> <FONT color="green">1402</FONT> public boolean isBeforeFirst() throws SQLException<a name="line.1402"></a> <FONT color="green">1403</FONT> {<a name="line.1403"></a> <FONT color="green">1404</FONT> String methodCall = "isBeforeFirst()";<a name="line.1404"></a> <FONT color="green">1405</FONT> try<a name="line.1405"></a> <FONT color="green">1406</FONT> {<a name="line.1406"></a> <FONT color="green">1407</FONT> return reportReturn(methodCall, realResultSet.isBeforeFirst());<a name="line.1407"></a> <FONT color="green">1408</FONT> }<a name="line.1408"></a> <FONT color="green">1409</FONT> catch (SQLException s)<a name="line.1409"></a> <FONT color="green">1410</FONT> {<a name="line.1410"></a> <FONT color="green">1411</FONT> reportException(methodCall, s);<a name="line.1411"></a> <FONT color="green">1412</FONT> throw s;<a name="line.1412"></a> <FONT color="green">1413</FONT> }<a name="line.1413"></a> <FONT color="green">1414</FONT> }<a name="line.1414"></a> <FONT color="green">1415</FONT> <a name="line.1415"></a> <FONT color="green">1416</FONT> public short getShort(int columnIndex) throws SQLException<a name="line.1416"></a> <FONT color="green">1417</FONT> {<a name="line.1417"></a> <FONT color="green">1418</FONT> String methodCall = "getShort(" + columnIndex + ")";<a name="line.1418"></a> <FONT color="green">1419</FONT> try<a name="line.1419"></a> <FONT color="green">1420</FONT> {<a name="line.1420"></a> <FONT color="green">1421</FONT> return reportReturn(methodCall, realResultSet.getShort(columnIndex));<a name="line.1421"></a> <FONT color="green">1422</FONT> }<a name="line.1422"></a> <FONT color="green">1423</FONT> catch (SQLException s)<a name="line.1423"></a> <FONT color="green">1424</FONT> {<a name="line.1424"></a> <FONT color="green">1425</FONT> reportException(methodCall, s);<a name="line.1425"></a> <FONT color="green">1426</FONT> throw s;<a name="line.1426"></a> <FONT color="green">1427</FONT> }<a name="line.1427"></a> <FONT color="green">1428</FONT> }<a name="line.1428"></a> <FONT color="green">1429</FONT> <a name="line.1429"></a> <FONT color="green">1430</FONT> public short getShort(String columnName) throws SQLException<a name="line.1430"></a> <FONT color="green">1431</FONT> {<a name="line.1431"></a> <FONT color="green">1432</FONT> String methodCall = "getShort(" + columnName + ")";<a name="line.1432"></a> <FONT color="green">1433</FONT> try<a name="line.1433"></a> <FONT color="green">1434</FONT> {<a name="line.1434"></a> <FONT color="green">1435</FONT> return reportReturn(methodCall, realResultSet.getShort(columnName));<a name="line.1435"></a> <FONT color="green">1436</FONT> }<a name="line.1436"></a> <FONT color="green">1437</FONT> catch (SQLException s)<a name="line.1437"></a> <FONT color="green">1438</FONT> {<a name="line.1438"></a> <FONT color="green">1439</FONT> reportException(methodCall, s);<a name="line.1439"></a> <FONT color="green">1440</FONT> throw s;<a name="line.1440"></a> <FONT color="green">1441</FONT> }<a name="line.1441"></a> <FONT color="green">1442</FONT> }<a name="line.1442"></a> <FONT color="green">1443</FONT> <a name="line.1443"></a> <FONT color="green">1444</FONT> public int getInt(int columnIndex) throws SQLException<a name="line.1444"></a> <FONT color="green">1445</FONT> {<a name="line.1445"></a> <FONT color="green">1446</FONT> String methodCall = "getInt(" + columnIndex + ")";<a name="line.1446"></a> <FONT color="green">1447</FONT> try<a name="line.1447"></a> <FONT color="green">1448</FONT> {<a name="line.1448"></a> <FONT color="green">1449</FONT> return reportReturn(methodCall, realResultSet.getInt(columnIndex));<a name="line.1449"></a> <FONT color="green">1450</FONT> }<a name="line.1450"></a> <FONT color="green">1451</FONT> catch (SQLException s)<a name="line.1451"></a> <FONT color="green">1452</FONT> {<a name="line.1452"></a> <FONT color="green">1453</FONT> reportException(methodCall, s);<a name="line.1453"></a> <FONT color="green">1454</FONT> throw s;<a name="line.1454"></a> <FONT color="green">1455</FONT> }<a name="line.1455"></a> <FONT color="green">1456</FONT> }<a name="line.1456"></a> <FONT color="green">1457</FONT> <a name="line.1457"></a> <FONT color="green">1458</FONT> public int getInt(String columnName) throws SQLException<a name="line.1458"></a> <FONT color="green">1459</FONT> {<a name="line.1459"></a> <FONT color="green">1460</FONT> String methodCall = "getInt(" + columnName + ")";<a name="line.1460"></a> <FONT color="green">1461</FONT> try<a name="line.1461"></a> <FONT color="green">1462</FONT> {<a name="line.1462"></a> <FONT color="green">1463</FONT> return reportReturn(methodCall, realResultSet.getInt(columnName));<a name="line.1463"></a> <FONT color="green">1464</FONT> }<a name="line.1464"></a> <FONT color="green">1465</FONT> catch (SQLException s)<a name="line.1465"></a> <FONT color="green">1466</FONT> {<a name="line.1466"></a> <FONT color="green">1467</FONT> reportException(methodCall, s);<a name="line.1467"></a> <FONT color="green">1468</FONT> throw s;<a name="line.1468"></a> <FONT color="green">1469</FONT> }<a name="line.1469"></a> <FONT color="green">1470</FONT> }<a name="line.1470"></a> <FONT color="green">1471</FONT> <a name="line.1471"></a> <FONT color="green">1472</FONT> public void close() throws SQLException<a name="line.1472"></a> <FONT color="green">1473</FONT> {<a name="line.1473"></a> <FONT color="green">1474</FONT> String methodCall = "close()";<a name="line.1474"></a> <FONT color="green">1475</FONT> try<a name="line.1475"></a> <FONT color="green">1476</FONT> {<a name="line.1476"></a> <FONT color="green">1477</FONT> realResultSet.close();<a name="line.1477"></a> <FONT color="green">1478</FONT> }<a name="line.1478"></a> <FONT color="green">1479</FONT> catch (SQLException s)<a name="line.1479"></a> <FONT color="green">1480</FONT> {<a name="line.1480"></a> <FONT color="green">1481</FONT> reportException(methodCall, s);<a name="line.1481"></a> <FONT color="green">1482</FONT> throw s;<a name="line.1482"></a> <FONT color="green">1483</FONT> }<a name="line.1483"></a> <FONT color="green">1484</FONT> reportReturn(methodCall);<a name="line.1484"></a> <FONT color="green">1485</FONT> }<a name="line.1485"></a> <FONT color="green">1486</FONT> <a name="line.1486"></a> <FONT color="green">1487</FONT> public ResultSetMetaData getMetaData() throws SQLException<a name="line.1487"></a> <FONT color="green">1488</FONT> {<a name="line.1488"></a> <FONT color="green">1489</FONT> String methodCall = "getMetaData()";<a name="line.1489"></a> <FONT color="green">1490</FONT> try<a name="line.1490"></a> <FONT color="green">1491</FONT> {<a name="line.1491"></a> <FONT color="green">1492</FONT> return (ResultSetMetaData) reportReturn(methodCall, realResultSet.getMetaData());<a name="line.1492"></a> <FONT color="green">1493</FONT> }<a name="line.1493"></a> <FONT color="green">1494</FONT> catch (SQLException s)<a name="line.1494"></a> <FONT color="green">1495</FONT> {<a name="line.1495"></a> <FONT color="green">1496</FONT> reportException(methodCall, s);<a name="line.1496"></a> <FONT color="green">1497</FONT> throw s;<a name="line.1497"></a> <FONT color="green">1498</FONT> }<a name="line.1498"></a> <FONT color="green">1499</FONT> }<a name="line.1499"></a> <FONT color="green">1500</FONT> <a name="line.1500"></a> <FONT color="green">1501</FONT> public int getType() throws SQLException<a name="line.1501"></a> <FONT color="green">1502</FONT> {<a name="line.1502"></a> <FONT color="green">1503</FONT> String methodCall = "getType()";<a name="line.1503"></a> <FONT color="green">1504</FONT> try<a name="line.1504"></a> <FONT color="green">1505</FONT> {<a name="line.1505"></a> <FONT color="green">1506</FONT> return reportReturn(methodCall, realResultSet.getType());<a name="line.1506"></a> <FONT color="green">1507</FONT> }<a name="line.1507"></a> <FONT color="green">1508</FONT> catch (SQLException s)<a name="line.1508"></a> <FONT color="green">1509</FONT> {<a name="line.1509"></a> <FONT color="green">1510</FONT> reportException(methodCall, s);<a name="line.1510"></a> <FONT color="green">1511</FONT> throw s;<a name="line.1511"></a> <FONT color="green">1512</FONT> }<a name="line.1512"></a> <FONT color="green">1513</FONT> }<a name="line.1513"></a> <FONT color="green">1514</FONT> <a name="line.1514"></a> <FONT color="green">1515</FONT> public double getDouble(int columnIndex) throws SQLException<a name="line.1515"></a> <FONT color="green">1516</FONT> {<a name="line.1516"></a> <FONT color="green">1517</FONT> String methodCall = "getDouble(" + columnIndex + ")";<a name="line.1517"></a> <FONT color="green">1518</FONT> try<a name="line.1518"></a> <FONT color="green">1519</FONT> {<a name="line.1519"></a> <FONT color="green">1520</FONT> return reportReturn(methodCall, realResultSet.getDouble(columnIndex));<a name="line.1520"></a> <FONT color="green">1521</FONT> }<a name="line.1521"></a> <FONT color="green">1522</FONT> catch (SQLException s)<a name="line.1522"></a> <FONT color="green">1523</FONT> {<a name="line.1523"></a> <FONT color="green">1524</FONT> reportException(methodCall, s);<a name="line.1524"></a> <FONT color="green">1525</FONT> throw s;<a name="line.1525"></a> <FONT color="green">1526</FONT> }<a name="line.1526"></a> <FONT color="green">1527</FONT> }<a name="line.1527"></a> <FONT color="green">1528</FONT> <a name="line.1528"></a> <FONT color="green">1529</FONT> public double getDouble(String columnName) throws SQLException<a name="line.1529"></a> <FONT color="green">1530</FONT> {<a name="line.1530"></a> <FONT color="green">1531</FONT> String methodCall = "getDouble(" + columnName + ")";<a name="line.1531"></a> <FONT color="green">1532</FONT> try<a name="line.1532"></a> <FONT color="green">1533</FONT> {<a name="line.1533"></a> <FONT color="green">1534</FONT> return reportReturn(methodCall, realResultSet.getDouble(columnName));<a name="line.1534"></a> <FONT color="green">1535</FONT> }<a name="line.1535"></a> <FONT color="green">1536</FONT> catch (SQLException s)<a name="line.1536"></a> <FONT color="green">1537</FONT> {<a name="line.1537"></a> <FONT color="green">1538</FONT> reportException(methodCall, s);<a name="line.1538"></a> <FONT color="green">1539</FONT> throw s;<a name="line.1539"></a> <FONT color="green">1540</FONT> }<a name="line.1540"></a> <FONT color="green">1541</FONT> }<a name="line.1541"></a> <FONT color="green">1542</FONT> <a name="line.1542"></a> <FONT color="green">1543</FONT> public void deleteRow() throws SQLException<a name="line.1543"></a> <FONT color="green">1544</FONT> {<a name="line.1544"></a> <FONT color="green">1545</FONT> String methodCall = "deleteRow()";<a name="line.1545"></a> <FONT color="green">1546</FONT> try<a name="line.1546"></a> <FONT color="green">1547</FONT> {<a name="line.1547"></a> <FONT color="green">1548</FONT> realResultSet.deleteRow();<a name="line.1548"></a> <FONT color="green">1549</FONT> }<a name="line.1549"></a> <FONT color="green">1550</FONT> catch (SQLException s)<a name="line.1550"></a> <FONT color="green">1551</FONT> {<a name="line.1551"></a> <FONT color="green">1552</FONT> reportException(methodCall, s);<a name="line.1552"></a> <FONT color="green">1553</FONT> throw s;<a name="line.1553"></a> <FONT color="green">1554</FONT> }<a name="line.1554"></a> <FONT color="green">1555</FONT> reportReturn(methodCall);<a name="line.1555"></a> <FONT color="green">1556</FONT> }<a name="line.1556"></a> <FONT color="green">1557</FONT> <a name="line.1557"></a> <FONT color="green">1558</FONT> public int getConcurrency() throws SQLException<a name="line.1558"></a> <FONT color="green">1559</FONT> {<a name="line.1559"></a> <FONT color="green">1560</FONT> String methodCall = "getConcurrency()";<a name="line.1560"></a> <FONT color="green">1561</FONT> try<a name="line.1561"></a> <FONT color="green">1562</FONT> {<a name="line.1562"></a> <FONT color="green">1563</FONT> return reportReturn(methodCall, realResultSet.getConcurrency());<a name="line.1563"></a> <FONT color="green">1564</FONT> }<a name="line.1564"></a> <FONT color="green">1565</FONT> catch (SQLException s)<a name="line.1565"></a> <FONT color="green">1566</FONT> {<a name="line.1566"></a> <FONT color="green">1567</FONT> reportException(methodCall, s);<a name="line.1567"></a> <FONT color="green">1568</FONT> throw s;<a name="line.1568"></a> <FONT color="green">1569</FONT> }<a name="line.1569"></a> <FONT color="green">1570</FONT> }<a name="line.1570"></a> <FONT color="green">1571</FONT> <a name="line.1571"></a> <FONT color="green">1572</FONT> public boolean rowUpdated() throws SQLException<a name="line.1572"></a> <FONT color="green">1573</FONT> {<a name="line.1573"></a> <FONT color="green">1574</FONT> String methodCall = "rowUpdated()";<a name="line.1574"></a> <FONT color="green">1575</FONT> try<a name="line.1575"></a> <FONT color="green">1576</FONT> {<a name="line.1576"></a> <FONT color="green">1577</FONT> return reportReturn(methodCall, realResultSet.rowUpdated());<a name="line.1577"></a> <FONT color="green">1578</FONT> }<a name="line.1578"></a> <FONT color="green">1579</FONT> catch (SQLException s)<a name="line.1579"></a> <FONT color="green">1580</FONT> {<a name="line.1580"></a> <FONT color="green">1581</FONT> reportException(methodCall, s);<a name="line.1581"></a> <FONT color="green">1582</FONT> throw s;<a name="line.1582"></a> <FONT color="green">1583</FONT> }<a name="line.1583"></a> <FONT color="green">1584</FONT> }<a name="line.1584"></a> <FONT color="green">1585</FONT> <a name="line.1585"></a> <FONT color="green">1586</FONT> public Date getDate(int columnIndex) throws SQLException<a name="line.1586"></a> <FONT color="green">1587</FONT> {<a name="line.1587"></a> <FONT color="green">1588</FONT> String methodCall = "getDate(" + columnIndex + ")";<a name="line.1588"></a> <FONT color="green">1589</FONT> try<a name="line.1589"></a> <FONT color="green">1590</FONT> {<a name="line.1590"></a> <FONT color="green">1591</FONT> return (Date) reportReturn(methodCall, realResultSet.getDate(columnIndex));<a name="line.1591"></a> <FONT color="green">1592</FONT> }<a name="line.1592"></a> <FONT color="green">1593</FONT> catch (SQLException s)<a name="line.1593"></a> <FONT color="green">1594</FONT> {<a name="line.1594"></a> <FONT color="green">1595</FONT> reportException(methodCall, s);<a name="line.1595"></a> <FONT color="green">1596</FONT> throw s;<a name="line.1596"></a> <FONT color="green">1597</FONT> }<a name="line.1597"></a> <FONT color="green">1598</FONT> }<a name="line.1598"></a> <FONT color="green">1599</FONT> <a name="line.1599"></a> <FONT color="green">1600</FONT> public Date getDate(String columnName) throws SQLException<a name="line.1600"></a> <FONT color="green">1601</FONT> {<a name="line.1601"></a> <FONT color="green">1602</FONT> String methodCall = "getDate(" + columnName + ")";<a name="line.1602"></a> <FONT color="green">1603</FONT> try<a name="line.1603"></a> <FONT color="green">1604</FONT> {<a name="line.1604"></a> <FONT color="green">1605</FONT> return (Date) reportReturn(methodCall, realResultSet.getDate(columnName));<a name="line.1605"></a> <FONT color="green">1606</FONT> }<a name="line.1606"></a> <FONT color="green">1607</FONT> catch (SQLException s)<a name="line.1607"></a> <FONT color="green">1608</FONT> {<a name="line.1608"></a> <FONT color="green">1609</FONT> reportException(methodCall, s);<a name="line.1609"></a> <FONT color="green">1610</FONT> throw s;<a name="line.1610"></a> <FONT color="green">1611</FONT> }<a name="line.1611"></a> <FONT color="green">1612</FONT> }<a name="line.1612"></a> <FONT color="green">1613</FONT> <a name="line.1613"></a> <FONT color="green">1614</FONT> public Date getDate(int columnIndex, Calendar cal) throws SQLException<a name="line.1614"></a> <FONT color="green">1615</FONT> {<a name="line.1615"></a> <FONT color="green">1616</FONT> String methodCall = "getDate(" + columnIndex + ", " + cal + ")";<a name="line.1616"></a> <FONT color="green">1617</FONT> try<a name="line.1617"></a> <FONT color="green">1618</FONT> {<a name="line.1618"></a> <FONT color="green">1619</FONT> return (Date) reportReturn(methodCall, realResultSet.getDate(columnIndex, cal));<a name="line.1619"></a> <FONT color="green">1620</FONT> }<a name="line.1620"></a> <FONT color="green">1621</FONT> catch (SQLException s)<a name="line.1621"></a> <FONT color="green">1622</FONT> {<a name="line.1622"></a> <FONT color="green">1623</FONT> reportException(methodCall, s);<a name="line.1623"></a> <FONT color="green">1624</FONT> throw s;<a name="line.1624"></a> <FONT color="green">1625</FONT> }<a name="line.1625"></a> <FONT color="green">1626</FONT> <a name="line.1626"></a> <FONT color="green">1627</FONT> }<a name="line.1627"></a> <FONT color="green">1628</FONT> <a name="line.1628"></a> <FONT color="green">1629</FONT> public Date getDate(String columnName, Calendar cal) throws SQLException<a name="line.1629"></a> <FONT color="green">1630</FONT> {<a name="line.1630"></a> <FONT color="green">1631</FONT> String methodCall = "getDate(" + columnName + ", " + cal + ")";<a name="line.1631"></a> <FONT color="green">1632</FONT> try<a name="line.1632"></a> <FONT color="green">1633</FONT> {<a name="line.1633"></a> <FONT color="green">1634</FONT> return (Date) reportReturn(methodCall, realResultSet.getDate(columnName, cal));<a name="line.1634"></a> <FONT color="green">1635</FONT> }<a name="line.1635"></a> <FONT color="green">1636</FONT> catch (SQLException s)<a name="line.1636"></a> <FONT color="green">1637</FONT> {<a name="line.1637"></a> <FONT color="green">1638</FONT> reportException(methodCall, s);<a name="line.1638"></a> <FONT color="green">1639</FONT> throw s;<a name="line.1639"></a> <FONT color="green">1640</FONT> }<a name="line.1640"></a> <FONT color="green">1641</FONT> }<a name="line.1641"></a> <FONT color="green">1642</FONT> <a name="line.1642"></a> <FONT color="green">1643</FONT> public boolean last() throws SQLException<a name="line.1643"></a> <FONT color="green">1644</FONT> {<a name="line.1644"></a> <FONT color="green">1645</FONT> String methodCall = "last()";<a name="line.1645"></a> <FONT color="green">1646</FONT> try<a name="line.1646"></a> <FONT color="green">1647</FONT> {<a name="line.1647"></a> <FONT color="green">1648</FONT> return reportReturn(methodCall, realResultSet.last());<a name="line.1648"></a> <FONT color="green">1649</FONT> }<a name="line.1649"></a> <FONT color="green">1650</FONT> catch (SQLException s)<a name="line.1650"></a> <FONT color="green">1651</FONT> {<a name="line.1651"></a> <FONT color="green">1652</FONT> reportException(methodCall, s);<a name="line.1652"></a> <FONT color="green">1653</FONT> throw s;<a name="line.1653"></a> <FONT color="green">1654</FONT> }<a name="line.1654"></a> <FONT color="green">1655</FONT> }<a name="line.1655"></a> <FONT color="green">1656</FONT> <a name="line.1656"></a> <FONT color="green">1657</FONT> public boolean rowInserted() throws SQLException<a name="line.1657"></a> <FONT color="green">1658</FONT> {<a name="line.1658"></a> <FONT color="green">1659</FONT> String methodCall = "rowInserted()";<a name="line.1659"></a> <FONT color="green">1660</FONT> try<a name="line.1660"></a> <FONT color="green">1661</FONT> {<a name="line.1661"></a> <FONT color="green">1662</FONT> return reportReturn(methodCall, realResultSet.rowInserted());<a name="line.1662"></a> <FONT color="green">1663</FONT> }<a name="line.1663"></a> <FONT color="green">1664</FONT> catch (SQLException s)<a name="line.1664"></a> <FONT color="green">1665</FONT> {<a name="line.1665"></a> <FONT color="green">1666</FONT> reportException(methodCall, s);<a name="line.1666"></a> <FONT color="green">1667</FONT> throw s;<a name="line.1667"></a> <FONT color="green">1668</FONT> }<a name="line.1668"></a> <FONT color="green">1669</FONT> }<a name="line.1669"></a> <FONT color="green">1670</FONT> <a name="line.1670"></a> <FONT color="green">1671</FONT> public boolean rowDeleted() throws SQLException<a name="line.1671"></a> <FONT color="green">1672</FONT> {<a name="line.1672"></a> <FONT color="green">1673</FONT> String methodCall = "rowDeleted()";<a name="line.1673"></a> <FONT color="green">1674</FONT> try<a name="line.1674"></a> <FONT color="green">1675</FONT> {<a name="line.1675"></a> <FONT color="green">1676</FONT> return reportReturn(methodCall, realResultSet.rowDeleted());<a name="line.1676"></a> <FONT color="green">1677</FONT> }<a name="line.1677"></a> <FONT color="green">1678</FONT> catch (SQLException s)<a name="line.1678"></a> <FONT color="green">1679</FONT> {<a name="line.1679"></a> <FONT color="green">1680</FONT> reportException(methodCall, s);<a name="line.1680"></a> <FONT color="green">1681</FONT> throw s;<a name="line.1681"></a> <FONT color="green">1682</FONT> }<a name="line.1682"></a> <FONT color="green">1683</FONT> }<a name="line.1683"></a> <FONT color="green">1684</FONT> <a name="line.1684"></a> <FONT color="green">1685</FONT> public void updateNull(int columnIndex) throws SQLException<a name="line.1685"></a> <FONT color="green">1686</FONT> {<a name="line.1686"></a> <FONT color="green">1687</FONT> String methodCall = "updateNull(" + columnIndex + ")";<a name="line.1687"></a> <FONT color="green">1688</FONT> try<a name="line.1688"></a> <FONT color="green">1689</FONT> {<a name="line.1689"></a> <FONT color="green">1690</FONT> realResultSet.updateNull(columnIndex);<a name="line.1690"></a> <FONT color="green">1691</FONT> }<a name="line.1691"></a> <FONT color="green">1692</FONT> catch (SQLException s)<a name="line.1692"></a> <FONT color="green">1693</FONT> {<a name="line.1693"></a> <FONT color="green">1694</FONT> reportException(methodCall, s);<a name="line.1694"></a> <FONT color="green">1695</FONT> throw s;<a name="line.1695"></a> <FONT color="green">1696</FONT> }<a name="line.1696"></a> <FONT color="green">1697</FONT> reportReturn(methodCall);<a name="line.1697"></a> <FONT color="green">1698</FONT> }<a name="line.1698"></a> <FONT color="green">1699</FONT> <a name="line.1699"></a> <FONT color="green">1700</FONT> public void updateNull(String columnName) throws SQLException<a name="line.1700"></a> <FONT color="green">1701</FONT> {<a name="line.1701"></a> <FONT color="green">1702</FONT> String methodCall = "updateNull(" + columnName + ")";<a name="line.1702"></a> <FONT color="green">1703</FONT> try<a name="line.1703"></a> <FONT color="green">1704</FONT> {<a name="line.1704"></a> <FONT color="green">1705</FONT> realResultSet.updateNull(columnName);<a name="line.1705"></a> <FONT color="green">1706</FONT> }<a name="line.1706"></a> <FONT color="green">1707</FONT> catch (SQLException s)<a name="line.1707"></a> <FONT color="green">1708</FONT> {<a name="line.1708"></a> <FONT color="green">1709</FONT> reportException(methodCall, s);<a name="line.1709"></a> <FONT color="green">1710</FONT> throw s;<a name="line.1710"></a> <FONT color="green">1711</FONT> }<a name="line.1711"></a> <FONT color="green">1712</FONT> reportReturn(methodCall);<a name="line.1712"></a> <FONT color="green">1713</FONT> }<a name="line.1713"></a> <FONT color="green">1714</FONT> <a name="line.1714"></a> <FONT color="green">1715</FONT> public void updateShort(int columnIndex, short x) throws SQLException<a name="line.1715"></a> <FONT color="green">1716</FONT> {<a name="line.1716"></a> <FONT color="green">1717</FONT> String methodCall = "updateShort(" + columnIndex + ", " + x + ")";<a name="line.1717"></a> <FONT color="green">1718</FONT> try<a name="line.1718"></a> <FONT color="green">1719</FONT> {<a name="line.1719"></a> <FONT color="green">1720</FONT> realResultSet.updateShort(columnIndex, x);<a name="line.1720"></a> <FONT color="green">1721</FONT> }<a name="line.1721"></a> <FONT color="green">1722</FONT> catch (SQLException s)<a name="line.1722"></a> <FONT color="green">1723</FONT> {<a name="line.1723"></a> <FONT color="green">1724</FONT> reportException(methodCall, s);<a name="line.1724"></a> <FONT color="green">1725</FONT> throw s;<a name="line.1725"></a> <FONT color="green">1726</FONT> }<a name="line.1726"></a> <FONT color="green">1727</FONT> reportReturn(methodCall);<a name="line.1727"></a> <FONT color="green">1728</FONT> }<a name="line.1728"></a> <FONT color="green">1729</FONT> <a name="line.1729"></a> <FONT color="green">1730</FONT> public void updateShort(String columnName, short x) throws SQLException<a name="line.1730"></a> <FONT color="green">1731</FONT> {<a name="line.1731"></a> <FONT color="green">1732</FONT> String methodCall = "updateShort(" + columnName + ", " + x + ")";<a name="line.1732"></a> <FONT color="green">1733</FONT> try<a name="line.1733"></a> <FONT color="green">1734</FONT> {<a name="line.1734"></a> <FONT color="green">1735</FONT> realResultSet.updateShort(columnName, x);<a name="line.1735"></a> <FONT color="green">1736</FONT> }<a name="line.1736"></a> <FONT color="green">1737</FONT> catch (SQLException s)<a name="line.1737"></a> <FONT color="green">1738</FONT> {<a name="line.1738"></a> <FONT color="green">1739</FONT> reportException(methodCall, s);<a name="line.1739"></a> <FONT color="green">1740</FONT> throw s;<a name="line.1740"></a> <FONT color="green">1741</FONT> }<a name="line.1741"></a> <FONT color="green">1742</FONT> reportReturn(methodCall);<a name="line.1742"></a> <FONT color="green">1743</FONT> }<a name="line.1743"></a> <FONT color="green">1744</FONT> <a name="line.1744"></a> <FONT color="green">1745</FONT> public void updateBoolean(int columnIndex, boolean x) throws SQLException<a name="line.1745"></a> <FONT color="green">1746</FONT> {<a name="line.1746"></a> <FONT color="green">1747</FONT> String methodCall = "updateBoolean(" + columnIndex + ", " + x + ")";<a name="line.1747"></a> <FONT color="green">1748</FONT> try<a name="line.1748"></a> <FONT color="green">1749</FONT> {<a name="line.1749"></a> <FONT color="green">1750</FONT> realResultSet.updateBoolean(columnIndex, x);<a name="line.1750"></a> <FONT color="green">1751</FONT> }<a name="line.1751"></a> <FONT color="green">1752</FONT> catch (SQLException s)<a name="line.1752"></a> <FONT color="green">1753</FONT> {<a name="line.1753"></a> <FONT color="green">1754</FONT> reportException(methodCall, s);<a name="line.1754"></a> <FONT color="green">1755</FONT> throw s;<a name="line.1755"></a> <FONT color="green">1756</FONT> }<a name="line.1756"></a> <FONT color="green">1757</FONT> reportReturn(methodCall);<a name="line.1757"></a> <FONT color="green">1758</FONT> }<a name="line.1758"></a> <FONT color="green">1759</FONT> <a name="line.1759"></a> <FONT color="green">1760</FONT> public void updateBoolean(String columnName, boolean x) throws SQLException<a name="line.1760"></a> <FONT color="green">1761</FONT> {<a name="line.1761"></a> <FONT color="green">1762</FONT> String methodCall = "updateBoolean(" + columnName + ", " + x + ")";<a name="line.1762"></a> <FONT color="green">1763</FONT> try<a name="line.1763"></a> <FONT color="green">1764</FONT> {<a name="line.1764"></a> <FONT color="green">1765</FONT> realResultSet.updateBoolean(columnName, x);<a name="line.1765"></a> <FONT color="green">1766</FONT> }<a name="line.1766"></a> <FONT color="green">1767</FONT> catch (SQLException s)<a name="line.1767"></a> <FONT color="green">1768</FONT> {<a name="line.1768"></a> <FONT color="green">1769</FONT> reportException(methodCall, s);<a name="line.1769"></a> <FONT color="green">1770</FONT> throw s;<a name="line.1770"></a> <FONT color="green">1771</FONT> }<a name="line.1771"></a> <FONT color="green">1772</FONT> reportReturn(methodCall);<a name="line.1772"></a> <FONT color="green">1773</FONT> }<a name="line.1773"></a> <FONT color="green">1774</FONT> <a name="line.1774"></a> <FONT color="green">1775</FONT> public void updateByte(int columnIndex, byte x) throws SQLException<a name="line.1775"></a> <FONT color="green">1776</FONT> {<a name="line.1776"></a> <FONT color="green">1777</FONT> String methodCall = "updateByte(" + columnIndex + ", " + x + ")";<a name="line.1777"></a> <FONT color="green">1778</FONT> try<a name="line.1778"></a> <FONT color="green">1779</FONT> {<a name="line.1779"></a> <FONT color="green">1780</FONT> realResultSet.updateByte(columnIndex, x);<a name="line.1780"></a> <FONT color="green">1781</FONT> }<a name="line.1781"></a> <FONT color="green">1782</FONT> catch (SQLException s)<a name="line.1782"></a> <FONT color="green">1783</FONT> {<a name="line.1783"></a> <FONT color="green">1784</FONT> reportException(methodCall, s);<a name="line.1784"></a> <FONT color="green">1785</FONT> throw s;<a name="line.1785"></a> <FONT color="green">1786</FONT> }<a name="line.1786"></a> <FONT color="green">1787</FONT> reportReturn(methodCall);<a name="line.1787"></a> <FONT color="green">1788</FONT> }<a name="line.1788"></a> <FONT color="green">1789</FONT> <a name="line.1789"></a> <FONT color="green">1790</FONT> public void updateByte(String columnName, byte x) throws SQLException<a name="line.1790"></a> <FONT color="green">1791</FONT> {<a name="line.1791"></a> <FONT color="green">1792</FONT> String methodCall = "updateByte(" + columnName + ", " + x + ")";<a name="line.1792"></a> <FONT color="green">1793</FONT> try<a name="line.1793"></a> <FONT color="green">1794</FONT> {<a name="line.1794"></a> <FONT color="green">1795</FONT> realResultSet.updateByte(columnName, x);<a name="line.1795"></a> <FONT color="green">1796</FONT> }<a name="line.1796"></a> <FONT color="green">1797</FONT> catch (SQLException s)<a name="line.1797"></a> <FONT color="green">1798</FONT> {<a name="line.1798"></a> <FONT color="green">1799</FONT> reportException(methodCall, s);<a name="line.1799"></a> <FONT color="green">1800</FONT> throw s;<a name="line.1800"></a> <FONT color="green">1801</FONT> }<a name="line.1801"></a> <FONT color="green">1802</FONT> reportReturn(methodCall);<a name="line.1802"></a> <FONT color="green">1803</FONT> }<a name="line.1803"></a> <FONT color="green">1804</FONT> <a name="line.1804"></a> <FONT color="green">1805</FONT> public void updateInt(int columnIndex, int x) throws SQLException<a name="line.1805"></a> <FONT color="green">1806</FONT> {<a name="line.1806"></a> <FONT color="green">1807</FONT> String methodCall = "updateInt(" + columnIndex + ", " + x + ")";<a name="line.1807"></a> <FONT color="green">1808</FONT> try<a name="line.1808"></a> <FONT color="green">1809</FONT> {<a name="line.1809"></a> <FONT color="green">1810</FONT> realResultSet.updateInt(columnIndex, x);<a name="line.1810"></a> <FONT color="green">1811</FONT> }<a name="line.1811"></a> <FONT color="green">1812</FONT> catch (SQLException s)<a name="line.1812"></a> <FONT color="green">1813</FONT> {<a name="line.1813"></a> <FONT color="green">1814</FONT> reportException(methodCall, s);<a name="line.1814"></a> <FONT color="green">1815</FONT> throw s;<a name="line.1815"></a> <FONT color="green">1816</FONT> }<a name="line.1816"></a> <FONT color="green">1817</FONT> reportReturn(methodCall);<a name="line.1817"></a> <FONT color="green">1818</FONT> }<a name="line.1818"></a> <FONT color="green">1819</FONT> <a name="line.1819"></a> <FONT color="green">1820</FONT> public void updateInt(String columnName, int x) throws SQLException<a name="line.1820"></a> <FONT color="green">1821</FONT> {<a name="line.1821"></a> <FONT color="green">1822</FONT> String methodCall = "updateInt(" + columnName + ", " + x + ")";<a name="line.1822"></a> <FONT color="green">1823</FONT> try<a name="line.1823"></a> <FONT color="green">1824</FONT> {<a name="line.1824"></a> <FONT color="green">1825</FONT> realResultSet.updateInt(columnName, x);<a name="line.1825"></a> <FONT color="green">1826</FONT> }<a name="line.1826"></a> <FONT color="green">1827</FONT> catch (SQLException s)<a name="line.1827"></a> <FONT color="green">1828</FONT> {<a name="line.1828"></a> <FONT color="green">1829</FONT> reportException(methodCall, s);<a name="line.1829"></a> <FONT color="green">1830</FONT> throw s;<a name="line.1830"></a> <FONT color="green">1831</FONT> }<a name="line.1831"></a> <FONT color="green">1832</FONT> reportReturn(methodCall);<a name="line.1832"></a> <FONT color="green">1833</FONT> }<a name="line.1833"></a> <FONT color="green">1834</FONT> <a name="line.1834"></a> <FONT color="green">1835</FONT> public Object getObject(int columnIndex) throws SQLException<a name="line.1835"></a> <FONT color="green">1836</FONT> {<a name="line.1836"></a> <FONT color="green">1837</FONT> String methodCall = "getObject(" + columnIndex + ")";<a name="line.1837"></a> <FONT color="green">1838</FONT> try<a name="line.1838"></a> <FONT color="green">1839</FONT> {<a name="line.1839"></a> <FONT color="green">1840</FONT> return reportReturn(methodCall, realResultSet.getObject(columnIndex));<a name="line.1840"></a> <FONT color="green">1841</FONT> }<a name="line.1841"></a> <FONT color="green">1842</FONT> catch (SQLException s)<a name="line.1842"></a> <FONT color="green">1843</FONT> {<a name="line.1843"></a> <FONT color="green">1844</FONT> reportException(methodCall, s);<a name="line.1844"></a> <FONT color="green">1845</FONT> throw s;<a name="line.1845"></a> <FONT color="green">1846</FONT> }<a name="line.1846"></a> <FONT color="green">1847</FONT> }<a name="line.1847"></a> <FONT color="green">1848</FONT> <a name="line.1848"></a> <FONT color="green">1849</FONT> public Object getObject(String columnName) throws SQLException<a name="line.1849"></a> <FONT color="green">1850</FONT> {<a name="line.1850"></a> <FONT color="green">1851</FONT> String methodCall = "getObject(" + columnName + ")";<a name="line.1851"></a> <FONT color="green">1852</FONT> try<a name="line.1852"></a> <FONT color="green">1853</FONT> {<a name="line.1853"></a> <FONT color="green">1854</FONT> return reportReturn(methodCall, realResultSet.getObject(columnName));<a name="line.1854"></a> <FONT color="green">1855</FONT> }<a name="line.1855"></a> <FONT color="green">1856</FONT> catch (SQLException s)<a name="line.1856"></a> <FONT color="green">1857</FONT> {<a name="line.1857"></a> <FONT color="green">1858</FONT> reportException(methodCall, s);<a name="line.1858"></a> <FONT color="green">1859</FONT> throw s;<a name="line.1859"></a> <FONT color="green">1860</FONT> }<a name="line.1860"></a> <FONT color="green">1861</FONT> }<a name="line.1861"></a> <FONT color="green">1862</FONT> <a name="line.1862"></a> <FONT color="green">1863</FONT> public Object getObject(String colName, Map map) throws SQLException<a name="line.1863"></a> <FONT color="green">1864</FONT> {<a name="line.1864"></a> <FONT color="green">1865</FONT> String methodCall = "getObject(" + colName + ", " + map + ")";<a name="line.1865"></a> <FONT color="green">1866</FONT> try<a name="line.1866"></a> <FONT color="green">1867</FONT> {<a name="line.1867"></a> <FONT color="green">1868</FONT> return reportReturn(methodCall, realResultSet.getObject(colName, map));<a name="line.1868"></a> <FONT color="green">1869</FONT> }<a name="line.1869"></a> <FONT color="green">1870</FONT> catch (SQLException s)<a name="line.1870"></a> <FONT color="green">1871</FONT> {<a name="line.1871"></a> <FONT color="green">1872</FONT> reportException(methodCall, s);<a name="line.1872"></a> <FONT color="green">1873</FONT> throw s;<a name="line.1873"></a> <FONT color="green">1874</FONT> }<a name="line.1874"></a> <FONT color="green">1875</FONT> }<a name="line.1875"></a> <FONT color="green">1876</FONT> <a name="line.1876"></a> <FONT color="green">1877</FONT> public boolean next() throws SQLException<a name="line.1877"></a> <FONT color="green">1878</FONT> {<a name="line.1878"></a> <FONT color="green">1879</FONT> String methodCall = "next()";<a name="line.1879"></a> <FONT color="green">1880</FONT> try<a name="line.1880"></a> <FONT color="green">1881</FONT> {<a name="line.1881"></a> <FONT color="green">1882</FONT> return reportReturn(methodCall, realResultSet.next());<a name="line.1882"></a> <FONT color="green">1883</FONT> }<a name="line.1883"></a> <FONT color="green">1884</FONT> catch (SQLException s)<a name="line.1884"></a> <FONT color="green">1885</FONT> {<a name="line.1885"></a> <FONT color="green">1886</FONT> reportException(methodCall, s);<a name="line.1886"></a> <FONT color="green">1887</FONT> throw s;<a name="line.1887"></a> <FONT color="green">1888</FONT> }<a name="line.1888"></a> <FONT color="green">1889</FONT> }<a name="line.1889"></a> <FONT color="green">1890</FONT> <a name="line.1890"></a> <FONT color="green">1891</FONT> public void updateLong(int columnIndex, long x) throws SQLException<a name="line.1891"></a> <FONT color="green">1892</FONT> {<a name="line.1892"></a> <FONT color="green">1893</FONT> String methodCall = "updateLong(" + columnIndex + ", " + x + ")";<a name="line.1893"></a> <FONT color="green">1894</FONT> try<a name="line.1894"></a> <FONT color="green">1895</FONT> {<a name="line.1895"></a> <FONT color="green">1896</FONT> realResultSet.updateLong(columnIndex, x);<a name="line.1896"></a> <FONT color="green">1897</FONT> }<a name="line.1897"></a> <FONT color="green">1898</FONT> catch (SQLException s)<a name="line.1898"></a> <FONT color="green">1899</FONT> {<a name="line.1899"></a> <FONT color="green">1900</FONT> reportException(methodCall, s);<a name="line.1900"></a> <FONT color="green">1901</FONT> throw s;<a name="line.1901"></a> <FONT color="green">1902</FONT> }<a name="line.1902"></a> <FONT color="green">1903</FONT> reportReturn(methodCall);<a name="line.1903"></a> <FONT color="green">1904</FONT> }<a name="line.1904"></a> <FONT color="green">1905</FONT> <a name="line.1905"></a> <FONT color="green">1906</FONT> public void updateLong(String columnName, long x) throws SQLException<a name="line.1906"></a> <FONT color="green">1907</FONT> {<a name="line.1907"></a> <FONT color="green">1908</FONT> String methodCall = "updateLong(" + columnName + ", " + x + ")";<a name="line.1908"></a> <FONT color="green">1909</FONT> try<a name="line.1909"></a> <FONT color="green">1910</FONT> {<a name="line.1910"></a> <FONT color="green">1911</FONT> realResultSet.updateLong(columnName, x);<a name="line.1911"></a> <FONT color="green">1912</FONT> }<a name="line.1912"></a> <FONT color="green">1913</FONT> catch (SQLException s)<a name="line.1913"></a> <FONT color="green">1914</FONT> {<a name="line.1914"></a> <FONT color="green">1915</FONT> reportException(methodCall, s);<a name="line.1915"></a> <FONT color="green">1916</FONT> throw s;<a name="line.1916"></a> <FONT color="green">1917</FONT> }<a name="line.1917"></a> <FONT color="green">1918</FONT> reportReturn(methodCall);<a name="line.1918"></a> <FONT color="green">1919</FONT> }<a name="line.1919"></a> <FONT color="green">1920</FONT> <a name="line.1920"></a> <FONT color="green">1921</FONT> public void updateFloat(int columnIndex, float x) throws SQLException<a name="line.1921"></a> <FONT color="green">1922</FONT> {<a name="line.1922"></a> <FONT color="green">1923</FONT> String methodCall = "updateFloat(" + columnIndex + ", " + x + ")";<a name="line.1923"></a> <FONT color="green">1924</FONT> try<a name="line.1924"></a> <FONT color="green">1925</FONT> {<a name="line.1925"></a> <FONT color="green">1926</FONT> realResultSet.updateFloat(columnIndex, x);<a name="line.1926"></a> <FONT color="green">1927</FONT> }<a name="line.1927"></a> <FONT color="green">1928</FONT> catch (SQLException s)<a name="line.1928"></a> <FONT color="green">1929</FONT> {<a name="line.1929"></a> <FONT color="green">1930</FONT> reportException(methodCall, s);<a name="line.1930"></a> <FONT color="green">1931</FONT> throw s;<a name="line.1931"></a> <FONT color="green">1932</FONT> }<a name="line.1932"></a> <FONT color="green">1933</FONT> reportReturn(methodCall);<a name="line.1933"></a> <FONT color="green">1934</FONT> <a name="line.1934"></a> <FONT color="green">1935</FONT> }<a name="line.1935"></a> <FONT color="green">1936</FONT> <a name="line.1936"></a> <FONT color="green">1937</FONT> public void updateFloat(String columnName, float x) throws SQLException<a name="line.1937"></a> <FONT color="green">1938</FONT> {<a name="line.1938"></a> <FONT color="green">1939</FONT> String methodCall = "updateFloat(" + columnName + ", " + x + ")";<a name="line.1939"></a> <FONT color="green">1940</FONT> try<a name="line.1940"></a> <FONT color="green">1941</FONT> {<a name="line.1941"></a> <FONT color="green">1942</FONT> realResultSet.updateFloat(columnName, x);<a name="line.1942"></a> <FONT color="green">1943</FONT> }<a name="line.1943"></a> <FONT color="green">1944</FONT> catch (SQLException s)<a name="line.1944"></a> <FONT color="green">1945</FONT> {<a name="line.1945"></a> <FONT color="green">1946</FONT> reportException(methodCall, s);<a name="line.1946"></a> <FONT color="green">1947</FONT> throw s;<a name="line.1947"></a> <FONT color="green">1948</FONT> }<a name="line.1948"></a> <FONT color="green">1949</FONT> reportReturn(methodCall);<a name="line.1949"></a> <FONT color="green">1950</FONT> }<a name="line.1950"></a> <FONT color="green">1951</FONT> <a name="line.1951"></a> <FONT color="green">1952</FONT> public void updateDouble(int columnIndex, double x) throws SQLException<a name="line.1952"></a> <FONT color="green">1953</FONT> {<a name="line.1953"></a> <FONT color="green">1954</FONT> String methodCall = "updateDouble(" + columnIndex + ", " + x + ")";<a name="line.1954"></a> <FONT color="green">1955</FONT> try<a name="line.1955"></a> <FONT color="green">1956</FONT> {<a name="line.1956"></a> <FONT color="green">1957</FONT> realResultSet.updateDouble(columnIndex, x);<a name="line.1957"></a> <FONT color="green">1958</FONT> }<a name="line.1958"></a> <FONT color="green">1959</FONT> catch (SQLException s)<a name="line.1959"></a> <FONT color="green">1960</FONT> {<a name="line.1960"></a> <FONT color="green">1961</FONT> reportException(methodCall, s);<a name="line.1961"></a> <FONT color="green">1962</FONT> throw s;<a name="line.1962"></a> <FONT color="green">1963</FONT> }<a name="line.1963"></a> <FONT color="green">1964</FONT> reportReturn(methodCall);<a name="line.1964"></a> <FONT color="green">1965</FONT> }<a name="line.1965"></a> <FONT color="green">1966</FONT> <a name="line.1966"></a> <FONT color="green">1967</FONT> public void updateDouble(String columnName, double x) throws SQLException<a name="line.1967"></a> <FONT color="green">1968</FONT> {<a name="line.1968"></a> <FONT color="green">1969</FONT> String methodCall = "updateDouble(" + columnName + ", " + x + ")";<a name="line.1969"></a> <FONT color="green">1970</FONT> try<a name="line.1970"></a> <FONT color="green">1971</FONT> {<a name="line.1971"></a> <FONT color="green">1972</FONT> realResultSet.updateDouble(columnName, x);<a name="line.1972"></a> <FONT color="green">1973</FONT> }<a name="line.1973"></a> <FONT color="green">1974</FONT> catch (SQLException s)<a name="line.1974"></a> <FONT color="green">1975</FONT> {<a name="line.1975"></a> <FONT color="green">1976</FONT> reportException(methodCall, s);<a name="line.1976"></a> <FONT color="green">1977</FONT> throw s;<a name="line.1977"></a> <FONT color="green">1978</FONT> }<a name="line.1978"></a> <FONT color="green">1979</FONT> reportReturn(methodCall);<a name="line.1979"></a> <FONT color="green">1980</FONT> }<a name="line.1980"></a> <FONT color="green">1981</FONT> <a name="line.1981"></a> <FONT color="green">1982</FONT> public Statement getStatement() throws SQLException<a name="line.1982"></a> <FONT color="green">1983</FONT> {<a name="line.1983"></a> <FONT color="green">1984</FONT> String methodCall = "getStatement()";<a name="line.1984"></a> <FONT color="green">1985</FONT> try<a name="line.1985"></a> <FONT color="green">1986</FONT> {<a name="line.1986"></a> <FONT color="green">1987</FONT> Statement s = realResultSet.getStatement();<a name="line.1987"></a> <FONT color="green">1988</FONT> if (s == null)<a name="line.1988"></a> <FONT color="green">1989</FONT> {<a name="line.1989"></a> <FONT color="green">1990</FONT> return (Statement) reportReturn(methodCall, s);<a name="line.1990"></a> <FONT color="green">1991</FONT> }<a name="line.1991"></a> <FONT color="green">1992</FONT> else<a name="line.1992"></a> <FONT color="green">1993</FONT> {<a name="line.1993"></a> <FONT color="green">1994</FONT> //todo: what's going on here?<a name="line.1994"></a> <FONT color="green">1995</FONT> return (Statement) reportReturn(methodCall, new StatementSpy(new ConnectionSpy(s.getConnection()), s));<a name="line.1995"></a> <FONT color="green">1996</FONT> }<a name="line.1996"></a> <FONT color="green">1997</FONT> }<a name="line.1997"></a> <FONT color="green">1998</FONT> catch (SQLException s)<a name="line.1998"></a> <FONT color="green">1999</FONT> {<a name="line.1999"></a> <FONT color="green">2000</FONT> reportException(methodCall, s);<a name="line.2000"></a> <FONT color="green">2001</FONT> throw s;<a name="line.2001"></a> <FONT color="green">2002</FONT> }<a name="line.2002"></a> <FONT color="green">2003</FONT> }<a name="line.2003"></a> <FONT color="green">2004</FONT> <a name="line.2004"></a> <FONT color="green">2005</FONT> public Object getObject(int columnIndex, Map&lt;String, Class&lt;?&gt;&gt; map) throws SQLException<a name="line.2005"></a> <FONT color="green">2006</FONT> {<a name="line.2006"></a> <FONT color="green">2007</FONT> String methodCall = "getObject(" + columnIndex + ", " + map + ")";<a name="line.2007"></a> <FONT color="green">2008</FONT> try<a name="line.2008"></a> <FONT color="green">2009</FONT> {<a name="line.2009"></a> <FONT color="green">2010</FONT> return reportReturn(methodCall, realResultSet.getObject(columnIndex, map));<a name="line.2010"></a> <FONT color="green">2011</FONT> }<a name="line.2011"></a> <FONT color="green">2012</FONT> catch (SQLException s)<a name="line.2012"></a> <FONT color="green">2013</FONT> {<a name="line.2013"></a> <FONT color="green">2014</FONT> reportException(methodCall, s);<a name="line.2014"></a> <FONT color="green">2015</FONT> throw s;<a name="line.2015"></a> <FONT color="green">2016</FONT> }<a name="line.2016"></a> <FONT color="green">2017</FONT> }<a name="line.2017"></a> <FONT color="green">2018</FONT> <a name="line.2018"></a> <FONT color="green">2019</FONT> public void updateString(int columnIndex, String x) throws SQLException<a name="line.2019"></a> <FONT color="green">2020</FONT> {<a name="line.2020"></a> <FONT color="green">2021</FONT> String methodCall = "updateString(" + columnIndex + ", " + x + ")";<a name="line.2021"></a> <FONT color="green">2022</FONT> try<a name="line.2022"></a> <FONT color="green">2023</FONT> {<a name="line.2023"></a> <FONT color="green">2024</FONT> realResultSet.updateString(columnIndex, x);<a name="line.2024"></a> <FONT color="green">2025</FONT> }<a name="line.2025"></a> <FONT color="green">2026</FONT> catch (SQLException s)<a name="line.2026"></a> <FONT color="green">2027</FONT> {<a name="line.2027"></a> <FONT color="green">2028</FONT> reportException(methodCall, s);<a name="line.2028"></a> <FONT color="green">2029</FONT> throw s;<a name="line.2029"></a> <FONT color="green">2030</FONT> }<a name="line.2030"></a> <FONT color="green">2031</FONT> reportReturn(methodCall);<a name="line.2031"></a> <FONT color="green">2032</FONT> }<a name="line.2032"></a> <FONT color="green">2033</FONT> <a name="line.2033"></a> <FONT color="green">2034</FONT> public void updateString(String columnName, String x) throws SQLException<a name="line.2034"></a> <FONT color="green">2035</FONT> {<a name="line.2035"></a> <FONT color="green">2036</FONT> String methodCall = "updateString(" + columnName + ", " + x + ")";<a name="line.2036"></a> <FONT color="green">2037</FONT> try<a name="line.2037"></a> <FONT color="green">2038</FONT> {<a name="line.2038"></a> <FONT color="green">2039</FONT> realResultSet.updateString(columnName, x);<a name="line.2039"></a> <FONT color="green">2040</FONT> }<a name="line.2040"></a> <FONT color="green">2041</FONT> catch (SQLException s)<a name="line.2041"></a> <FONT color="green">2042</FONT> {<a name="line.2042"></a> <FONT color="green">2043</FONT> reportException(methodCall, s);<a name="line.2043"></a> <FONT color="green">2044</FONT> throw s;<a name="line.2044"></a> <FONT color="green">2045</FONT> }<a name="line.2045"></a> <FONT color="green">2046</FONT> reportReturn(methodCall);<a name="line.2046"></a> <FONT color="green">2047</FONT> }<a name="line.2047"></a> <FONT color="green">2048</FONT> <a name="line.2048"></a> <FONT color="green">2049</FONT> public InputStream getAsciiStream(int columnIndex) throws SQLException<a name="line.2049"></a> <FONT color="green">2050</FONT> {<a name="line.2050"></a> <FONT color="green">2051</FONT> String methodCall = "getAsciiStream(" + columnIndex + ")";<a name="line.2051"></a> <FONT color="green">2052</FONT> try<a name="line.2052"></a> <FONT color="green">2053</FONT> {<a name="line.2053"></a> <FONT color="green">2054</FONT> return (InputStream) reportReturn(methodCall, realResultSet.getAsciiStream(columnIndex));<a name="line.2054"></a> <FONT color="green">2055</FONT> }<a name="line.2055"></a> <FONT color="green">2056</FONT> catch (SQLException s)<a name="line.2056"></a> <FONT color="green">2057</FONT> {<a name="line.2057"></a> <FONT color="green">2058</FONT> reportException(methodCall, s);<a name="line.2058"></a> <FONT color="green">2059</FONT> throw s;<a name="line.2059"></a> <FONT color="green">2060</FONT> }<a name="line.2060"></a> <FONT color="green">2061</FONT> }<a name="line.2061"></a> <FONT color="green">2062</FONT> <a name="line.2062"></a> <FONT color="green">2063</FONT> public InputStream getAsciiStream(String columnName) throws SQLException<a name="line.2063"></a> <FONT color="green">2064</FONT> {<a name="line.2064"></a> <FONT color="green">2065</FONT> String methodCall = "getAsciiStream(" + columnName + ")";<a name="line.2065"></a> <FONT color="green">2066</FONT> try<a name="line.2066"></a> <FONT color="green">2067</FONT> {<a name="line.2067"></a> <FONT color="green">2068</FONT> return (InputStream) reportReturn(methodCall, realResultSet.getAsciiStream(columnName));<a name="line.2068"></a> <FONT color="green">2069</FONT> }<a name="line.2069"></a> <FONT color="green">2070</FONT> catch (SQLException s)<a name="line.2070"></a> <FONT color="green">2071</FONT> {<a name="line.2071"></a> <FONT color="green">2072</FONT> reportException(methodCall, s);<a name="line.2072"></a> <FONT color="green">2073</FONT> throw s;<a name="line.2073"></a> <FONT color="green">2074</FONT> }<a name="line.2074"></a> <FONT color="green">2075</FONT> }<a name="line.2075"></a> <FONT color="green">2076</FONT> <a name="line.2076"></a> <FONT color="green">2077</FONT> public void updateBigDecimal(int columnIndex, BigDecimal x) throws SQLException<a name="line.2077"></a> <FONT color="green">2078</FONT> {<a name="line.2078"></a> <FONT color="green">2079</FONT> String methodCall = "updateBigDecimal(" + columnIndex + ", " + x + ")";<a name="line.2079"></a> <FONT color="green">2080</FONT> try<a name="line.2080"></a> <FONT color="green">2081</FONT> {<a name="line.2081"></a> <FONT color="green">2082</FONT> realResultSet.updateBigDecimal(columnIndex, x);<a name="line.2082"></a> <FONT color="green">2083</FONT> }<a name="line.2083"></a> <FONT color="green">2084</FONT> catch (SQLException s)<a name="line.2084"></a> <FONT color="green">2085</FONT> {<a name="line.2085"></a> <FONT color="green">2086</FONT> reportException(methodCall, s);<a name="line.2086"></a> <FONT color="green">2087</FONT> throw s;<a name="line.2087"></a> <FONT color="green">2088</FONT> }<a name="line.2088"></a> <FONT color="green">2089</FONT> reportReturn(methodCall);<a name="line.2089"></a> <FONT color="green">2090</FONT> }<a name="line.2090"></a> <FONT color="green">2091</FONT> <a name="line.2091"></a> <FONT color="green">2092</FONT> public URL getURL(int columnIndex) throws SQLException<a name="line.2092"></a> <FONT color="green">2093</FONT> {<a name="line.2093"></a> <FONT color="green">2094</FONT> String methodCall = "getURL(" + columnIndex + ")";<a name="line.2094"></a> <FONT color="green">2095</FONT> try<a name="line.2095"></a> <FONT color="green">2096</FONT> {<a name="line.2096"></a> <FONT color="green">2097</FONT> return (URL) reportReturn(methodCall, realResultSet.getURL(columnIndex));<a name="line.2097"></a> <FONT color="green">2098</FONT> }<a name="line.2098"></a> <FONT color="green">2099</FONT> catch (SQLException s)<a name="line.2099"></a> <FONT color="green">2100</FONT> {<a name="line.2100"></a> <FONT color="green">2101</FONT> reportException(methodCall, s);<a name="line.2101"></a> <FONT color="green">2102</FONT> throw s;<a name="line.2102"></a> <FONT color="green">2103</FONT> }<a name="line.2103"></a> <FONT color="green">2104</FONT> }<a name="line.2104"></a> <FONT color="green">2105</FONT> <a name="line.2105"></a> <FONT color="green">2106</FONT> public void updateBigDecimal(String columnName, BigDecimal x) throws SQLException<a name="line.2106"></a> <FONT color="green">2107</FONT> {<a name="line.2107"></a> <FONT color="green">2108</FONT> String methodCall = "updateBigDecimal(" + columnName + ", " + x + ")";<a name="line.2108"></a> <FONT color="green">2109</FONT> try<a name="line.2109"></a> <FONT color="green">2110</FONT> {<a name="line.2110"></a> <FONT color="green">2111</FONT> realResultSet.updateBigDecimal(columnName, x);<a name="line.2111"></a> <FONT color="green">2112</FONT> }<a name="line.2112"></a> <FONT color="green">2113</FONT> catch (SQLException s)<a name="line.2113"></a> <FONT color="green">2114</FONT> {<a name="line.2114"></a> <FONT color="green">2115</FONT> reportException(methodCall, s);<a name="line.2115"></a> <FONT color="green">2116</FONT> throw s;<a name="line.2116"></a> <FONT color="green">2117</FONT> }<a name="line.2117"></a> <FONT color="green">2118</FONT> reportReturn(methodCall);<a name="line.2118"></a> <FONT color="green">2119</FONT> }<a name="line.2119"></a> <FONT color="green">2120</FONT> <a name="line.2120"></a> <FONT color="green">2121</FONT> public URL getURL(String columnName) throws SQLException<a name="line.2121"></a> <FONT color="green">2122</FONT> {<a name="line.2122"></a> <FONT color="green">2123</FONT> String methodCall = "getURL(" + columnName + ")";<a name="line.2123"></a> <FONT color="green">2124</FONT> try<a name="line.2124"></a> <FONT color="green">2125</FONT> {<a name="line.2125"></a> <FONT color="green">2126</FONT> return (URL) reportReturn(methodCall, realResultSet.getURL(columnName));<a name="line.2126"></a> <FONT color="green">2127</FONT> }<a name="line.2127"></a> <FONT color="green">2128</FONT> catch (SQLException s)<a name="line.2128"></a> <FONT color="green">2129</FONT> {<a name="line.2129"></a> <FONT color="green">2130</FONT> reportException(methodCall, s);<a name="line.2130"></a> <FONT color="green">2131</FONT> throw s;<a name="line.2131"></a> <FONT color="green">2132</FONT> }<a name="line.2132"></a> <FONT color="green">2133</FONT> }<a name="line.2133"></a> <FONT color="green">2134</FONT> <a name="line.2134"></a> <FONT color="green">2135</FONT> public void updateBytes(int columnIndex, byte[] x) throws SQLException<a name="line.2135"></a> <FONT color="green">2136</FONT> {<a name="line.2136"></a> <FONT color="green">2137</FONT> // todo: dump array?<a name="line.2137"></a> <FONT color="green">2138</FONT> String methodCall = "updateBytes(" + columnIndex + ", " + x + ")";<a name="line.2138"></a> <FONT color="green">2139</FONT> try<a name="line.2139"></a> <FONT color="green">2140</FONT> {<a name="line.2140"></a> <FONT color="green">2141</FONT> realResultSet.updateBytes(columnIndex, x);<a name="line.2141"></a> <FONT color="green">2142</FONT> }<a name="line.2142"></a> <FONT color="green">2143</FONT> catch (SQLException s)<a name="line.2143"></a> <FONT color="green">2144</FONT> {<a name="line.2144"></a> <FONT color="green">2145</FONT> reportException(methodCall, s);<a name="line.2145"></a> <FONT color="green">2146</FONT> throw s;<a name="line.2146"></a> <FONT color="green">2147</FONT> }<a name="line.2147"></a> <FONT color="green">2148</FONT> reportReturn(methodCall);<a name="line.2148"></a> <FONT color="green">2149</FONT> }<a name="line.2149"></a> <FONT color="green">2150</FONT> <a name="line.2150"></a> <FONT color="green">2151</FONT> public void updateBytes(String columnName, byte[] x) throws SQLException<a name="line.2151"></a> <FONT color="green">2152</FONT> {<a name="line.2152"></a> <FONT color="green">2153</FONT> // todo: dump array?<a name="line.2153"></a> <FONT color="green">2154</FONT> String methodCall = "updateBytes(" + columnName + ", " + x + ")";<a name="line.2154"></a> <FONT color="green">2155</FONT> try<a name="line.2155"></a> <FONT color="green">2156</FONT> {<a name="line.2156"></a> <FONT color="green">2157</FONT> realResultSet.updateBytes(columnName, x);<a name="line.2157"></a> <FONT color="green">2158</FONT> }<a name="line.2158"></a> <FONT color="green">2159</FONT> catch (SQLException s)<a name="line.2159"></a> <FONT color="green">2160</FONT> {<a name="line.2160"></a> <FONT color="green">2161</FONT> reportException(methodCall, s);<a name="line.2161"></a> <FONT color="green">2162</FONT> throw s;<a name="line.2162"></a> <FONT color="green">2163</FONT> }<a name="line.2163"></a> <FONT color="green">2164</FONT> reportReturn(methodCall);<a name="line.2164"></a> <FONT color="green">2165</FONT> }<a name="line.2165"></a> <FONT color="green">2166</FONT> <a name="line.2166"></a> <FONT color="green">2167</FONT> /**<a name="line.2167"></a> <FONT color="green">2168</FONT> * @deprecated<a name="line.2168"></a> <FONT color="green">2169</FONT> */<a name="line.2169"></a> <FONT color="green">2170</FONT> public InputStream getUnicodeStream(int columnIndex) throws SQLException<a name="line.2170"></a> <FONT color="green">2171</FONT> {<a name="line.2171"></a> <FONT color="green">2172</FONT> String methodCall = "getUnicodeStream(" + columnIndex + ")";<a name="line.2172"></a> <FONT color="green">2173</FONT> try<a name="line.2173"></a> <FONT color="green">2174</FONT> {<a name="line.2174"></a> <FONT color="green">2175</FONT> return (InputStream) reportReturn(methodCall, realResultSet.getUnicodeStream(columnIndex));<a name="line.2175"></a> <FONT color="green">2176</FONT> }<a name="line.2176"></a> <FONT color="green">2177</FONT> catch (SQLException s)<a name="line.2177"></a> <FONT color="green">2178</FONT> {<a name="line.2178"></a> <FONT color="green">2179</FONT> reportException(methodCall, s);<a name="line.2179"></a> <FONT color="green">2180</FONT> throw s;<a name="line.2180"></a> <FONT color="green">2181</FONT> }<a name="line.2181"></a> <FONT color="green">2182</FONT> }<a name="line.2182"></a> <FONT color="green">2183</FONT> <a name="line.2183"></a> <FONT color="green">2184</FONT> /**<a name="line.2184"></a> <FONT color="green">2185</FONT> * @deprecated<a name="line.2185"></a> <FONT color="green">2186</FONT> */<a name="line.2186"></a> <FONT color="green">2187</FONT> public InputStream getUnicodeStream(String columnName) throws SQLException<a name="line.2187"></a> <FONT color="green">2188</FONT> {<a name="line.2188"></a> <FONT color="green">2189</FONT> String methodCall = "getUnicodeStream(" + columnName + ")";<a name="line.2189"></a> <FONT color="green">2190</FONT> try<a name="line.2190"></a> <FONT color="green">2191</FONT> {<a name="line.2191"></a> <FONT color="green">2192</FONT> return (InputStream) reportReturn(methodCall, realResultSet.getUnicodeStream(columnName));<a name="line.2192"></a> <FONT color="green">2193</FONT> }<a name="line.2193"></a> <FONT color="green">2194</FONT> catch (SQLException s)<a name="line.2194"></a> <FONT color="green">2195</FONT> {<a name="line.2195"></a> <FONT color="green">2196</FONT> reportException(methodCall, s);<a name="line.2196"></a> <FONT color="green">2197</FONT> throw s;<a name="line.2197"></a> <FONT color="green">2198</FONT> }<a name="line.2198"></a> <FONT color="green">2199</FONT> }<a name="line.2199"></a> <FONT color="green">2200</FONT> <a name="line.2200"></a> <FONT color="green">2201</FONT> public void updateDate(int columnIndex, Date x) throws SQLException<a name="line.2201"></a> <FONT color="green">2202</FONT> {<a name="line.2202"></a> <FONT color="green">2203</FONT> String methodCall = "updateDate(" + columnIndex + ", " + x + ")";<a name="line.2203"></a> <FONT color="green">2204</FONT> try<a name="line.2204"></a> <FONT color="green">2205</FONT> {<a name="line.2205"></a> <FONT color="green">2206</FONT> realResultSet.updateDate(columnIndex, x);<a name="line.2206"></a> <FONT color="green">2207</FONT> }<a name="line.2207"></a> <FONT color="green">2208</FONT> catch (SQLException s)<a name="line.2208"></a> <FONT color="green">2209</FONT> {<a name="line.2209"></a> <FONT color="green">2210</FONT> reportException(methodCall, s);<a name="line.2210"></a> <FONT color="green">2211</FONT> throw s;<a name="line.2211"></a> <FONT color="green">2212</FONT> }<a name="line.2212"></a> <FONT color="green">2213</FONT> }<a name="line.2213"></a> <FONT color="green">2214</FONT> <a name="line.2214"></a> <FONT color="green">2215</FONT> public void updateDate(String columnName, Date x) throws SQLException<a name="line.2215"></a> <FONT color="green">2216</FONT> {<a name="line.2216"></a> <FONT color="green">2217</FONT> String methodCall = "updateDate(" + columnName + ", " + x + ")";<a name="line.2217"></a> <FONT color="green">2218</FONT> try<a name="line.2218"></a> <FONT color="green">2219</FONT> {<a name="line.2219"></a> <FONT color="green">2220</FONT> realResultSet.updateDate(columnName, x);<a name="line.2220"></a> <FONT color="green">2221</FONT> }<a name="line.2221"></a> <FONT color="green">2222</FONT> catch (SQLException s)<a name="line.2222"></a> <FONT color="green">2223</FONT> {<a name="line.2223"></a> <FONT color="green">2224</FONT> reportException(methodCall, s);<a name="line.2224"></a> <FONT color="green">2225</FONT> throw s;<a name="line.2225"></a> <FONT color="green">2226</FONT> }<a name="line.2226"></a> <FONT color="green">2227</FONT> reportReturn(methodCall);<a name="line.2227"></a> <FONT color="green">2228</FONT> }<a name="line.2228"></a> <FONT color="green">2229</FONT> <a name="line.2229"></a> <FONT color="green">2230</FONT> public int getFetchSize() throws SQLException<a name="line.2230"></a> <FONT color="green">2231</FONT> {<a name="line.2231"></a> <FONT color="green">2232</FONT> String methodCall = "getFetchSize()";<a name="line.2232"></a> <FONT color="green">2233</FONT> try<a name="line.2233"></a> <FONT color="green">2234</FONT> {<a name="line.2234"></a> <FONT color="green">2235</FONT> return reportReturn(methodCall, realResultSet.getFetchSize());<a name="line.2235"></a> <FONT color="green">2236</FONT> }<a name="line.2236"></a> <FONT color="green">2237</FONT> catch (SQLException s)<a name="line.2237"></a> <FONT color="green">2238</FONT> {<a name="line.2238"></a> <FONT color="green">2239</FONT> reportException(methodCall, s);<a name="line.2239"></a> <FONT color="green">2240</FONT> throw s;<a name="line.2240"></a> <FONT color="green">2241</FONT> }<a name="line.2241"></a> <FONT color="green">2242</FONT> }<a name="line.2242"></a> <FONT color="green">2243</FONT> <a name="line.2243"></a> <FONT color="green">2244</FONT> public SQLWarning getWarnings() throws SQLException<a name="line.2244"></a> <FONT color="green">2245</FONT> {<a name="line.2245"></a> <FONT color="green">2246</FONT> String methodCall = "getWarnings()";<a name="line.2246"></a> <FONT color="green">2247</FONT> try<a name="line.2247"></a> <FONT color="green">2248</FONT> {<a name="line.2248"></a> <FONT color="green">2249</FONT> return (SQLWarning) reportReturn(methodCall, realResultSet.getWarnings());<a name="line.2249"></a> <FONT color="green">2250</FONT> }<a name="line.2250"></a> <FONT color="green">2251</FONT> catch (SQLException s)<a name="line.2251"></a> <FONT color="green">2252</FONT> {<a name="line.2252"></a> <FONT color="green">2253</FONT> reportException(methodCall, s);<a name="line.2253"></a> <FONT color="green">2254</FONT> throw s;<a name="line.2254"></a> <FONT color="green">2255</FONT> }<a name="line.2255"></a> <FONT color="green">2256</FONT> }<a name="line.2256"></a> <FONT color="green">2257</FONT> <a name="line.2257"></a> <FONT color="green">2258</FONT> public InputStream getBinaryStream(int columnIndex) throws SQLException<a name="line.2258"></a> <FONT color="green">2259</FONT> {<a name="line.2259"></a> <FONT color="green">2260</FONT> String methodCall = "getBinaryStream(" + columnIndex + ")";<a name="line.2260"></a> <FONT color="green">2261</FONT> try<a name="line.2261"></a> <FONT color="green">2262</FONT> {<a name="line.2262"></a> <FONT color="green">2263</FONT> return (InputStream) reportReturn(methodCall, realResultSet.getBinaryStream(columnIndex));<a name="line.2263"></a> <FONT color="green">2264</FONT> }<a name="line.2264"></a> <FONT color="green">2265</FONT> catch (SQLException s)<a name="line.2265"></a> <FONT color="green">2266</FONT> {<a name="line.2266"></a> <FONT color="green">2267</FONT> reportException(methodCall, s);<a name="line.2267"></a> <FONT color="green">2268</FONT> throw s;<a name="line.2268"></a> <FONT color="green">2269</FONT> }<a name="line.2269"></a> <FONT color="green">2270</FONT> }<a name="line.2270"></a> <FONT color="green">2271</FONT> <a name="line.2271"></a> <FONT color="green">2272</FONT> public InputStream getBinaryStream(String columnName) throws SQLException<a name="line.2272"></a> <FONT color="green">2273</FONT> {<a name="line.2273"></a> <FONT color="green">2274</FONT> String methodCall = "getBinaryStream(" + columnName + ")";<a name="line.2274"></a> <FONT color="green">2275</FONT> try<a name="line.2275"></a> <FONT color="green">2276</FONT> {<a name="line.2276"></a> <FONT color="green">2277</FONT> return (InputStream) reportReturn(methodCall, realResultSet.getBinaryStream(columnName));<a name="line.2277"></a> <FONT color="green">2278</FONT> }<a name="line.2278"></a> <FONT color="green">2279</FONT> catch (SQLException s)<a name="line.2279"></a> <FONT color="green">2280</FONT> {<a name="line.2280"></a> <FONT color="green">2281</FONT> reportException(methodCall, s);<a name="line.2281"></a> <FONT color="green">2282</FONT> throw s;<a name="line.2282"></a> <FONT color="green">2283</FONT> }<a name="line.2283"></a> <FONT color="green">2284</FONT> }<a name="line.2284"></a> <FONT color="green">2285</FONT> <a name="line.2285"></a> <FONT color="green">2286</FONT> public void clearWarnings() throws SQLException<a name="line.2286"></a> <FONT color="green">2287</FONT> {<a name="line.2287"></a> <FONT color="green">2288</FONT> String methodCall = "clearWarnings()";<a name="line.2288"></a> <FONT color="green">2289</FONT> try<a name="line.2289"></a> <FONT color="green">2290</FONT> {<a name="line.2290"></a> <FONT color="green">2291</FONT> realResultSet.clearWarnings();<a name="line.2291"></a> <FONT color="green">2292</FONT> }<a name="line.2292"></a> <FONT color="green">2293</FONT> catch (SQLException s)<a name="line.2293"></a> <FONT color="green">2294</FONT> {<a name="line.2294"></a> <FONT color="green">2295</FONT> reportException(methodCall, s);<a name="line.2295"></a> <FONT color="green">2296</FONT> throw s;<a name="line.2296"></a> <FONT color="green">2297</FONT> }<a name="line.2297"></a> <FONT color="green">2298</FONT> reportReturn(methodCall);<a name="line.2298"></a> <FONT color="green">2299</FONT> }<a name="line.2299"></a> <FONT color="green">2300</FONT> <a name="line.2300"></a> <FONT color="green">2301</FONT> public void updateTimestamp(int columnIndex, Timestamp x) throws SQLException<a name="line.2301"></a> <FONT color="green">2302</FONT> {<a name="line.2302"></a> <FONT color="green">2303</FONT> String methodCall = "updateTimestamp(" + columnIndex + ", " + x + ")";<a name="line.2303"></a> <FONT color="green">2304</FONT> try<a name="line.2304"></a> <FONT color="green">2305</FONT> {<a name="line.2305"></a> <FONT color="green">2306</FONT> realResultSet.updateTimestamp(columnIndex, x);<a name="line.2306"></a> <FONT color="green">2307</FONT> }<a name="line.2307"></a> <FONT color="green">2308</FONT> catch (SQLException s)<a name="line.2308"></a> <FONT color="green">2309</FONT> {<a name="line.2309"></a> <FONT color="green">2310</FONT> reportException(methodCall, s);<a name="line.2310"></a> <FONT color="green">2311</FONT> throw s;<a name="line.2311"></a> <FONT color="green">2312</FONT> }<a name="line.2312"></a> <FONT color="green">2313</FONT> reportReturn(methodCall);<a name="line.2313"></a> <FONT color="green">2314</FONT> }<a name="line.2314"></a> <FONT color="green">2315</FONT> <a name="line.2315"></a> <FONT color="green">2316</FONT> public void updateTimestamp(String columnName, Timestamp x) throws SQLException<a name="line.2316"></a> <FONT color="green">2317</FONT> {<a name="line.2317"></a> <FONT color="green">2318</FONT> String methodCall = "updateTimestamp(" + columnName + ", " + x + ")";<a name="line.2318"></a> <FONT color="green">2319</FONT> try<a name="line.2319"></a> <FONT color="green">2320</FONT> {<a name="line.2320"></a> <FONT color="green">2321</FONT> realResultSet.updateTimestamp(columnName, x);<a name="line.2321"></a> <FONT color="green">2322</FONT> }<a name="line.2322"></a> <FONT color="green">2323</FONT> catch (SQLException s)<a name="line.2323"></a> <FONT color="green">2324</FONT> {<a name="line.2324"></a> <FONT color="green">2325</FONT> reportException(methodCall, s);<a name="line.2325"></a> <FONT color="green">2326</FONT> throw s;<a name="line.2326"></a> <FONT color="green">2327</FONT> }<a name="line.2327"></a> <FONT color="green">2328</FONT> reportReturn(methodCall);<a name="line.2328"></a> <FONT color="green">2329</FONT> }<a name="line.2329"></a> <FONT color="green">2330</FONT> <a name="line.2330"></a> <FONT color="green">2331</FONT> public boolean first() throws SQLException<a name="line.2331"></a> <FONT color="green">2332</FONT> {<a name="line.2332"></a> <FONT color="green">2333</FONT> String methodCall = "first()";<a name="line.2333"></a> <FONT color="green">2334</FONT> try<a name="line.2334"></a> <FONT color="green">2335</FONT> {<a name="line.2335"></a> <FONT color="green">2336</FONT> return reportReturn(methodCall, realResultSet.first());<a name="line.2336"></a> <FONT color="green">2337</FONT> }<a name="line.2337"></a> <FONT color="green">2338</FONT> catch (SQLException s)<a name="line.2338"></a> <FONT color="green">2339</FONT> {<a name="line.2339"></a> <FONT color="green">2340</FONT> reportException(methodCall, s);<a name="line.2340"></a> <FONT color="green">2341</FONT> throw s;<a name="line.2341"></a> <FONT color="green">2342</FONT> }<a name="line.2342"></a> <FONT color="green">2343</FONT> }<a name="line.2343"></a> <FONT color="green">2344</FONT> <a name="line.2344"></a> <FONT color="green">2345</FONT> public String getCursorName() throws SQLException<a name="line.2345"></a> <FONT color="green">2346</FONT> {<a name="line.2346"></a> <FONT color="green">2347</FONT> String methodCall = "getCursorName()";<a name="line.2347"></a> <FONT color="green">2348</FONT> try<a name="line.2348"></a> <FONT color="green">2349</FONT> {<a name="line.2349"></a> <FONT color="green">2350</FONT> return (String) reportReturn(methodCall, realResultSet.getCursorName());<a name="line.2350"></a> <FONT color="green">2351</FONT> }<a name="line.2351"></a> <FONT color="green">2352</FONT> catch (SQLException s)<a name="line.2352"></a> <FONT color="green">2353</FONT> {<a name="line.2353"></a> <FONT color="green">2354</FONT> reportException(methodCall, s);<a name="line.2354"></a> <FONT color="green">2355</FONT> throw s;<a name="line.2355"></a> <FONT color="green">2356</FONT> }<a name="line.2356"></a> <FONT color="green">2357</FONT> }<a name="line.2357"></a> <FONT color="green">2358</FONT> <a name="line.2358"></a> <FONT color="green">2359</FONT> public int findColumn(String columnName) throws SQLException<a name="line.2359"></a> <FONT color="green">2360</FONT> {<a name="line.2360"></a> <FONT color="green">2361</FONT> String methodCall = "findColumn(" + columnName + ")";<a name="line.2361"></a> <FONT color="green">2362</FONT> try<a name="line.2362"></a> <FONT color="green">2363</FONT> {<a name="line.2363"></a> <FONT color="green">2364</FONT> return reportReturn(methodCall, realResultSet.findColumn(columnName));<a name="line.2364"></a> <FONT color="green">2365</FONT> }<a name="line.2365"></a> <FONT color="green">2366</FONT> catch (SQLException s)<a name="line.2366"></a> <FONT color="green">2367</FONT> {<a name="line.2367"></a> <FONT color="green">2368</FONT> reportException(methodCall, s);<a name="line.2368"></a> <FONT color="green">2369</FONT> throw s;<a name="line.2369"></a> <FONT color="green">2370</FONT> }<a name="line.2370"></a> <FONT color="green">2371</FONT> }<a name="line.2371"></a> <FONT color="green">2372</FONT> <a name="line.2372"></a> <FONT color="green">2373</FONT> public boolean wasNull() throws SQLException<a name="line.2373"></a> <FONT color="green">2374</FONT> {<a name="line.2374"></a> <FONT color="green">2375</FONT> String methodCall = "wasNull()";<a name="line.2375"></a> <FONT color="green">2376</FONT> try<a name="line.2376"></a> <FONT color="green">2377</FONT> {<a name="line.2377"></a> <FONT color="green">2378</FONT> return reportReturn(methodCall, realResultSet.wasNull());<a name="line.2378"></a> <FONT color="green">2379</FONT> }<a name="line.2379"></a> <FONT color="green">2380</FONT> catch (SQLException s)<a name="line.2380"></a> <FONT color="green">2381</FONT> {<a name="line.2381"></a> <FONT color="green">2382</FONT> reportException(methodCall, s);<a name="line.2382"></a> <FONT color="green">2383</FONT> throw s;<a name="line.2383"></a> <FONT color="green">2384</FONT> }<a name="line.2384"></a> <FONT color="green">2385</FONT> }<a name="line.2385"></a> <FONT color="green">2386</FONT> <a name="line.2386"></a> <FONT color="green">2387</FONT> public void updateBinaryStream(int columnIndex, InputStream x, int length) throws SQLException<a name="line.2387"></a> <FONT color="green">2388</FONT> {<a name="line.2388"></a> <FONT color="green">2389</FONT> String methodCall = "updateBinaryStream(" + columnIndex + ", " + x + ", " + length + ")";<a name="line.2389"></a> <FONT color="green">2390</FONT> try<a name="line.2390"></a> <FONT color="green">2391</FONT> {<a name="line.2391"></a> <FONT color="green">2392</FONT> realResultSet.updateBinaryStream(columnIndex, x, length);<a name="line.2392"></a> <FONT color="green">2393</FONT> }<a name="line.2393"></a> <FONT color="green">2394</FONT> catch (SQLException s)<a name="line.2394"></a> <FONT color="green">2395</FONT> {<a name="line.2395"></a> <FONT color="green">2396</FONT> reportException(methodCall, s);<a name="line.2396"></a> <FONT color="green">2397</FONT> throw s;<a name="line.2397"></a> <FONT color="green">2398</FONT> }<a name="line.2398"></a> <FONT color="green">2399</FONT> reportReturn(methodCall);<a name="line.2399"></a> <FONT color="green">2400</FONT> }<a name="line.2400"></a> <FONT color="green">2401</FONT> <a name="line.2401"></a> <FONT color="green">2402</FONT> public void updateBinaryStream(String columnName, InputStream x, int length) throws SQLException<a name="line.2402"></a> <FONT color="green">2403</FONT> {<a name="line.2403"></a> <FONT color="green">2404</FONT> String methodCall = "updateBinaryStream(" + columnName + ", " + x + ", " + length + ")";<a name="line.2404"></a> <FONT color="green">2405</FONT> try<a name="line.2405"></a> <FONT color="green">2406</FONT> {<a name="line.2406"></a> <FONT color="green">2407</FONT> realResultSet.updateBinaryStream(columnName, x, length);<a name="line.2407"></a> <FONT color="green">2408</FONT> }<a name="line.2408"></a> <FONT color="green">2409</FONT> catch (SQLException s)<a name="line.2409"></a> <FONT color="green">2410</FONT> {<a name="line.2410"></a> <FONT color="green">2411</FONT> reportException(methodCall, s);<a name="line.2411"></a> <FONT color="green">2412</FONT> throw s;<a name="line.2412"></a> <FONT color="green">2413</FONT> }<a name="line.2413"></a> <FONT color="green">2414</FONT> reportReturn(methodCall);<a name="line.2414"></a> <FONT color="green">2415</FONT> }<a name="line.2415"></a> <FONT color="green">2416</FONT> <a name="line.2416"></a> <FONT color="green">2417</FONT> public String getString(int columnIndex) throws SQLException<a name="line.2417"></a> <FONT color="green">2418</FONT> {<a name="line.2418"></a> <FONT color="green">2419</FONT> String methodCall = "getString(" + columnIndex + ")";<a name="line.2419"></a> <FONT color="green">2420</FONT> try<a name="line.2420"></a> <FONT color="green">2421</FONT> {<a name="line.2421"></a> <FONT color="green">2422</FONT> return (String) reportReturn(methodCall, realResultSet.getString(columnIndex));<a name="line.2422"></a> <FONT color="green">2423</FONT> }<a name="line.2423"></a> <FONT color="green">2424</FONT> catch (SQLException s)<a name="line.2424"></a> <FONT color="green">2425</FONT> {<a name="line.2425"></a> <FONT color="green">2426</FONT> reportException(methodCall, s);<a name="line.2426"></a> <FONT color="green">2427</FONT> throw s;<a name="line.2427"></a> <FONT color="green">2428</FONT> }<a name="line.2428"></a> <FONT color="green">2429</FONT> }<a name="line.2429"></a> <FONT color="green">2430</FONT> <a name="line.2430"></a> <FONT color="green">2431</FONT> public String getString(String columnName) throws SQLException<a name="line.2431"></a> <FONT color="green">2432</FONT> {<a name="line.2432"></a> <FONT color="green">2433</FONT> String methodCall = "getString(" + columnName + ")";<a name="line.2433"></a> <FONT color="green">2434</FONT> try<a name="line.2434"></a> <FONT color="green">2435</FONT> {<a name="line.2435"></a> <FONT color="green">2436</FONT> return (String) reportReturn(methodCall, realResultSet.getString(columnName));<a name="line.2436"></a> <FONT color="green">2437</FONT> }<a name="line.2437"></a> <FONT color="green">2438</FONT> catch (SQLException s)<a name="line.2438"></a> <FONT color="green">2439</FONT> {<a name="line.2439"></a> <FONT color="green">2440</FONT> reportException(methodCall, s);<a name="line.2440"></a> <FONT color="green">2441</FONT> throw s;<a name="line.2441"></a> <FONT color="green">2442</FONT> }<a name="line.2442"></a> <FONT color="green">2443</FONT> }<a name="line.2443"></a> <FONT color="green">2444</FONT> <a name="line.2444"></a> <FONT color="green">2445</FONT> public Reader getCharacterStream(int columnIndex) throws SQLException<a name="line.2445"></a> <FONT color="green">2446</FONT> {<a name="line.2446"></a> <FONT color="green">2447</FONT> String methodCall = "getCharacterStream(" + columnIndex + ")";<a name="line.2447"></a> <FONT color="green">2448</FONT> try<a name="line.2448"></a> <FONT color="green">2449</FONT> {<a name="line.2449"></a> <FONT color="green">2450</FONT> return (Reader) reportReturn(methodCall, realResultSet.getCharacterStream(columnIndex));<a name="line.2450"></a> <FONT color="green">2451</FONT> }<a name="line.2451"></a> <FONT color="green">2452</FONT> catch (SQLException s)<a name="line.2452"></a> <FONT color="green">2453</FONT> {<a name="line.2453"></a> <FONT color="green">2454</FONT> reportException(methodCall, s);<a name="line.2454"></a> <FONT color="green">2455</FONT> throw s;<a name="line.2455"></a> <FONT color="green">2456</FONT> }<a name="line.2456"></a> <FONT color="green">2457</FONT> }<a name="line.2457"></a> <FONT color="green">2458</FONT> <a name="line.2458"></a> <FONT color="green">2459</FONT> public Reader getCharacterStream(String columnName) throws SQLException<a name="line.2459"></a> <FONT color="green">2460</FONT> {<a name="line.2460"></a> <FONT color="green">2461</FONT> String methodCall = "getCharacterStream(" + columnName + ")";<a name="line.2461"></a> <FONT color="green">2462</FONT> try<a name="line.2462"></a> <FONT color="green">2463</FONT> {<a name="line.2463"></a> <FONT color="green">2464</FONT> return (Reader) reportReturn(methodCall, realResultSet.getCharacterStream(columnName));<a name="line.2464"></a> <FONT color="green">2465</FONT> }<a name="line.2465"></a> <FONT color="green">2466</FONT> catch (SQLException s)<a name="line.2466"></a> <FONT color="green">2467</FONT> {<a name="line.2467"></a> <FONT color="green">2468</FONT> reportException(methodCall, s);<a name="line.2468"></a> <FONT color="green">2469</FONT> throw s;<a name="line.2469"></a> <FONT color="green">2470</FONT> }<a name="line.2470"></a> <FONT color="green">2471</FONT> }<a name="line.2471"></a> <FONT color="green">2472</FONT> <a name="line.2472"></a> <FONT color="green">2473</FONT> public void setFetchDirection(int direction) throws SQLException<a name="line.2473"></a> <FONT color="green">2474</FONT> {<a name="line.2474"></a> <FONT color="green">2475</FONT> String methodCall = "setFetchDirection(" + direction + ")";<a name="line.2475"></a> <FONT color="green">2476</FONT> try<a name="line.2476"></a> <FONT color="green">2477</FONT> {<a name="line.2477"></a> <FONT color="green">2478</FONT> realResultSet.setFetchDirection(direction);<a name="line.2478"></a> <FONT color="green">2479</FONT> }<a name="line.2479"></a> <FONT color="green">2480</FONT> catch (SQLException s)<a name="line.2480"></a> <FONT color="green">2481</FONT> {<a name="line.2481"></a> <FONT color="green">2482</FONT> reportException(methodCall, s);<a name="line.2482"></a> <FONT color="green">2483</FONT> throw s;<a name="line.2483"></a> <FONT color="green">2484</FONT> }<a name="line.2484"></a> <FONT color="green">2485</FONT> reportReturn(methodCall);<a name="line.2485"></a> <FONT color="green">2486</FONT> }<a name="line.2486"></a> <FONT color="green">2487</FONT> <a name="line.2487"></a> <FONT color="green">2488</FONT> public void updateCharacterStream(int columnIndex, Reader x, int length) throws SQLException<a name="line.2488"></a> <FONT color="green">2489</FONT> {<a name="line.2489"></a> <FONT color="green">2490</FONT> String methodCall = "updateCharacterStream(" + columnIndex + ", " + x + ", " + length + ")";<a name="line.2490"></a> <FONT color="green">2491</FONT> try<a name="line.2491"></a> <FONT color="green">2492</FONT> {<a name="line.2492"></a> <FONT color="green">2493</FONT> realResultSet.updateCharacterStream(columnIndex, x, length);<a name="line.2493"></a> <FONT color="green">2494</FONT> }<a name="line.2494"></a> <FONT color="green">2495</FONT> catch (SQLException s)<a name="line.2495"></a> <FONT color="green">2496</FONT> {<a name="line.2496"></a> <FONT color="green">2497</FONT> reportException(methodCall, s);<a name="line.2497"></a> <FONT color="green">2498</FONT> throw s;<a name="line.2498"></a> <FONT color="green">2499</FONT> }<a name="line.2499"></a> <FONT color="green">2500</FONT> reportReturn(methodCall);<a name="line.2500"></a> <FONT color="green">2501</FONT> }<a name="line.2501"></a> <FONT color="green">2502</FONT> <a name="line.2502"></a> <FONT color="green">2503</FONT> public void updateCharacterStream(String columnName, Reader reader, int length) throws SQLException<a name="line.2503"></a> <FONT color="green">2504</FONT> {<a name="line.2504"></a> <FONT color="green">2505</FONT> String methodCall = "updateCharacterStream(" + columnName + ", " + reader + ", " + length + ")";<a name="line.2505"></a> <FONT color="green">2506</FONT> try<a name="line.2506"></a> <FONT color="green">2507</FONT> {<a name="line.2507"></a> <FONT color="green">2508</FONT> realResultSet.updateCharacterStream(columnName, reader, length);<a name="line.2508"></a> <FONT color="green">2509</FONT> }<a name="line.2509"></a> <FONT color="green">2510</FONT> catch (SQLException s)<a name="line.2510"></a> <FONT color="green">2511</FONT> {<a name="line.2511"></a> <FONT color="green">2512</FONT> reportException(methodCall, s);<a name="line.2512"></a> <FONT color="green">2513</FONT> throw s;<a name="line.2513"></a> <FONT color="green">2514</FONT> }<a name="line.2514"></a> <FONT color="green">2515</FONT> reportReturn(methodCall);<a name="line.2515"></a> <FONT color="green">2516</FONT> }<a name="line.2516"></a> <FONT color="green">2517</FONT> <a name="line.2517"></a> <FONT color="green">2518</FONT> public byte getByte(int columnIndex) throws SQLException<a name="line.2518"></a> <FONT color="green">2519</FONT> {<a name="line.2519"></a> <FONT color="green">2520</FONT> String methodCall = "getByte(" + columnIndex + ")";<a name="line.2520"></a> <FONT color="green">2521</FONT> try<a name="line.2521"></a> <FONT color="green">2522</FONT> {<a name="line.2522"></a> <FONT color="green">2523</FONT> return reportReturn(methodCall, realResultSet.getByte(columnIndex));<a name="line.2523"></a> <FONT color="green">2524</FONT> }<a name="line.2524"></a> <FONT color="green">2525</FONT> catch (SQLException s)<a name="line.2525"></a> <FONT color="green">2526</FONT> {<a name="line.2526"></a> <FONT color="green">2527</FONT> reportException(methodCall, s);<a name="line.2527"></a> <FONT color="green">2528</FONT> throw s;<a name="line.2528"></a> <FONT color="green">2529</FONT> }<a name="line.2529"></a> <FONT color="green">2530</FONT> }<a name="line.2530"></a> <FONT color="green">2531</FONT> <a name="line.2531"></a> <FONT color="green">2532</FONT> public byte getByte(String columnName) throws SQLException<a name="line.2532"></a> <FONT color="green">2533</FONT> {<a name="line.2533"></a> <FONT color="green">2534</FONT> String methodCall = "getByte(" + columnName + ")";<a name="line.2534"></a> <FONT color="green">2535</FONT> try<a name="line.2535"></a> <FONT color="green">2536</FONT> {<a name="line.2536"></a> <FONT color="green">2537</FONT> return reportReturn(methodCall, realResultSet.getByte(columnName));<a name="line.2537"></a> <FONT color="green">2538</FONT> }<a name="line.2538"></a> <FONT color="green">2539</FONT> catch (SQLException s)<a name="line.2539"></a> <FONT color="green">2540</FONT> {<a name="line.2540"></a> <FONT color="green">2541</FONT> reportException(methodCall, s);<a name="line.2541"></a> <FONT color="green">2542</FONT> throw s;<a name="line.2542"></a> <FONT color="green">2543</FONT> }<a name="line.2543"></a> <FONT color="green">2544</FONT> }<a name="line.2544"></a> <FONT color="green">2545</FONT> <a name="line.2545"></a> <FONT color="green">2546</FONT> public void updateTime(int columnIndex, Time x) throws SQLException<a name="line.2546"></a> <FONT color="green">2547</FONT> {<a name="line.2547"></a> <FONT color="green">2548</FONT> String methodCall = "updateTime(" + columnIndex + ", " + x + ")";<a name="line.2548"></a> <FONT color="green">2549</FONT> try<a name="line.2549"></a> <FONT color="green">2550</FONT> {<a name="line.2550"></a> <FONT color="green">2551</FONT> realResultSet.updateTime(columnIndex, x);<a name="line.2551"></a> <FONT color="green">2552</FONT> }<a name="line.2552"></a> <FONT color="green">2553</FONT> catch (SQLException s)<a name="line.2553"></a> <FONT color="green">2554</FONT> {<a name="line.2554"></a> <FONT color="green">2555</FONT> reportException(methodCall, s);<a name="line.2555"></a> <FONT color="green">2556</FONT> throw s;<a name="line.2556"></a> <FONT color="green">2557</FONT> }<a name="line.2557"></a> <FONT color="green">2558</FONT> reportReturn(methodCall);<a name="line.2558"></a> <FONT color="green">2559</FONT> }<a name="line.2559"></a> <FONT color="green">2560</FONT> <a name="line.2560"></a> <FONT color="green">2561</FONT> public void updateTime(String columnName, Time x) throws SQLException<a name="line.2561"></a> <FONT color="green">2562</FONT> {<a name="line.2562"></a> <FONT color="green">2563</FONT> String methodCall = "updateTime(" + columnName + ", " + x + ")";<a name="line.2563"></a> <FONT color="green">2564</FONT> try<a name="line.2564"></a> <FONT color="green">2565</FONT> {<a name="line.2565"></a> <FONT color="green">2566</FONT> realResultSet.updateTime(columnName, x);<a name="line.2566"></a> <FONT color="green">2567</FONT> }<a name="line.2567"></a> <FONT color="green">2568</FONT> catch (SQLException s)<a name="line.2568"></a> <FONT color="green">2569</FONT> {<a name="line.2569"></a> <FONT color="green">2570</FONT> reportException(methodCall, s);<a name="line.2570"></a> <FONT color="green">2571</FONT> throw s;<a name="line.2571"></a> <FONT color="green">2572</FONT> }<a name="line.2572"></a> <FONT color="green">2573</FONT> reportReturn(methodCall);<a name="line.2573"></a> <FONT color="green">2574</FONT> }<a name="line.2574"></a> <FONT color="green">2575</FONT> <a name="line.2575"></a> <FONT color="green">2576</FONT> public byte[] getBytes(int columnIndex) throws SQLException<a name="line.2576"></a> <FONT color="green">2577</FONT> {<a name="line.2577"></a> <FONT color="green">2578</FONT> String methodCall = "getBytes(" + columnIndex + ")";<a name="line.2578"></a> <FONT color="green">2579</FONT> try<a name="line.2579"></a> <FONT color="green">2580</FONT> {<a name="line.2580"></a> <FONT color="green">2581</FONT> return (byte[]) reportReturn(methodCall, realResultSet.getBytes(columnIndex));<a name="line.2581"></a> <FONT color="green">2582</FONT> }<a name="line.2582"></a> <FONT color="green">2583</FONT> catch (SQLException s)<a name="line.2583"></a> <FONT color="green">2584</FONT> {<a name="line.2584"></a> <FONT color="green">2585</FONT> reportException(methodCall, s);<a name="line.2585"></a> <FONT color="green">2586</FONT> throw s;<a name="line.2586"></a> <FONT color="green">2587</FONT> }<a name="line.2587"></a> <FONT color="green">2588</FONT> }<a name="line.2588"></a> <FONT color="green">2589</FONT> <a name="line.2589"></a> <FONT color="green">2590</FONT> public byte[] getBytes(String columnName) throws SQLException<a name="line.2590"></a> <FONT color="green">2591</FONT> {<a name="line.2591"></a> <FONT color="green">2592</FONT> String methodCall = "getBytes(" + columnName + ")";<a name="line.2592"></a> <FONT color="green">2593</FONT> try<a name="line.2593"></a> <FONT color="green">2594</FONT> {<a name="line.2594"></a> <FONT color="green">2595</FONT> return (byte[]) reportReturn(methodCall, realResultSet.getBytes(columnName));<a name="line.2595"></a> <FONT color="green">2596</FONT> }<a name="line.2596"></a> <FONT color="green">2597</FONT> catch (SQLException s)<a name="line.2597"></a> <FONT color="green">2598</FONT> {<a name="line.2598"></a> <FONT color="green">2599</FONT> reportException(methodCall, s);<a name="line.2599"></a> <FONT color="green">2600</FONT> throw s;<a name="line.2600"></a> <FONT color="green">2601</FONT> }<a name="line.2601"></a> <FONT color="green">2602</FONT> }<a name="line.2602"></a> <FONT color="green">2603</FONT> <a name="line.2603"></a> <FONT color="green">2604</FONT> public boolean isAfterLast() throws SQLException<a name="line.2604"></a> <FONT color="green">2605</FONT> {<a name="line.2605"></a> <FONT color="green">2606</FONT> String methodCall = "isAfterLast()";<a name="line.2606"></a> <FONT color="green">2607</FONT> try<a name="line.2607"></a> <FONT color="green">2608</FONT> {<a name="line.2608"></a> <FONT color="green">2609</FONT> return reportReturn(methodCall, realResultSet.isAfterLast());<a name="line.2609"></a> <FONT color="green">2610</FONT> }<a name="line.2610"></a> <FONT color="green">2611</FONT> catch (SQLException s)<a name="line.2611"></a> <FONT color="green">2612</FONT> {<a name="line.2612"></a> <FONT color="green">2613</FONT> reportException(methodCall, s);<a name="line.2613"></a> <FONT color="green">2614</FONT> throw s;<a name="line.2614"></a> <FONT color="green">2615</FONT> }<a name="line.2615"></a> <FONT color="green">2616</FONT> }<a name="line.2616"></a> <FONT color="green">2617</FONT> <a name="line.2617"></a> <FONT color="green">2618</FONT> public void updateObject(int columnIndex, Object x, int scale) throws SQLException<a name="line.2618"></a> <FONT color="green">2619</FONT> {<a name="line.2619"></a> <FONT color="green">2620</FONT> String methodCall = "updateObject(" + columnIndex + ", " + x + ", " + scale + ")";<a name="line.2620"></a> <FONT color="green">2621</FONT> try<a name="line.2621"></a> <FONT color="green">2622</FONT> {<a name="line.2622"></a> <FONT color="green">2623</FONT> realResultSet.updateObject(columnIndex, x, scale);<a name="line.2623"></a> <FONT color="green">2624</FONT> }<a name="line.2624"></a> <FONT color="green">2625</FONT> catch (SQLException s)<a name="line.2625"></a> <FONT color="green">2626</FONT> {<a name="line.2626"></a> <FONT color="green">2627</FONT> reportException(methodCall, s);<a name="line.2627"></a> <FONT color="green">2628</FONT> throw s;<a name="line.2628"></a> <FONT color="green">2629</FONT> }<a name="line.2629"></a> <FONT color="green">2630</FONT> reportReturn(methodCall);<a name="line.2630"></a> <FONT color="green">2631</FONT> }<a name="line.2631"></a> <FONT color="green">2632</FONT> <a name="line.2632"></a> <FONT color="green">2633</FONT> public void updateObject(int columnIndex, Object x) throws SQLException<a name="line.2633"></a> <FONT color="green">2634</FONT> {<a name="line.2634"></a> <FONT color="green">2635</FONT> String methodCall = "updateObject(" + columnIndex + ", " + x + ")";<a name="line.2635"></a> <FONT color="green">2636</FONT> try<a name="line.2636"></a> <FONT color="green">2637</FONT> {<a name="line.2637"></a> <FONT color="green">2638</FONT> realResultSet.updateObject(columnIndex, x);<a name="line.2638"></a> <FONT color="green">2639</FONT> }<a name="line.2639"></a> <FONT color="green">2640</FONT> catch (SQLException s)<a name="line.2640"></a> <FONT color="green">2641</FONT> {<a name="line.2641"></a> <FONT color="green">2642</FONT> reportException(methodCall, s);<a name="line.2642"></a> <FONT color="green">2643</FONT> throw s;<a name="line.2643"></a> <FONT color="green">2644</FONT> }<a name="line.2644"></a> <FONT color="green">2645</FONT> reportReturn(methodCall);<a name="line.2645"></a> <FONT color="green">2646</FONT> }<a name="line.2646"></a> <FONT color="green">2647</FONT> <a name="line.2647"></a> <FONT color="green">2648</FONT> public void updateObject(String columnName, Object x, int scale) throws SQLException<a name="line.2648"></a> <FONT color="green">2649</FONT> {<a name="line.2649"></a> <FONT color="green">2650</FONT> String methodCall = "updateObject(" + columnName + ", " + x + ", " + scale + ")";<a name="line.2650"></a> <FONT color="green">2651</FONT> try<a name="line.2651"></a> <FONT color="green">2652</FONT> {<a name="line.2652"></a> <FONT color="green">2653</FONT> realResultSet.updateObject(columnName, x, scale);<a name="line.2653"></a> <FONT color="green">2654</FONT> }<a name="line.2654"></a> <FONT color="green">2655</FONT> catch (SQLException s)<a name="line.2655"></a> <FONT color="green">2656</FONT> {<a name="line.2656"></a> <FONT color="green">2657</FONT> reportException(methodCall, s);<a name="line.2657"></a> <FONT color="green">2658</FONT> throw s;<a name="line.2658"></a> <FONT color="green">2659</FONT> }<a name="line.2659"></a> <FONT color="green">2660</FONT> reportReturn(methodCall);<a name="line.2660"></a> <FONT color="green">2661</FONT> }<a name="line.2661"></a> <FONT color="green">2662</FONT> <a name="line.2662"></a> <FONT color="green">2663</FONT> public void updateObject(String columnName, Object x) throws SQLException<a name="line.2663"></a> <FONT color="green">2664</FONT> {<a name="line.2664"></a> <FONT color="green">2665</FONT> String methodCall = "updateObject(" + columnName + ", " + x + ")";<a name="line.2665"></a> <FONT color="green">2666</FONT> try<a name="line.2666"></a> <FONT color="green">2667</FONT> {<a name="line.2667"></a> <FONT color="green">2668</FONT> realResultSet.updateObject(columnName, x);<a name="line.2668"></a> <FONT color="green">2669</FONT> }<a name="line.2669"></a> <FONT color="green">2670</FONT> catch (SQLException s)<a name="line.2670"></a> <FONT color="green">2671</FONT> {<a name="line.2671"></a> <FONT color="green">2672</FONT> reportException(methodCall, s);<a name="line.2672"></a> <FONT color="green">2673</FONT> throw s;<a name="line.2673"></a> <FONT color="green">2674</FONT> }<a name="line.2674"></a> <FONT color="green">2675</FONT> reportReturn(methodCall);<a name="line.2675"></a> <FONT color="green">2676</FONT> }<a name="line.2676"></a> <FONT color="green">2677</FONT> <a name="line.2677"></a> <FONT color="green">2678</FONT> public int getFetchDirection() throws SQLException<a name="line.2678"></a> <FONT color="green">2679</FONT> {<a name="line.2679"></a> <FONT color="green">2680</FONT> String methodCall = "getFetchDirection()";<a name="line.2680"></a> <FONT color="green">2681</FONT> try<a name="line.2681"></a> <FONT color="green">2682</FONT> {<a name="line.2682"></a> <FONT color="green">2683</FONT> return reportReturn(methodCall, realResultSet.getFetchDirection());<a name="line.2683"></a> <FONT color="green">2684</FONT> }<a name="line.2684"></a> <FONT color="green">2685</FONT> catch (SQLException s)<a name="line.2685"></a> <FONT color="green">2686</FONT> {<a name="line.2686"></a> <FONT color="green">2687</FONT> reportException(methodCall, s);<a name="line.2687"></a> <FONT color="green">2688</FONT> throw s;<a name="line.2688"></a> <FONT color="green">2689</FONT> }<a name="line.2689"></a> <FONT color="green">2690</FONT> }<a name="line.2690"></a> <FONT color="green">2691</FONT> <a name="line.2691"></a> <FONT color="green">2692</FONT> public long getLong(int columnIndex) throws SQLException<a name="line.2692"></a> <FONT color="green">2693</FONT> {<a name="line.2693"></a> <FONT color="green">2694</FONT> String methodCall = "getLong(" + columnIndex + ")";<a name="line.2694"></a> <FONT color="green">2695</FONT> try<a name="line.2695"></a> <FONT color="green">2696</FONT> {<a name="line.2696"></a> <FONT color="green">2697</FONT> return reportReturn(methodCall, realResultSet.getLong(columnIndex));<a name="line.2697"></a> <FONT color="green">2698</FONT> }<a name="line.2698"></a> <FONT color="green">2699</FONT> catch (SQLException s)<a name="line.2699"></a> <FONT color="green">2700</FONT> {<a name="line.2700"></a> <FONT color="green">2701</FONT> reportException(methodCall, s);<a name="line.2701"></a> <FONT color="green">2702</FONT> throw s;<a name="line.2702"></a> <FONT color="green">2703</FONT> }<a name="line.2703"></a> <FONT color="green">2704</FONT> }<a name="line.2704"></a> <FONT color="green">2705</FONT> <a name="line.2705"></a> <FONT color="green">2706</FONT> public long getLong(String columnName) throws SQLException<a name="line.2706"></a> <FONT color="green">2707</FONT> {<a name="line.2707"></a> <FONT color="green">2708</FONT> String methodCall = "getLong(" + columnName + ")";<a name="line.2708"></a> <FONT color="green">2709</FONT> try<a name="line.2709"></a> <FONT color="green">2710</FONT> {<a name="line.2710"></a> <FONT color="green">2711</FONT> return reportReturn(methodCall, realResultSet.getLong(columnName));<a name="line.2711"></a> <FONT color="green">2712</FONT> }<a name="line.2712"></a> <FONT color="green">2713</FONT> catch (SQLException s)<a name="line.2713"></a> <FONT color="green">2714</FONT> {<a name="line.2714"></a> <FONT color="green">2715</FONT> reportException(methodCall, s);<a name="line.2715"></a> <FONT color="green">2716</FONT> throw s;<a name="line.2716"></a> <FONT color="green">2717</FONT> }<a name="line.2717"></a> <FONT color="green">2718</FONT> }<a name="line.2718"></a> <FONT color="green">2719</FONT> <a name="line.2719"></a> <FONT color="green">2720</FONT> public boolean isFirst() throws SQLException<a name="line.2720"></a> <FONT color="green">2721</FONT> {<a name="line.2721"></a> <FONT color="green">2722</FONT> String methodCall = "isFirst()";<a name="line.2722"></a> <FONT color="green">2723</FONT> try<a name="line.2723"></a> <FONT color="green">2724</FONT> {<a name="line.2724"></a> <FONT color="green">2725</FONT> return reportReturn(methodCall, realResultSet.isFirst());<a name="line.2725"></a> <FONT color="green">2726</FONT> }<a name="line.2726"></a> <FONT color="green">2727</FONT> catch (SQLException s)<a name="line.2727"></a> <FONT color="green">2728</FONT> {<a name="line.2728"></a> <FONT color="green">2729</FONT> reportException(methodCall, s);<a name="line.2729"></a> <FONT color="green">2730</FONT> throw s;<a name="line.2730"></a> <FONT color="green">2731</FONT> }<a name="line.2731"></a> <FONT color="green">2732</FONT> }<a name="line.2732"></a> <FONT color="green">2733</FONT> <a name="line.2733"></a> <FONT color="green">2734</FONT> public void insertRow() throws SQLException<a name="line.2734"></a> <FONT color="green">2735</FONT> {<a name="line.2735"></a> <FONT color="green">2736</FONT> String methodCall = "insertRow()";<a name="line.2736"></a> <FONT color="green">2737</FONT> try<a name="line.2737"></a> <FONT color="green">2738</FONT> {<a name="line.2738"></a> <FONT color="green">2739</FONT> realResultSet.insertRow();<a name="line.2739"></a> <FONT color="green">2740</FONT> }<a name="line.2740"></a> <FONT color="green">2741</FONT> catch (SQLException s)<a name="line.2741"></a> <FONT color="green">2742</FONT> {<a name="line.2742"></a> <FONT color="green">2743</FONT> reportException(methodCall, s);<a name="line.2743"></a> <FONT color="green">2744</FONT> throw s;<a name="line.2744"></a> <FONT color="green">2745</FONT> }<a name="line.2745"></a> <FONT color="green">2746</FONT> }<a name="line.2746"></a> <FONT color="green">2747</FONT> <a name="line.2747"></a> <FONT color="green">2748</FONT> public float getFloat(int columnIndex) throws SQLException<a name="line.2748"></a> <FONT color="green">2749</FONT> {<a name="line.2749"></a> <FONT color="green">2750</FONT> String methodCall = "getFloat(" + columnIndex + ")";<a name="line.2750"></a> <FONT color="green">2751</FONT> try<a name="line.2751"></a> <FONT color="green">2752</FONT> {<a name="line.2752"></a> <FONT color="green">2753</FONT> return reportReturn(methodCall, realResultSet.getFloat(columnIndex));<a name="line.2753"></a> <FONT color="green">2754</FONT> }<a name="line.2754"></a> <FONT color="green">2755</FONT> catch (SQLException s)<a name="line.2755"></a> <FONT color="green">2756</FONT> {<a name="line.2756"></a> <FONT color="green">2757</FONT> reportException(methodCall, s);<a name="line.2757"></a> <FONT color="green">2758</FONT> throw s;<a name="line.2758"></a> <FONT color="green">2759</FONT> }<a name="line.2759"></a> <FONT color="green">2760</FONT> }<a name="line.2760"></a> <FONT color="green">2761</FONT> <a name="line.2761"></a> <FONT color="green">2762</FONT> public float getFloat(String columnName) throws SQLException<a name="line.2762"></a> <FONT color="green">2763</FONT> {<a name="line.2763"></a> <FONT color="green">2764</FONT> String methodCall = "getFloat(" + columnName + ")";<a name="line.2764"></a> <FONT color="green">2765</FONT> try<a name="line.2765"></a> <FONT color="green">2766</FONT> {<a name="line.2766"></a> <FONT color="green">2767</FONT> return reportReturn(methodCall, realResultSet.getFloat(columnName));<a name="line.2767"></a> <FONT color="green">2768</FONT> }<a name="line.2768"></a> <FONT color="green">2769</FONT> catch (SQLException s)<a name="line.2769"></a> <FONT color="green">2770</FONT> {<a name="line.2770"></a> <FONT color="green">2771</FONT> reportException(methodCall, s);<a name="line.2771"></a> <FONT color="green">2772</FONT> throw s;<a name="line.2772"></a> <FONT color="green">2773</FONT> }<a name="line.2773"></a> <FONT color="green">2774</FONT> }<a name="line.2774"></a> <FONT color="green">2775</FONT> <a name="line.2775"></a> <FONT color="green">2776</FONT> public boolean isLast() throws SQLException<a name="line.2776"></a> <FONT color="green">2777</FONT> {<a name="line.2777"></a> <FONT color="green">2778</FONT> String methodCall = "isLast()";<a name="line.2778"></a> <FONT color="green">2779</FONT> try<a name="line.2779"></a> <FONT color="green">2780</FONT> {<a name="line.2780"></a> <FONT color="green">2781</FONT> return reportReturn(methodCall, realResultSet.isLast());<a name="line.2781"></a> <FONT color="green">2782</FONT> }<a name="line.2782"></a> <FONT color="green">2783</FONT> catch (SQLException s)<a name="line.2783"></a> <FONT color="green">2784</FONT> {<a name="line.2784"></a> <FONT color="green">2785</FONT> reportException(methodCall, s);<a name="line.2785"></a> <FONT color="green">2786</FONT> throw s;<a name="line.2786"></a> <FONT color="green">2787</FONT> }<a name="line.2787"></a> <FONT color="green">2788</FONT> }<a name="line.2788"></a> <FONT color="green">2789</FONT> <a name="line.2789"></a> <FONT color="green">2790</FONT> public void setFetchSize(int rows) throws SQLException<a name="line.2790"></a> <FONT color="green">2791</FONT> {<a name="line.2791"></a> <FONT color="green">2792</FONT> String methodCall = "setFetchSize(" + rows + ")";<a name="line.2792"></a> <FONT color="green">2793</FONT> try<a name="line.2793"></a> <FONT color="green">2794</FONT> {<a name="line.2794"></a> <FONT color="green">2795</FONT> realResultSet.setFetchSize(rows);<a name="line.2795"></a> <FONT color="green">2796</FONT> }<a name="line.2796"></a> <FONT color="green">2797</FONT> catch (SQLException s)<a name="line.2797"></a> <FONT color="green">2798</FONT> {<a name="line.2798"></a> <FONT color="green">2799</FONT> reportException(methodCall, s);<a name="line.2799"></a> <FONT color="green">2800</FONT> throw s;<a name="line.2800"></a> <FONT color="green">2801</FONT> }<a name="line.2801"></a> <FONT color="green">2802</FONT> reportReturn(methodCall);<a name="line.2802"></a> <FONT color="green">2803</FONT> }<a name="line.2803"></a> <FONT color="green">2804</FONT> <a name="line.2804"></a> <FONT color="green">2805</FONT> public void updateRow() throws SQLException<a name="line.2805"></a> <FONT color="green">2806</FONT> {<a name="line.2806"></a> <FONT color="green">2807</FONT> String methodCall = "updateRow()";<a name="line.2807"></a> <FONT color="green">2808</FONT> try<a name="line.2808"></a> <FONT color="green">2809</FONT> {<a name="line.2809"></a> <FONT color="green">2810</FONT> realResultSet.updateRow();<a name="line.2810"></a> <FONT color="green">2811</FONT> }<a name="line.2811"></a> <FONT color="green">2812</FONT> catch (SQLException s)<a name="line.2812"></a> <FONT color="green">2813</FONT> {<a name="line.2813"></a> <FONT color="green">2814</FONT> reportException(methodCall, s);<a name="line.2814"></a> <FONT color="green">2815</FONT> throw s;<a name="line.2815"></a> <FONT color="green">2816</FONT> }<a name="line.2816"></a> <FONT color="green">2817</FONT> reportReturn(methodCall);<a name="line.2817"></a> <FONT color="green">2818</FONT> }<a name="line.2818"></a> <FONT color="green">2819</FONT> <a name="line.2819"></a> <FONT color="green">2820</FONT> public void beforeFirst() throws SQLException<a name="line.2820"></a> <FONT color="green">2821</FONT> {<a name="line.2821"></a> <FONT color="green">2822</FONT> String methodCall = "beforeFirst()";<a name="line.2822"></a> <FONT color="green">2823</FONT> try<a name="line.2823"></a> <FONT color="green">2824</FONT> {<a name="line.2824"></a> <FONT color="green">2825</FONT> realResultSet.beforeFirst();<a name="line.2825"></a> <FONT color="green">2826</FONT> }<a name="line.2826"></a> <FONT color="green">2827</FONT> catch (SQLException s)<a name="line.2827"></a> <FONT color="green">2828</FONT> {<a name="line.2828"></a> <FONT color="green">2829</FONT> reportException(methodCall, s);<a name="line.2829"></a> <FONT color="green">2830</FONT> throw s;<a name="line.2830"></a> <FONT color="green">2831</FONT> }<a name="line.2831"></a> <FONT color="green">2832</FONT> reportReturn(methodCall);<a name="line.2832"></a> <FONT color="green">2833</FONT> }<a name="line.2833"></a> <FONT color="green">2834</FONT> <a name="line.2834"></a> <FONT color="green">2835</FONT> /**<a name="line.2835"></a> <FONT color="green">2836</FONT> * @deprecated<a name="line.2836"></a> <FONT color="green">2837</FONT> */<a name="line.2837"></a> <FONT color="green">2838</FONT> public BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException<a name="line.2838"></a> <FONT color="green">2839</FONT> {<a name="line.2839"></a> <FONT color="green">2840</FONT> String methodCall = "getBigDecimal(" + columnIndex + ", " + scale + ")";<a name="line.2840"></a> <FONT color="green">2841</FONT> try<a name="line.2841"></a> <FONT color="green">2842</FONT> {<a name="line.2842"></a> <FONT color="green">2843</FONT> return (BigDecimal) reportReturn(methodCall, realResultSet.getBigDecimal(columnIndex, scale));<a name="line.2843"></a> <FONT color="green">2844</FONT> }<a name="line.2844"></a> <FONT color="green">2845</FONT> catch (SQLException s)<a name="line.2845"></a> <FONT color="green">2846</FONT> {<a name="line.2846"></a> <FONT color="green">2847</FONT> reportException(methodCall, s);<a name="line.2847"></a> <FONT color="green">2848</FONT> throw s;<a name="line.2848"></a> <FONT color="green">2849</FONT> }<a name="line.2849"></a> <FONT color="green">2850</FONT> }<a name="line.2850"></a> <FONT color="green">2851</FONT> <a name="line.2851"></a> <FONT color="green">2852</FONT> /**<a name="line.2852"></a> <FONT color="green">2853</FONT> * @deprecated<a name="line.2853"></a> <FONT color="green">2854</FONT> */<a name="line.2854"></a> <FONT color="green">2855</FONT> public BigDecimal getBigDecimal(String columnName, int scale) throws SQLException<a name="line.2855"></a> <FONT color="green">2856</FONT> {<a name="line.2856"></a> <FONT color="green">2857</FONT> String methodCall = "getBigDecimal(" + columnName + ", " + scale + ")";<a name="line.2857"></a> <FONT color="green">2858</FONT> try<a name="line.2858"></a> <FONT color="green">2859</FONT> {<a name="line.2859"></a> <FONT color="green">2860</FONT> return (BigDecimal) reportReturn(methodCall, realResultSet.getBigDecimal(columnName, scale));<a name="line.2860"></a> <FONT color="green">2861</FONT> }<a name="line.2861"></a> <FONT color="green">2862</FONT> catch (SQLException s)<a name="line.2862"></a> <FONT color="green">2863</FONT> {<a name="line.2863"></a> <FONT color="green">2864</FONT> reportException(methodCall, s);<a name="line.2864"></a> <FONT color="green">2865</FONT> throw s;<a name="line.2865"></a> <FONT color="green">2866</FONT> }<a name="line.2866"></a> <FONT color="green">2867</FONT> }<a name="line.2867"></a> <FONT color="green">2868</FONT> <a name="line.2868"></a> <FONT color="green">2869</FONT> public BigDecimal getBigDecimal(int columnIndex) throws SQLException<a name="line.2869"></a> <FONT color="green">2870</FONT> {<a name="line.2870"></a> <FONT color="green">2871</FONT> String methodCall = "getBigDecimal(" + columnIndex + ")";<a name="line.2871"></a> <FONT color="green">2872</FONT> try<a name="line.2872"></a> <FONT color="green">2873</FONT> {<a name="line.2873"></a> <FONT color="green">2874</FONT> return (BigDecimal) reportReturn(methodCall, realResultSet.getBigDecimal(columnIndex));<a name="line.2874"></a> <FONT color="green">2875</FONT> }<a name="line.2875"></a> <FONT color="green">2876</FONT> catch (SQLException s)<a name="line.2876"></a> <FONT color="green">2877</FONT> {<a name="line.2877"></a> <FONT color="green">2878</FONT> reportException(methodCall, s);<a name="line.2878"></a> <FONT color="green">2879</FONT> throw s;<a name="line.2879"></a> <FONT color="green">2880</FONT> }<a name="line.2880"></a> <FONT color="green">2881</FONT> }<a name="line.2881"></a> <FONT color="green">2882</FONT> <a name="line.2882"></a> <FONT color="green">2883</FONT> public BigDecimal getBigDecimal(String columnName) throws SQLException<a name="line.2883"></a> <FONT color="green">2884</FONT> {<a name="line.2884"></a> <FONT color="green">2885</FONT> String methodCall = "getBigDecimal(" + columnName + ")";<a name="line.2885"></a> <FONT color="green">2886</FONT> try<a name="line.2886"></a> <FONT color="green">2887</FONT> {<a name="line.2887"></a> <FONT color="green">2888</FONT> return (BigDecimal) reportReturn(methodCall, realResultSet.getBigDecimal(columnName));<a name="line.2888"></a> <FONT color="green">2889</FONT> }<a name="line.2889"></a> <FONT color="green">2890</FONT> catch (SQLException s)<a name="line.2890"></a> <FONT color="green">2891</FONT> {<a name="line.2891"></a> <FONT color="green">2892</FONT> reportException(methodCall, s);<a name="line.2892"></a> <FONT color="green">2893</FONT> throw s;<a name="line.2893"></a> <FONT color="green">2894</FONT> }<a name="line.2894"></a> <FONT color="green">2895</FONT> }<a name="line.2895"></a> <FONT color="green">2896</FONT> <a name="line.2896"></a> <FONT color="green">2897</FONT> public void afterLast() throws SQLException<a name="line.2897"></a> <FONT color="green">2898</FONT> {<a name="line.2898"></a> <FONT color="green">2899</FONT> String methodCall = "afterLast()";<a name="line.2899"></a> <FONT color="green">2900</FONT> try<a name="line.2900"></a> <FONT color="green">2901</FONT> {<a name="line.2901"></a> <FONT color="green">2902</FONT> realResultSet.afterLast();<a name="line.2902"></a> <FONT color="green">2903</FONT> }<a name="line.2903"></a> <FONT color="green">2904</FONT> catch (SQLException s)<a name="line.2904"></a> <FONT color="green">2905</FONT> {<a name="line.2905"></a> <FONT color="green">2906</FONT> reportException(methodCall, s);<a name="line.2906"></a> <FONT color="green">2907</FONT> throw s;<a name="line.2907"></a> <FONT color="green">2908</FONT> }<a name="line.2908"></a> <FONT color="green">2909</FONT> reportReturn(methodCall);<a name="line.2909"></a> <FONT color="green">2910</FONT> }<a name="line.2910"></a> <FONT color="green">2911</FONT> <a name="line.2911"></a> <FONT color="green">2912</FONT> public void refreshRow() throws SQLException<a name="line.2912"></a> <FONT color="green">2913</FONT> {<a name="line.2913"></a> <FONT color="green">2914</FONT> String methodCall = "refreshRow()";<a name="line.2914"></a> <FONT color="green">2915</FONT> try<a name="line.2915"></a> <FONT color="green">2916</FONT> {<a name="line.2916"></a> <FONT color="green">2917</FONT> realResultSet.refreshRow();<a name="line.2917"></a> <FONT color="green">2918</FONT> }<a name="line.2918"></a> <FONT color="green">2919</FONT> catch (SQLException s)<a name="line.2919"></a> <FONT color="green">2920</FONT> {<a name="line.2920"></a> <FONT color="green">2921</FONT> reportException(methodCall, s);<a name="line.2921"></a> <FONT color="green">2922</FONT> throw s;<a name="line.2922"></a> <FONT color="green">2923</FONT> }<a name="line.2923"></a> <FONT color="green">2924</FONT> }<a name="line.2924"></a> <FONT color="green">2925</FONT> <a name="line.2925"></a> <FONT color="green">2926</FONT> public &lt;T&gt; T unwrap(Class&lt;T&gt; iface) throws SQLException {<a name="line.2926"></a> <FONT color="green">2927</FONT> String methodCall = "unwrap(" + (iface==null?"null":iface.getName()) + ")";<a name="line.2927"></a> <FONT color="green">2928</FONT> try<a name="line.2928"></a> <FONT color="green">2929</FONT> {<a name="line.2929"></a> <FONT color="green">2930</FONT> //todo: double check this logic<a name="line.2930"></a> <FONT color="green">2931</FONT> return (T)reportReturn(methodCall, (iface != null &amp;&amp; (iface == ResultSet.class || iface == Spy.class))?(T)this:realResultSet.unwrap(iface));<a name="line.2931"></a> <FONT color="green">2932</FONT> }<a name="line.2932"></a> <FONT color="green">2933</FONT> catch (SQLException s)<a name="line.2933"></a> <FONT color="green">2934</FONT> {<a name="line.2934"></a> <FONT color="green">2935</FONT> reportException(methodCall,s);<a name="line.2935"></a> <FONT color="green">2936</FONT> throw s;<a name="line.2936"></a> <FONT color="green">2937</FONT> }<a name="line.2937"></a> <FONT color="green">2938</FONT> }<a name="line.2938"></a> <FONT color="green">2939</FONT> <a name="line.2939"></a> <FONT color="green">2940</FONT> public boolean isWrapperFor(Class&lt;?&gt; iface) throws SQLException<a name="line.2940"></a> <FONT color="green">2941</FONT> {<a name="line.2941"></a> <FONT color="green">2942</FONT> String methodCall = "isWrapperFor(" + (iface==null?"null":iface.getName()) + ")";<a name="line.2942"></a> <FONT color="green">2943</FONT> try<a name="line.2943"></a> <FONT color="green">2944</FONT> {<a name="line.2944"></a> <FONT color="green">2945</FONT> return reportReturn(methodCall, (iface != null &amp;&amp; (iface == ResultSet.class || iface == Spy.class)) ||<a name="line.2945"></a> <FONT color="green">2946</FONT> realResultSet.isWrapperFor(iface));<a name="line.2946"></a> <FONT color="green">2947</FONT> }<a name="line.2947"></a> <FONT color="green">2948</FONT> catch (SQLException s)<a name="line.2948"></a> <FONT color="green">2949</FONT> {<a name="line.2949"></a> <FONT color="green">2950</FONT> reportException(methodCall,s);<a name="line.2950"></a> <FONT color="green">2951</FONT> throw s;<a name="line.2951"></a> <FONT color="green">2952</FONT> }<a name="line.2952"></a> <FONT color="green">2953</FONT> }<a name="line.2953"></a> <FONT color="green">2954</FONT> }<a name="line.2954"></a> </PRE> </BODY> </HTML>
virtix/mut4j
lib/log4jdbc-1.2beta2/doc/apidocs-jdbc4/src-html/net/sf/log4jdbc/ResultSetSpy.html
HTML
mit
246,378
package kr.ac.cau.lumin.algomoa.Util.Adapter; import android.content.Context; import android.support.v7.widget.AppCompatImageView; import android.support.v7.widget.AppCompatTextView; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import java.util.List; import kr.ac.cau.lumin.algomoa.R; import kr.ac.cau.lumin.algomoa.Util.Algorithm.Contest; /** * Created by Lumin on 2015-11-27. */ public class ContestSettingAdapter extends RecyclerView.Adapter<ContestSettingAdapter.ViewHolder> { private Context context; private List<Contest> contests; private int viewItemLayout; public ContestSettingAdapter(Context context, List<Contest> contests, int viewItemLayout) { this.context = context; this.contests = contests; this.viewItemLayout = viewItemLayout; } @Override public int getItemCount() { return this.contests.size(); } @Override public void onBindViewHolder(ViewHolder viewHolder, int i) { final Contest contest = this.contests.get(i); viewHolder.nameView.setText(contest.getName()); viewHolder.timeView.setText(contest.getStartTimeInString()); viewHolder.imageView.setImageDrawable(context.getResources().getDrawable(R.drawable.codeforce_ic)); } @Override public ViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) { View view = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.contest_itemview, viewGroup, false); return new ViewHolder(view); } @Override public void onAttachedToRecyclerView(RecyclerView recyclerView) { super.onAttachedToRecyclerView(recyclerView); } public static class ViewHolder extends RecyclerView.ViewHolder { private AppCompatTextView nameView; private AppCompatTextView timeView; private AppCompatImageView imageView; public ViewHolder(View itemView) { super(itemView); this.nameView = (AppCompatTextView) itemView.findViewById(R.id.contest_name); this.timeView = (AppCompatTextView) itemView.findViewById(R.id.contest_time); this.imageView = (AppCompatImageView) itemView.findViewById(R.id.contest_image); } } }
nErumin/Algomoa
app/src/main/java/kr/ac/cau/lumin/algomoa/Util/Adapter/ContestSettingAdapter.java
Java
mit
2,318
/* * Pore * Copyright (c) 2014-2015, Lapis <https://github.com/LapisBlue> * * The MIT License * * 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. */ package blue.lapis.pore.converter.vector; import com.flowpowered.math.vector.Vector3d; import com.flowpowered.math.vector.Vector3f; import com.flowpowered.math.vector.Vector3i; import org.bukkit.Location; import org.bukkit.util.Vector; public class VectorConverter { public static Vector3d create3i(Location location) { return new Vector3d((int) location.getX(), (int) location.getY(), (int) location.getZ()); } public static Vector3d create3d(Location location) { return new Vector3d(location.getX(), location.getY(), location.getZ()); } public static Vector3d create3d(Vector vector) { return new Vector3d(vector.getX(), vector.getY(), vector.getZ()); } public static Vector3f create3f(Vector vector) { return new Vector3f(vector.getX(), vector.getY(), vector.getZ()); } public static Vector createBukkitVector(Vector3i vector) { return new Vector(vector.getX(), vector.getY(), vector.getZ()); } public static Vector createBukkitVector(Vector3d vector) { return new Vector(vector.getX(), vector.getY(), vector.getZ()); } public static Vector createBukkitVector(Vector3f vector) { return new Vector(vector.getX(), vector.getY(), vector.getZ()); } }
phase/Pore
src/main/java/blue/lapis/pore/converter/vector/VectorConverter.java
Java
mit
2,449
GitHubClient ======== [![Build Status](https://travis-ci.org/zsavely/GitHubClient.svg?branch=master)](https://travis-ci.org/zsavely/GitHubClient) [![codecov](https://codecov.io/gh/zsavely/GitHubClient/branch/master/graph/badge.svg)](https://codecov.io/gh/zsavely/GitHubClient) ### License The MIT License (MIT) Copyright (c) 2016 Savelii Zagurskii 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.
zsavely/GitHubClient
README.md
Markdown
mit
1,443
/* tags: basic <p>This example shows how you can implement a simple Minecraft renderer in regl.</p> */ const canvas = document.body.appendChild(document.createElement('canvas')) const fit = require('canvas-fit') const regl = require('../regl')(canvas) const mat4 = require('gl-mat4') const camera = require('canvas-orbit-camera')(canvas) window.addEventListener('resize', fit(canvas), false) // configure intial camera view. camera.rotate([0.0, 0.0], [0.0, -0.4]) camera.zoom(15.0) // all the positions of a single block. var blockPosition = [ // side faces [[-0.5, +0.5, +0.5], [+0.5, +0.5, +0.5], [+0.5, -0.5, +0.5], [-0.5, -0.5, +0.5]], // positive z face. [[+0.5, +0.5, +0.5], [+0.5, +0.5, -0.5], [+0.5, -0.5, -0.5], [+0.5, -0.5, +0.5]], // positive x face [[+0.5, +0.5, -0.5], [-0.5, +0.5, -0.5], [-0.5, -0.5, -0.5], [+0.5, -0.5, -0.5]], // negative z face [[-0.5, +0.5, -0.5], [-0.5, +0.5, +0.5], [-0.5, -0.5, +0.5], [-0.5, -0.5, -0.5]], // negative x face. // top faces [[-0.5, +0.5, -0.5], [+0.5, +0.5, -0.5], [+0.5, +0.5, +0.5], [-0.5, +0.5, +0.5]] ] // all the uvs of a single block. var blockUv = [ // side faces [[0.0, 0.5], [0.5, 0.5], [0.5, 1.0], [0.0, 1.0]], [[0.0, 0.5], [0.5, 0.5], [0.5, 1.0], [0.0, 1.0]], [[0.0, 0.5], [0.5, 0.5], [0.5, 1.0], [0.0, 1.0]], [[0.0, 0.5], [0.5, 0.5], [0.5, 1.0], [0.0, 1.0]], // top [[0.0, 0.0], [0.5, 0.0], [0.5, 0.5], [0.0, 0.5]] ] // all the normals of a single block. var blockNormal = [ // side faces [[0.0, 0.0, +1.0], [0.0, 0.0, +1.0], [0.0, 0.0, +1.0], [0.0, 0.0, +1.0]], [[+1.0, 0.0, 0.0], [+1.0, 0.0, 0.0], [+1.0, 0.0, 0.0], [+1.0, 0.0, 0.0]], [[0.0, 0.0, -1.0], [0.0, 0.0, -1.0], [0.0, 0.0, -1.0], [0.0, 0.0, -1.0]], [[-1.0, 0.0, 0.0], [-1.0, 0.0, 0.0], [-1.0, 0.0, 0.0], [-1.0, 0.0, 0.0]], // top [[0.0, +1.0, 0.0], [0.0, +1.0, 0.0], [0.0, +1.0, 0.0], [0.0, +1.0, 0.0]] ] // the terrain is just described by some sine functions. var evalHeight = (x, z) => { var freq = 30.0 return Math.round( 2.0 * Math.sin(freq * 1.0 * 3.14 * x) * Math.sin(freq * 2.0 * 3.14 * z) + 3.0 * Math.cos(freq * 4.0 * 3.14 * x + 2.1) * Math.sin(freq * 5.0 * 3.14 * z + 0.9) + 1.0 * Math.cos(freq * 8.0 * 3.14 * x + 43.43) * Math.cos(freq * 3.0 * 3.14 * z + 34.3)) } // these contains all the geometry of the world. // you can add blocks to these arrays by calling addBlock() var uv = [] var elements = [] var position = [] var normal = [] var addBlock = (x, y, z) => { var index = position.length for (var i = 0; i < 5; i++) { if (i === 0 && y <= evalHeight(x, z + 1)) { // positive z face continue // not visible, skip } if (i === 1 && y <= evalHeight(x + 1, z)) { // positive x face continue // not visible, skip } if (i === 2 && y <= evalHeight(x, z - 1)) { // negative z face continue // not visible, skip } if (i === 3 && y <= evalHeight(x - 1, z)) { // negative x face continue // not visible, skip } var j // add positions. for (j = 0; j < blockPosition[i].length; j++) { var p = blockPosition[i][j] position.push([p[0] + x, p[1] + y, p[2] + z]) } // add normals. for (j = 0; j < blockNormal[i].length; j++) { var n = blockNormal[i][j] normal.push([n[0], n[1], n[2]]) } // add uvs. for (j = 0; j < blockUv[i].length; j++) { var a = blockUv[i][j] uv.push([a[0], a[1]]) } // add quad face. elements.push([2 + index, 1 + index, 0 + index]) elements.push([2 + index, 0 + index, 3 + index]) index += 4 // next quad. } } const S = 40 // world size. // create world: for (var x = -S; x <= S; x++) { for (var z = -S; z <= S; z++) { var y = evalHeight(x, z) addBlock(x, y, z) } } // now the world has been created. Now create the draw call. const drawWorld = regl({ cull: { enable: true, face: 'back' }, context: { view: () => camera.view() }, frag: ` precision mediump float; varying vec2 vUv; varying vec3 vNormal; uniform sampler2D atlas; void main () { vec3 lightDir = normalize(vec3(0.4, 0.9, 0.3)); vec3 tex = texture2D(atlas, vUv).rgb; vec3 ambient = 0.3 * tex; vec3 diffuse = 0.7 * tex * clamp( dot(vNormal, lightDir ), 0.0, 1.0 ); gl_FragColor = vec4(ambient + diffuse, 1.0); }`, vert: ` precision mediump float; attribute vec3 position, normal; attribute vec2 uv; varying vec2 vUv; varying vec3 vNormal; uniform mat4 projection, view; void main() { vUv = uv; vNormal = normal; gl_Position = projection * view * vec4(position, 1); }`, uniforms: { view: regl.context('view'), projection: ({viewportWidth, viewportHeight}) => mat4.perspective([], Math.PI / 4, viewportWidth / viewportHeight, 0.01, 1000), atlas: regl.prop('atlas') }, attributes: { position: regl.prop('position'), uv: regl.prop('uv'), normal: regl.prop('normal') }, elements: regl.prop('elements') }) require('resl')({ manifest: { atlas: { type: 'image', src: 'assets/atlas.png', parser: (data) => regl.texture({ mag: 'nearest', mipmap: true, min: 'linear mipmap linear', data: data }) } }, onDone: ({ atlas }) => { regl.frame(() => { drawWorld({position, elements, uv, normal, atlas}) camera.tick() }) } })
mikolalysenko/regl
example/minecraft.js
JavaScript
mit
5,489
namespace Kliva.Services { /// <summary> /// This static class contains the Strava API endpoint Urls. /// </summary> public static class Endpoints { /// <summary> /// Url to the Activity endpoint used for the currently authenticated athlete. /// </summary> public const string Activity = "https://www.strava.com/api/v3/activities"; /// <summary> /// Url to the Activity endpoint used for other athletes than the currently authenticated one. /// </summary> public const string Activities = "https://www.strava.com/api/v3/athlete/activities"; /// <summary> /// Url to the Followers endpoint. /// </summary> public const string ActivitiesFollowers = "https://www.strava.com/api/v3/activities/following"; /// <summary> /// Url to the Athlete endpoint used for the currently authenticated athlete. /// </summary> public const string Athlete = "https://www.strava.com/api/v3/athlete"; /// <summary> /// Url to the Athlete endpoint used for other athletes than the currently authenticated one. /// </summary> public const string Athletes = "https://www.strava.com/api/v3/athletes"; /// <summary> /// Url to the Club endpoint used for other athletes than the currently authenticated one. /// </summary> public const string Club = "https://www.strava.com/api/v3/clubs"; /// <summary> /// Url to the Club endpoint used for the currently authenticated athlete. /// </summary> public const string Clubs = "https://www.strava.com/api/v3/athlete/clubs"; /// <summary> /// Url to the endpoint used for receiving the friends of the currentlx authenticated user. /// </summary> public const string OwnFriends = "https://www.strava.com/api/v3/athlete/friends"; /// <summary> /// Url to the endpoint used for receiving the followers of the currently authenticated athlete. /// </summary> public const string OwnFollowers = "https://www.strava.com/api/v3/athlete/followers"; /// <summary> /// Url to the endpoint used for receiving the followers of athletes other than the currently authenticated one. /// </summary> public const string OtherFriends = "https://www.strava.com/api/v3/athletes/{0}/friends"; /// <summary> /// Url to the endpoint used for receiving the followers of athletes other than the currently authenticated one. /// </summary> public const string OtherFollowers = "https://www.strava.com/api/v3/athletes/{0}/followers"; /// <summary> /// Url to the endpoint used for receiving the followers of athletes other than the currently authenticated one. /// </summary> public const string MutualFriends = "https://www.strava.com/api/v3/athletes/{0}/both-following"; /// <summary> /// Url to the endpoint used for receiving the K/QOMs/CRs of athletes. /// </summary> public const string Koms = "https://www.strava.com/api/v3/athletes/{0}/koms"; /// <summary> /// Url to the endpoint used for receiving gear. /// </summary> public const string Gear = "https://www.strava.com/api/v3/gear"; /// <summary> /// Url to the endpoint used for receiving segment information. /// </summary> public const string Segment = "https://www.strava.com/api/v3/segments"; /// <summary> /// Url to the endpoint used for receiving segment effort information. /// </summary> public const string SegmentEffort = "https://www.strava.com/api/v3/segment_efforts"; /// <summary> /// Url to the endpoint used for receiving segment leaderboard information. /// </summary> public const string Leaderboard = "https://www.strava.com/api/v3/segments/{0}/leaderboard"; /// <summary> /// Url to the endpoint used for receiving starred segments. /// </summary> public const string Starred = "https://www.strava.com/api/v3/segments/starred"; /// <summary> /// Url to the endpoint used for uploads. /// </summary> public const string Uploads = "https://www.strava.com/api/v3/uploads/"; } }
clarkezone/Kliva
src/Kliva/Services/Endpoints.cs
C#
mit
4,380
module.exports = { output: { library: 'RadioGroup', libraryTarget: 'umd' }, externals: [ { react: { root: 'React', commonjs2: 'react', commonjs: 'react', amd: 'react' } } ], module: { loaders: [ {test: /\.jsx?$/, exclude: /build|node_modules/, loader: 'babel-loader'}, ] }, resolve: { extensions: ['.js', '.jsx'] } };
mu29/react-radio-buttons
webpack.config.js
JavaScript
mit
412
using System; using System.Collections.Generic; using CloudyNovel.Game; using CloudyNovel.Graphics.Rendering; using OpenTK.Input; namespace CloudyNovel.Scenes { public class SceneManager { private readonly Dictionary<string, Scene> _scenes; private Scene _currentScene; public Scene CurrentScene { get => _currentScene; set => ChangeScene(value.Name); } public BaseGame Game { get; } public SceneManager(BaseGame game) { Game = game; _scenes = new Dictionary<string, Scene>(); //Event Registers Game.Window.MouseMove += Window_MouseMove; Game.Window.MouseDown += Window_MouseDown; Game.Window.MouseUp += Window_MouseUp; Game.Window.MouseEnter += Window_MouseEnter; Game.Window.MouseLeave += Window_MouseLeave; Game.Window.MouseWheel += Window_MouseWheel; Game.Window.KeyDown += Window_KeyDown; Game.Window.KeyUp += Window_KeyUp; Game.Window.KeyPress += Window_KeyPress; } public virtual void Draw(SpriteBatch spriteBatch) { _currentScene.Draw(spriteBatch); } public virtual void DebugDraw(GeometryRenderer geometryRenderer) { _currentScene.DebugDraw(geometryRenderer); } public virtual void Update(GameTime gameTime) { _currentScene.Update(gameTime); } public virtual void AddScene(Scene scene) { scene.Manager = this; _scenes.Add(scene.Name, scene); } public virtual void SetScene(string name) { _currentScene = _scenes[name]; _currentScene.Load(Game.ResourceManager); _currentScene.OnEnter(); } public virtual void ChangeScene(string name) { _currentScene.OnExit(); _currentScene.Unload(); SetScene(name); } #region MouseEvents protected virtual void Window_MouseMove(object sender, MouseMoveEventArgs e) { _currentScene.OnMouseMove(e); } protected virtual void Window_MouseDown(object sender, MouseButtonEventArgs e) { _currentScene.OnMouseDown(e); } protected virtual void Window_MouseUp(object sender, MouseButtonEventArgs e) { _currentScene.OnMouseUp(e); } protected virtual void Window_MouseEnter(object sender, EventArgs e) { _currentScene.OnMouseEnter(); } protected virtual void Window_MouseLeave(object sender, EventArgs e) { _currentScene.OnMouseLeave(); } protected virtual void Window_MouseWheel(object sender, MouseWheelEventArgs e) { _currentScene.OnMouseWheel(e); } #endregion #region KeyboardEvents protected virtual void Window_KeyDown(object sender, KeyboardKeyEventArgs e) { _currentScene.OnKeyDown(sender, e); } protected virtual void Window_KeyUp(object sender, KeyboardKeyEventArgs e) { _currentScene.OnKeyUp(sender, e); } protected virtual void Window_KeyPress(object sender, OpenTK.KeyPressEventArgs e) { _currentScene.OnKeyPress(sender, e); } #endregion } }
kicklogicout/CloudyNovel
CloudyNovel/Scenes/SceneManager.cs
C#
mit
3,486
package com.dgex.offspring.nxtCore.core; import nxt.Constants; public class NXTTime { public static long convertTimestamp(long timestamp) { return ((timestamp * 1000) + Constants.EPOCH_BEGINNING - 500L); } }
incentivetoken/offspring
com.dgex.offspring.nxtCore/src/com/dgex/offspring/nxtCore/core/NXTTime.java
Java
mit
219
""" Define a simple framework for time-evolving a set of arbitrary agents and monitoring their evolution. """ import numpy as np def int_r(f): """ Convert to nearest integer. """ return int(np.round(f)) class Simulation(object): """ A class that manages the evolution of a set of agents. This is a simple objects that essentially just keeps track of simulation time and calls the `evolve(self, t, dt)` method on a set of agents, allowing them to update their states. There are a few bells and whistles. First of all, each agent can also have a method `prepare(self, tmax, dt)`. If this method exists, it is called before every `run` and can be used to prepare the agent for the simulation. Typically the agents are run in the order in which they are given as arguments to `__init__`. If, however, agents have a field called `order`, this is used to identify their position in the running hierarchy. Agents that don't have this field are assumed to have an order of 0. Attributes ---------- agents: sequence The sequence of agents in the simulation. This is ordered according to the agents' `order` field (if it exists). dt: float Simulation time step. """ def __init__(self, *agents, **kwargs): """ Initialize with a set of agents. Arguments --------- A1, A2, ...: agents These are the agents to be used in the simulation. Each agent should have a method `evolve(self, t, dt)` that is called for each time step. If the agent further has a method `prepare(self, tmax, dt)`, this is called before the simulation. dt: float (default: 0.1) Set the time step. """ order = [getattr(agent, 'order', 0) for agent in agents] self.agents = [_[0] for _ in sorted(zip(agents, order), key=lambda x: x[1])] self.dt = kwargs.pop('dt', 0.1) if len(kwargs) > 0: raise TypeError("Unexpected keyword argument '" + str(kwargs.keys()[0]) + "'.") def run(self, t): """ Run the simulation for a time `t`. """ # cache some values, for speed agents = self.agents dt = self.dt # prepare the agents that support it for agent in self.agents: if hasattr(agent, 'prepare'): agent.prepare(t, dt) # run the simulation crt_t = 0.0 for i in xrange(int_r(t/dt)): for agent in agents: agent.evolve(crt_t, dt) crt_t += dt class EventMonitor(object): """ A class that can be used to track agent 'events' -- effectively tracking a boolean vector from the target object. The `order` attribute for this class is set to 1 by default, so that it gets executed after all the usual agents are executed (so that events can be detected for the time step that just ended). Attributes ---------- t: list Times at which events were registered. i: list Indices of units that triggered the events. This is matched with `t`. N: int Number of units in agent that is being tracked. agent: Agent that is being tracked. event: string The agent attribute that is being monitored. """ def __init__(self, agent, event='spike'): """ Create a monitor. Arguments --------- agent: The agent whose events should be tracked. event: string Name of event to track. The agent should have an attribute with the name given by `event`, and this should be a sequence with a consistent size throughout the simulation. """ self.event = event self.agent = agent self.t = [] self.i = [] self.order = 10 def prepare(self, tmax, dt): self.t = [] self.i = [] self.N = None def evolve(self, t, dt): events = getattr(self.agent, self.event) if self.N is None: self.N = len(events) idxs = np.asarray(events).nonzero()[0] n = len(idxs) if n > 0: self.t.extend([t]*n) self.i.extend(idxs) class StateMonitor(object): """ A class that can be used to monitor the time evolution of an attribute of an agent. The `order` attribute for this class is set to 1 by default, so that it gets executed after all the usual agents are executed. This means that it stores the values of the state variables at the end of each time step. Attributes ---------- t: array Array of times where state has been monitored. <var1>: <var2>: ... <varK>: array, size (N, n) Values of monitored quantities. `N` is the number of units that are targeted, and `n` is the number of time steps. _agent: Agent that is being targeted. _interval: float Time interval used for recording. _targets: sequence of string Quantities to be recorded. """ def __init__(self, agent, targets, interval=None): """ Create a state monitor. Arguments --------- agent: The agent whose attributes we're tracking. targets: string or iterable of strings. The names of the agent attribute(s) that should be tracked. interval: float If provided, the interval of time at which to record. This should be an integer multiple of the simulation time step. If not provided, recording is done at every time step. """ self._agent = agent self._interval = interval self._targets = [targets] if isinstance(targets, (str,unicode)) else targets self.order = 10 def prepare(self, tmax, dt): if self._interval is None: self._interval = dt self._step = int_r(self._interval/dt) self.t = np.arange(0.0, tmax, self._step*dt) self._n = 0 self._i = 0 self._first_record = True def _prepare_buffers(self): """ Create recording buffers. """ tgt_ptrs = [] for tname in self._targets: target = getattr(self._agent, tname) dtype = getattr(target, 'dtype', type(target)) # using Fortran ordering can make a huge difference in speed of monitoring # (factor of 2 or 3)! setattr(self, tname, np.zeros((np.size(target), len(self.t)), dtype=dtype, order='F')) # cache references to the targets, for faster access tgt_ptrs.append(getattr(self, tname)) self._first_record = False self._target_ptrs = tgt_ptrs def evolve(self, t, dt): if self._n % self._step == 0: # make sure all buffers are the right size if self._first_record: self._prepare_buffers() agent = self._agent i = self._i for tname, storage in zip(self._targets, self._target_ptrs): target = getattr(agent, tname) storage[:, i] = target self._i += 1 self._n += 1
ttesileanu/twostagelearning
simulation.py
Python
mit
6,696
export const RouteAuth = { REQUIRED: 2, DISABLED: 0, OPTIONAL: 1, };
zabkwak/resting-squirrel
src/typings/enums.js
JavaScript
mit
72
class DropItemIdFromIngredients < ActiveRecord::Migration[5.1] def change remove_column :ingredients, :item_id end end
IsabelVazquez/recipe-app
db/migrate/20171023224714_drop_item_id_from_ingredients.rb
Ruby
mit
127
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Controls.Primitives; using System.Windows.Media; namespace GZ_SpotGateEx.UIControls { /// <summary> /// 图片变换状态的按钮 /// </summary> public class ImageButton : ToggleButton { public static readonly DependencyProperty NormalImageProperty; public static readonly DependencyProperty HoverImageProperty; public static readonly DependencyProperty DisableImageProperty; public static readonly DependencyProperty TextProperty; public ImageButton() { //DefaultStyleKey = typeof(ImageButtonEx); } static ImageButton() { NormalImageProperty = DependencyProperty.Register("NormalImage", typeof(ImageSource), typeof(ImageButton)); HoverImageProperty = DependencyProperty.Register("HoverImage", typeof(ImageSource), typeof(ImageButton)); DisableImageProperty = DependencyProperty.Register("DisableImage", typeof(ImageSource), typeof(ImageButton)); TextProperty = DependencyProperty.Register("Text", typeof(string), typeof(ImageButton), new PropertyMetadata("")); DefaultStyleKeyProperty.OverrideMetadata(typeof(ImageButton), new FrameworkPropertyMetadata(typeof(ImageButton))); } public string Text { get { return (string)GetValue(TextProperty); } set { SetValue(TextProperty, value); } } /// <summary> /// Normal Image /// </summary> public ImageSource NormalImage { get { return (ImageSource)GetValue(NormalImageProperty); } set { SetValue(NormalImageProperty, value); } } /// <summary> /// Hover image /// </summary> public ImageSource HoverImage { get { return (ImageSource)GetValue(HoverImageProperty); } set { SetValue(HoverImageProperty, value); } } /// <summary> /// disable image /// </summary> public ImageSource DisableImage { get { return (ImageSource)GetValue(DisableImageProperty); } set { SetValue(DisableImageProperty, value); } } } }
ysjr-2002/GZ-SpotGate
GZ-SpotGateEx/UIControls/ImageButton.cs
C#
mit
2,396
# Copyright (c) 2008, Aldo Cortesi. All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. from __future__ import division try: import tracemalloc except ImportError: tracemalloc = None from libqtile.dgroups import DGroups from xcffib.xproto import EventMask, WindowError, AccessError, DrawableError import logging import os import pickle import shlex import signal import sys import traceback import xcffib import xcffib.xinerama import xcffib.xproto import six from . import asyncio from .config import Drag, Click, Screen, Match, Rule from .group import _Group from .log_utils import logger from .state import QtileState from .utils import QtileError, get_cache_dir from .widget.base import _Widget from . import command from . import hook from . import utils from . import window from . import xcbq if sys.version_info >= (3, 3): def _import_module(module_name, dir_path): import importlib file_name = os.path.join(dir_path, module_name) + '.py' f = importlib.machinery.SourceFileLoader(module_name, file_name) module = f.load_module() return module else: def _import_module(module_name, dir_path): import imp fp = None try: fp, pathname, description = imp.find_module(module_name, [dir_path]) module = imp.load_module(module_name, fp, pathname, description) finally: if fp: fp.close() return module class Qtile(command.CommandObject): """ This object is the __root__ of the command graph. """ def __init__(self, config, displayName=None, fname=None, no_spawn=False, state=None): self.no_spawn = no_spawn self._eventloop = None self._finalize = False if not displayName: displayName = os.environ.get("DISPLAY") if not displayName: raise QtileError("No DISPLAY set.") if not fname: # Dots might appear in the host part of the display name # during remote X sessions. Let's strip the host part first. displayNum = displayName.partition(":")[2] if "." not in displayNum: displayName += ".0" fname = command.find_sockfile(displayName) self.conn = xcbq.Connection(displayName) self.config = config self.fname = fname hook.init(self) self.windowMap = {} self.widgetMap = {} self.groupMap = {} self.groups = [] self.keyMap = {} # Find the modifier mask for the numlock key, if there is one: nc = self.conn.keysym_to_keycode(xcbq.keysyms["Num_Lock"]) self.numlockMask = xcbq.ModMasks[self.conn.get_modifier(nc)] self.validMask = ~(self.numlockMask | xcbq.ModMasks["lock"]) # Because we only do Xinerama multi-screening, # we can assume that the first # screen's root is _the_ root. self.root = self.conn.default_screen.root self.root.set_attribute( eventmask=( EventMask.StructureNotify | EventMask.SubstructureNotify | EventMask.SubstructureRedirect | EventMask.EnterWindow | EventMask.LeaveWindow ) ) self.root.set_property( '_NET_SUPPORTED', [self.conn.atoms[x] for x in xcbq.SUPPORTED_ATOMS] ) self.supporting_wm_check_window = self.conn.create_window(-1, -1, 1, 1) self.root.set_property( '_NET_SUPPORTING_WM_CHECK', self.supporting_wm_check_window.wid ) # setup the default cursor self.root.set_cursor('left_ptr') wmname = getattr(self.config, "wmname", "qtile") self.supporting_wm_check_window.set_property('_NET_WM_NAME', wmname) self.supporting_wm_check_window.set_property( '_NET_SUPPORTING_WM_CHECK', self.supporting_wm_check_window.wid ) if config.main: config.main(self) self.dgroups = None if self.config.groups: key_binder = None if hasattr(self.config, 'dgroups_key_binder'): key_binder = self.config.dgroups_key_binder self.dgroups = DGroups(self, self.config.groups, key_binder) if hasattr(config, "widget_defaults") and config.widget_defaults: _Widget.global_defaults = config.widget_defaults else: _Widget.global_defaults = {} for i in self.groups: self.groupMap[i.name] = i self.setup_eventloop() self.server = command._Server(self.fname, self, config, self._eventloop) self.currentScreen = None self.screens = [] self._process_screens() self.currentScreen = self.screens[0] self._drag = None self.ignoreEvents = set([ xcffib.xproto.KeyReleaseEvent, xcffib.xproto.ReparentNotifyEvent, xcffib.xproto.CreateNotifyEvent, # DWM handles this to help "broken focusing windows". xcffib.xproto.MapNotifyEvent, xcffib.xproto.LeaveNotifyEvent, xcffib.xproto.FocusOutEvent, xcffib.xproto.FocusInEvent, xcffib.xproto.NoExposureEvent ]) self.conn.flush() self.conn.xsync() self._xpoll() # Map and Grab keys for key in self.config.keys: self.mapKey(key) # It fixes problems with focus when clicking windows of some specific clients like xterm def noop(qtile): pass self.config.mouse += (Click([], "Button1", command.lazy.function(noop), focus="after"),) self.mouseMap = {} for i in self.config.mouse: if self.mouseMap.get(i.button_code) is None: self.mouseMap[i.button_code] = [] self.mouseMap[i.button_code].append(i) self.grabMouse() # no_spawn is set when we are restarting; we only want to run the # startup hook once. if not no_spawn: hook.fire("startup_once") hook.fire("startup") self.scan() self.update_net_desktops() hook.subscribe.setgroup(self.update_net_desktops) if state: st = pickle.load(six.BytesIO(state.encode())) try: st.apply(self) except: logger.exception("failed restoring state") self.selection = { "PRIMARY": {"owner": None, "selection": ""}, "CLIPBOARD": {"owner": None, "selection": ""} } self.setup_selection() def setup_selection(self): PRIMARY = self.conn.atoms["PRIMARY"] CLIPBOARD = self.conn.atoms["CLIPBOARD"] self.selection_window = self.conn.create_window(-1, -1, 1, 1) self.selection_window.set_attribute(eventmask=EventMask.PropertyChange) self.conn.xfixes.select_selection_input(self.selection_window, "PRIMARY") self.conn.xfixes.select_selection_input(self.selection_window, "CLIPBOARD") r = self.conn.conn.core.GetSelectionOwner(PRIMARY).reply() self.selection["PRIMARY"]["owner"] = r.owner r = self.conn.conn.core.GetSelectionOwner(CLIPBOARD).reply() self.selection["CLIPBOARD"]["owner"] = r.owner # ask for selection on starup self.convert_selection(PRIMARY) self.convert_selection(CLIPBOARD) def setup_eventloop(self): self._eventloop = asyncio.new_event_loop() self._eventloop.add_signal_handler(signal.SIGINT, self.stop) self._eventloop.add_signal_handler(signal.SIGTERM, self.stop) self._eventloop.set_exception_handler( lambda x, y: logger.exception("Got an exception in poll loop") ) logger.info('Adding io watch') fd = self.conn.conn.get_file_descriptor() self._eventloop.add_reader(fd, self._xpoll) self.setup_python_dbus() def setup_python_dbus(self): # This is a little strange. python-dbus internally depends on gobject, # so gobject's threads need to be running, and a gobject "main loop # thread" needs to be spawned, but we try to let it only interact with # us via calls to asyncio's call_soon_threadsafe. try: # We import dbus here to thrown an ImportError if it isn't # available. Since the only reason we're running this thread is # because of dbus, if dbus isn't around there's no need to run # this thread. import dbus # noqa from gi.repository import GLib def gobject_thread(): ctx = GLib.main_context_default() while not self._finalize: try: ctx.iteration(True) except Exception: logger.exception("got exception from gobject") self._glib_loop = self.run_in_executor(gobject_thread) except ImportError: logger.warning("importing dbus/gobject failed, dbus will not work.") self._glib_loop = None def finalize(self): self._finalize = True self._eventloop.remove_signal_handler(signal.SIGINT) self._eventloop.remove_signal_handler(signal.SIGTERM) self._eventloop.set_exception_handler(None) try: from gi.repository import GLib GLib.idle_add(lambda: None) self._eventloop.run_until_complete(self._glib_loop) except ImportError: pass try: for w in self.widgetMap.values(): w.finalize() for l in self.config.layouts: l.finalize() for screen in self.screens: for bar in [screen.top, screen.bottom, screen.left, screen.right]: if bar is not None: bar.finalize() logger.info('Removing io watch') fd = self.conn.conn.get_file_descriptor() self._eventloop.remove_reader(fd) self.conn.finalize() self.server.close() except: logger.exception('exception during finalize') finally: self._eventloop.close() self._eventloop = None def _process_fake_screens(self): """ Since Xephyr, Xnest don't really support offset screens, we'll fake it here for testing, (or if you want to partition a physical monitor into separate screens) """ for i, s in enumerate(self.config.fake_screens): # should have x,y, width and height set s._configure(self, i, s.x, s.y, s.width, s.height, self.groups[i]) if not self.currentScreen: self.currentScreen = s self.screens.append(s) def _process_screens(self): if hasattr(self.config, 'fake_screens'): self._process_fake_screens() return # What's going on here is a little funny. What we really want is only # screens that don't overlap here; overlapping screens should see the # same parts of the root window (i.e. for people doing xrandr # --same-as). However, the order that X gives us pseudo screens in is # important, because it indicates what people have chosen via xrandr # --primary or whatever. So we need to alias screens that should be # aliased, but preserve order as well. See #383. xywh = {} screenpos = [] for s in self.conn.pseudoscreens: pos = (s.x, s.y) (w, h) = xywh.get(pos, (0, 0)) if pos not in xywh: screenpos.append(pos) xywh[pos] = (max(w, s.width), max(h, s.height)) for i, (x, y) in enumerate(screenpos): (w, h) = xywh[(x, y)] if i + 1 > len(self.config.screens): scr = Screen() else: scr = self.config.screens[i] if not self.currentScreen: self.currentScreen = scr scr._configure( self, i, x, y, w, h, self.groups[i], ) self.screens.append(scr) if not self.screens: if self.config.screens: s = self.config.screens[0] else: s = Screen() self.currentScreen = s s._configure( self, 0, 0, 0, self.conn.default_screen.width_in_pixels, self.conn.default_screen.height_in_pixels, self.groups[0], ) self.screens.append(s) def mapKey(self, key): self.keyMap[(key.keysym, key.modmask & self.validMask)] = key code = self.conn.keysym_to_keycode(key.keysym) self.root.grab_key( code, key.modmask, True, xcffib.xproto.GrabMode.Async, xcffib.xproto.GrabMode.Async, ) if self.numlockMask: self.root.grab_key( code, key.modmask | self.numlockMask, True, xcffib.xproto.GrabMode.Async, xcffib.xproto.GrabMode.Async, ) self.root.grab_key( code, key.modmask | self.numlockMask | xcbq.ModMasks["lock"], True, xcffib.xproto.GrabMode.Async, xcffib.xproto.GrabMode.Async, ) def unmapKey(self, key): key_index = (key.keysym, key.modmask & self.validMask) if key_index not in self.keyMap: return code = self.conn.keysym_to_keycode(key.keysym) self.root.ungrab_key(code, key.modmask) if self.numlockMask: self.root.ungrab_key(code, key.modmask | self.numlockMask) self.root.ungrab_key( code, key.modmask | self.numlockMask | xcbq.ModMasks["lock"] ) del(self.keyMap[key_index]) def update_net_desktops(self): try: index = self.groups.index(self.currentGroup) # TODO: we should really only except ValueError here, AttributeError is # an annoying chicken and egg because we're accessing currentScreen # (via currentGroup), and when we set up the initial groups, there # aren't any screens yet. This can probably be changed when #475 is # fixed. except (ValueError, AttributeError): index = 0 self.root.set_property("_NET_NUMBER_OF_DESKTOPS", len(self.groups)) self.root.set_property( "_NET_DESKTOP_NAMES", "\0".join([i.name for i in self.groups]) ) self.root.set_property("_NET_CURRENT_DESKTOP", index) def addGroup(self, name, layout=None, layouts=None): if name not in self.groupMap.keys(): g = _Group(name, layout) self.groups.append(g) if not layouts: layouts = self.config.layouts g._configure(layouts, self.config.floating_layout, self) self.groupMap[name] = g hook.fire("addgroup", self, name) hook.fire("changegroup") self.update_net_desktops() return True return False def delGroup(self, name): # one group per screen is needed if len(self.groups) == len(self.screens): raise ValueError("Can't delete all groups.") if name in self.groupMap.keys(): group = self.groupMap[name] if group.screen and group.screen.previous_group: target = group.screen.previous_group else: target = group.prevGroup() # Find a group that's not currently on a screen to bring to the # front. This will terminate because of our check above. while target.screen: target = target.prevGroup() for i in list(group.windows): i.togroup(target.name) if self.currentGroup.name == name: self.currentScreen.setGroup(target, save_prev=False) self.groups.remove(group) del(self.groupMap[name]) hook.fire("delgroup", self, name) hook.fire("changegroup") self.update_net_desktops() def registerWidget(self, w): """ Register a bar widget. If a widget with the same name already exists, this will silently ignore that widget. However, this is not necessarily a bug. By default a widget's name is just self.__class__.lower(), so putting multiple widgets of the same class will alias and one will be inaccessible. Since more than one groupbox widget is useful when you have more than one screen, this is a not uncommon occurrence. If you want to use the debug info for widgets with the same name, set the name yourself. """ if w.name: if w.name in self.widgetMap: return self.widgetMap[w.name] = w @utils.LRUCache(200) def colorPixel(self, name): return self.conn.screens[0].default_colormap.alloc_color(name).pixel @property def currentLayout(self): return self.currentGroup.layout @property def currentGroup(self): return self.currentScreen.group @property def currentWindow(self): return self.currentScreen.group.currentWindow def scan(self): _, _, children = self.root.query_tree() for item in children: try: attrs = item.get_attributes() state = item.get_wm_state() except (xcffib.xproto.WindowError, xcffib.xproto.AccessError): continue if attrs and attrs.map_state == xcffib.xproto.MapState.Unmapped: continue if state and state[0] == window.WithdrawnState: continue self.manage(item) def unmanage(self, win): c = self.windowMap.get(win) if c: hook.fire("client_killed", c) self.reset_gaps(c) if getattr(c, "group", None): c.group.remove(c) del self.windowMap[win] self.update_client_list() def reset_gaps(self, c): if c.strut: self.update_gaps((0, 0, 0, 0), c.strut) def update_gaps(self, strut, old_strut=None): from libqtile.bar import Gap (left, right, top, bottom) = strut[:4] if old_strut: (old_left, old_right, old_top, old_bottom) = old_strut[:4] if not left and old_left: self.currentScreen.left = None elif not right and old_right: self.currentScreen.right = None elif not top and old_top: self.currentScreen.top = None elif not bottom and old_bottom: self.currentScreen.bottom = None if top: self.currentScreen.top = Gap(top) elif bottom: self.currentScreen.bottom = Gap(bottom) elif left: self.currentScreen.left = Gap(left) elif right: self.currentScreen.right = Gap(right) self.currentScreen.resize() def manage(self, w): try: attrs = w.get_attributes() internal = w.get_property("QTILE_INTERNAL") except (xcffib.xproto.WindowError, xcffib.xproto.AccessError): return if attrs and attrs.override_redirect: return if w.wid not in self.windowMap: if internal: try: c = window.Internal(w, self) except (xcffib.xproto.WindowError, xcffib.xproto.AccessError): return self.windowMap[w.wid] = c else: try: c = window.Window(w, self) except (xcffib.xproto.WindowError, xcffib.xproto.AccessError): return if w.get_wm_type() == "dock" or c.strut: c.static(self.currentScreen.index) else: hook.fire("client_new", c) # Window may be defunct because # it's been declared static in hook. if c.defunct: return self.windowMap[w.wid] = c # Window may have been bound to a group in the hook. if not c.group: self.currentScreen.group.add(c, focus=c.can_steal_focus()) self.update_client_list() hook.fire("client_managed", c) return c else: return self.windowMap[w.wid] def update_client_list(self): """ Updates the client stack list this is needed for third party tasklists and drag and drop of tabs in chrome """ windows = [wid for wid, c in self.windowMap.items() if c.group] self.root.set_property("_NET_CLIENT_LIST", windows) # TODO: check stack order self.root.set_property("_NET_CLIENT_LIST_STACKING", windows) def grabMouse(self): self.root.ungrab_button(None, None) for i in self.config.mouse: if isinstance(i, Click) and i.focus: # Make a freezing grab on mouse button to gain focus # Event will propagate to target window grabmode = xcffib.xproto.GrabMode.Sync else: grabmode = xcffib.xproto.GrabMode.Async eventmask = EventMask.ButtonPress if isinstance(i, Drag): eventmask |= EventMask.ButtonRelease self.root.grab_button( i.button_code, i.modmask, True, eventmask, grabmode, xcffib.xproto.GrabMode.Async, ) if self.numlockMask: self.root.grab_button( i.button_code, i.modmask | self.numlockMask, True, eventmask, grabmode, xcffib.xproto.GrabMode.Async, ) self.root.grab_button( i.button_code, i.modmask | self.numlockMask | xcbq.ModMasks["lock"], True, eventmask, grabmode, xcffib.xproto.GrabMode.Async, ) def grabKeys(self): self.root.ungrab_key(None, None) for key in self.keyMap.values(): self.mapKey(key) def get_target_chain(self, ename, e): """ Returns a chain of targets that can handle this event. The event will be passed to each target in turn for handling, until one of the handlers returns False or the end of the chain is reached. """ chain = [] handler = "handle_%s" % ename # Certain events expose the affected window id as an "event" attribute. eventEvents = [ "EnterNotify", "ButtonPress", "ButtonRelease", "KeyPress", ] c = None if hasattr(e, "window"): c = self.windowMap.get(e.window) elif hasattr(e, "drawable"): c = self.windowMap.get(e.drawable) elif ename in eventEvents: c = self.windowMap.get(e.event) if c and hasattr(c, handler): chain.append(getattr(c, handler)) if hasattr(self, handler): chain.append(getattr(self, handler)) if not chain: logger.info("Unknown event: %r" % ename) return chain def _xpoll(self): while True: try: e = self.conn.conn.poll_for_event() if not e: break ename = e.__class__.__name__ if ename.endswith("Event"): ename = ename[:-5] if e.__class__ not in self.ignoreEvents: logger.debug(ename) for h in self.get_target_chain(ename, e): logger.info("Handling: %s" % ename) r = h(e) if not r: break # Catch some bad X exceptions. Since X is event based, race # conditions can occur almost anywhere in the code. For # example, if a window is created and then immediately # destroyed (before the event handler is evoked), when the # event handler tries to examine the window properties, it # will throw a WindowError exception. We can essentially # ignore it, since the window is already dead and we've got # another event in the queue notifying us to clean it up. except (WindowError, AccessError, DrawableError): pass except Exception as e: error_code = self.conn.conn.has_error() if error_code: error_string = xcbq.XCB_CONN_ERRORS[error_code] logger.exception("Shutting down due to X connection error %s (%s)" % (error_string, error_code)) self.stop() break logger.exception("Got an exception in poll loop") self.conn.flush() def stop(self): logger.info('Stopping eventloop') self._eventloop.stop() def loop(self): self.server.start() try: self._eventloop.run_forever() finally: self.finalize() def find_screen(self, x, y): """ Find a screen based on the x and y offset. """ result = [] for i in self.screens: if i.x <= x <= i.x + i.width and \ i.y <= y <= i.y + i.height: result.append(i) if len(result) == 1: return result[0] return None def find_closest_screen(self, x, y): """ If find_screen returns None, then this basically extends a screen vertically and horizontally and see if x,y lies in the band. Only works if it can find a SINGLE closest screen, else we revert to _find_closest_closest. Useful when dragging a window out of a screen onto another but having leftmost corner above viewport. """ normal = self.find_screen(x, y) if normal is not None: return normal x_match = [] y_match = [] for i in self.screens: if i.x <= x <= i.x + i.width: x_match.append(i) if i.y <= y <= i.y + i.height: y_match.append(i) if len(x_match) == 1: return x_match[0] if len(y_match) == 1: return y_match[0] return self._find_closest_closest(x, y, x_match + y_match) def _find_closest_closest(self, x, y, candidate_screens): """ if find_closest_screen can't determine one, we've got multiple screens, so figure out who is closer. We'll calculate using the square of the distance from the center of a screen. Note that this could return None if x, y is right/below all screens (shouldn't happen but we don't do anything about it here other than returning None) """ closest_distance = None closest_screen = None if not candidate_screens: # try all screens candidate_screens = self.screens # if left corner is below and right of screen # it can't really be a candidate candidate_screens = [ s for s in candidate_screens if x < s.x + s.width and y < s.y + s.height ] for s in candidate_screens: middle_x = s.x + s.width / 2 middle_y = s.y + s.height / 2 distance = (x - middle_x) ** 2 + (y - middle_y) ** 2 if closest_distance is None or distance < closest_distance: closest_distance = distance closest_screen = s return closest_screen def handle_SelectionNotify(self, e): if not getattr(e, "owner", None): return name = self.conn.atoms.get_name(e.selection) self.selection[name]["owner"] = e.owner self.selection[name]["selection"] = "" self.convert_selection(e.selection) hook.fire("selection_notify", name, self.selection[name]) def convert_selection(self, selection, _type="UTF8_STRING"): TYPE = self.conn.atoms[_type] self.conn.conn.core.ConvertSelection(self.selection_window.wid, selection, TYPE, selection, xcffib.CurrentTime) def handle_PropertyNotify(self, e): name = self.conn.atoms.get_name(e.atom) # it's the selection property if name in ("PRIMARY", "CLIPBOARD"): assert e.window == self.selection_window.wid prop = self.selection_window.get_property(e.atom, "UTF8_STRING") # If the selection property is None, it is unset, which means the # clipboard is empty. value = prop and prop.value.to_utf8() or six.u("") self.selection[name]["selection"] = value hook.fire("selection_change", name, self.selection[name]) def handle_EnterNotify(self, e): if e.event in self.windowMap: return True s = self.find_screen(e.root_x, e.root_y) if s: self.toScreen(s.index, warp=False) def handle_ClientMessage(self, event): atoms = self.conn.atoms opcode = event.type data = event.data # handle change of desktop if atoms["_NET_CURRENT_DESKTOP"] == opcode: index = data.data32[0] try: self.currentScreen.setGroup(self.groups[index]) except IndexError: logger.info("Invalid Desktop Index: %s" % index) def handle_KeyPress(self, e): keysym = self.conn.code_to_syms[e.detail][0] state = e.state if self.numlockMask: state = e.state | self.numlockMask k = self.keyMap.get((keysym, state & self.validMask)) if not k: logger.info("Ignoring unknown keysym: %s" % keysym) return for i in k.commands: if i.check(self): status, val = self.server.call( (i.selectors, i.name, i.args, i.kwargs) ) if status in (command.ERROR, command.EXCEPTION): logger.error("KB command error %s: %s" % (i.name, val)) else: return def cmd_focus_by_click(self, e): wnd = e.child or e.root # Additional option for config.py # Brings clicked window to front if self.config.bring_front_click: self.conn.conn.core.ConfigureWindow( wnd, xcffib.xproto.ConfigWindow.StackMode, [xcffib.xproto.StackMode.Above] ) if self.windowMap.get(wnd): self.currentGroup.focus(self.windowMap.get(wnd), False) self.windowMap.get(wnd).focus(False) self.conn.conn.core.AllowEvents(xcffib.xproto.Allow.ReplayPointer, e.time) self.conn.conn.flush() def handle_ButtonPress(self, e): button_code = e.detail state = e.state if self.numlockMask: state = e.state | self.numlockMask k = self.mouseMap.get(button_code) for m in k: if not m or m.modmask & self.validMask != state & self.validMask: logger.info("Ignoring unknown button: %s" % button_code) continue if isinstance(m, Click): for i in m.commands: if i.check(self): if m.focus == "before": self.cmd_focus_by_click(e) status, val = self.server.call( (i.selectors, i.name, i.args, i.kwargs)) if m.focus == "after": self.cmd_focus_by_click(e) if status in (command.ERROR, command.EXCEPTION): logger.error( "Mouse command error %s: %s" % (i.name, val) ) elif isinstance(m, Drag): x = e.event_x y = e.event_y if m.start: i = m.start if m.focus == "before": self.cmd_focus_by_click(e) status, val = self.server.call( (i.selectors, i.name, i.args, i.kwargs)) if status in (command.ERROR, command.EXCEPTION): logger.error( "Mouse command error %s: %s" % (i.name, val) ) continue else: val = (0, 0) if m.focus == "after": self.cmd_focus_by_click(e) self._drag = (x, y, val[0], val[1], m.commands) self.root.grab_pointer( True, xcbq.ButtonMotionMask | xcbq.AllButtonsMask | xcbq.ButtonReleaseMask, xcffib.xproto.GrabMode.Async, xcffib.xproto.GrabMode.Async, ) def handle_ButtonRelease(self, e): button_code = e.detail state = e.state & ~xcbq.AllButtonsMask if self.numlockMask: state = state | self.numlockMask k = self.mouseMap.get(button_code) for m in k: if not m: logger.info( "Ignoring unknown button release: %s" % button_code ) continue if isinstance(m, Drag): self._drag = None self.root.ungrab_pointer() def handle_MotionNotify(self, e): if self._drag is None: return ox, oy, rx, ry, cmd = self._drag dx = e.event_x - ox dy = e.event_y - oy if dx or dy: for i in cmd: if i.check(self): status, val = self.server.call(( i.selectors, i.name, i.args + (rx + dx, ry + dy, e.event_x, e.event_y), i.kwargs )) if status in (command.ERROR, command.EXCEPTION): logger.error( "Mouse command error %s: %s" % (i.name, val) ) def handle_ConfigureNotify(self, e): """ Handle xrandr events. """ screen = self.currentScreen if e.window == self.root.wid and \ e.width != screen.width and \ e.height != screen.height: screen.resize(0, 0, e.width, e.height) def handle_ConfigureRequest(self, e): # It's not managed, or not mapped, so we just obey it. cw = xcffib.xproto.ConfigWindow args = {} if e.value_mask & cw.X: args["x"] = max(e.x, 0) if e.value_mask & cw.Y: args["y"] = max(e.y, 0) if e.value_mask & cw.Height: args["height"] = max(e.height, 0) if e.value_mask & cw.Width: args["width"] = max(e.width, 0) if e.value_mask & cw.BorderWidth: args["borderwidth"] = max(e.border_width, 0) w = xcbq.Window(self.conn, e.window) w.configure(**args) def handle_MappingNotify(self, e): self.conn.refresh_keymap() if e.request == xcffib.xproto.Mapping.Keyboard: self.grabKeys() def handle_MapRequest(self, e): w = xcbq.Window(self.conn, e.window) c = self.manage(w) if c and (not c.group or not c.group.screen): return w.map() def handle_DestroyNotify(self, e): self.unmanage(e.window) def handle_UnmapNotify(self, e): if e.event != self.root.wid: c = self.windowMap.get(e.window) if c and getattr(c, "group", None): try: c.window.unmap() c.state = window.WithdrawnState except xcffib.xproto.WindowError: # This means that the window has probably been destroyed, # but we haven't yet seen the DestroyNotify (it is likely # next in the queue). So, we just let these errors pass # since the window is dead. pass self.unmanage(e.window) def handle_ScreenChangeNotify(self, e): hook.fire("screen_change", self, e) def toScreen(self, n, warp=True): """ Have Qtile move to screen and put focus there """ if n >= len(self.screens): return old = self.currentScreen self.currentScreen = self.screens[n] if old != self.currentScreen: hook.fire("current_screen_change") self.currentGroup.focus(self.currentWindow, warp) def moveToGroup(self, group): """ Create a group if it doesn't exist and move a windows there """ if self.currentWindow and group: self.addGroup(group) self.currentWindow.togroup(group) def _items(self, name): if name == "group": return True, list(self.groupMap.keys()) elif name == "layout": return True, list(range(len(self.currentGroup.layouts))) elif name == "widget": return False, list(self.widgetMap.keys()) elif name == "bar": return False, [x.position for x in self.currentScreen.gaps] elif name == "window": return True, self.listWID() elif name == "screen": return True, list(range(len(self.screens))) def _select(self, name, sel): if name == "group": if sel is None: return self.currentGroup else: return self.groupMap.get(sel) elif name == "layout": if sel is None: return self.currentGroup.layout else: return utils.lget(self.currentGroup.layouts, sel) elif name == "widget": return self.widgetMap.get(sel) elif name == "bar": return getattr(self.currentScreen, sel) elif name == "window": if sel is None: return self.currentWindow else: return self.clientFromWID(sel) elif name == "screen": if sel is None: return self.currentScreen else: return utils.lget(self.screens, sel) def listWID(self): return [i.window.wid for i in self.windowMap.values()] def clientFromWID(self, wid): for i in self.windowMap.values(): if i.window.wid == wid: return i return None def call_soon(self, func, *args): """ A wrapper for the event loop's call_soon which also flushes the X event queue to the server after func is called. """ def f(): func(*args) self.conn.flush() self._eventloop.call_soon(f) def call_soon_threadsafe(self, func, *args): """ Another event loop proxy, see `call_soon`. """ def f(): func(*args) self.conn.flush() self._eventloop.call_soon_threadsafe(f) def call_later(self, delay, func, *args): """ Another event loop proxy, see `call_soon`. """ def f(): func(*args) self.conn.flush() self._eventloop.call_later(delay, f) def run_in_executor(self, func, *args): """ A wrapper for running a function in the event loop's default executor. """ return self._eventloop.run_in_executor(None, func, *args) def cmd_debug(self): """Set log level to DEBUG""" logger.setLevel(logging.DEBUG) logger.debug('Switching to DEBUG threshold') def cmd_info(self): """Set log level to INFO""" logger.setLevel(logging.INFO) logger.info('Switching to INFO threshold') def cmd_warning(self): """Set log level to WARNING""" logger.setLevel(logging.WARNING) logger.warning('Switching to WARNING threshold') def cmd_error(self): """Set log level to ERROR""" logger.setLevel(logging.ERROR) logger.error('Switching to ERROR threshold') def cmd_critical(self): """Set log level to CRITICAL""" logger.setLevel(logging.CRITICAL) logger.critical('Switching to CRITICAL threshold') def cmd_pause(self): """Drops into pdb""" import pdb pdb.set_trace() def cmd_groups(self): """ Return a dictionary containing information for all groups. Example: groups() """ return dict((i.name, i.info()) for i in self.groups) def cmd_get_info(self): x = {} for i in self.groups: x[i.name] = i.info() return x def cmd_list_widgets(self): """ List of all addressible widget names. """ return list(self.widgetMap.keys()) def cmd_to_layout_index(self, index, group=None): """ Switch to the layout with the given index in self.layouts. :index Index of the layout in the list of layouts. :group Group name. If not specified, the current group is assumed. """ if group: group = self.groupMap.get(group) else: group = self.currentGroup group.toLayoutIndex(index) def cmd_next_layout(self, group=None): """ Switch to the next layout. :group Group name. If not specified, the current group is assumed. """ if group: group = self.groupMap.get(group) else: group = self.currentGroup group.nextLayout() def cmd_prev_layout(self, group=None): """ Switch to the prev layout. :group Group name. If not specified, the current group is assumed. """ if group: group = self.groupMap.get(group) else: group = self.currentGroup group.prevLayout() def cmd_screens(self): """ Return a list of dictionaries providing information on all screens. """ lst = [] for i in self.screens: lst.append(dict( index=i.index, group=i.group.name if i.group is not None else None, x=i.x, y=i.y, width=i.width, height=i.height, gaps=dict( top=i.top.geometry() if i.top else None, bottom=i.bottom.geometry() if i.bottom else None, left=i.left.geometry() if i.left else None, right=i.right.geometry() if i.right else None, ) )) return lst def cmd_simulate_keypress(self, modifiers, key): """ Simulates a keypress on the focused window. :modifiers A list of modifier specification strings. Modifiers can be one of "shift", "lock", "control" and "mod1" - "mod5". :key Key specification. Examples: simulate_keypress(["control", "mod2"], "k") """ # FIXME: This needs to be done with sendevent, once we have that fixed. keysym = xcbq.keysyms.get(key) if keysym is None: raise command.CommandError("Unknown key: %s" % key) keycode = self.conn.first_sym_to_code[keysym] class DummyEv(object): pass d = DummyEv() d.detail = keycode try: d.state = utils.translateMasks(modifiers) except KeyError as v: return v.args[0] self.handle_KeyPress(d) def cmd_execute(self, cmd, args): """ Executes the specified command, replacing the current process. """ self.stop() os.execv(cmd, args) def cmd_restart(self): """ Restart qtile using the execute command. """ argv = [sys.executable] + sys.argv if '--no-spawn' not in argv: argv.append('--no-spawn') buf = six.BytesIO() try: pickle.dump(QtileState(self), buf, protocol=0) except: logger.error("Unable to pickle qtile state") argv = [s for s in argv if not s.startswith('--with-state')] argv.append('--with-state=' + buf.getvalue().decode()) self.cmd_execute(sys.executable, argv) def cmd_spawn(self, cmd): """ Run cmd in a shell. cmd may be a string, which is parsed by shlex.split, or a list (similar to subprocess.Popen). Example: spawn("firefox") spawn(["xterm", "-T", "Temporary terminal"]) """ if isinstance(cmd, six.string_types): args = shlex.split(cmd) else: args = list(cmd) r, w = os.pipe() pid = os.fork() if pid < 0: os.close(r) os.close(w) return pid if pid == 0: os.close(r) # close qtile's stdin, stdout, stderr so the called process doesn't # pollute our xsession-errors. os.close(0) os.close(1) os.close(2) pid2 = os.fork() if pid2 == 0: os.close(w) # Open /dev/null as stdin, stdout, stderr try: fd = os.open(os.devnull, os.O_RDWR) except OSError: # This shouldn't happen, catch it just in case pass else: # For Python >=3.4, need to set file descriptor to inheritable try: os.set_inheritable(fd, True) except AttributeError: pass # Again, this shouldn't happen, but we should just check if fd > 0: os.dup2(fd, 0) os.dup2(fd, 1) os.dup2(fd, 2) try: os.execvp(args[0], args) except OSError as e: logger.error("failed spawn: \"{0}\"\n{1}".format(cmd, e)) os._exit(1) else: # Here it doesn't matter if fork failed or not, we just write # its return code and exit. os.write(w, str(pid2).encode()) os.close(w) # sys.exit raises SystemExit, which will then be caught by our # top level catchall and we'll end up with two qtiles; os._exit # actually calls exit. os._exit(0) else: os.close(w) os.waitpid(pid, 0) # 1024 bytes should be enough for any pid. :) pid = os.read(r, 1024) os.close(r) return int(pid) def cmd_status(self): """ Return "OK" if Qtile is running. """ return "OK" def cmd_sync(self): """ Sync the X display. Should only be used for development. """ self.conn.flush() def cmd_to_screen(self, n): """ Warp focus to screen n, where n is a 0-based screen number. Example: to_screen(0) """ return self.toScreen(n) def cmd_next_screen(self): """ Move to next screen """ return self.toScreen( (self.screens.index(self.currentScreen) + 1) % len(self.screens) ) def cmd_prev_screen(self): """ Move to the previous screen """ return self.toScreen( (self.screens.index(self.currentScreen) - 1) % len(self.screens) ) def cmd_windows(self): """ Return info for each client window. """ return [ i.info() for i in self.windowMap.values() if not isinstance(i, window.Internal) ] def cmd_internal_windows(self): """ Return info for each internal window (bars, for example). """ return [ i.info() for i in self.windowMap.values() if isinstance(i, window.Internal) ] def cmd_qtile_info(self): """ Returns a dictionary of info on the Qtile instance. """ return dict(socketname=self.fname) def cmd_shutdown(self): """ Quit Qtile. """ self.stop() def cmd_switch_groups(self, groupa, groupb): """ Switch position of groupa to groupb """ if groupa not in self.groupMap or groupb not in self.groupMap: return indexa = self.groups.index(self.groupMap[groupa]) indexb = self.groups.index(self.groupMap[groupb]) self.groups[indexa], self.groups[indexb] = \ self.groups[indexb], self.groups[indexa] hook.fire("setgroup") # update window _NET_WM_DESKTOP for group in (self.groups[indexa], self.groups[indexb]): for w in group.windows: w.group = group def find_window(self, wid): window = self.windowMap.get(wid) if window: if not window.group.screen: self.currentScreen.setGroup(window.group) window.group.focus(window, False) def cmd_findwindow(self, prompt="window", widget="prompt"): mb = self.widgetMap.get(widget) if not mb: logger.error("No widget named '%s' present." % widget) return mb.startInput( prompt, self.find_window, "window", strict_completer=True ) def cmd_next_urgent(self): try: nxt = [w for w in self.windowMap.values() if w.urgent][0] nxt.group.cmd_toscreen() nxt.group.focus(nxt) except IndexError: pass # no window had urgent set def cmd_togroup(self, prompt="group", widget="prompt"): """ Move current window to the selected group in a propmt widget prompt: Text with which to prompt user. widget: Name of the prompt widget (default: "prompt"). """ if not self.currentWindow: logger.warning("No window to move") return mb = self.widgetMap.get(widget) if not mb: logger.error("No widget named '%s' present." % widget) return mb.startInput(prompt, self.moveToGroup, "group", strict_completer=True) def cmd_switchgroup(self, prompt="group", widget="prompt"): def f(group): if group: try: self.groupMap[group].cmd_toscreen() except KeyError: logger.info("No group named '%s' present." % group) pass mb = self.widgetMap.get(widget) if not mb: logger.warning("No widget named '%s' present." % widget) return mb.startInput(prompt, f, "group", strict_completer=True) def cmd_spawncmd(self, prompt="spawn", widget="prompt", command="%s", complete="cmd"): """ Spawn a command using a prompt widget, with tab-completion. prompt: Text with which to prompt user (default: "spawn: "). widget: Name of the prompt widget (default: "prompt"). command: command template (default: "%s"). complete: Tab completion function (default: "cmd") """ def f(args): if args: self.cmd_spawn(command % args) try: mb = self.widgetMap[widget] mb.startInput(prompt, f, complete) except KeyError: logger.error("No widget named '%s' present." % widget) def cmd_qtilecmd(self, prompt="command", widget="prompt", messenger="xmessage"): """ Execute a Qtile command using the client syntax. Tab completeion aids navigation of the command tree. prompt: Text to display at the prompt (default: "command: "). widget: Name of the prompt widget (default: "prompt"). messenger: command to display output (default: "xmessage"). Set this to None to disable. """ def f(cmd): if cmd: # c here is used in eval() below c = command.CommandRoot(self) # noqa try: cmd_arg = str(cmd).split(' ') except AttributeError: return cmd_len = len(cmd_arg) if cmd_len == 0: logger.info('No command entered.') return try: result = eval('c.%s' % (cmd)) except ( command.CommandError, command.CommandException, AttributeError) as err: logger.error(err) result = None if result is not None: from pprint import pformat message = pformat(result) if messenger: self.cmd_spawn('%s "%s"' % (messenger, message)) logger.info(result) mb = self.widgetMap[widget] if not mb: logger.error("No widget named %s present." % widget) return mb.startInput(prompt, f, "qsh") def cmd_addgroup(self, group): return self.addGroup(group) def cmd_delgroup(self, group): return self.delGroup(group) def cmd_add_rule(self, match_args, rule_args, min_priorty=False): """ Add a dgroup rule, returns rule_id needed to remove it param: match_args (config.Match arguments) param: rule_args (config.Rule arguments) param: min_priorty if the rule is added with minimun prioriry(last) """ if not self.dgroups: logger.warning('No dgroups created') return match = Match(**match_args) rule = Rule(match, **rule_args) return self.dgroups.add_rule(rule, min_priorty) def cmd_remove_rule(self, rule_id): self.dgroups.remove_rule(rule_id) def cmd_run_external(self, full_path): def format_error(path, e): s = """Can't call "main" from "{path}"\n\t{err_name}: {err}""" return s.format(path=path, err_name=e.__class__.__name__, err=e) module_name = os.path.splitext(os.path.basename(full_path))[0] dir_path = os.path.dirname(full_path) err_str = "" local_stdout = six.BytesIO() old_stdout = sys.stdout sys.stdout = local_stdout sys.exc_clear() try: module = _import_module(module_name, dir_path) module.main(self) except ImportError as e: err_str += format_error(full_path, e) except: (exc_type, exc_value, exc_traceback) = sys.exc_info() err_str += traceback.format_exc() err_str += format_error(full_path, exc_type(exc_value)) finally: sys.exc_clear() sys.stdout = old_stdout local_stdout.close() return local_stdout.getvalue() + err_str def cmd_hide_show_bar(self, position="all"): """ param: position one of: "top", "bottom", "left", "right" or "all" """ if position in ["top", "bottom", "left", "right"]: bar = getattr(self.currentScreen, position) if bar: bar.show(not bar.is_show()) self.currentGroup.layoutAll() else: logger.warning( "Not found bar in position '%s' for hide/show." % position) elif position == "all": screen = self.currentScreen is_show = None for bar in [screen.left, screen.right, screen.top, screen.bottom]: if bar: if is_show is None: is_show = not bar.is_show() bar.show(is_show) if is_show is not None: self.currentGroup.layoutAll() else: logger.warning("Not found bar for hide/show.") else: logger.error("Invalid position value:%s" % position) def cmd_get_state(self): buf = six.BytesIO() pickle.dump(QtileState(self), buf, protocol=0) state = buf.getvalue().decode() logger.info('State = ') logger.info(''.join(state.split('\n'))) return state def cmd_tracemalloc_toggle(self): if not tracemalloc.is_tracing(): tracemalloc.start() else: tracemalloc.stop() def cmd_tracemalloc_dump(self): if not tracemalloc: logger.warning('No tracemalloc module') raise command.CommandError("No tracemalloc module") if not tracemalloc.is_tracing(): return [False, "Trace not started"] cache_directory = get_cache_dir() malloc_dump = os.path.join(cache_directory, "qtile_tracemalloc.dump") tracemalloc.take_snapshot().dump(malloc_dump) return [True, malloc_dump]
himaaaatti/qtile
libqtile/manager.py
Python
mit
59,989
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"> <title>One Graph</title> <style type="text/css"> body { font-family: sans-serif; font-size: 13px; /*font: 13px sans-serif;*/ } body, html { width : 100%; height : 95%; padding: 0; margin : 0; } /*rect {*/ /* fill: #fff;*/ /*}*/ ul { list-style-type: none; margin: 0.3em 0em 0.3em 0em; width: 100%; } ul li { display: table-cell; vertical-align: middle; margin: 0em; padding: 0em .5em; } .grid { font-size: 1.0em; } .grid-num-x { } .grid-num-y { } .title { } .xlabel { } .ylabel { } .chart { background-color: #FFFFFF; width: 100%; height: 100%; } .chartfull { width: 100%; height: 100%; } .chartpart { width: 100%; height: 62%; } .chartquart { width: 50%; height: 50%; display: inline-block; } .graph-background { fill: #EEEEEE; } .grid-line { stroke: #CCCCCC; } .points { stroke-width: 5px; } .points-f { fill: #0000FF; stroke: #0000FF; } .points-r { fill: #FF3300; stroke: #FF3300; } .scaf-highlight { /*stroke-width: 10px;*/ } .scaf-square { fill: #00FF00; stroke: #00FF00; opacity: 0.4; stroke-width: 10px; /*z-index: -1;*/ } .close-icon, .download-icon, .padlock-icon, .compass-g { opacity: 0.2; } .close-icon:hover, .download-icon:hover, .padlock-icon:hover, .compass-g:hover { opacity: 1.0; } /* circle { fill: none; stroke: steelblue; stroke-width: 5px; } circle { fill: white; fill-opacity: 0.2; cursor: move; } circle.selected { fill: #ff7f0e; stroke: #ff7f0e; } circle:hover { fill: #ff7f0e; stroke: #707f0e; } circle.selected:hover { fill: #ff7f0e; stroke: #ff7f0e; } */ .download { background: #333333; color: #FFFFFF; font-weight: 900; border: 2px solid #B10000; padding: 4px; margin: 4px; } .padlock-icon-red { fill: #FF3300; } .padlock-icon-white { fill: #FFFFFF; } .compass{ fill: #FFFFFF; stroke: #000000; stroke-width: 1.5; } .compass-button{ fill: #225EA8; stroke: #0C2C84; stroke-miterlimit: 6; stroke-linecap: round; } .compass-button:hover{ stroke-width: 2; } .compass-plus-minus{ fill: #FFFFFF; pointer-events: none; } .compass-opaque { opacity: .2; } </style> <style> .htmlDiv { position: fixed !important; right: 0; top: 0; float: right; background: #999999; color: #FFFFFF; text-align: right; white-space: nowrap; overflow: hidden; transition: 0.5s; -webkit-transition: 0.5s; width: 3.0em; height: 1.5em; } .htmlDiv:hover { display: block; width: 65em; height: 100%; overflow: scroll !important; z-index: 101; } .htmlDivTitle { height: 1.5em; } .labelB { text-align: right; z-index: 100; } .setupField { text-align: left; z-index: 100; } .setupEl{ z-index: 100; } .labelA { text-align: left; z-index: 100; } #tipper { fill : #0000FF; font-size: 0.8em; color: #FFFFFF; position: fixed !important; right: 0; top: 2em; float: right; background: #ddd; text-align: right; overflow: hidden; white-space: nowrap; background-color: rgba(0,0,255,0.7); } .setuptable, .setuptable tr { vertical-align: top; } .selectDiv { height: 1.5em; overflow: hidden; color: blue; position: absolute; /*display: block;*/ /*float: inherit;*/ /*float: left;*/ /*z-index: 1000;*/ } .selectDiv:hover { height: auto; color: black; background: lightgrey; } </style> <!--<link rel="stylesheet" type="text/css" href="css/tipsy.css" />--> </head> <body onload="start()"> <script type="text/javascript" src="js/d3.v3.3.9.js"></script> <script type="text/javascript" src="js/parseUri.js"></script> <script type="text/javascript" src="js/base64.js"></script> <script type="text/javascript" src="js/RawDeflate.js"></script> <script type="text/javascript" src="js/public_smo_scripts.js"></script> <script type="text/javascript" src="js/simple-graph.js"></script> <!--<script type="text/javascript" src="js/jquery-2.0.3.min.js"></script>--> <!--<script type="text/javascript" src="js/jquery.tipsy.js"></script>--> <script type="text/javascript" src="data/list.js"></script> <!--list has to be loaded before setup--> <!--<script type="text/javascript" src="data/data.js"></script>--> <!--list has to be loaded before setup--> <script type="text/javascript" src="js/menus.js"></script> <script type="text/javascript" src="js/setup.js"></script> <!--<script type="text/javascript" src="js/setup2.js"></script>--> <script type="text/javascript"> var datafolder = 'data/'; /* * Folder where the databases resides */ var chartName = 'chart1'; /* * Div where to draw graphs */ var scriptHolder = 'scriptholder'; var _prog_domain = 'webmummer'; var localDb = new LocalStorageDb( _prog_domain, _db_domain ); webmummer_debug = true; </script> <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','http://www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-5291039-8', 'alvesnet.net'); ga('send', 'pageview'); </script> <div id="scriptholder"></div> </body> </html>
sauloal/webmummer
index.html
HTML
mit
7,143
<div class="row"> <small class="text-muted"> Página {!! $personas->currentPage() !!} de {!! $personas->lastPage() !!} / Mostrando desde el {!! $paginate_data['items_desde'] !!}° al {!! $paginate_data['items_hasta'] !!}° elemento de un total de {!! $personas->total() !!} </small> </div> <table class="table table-striped table-condensed"> <thead> <tr> <th>#</th> <th>Nombre y Apellido</th> <th>Domicilio</th> <th>Acción</th> </tr> </thead> <tbody> @foreach ($personas as $persona) <tr> <td>{{ $persona->id }}</td> <td>{{ $persona->full_name }}</td> <td>{{ $persona->domicilio->full_name }}</td> <td> <div class="btn-group"> <!-- <a href="#"> <span class="glyphicon glyphicon-danger glyphicon-pencil"></span> </a> --> <a href="{{ route( 'people.personas.show', $persona ) }}" class="btn btn-default btn-xs">Ver</a> <a href="{{ route( 'people.personas.edit', $persona ) }}" class="btn btn-default btn-xs">Editar</a> <a href="#" class="btn btn-danger btn-xs">Eliminar</a> </div> </td> </tr> @endforeach </tbody> </table> {!! $personas->appends($request->all())->render(); !!}
aabcehmt/fe
resources/views/admin/people/personas/partials/table.blade.php
PHP
mit
1,181
Cantor Ribbon jQuery plugin =========================== A "Cantor Ribbon" is a horizontal ribbon that extends off the screen infinitely in both directions. The user can interact with the ribbon either by click-and-drag on the ribbon or by clicking on the desired element. (Touch support will come soon). The caller provides a generator function which simply returns a single jQuery element for a given index (which can range from -infinity to +infinity, with 0 being initially centered in the ribbon). The ribbon positions the elements along the ribbon and expands vertically to fit the tallest element. For example usage, see example-simple.html.
tomyedwab/jquery.cantor-ribbon
README.md
Markdown
mit
651
require_relative 'boot' require "rails" # Pick the frameworks you want: require "active_model/railtie" require "active_job/railtie" require "active_record/railtie" require "action_controller/railtie" require "action_mailer/railtie" require "action_view/railtie" require "action_cable/engine" # require "sprockets/railtie" require "rails/test_unit/railtie" # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. Bundler.require(*Rails.groups) module Api class Application < Rails::Application # Settings in config/environments/* take precedence over those specified here. # Application configuration should go into files in config/initializers # -- all .rb files in that directory are automatically loaded. # Only loads a smaller set of middleware suitable for API only apps. # Middleware like session, flash, cookies can be added back manually. # Skip views, helpers and assets when generating a new resource. config.api_only = true end end
ejedigitalcr/people-lookup-cr
config/application.rb
Ruby
mit
1,036
<?php namespace Adap\MainBundle\Entity; use Doctrine\ORM\Mapping as ORM; // Importation des composants de validation use Symfony\Component\Validator\Constraints as Assert; /** * Comment * * @ORM\Table() * @ORM\Entity(repositoryClass="Adap\MainBundle\Entity\CommentRepository") */ class Comment { /** * @var integer * * @ORM\Column(name="id", type="integer") * @ORM\Id * @ORM\GeneratedValue(strategy="AUTO") */ private $id; /** * @var \DateTime * * @ORM\Column(name="date", type="datetime") */ private $date; /** * @var string * * @ORM\Column(name="auteur", type="string", length=255) */ private $auteur; /** * @var string * * @ORM\Column(name="content", type="text") */ private $content; /** * @ORM\ManyToOne(targetEntity="Picture", inversedBy="comments", cascade={"persist"}) * @ORM\JoinColumn(nullable=false) * @Assert\Valid() */ private $picture; /** * Get id * * @return integer */ public function getId() { return $this->id; } /** * Set date * * @param \DateTime $date * @return Comment */ public function setDate($date) { $this->date = $date; return $this; } /** * Get date * * @return \DateTime */ public function getDate() { return $this->date; } /** * Set auteur * * @param string $auteur * @return Comment */ public function setAuteur($auteur) { $this->auteur = $auteur; return $this; } /** * Get auteur * * @return string */ public function getAuteur() { return $this->auteur; } /** * Set content * * @param string $content * @return Comment */ public function setContent($content) { $this->content = $content; return $this; } /** * Get content * * @return string */ public function getContent() { return $this->content; } /** * Set picture * * @param \Adap\MainBundle\Entity\Picture $picture * @return Comment */ public function setPicture(\Adap\MainBundle\Entity\Picture $picture) { $this->picture = $picture; return $this; } /** * Get picture * * @return \Adap\MainBundle\Entity\Picture */ public function getPicture() { return $this->picture; } }
blupgnup/adap
NZpics/src/Adap/MainBundle/Entity/Comment.php
PHP
mit
2,590
# Aggregates, Events, Repositories This use case demonstrates how to capture state changes in events and then replaying that state from the database. This is done by first introducing some supporting infrastructure, then implementing a model of invoice, together with invoice lines, on top of that. ## Scenario To model, capture and replay the state of an object through events, some infrastructure is established to dispatch events to their respective handlers. This is demonstrated in the `AggregateBase` class below - it serves as the basis for objects whose state is to be modeled. <<< @/../src/Marten.Testing/Events/ScenarioAggregateAndRepository.cs#sample_scenario-aggregate-base With the first piece of infrastructure implemented, two events to capture state changes of an invoice are introduced. Namely, creation of an invoice, accompanied by an invoice number, and addition of lines to an invoice: <<< @/../src/Marten.Testing/Events/ScenarioAggregateAndRepository.cs#sample_scenario-aggregate-events With the events in place to present the deltas of an invoice, an aggregate is implemented, using the infrastructure presented above, to create and replay state from the described events. <<< @/../src/Marten.Testing/Events/ScenarioAggregateAndRepository.cs#sample_scenario-aggregate-invoice The implemented invoice protects its state by not exposing mutable data, while enforcing its contracts through argument validation. Once an applicable state modification is introduced, either through the constructor (which numbers our invoice and captures that in an event) or the `Invoice.AddLine` method, a respective event capturing that data is recorded. Lastly, to persist the deltas described above and to replay the state of an object from such persisted data, a repository is implemented. The said repository pushes the deltas of an object to event stream, indexed by the ID of the object. <<< @/../src/Marten.Testing/Events/ScenarioAggregateAndRepository.cs#sample_scenario-aggregate-repository With the last infrastructure component in place, versioned invoices can now be created, persisted and hydrated through Marten. For this purpose, first an invoice is created: <<< @/../src/Marten.Testing/Events/ScenarioAggregateAndRepository.cs#sample_scenario-aggregate-createinvoice Then, with an instantiated & configured Document Store (in this case with string as event stream identity) a repository is bootstrapped. The newly created invoice is then passed to the repository, which pushes the deltas to the database and clears them from the to-be-committed list of changes. Once persisted, the invoice data is replayed from the database and verified to match the data of the original item. <<< @/../src/Marten.Testing/Events/ScenarioAggregateAndRepository.cs#sample_scenario-aggregate-storeandreadinvoice With this infrastructure in place and the ability to model change as events, it is also possible to replay back any previous state of the object. For example, it is possible to see what the invoice looked with only the first line added: <<< @/../src/Marten.Testing/Events/ScenarioAggregateAndRepository.cs#sample_scenario-aggregate-versionedload Lastly, to prevent our invoice from getting into a conflited state, the version attribute of the item is used to assert that the state of the object has not changed between replaying its state and introducing new deltas: <<< @/../src/Marten.Testing/Events/ScenarioAggregateAndRepository.cs#sample_scenario-aggregate-conflict
JasperFx/Marten
docs/guide/scenarios/aggregates-events-repositories.md
Markdown
mit
3,502
<?xml version="1.0" encoding="ascii"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>ansible.galaxy.role</title> <link rel="stylesheet" href="epydoc.css" type="text/css" /> <script type="text/javascript" src="epydoc.js"></script> </head> <body bgcolor="white" text="black" link="blue" vlink="#204080" alink="#204080"> <!-- ==================== NAVIGATION BAR ==================== --> <table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0"> <tr valign="middle"> <!-- Home link --> <th>&nbsp;&nbsp;&nbsp;<a href="ansible-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th> <!-- Tree link --> <th>&nbsp;&nbsp;&nbsp;<a href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th> <!-- Index link --> <th>&nbsp;&nbsp;&nbsp;<a href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th> <!-- Help link --> <th>&nbsp;&nbsp;&nbsp;<a href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th> <!-- Project homepage --> <th class="navbar" align="right" width="100%"> <table border="0" cellpadding="0" cellspacing="0"> <tr><th class="navbar" align="center" >ansible</th> </tr></table></th> </tr> </table> <table width="100%" cellpadding="0" cellspacing="0"> <tr valign="top"> <td width="100%"> <span class="breadcrumbs"> <a href="ansible-module.html">Package&nbsp;ansible</a> :: <a href="ansible.galaxy-module.html">Package&nbsp;galaxy</a> :: Module&nbsp;role </span> </td> <td> <table cellpadding="0" cellspacing="0"> <!-- hide/show private --> <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink" onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr> <tr><td align="right"><span class="options" >[<a href="frames.html" target="_top">frames</a >]&nbsp;|&nbsp;<a href="ansible.galaxy.role-module.html" target="_top">no&nbsp;frames</a>]</span></td></tr> </table> </td> </tr> </table> <!-- ==================== MODULE DESCRIPTION ==================== --> <h1 class="epydoc">Module role</h1><p class="nomargin-top"><span class="codelink"><a href="ansible.galaxy.role-pysrc.html">source&nbsp;code</a></span></p> <!-- ==================== CLASSES ==================== --> <a name="section-Classes"></a> <table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr bgcolor="#70b0f0" class="table-header"> <td colspan="2" class="table-header"> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr valign="top"> <td align="left"><span class="table-header">Classes</span></td> <td align="right" valign="top" ><span class="options">[<a href="#section-Classes" class="privatelink" onclick="toggle_private();" >hide private</a>]</span></td> </tr> </table> </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type">&nbsp;</span> </td><td class="summary"> <a href="ansible.galaxy.role.GalaxyRole-class.html" class="summary-name">GalaxyRole</a> </td> </tr> </table> <!-- ==================== VARIABLES ==================== --> <a name="section-Variables"></a> <table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white"> <tr bgcolor="#70b0f0" class="table-header"> <td colspan="2" class="table-header"> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr valign="top"> <td align="left"><span class="table-header">Variables</span></td> <td align="right" valign="top" ><span class="options">[<a href="#section-Variables" class="privatelink" onclick="toggle_private();" >hide private</a>]</span></td> </tr> </table> </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type">&nbsp;</span> </td><td class="summary"> <a name="display"></a><span class="summary-name">display</span> = <code title="Display()">Display()</code> </td> </tr> <tr> <td width="15%" align="right" valign="top" class="summary"> <span class="summary-type">&nbsp;</span> </td><td class="summary"> <a name="__package__"></a><span class="summary-name">__package__</span> = <code title="None">None</code><br /> hash(x) </td> </tr> </table> <p class="indent-wrapped-lines"><b>Imports:</b> <a href="type-class.html" title="type">__metaclass__</a>, <span title="datetime">datetime</span>, <span title="os">os</span>, <span title="tarfile">tarfile</span>, <span title="tempfile">tempfile</span>, <span title="yaml">yaml</span>, <span title="distutils.version.LooseVersion">LooseVersion</span>, <span title="shutil.rmtree">rmtree</span>, <a href="ansible.constants-module.html" title="ansible.constants">C</a>, <a href="ansible.errors.AnsibleError-class.html" title="ansible.errors.AnsibleError">AnsibleError</a>, <a href="ansible.module_utils.urls-module.html#open_url" title="ansible.module_utils.urls.open_url">open_url</a>, <a href="ansible.playbook.role.requirement.RoleRequirement-class.html" title="ansible.playbook.role.requirement.RoleRequirement">RoleRequirement</a>, <a href="ansible.galaxy.api.GalaxyAPI-class.html" title="ansible.galaxy.api.GalaxyAPI">GalaxyAPI</a>, <a href="ansible.utils.display.Display-class.html" title="ansible.utils.display.Display">Display</a> </p><br /> <!-- ==================== NAVIGATION BAR ==================== --> <table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0"> <tr valign="middle"> <!-- Home link --> <th>&nbsp;&nbsp;&nbsp;<a href="ansible-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th> <!-- Tree link --> <th>&nbsp;&nbsp;&nbsp;<a href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th> <!-- Index link --> <th>&nbsp;&nbsp;&nbsp;<a href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th> <!-- Help link --> <th>&nbsp;&nbsp;&nbsp;<a href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th> <!-- Project homepage --> <th class="navbar" align="right" width="100%"> <table border="0" cellpadding="0" cellspacing="0"> <tr><th class="navbar" align="center" >ansible</th> </tr></table></th> </tr> </table> <table border="0" cellpadding="0" cellspacing="0" width="100%%"> <tr> <td align="left" class="footer"> Generated by Epydoc 3.0.1 on Fri Jul 29 13:11:37 2016 </td> <td align="right" class="footer"> <a target="mainFrame" href="http://epydoc.sourceforge.net" >http://epydoc.sourceforge.net</a> </td> </tr> </table> <script type="text/javascript"> <!-- // Private objects are initially displayed (because if // javascript is turned off then we want them to be // visible); but by default, we want to hide them. So hide // them unless we have a cookie that says to show them. checkCookie(); // --> </script> </body> </html>
alikins/alikins.github.io
epydoc/ansible.galaxy.role-module.html
HTML
mit
7,378
{% extends './../frame.html' %} {% block content %} {% if int(contest_data['id']) != 0 %} <h1>Edit Contest.{{contest_data['id']}}</h1> {% else %} <h1>New Contest</h1> {% end %} <form class="form" id="contest_content" method={% if contest_data['id'] != 0 %}"put"{% else %}"post"{% end %} action={% if contest_data['id'] != 0 %}"/api/groups/{{current_group}}/contests/{{contest_data['id']}}/"{% else %}"/api/groups/{{current_group}}/contests/"{% end %} > <input type="hidden" name="token" value="{{account['token']}}"> <div class="row"> <div class="col-md-3 form-group"> <label class="control-label">Name</label> <input class="form-control" type="text" name="title" value="{{contest_data['title']}}"> </div> <div class="col-md-3 form-group"> <div> <label class="control-label">Visible</label> </div> <select class="select" name="visible" data-width="100%"> {% for x in map_visible %} <option value={{x}}>{{map_visible[x]}}</option> {% end %} </select> </div> <div class="col-md-3 form-group"> <label class="control-label">Type</label> <select class="select" name="type" data-width="100%"> {% for x in map_visible %} <option value={{x}}>{{map_visible[x]}}</option> {% end %} </select> </div> </div> <div class="row margin-bottom"> <div class="col-md-6"> <div class="form-group"> <label class="control-label">Register</label> <div class="input-group" > <input type="text" class="datetimepicker form-control" name="register_start" value="{{contest_data['register_start']}}"> <div class="input-group-addon">to</div> <input type="text" class="datetimepicker form-control" name="register_end" value="{{contest_data['register_end']}}"> </div> </div> </div> <div class="col-md-6"> <div class="form-group"> <label class="control-label">Contest</label> <div class="input-group" > <input type="text" class="datetimepicker form-control" name="start" value="{{contest_data['start']}}"> <div class="input-group-addon">to</div> <input type="text" class="datetimepicker form-control" name="end" value="{{contest_data['end']}}"> </div> </div> </div> <div class="col-md-6"> <div class="form-group"> <label class="control-label">Freeze(How many minutes will scoreboard stop update before contest end)</label> <input type="number" class="form-control" name="freeze" value="{{contest_data['freeze']}}" placeholder="freeze the scoreboard X minutes before the end(it won't effect if freeze time error)"> </div> </div> </div> <div class="row"> <div class="col-md-12"> <div class="panel panel-default"> <div class="panel-heading"> Description </div> <div class="panel-body edit"> <textarea class="form-control" rows=10 name="description">{{contest_data['description']}}</textarea> </div> </div> </div> </div> <button type="submit" class="btn btn-success">Submit</button> </form> <hr> {% if int(contest_data['id']) != 0 %} <form class="form" id="contest_problem" method="put" action="/api/groups/{{current_group}}/contests/{{contest_data['id']}}/problems/" > <input type="hidden" name="token" value="{{account['token']}}"> <div class="row"> <div class="col-md-12"> <h2>Problem</h2> <div onclick="$('tbody:not(.template)').append($('.contest.problem.template').html());" class="btn btn-default margin-bottom">New</div> <div class="panel panel-default"> <table class="table table-hover table-striped table-condensed"> <thead> <th class="text-center">#</th> <th class="text-center">Score</th> <th class="text-center">Delete</th> </thead> <tbody> {% for id, x in enumerate(contest_data['problem']) %} <tr> <td class="col-xs-2"><input name="problems[]" type="number" class="form-control" value="{{x['id']}}"></td> <td class="col-xs-8"><input name="scores[]" class="form-control" value="{{x['score']}}"></td> <td class="col-xs-2"><a class="btn btn-danger btn-block" onclick="$(this).parent().parent().remove();">Delete</a></td> </tr> {% end %} </tbody> </table> </div> <button type="submit" class="btn btn-success">Submit</button> </div> </div> </form> <table class="hidden"> <tbody class="template contest problem"> <tr> <td class="col-xs-2"><input name="problems[]" type="number" class="form-control"></td> <td class="col-xs-8"><input name="scores[]" class="form-control"></td> <td class="col-xs-2"><a class="btn btn-danger btn-block" onclick="$(this).parent().parent().remove();">Delete</a></td> </tr> </tbody> </table> <script> require(["jquery", "bootbox", "bootstrap-select", "bootstrap-datetimepicker"], function($, bootbox){ $("#contest_problem").submit(function(){ form = $(this); $.ajax({ url: form.attr("action"), type: form.attr("method"), data: form.serialize(), dataType: "json", success: function(msg){ bootbox.alert("Updated!", function(){ location.href = location.href; }); }, error: function(event){ msg = JSON.parse(event.responseText); bootbox.alert(msg['msg'], function(){ location.href = location.href; }); } }); return false; }); }); </script> {% end %} <script> require(["jquery", "bootbox", "bootstrap-select", "bootstrap-datetimepicker"], function($, bootbox){ $(".select").selectpicker(); $("[name=visible]").selectpicker('val', {{contest_data["visible"]}}); $('.datetimepicker').datetimepicker({ format: 'YYYY-MM-DD HH:mm:ss' }); $("#contest_content").submit(function(){ form = $(this); $.ajax({ url: form.attr("action"), type: form.attr("method"), data: form.serialize(), dataType: "json", success: function(msg){ location.href = "/groups/{{current_group}}/contests/" + msg['msg'] + "/"; }, error: function(event){ msg = JSON.parse(event.responseText); bootbox.alert(msg['msg']); } }); return false; }); }); </script> {% end %}
Tocknicsu/nctuoj
backend/web/template/contests/contest_edit.html
HTML
mit
7,558
// Entry point for the notebook bundle containing custom model definitions. // // Setup notebook base URL // // Some static assets may be required by the custom widget javascript. The base // url for the notebook is not known at build time and is therefore computed // dynamically. __webpack_public_path__ = document.querySelector('body').getAttribute('data-base-url') + 'nbextensions/jupyter-canvas/'; // Export widget models and views, and the npm package version number. module.exports = require('./jupyter-canvas.js'); module.exports['version'] = require('../package.json').version;
Who8MyLunch/Jupyter_Canvas_Widget
js/lib/index.js
JavaScript
mit
588
/** * SFALogLevel NS_OPTIONS with NSUInteger values. */ typedef NS_OPTIONS (NSUInteger, SFALogLevel) { /** * Option value for log level None. */ SFALogLevelNone = 0x0, /** * Option value for log level Trace. */ SFALogLevelTrace = 0x1, /** * Option value for log level Debug. */ SFALogLevelDebug = 0x2, /** * Option value for log level Info. */ SFALogLevelInfo = 0x4, /** * Option value for log level Warn. */ SFALogLevelWarn = 0x8, /** * Option value for log level Error. */ SFALogLevelError = 0x10, /** * Option value for log level Fatal. */ SFALogLevelFatal = 0x20 };
citrix/ShareFile-ObjectiveC
ShareFileSDK/ShareFileSDK/Logging/SFALogLevel.h
C
mit
698
# # lastilePro.py # # (c) 2013, martin isenburg - http://rapidlasso.com # rapidlasso GmbH - fast tools to catch reality # # uses lastile.exe to compute a tiling for a folder # worth of LiDAR files with a user-specified tile # size (and an optional buffer) # # LiDAR input: LAS/LAZ/BIN/TXT/SHP/BIL/ASC/DTM # LiDAR output: LAS/LAZ/BIN/TXT # # for licensing see http://lastools.org/LICENSE.txt # import sys, os, arcgisscripting, subprocess def check_output(command,console): if console == True: process = subprocess.Popen(command) else: process = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True) output,error = process.communicate() returncode = process.poll() return returncode,output ### create the geoprocessor object gp = arcgisscripting.create(9.3) ### report that something is happening gp.AddMessage("Starting lastile production ...") ### get number of arguments argc = len(sys.argv) ### report arguments (for debug) #gp.AddMessage("Arguments:") #for i in range(0, argc): # gp.AddMessage("[" + str(i) + "]" + sys.argv[i]) ### get the path to LAStools lastools_path = os.path.dirname(os.path.dirname(os.path.dirname(sys.argv[0]))) ### make sure the path does not contain spaces if lastools_path.count(" ") > 0: gp.AddMessage("Error. Path to .\\lastools installation contains spaces.") gp.AddMessage("This does not work: " + lastools_path) gp.AddMessage("This would work: C:\\software\\lastools") sys.exit(1) ### complete the path to where the LAStools executables are lastools_path = lastools_path + "\\bin" ### check if path exists if os.path.exists(lastools_path) == False: gp.AddMessage("Cannot find .\\lastools\\bin at " + lastools_path) sys.exit(1) else: gp.AddMessage("Found " + lastools_path + " ...") ### create the full path to the lastile executable lastile_path = lastools_path+"\\lastile.exe" ### check if executable exists if os.path.exists(lastools_path) == False: gp.AddMessage("Cannot find lastile.exe at " + lastile_path) sys.exit(1) else: gp.AddMessage("Found " + lastile_path + " ...") ### create the command string for lastile.exe command = ['"'+lastile_path+'"'] ### maybe use '-verbose' option if sys.argv[argc-1] == "true": command.append("-v") ### counting up the arguments c = 1 ### add input LiDAR wildcards = sys.argv[c+1].split() for wildcard in wildcards: command.append("-i") command.append('"' + sys.argv[c] + "\\" + wildcard + '"') c = c + 2 ### maybe the input files are flightlines if sys.argv[c] == "true": command.append("-files_are_flightlines") c = c + 1 ### maybe use a user-defined tile size if sys.argv[c] != "1000": command.append("-tile_size") command.append(sys.argv[c].replace(",",".")) c = c + 1 ### maybe create a buffer around the tiles if sys.argv[c] != "0": command.append("-buffer") command.append(sys.argv[c].replace(",",".")) c = c + 1 ### maybe the output will be over 2000 tiles if sys.argv[c] == "true": command.append("-extra_pass") c = c + 1 ### maybe an output format was selected if sys.argv[c] != "#": if sys.argv[c] == "las": command.append("-olas") elif sys.argv[c] == "laz": command.append("-olaz") elif sys.argv[c] == "bin": command.append("-obin") elif sys.argv[c] == "txt": command.append("-otxt") elif sys.argv[c] == "xyzi": command.append("-otxt") command.append("-oparse") command.append("xyzi") elif sys.argv[c] == "txyzi": command.append("-otxt") command.append("-oparse") command.append("txyzi") c = c + 1 ### maybe an output file name was selected if sys.argv[c] != "#": command.append("-o") command.append('"'+sys.argv[c]+'"') c = c + 1 ### maybe an output directory was selected if sys.argv[c] != "#": command.append("-odir") command.append('"'+sys.argv[c]+'"') c = c + 1 ### maybe there are additional input options if sys.argv[c] != "#": additional_options = sys.argv[c].split() for option in additional_options: command.append(option) ### report command string gp.AddMessage("LAStools command line:") command_length = len(command) command_string = str(command[0]) command[0] = command[0].strip('"') for i in range(1, command_length): command_string = command_string + " " + str(command[i]) command[i] = command[i].strip('"') gp.AddMessage(command_string) ### run command returncode,output = check_output(command, False) ### report output of lastile gp.AddMessage(str(output)) ### check return code if returncode != 0: gp.AddMessage("Error. lastile failed.") sys.exit(1) ### report happy end gp.AddMessage("Success. lastile done.")
strummerTFIU/TFG-IsometricMaps
LAStools/ArcGIS_toolbox/scripts_production/lastilePro.py
Python
mit
4,971
"use strict"; module.exports = { home: require("./home") };
jubianchi/jsimple
example/src/application/controllers/index.js
JavaScript
mit
65
/** * Portions Copyright 2001 Sun Microsystems, Inc. * Portions Copyright 1999-2001 Language Technologies Institute, * Carnegie Mellon University. * All Rights Reserved. Use is subject to license terms. * * See the file "license.terms" for information on usage and * redistribution of this file, and for a DISCLAIMER OF ALL * WARRANTIES. */ package com.sun.speech.freetts; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.net.URL; import java.util.HashMap; import java.util.Map; import java.util.NoSuchElementException; import java.util.StringTokenizer; /** * Implementation of a <code>PhoneSet</code> that reads the info from * a file. The format of the file is as follows: * * <pre> * phone feature value * phone feature value * phone feature value * ... * </pre> * * Where <code>phone</code> is the phone name, <code>feature</code> is * the phone feature such as "vc," "vlng," "vheight," and so on, and * "value" is the value of the feature. There can be multiple lines * for the same phone to describe various features of that phone. */ public class PhoneSetImpl implements PhoneSet { /** * Used for informational purposes if there's a bad line in the * file. */ private int lineCount = 0; /** * The set of phone features indexed by phone. */ private Map phonesetMap; /** * Create a new <code>PhoneSetImpl</code> by reading from the * given URL. * * @param url the input source * * @throws IOException if an error occurs */ public PhoneSetImpl(URL url) throws IOException { BufferedReader reader; String line; phonesetMap = new HashMap(); reader = new BufferedReader(new InputStreamReader(url.openStream())); line = reader.readLine(); lineCount++; while (line != null) { if (!line.startsWith("***")) { parseAndAdd(line); } line = reader.readLine(); } reader.close(); } /** * Creates a word from the given input line and add it to the map. * * @param line the input line */ private void parseAndAdd(String line) { StringTokenizer tokenizer = new StringTokenizer(line," "); try { String phoneme = tokenizer.nextToken(); String feature = tokenizer.nextToken(); String value = tokenizer.nextToken(); phonesetMap.put(getKey(phoneme, feature), value); } catch (NoSuchElementException nse) { throw new Error("part of speech data in bad format at line " + lineCount); } } /** * Given a phoneme and a feature, returns the key that * will obtain the value. * * @param phoneme the phoneme * @param feature the name of the feature * * @return the key used to obtain the value */ private String getKey(String phoneme, String feature) { return phoneme + feature; } /** * Given a phoneme and a feature name, returns the feature. * * @param phone the phoneme of interest * @param featureName the name of the feature of interest * * @return the feature with the given name */ public String getPhoneFeature(String phone, String featureName) { return (String) phonesetMap.get(getKey(phone, featureName)); } }
edwardtoday/PolyU_MScST
COMP5517/JavaSpeech/freetts-1.2.2-src/freetts-1.2.2/com/sun/speech/freetts/PhoneSetImpl.java
Java
mit
3,319
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>disel: Not compatible 👼</title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / released</a></li> <li class="active"><a href="">8.13.2 / disel - 2.2</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> disel <small> 2.2 <span class="label label-info">Not compatible 👼</span> </small> </h1> <p>📅 <em><script>document.write(moment("2022-02-02 00:56:38 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-02-02 00:56:38 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-threads base base-unix base conf-findutils 1 Virtual package relying on findutils conf-gmp 4 Virtual package relying on a GMP lib system installation coq 8.13.2 Formal proof management system num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic ocaml 4.10.2 The OCaml compiler (virtual package) ocaml-base-compiler 4.10.2 Official release 4.10.2 ocaml-config 1 OCaml Switch Configuration ocamlfind 1.9.3 A library manager for OCaml zarith 1.12 Implements arithmetic and logical operations over arbitrary-precision integers # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;palmskog@gmail.com&quot; homepage: &quot;https://github.com/DistributedComponents/disel&quot; dev-repo: &quot;git+https://github.com/DistributedComponents/disel.git&quot; bug-reports: &quot;https://github.com/DistributedComponents/disel/issues&quot; license: &quot;BSD-2-Clause&quot; synopsis: &quot;Core framework files for Disel, a separation-style logic for compositional verification of distributed systems in Coq&quot; description: &quot;&quot;&quot; Disel is a framework for implementation and compositional verification of distributed systems and their clients in Coq. In Disel, users implement distributed systems using a domain specific language shallowly embedded in Coq which provides both high-level programming constructs as well as low-level communication primitives. Components of composite systems are specified in Disel as protocols, which capture system-specific logic and disentangle system definitions from implementation details. &quot;&quot;&quot; build: [make &quot;-j%{jobs}%&quot; &quot;-C&quot; &quot;Core&quot;] install: [make &quot;-C&quot; &quot;Core&quot; &quot;install&quot;] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.7&quot; &amp; &lt; &quot;8.13~&quot;} &quot;coq-mathcomp-ssreflect&quot; {&gt;= &quot;1.9.0&quot; &amp; &lt; &quot;1.12~&quot;} &quot;coq-fcsl-pcm&quot; {&lt; &quot;1.3.0&quot;} ] tags: [ &quot;category:Computer Science/Concurrent Systems and Protocols/Theory of concurrent systems&quot; &quot;keyword:program verification&quot; &quot;keyword:separation logic&quot; &quot;keyword:distributed algorithms&quot; &quot;logpath:DiSeL&quot; &quot;date:2020-07-26&quot; ] authors: [ &quot;Ilya Sergey&quot; &quot;James R. Wilcox&quot; ] url { src: &quot;https://github.com/DistributedComponents/disel/archive/v2.2.tar.gz&quot; checksum: &quot;sha512=52ede64ded6f54ec60220095d5315a1862a4eae067cdeeb418c5902167b2b8387a8e0de076811493808a55988b1753c1cf1c1c33e146d1279461fe056d4817a7&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install 🏜️</h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action coq-disel.2.2 coq.8.13.2</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.13.2). The following dependencies couldn&#39;t be met: - coq-disel -&gt; coq &lt; 8.13~ -&gt; ocaml &lt; 4.10 base of this switch (use `--unlock-base&#39; to force) Your request can&#39;t be satisfied: - No available version of coq satisfies the constraints No solution found, exiting </pre></dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-disel.2.2</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Install 🚀</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Installation size</h2> <p>No files were installed.</p> <h2>Uninstall 🧹</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> Sources are on <a href="https://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣 </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
coq-bench/coq-bench.github.io
clean/Linux-x86_64-4.10.2-2.0.6/released/8.13.2/disel/2.2.html
HTML
mit
7,846
describe('inventory routes', () => { var expect = chai.expect; describe('state', () => { var view = 'inventory/inventory.html'; beforeEach(function () { angular.mock.module('app.inventory'); bard.inject(this, '$rootScope', '$state', '$templateCache'); $templateCache.put(view, ''); }); bard.verifyNoOutstandingHttpRequests(); it('should map state inventory to url /inventory ', () => { console.log("inventory should map state inventory to url"); expect($state.href('inventory', {})).to.equal('/inventory'); }); it('should map /inventory route to inventory View template', () => { console.log("inventory should map /inventory route to inventory View template"); expect($state.get('inventory').views['@'].templateUrl).to.equal(view); }); it('should work with $state.go', () => { console.log("inventory should work with $state.go"); $state.go('inventory'); $rootScope.$apply(); expect($state.is('inventory')); }); it('should have title "inventory" ', () => { console.log('inventory should have title "inventory"'); $state.go('inventory'); $rootScope.$apply(); expect($state.current.data.pageTitle).to.equal('Inventory'); }); }); });
tonyeung/angular-typescript-seed
src/app/inventory/inventory.route.tests.js
JavaScript
mit
1,292
--- title: Benchmarking layout: "default" nav_order: 2 --- # Benchmarking Benchmarking is used to compare the performance of multiple different implementations of the same logic. Benchmarking compares multiple [Profilingsessions](profiling). ```csharp var sha256 = SHA256.Create(); var md5 = MD5.Create(); var data = new byte[10000]; new Random(42).NextBytes(data); var runner = new BenchmarkRunner(); runner.SetIterations(10); runner.Task("sha256", () => sha256.ComputeHash(data)); runner.Task("Md5", () => md5.ComputeHash(data)); var result = runner.RunSessions(); result.Trace(); ``` ### Resulting MarkDown ``` ### MeasureMap Benchmark Iterations: 10 #### Summary | Name | Avg Time | Avg Ticks | Total | Fastest | Slowest | Memory Increase | |------- |----------------: |---------: |----------------: |-------: |-------: |---------------: | | sha256 | 00:00:00.0000924 | 924 | 00:00:00.0009243 | 776 | 1471 | 1392 | | Md5 | 00:00:00.0000485 | 485 | 00:00:00.0004858 | 409 | 534 | 1392 | ``` Instead of only adding a Task, it is possible to add complete ProfilerSessions. This way it is possible to define all the properties that a ProfilerSession posesses. ```csharp var sha256 = SHA256.Create(); var md5 = MD5.Create(); var data = new byte[10000]; new Random(42).NextBytes(data); var runner = new BenchmarkRunner(); runner.SetIterations(10); runner.AddSession("sha256", ProfilerSession.StartSession() .Task(() => sha256.ComputeHash(data)) .SetThreads(5) ); runner.AddSession("Md5", ProfilerSession.StartSession() .Task(() => Md5.ComputeHash(data)) .SetThreads(5) ); var result = runner.RunSessions(); result.Trace(); ``` The iterations should be defined in the runner scope. Elese the number of iteration defined on the first ProfilerSession is used
WickedFlame/MeasureMap
docs/benchmarking.md
Markdown
mit
1,879
<?php namespace BlogBundle\EventListener\EntityListener; use BlogBundle\Event\EventInterface\BlogBundleEventInterface; /** * Interface EntityCreateEventListenerInterface * @package BlogBundle\Event\EventListener\EntityListener */ interface EntityCreateEventListenerInterface { /** * @param BlogBundleEventInterface $event */ public function onEntityCreate(BlogBundleEventInterface $event); }
myrkox/symfony-blog-api
application/src/BlogBundle/EventListener/EntityListener/EntityCreateEventListenerInterface.php
PHP
mit
415
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Coq bench</title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../../..">Unstable</a></li> <li><a href=".">8.4.dev / contrib:high-school-geometry dev</a></li> <li class="active"><a href="">2015-01-07 03:53:32</a></li> </ul> <ul class="nav navbar-nav navbar-right"> <li><a href="../../../../../about.html">About</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href=".">« Up</a> <h1> contrib:high-school-geometry <small> dev <span class="label label-info">Not compatible with this Coq</span> </small> </h1> <p><em><script>document.write(moment("2015-01-07 03:53:32 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2015-01-07 03:53:32 UTC)</em><p> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>ruby lint.rb unstable ../unstable/packages/coq:contrib:high-school-geometry/coq:contrib:high-school-geometry.dev</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> <dt>Output</dt> <dd><pre>The package is valid. </pre></dd> </dl> <h2>Dry install</h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --dry-run coq:contrib:high-school-geometry.dev coq.8.4.dev</code></dd> <dt>Return code</dt> <dd>768</dd> <dt>Duration</dt> <dd>0 s</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.4.dev). The following dependencies couldn&#39;t be met: - coq:contrib:high-school-geometry -&gt; coq &gt;= dev Your request can&#39;t be satisfied: - Conflicting version constraints for coq No solution found, exiting </pre></dd> </dl> <p>Dry install without Coq, to test if the problem was incompatibility with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq; opam install -y --dry-run coq:contrib:high-school-geometry.dev</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>3 s</dd> <dt>Output</dt> <dd><pre>The following actions will be performed: - remove coq.8.4.dev === 1 to remove === =-=- Removing Packages =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Removing coq.8.4.dev. [WARNING] Directory /home/bench/.opam/system/lib/coq is not empty, not removing [WARNING] Directory /home/bench/.opam/system/share/coq is not empty, not removing The following actions will be performed: - install coq.hott [required by coq:contrib:high-school-geometry] - install coq:contrib:high-school-geometry.dev === 2 to install === =-=- Synchronizing package archives -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= =-=- Installing packages =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Building coq.hott: ./configure -configdir /home/bench/.opam/system/lib/coq/config -mandir /home/bench/.opam/system/man -docdir /home/bench/.opam/system/doc -prefix /home/bench/.opam/system -usecamlp5 -camlp5dir /home/bench/.opam/system/lib/camlp5 -coqide no make -j4 make install Installing coq.hott. Building coq:contrib:high-school-geometry.dev: coq_makefile -f Make -o Makefile make -j4 make install Installing coq:contrib:high-school-geometry.dev. </pre></dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Install</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Installation size</h2> <p>No files were installed.</p> <h2>Uninstall</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> <small>Sources are on <a href="https://github.com/coq-bench">GitHub</a>. © Guillaume Claret.</small> </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
coq-bench/coq-bench.github.io-old
clean/Linux-x86_64-4.01.0-1.2.0/unstable/8.4.dev/contrib:high-school-geometry/dev/2015-01-07_03-53-32.html
HTML
mit
7,055
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> <title>1.1. comp neuro</title> <link rel="stylesheet" href="../../_static/css/index.73d71520a4ca3b99cfee5594769eaaae.css"> <link rel="stylesheet" href="../../_static/vendor/fontawesome/5.13.0/css/all.min.css"> <link rel="preload" as="font" type="font/woff2" crossorigin href="../../_static/vendor/fontawesome/5.13.0/webfonts/fa-solid-900.woff2"> <link rel="preload" as="font" type="font/woff2" crossorigin href="../../_static/vendor/fontawesome/5.13.0/webfonts/fa-brands-400.woff2"> <link rel="stylesheet" href="../../_static/vendor/open-sans_all/1.44.1/index.css"> <link rel="stylesheet" href="../../_static/vendor/lato_latin-ext/1.44.1/index.css"> <link rel="stylesheet" href="../../_static/sphinx-book-theme.40e2e510f6b7d1648584402491bb10fe.css" type="text/css" /> <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" /> <link rel="stylesheet" type="text/css" href="../../_static/togglebutton.css" /> <link rel="stylesheet" type="text/css" href="../../_static/copybutton.css" /> <link rel="stylesheet" type="text/css" href="../../_static/mystnb.css" /> <link rel="stylesheet" type="text/css" href="../../_static/sphinx-thebe.css" /> <link rel="stylesheet" type="text/css" href="../../_static/panels-main.c949a650a448cc0ae9fd3441c0e17fb0.css" /> <link rel="stylesheet" type="text/css" href="../../_static/panels-variables.06eb56fa6e07937060861dad626602ad.css" /> <link rel="preload" as="script" href="../../_static/js/index.3da636dd464baa7582d2.js"> <script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script> <script type="text/javascript" src="../../_static/jquery.js"></script> <script type="text/javascript" src="../../_static/underscore.js"></script> <script type="text/javascript" src="../../_static/doctools.js"></script> <script type="text/javascript" src="../../_static/language_data.js"></script> <script type="text/javascript" src="../../_static/togglebutton.js"></script> <script type="text/javascript" src="../../_static/clipboard.min.js"></script> <script type="text/javascript" src="../../_static/copybutton.js"></script> <script type="text/javascript">var togglebuttonSelector = '.toggle, .admonition.dropdown, .tag_hide_input div.cell_input, .tag_hide-input div.cell_input, .tag_hide_output div.cell_output, .tag_hide-output div.cell_output, .tag_hide_cell.cell, .tag_hide-cell.cell';</script> <script type="text/javascript" src="../../_static/sphinx-book-theme.d31b09fe5c1d09cb49b26a786de4a05d.js"></script> <script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script> <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"inlineMath": [["\\(", "\\)"]], "displayMath": [["\\[", "\\]"]], "processRefs": false, "processEnvironments": false}})</script> <script async="async" type="text/javascript" src="https://unpkg.com/thebelab@latest/lib/index.js"></script> <script type="text/javascript"> const thebe_selector = ".thebe" const thebe_selector_input = "pre" const thebe_selector_output = ".output" </script> <script async="async" type="text/javascript" src="../../_static/sphinx-thebe.js"></script> <link rel="index" title="Index" href="../../genindex.html" /> <link rel="search" title="Search" href="../../search.html" /> <link rel="next" title="1.2. transfer learning" href="ovw_transfer_learning.html" /> <link rel="prev" title="1. research_ovws" href="research_ovws.html" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="docsearch:language" content="en" /> </head> <body data-spy="scroll" data-target="#bd-toc-nav" data-offset="80"> <div class="container-xl"> <div class="row"> <div class="col-12 col-md-3 bd-sidebar site-navigation show" id="site-navigation"> <div class="navbar-brand-box"> <a class="navbar-brand text-wrap" href="../../index.html"> <img src="../../_static/logo.png" class="logo" alt="logo"> </a> </div><form class="bd-search d-flex align-items-center" action="../../search.html" method="get"> <i class="icon fas fa-search"></i> <input type="search" class="form-control" name="q" id="search-input" placeholder="Search this book..." aria-label="Search this book..." autocomplete="off" > </form> <nav class="bd-links" id="bd-docs-nav" aria-label="Main navigation"> <ul class="nav sidenav_l1"> <li class="toctree-l1"> <a class="reference internal" href="../../intro.html"> overview 👋 </a> </li> </ul> <ul class="current nav sidenav_l1"> <li class="toctree-l1 current active collapsible-parent"> <a class="reference internal" href="research_ovws.html"> 1. research_ovws </a> <ul class="current collapse-ul"> <li class="toctree-l2 current active"> <a class="current reference internal" href="#"> 1.1. comp neuro </a> </li> <li class="toctree-l2"> <a class="reference internal" href="ovw_transfer_learning.html"> 1.2. transfer learning </a> </li> <li class="toctree-l2"> <a class="reference internal" href="ovw_disentanglement.html"> 1.3. disentanglement </a> </li> <li class="toctree-l2"> <a class="reference internal" href="ovw_omics.html"> 1.4. omics </a> </li> <li class="toctree-l2"> <a class="reference internal" href="ovw_complexity.html"> 1.5. complexity </a> </li> <li class="toctree-l2"> <a class="reference internal" href="ovw_interesting_science.html"> 1.6. interesting science </a> </li> <li class="toctree-l2"> <a class="reference internal" href="ovw_dl_theory.html"> 1.7. dl theory </a> </li> <li class="toctree-l2"> <a class="reference internal" href="ovw_scat.html"> 1.8. scattering transform </a> </li> <li class="toctree-l2"> <a class="reference internal" href="ovw_ml_medicine.html"> 1.9. ml in medicine </a> </li> <li class="toctree-l2"> <a class="reference internal" href="ovw_causal_inference.html"> 1.10. causal inference </a> </li> <li class="toctree-l2"> <a class="reference internal" href="ovw_dl_for_neuro.html"> 1.11. dl for neuro </a> </li> <li class="toctree-l2"> <a class="reference internal" href="ovw_uncertainty.html"> 1.12. uncertainty </a> </li> <li class="toctree-l2"> <a class="reference internal" href="ovw_interp.html"> 1.13. interpretability </a> </li> <li class="toctree-l2"> <a class="reference internal" href="ovw_generalization.html"> 1.14. generalization </a> </li> </ul> <i class="fas fa-chevron-down"> </i> </li> <li class="toctree-l1 collapsible-parent"> <a class="reference internal" href="../cs/cs.html"> 2. cs </a> <ul class="collapse-ul"> <li class="toctree-l2"> <a class="reference internal" href="../cs/retrieval.html"> 2.1. info retrieval </a> </li> <li class="toctree-l2"> <a class="reference internal" href="../cs/data_structures.html"> 2.2. data structures </a> </li> <li class="toctree-l2"> <a class="reference internal" href="../cs/languages.html"> 2.3. languages </a> </li> <li class="toctree-l2"> <a class="reference internal" href="../cs/software.html"> 2.4. software engineering </a> </li> <li class="toctree-l2"> <a class="reference internal" href="../cs/quantum.html"> 2.5. quantum </a> </li> <li class="toctree-l2"> <a class="reference internal" href="../cs/algo.html"> 2.6. algorithms </a> </li> <li class="toctree-l2"> <a class="reference internal" href="../cs/graphs.html"> 2.7. graphs </a> </li> <li class="toctree-l2"> <a class="reference internal" href="../cs/databases.html"> 2.8. overview </a> </li> <li class="toctree-l2"> <a class="reference internal" href="../cs/databases.html#sql"> 2.9. sql </a> </li> <li class="toctree-l2"> <a class="reference internal" href="../cs/os.html"> 2.10. os </a> </li> <li class="toctree-l2"> <a class="reference internal" href="../cs/arch.html"> 2.11. architecture </a> </li> <li class="toctree-l2"> <a class="reference internal" href="../cs/reproducibility.html"> 2.12. reproducibility </a> </li> <li class="toctree-l2"> <a class="reference internal" href="../cs/comp_theory.html"> 2.13. cs theory </a> </li> </ul> <i class="fas fa-chevron-down"> </i> </li> <li class="toctree-l1 collapsible-parent"> <a class="reference internal" href="../math/math.html"> 3. math </a> <ul class="collapse-ul"> <li class="toctree-l2"> <a class="reference internal" href="../math/differential_equations.html"> 3.1. differential equations </a> </li> <li class="toctree-l2"> <a class="reference internal" href="../math/proofs.html"> 3.2. proofs </a> </li> <li class="toctree-l2"> <a class="reference internal" href="../math/analysis.html"> 3.3. real analysis </a> </li> <li class="toctree-l2"> <a class="reference internal" href="../math/linear_algebra.html"> 3.4. linear algebra </a> </li> <li class="toctree-l2"> <a class="reference internal" href="../math/signals.html"> 3.5. signals </a> </li> <li class="toctree-l2"> <a class="reference internal" href="../math/optimization.html"> 3.6. optimization </a> </li> <li class="toctree-l2"> <a class="reference internal" href="../math/calculus.html"> 3.7. calculus </a> </li> <li class="toctree-l2"> <a class="reference internal" href="../math/chaos.html"> 3.8. chaos </a> </li> <li class="toctree-l2"> <a class="reference internal" href="../math/math_basics.html"> 3.9. math basics </a> </li> </ul> <i class="fas fa-chevron-down"> </i> </li> <li class="toctree-l1 collapsible-parent"> <a class="reference internal" href="../stat/stat.html"> 4. stat </a> <ul class="collapse-ul"> <li class="toctree-l2"> <a class="reference internal" href="../stat/graphical_models.html"> 4.1. graphical models </a> </li> <li class="toctree-l2"> <a class="reference internal" href="../stat/data_analysis.html"> 4.2. data analysis </a> </li> <li class="toctree-l2"> <a class="reference internal" href="../stat/testing.html"> 4.3. testing </a> </li> <li class="toctree-l2"> <a class="reference internal" href="../stat/causal_inference.html"> 4.4. causal inference </a> </li> <li class="toctree-l2"> <a class="reference internal" href="../stat/info_theory.html"> 4.5. info theory </a> </li> <li class="toctree-l2"> <a class="reference internal" href="../stat/linear_models.html"> 4.6. linear models </a> </li> <li class="toctree-l2"> <a class="reference internal" href="../stat/time_series.html"> 4.7. time series </a> </li> <li class="toctree-l2"> <a class="reference internal" href="../stat/game_theory.html"> 4.8. game theory </a> </li> </ul> <i class="fas fa-chevron-down"> </i> </li> <li class="toctree-l1 collapsible-parent"> <a class="reference internal" href="../ml/ml.html"> 5. ml </a> <ul class="collapse-ul"> <li class="toctree-l2"> <a class="reference internal" href="../ml/kernels.html"> 5.1. kernels </a> </li> <li class="toctree-l2"> <a class="reference internal" href="../ml/nlp.html"> 5.2. nlp </a> </li> <li class="toctree-l2"> <a class="reference internal" href="../ml/comp_vision.html"> 5.3. computer vision </a> </li> <li class="toctree-l2"> <a class="reference internal" href="../ml/structure_ml.html"> 5.4. structure learning </a> </li> <li class="toctree-l2"> <a class="reference internal" href="../ml/classification.html"> 5.5. classification </a> </li> <li class="toctree-l2"> <a class="reference internal" href="../ml/unsupervised.html"> 5.6. unsupervised </a> </li> <li class="toctree-l2"> <a class="reference internal" href="../ml/deep_learning.html"> 5.7. deep learning </a> </li> <li class="toctree-l2"> <a class="reference internal" href="../ml/feature_selection.html"> 5.8. feature selection </a> </li> <li class="toctree-l2"> <a class="reference internal" href="../ml/learning_theory.html"> 5.9. learning theory </a> </li> <li class="toctree-l2"> <a class="reference internal" href="../ml/evaluation.html"> 5.10. evaluation </a> </li> </ul> <i class="fas fa-chevron-down"> </i> </li> <li class="toctree-l1 collapsible-parent"> <a class="reference internal" href="../ai/ai.html"> 6. ai </a> <ul class="collapse-ul"> <li class="toctree-l2"> <a class="reference internal" href="../ai/search.html"> 6.1. search </a> </li> <li class="toctree-l2"> <a class="reference internal" href="../ai/decisions_rl.html"> 6.2. decisions, rl </a> </li> <li class="toctree-l2"> <a class="reference internal" href="../ai/fairness_sts.html"> 6.3. fairness, sts </a> </li> <li class="toctree-l2"> <a class="reference internal" href="../ai/cogsci.html"> 6.4. cogsci </a> </li> <li class="toctree-l2"> <a class="reference internal" href="../ai/ai_futures.html"> 6.5. ai futures </a> </li> <li class="toctree-l2"> <a class="reference internal" href="../ai/logic.html"> 6.6. logic </a> </li> <li class="toctree-l2"> <a class="reference internal" href="../ai/philosophy.html"> 6.7. philosophy </a> </li> <li class="toctree-l2"> <a class="reference internal" href="../ai/psychology.html"> 6.8. psychology </a> </li> <li class="toctree-l2"> <a class="reference internal" href="../ai/knowledge_rep.html"> 6.9. representations </a> </li> </ul> <i class="fas fa-chevron-down"> </i> </li> <li class="toctree-l1 collapsible-parent"> <a class="reference internal" href="../neuro/neuro.html"> 7. neuro </a> <ul class="collapse-ul"> <li class="toctree-l2"> <a class="reference internal" href="../neuro/disease.html"> 7.1. disease </a> </li> <li class="toctree-l2"> <a class="reference internal" href="../neuro/brain_basics.html"> 7.2. brain basics </a> </li> <li class="toctree-l2"> <a class="reference internal" href="../neuro/vissci.html"> 7.3. vision </a> </li> <li class="toctree-l2"> <a class="reference internal" href="../neuro/comp_neuro.html"> 7.4. comp neuro </a> </li> <li class="toctree-l2"> <a class="reference internal" href="../neuro/sensory_input.html"> 7.5. sensory input </a> </li> <li class="toctree-l2"> <a class="reference internal" href="../neuro/memory.html"> 7.6. memory </a> </li> <li class="toctree-l2"> <a class="reference internal" href="../neuro/motor.html"> 7.7. motor system </a> </li> <li class="toctree-l2"> <a class="reference internal" href="../neuro/development.html"> 7.8. development </a> </li> </ul> <i class="fas fa-chevron-down"> </i> </li> </ul> </nav> <!-- To handle the deprecated key --> <div class="navbar_extra_footer"> Powered by <a href="https://jupyterbook.org">Jupyter Book</a> </div> </div> <main class="col py-md-3 pl-md-4 bd-content overflow-auto" role="main"> <div class="row topbar fixed-top container-xl"> <div class="col-12 col-md-3 bd-topbar-whitespace site-navigation show"> </div> <div class="col pl-2 topbar-main"> <button id="navbar-toggler" class="navbar-toggler ml-0" type="button" data-toggle="collapse" data-toggle="tooltip" data-placement="bottom" data-target=".site-navigation" aria-controls="navbar-menu" aria-expanded="true" aria-label="Toggle navigation" aria-controls="site-navigation" title="Toggle navigation" data-toggle="tooltip" data-placement="left"> <i class="fas fa-bars"></i> <i class="fas fa-arrow-left"></i> <i class="fas fa-arrow-up"></i> </button> <div class="dropdown-buttons-trigger"> <button id="dropdown-buttons-trigger" class="btn btn-secondary topbarbtn" aria-label="Download this page"><i class="fas fa-download"></i></button> <div class="dropdown-buttons"> <!-- ipynb file if we had a myst markdown file --> <!-- Download raw file --> <a class="dropdown-buttons" href="../../_sources/notes/research_ovws/ovw_comp_neuro.md"><button type="button" class="btn btn-secondary topbarbtn" title="Download source file" data-toggle="tooltip" data-placement="left">.md</button></a> <!-- Download PDF via print --> <button type="button" id="download-print" class="btn btn-secondary topbarbtn" title="Print to PDF" onClick="window.print()" data-toggle="tooltip" data-placement="left">.pdf</button> </div> </div> <!-- Source interaction buttons --> <div class="dropdown-buttons-trigger"> <button id="dropdown-buttons-trigger" class="btn btn-secondary topbarbtn" aria-label="Connect with source repository"><i class="fab fa-github"></i></button> <div class="dropdown-buttons sourcebuttons"> <a class="repository-button" href="https://github.com/csinva/csinva.github.io"><button type="button" class="btn btn-secondary topbarbtn" data-toggle="tooltip" data-placement="left" title="Source repository"><i class="fab fa-github"></i>repository</button></a> </div> </div> <!-- Full screen (wrap in <a> to have style consistency --> <a class="full-screen-button"><button type="button" class="btn btn-secondary topbarbtn" data-toggle="tooltip" data-placement="bottom" onclick="toggleFullScreen()" aria-label="Fullscreen mode" title="Fullscreen mode"><i class="fas fa-expand"></i></button></a> <!-- Launch buttons --> </div> <!-- Table of contents --> <div class="d-none d-md-block col-md-2 bd-toc show"> <div class="tocsection onthispage pt-5 pb-3"> <i class="fas fa-list"></i> Contents </div> <nav id="bd-toc-nav"> <ul class="nav section-nav flex-column"> <li class="toc-h2 nav-item toc-entry"> <a class="reference internal nav-link" href="#navigation"> 1.1.1. navigation </a> </li> <li class="toc-h2 nav-item toc-entry"> <a class="reference internal nav-link" href="#high-dimensional-computing"> 1.1.2. high-dimensional computing </a> <ul class="nav section-nav flex-column"> <li class="toc-h3 nav-item toc-entry"> <a class="reference internal nav-link" href="#definitions"> 1.1.2.1. definitions </a> </li> <li class="toc-h3 nav-item toc-entry"> <a class="reference internal nav-link" href="#ex-identify-the-language"> 1.1.2.2. ex. identify the language </a> </li> <li class="toc-h3 nav-item toc-entry"> <a class="reference internal nav-link" href="#details"> 1.1.2.3. details </a> </li> <li class="toc-h3 nav-item toc-entry"> <a class="reference internal nav-link" href="#papers"> 1.1.2.4. papers </a> </li> </ul> </li> <li class="toc-h2 nav-item toc-entry"> <a class="reference internal nav-link" href="#dnns-with-memory"> 1.1.3. dnns with memory </a> </li> <li class="toc-h2 nav-item toc-entry"> <a class="reference internal nav-link" href="#visual-sampling"> 1.1.4. visual sampling </a> </li> <li class="toc-h2 nav-item toc-entry"> <a class="reference internal nav-link" href="#dynamic-routing-between-capsules"> 1.1.5. dynamic routing between capsules </a> </li> <li class="toc-h2 nav-item toc-entry"> <a class="reference internal nav-link" href="#hierarchical-temporal-memory-htm"> 1.1.6. hierarchical temporal memory (htm) </a> <ul class="nav section-nav flex-column"> <li class="toc-h3 nav-item toc-entry"> <a class="reference internal nav-link" href="#necortical-structure"> 1.1.6.1. necortical structure </a> </li> <li class="toc-h3 nav-item toc-entry"> <a class="reference internal nav-link" href="#principles"> 1.1.6.2. principles </a> </li> <li class="toc-h3 nav-item toc-entry"> <a class="reference internal nav-link" href="#id1"> 1.1.6.3. papers </a> </li> </ul> </li> <li class="toc-h2 nav-item toc-entry"> <a class="reference internal nav-link" href="#forgetting"> 1.1.7. forgetting </a> </li> <li class="toc-h2 nav-item toc-entry"> <a class="reference internal nav-link" href="#deeptune-style"> 1.1.8. deeptune-style </a> </li> <li class="toc-h2 nav-item toc-entry"> <a class="reference internal nav-link" href="#population-coding"> 1.1.9. population coding </a> </li> <li class="toc-h2 nav-item toc-entry"> <a class="reference internal nav-link" href="#interesting-misc-papers"> 1.1.10. interesting misc papers </a> </li> </ul> </nav> </div> </div> <div id="main-content" class="row"> <div class="col-12 col-md-9 pl-md-3 pr-md-0"> <div> <div class="section" id="comp-neuro"> <h1>1.1. comp neuro<a class="headerlink" href="#comp-neuro" title="Permalink to this headline">¶</a></h1> <div class="section" id="navigation"> <h2>1.1.1. navigation<a class="headerlink" href="#navigation" title="Permalink to this headline">¶</a></h2> <ul class="simple"> <li><p>cognitive maps (tolman 1940s) - idea that rats in mazes learn spatial maps</p></li> <li><p><strong>place cells</strong> (o’keefe 1971) - in the hippocampus - fire to indicate one’s current location</p></li> <li><p>remap to new locations</p></li> <li><p><strong>grid cells</strong> (moser &amp; moser 2005) - in the entorhinal cotex (provides inputs to the hippocampus) - not particular locations but rather hexagonal coordinate system</p></li> <li><p>grid cells fire if the mouse is in any location at the vertex (or center) of one of the hexagons</p></li> <li><p><img alt="Screen Shot 2019-05-10 at 1.25.02 PM" src="../../_images/mouse.png" /></p></li> <li><p>there are grid cells with larger/smaller hexagons, different orientations, different offsets</p></li> <li><p>can look for grid cells signature in fmri: https://www.nature.com/articles/nature08704</p></li> <li><p>other places with grid cell-like behavior</p></li> <li><p>eye movement task</p></li> <li><p>some evidence for “time cells” like place cells for time</p></li> <li><p>sound frequency task https://www.nature.com/articles/nature21692</p></li> <li><p>2d “bird space” <a class="reference external" href="https://science.sciencemag.org/content/352/6292/1464.full?ijkey=sXaWNaNjkIcik&amp;keytype=ref&amp;siteid=sci">task</a></p></li> </ul> </div> <div class="section" id="high-dimensional-computing"> <h2>1.1.2. high-dimensional computing<a class="headerlink" href="#high-dimensional-computing" title="Permalink to this headline">¶</a></h2> <ul class="simple"> <li><p>high-level overview</p> <ul> <li><p>current inspiration has all come from single neurons at a time - hd computing is going past this</p></li> <li><p>the brain’s circuits are high-dimensional</p></li> <li><p>elements are stochastic not deterministic</p></li> <li><p>can learn from experience</p></li> <li><p>no 2 brains are alike yet they exhibit the same behavior</p></li> </ul> </li> <li><p>basic question of comp neuro: what kind of computing can explain behavior produced by spike trains?</p> <ul> <li><p>recognizing ppl by how they look, sound, or behave</p></li> <li><p>learning from examples</p></li> <li><p>remembering things going back to childhood</p></li> <li><p>communicating with language</p></li> </ul> </li> <li><p><a class="reference external" href="https://link.springer.com/content/pdf/10.1007/s12559-009-9009-8.pdf">HD computing overview paper</a></p> <ul> <li><p>in these high dimensions, most points are close to equidistant from one another (L1 distance), and are approximately orthogonal (dot product is 0)</p></li> <li><p>memory</p> <ul> <li><p><em>heteroassociative</em> - can return stored <em>X</em> based on its address <em>A</em></p></li> <li><p><em>autoassociative</em> - can return stored <em>X</em> based on a noisy version of <em>X</em> (since it is a point attractor), maybe with some iteration</p> <ul> <li><p>this adds robustness to the memory</p></li> <li><p>this also removes the need for addresses altogether</p></li> </ul> </li> </ul> </li> </ul> </li> </ul> <div class="section" id="definitions"> <h3>1.1.2.1. definitions<a class="headerlink" href="#definitions" title="Permalink to this headline">¶</a></h3> <ul class="simple"> <li><p>what is hd computing?</p> <ul> <li><p>compute with random high-dim vectors</p></li> <li><p>ex. 10k vectors A, B of +1/-1 (also extends to real / complex vectors)</p></li> </ul> </li> <li><p>3 operations</p> <ul> <li><p><strong>addition</strong>: A + B = (0, 0, 2, 0, 2,-2, 0, ….)</p></li> <li><p><strong>multiplication</strong>: A * B = (-1, -1, -1, 1, 1, -1, 1, …) - this is <strong>XOR</strong></p> <ul> <li><p>want this to be invertible, dsitribute over addition, preserve distance, and be dissimilar to the vectors being multiplied</p></li> <li><p>number of ones after multiplication is the distance between the two original vectors</p></li> <li><p>can represent a dissimilar set vector by using multiplication</p></li> </ul> </li> <li><p>permutation: shuffles values</p> <ul> <li><p>ex. rotate (bit shift with wrapping around)</p></li> <li><p>multiply by rotation matrix (where each row and col contain exactly one 1)</p></li> <li><p>can think of permutation as a list of numbers 1, 2, …, n in permuted order</p></li> <li><p>many properties similar to multiplication</p></li> <li><p>random permutation randomizes</p></li> </ul> </li> </ul> </li> <li><p>basic operations</p> <ul> <li><p>weighting by a scalar</p></li> <li><p>similarity = dot product (sometimes normalized)</p> <ul> <li><p>A <span class="math notranslate nohighlight">\(\cdot\)</span> A = 10k</p></li> <li><p>A <span class="math notranslate nohighlight">\(\cdot\)</span> A = 0 (orthogonal)</p></li> <li><p>in high-dim spaces, almost all pairs of vectors are dissimilar A <span class="math notranslate nohighlight">\(\cdot\)</span> B = 0</p></li> <li><p>goal: similar meanings should have large similarity</p></li> </ul> </li> <li><p>normalization</p> <ul> <li><p>for binary vectors, just take the sign</p></li> <li><p>for non-binary vectors, scalar weight</p></li> </ul> </li> </ul> </li> <li><p>data structures</p></li> <li><p>these operations allow for encoding all normal data structures: sets, sequences, lists, databases</p> <ul> <li><p>set - can represent with a sum (since the sum is similar to all the vectors)</p> <ul> <li><p>can find a stored set using any element</p></li> <li><p>if we don’t store the sum, can probe with the sum and keep subtracting the vectors we find</p></li> </ul> </li> <li><p>multiset = bag (stores set with frequency counts) - can store things with order by adding them multiple times, but hard to actually retrieve frequencies</p></li> <li><p>sequence - could have each element be an address pointing to the next element</p> <ul> <li><p>problem - hard to represent sequences that share a subsequence (could have pointers which skip over the subsquence)</p></li> <li><p>soln: index elements based on permuted sums</p> <ul> <li><p>can look up an element based on previous element or previous string of elements</p></li> </ul> </li> <li><p>could do some kind of weighting also</p></li> </ul> </li> <li><p>pairs - could just multiply (XOR), but then get some weird things, e.g. A * A = <strong>0</strong></p> <ul> <li><p>instead, permute then multiply</p></li> <li><p>can use these to index (address, value) pairs and make more complex data structures</p></li> </ul> </li> <li><p>named tuples - have smth like (name: x, date: m, age: y) and store as holistic vector <span class="math notranslate nohighlight">\(H = N*X + D * M + A * Y\)</span></p> <ul> <li><p>individual attribute value can be retrieved using vector for individual key</p></li> </ul> </li> <li><p>representation substituting is a little trickier….</p> <ul> <li><p>we blur what is a value and whit is a variable</p></li> <li><p>can do this for a pair or for a named tuple with new values</p> <ul> <li><p>this doesn’t always work</p></li> </ul> </li> </ul> </li> </ul> </li> <li><p>examples</p> <ul> <li><p>context vectors</p> <ul> <li><p>standard practice (e.g. LSA): make matrix of word counts, where each row is a word, and each column is a document</p></li> <li><p>HD computing alternative: each row is a word, but each document is assigned a few ~10 columns at random</p> <ul> <li><p>thus, the number of columns doesn’t scale with the number of documents</p></li> <li><p><strong>can also do this randomness for the rows (so the number of rows &lt; the number of words)</strong></p></li> <li><p>can still get semantic vector for a row/column by adding together the rows/columns which are activated by that row/column</p></li> <li><p>this examples still only uses bag-of-words (but can be extended to more)</p></li> </ul> </li> </ul> </li> <li><p>learning rules by example</p> <ul> <li><p>particular instance of a rule is a rule (e.g mother-son-baby <span class="math notranslate nohighlight">\(\to\)</span> grandmother)</p> <ul> <li><p>as we get more examples and average them, the rule gets better</p></li> <li><p>doesn’t always work (especially when things collapse to identity rule)</p></li> </ul> </li> </ul> </li> <li><p>analogies from pairs</p> <ul> <li><p>ex. what is the dollar of mexico?</p></li> </ul> </li> </ul> </li> </ul> </div> <div class="section" id="ex-identify-the-language"> <h3>1.1.2.2. ex. identify the language<a class="headerlink" href="#ex-identify-the-language" title="Permalink to this headline">¶</a></h3> <ul class="simple"> <li><p>paper: <a class="reference external" href="https://arxiv.org/pdf/1412.7026.pdf">LANGUAGE RECOGNITION USING RANDOM INDEXING</a> (joshi et al. 2015)</p></li> <li><p>benefits - very simple and scalable - only go through data once</p> <ul> <li><p>equally easy to use 4-grams vs. 5-grams</p></li> </ul> </li> <li><p>data</p> <ul> <li><p>train: given million bytes of text per language (in the same alphabet)</p></li> <li><p>test: new sentences for each language</p></li> </ul> </li> <li><p>training: compute a 10k profile vector for each language and for each test sentence</p> <ul> <li><p>could encode each letter wih a seed vector which is 10k</p></li> <li><p>instead encode trigrams with <strong>rotate and multiply</strong></p> <ul> <li><p>1st letter vec rotated by 2 * 2nd letter vec rotated by 1 * 3rd letter vec</p></li> <li><p>ex. THE = r(r(T)) * r(H) * r(E)</p></li> <li><p>approximately orthogonal to all the letter vectors and all the other possible trigram vectors…</p></li> </ul> </li> <li><p>profile = sum of all trigram vectors (taken sliding)</p> <ul> <li><p>ex. banana = ban + ana + nan + ana</p></li> <li><p>profile is like a histogram of trigrams</p></li> </ul> </li> </ul> </li> <li><p>testing</p> <ul> <li><p>compare each test sentence to profiles via dot product</p></li> <li><p>clusters similar languages - cool!</p></li> <li><p>gets 97% test acc</p></li> <li><p>can query the letter most likely to follor “TH”</p> <ul> <li><p>form query vector <span class="math notranslate nohighlight">\(Q = r(r(T)) * r(H)\)</span></p></li> <li><p>query by using multiply X + Q * english-profile-vec</p></li> <li><p>find closest letter vecs to X - yields “e”</p></li> </ul> </li> </ul> </li> </ul> </div> <div class="section" id="details"> <h3>1.1.2.3. details<a class="headerlink" href="#details" title="Permalink to this headline">¶</a></h3> <ul class="simple"> <li><p>mathematical background</p> <ul> <li><p>randomly chosen vecs are dissimilar</p></li> <li><p>sum vector is similar to its argument vectors</p></li> <li><p>product vector and permuted vector are dissimilar to their argument vectors</p></li> <li><p>multiplication distibutes over addition</p></li> <li><p>permutation distributes over both additions and multiplication</p></li> <li><p>multiplication and permutations are invertible</p></li> <li><p>addition is approximately invertible</p></li> </ul> </li> <li><p>comparison to DNNs</p> <ul> <li><p>both do statistical learning from data</p></li> <li><p>data can be noisy</p></li> <li><p>both use high-dim vecs although DNNs get bad with him dims (e.g. 100k)</p></li> <li><p>HD is founded on rich mathematical theory</p></li> <li><p>new codewords are made from existing ones</p></li> <li><p>HD memory is a separate func</p></li> <li><p>HD algos are transparent, incremental (on-line), scalable</p></li> <li><p>somewhat closer to the brain…cerebellum anatomy seems to be match HD</p></li> <li><p>HD: holistic (distributed repr.) is robust</p></li> </ul> </li> <li><p>different names</p> <ul> <li><p>Tony plate: holographic reduced representation</p></li> <li><p>ross gayler: multiply-add-permute arch</p></li> <li><p>gayler &amp; levi: vector-symbolic arch</p></li> <li><p>gallant &amp; okaywe: matrix binding with additive termps</p></li> <li><p>fourier holographic reduced reprsentations (FHRR; Plate)</p></li> <li><p>…many more names</p></li> </ul> </li> <li><p>theory of sequence indexing and working memory in RNNs</p> <ul> <li><p>trying to make key-value pairs</p></li> <li><p>VSA as a structured approach for understanding neural networks</p></li> <li><p>reservoir computing = state-dependent network = echos-state network = liquid state machine - try to represen sequential temporal data - builds representations on the fly</p></li> </ul> </li> </ul> </div> <div class="section" id="papers"> <h3>1.1.2.4. papers<a class="headerlink" href="#papers" title="Permalink to this headline">¶</a></h3> <ul class="simple"> <li><p><a class="reference external" href="https://iis-people.ee.ethz.ch/~arahimi/papers/DATE16_HD.pdf">text classification</a> (najafabadi et al. 2016)</p></li> <li><p><a class="reference external" href="https://ieeexplore.ieee.org/abstract/document/8331890?casa_token=FbderL4T3RgAAAAA:LfP2kRSJwhY5z4OHMqvNDrxmSpyIMLzGs80vGj_IdBXVhVVDwZg1tfIeD2nj0S5N7T2YsRrOcg">Classification and Recall With Binary Hyperdimensional Computing: Tradeoffs in Choice of Density and Mapping Characteristics</a></p> <ul> <li><p>note: for sparse vectors, might need some threshold before computing mean (otherwise will have too many zeros)</p></li> </ul> </li> </ul> </div> </div> <div class="section" id="dnns-with-memory"> <h2>1.1.3. dnns with memory<a class="headerlink" href="#dnns-with-memory" title="Permalink to this headline">¶</a></h2> <ul class="simple"> <li><p>Neural Statistician (Edwards &amp; Storkey, 2016) summarises a dataset by averaging over their embeddings</p></li> <li><p><a class="reference external" href="https://arxiv.org/pdf/1804.01756.pdf">kanerva machine</a></p> <ul> <li><p>like a VAE where the prior is derived from an adaptive memory store</p></li> </ul> </li> </ul> </div> <div class="section" id="visual-sampling"> <h2>1.1.4. visual sampling<a class="headerlink" href="#visual-sampling" title="Permalink to this headline">¶</a></h2> <ul class="simple"> <li><p><a class="reference external" href="https://arxiv.org/abs/1611.09430">Emergence of foveal image sampling from learning to attend in visual scenes</a> (cheung, weiss, &amp; olshausen, 2017) - using neural attention model, learn a retinal sampling lattice</p> <ul> <li><p>can figure out what parts of the input the model focuses on</p></li> </ul> </li> </ul> </div> <div class="section" id="dynamic-routing-between-capsules"> <h2>1.1.5. dynamic routing between capsules<a class="headerlink" href="#dynamic-routing-between-capsules" title="Permalink to this headline">¶</a></h2> <ul class="simple"> <li><p>hinton 1981 - reference frames require structured representations</p> <ul> <li><p>mapping units vote for different orientations, sizes, positions based on basic units</p></li> <li><p>mapping units <strong>gate the activity</strong> from other types of units - weight is dependent on if mapping is activated</p></li> <li><p>top-down activations give info back to mapping units</p></li> <li><p>this is a hopfield net with three-way connections (between input units, output units, mapping units)</p></li> <li><p>reference frame is a key part of how we see - need to vote for transformations</p></li> </ul> </li> <li><p>olshausen, anderson, &amp; van essen 1993 - dynamic routing circuits</p> <ul> <li><p>ran simulations of such things (hinton said it was hard to get simulations to work)</p></li> <li><p>learn things in object-based reference frames</p></li> <li><p>inputs -&gt; outputs has weight matrix gated by control</p></li> </ul> </li> <li><p>zeiler &amp; fergus 2013 - visualizing things at intermediate layers - deconv (by dynamic routing)</p> <ul> <li><p>save indexes of max pooling (these would be the control neurons)</p></li> <li><p>when you do deconv, assign max value to these indexes</p></li> </ul> </li> <li><p>arathom 02 - map-seeking circuits</p></li> <li><p>tenenbaum &amp; freeman 2000 - bilinear models</p> <ul> <li><p>trying to separate content + style</p></li> </ul> </li> <li><p>hinton et al 2011 - transforming autoencoders - trained neural net to learn to shift imge</p></li> <li><p>sabour et al 2017 - dynamic routing between capsules</p> <ul> <li><p>units output a vector (represents info about reference frame)</p></li> <li><p>matrix transforms reference frames between units</p></li> <li><p>recurrent control units settle on some transformation to identify reference frame</p></li> </ul> </li> <li><p>notes from this <a class="reference external" href="https://towardsdatascience.com/capsule-neural-networks-part-2-what-is-a-capsule-846d5418929f">blog post</a></p> <ul> <li><p>problems with cnns</p> <ul> <li><p>pooling loses info</p></li> <li><p>don’t account for spatial relations between image parts</p></li> <li><p>can’t transfer info to new viewpoints</p></li> </ul> </li> <li><p><strong>capsule</strong> - vector specifying the features of an object (e.g. position, size, orientation, hue texture) and its likelihood</p> <ul> <li><p>ex. an “eye” capsule could specify the probability it exists, its position, and its size</p></li> <li><p>magnitude (i.e. length) of vector represents probability it exists (e.g. there is an eye)</p></li> <li><p>direction of vector represents the instantiation parameters (e.g. position, size)</p></li> </ul> </li> <li><p>hierarchy</p> <ul> <li><p>capsules in later layers are functions of the capsules in lower layers, and since capsule has extra properties can ask questions like “are both eyes similarly sized?”</p> <ul> <li><p>equivariance = we can ensure our net is invariant to viewpoints by checking for all similar rotations/transformations in the same amount/direction</p></li> </ul> </li> <li><p>active capsules at one level make predictions for the instantiation parameters of higher-level capsules</p> <ul> <li><p>when multiple predictions agree, a higher-level capsule is activated</p></li> </ul> </li> </ul> </li> <li><p>steps in a capsule (e.g. one that recognizes faces)</p> <ul> <li><p>receives an input vector (e.g. representing eye)</p></li> <li><p>apply affine transformation - encodes spatial relationships (e.g. between eye and where the face should be)</p></li> <li><p>applying weighted sum by the C weights, learned by the routing algorithm</p> <ul> <li><p>these weights are learned to group similar outputs to make higher-level capsules</p></li> </ul> </li> <li><p>vectors are squashed so their magnitudes are between 0 and 1</p></li> <li><p>outputs a vector</p></li> </ul> </li> </ul> </li> </ul> </div> <div class="section" id="hierarchical-temporal-memory-htm"> <h2>1.1.6. hierarchical temporal memory (htm)<a class="headerlink" href="#hierarchical-temporal-memory-htm" title="Permalink to this headline">¶</a></h2> <ul class="simple"> <li><p>binary synapses and learns by modeling the growth of new synapses and the decay of unused synapses</p></li> <li><p>separate aspects of brains and neurons that are essential for intelligence from those that depend on brain implementation</p></li> </ul> <div class="section" id="necortical-structure"> <h3>1.1.6.1. necortical structure<a class="headerlink" href="#necortical-structure" title="Permalink to this headline">¶</a></h3> <ul class="simple"> <li><p>evolution leads to physical/logical hierarchy of brain regions</p></li> <li><p>neocortex is like a flat sheet</p></li> <li><p>neocortex regions are similar and do similar computation</p> <ul> <li><p>Mountcastle 1978: vision regions are vision becase they receive visual input</p></li> <li><p>number of regions / connectivity seems to be genetic</p></li> </ul> </li> <li><p>before necortex, brain regions were homogenous: spinal cord, brain stem, basal ganglia, …</p></li> <li><p><img alt="cortical_columns" src="../../_images/cortical_columns.png" /></p></li> </ul> </div> <div class="section" id="principles"> <h3>1.1.6.2. principles<a class="headerlink" href="#principles" title="Permalink to this headline">¶</a></h3> <ul class="simple"> <li><p>common algorithims accross neocortex</p></li> <li><p>hierarchy</p></li> <li><p><strong>sparse distributed representations (SDR)</strong> - vectors with thousands of bits, mostly 0s</p> <ul> <li><p>bits of representation encode semantic properties</p></li> </ul> </li> <li><p>inputs</p> <ul> <li><p>data from the sense</p></li> <li><p>copy of the motor commands</p> <ul> <li><p>“sensory-motor” integration - perception is stable while the eyes move</p></li> </ul> </li> </ul> </li> <li><p>patterns are constantly changing</p></li> <li><p>necortex tries to control old brain regions which control muscles</p></li> <li><p><strong>learning</strong>: region accepts stream of sensory data + motor commands</p> <ul> <li><p>learns of changes in inputs</p></li> <li><p>ouputs motor commands</p></li> <li><p>only knows how its output changes its input</p></li> <li><p>must learn how to control behavior via <em>associative linking</em></p></li> </ul> </li> <li><p>sensory encoders - takes input and turnes it into an SDR</p> <ul> <li><p>engineered systems can use non-human senses</p></li> </ul> </li> <li><p>behavior needs to be incorporated fully</p></li> <li><p>temporal memory - is a memory of sequences</p> <ul> <li><p>everything the neocortex does is based on memory and recall of sequences of patterns</p></li> </ul> </li> <li><p>on-line learning</p> <ul> <li><p>prediction is compared to what actually happens and forms the basis of learning</p></li> <li><p>minimize the error of predictions</p></li> </ul> </li> </ul> </div> <div class="section" id="id1"> <h3>1.1.6.3. papers<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h3> <ul class="simple"> <li><p>“A Theory of How Columns in the Neocortex Enable Learning the Structure of the World”</p> <ul> <li><p>network model that learns the structure of objects through movement</p></li> <li><p>object recognition</p> <ul> <li><p>over time individual columns integrate changing inputs to recognize complete objects</p></li> <li><p>through existing lateral connections</p></li> </ul> </li> <li><p>within each column, neocortex is calculating a location representation</p> <ul> <li><p>locations relative to each other = <strong>allocentric</strong></p></li> </ul> </li> <li><p>much more motion involved</p></li> <li><p>multiple columns - integrate spatial inputs - make things fast</p></li> <li><p>single column - integrate touches over time - represent objects properly</p></li> </ul> </li> <li><p>“Why Neurons Have Thousands of Synapses, A Theory of Sequence Memory in Neocortex”</p> <ul> <li><p>learning and recalling sequences of patterns</p></li> <li><p>neuron with lots of synapses can learn transitions of patterns</p></li> <li><p>network of these can form robust memory</p></li> </ul> </li> </ul> </div> </div> <div class="section" id="forgetting"> <h2>1.1.7. forgetting<a class="headerlink" href="#forgetting" title="Permalink to this headline">¶</a></h2> <ul class="simple"> <li><p><a class="reference external" href="https://arxiv.org/pdf/1802.07569.pdf">Continual Lifelong Learning with Neural Networks: A Review</a></p> <ul> <li><p>main issues is <em>catastrophic forgetting</em> / <em>stability-plasticity dilemma</em></p></li> <li><p><img alt="Screen Shot 2020-01-01 at 11.49.32 AM" src="../../_images/forgetting.png" /></p></li> <li><p>2 types of plasticity</p> <ul> <li><p>Hebbian plasticity (Hebb 1949) for positive feedback instability</p></li> <li><p>compensatory homeostatic plasticity which stabilizes neural activity</p></li> </ul> </li> <li><p>approaches: regularization, dynamic architectures (e.g. add more nodes after each task), memory replay</p></li> </ul> </li> </ul> </div> <div class="section" id="deeptune-style"> <h2>1.1.8. deeptune-style<a class="headerlink" href="#deeptune-style" title="Permalink to this headline">¶</a></h2> <ul class="simple"> <li><p>ponce_19_evolving_stimuli: <a class="reference external" href="https://www.cell.com/action/showPdf?pii=S0092-8674(19)30391-5">https://www.cell.com/action/showPdf?pii=S0092-8674%2819%2930391-5</a></p></li> <li><p>bashivan_18_ann_synthesis</p></li> <li><p><a class="reference external" href="https://papers.nips.cc/paper/6738-adaptive-stimulus-selection-for-optimizing-neural-population-responses.pdf">adept paper</a></p> <ul> <li><p>use kernel regression from CNN embedding to calculate distances between preset images</p></li> <li><p>select preset images</p></li> <li><p>verified with macaque v4 recording</p></li> <li><p>currently only study that optimizes firing rates of multiple neurons</p> <ul> <li><p>pick next stimulus in closed-loop (“adaptive sampling” = “optimal experimental design”)</p></li> </ul> </li> </ul> </li> <li><p>J. Benda, T. Gollisch, C. K. Machens, and A. V. Herz, “From response to stimulus: adaptive sampling in sensory physiology”</p> <ul> <li><p>find the smallest number of stimuli needed to fit parameters of a model that predicts the recorded neuron’s activity from the stimulus</p></li> <li><p>maximizing firing rates via genetic algorithms</p></li> <li><p>maximizing firing rate via gradient ascent</p></li> </ul> </li> <li><p>C. DiMattina and K. Zhang,“Adaptive stimulus optimization for sensory systems neuroscience”](https://www.frontiersin.org/articles/10.3389/fncir.2013.00101/full)</p> <ul> <li><p>2 general approaches: gradient-based approaches + genetic algorithms</p></li> <li><p>can put constraints on stimulus space</p></li> <li><p>stimulus adaptation</p></li> <li><p>might want iso-response surfaces</p></li> <li><p>maximally informative stimulus ensembles (Machens, 2002)</p></li> <li><p>model-fitting: pick to maximize info-gain w/ model params</p></li> <li><p>using fixed stimulus sets like white noise may be deeply problematic for efforts to identify non-linear hierarchical network models due to continuous parameter confounding (DiMattina and Zhang, 2010)</p></li> <li><p>use for model selection</p></li> </ul> </li> </ul> </div> <div class="section" id="population-coding"> <h2>1.1.9. population coding<a class="headerlink" href="#population-coding" title="Permalink to this headline">¶</a></h2> <ul class="simple"> <li><p>saxena_19_pop_cunningham: “Towards the neural population doctrine”</p> <ul> <li><p>correlated trial-to-trial variability</p> <ul> <li><p>Ni et al. showed that the correlated variability in V4 neurons during attention and learning — processes that have inherently different timescales — robustly decreases</p></li> <li><p>‘choice’ decoder built on neural activity in the first PC performs as well as one built on the full dataset, suggesting that the relationship of neural variability to behavior lies in a relatively small subspace of the state space.</p></li> </ul> </li> <li><p>decoding</p> <ul> <li><p>more neurons only helps if neuron doesn’t lie in span of previous neurons</p></li> </ul> </li> <li><p>encoding</p> <ul> <li><p>can train dnn goal-driven or train dnn on the neural responses directly</p></li> </ul> </li> <li><p>testing</p> <ul> <li><p>important to be able to test population structure directly</p></li> </ul> </li> </ul> </li> <li><p><em>population vector coding</em> - ex. neurons coded for direction sum to get final direction</p></li> <li><p>reduces uncertainty</p></li> <li><p><em>correlation coding</em> - correlations betweeen spikes carries extra info</p></li> <li><p><em>independent-spike coding</em> - each spike is independent of other spikes within the spike train</p></li> <li><p><em>position coding</em> - want to represent a position</p> <ul> <li><p>for grid cells, very efficient</p></li> </ul> </li> <li><p><em>sparse coding</em></p></li> <li><p>hard when noise between neurons is correlated</p></li> <li><p>measures of information</p></li> <li><p>eda</p> <ul> <li><p>plot neuron responses</p></li> <li><p>calc neuron covariances</p></li> </ul> </li> </ul> </div> <div class="section" id="interesting-misc-papers"> <h2>1.1.10. interesting misc papers<a class="headerlink" href="#interesting-misc-papers" title="Permalink to this headline">¶</a></h2> <ul class="simple"> <li><p>berardino 17 eigendistortions</p> <ul> <li><p><strong>Fisher info matrix</strong> under certain assumptions = <span class="math notranslate nohighlight">\(Jacob^TJacob\)</span> (pixels x pixels) where <em>Jacob</em> is the Jacobian matrix for the function f action on the pixels x</p></li> <li><p>most and least noticeable distortion directions corresponding to the eigenvectors of the Fisher info matrix</p></li> </ul> </li> <li><p>gao_19_v1_repr</p> <ul> <li><p>don’t learn from images - v1 repr should come from motion like it does in the real world</p></li> <li><p>repr</p> <ul> <li><p>vector of local content</p></li> <li><p>matrix of local displacement</p></li> </ul> </li> <li><p>why is this repr nice?</p> <ul> <li><p>separate reps of static image content and change due to motion</p></li> <li><p>disentangled rotations</p></li> </ul> </li> <li><p>learning</p> <ul> <li><p>predict next image given current image + displacement field</p></li> <li><p>predict next image vector given current frame vectors + displacement</p></li> </ul> </li> </ul> </li> <li><p>kietzmann_18_dnn_in_neuro_rvw</p></li> <li><p>friston_10_free_energy</p> <ul> <li><p><img alt="friston_free_energy" src="../../_images/friston_free_energy.png" /></p></li> </ul> </li> </ul> </div> </div> <script type="text/x-thebe-config"> { requestKernel: true, binderOptions: { repo: "binder-examples/jupyter-stacks-datascience", ref: "master", }, codeMirrorConfig: { theme: "abcdef", mode: "python" }, kernelOptions: { kernelName: "python3", path: "./notes/research_ovws" }, predefinedOutput: true } </script> <script>kernelName = 'python3'</script> </div> </div> </div> <div class='prev-next-bottom'> <a class='left-prev' id="prev-link" href="research_ovws.html" title="previous page">1. research_ovws</a> <a class='right-next' id="next-link" href="ovw_transfer_learning.html" title="next page">1.2. transfer learning</a> </div> <footer class="footer mt-5 mt-md-0"> <div class="container"> <p> By Chandan Singh<br/> &copy; Copyright None.<br/> <div class="extra_footer"> <p> Many of these images are taken from resources on the web. </p> </div> </p> </div> </footer> </main> </div> </div> <script src="../../_static/js/index.3da636dd464baa7582d2.js"></script> </body> </html>
csinva/csinva.github.io
_blog/compiled_notes/_build/html/notes/research_ovws/ovw_comp_neuro.html
HTML
mit
52,733
package com.benjaminearley.mysubs; import android.annotation.SuppressLint; import android.content.DialogInterface; import android.net.Uri; import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v7.app.AlertDialog; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.webkit.JsResult; import android.webkit.WebChromeClient; import android.webkit.WebSettings; import android.webkit.WebView; import android.webkit.WebViewClient; import android.widget.ProgressBar; import android.widget.Toast; public class StoryDetailFragment extends Fragment { public static final String ARG_ITEM_LINK = "item_url"; static final String DETAIL_URI = "uri"; private String link; private Uri uri; private ProgressBar progressBar; public StoryDetailFragment() { } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (getArguments().containsKey(ARG_ITEM_LINK)) { uri = getArguments().getParcelable(DETAIL_URI); link = getArguments().getString(ARG_ITEM_LINK); } } @SuppressLint("SetJavaScriptEnabled") @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView = inflater.inflate(R.layout.story_detail, container, false); if ((link != null && !link.isEmpty()) || (uri != null && !uri.toString().isEmpty())) { WebView webView = (WebView) rootView.findViewById(R.id.webview); progressBar = (ProgressBar) getActivity().findViewById(R.id.toolbar_progress_bar); if (progressBar != null) { progressBar.setProgress(0); } WebSettings webSettings = webView.getSettings(); webSettings.setJavaScriptEnabled(true); webSettings.setSupportZoom(true); webSettings.setDisplayZoomControls(false); webView.setWebViewClient(new WebViewClient() { @Override public boolean shouldOverrideUrlLoading(WebView view, String url) { view.loadUrl(url); return true; } }); webView.setWebChromeClient(new WebChromeClient() { @Override public void onProgressChanged(WebView view, int progress) { if (progressBar != null) { progressBar.setProgress(progress); if (progress >= 100) { progressBar.setVisibility(View.GONE); } } } @Override public boolean onJsConfirm( WebView view, String url, String message, final JsResult result) { showAlertDialog(message, result); return true; } @Override public boolean onJsAlert( WebView view, String url, String message, final JsResult result) { showAlertDialog(message, result); return true; } public void showAlertDialog(String message, final JsResult result) { AlertDialog.Builder builder = new AlertDialog.Builder( getContext()); builder.setMessage(message).setPositiveButton( android.R.string.ok, new AlertDialog.OnClickListener() { public void onClick(DialogInterface dialog, int which) { result.confirm(); } }).setCancelable(false).create().show(); } }); if (link != null) { webView.loadUrl(getContext().getString(R.string.reddit_url_webview) + link); } else { webView.loadUrl(getContext().getString(R.string.reddit_url_webview) + uri.toString()); } } else { Toast.makeText(getContext(), R.string.toast_web_error, Toast.LENGTH_LONG).show(); } return rootView; } }
BenjaminEarley/Capstone-Project
app/src/main/java/com/benjaminearley/mysubs/StoryDetailFragment.java
Java
mit
4,519
#include <stdio.h> // standard input / output functions #include <stdlib.h> #include <string.h> // string function definitions #include <unistd.h> // UNIX standard function definitions #include <fcntl.h> // File control definitions #include <errno.h> // Error number definitions #include <termios.h> // POSIX terminal control definitions #include <poll.h> #include <spawn.h> #ifdef USEWIRING #include <wiringPi.h> #endif #include <sys/mount.h> #include <sys/stat.h> #include <signal.h> int i; char cmd[255]; int bootToSystemPin = 18; volatile int runFullSystem = 0; static void catch_function(int signo) { runFullSystem = 1; } static void child_function(int signo) { wait(); } int runInBackground(const char* cmd) { pid_t pid; pid = fork(); if (pid == 0) { // child process system(cmd); wait(); exit(1); } else if (pid < 0) { // fork failed printf("fork() failed!\n"); return 0; } return 1; } void setupBasicSystem() { mount("proc", "/proc", "proc", 0, NULL); mount("sysfs", "/sys", "sysfs", 0, NULL); mount("tmpfs", "/tmp", "tmpfs", 0, NULL); // mount("tmpfs", "/run", "tmpfs", 0, NULL); mkdir("/dev/shm", 0); mount("tmpfs", "/dev/shm", "tmpfs", 0, "size=128M"); // mount("tmpfs", "/var/run", "tmpfs", 0, "size=128M"); // mount("tmpfs", "/var/lock", "tmpfs", 0, "size=128M"); // mount("tmpfs", "/dev/shm", "tmpfs", 0, "size=128M"); // system("/bin/mount -t tmpfs tmpfs /dev/shm -o size=128M"); mkdir("/dev/pts", 0); mount("devpts", "/dev/pts", "devpts", 0, "gid=5,mode=620"); // system("/bin/mount devpts /dev/pts -t devpts -o gid=5,mode=620"); // mount("/dev/mmcblk0p3", "/opt/naprave", "auto", 0, "defaults"); system("/bin/mount /dev/mmcblk0p3 /opt/naprave -o ro"); system("modprobe fuse"); system("modprobe snd_bcm2835"); //* system("modprobe evdev"); system("modprobe uio_pdrv_genirq"); system("modprobe ch341"); system("modprobe snd-usb-audio"); system("modprobe snd-seq-midi"); system("modprobe ftdi_sio"); system("modprobe libphy"); system("modprobe asix"); system("modprobe rpi_ft5406"); //screen support system("modprobe brcmfmac"); system("modprobe uvcvideo"); system("modprobe i2c-bcm2708"); system("modprobe i2c-dev"); system("modprobe rtc-ds1307"); system("modprobe ipv6"); // system("/sbin/hwclock -s"); /*/ system("/bin/mount / -o remount,rw"); system("/sbin/udevd --daemon"); system("/bin/mount / -o remount,ro"); /**/ // mount("/dev/mmcblk0p4", "/data", "auto", 0, "ro"); system("setterm -foreground black -background black"); system("setterm -cursor off;"); system("clear"); // runInBackground("/usr/bin/php -S 0.0.0.0:80 -t /opt/naprave/app/www/ > /dev/null"); // sleep(5); // mount("/dev/sda1", "/data", "auto", 0, "ro"); system("/bin/mount /dev/mmcblk0p4 /data -o ro"); system("/bin/mount /dev/sda1 /data2 -o ro"); system("/bin/mount /dev/sda2 /data3 -o ro"); system("/bin/mount /dev/sda /data4 -o ro"); system("/usr/sbin/alsactl -L restore"); system("amixer sset PCM 100%"); } bool doInit; int main ( int argc, char *argv[] ) { if (signal(SIGINT, catch_function) == SIG_ERR) { //return EXIT_FAILURE; } if (signal(SIGCHLD, SIG_IGN) == SIG_ERR) { //return EXIT_FAILURE; } int pid = getpid(); // printf("pid: %d\n",pid); if( pid == 1 ) { doInit = 1; } else { doInit = 0; exit(1); } if (doInit) setupBasicSystem(); #ifdef USEWIRING if (wiringPiSetupGpio () < 0) { fprintf (stderr, "Unable to setup wiringPi: %s\n", strerror (errno)); return 1; } int pin = bootToSystemPin; pinMode (pin, INPUT); pullUpDnControl(pin,PUD_UP); printf("pinval: %d\n",digitalRead(pin)); #endif if (!doInit) return 0; #ifdef USEWIRING if( digitalRead(pin) != 0 ) #endif { runInBackground("/usr/bin/php /root/start.php"); system("ifconfig lo up"); system("ifconfig eth0 up"); system("ifconfig eth0:1 192.168.1.105/24"); system("ifconfig eth1 up"); system("ifconfig eth1:1 192.168.1.106/24"); system("ifconfig eth2 up > /dev/null"); system("ifconfig eth2:1 192.168.1.107/24 > /dev/null"); system("ifconfig wlan0 up > /dev/null"); system("ifconfig wlan0:1 192.168.42.1/24 > /dev/null"); //printf("starting getty"); // runInBackground("/sbin/getty --noclear 38400 tty1 > /dev/null"); // runInBackground("/usr/sbin/hostapd /etc/hostapd/hostapd.conf > /dev/null"); runInBackground("/usr/sbin/sshd -f /etc/ssh/sshd_config > /dev/null"); } while( true ) { // printf("pinval: %d\n",digitalRead(pin)); #ifdef USEWIRING if( digitalRead(pin) == 0 || runFullSystem == 1) { runFullSystem = 1; } #endif if( runFullSystem == 1) { execve("/lib/systemd/systemd", argv, NULL); return 0; } sleep(1); } /**/ }
naprave/RaspberryPi
npStarter/main.cpp
C++
mit
4,799
package hudson.plugins.warnings.parser; import java.util.regex.Matcher; import hudson.Extension; import hudson.plugins.analysis.util.model.Priority; /** * A parser for Perforce execution. * * @author Adrian Deccico * @deprecated use the new analysis-model library */ @Deprecated @Extension public class P4Parser extends RegexpLineParser { private static final long serialVersionUID = -8106854254745366432L; private static final String ALREADY_OPENED = "already opened for edit"; private static final String CANT_ADD = "can't add existing file"; private static final String WARNING_ADD_OF = "warning: add of existing file"; private static final String OPENED_FOR_EDIT = "can't add \\(" + ALREADY_OPENED + "\\)"; private static final String NOTHING_CHANGED = "nothing changed"; private static final String OR = "|"; /** Pattern of perforce compiler warnings. */ private static final String PERFORCE_WARNING_PATTERN = "^(.*) - " + "(" + CANT_ADD + OR + WARNING_ADD_OF + OR + OPENED_FOR_EDIT + OR + NOTHING_CHANGED + ")" + "(.*)$"; /** * Creates a new instance of {@link P4Parser}. */ public P4Parser() { super(Messages._Warnings_Perforce_ParserName(), Messages._Warnings_Perforce_LinkName(), Messages._Warnings_Perforce_TrendName(), PERFORCE_WARNING_PATTERN, true); } @Override protected Warning createWarning(final Matcher matcher) { String category = matcher.group(2).trim(); String fileName = matcher.group(1).trim(); String message = fileName; Priority p = Priority.NORMAL; if (category.contains(ALREADY_OPENED) || category.equals(NOTHING_CHANGED)) { p = Priority.LOW; } return createWarning(fileName, 0, category, message, p); } @Override protected boolean isLineInteresting(final String line) { return line.contains(" - "); } }
jenkinsci/warnings-plugin
src/main/java/hudson/plugins/warnings/parser/P4Parser.java
Java
mit
2,447
local slots = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16} if not fs.exists("turtle/inventory") and fs.isDir("turtle/inventory") then fs.makeDir("turtle/inventory") end function save() for i = 1, 16 do local file = fs.open("turtle/inventory/"..i, "w") file.writeLine(textutils.serialize(slots[i]) file.close() end end function load() for i = 1, 16 do local file = fs.open("turtle/inventory/"..i, "r") slots[i] = file.readAll() file.close() end end fSlot = { isKnown = function(self) if self.info then return true else return false end end, getInfo = function(self) return self.info end update = function(self) oldselect = turtle.select(self.number) self.amount = turtle.getItemCount turtle.select(oldselect) end } create = function(num) slots[num] = { info = false number = num } setmetatable(slots[num], fSlot) return slots[num] end function fuel() local found for k, v in pairs(slots) do if v.isKnown() and v.isFuel then found = true return k end end if not found then return 0 end end function update() oldselect = turtle.getSelected() for i = 1, 16 do turtle.select(i) if turtle.getItemCount ~= slot[i].ammount then slot[i].update() end end end
KingofGamesYami/Advance-Turtle-Operating-Environment
.apis/slot.lua
Lua
mit
1,331
""" Simple utils to save and load from disk. """ from __future__ import print_function from __future__ import division from __future__ import unicode_literals # TODO(rbharath): Use standard joblib once old-data has been regenerated. import joblib from sklearn.externals import joblib as old_joblib import gzip import pickle import pandas as pd import numpy as np import os from rdkit import Chem def log(string, verbose=True): """Print string if verbose.""" if verbose: print(string) def save_to_disk(dataset, filename, compress=3): """Save a dataset to file.""" joblib.dump(dataset, filename, compress=compress) def get_input_type(input_file): """Get type of input file. Must be csv/pkl.gz/sdf file.""" filename, file_extension = os.path.splitext(input_file) # If gzipped, need to compute extension again if file_extension == ".gz": filename, file_extension = os.path.splitext(filename) if file_extension == ".csv": return "csv" elif file_extension == ".pkl": return "pandas-pickle" elif file_extension == ".joblib": return "pandas-joblib" elif file_extension == ".sdf": return "sdf" else: raise ValueError("Unrecognized extension %s" % file_extension) def load_data(input_files, shard_size=None, verbose=True): """Loads data from disk. For CSV files, supports sharded loading for large files. """ if not len(input_files): return input_type = get_input_type(input_files[0]) if input_type == "sdf": if shard_size is not None: log("Ignoring shard_size for sdf input.", verbose) for value in load_sdf_files(input_files): yield value elif input_type == "csv": for value in load_csv_files(input_files, shard_size, verbose=verbose): yield value elif input_type == "pandas-pickle": for input_file in input_files: yield load_pickle_from_disk(input_file) def load_sdf_files(input_files): """Load SDF file into dataframe.""" dataframes = [] for input_file in input_files: # Tasks are stored in .sdf.csv file raw_df = next(load_csv_files([input_file+".csv"], shard_size=None)) # Structures are stored in .sdf file print("Reading structures from %s." % input_file) suppl = Chem.SDMolSupplier(str(input_file), False, False, False) df_rows = [] for ind, mol in enumerate(suppl): if mol is not None: smiles = Chem.MolToSmiles(mol) df_rows.append([ind,smiles,mol]) mol_df = pd.DataFrame(df_rows, columns=('mol_id', 'smiles', 'mol')) dataframes.append(pd.concat([mol_df, raw_df], axis=1, join='inner')) return dataframes def load_csv_files(filenames, shard_size=None, verbose=True): """Load data as pandas dataframe.""" # First line of user-specified CSV *must* be header. shard_num = 1 for filename in filenames: if shard_size is None: yield pd.read_csv(filename) else: log("About to start loading CSV from %s" % filename, verbose) for df in pd.read_csv(filename, chunksize=shard_size): log("Loading shard %d of size %s." % (shard_num, str(shard_size)), verbose) df = df.replace(np.nan, str(""), regex=True) shard_num += 1 yield df def load_from_disk(filename): """Load a dataset from file.""" name = filename if os.path.splitext(name)[1] == ".gz": name = os.path.splitext(name)[0] if os.path.splitext(name)[1] == ".pkl": return load_pickle_from_disk(filename) elif os.path.splitext(name)[1] == ".joblib": try: return joblib.load(filename) except KeyError: # Try older joblib version for legacy files. return old_joblib.load(filename) except ValueError: return old_joblib.load(filename) elif os.path.splitext(name)[1] == ".csv": # First line of user-specified CSV *must* be header. df = pd.read_csv(filename, header=0) df = df.replace(np.nan, str(""), regex=True) return df else: raise ValueError("Unrecognized filetype for %s" % filename) def load_sharded_csv(filenames): """Load a dataset from multiple files. Each file MUST have same column headers""" dataframes = [] for name in filenames: placeholder_name = name if os.path.splitext(name)[1] == ".gz": name = os.path.splitext(name)[0] if os.path.splitext(name)[1] == ".csv": # First line of user-specified CSV *must* be header. df = pd.read_csv(placeholder_name, header=0) df = df.replace(np.nan, str(""), regex=True) dataframes.append(df) else: raise ValueError("Unrecognized filetype for %s" % filename) #combine dataframes combined_df = dataframes[0] for i in range(0, len(dataframes) - 1): combined_df = combined_df.append(dataframes[i+1]) combined_df = combined_df.reset_index(drop=True) return combined_df def load_pickle_from_disk(filename): """Load dataset from pickle file.""" if ".gz" in filename: with gzip.open(filename, "rb") as f: df = pickle.load(f) else: with open(filename, "rb") as f: df = pickle.load(f) return df
joegomes/deepchem
deepchem/utils/save.py
Python
mit
5,030
<?php /* @var $this Controller */ ?> <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="language" content="en"> <!-- blueprint CSS framework --> <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/screen.css" media="screen, projection"> <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/print.css" media="print"> <!--[if lt IE 8]> <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/ie.css" media="screen, projection"> <![endif]--> <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/main.css"> <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/form.css"> <title><?php echo CHtml::encode($this->pageTitle); ?></title> </head> <body> <div class="container" id="page"> <div id="header"> <div id="logo"><?php echo CHtml::encode(Yii::app()->name); ?></div> </div><!-- header --> <div id="mainmenu"> <?php $this->widget('zii.widgets.CMenu',array( 'items'=>array( array('label'=>'Home', 'url'=>array('/site/index')), array('label'=>'About', 'url'=>array('/site/page', 'view'=>'about')), array('label'=>'Contact', 'url'=>array('/site/contact')), array('label'=>'Login', 'url'=>array('/user/login'), 'visible'=>Yii::app()->user->isGuest), array('label'=>'Register', 'url'=>array('/user/register'), 'visible'=>Yii::app()->user->isGuest), array('label'=>'Logout ('.Yii::app()->user->name.')', 'url'=>array('/site/logout'), 'visible'=>!Yii::app()->user->isGuest) ), )); ?> </div><!-- mainmenu --> <?php if(isset($this->breadcrumbs)):?> <?php $this->widget('zii.widgets.CBreadcrumbs', array( 'links'=>$this->breadcrumbs, )); ?><!-- breadcrumbs --> <?php endif?> <?php echo $content; ?> <div class="clear"></div> <div id="footer"> Copyright &copy; <?php echo date('Y'); ?> by My Company.<br/> All Rights Reserved.<br/> <?php echo Yii::powered(); ?> </div><!-- footer --> </div><!-- page --> </body> </html>
negativo/Yii-PHP-with-Vagrant
app/protected/views/layouts/main.php
PHP
mit
2,144
// // MDMainViewController.h // iOS Library // // Created by Andrew Kopanev on 2/3/14. // Copyright (c) 2014 Moqod. All rights reserved. // #import <UIKit/UIKit.h> @interface MAMainViewController : UIViewController @end
moqod/ios-categories-and-tools
Classes/Sample/Main/MAMainViewController.h
C
mit
227
Pattern: Possible `grep` misuse Issue: - ## Description In globs, `*` matches any number of any character. In regex, `*` matches any number of the preceding character. `grep` uses regex, not globs, so this means that `grep '*foo'` is nonsensical because there's no preceding character for `*`. If the intention was to match "any number of characters followed by foo", use `'.*foo'`. Also note that since grep matches substrings, this will match "fishfood". Use anchors to prevent this, e.g. `foo$`. This also means that `f*` will match "hello", because `f*` matches 0 (or more) "f"s and there are indeed 0 "f" characters in "hello". Again, use `grep 'f'` to find strings containing "f", or `grep '^f'` to find strings starting with "f". Example of **incorrect** code: ```sh grep '*foo*' ``` Example of **correct** code: ```sh grep 'foo' # or more explicitly, grep '.*foo.*' ``` ## Exceptions If you're aware of the differences between globs and regex, you can ignore this message. ## Further Reading * [ShellCheck - SC2063](https://github.com/koalaman/shellcheck/wiki/SC2063)
Adroiti/docs-for-code-review-tools
ShellCheck/SC2063.md
Markdown
mit
1,095
--- layout: post title: "简单 SQL 语句的逻辑顺序" description: "" category: SQL tags: [] --- {% include JB/setup %}   考虑一个简单的语句: ```sql SELECT order_num, SUM(quantity * item_price) AS ordertotal FROM orderitems WHERE quantity > 1 GROUP BY order_num HAVING ordertotal >= 50 ORDER BY ordertotal; ``` * FROM 确定所操作的表 * WHERE 作行过滤 (row filtering),过滤掉不符合条件的行 * 将过滤后的表按 GROUP BY 分组 * HAVING 作分组过滤 (group filtering),过滤掉不符合条件的分组 * 在过滤后的分组上作 SELECT 操作 ORDER BY 在何时执行并不重要,它只是保证最后的结果是排序显示的。
erikyao/erikyao.github.io
_posts/2009-12-26-simple-example-of-sql-logic.md
Markdown
mit
708
<?php /** * Created by PhpStorm. * User: asao * Date: 2013/11/26 * Time: 23:44 */ namespace WScore\Basic\Enum; interface EnumInterface { /** * Returns all possible values and strings as an array * * @return array Constant name in key, constant value in value */ public static function getChoices(); /** * Returns all possible values as an array. * * @return mixed */ public static function getValues(); /** * @param $value * @return bool */ public static function exists( $value ); /** * @param $value * @return string */ public static function choose( $value ); /** * @return string */ public function __toString(); /** * @return string */ public function get(); /** * @return string */ public function show(); /** * @param $value * @return bool */ public function is( $value ); }
asaokamei/WScore.Basic
src/Enum/EnumInterface.php
PHP
mit
973
package deref // DO NOT MODIFY. Generated by nullable-generate. // Float32 returns the value pointed to by np. // If np is nil, then this function returns 0. func Float32(np *float32) float32 { if np == nil { return 0 } return *np }
spkg/ptr
deref/float32.go
GO
mit
240
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>mathcomp-finmap: 1 m 34 s 🏆</title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / released</a></li> <li class="active"><a href="">8.7.1+1 / mathcomp-finmap - 1.0.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> mathcomp-finmap <small> 1.0.0 <span class="label label-success">1 m 34 s 🏆</span> </small> </h1> <p>📅 <em><script>document.write(moment("2021-12-16 13:27:32 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-12-16 13:27:32 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-threads base base-unix base camlp5 7.14 Preprocessor-pretty-printer of OCaml conf-findutils 1 Virtual package relying on findutils conf-perl 1 Virtual package relying on perl coq 8.7.1+1 Formal proof management system num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic ocaml 4.07.1 The OCaml compiler (virtual package) ocaml-base-compiler 4.07.1 Official release 4.07.1 ocaml-config 1 OCaml Switch Configuration ocamlfind 1.9.1 A library manager for OCaml # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;Cyril Cohen &lt;cyril.cohen@inria.fr&gt;&quot; homepage: &quot;http://www.cyrilcohen.fr&quot; bug-reports: &quot;Cyril Cohen &lt;cyril.cohen@inria.fr&gt;&quot; dev-repo: &quot;git+https://github.com/math-comp/finmap.git&quot; license: &quot;CeCILL-B&quot; build: [ make &quot;-j&quot; &quot;%{jobs}%&quot; ] install: [ make &quot;install&quot; ] depends: [ &quot;coq&quot; {&gt;= &quot;8.6&quot;} &quot;coq-mathcomp-ssreflect&quot; {&gt;= &quot;1.6.1&quot; &amp; &lt; &quot;1.8~&quot;} ] tags: [ &quot;keyword:finmap&quot; &quot;keyword:finset&quot; &quot;keyword:multiset&quot; &quot;keyword:order&quot; &quot;logpath:mathcomp.finmap&quot; ] authors: [ &quot;Cyril Cohen &lt;cyril.cohen@inria.fr&gt;&quot; ] synopsis: &quot;Finite sets, finite maps, finitely supported functions, orders&quot; description: &quot;&quot;&quot; This library is an extension of mathematical component in order to support finite sets and finite maps on choicetypes (rather that finite types). This includes support for functions with finite support and multisets. The library also contains a generic order and set libary, which will be used to subsume notations for finite sets, eventually.&quot;&quot;&quot; url { src: &quot;https://github.com/math-comp/finmap/archive/1.0.0.tar.gz&quot; checksum: &quot;md5=064f05c13295292e83d8e50c163dfec8&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install 🏜️</h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action coq-mathcomp-finmap.1.0.0 coq.8.7.1+1</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam list; echo; ulimit -Sv 4000000; timeout 4h opam install -y --deps-only coq-mathcomp-finmap.1.0.0 coq.8.7.1+1</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>1 m 49 s</dd> </dl> <h2>Install 🚀</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam list; echo; ulimit -Sv 16000000; timeout 4h opam install -y -v coq-mathcomp-finmap.1.0.0 coq.8.7.1+1</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>1 m 34 s</dd> </dl> <h2>Installation size</h2> <p>Total: 4 M</p> <ul> <li>915 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/mathcomp/finmap/finmap.vo</code></li> <li>828 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/mathcomp/finmap/finmap.glob</code></li> <li>571 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/mathcomp/finmap/order.glob</code></li> <li>515 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/mathcomp/finmap/order.vo</code></li> <li>265 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/mathcomp/finmap/set.vo</code></li> <li>234 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/mathcomp/finmap/set.glob</code></li> <li>225 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/mathcomp/finmap/multiset.vo</code></li> <li>223 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/mathcomp/finmap/multiset.glob</code></li> <li>106 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/mathcomp/finmap/finmap.v</code></li> <li>101 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/mathcomp/finmap/order.v</code></li> <li>36 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/mathcomp/finmap/set.v</code></li> <li>27 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/mathcomp/finmap/multiset.v</code></li> </ul> <h2>Uninstall 🧹</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq-mathcomp-finmap.1.0.0</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> Sources are on <a href="https://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣 </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
coq-bench/coq-bench.github.io
clean/Linux-x86_64-4.07.1-2.0.6/released/8.7.1+1/mathcomp-finmap/1.0.0.html
HTML
mit
8,393
package bart.comparison.operators; import bart.comparison.ComparisonConfiguration; import bart.comparison.ComparisonStats; import bart.comparison.ComparisonUtility; import bart.comparison.CompatibilityMap; import bart.comparison.InstanceMatchTask; import bart.comparison.SignatureAttributes; import bart.comparison.SignatureMap; import bart.comparison.SignatureMapCollection; import bart.comparison.TupleMatch; import bart.comparison.TupleMatches; import bart.comparison.TupleSignature; import bart.comparison.ValueMappings; import com.mxgraph.layout.hierarchical.mxHierarchicalLayout; import com.mxgraph.swing.mxGraphComponent; import com.mxgraph.util.mxCellRenderer; import com.mxgraph.util.mxConstants; import java.awt.BorderLayout; import java.awt.Color; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import java.util.ArrayList; 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 javax.imageio.ImageIO; import javax.swing.JFrame; import org.jgrapht.UndirectedGraph; import org.jgrapht.ext.JGraphXAdapter; import org.jgrapht.graph.DefaultEdge; import org.jgrapht.graph.SimpleGraph; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import speedy.model.database.AttributeRef; import speedy.model.database.Cell; import speedy.model.database.IDatabase; import speedy.model.database.IValue; import speedy.model.database.Tuple; import speedy.model.database.TupleWithTable; import speedy.utility.SpeedyUtility; public class ComputeInstanceSimilarityBlock implements IComputeInstanceSimilarity { private final static Logger logger = LoggerFactory.getLogger(ComputeInstanceSimilarityBlock.class); private final SignatureMapCollectionGenerator signatureGenerator = new SignatureMapCollectionGenerator(); private final CheckTupleMatch tupleMatcher = new CheckTupleMatch(); private final CheckTupleMatchCompatibility compatibilityChecker = new CheckTupleMatchCompatibility(); private final FindCompatibleTuples compatibleTupleFinder = new FindCompatibleTuples(); @Override public InstanceMatchTask compare(IDatabase leftDb, IDatabase rightDb) { if (!ComparisonConfiguration.isInjective() || !ComparisonConfiguration.isFunctional()) { throw new IllegalArgumentException("Only fully-injective mappings are supported"); } long start = System.currentTimeMillis(); InstanceMatchTask instanceMatch = new InstanceMatchTask(this.getClass().getSimpleName(), leftDb, rightDb); List<TupleWithTable> sourceTuples = SpeedyUtility.extractAllTuplesFromDatabase(leftDb); List<TupleWithTable> destinationTuples = SpeedyUtility.extractAllTuplesFromDatabase(rightDb); ComparisonStats.getInstance().addStat(ComparisonStats.PROCESS_INSTANCE_TIME, System.currentTimeMillis() - start); UndirectedGraph<TupleWithTable, DefaultEdge> instancesGraph = new SimpleGraph<TupleWithTable, DefaultEdge>(DefaultEdge.class); start = System.currentTimeMillis(); addInstance(sourceTuples, instancesGraph); addInstance(destinationTuples, instancesGraph); ComparisonStats.getInstance().addStat(ComparisonStats.BUILD_INSTANCES_GRAPH, System.currentTimeMillis() - start); CompatibilityMap compatibilityMap = compatibleTupleFinder.find(sourceTuples, destinationTuples); TupleMatches tupleMatches = ComparisonUtility.findTupleMatches(destinationTuples, compatibilityMap); start = System.currentTimeMillis(); addTupleMatches(tupleMatches, instancesGraph); ComparisonStats.getInstance().addStat(ComparisonStats.BUILD_INSTANCES_GRAPH, System.currentTimeMillis() - start); findCompatibileTuples(sourceTuples, destinationTuples, instancesGraph); findCompatibileTuples(destinationTuples, sourceTuples, instancesGraph); saveGraph(instancesGraph); // TupleMatches tupleMatches = findTupleMatches(sourceTuples, destinationTuples); // ComparisonUtility.sortTupleMatches(tupleMatches); // if (logger.isTraceEnabled()) logger.trace(tupleMatches.toString()); // TupleMapping bestTupleMapping = bestTupleMappingFinder.findBestTupleMapping(sourceTuples, destinationTuples, tupleMatches); // nonMatchingTuplesFinder.find(sourceTuples, destinationTuples, bestTupleMapping); // instanceMatch.setTupleMapping(bestTupleMapping); return instanceMatch; } private void addInstance(List<TupleWithTable> tuples, UndirectedGraph<TupleWithTable, DefaultEdge> instancesGraph) { Map<IValue, Set<TupleWithTable>> placeholdersInverseMap = new HashMap<>(); for (TupleWithTable tuple : tuples) { instancesGraph.addVertex(tuple); addPlaceholders(tuple, placeholdersInverseMap); } for (IValue placeholder : placeholdersInverseMap.keySet()) { Set<TupleWithTable> tuplesWithPlaceholder = placeholdersInverseMap.get(placeholder); addEdgesBtwTuples(tuplesWithPlaceholder, instancesGraph); } } private void addTupleMatches(TupleMatches tupleMatches, UndirectedGraph<TupleWithTable, DefaultEdge> instancesGraph) { for (TupleWithTable tuple : tupleMatches.getTuples()) { List<TupleMatch> matchesForTuple = tupleMatches.getMatchesForTuple(tuple); addEdgesBtwMatchingTuples(matchesForTuple, instancesGraph); } } private void findCompatibileTuples(List<TupleWithTable> srcTuples, List<TupleWithTable> destTuples, UndirectedGraph<TupleWithTable, DefaultEdge> instancesGraph) { SignatureMapCollection srcSignatureMap = signatureGenerator.generateIndexForTuples(srcTuples); for (TupleWithTable destTuple : destTuples) { if (logger.isDebugEnabled()) logger.debug("Finding a tuple that can be mapped in " + destTuple); List<SignatureAttributes> signatureAttributesForTable = srcSignatureMap.getRankedAttributesForTable(destTuple.getTable()); if (logger.isDebugEnabled()) logger.debug("Signature for table " + destTuple.getTable() + ": " + signatureAttributesForTable); List<TupleMatch> matchingTuples = findMatchingTuples(destTuple, signatureAttributesForTable, srcSignatureMap); if (logger.isDebugEnabled()) logger.debug("Possible matching tuples: " + matchingTuples); addEdgesBtwMatchingTuples(matchingTuples, instancesGraph); } } private List<TupleMatch> findMatchingTuples(TupleWithTable destinationTuple, List<SignatureAttributes> signatureAttributesForTable, SignatureMapCollection leftSignatureMaps) { List<TupleMatch> matchingTuples = new ArrayList<TupleMatch>(); Set<AttributeRef> attributesWithGroundValues = ComparisonUtility.findAttributesWithGroundValue(destinationTuple.getTuple()); for (SignatureAttributes signatureAttribute : signatureAttributesForTable) { if (logger.isTraceEnabled()) logger.trace("Checking signature attribute " + signatureAttribute); if (!ComparisonUtility.isCompatible(attributesWithGroundValues, signatureAttribute.getAttributes())) { if (logger.isTraceEnabled()) logger.trace("Skipping not compatible signature attribute " + signatureAttribute); continue; } SignatureMap signatureMap = leftSignatureMaps.getSignatureForAttributes(signatureAttribute); TupleSignature rightTupleSignature = signatureGenerator.generateSignature(destinationTuple, signatureAttribute.getAttributes()); List<Tuple> tuplesWithSameSignature = signatureMap.getTuplesForSignature(rightTupleSignature.getSignature()); if (tuplesWithSameSignature == null || tuplesWithSameSignature.isEmpty()) { continue; } for (Iterator<Tuple> it = tuplesWithSameSignature.iterator(); it.hasNext();) { Tuple srcTuple = it.next(); TupleWithTable srcTupleWithTable = new TupleWithTable(destinationTuple.getTable(), srcTuple); TupleMatch tupleMatch = tupleMatcher.checkMatch(srcTupleWithTable, destinationTuple); if (tupleMatch == null) { continue; } boolean compatible = compatibilityChecker.checkCompatibilityAndMerge(new ValueMappings(), tupleMatch); if (!compatible) { continue; } matchingTuples.add(tupleMatch); } } return matchingTuples; } private void addPlaceholders(TupleWithTable tuple, Map<IValue, Set<TupleWithTable>> placeholdersInverseMap) { for (Cell cell : tuple.getTuple().getCells()) { if (cell.isOID()) { continue; } IValue value = cell.getValue(); if (!SpeedyUtility.isPlaceholder(value)) { continue; } Set<TupleWithTable> tuplesWithPlaceholder = placeholdersInverseMap.getOrDefault(value, new HashSet<TupleWithTable>()); tuplesWithPlaceholder.add(tuple); placeholdersInverseMap.put(value, tuplesWithPlaceholder); } } private void addEdgesBtwTuples(Set<TupleWithTable> tuplesWithPlaceholder, UndirectedGraph<TupleWithTable, DefaultEdge> instancesGraph) { List<TupleWithTable> list = new ArrayList<>(tuplesWithPlaceholder); for (int i = 0; i < list.size(); i++) { for (int j = i + 1; j < list.size(); j++) { TupleWithTable tupleA = list.get(i); TupleWithTable tupleB = list.get(j); if (instancesGraph.getEdge(tupleA, tupleB) == null) { instancesGraph.addEdge(tupleA, tupleB); } } } } private void addEdgesBtwMatchingTuples(List<TupleMatch> matchingTuples, UndirectedGraph<TupleWithTable, DefaultEdge> instancesGraph) { for (TupleMatch matchingTuple : matchingTuples) { if (instancesGraph.getEdge(matchingTuple.getLeftTuple(), matchingTuple.getRightTuple()) == null) { instancesGraph.addEdge(matchingTuple.getLeftTuple(), matchingTuple.getRightTuple()); } } } private void saveGraph(UndirectedGraph<TupleWithTable, DefaultEdge> instancesGraph) { JGraphXAdapter<TupleWithTable, DefaultEdge> jgxAdapterContext = new JGraphXAdapter<TupleWithTable, DefaultEdge>(instancesGraph); jgxAdapterContext.getStylesheet().getDefaultEdgeStyle().put(mxConstants.STYLE_NOLABEL, "1"); jgxAdapterContext.getStylesheet().getDefaultEdgeStyle().put(mxConstants.STYLE_ENDARROW, "0"); jgxAdapterContext.setCellsEditable(false); jgxAdapterContext.setCellsMovable(false); jgxAdapterContext.setEdgeLabelsMovable(false); jgxAdapterContext.setCellsDeletable(false); jgxAdapterContext.setCellsDisconnectable(false); jgxAdapterContext.setCellsResizable(false); jgxAdapterContext.setCellsBendable(false); JFrame frame = new JFrame(); mxGraphComponent mxGraphComponent = new mxGraphComponent(jgxAdapterContext); frame.getContentPane().add(mxGraphComponent, BorderLayout.CENTER); mxHierarchicalLayout layout = new mxHierarchicalLayout(jgxAdapterContext); layout.execute(jgxAdapterContext.getDefaultParent()); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setTitle("Graph"); frame.pack(); frame.setLocationRelativeTo(null); // frame.setVisible(true); // try { // while (true) { // Thread.sleep(500); // } // } catch (InterruptedException ex) { // java.util.logging.Logger.getLogger(ComputeInstanceSimilarityBlock.class.getName()).log(Level.SEVERE, null, ex); // } try { BufferedImage image = mxCellRenderer.createBufferedImage(jgxAdapterContext, null, 1, Color.WHITE, true, null); File file = new File("/Users/Shared/Temp/bart/similarity/instances-graph.png"); file.getParentFile().mkdirs(); ImageIO.write(image, "PNG", file); } catch (IOException ex) { logger.error("Unable to save graph image: " + ex.getLocalizedMessage()); } } }
dbunibas/BART
Bart_Engine/src/bart/comparison/operators/ComputeInstanceSimilarityBlock.java
Java
mit
12,360
//------------------------------------------------------------------------------ // <auto-generated> // This code was generated from a template. // // Manual changes to this file may cause unexpected behavior in your application. // Manual changes to this file will be overwritten if the code is regenerated. // </auto-generated> //------------------------------------------------------------------------------ namespace EntityFrameworkPerformanceTests.DatabaseFirst { using System; using System.Collections.Generic; public partial class WorkOrder { public WorkOrder() { this.WorkOrderRoutings = new HashSet<WorkOrderRouting>(); } public int WorkOrderID { get; set; } public int ProductID { get; set; } public int OrderQty { get; set; } public int StockedQty { get; set; } public short ScrappedQty { get; set; } public System.DateTime StartDate { get; set; } public Nullable<System.DateTime> EndDate { get; set; } public System.DateTime DueDate { get; set; } public Nullable<short> ScrapReasonID { get; set; } public System.DateTime ModifiedDate { get; set; } public virtual Product Product { get; set; } public virtual ScrapReason ScrapReason { get; set; } public virtual ICollection<WorkOrderRouting> WorkOrderRoutings { get; set; } } }
hanssens/bucket
experiments/EntityFramework Performance/EntityFrameworkPerformanceTests/DatabaseFirst/WorkOrder.cs
C#
mit
1,427
module NewsScraper class ResponseError < StandardError attr_reader :error_code, :message, :url def initialize(opts = {}) @error_code = opts[:error_code] @message = opts[:message] @url = opts[:url] super end end module Transformers class ScrapePatternNotDefined < StandardError attr_reader :root_domain, :url def initialize(opts = {}) @root_domain = opts[:root_domain] @url = opts[:url] super end end end end
richardwu/news_scraper
lib/news_scraper/errors.rb
Ruby
mit
506
module DataForge module Transformation class Deduplication < TransformationBase class << self def from_input(source_name, options = {}) reader = File.reader_for source_name writer = File.writer_for(options.fetch :into, source_name) unique_fields = Array(options.fetch :using, reader.fields) new reader, writer, unique_fields end end def initialize(reader, writer, unique_fields) @reader, @writer, @unique_fields = reader, writer, unique_fields @fingerprints = Set.new end def execute with_writer @writer do |writer| @reader.each_record do |record| fingerprint = @unique_fields.map { |field_name| record[field_name] } unless @fingerprints.include? fingerprint @fingerprints.add fingerprint writer.write record end end end end end end end
zormandi/data_forge
lib/data_forge/transformation/deduplication.rb
Ruby
mit
968
// // MessageModel.h // HuLaQuan // // Created by liyan on 16/1/18. // Copyright © 2016年 yuwubao. All rights reserved. // #import <Foundation/Foundation.h> @interface MessageModel : NSObject @property (nonatomic, readonly) NSString *messageTitle; @property (nonatomic, readonly) NSString *messageTime; @property (nonatomic, readonly) NSString *messageImage; @property (nonatomic, readonly) NSString *messageContent; -(void)initValuesWithDictionary:(NSDictionary*) dicObject; +(MessageModel *)createUserWithUserInfoDictionary:(NSDictionary*)dicObject; @end
TsinHzl/GuiJiBao
APP_FK/HuLaQuan/MessageModel.h
C
mit
589
<!DOCTYPE html> <!-- saved from url=(0065)file:///C:/Users/kaycee/Desktop/%E7%AC%AC%E4%BA%8C%E8%AF%BE_1.htm --> <html> <head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>页面</title> <style> ul.two { list-style-type:square;} ol.one { list-style-type:lower-roman;} p.a { border-style: solid; border-width:thin;} p.b { border-style: solid; border-width:thick;} p.c{ border-style: solid; border-width: 1px 4px 8px 4px;} p.d{ border-style: dotted;} </style> </head> <body> <h2>设置粗体、斜体和下划线</h2> <p><b>我是粗体</b></p> <p><i>我是斜体</i></p> <p><u>我是下划线</u></p> <h2>设置有序和无序列表</h2> <ol>这是一个有序列表 <li>第一点</li> <li>第二点</li> <li>第三点</li> </ol> <ul>这是一个无序列表 <li>第一点</li> <li>第二点</li> <li>第三点</li> </ul> <ol class="one">怎么设置其他样子的有序列表呢? <li>第一点</li> <li>第二点</li> <li>第三点</li> </ol> <ul class="two">怎么设置其他样子的无序列表呢? <li>第一点</li> <li>第二点</li> <li>第三点</li> </ul> <h2>设置边框</h2> <p class="a">窄边框</p> <p class="b">宽边框</p> <p class="c">四条不同厚度的边框</p> <p class="d">不一样的边框</p> </body> </html>
LAB-Remote/LAB-Remote.github.io
internal/files/第三课_1.html
HTML
mit
1,427
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>io-system-ocaml: Not compatible 👼</title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / released</a></li> <li class="active"><a href="">8.12.2 / io-system-ocaml - 2.2.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> io-system-ocaml <small> 2.2.0 <span class="label label-info">Not compatible 👼</span> </small> </h1> <p>📅 <em><script>document.write(moment("2022-01-21 17:10:36 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-01-21 17:10:36 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-threads base base-unix base conf-findutils 1 Virtual package relying on findutils coq 8.12.2 Formal proof management system num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic ocaml 4.06.1 The OCaml compiler (virtual package) ocaml-base-compiler 4.06.1 Official 4.06.1 release ocaml-config 1 OCaml Switch Configuration ocamlfind 1.9.1 A library manager for OCaml # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;dev@clarus.me&quot; homepage: &quot;https://github.com/clarus/io-system-ocaml&quot; dev-repo: &quot;git+https://github.com/clarus/io-system-ocaml.git&quot; bug-reports: &quot;https://github.com/clarus/io-system-ocaml/issues&quot; authors: [&quot;Guillaume Claret&quot;] license: &quot;MIT&quot; build: [ [make &quot;-j%{jobs}%&quot;] ] install: [ [make &quot;install&quot;] ] depends: [ &quot;lwt&quot; {&lt; &quot;5&quot;} &quot;ocaml&quot; {&gt;= &quot;4.00.0&quot; &amp; &lt; &quot;4.06.0&quot;} &quot;ocamlbuild&quot; {build} &quot;ocamlfind&quot; {build} &quot;num&quot; ] conflicts: [ &quot;ocaml-secondary-compiler&quot; ] tags: [ &quot;date:2015-03-19&quot; &quot;keyword:effects&quot; &quot;keyword:extraction&quot; ] synopsis: &quot;Extraction to OCaml of system effects&quot; url { src: &quot;https://github.com/coq-io/system-ocaml/archive/2.2.0.tar.gz&quot; checksum: &quot;md5=14ca13ea6480df063255ebcadc0d4ca6&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install 🏜️</h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action coq-io-system-ocaml.2.2.0 coq.8.12.2</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.12.2). The following dependencies couldn&#39;t be met: - coq-io-system-ocaml -&gt; ocaml &lt; 4.06.0 base of this switch (use `--unlock-base&#39; to force) No solution found, exiting </pre></dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-io-system-ocaml.2.2.0</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Install 🚀</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Installation size</h2> <p>No files were installed.</p> <h2>Uninstall 🧹</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> Sources are on <a href="https://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣 </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
coq-bench/coq-bench.github.io
clean/Linux-x86_64-4.06.1-2.0.5/released/8.12.2/io-system-ocaml/2.2.0.html
HTML
mit
6,582
package provingground.interface import provingground._ import learning._ import scala.concurrent._ import ExecutionContext.Implicits.global // import FiniteDistribution._ import LinearStructure._ //import provingground.FiniteDistributionLearner.IterDynSys /** * @author gadgil * Runs dynamilac system with futures, blending results. */ class Blender[A](dyn: A => A)(implicit ls: LinearStructure[A]) { def asyncDynLoop(a: A, n: Int) = Future(IterateDyn(a, dyn, n)) def futDynLoop(fut: Future[A], n: Int) = fut flatMap ((a: A) => asyncDynLoop(a, n)) def iterFut(init: Future[A], copies: Int, loops: Int) = { val results = (1 to copies) map ((i) => futDynLoop(init, loops)) val termfut = Future.sequence(results) termfut map ((terms) => vAverage(terms)) } def iter(init: A, copies: Int, loops: Int) = iterFut(Future.successful(init), copies, loops) }
siddhartha-gadgil/ProvingGround
crust/src/main/scala/provingground/Blender.scala
Scala
mit
890
import numpy as np def data_concat(result_a): return np.concatenate(result_a, axis=0) def data_mean(result_a): return np.mean(result_a) def data_identity(result_a): return result_a def data_stack(result_a): return np.stack(result_a) def data_single(result_a): return result_a[0] def data_stack_mean(result_a): return np.mean(data_stack(result_a), axis=0)
haihabi/simpy
simpy/core/result/base_function.py
Python
mit
391
// // ZZPostlyExclusive.h // ZZOperationExtension // // Created by sablib on 15/12/2. // Copyright © 2015年 sablib. All rights reserved. // #import <Foundation/Foundation.h> #import "ZZMutuallyExclusive.h" @interface ZZPostlyExclusive : ZZMutuallyExclusive @end
sablib/ZZOperationExtension
ZZOperationExtension/Classes/ZZPostlyExclusive.h
C
mit
271
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>plugin-utils: Not compatible</title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / released</a></li> <li class="active"><a href="">8.11.2 / plugin-utils - 1.1.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> plugin-utils <small> 1.1.0 <span class="label label-info">Not compatible</span> </small> </h1> <p><em><script>document.write(moment("2020-08-31 05:47:56 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2020-08-31 05:47:56 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-threads base base-unix base conf-findutils 1 Virtual package relying on findutils conf-m4 1 Virtual package relying on m4 coq 8.11.2 Formal proof management system num 1.3 The legacy Num library for arbitrary-precision integer and rational arithmetic ocaml 4.11.0 The OCaml compiler (virtual package) ocaml-base-compiler 4.11.0 Official release 4.11.0 ocaml-config 1 OCaml Switch Configuration ocamlfind 1.8.1 A library manager for OCaml # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;gmalecha@gmail.com&quot; homepage: &quot;https://github.com/gmalecha/coq-plugin-utils&quot; bug-reports: &quot;https://github.com/gmalecha/coq-plugin-utils/issues&quot; license: &quot;MIT&quot; build: [ [make] ] install: [make &quot;install&quot;] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.5&quot; &amp; &lt; &quot;8.6~&quot;} ] tags: [ &quot;logpath:PluginUtils&quot; ] synopsis: &quot;Utility functions for implementing Coq plugins&quot; authors: &quot;Gregory Malecha&quot; url { src: &quot;https://github.com/gmalecha/coq-plugin-utils/archive/v1.1.0-8.5.tar.gz&quot; checksum: &quot;md5=9a4d59877f6eee9b4a8d0342b075d8b6&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install</h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action coq-plugin-utils.1.1.0 coq.8.11.2</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.11.2). The following dependencies couldn&#39;t be met: - coq-plugin-utils -&gt; coq &lt; 8.6~ -&gt; ocaml &lt; 4.06.0 base of this switch (use `--unlock-base&#39; to force) No solution found, exiting </pre></dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-plugin-utils.1.1.0</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Install</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Installation size</h2> <p>No files were installed.</p> <h2>Uninstall</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> <small>Sources are on <a href="https://github.com/coq-bench">GitHub</a>. © Guillaume Claret.</small> </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
coq-bench/coq-bench.github.io
clean/Linux-x86_64-4.11.0-2.0.7/released/8.11.2/plugin-utils/1.1.0.html
HTML
mit
6,334
export default class ChatService { constructor(webSocketService, $q, $rootScope) { this.channelName = 'chat'; this.webSocketService = webSocketService; this.$q = $q; } enterChat(){ var deferred = this.$q.defer(); if(this.webSocketService.isConnected()){ this.webSocketService.enterRoom(this.channelName, (data) => { deferred.resolve(data); }); } return deferred.promise; } leaveChat(){ this.webSocketService.leaveRoom(this.channelName, () => { this.webSocketService.socket.off('chat new message'); this.webSocketService.socket.off('chat user joined'); this.webSocketService.socket.off('chat user left'); }); } sendMessage(message){ var deferred = this.$q.defer(); this.webSocketService.socket.emit('chat message', message, (resp) => { deferred.resolve(resp); }); return deferred.promise; } listenNewMessage(cb){ this.webSocketService.listen('chat new message', cb); } listenUserJoin(cb){ this.webSocketService.listen('chat user joined', cb); } listenUserLeave(cb){ this.webSocketService.listen('chat user left', cb); } } ChatService.$inject = ['webSocketService', '$q', '$rootScope'];
LM-G/Genesis-Andromeda
client/app/commons/chat/chat.service.js
JavaScript
mit
1,227
var initSort = function() { $("#sortable").sortable({ containment: "document", items: "> div", handle: ".handle", tolerance: "pointer", cursor: "move", opacity: 0.8, revert: 300, delay: 150, placeholder: "movable-placeholder", start: function(e, ui) { ui.placeholder.height(ui.helper.outerHeight()); } }); $(".sortable-content-children").sortable({ items: "> div", tolerance: "pointer", containment: "parent" }); } var initDrag = function () { $(".sortable-content-children").sortable({ items: "> div", tolerance: "pointer", containment: "parent" }); } $(document).on('click', '.viewRoutine', function() { var routineId = $(this).children('input').val(); $("#routines").hide(); $("#viewRoutine").html('<div id="pageload">' + '<div class="showbox">' + '<div class="loader">' + '<svg class="circular" viewBox="25 25 50 50">' + '<circle class="path" cx="50" cy="50" r="20" fill="none" stroke-width="2" stroke-miterlimit="10"/>' + '</svg>' + '</div>' + '<p class="loader-text">Getting routine...</p>' + '</div>' + '</div>').show(); $.ajax({ url: '/routines/' + routineId, headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') }, method: 'GET', success: function(data) { $("#viewRoutine").html(data['data']).show(); $("#sortable").sortable({ handle: '.handle', cursor: 'move', cancel: '' }).disableSelection(); $('.selectpicker').selectpicker({}); initSort(); }, error: function() { $("#viewRoutine").hide(); $("#routines").show(); } }) }); $(document).on('click', '.routine-back', function() { $("#viewRoutine").empty().hide(); $("#routines").show(); $(".ps-container").scrollTop(0); $(".ps-container").perfectScrollbar('update'); }); $(document).on('click', '.deleteSharedRoutine', function() { var routineId = $(this).attr('id'); var name = $("#routine-" + routineId).find('.routine-name').html().trim(); swal({ title: 'Are you sure?', text: name + " will be removed from this list.", type: 'warning', showCancelButton: true, confirmButtonClass: 'btn btn-danger', cancelButtonClass: 'btn btn-primary', confirmButtonText: 'Yes, delete it!', buttonsStyling: false }).then(function () { swal({ title: 'Deleted!', text: 'The routine has been deleted.', type: 'success', confirmButtonClass: 'btn btn-primary', buttonsStyling: false }).done(); deleteRoutine(routineId); }).done(); }); /* Functions for deleting a routing */ $(document).on('click', '.deleteRoutine', function() { var routineId = $(this).attr('id'); var name = $("#routine-" + routineId).find('.routine-name').html().trim(); swal({ title: 'Are you sure?', text: name + " will be removed from your routines. However all connected workouts will not be deleted. You could also set the routine as inactive.", type: 'warning', showCancelButton: true, confirmButtonClass: 'btn btn-danger', cancelButtonClass: 'btn btn-primary', confirmButtonText: 'Yes, delete it!', buttonsStyling: false }).then(function () { swal({ title: 'Deleted!', text: 'Your routine has been deleted.', type: 'success', confirmButtonClass: 'btn btn-primary', buttonsStyling: false }).done(); deleteRoutine(routineId); }).done(); }); var deleteRoutine = function(routineId) { $.ajax({ url: '/routines/' + routineId + '/delete', headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') }, method: 'GET', success: function(data) { $("#routine-" + routineId).fadeOut(); $("tr.child").fadeOut(); } }); } /* Functions for removing/adding exerciserows */ $(document).on('click', '#addMore', function() { var currentExerciseNr = parseInt($("#exerciseNr").val()); var exerciseNr = currentExerciseNr + 1; var formData = '<div class="thisExercise">' + '<input class="exerciseOrder" type="hidden" name="exercises[' + exerciseNr + '][order_nr]" value="">' + '<div class="card m-t-10 m-b-10">' + '<div class="card-body">' + '<div class="sortable-content">' + '<div class="clearfix">' + '<div class="btn-sm btn-primary sort-icon handle float-left">' + '<span class="fal fa-arrows-v"></span> Drag to sort' + '</div>' + '<button type="button" class="deleteExercise btn btn-sm btn-danger float-right m-x-0"><span class="fal fa-trash"></span></button>' + '</div>' + '<div class="row">' + '<div class="col-xs-12 col-sm-6">' + '<div class="form-group m-t-10 label-floating">' + '<label class="bmd-label-floating" for="exercise_name">Excersice name</label>' + '<input type="text" class="required form-control exercise_name" id="exercise_name" name="exercises[' + exerciseNr + '][exercise_name]">' + '</div>' + '</div>' + '<div class="col-xs-12 col-sm-6">' + '<div class="form-group">' + '<select id="muscle_group" class="selectpicker" name="exercises[' + exerciseNr + '][muscle_group]" data-style="select-with-transition" title="Choose a muscle group" data-size="8">' + '<option selected disabled>Select a muscle group</option>' + '<option value="back">Back</option>' + '<option value="biceps">Biceps</option>' + '<option value="triceps">Triceps</option>' + '<option value="forearms">Forearms</option>' + '<option value="abs">Abs</option>' + '<option value="shoulders">Shoulders</option>' + '<option value="legs">Legs</option>' + '<option value="chest">Chest</option>' + '</select>' + '</div>' + '</div>' + '</div>' + '<div class="row">' + '<div class="col-xs-12 col-sm-4">' + '<div class="form-group m-t-10 label-floating">' + '<label class="bmd-label-floating" for="goal_weight">Weight goal</label>' + '<input type="number" step="any" class="required form-control" id="goal_weight" name="exercises[' + exerciseNr + '][goal_weight]">' + '</div>' + '</div>' + '<div class="col-xs-6 col-sm-4">' + '<div class="form-group m-t-10 label-floating">' + '<label class="bmd-label-floating" for="goal_sets">Sets goal</label>' + '<input type="number" class="required form-control" id="goal_sets" name="exercises[' + exerciseNr + '][goal_sets]">' + '</div>' + '</div>' + '<div class="col-xs-6 col-sm-4">' + '<div class="form-group m-t-10 label-floating">' + '<label class="bmd-label-floating" for="goal_reps">Reps goal</label>' + '<input type="number" class="required form-control" id="goal_reps" name="exercises[' + exerciseNr + '][goal_reps]">' + '</div>' + '</div>' + '</div>' + '<div class="row">' + '<div class="col-md-8 col-xs-6">' + '<div class="form-group label-floating">' + '<label class="bmd-label-floating" for="media">Media</label>' + '<input type="text" class="form-control" id="media" name="exercises[' + exerciseNr + '][media]">' + '<i class="material-icons material-icons-sm pointer is-tooltip" ' + 'onclick="logit.initModal(\'\', \'Here you can add any URL that you like. Maybe to a YouTube video showing how the exercise is done?\', false)">' + 'help' + '</i>' + '</div>' + '</div>' + '<div class="col-md-4 col-xs-6">' + '<div class="form-check mt-4">' + '<label class="form-check-label">' + '<input class="form-check-input" type="checkbox" name="exercises[' + exerciseNr + '][is_warmup]">' + 'Warmup set' + '<span class="form-check-sign">' + '<span class="check"></span>' + '</span>' + '</label>' + '</div>' + '</div>' + '</div>' + '</div>' + '</div>' + '</div>' + '</div>'; $("#exerciseNr").val(exerciseNr); $("#sortable").append(formData); $('.selectpicker').selectpicker({}); }); $(document).on('click', '#addSuperset', function() { var currentSupersetNr = parseInt($("#supersetNr").val()); var supersetNr = currentSupersetNr + 1; var formData = '<div class="thisExercise">' + '<input class="exerciseOrder" type="hidden" name="supersets[' + supersetNr + '][order_nr]" value="">' + '<div class="card card-transparent m-t-10 m-b-10">' + '<div class="card-body">' + '<div class="sortable-content">' + '<div class="clearfix">' + '<div class="btn-sm btn-primary sort-icon handle float-left">' + '<span class="fal fa-arrows-v"></span>' + ' Drag to sort' + '</div>' + '<button type="button" class="deleteExercise btn btn-sm btn-danger float-right m-x-0"><span class="fal fa-trash"></span></button>' + '</div>' + '<div class="form-group label-floating">' + '<label class="bmd-label-floating" for="exercise_name">Superset Name</label>' + '<input type="text" class="required form-control exercise_name" id="exercise_name" name="supersets[' + supersetNr + '][superset_name]">' + '</div>' + '</div>' + '<div class="sortable-content-children">' + '</div>' + '<input type="hidden" class="thisSupersetNr" value="' + supersetNr + '">' + '<button id="addMore-superset" type="button" class="btn btn-primary">Add another exercise</button>' + '</div>' + '</div>' + '</div>'; $("#supersetNr").val(supersetNr); $("#sortable").append(formData); $('.selectpicker').selectpicker({}); initSort(); }); $(document).on('click', '#addMore-superset', function() { var currentsupersetNr = parseInt($(this).parent().find('.thisSupersetNr').val()); var supersetNr = currentsupersetNr; var currentExerciseNr = parseInt($("#exerciseNr").val()); var exerciseNr = currentExerciseNr + 1; var formData = '<div class="thisExercise">' + '<div class="card m-t-10 m-b-10">' + '<div class="card-body">' + '<div class="sortable-content">' + '<div class="clearfix">' + '<div class="btn-sm btn-primary sort-icon handle float-left">' + '<span class="fal fa-arrows-v"></span>' + ' Drag to sort' + '</div>' + '<button type="button" class="deleteExercise btn btn-sm btn-danger float-right m-x-0"><span class="fal fa-trash"></span></button>' + '</div>' + '<div class="row">' + '<div class="col-xs-12 col-sm-6">' + '<div class="form-group label-floating">' + '<label class="bmd-label-floating" for="exercise_name">Excersice name</label>' + '<input type="text" class="required form-control exercise_name" id="exercise_name" name="supersets[' + supersetNr + '][' + exerciseNr + '][exercise_name]">' + '</div>' + '</div>' + '<div class="col-xs-12 col-sm-6">' + '<div class="form-group">' + '<select id="muscle_group" name="supersets[' + supersetNr + '][' + exerciseNr + '][muscle_group]" class="selectpicker" data-style="select-with-transition" title="Choose a muscle group" data-size="8">' + '<option selected disabled>Select a muscle group</option>' + '<option value="back">Back</option>' + '<option value="biceps">Biceps</option>' + '<option value="triceps">Triceps</option>' + '<option value="forearms">Forearms</option>' + '<option value="abs">Abs</option>' + '<option value="shoulders">Shoulders</option>' + '<option value="legs">Legs</option>' + '<option value="chest">Chest</option>' + '</select>' + '</div>' + '</div>' + '</div>' + '<div class="row">' + '<div class="col-md-4">' + '<div class="form-group label-floating">' + '<label class="bmd-label-floating" for="goal_weight">Weight goal</label>' + '<input type="number" step="any" class="required form-control" id="goal_weight" name="supersets[' + supersetNr + '][' + exerciseNr + '][goal_weight]">' + '</div>' + '</div>' + '<div class="col-sm-6 col-xs-6 col-md-4">' + '<div class="form-group label-floating">' + '<label class="bmd-label-floating" for="goal_sets">Sets goal</label>' + '<input type="number" class="required form-control" id="goal_sets" name="supersets[' + supersetNr + '][' + exerciseNr + '][goal_sets]">' + '</div>' + '</div>' + '<div class="col-sm-6 col-xs-6 col-md-4">' + '<div class="form-group label-floating">' + '<label class="bmd-label-floating" for="goal_reps">Reps goal</label>' + '<input type="number" class="required form-control" id="goal_reps" name="supersets[' + supersetNr + '][' + exerciseNr + '][goal_reps]">' + '</div>' + '</div>' + '</div>' + '<div class="row">' + '<div class="col-md-8 col-xs-6">' + '<div class="form-group label-floating">' + '<label class="bmd-label-floating" for="media">Media</label>' + '<input type="text" class="form-control" id="media" name="supersets[' + supersetNr + '][' + exerciseNr + '][media]">' + '<i class="material-icons material-icons-sm pointer is-tooltip" ' + 'onclick="logit.initModal(\'\', \'Here you can add any URL that you like. Maybe to a YouTube video showing how the exercise is done?\', false)">' + 'help' + '</i>' + '</div>' + '</div>' + '<div class="col-md-4 col-xs-6">' + '<div class="form-check mt-4">' + '<label class="form-check-label">' + '<input class="form-check-input" type="checkbox" name="supersets[' + supersetNr + '][' + exerciseNr + '][is_warmup]">' + 'Warmup set' + '<span class="form-check-sign">' + '<span class="check"></span>' + '</span>' + '</label>' + '</div>' + '</div>' + '</div>' + '</div>' + '</div>' + '</div>' + '</div>'; $("#supersetNr").val(supersetNr); $("#exerciseNr").val(exerciseNr); $(this).parent().find(".sortable-content-children").append(formData); $('.selectpicker').selectpicker({}); initDrag(); }); $(document).on('click', '.deleteExercise', function() { $(this).closest('.thisExercise').fadeOut(function() { $(this).empty(); }); }); $(document).on('click', '#addRoutine', function() { var ok = true $(".required").each(function() { if ($(this).val() == "" || $(this).val() == null) { $(this).closest(".form-group").addClass("has-danger").find(".bmd-label-floating").removeClass("hidden") ok = false } else { $(this).closest(".form-group").removeClass("has-danger").find(".bmd-label-floating").addClass("hidden") } }); $(".btn-group.bootstrap-select").each(function() { if ($(this).find('button').attr('title') == "Select a muscle group") { $(this).closest(".form-group").addClass("has-danger").find(".bmd-label-floating").removeClass("hidden") ok = false } else { $(this).closest(".form-group").removeClass("has-danger").find(".bmd-label-floating").addClass("hidden") } }); var names = []; var dupes = []; var namesOk = false; $(".exercise_name").each(function() { names.push($(this).val()) }); names.sort() for (var i = 0; i < names.length - 1; i++) { if (names[i + 1] == names[i]) { dupes.push(names[i]); namesOk = true; ok = false; } } if (namesOk) { $("#alert-field").html('<div class="alert alert-danger">' + '<strong>Whops!</strong> Some of your exercises shares the same name (' + dupes[0] + '). This might cause issues. Append something to your duplicate exercisenames and try again.' + '</div>') } else { $("#alert-field").empty(); } // Gives each element proper ording $(".exerciseOrder").each(function(key) { $(this).val(key); }) if (ok) { $(this).html('<span class="fal fa-spin fa-circle-notch"></span> Saving changes ...'); } return ok }); $(document).on('click', '#changeStatus', function() { var routineId = $("#routineId").val(); var status = $("#status").val(); $.ajax({ url: '/routines/' + routineId + '/edit/status/', headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') }, method: 'POST', data: { 'routineId': routineId, 'status': status, }, success: function(data) { if (data.success) { location.reload(); } else { $("#changeStatus").removeClass("btn-default").addClass("btn-danger").text("Refresh page and try again!") } }, error: function() { $("#changeStatus").removeClass("btn-default").addClass("btn-danger").text("Refresh page and try again!") } }) }); $(document).ready(function() { $('#datatables').DataTable({ "pagingType": "full_numbers", "lengthMenu": [ [10, 25, 50, -1], [10, 25, 50, "All"] ], responsive: true, language: { search: "_INPUT_", searchPlaceholder: "Search records", } }); var table = $('#datatables').DataTable(); initSort(); });
JorgenSolli/Logit
resources/assets/js/routines.js
JavaScript
mit
19,289
# _*_ coding: utf-8 _*_ import os try: from cStringIO import StringIO # python 2 except ImportError: from io import StringIO # python 3 from collections import OrderedDict import unittest from tornado.escape import to_unicode from tortik.util import make_qs, update_url, real_ip from tortik.util.xml_etree import parse, tostring class Request(object): headers = {} remote_ip = None class BaseTest(unittest.TestCase): def assertQueriesEqual(self, qs1, qs2): qs1_list = sorted(qs1.split('&')) qs2_list = sorted(qs2.split('&')) self.assertEqual(qs1_list, qs2_list) def assertUrlsEqual(self, url1, url2): u1 = url1.split('?') u2 = url2.split('?') self.assertEqual(len(u1), len(u2)) self.assertEqual(u1[0], u2[0]) if len(u1) > 1: self.assertQueriesEqual(u1[1], u2[1]) class TestMakeQs(BaseTest): """This is copy of Frontik's make_qs test: https://github.com/hhru/frontik/blob/master/tests/test_util.py """ def test_make_qs_simple(self): query_args = {'a': '1', 'b': '2'} self.assertQueriesEqual(make_qs(query_args), 'a=1&b=2') def test_make_qs_not_str(self): query_args = {'a': 1, 'b': 2.0, 'c': True} self.assertQueriesEqual(make_qs(query_args), 'a=1&b=2.0&c=True') def test_make_qs_iterables(self): query_args = {'a': [1, 2], 'b': {1, 2}, 'c': (1, 2), 'd': frozenset((1, 2))} self.assertQueriesEqual(make_qs(query_args), 'a=1&a=2&b=1&b=2&c=1&c=2&d=1&d=2') def test_make_qs_none(self): query_args = {'a': None, 'b': None} self.assertQueriesEqual(make_qs(query_args), '') def test_make_qs_encode(self): query_args = {'a': u'тест', 'b': 'тест'} qs = make_qs(query_args) self.assertIsInstance(qs, str) self.assertQueriesEqual(qs, 'a=%D1%82%D0%B5%D1%81%D1%82&b=%D1%82%D0%B5%D1%81%D1%82') def test_from_ordered_dict(self): qs = make_qs(OrderedDict([('z', 'я'), ('г', 'd'), ('b', ['2', '1'])])) self.assertIsInstance(qs, str) self.assertEqual(qs, 'z=%D1%8F&%D0%B3=d&b=2&b=1') def test_unicode_params(self): self.assertQueriesEqual( make_qs({'при': 'вет', u'по': u'ка'}), '%D0%BF%D1%80%D0%B8=%D0%B2%D0%B5%D1%82&%D0%BF%D0%BE=%D0%BA%D0%B0' ) def test_make_qs_comma(self): query_args = {'a': '1,2,3', 'b': 'asd'} self.assertQueriesEqual(make_qs(query_args, '/,'), 'a=1,2,3&b=asd') def test_make_qs_comma_quoted(self): # default value for `safe` parameter of make_qs is '/' so commas # should be encoded query_args = {'a': '1,2,3', 'b': 'asd'} self.assertQueriesEqual(make_qs(query_args), 'a=1%2C2%2C3&b=asd') class TestUpdateUrl(BaseTest): def test_simple(self): self.assertUrlsEqual(update_url('http://google.com'), 'http://google.com') self.assertUrlsEqual(update_url('https://google.com'), 'https://google.com') self.assertUrlsEqual(update_url('google.com'), 'google.com') self.assertUrlsEqual(update_url('//google.com'), '//google.com') self.assertUrlsEqual(update_url('http://google.com?a=1'), 'http://google.com?a=1') self.assertUrlsEqual(update_url('http://google.com?a=1&b=2'), 'http://google.com?a=1&b=2') self.assertUrlsEqual(update_url('http://google.com?привет=1'), 'http://google.com?%D0%BF%D1%80%D0%B8%D0%B2%D0%B5%D1%82=1') self.assertUrlsEqual(update_url(u'http://google.com?привет=1'), 'http://google.com?%D0%BF%D1%80%D0%B8%D0%B2%D0%B5%D1%82=1') def test_update_args(self): self.assertUrlsEqual(update_url('http://google.com', update_args={'a': 1}), 'http://google.com?a=1') self.assertUrlsEqual(update_url('http://google.com', update_args={'a': '1'}), 'http://google.com?a=1') self.assertUrlsEqual(update_url('http://google.com', update_args={'a': u'1'}), 'http://google.com?a=1') self.assertUrlsEqual(update_url('http://google.com', update_args={u'a': u'1'}), 'http://google.com?a=1') self.assertUrlsEqual(update_url('http://google.com?a=2', update_args={'a': 1}), 'http://google.com?a=1') self.assertUrlsEqual(update_url('http://google.com?a=2&b=1', update_args={'a': 1}), 'http://google.com?a=1&b=1') def test_remove_args(self): self.assertUrlsEqual(update_url('http://google.com?a=2', remove_args=['a']), 'http://google.com') self.assertUrlsEqual(update_url('http://google.com?a=2', remove_args=[u'a']), 'http://google.com') self.assertUrlsEqual(update_url('http://google.com?привет=2', remove_args=['привет']), 'http://google.com') self.assertUrlsEqual(update_url(u'http://google.com?привет=2', remove_args=[u'привет']), 'http://google.com') self.assertUrlsEqual(update_url('http://google.com?a=2&a=1', remove_args=['a']), 'http://google.com') self.assertUrlsEqual(update_url('http://google.com?a=2&a=1&b=3', remove_args=['a']), 'http://google.com?b=3') self.assertUrlsEqual(update_url('http://google.com?a=2&a=1&b=3', remove_args=['b']), 'http://google.com?a=2&a=1') def test_both(self): self.assertUrlsEqual(update_url('http://google.com?b=3', update_args={'a': 1}, remove_args=['b']), 'http://google.com?a=1') self.assertUrlsEqual(update_url('http://google.com?a=2&b=3&c=4', update_args={'a': 1}, remove_args=['b']), 'http://google.com?a=1&c=4') class TestParse(BaseTest): def test_parse_xml(self): fd = open(os.path.join(os.path.dirname(__file__), 'data', 'simple.xml'), 'r') tree = parse(fd) self.assertEqual(tree.getroot().tag, 'data') convert = tostring(tree.getroot(), pretty_print=True, xml_declaration=True, encoding='UTF-8') # replace any possible conversion differences that are ok # Python 3+ native etree does not include xml declaration so we should remove it everywhere converted = to_unicode(convert).replace('\n', '').replace(' ', '').replace('\'', '"').\ replace('<?xmlversion="1.0"encoding="UTF-8"?>', '').strip() fd.seek(0) base = to_unicode(fd.read()).replace('\n', '').replace(' ', '').\ replace('<?xmlversion="1.0"encoding="UTF-8"?>', '').strip() self.assertEqual(converted, base) fd.close() class TestRealIp(BaseTest): def test_real_ip(self): # default request = Request() self.assertEqual('127.0.0.1', real_ip(request)) request = Request() request.headers = {'X-Real-Ip': '8.8.8.8', 'X-Forwarded-For': '10.0.0.1'} self.assertEqual('8.8.8.8', real_ip(request)) request = Request() request.headers = {'X-Forwarded-For': '10.0.0.1, 127.0.0.1'} self.assertEqual('10.0.0.1', real_ip(request))
glibin/tortik
tortik_tests/util_test.py
Python
mit
7,001
module Indocker VERSION = '0.0.25'.freeze end
droidlabs/indocker
lib/indocker/version.rb
Ruby
mit
47
<? $PaginaPrefijo='../'; $pagina = $PHP_SELF; if (substr($pagina,-1)=='/') $pagina = substr($pagina,0,strlen($pagina)-1); if (substr($pagina,-10)=='/index.php') $pagina = substr($pagina,0,strlen($pagina)-10); $Alias = 'ajsaasdoc'; $PaginaMenu = 'menu.inc.php'; include('../PaginaMuestra.php'); ?>
ajlopez/ajlopezsite
web/ajsaas/documentation.php
PHP
mit
329
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>hammer-tactics: 26 s 🏆</title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / released</a></li> <li class="active"><a href="">8.12.0 / hammer-tactics - 1.3+8.12</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> hammer-tactics <small> 1.3+8.12 <span class="label label-success">26 s 🏆</span> </small> </h1> <p>📅 <em><script>document.write(moment("2021-11-26 21:48:02 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-11-26 21:48:02 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-threads base base-unix base conf-findutils 1 Virtual package relying on findutils coq 8.12.0 Formal proof management system num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic ocaml 4.08.1 The OCaml compiler (virtual package) ocaml-base-compiler 4.08.1 Official release 4.08.1 ocaml-config 1 OCaml Switch Configuration ocamlfind 1.9.1 A library manager for OCaml # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;palmskog@gmail.com&quot; homepage: &quot;https://github.com/lukaszcz/coqhammer&quot; dev-repo: &quot;git+https://github.com/lukaszcz/coqhammer.git&quot; bug-reports: &quot;https://github.com/lukaszcz/coqhammer/issues&quot; license: &quot;LGPL-2.1-only&quot; synopsis: &quot;Reconstruction tactics for the hammer for Coq&quot; description: &quot;&quot;&quot; Collection of tactics that are used by the hammer for Coq to reconstruct proofs found by automated theorem provers. When the hammer has been successfully applied to a project, only this package needs to be installed; the hammer plugin is not required. &quot;&quot;&quot; build: [make &quot;-j%{jobs}%&quot; {ocaml:version &gt;= &quot;4.06&quot;} &quot;tactics&quot;] install: [ [make &quot;install-tactics&quot;] [make &quot;test-tactics&quot;] {with-test} ] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.12&quot; &amp; &lt; &quot;8.13~&quot;} ] conflicts: [ &quot;coq-hammer&quot; {!= version} ] tags: [ &quot;keyword:automation&quot; &quot;keyword:hammer&quot; &quot;keyword:tactics&quot; &quot;logpath:Hammer.Tactics&quot; &quot;date:2020-07-28&quot; ] authors: [ &quot;Lukasz Czajka &lt;lukaszcz@mimuw.edu.pl&gt;&quot; ] url { src: &quot;https://github.com/lukaszcz/coqhammer/archive/v1.3-coq8.12.tar.gz&quot; checksum: &quot;sha512=666ea825c122319e398efb7287f429ebfb5d35611b4cabe4b88732ffb5c265ef348b53d5046c958831ac0b7a759b44ce1ca04220ca68b1915accfd23435b479c&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install 🏜️</h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action coq-hammer-tactics.1.3+8.12 coq.8.12.0</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam list; echo; ulimit -Sv 4000000; timeout 4h opam install -y --deps-only coq-hammer-tactics.1.3+8.12 coq.8.12.0</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>12 s</dd> </dl> <h2>Install 🚀</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam list; echo; ulimit -Sv 16000000; timeout 4h opam install -y -v coq-hammer-tactics.1.3+8.12 coq.8.12.0</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>26 s</dd> </dl> <h2>Installation size</h2> <p>Total: 1 M</p> <ul> <li>397 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Hammer/Tactics/hammer_tactics.cmxs</code></li> <li>245 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Hammer/Tactics/Reconstr.vo</code></li> <li>164 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Hammer/Tactics/hammer_lib.cmxs</code></li> <li>161 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Hammer/Tactics/Tactics.vo</code></li> <li>77 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Hammer/Tactics/Reconstr.glob</code></li> <li>75 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Hammer/Tactics/Reflect.vo</code></li> <li>54 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Hammer/Tactics/Hints.vo</code></li> <li>47 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Hammer/Tactics/Reconstr.v</code></li> <li>43 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Hammer/Tactics/Tactics.glob</code></li> <li>33 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Hammer/Tactics/Tactics.v</code></li> <li>25 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Hammer/Tactics/Reflect.glob</code></li> <li>22 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Hammer/Tactics/hammer_lib.cmxa</code></li> <li>19 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Hammer/Tactics/hammer_tactics.cmxa</code></li> <li>16 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Hammer/Tactics/hhutils.cmi</code></li> <li>14 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Hammer/Tactics/sauto.cmx</code></li> <li>13 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Hammer/Tactics/tactics_main.cmi</code></li> <li>10 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Hammer/Tactics/sauto.cmi</code></li> <li>10 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Hammer/Tactics/hhutils.cmx</code></li> <li>9 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Hammer/Tactics/Reflect.v</code></li> <li>9 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Hammer/Tactics/hhlib.cmi</code></li> <li>7 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Hammer/Tactics/tactics_main.cmx</code></li> <li>6 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Hammer/Tactics/g_hammer_tactics.cmi</code></li> <li>6 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Hammer/Tactics/hhlpo.cmx</code></li> <li>6 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Hammer/Tactics/g_hammer_tactics.cmx</code></li> <li>6 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Hammer/Tactics/g_hammer_lib.cmx</code></li> <li>6 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Hammer/Tactics/g_hammer_lib.cmi</code></li> <li>4 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Hammer/Tactics/hammer_errors.cmi</code></li> <li>4 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Hammer/Tactics/Hints.v</code></li> <li>4 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Hammer/Tactics/Hints.glob</code></li> <li>4 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Hammer/Tactics/hammer_errors.cmx</code></li> <li>3 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Hammer/Tactics/hhlib.cmx</code></li> <li>3 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Hammer/Tactics/hhlpo.cmi</code></li> </ul> <h2>Uninstall 🧹</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq-hammer-tactics.1.3+8.12</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> Sources are on <a href="https://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣 </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
coq-bench/coq-bench.github.io
clean/Linux-x86_64-4.08.1-2.0.5/released/8.12.0/hammer-tactics/1.3+8.12.html
HTML
mit
10,803
'use strict'; angular.module('yeoMeanApp') .controller('ContactCtrl', function ($rootScope, $scope) { $rootScope.metaTitle = "Contact | Brian Mitchell"; $rootScope.metaDescription = "Where to find Brian Mitchell"; $rootScope.metaType = "website"; $rootScope.metaImage = "/assets/images/BM-Logo-Large.png"; });
bman4789/YeoMEAN
client/app/contact/contact.controller.js
JavaScript
mit
331
# AlpineLinux with a glibc-2.23 and Oracle Java 8 FROM tomaer/alpine:edge-gmt8-aliyun MAINTAINER tomaer <i@tomaer.com> # Anastas Dancha <anapsix@random.io> # thanks to Vladimir Krivosheev <develar@gmail.com> aka @develar for smaller image # and Victor Palma <palma.victor@gmail.com> aka @devx for pointing it out # Java Version and other ENV ENV JAVA_VERSION_MAJOR=8 \ JAVA_VERSION_MINOR=121 \ JAVA_VERSION_BUILD=13 \ JAVA_PACKAGE=server-jre \ JAVA_JCE=standard \ JAVA_HOME=/opt/jdk \ PATH=${PATH}:/opt/jdk/bin \ GLIBC_VERSION=2.23-r3 \ LANG=C.UTF-8 # do all in one step RUN set -ex && \ apk add --update libstdc++ && \ for pkg in glibc-${GLIBC_VERSION} glibc-bin-${GLIBC_VERSION} glibc-i18n-${GLIBC_VERSION}; do curl -sSL https://github.com/andyshinn/alpine-pkg-glibc/releases/download/${GLIBC_VERSION}/${pkg}.apk -o /tmp/${pkg}.apk; done && \ apk add --allow-untrusted /tmp/*.apk && \ rm -v /tmp/*.apk && \ ( /usr/glibc-compat/bin/localedef --force --inputfile POSIX --charmap UTF-8 C.UTF-8 || true ) && \ echo "export LANG=C.UTF-8" > /etc/profile.d/locale.sh && \ /usr/glibc-compat/sbin/ldconfig /lib /usr/glibc-compat/lib && \ mkdir /opt && \ curl -jksSLH "Cookie: oraclelicense=accept-securebackup-cookie" -o /tmp/java.tar.gz \ http://download.oracle.com/otn-pub/java/jdk/${JAVA_VERSION_MAJOR}u${JAVA_VERSION_MINOR}-b${JAVA_VERSION_BUILD}/e9e7ea248e2c4826b92b3f075a80e441/${JAVA_PACKAGE}-${JAVA_VERSION_MAJOR}u${JAVA_VERSION_MINOR}-linux-x64.tar.gz && \ gunzip /tmp/java.tar.gz && \ tar -C /opt -xf /tmp/java.tar && \ ln -s /opt/jdk1.${JAVA_VERSION_MAJOR}.0_${JAVA_VERSION_MINOR} /opt/jdk && \ find /opt/jdk/ -maxdepth 1 -mindepth 1 | grep -v jre | xargs rm -rf && \ cd /opt/jdk/ && ln -s ./jre/bin ./bin && \ if [ "${JAVA_JCE}" == "unlimited" ]; then echo "Installing Unlimited JCE policy" && \ curl -jksSLH "Cookie: oraclelicense=accept-securebackup-cookie" -o /tmp/jce_policy-${JAVA_VERSION_MAJOR}.zip \ http://download.oracle.com/otn-pub/java/jce/${JAVA_VERSION_MAJOR}/jce_policy-${JAVA_VERSION_MAJOR}.zip && \ cd /tmp && unzip /tmp/jce_policy-${JAVA_VERSION_MAJOR}.zip && \ cp -v /tmp/UnlimitedJCEPolicyJDK8/*.jar /opt/jdk/jre/lib/security/; \ fi && \ sed -i s/#networkaddress.cache.ttl=-1/networkaddress.cache.ttl=10/ $JAVA_HOME/jre/lib/security/java.security && \ apk del curl glibc-i18n && \ rm -rf /opt/jdk/jre/plugin \ /opt/jdk/jre/bin/javaws \ /opt/jdk/jre/bin/jjs \ /opt/jdk/jre/bin/orbd \ /opt/jdk/jre/bin/pack200 \ /opt/jdk/jre/bin/policytool \ /opt/jdk/jre/bin/rmid \ /opt/jdk/jre/bin/rmiregistry \ /opt/jdk/jre/bin/servertool \ /opt/jdk/jre/bin/tnameserv \ /opt/jdk/jre/bin/unpack200 \ /opt/jdk/jre/lib/javaws.jar \ /opt/jdk/jre/lib/deploy* \ /opt/jdk/jre/lib/desktop \ /opt/jdk/jre/lib/*javafx* \ /opt/jdk/jre/lib/*jfx* \ /opt/jdk/jre/lib/amd64/libdecora_sse.so \ /opt/jdk/jre/lib/amd64/libprism_*.so \ /opt/jdk/jre/lib/amd64/libfxplugins.so \ /opt/jdk/jre/lib/amd64/libglass.so \ /opt/jdk/jre/lib/amd64/libgstreamer-lite.so \ /opt/jdk/jre/lib/amd64/libjavafx*.so \ /opt/jdk/jre/lib/amd64/libjfx*.so \ /opt/jdk/jre/lib/ext/jfxrt.jar \ /opt/jdk/jre/lib/ext/nashorn.jar \ /opt/jdk/jre/lib/oblique-fonts \ /opt/jdk/jre/lib/plugin.jar \ /tmp/* /var/cache/apk/* && \ echo 'hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4' >> /etc/nsswitch.conf # EOF
tomaer/docker-oracle-java
X86/8/gmt8-aliyun/121b13/standard/server-jre/Dockerfile
Dockerfile
mit
3,719
<?php /* * Designed to send email to a user(s) */ class Mail { private $m_message; private $m_recipients; // array of recipients private $m_sender; private $m_subject; private $m_html; // default is html mail function Mail() { $this->m_html = true; $this->m_message = " "; $this->m_sender = null; $this->m_subject = " "; $this->m_recipients = array(); } function __construct() { $this->Mail(); } function addRecipient($to) { $filteredEmail = filter_var($to, FILTER_VALIDATE_EMAIL); if ($filteredEmail != FALSE) { $this->m_recipients[] = $filteredEmail; } } function removeRecipient($to) { $filteredEmail = filter_var($to, FILTER_VALIDATE_EMAIL); if ($filteredEmail != FALSE) { if (array_key_exists($filteredEmail, $this->m_recipients) == true) { unset($this->m_recipients[$filteredEmail]); } } } function setSender($from) { $filteredEmail = filter_var($from, FILTER_VALIDATE_EMAIL); if ($filteredEmail != FALSE) { $this->m_sender = $filteredEmail; } else { $this->m_sender = null; } } function setMessage($message) { $this->m_message = $message; } function isHtml($htmlFlag) { $this->m_html = $htmlFlag; } function setSubject($subject) { $this->m_subject = $subject; } function sendMessage() { $success = false; if (count($this->m_recipients) > 0) { if ($this->m_sender != null) { $toList = null; // Build up our to list foreach ($this->m_recipients as $name => $value) { if ($toList != null) { $toList .= ", " . $value; } else { $toList = $value; } } $headers = "From: " . $this->m_sender . PHP_EOL; $headers .= "Reply-To: " . $this->m_sender . PHP_EOL; $headers .= "X-Mailer: PHP/" . phpversion() . PHP_EOL; // Build up the headers if ($this->m_html == true) { $headers .= "MIME-Version 1.0" . PHP_EOL; $headers .= "Content-type: text/html; charset=iso-8859-1" . PHP_EOL; } $success = mail($toList, $this->m_subject, $this->m_message, $headers); } else { error_log("No sender specified."); } } else { error_log("No recipients specified."); } return $success; } } ?>
milligan22963/PageBuilder
toolbox/mailer.php
PHP
mit
2,259
require 'rails_helper' RSpec.describe Article, :type => :model do # Associations ------------------------------------------------------- it { should belong_to(:feed) } # Validations -------------------------------------------------------- it { should validate_presence_of(:title) } it { should validate_presence_of(:url) } it { should validate_presence_of(:full_story) } end
ptrckbrwn/idoru
spec/models/article_spec.rb
Ruby
mit
393
<?php use ArenaPl\ApiCall\ApiCallInterface; use ArenaPl\Client; class ArenaPl_Magento_Model_Resource_Exportservice { /** * @var Client */ protected $client; /** * @var ArenaPl_Magento_Model_Mapper */ protected $mapper; /** * @var Mage_Catalog_Model_Resource_Product_Relation */ protected $productsRelation; public function __construct() { $this->mapper = Mage::getSingleton('arenapl_magento/mapper'); $this->client = Mage::helper('arenapl_magento')->getClient(); $this->productsRelation = Mage::getResourceSingleton('catalog/product_relation'); } /** * @param int $arenaProductId * * @return bool */ public function ensureArenaProductMasterVisible($arenaProductId) { try { return $this->client->restoreArchivedProduct() ->setProductId($arenaProductId) ->getResult(); } catch (Exception $e) { return false; } } /** * @param int $arenaProductId * @param int $arenaProductVariantId * * @return bool */ public function ensureArenaProductVariantVisible($arenaProductId, $arenaProductVariantId) { try { return $this->client->restoreArchivedProductVariant() ->setProductId($arenaProductId) ->setProductVariantId($arenaProductVariantId) ->getResult(); } catch (Exception $e) { return false; } } /** * @param int $arenaProductId */ public function archiveProduct($arenaProductId) { try { $this->client->archiveProduct() ->setProductId($arenaProductId) ->getResult(); } catch (Exception $e) { return; } } /** * @param int $arenaProductId * @param int $arenaProductVariantId */ public function archiveProductVariant($arenaProductId, $arenaProductVariantId) { try { $this->client->archiveProductVariant() ->setProductId($arenaProductId) ->setProductVariantId($arenaProductVariantId) ->getResult(); } catch (Exception $e) { return; } } /** * @param Mage_Catalog_Model_Product $product * * @return int[]|null[] */ public function exportNewProduct(Mage_Catalog_Model_Product $product) { $productData = $this->prepareArenaCompatibleProductData($product); try { $apiCall = $this->client->createProduct() ->setProductData($productData); $result = $apiCall->getResult(); return (empty($result['id']) || empty($result['master']['id'])) ? [null, null] : [(int) $result['id'], (int) $result['master']['id']]; } catch (Exception $e) { return; } } /** * @param Mage_Catalog_Model_Product $product * @param int $arenaProductId * @param int[] $productOptionValues * * @return int|null */ public function exportNewProductVariant( Mage_Catalog_Model_Product $product, $arenaProductId, array $productOptionValues ) { $variantData = $this->prepareArenaCompatibleProductVariantData($product); try { $apiCall = $this->client->createProductVariant() ->setVariantData($variantData) ->setOptionValueIds($productOptionValues) ->setProductId($arenaProductId); $result = $apiCall->getResult(); return empty($result['id']) ? null : (int) $result['id']; } catch (Exception $e) { return; } } /** * @param Mage_Catalog_Model_Product $product * * @return bool */ public function isProductTypeSimple(Mage_Catalog_Model_Product $product) { return $product->getTypeId() === Mage_Catalog_Model_Product_Type::TYPE_SIMPLE; } /** * @param Mage_Catalog_Model_Product $product * * @return bool */ public function isProductTypeConfigurable(Mage_Catalog_Model_Product $product) { return $product->getTypeId() === Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE; } /** * @param Mage_Catalog_Model_Product $product * @param int $arenaProductId */ public function exportExistingMasterProduct( Mage_Catalog_Model_Product $product, $arenaProductId ) { $productData = $this->prepareArenaCompatibleProductData($product); try { $this->client->updateProduct() ->setProductId($arenaProductId) ->setProductData($productData) ->getResult(); } catch (Exception $e) { return; } } /** * @param Mage_Catalog_Model_Product $product * @param int $arenaProductId * @param int $arenaProductVariantId * @param int[] $productOptionValues */ public function exportExistingVariantProduct( Mage_Catalog_Model_Product $product, $arenaProductId, $arenaProductVariantId, array $productOptionValues ) { $variantData = $this->prepareArenaCompatibleProductVariantData($product); try { $this->client->updateProductVariant() ->setVariantData($variantData) ->setOptionValueIds($productOptionValues) ->setProductVariantId($arenaProductVariantId) ->setProductId($arenaProductId) ->getResult(); } catch (Exception $e) { return; } } /** * @param Mage_Catalog_Model_Product $product * * @return array */ protected function prepareArenaCompatibleProductData(Mage_Catalog_Model_Product $product) { $description = $product->getDescription(); $sku = $product->getSku(); $weight = $product->getWeight(); $data = [ 'name' => (string) $product->getName(), 'external_product_id' => (int) $product->getId(), 'price' => $this->getArenaCompatiblePrice($product), 'description' => empty($description) ? '' : (string) $description, 'sku' => empty($sku) ? '' : (string) $sku, 'weight' => empty($weight) ? '' : (float) $weight, ]; $taxonIds = []; $collection = ArenaPl_Magento_Model_Exportservicequery::getProductCategoryCollection($product); /* @var $category Mage_Catalog_Model_Category */ foreach ($collection as $category) { if ($this->mapper->hasMappedTaxon($category)) { $taxonData = $this->mapper->getMappedArenaTaxon($category); if (!empty($taxonData['taxon_id'])) { $taxonIds[] = (int) $taxonData['taxon_id']; } } } $data['taxon_ids'] = $taxonIds; return $data; } /** * @param Mage_Catalog_Model_Product $product * * @return array */ protected function prepareArenaCompatibleProductVariantData($product) { $sku = $product->getSku(); $data = [ 'external_product_id' => (int) $product->getId(), 'price' => $this->getArenaCompatiblePrice($product), 'sku' => empty($sku) ? '' : (string) $sku, ]; return $data; } /** * @param Mage_Catalog_Model_Product $product * * @return string */ protected function getArenaCompatiblePrice(Mage_Catalog_Model_Product $product) { $arenaCompatiblePrice = preg_replace( '/\./', ',', $product->getPrice(), 1 ); return (string) $arenaCompatiblePrice; } /** * @param int $arenaProductId */ public function deleteExistingArenaMasterImages($arenaProductId) { $productData = $this->getArenaProductData($arenaProductId); if (empty($productData['master']['images'])) { return; } $apiCall = $this->client ->deleteProductImage() ->setProductId($arenaProductId); foreach ($productData['master']['images'] as $image) { try { $apiCall ->setProductImageId((int) $image['id']) ->getResult(); } catch (Exception $e) { } } } /** * @param int $arenaProductId * @param int $arenaProductVariantId */ public function deleteExistingArenaVariantImages($arenaProductId, $arenaProductVariantId) { $variantData = $this->getArenaProductVariantData($arenaProductId, $arenaProductVariantId); if (empty($variantData['images'])) { return; } $apiCall = $this->client ->deleteProductImage() ->setProductId($arenaProductId); foreach ($variantData['images'] as $image) { try { $apiCall ->setProductImageId((int) $image['id']) ->getResult(); } catch (Exception $e) { } } } /** * @param int $arenaProductId * * @return array|null */ public function getArenaProductData($arenaProductId) { try { return $this->client->getProduct() ->setProductId((int) $arenaProductId) ->getResult(); } catch (Exception $e) { return; } } /** * @param int $arenaProductId * @param int $arenaProductVariantId * * @return array|null */ public function getArenaProductVariantData($arenaProductId, $arenaProductVariantId) { $productData = $this->getArenaProductData($arenaProductId); if (empty($productData)) { return; } if ($productData['master']['id'] == $arenaProductVariantId) { return $productData['master']; } foreach ($productData['variants'] as $variantData) { if ($variantData['id'] == $arenaProductVariantId) { return $variantData; } } } /** * @param int $arenaProductId * @param string[] $imageUrls */ public function addProductImages($arenaProductId, array $imageUrls) { $apiCall = $this->client ->createProductImage() ->setProductId($arenaProductId); foreach ($imageUrls as $url) { try { $apiCall ->setProductImageUrl($url) ->getResult(); } catch (Exception $e) { } } } /** * @param int $arenaProductVariantId * @param string[] $imageUrls */ public function addVariantImages($arenaProductVariantId, array $imageUrls) { $apiCall = $this->client ->createProductVariantImage() ->setProductVariantId($arenaProductVariantId); foreach ($imageUrls as $url) { try { $apiCall ->setProductVariantImageUrl($url) ->getResult(); } catch (Exception $e) { } } } /** * @param int $arenaProductId * @param int $arenaProductVariantId * @param int $stockLocationId * @param int $qty * @param bool $allowBackorders * * @return bool */ public function updateProductStockQuantity( $arenaProductId, $arenaProductVariantId, $stockLocationId, $qty, $allowBackorders ) { $stockItemData = $this->getStockItemData( $arenaProductId, $arenaProductVariantId, $stockLocationId ); if (!is_array($stockItemData)) { return false; } $stockItemId = (int) $stockItemData['id']; return $this->updateStockItemData( $stockItemId, $stockLocationId, $qty, $allowBackorders ); } /** * @param int $arenaProductId * @param int $arenaProductVariantId * @param int $stockLocationId * * @return array|null */ protected function getStockItemData( $arenaProductId, $arenaProductVariantId, $stockLocationId ) { $foundStockItems = $this->findStockItems($arenaProductVariantId, $stockLocationId); if (empty($foundStockItems)) { return; } return current($foundStockItems); } /** * @param int $variantId * @param int $stockLocationId * @param int $resultsPerPage * * @return array|null */ protected function findStockItems( $variantId, $stockLocationId, $resultsPerPage = 1000 ) { try { return $this->client->getStockItems() ->setResultsPerPage((int) $resultsPerPage) ->setStockLocationId((int) $stockLocationId) ->setSearch( 'variant_id', (int) $variantId, ApiCallInterface::SEARCH_METHOD_EQUALS ) ->getResult(); } catch (Exception $e) { return; } } /** * @param int $stockItemId * @param int $qty * @param bool $allowBackorders * * @return bool */ protected function updateStockItemData( $stockItemId, $stockLocationId, $qty, $allowBackorders ) { try { return $this->client->updateStockItem() ->setStockItemId((int) $stockItemId) ->setStockLocationId((int) $stockLocationId) ->setCountOnHand((int) $qty) ->setStockItemField('backorderable', (bool) $allowBackorders) ->getResult(); } catch (\Exception $e) { return false; } } /** * @param int $arenaProductId * @param int $propertyId * @param scalar $value */ public function saveArenaProductProperty( $arenaProductId, $propertyId, $value ) { try { return $this->client->setProductProperty() ->setProductId((int) $arenaProductId) ->setProductPropertyId((int) $propertyId) ->setPropertyValue($value) ->getResult(); } catch (\Exception $e) { return false; } } /** * @param int $arenaProductId * @param int $variantId * @param int[] $optionValuesIds * * @return array|bool */ public function saveArenaProductVariantOptionValues( $arenaProductId, $variantId, array $optionValuesIds ) { try { return $this->client->updateProductVariant() ->setOptionValueIds($optionValuesIds) ->setProductVariantId((int) $variantId) ->setProductId((int) $arenaProductId) ->getResult(); } catch (\Exception $e) { return false; } } /** * Returns array of product parent IDs. * * @param int $childId * * @return int[] */ public function getParentsIdsByChildId($childId) { $read = ArenaPl_Magento_Helper_Data::getDBReadConnection(); $select = $read->select() ->distinct() ->from($this->productsRelation->getMainTable(), 'parent_id') ->where('child_id=?', $childId); return $read->fetchCol($select); } /** * Returns array of product parent IDs. * * @param int $parentId * * @return int[] */ public function getChildrenIdsByParentId($parentId) { $read = ArenaPl_Magento_Helper_Data::getDBReadConnection(); $select = $read->select() ->distinct() ->from($this->productsRelation->getMainTable(), 'child_id') ->where('parent_id=?', $parentId); return $read->fetchCol($select); } /** * @param int $arenaProductId * @param int[] $productsIdsToRelate */ public function setProductsRelation( $arenaProductId, array $productsIdsToRelate ) { try { return $this->client->setProductRelatedProducts() ->setRelatedProductIds($productsIdsToRelate) ->setProductId((int) $arenaProductId) ->getResult(); } catch (\Exception $e) { return false; } } }
spiechu/arena-pl-magento-1
app/code/community/ArenaPl/Magento/Model/Resource/Exportservice.php
PHP
mit
16,959
## AppDomainSetup.DynamicBase is no longer randomized by UseRandomizedStringHashAlgorithm ### Scope Edge ### Version Introduced 4.6 ### Source Analyzer Status Planned ### Change Description Prior to the .NET Framework 4.6, the value of AppDomainSetup.DynamicBase would be randomized between application domains, or between processes, if UseRandomizedStringHashAlgorithm was enabled in the app's config file. Beginning in the .NET Framework 4.6, AppDomainSetup.DynamicBase will return a stable result between different instances of an app running, and between different app domains. Dynamic bases will still differ for different apps; this change only removes the random naming element for different instances of the same app. - [ ] Quirked - [ ] Build-time break ### Recommended Action Be aware that enabling `UseRandomizedStringHashAlgorithm` will not result in `AppDomainSetup.DynamicBase` being randomized. If a random base is needed, it must be produced in your app's code rather than via this API. ### Affected APIs * `P:System.AppDomainSetup.DynamicBase` ### Category Core <!-- ### Notes Should be easy to look for DynamicBase use while UseRandomizedStringHashAlgorithm is set --> <!-- breaking change id: 115 -->
punker76/dotnet
Documentation/compatibility/appdomainsetup_dynamicbase-is-no-longer-randomized-by-userandomizedstringhashalgorithm.md
Markdown
mit
1,238
// JEQ, JNE, JGT, JLT, JGE, JLE MACRO JEQ ( _rX_, _rY_, _dest_ ) CMP _rX_ _rY_ JZ { _dest_ } ENDMACRO MACRO JNE ( _rX_, _rY_, _dest_ ) CMP _rX_ _rY_ JNZ { _dest_ } ENDMACRO // stackoverflow.com/a/36909033 MACRO JGT ( _rX_, _rY_, _dest_ ) // JC CMP _rX_ _rY_ JC { _dest_ } ENDMACRO MACRO JLT ( _rX_, _rY_, _dest_, _rTemp_ ) // NC & NZ CMP _rX_ _rY_ MOV _rTemp_ rStatus AND _rTemp_ r0 0b11 // check if both carry(1) and zero(0) bits are clear JZ { _dest_ } ENDMACRO MACRO JGE ( _rX_, _rY_, _dest_ ) // C | Z CMP _rX_ _rY_ JC { _dest_ } JZ { _dest_ } ENDMACRO MACRO JLE ( _rX_, _rY_, _dest_ ) // NC CMP _rX_ _rY_ JNC { _dest_ } ENDMACRO
JetStarBlues/Nand-2-Tetris
Assembler/macros/comparisons.asm
Assembly
mit
701
<?php // src/Ens/JobeetBundle/DataFixtures/ORM/LoadCategoryData.php namespace Ens\JobeetBundle\DataFixtures\ORM; use Doctrine\Common\Persistence\ObjectManager; use Doctrine\Common\DataFixtures\AbstractFixture; use Doctrine\Common\DataFixtures\OrderedFixtureInterface; use Ens\JobeetBundle\Entity\Category; class LoadCategoryData extends AbstractFixture implements OrderedFixtureInterface { public function load(ObjectManager $em) { $design = new Category(); $design->setName('Design'); $programming = new Category(); $programming->setName('Programming'); $manager = new Category(); $manager->setName('Manager'); $administrator = new Category(); $administrator->setName('Administrator'); $em->persist($design); $em->persist($programming); $em->persist($manager); $em->persist($administrator); $em->flush(); $this->addReference('category-design', $design); $this->addReference('category-programming', $programming); $this->addReference('category-manager', $manager); $this->addReference('category-administrator', $administrator); } public function getOrder() { return 1; // the order in which fixtures will be loaded } }
skiram/sfJobeet
src/Ens/JobeetBundle/DataFixtures/ORM/LoadCategoryData.php
PHP
mit
1,286
steps_for :a_user_viewing_the_projects_that_they_belong_to do Given "a user without any projects logs in" do @user = a_user_who_just_logged_in end Given "a user who belongs to some projects logs in" do @user = Generate.user @projects = [ Generate.project(:name => "ProjectBaz", :members => [@user]), Generate.project(:name => "ProjectFoo", :members => [@user]) ] a_user_who_just_logged_in :user => @user end When "they look at the sidebar" do response.should have_tag('#sidebar') end Then "they will see no projects that they belong to in the sidebar" do response.should have_tag('#sidebar .your_projects:empty') end Then "they will see that they projects that they belong to in the sidebar" do response.should have_tag('#sidebar .your_projects') do @projects.each do |project| see_link_to_project project end end end end
mvanholstyn/strac
stories/steps/project_sidebar/a_user_viewing_the_projects_that_they_belong_to_steps.rb
Ruby
mit
916
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.9.1"/> <title>V8 API Reference Guide for node.js v5.1.0: v8::WeakCallbackData&lt; T, P &gt; Class Template Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="search/searchdata.js"></script> <script type="text/javascript" src="search/search.js"></script> <script type="text/javascript"> $(document).ready(function() { init_search(); }); </script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">V8 API Reference Guide for node.js v5.1.0 </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.9.1 --> <script type="text/javascript"> var searchBox = new SearchBox("searchBox", "search",false,'Search'); </script> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main&#160;Page</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li><a href="examples.html"><span>Examples</span></a></li> <li> <div id="MSearchBox" class="MSearchBoxInactive"> <span class="left"> <img id="MSearchSelect" src="search/mag_sel.png" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" alt=""/> <input type="text" id="MSearchField" value="Search" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)" onkeyup="searchBox.OnSearchFieldChange(event)"/> </span><span class="right"> <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> </span> </div> </li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="annotated.html"><span>Class&#160;List</span></a></li> <li><a href="classes.html"><span>Class&#160;Index</span></a></li> <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li> <li><a href="functions.html"><span>Class&#160;Members</span></a></li> </ul> </div> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> </div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="namespacev8.html">v8</a></li><li class="navelem"><a class="el" href="classv8_1_1WeakCallbackData.html">WeakCallbackData</a></li> </ul> </div> </div><!-- top --> <div class="header"> <div class="summary"> <a href="#pub-types">Public Types</a> &#124; <a href="#pub-methods">Public Member Functions</a> &#124; <a href="classv8_1_1WeakCallbackData-members.html">List of all members</a> </div> <div class="headertitle"> <div class="title">v8::WeakCallbackData&lt; T, P &gt; Class Template Reference</div> </div> </div><!--header--> <div class="contents"> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a> Public Types</h2></td></tr> <tr class="memitem:a08a29122f54c663fc2442d8f42c08ac2"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a08a29122f54c663fc2442d8f42c08ac2"></a> typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><b>Callback</b>) (const <a class="el" href="classv8_1_1WeakCallbackData.html">WeakCallbackData</a>&lt; T, P &gt; &amp;data)</td></tr> <tr class="separator:a08a29122f54c663fc2442d8f42c08ac2"><td class="memSeparator" colspan="2">&#160;</td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a> Public Member Functions</h2></td></tr> <tr class="memitem:a804314135aa731fcab6d57aafddd26d3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a804314135aa731fcab6d57aafddd26d3"></a> &#160;</td><td class="memItemRight" valign="bottom"><b>WeakCallbackData</b> (<a class="el" href="classv8_1_1Isolate.html">Isolate</a> *isolate, P *parameter, <a class="el" href="classv8_1_1Local.html">Local</a>&lt; T &gt; handle)</td></tr> <tr class="separator:a804314135aa731fcab6d57aafddd26d3"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a499a971756182b5b52c28e506339c6b9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a499a971756182b5b52c28e506339c6b9"></a> V8_INLINE <a class="el" href="classv8_1_1Isolate.html">Isolate</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>GetIsolate</b> () const </td></tr> <tr class="separator:a499a971756182b5b52c28e506339c6b9"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a96ce7e1fbbfd56d0709225623517ff17"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a96ce7e1fbbfd56d0709225623517ff17"></a> V8_INLINE P *&#160;</td><td class="memItemRight" valign="bottom"><b>GetParameter</b> () const </td></tr> <tr class="separator:a96ce7e1fbbfd56d0709225623517ff17"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:a0e8fcf0091132c96d548ac319284710a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0e8fcf0091132c96d548ac319284710a"></a> V8_INLINE <a class="el" href="classv8_1_1Local.html">Local</a>&lt; T &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>GetValue</b> () const </td></tr> <tr class="separator:a0e8fcf0091132c96d548ac319284710a"><td class="memSeparator" colspan="2">&#160;</td></tr> </table> <hr/>The documentation for this class was generated from the following file:<ul> <li>deps/v8/include/<a class="el" href="v8_8h_source.html">v8.h</a></li> </ul> </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> Generated by &#160;<a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.9.1 </small></address> </body> </html>
v8-dox/v8-dox.github.io
fd0253b/html/classv8_1_1WeakCallbackData.html
HTML
mit
7,212
#!/bin/bash # Run this script first to generate the variety of *.rc files that are # needed. Then execute 'runAll.sh' to see results. # configure to use these BINS T="BINS=ValueBased/Qsort_straight ValueBased/Qsort_2_6_6 ValueBased/Qsort_2_6_11 ValueBased/Insertion " # percentage 1/p P=4 # distance to move DELTA=4 # starting value B=1 while [ $B -le 16384 ] do echo "constructing $B..." echo $T > $B.rc echo "" >> $B.rc T4=$(($B / $P)) echo "EXTRAS=-a -u $T4,$DELTA" >> $B.rc echo "TRIALS=10" >> $B.rc echo "LOW=$B" >> $B.rc echo "HIGH=$B" >> $B.rc echo "INCREMENT=*2" >> $B.rc B=$((B*2)) done
heineman/algorithms-nutshell-2ed
Figures/scripts/chapter2/Figure2-3/buildAll.sh
Shell
mit
693
// This tests the OpenMM functionality here #include <cassert> #include <cmath> #include <fstream> #include <iostream> #include <string> #include "Amber.h" #include "OpenMM.h" using namespace std; void check_omm_system(void) { Amber::AmberParm parm; parm.rdparm("files/trx.prmtop"); OpenMM::System *system = parm.createSystem(); ofstream output; output.open("serialized_system.xml"); OpenMM::XmlSerializer::serialize<OpenMM::System>(system, string("System"), output); output.close(); delete system; } void check_gas_energy(void) { Amber::AmberParm parm; Amber::AmberCoordinateFrame frame; parm.rdparm("files/trx.prmtop"); frame.readRst7("files/trx.inpcrd"); OpenMM::System *system = 0; // Get the coordinates in nanometers vector<OpenMM::Vec3> positions = frame.getPositions(); for (size_t i = 0; i < positions.size(); i++) positions[i] *= Amber::NANOMETER_PER_ANGSTROM; // Create the system, integrator, and context with the Reference platform system = parm.createSystem(); OpenMM::VerletIntegrator integrator(0.002); OpenMM::Context *context = new OpenMM::Context(*system, integrator, OpenMM::Platform::getPlatformByName(string("Reference"))); // Set the starting coordinates context->setPositions(positions); // Now compare the energies to Amber energies // Now get the bond energy OpenMM::State s = context->getState(OpenMM::State::Energy, false, 1<<Amber::AmberParm::BOND_FORCE_GROUP); double e = s.getPotentialEnergy() * Amber::CALORIE_PER_JOULE; assert(abs(e - 631.8992707) < 1e-5); // Now get the angle energy s = context->getState(OpenMM::State::Energy, false, 1<<Amber::AmberParm::ANGLE_FORCE_GROUP); e = s.getPotentialEnergy() * Amber::CALORIE_PER_JOULE; assert(abs(e - 898.2542659) < 1e-5); // Now get the dihedral energy s = context->getState(OpenMM::State::Energy, false, 1<<Amber::AmberParm::DIHEDRAL_FORCE_GROUP); e = s.getPotentialEnergy() * Amber::CALORIE_PER_JOULE; assert(abs(e - 566.4454191) < 1e-5); // Now get the nonbonded energy s = context->getState(OpenMM::State::Energy, false, 1<<Amber::AmberParm::NONBONDED_FORCE_GROUP); e = s.getPotentialEnergy() * Amber::CALORIE_PER_JOULE; assert(abs(1 - e/-2313.5905426) < 1e-6); // relative error... delete system; } void check_omm_pme(void) { Amber::AmberParm parm; Amber::AmberCoordinateFrame frame; parm.rdparm("files/4096wat.parm7"); frame.readRst7("files/4096wat.rst7"); OpenMM::System *system = 0; // Get the coordinates in nanometers vector<OpenMM::Vec3> positions = frame.getPositions(); for (size_t i = 0; i < positions.size(); i++) positions[i] *= Amber::NANOMETER_PER_ANGSTROM; // Create the system, integrator, and context with the Reference platform system = parm.createSystem(OpenMM::NonbondedForce::PME, 8.0); OpenMM::VerletIntegrator integrator(0.002); OpenMM::Context *context = new OpenMM::Context(*system, integrator, OpenMM::Platform::getPlatformByName(string("Reference"))); // Set up a unit cell from our coordinate file Amber::UnitCell cell(frame.getBoxA(), frame.getBoxB(), frame.getBoxC(), frame.getBoxAlpha(), frame.getBoxBeta(), frame.getBoxGamma()); // Set the starting coordinates and box context->setPositions(positions); context->setPeriodicBoxVectors(cell.getVectorA()/10, cell.getVectorB()/10, cell.getVectorC()/10); // Now compare the energies to Amber energies // Now get the bond energy OpenMM::State s = context->getState(OpenMM::State::Energy, false, 1<<Amber::AmberParm::BOND_FORCE_GROUP); double e = s.getPotentialEnergy() * Amber::CALORIE_PER_JOULE; assert(abs(e - 0) < 2e-8); // Now get the angle energy s = context->getState(OpenMM::State::Energy, false, 1<<Amber::AmberParm::ANGLE_FORCE_GROUP); e = s.getPotentialEnergy() * Amber::CALORIE_PER_JOULE; assert(e == 0); // Now get the dihedral energy s = context->getState(OpenMM::State::Energy, false, 1<<Amber::AmberParm::DIHEDRAL_FORCE_GROUP); e = s.getPotentialEnergy() * Amber::CALORIE_PER_JOULE; assert(e == 0); // Now get the nonbonded energy s = context->getState(OpenMM::State::Energy, false, 1<<Amber::AmberParm::NONBONDED_FORCE_GROUP); e = s.getPotentialEnergy() * Amber::CALORIE_PER_JOULE; assert(abs(1 - e/-39344.3259106) < 2e-4); // relative error... delete system; } void check_omm_gb(string const& model, double cutoff, double saltcon, double nonbe) { Amber::AmberParm parm; Amber::AmberCoordinateFrame frame; parm.rdparm("files/trx.prmtop"); frame.readRst7("files/trx.inpcrd"); OpenMM::System *system = 0; // Get the coordinates in nanometers vector<OpenMM::Vec3> positions = frame.getPositions(); for (size_t i = 0; i < positions.size(); i++) positions[i] *= Amber::NANOMETER_PER_ANGSTROM; // Create the system, integrator, and context with the Reference platform OpenMM::NonbondedForce::NonbondedMethod meth; if (cutoff <= 0) meth = OpenMM::NonbondedForce::NoCutoff; else meth = OpenMM::NonbondedForce::CutoffNonPeriodic; system = parm.createSystem( meth, cutoff, string("None"), false, model, 0.0, saltcon); OpenMM::VerletIntegrator integrator(0.002); OpenMM::Context *context = new OpenMM::Context(*system, integrator, OpenMM::Platform::getPlatformByName(string("CPU"))); // Set the starting coordinates context->setPositions(positions); // Now compare the energies to Amber energies // Now get the bond energy OpenMM::State s = context->getState(OpenMM::State::Energy, false, 1<<Amber::AmberParm::BOND_FORCE_GROUP); double e = s.getPotentialEnergy() * Amber::CALORIE_PER_JOULE; assert(abs(e - 631.8992707) < 1e-5); // Now get the angle energy s = context->getState(OpenMM::State::Energy, false, 1<<Amber::AmberParm::ANGLE_FORCE_GROUP); e = s.getPotentialEnergy() * Amber::CALORIE_PER_JOULE; assert(abs(e - 898.2542659) < 1e-5); // Now get the dihedral energy s = context->getState(OpenMM::State::Energy, false, 1<<Amber::AmberParm::DIHEDRAL_FORCE_GROUP); e = s.getPotentialEnergy() * Amber::CALORIE_PER_JOULE; assert(abs(e - 566.4454191) < 1e-5); // Now get the nonbonded energy s = context->getState(OpenMM::State::Energy, false, 1<<Amber::AmberParm::NONBONDED_FORCE_GROUP); e = s.getPotentialEnergy() * Amber::CALORIE_PER_JOULE; assert(abs(1 - e/nonbe) < 5e-7); // relative error... delete system; } // So we can pass a const char* void check_omm_gb(const char* model, double cutoff, double saltcon, double nonbe) { check_omm_gb(string(model), cutoff, saltcon, nonbe); } int main() { // Load the main plugins OpenMM::Platform::loadPluginsFromDirectory( OpenMM::Platform::getDefaultPluginsDirectory()); // Run the tests cout << "Testing OpenMM System creation and serialization..."; check_omm_system(); cout << " OK." << endl; cout << "Testing OpenMM gas phase energy..."; check_gas_energy(); cout << " OK." << endl; cout << "Testing OpenMM PME potential energies..."; check_omm_pme(); cout << " OK." << endl; cout << "Testing OpenMM GB HCT energy..."; check_omm_gb("HCT", 0.0, 0.0, -4380.6377735); cout << " OK." << endl; cout << "Testing OpenMM GB HCT w/ 0.1M salt..."; check_omm_gb("HCT", 0.0, 0.1, -4383.2215249); cout << " OK." << endl; cout << "Testing OpenMM GB OBC1 energy..."; check_omm_gb("OBC1", 0.0, 0.0, -4430.6048991); cout << " OK." << endl; cout << "Testing OpenMM GB OBC1 w/ 0.1M salt..."; check_omm_gb("OBC1", 0.0, 0.1, -4433.1897402); cout << " OK." << endl; cout << "Testing OpenMM GB OBC2 energy..."; check_omm_gb("OBC2", 0.0, 0.0, -4317.4276516); cout << " OK." << endl; cout << "Testing OpenMM GB OBC2 w/ 0.1M salt..."; check_omm_gb("OBC2", 0.0, 0.1, -4319.9948287); cout << " OK." << endl; cout << "Testing OpenMM GB GBn energy..."; check_omm_gb("GBn", 0.0, 0.0, -4252.4065109); cout << " OK." << endl; cout << "Testing OpenMM GB GBn w/ 0.1M salt..."; check_omm_gb("GBn", 0.0, 0.1, -4254.9660314); cout << " OK." << endl; cout << "Testing OpenMM GB GBn2 energy..."; check_omm_gb("GBn2", 0.0, 0.0, -4324.7676537); cout << " OK." << endl; cout << "Testing OpenMM GB GBn2 w/ 0.1M salt..."; check_omm_gb("GBn2", 0.0, 0.1, -4327.3449966); cout << " OK." << endl; cout << "Testing OpenMM GB HCT energy (15A cutoff)..."; check_omm_gb("HCT", 15.0, 0.0, -4541.2393356); cout << " OK." << endl; cout << "Testing OpenMM GB HCT w/ 0.1M salt (15A cutoff)..."; check_omm_gb("HCT", 15.0, 0.1, -4548.0488375); cout << " OK." << endl; cout << "Testing OpenMM GB OBC1 energy (15A cutoff)..."; check_omm_gb("OBC1", 15.0, 0.0, -4593.9490639); cout << " OK." << endl; cout << "Testing OpenMM GB OBC1 w/ 0.1M salt (15A cutoff)..."; check_omm_gb("OBC1", 15.0, 0.1, -4600.9552586); cout << " OK." << endl; cout << "Testing OpenMM GB OBC2 energy (15A cutoff)..."; check_omm_gb("OBC2", 15.0, 0.0, -4481.5135247); cout << " OK." << endl; cout << "Testing OpenMM GB OBC2 w/ 0.1M salt (15A cutoff)..."; check_omm_gb("OBC2", 15.0, 0.1, -4488.8354190); cout << " OK." << endl; cout << "Testing OpenMM GB GBn energy (15A cutoff)..."; check_omm_gb("GBn", 15.0, 0.0, -4410.0631502); cout << " OK." << endl; cout << "Testing OpenMM GB GBn w/ 0.1M salt (15A cutoff)..."; check_omm_gb("GBn", 15.0, 0.1, -4417.7292305); cout << " OK." << endl; cout << "Testing OpenMM GB GBn2 energy (15A cutoff)..."; check_omm_gb("GBn2", 15.0, 0.0, -4480.8521321); cout << " OK." << endl; cout << "Testing OpenMM GB GBn2 w/ 0.1M salt (15A cutoff)..."; check_omm_gb("GBn2", 15.0, 0.1, -4488.0561661); cout << " OK." << endl; }
swails/omm_cphmd
test/OpenMMTest.cpp
C++
mit
10,656
# concatAll #### 函数签名: `concatAll(): Observable` ## 收集 observables,当前一个完成时订阅下一个。 --- :warning: 当源 observable 发出的速度要比内部 observables 完成更快时,请小心 [backpressure (背压)](https://github.com/Reactive-Extensions/RxJS/blob/master/doc/gettingstarted/backpressure.md) ! :bulb: 在很多情况下,你可以使用只使用单个操作符 [concatMap](../transformation/concatmap.md) 来替代! > 译者注:concatMap === map + concatAll --- <div class="ua-ad"><a href="https://ultimateangular.com/?ref=76683_kee7y7vk"><img src="https://ultimateangular.com/assets/img/banners/ua-leader.svg"></a></div> ### 示例 ( [示例测试](https://github.com/btroncone/learn-rxjs/blob/master/operators/specs/combination/concatall-spec.ts) ) ##### 示例 1: 使用 observable 来进行 concatAll ( [StackBlitz](https://stackblitz.com/edit/typescript-zwtpc7?file=index.ts&devtoolsheight=100) | [jsBin](http://jsbin.com/nakinenuva/1/edit?js,console) | [jsFiddle](https://jsfiddle.net/btroncone/8dfuf2y6/) ) ```js // RxJS v6+ import { map, concatAll } from 'rxjs/operators'; import { of, interval } from 'rxjs'; // 每2秒发出值 const source = interval(2000); const example = source.pipe( // 为了演示,增加10并作为 observable 返回 map(val => of(val + 10)), // 合并内部 observables 的值 concatAll() ); // 输出: 'Example with Basic Observable 10', 'Example with Basic Observable 11'... const subscribe = example.subscribe(val => console.log('Example with Basic Observable:', val) ); ``` ##### 示例 2: 使用 promise 来进行 concatAll ( [StackBlitz](https://stackblitz.com/edit/typescript-3w4px3?file=index.ts&devtoolsheight=100) | [jsBin](http://jsbin.com/bekegeyopu/1/edit?js,console) | [jsFiddle](https://jsfiddle.net/btroncone/w7kp7qLs/) ) ```js // RxJS v6+ import { map, concatAll } from 'rxjs/operators'; import { interval } from 'rxjs'; // 创建并解析一个基础的 promise const samplePromise = val => new Promise(resolve => resolve(val)); // 每2秒发出值 const source = interval(2000); const example = source.pipe( map(val => samplePromise(val)), // 合并解析过的 promise 的值 concatAll() ); // 输出: 'Example with Promise 0', 'Example with Promise 1'... const subscribe = example.subscribe(val => console.log('Example with Promise:', val) ); ``` ##### 示例 3: 当内部 observables 完成时进行延迟 ( [StackBlitz](https://stackblitz.com/edit/typescript-ft3rbf?file=index.ts&devtoolsheight=100) | [jsBin](http://jsbin.com/pojolatile/1/edit?js,console) | [jsFiddle](https://jsfiddle.net/btroncone/8230ucbg/) ) ```js // RxJS v6+ import { take, concatAll } from 'rxjs/operators'; import { interval, of } from 'rxjs/observable/interval'; const obs1 = interval(1000).pipe(take(5)); const obs2 = interval(500).pipe(take(2)); const obs3 = interval(2000).pipe(take(1)); // 发出3个 observables const source = of(obs1, obs2, obs3); // 按顺序订阅每个内部 obserable,前一个完成了再订阅下一个 const example = source.pipe(concatAll()); /* 输出: 0,1,2,3,4,0,1,0 怎么运行的... 订阅每个内部 observable 并发出值,当一个完成了才订阅下一个 obs1: 0,1,2,3,4 (complete) obs2: 0,1 (complete) obs3: 0 (complete) */ const subscribe = example.subscribe(val => console.log(val)); ``` ### 相关食谱 - [进度条](../../recipes/progressbar.md) ### 其他资源 - [concatAll](https://cn.rx.js.org/class/es6/Observable.js~Observable.html#instance-method-concatAll) :newspaper: - 官方文档 - [使用 RxJS 的 concatAll 来打平高阶 observable](https://egghead.io/lessons/rxjs-flatten-a-higher-order-observable-with-concatall-in-rxjs?course=use-higher-order-observables-in-rxjs-effectively) :video_camera: :dollar: - André Staltz --- > :file_folder: 源码: [https://github.com/ReactiveX/rxjs/blob/master/src/internal/operators/concatAll.ts](https://github.com/ReactiveX/rxjs/blob/master/src/internal/operators/concatAll.ts)
RxJS-CN/learn-rxjs-operators
operators/combination/concatall.md
Markdown
mit
4,033
import numpy as np from sklearn.grid_search import GridSearchCV import sklearn.metrics as metrics from sklearn import preprocessing as prep from tr_utils import merge_two_dicts, isEmpty class SKSupervisedLearning (object): """ Thin wrapper around some learning methods """ def __init__(self, classifier, X_train, Y_train, X_test, Y_test): """ X_train, Y_train - training data: examples + corresponding class labels X_test, Y_test - validation data: examples + corresponding class labels """ self.X_train = X_train self.X_test = X_test self.Y_train = Y_train self.Y_test = Y_test self.X_train_scaled = np.array([]) self.X_test_scaled = np.array([]) self._classifier = classifier self._clf = None self._proba_train = None self._proba_test = None self._train_params = None self._estimation_params = None self._scaler = None # parameters for sklearn grid search self._jobs = -1 self._cv = 10 self._verbose = 0 self._scoring = "log_loss" @property def scaler(self): return self._scaler @property def clf(self): if self._clf == None: self._clf = self._classifier(**self.train_params) if self.train_params != None else self._classifier() return self._clf @property def proba_train(self): return self._proba_train @property def proba_test(self): return self._proba_test @property def train_params(self): """ Training parameter dictionary specific to each learner """ return self._train_params @train_params.setter def train_params(self, val): self._train_params = val @property def estimation_params(self): """ Dictionary of paramters to estimate, specific to each learner: e.g.: {'gamma': [0.001, 0.1, 1], 'C': [1, 10, 100]} """ return self._estimation_params @estimation_params.setter def estimation_params(self, val): self._estimation_params = val @property def jobs(self): return self._jobs @jobs.setter def jobs(self, val): self._jobs = val @property def cv(self): return self._cv @cv.setter def cv(self, val): self._cv = val @property def scoring(self): return self._scoring @scoring.setter def scoring(self, val): self._scoring = val @property def verbose(self): return self._verbose @verbose.setter def verbose(self, val): self._verbose = val @property def proba_train(self): return self._proba_train @property def proba_test(self): return self._proba_test def _pick_examples(self): ''' If we have scaled examples - pick them, else pick X_train, X_test ''' return (self.X_train, self.X_test) \ if isEmpty(self.X_train_scaled) or isEmpty(self.X_test_scaled) \ else (self.X_train_scaled, self.X_test_scaled) def remove_scaling(self): self.X_test_scaled = None self.X_train_scaled = None def grid_search_classifier(self) : """ Grid search for the best classifier, given parameters. Returns best score Sets the classifier to the best classifier given training and estimation parameters See sklearn GridSearchCV for details """ gs = False if self.train_params == None and self.estimation_params == None: raise AttributeError("Cannot have train_params and estimation_params both absent") # first - grid-search for the best parameters if self.estimation_params: X_train, X_test = self._pick_examples() Y_train = self.Y_train clf = self._classifier(**self.train_params) if self.train_params != None else self._classifier() gs = GridSearchCV(clf, self.estimation_params, scoring = self.scoring, cv = self.cv, n_jobs=self.jobs, verbose = self.verbose) gs.fit(X_train, Y_train) print gs.best_params_ print gs.best_score_ # if we have specified parameters of our own - we need to add those if gs: self.train_params = merge_two_dicts(gs.best_params_, self.train_params) if self.train_params != None else gs.best_params_ self._clf = self._classifier(**self.train_params) return gs.best_score_ def _fit_scaler(self, scaler_class, X): return scaler_class().fit(X) # TODO: other scalers? def fit_standard_scaler(self): """ Standard scaler scales samples 'vertically', (by feature), by removing the mean and reducing to unit std. Computes a scaler and transforms both train and validation sets based upon it """ self._scaler = self._fit_scaler(prep.StandardScaler, self.X_train) self.X_train_scaled = self._scaler.transform(self.X_train) self.X_test_scaled = self._scaler.transform(self.X_test) def fit_and_validate(self): ''' Returns training & testing log loss ''' X_train, X_test = self._pick_examples() # shorthand Y_train = self.Y_train Y_test = self.Y_test self.clf.fit(X_train, Y_train) # get probabilities self._proba_train = self.clf.predict_proba(X_train) self._proba_test = self.clf.predict_proba(X_test) return metrics.log_loss(Y_train, self.proba_train), np.array([]) if isEmpty(Y_test) else metrics.log_loss(Y_test, self.proba_test) def predict_actual(self, X_actual_test): ''' Return actual prediction on a set where we don't have labels ''' return self.clf.predict_proba(X_actual_test)
fierval/KaggleMalware
Learning/SupervisedLearning.py
Python
mit
5,930
![s28358339.jpg](https://img1.doubanio.com/view/subject/l/public/s28358339.jpg) 作者: 张亮 出版社: 中信出版社 出版年: 2015-11-1 页数: 334 定价: 49.00元 装帧: 精装 ISBN: 9787508655659 [豆瓣链接](https://book.douban.com/subject/26682111/) - [第二章 运营是个筐](#%e7%ac%ac%e4%ba%8c%e7%ab%a0-%e8%bf%90%e8%90%a5%e6%98%af%e4%b8%aa%e7%ad%90) - [内容运营](#%e5%86%85%e5%ae%b9%e8%bf%90%e8%90%a5) - [用户运营](#%e7%94%a8%e6%88%b7%e8%bf%90%e8%90%a5) - [活动运营](#%e6%b4%bb%e5%8a%a8%e8%bf%90%e8%90%a5) - [第三章 揭开内容运营的面纱](#%e7%ac%ac%e4%b8%89%e7%ab%a0-%e6%8f%ad%e5%bc%80%e5%86%85%e5%ae%b9%e8%bf%90%e8%90%a5%e7%9a%84%e9%9d%a2%e7%ba%b1) - [内容运营的初期事项](#%e5%86%85%e5%ae%b9%e8%bf%90%e8%90%a5%e7%9a%84%e5%88%9d%e6%9c%9f%e4%ba%8b%e9%a1%b9) - [内容供应链——将内容视为你的商品](#%e5%86%85%e5%ae%b9%e4%be%9b%e5%ba%94%e9%93%be%e5%b0%86%e5%86%85%e5%ae%b9%e8%a7%86%e4%b8%ba%e4%bd%a0%e7%9a%84%e5%95%86%e5%93%81) - [内容初始化——构建网站与产品的价值观](#%e5%86%85%e5%ae%b9%e5%88%9d%e5%a7%8b%e5%8c%96%e6%9e%84%e5%bb%ba%e7%bd%91%e7%ab%99%e4%b8%8e%e4%ba%a7%e5%93%81%e7%9a%84%e4%bb%b7%e5%80%bc%e8%a7%82) - [持续运营中的内容运营——以知乎为例](#%e6%8c%81%e7%bb%ad%e8%bf%90%e8%90%a5%e4%b8%ad%e7%9a%84%e5%86%85%e5%ae%b9%e8%bf%90%e8%90%a5%e4%bb%a5%e7%9f%a5%e4%b9%8e%e4%b8%ba%e4%be%8b) - [推送渠道](#%e6%8e%a8%e9%80%81%e6%b8%a0%e9%81%93) - [写一个好文案](#%e5%86%99%e4%b8%80%e4%b8%aa%e5%a5%bd%e6%96%87%e6%a1%88) - [贴近受众的心理。](#%e8%b4%b4%e8%bf%91%e5%8f%97%e4%bc%97%e7%9a%84%e5%bf%83%e7%90%86) - [选一个好位置。](#%e9%80%89%e4%b8%80%e4%b8%aa%e5%a5%bd%e4%bd%8d%e7%bd%ae) - [简单有趣,朗朗上口。](#%e7%ae%80%e5%8d%95%e6%9c%89%e8%b6%a3%e6%9c%97%e6%9c%97%e4%b8%8a%e5%8f%a3) - [符合场景。](#%e7%ac%a6%e5%90%88%e5%9c%ba%e6%99%af) - [内容的推荐与整合](#%e5%86%85%e5%ae%b9%e7%9a%84%e6%8e%a8%e8%8d%90%e4%b8%8e%e6%95%b4%e5%90%88) - [自运营的路径与机制选择](#%e8%87%aa%e8%bf%90%e8%90%a5%e7%9a%84%e8%b7%af%e5%be%84%e4%b8%8e%e6%9c%ba%e5%88%b6%e9%80%89%e6%8b%a9) - [公共平台的内容运营](#%e5%85%ac%e5%85%b1%e5%b9%b3%e5%8f%b0%e7%9a%84%e5%86%85%e5%ae%b9%e8%bf%90%e8%90%a5) - [公共平台内容运营的步骤](#%e5%85%ac%e5%85%b1%e5%b9%b3%e5%8f%b0%e5%86%85%e5%ae%b9%e8%bf%90%e8%90%a5%e7%9a%84%e6%ad%a5%e9%aa%a4) - [内容运营的核心](#%e5%86%85%e5%ae%b9%e8%bf%90%e8%90%a5%e7%9a%84%e6%a0%b8%e5%bf%83) - [第四章 做一个有趣的活动](#%e7%ac%ac%e5%9b%9b%e7%ab%a0-%e5%81%9a%e4%b8%80%e4%b8%aa%e6%9c%89%e8%b6%a3%e7%9a%84%e6%b4%bb%e5%8a%a8) - [活动设计与成本预算](#%e6%b4%bb%e5%8a%a8%e8%ae%be%e8%ae%a1%e4%b8%8e%e6%88%90%e6%9c%ac%e9%a2%84%e7%ae%97) - [活动规则的设计准则](#%e6%b4%bb%e5%8a%a8%e8%a7%84%e5%88%99%e7%9a%84%e8%ae%be%e8%ae%a1%e5%87%86%e5%88%99) - [如何写活动策划](#%e5%a6%82%e4%bd%95%e5%86%99%e6%b4%bb%e5%8a%a8%e7%ad%96%e5%88%92) - [活动风险管控与应急预案](#%e6%b4%bb%e5%8a%a8%e9%a3%8e%e9%99%a9%e7%ae%a1%e6%8e%a7%e4%b8%8e%e5%ba%94%e6%80%a5%e9%a2%84%e6%a1%88) - [活动数据监测与应对策略](#%e6%b4%bb%e5%8a%a8%e6%95%b0%e6%8d%ae%e7%9b%91%e6%b5%8b%e4%b8%8e%e5%ba%94%e5%af%b9%e7%ad%96%e7%95%a5) - [第五章 用户运营比想象得更难](#%e7%ac%ac%e4%ba%94%e7%ab%a0-%e7%94%a8%e6%88%b7%e8%bf%90%e8%90%a5%e6%af%94%e6%83%b3%e8%b1%a1%e5%be%97%e6%9b%b4%e9%9a%be) - [你了解你的用户吗?](#%e4%bd%a0%e4%ba%86%e8%a7%a3%e4%bd%a0%e7%9a%84%e7%94%a8%e6%88%b7%e5%90%97) - [通过数据窥探用户](#%e9%80%9a%e8%bf%87%e6%95%b0%e6%8d%ae%e7%aa%a5%e6%8e%a2%e7%94%a8%e6%88%b7) - [详情页转化率](#%e8%af%a6%e6%83%85%e9%a1%b5%e8%bd%ac%e5%8c%96%e7%8e%87) - [用户运营的工作内容](#%e7%94%a8%e6%88%b7%e8%bf%90%e8%90%a5%e7%9a%84%e5%b7%a5%e4%bd%9c%e5%86%85%e5%ae%b9) - [开源](#%e5%bc%80%e6%ba%90) - [节流](#%e8%8a%82%e6%b5%81) - [促活跃](#%e4%bf%83%e6%b4%bb%e8%b7%83) - [转付费](#%e8%bd%ac%e4%bb%98%e8%b4%b9) - [关联指标](#%e5%85%b3%e8%81%94%e6%8c%87%e6%a0%87) - [定义流失用户的衡量标准](#%e5%ae%9a%e4%b9%89%e6%b5%81%e5%a4%b1%e7%94%a8%e6%88%b7%e7%9a%84%e8%a1%a1%e9%87%8f%e6%a0%87%e5%87%86) - [建立流失预警机制](#%e5%bb%ba%e7%ab%8b%e6%b5%81%e5%a4%b1%e9%a2%84%e8%ad%a6%e6%9c%ba%e5%88%b6) - [流失预警](#%e6%b5%81%e5%a4%b1%e9%a2%84%e8%ad%a6) - [第六章 关于数据的一二三](#%e7%ac%ac%e5%85%ad%e7%ab%a0-%e5%85%b3%e4%ba%8e%e6%95%b0%e6%8d%ae%e7%9a%84%e4%b8%80%e4%ba%8c%e4%b8%89) - [谈论数据的基础](#%e8%b0%88%e8%ae%ba%e6%95%b0%e6%8d%ae%e7%9a%84%e5%9f%ba%e7%a1%80) - [数据的定义](#%e6%95%b0%e6%8d%ae%e7%9a%84%e5%ae%9a%e4%b9%89) - [运营的核心数据](#%e8%bf%90%e8%90%a5%e7%9a%84%e6%a0%b8%e5%bf%83%e6%95%b0%e6%8d%ae) - [第七章 当运营遇上产品](#%e7%ac%ac%e4%b8%83%e7%ab%a0-%e5%bd%93%e8%bf%90%e8%90%a5%e9%81%87%e4%b8%8a%e4%ba%a7%e5%93%81) - [所以运营切入产品最好的节点是:产品设计之前。](#%e6%89%80%e4%bb%a5%e8%bf%90%e8%90%a5%e5%88%87%e5%85%a5%e4%ba%a7%e5%93%81%e6%9c%80%e5%a5%bd%e7%9a%84%e8%8a%82%e7%82%b9%e6%98%af%e4%ba%a7%e5%93%81%e8%ae%be%e8%ae%a1%e4%b9%8b%e5%89%8d) - [运营工具设计](#%e8%bf%90%e8%90%a5%e5%b7%a5%e5%85%b7%e8%ae%be%e8%ae%a1) ## 第二章 运营是个筐 从整个运营工作的实际经验出发,我认为,运营的核心任务归结起来无非两点:流量建设,用户运营。 第一,流量建设。 流量建设是要通过各种推广、扩散、营销、活动,提升网站的流量指标,我们通常所说的PV、UV、转化率、SEO都在这个环节。 一个产品能够长久运营下去的关键因素之一,如图2–3所示。 ![snip20190224_29.png](operation-start1.png) 第二,用户维系。 有了流量和用户之后,运营的大部分工作就在于如何持续有效地推动用户的活跃与留存,并从中发现有价值甚至高价值的用户,这些用户会持续地为网站(产品)带来价值、产生收益,让网站(产品)可以存活下去,并且活得有质量。 简单地划分一下,运营工作会涉及哪些层面呢?我个人通常将其分为三类:内容运营、用户运营、活动运营。而这三类的总和,即我们常说的“产品运营”。 ### 内容运营 首先要解决的问题是,什么是内容? 我认为,网站(产品)中可供用户消费并且延长用户停留时间、促进用户转化的展示均可称之为“内容”。 内容运营是指通过创造、编辑、组织、呈现网站或产品的内容,从而提高互联网产品的内容价值,制造出对用户的黏着、活跃产生一定的促进作用的内容。 内容运营的工作究竟包含哪些内容,如图2–4所示。 ![snip20190224_30.png](operation-start2.png) 图2–4 内容运营工作至少包括五个部分: - 创作内容(采集或者原创,包括各种内容类型) - 编辑审核 - 推荐和专题制作 - 找到需要这些内容的人,并且想办法呈现给他们·根据数据和用户反馈,进行内容调整与优化 内容运营包含这么多工作,那么其核心是什么? - 持续制作、编辑及推荐对用户有价值的内容,保证用户可以在产品中获取这些信息 - 根据KPI的设计,降低或者提高用户获取内容的成本 - 协助网站(产品)获利 ### 用户运营 什么是用户? 我认为,所有使用网站及产品的自然人,都是用户。 用户运营是指:以网站(产品)的用户的活跃、留存、付费为目标,依据用户的需求,制定运营方案甚至是运营机制。目前,用户运营已经发展到针对不同类型的用户采取有针对性的运营策略的阶段。 用一张图来表示,用户数量与运营阶段的关系可能是这样一条曲线,如图2–5。 ![snip20190225_31.png](operation-start3.png) 用户运营首先要做的事情,就是掌握用户结构。 你的用户是男性多还是女性多,他们分布在哪个年龄段,集中在哪些省份,他们受教育程度如何,兴趣点有哪些。这些数据中,是否可以产生用户类型……这些都是做基础用户分析的指针,而对基础用户的分析会决定运营人员应当采用何种运营策略、使用何种运营工具、发布哪些运营活动和内容。 用户运营要做的另一件事情,就是了解用户的规模以及增长或衰退情况,并进行适当的用户分级,了解新用户有多少、老用户有多少、每日增长规模有多少、用户都处于怎样的生命周期。明确了这一点,你才能了解你的网站(产品)处于什么样的阶段,你的用户处于什么样的阶段,然后你才能了解对用户进行运营的目标所在,从而选择合适的运营方式。 如果你从事的是一个社区或者交易平台的用户运营,那么你还需要熟悉用户的兴趣习惯,你的用户喜欢创作UGC(用户原创内容,社区型网站或产品的互动、回复、发表等;交易型网站或产品的成交、评论等;门户网站或产品的发言、评论、回复等)还是喜欢交易,是喜欢韩庚还是喜欢“长腿欧巴(哥哥)”,是习惯打折还是可以进行忠诚度管理。 最后,你还要熟练掌握网站的用户行为数据分析,据此你会懂得用户为什么来、为什么走、为什么留下来、为什么活跃。对新用户的增长、已有用户的活跃和留存、活跃用户的促使付费转化、流失用户的挽回都有对应的措施,运营人员才能达到所谓“想得出办法、干得出事情、负得起责任”这样基本的用户运营职责要求。 用户运营的核心内容是什么? 用户运营的核心是开源(拉动新用户)、节流(防止用户流失与流失用户挽回)、维持(已有用户的留存)、刺激(促进用户活跃甚至向付费用户转化)。 最后,如果你还具备从用户需求出发反向提出产品优化建议的能力,那么用户运营工作将不再是一个难题。 ### 活动运营 什么是活动运营?我的理解是,活动运营是通过开展独立活动、联合活动,拉动某一个或多个指标的短期提升的运营工作。 活动运营人员的日常工作是什么?当然是策划活动。但是策划活动是一个非常笼统的概念,它具体包含如下内容。 - 活动文案撰写 - 文案得写,哪怕开始时写得惨不忍睹,但写得多了,你自然知道什么样的文案用户看得懂,进而也就知道什么样的活动可以吸引你的用户。 - 活动流程设计 - 活动流程需要设计,哪怕开始时你设计的流程无比简单。做得多了,你自然也会悟出什么样的活动流程是自然的、妥帖的、用户乐于去执行的。 - 活动规则制定 - 你还需要制定活动规则,你会从中了解用户喜欢什么样的规则,比如,发奖应当让用户直接领取,还是通过推送告知用户。你会懂得规则如何设计能让用户最快明白,几步操作是用户的极限。 - 活动成本预估 - 活动成本预估是指了解拉动一个指标的单人成本,活动会不会被刷,风险在哪里,如何控制?一个活动必然有需要付出的成本,成本高了运营的压力太大,成本低了用户不愿意参与,活动设计得再漂亮也是白搭。 - 活动预期收益 - 付出当然会有收获,活动预期收益是指你的活动是为了拉动哪个或哪些指标,将为网站(产品)带来怎样的收益,收益不仅仅是收入,还有用户活跃度、留存率,减少流失等指标,这些内容是设计活动的目标。 - 活动效果统计 - 活动开始后,你需要明确地让自己和领导知道:活动效果好不好;如果不好,如何改进,能不能在活动中通过调整文案、入口来改善活动的效果。如果某一类活动的效果不好,那么以后就不要进行同样的活动设计,如果某一类活动的效果很好,运营人员应该加以总结形成活动机制,让它持续地贡献效益。 - 活动改进措施 - 这一点通常会在活动报告中体现,但活动上线之前,你就要预备一些可能会在活动中启用的措施,促进活动效果的提升。 ## 第三章 揭开内容运营的面纱 ### 内容运营的初期事项 内容运营涉及的事情很多,并且非常细节化,它至少包含了以下内容: - 内容的采集与创造。 - 内容的呈现与管理。 - 内容的扩散与传导。 - 内容的效果与评估。 #### 内容供应链——将内容视为你的商品 “供应链”的意思是:产品生产和流通过程中所涉及的原材料供应商、生产商、分销商、零售商以及最终消费者等成员通过与上游、下游成员的连接(linkage)组成的网络结构。 一张典型的供应链流程划分图,如图3–1所示。 ![snip20190225_32.png](operation-start4.png) 一张典型的网站内容的流转流程图,如图3–2所示。 经过这样对比,“供应链”和“内容”似乎确有关系。内容运营初期,运营人员必须解决以下几点: - 网站(产品)上有哪些内容(定位) - 这些内容从哪里来,由谁提供(来源) - 这些内容给谁看,要达到什么样的目标(受众) - 这些内容要如何组织与呈现(展现机制) - 这些内容如何做筛选,什么是好的内容(内容标准化) ![snip20190225_33.png](operation-start5.png) 在内容运营的初期,我们对运营工作的排序应当是: - 内容消费者定位(网站定位+受众定位+运营目标)。 - 内容来源确认(采集或者寻找内容生产者)。 - 内容标准的确立(有哪些内容、如何展现内容、评判内容质量的标准)。 #### 内容初始化——构建网站与产品的价值观 “内容初始化”的定义了:内容初始化就是在已构建好的内容框架下,在用户进入之前填充一些内容,这些内容是内容运营初期网站或(产品)的核心部分,代表着网站(产品)的价值观。 对于这一定义下的内容初始化,我们发现其中有几个依赖项需要在内容初始化之前解决。 1. 确立好内容供应链的架构,即通过系统去解决内容从哪里来、到哪里去的流程问题。 2. 确立好内容面对的初始用户群(关于初始用户或者称为“种子用户”,我们会在后面具体讨论)。 3. 明确第一阶段用内容解决的问题,并进行内容准备。 4. 关键路径的梳理与初始内容的准备。 ### 持续运营中的内容运营——以知乎为例 当一个网站(产品)进入正式运营阶段,就需要建立一些标准,具体包括: - 内容质量的甄别。 - 好内容的露出与呈现方式。 - 持续的推送与推荐机制的建立。 - 实现“自运营”的路径与机制选择。 #### 推送渠道 推送(也称为消息、通知),是很多运营人员都会用的手段,如果我们划分通知或者推送的渠道,可能会包含但不限于以下类型。 渠道的选择上,运营人员需要考虑如下两方面因素: 1. 优先考虑渠道是否覆盖推送对象。如果之前用户根本不看邮箱的EDM(电子邮件营销),那么通过这个渠道推送用户消息,就是无意义的;如果用户对手机应用上的小红点有强迫症,那么你就应该更多地使用这种渠道和方式推送通知或消息。 2. 推送内容的时效性。确定了推送对象,就要考虑推送的内容的时效性如何,如果是非常紧急的推送,那么就要尽可能地利用用户最常使用的渠道去告知,比如,如果站内发生了拖库,用户信息可能被泄露,你通知用户更改密码就要用最直接的方式,如用户短信推送、网站弹窗浮窗等等;如果你的消息没有这么强的时效性,你就可以选择更柔和的推送渠道,如发封邮件、提供登录提醒、发送站短等。 渠道选择也有依据,譬如下面几个。 - 历史推送数据。它主要包括使用过什么样的渠道,各个渠道的到达率与转化率如何。 - 竞品选择的渠道。如果没有历史数据,就需要预估,此时比较具有参考价值的,是竞品的渠道选择。 - 用户兴趣点所涉及的渠道。如果没有历史数据,也没有掌握竞品的情况甚至没有竞品,那么可能就需要根据用户的行为去猜测用户可能会在哪些渠道上接受信息,比如搜索引擎,属于几乎人人都会去接触的;比如电商网站用户经常会去导购平台、返利平台。 #### 写一个好文案 ##### 贴近受众的心理。 你的文案需要考虑受众的心理感受,要么迎合良性感受,要么打击不良感受,要么二者兼顾。所以要弄清楚你的受众是谁 “上前一小步,文明一大步”强调的是人人都想成为别人眼中的文明人,可是,上厕所这件事不会达到被人评价“文明”的效果。除非你随地大小便。而第二个文案则抓住了男人的心态,利用强烈的心理暗示可以解决很多问题。 ##### 选一个好位置。 贴在抬头就能看到的地方,醒目、直接,受众一般不会被其他部分干扰,譬如,在刚才的文案上,如果你再贴个美女图之类的,估计就很少有人看得到了。比如之前流行的段子: ![snip20190225_34.png](operation-start6.png) ##### 简单有趣,朗朗上口。 朗朗上口代表着易于传播,当社交平台的力量被放大的时候,用朗朗上口的文案,更容易帮我们带来内容的传播,从而带来更多的用户。譬如说:Nike(耐克)的广告语:Just do it!(想做就做!)可谓人尽皆知。 ##### 符合场景。 知乎用户徐慧琳曾经总结过好文案的特征:称呼亲切、内容简单、落款严肃、充满诱惑。 比如,网上曾经盛传的一个截图: ![snip20190225_35.png](operation-start7.png) 怎么样才能在日常运营工作中写出好文案呢? 第一,了解受众。 不管是做活动还是日常运营,你都需要了解你的文案是给谁看的。如图3–9,杜蕾斯的营销广告。 ![snip20190225_36.png](operation-start8.png) 图3–9 资料来源:杜蕾斯新浪官方微博 第二,了解产品和活动。 不管文案给谁看,你都要明白这些人需要什么,而你能够提供什么。 第三,准确表达。 不管是活动规则,还是产品介绍,也不管你用多少笔墨,你要准确地告诉受众,你的文案在表达什么。一个活动运营的文案,要说清楚活动规则;一个产品介绍的文案,要说清楚产品功能、产品特点。 如图3–10,亚马逊请用户评价已购商品的邮件推送。 ![snip20190225_37.png](operation-start9.png) 图3–10 资料来源:亚马逊推送的邮件 如图3–11,用一个Slogan(广告语)“甜过初恋”说明产品特性。 ![snip20190225_38.png](operation-start10.png) 图3–11 资料来源:2010年早报网网友拍摄的照片 第四,画龙点睛。 做活动文案要突出用户做了大量行为之后能够获得什么,价值何在;做产品文案要突出产品最独特或者最有优势的那个方面。如图3–12,One一个的产品文案。 ![snip20190225_39.png](operation-start11.png) 图3–12 资料来源:One一个的产品文案 第五,勤加练习。 推送效果如何判定的说明。 通常,用户从收到推送到完成转化的路径是这样的,如图3–13(按照一般情况作图,如果有遗漏在所难免)。 在用户的路径中,各个环节应该都有统计数据,关键看网站(产品)在这方面有没有考量和设计,如果没有,那么就要增加。 这一类统计数据的表现结构一般来说呈漏斗状,如图3–14。 ![snip20190225_41.png](operation-start12.png) 图3–14 各级数据中,都有对应的转化率。所以,你需要了解的是,漏斗的每个环节的转化率分别是多少,要比照渠道、内容、用户选型去分析。分析的目标就是形成结论,主要包含如下几点。 - 渠道的质量分析,比如哪个/哪些渠道效果好,哪些渠道效果不佳。 - 通过各渠道发出的推送成功到达用户的数量。 - 用户对待推送的态度如何,有多少用户打开、阅读了推送的内容。 - 在接收、查看推送的用户中,有多少人进入网站(产品)中对应的Landing Page(着陆页)。 - 最后,有多少用户完成了我们期望的转化。 - 对待这些数据,我们有哪些经验和教训,以后应当如何保持、改进、提高,这些应落实到具体措施中,下一次再进行尝试。 在整个推送过程中,我们需要注意一点:避免用户打扰。 #### 内容的推荐与整合 当网站(产品)的内容逐渐充实,内容运营人员的日常工作会从生产内容转变为内容推荐与整合。所谓内容推荐,就是让优质的内容更多地呈现给用户。所谓内容整合,就是让同类的内容产生集合。 知乎的内容推荐机制分为几个部分。 1. 关注话题与关注对象的Timeline,用户主动关注的对象和话题下的内容更新,会以Timeline的形式呈现给关注者; 2. 对于网站上大量的优质内容,用户可以主动通过“发现”、“话题”等功能去寻找。 1. 话题动态推荐新近发生的有关关注话题的动态,如图3–15。![image.png](operation-start13.png) 2. 热门内容通过发现进行推荐(编辑推荐+热度),如图3–16。![image.png](operation-start14.png) 3. 对于新近进入的成员的优质内容,通过“首场秀”进行推荐。 4. 对于一些推荐阅读的内容,通过“每周精选”呈现给用户,如图3–17。![image.png](operation-start15.png) 5. 知乎官微及个人自媒体等新媒体转发(这不仅仅是推荐,也是推送),如图3–18。![image.png](operation-start16.png) 6. 知乎的XXXX年的总结(严格来说,这一点并非内容推荐机制)。这一点主要是为了用户进行自我宣传,从而吸引潜在用户的关注,如图3–19。![image.png](operation-start17.png) 知乎的内容整合通过如下几种形态展现。 1. 知乎日报。每日整合更新的全站内容,分门别类提供用户查看,如图3–20。 2. 知乎圆桌。通过整合同一话题下的热门回答和优质回答者,进行更深层次的内容运营,如图3–21。 3. 知乎周刊。与日报不同的一种形态,主要以电子书的形式做内容聚合,如图3–22。 4. 内容出版与发行。对优质内容和优质用户通过出版物的形式做内容整合与推荐,如图3–23。 ![image.png](operation-start18.png) 图3–20 ![image.png](operation-start19.png) 图3–21 ![image.png](operation-start20.png) 图3–22 ![image.png](operation-start21.png) 图3–23 #### 自运营的路径与机制选择 所谓“自运营”,是指建立一些机制和规则,用户通过遵守这些机制,利用这些规则,使得网站的日常运营不再过多地依赖运营人员的引导,实现用户自主运营。 ### 公共平台的内容运营 #### 公共平台内容运营的步骤 - 先定位 - 根据品牌自身的特点、受众、调性来定义公共平台所要进行运营的内容的特色、受众和调性。 - 这个定位,实际上包含两层意思:第一层意思是面向受众群的定位。你要清楚哪些受众群体会喜欢你的内容。第二层意思是面向内容的定位。对于这样的受众群体,你应该通过什么类型的内容进行长期的运营。 - 培养用户的习惯 - 很多公共平台运营人员关心的问题之一,是内容什么时候发布最好。 - 其实我的经验是,不管是早晨通勤时间发布,中午休息时间发布,还是晚上休闲时间发布,这个时间点都不重要。重要的是,要在固定的时间发布内容。如果内容发布的时间固定,长期关注内容的用户会养成定时查看的习惯。 - 坚持长期的内容运营方针 - 与内容消费者保持互动 - 坚持原创 ### 内容运营的核心 内容供应链的建立必然涉及三方:网站(产品)、内容生产者及内容消费者。 ## 第四章 做一个有趣的活动 活动运营,顾名思义是通过组织活动在短期内快速提升相关指标的运营手段。我们拆分一下这句话中的关键字: - 短期:在一个较短的时间内开展活动。 - 快速:用简单直接的方式在较短时间内达成结果。 - 提升指标:目的明确,提升活动对应指标,达成KPI。 具体来说,一个完整的活动运营流程可能会涉及如下步骤: - 策划:活动的设计阶段,会定义明确的活动时间、对象、方式、目标、预算等。 - 开发:活动需要由设计人员设计界面,请开发人员开发实现功能。 - 测试:一个活动开发完成后,需要测试以确认功能是否可用与易用。 - 宣传:找到可以触达用户的渠道,协调资源来做活动露出。这个阶段几乎是和开发、测试同时进行的,而且为了活动效果,在上线之前就会做一些预热。 - 上线:终于到了上线时间,活动就会在线上进行展示,让用户参与活动。 - 指标监控:活动上线后,需要监测相应的指标,根据指标反映的问题进行适当的调整。 - 奖励发放:活动结束后(当然,也可以是活动进行中),对符合奖励条件的用户发放奖励。 - 效果评估:活动结束后,评估活动效果,总结经验教训,以备下次活动参考借鉴。 ![snip20190225_51.png](operation-start22.png) 在整个活动运营过程中,有四件事情非常重要,可以称之为“核心”,它们分别是: - 活动设计与成本预算。 - 活动风险管控与应急预案。 - 活动数据监测与应对策略。 - 活动效果判定与总结。 ### 活动设计与成本预算 说到这里,针对活动运营的成本预算管控,我们在活动设计上可以做什么呢?我的观点如下: 1. 先看能不能借势,再看能不能借力。可以借势的活动用抽奖的方式进行,可以借力的活动用合作分摊成本。 2. 如果势、力皆无,那么就要拿出数据说服老板,要么降低活动预期,要么增加活动预算。 3. 如果说服不了老板,那么,尽你的最大努力,来设计一个吸引人的活动吧。 #### 活动规则的设计准则 活动规则的设计准则就一句话:流程简单少思考,文案清晰无歧义。 #### 如何写活动策划 一个标准的活动策划可能包含但不限于以下内容: 1. 活动主题:活动文案的一部分,让用户看得懂,明白活动是什么主题,是否对他有吸引力。 2. 活动对象:明确活动针对的群体,让用户看得懂,让自己抓得住,让领导认可。 3. 活动时间:活动的开始时间、结束时间,奖励的发放时间、领取时间。 4. 活动描述:活动文案的一部分,让用户看过之后明白要不要参与,怎么参与。 5. 规则详情:活动文案的一部分,让用户看得懂,让开发人员看得懂,一部分内容是在前端展示给用户看的,另一部分内容是让开发人员知道活动如何实现。 6. 投放渠道:让市场人员或者你自己看得懂,要有投放时间、投放渠道的选择、预算。 7. 风险控制:让开发人员看得懂你的风险环节是什么,有无对应的措施来解决。 8. 监测指标:涵盖大多数相关指标,包括投放渠道的监控、用户参与情况的监控、奖励发放的监控等。监测这些指标可以帮助你在查看数据的时候找到问题,并且启发你去解决这些问题。 9. 成本预估:一个活动需要多少钱,单人成本是多少。成本预估不一定非常准确,但是必须要树立这个意识。有一些活动是不花钱的,但是如果要花钱,你要明白一个活动的容量有多大,对指标的帮助是什么,为了这些利益,你需要多少成本支持。 10. 效果评估:有成本就有收益,你的活动目的对网站(产品)的哪些指标是有帮助的,以及如何体现,你需要考虑,并让领导认可。 11. FAQ(常见问题解答):可以另外准备一个文档,提供给客服或者相关人员,帮助解决用户在参与活动中遇到的问题。FAQ要详细、标准。如果活动规模大,仅有FAQ还不够,你需要提前准备客服的培训文件,并积极与客服人员沟通。 活动策划的文本通常会分为两个部分:一部分作为前端展示,除了让用户看得明白如何参与活动,更要能够推动用户主动参与;另一部分是作为与开发人员的约定,活动如何设计、如何实现,需要和开发人员沟通,必要的时候,你需要另外做一个文档,将流程、需求罗列清楚,并且和开发人员保持沟通。 活动策划文档的目的,是为了让活动做得有理有据。做活动的理由、耗费运营成本的代价、上线后可能带来的预期收益都是必须体现在活动策划中的。 通常,一个活动要经历如下环节,如图4–8。 ![image.png](operation-start23.png) 图4–8 活动效果的报告可长可短,但通常要包含以下内容: 1. 活动概述:简单概述活动主题、对象、时间、内容。 2. 活动效果统计:对活动结束后的活动效果进行描述。 3. 宣传效果统计:对各个投放渠道的效果进行统计,并且掌握每个渠道带来的流量、转化率的相关数据。 4. 反思与总结:活动效果、宣传效果带来了哪些经验和教训,下次应该怎么调整,如何提高。 #### 活动风险管控与应急预案 首先,我们来看一下线上的活动流程中有哪些环节,如图4–9。 ![image.png](operation-start24.png) 图4–9 每一个阶段都涉及不同的人员,并存在不同的风险,我们用一张思维导图来具体说明,见图4–10。 ![image.png](operation-start25.png) 图4–10 #### 活动数据监测与应对策略 图4–11仅仅是粗略地告诉我们哪些数据需要统计,而监控意味着这些数据需要被实时监测,发现问题需要报警。那么,监控数据的目的就是发现问题并解决问题。监控数据,就是为了发现引流的过程中是否有问题、用户参与活动的流程中是否有问题、财务控制是否有问题。 如果引流有问题,首先要确认问题集中在哪些渠道,如果找到了有问题的渠道,接下来的解决办法通常是三步走: 1. 更换素材与文案,持续监测效果,如果无效,进行第二步。 2. 更换投放时间及覆盖范围,持续监测效果,如果无效,进行第三步。 3. 下架或更换渠道。 如果用户流程有问题,怎么办?解决方案同样是三步走: 1. 更改页面活动流程描述,或更具体,或更简明。 2. 推送消息或通知,引导用户再次操作。 3. 尽快迭代,简化或优化流程。更新活动后再从第一步开始循环进行。 如果财务控制有问题,怎么办?这个相对来说比较简单: 一种选择是,提前结束这次活动,并立刻上线新活动进行接力,使用新的活动预算,对用户进行补偿。另一种选择是继续该活动,同时抓紧申请增加活动预算。 ![image.png](operation-start26.png) 图4–11 ## 第五章 用户运营比想象得更难 ### 你了解你的用户吗? #### 通过数据窥探用户 通常,在图5–2所示的每一个环节中,用户基本都会做以下几件事。 ![image.png](operation-start27.png) 图5–2 - 浏览:用户会在网站内随意逛逛,对应的数据指标是停留时长。>关联指标是点击、注册、登录。 - 点击:用户会在页面上随意点击,包括网页上的广告、按钮、图片、链接。 - 注册:用户可能会点击首页上的注册按钮或者注册链接,进行注册。 - 登录:用户可能会点击首页上的登录按钮或者登录链接进行登录。 - 蹦失:请注意这个词的定义,蹦失不等于跳出,蹦失是用户直接离开页面或者关闭浏览器。跳出是离开这个页面,在正常流程中,用户也会跳出,不一定是蹦失。 - 操作:用户可能点击进入查看商品的列表,也可能点击查看商品的详细介绍,还有可能决定下单、付费。 #### 详情页转化率 转化率有几个层面的不同定义: - 列表页转化率=最终下单用户数/商品列表页到达用户数 - 详情页转化率=最终下单用户数/商品详情页到达用户数 - 支付转化率(支付成功率)=支付成功的用户/最终下单用户数 ### 用户运营的工作内容 #### 开源 开源,主要是指用户规模的扩大,通常落脚点在访客量和注册用户数,但主要是注册用户数,因此开源的主要工作有两类。 ![image.png](operation-start28.png) 1. 注册渠道的挑选与打开。 - 注册渠道的选择决定用户进入网站(产品)的入口;注册方式的选择决定用户进入的门槛。如今,开源的方式有很多,如图5–8。 - 其中,常见的方式有四种。第一种方式通常出现在对第三方登录没有要求的自体账号建设中。第二种相对来说非常少见,因为过分依赖第三方登录,如果第三方终止合作,用户也就流失了。第三种和第四种最常见,事实上,最后两种是第二种的变体,用以建立自体账号,同时避免第三方合作终止导致的后果。 2. 提升注册转化率。 - 用户完成注册只是第一步,最重要的运营工作是,如何将一个注册用户转化为一个对网站(产品)有认知的有效用户。 ![image.png](operation-start29.png) 图5–8 #### 节流 节流,主要是指保持用户规模,通常落脚点在沉默用户或流失用户,因此节流的主要工作包括3种。 1. 定义用户沉默或流失的标准。 - 用户在多长时间没有登录网站(产品)就意味着流失,这是需要明确定义的。譬如,有些游戏的标准是用户90天或者180天内没有登录过游戏,就视为流失。 2. 建立流失预警机制。 - 弄清楚用户是在什么情况下流失的,通过运营数据建立模型,并制定相关的运营策略,当用户行为符合流失模型定义时发出警告,敦促运营人员进行针对性地调整,预防流失的发生。 3. 对已流失的用户进行挽回。 - 用户如果已经流失了,如何让他们回到网站(产品)中,这需要开展活动。但挽回用户非常困难。 #### 促活跃 促活跃,主要是指提升用户使用网站(产品)的频次,通常落脚点在用户留存率和用户活跃率,因此促活跃的主要工作包括3种。 1. 定义用户留存与用户活跃的标准。 - 用户的留存是否等于用户每天都来网站或者每天都使用产品?如果不是,那么根据网站(产品)的特点,应该如何确定用户留存行为和活跃行为的标准?这些都是运营要解决的定义问题。 2. 提升用户留存率。 - 用户不会无缘无故地留存下来,产品或者运营人员需要做一些促进用户留存的工作。如果用户留存的比例过低,运营人员需要想办法提高留存的数据,这就涉及具体的工作内容。 3. 提升用户活跃度(用户行为、产品使用频次等)。 - 用户留下来了,不意味着用户就是活跃的,有一些行为可以衡量出用户是否活跃,这些行为是什么,如何促进这些行为的发生,这是运营人员要做的功课。 #### 转付费 转付费,主要是指抓住高价值用户(或称核心用户)的需求,让他们为网站(产品)付费,并且持续付费,通常落脚点在付费用户数(根据形态的不同,定义未必是一致的,但在此默认一致),转付费的主要工作包括两种。 1. 通过一系列行为让未付费的活跃用户付费。 - 促进用户从活跃向付费的转化,是以用户付费为盈利方式的网站(产品)的重要工作内容。 2. 通过机制让已付费的用户持续付费。 - 付费用户对网站(产品)有极高的依赖,如何通过运营手段,让他们认为值得为网站(产品)的功能付费甚至是持续付费,是一件困难但必须要考虑的事情。 #### 关联指标 在用户运营工作的相关数据中,对应注册用户行为,有几项关联指标。 - 注册来源 - 用户是从哪个渠道来的?是外部投放的广告落地到了某个Landing Page,引导用户完成了注册,还是用户直接在网站(产品)上完成了注册?这些来源需要标记并了解清楚,用来判断渠道的质量。 - 注册转化率 - 注册转化率是指,从进入注册流程到完成注册流程的注册成功用户数,占所有到达注册页面的用户数的比例。这个数据涉及注册流程是否有优化空间,以及如何优化。 - 蹦失页面 - 蹦失页面是指没有完成注册流程的用户跳出注册流程的页面或者步骤。这个数据涉及后续流失用户的分析,必须关注。 在用户运营的不同阶段,围绕注册数据,关联指标的重要程度是不同的。 在用户运营的初期,为了低成本获取外部用户,注册来源的质量是最重要的指标。而判断注册来源的质量,就要考虑注册转化的成功率,并参考蹦失页面,来确认用户为什么会放弃注册转化,判断是否可以优化注册引导流程。 在用户运营的中期,需要新用户的稳定进入,就需要密切关注注册转化率指标与蹦失页面指标,适时调整,并考虑采用配套活动推送用户的注册引导行为。 在用户运营的后期,需要关注用户的留存及活跃度,此时就不需要刻意关注注册的相关指标,反而需要注意用户的留存度指标和活跃指标,以及流失用户的模型建立及预警机制。 #### 定义流失用户的衡量标准 在运营工作中,我们通常会看到如下事实: - 流失行为是一个长期的持续的行为(留存也是,并不是说用户用了多长时间就是留存,而是在一个相对较长的时间内,用户一直在持续使用,哪怕频率是1个月使用1次)。 - 定义流失需要首先建立用户行为模型,从而确认对于网站(产品)来说,到底用户多长时间不使用就是流失。 #### 建立流失预警机制 流失预警的前提是,对用户行为数据和产品节奏保持长期有效的监测,因为运营人员需要了解以下信息,甚至更多信息,才能对流失预警做出判断: - 在流失前,用户进行了哪些类似的行为。 - 这些用户是否集中于某一渠道。 - 这些用户的性别属性、地域属性、年龄层次、兴趣特征是否类似。 - 在发生流失的时间点,产品做了哪些动作,是否发布了新版本,是否更改了某些核心功能。 第4点其实有点尴尬,因为这种情况出现的几率并不少,但却不一定是用户的错,也不是运营的错,而是产品改得让用户有些茫然。 所以,这里有一些建议给产品经理和相关的运营人员: 1. 产品在做改版设计时,一定要充分调研用户和听取运营人员的意见。运营人员也一定要拿出数据来佐证产品的改版设计是否合理,是否会影响已有用户的活跃和留存。 2. 对于大改版,一定要慎之又慎,灰度测试必不可少,同时该坚持的原则一定要坚持,改版一定不要仅凭感觉。改版之前,一定要和运营同学讨论一下新版本的引导学习流程的设计。运营人员也要充分加入到讨论中,做好各种预案及策略,在出现问题时,可以有效地缓解甚至解决,避免带来预料之外的麻烦。 3. 运营人员要密切掌握用户的使用反馈,及时解决各种可能的运营风险。 #### 流失预警 最早开始做流失预警的,可能是通信运营商。做法很简单:明确定义;变量选取、多次建模;指导业务。 互联网的用户运营,也需要这样的方法来建立流失模型。我们需要做如下几点。 - 明确用户流失标准。譬如,网络游戏里常用的90天无登录、180天无登录。 - 选取用于建模的指标。譬如:用户的属性(性别、区域、年龄、有无注册等)、用户的行为(活跃的频率、活跃时对应的操作等)、其他指标(从活跃到流失经历的时间、对应的版本与功能等)。 - 建立模型,并不断地调试,剔除无意义的干扰项。 - 从数据库中把符合模型的用户筛选出来。 - 设计活动、话术,直接与用户沟通,尝试延长其在产品中的生命周期。 ## 第六章 关于数据的一二三 ### 谈论数据的基础 #### 数据的定义 图6–1仅仅简单地展示了部分通用的运营数据,其中三个数据类型是所有运营人员都需要了解的:渠道数据、成本数据、收益数据。 ![image.png](operation-start30.png) 图6–1 流量包含了好几个指标,最关键的有以下一些: - UV(Unique Visitors):独立访客数 - 独立访客数和独立IP是两个概念。独立IP要求访问者的IP地址各不相同,而独立访客数则未必。比如,在同一台电脑上,你注册了一个新用户,你哥哥注册了另一个新用户。此时,网站的后台会记录1个独立IP,但同时会记录2个UV。而如果在同一台电脑上,你和你哥哥都没有注册,只是浏览,那么后台会记录1个独立IP及1个UV。当然,在同一天内,不管一个独立IP下的独立访客访问多少次,后台都只记录1次。 - PV(Page Views):页面访问量 - 每一个用户,每打开一个页面,就是一个PV。 - RV(Repeat Visitors):重复访客 - 比如,昨天小明浏览了我的微信公众号,今天他又来了。小明就是一个RV。 - TP(Time On Page):页面停留时间 - 比如,王大壮最喜欢看新闻,所以他每天看XO站的新闻频道10分钟;李小勇最喜欢看美女,所以他每天看XO站的美女频道30分钟。这就是TP。 ### 运营的核心数据 - 内容运营的核心数据 - 内容的展示数据 - 内容的展示数据是最基础的数据,它的意义和价值在于:提供给内容运营者一个直观而基础的数据,用来展示内容被点击、查阅的情况,从而分析内容是否为网站(产品)提供了相应的帮助,如:内容覆盖人数、内容是否符合用户兴趣等。 - 内容的展示数据可能包括但不限于: - 内容的点击次数; - 内容页面的蹦失率; - 内容页面的停留时长。 - 以一篇文章为例,这篇文章的链接被点击了100次,其中,50次点击停留的平均时长为20秒,10次是点击后直接关闭网页,另外40次点击停留的平均时长是3秒。通过这些数据,我们可以了解到,这篇文章的质量可能是不错的。接下来要做的事情是,10次直接关闭网页和40次平均3秒的停留时长背后的用户还看了哪些文章,他们的行为是怎样的。 - 内容的转化数据 - 内容的转化数据,是相对展示数据而言更深层的数据,它往往用于判断内容是否能够促进用户的转化,比如能否利用内容让用户从活跃转向付费。 - 我们以一本网络小说为例,从免费阅读转向付费阅读,数据表现出来的该作品的“吸金”能力,就是内容的转化数据。从一定层面上说,这是衡量内容能否带来高质量“粉丝”的一个依据。 - 内容转化数据可能包括但不限于: - 内容中付费链接的点击次数、付费成功次数; - 内容页面广告的点击次数、广告的停留时间、二次转化成功率。 - 内容的黏性数据 - 黏性数据和展示数据相关,但二者有一些区别。考虑展示数据时,如果进一步分析用户重复阅读的次数,那么结合每次阅读的停留时间,就可以得到黏性数据。 - 对于黏性数据,其实完全可以采用会员管理系统里的RFM客户关系管理模型来进行分析,获得内容或者用户的黏性值和分布,从而指导日后的内容运营工作。RFM模型在本章节中不做展开,有兴趣的读者可以使用百度搜索或进入MBA智库百科去查阅相关词条。 - 内容的扩散与分享数据 - 内容的扩散数据或称“分享”数据,是社会化浪潮中一个新增可监测的数据。 - 内容的分享频次和分享后带来的流量统计,可以说明内容对某类用户的价值和作用情况,这对需要通过分享带来用户的网站(产品),以及需要引爆热点和病毒传播的运营有着重大的意义和价值。 - 活动运营核心数据 - 案例1:某网站开展了一个分享邀请的活动。活动主旨是让老用户带来新用户,可以通过社会化渠道、邮件、复制链接进行分享,新用户通过各个渠道的邀请链接进入活动注册页面完成注册,并进入网站,补填用户资料并完成一次登录,即认为有效。完成有效邀请的老用户和完成注册的受邀请新用户,均可以获赠一件小礼品。 - 对于此类活动,有几个数据是关键点,比如: - 分享渠道的质量——用来判断下次活动主推哪些分享渠道。 - 受邀请用户的注册成功率——用来进行发奖和判断活动质量。 - 进行分享的老用户的参与度——用来进行用户分级,判断活动规则对老用户的吸引力,以后如果开展类似活动,应当选择怎样的用户选型。 - 那么核心数据就会包括: - 各分享渠道的分享次数、分享链接的点击次数、各渠道注册–成功的转化率 - 总的注册–成功转化率、用户注册的蹦失节点、用户注册完成后引导过程的蹦失节点。 - 参与活动的老用户的总数、分享渠道按照使用次数的分布、使用了2个或2个以上分享渠道的老用户的日常行为表现(如活动前后一个月的行为表现)等。 - 案例2:某电商网站开展母婴用品折扣活动,希望在活动期间带来2倍于日常销量的销量增长。 - 此类活动也有几个关键数据: - 广告投放渠道的质量——用于判断目标用户的媒体触点,是未来类似活动的主要投放渠道的筛选凭证。 - 单品销量的增长情况——用于判断目标用户对什么样的产品更感兴趣。 - 总体销量目标的完成度——用于判断活动是否达到预期。 - 各关键节点的转化率——活动页面商品的点击次数–进入页面的流量、浏览–放入购物车/下单的转化率、购物车–付费的成功率、支付成功率。 - 那么核心数据就会包括: - 分渠道的广告展示统计——展示次数、点击次数、landing page蹦失率。 - 用户兴趣点分布——页面商品点击次数、单品浏览量、下单量、使用购物车的用户数和商品进入购物车的次数。 - 订单转化率——浏览–下单的转化率、购物车–下单的转化率。 - 支付成功率——成功完成支付的订单数/提交的订单数。 - 用户运营核心数据 - 用户注册数据 - 注册用户的规模、增长速度——现在有多少用户,未来何时会有多少用户; - 渠道质量——注册渠道有哪些,渠道的注册转化率如何; - 注册流程质量——完成注册的用户数、注册流程中用户蹦失节点统计。 - 注册用户行为跟踪——完成注册后当时用户的行为统计。 - 用户留存数据 - 留存用户的规模,从注册到留存的转化率——已有注册用户中,多少注册用户会留下来,能否提升转化率,让更多的用户留存。 - 用户登录的时间、频率——留存的用户使用产品的习惯是登录后使用吗?如果是的话,他们都是什么时候登录,几天登录一次? - 用户使用网站(产品)服务的时间、时长、频率等——每次用户使用产品,会停留多长时间,使用核心功能还是辅助功能,使用功能的频率是怎样的。 - 用户活跃数据 - 活跃用户的规模、增长速度,从注册到活跃的转化率——留下来的用户是活跃的用户,那么活跃的定义是什么,有多少用户符合这个定义,活跃用户的增长速度。 - 活跃用户的行为统计——活跃用户使用产品的哪些功能,他们每次使用产品的路径是不变的吗?对于新的功能,他们是如何使用的? - 用户使用网站(产品)服务的频率、内容、行为——用户对网站(产品)的功能的使用情况,包括频率等;他们对内容的接受情况。 - 用户付费数据 - 付费用户规模、增长速度、注册到付费/活跃到付费的转化率——这决定了产品的盈利能力,收入增长的速度和宽度。 - 付费金额、频率等——简单来说,用户在此花多少钱,多久花一次钱? - 付费用户的日常行为跟踪——了解用户不花钱的时候的一些行为。 - 用户流失数据 - 流失用户的规模、速度——用户流失了多少?每天流失的速度是10个还是10万个?这决定了产品的生命周期还能延续多久。 - 流失用户的日常行为跟踪——他们在流失之前做了什么? - 用户流失的原因分析——为什么用户做了这些动作之后就会流失? - 流失用户挽回策略和效果分析等——能够挽回这些用户吗?什么样的动作对挽回他们有帮助?这些动作可以长期做吗? ## 第七章 当运营遇上产品 ### 所以运营切入产品最好的节点是:产品设计之前。 #### 运营工具设计 - 内容方面的需求整理 - 内容管理后台的需求整理 - 运营人员需要怎样的后台,是一个简单的编辑器,还是一个能够做复杂操作的专属后台?需求方是运营,产品方要协助实现功能,让运营人员有工具可以做对应操作。 - 内容来源渠道的整理 - 日常的内容从哪里来,是自己原创还是转载,用户是否会参与内容的建设?所有的内容来源渠道都需要整理,并且在运营人员的掌握之中。 - 内容质量与效果评价标准的整理 - 什么样的内容是好的内容?好内容有什么评价标准,是否可以标准化?对于UGC产品,这一点会决定未来内容的发展方向,以及用户是否会喜欢内容。 - 活动方面的需求整理 - 活动类型、活动时间节点的梳理 - 一般情况下,多久做一次活动,活动是否可以模块化?最近一次活动什么时候做?活动会采用什么样的方式,需要产品人员与开发人员提供哪些支持? - 活动后台的需求整理 - 活动需要后台吗?如果需要,后台需要哪些功能才能够支持运营工作? - 活动目标的梳理 - 活动目的是什么,与产品有关系吗?活动如何体现对产品的支持? - 运营数据的需求整理 - 基础运营数据的需求整理 - 日常运营工作中,需要哪些基础运营数据,是通用的还是个性化的,是否需要特别开发? - 核心运营数据的需求整理 - 哪些数据是核心数据?什么时候以何种方式提供?数据来自一个特定的后台,还是定时发送的邮件? - 关键运营数据的需求整理 - 哪些数据是关键数据?它们对于产品的价值是什么,对于运营的价值在哪里?数据以何种方式提供,是后台还是邮件?
zhangjunhd/reading-notes
pm/operation/operation-start-from-scratch.md
Markdown
mit
52,847
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>relation-algebra: Not compatible 👼</title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / extra-dev</a></li> <li class="active"><a href="">dev / relation-algebra - 1.6</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> relation-algebra <small> 1.6 <span class="label label-info">Not compatible 👼</span> </small> </h1> <p>📅 <em><script>document.write(moment("2022-01-23 14:46:44 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-01-23 14:46:44 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-threads base base-unix base conf-findutils 1 Virtual package relying on findutils conf-gmp 3 Virtual package relying on a GMP lib system installation coq dev Formal proof management system dune 2.9.1 Fast, portable, and opinionated build system ocaml 4.09.1 The OCaml compiler (virtual package) ocaml-base-compiler 4.09.1 Official release 4.09.1 ocaml-config 1 OCaml Switch Configuration ocamlfind 1.9.1 A library manager for OCaml zarith 1.12 Implements arithmetic and logical operations over arbitrary-precision integers # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;Damien Pous &lt;Damien.Pous@ens-lyon.fr&gt;&quot; homepage: &quot;http://perso.ens-lyon.fr/damien.pous/ra/&quot; license: &quot;LGPL&quot; build: [ [&quot;coq_makefile&quot; &quot;-f&quot; &quot;Make&quot; &quot;-o&quot; &quot;Makefile&quot;] [make &quot;-j%{jobs}%&quot;] ] install: [make &quot;install&quot;] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.5.1&quot; &amp; &lt; &quot;8.6~&quot; &amp; != &quot;8.5.2~camlp4&quot;} ] tags: [ &quot;keyword:relation algebra&quot; &quot;keyword:Kleene algebra with tests&quot; &quot;keyword:KAT&quot; &quot;keyword:allegories&quot; &quot;keyword:residuated structures&quot; &quot;keyword:automata&quot; &quot;keyword:regular expressions&quot; &quot;keyword:matrices&quot; &quot;category:Mathematics/Algebra&quot; &quot;logpath:RelationAlgebra&quot; ] authors: [ &quot;Damien Pous &lt;Damien.Pous@ens-lyon.fr&gt;&quot; ] synopsis: &quot;Relation Algebra and KAT&quot; description: &quot;A modular library about relation algebra, from idempotent semirings to residuated Kleene allegories, including a decision tactic for Kleene algebra with Tests (KAT).&quot; url { src: &quot;https://github.com/damien-pous/relation-algebra/archive/v1.6.tar.gz&quot; checksum: &quot;md5=028c37f7e4607d220d6e054cb0428273&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install 🏜️</h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action coq-relation-algebra.1.6 coq.dev</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is dev). The following dependencies couldn&#39;t be met: - coq-relation-algebra -&gt; coq &lt; 8.6~ -&gt; ocaml &lt; 4.06.0 base of this switch (use `--unlock-base&#39; to force) Your request can&#39;t be satisfied: - No available version of coq satisfies the constraints No solution found, exiting </pre></dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-relation-algebra.1.6</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Install 🚀</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Installation size</h2> <p>No files were installed.</p> <h2>Uninstall 🧹</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> Sources are on <a href="https://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣 </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
coq-bench/coq-bench.github.io
clean/Linux-x86_64-4.09.1-2.0.6/extra-dev/dev/relation-algebra/1.6.html
HTML
mit
7,200
// // # Yocto/Trace: Path tracing // // Yocto/Trace is a simple path tracer written on the Yocto/Scene model. // Yocto/Trace is implemented in `yocto_trace.h` and `yocto_trace.cpp`. // // // LICENSE: // // Copyright (c) 2016 -- 2021 Fabio Pellacini // // 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. // // #ifndef _YOCTO_TRACE_H_ #define _YOCTO_TRACE_H_ // ----------------------------------------------------------------------------- // INCLUDES // ----------------------------------------------------------------------------- #include <atomic> #include <future> #include <memory> #include <string> #include <utility> #include <vector> #include "yocto_bvh.h" #include "yocto_image.h" #include "yocto_math.h" #include "yocto_sampling.h" // ----------------------------------------------------------------------------- // USING DIRECTIVES // ----------------------------------------------------------------------------- namespace yocto { // using directives using std::atomic; using std::function; using std::future; using std::pair; using std::string; using std::vector; } // namespace yocto // ----------------------------------------------------------------------------- // SCENE DATA // ----------------------------------------------------------------------------- namespace yocto { // Camera based on a simple lens model. The camera is placed using a frame. // Camera projection is described in photographic terms. In particular, // we specify film size (35mm by default), film aspect ration, // the lens' focal length, the focus distance and the lens aperture. // All values are in meters. Here are some common aspect ratios used in video // and still photography. // 3:2 on 35 mm: 0.036 x 0.024 // 16:9 on 35 mm: 0.036 x 0.02025 or 0.04267 x 0.024 // 2.35:1 on 35 mm: 0.036 x 0.01532 or 0.05640 x 0.024 // 2.39:1 on 35 mm: 0.036 x 0.01506 or 0.05736 x 0.024 // 2.4:1 on 35 mm: 0.036 x 0.015 or 0.05760 x 0.024 (approx. 2.39 : 1) // To compute good apertures, one can use the F-stop number from photography // and set the aperture to focal length over f-stop. struct trace_camera { frame3f frame = identity3x4f; bool orthographic = false; float lens = 0.050; float film = 0.036; float aspect = 1.500; float focus = 10000; float aperture = 0; }; // Texture containing either an LDR or HDR image. HdR images are encoded // in linear color space, while LDRs are encoded as sRGB. struct trace_texture { image<vec4f> hdr = {}; image<vec4b> ldr = {}; }; // Material for surfaces, lines and triangles. // For surfaces, uses a microfacet model with thin sheet transmission. // The model is based on OBJ, but contains glTF compatibility. // For the documentation on the values, please see the OBJ format. struct trace_material { // material vec3f emission = {0, 0, 0}; vec3f color = {0, 0, 0}; float specular = 0; float roughness = 0; float metallic = 0; float ior = 1.5; vec3f spectint = {1, 1, 1}; float coat = 0; float transmission = 0; float translucency = 0; vec3f scattering = {0, 0, 0}; float scanisotropy = 0; float trdepth = 0.01; float opacity = 1; bool thin = true; // textures trace_texture* emission_tex = nullptr; trace_texture* color_tex = nullptr; trace_texture* specular_tex = nullptr; trace_texture* metallic_tex = nullptr; trace_texture* roughness_tex = nullptr; trace_texture* transmission_tex = nullptr; trace_texture* translucency_tex = nullptr; trace_texture* spectint_tex = nullptr; trace_texture* scattering_tex = nullptr; trace_texture* coat_tex = nullptr; trace_texture* opacity_tex = nullptr; trace_texture* normal_tex = nullptr; }; // Shape data represented as indexed meshes of elements. // May contain either points, lines, triangles and quads. // Additionally, we support face-varying primitives where // each vertex data has its own topology. struct trace_shape { // primitives vector<int> points = {}; vector<vec2i> lines = {}; vector<vec3i> triangles = {}; vector<vec4i> quads = {}; // face-varying primitives vector<vec4i> quadspos = {}; vector<vec4i> quadsnorm = {}; vector<vec4i> quadstexcoord = {}; // vertex data vector<vec3f> positions = {}; vector<vec3f> normals = {}; vector<vec2f> texcoords = {}; vector<vec4f> colors = {}; vector<float> radius = {}; vector<vec4f> tangents = {}; // subdivision data [experimental] int subdivisions = 0; bool catmullclark = true; bool smooth = true; // displacement data [experimental] float displacement = 0; trace_texture* displacement_tex = nullptr; // shape is assigned at creation int shape_id = -1; }; // Object. struct trace_instance { frame3f frame = identity3x4f; trace_shape* shape = nullptr; trace_material* material = nullptr; // instance id assigned at creation int instance_id = -1; }; // Environment map. struct trace_environment { frame3f frame = identity3x4f; vec3f emission = {0, 0, 0}; trace_texture* emission_tex = nullptr; }; // Scene comprised an array of objects whose memory is owened by the scene. // All members are optional,Scene objects (camera, instances, environments) // have transforms defined internally. A scene can optionally contain a // node hierarchy where each node might point to a camera, instance or // environment. In that case, the element transforms are computed from // the hierarchy. Animation is also optional, with keyframe data that // updates node transformations only if defined. struct trace_scene { // scene elements vector<trace_camera*> cameras = {}; vector<trace_instance*> instances = {}; vector<trace_environment*> environments = {}; vector<trace_shape*> shapes = {}; vector<trace_texture*> textures = {}; vector<trace_material*> materials = {}; // cleanup ~trace_scene(); }; } // namespace yocto // ----------------------------------------------------------------------------- // SCENE CREATION // ----------------------------------------------------------------------------- namespace yocto { // add element to a scene trace_camera* add_camera(trace_scene* scene); trace_environment* add_environment(trace_scene* scene); trace_instance* add_instance(trace_scene* scene); trace_material* add_material(trace_scene* scene); trace_shape* add_shape(trace_scene* scene); trace_texture* add_texture(trace_scene* scene); trace_instance* add_complete_instance(trace_scene* scene); } // namespace yocto // ----------------------------------------------------------------------------- // EVALUATION OF SCENE PROPERTIES // ----------------------------------------------------------------------------- namespace yocto { // Generates a ray from a camera. ray3f eval_camera( const trace_camera* camera, const vec2f& image_uv, const vec2f& lens_uv); // Evaluates a texture vec2i texture_size(const trace_texture* texture); vec4f lookup_texture( const trace_texture* texture, const vec2i& ij, bool ldr_as_linear = false); vec4f eval_texture(const trace_texture* texture, const vec2f& uv, bool ldr_as_linear = false, bool no_interpolation = false, bool clamp_to_edge = false); // Evaluate instance properties vec3f eval_position( const trace_instance* instance, int element, const vec2f& uv); vec3f eval_element_normal(const trace_instance* instance, int element); vec3f eval_normal(const trace_instance* instance, int element, const vec2f& uv); vec2f eval_texcoord( const trace_instance* instance, int element, const vec2f& uv); pair<vec3f, vec3f> eval_element_tangents( const trace_instance* instance, int element); vec3f eval_normalmap( const trace_instance* instance, int element, const vec2f& uv); vec3f eval_shading_normal(const trace_instance* instance, int element, const vec2f& uv, const vec3f& outgoing); vec4f eval_color(const trace_instance* instance, int element, const vec2f& uv); // Environment vec3f eval_environment( const trace_environment* environment, const vec3f& direction); vec3f eval_environment(const trace_scene* scene, const vec3f& direction); // Material sample struct trace_material_sample { vec3f emission = {0, 0, 0}; vec3f color = {0, 0, 0}; float specular = 0; float roughness = 0; float metallic = 0; float ior = 1.5; vec3f spectint = {1, 1, 1}; float coat = 0; float transmission = 0; float translucency = 0; vec3f scattering = {0, 0, 0}; float scanisotropy = 0; float trdepth = 0.01; float opacity = 1; bool thin = true; vec3f normalmap = {0, 0, 1}; }; // Evaluates material and textures trace_material_sample eval_material( const trace_material* material, const vec2f& texcoord); // Material Bsdf parameters struct trace_bsdf { // brdf lobes vec3f diffuse = {0, 0, 0}; vec3f specular = {0, 0, 0}; vec3f metal = {0, 0, 0}; vec3f coat = {0, 0, 0}; vec3f transmission = {0, 0, 0}; vec3f translucency = {0, 0, 0}; vec3f refraction = {0, 0, 0}; float roughness = 0; float ior = 1; vec3f meta = {0, 0, 0}; vec3f metak = {0, 0, 0}; // weights float diffuse_pdf = 0; float specular_pdf = 0; float metal_pdf = 0; float coat_pdf = 0; float transmission_pdf = 0; float translucency_pdf = 0; float refraction_pdf = 0; }; // Eval material to obtain emission, brdf and opacity. vec3f eval_emission(const trace_instance* instance, int element, const vec2f& uv, const vec3f& normal, const vec3f& outgoing); // Eval material to obatain emission, brdf and opacity. trace_bsdf eval_bsdf(const trace_instance* instance, int element, const vec2f& uv, const vec3f& normal, const vec3f& outgoing); float eval_opacity(const trace_instance* instance, int element, const vec2f& uv, const vec3f& normal, const vec3f& outgoing); // check if a brdf is a delta bool is_delta(const trace_bsdf& bsdf); // Material volume parameters struct trace_vsdf { vec3f density = {0, 0, 0}; vec3f scatter = {0, 0, 0}; float anisotropy = 0; }; // check if we have a volume bool has_volume(const trace_instance* instance); // evaluate volume trace_vsdf eval_vsdf( const trace_instance* instance, int element, const vec2f& uv); } // namespace yocto // ----------------------------------------------------------------------------- // RENDERING API // ----------------------------------------------------------------------------- namespace yocto { // Strategy used to build the bvh enum struct trace_bvh_type { default_, highquality, middle, balanced, #ifdef YOCTO_EMBREE embree_default, embree_highquality, embree_compact // only for copy interface #endif }; // Type of tracing algorithm enum struct trace_sampler_type { path, // path tracing naive, // naive path tracing eyelight, // eyelight rendering falsecolor, // false color rendering albedo, // renders the (approximate) albedo of objects for denoising normal, // renders the normals of objects for denoising }; // Type of false color visualization enum struct trace_falsecolor_type { // clang-format off position, normal, frontfacing, gnormal, gfrontfacing, texcoord, color, emission, diffuse, specular, coat, metal, transmission, translucency, refraction, roughness, opacity, ior, instance, element, highlight // clang-format on }; // Default trace seed const auto trace_default_seed = 961748941ull; // Options for trace functions struct trace_params { int resolution = 1280; trace_sampler_type sampler = trace_sampler_type::path; trace_falsecolor_type falsecolor = trace_falsecolor_type::diffuse; int samples = 512; int bounces = 8; float clamp = 100; bool nocaustics = false; bool envhidden = false; bool tentfilter = false; uint64_t seed = trace_default_seed; trace_bvh_type bvh = trace_bvh_type::default_; bool noparallel = false; int pratio = 8; float exposure = 0; }; const auto trace_sampler_labels = vector<pair<trace_sampler_type, string>>{ {trace_sampler_type::path, "path"}, {trace_sampler_type::naive, "naive"}, {trace_sampler_type::eyelight, "eyelight"}, {trace_sampler_type::falsecolor, "falsecolor"}, {trace_sampler_type::albedo, "albedo"}, {trace_sampler_type::normal, "normal"}}; const auto trace_falsecolor_labels = vector<pair<trace_falsecolor_type, string>>{ {trace_falsecolor_type::position, "position"}, {trace_falsecolor_type::normal, "normal"}, {trace_falsecolor_type::frontfacing, "frontfacing"}, {trace_falsecolor_type::gnormal, "gnormal"}, {trace_falsecolor_type::gfrontfacing, "gfrontfacing"}, {trace_falsecolor_type::texcoord, "texcoord"}, {trace_falsecolor_type::color, "color"}, {trace_falsecolor_type::emission, "emission"}, {trace_falsecolor_type::diffuse, "diffuse"}, {trace_falsecolor_type::specular, "specular"}, {trace_falsecolor_type::coat, "coat"}, {trace_falsecolor_type::metal, "metal"}, {trace_falsecolor_type::transmission, "transmission"}, {trace_falsecolor_type::translucency, "translucency"}, {trace_falsecolor_type::refraction, "refraction"}, {trace_falsecolor_type::roughness, "roughness"}, {trace_falsecolor_type::opacity, "opacity"}, {trace_falsecolor_type::ior, "ior"}, {trace_falsecolor_type::instance, "instance"}, {trace_falsecolor_type::element, "element"}, {trace_falsecolor_type::highlight, "highlight"}}; const auto trace_bvh_labels = vector<pair<trace_bvh_type, string>>{ {trace_bvh_type::default_, "default"}, {trace_bvh_type::highquality, "highquality"}, {trace_bvh_type::middle, "middle"}, {trace_bvh_type::balanced, "balanced"}, #ifdef YOCTO_EMBREE {trace_bvh_type::embree_default, "embree-default"}, {trace_bvh_type::embree_highquality, "embree-highquality"}, {trace_bvh_type::embree_compact, "embree-compact"}, #endif }; const auto trace_sampler_names = std::vector<std::string>{ "path", "naive", "eyelight", "falsecolor", "dalbedo", "dnormal"}; const auto trace_falsecolor_names = vector<string>{"position", "normal", "frontfacing", "gnormal", "gfrontfacing", "texcoord", "color", "emission", "diffuse", "specular", "coat", "metal", "transmission", "translucency", "refraction", "roughness", "opacity", "ior", "instance", "element", "highlight"}; const auto trace_bvh_names = vector<string>{ "default", "highquality", "middle", "balanced", #ifdef YOCTO_EMBREE "embree-default", "embree-highquality", "embree-compact" #endif }; // Progress report callback using progress_callback = function<void(const string& message, int current, int total)>; // Callback used to report partially computed image using image_callback = function<void(const image<vec4f>& render, int current, int total)>; // Apply subdivision and displacement rules. void tesselate_shapes( trace_scene* scene, const progress_callback& progress_cb = {}); void tesselate_shape(trace_scene* shape); // Progressively computes an image. image<vec4f> trace_image(const trace_scene* scene, const trace_camera* camera, const trace_params& params, const progress_callback& progress_cb = {}, const image_callback& image_cb = {}); } // namespace yocto // ----------------------------------------------------------------------------- // LOWER-LEVEL RENDERING API // ----------------------------------------------------------------------------- namespace yocto { // Scene lights used during rendering. These are created automatically. struct trace_light { trace_instance* instance = nullptr; trace_environment* environment = nullptr; vector<float> elements_cdf = {}; }; // Scene lights struct trace_lights { // light elements vector<trace_light*> lights = {}; // cleanup ~trace_lights(); }; // Initialize lights. void init_lights(trace_lights* lights, const trace_scene* scene, const trace_params& params, const progress_callback& progress_cb = {}); // Define BVH using trace_bvh = bvh_scene; // Build the bvh acceleration structure. void init_bvh(trace_bvh* bvh, const trace_scene* scene, const trace_params& params, const progress_callback& progress_cb = {}); // Refit bvh data void update_bvh(trace_bvh* bvh, const trace_scene* scene, const vector<trace_instance*>& updated_instances, const vector<trace_shape*>& updated_shapes, const trace_params& params); // Progressively computes an image. image<vec4f> trace_image(const trace_scene* scene, const trace_camera* camera, const trace_bvh* bvh, const trace_lights* lights, const trace_params& params, const progress_callback& progress_cb = {}, const image_callback& image_cb = {}); // Check is a sampler requires lights bool is_sampler_lit(const trace_params& params); // [experimental] Asynchronous state struct trace_state { image<vec4f> render = {}; image<vec4f> accumulation = {}; image<int> samples = {}; image<rng_state> rngs = {}; future<void> worker = {}; // async atomic<bool> stop = {}; // async }; // [experimental] Callback used to report partially computed image using async_callback = function<void( const image<vec4f>& render, int current, int total, const vec2i& ij)>; // [experimental] Asynchronous interface struct trace_state; void trace_start(trace_state* state, const trace_scene* scene, const trace_camera* camera, const trace_bvh* bvh, const trace_lights* lights, const trace_params& params, const progress_callback& progress_cb = {}, const image_callback& image_cb = {}, const async_callback& async_cb = {}); void trace_stop(trace_state* state); } // namespace yocto // ----------------------------------------------------------------------------- // TRACE IO // ----------------------------------------------------------------------------- namespace yocto { // Serialize value to json enum struct json_mode; struct json_value; void serialize_value(json_mode mode, json_value& json, trace_params& value, const string& description); // Serialize enum to json const vector<pair<trace_bvh_type, string>>& json_enum_labels(trace_bvh_type); const vector<pair<trace_falsecolor_type, string>>& json_enum_labels( trace_falsecolor_type); const vector<pair<trace_sampler_type, string>>& json_enum_labels( trace_sampler_type); } // namespace yocto #endif
jing-interactive/Cinder-portfolio
blocks/yocto-gl/libs/yocto/yocto_trace.h
C
mit
20,047
#include <SDL.h> #include <GL/gl.h> #include <string> // for open close #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> #include "model.h" void init() { glEnable(GL_TEXTURE_2D); glShadeModel(GL_SMOOTH); glClearColor(0.f, 0.f, 0.f, 1.f); glClearDepth(1.f); glEnable(GL_DEPTH_TEST); glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); } bool handle_events() { SDL_Event event; while (SDL_PollEvent(&event) != 0) { if (event.type == SDL_QUIT) { return false; } else if (event.type == SDL_KEYDOWN) { switch (event.key.keysym.sym) { case SDLK_ESCAPE: return false; break; default: break; } } } return true; } void draw(Model &model) { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glScalef(0.3f, 0.3f, 0.3f); glColor3f(0.5f, 0.5f, 0.5f); model.draw(); } int main(int argc, char **argv) { if (argc < 2) { printf("Usage:\n" "%s [modelname]\n", argv[0]); return 1; } std::string filename(argv[1]); if (SDL_Init(SDL_INIT_VIDEO) < 0) { return 2; } auto window = SDL_CreateWindow("Example Gorgon Load", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 800, 600, SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN); if (window == NULL) { return 3; } auto context = SDL_GL_CreateContext(window); if (SDL_GL_MakeCurrent(window, context) != 0) { return 4; } init(); int fd = open(filename.c_str(), O_RDONLY); if (fd < 0) { fprintf(stderr, "Couldn't open the model: %s\n", filename.c_str()); return 5; } Model mesh(fd); close(fd); bool running = true; while (running) { running = handle_events(); draw(mesh); SDL_GL_SwapWindow(window); } SDL_GL_DeleteContext(context); context = NULL; SDL_DestroyWindow(window); window = NULL; SDL_Quit(); return 0; }
green7ea/gorgon
example/main.cpp
C++
mit
2,374
# Base16 PaperColor Light Syntax Theme for Atom A Base16 color scheme for Atom syntax, ported from [PaperColor-theme](https://github.com/NLKNguyen/papercolor-theme) (originally for Vim) ![Screenshot](https://nlknguyen.files.wordpress.com/2015/07/atom-light-go.png)
NLKNguyen/base16-papercolor-light-syntax
README.md
Markdown
mit
267
using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; using System.Xml.Linq; namespace XData.Data.Query { internal class ElementExpressionVisitor : ExpressionVisitor { public string GetFirstParameter(Expression node) { FirstParameter = null; FirstMember = null; Visit(node); return FirstParameter; } public string GetFirstParameter(Expression node, out string member) { string result = GetFirstParameter(node); member = FirstMember; return result; } protected string FirstParameter; protected string FirstMember; protected override Expression VisitMethodCall(MethodCallExpression node) { if (node.Type == typeof(XElement)) { Expression obj = this.Visit(node.Object); if (obj.NodeType == ExpressionType.Parameter) { FirstParameter = obj.ToString(); IEnumerable<Expression> args = node.Arguments; var first = (args as IEnumerable<Expression>).First(); UnaryExpression unaryExpression = first as UnaryExpression; FirstMember = unaryExpression.Operand.ToString().TrimStart('"').TrimEnd('"'); } } return base.VisitMethodCall(node); } } }
sundy39/xf
ElementFramework/Query/ElementExpressionVisitor.cs
C#
mit
1,519
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>square-matrices: Not compatible 👼</title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / extra-dev</a></li> <li class="active"><a href="">dev / square-matrices - 8.6.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> square-matrices <small> 8.6.0 <span class="label label-info">Not compatible 👼</span> </small> </h1> <p>📅 <em><script>document.write(moment("2021-10-23 02:52:34 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-10-23 02:52:34 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-threads base base-unix base conf-findutils 1 Virtual package relying on findutils conf-gmp 3 Virtual package relying on a GMP lib system installation coq dev Formal proof management system dune 2.9.1 Fast, portable, and opinionated build system ocaml 4.08.1 The OCaml compiler (virtual package) ocaml-base-compiler 4.08.1 Official release 4.08.1 ocaml-config 1 OCaml Switch Configuration ocamlfind 1.9.1 A library manager for OCaml zarith 1.12 Implements arithmetic and logical operations over arbitrary-precision integers # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;Hugo.Herbelin@inria.fr&quot; homepage: &quot;https://github.com/coq-contribs/square-matrices&quot; license: &quot;LGPL 2.1&quot; build: [make &quot;-j%{jobs}%&quot;] install: [make &quot;install&quot;] remove: [&quot;rm&quot; &quot;-R&quot; &quot;%{lib}%/coq/user-contrib/SquareMatrices&quot;] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.6&quot; &amp; &lt; &quot;8.7~&quot;} ] tags: [ &quot;keyword: exponentiation&quot; &quot;keyword: vectors&quot; &quot;keyword: matrices&quot; &quot;keyword: polymorphic recursion&quot; &quot;keyword: nested datatypes&quot; &quot;category: Mathematics/Algebra&quot; ] authors: [ &quot;Jean-Christophe Filliâtre&quot; ] bug-reports: &quot;https://github.com/coq-contribs/square-matrices/issues&quot; dev-repo: &quot;git+https://github.com/coq-contribs/square-matrices.git&quot; synopsis: &quot;From Fast Exponentiation to Square Matrices&quot; description: &quot;&quot;&quot; This development is a formalization of Chris Okasaki&#39;s article ``From Fast Exponentiation to Square Matrices: An Adventure in Types&#39;&#39;&quot;&quot;&quot; flags: light-uninstall url { src: &quot;https://github.com/coq-contribs/square-matrices/archive/v8.6.0.tar.gz&quot; checksum: &quot;md5=bb9f13979dbe764afff08adb3e72d98d&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install 🏜️</h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action coq-square-matrices.8.6.0 coq.dev</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is dev). The following dependencies couldn&#39;t be met: - coq-square-matrices -&gt; coq &lt; 8.7~ -&gt; ocaml &lt; 4.06.0 base of this switch (use `--unlock-base&#39; to force) Your request can&#39;t be satisfied: - No available version of coq satisfies the constraints No solution found, exiting </pre></dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-square-matrices.8.6.0</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Install 🚀</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Installation size</h2> <p>No files were installed.</p> <h2>Uninstall 🧹</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> Sources are on <a href="https://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣 </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
coq-bench/coq-bench.github.io
clean/Linux-x86_64-4.08.1-2.0.5/extra-dev/dev/square-matrices/8.6.0.html
HTML
mit
7,180
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>mathcomp-real-closed: Not compatible 👼</title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / extra-dev</a></li> <li class="active"><a href="">dev / mathcomp-real-closed - 1.0.2</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> mathcomp-real-closed <small> 1.0.2 <span class="label label-info">Not compatible 👼</span> </small> </h1> <p>📅 <em><script>document.write(moment("2021-12-29 01:31:58 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-12-29 01:31:58 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-threads base base-unix base conf-findutils 1 Virtual package relying on findutils conf-gmp 3 Virtual package relying on a GMP lib system installation coq dev Formal proof management system dune 2.9.1 Fast, portable, and opinionated build system ocaml 4.07.1 The OCaml compiler (virtual package) ocaml-base-compiler 4.07.1 Official release 4.07.1 ocaml-config 1 OCaml Switch Configuration ocaml-secondary-compiler 4.08.1-1 OCaml 4.08.1 Secondary Switch Compiler ocamlfind 1.9.1 A library manager for OCaml ocamlfind-secondary 1.9.1 Adds support for ocaml-secondary-compiler to ocamlfind zarith 1.12 Implements arithmetic and logical operations over arbitrary-precision integers # opam file: opam-version: &quot;2.0&quot; name: &quot;coq-mathcomp-real-closed&quot; maintainer: &quot;Mathematical Components &lt;mathcomp-dev@sympa.inria.fr&gt;&quot; homepage: &quot;https://github.com/math-comp/real-closed&quot; bug-reports: &quot;https://github.com/math-comp/real-closed/issues&quot; dev-repo: &quot;git+https://github.com/math-comp/real-closed.git&quot; license: &quot;CeCILL-B&quot; build: [ make &quot;-j&quot; &quot;%{jobs}%&quot; ] install: [ make &quot;install&quot; ] depends: [ &quot;coq-mathcomp-field&quot; { (&gt;= &quot;1.8.0&quot; &amp; &lt; &quot;1.9.0&quot;) } &quot;coq-mathcomp-bigenough&quot; {(&gt;= &quot;1.0.0&quot; &amp; &lt; &quot;1.1.0~&quot;)} ] tags: [ &quot;keyword:real closed field&quot; &quot;keyword:small scale reflection&quot; &quot;keyword:mathematical components&quot; &quot;date:2019-05-23&quot; &quot;logpath:mathcomp&quot;] authors: [ &quot;Cyril Cohen &lt;&gt;&quot; &quot;Assia Mahboubi &lt;&gt;&quot; ] synopsis: &quot;Mathematical Components Library on real closed fields&quot; description: &quot;&quot;&quot; This library contains definitions and theorems about real closed fields, with a construction of the real closure and the algebraic closure (including a proof of the fundamental theorem of algebra). It also contains a proof of decidability of the first order theory of real closed field, through quantifier elimination. &quot;&quot;&quot; url { src: &quot;https://github.com/math-comp/real-closed/archive/1.0.2.tar.gz&quot; checksum: &quot;sha256=b28e30be7de2ad2959021ea9cbc97974d121d37f5104ef0d46c0439b31e5c41f&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install 🏜️</h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action coq-mathcomp-real-closed.1.0.2 coq.dev</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is dev). The following dependencies couldn&#39;t be met: - coq-mathcomp-real-closed -&gt; coq-mathcomp-field &lt; 1.9.0 -&gt; coq-mathcomp-solvable &lt; 1.9.0 -&gt; coq-mathcomp-algebra &lt; 1.9.0 -&gt; coq-mathcomp-fingroup &lt; 1.9.0 -&gt; coq-mathcomp-ssreflect &lt; 1.9.0 -&gt; coq &lt; 8.10~ -&gt; ocaml &lt; 4.06.0 base of this switch (use `--unlock-base&#39; to force) Your request can&#39;t be satisfied: - No available version of coq satisfies the constraints No solution found, exiting </pre></dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-mathcomp-real-closed.1.0.2</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Install 🚀</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Installation size</h2> <p>No files were installed.</p> <h2>Uninstall 🧹</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> Sources are on <a href="https://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣 </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
coq-bench/coq-bench.github.io
clean/Linux-x86_64-4.07.1-2.0.6/extra-dev/dev/mathcomp-real-closed/1.0.2.html
HTML
mit
7,896
// Importing from `.json.js` a workaround for a bug in web browsers' "native" // ES6 importing system which is uncapable of importing "*.json" files. // https://github.com/catamphetamine/libphonenumber-js/issues/239 import metadata from '../metadata.mobile.json.js' export default metadata export function withMetadata(func, _arguments) { var args = Array.prototype.slice.call(_arguments) args.push(metadata) return func.apply(this, args) }
halt-hammerzeit/libphonenumber-js
mobile/metadata.js
JavaScript
mit
444
--- title: afx42 type: products image: /img/Screen Shot 2017-05-09 at 11.56.54 AM.png heading: x42 description: lksadjf lkasdjf lksajdf lksdaj flksadj flksa fdj main: heading: Foo Bar BAz description: |- ***This is i a thing***kjh hjk kj # Blah Blah ## Blah![undefined](undefined) ### Baah image1: alt: kkkk ---
pblack/kaldi-hugo-cms-template
site/content/pages2/afx42.md
Markdown
mit
339
<html> <head> <title>OGRE: Member List - OGRE Documentation</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link type="text/css" rel="stylesheet" href="doxygen.css"> <link type="text/css" rel="stylesheet" href="tabs.css"> </head> <body> <!-- Generated by Doxygen 1.7.4 --> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main&#160;Page</span></a></li> <li><a href="pages.html"><span>Related&#160;Pages</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li><a href="dirs.html"><span>Directories</span></a></li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="annotated.html"><span>Class&#160;List</span></a></li> <li><a href="classes.html"><span>Class&#160;Index</span></a></li> <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li> <li><a href="functions.html"><span>Class&#160;Members</span></a></li> </ul> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="namespaceOgre.html">Ogre</a> </li> <li class="navelem"><a class="el" href="classOgre_1_1ShadowCameraSetup.html">ShadowCameraSetup</a> </li> </ul> </div> </div> <div class="header"> <div class="headertitle"> <div class="title">Ogre::ShadowCameraSetup Member List</div> </div> </div> <div class="contents"> This is the complete list of members for <a class="el" href="classOgre_1_1ShadowCameraSetup.html">Ogre::ShadowCameraSetup</a>, including all inherited members.<table> <tr class="memlist"><td><a class="el" href="classOgre_1_1AllocatedObject.html#a366445eb206e55a2199267b8b9089ebb">AllocatedObject</a>()</td><td><a class="el" href="classOgre_1_1AllocatedObject.html">Ogre::AllocatedObject&lt; Alloc &gt;</a></td><td><code> [explicit]</code></td></tr> <tr class="memlist"><td><a class="el" href="classOgre_1_1ShadowCameraSetup.html#aef69374906ff048997e187101858f856">getShadowCamera</a>(const SceneManager *sm, const Camera *cam, const Viewport *vp, const Light *light, Camera *texCam, size_t iteration) const =0</td><td><a class="el" href="classOgre_1_1ShadowCameraSetup.html">Ogre::ShadowCameraSetup</a></td><td><code> [pure virtual]</code></td></tr> <tr class="memlist"><td><a class="el" href="classOgre_1_1AllocatedObject.html#a8357fe4fb4849772b94baa4bf47c7ded">operator delete</a>(void *ptr)</td><td><a class="el" href="classOgre_1_1AllocatedObject.html">Ogre::AllocatedObject&lt; Alloc &gt;</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classOgre_1_1AllocatedObject.html#a1c727e879a260c37b00ce5505fe8e144">operator delete</a>(void *ptr, void *)</td><td><a class="el" href="classOgre_1_1AllocatedObject.html">Ogre::AllocatedObject&lt; Alloc &gt;</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classOgre_1_1AllocatedObject.html#acb46d4b0a597156d9ba5abc39d127792">operator delete</a>(void *ptr, const char *, int, const char *)</td><td><a class="el" href="classOgre_1_1AllocatedObject.html">Ogre::AllocatedObject&lt; Alloc &gt;</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classOgre_1_1AllocatedObject.html#a93e6a86dde5483c053ca0f2a85bbfd6c">operator delete[]</a>(void *ptr)</td><td><a class="el" href="classOgre_1_1AllocatedObject.html">Ogre::AllocatedObject&lt; Alloc &gt;</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classOgre_1_1AllocatedObject.html#a595ea4c05da8aa987d3800e65d23355d">operator delete[]</a>(void *ptr, const char *, int, const char *)</td><td><a class="el" href="classOgre_1_1AllocatedObject.html">Ogre::AllocatedObject&lt; Alloc &gt;</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classOgre_1_1AllocatedObject.html#a421b197ca3a38da17e2eb1531a645fa2">operator new</a>(size_t sz, const char *file, int line, const char *func)</td><td><a class="el" href="classOgre_1_1AllocatedObject.html">Ogre::AllocatedObject&lt; Alloc &gt;</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classOgre_1_1AllocatedObject.html#ac4bdf968b7b9af8a5239a27da73d5711">operator new</a>(size_t sz)</td><td><a class="el" href="classOgre_1_1AllocatedObject.html">Ogre::AllocatedObject&lt; Alloc &gt;</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classOgre_1_1AllocatedObject.html#ab78a921e54419be677839cdf15d1f0b8">operator new</a>(size_t sz, void *ptr)</td><td><a class="el" href="classOgre_1_1AllocatedObject.html">Ogre::AllocatedObject&lt; Alloc &gt;</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classOgre_1_1AllocatedObject.html#a4be37baef81876985aa1071ad5acc6dd">operator new[]</a>(size_t sz, const char *file, int line, const char *func)</td><td><a class="el" href="classOgre_1_1AllocatedObject.html">Ogre::AllocatedObject&lt; Alloc &gt;</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classOgre_1_1AllocatedObject.html#afa2943846ba6a2b5824a12857139cf5e">operator new[]</a>(size_t sz)</td><td><a class="el" href="classOgre_1_1AllocatedObject.html">Ogre::AllocatedObject&lt; Alloc &gt;</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classOgre_1_1AllocatedObject.html#a499773d35ca98b2df7c2699fc8c1bea2">~AllocatedObject</a>()</td><td><a class="el" href="classOgre_1_1AllocatedObject.html">Ogre::AllocatedObject&lt; Alloc &gt;</a></td><td></td></tr> <tr class="memlist"><td><a class="el" href="classOgre_1_1ShadowCameraSetup.html#a790a06721a8e3c6f48218aa659c334ef">~ShadowCameraSetup</a>()</td><td><a class="el" href="classOgre_1_1ShadowCameraSetup.html">Ogre::ShadowCameraSetup</a></td><td><code> [virtual]</code></td></tr> </table></div> <hr> <p> Copyright &copy; 2008 Torus Knot Software Ltd<br /> <!--Creative Commons License--><a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-sa/3.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-ShareAlike 3.0 Unported License</a>.<br/> <!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <Work rdf:about=""> <license rdf:resource="http://creativecommons.org/licenses/by-sa/2.5/" /> <dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" /> </Work> <License rdf:about="http://creativecommons.org/licenses/by-sa/2.5/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> --> Last modified Sat Jan 14 2012 18:40:54 </p> </body> </html>
milram/ogre-1.7.4-osx
Docs/api/html/classOgre_1_1ShadowCameraSetup-members.html
HTML
mit
7,291
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>concat: Not compatible 👼</title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / released</a></li> <li class="active"><a href="">8.8.1 / concat - 8.7.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> concat <small> 8.7.0 <span class="label label-info">Not compatible 👼</span> </small> </h1> <p>📅 <em><script>document.write(moment("2021-12-18 16:46:16 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-12-18 16:46:16 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-num base Num library distributed with the OCaml compiler base-threads base base-unix base camlp5 7.14 Preprocessor-pretty-printer of OCaml conf-findutils 1 Virtual package relying on findutils conf-perl 1 Virtual package relying on perl coq 8.8.1 Formal proof management system num 0 The Num library for arbitrary-precision integer and rational arithmetic ocaml 4.04.2 The OCaml compiler (virtual package) ocaml-base-compiler 4.04.2 Official 4.04.2 release ocaml-config 1 OCaml Switch Configuration ocamlfind 1.9.1 A library manager for OCaml # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;Hugo.Herbelin@inria.fr&quot; homepage: &quot;https://github.com/coq-contribs/concat&quot; license: &quot;LGPL 2.1&quot; build: [make &quot;-j%{jobs}%&quot;] install: [make &quot;install&quot;] remove: [&quot;rm&quot; &quot;-R&quot; &quot;%{lib}%/coq/user-contrib/ConCaT&quot;] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.7&quot; &amp; &lt; &quot;8.8~&quot;} ] tags: [ &quot;keyword: category theory&quot; &quot;category: Mathematics/Category Theory&quot; ] authors: [ &quot;Amokrane Saïbi&quot; ] bug-reports: &quot;https://github.com/coq-contribs/concat/issues&quot; dev-repo: &quot;git+https://github.com/coq-contribs/concat.git&quot; synopsis: &quot;Constructive Category Theory&quot; description: &quot;http://logical.inria.fr/~saibi/docCatV6.ps&quot; flags: light-uninstall url { src: &quot;https://github.com/coq-contribs/concat/archive/v8.7.0.tar.gz&quot; checksum: &quot;md5=a9428b07f8f1768e5a2adaa1c498c629&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install 🏜️</h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action coq-concat.8.7.0 coq.8.8.1</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.8.1). The following dependencies couldn&#39;t be met: - coq-concat -&gt; coq &lt; 8.8~ -&gt; ocaml &lt; 4.03.0 base of this switch (use `--unlock-base&#39; to force) Your request can&#39;t be satisfied: - No available version of coq satisfies the constraints No solution found, exiting </pre></dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-concat.8.7.0</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Install 🚀</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Installation size</h2> <p>No files were installed.</p> <h2>Uninstall 🧹</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> Sources are on <a href="https://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣 </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
coq-bench/coq-bench.github.io
clean/Linux-x86_64-4.04.2-2.0.5/released/8.8.1/concat/8.7.0.html
HTML
mit
6,838
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>zfc: Not compatible 👼</title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / released</a></li> <li class="active"><a href="">8.7.1+2 / zfc - 8.10.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> zfc <small> 8.10.0 <span class="label label-info">Not compatible 👼</span> </small> </h1> <p>📅 <em><script>document.write(moment("2022-02-24 14:39:15 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-02-24 14:39:15 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-num base Num library distributed with the OCaml compiler base-threads base base-unix base camlp5 7.14 Preprocessor-pretty-printer of OCaml conf-findutils 1 Virtual package relying on findutils conf-perl 2 Virtual package relying on perl coq 8.7.1+2 Formal proof management system num 0 The Num library for arbitrary-precision integer and rational arithmetic ocaml 4.05.0 The OCaml compiler (virtual package) ocaml-base-compiler 4.05.0 Official 4.05.0 release ocaml-config 1 OCaml Switch Configuration ocamlfind 1.9.3 A library manager for OCaml # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;Hugo.Herbelin@inria.fr&quot; homepage: &quot;https://github.com/coq-contribs/zfc&quot; license: &quot;LGPL 2.1&quot; build: [make &quot;-j%{jobs}%&quot;] install: [make &quot;install&quot;] remove: [&quot;rm&quot; &quot;-R&quot; &quot;%{lib}%/coq/user-contrib/ZFC&quot;] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.10&quot; &amp; &lt; &quot;8.11~&quot;} ] tags: [ &quot;keyword: set theory&quot; &quot;keyword: Zermelo-Fraenkel&quot; &quot;keyword: Calculus of Inductive Constructions&quot; &quot;category: Mathematics/Logic/Set theory&quot; ] authors: [ &quot;Benjamin Werner&quot; ] bug-reports: &quot;https://github.com/coq-contribs/zfc/issues&quot; dev-repo: &quot;git+https://github.com/coq-contribs/zfc.git&quot; synopsis: &quot;An encoding of Zermelo-Fraenkel Set Theory in Coq&quot; description: &quot;&quot;&quot; The encoding of Zermelo-Fraenkel Set Theory is largely inspired by Peter Aczel&#39;s work dating back to the eighties. A type Ens is defined, which represents sets. Two predicates IN and EQ stand for membership and extensional equality between sets. The axioms of ZFC are then proved and thus appear as theorems in the development. A main motivation for this work is the comparison of the respective expressive power of Coq and ZFC. A non-computational type-theoretical axiom of choice is necessary to prove the replacement schemata and the set-theoretical AC. The main difference between this work and Peter Aczel&#39;s is that propositions are defined on the impredicative level Prop. Since the definition of Ens is, however, still unchanged, I also added most of Peter Aczel&#39;s definition. The main advantage of Aczel&#39;s approach is a more constructive vision of the existential quantifier (which gives the set-theoretical axiom of choice for free).&quot;&quot;&quot; flags: light-uninstall url { src: &quot;https://github.com/coq-contribs/zfc/archive/v8.10.0.tar.gz&quot; checksum: &quot;md5=fe35c7303b35f0295366925cd260fd2c&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install 🏜️</h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action coq-zfc.8.10.0 coq.8.7.1+2</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.7.1+2). The following dependencies couldn&#39;t be met: - coq-zfc -&gt; coq &gt;= 8.10 Your request can&#39;t be satisfied: - No available version of coq satisfies the constraints No solution found, exiting </pre></dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-zfc.8.10.0</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Install 🚀</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Installation size</h2> <p>No files were installed.</p> <h2>Uninstall 🧹</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> Sources are on <a href="https://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣 </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
coq-bench/coq-bench.github.io
clean/Linux-x86_64-4.05.0-2.0.1/released/8.7.1+2/zfc/8.10.0.html
HTML
mit
7,805
<?php defined('BASEPATH') OR exit('No direct script access allowed'); /* |-------------------------------------------------------------------------- | Base Site URL |-------------------------------------------------------------------------- | | URL to your CodeIgniter root. Typically this will be your base URL, | WITH a trailing slash: | | http://example.com/ | | WARNING: You MUST set this value! | | If it is not set, then CodeIgniter will try guess the protocol and path | your installation, but due to security concerns the hostname will be set | to $_SERVER['SERVER_ADDR'] if available, or localhost otherwise. | The auto-detection mechanism exists only for convenience during | development and MUST NOT be used in production! | | If you need to allow multiple domains, remember that this file is still | a PHP script and you can easily do that on your own. | */ // PARA GERION PONER RUTA $config['base_url'] = 'http://iessansebastian.com/alumnos/2daw1516/adrian/Tienda_online' //$config['base_url'] = 'http://iessansebastian.com/alumnos/2daw1516/adrian/Tienda_online'; $config['base_url'] = 'http://localhost/Tienda_online/'; /* |-------------------------------------------------------------------------- | Index File |-------------------------------------------------------------------------- | | Typically this will be your index.php file, unless you've renamed it to | something else. If you are using mod_rewrite to remove the page set this | variable so that it is blank. | */ $config['index_page'] = 'index.php'; /* |-------------------------------------------------------------------------- | URI PROTOCOL |-------------------------------------------------------------------------- | | This item determines which server global should be used to retrieve the | URI string. The default setting of 'REQUEST_URI' works for most servers. | If your links do not seem to work, try one of the other delicious flavors: | | 'REQUEST_URI' Uses $_SERVER['REQUEST_URI'] | 'QUERY_STRING' Uses $_SERVER['QUERY_STRING'] | 'PATH_INFO' Uses $_SERVER['PATH_INFO'] | | WARNING: If you set this to 'PATH_INFO', URIs will always be URL-decoded! */ $config['uri_protocol'] = 'REQUEST_URI'; /* |-------------------------------------------------------------------------- | URL suffix |-------------------------------------------------------------------------- | | This option allows you to add a suffix to all URLs generated by CodeIgniter. | For more information please see the user guide: | | http://codeigniter.com/user_guide/general/urls.html */ $config['url_suffix'] = ''; /* |-------------------------------------------------------------------------- | Default Language |-------------------------------------------------------------------------- | | This determines which set of language files should be used. Make sure | there is an available translation if you intend to use something other | than english. | */ $config['language'] = 'english'; /* |-------------------------------------------------------------------------- | Default Character Set |-------------------------------------------------------------------------- | | This determines which character set is used by default in various methods | that require a character set to be provided. | | See http://php.net/htmlspecialchars for a list of supported charsets. | */ $config['charset'] = 'UTF-8'; /* |-------------------------------------------------------------------------- | Enable/Disable System Hooks |-------------------------------------------------------------------------- | | If you would like to use the 'hooks' feature you must enable it by | setting this variable to TRUE (boolean). See the user guide for details. | */ $config['enable_hooks'] = FALSE; /* |-------------------------------------------------------------------------- | Class Extension Prefix |-------------------------------------------------------------------------- | | This item allows you to set the filename/classname prefix when extending | native libraries. For more information please see the user guide: | | http://codeigniter.com/user_guide/general/core_classes.html | http://codeigniter.com/user_guide/general/creating_libraries.html | */ $config['subclass_prefix'] = 'MY_'; /* |-------------------------------------------------------------------------- | Composer auto-loading |-------------------------------------------------------------------------- | | Enabling this setting will tell CodeIgniter to look for a Composer | package auto-loader script in application/vendor/autoload.php. | | $config['composer_autoload'] = TRUE; | | Or if you have your vendor/ directory located somewhere else, you | can opt to set a specific path as well: | | $config['composer_autoload'] = '/path/to/vendor/autoload.php'; | | For more information about Composer, please visit http://getcomposer.org/ | | Note: This will NOT disable or override the CodeIgniter-specific | autoloading (application/config/autoload.php) */ $config['composer_autoload'] = "vendor/autoload.php"; /* |-------------------------------------------------------------------------- | Allowed URL Characters |-------------------------------------------------------------------------- | | This lets you specify which characters are permitted within your URLs. | When someone tries to submit a URL with disallowed characters they will | get a warning message. | | As a security measure you are STRONGLY encouraged to restrict URLs to | as few characters as possible. By default only these are allowed: a-z 0-9~%.:_- | | Leave blank to allow all characters -- but only if you are insane. | | The configured value is actually a regular expression character group | and it will be executed as: ! preg_match('/^[<permitted_uri_chars>]+$/i | | DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!! | */ $config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-'; /* |-------------------------------------------------------------------------- | Enable Query Strings |-------------------------------------------------------------------------- | | By default CodeIgniter uses search-engine friendly segment based URLs: | example.com/who/what/where/ | | By default CodeIgniter enables access to the $_GET array. If for some | reason you would like to disable it, set 'allow_get_array' to FALSE. | | You can optionally enable standard query string based URLs: | example.com?who=me&what=something&where=here | | Options are: TRUE or FALSE (boolean) | | The other items let you set the query string 'words' that will | invoke your controllers and its functions: | example.com/index.php?c=controller&m=function | | Please note that some of the helpers won't work as expected when | this feature is enabled, since CodeIgniter is designed primarily to | use segment based URLs. | */ $config['allow_get_array'] = TRUE; $config['enable_query_strings'] = FALSE; $config['controller_trigger'] = 'c'; $config['function_trigger'] = 'm'; $config['directory_trigger'] = 'd'; /* |-------------------------------------------------------------------------- | Error Logging Threshold |-------------------------------------------------------------------------- | | You can enable error logging by setting a threshold over zero. The | threshold determines what gets logged. Threshold options are: | | 0 = Disables logging, Error logging TURNED OFF | 1 = Error Messages (including PHP errors) | 2 = Debug Messages | 3 = Informational Messages | 4 = All Messages | | You can also pass an array with threshold levels to show individual error types | | array(2) = Debug Messages, without Error Messages | | For a live site you'll usually only enable Errors (1) to be logged otherwise | your log files will fill up very fast. | */ $config['log_threshold'] = 0; /* |-------------------------------------------------------------------------- | Error Logging Directory Path |-------------------------------------------------------------------------- | | Leave this BLANK unless you would like to set something other than the default | application/logs/ directory. Use a full server path with trailing slash. | */ $config['log_path'] = ''; /* |-------------------------------------------------------------------------- | Log File Extension |-------------------------------------------------------------------------- | | The default filename extension for log files. The default 'php' allows for | protecting the log files via basic scripting, when they are to be stored | under a publicly accessible directory. | | Note: Leaving it blank will default to 'php'. | */ $config['log_file_extension'] = ''; /* |-------------------------------------------------------------------------- | Log File Permissions |-------------------------------------------------------------------------- | | The file system permissions to be applied on newly created log files. | | IMPORTANT: This MUST be an integer (no quotes) and you MUST use octal | integer notation (i.e. 0700, 0644, etc.) */ $config['log_file_permissions'] = 0644; /* |-------------------------------------------------------------------------- | Date Format for Logs |-------------------------------------------------------------------------- | | Each item that is logged has an associated date. You can use PHP date | codes to set your own date formatting | */ $config['log_date_format'] = 'Y-m-d H:i:s'; /* |-------------------------------------------------------------------------- | Error Views Directory Path |-------------------------------------------------------------------------- | | Leave this BLANK unless you would like to set something other than the default | application/views/errors/ directory. Use a full server path with trailing slash. | */ $config['error_views_path'] = ''; /* |-------------------------------------------------------------------------- | Cache Directory Path |-------------------------------------------------------------------------- | | Leave this BLANK unless you would like to set something other than the default | application/cache/ directory. Use a full server path with trailing slash. | */ $config['cache_path'] = ''; /* |-------------------------------------------------------------------------- | Cache Include Query String |-------------------------------------------------------------------------- | | Whether to take the URL query string into consideration when generating | output cache files. Valid options are: | | FALSE = Disabled | TRUE = Enabled, take all query parameters into account. | Please be aware that this may result in numerous cache | files generated for the same page over and over again. | array('q') = Enabled, but only take into account the specified list | of query parameters. | */ $config['cache_query_string'] = FALSE; /* |-------------------------------------------------------------------------- | Encryption Key |-------------------------------------------------------------------------- | | If you use the Encryption class, you must set an encryption key. | See the user guide for more info. | | http://codeigniter.com/user_guide/libraries/encryption.html | */ $config['encryption_key'] = ''; /* |-------------------------------------------------------------------------- | Session Variables |-------------------------------------------------------------------------- | | 'sess_driver' | | The storage driver to use: files, database, redis, memcached | | 'sess_cookie_name' | | The session cookie name, must contain only [0-9a-z_-] characters | | 'sess_expiration' | | The number of SECONDS you want the session to last. | Setting to 0 (zero) means expire when the browser is closed. | | 'sess_save_path' | | The location to save sessions to, driver dependent. | | For the 'files' driver, it's a path to a writable directory. | WARNING: Only absolute paths are supported! | | For the 'database' driver, it's a table name. | Please read up the manual for the format with other session drivers. | | IMPORTANT: You are REQUIRED to set a valid save path! | | 'sess_match_ip' | | Whether to match the user's IP address when reading the session data. | | WARNING: If you're using the database driver, don't forget to update | your session table's PRIMARY KEY when changing this setting. | | 'sess_time_to_update' | | How many seconds between CI regenerating the session ID. | | 'sess_regenerate_destroy' | | Whether to destroy session data associated with the old session ID | when auto-regenerating the session ID. When set to FALSE, the data | will be later deleted by the garbage collector. | | Other session cookie settings are shared with the rest of the application, | except for 'cookie_prefix' and 'cookie_httponly', which are ignored here. | */ $config['sess_driver'] = 'files'; $config['sess_cookie_name'] = 'ci_session'; $config['sess_expiration'] = 7200; $config['sess_save_path'] = NULL; $config['sess_match_ip'] = FALSE; $config['sess_time_to_update'] = 300; $config['sess_regenerate_destroy'] = FALSE; /* |-------------------------------------------------------------------------- | Cookie Related Variables |-------------------------------------------------------------------------- | | 'cookie_prefix' = Set a cookie name prefix if you need to avoid collisions | 'cookie_domain' = Set to .your-domain.com for site-wide cookies | 'cookie_path' = Typically will be a forward slash | 'cookie_secure' = Cookie will only be set if a secure HTTPS connection exists. | 'cookie_httponly' = Cookie will only be accessible via HTTP(S) (no javascript) | | Note: These settings (with the exception of 'cookie_prefix' and | 'cookie_httponly') will also affect sessions. | */ $config['cookie_prefix'] = ''; $config['cookie_domain'] = ''; $config['cookie_path'] = '/'; $config['cookie_secure'] = FALSE; $config['cookie_httponly'] = FALSE; /* |-------------------------------------------------------------------------- | Standardize newlines |-------------------------------------------------------------------------- | | Determines whether to standardize newline characters in input data, | meaning to replace \r\n, \r, \n occurrences with the PHP_EOL value. | | This is particularly useful for portability between UNIX-based OSes, | (usually \n) and Windows (\r\n). | */ $config['standardize_newlines'] = FALSE; /* |-------------------------------------------------------------------------- | Global XSS Filtering |-------------------------------------------------------------------------- | | Determines whether the XSS filter is always active when GET, POST or | COOKIE data is encountered | | WARNING: This feature is DEPRECATED and currently available only | for backwards compatibility purposes! | */ $config['global_xss_filtering'] = FALSE; /* |-------------------------------------------------------------------------- | Cross Site Request Forgery |-------------------------------------------------------------------------- | Enables a CSRF cookie token to be set. When set to TRUE, token will be | checked on a submitted form. If you are accepting user data, it is strongly | recommended CSRF protection be enabled. | | 'csrf_token_name' = The token name | 'csrf_cookie_name' = The cookie name | 'csrf_expire' = The number in seconds the token should expire. | 'csrf_regenerate' = Regenerate token on every submission | 'csrf_exclude_uris' = Array of URIs which ignore CSRF checks */ $config['csrf_protection'] = FALSE; $config['csrf_token_name'] = 'csrf_test_name'; $config['csrf_cookie_name'] = 'csrf_cookie_name'; $config['csrf_expire'] = 7200; $config['csrf_regenerate'] = TRUE; $config['csrf_exclude_uris'] = array(); /* |-------------------------------------------------------------------------- | Output Compression |-------------------------------------------------------------------------- | | Enables Gzip output compression for faster page loads. When enabled, | the output class will test whether your server supports Gzip. | Even if it does, however, not all browsers support compression | so enable only if you are reasonably sure your visitors can handle it. | | Only used if zlib.output_compression is turned off in your php.ini. | Please do not use it together with httpd-level output compression. | | VERY IMPORTANT: If you are getting a blank page when compression is enabled it | means you are prematurely outputting something to your browser. It could | even be a line of whitespace at the end of one of your scripts. For | compression to work, nothing can be sent before the output buffer is called | by the output class. Do not 'echo' any values with compression enabled. | */ $config['compress_output'] = FALSE; /* |-------------------------------------------------------------------------- | Master Time Reference |-------------------------------------------------------------------------- | | Options are 'local' or any PHP supported timezone. This preference tells | the system whether to use your server's local time as the master 'now' | reference, or convert it to the configured one timezone. See the 'date | helper' page of the user guide for information regarding date handling. | */ $config['time_reference'] = 'local'; /* |-------------------------------------------------------------------------- | Rewrite PHP Short Tags |-------------------------------------------------------------------------- | | If your PHP installation does not have short tag support enabled CI | can rewrite the tags on-the-fly, enabling you to utilize that syntax | in your view files. Options are TRUE or FALSE (boolean) | | Note: You need to have eval() enabled for this to work. | */ $config['rewrite_short_tags'] = FALSE; /* |-------------------------------------------------------------------------- | Reverse Proxy IPs |-------------------------------------------------------------------------- | | If your server is behind a reverse proxy, you must whitelist the proxy | IP addresses from which CodeIgniter should trust headers such as | HTTP_X_FORWARDED_FOR and HTTP_CLIENT_IP in order to properly identify | the visitor's IP address. | | You can use both an array or a comma-separated list of proxy addresses, | as well as specifying whole subnets. Here are a few examples: | | Comma-separated: '10.0.1.200,192.168.5.0/24' | Array: array('10.0.1.200', '192.168.5.0/24') */ $config['proxy_ips'] = '';
adriangirol/Proyecto
application/config/config.php
PHP
mit
18,892
require 'spec_helper' require 'git' require_relative 'fixtures/versionfiles' describe Autoversion::CLI do # Borrowing capture_io from minitest until I have # time to move over to minitest fully. def capture_io require 'stringio' captured_stdout, captured_stderr = StringIO.new, StringIO.new Mutex.new.synchronize do orig_stdout, orig_stderr = $stdout, $stderr $stdout, $stderr = captured_stdout, captured_stderr begin yield ensure $stdout = orig_stdout $stderr = orig_stderr end end return captured_stdout.string, captured_stderr.string end before(:each) do @path = File.join(File.dirname(__FILE__), 'tmp', 'cli') if File.directory? @path FileUtils.rm_rf @path end system("mkdir #{@path}") system("tar -xf spec/fixtures/bare_repo.tar --strip 1 -C #{@path}") system("echo '0.0.1' > #{@path}/version.txt") system("cd #{@path} && git add .") system("cd #{@path} && git commit -m 'first'") @repo = Git.open(@path) ::Autoversion::CLI.pwd = @path end it "should be able to read a version" do ::Autoversion::CLI.version_file_contents = Versionfiles::BASE_VERSIONFILE out = capture_io{ Autoversion::CLI.start %w{} }.join '' out.should == "\e[36m0.0.1\e[0m\n" end it "should be able to write versions" do ::Autoversion::CLI.version_file_contents = Versionfiles::BASE_VERSIONFILE out = capture_io{ Autoversion::CLI.start %w{patch -f} }.join '' out.should == "\e[32mVersion changed to 0.0.2\e[0m\n" out = capture_io{ Autoversion::CLI.start %w{minor -f} }.join '' out.should == "\e[32mVersion changed to 0.1.0\e[0m\n" out = capture_io{ Autoversion::CLI.start %w{major -f} }.join '' out.should == "\e[32mVersion changed to 1.0.0\e[0m\n" end it "should be able to read/write versions using a pattern matcher" do ::Autoversion::CLI.version_file_contents = Versionfiles::PATTERN_VERSIONFILE out = capture_io{ Autoversion::CLI.start %w{patch -f} }.join '' out.should == "\e[32mVersion changed to 0.0.2\e[0m\n" plugin_file = `cd #{@path} && cat lib/your-project/plugins/your-plugin/version.rb` ref_file = <<-eof module YourProject VERSION = "0.0.2" end eof plugin_file.should == ref_file.chop end it "should be able to write, commit and tag patch" do ::Autoversion::CLI.version_file_contents = "automate_git\n\n" + Versionfiles::BASE_VERSIONFILE out = capture_io{ Autoversion::CLI.start %w{patch -f} }.join '' out.should == "\e[32mVersion changed to 0.0.2\e[0m\n" end it "should be able to write, commit and tag minor" do ::Autoversion::CLI.version_file_contents = "automate_git\n\n" + Versionfiles::BASE_VERSIONFILE out = capture_io{ Autoversion::CLI.start %w{minor -f} }.join '' out.should == "\e[32mVersion changed to 0.1.0\e[0m\n" end it "should be able to write, commit and tag major" do ::Autoversion::CLI.version_file_contents = "automate_git\n\n" + Versionfiles::BASE_VERSIONFILE out = capture_io{ Autoversion::CLI.start %w{major -f} }.join '' out.should == "\e[32mVersion changed to 1.0.0\e[0m\n" end end
jpettersson/autoversion
spec/cli_spec.rb
Ruby
mit
3,200