Last updated: 2018-01-04
Code version: 09f5c3d
OCV_index=function(Y,k_fold = 5){
N = dim(Y)[1]
P = dim(Y)[2]
colindex = matrix(sample(P,P),ncol = k_fold)
rowindex = matrix(sample(N,N),ncol = k_fold)
foldindex = array(0,dim = c(k_fold,k_fold,2))
for(i in 1:k_fold){
for(j in 1:k_fold){
foldindex[i,j,1] = i
foldindex[i,j,2] = (i+j) %% k_fold
}
}
foldindex[which(foldindex == 0)] = k_fold
return(list(foldindex = foldindex, rowindex = rowindex, colindex = colindex))
}
# OCVindex = OCV_index(Y,k_fold = 5)
OCV_data = function(Y,OCVindex,k_fold = 5){
N = dim(Y)[1]
P = dim(Y)[2]
colindex = OCVindex$colindex
rowindex = OCVindex$rowindex
foldindex = OCVindex$foldindex
missing= array(0,dim = c(k_fold,N,P))
for(i in 1:k_fold){
missing[i, , ] = Y
for(j in 1:k_fold){
missing[i,rowindex[,foldindex[j,i,1]],colindex[,foldindex[j,i,2]]] = NA
}
}
return(missing)
}
# OCVdata = OCV_data(Y,OCVindex,k_fold = 5)
OCV_SSE = function(Y,OCVindex,OCVdata,k_fold = 5,method = "flash",Kmax = 50){
colindex = OCVindex$colindex
rowindex = OCVindex$rowindex
foldindex = OCVindex$foldindex
missing = OCVdata
SSE = rep(0,k_fold)
for(i in 1:k_fold){
miss_hat = call_method(missing[i,,], method = method, Kmax = Kmax)
for(j in 1:k_fold){
SSE[i] = SSE[i] + sum((Y[rowindex[,foldindex[j,i,1]],colindex[,foldindex[j,i,2]]] -
miss_hat[rowindex[,foldindex[j,i,1]],colindex[,foldindex[j,i,2]]])^2)
}
}
RMSE = sqrt(sum(SSE)/(dim(Y)[1] * dim(Y)[2]))
return(RMSE)
}
call_method = function(Y_data,method,Kmax = 50){
if(method == "ebnm_pn"){
data = flashr2::flash_set_data(Y_data)
f_greedy = flashr2::flash_add_greedy(data,Kmax=Kmax,ebnm_fn = ebnm_pn,verbose = F)
Y_hat = f_greedy$EL %*% t(f_greedy$EF)
}else if(method == "ebnm_ash"){
data = flashr2::flash_set_data(Y_data)
f_greedy = flashr2::flash_add_greedy(data,Kmax=Kmax,ebnm_fn = ebnm_ash,verbose = F)
Y_hat = f_greedy$EL %*% t(f_greedy$EF)
}else{
stop("the method is not implemented yet, please check it out")
}
return(Y_hat)
}
set.seed(99)
library(denoiseR)
data(tumors)
Y = tumors[, -ncol(tumors)]
Y = as.matrix(Y)
N = dim(Y)[1]
P = dim(Y)[2]
OCVindex = OCV_index(Y,k_fold = 5)
Warning in matrix(sample(P, P), ncol = k_fold): data length [356] is not a
sub-multiple or multiple of the number of rows [72]
Warning in matrix(sample(N, N), ncol = k_fold): data length [43] is not a
sub-multiple or multiple of the number of rows [9]
OCVdata = OCV_data(Y,OCVindex,k_fold = 5)
f_pn = OCV_SSE(Y,OCVindex,OCVdata,k_fold = 5,method = "ebnm_pn",Kmax = 20)
fitting factor/loading 1
fitting factor/loading 2
fitting factor/loading 3
fitting factor/loading 4
fitting factor/loading 5
fitting factor/loading 6
fitting factor/loading 7
fitting factor/loading 8
fitting factor/loading 9
Warning in simpute.als(x, J, thresh, lambda, maxit, trace.it, warm.start, :
Convergence not achieved by 100 iterations
fitting factor/loading 1
fitting factor/loading 2
fitting factor/loading 3
fitting factor/loading 4
fitting factor/loading 5
fitting factor/loading 6
fitting factor/loading 7
fitting factor/loading 8
fitting factor/loading 9
fitting factor/loading 1
fitting factor/loading 2
fitting factor/loading 3
fitting factor/loading 4
fitting factor/loading 5
fitting factor/loading 6
fitting factor/loading 7
fitting factor/loading 8
fitting factor/loading 9
fitting factor/loading 1
fitting factor/loading 2
fitting factor/loading 3
fitting factor/loading 4
fitting factor/loading 5
fitting factor/loading 6
fitting factor/loading 7
fitting factor/loading 8
fitting factor/loading 9
Warning in simpute.als(x, J, thresh, lambda, maxit, trace.it, warm.start, :
Convergence not achieved by 100 iterations
fitting factor/loading 1
fitting factor/loading 2
fitting factor/loading 3
fitting factor/loading 4
fitting factor/loading 5
fitting factor/loading 6
fitting factor/loading 7
# flashG_rmse = OCV_SSE(Y,OCVindex,OCVdata,k_fold = 5,method = "flash",Kmax = 50)
f_ash = OCV_SSE(Y,OCVindex,OCVdata,k_fold = 5,method = "ebnm_ash",Kmax = 20)
fitting factor/loading 1
Warning in REBayes::KWDual(A, rep(1, k), normalize(w), control = control): estimated mixing distribution has some negative values:
consider reducing rtol
Warning in mixIP(matrix_lik = structure(c(4.97635434328429e-137,
1.70948435290957e-121, : Optimization step yields mixture weights that are
either too small, or negative; weights have been corrected and renormalized
after the optimization.
fitting factor/loading 2
fitting factor/loading 3
fitting factor/loading 4
fitting factor/loading 5
fitting factor/loading 6
fitting factor/loading 7
Warning in simpute.als(x, J, thresh, lambda, maxit, trace.it, warm.start, :
Convergence not achieved by 100 iterations
fitting factor/loading 8
fitting factor/loading 9
fitting factor/loading 1
Warning in REBayes::KWDual(A, rep(1, k), normalize(w), control = control): estimated mixing distribution has some negative values:
consider reducing rtol
Warning in mixIP(matrix_lik = structure(c(1.04399379175721e-127,
2.07275611114578e-148, : Optimization step yields mixture weights that are
either too small, or negative; weights have been corrected and renormalized
after the optimization.
Warning in REBayes::KWDual(A, rep(1, k), normalize(w), control = control): estimated mixing distribution has some negative values:
consider reducing rtol
Warning in mixIP(matrix_lik = structure(c(1.11428383481036e-135,
1.59200429543298e-185, : Optimization step yields mixture weights that are
either too small, or negative; weights have been corrected and renormalized
after the optimization.
fitting factor/loading 2
fitting factor/loading 3
fitting factor/loading 4
fitting factor/loading 5
fitting factor/loading 6
fitting factor/loading 7
fitting factor/loading 8
fitting factor/loading 1
Warning in REBayes::KWDual(A, rep(1, k), normalize(w), control = control): estimated mixing distribution has some negative values:
consider reducing rtol
Warning in mixIP(matrix_lik = structure(c(1.6959492596122e-141,
5.15430970830144e-137, : Optimization step yields mixture weights that are
either too small, or negative; weights have been corrected and renormalized
after the optimization.
fitting factor/loading 2
fitting factor/loading 3
fitting factor/loading 4
fitting factor/loading 5
fitting factor/loading 6
fitting factor/loading 7
fitting factor/loading 8
fitting factor/loading 9
fitting factor/loading 1
Warning in REBayes::KWDual(A, rep(1, k), normalize(w), control = control): estimated mixing distribution has some negative values:
consider reducing rtol
Warning in mixIP(matrix_lik = structure(c(1.28880789963641e-143,
1.40058355210077e-144, : Optimization step yields mixture weights that are
either too small, or negative; weights have been corrected and renormalized
after the optimization.
fitting factor/loading 2
fitting factor/loading 3
fitting factor/loading 4
fitting factor/loading 5
fitting factor/loading 6
Warning in simpute.als(x, J, thresh, lambda, maxit, trace.it, warm.start, :
Convergence not achieved by 100 iterations
fitting factor/loading 7
fitting factor/loading 8
Warning in simpute.als(x, J, thresh, lambda, maxit, trace.it, warm.start, :
Convergence not achieved by 100 iterations
fitting factor/loading 9
fitting factor/loading 1
Warning in REBayes::KWDual(A, rep(1, k), normalize(w), control = control): estimated mixing distribution has some negative values:
consider reducing rtol
Warning in mixIP(matrix_lik = structure(c(3.7327648797833e-164,
9.03510800611549e-133, : Optimization step yields mixture weights that are
either too small, or negative; weights have been corrected and renormalized
after the optimization.
fitting factor/loading 2
fitting factor/loading 3
fitting factor/loading 4
fitting factor/loading 5
fitting factor/loading 6
fitting factor/loading 7
fitting factor/loading 8
Check the RMSE for the missing value
c(f_ash,f_pn)
[1] 0.7565503 0.7588753
set.seed(99)
library(R.matlab)
## run the code
Y_centered = readMat("../../ash-sfa/Rcode/postmean/flash_simulation/missingvalue/Breastcancer/example.mat")
Y = Y_centered$Y
# in the matlab package of NSF, the use the centered data by rows
N = dim(Y)[1]
P = dim(Y)[2]
Y = Y - rowMeans(Y) %*% t(rep(1,P))
OCVindex = OCV_index(Y,k_fold = 5)
Warning in matrix(sample(P, P), ncol = k_fold): data length [251] is not a
sub-multiple or multiple of the number of rows [51]
Warning in matrix(sample(N, N), ncol = k_fold): data length [226] is not a
sub-multiple or multiple of the number of rows [46]
OCVdata = OCV_data(Y,OCVindex,k_fold = 5)
f_pn = OCV_SSE(Y,OCVindex,OCVdata,k_fold = 5,method = "ebnm_pn",Kmax = 50)
fitting factor/loading 1
fitting factor/loading 2
fitting factor/loading 3
fitting factor/loading 4
fitting factor/loading 5
fitting factor/loading 6
fitting factor/loading 7
fitting factor/loading 8
fitting factor/loading 9
fitting factor/loading 10
Warning in simpute.als(x, J, thresh, lambda, maxit, trace.it, warm.start, :
Convergence not achieved by 100 iterations
fitting factor/loading 11
fitting factor/loading 12
fitting factor/loading 13
fitting factor/loading 14
fitting factor/loading 15
Warning in simpute.als(x, J, thresh, lambda, maxit, trace.it, warm.start, :
Convergence not achieved by 100 iterations
fitting factor/loading 16
Warning in simpute.als(x, J, thresh, lambda, maxit, trace.it, warm.start, :
Convergence not achieved by 100 iterations
fitting factor/loading 17
fitting factor/loading 18
fitting factor/loading 19
fitting factor/loading 20
Warning in simpute.als(x, J, thresh, lambda, maxit, trace.it, warm.start, :
Convergence not achieved by 100 iterations
fitting factor/loading 21
Warning in simpute.als(x, J, thresh, lambda, maxit, trace.it, warm.start, :
Convergence not achieved by 100 iterations
fitting factor/loading 22
fitting factor/loading 23
fitting factor/loading 24
fitting factor/loading 25
fitting factor/loading 26
fitting factor/loading 27
fitting factor/loading 1
fitting factor/loading 2
fitting factor/loading 3
fitting factor/loading 4
fitting factor/loading 5
fitting factor/loading 6
fitting factor/loading 7
fitting factor/loading 8
fitting factor/loading 9
fitting factor/loading 10
fitting factor/loading 11
fitting factor/loading 12
fitting factor/loading 13
Warning in simpute.als(x, J, thresh, lambda, maxit, trace.it, warm.start, :
Convergence not achieved by 100 iterations
fitting factor/loading 14
fitting factor/loading 15
fitting factor/loading 16
fitting factor/loading 17
fitting factor/loading 18
fitting factor/loading 19
fitting factor/loading 20
fitting factor/loading 21
Warning in simpute.als(x, J, thresh, lambda, maxit, trace.it, warm.start, :
Convergence not achieved by 100 iterations
fitting factor/loading 22
fitting factor/loading 23
Warning in simpute.als(x, J, thresh, lambda, maxit, trace.it, warm.start, :
Convergence not achieved by 100 iterations
fitting factor/loading 24
fitting factor/loading 25
fitting factor/loading 26
fitting factor/loading 27
Warning in simpute.als(x, J, thresh, lambda, maxit, trace.it, warm.start, :
Convergence not achieved by 100 iterations
fitting factor/loading 28
fitting factor/loading 29
Warning in simpute.als(x, J, thresh, lambda, maxit, trace.it, warm.start, :
Convergence not achieved by 100 iterations
fitting factor/loading 30
fitting factor/loading 1
fitting factor/loading 2
fitting factor/loading 3
fitting factor/loading 4
fitting factor/loading 5
Warning in simpute.als(x, J, thresh, lambda, maxit, trace.it, warm.start, :
Convergence not achieved by 100 iterations
fitting factor/loading 6
fitting factor/loading 7
fitting factor/loading 8
fitting factor/loading 9
fitting factor/loading 10
fitting factor/loading 11
fitting factor/loading 12
fitting factor/loading 13
fitting factor/loading 14
fitting factor/loading 15
fitting factor/loading 16
fitting factor/loading 17
fitting factor/loading 18
fitting factor/loading 19
fitting factor/loading 20
fitting factor/loading 21
Warning in simpute.als(x, J, thresh, lambda, maxit, trace.it, warm.start, :
Convergence not achieved by 100 iterations
fitting factor/loading 22
fitting factor/loading 23
fitting factor/loading 24
fitting factor/loading 25
fitting factor/loading 26
fitting factor/loading 27
fitting factor/loading 28
Warning in simpute.als(x, J, thresh, lambda, maxit, trace.it, warm.start, :
Convergence not achieved by 100 iterations
fitting factor/loading 29
Warning in simpute.als(x, J, thresh, lambda, maxit, trace.it, warm.start, :
Convergence not achieved by 100 iterations
fitting factor/loading 30
Warning in simpute.als(x, J, thresh, lambda, maxit, trace.it, warm.start, :
Convergence not achieved by 100 iterations
fitting factor/loading 1
fitting factor/loading 2
fitting factor/loading 3
fitting factor/loading 4
fitting factor/loading 5
fitting factor/loading 6
fitting factor/loading 7
fitting factor/loading 8
fitting factor/loading 9
fitting factor/loading 10
fitting factor/loading 11
fitting factor/loading 12
fitting factor/loading 13
fitting factor/loading 14
fitting factor/loading 15
fitting factor/loading 16
fitting factor/loading 17
fitting factor/loading 18
Warning in simpute.als(x, J, thresh, lambda, maxit, trace.it, warm.start, :
Convergence not achieved by 100 iterations
fitting factor/loading 19
fitting factor/loading 20
fitting factor/loading 21
Warning in simpute.als(x, J, thresh, lambda, maxit, trace.it, warm.start, :
Convergence not achieved by 100 iterations
fitting factor/loading 22
Warning in simpute.als(x, J, thresh, lambda, maxit, trace.it, warm.start, :
Convergence not achieved by 100 iterations
fitting factor/loading 23
fitting factor/loading 24
fitting factor/loading 25
fitting factor/loading 26
fitting factor/loading 27
Warning in simpute.als(x, J, thresh, lambda, maxit, trace.it, warm.start, :
Convergence not achieved by 100 iterations
fitting factor/loading 28
Warning in simpute.als(x, J, thresh, lambda, maxit, trace.it, warm.start, :
Convergence not achieved by 100 iterations
fitting factor/loading 29
fitting factor/loading 30
fitting factor/loading 31
fitting factor/loading 32
fitting factor/loading 1
fitting factor/loading 2
fitting factor/loading 3
fitting factor/loading 4
fitting factor/loading 5
fitting factor/loading 6
fitting factor/loading 7
fitting factor/loading 8
fitting factor/loading 9
fitting factor/loading 10
fitting factor/loading 11
fitting factor/loading 12
fitting factor/loading 13
fitting factor/loading 14
fitting factor/loading 15
fitting factor/loading 16
fitting factor/loading 17
fitting factor/loading 18
fitting factor/loading 19
fitting factor/loading 20
fitting factor/loading 21
fitting factor/loading 22
Warning in simpute.als(x, J, thresh, lambda, maxit, trace.it, warm.start, :
Convergence not achieved by 100 iterations
fitting factor/loading 23
fitting factor/loading 24
Warning in simpute.als(x, J, thresh, lambda, maxit, trace.it, warm.start, :
Convergence not achieved by 100 iterations
fitting factor/loading 25
Warning in simpute.als(x, J, thresh, lambda, maxit, trace.it, warm.start, :
Convergence not achieved by 100 iterations
fitting factor/loading 26
Warning in simpute.als(x, J, thresh, lambda, maxit, trace.it, warm.start, :
Convergence not achieved by 100 iterations
fitting factor/loading 27
fitting factor/loading 28
Warning in simpute.als(x, J, thresh, lambda, maxit, trace.it, warm.start, :
Convergence not achieved by 100 iterations
fitting factor/loading 29
# flashG_rmse = OCV_SSE(Y,OCVindex,OCVdata,k_fold = 5,method = "flash",Kmax = 50)
f_ash = OCV_SSE(Y,OCVindex,OCVdata,k_fold = 5,method = "ebnm_ash",Kmax = 50)
fitting factor/loading 1
fitting factor/loading 2
fitting factor/loading 3
fitting factor/loading 4
fitting factor/loading 5
fitting factor/loading 6
fitting factor/loading 7
fitting factor/loading 8
fitting factor/loading 9
fitting factor/loading 10
Warning in simpute.als(x, J, thresh, lambda, maxit, trace.it, warm.start, :
Convergence not achieved by 100 iterations
fitting factor/loading 11
fitting factor/loading 12
fitting factor/loading 13
fitting factor/loading 14
Warning in simpute.als(x, J, thresh, lambda, maxit, trace.it, warm.start, :
Convergence not achieved by 100 iterations
fitting factor/loading 15
Warning in simpute.als(x, J, thresh, lambda, maxit, trace.it, warm.start, :
Convergence not achieved by 100 iterations
fitting factor/loading 16
fitting factor/loading 17
fitting factor/loading 18
fitting factor/loading 19
fitting factor/loading 20
fitting factor/loading 21
fitting factor/loading 22
fitting factor/loading 23
fitting factor/loading 24
fitting factor/loading 25
fitting factor/loading 26
Warning in simpute.als(x, J, thresh, lambda, maxit, trace.it, warm.start, :
Convergence not achieved by 100 iterations
fitting factor/loading 27
fitting factor/loading 28
fitting factor/loading 29
fitting factor/loading 30
fitting factor/loading 31
fitting factor/loading 32
Warning in simpute.als(x, J, thresh, lambda, maxit, trace.it, warm.start, :
Convergence not achieved by 100 iterations
fitting factor/loading 1
fitting factor/loading 2
fitting factor/loading 3
fitting factor/loading 4
fitting factor/loading 5
fitting factor/loading 6
fitting factor/loading 7
fitting factor/loading 8
Warning in simpute.als(x, J, thresh, lambda, maxit, trace.it, warm.start, :
Convergence not achieved by 100 iterations
fitting factor/loading 9
fitting factor/loading 10
fitting factor/loading 11
fitting factor/loading 12
fitting factor/loading 13
Warning in simpute.als(x, J, thresh, lambda, maxit, trace.it, warm.start, :
Convergence not achieved by 100 iterations
fitting factor/loading 14
fitting factor/loading 15
Warning in simpute.als(x, J, thresh, lambda, maxit, trace.it, warm.start, :
Convergence not achieved by 100 iterations
fitting factor/loading 16
Warning in simpute.als(x, J, thresh, lambda, maxit, trace.it, warm.start, :
Convergence not achieved by 100 iterations
fitting factor/loading 17
fitting factor/loading 18
fitting factor/loading 19
Warning in simpute.als(x, J, thresh, lambda, maxit, trace.it, warm.start, :
Convergence not achieved by 100 iterations
fitting factor/loading 20
Warning in simpute.als(x, J, thresh, lambda, maxit, trace.it, warm.start, :
Convergence not achieved by 100 iterations
fitting factor/loading 21
Warning in simpute.als(x, J, thresh, lambda, maxit, trace.it, warm.start, :
Convergence not achieved by 100 iterations
fitting factor/loading 22
fitting factor/loading 23
fitting factor/loading 24
fitting factor/loading 25
fitting factor/loading 26
Warning in simpute.als(x, J, thresh, lambda, maxit, trace.it, warm.start, :
Convergence not achieved by 100 iterations
fitting factor/loading 27
Warning in simpute.als(x, J, thresh, lambda, maxit, trace.it, warm.start, :
Convergence not achieved by 100 iterations
fitting factor/loading 28
fitting factor/loading 29
fitting factor/loading 1
fitting factor/loading 2
fitting factor/loading 3
fitting factor/loading 4
fitting factor/loading 5
Warning in simpute.als(x, J, thresh, lambda, maxit, trace.it, warm.start, :
Convergence not achieved by 100 iterations
fitting factor/loading 6
fitting factor/loading 7
fitting factor/loading 8
fitting factor/loading 9
fitting factor/loading 10
fitting factor/loading 11
fitting factor/loading 12
Warning in simpute.als(x, J, thresh, lambda, maxit, trace.it, warm.start, :
Convergence not achieved by 100 iterations
fitting factor/loading 13
fitting factor/loading 14
Warning in simpute.als(x, J, thresh, lambda, maxit, trace.it, warm.start, :
Convergence not achieved by 100 iterations
fitting factor/loading 15
fitting factor/loading 16
fitting factor/loading 17
Warning in simpute.als(x, J, thresh, lambda, maxit, trace.it, warm.start, :
Convergence not achieved by 100 iterations
fitting factor/loading 18
fitting factor/loading 19
fitting factor/loading 20
fitting factor/loading 21
fitting factor/loading 22
fitting factor/loading 23
fitting factor/loading 24
fitting factor/loading 25
fitting factor/loading 26
fitting factor/loading 27
fitting factor/loading 1
fitting factor/loading 2
fitting factor/loading 3
fitting factor/loading 4
fitting factor/loading 5
fitting factor/loading 6
fitting factor/loading 7
fitting factor/loading 8
fitting factor/loading 9
fitting factor/loading 10
fitting factor/loading 11
fitting factor/loading 12
fitting factor/loading 13
fitting factor/loading 14
fitting factor/loading 15
Warning in simpute.als(x, J, thresh, lambda, maxit, trace.it, warm.start, :
Convergence not achieved by 100 iterations
fitting factor/loading 16
fitting factor/loading 17
Warning in simpute.als(x, J, thresh, lambda, maxit, trace.it, warm.start, :
Convergence not achieved by 100 iterations
fitting factor/loading 18
fitting factor/loading 19
fitting factor/loading 20
fitting factor/loading 21
fitting factor/loading 22
fitting factor/loading 23
fitting factor/loading 24
fitting factor/loading 25
fitting factor/loading 26
fitting factor/loading 27
Warning in simpute.als(x, J, thresh, lambda, maxit, trace.it, warm.start, :
Convergence not achieved by 100 iterations
fitting factor/loading 28
fitting factor/loading 29
Warning in simpute.als(x, J, thresh, lambda, maxit, trace.it, warm.start, :
Convergence not achieved by 100 iterations
fitting factor/loading 1
fitting factor/loading 2
fitting factor/loading 3
fitting factor/loading 4
fitting factor/loading 5
fitting factor/loading 6
fitting factor/loading 7
fitting factor/loading 8
fitting factor/loading 9
fitting factor/loading 10
fitting factor/loading 11
fitting factor/loading 12
fitting factor/loading 13
fitting factor/loading 14
fitting factor/loading 15
Warning in simpute.als(x, J, thresh, lambda, maxit, trace.it, warm.start, :
Convergence not achieved by 100 iterations
fitting factor/loading 16
Warning in simpute.als(x, J, thresh, lambda, maxit, trace.it, warm.start, :
Convergence not achieved by 100 iterations
fitting factor/loading 17
Warning in simpute.als(x, J, thresh, lambda, maxit, trace.it, warm.start, :
Convergence not achieved by 100 iterations
fitting factor/loading 18
Warning in simpute.als(x, J, thresh, lambda, maxit, trace.it, warm.start, :
Convergence not achieved by 100 iterations
fitting factor/loading 19
fitting factor/loading 20
fitting factor/loading 21
fitting factor/loading 22
fitting factor/loading 23
fitting factor/loading 24
fitting factor/loading 25
Warning in simpute.als(x, J, thresh, lambda, maxit, trace.it, warm.start, :
Convergence not achieved by 100 iterations
fitting factor/loading 26
fitting factor/loading 27
fitting factor/loading 28
Warning in simpute.als(x, J, thresh, lambda, maxit, trace.it, warm.start, :
Convergence not achieved by 100 iterations
Check the RMSE for the missing value
c(f_ash,f_pn)
[1] 0.5185763 0.5188361
set.seed(11)
library(Matrix)
ml100K_data = readRDS("../../ash-sfa/Rcode/postmean/flash_simulation/missingvalue/ML100K/biscale_data.rds")
MLMatrix <- sparseMatrix(i = ml100K_data[,1],
j = ml100K_data[,2],
x = ml100K_data[,3],dims = c(943,1682))
# turn this sparse matrix into matrix in r
Y = as.matrix(MLMatrix)
Y[which(Y == 0)] = NA
OCVindex = OCV_index(Y,k_fold = 10)
OCVdata = OCV_data(Y,OCVindex,k_fold = 10)
f_pn = OCV_SSE(Y,OCVindex,OCVdata,k_fold = 10,method = "ebnm_pn",Kmax = 10)
# flashG_rmse = OCV_SSE(Y,OCVindex,OCVdata,k_fold = 5,method = "flash",Kmax = 50)
f_ash = OCV_SSE(Y,OCVindex,OCVdata,k_fold = 10,method = "ebnm_ash",Kmax = 10)
sessionInfo()
R version 3.3.0 (2016-05-03)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.13.2 (unknown)
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] denoiseR_1.0 Matrix_1.2-11 R.matlab_3.6.1 cowplot_0.8.0
[5] ggplot2_2.2.1 flashr2_0.3-3 ashr_2.2-3 ebnm_0.1-7
[9] MASS_7.3-47 workflowr_0.4.0 rmarkdown_1.6
loaded via a namespace (and not attached):
[1] softImpute_1.4 PMA_1.0.9 lattice_0.20-35
[4] Rmosek_7.1.2 colorspace_1.3-2 htmltools_0.3.6
[7] yaml_2.1.14 rlang_0.1.2 R.oo_1.21.0
[10] withr_2.0.0 R.utils_2.5.0 REBayes_0.85
[13] foreach_1.4.4 plyr_1.8.4 stringr_1.2.0
[16] munsell_0.4.3 gtable_0.2.0 R.methodsS3_1.7.1
[19] devtools_1.13.3 codetools_0.2-15 leaps_3.0
[22] memoise_1.1.0 evaluate_0.10.1 knitr_1.17
[25] pscl_1.5.2 doParallel_1.0.11 irlba_2.2.1
[28] parallel_3.3.0 curl_2.8.1 Rcpp_0.12.14
[31] flashClust_1.01-2 scales_0.4.1 backports_1.1.0
[34] scatterplot3d_0.3-40 truncnorm_1.0-7 digest_0.6.12
[37] stringi_1.1.5 grid_3.3.0 rprojroot_1.2
[40] tools_3.3.0 magrittr_1.5 lazyeval_0.2.0
[43] tibble_1.3.3 cluster_2.0.6 FactoMineR_1.36
[46] SQUAREM_2017.10-1 assertthat_0.2.0 httr_1.3.0
[49] rstudioapi_0.6 iterators_1.0.9 R6_2.2.2
[52] git2r_0.19.0
This R Markdown site was created with workflowr


Highlight the "Choose a Password" field to see the Password Strength Meter in action.
This is an example to show the Password Strength Meter in action. You're not signing up for an account.


Here we describe basic data structures of archive format introduced in RAR 5.0. If you need information about algorithms or more detailed information on data structures, please use UnRAR source code.
Variable length integer. Can include one or more bytes, where lower 7 bits of every byte contain integer data and highest bit in every byte is the continuation flag. If highest bit is 0, this is the last byte in sequence. So first byte contains 7 least significant bits of integer and continuation flag. Second byte, if present, contains next 7 bits and so on.
Currently RAR format uses vint to store up to 64 bit integers, resulting in 10 bytes maximum. This value may be increased in the future if necessary for some reason.
Sometimes RAR needs to pre-allocate space for vint before knowing its exact value. In such situation it can allocate more space than really necessary and then fill several leading bytes with 0x80 hexadecimal, which means 0 with continuation flag set.
Byte, 16-, 32-, 64- bit unsigned integer in little endian format.
We use ellipsis ... to denote variable length data areas.
We use 0x prefix to define hexadecimal values, such as 0xf000
| Field | Size | Description |
| Header CRC32 | uint32 | CRC32 of header data starting from Header size field and up to and including the optional extra area. |
| Header size | vint | Size of header data starting from Header type field and up to and including the optional extra area. This field must not be longer than 3 bytes in current implementation, resulting in 2 MB maximum header size. |
| Header type | vint | Type of archive header. Possible values are:
1 Main archive header. 2 File header. 3 Service header. 4 Archive encryption header. 5 End of archive header. |
| Header flags | vint | Flags common for all headers:
0x0001 Extra area is present in the end of header. 0x0002 Data area is present in the end of header. 0x0004 Blocks with unknown type and this flag must be skipped when updating an archive. 0x0008 Data area is continuing from previous volume. 0x0010 Data area is continuing in next volume. 0x0020 Block depends on preceding file block. 0x0040 Preserve a child block if host block is modified. |
| Extra area size | vint | Size of extra area. Optional field, present only if 0x0001 header flag is set. |
| Data size | vint | Size of data area. Optional field, present only if 0x0002 header flag is set. |
| ... | ... | Fields specific for current block type. See concrete block types description for details. |
| Extra area | ... | Optional area containing additional header fields, present only if 0x0001 header flag is set. |
| Data area | vint | Optional data area, present only if 0x0002 header flag is set. Used to store large data amounts, such as compressed file data. Not counted in Header CRC and Header size fields. |
Extra area can include one or more records having the following format:
| Size | vint | Size of record data starting from Type. |
| Type | vint | Record type. Different archive blocks have different associated extra area record types. Read the concrete archive block description for details. New record types can be added in the future, so unknown record types need to be skipped without interrupting an operation. |
| Data | ... | Record dependent data. May be missing if record consists only from size and type. |
Self-extracting module (optional) RAR 5.0 signature Archive encryption header (optional) Main archive header Archive comment service header (optional) File header 1 Service headers (NTFS ACL, streams, etc.) for preceding file (optional). ... File header N Service headers (NTFS ACL, streams, etc.) for preceding file (optional). Recovery record (optional). End of archive header.
Any data preceding the archive signature. Self-extracting module size and contents is not defined. At the moment of writing this documentation RAR assumes the maximum SFX module size to not exceed 1 MB, but this value can be increased in the future.
RAR 5.0 signature consists of 8 bytes: 0x52 0x61 0x72 0x21 0x1A 0x07 0x01 0x00. You need to search for this signature in supposed archive from beginning and up to maximum SFX module size. Just for comparison this is RAR 4.x 7 byte length signature: 0x52 0x61 0x72 0x21 0x1A 0x07 0x00.
| Header CRC32 | uint32 | |
| Header size | vint | |
| Header type | vint | 4 |
| Header flags | vint | Flags common for all headers |
| Encryption version | vint | Version of encryption algorithm. Now only 0 version (AES-256) is supported. |
| Encryption flags | vint | 0x0001 Password check data is present. |
| KDF count | 1 byte | Binary logarithm of iteration number for PBKDF2 function. RAR can refuse to process KDF count exceeding some threshold. Concrete value of threshold is a version dependent. |
| Salt | 16 bytes | Salt value used globally for all encrypted archive headers. |
| Check value | 12 bytes | Value used to verify the password validity. Present only if 0x0001 encryption flag is set. First 8 bytes are calculated using additional PBKDF2 rounds, 4 last bytes is the additional checksum. Together with the standard header CRC32 we have 64 bit checksum to reliably verify this field integrity and distinguish invalid password and damaged data. Further details can be found in UnRAR source code. |
This header is present only in archives with encrypted headers. Every next header after this one is started from 16 byte AES-256 initialization vector followed by encrypted header data. Size of encrypted header data block is aligned to 16 byte boundary.
| Header CRC32 | uint32 | |
| Header size | vint | |
| Header type | vint | 1 |
| Header flags | vint | Flags common for all headers |
| Extra area size | vint | Size of extra area. Optional field, present only if 0x0001 header flag is set. |
| Archive flags | vint |
0x0001 Volume. Archive is a part of multivolume set. 0x0002 Volume number field is present. This flag is present in all volumes except first. 0x0004 Solid archive. 0x0008 Recovery record is present. 0x0010 Locked archive. |
| Volume number | vint | Optional field, present only if 0x0002 archive flag is set. Not present for first volume, 1 for second volume, 2 for third and so on. |
| Extra area | ... | Optional area containing additional header fields, present only if 0x0001 header flag is set. |
Extra area of main archive header can contain following record types
| Type | Name | Description |
| 0x01 | Locator | Contains positions of different service blocks, so they can be accessed quickly, without scanning the entire archive. This record is optional. If it is missing, it is still necessary to scan the entire archive to verify presence of service blocks. |
| Size | vint | |
| Type | vint | 1 |
| Flags | vint |
0x0001 Quick open record offset is present. 0x0002 Recovery record offset is present. |
| Quick open offset | vint | Distance from beginning of quick open service block to beginning of main archive header. Present only if 0x0001 flag is set. If equal to 0, should be ignored. It can be set to zero if preallocated space was not enough to store resulting offset. |
| Recovery record offset | vint | Distance from beginning of recovery record service block to beginning of main archive header. Present only if 0x0002 flag is set. If equal to 0, should be ignored. It can be set to zero if preallocated space was not enough to store resulting offset. |
These two header types use the similar data structure, so we describe them both here.
| Header CRC32 | uint32 | |||||||||||
| Header size | vint | |||||||||||
| Header type | vint | 2 for file header, 3 for service header | ||||||||||
| Header flags | vint | Flags common for all headers | ||||||||||
| Extra area size | vint | Size of extra area. Optional field, present only if 0x0001 header flag is set. | ||||||||||
| Data size | vint | Size of data area. Optional field, present only if 0x0002 header flag is set. For file header this field contains the packed file size. | ||||||||||
| File flags | vint | Flags specific for these header types: 0x0001 Directory file system object (file header only). 0x0002 Time field in Unix format is present. 0x0004 CRC32 field is present. 0x0008 Unpacked size is unknown. If flag 0x0008 is set, unpacked size field is still present, but must be ignored and extraction must be performed until reaching the end of compression stream. This flag can be set if actual file size is larger than reported by OS or if file size is unknown such as for all volumes except last when archiving from stdin to multivolume archive. |
||||||||||
| Unpacked size | vint | Unpacked file or service data size. | ||||||||||
| Attributes | vint | Operating system specific file attributes in case of file header. Might be either used for data specific needs or just reserved and set to 0 for service header. | ||||||||||
| mtime | uint32 | File modification time in Unix time format. Optional, present if 0x0002 file flag is set. | ||||||||||
| Data CRC32 | uint32 | CRC32 of unpacked file or service data. For files split between volumes it contains CRC32 of file packed data contained in current volume for all file parts except the last. Optional, present if 0x0004 file flag is set. | ||||||||||
| Compression information | vint |
Lower 6 bits (0x003f mask) contain the version of compression algorithm, resulting in possible 0 - 63 values. Current version is 0. 7th bit (0x0040) defines the solid flag. If it is set, RAR continues to use the compression dictionary left after processing preceding files. It can be set only for file headers and is never set for service headers. Bits 8 - 10 (0x0380 mask) define the compression method. Currently only values 0 - 5 are used. 0 means no compression. Bits 11 - 14 (0x3c00) define the minimum size of dictionary size required to extract data. Value 0 means 128 KB, 1 - 256 KB, ..., 14 - 2048 MB, 15 - 4096 MB. |
||||||||||
| Host OS | vint | Type of operating system used to create the archive. 0x0000 Windows. 0x0001 Unix. |
||||||||||
| Name length | vint | File or service header name length. | ||||||||||
| Name | ? bytes |
Variable length field containing Name length bytes in UTF-8 format without trailing zero. For file header this is a name of archived file. Forward slash character is used as the path separator both for Unix and Windows names. Backslashes are treated as a part of name for Unix names and as invalid character for Windows file names. Type of name is defined by Host OS field.
If Unix file name contains any high ASCII characters which cannot be correctly converted to Unicode and UTF-8, we map such characters to to 0xE080 - 0xE0FF private use Unicode area and insert 0xFFFE Unicode non-character to resulting string to indicate that it contains mapped characters, which need to be converted back when extracting. Concrete position of 0xFFFE is not defined, we need to search the entire string for it. Such mapped names are not portable and can be correctly unpacked only on the same system where they were created. For service header this field contains a name of service header. Now the following names are used:
|
||||||||||
| Extra area | ... | Optional area containing additional header fields, present only if 0x0001 header flag is set. | ||||||||||
| Data area | vint | Optional data area, present only if 0x0002 header flag is set. Store file data in case of file header or service data for service header. Depending on the compression method value in Compression information can be either uncompressed (compression method 0) or compressed. |
File and service headers use the same types of extra area records:
| Type | Name | Description |
| 0x01 | File encryption | File encryption information. |
| 0x02 | File hash | File data hash. |
| 0x03 | File time | High precision file time. |
| 0x04 | File version | File version number. |
| 0x05 | Redirection | File system redirection. |
| 0x06 | Unix owner | Unix owner and group information. |
| 0x07 | Service data | Service header data array. |
This record is present if file data is encrypted.
| Size | vint | |
| Type | vint | 0x01 |
| Version | vint | Version of encryption algorithm. Now only 0 version (AES-256) is supported. |
| Flags | vint |
0x0001 Password check data is present. 0x0002 Use tweaked checksums instead of plain checksums. If flag 0x0002 is present, RAR transforms the checksum preserving file or service data integrity, so it becomes dependent on encryption key. It makes guessing file contents based on checksum impossible. It affects both data CRC32 in file header and checksums in file hash record in extra area. |
| KDF count | 1 byte | Binary logarithm of iteration number for PBKDF2 function. RAR can refuse to process KDF count exceeding some threshold. Concrete value of threshold is version dependent. |
| Salt | 16 bytes | Salt value to set the decryption key for encrypted file. |
| IV | 16 bytes | AES-256 initialization vector. |
| Check value | 12 bytes | Value used to verify the password validity. Present only if 0x0001 encryption flag is set. First 8 bytes are calculated using additional PBKDF2 rounds, 4 last bytes is the additional checksum. Together with the standard header CRC32 we have 64 bit checksum to reliably verify this field integrity and distinguish invalid password and damaged data. Further details can be found in UnRAR source code. |
Only the standard CRC32 checksum can be stored directly in file header. If other hash is used, it is stored in this extra area record:
| Size | vint | |
| Type | vint | 0x02 |
| Hash type | vint |
0x00 BLAKE2sp hash function. |
| Hash data | ? bytes | 32 bytes of BLAKE2sp for 0x00 hash type. |
For files split between volumes it contains a hash of file packed data contained in current volume for all file parts except the last. For files not split between volumes and for last parts of split files it contains an unpacked data hash.
This record is used if it is necessary to store creation and last access time or if 1 second precision of Unix mtime stored in file header is not enough:
| Size | vint | |
| Type | vint | 0x03 |
| Flags | vint |
0x0001 Time is stored in Unix time format if this flags is set
and in Windows FILETIME format otherwise 0x0002 Modification time is present 0x0004 Creation time is present 0x0008 Last access time is present |
| mtime | uint32 or uint64 | Modification time. Present if 0x0002 flag is set. Depending on 0x0001 flag can be in Unix time or Windows FILETIME format. |
| ctime | uint32 or uint64 | Creation time. Present if 0x0004 flag is set. Depending on 0x0001 flag can be in Unix time or Windows FILETIME format. |
| ctime | uint32 or uint64 | Last access time. Present if 0x0008 flag is set. Depending on 0x0001 flag can be in Unix time or Windows FILETIME format. |
This record is used in archives created with -ver switch.
| Size | vint | |
| Type | vint | 0x04 |
| Flags | vint | No file version flags are defined yet, so it is set to 0. |
| Version number | vint | File version number. |
| Size | vint | |
| Type | vint | 0x05 |
| Redirection type | vint |
0x0001 Unix symlink 0x0002 Windows symlink 0x0003 Windows junction 0x0004 Hard link 0x0005 File copy |
| Flags | vint |
0x0001 Link target is directory |
| Name length | vint | Length of link target name |
| Name | vint | Link target name in UTF-8 format without trailing zero |
| Size | vint | |
| Type | vint | 0x06 |
| Flags | vint |
0x0001 User name string is present 0x0002 Group name string is present 0x0004 Numeric user ID is present 0x0008 Numeric group ID is present |
| User name length | vint | Length of owner user name. Present if 0x0001 flag is set. |
| User name | ? bytes | Owner user name in native encoding. Not zero terminated. Present if 0x0001 flag is set. |
| Group name length | vint | Length of owner group name. Present if 0x0002 flag is set. |
| Group name | ? bytes | Owner group name in native encoding. Not zero terminated. Present if 0x0002 flag is set. |
| User ID | vint | Numeric owner user ID. Present if 0x0004 flag is set. |
| Group ID | vint | Numeric owner group ID. Present if 0x0008 flag is set. |
This record is used only by service headers to store additional parameters.
| Size | vint | |
| Type | vint | 0x07 |
| Data | ? bytes | Concrete contents of service data depends on service header type. |
End of archive marker. RAR does not read anything after this header letting to use third party tools to add extra information such as a digital signature to archive.
| Header CRC32 | uint32 | |
| Header size | vint | |
| Header type | vint | 5 |
| Header flags | vint | Flags common for all headers |
| End of archive flags | vint |
0x0001 Archive is volume and it is not last volume in the set |
RAR uses service headers based on the file header data structure to store different supplementary information.
Optional header storing the main archive comment. Contains CMT identifier in file name field. Placed before any file headers and after the main archive header. Comment data is stored in UTF-8 immediately after the archive comment header. Now RAR does not use compression for archive comments, so packed and unpacked data sizes in header are equal and they both define the comment data size. Compression method in header is set to 0.
Optional header storing the quick open record. Contains QO identifier in file name field. Placed after all file headers, but before the recovery record and end of archive header. It is possible to locate the quick open header with locator record in main archive header.
Quick open record data is stored immediately after the quick open header. RAR does not use compression for quick open data, so packed and unpacked data sizes in header are equal and they both define the quick open data size. Compression method in header is set to 0.
Quick open data is the array consisting of data cache structures. Every data cache structure stores a portion of archived data and has the following format:
| Field | Size | Description |
| Structure CRC32 | uint32 | CRC32 of structure data starting from Structure size field. |
| Structure size | vint | Size of structure data starting from Flags field. This field must not be longer than 3 bytes in current implementation, resulting in 2 MB maximum size. |
| Flags | vint | Currently set to 0. |
| Offset | vint | Offset from beginning of quick open header to beginning of archive data cached in current structure. We can use this value to calculate the absolute position of archived data stored the current structure. It is guaranteed that absolute archive positions referred by data cache structures are always growing when going from beginning of structure array to end. |
| Data size | vint | Size of archive data stored in the current structure. |
| Data | ? bytes | Archive data stored in the current structure. |
Normally RAR uses the quick open data to store copies of file and service headers. It can store either all headers or only a part of them. If required header is missing in quick open data or if structure CRC32 is invalid, data are read from its original archive position.
Using the quick open data is optional. You can skip it completely and read only standard archive headers. But it is important to use the same access pattern when reading file names to display them to user and to extract files. Otherwise it would be possible to see one file name and extract another in case the quick open data and real archive data are intentionally created different. It could introduce a security threat. So if you use the quick open data when displaying the archive contents, use it when extracting. If you do not use it when displaying the archive contents, do not use it when extracting.


Hey!
 So maybe you wanna give it a try? Sure!
Just click that little blue button down there and get started!
You probably came here because you were wondering how to use lolbot. In that case, it's easy!
Just say ^help and the bot will slip you a DM.
The prefix for all commands is ^ as well. (Example: ^cat brings up a cat)
TL;DR: ^help


{% extends "base.html" %} {% block content %}
Note: it may take up to 24 hours for administrator to approve the item.


CircularProgressGauge for Swift and SwiftUI
CircularProgressGauge uses SwiftUI to display a circular gauge showing the percent complete (0% to 100%) for a process. CircularProgressGauge is completely user styleable with control over the following elements:
- Gradient - Defines the color that will be used to fill the gauge.
- Track Color - The color for the empty part of the gauge.
- Font Color - The color for the percent completed text.
- Font Size - The size of the percent completed text.
Installation
Swift Package Manager (Xcode 11 and above)
- Select File > Swift Packages > Add Package Dependency… from the File menu.
- Paste
https://github.com/Appracatappra/CircularProgressGauge.git
in the dialog box. - Follow the Xcode’s instruction to complete the installation.
Why not CocoaPods, or Carthage, or blank?
Supporting multiple dependency managers makes maintaining a library exponentially more complicated and time consuming.
Since, the Swift Package Manager is integrated with Xcode 11 (and greater), it’s the easiest choice to support going further.
Using CircularProgressGauge
CircularProgressGauge is very easy to use inside a SwiftUI View
:
@State var progress = 0.5
var body: some View {
VStack {
// Progress is give as 0.0 to 1.0
CircularProgressGauge(progress: $progress)
.frame(width: 40.0, height: 40.0)
}
}
}
Would present the following gauge on iOS:


Before Change
def transform_non_affine(self, a):
with np.errstate(invalid="ignore"):
a = np.where(a <= 0, self._fill_value, a)
return np.divide(np.log(a, out=a), np.log(self.base), out=a)
class InvertedLogTransformBase(Transform):
input_dims = 1
After Change
def transform_non_affine(self, a):
with np.errstate(divide="ignore", invalid="ignore"):
out = np.log(a)
out /= np.log(self.base)
if self._clip:
// SVG spec says that conforming viewers must support values up
// to 3.4e38 (C float); however experiments suggest that Inkscape
// (which uses cairo for rendering) runs into cairo"s 24-bit limit
// (which is apparently shared by Agg).
// Ghostscript (used for pdf rendering appears to overflow even
// earlier, with the max value around 2 ** 15 for the tests to pass.
// On the other hand, in practice, we want to clip beyond
// np.log10(np.nextafter(0, 1)) ~ -323
// so 1000 seems safe.
out[a <= 0] = -1000
return out
class InvertedLogTransformBase(Transform):
input_dims = 1


| Modifier and Type | Field and Description |
|---|---|
private java.util.ArrayList<LinkedRoom> |
east |
static int |
EAST |
static java.lang.String |
EAST_STR |
private java.util.ArrayList<LinkedRoom> |
north |
static int |
NORTH |
static java.lang.String |
NORTH_STR |
private java.util.ArrayList<LinkedRoom> |
south |
static int |
SOUTH |
static java.lang.String |
SOUTH_STR |
private java.util.ArrayList<LinkedRoom> |
west |
static int |
WEST |
static java.lang.String |
WEST_STR |
| Constructor and Description |
|---|
Direction()
Class constructor
Instantiates the different lists
|
| Modifier and Type | Method and Description |
|---|---|
Direction |
add(int direction,
LinkedRoom room)
Add a room to a specific cardinal point
|
Direction |
addEast(LinkedRoom room)
Add a linked room to the east
|
Direction |
addNorth(LinkedRoom room)
Add a linked room to the north
|
Direction |
addSouth(LinkedRoom room)
Add a linked room to the south
|
Direction |
addWest(LinkedRoom room)
Add a linked room to the west
|
java.util.ArrayList<LinkedRoom> |
get(int direction)
Get a list of the linked rooms from the specific cardinal direction
|
static int |
getDirectionToInt(java.lang.String direction)
Returns a direction as a int based on its representation as a String
Note : we would have used an Enum which is proper if we had more time
instead of this dirty solution with integers and strings
|
java.util.ArrayList<LinkedRoom> |
getEast() |
java.util.ArrayList<LinkedRoom> |
getNorth() |
java.util.ArrayList<LinkedRoom> |
getSouth() |
java.util.ArrayList<LinkedRoom> |
getWest() |
Direction |
remove(int direction,
LinkedRoom room)
Remove a linked room from a specific cardinal direction
|
Direction |
removeEast(LinkedRoom room)
Remove a linked room from the east
|
Direction |
removeNorth(LinkedRoom room)
Remove a linked room from the north
|
Direction |
removeSouth(LinkedRoom room)
Remove a linked room from the south
|
Direction |
removeWest(LinkedRoom room)
Remove a linked room from the west
|
public static final int NORTH
public static final int SOUTH
public static final int WEST
public static final int EAST
public static final java.lang.String NORTH_STR
public static final java.lang.String SOUTH_STR
public static final java.lang.String WEST_STR
public static final java.lang.String EAST_STR
private final java.util.ArrayList<LinkedRoom> north
private final java.util.ArrayList<LinkedRoom> south
private final java.util.ArrayList<LinkedRoom> west
private final java.util.ArrayList<LinkedRoom> east
public static int getDirectionToInt(java.lang.String direction)
direction
- The direction as a Stringpublic Direction add(int direction, LinkedRoom room)
direction
- The cardinal direction where the linked room will be addedroom
- The linked room to addpublic Direction addNorth(LinkedRoom room)
room
- The linked room to addpublic Direction addSouth(LinkedRoom room)
room
- The linked room to addpublic Direction addWest(LinkedRoom room)
room
- The linked room to addpublic Direction addEast(LinkedRoom room)
room
- The linked room to addpublic Direction remove(int direction, LinkedRoom room)
direction
- The direction where the room should belongsroom
- The linked room to removepublic Direction removeNorth(LinkedRoom room)
room
- The linked room to removepublic Direction removeSouth(LinkedRoom room)
room
- The linked room to removepublic Direction removeWest(LinkedRoom room)
room
- The linked room to removepublic Direction removeEast(LinkedRoom room)
room
- The linked room to removepublic java.util.ArrayList<LinkedRoom> get(int direction)
room
- The roompublic java.util.ArrayList<LinkedRoom> getNorth()
public java.util.ArrayList<LinkedRoom> getSouth()
public java.util.ArrayList<LinkedRoom> getWest()
public java.util.ArrayList<LinkedRoom> getEast()


This game part of the classic games, please visit that page first for general information about these games.
| Actions | Agents | Manual Control | Action Shape | Action Values | Observation Shape | Observation Values | Num States |
|---|---|---|---|---|---|---|---|
| Discrete | 2 | No | Discrete(170) | Discrete(170) | (170, 170, 3) | [0, 1] | 3^(13^2), ~4.3 * 10^80 |
from pettingzoo.classic import go_v0
agents= ['black_0', 'white_0']
AEC Diagram
Go is a board game with 2 players, black and white. The black player starts by placing a black stone at an empty board intersection. The white player follows with the purpuse of surrounding more territory than the opponent or capturing the opponent’s stones. The game ends if both players sequentially decide to pass. Refer to Wikipedia for additional details about the game.
Our implementation is a wrapper for MiniGo.
Go takes two optional arguments that define the board size (int) and komi (float) compensation points. The default values for the board size and komi are 19 and 7.5, respectively.
g0_v0.env(board_size = 13, komi = 2.5)
g0_v0.env() # with default values
The observation shape is a function of the board size N and has a shape of (N, N, 3). The first plane, (:,:,0), represent the stones on the board for the current player while the second plane, (:,:,1), encodes the stones of the opponent. The third plane, (:,:,2), is all 1 if the current player is black_0
or all 0 if the player is white_0
. The state of the board is represented with the top left corner as (0, 0).
Similar to the observation space, the action space is dependent on the board size N.
| Action ID | Description |
|---|---|
| 0 ~ N-1 | Place a stone on the 1st row of the board.0 : (0,0), 1 : (0,1), …, N-1 : (0,N-1) |
| N ~ 2N-1 | Place a stone on the 2nd row of the board.N : (1,0), N+1 : (1,1), …, 2N-1 : (1,N-1) |
| … | … |
| N^2-N ~ N^2-1 | Place a stone on the Nth row of the board.N^2-N : (N-1,0), N^2-N+1 : (N-1,1), …, N^2-1 : (N-1,N-1) |
| N^2 | Pass |
For example, you would use action 4
to place a stone on the board at the (0,3) location or action N^2
to pass. The total action space is N^2+1.
| Winner | Loser |
|---|---|
| +1 | -1 |
The legal moves available for each agent, found in env.infos[agent]['legal_moves']
, are updated after each step. Taking an illegal move ends the game with a reward of -1 for the illegally moving agent and a reward of 0 for all other agents.


In comparison to the original Nintendo Switch, the Switch Lite is 30% lighter, and also takes up less space, making it more convenient to travel with.
The Switch Lite also boasts a better battery performance than the Switch, rated as being between 3-7 hours, whereas the original lasts for just 2.5 - 6.5 hours.
One of the best things about the Switch Lite is the price, as it is currently selling for £200. This is a significant drop in price from the original Switch's price tag of £280!


Teaching is better with a friend! Teach with Sunbird, the official MAA app for Sunbird’s school teachers.
Get 100s of online Courses For Free
Subscribe now and receive weekly newsletter with educational materials, new courses, interesting posts, popular books and much more!


Altoro Mutual today announced that their regulator has approved the company's acquisition plans. The company will be holding a special shareholders' meeting to vote on the transaction.
Assuming shareholder approval at that meeting, the transaction should close on December 1, 2006.


High school considers change to 'Redmen' and 'Redettes' nickname
by Remi MurreyMARQUETTE, Mich. (WLUC/Gray News) - Community members are questioning if the use of Marquette Senior High School's nicknames "Redmen" and "Redettes" is culturally insensitive.
"Really that the research is overwhelming, and that it is creating an adverse learning environment,” said Joe Lubig who is on a committee looking into the nickname.
Lubig said the community is justified in asking about the nicknames.
"Are they in conflict with what we do, who we are and what we need to do to create a positive learning environment?” he said.
In October, Lubig says the school board and Superintendent Bill Saunders asked the MSHS Nickname Research Committee to review the school's nickname.
At the time, several community members questioned whether or not those name are culturally insensitive or if they are a sense of pride for all students in the community.
"What the research is saying, in this instance, is that it's creating an adverse learning environment for every student because there's that tension and that conflict,” said Lubig.
Several years ago, the school was able to change its logo from a Native American headdress to the letter "M."
Some said this isn’t enough, and the nicknames need to change as well.
Lubig says the committee is trying to learn why the nickname is creating this environment and what the rationale would be.
This is why the committee is asking anyone with evidence to share.
"The more emotional pleas - we really encourage members of the public to go to a board meeting to express those concerns,” Lubig said.
The committee has until December 16 to make a recommendation for the use of those nicknames.
Copyright 2019 WLUC via Gray Media Group, Inc. All rights reserved.
Read the original version of this article at uppermichiganssource.com.


films of the decade
a list curated by wengel & her friends
Mid90s
Coming Of Age
The Grand Budapest Hotel
Comedy
Lamb
Family
Moonlight
Coming Of Age
The Farewell
Drama
Perks of Being a Wallflower
Romance
Inception
Sci-Fi
The Wind Rises
Animation
Parasite
Drama
Harry Potter and the Deathly Hallows – Part 2
Fantasy
Honeyland
Documentary
The Irishman
History
Kung Fu Panda 2
Action
Baby Driver
Thriller
Searching
Mystery
A Beautiful Day in the Neighborhood
Documentary
Okja
Drama
The Social Network
Drama
Her
Sci-Fi
Paddington
Family
Kings of Summer
Coming of Age
Once Upon a Time in Hollywood
Comedy
The Disaster Artist
Drama
Black Panther
Action
Booksmart
Coming of Age
American Factory
Documentary
Into the Spider-Verse
Animation
enjoy :)


Lorem Ipsum is simply dummy text of the printing and typesetting industry
Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
17::3:2009 -
Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type.
8::3:2009 -
Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type.
3::3:2009 -
Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type.


Fee structure for the conference -
Individual delegates - ₹1200
Delegations - ₹1200 registration fee + ₹1000 per delegate
(For example, if a delegation of ten persons wishes to attend the conference, then the fees will be ₹1200 + 10×1000 = ₹11200)
Payment for delegations should be made by a demand draft in favour of Delhi Public School Bangalore South. The Draft can be sent by post, can be submitted on the orientation day, or can be handed over on the first day of the MUN.
Individual delegates should pay by cash on the first day of the MUN.


Player information
Nickname: {{ info[0]["hz_player_name"] }}
Region: {{ info[0]["Region"] }}
Matches
Wins: {{ info[0]["Wins"] }}
Losses: {{ info[0]["Losses"] }}
Most played champions
{% if champions|count < 5 %} {% for champion in champions %}{{ champion["champion"] }}
Assists: {{ champion["Assists"] }}
Deaths: {{ champion["Deaths"] }}
Kills: {{ champion["Kills"] }}
Wins: {{ champion["Wins"] }}
Losses: {{ champion["Losses"] }}
Champion: {{ champions[index]["champion"] }}
Assists: {{ champions[index]["Assists"] }}
Deaths: {{ champions[index]["Deaths"] }}
Kills: {{ champions[index]["Kills"] }}
Wins: {{ champions[index]["Wins"] }}
Losses: {{ champions[index]["Losses"] }}


from the good-deals-on-cool-stuff dept
Daily Deal: The Learn Amazon Alexa Development Bundle
by Daily DealThe Learn Amazon Alexa Development Bundle has 10 courses to help you learn how to get the most out of Amazon Alexa and Google Assistant. You'll learn how to customize Alexa by integrating APIs and AWS, how to use Alexa with both Arduino and Raspberry Pi, how to integrate your Google Actions with the Firebase database, and much more. It's on sale for $25, and use the code BFSAVE15 for an additional 15% off.
Note: The Techdirt Deals Store is powered and curated by StackCommerce. A portion of all sales from Techdirt Deals helps support Techdirt. The products featured do not reflect endorsements by our editorial team.


This website is about akan people,The Akan are a meta-ethnicity living in the southern regions of present-day Ghana and Ivory Coast in West africa.
The Akan language is a group of dialects within the Central Tano branch of the Potou–Tano subfamily of the Niger–Congo family.
this project is about the names of their children representing the days of the week.
Akan people are believed to have migrated to their current location from the Sahara desert and Sahel regions of Africa
into the forest region around the 11th century. Many Akans tell their history as it started in the eastern region of Africa as this is
where the ethnogenesis of the Akan as we know them today happened.


--- layout: post title: Finally, Google Gurugram! date: 2019-02-24 23:36:05.000000000 +05:30 type: post parent_id: '0' published: true password: '' status: publish tags: [Daily Logs] meta: _publicize_job_id: '27982993091' timeline_notification: '1551031569' author: login: priyankasaggu119 email<EMAIL_ADDRESS>display_name: priyankasaggu119 first_name: '' last_name: '' permalink: "/2019/02/24/finally-google-gurugram/" ---
February 23, 2019
Today was a very special day for me. For any student like me, it's a great accomplishment to get a chance to be in Google's office and that too as a guest. Voila, I got the opportunity. :D
Thanks a lot to gdg_nd, WTM_nd, and finally Google, Gurugram. I won't stop myself, showing my heartiest gratitude to @Arpansac, @shilpa1994, @biswajeet_137, @tyagi_harshit24, and @rajpal_saurabh for such a great event.
The event was a gdg_nd's(Google Developers group-New Delhi) Web Developer Days 2.
And the agenda of the event was:
Though it was my very first event at gdg_nd, I learned tonnes from every hour I spend there, listening to great talks from awesome speakers/mentors and working on hands-on projects.
And why not to mention the goodies and stuff, when it comes to Technical events. Yup, I won a "Tensorflow" Pen Drive for finding out a website with the least performance score. :p The score was just "1". And also the Google Cloud Sticker. :)
Hoping for more events like this in the near future. Till then, o/.


aflatoxin maize contamination change °C climate data AFI {border-style food px;} #ffffff;} feed crop Europe scenario, used flavus grid model wheat Climate European Food production risk scenario areas mean mycotoxins phenology predicted present years AFLA-maize Italy aflatoxins daily increase paper probability px; using weather {font-family Europe, animal approach concern crops font-size future material point related scenarios, Aflatoxin Aspergillus Therefore, [], agricultural based chronic countries double; emerging expected high human input low maize, modelling prediction results sites threshold However, applied associated border-color border-width computed conditions considered control current details). exposure health highest impact legal limit mainly management predict predictive reported solid; study supplementary tool {font-style {font-weight (Commission (See AFI > AFLA-maize, Battilani Change Sci. acute area bold courier; downscaling em; especially flowering global great growing grown growth harvest limited local model, models new points possible predictions products pt;} revision; safety simulated temperature time years, μg


Happy Birthday to:
{% for birthday in site.data.birthday %}
{% assign date_birthday = birthday.birthday | date: '%j' %}
{% assign date_difference = date_birthday | minus: page_date %}
{% assign january_birthday = date_birthday | plus: date_birthday %}
{% if date_difference == 0 %}
-
{{ birthday.name }}, {{ birthday.birthday | date: '%-m/%-d' }}
{% endif %}
{% if date_difference > 0 and date_difference < 8 %}
-
{{ birthday.name }}, {{ birthday.birthday | date: '%-m/%-d' }}
{% endif %}
{% if january_birthday <= 14 and date_difference <= -352 %}
-
{{ birthday.name }}, {{ birthday.birthday | date: '%-m/%-d' }}
{% endif %}
{% endfor %}
Are we missing anyone?


Two Month Demo
Select Number of Days
1
2
3
4
5
6
7
8
9
10
11
12
Single Month Demo
Select Number of Days
1
2
3
4
5
6
7
8
9
10
11
12
loading calendar one...
loading calendar two...


16 anos
Daniel Piva
@sattrack/mkode
github.com/imdanielpiva |<EMAIL_ADDRESS>They just use JavaScript everywhere.
Progressive Web Applications.
Native APIs in the Web.
Checkout whatwebcando.today
Service Worker.
Keep your app running even if it's closed.
Vue JS
What does it try to solve?
Let's do some code.
NativeScript with Vue JS
Write native applications with JavaScript.
Write low level code in the web.


Lady Gaga to Star in Ridley Scott’s Upcoming Gucci Movie
The film will focus on the murder of Maurizio Gucci, the grandson of Guccio Gucci.
by Layla IlchiLady Gaga is stepping back in front of the camera.
The Oscar-winner will star in an upcoming film on the Gucci family dynasty, taking on the role of Patrizia Reggiani. Reggiani is the ex-wife of Maurizio Gucci, grandson of the Italian fashion house’s founder, Guccio Gucci. The film will be directed by Ridley Scott.
According to Variety, Reggiani gained notoriety in the Nineties when she was tried and convicted for hiring a hit man to kill her ex-husband, who was shot outside his Milan office. Gucci was the last of the family to run the fashion label, having resigned as chairman and selling his 50 percent stake in the company for $100 million two years prior, according to WWD’s 1995 obituary on Gucci.
Read More: Gucci Spring 2020 Fashion Review
Reggiani had served 16 years in prison for the murder and was released in 2016. In a 2014 interview with Italy’s La Repubblica, she stated it was her desire to work for Gucci once out of jail.
“I still feel like a Gucci, the most Gucci of all,” she said. Since being released from prison, she has reportedly worked as a jewelry design consultant in Italy.
Gaga’s role in the film is her first since starring in the 2018 film “A Star Is Born,” where she won an Academy Award for best original song for “Shallow” and was nominated for best actress.
More details on the upcoming film have yet to be revealed.
Read more on Lady Gaga here:
Lady Gaga Launches Haus Laboratories Makeup Line
Lady Gaga Fashion Exhibition Opens in Las Vegas
Lady Gaga Has Four Outfit Changes at Met Gala 2019
WATCH: The Most Memorable Met Gala 2019 Looks


An example of <load-lock>:
<load-lock>
Lock
Unlock
Try closing this tab/window while locked to see it in action.


InputProgress
This library provides a way to give feedback to the user regarding his progress on an exaustive form flow. A customizable progress bar can be added both to the selected UITextFields as well as on the view they are being presented.
Demo
Requirements
- iOS 8.0+
- Swift 3.2+
Instalation
The instalation can be made using CocoaPods. CocoaPods is a dependency manager for Cocoa projects. After installing CocoaPods, simply run the following command:
$ pod install InputProgress
Usage
Take a look at the Example application provided. It demonstrates all the features of this library.
License
InputProgress is available under the MIT license. See the LICENSE file for more info.


{% load i18n %}
{% trans "Request a refund at the PSP for" %} "{{effects.0.instance}}" {% if effects|length > 1 %} {% blocktrans with extra=effects|length|add:"-1" %} and {{ extra }} other donations {% endblocktrans %} {% endif %}
{% trans 'It will most likely take a couple of days for the PSP to handle the request, after which the donation will be marked as "refunded"' %}


--- title: "keys.deconstructed" caption: "/img/caption-keys.deconstructed.png" externalLink: "/labs/keys.deconstructed" date: 2019-12-31 ---
This toy app deconstructs and re-implements the generation of Bitcoin keys. This was inspired by keys.lol, with some extra features. With this you can:
Note that it has zero dependencies. No crypto libraries/packages involved. Everything was re-created from scratch and it fits in 500 lines of code. See for yourself.


Airship iOS SDK Migration Guide
Airship SDK 13.0 and 13.1 to 13.2
Airship SDK 13.2 is a minor update that makes a few non-breaking changes to the Message Center and Custom Event APIs.
Message Center Changes
The default Message Center view controllers have been overhauled to improve code quality and readability. Because this involves some changes to the public APIs, rather than replacing them outright, the following classes and protocols are marked deprecated as of SDK 13.2:
Deprecated
UAMessageCenterSplitViewController
UAMessageCenterListViewController
UAMessageCenterMessageViewController
UAMessageCenterMessageViewProtocol
Instead of the deprecated controller classes, migrated integrations should use the following:
Added
UADefaultMessageCenterSplitViewController
UADefaultMessageCenterListViewController
UADefaultMessageCenterMessageViewController
SDK 13.2 also adds new protocols to make it easier to create custom interfaces with these controllers. Objects can sign up as delegates for the default list view and message view controllers, in order to receive callbacks related to user message selections and message loading operations.
Added
UAMessageCenterListViewDelgate
UAMessageCenterMessageViewDelegate
Custom Event Changes
The type-specific property setters in the Custom Event API have been deprecated in favor of a single property on UACustomEvent
, named properties
.
This property takes an NSDictionary
mapping key strings to boolean, string, number, or string array values.
Deprecated
setBoolProperty:forKey:
setStringProperty:forKey:
setNumberProperty:forKey:
setStringArrayProperty:forKey:
Added
@property (nonatomic, copy) NSDictionary *properties


Emacs Library Reference
- ABBREV, Extended Abbreviation Support
- BUFF, One Line Buffer Listing
- CENTERLIN, Line Centering
- DABBREV, Dynamic Abbreviation Expansion
- DENT, Region Indentation
- EDTSIM, EDT Simulation
- ELECTRICC, A Mode for Writing C Programs
- FLASHER, Parenthesis Balancing
- GLOBDEL, Global Deletion Of Lines
- GOTO, Goto Line/Page/Percent
- HTML, HTML mode
- INCSEARCH, Incremental Searching
- KILLER, A Kill Ring System
- LATEXMODE, A Major Mode for writing LaTeX Documents
- MAKEBOX, Drawing Boxes Around Text
- MINIBUF, Writing and Executing Small MLisp Programs
- MINIBUF-RECALL, Command Recall in the Mini-buffer
- MOUSE, Workstation Mouse Support
- Using the MOUSE Library
- Enabling and Disabling Mouse Support
- Using Mouse Features
- Customising the MOUSE Library
- Mlisp Programming with the Mouse
- MOUSE-RECTANGULAR, Mouse Interface to the RECTANGULAR Library
- NEWCOMPIL, Compiling Programs
- NUMBER, Number Base Conversion
- PYTHON, Python mode
- RECTANGULAR, Rectangular Cut and Paste
- TAGS, An Indexing System
- TABS, Intelligent Tab Handling
- TIME, A Running Time Display
- WHEREIS, Where Is That Command?
- WHITE-SPACE-MINI-MODE, check for white space problems
- WRITEREG, Write Region to File


The 2020 NFL Draft in Las Vegas: A newcomer’s guide
by Christopher LawrenceWe could learn more Tuesday about the 2020 NFL Draft and Las Vegas’ plans to host it.
That’s great for fans who have been counting down the days since the city was awarded the marquee event back in December 2018. But what about everyone else? Those of you who typically have other plans on Sundays (and Mondays, Thursdays and certain Saturdays)? Those of you who keep looking for an actual red-colored zone on the field?
Get a little more familiar with the process, and have some of your questions answered, with this NFL Draft guide for newbies:
So what’s this draft thing?
Once a year, representatives of all 32 NFL teams gather in the host city to stock their rosters from a pool of eligible players at least three years removed from high school football. Barring trades — and there will be trades — the teams pick in reverse order of finish.
Wait, so the teams pick? Why can’t the players just play wherever they want?
Because somebody has to play in Cleveland.
If it’s just the teams announcing the players they want, what’s that take? Thirty? Forty-five minutes?
Hahahahahahaha. Hoo boy! No. Not even close. The draft is made up of seven rounds spread over three days. Next year, it’s scheduled for April 23 to 25. The whole thing takes about 14 hours.

The 2019 draft attracted more than 600,000 fans in Nashville, Tennessee, and was watched by more than 47.5 million television viewers.
Is this the first time the draft will be in Las Vegas?
Kind of. Since 2017, the Raiders have made their Day Three picks from their soon- to-be home of Las Vegas. Last year, the site was Allegiant Stadium. Before that, it was Nellis Air Force Base and the Welcome to Fabulous Las Vegas sign.
Since it’s going to be in Las Vegas, are they going to have Penn &Teller or somebody make the draftees appear out of thin air? You know, to make things more interesting?
We can only hope.
So only the best football players are drafted, right?
Not necessarily. Baseball Hall of Famer Dave Winfield was drafted by the Vikings in 1973 despite not having played college football. (He also was drafted by the NBA’s Atlanta Hawks and the ABA’s Utah Stars.) In 2018, the Eagles selected Australian rugby league player Jordan Mailata, who’d never played a down of American football.
But at least they’re very athletic.
The Falcons once drafted John Wayne.
Sure, but didn’t he play college football?
This was in 1972. The Duke was 64 years old.
Oh.
Yeah.

Usually, but not always. Bo Jackson said he’d never play for Tampa Bay, but that didn’t deter the Buccaneers from taking him No. 1 in 1986. He sat out that season and played baseball for the Kansas City Royals organization before being taken by the Raiders the following year with the 183rd pick. In 1983, top pick John Elway also threatened to play baseball rather than play for the Colts, who selected him. Within a week, he’d engineered his trade to the Broncos. In 1936, Jay Berwanger, the league’s first-ever draft selection, declined to play football entirely because of the low pay and began selling foam rubber instead.
Do all the best players get drafted?
Well, no. Some always fall through the cracks. Immediately after the draft, undrafted free agents can sign with any team. Then there’s quarterback Kurt Warner. The Hall of Famer, Super Bowl MVP and two-time league MVP went undrafted coming out of the University of Northern Iowa in 1994. He stocked shelves at an Iowa grocery store and played in the Arena Football League before finally getting a shot with the Rams in 1999.
What about kickers? Surely the league just assigns them to teams.
Nope. In 1966, Princeton kicker Charlie Gogolak was drafted sixth overall by the Redskins. In 2000, the Raiders chose Sebastian Janikowski with the 17th pick — 182 selections before the Patriots took a chance on a kid named Tom Brady.
I feel bad for whoever gets picked last. It brings up bad memories of gym class.
Don’t. The final pick is bestowed the moniker “Mr. Irrelevant” and feted during a weeklong celebration that includes a tour of Disneyland, numerous media opportunities, a regatta and a charity gala.
Couldn’t I just watch that Kevin Costner movie “Draft Day” to learn about the draft?
Please don’t. That movie is preposterous.


Homenet Discovery
Find out about devices connected to your local network
Looking for devices
Run Again


realtimeweb.weatherservice.domain
Class Weather
Object
realtimeweb.weatherservice.domain.Weather
public class Weather
- extends Object
A structured representation the current weather.
|
Constructor Summary |
Weather(Map<String,Object> raw)
Internal constructor to create a Weather from a json representation. |
| Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Weather
public Weather(Map<String,Object> raw)
- Internal constructor to create a Weather from a json representation.
- Parameters:
map
- The raw json data that will be parsed.
getWindSpeed
public Integer getWindSpeed()
- Returns:
- The current wind speed (in miles-per-hour).
setWindSpeed
public void setWindSpeed(Integer windSpeed)
- Parameters:
The
- current wind speed (in miles-per-hour).
getWindchill
public Integer getWindchill()
- Returns:
- The perceived temperature (in Fahrenheit).
setWindchill
public void setWindchill(Integer windchill)
- Parameters:
The
- perceived temperature (in Fahrenheit).
getDewpoint
public Integer getDewpoint()
- Returns:
- The current dewpoint temperature (in Fahrenheit).
setDewpoint
public void setDewpoint(Integer dewpoint)
- Parameters:
The
- current dewpoint temperature (in Fahrenheit).
getImageUrl
public String getImageUrl()
- Returns:
- A url pointing to a picture that describes the weather.
setImageUrl
public void setImageUrl(String imageUrl)
- Parameters:
A
- url pointing to a picture that describes the weather.
getWindDirection
public Integer getWindDirection()
- Returns:
- The current wind direction (in degrees).
setWindDirection
public void setWindDirection(Integer windDirection)
- Parameters:
The
- current wind direction (in degrees).
getVisibility
public Double getVisibility()
- Returns:
- How far you can see (in miles).
setVisibility
public void setVisibility(Double visibility)
- Parameters:
How
- far you can see (in miles).
getHumidity
public Integer getHumidity()
- Returns:
- The current relative humidity (as a percentage).
setHumidity
public void setHumidity(Integer humidity)
- Parameters:
The
- current relative humidity (as a percentage).
getPressure
public Double getPressure()
- Returns:
- The barometric pressure (in inches).
setPressure
public void setPressure(Double pressure)
- Parameters:
The
- barometric pressure (in inches).
getTemp
public Integer getTemp()
- Returns:
- The current temperature (in Fahrenheit).
setTemp
public void setTemp(Integer temp)
- Parameters:
The
- current temperature (in Fahrenheit).
getDescription
public String getDescription()
- Returns:
- A human-readable description of the current weather.
setDescription
public void setDescription(String description)
- Parameters:
A
- human-readable description of the current weather.
toString
public String toString()
- Creates a string based representation of this Weather.
- Overrides:
toString
in class Object
- Returns:
- String


I did a lot of variations to reach something that delays the making of the moves, but shows them. I did not f ind a solution that worked, and I think this is due to the nature of the one thread in Javascript working ...
If anyone has a solution to that (which works), I will gladly add this to the example.


---
layout: page
title : Investors
header : Investors
tagline : disruptUBER
group: navigation
---
{% include JB/setup %}
Differentiation
- Cooperative ownership attracts drivers with equity
- Flat rates attracts passengers with stability
Aggression
- Exploit vulnerabilies in surge based systems
Patience
- Autonomous vehicles are years off, transportation networks still require drivers
- RightRides is the only tranportation network providing drivers with equity, representation, and a living wage


San Jose de Ampid Parish Church
Gen. Luna St. Ampid 1, San Mateo | Rizal, PHL 1850 | Tel: 2971109
Toggle navigation
San Jose de Ampid Parish
HOME
HISTORY
CHURCH
RECORDS
RESERVATIONS
Record Retrieval Page
Baptismal Records
Communion Records
Confirmation Records


Your home address is set at LS2 4GH
3
OA Knee - Chapel Allerton Hospital
Chapel Allerton Hospital, Chapeltown Road, Leeds, West Yorkshire, LS7 4SA
7 Miles from LS2 4GH
Your home address is set at LS2 4GH
Chapel Allerton Hospital, Chapeltown Road, Leeds, West Yorkshire, LS7 4SA
7 Miles from LS2 4GH


The Adapter Pattern (sometimes called the wrapper pattern) allows objects satisfying one interface to be used where another type of interface is expected. There are two typical flavours of the pattern: the delegation flavour and the inheritance flavour.
1. Delegation Example
Suppose we have the following classes:
class SquarePeg {
def width
}
class RoundPeg {
def radius
}
class RoundHole {
def radius
def pegFits(peg) {
peg.radius <= radius
}
String toString() { "RoundHole with radius $radius" }
}
We can ask the RoundHole
class if a RoundPeg
fits in it, but if we ask the same question for a SquarePeg
, then it will fail because the SquarePeg
class doesn’t have a radius
property (i.e. doesn’t satisfy the required interface).
To get around this problem, we can create an adapter to make it appear to have the correct interface. It would look like this:
class SquarePegAdapter {
def peg
def getRadius() {
Math.sqrt(((peg.width / 2) ** 2) * 2)
}
String toString() {
"SquarePegAdapter with peg width $peg.width (and notional radius $radius)"
}
}
We can use the adapter like this:
def hole = new RoundHole(radius: 4.0)
(4..7).each { w ->
def peg = new SquarePegAdapter(peg: new SquarePeg(width: w))
if (hole.pegFits(peg)) {
println "peg $peg fits in hole $hole"
} else {
println "peg $peg does not fit in hole $hole"
}
}
Which results in the following output:
peg SquarePegAdapter with peg width 4 (and notional radius 2.8284271247461903) fits in hole RoundHole with radius 4.0 peg SquarePegAdapter with peg width 5 (and notional radius 3.5355339059327378) fits in hole RoundHole with radius 4.0 peg SquarePegAdapter with peg width 6 (and notional radius 4.242640687119285) does not fit in hole RoundHole with radius 4.0 peg SquarePegAdapter with peg width 7 (and notional radius 4.949747468305833) does not fit in hole RoundHole with radius 4.0
2. Inheritance Example
Let’s consider the same example again using inheritance. First, here are the original classes (unchanged):
class SquarePeg {
def width
}
class RoundPeg {
def radius
}
class RoundHole {
def radius
def pegFits(peg) {
peg.radius <= radius
}
String toString() { "RoundHole with radius $radius" }
}
An adapter using inheritance:
class SquarePegAdapter extends SquarePeg {
def getRadius() {
Math.sqrt(((width / 2) ** 2) * 2)
}
String toString() {
"SquarePegAdapter with width $width (and notional radius $radius)"
}
}
Using the adapter:
def hole = new RoundHole(radius: 4.0)
(4..7).each { w ->
def peg = new SquarePegAdapter(peg: new SquarePeg(width: w))
if (hole.pegFits(peg)) {
println "peg $peg fits in hole $hole"
} else {
println "peg $peg does not fit in hole $hole"
}
}
The output:
peg SquarePegAdapter with width 4 (and notional radius 2.8284271247461903) fits in hole RoundHole with radius 4.0 peg SquarePegAdapter with width 5 (and notional radius 3.5355339059327378) fits in hole RoundHole with radius 4.0 peg SquarePegAdapter with width 6 (and notional radius 4.242640687119285) does not fit in hole RoundHole with radius 4.0 peg SquarePegAdapter with width 7 (and notional radius 4.949747468305833) does not fit in hole RoundHole with radius 4.0
3. Adapting using Closures
As a variation of the previous examples, we could instead define the following interface:
interface RoundThing {
def getRadius()
}
We can then define an adapter as a closure as follows:
def adapter = {
p -> [getRadius: { Math.sqrt(((p.width / 2) ** 2) * 2) }] as RoundThing
}
And use it like this:
def peg = new SquarePeg(width: 4)
if (hole.pegFits(adapter(peg))) {
// ... as before
}
4. Adapting using the ExpandoMetaClass
As of Groovy 1.1, there is a built-in MetaClass which can automatically add properties and methods dynamically.
Here is how the example would work using that feature:
def peg = new SquarePeg(width: 4)
peg.metaClass.radius = Math.sqrt(((peg.width / 2) ** 2) * 2)
After you create a peg object, you can simply add a property to it on the fly. No need to change the original class and no need for an adapter class.


First convened in 1789, the composition and powers of the Senate are established in Article One of the U.S. Constitution. Each state is represented by two senators, regardless of population, who serve staggered six-year terms. The Senate has several exclusive powers not granted to the House, including consenting to treaties as a precondition to their ratification and consenting to or confirming appointments of Cabinet secretaries, federal judges, other federal executive officials, military officers, regulatory officials, ambassadors, and other federal uniformed officers, as well as trial of federal officials impeached by the House.
| Members | First name | Middle name | Last name | Party | Total votes |
|---|---|---|---|---|---|
| 1 | Lamar | Alexander | R | 657 | |
| 2 | Kelly | null | Ayotte | R | 657 |
| 3 | Roy | Blunt | R | 657 | |
| 4 | Barbara | null | Boxer | D | 657 |
| 5 | Sherrod | Brown | D | 657 | |
| 6 | Richard | M. | Burr | R | 657 |
| 7 | Tammy | null | Baldwin | D | 657 |


eurostatDb.js
Test: fetching all DSDs, checking for dimensions
Requests...
started finished (ok) no time dimension time dimension not at end error
Errors
Analysis of dimensions, concerning TIME_PERIOD dimension
OK: at end
No time dimension
Time dimension not at end of dimension array
Analysis of dimensions that are not in concepts list
Analysis of concepts that are not in dimensions list
Analysis of concepts that are also dimensions (i.e., intersection)


|
Kieker 1.12 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Thread kieker.monitoring.writer.AbstractAsyncThread
public abstract class AbstractAsyncThread
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary | |
|---|---|
protected IMonitoringController |
monitoringController
The monitoring controller for the current monitoring session. |
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
AbstractAsyncThread(IMonitoringController monitoringController,
java.util.concurrent.BlockingQueue<IMonitoringRecord> writeQueue)
Creates a new instance of this class using the given parameters. |
| Method Summary | |
|---|---|
protected abstract void |
cleanup()
Inheriting classes should implement this method to do some cleanup work like, for example, closing open connections. |
protected abstract void |
consume(IMonitoringRecord monitoringRecord)
Inheriting classes should implement this method to consume the given record by, for example, sending it to a JMS client or by writing it to the file sysytem. |
void |
initShutdown(java.util.concurrent.CountDownLatch cdl)
Initializes the shutdown of this thread if necessary. |
boolean |
isFinished()
Can be used to determine whether the thread is in the finished state or not. |
void |
run()
|
java.lang.String |
toString()
Returns a human-readable information string about the writer's configuration and state. |
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, yield |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final IMonitoringController monitoringController
| Constructor Detail |
|---|
public AbstractAsyncThread(IMonitoringController monitoringController, java.util.concurrent.BlockingQueue<IMonitoringRecord> writeQueue)
monitoringController
- The monitoring controller for the current monitoring session.writeQueue
- The queue containing the records (and the potential end of monitoring
marker).| Method Detail |
|---|
public final void initShutdown(java.util.concurrent.CountDownLatch cdl)
cdl
- The latch which will be count down once the thread has been terminated.public final boolean isFinished()
public final void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public java.lang.String toString()
toString
in class java.lang.Thread
protected abstract void consume(IMonitoringRecord monitoringRecord) throws java.lang.Exception
monitoringRecord
- The record to consume.
java.lang.Exception
- Indicates that something went wrong during the consumption.protected abstract void cleanup()
|
Kieker 1.12 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


Introduction
The chart is equipped with interactive features that allow users to modify the data display in real-time by clicking the legend entry to hide/show series.
When series.pointSelection is set to true, users can select one or more data points of that series. The chart can
then return the info on the selected points programmatically.
Visual States
Interactive elements such as points, labels, buttons, and legend entries include state properties that control the visual appearance of those
objects in certain states. For example when a mouse hovers a data point, its color may change.
Tutorials.states : Visual states tutorial.
Events
Events provide a way to execute code when specific interactions occur with the chart, or during certain stages of the chart rendering process. The
click event is used as an example below to demonstrate the API ease of use.
Intro with Click Event as example
JSCharting has some convenient API features built in to improve working with events. The traditional way to setup say a point click event looks like:
Points:[
{
/*...*/
events:{
click: function(e){
// event code
alert(this.name);
}
},
statesHover:{
cursor:'poiner'
},{/*...*/}
]
However, a string can be used in place of a function to achieve the same result. Note that with strings, tokens such as '%name' can be used instead of
object properties like 'this.name'. The advantage to using strings is that is makes it much faster to implement simple cases and reduces the amount of code
necessary to achieve similar goals and will suffice for most scenarios while using functions is still available if necessary.
Points:[
{
/*...*/
events:{
click: 'Javascript:alert("%name");'
},
statesHoverCursor:'poiner'
},
{/*...*/}
]
Another simplification of this feature is to use the point URL property. This wraps the click event and cursor management automatically. The final and
easiest approach can be:
Points:[
{
/*...*/
url: 'alert("%name");'
},
{/*...*/}
]
Event API
Please see the following event API references:
Types.chart.events: Chart related events |
Types.point.events: Data point related events |
Types.series.events: Data series related events |
Get Selected Points
Samples.GetSelectedData : Demonstrates how to use let users select points and gather this information programmatically.
Tasks.Interactivity