text:
Q: Will Azure find my RoleEntryPoint implementation class if that's the direct class it derives from? Let's say I have:
public abstract ServiceBase : RoleEntryPoint {
  ...
}

public MyRealService : RoleEntryPoint {
  ...
}

Will my Azure WorkerRole project be able to correctly figure out MyRealService class as the WorkerRole entry point?

This used to be working well for me but now that I've updated to Azure Tooling 2.0 it doesn't hit any breakpoint so I'm not even sure what entry point class it is loading.

A: Problem solved. It basically had to do with some references pointing to the old 1.8.0.0 DLL and some to the 2.0.0.0.
So following the example above:

*

*ServiceBase: was defined in a different project that was depending on 1.8.0.0.

*MyRealService: was defined in the top-level project that depends on 2.0.0.0.

So since the base class inheriting from RoleEntryPoint was from an older version of Microsoft.WindowsAzure.ServiceRuntime, MyRealService class was never found despite the actual C# project depending on version 2.0.0.0 of Microsoft.WindowsAzure.ServiceRuntime.
Thanks so much to the answer in this thread:
Azure WorkerRole Stopping Immediately After Starting


text:
Q: Merging data - Error in fix.by(by.x, x) I am trying to merge data in R as suggested in an answer to my other post here. Yet, I have an error.
First let me explain what I try to do. I have 100 files (each have x_i and y_i), I want to merge them in this way:
from:
x1; y1  ; x2 ; y2
1 ; 100 ; 1  ; 150
4 ; 90  ; 2  ; 85
7 ; 85  ; 10 ; 60
10; 80  ;

to
x1; y1  ; x2 ; y2
1 ; 100 ; 1  ; 150
2 ; 100 ; 2  ; 85
4 ; 90  ; 4  ; 85
7 ; 85  ; 7  ; 85
10; 80  ;10 ; 60

The simple script works fine on the toy example:
xx <- read.table(text='x1; y1  ; x2 ; y2
1 ; 100 ; 1  ; 150
4 ; 90  ; 2  ; 85
7 ; 85  ; 10 ; 60
10; 80  ;',sep=';',fill=TRUE,header=TRUE)

dm <- merge(xx[,1:2],xx[,3:4],by=1,all=T)
dm <- dm[!is.na(dm$x1),]
dm$y1 <- zoo::na.locf(dm$y1)
dm$y2 <- zoo::na.locf(dm$y2)
dm
  x1  y1  y2
1  1 100 150
2  2 100  85
3  4  90  85
4  7  85  85
5 10  80  60

Now as for my real data. I modified the script to look like this but I get an error:
library(zoo)

data    1    = read.table("rundata  1", sep= " ", col.names=c("tm   1","score   1","current 1"))
data    2    = read.table("rundata  2", sep= " ", col.names=c("tm   2","score   2","current 2"))
data    3    = read.table("rundata  3", sep= " ", col.names=c("tm   3","score   3","current 3"))
data    4    = read.table("rundata  4", sep= " ", col.names=c("tm   4","score   4","current 4"))
data    5    = read.table("rundata  5", sep= " ", col.names=c("tm   5","score   5","current 5"))
data    6    = read.table("rundata  6", sep= " ", col.names=c("tm   6","score   6","current 6"))
data    7    = read.table("rundata  7", sep= " ", col.names=c("tm   7","score   7","current 7"))
data    8    = read.table("rundata  8", sep= " ", col.names=c("tm   8","score   8","current 8"))
data    9    = read.table("rundata  9", sep= " ", col.names=c("tm   9","score   9","current 9"))
data    10   = read.table("rundata  10", sep= " ", col.names=c("tm  10","score  10","current    10"))
data    11   = read.table("rundata  11", sep= " ", col.names=c("tm  11","score  11","current    11"))
data    12   = read.table("rundata  12", sep= " ", col.names=c("tm  12","score  12","current    12"))
data    13   = read.table("rundata  13", sep= " ", col.names=c("tm  13","score  13","current    13"))
data    14   = read.table("rundata  14", sep= " ", col.names=c("tm  14","score  14","current    14"))
data    15   = read.table("rundata  15", sep= " ", col.names=c("tm  15","score  15","current    15"))
data    16   = read.table("rundata  16", sep= " ", col.names=c("tm  16","score  16","current    16"))
data    17   = read.table("rundata  17", sep= " ", col.names=c("tm  17","score  17","current    17"))
data    18   = read.table("rundata  18", sep= " ", col.names=c("tm  18","score  18","current    18"))
data    19   = read.table("rundata  19", sep= " ", col.names=c("tm  19","score  19","current    19"))
data    20   = read.table("rundata  20", sep= " ", col.names=c("tm  20","score  20","current    20"))
data    21   = read.table("rundata  21", sep= " ", col.names=c("tm  21","score  21","current    21"))
data    22   = read.table("rundata  22", sep= " ", col.names=c("tm  22","score  22","current    22"))
data    23   = read.table("rundata  23", sep= " ", col.names=c("tm  23","score  23","current    23"))
data    24   = read.table("rundata  24", sep= " ", col.names=c("tm  24","score  24","current    24"))
data    25   = read.table("rundata  25", sep= " ", col.names=c("tm  25","score  25","current    25"))
data    26   = read.table("rundata  26", sep= " ", col.names=c("tm  26","score  26","current    26"))
data    27   = read.table("rundata  27", sep= " ", col.names=c("tm  27","score  27","current    27"))
data    28   = read.table("rundata  28", sep= " ", col.names=c("tm  28","score  28","current    28"))
data    29   = read.table("rundata  29", sep= " ", col.names=c("tm  29","score  29","current    29"))
data    30   = read.table("rundata  30", sep= " ", col.names=c("tm  30","score  30","current    30"))
data    31   = read.table("rundata  31", sep= " ", col.names=c("tm  31","score  31","current    31"))
data    32   = read.table("rundata  32", sep= " ", col.names=c("tm  32","score  32","current    32"))
data    33   = read.table("rundata  33", sep= " ", col.names=c("tm  33","score  33","current    33"))
data    34   = read.table("rundata  34", sep= " ", col.names=c("tm  34","score  34","current    34"))
data    35   = read.table("rundata  35", sep= " ", col.names=c("tm  35","score  35","current    35"))
data    36   = read.table("rundata  36", sep= " ", col.names=c("tm  36","score  36","current    36"))
data    37   = read.table("rundata  37", sep= " ", col.names=c("tm  37","score  37","current    37"))
data    38   = read.table("rundata  38", sep= " ", col.names=c("tm  38","score  38","current    38"))
data    39   = read.table("rundata  39", sep= " ", col.names=c("tm  39","score  39","current    39"))
data    40   = read.table("rundata  40", sep= " ", col.names=c("tm  40","score  40","current    40"))
data    41   = read.table("rundata  41", sep= " ", col.names=c("tm  41","score  41","current    41"))
data    42   = read.table("rundata  42", sep= " ", col.names=c("tm  42","score  42","current    42"))
data    43   = read.table("rundata  43", sep= " ", col.names=c("tm  43","score  43","current    43"))
data    44   = read.table("rundata  44", sep= " ", col.names=c("tm  44","score  44","current    44"))
data    45   = read.table("rundata  45", sep= " ", col.names=c("tm  45","score  45","current    45"))
data    46   = read.table("rundata  46", sep= " ", col.names=c("tm  46","score  46","current    46"))
data    47   = read.table("rundata  47", sep= " ", col.names=c("tm  47","score  47","current    47"))
data    48   = read.table("rundata  48", sep= " ", col.names=c("tm  48","score  48","current    48"))
data    49   = read.table("rundata  49", sep= " ", col.names=c("tm  49","score  49","current    49"))
data    50   = read.table("rundata  50", sep= " ", col.names=c("tm  50","score  50","current    50"))
data    51   = read.table("rundata  51", sep= " ", col.names=c("tm  51","score  51","current    51"))
data    52   = read.table("rundata  52", sep= " ", col.names=c("tm  52","score  52","current    52"))
data    53   = read.table("rundata  53", sep= " ", col.names=c("tm  53","score  53","current    53"))
data    54   = read.table("rundata  54", sep= " ", col.names=c("tm  54","score  54","current    54"))
data    55   = read.table("rundata  55", sep= " ", col.names=c("tm  55","score  55","current    55"))
data    56   = read.table("rundata  56", sep= " ", col.names=c("tm  56","score  56","current    56"))
data    57   = read.table("rundata  57", sep= " ", col.names=c("tm  57","score  57","current    57"))
data    58   = read.table("rundata  58", sep= " ", col.names=c("tm  58","score  58","current    58"))
data    59   = read.table("rundata  59", sep= " ", col.names=c("tm  59","score  59","current    59"))
data    60   = read.table("rundata  60", sep= " ", col.names=c("tm  60","score  60","current    60"))
data    61   = read.table("rundata  61", sep= " ", col.names=c("tm  61","score  61","current    61"))
data    62   = read.table("rundata  62", sep= " ", col.names=c("tm  62","score  62","current    62"))
data    63   = read.table("rundata  63", sep= " ", col.names=c("tm  63","score  63","current    63"))
data    64   = read.table("rundata  64", sep= " ", col.names=c("tm  64","score  64","current    64"))
data    65   = read.table("rundata  65", sep= " ", col.names=c("tm  65","score  65","current    65"))
data    66   = read.table("rundata  66", sep= " ", col.names=c("tm  66","score  66","current    66"))
data    67   = read.table("rundata  67", sep= " ", col.names=c("tm  67","score  67","current    67"))
data    68   = read.table("rundata  68", sep= " ", col.names=c("tm  68","score  68","current    68"))
data    69   = read.table("rundata  69", sep= " ", col.names=c("tm  69","score  69","current    69"))
data    70   = read.table("rundata  70", sep= " ", col.names=c("tm  70","score  70","current    70"))
data    71   = read.table("rundata  71", sep= " ", col.names=c("tm  71","score  71","current    71"))
data    72   = read.table("rundata  72", sep= " ", col.names=c("tm  72","score  72","current    72"))
data    73   = read.table("rundata  73", sep= " ", col.names=c("tm  73","score  73","current    73"))
data    74   = read.table("rundata  74", sep= " ", col.names=c("tm  74","score  74","current    74"))
data    75   = read.table("rundata  75", sep= " ", col.names=c("tm  75","score  75","current    75"))
data    76   = read.table("rundata  76", sep= " ", col.names=c("tm  76","score  76","current    76"))
data    77   = read.table("rundata  77", sep= " ", col.names=c("tm  77","score  77","current    77"))
data    78   = read.table("rundata  78", sep= " ", col.names=c("tm  78","score  78","current    78"))
data    79   = read.table("rundata  79", sep= " ", col.names=c("tm  79","score  79","current    79"))
data    80   = read.table("rundata  80", sep= " ", col.names=c("tm  80","score  80","current    80"))
data    81   = read.table("rundata  81", sep= " ", col.names=c("tm  81","score  81","current    81"))
data    82   = read.table("rundata  82", sep= " ", col.names=c("tm  82","score  82","current    82"))
data    83   = read.table("rundata  83", sep= " ", col.names=c("tm  83","score  83","current    83"))
data    84   = read.table("rundata  84", sep= " ", col.names=c("tm  84","score  84","current    84"))
data    85   = read.table("rundata  85", sep= " ", col.names=c("tm  85","score  85","current    85"))
data    86   = read.table("rundata  86", sep= " ", col.names=c("tm  86","score  86","current    86"))
data    87   = read.table("rundata  87", sep= " ", col.names=c("tm  87","score  87","current    87"))
data    88   = read.table("rundata  88", sep= " ", col.names=c("tm  88","score  88","current    88"))
data    89   = read.table("rundata  89", sep= " ", col.names=c("tm  89","score  89","current    89"))
data    90   = read.table("rundata  90", sep= " ", col.names=c("tm  90","score  90","current    90"))
data    91   = read.table("rundata  91", sep= " ", col.names=c("tm  91","score  91","current    91"))
data    92   = read.table("rundata  92", sep= " ", col.names=c("tm  92","score  92","current    92"))
data    93   = read.table("rundata  93", sep= " ", col.names=c("tm  93","score  93","current    93"))
data    94   = read.table("rundata  94", sep= " ", col.names=c("tm  94","score  94","current    94"))
data    95   = read.table("rundata  95", sep= " ", col.names=c("tm  95","score  95","current    95"))
data    96   = read.table("rundata  96", sep= " ", col.names=c("tm  96","score  96","current    96"))
data    97   = read.table("rundata  97", sep= " ", col.names=c("tm  97","score  97","current    97"))
data    98   = read.table("rundata  98", sep= " ", col.names=c("tm  98","score  98","current    98"))
data    99   = read.table("rundata  99", sep= " ", col.names=c("tm  99","score  99","current    99"))
data    100  = read.table("rundata  100", sep= " ", col.names=c("tm 100","score 100","current   100"))

-> works fine
newdata<- merge(
data1   [,1:2],
data2   [,1:2],
data3   [,1:2],
data4   [,1:2],
data5   [,1:2],
data6   [,1:2],
data7   [,1:2],
data8   [,1:2],
data9   [,1:2],
data10  [,1:2],
data11  [,1:2],
data12  [,1:2],
data13  [,1:2],
data14  [,1:2],
data15  [,1:2],
data16  [,1:2],
data17  [,1:2],
data18  [,1:2],
data19  [,1:2],
data20  [,1:2],
data21  [,1:2],
data22  [,1:2],
data23  [,1:2],
data24  [,1:2],
data25  [,1:2],
data26  [,1:2],
data27  [,1:2],
data28  [,1:2],
data29  [,1:2],
data30  [,1:2],
data31  [,1:2],
data32  [,1:2],
data33  [,1:2],
data34  [,1:2],
data35  [,1:2],
data36  [,1:2],
data37  [,1:2],
data38  [,1:2],
data39  [,1:2],
data40  [,1:2],
data41  [,1:2],
data42  [,1:2],
data43  [,1:2],
data44  [,1:2],
data45  [,1:2],
data46  [,1:2],
data47  [,1:2],
data48  [,1:2],
data49  [,1:2],
data50  [,1:2],
data51  [,1:2],
data52  [,1:2],
data53  [,1:2],
data54  [,1:2],
data55  [,1:2],
data56  [,1:2],
data57  [,1:2],
data58  [,1:2],
data59  [,1:2],
data60  [,1:2],
data61  [,1:2],
data62  [,1:2],
data63  [,1:2],
data64  [,1:2],
data65  [,1:2],
data66  [,1:2],
data67  [,1:2],
data68  [,1:2],
data69  [,1:2],
data70  [,1:2],
data71  [,1:2],
data72  [,1:2],
data73  [,1:2],
data74  [,1:2],
data75  [,1:2],
data76  [,1:2],
data77  [,1:2],
data78  [,1:2],
data79  [,1:2],
data80  [,1:2],
data81  [,1:2],
data82  [,1:2],
data83  [,1:2],
data84  [,1:2],
data85  [,1:2],
data86  [,1:2],
data87  [,1:2],
data88  [,1:2],
data89  [,1:2],
data90  [,1:2],
data91  [,1:2],
data92  [,1:2],
data93  [,1:2],
data94  [,1:2],
data95  [,1:2],
data96  [,1:2],
data97  [,1:2],
data98  [,1:2],
data99  [,1:2],
data100 [,1:2],
by=1,all=T)

-> gives an error:
Error in fix.by(by.x, x) :
  'by' must specify one or more columns as numbers, names or logical

I don't understand this error, since I do indicate 1 no?
Rest of the script (remains to be tested on 100 inputs after I fix the first error)
newdata <- newdata[!is.na(newdata$tm1   ),]
newdata <- newdata[!is.na(newdata$tm2   ),]
newdata <- newdata[!is.na(newdata$tm3   ),]
newdata <- newdata[!is.na(newdata$tm4   ),]
newdata <- newdata[!is.na(newdata$tm5   ),]
newdata <- newdata[!is.na(newdata$tm6   ),]
newdata <- newdata[!is.na(newdata$tm7   ),]
newdata <- newdata[!is.na(newdata$tm8   ),]
newdata <- newdata[!is.na(newdata$tm9   ),]
newdata <- newdata[!is.na(newdata$tm10  ),]
newdata <- newdata[!is.na(newdata$tm11  ),]
newdata <- newdata[!is.na(newdata$tm12  ),]
newdata <- newdata[!is.na(newdata$tm13  ),]
newdata <- newdata[!is.na(newdata$tm14  ),]
newdata <- newdata[!is.na(newdata$tm15  ),]
newdata <- newdata[!is.na(newdata$tm16  ),]
newdata <- newdata[!is.na(newdata$tm17  ),]
newdata <- newdata[!is.na(newdata$tm18  ),]
newdata <- newdata[!is.na(newdata$tm19  ),]
newdata <- newdata[!is.na(newdata$tm20  ),]
newdata <- newdata[!is.na(newdata$tm21  ),]
newdata <- newdata[!is.na(newdata$tm22  ),]
newdata <- newdata[!is.na(newdata$tm23  ),]
newdata <- newdata[!is.na(newdata$tm24  ),]
newdata <- newdata[!is.na(newdata$tm25  ),]
newdata <- newdata[!is.na(newdata$tm26  ),]
newdata <- newdata[!is.na(newdata$tm27  ),]
newdata <- newdata[!is.na(newdata$tm28  ),]
newdata <- newdata[!is.na(newdata$tm29  ),]
newdata <- newdata[!is.na(newdata$tm30  ),]
newdata <- newdata[!is.na(newdata$tm31  ),]
newdata <- newdata[!is.na(newdata$tm32  ),]
newdata <- newdata[!is.na(newdata$tm33  ),]
newdata <- newdata[!is.na(newdata$tm34  ),]
newdata <- newdata[!is.na(newdata$tm35  ),]
newdata <- newdata[!is.na(newdata$tm36  ),]
newdata <- newdata[!is.na(newdata$tm37  ),]
newdata <- newdata[!is.na(newdata$tm38  ),]
newdata <- newdata[!is.na(newdata$tm39  ),]
newdata <- newdata[!is.na(newdata$tm40  ),]
newdata <- newdata[!is.na(newdata$tm41  ),]
newdata <- newdata[!is.na(newdata$tm42  ),]
newdata <- newdata[!is.na(newdata$tm43  ),]
newdata <- newdata[!is.na(newdata$tm44  ),]
newdata <- newdata[!is.na(newdata$tm45  ),]
newdata <- newdata[!is.na(newdata$tm46  ),]
newdata <- newdata[!is.na(newdata$tm47  ),]
newdata <- newdata[!is.na(newdata$tm48  ),]
newdata <- newdata[!is.na(newdata$tm49  ),]
newdata <- newdata[!is.na(newdata$tm50  ),]
newdata <- newdata[!is.na(newdata$tm51  ),]
newdata <- newdata[!is.na(newdata$tm52  ),]
newdata <- newdata[!is.na(newdata$tm53  ),]
newdata <- newdata[!is.na(newdata$tm54  ),]
newdata <- newdata[!is.na(newdata$tm55  ),]
newdata <- newdata[!is.na(newdata$tm56  ),]
newdata <- newdata[!is.na(newdata$tm57  ),]
newdata <- newdata[!is.na(newdata$tm58  ),]
newdata <- newdata[!is.na(newdata$tm59  ),]
newdata <- newdata[!is.na(newdata$tm60  ),]
newdata <- newdata[!is.na(newdata$tm61  ),]
newdata <- newdata[!is.na(newdata$tm62  ),]
newdata <- newdata[!is.na(newdata$tm63  ),]
newdata <- newdata[!is.na(newdata$tm64  ),]
newdata <- newdata[!is.na(newdata$tm65  ),]
newdata <- newdata[!is.na(newdata$tm66  ),]
newdata <- newdata[!is.na(newdata$tm67  ),]
newdata <- newdata[!is.na(newdata$tm68  ),]
newdata <- newdata[!is.na(newdata$tm69  ),]
newdata <- newdata[!is.na(newdata$tm70  ),]
newdata <- newdata[!is.na(newdata$tm71  ),]
newdata <- newdata[!is.na(newdata$tm72  ),]
newdata <- newdata[!is.na(newdata$tm73  ),]
newdata <- newdata[!is.na(newdata$tm74  ),]
newdata <- newdata[!is.na(newdata$tm75  ),]
newdata <- newdata[!is.na(newdata$tm76  ),]
newdata <- newdata[!is.na(newdata$tm77  ),]
newdata <- newdata[!is.na(newdata$tm78  ),]
newdata <- newdata[!is.na(newdata$tm79  ),]
newdata <- newdata[!is.na(newdata$tm80  ),]
newdata <- newdata[!is.na(newdata$tm81  ),]
newdata <- newdata[!is.na(newdata$tm82  ),]
newdata <- newdata[!is.na(newdata$tm83  ),]
newdata <- newdata[!is.na(newdata$tm84  ),]
newdata <- newdata[!is.na(newdata$tm85  ),]
newdata <- newdata[!is.na(newdata$tm86  ),]
newdata <- newdata[!is.na(newdata$tm87  ),]
newdata <- newdata[!is.na(newdata$tm88  ),]
newdata <- newdata[!is.na(newdata$tm89  ),]
newdata <- newdata[!is.na(newdata$tm90  ),]
newdata <- newdata[!is.na(newdata$tm91  ),]
newdata <- newdata[!is.na(newdata$tm92  ),]
newdata <- newdata[!is.na(newdata$tm93  ),]
newdata <- newdata[!is.na(newdata$tm94  ),]
newdata <- newdata[!is.na(newdata$tm95  ),]
newdata <- newdata[!is.na(newdata$tm96  ),]
newdata <- newdata[!is.na(newdata$tm97  ),]
newdata <- newdata[!is.na(newdata$tm98  ),]
newdata <- newdata[!is.na(newdata$tm99  ),]
newdata <- newdata[!is.na(newdata$tm100 ),]

newdata$score1   <- zoo::na.locf(newdata$score1 )
newdata$score2   <- zoo::na.locf(newdata$score2 )
newdata$score3   <- zoo::na.locf(newdata$score3 )
newdata$score4   <- zoo::na.locf(newdata$score4 )
newdata$score5   <- zoo::na.locf(newdata$score5 )
newdata$score6   <- zoo::na.locf(newdata$score6 )
newdata$score7   <- zoo::na.locf(newdata$score7 )
newdata$score8   <- zoo::na.locf(newdata$score8 )
newdata$score9   <- zoo::na.locf(newdata$score9 )
newdata$score10  <- zoo::na.locf(newdata$score10    )
newdata$score11  <- zoo::na.locf(newdata$score11    )
newdata$score12  <- zoo::na.locf(newdata$score12    )
newdata$score13  <- zoo::na.locf(newdata$score13    )
newdata$score14  <- zoo::na.locf(newdata$score14    )
newdata$score15  <- zoo::na.locf(newdata$score15    )
newdata$score16  <- zoo::na.locf(newdata$score16    )
newdata$score17  <- zoo::na.locf(newdata$score17    )
newdata$score18  <- zoo::na.locf(newdata$score18    )
newdata$score19  <- zoo::na.locf(newdata$score19    )
newdata$score20  <- zoo::na.locf(newdata$score20    )
newdata$score21  <- zoo::na.locf(newdata$score21    )
newdata$score22  <- zoo::na.locf(newdata$score22    )
newdata$score23  <- zoo::na.locf(newdata$score23    )
newdata$score24  <- zoo::na.locf(newdata$score24    )
newdata$score25  <- zoo::na.locf(newdata$score25    )
newdata$score26  <- zoo::na.locf(newdata$score26    )
newdata$score27  <- zoo::na.locf(newdata$score27    )
newdata$score28  <- zoo::na.locf(newdata$score28    )
newdata$score29  <- zoo::na.locf(newdata$score29    )
newdata$score30  <- zoo::na.locf(newdata$score30    )
newdata$score31  <- zoo::na.locf(newdata$score31    )
newdata$score32  <- zoo::na.locf(newdata$score32    )
newdata$score33  <- zoo::na.locf(newdata$score33    )
newdata$score34  <- zoo::na.locf(newdata$score34    )
newdata$score35  <- zoo::na.locf(newdata$score35    )
newdata$score36  <- zoo::na.locf(newdata$score36    )
newdata$score37  <- zoo::na.locf(newdata$score37    )
newdata$score38  <- zoo::na.locf(newdata$score38    )
newdata$score39  <- zoo::na.locf(newdata$score39    )
newdata$score40  <- zoo::na.locf(newdata$score40    )
newdata$score41  <- zoo::na.locf(newdata$score41    )
newdata$score42  <- zoo::na.locf(newdata$score42    )
newdata$score43  <- zoo::na.locf(newdata$score43    )
newdata$score44  <- zoo::na.locf(newdata$score44    )
newdata$score45  <- zoo::na.locf(newdata$score45    )
newdata$score46  <- zoo::na.locf(newdata$score46    )
newdata$score47  <- zoo::na.locf(newdata$score47    )
newdata$score48  <- zoo::na.locf(newdata$score48    )
newdata$score49  <- zoo::na.locf(newdata$score49    )
newdata$score50  <- zoo::na.locf(newdata$score50    )
newdata$score51  <- zoo::na.locf(newdata$score51    )
newdata$score52  <- zoo::na.locf(newdata$score52    )
newdata$score53  <- zoo::na.locf(newdata$score53    )
newdata$score54  <- zoo::na.locf(newdata$score54    )
newdata$score55  <- zoo::na.locf(newdata$score55    )
newdata$score56  <- zoo::na.locf(newdata$score56    )
newdata$score57  <- zoo::na.locf(newdata$score57    )
newdata$score58  <- zoo::na.locf(newdata$score58    )
newdata$score59  <- zoo::na.locf(newdata$score59    )
newdata$score60  <- zoo::na.locf(newdata$score60    )
newdata$score61  <- zoo::na.locf(newdata$score61    )
newdata$score62  <- zoo::na.locf(newdata$score62    )
newdata$score63  <- zoo::na.locf(newdata$score63    )
newdata$score64  <- zoo::na.locf(newdata$score64    )
newdata$score65  <- zoo::na.locf(newdata$score65    )
newdata$score66  <- zoo::na.locf(newdata$score66    )
newdata$score67  <- zoo::na.locf(newdata$score67    )
newdata$score68  <- zoo::na.locf(newdata$score68    )
newdata$score69  <- zoo::na.locf(newdata$score69    )
newdata$score70  <- zoo::na.locf(newdata$score70    )
newdata$score71  <- zoo::na.locf(newdata$score71    )
newdata$score72  <- zoo::na.locf(newdata$score72    )
newdata$score73  <- zoo::na.locf(newdata$score73    )
newdata$score74  <- zoo::na.locf(newdata$score74    )
newdata$score75  <- zoo::na.locf(newdata$score75    )
newdata$score76  <- zoo::na.locf(newdata$score76    )
newdata$score77  <- zoo::na.locf(newdata$score77    )
newdata$score78  <- zoo::na.locf(newdata$score78    )
newdata$score79  <- zoo::na.locf(newdata$score79    )
newdata$score80  <- zoo::na.locf(newdata$score80    )
newdata$score81  <- zoo::na.locf(newdata$score81    )
newdata$score82  <- zoo::na.locf(newdata$score82    )
newdata$score83  <- zoo::na.locf(newdata$score83    )
newdata$score84  <- zoo::na.locf(newdata$score84    )
newdata$score85  <- zoo::na.locf(newdata$score85    )
newdata$score86  <- zoo::na.locf(newdata$score86    )
newdata$score87  <- zoo::na.locf(newdata$score87    )
newdata$score88  <- zoo::na.locf(newdata$score88    )
newdata$score89  <- zoo::na.locf(newdata$score89    )
newdata$score90  <- zoo::na.locf(newdata$score90    )
newdata$score91  <- zoo::na.locf(newdata$score91    )
newdata$score92  <- zoo::na.locf(newdata$score92    )
newdata$score93  <- zoo::na.locf(newdata$score93    )
newdata$score94  <- zoo::na.locf(newdata$score94    )
newdata$score95  <- zoo::na.locf(newdata$score95    )
newdata$score96  <- zoo::na.locf(newdata$score96    )
newdata$score97  <- zoo::na.locf(newdata$score97    )
newdata$score98  <- zoo::na.locf(newdata$score98    )
newdata$score99  <- zoo::na.locf(newdata$score99    )
newdata$score100     <- zoo::na.locf(newdata$score100   )

write.table(newdata, "outputR")

I would be grateful if anybody could help me fix the "by=1" error. Here are my datafiles. You might also notice I am not used to using loops in R, so I just copied everything 100 times, probably not the easiest way.
--UPDATE
Oh, I am actually thinking this is because merge only accepts two arguments, so I should use:
newdata<- merge(data1[,1:2],data2[,1:2],by=1,all=TRUE)
newdata<- merge(newdata[,1:3],data3[,1:2],by=1,all=TRUE)

for each of the elements...

A: Google returns this as the first listing for the R error, Error in fix.by(by.x, x) and I found it interesting no answer attempted a loop solution of the OP's very long command listing.
For future readers needing to merge many dataframes, consider binding individual dataframes into a list with lapply(), run any needed calculations, and then run a Reduce(..., merge) to merge all files of list into one wide dataframe. Below processes and merges all 100 files of original posting:
library(zoo)

dfList <- lapply(c(1:100), function(i) {
   df <- read.table(paste0("rundata  ", i), sep= " ", col.names=c("tm","score","current"))
   df <- df[!is.na(df$tm),]
   df$score <- zoo::na.locf(df$score)
   colnames(df) <- paste0(colnames(df), i)
   return(df)
})

newdata <- Reduce(function(...) merge(..., by=1, all=T), dfList)

write.table(newdata, "outputR")

A: The merge argument only takes two values as input, so you have to do them separately:
newdata<- merge(data1[,1:2],data2[,1:2],by=1,all=TRUE)
newdata<- merge(newdata [,1:3   ],data3 [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:4   ],data4 [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:5   ],data5 [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:6   ],data6 [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:7   ],data7 [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:8   ],data8 [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:9   ],data9 [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:10  ],data10    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:11  ],data11    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:12  ],data12    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:13  ],data13    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:14  ],data14    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:15  ],data15    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:16  ],data16    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:17  ],data17    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:18  ],data18    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:19  ],data19    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:20  ],data20    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:21  ],data21    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:22  ],data22    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:23  ],data23    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:24  ],data24    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:25  ],data25    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:26  ],data26    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:27  ],data27    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:28  ],data28    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:29  ],data29    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:30  ],data30    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:31  ],data31    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:32  ],data32    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:33  ],data33    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:34  ],data34    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:35  ],data35    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:36  ],data36    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:37  ],data37    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:38  ],data38    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:39  ],data39    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:40  ],data40    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:41  ],data41    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:42  ],data42    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:43  ],data43    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:44  ],data44    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:45  ],data45    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:46  ],data46    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:47  ],data47    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:48  ],data48    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:49  ],data49    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:50  ],data50    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:51  ],data51    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:52  ],data52    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:53  ],data53    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:54  ],data54    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:55  ],data55    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:56  ],data56    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:57  ],data57    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:58  ],data58    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:59  ],data59    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:60  ],data60    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:61  ],data61    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:62  ],data62    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:63  ],data63    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:64  ],data64    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:65  ],data65    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:66  ],data66    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:67  ],data67    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:68  ],data68    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:69  ],data69    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:70  ],data70    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:71  ],data71    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:72  ],data72    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:73  ],data73    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:74  ],data74    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:75  ],data75    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:76  ],data76    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:77  ],data77    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:78  ],data78    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:79  ],data79    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:80  ],data80    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:81  ],data81    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:82  ],data82    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:83  ],data83    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:84  ],data84    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:85  ],data85    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:86  ],data86    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:87  ],data87    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:88  ],data88    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:89  ],data89    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:90  ],data90    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:91  ],data91    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:92  ],data92    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:93  ],data93    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:94  ],data94    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:95  ],data95    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:96  ],data96    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:97  ],data97    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:98  ],data98    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:99  ],data99    [,1:2],by=1,all=TRUE        )
newdata<- merge(newdata [,1:100 ],data100   [,1:2],by=1,all=TRUE        )

redpajama_set_name: RedPajamaStackExchange


text:
Q: Using temporary object by non-const reference within a single statement in C++ Here is the code:
namespace NS
{
    class B
    {
    public:
        template<typename T> friend B& operator<<(B& b, T const& obj);
    };

    template<typename T> B& operator<<(B& b, T const& obj)
    {
        // using b and obj
        return b;
    }
}

int main()
{
    NS::B() << 2.71 << 123 << "abcdef"; // doesn't compile in gcc
    NS::B b; b << 2.71 << 123 << "abcdef"; // OK
}

The first line in main compiles in VS2015 (and some earlier ones) and doesn't compile in gcc (I tried in 6.3, 4.3.2).
Which compiler does the right thing?
I thought the temporary object's (NS::B()) lifetime would be up to the end of the statement (;), so it's ok to pass it to my operator<< by non-const reference.
If it isn't so, could you tell me why?
Thanks.

A: The standard says that temporary objects may not be converted to non-const lvalue references implicitly.  See [dcl.init.ref]/8.6.3.5.2 in n4628.

Otherwise, the reference shall be an lvalue reference to a non-volatile const type (i.e., cv1 shall be
  const), or the reference shall be an rvalue reference. [ Example:
double& rd2 = 2.0; // error: not an lvalue and reference not const
int i = 2;
double& rd3 = i; // error: type mismatch and reference not const

— end example ]

To solve this:
template<class T>
T& as_lvalue(T&&t){return t;}

This function takes an rvalue t and returns an lvalue reference.
as_lvalue(NS::B()) << 2.71 << 123 << "abcdef";

The above is both standard compliant and safe.


text:
Q: Java application requires Admin Access to run when placed in Program Files I am working on a Java (JavaFX) desktop app. I am converting it to exe with launch4j tool and then later creating a setup package using Inno Setup Compiler (default installation path set to C:\Program Files (x86))
The application itself don't need any admin privileges and runs fine when I copy the exe on desktop or run it on drives other than C. (Also works fine if I run it in local appdata folder)
But I need to place it in Program Files (x86) directory.
The app doesn't open if I install it in that directory so I had to create a manifest file for launch4j so that it asks admin access each time it opens. It works fine that way but admin access is asked everytime in this case.
I need to make this application run without asking admin access each time.
If there is any solution, please guide me through it.
Any help will be appreciated.

A: Ok so I kind of figured that out. I guess the jar was having trouble reading from system directories and I had to do some read/write operations on a config file. So I changed the config path to:
String path = Controller.class.getProtectionDomain().getCodeSource().getLocation().getPath() + "\\Data\\";

Now it creates a folder named "Data" inside jar file and read/write from there. I don't know if this is a bad practice or not but it seems to work pretty good for me.
Thanks a lot to @user31601 who gave me some hint that helped me figure this solution out.


text:
Q: How to prove logical equivalence: ((R OR P) -> (R OR Q)) <-> (NOT R -> (P -> Q))? I've tried making the antecedent and the conclusion implications on the LHS expression, and I've tried making the implication into an OR but I'm stumped as to how to derive logical equivalence from the LHS expression.
Original Expression: $$((R \vee P) \Rightarrow (R \vee Q)) \Leftrightarrow (R \Rightarrow (P \Rightarrow q))$$
Attempt One:
$$(R \vee P) \Rightarrow (R \vee Q)$$
$$ (\neg R \Rightarrow P) \Rightarrow (\neg R \Rightarrow Q)  $$
Then I'm stuck.
I've also tried:
$$(R \vee P) \Rightarrow (R \vee Q)$$
$$ \neg(R \vee P) \vee (R \vee Q) $$
$$ (\neg R \wedge \neg P) \vee (Q \vee R )$$
$$ (\neg R \Rightarrow P) \vee (\neg R \Rightarrow Q )$$
And stuck again

A: $(R \lor P) \to (R \lor Q)\\
 \lnot (R \lor P) \lor (R \lor Q)\\
 (\lnot R \land\lnot P) \lor (R \lor Q)\\
 ((\lnot R \land \lnot P) \lor R) \lor Q\\
 ((\lnot R \lor R) \land (\lnot P \lor R)) \lor Q\\
 (\top \land (\lnot P \lor R)) \lor Q\\
 (\lnot P \lor R) \lor Q\\
 R \lor (\lnot P \lor Q)\\
 R \lor (P \to Q)\\
 \lnot \lnot R \lor (P \to Q)\\
 \lnot R \to (P \to Q)$
How I thought through this problem was essentially I saw that there were two R's in one side of the statement and only one in another, so they must cancel out at some point. So I worked towards only getting one R and then did some cleanup

A: LHS:
$(R \lor P) \rightarrow (R \lor Q) = \neg (R \lor P) \lor (R \lor Q)= (\neg R \land \neg P) \lor R \lor Q = ((\neg R \lor R) \land (\neg P \lor R) \lor Q= (\top \land (\neg P \lor R)) \lor Q = (\neg P \lor R) \lor Q= \neg P \lor R \lor Q$
RHS:
$\neg R \rightarrow (P \rightarrow Q) = \neg \neg R \lor (\neg P \lor Q) = R \lor \neg P \lor Q= \neg P \lor R \lor Q$


text:
Q: Does the qstr struct in a kernel dentry hold the filename of a Linux file? Below is a snippet of the Linux dentry struct from http://lxr.free-electrons.com/source/include/linux/dcache.h#L150. The struct contains a member struct qstr d_name - definition below. I would like to know if this is the name of the particular file that would correspond to this dentry at runtime. What confuses me is that proc/PID/maps uses struct dentry_operations -> d_name (another member of dentry) to generate the file name...so then waht is the purpose of struct qstr d_name? Please note, I am approaching this from a pure memory introspection point of view (libvmi) and thus I will be "walking memory" for these structures and retrieval using C/C++ code is not so straightforward.
 struct dentry {

     /* RCU lookup touched fields */
     unsigned int d_flags;           /* protected by d_lock */
     seqcount_t d_seq;               /* per dentry seqlock */
     struct hlist_bl_node d_hash;    /* lookup hash list */
     struct dentry *d_parent;        /* parent directory */
     struct qstr d_name;

              ....

struct qstr {
     union {
             struct {
                      HASH_LEN_DECLARE;
             };
              u64 hash_len;
      };
     const unsigned char *name;
};

A: Dentry's field d_name is a simple (and mostly used) way for maintain naming of the dentry. In that case filesystem driver needs to specify name of the dentry once, all other work will be done by VFS.
But in some case statically assigned name is not sufficient for filesystems. As you note, this is case for proc filesystem, which exhibits per-process information into the user space. For such cases method ->d_op->d_dname exists.
Implementation of d_path method may help in understanding of d_name and d_op->d_dname:
...
if (path->dentry->d_op && path->dentry->d_op->d_dname &&
    (!IS_ROOT(path->dentry) || path->dentry != path->mnt->mnt_root))
        return path->dentry->d_op->d_dname(path->dentry, buf, buflen);
rcu_read_lock();
get_fs_root_rcu(current->fs, &root);
error = path_with_deleted(path, &root, &res, &buflen);
rcu_read_unlock();
...

As you can see, d_op->d_dname method's field is checked first. If it is not NULL, then the method is used. Otherwise d_name field is read.


text:
Q: Changing a CSS Class using Javascript If / Then I am looking for help making an Image Carousel work that only uses HTML, CSS, and Javascript. I was able to get it to function rather well;however, it does not display the 1st image on load.
Script is provided below:
HTML:

      <img class="original-image" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOEAAADhCAMAAAAJbSJIAAAAPFBMVEX8AgT8AAD9oKD9o6P9qqr9tLT9vr39vLv+3t79mpv9nJz//v7+8/L95uX92dj90dH9ysn9rq79p6f9rKwROItaAAABX0lEQVR4nO3dO1LDUBAFUVm25A8fG3v/e8UBCSRQZP10zg46nqm608vr2/v1dlvX9bg8Hb7c99/M/7f/1f1x+N3H8hfrT8fTtOzGdn4WTiPbzQrrnoUHhW0K+xT2KexT2LeJwsfwhffhC/cK2xT2KexT2KewT2Gfwj6FfQr7FPYp7FPYp7BPYZ/CPoV9myicFbYp7FPYp7BPYZ/CPoV9CvsU9insU9insE9hn8I+hX0K+xT2KexT2KewbxMfQwrjFPYp7FPYp7BPYZ/CPoV9CvsU9insU9insE9hn8I+hX0K+xT2KexT2LeJnZnxt4IUxinsU9insE9hn8I+hX0K+xT2KexT2KewT2Gfwj6FfQr7FPZt4o6/KGxT2KewT2Gfwj6FfQr7FPYp7FPYp7BPYZ/CPoV9CvsU9insU9i3icJVYZvCPoV9CvsU9insU9insG8Thcfd2C7T6TyP7HL9BHu1DksiYTASAAAAAElFTkSuQmCCg" style="width:100%">

1 / 4

    <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOEAAADhCAMAAAAJbSJIAAAAPFBMVEX8AgT8AAD9oKD9o6P9qqr9tLT9vr39vLv+3t79mpv9nJz//v7+8/L95uX92dj90dH9ysn9rq79p6f9rKwROItaAAABX0lEQVR4nO3dO1LDUBAFUVm25A8fG3v/e8UBCSRQZP10zg46nqm608vr2/v1dlvX9bg8Hb7c99/M/7f/1f1x+N3H8hfrT8fTtOzGdn4WTiPbzQrrnoUHhW0K+xT2KexT2LeJwsfwhffhC/cK2xT2KexT2KewT2Gfwj6FfQr7FPYp7FPYp7BPYZ/CPoV9myicFbYp7FPYp7BPYZ/CPoV9CvsU9insU9insE9hn8I+hX0K+xT2KexT2KewbxMfQwrjFPYp7FPYp7BPYZ/CPoV9CvsU9insU9insE9hn8I+hX0K+xT2KexT2LeJnZnxt4IUxinsU9insE9hn8I+hX0K+xT2KexT2KewT2Gfwj6FfQr7FPZt4o6/KGxT2KewT2Gfwj6FfQr7FPYp7FPYp7BPYZ/CPoV9CvsU9insU9i3icJVYZvCPoV9CvsU9insU9insG8Thcfd2C7T6TyP7HL9BHu1DksiYTASAAAAAElFTkSuQmCC" style="width:100%">

Caption Text

2 / 4

Caption Two

3 / 4

    <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOEAAADhCAMAAAAJbSJIAAAAP1BMVEUEggQAfQCgw6Cqz6oAewCjyKO01bS9273e7d4AeQAAdQCbwJv+//7y9/Ll8eXY6tjR5tHJ4smu0q4AcQDQ4dBHeLN8AAABbElEQVR4nO3dSUoDARRF0UpX6ewS3f9azUAEcWAIhHiq7lnBu/MPf3h6fnl9O522F+PF6svmp+XtNn9aXeM8XmP7y24Y3/f7/frb4r9a3+ZwHMb1MGWL5QwKz5MvXC0ePeKuKvRV6KvQV6GvQl+FvkvhpkJbhb4KfRX6KvRV6KvQV6GvQl+Fvgp9Ffoq9FXoq9BXoW8WhcsKbRX6KvRV6KvQV6GvQl+Fvgp9Ffoq9FXoq9BXoa9CX4W+Cn0V+ir0VeibxcVQhbgKfRX6KvRV6KvQV6GvQl+Fvgp9Ffoq9FXoq9BXoa9CX4W+Cn0V+ir0zeILS4W4Cn0V+ir0Veir0Fehr0Jfhb4KfRX6KvRV6KvQV6GvQl+FvlkUnidfOK4fPeKuKvRV6KvQV6GvQl+Fvgp9Ffoq9FXoq9BXoa9CX4W+Cn0V+ir0Vei7FG4rtFXoq9BXoa9CX4W+Cn0V+uZReFhM2f447I7LKTt+fAID6BDSZpXAFwAAAABJRU5ErkJggg==" style="width:100%">

Caption Three

4 / 4

Caption Four

  ❮
  ❯

CSS:

.original-image {
   z-index: 66 !important;
    display: block;
    position:  absolute;
    }

.original-image-gone {
    display: none !important;
    }

* {box-sizing:border-box}

.slideshow-container {
  max-width: 280px;
  position: relative;
  margin: auto;
  width: 100%;
  min-height:  274px;
  max-height:  274px;
}

.mySlides {
  display: none;
}

.prev, .next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  margin-top: -22px;
  padding: 16px;
  color: white;
  font-weight: bold;
  font-size: 18px;
  transition: 0.6s ease;
  border-radius: 0 3px 3px 0;
  user-select: none;
  display: none;
}

.next {
  right: 0;
  border-radius: 3px 0 0 3px;
  display: none;
}

.prev:hover, .next:hover {
  background-color: rgba(0,0,0,0.8);
  display: none;
}

.text {
  color: #f2f2f2;
  font-size: 15px;
  padding: 8px 12px;
  position: absolute;
  bottom: 8px;
  width: 100%;
  text-align: center;
}

.numbertext {
  color: #f2f2f2;
  font-size: 12px;
  padding: 8px 12px;
  position: absolute;
  top: 0;
}

.dot {
  cursor: pointer;
  height: 15px;
  width: 15px;
  margin: 0 16px;
  background-color: #bbb;
  border-radius: 50%;
  display: inline-block;
  transition: background-color 0.6s ease;
}

.active, .dot:hover {
  background-color: #717171;
}

.fade {
  animation-name: fade;
  animation-duration: 1.5s;
}

@keyframes fade {
  from {opacity: .4}
  to {opacity: 1}
}

Javascript:

I was hoping the initial slide would load, and so I added a "original image" static image above the slideshow, with the idea of changing its class on click, so it disappears. You can see this with "original-image" and then "original-image-gone"

A: The way to add a class with JavaScript is just:
document.getElementById("Demo").classList.add("Demo-Class");
The way to remove a class with JavaScript is:
document.getElementById("Demo").classList.remove("Demo-Class");
You could use those like this:

let demo = document.getElementById("demo");

function demoFunction() {
  if (demo.classList.contains("Blue-Background")) {
    demo.classList.remove("Blue-Background");
    demo.classList.add("Pink-Background");
  }
  else {
    demo.classList.remove("Pink-Background");
    demo.classList.add("Blue-Background");
  }
}
.Blue-Background {
  background-color: blue;
  color: pink;
}

.Pink-Background {
  background-color: pink;
  color: blue;
}
<!DOCTYPE html>

Hello!

      <button onclick="demoFunction()">Change Paragraph.</button>

I'm not sure if this helps but it might.


text:
Q: Use ufw to block users from accessing my server via a specific vpn The last couple of days I've been having some weird small DDoS attacks on different VPS's I have online.
The first one I detected using netstat and I noticed a bunch of IPs that were from a different region (resulting in Singapore) so I used ufw deny from x.y.0.0/16 to block the entire subnet as it was varying on the last 2 numbers. That worked.
Now today I am having the same issue on a completely different VPS just that this time besides the IP there are also some addresses that say for example miami-1.octovpn.net (that's a real value in this case). I blocked the IP range in that case, but I am not sure how to block a wildcard domain from accessing the site using ufw.
I thought of something like:
ufw deny from *.octovpn.net

But the command returned ERROR: Bad source address.
Any ideas?

A: You have not been under attack from us, however if you look at the packets you received it was SYN_RECV. These packets can easily be spoofed.
You are being used as the reflector to attack us, not other way around.
There is no true way to stop this once you are being used as a reflector, due to how TCP works. What you can do is block our ranges - however, the attackers will still use you as a reflector to attack other services.
You can read more about it here: https://octovpn.com/tcpamp
We had to make this page as we saw a huge number of increase of attacks that were originating from "TCP-AMP" where remote TCP Services are being used as reflectors. Server administrators thought we are attacking them, but it's the opposite.

A: Maybe
nslookup miami-1.octovpn.net

giving

Name:   miami-1.octovpn.net
  Address: 45.77.95.134

With this address, do a
whois 45.77.95.134

which results in

NetRange:       45.76.0.0 - 45.77.255.255
  CIDR:           45.76.0.0/15

Now you can use the familiar
ufw deny from 45.76.0.0/15

The risk you run, is blocking more than necessary, because the owner of this IP range is not octovpn.net

Update: I missed the second part of the whois answer, which shows a subset of the IP range

NetRange:       45.77.94.0 - 45.77.95.255
  CIDR:           45.77.94.0/23

This allows to narrow the blocked range to
ufw deny from 45.77.94.0/23


text: Q: How can i host a public website from my computer? I've tried hundreds of websites and tutorials, all of which only tell me how to host a local website, but can I host a website that people from other networks can join, and can I add my recently bought domain to it as well?


text:
Q: How to assign two iface to different subnets? I have a ethernet connection eth0 and a wifi usb connection wlan0 on my raspbian box which both connect to a router with internet.
In my etc/network/interfaces file I have a setup that allows me to connect via SSH to my eth0 or wlan0 iface.
...

iface eth0 inet static
        address 192.168.1.100
        netmask 255.255.255.0
        gateway 192.168.1.1

...

iface wlan0 inet static
        address 192.168.1.200
        netmask 255.255.255.0

...

This config is fine and works as expected.
However this setup causes conflict with another software that demands each to have iface to be on its own subnet.
When I reconfigure my /etc/network/interfaces file like so
...

iface eth0 inet static
        address 192.168.1.100
        netmask 255.255.255.0
        gateway 192.168.1.1

...

iface wlan0 inet static
        address 192.168.2.200
        netmask 255.255.255.0

...

As wlan0 is now apart of another subnet (192.168. 2 .200) I can no longer connect to it through SSH, I also can not reach it via ping 192.168.2.200 from a Windows Machine.
When connected to eth0 through SSH, cmd tcpdump returns
...

23:05:27.296764 IP 192.168.1.5.49846 > 192.168.1.100.ssh: Flags [.], ack 2284256, win 252, length 0
23:05:27.297540 IP 192.168.1.100.ssh > 192.168.1.5.49846: Flags [P.], seq 2284256:2284544, ack 17665, win 594, length 288
23:05:27.298780 IP 192.168.1.5.49846 > 192.168.1.100.ssh: Flags [.], ack 2284544, win 251, length 0
23:05:27.299201 IP 192.168.1.100.ssh > 192.168.1.5.49846: Flags [P.], seq 2284544:2284832, ack 17665, win 594, length 288
23:05:27.300434 IP 192.168.1.5.49846 > 192.168.1.100.ssh: Flags [.], ack 2284832, win 256, length 0
23:05:27.301316 IP 192.168.1.100.ssh > 192.168.1.5.49846: Flags [P.], seq 2284832:2285120, ack 17665, win 594, length 288
23:05:27.302296 IP 192.168.1.100.ssh > 192.168.1.5.49846: Flags [P.], seq 2285120:2285280, ack 17665, win 594, length 160
23:05:27.302712 IP 192.168.1.5.49846 > 192.168.1.100.ssh: Flags [.], ack 2285120, win 255, length 0
23:05:27.303873 IP 192.168.1.5.49846 > 192.168.1.100.ssh: Flags [.], ack 2285280, win 254, length 0

...

What I have Tried

*

*Updated /etc/network/interfaces and changed netmask to netmask 255.255.0.0
Still the problem remains

A: It's unclear what is your network configuration.  In the SOHO segment the Wifi router should have taken care of this.  If you do not use any routers and that box is just connected to the ethernet and has a Wifi access point, then the only solution I can think of is to configure a bridge using eth0 and wlan0 and assign an IP address from 192.168.1.0/24 to that br0 interface.
You can read on how to configure bridges on Linux at, for example, https://wiki.debian.org/BridgeNetworkConnections


text:
Q: How update existing IOS app with expo app in testFight and app store I need to update existing IOS app with expo app and I need some documentations or ways.
I can successfully connect app-store-connect with expo app and connect TestFlight


text:
Q: HttpPost not working in jellybean with Thread I am trying to create connection with database and it's ok in gigerbread 2.3.6 and not in higher than jellybean os.
Here is my code -
    new Thread(new Runnable() {
           public void run() {
               select();

           }
    }).start();

Select Method - (I get id from edittext)
public void select()
{
    ArrayList<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>();

String id="1";
nameValuePairs.add(new BasicNameValuePair("id",id));

    try
    {
    HttpClient httpclient = new DefaultHttpClient();
        HttpPost httppost = new HttpPost("http://yangoninnovation.com/mmuniteddbphp/conn.php");
        httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
        HttpResponse response = httpclient.execute(httppost);
        HttpEntity entity = response.getEntity();
        is = entity.getContent();
        txvstartstatus.setText("connected ...");
}
    catch(Exception e)
{

        txvstartstatus.setText("No Internet connection: ");
}

    try
    {
        BufferedReader reader = new BufferedReader
            (new InputStreamReader(is,"iso-8859-1"),8);
            StringBuilder sb = new StringBuilder();
            while ((line = reader.readLine()) != null)
    {
            sb.append(line + "\n");
        }
            is.close();
            result = sb.toString();

            String re2;
            re2=result.substring(result.lastIndexOf(":"));
            re2=re2.substring(2, re2.lastIndexOf('"'));

            txvstartstatus.setText(re2);

}
    catch(Exception e)
    {
        txvstartstatus.setText("No Internet connection: ");
}
}

I can't control to connect in higher android version. Please kindly help me. My select() works successfully in lower versions. How can I solve it . Thanks in advance. I'm stacked about a month with this problem. Hopefully you can help that !


text: Q: Fix "Value is too long" in Directus field i have a CSV field in Directus and when i want to add one more tag it says "[VALUE_TOO_LONG] Value is too long.". I thought it was MAX_PAYLOAD_SIZE so i added to .env file but nothing changed. Anyone knows how to solve this?


text:
Q: Save MySQL Result into php multi-dimensional array (timetable) My tables:
timetable
+----+---------+-------+--------+---------+---------+------+
| id | user_id | s_day | s_hour | subject | teacher | room |
+----+---------+-------+--------+---------+---------+------+
|  1 |       1 |     1 |      1 | MATH    | SM      | 101  |
|  2 |       1 |     1 |      2 | MATH    | SM      | 101  |
|  3 |       1 |     1 |      3 | MATH    | SM      | 101  |
|  4 |       1 |     1 |      4 | MATH    | SM      | 101  |
|  5 |       1 |     1 |      5 | MATH    | SM      | 101  |
|  6 |       1 |     1 |      6 | MATH    | SM      | 101  |
|  7 |       1 |     2 |      1 | MATH    | SM      | 101  |
|  8 |       1 |     2 |      2 | MATH    | SM      | 101  |
| .. |     ... |   ... |    ... |     ... |     ... |  ... |

users
+---------+----------+----
| user_id | username | ...
+---------+----------+----
|       1 | User1    | ...
+---------+----------+----

Now I want to output this timetable into a html-table with inputfields.
HTML table

 //this would be the row for the first hour
    1
    <input class="inputfeld sp_input" id="subject_1_1"><input class="inputfeld sp_input" id="teacher_1_1"><input class="inputfeld sp_input" id="room_1_1">
    <input class="inputfeld sp_input" id="subject_2_1"><input class="inputfeld sp_input" id="teacher_2_1"><input class="inputfeld sp_input" id="room_2_1">
    <input class="inputfeld sp_input" id="subject_3_1"><input class="inputfeld sp_input" id="teacher_3_1"><input class="inputfeld sp_input" id="room_3_1">
    <input class="inputfeld sp_input" id="subject_4_1"><input class="inputfeld sp_input" id="teacher_4_1"><input class="inputfeld sp_input" id="room_4_1">
    <input class="inputfeld sp_input" id="subject_5_1"><input class="inputfeld sp_input" id="teacher_5_1"><input class="inputfeld sp_input" id="room_5_1">

 //this would be the row for the 2nd hour
    2
    <input class="inputfeld sp_input" id="subject_1_2"><input class="inputfeld sp_input" id="teacher_1_2"><input class="inputfeld sp_input" id="room_1_2">
    <input class="inputfeld sp_input" id="subject_2_2"><input class="inputfeld sp_input" id="teacher_2_2"><input class="inputfeld sp_input" id="room_2_2">
    <input class="inputfeld sp_input" id="subject_3_2"><input class="inputfeld sp_input" id="teacher_3_2"><input class="inputfeld sp_input" id="room_3_2">
    <input class="inputfeld sp_input" id="subject_4_2"><input class="inputfeld sp_input" id="teacher_4_2"><input class="inputfeld sp_input" id="room_4_2">
    <input class="inputfeld sp_input" id="subject_5_2"><input class="inputfeld sp_input" id="teacher_5_2"><input class="inputfeld sp_input" id="room_5_2">

syntax for the id's of the input's:
subject_5_2
subject/teacher/room _ day (5 -> friday) _ hour (2 -> 2nd)

I thought about putting the complete mysql result in a multidimensional array like this:
$timetable[day][hour]

But how can I do this or is this method stupid? Or should I redesign the system completly?

A: I didn't actually test this but theoretically it should get you pretty close. It also would handle the case where a record doesn't exist, but you need to define your days / hours in the arrays in the top lines for what you're expecting to output.
Since each of your rows are output across in an hour by hour then day by day format, I would recommend that you order it as such:
//create a list of days / hours to check
$days = array(1,2,3,4,5);
$hours = array(1,2,3,4,5,6,7,8,9,10,11);

$stmt = $pdo->prepare("SELECT *
    FROM timetable
        INNER JOIN users ON timetable.user_id = users.user_id
    WHERE users.username=:username
    ORDER BY timetable.s_hour, timetable.s_day");

// bind the parameters so we only show User1's results
$stmt->bindValue(":username", 'User1');
//run the query
$stmt->execute();

$record = array();
$record['s_hour'] = 0;
$record['s_day'] = 0;
foreach ($hours as $hour) {
    echo '
';
    echo '' . $hour . '	';
    foreach ($days as $day) {
        //if the current slot we're adding data to comes after the record we're currently holding, grab the next record
        if(isset($record['s_hour']) && isset($record['s_day'])
           && $hour > $record['s_hour'] ||
           ($day > $record['s_day'] && $hour <= $record['s_hour']) {
            if($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
                $record = $row;
            }
        }

        //if this record, matches the hour/day slot we're on, output the appropriate data, else output an empty row
        echo '';
        if($hour == $record['s_hour'] && $day == $record['s_day']) {
            echo '<input class="inputfeld sp_input" id="subject_' . $day . '_' . $hour . '" value="' . $record['subject'] . '">';
            echo '<input class="inputfeld sp_input" id="teacher_' . $day . '_' . $hour . '" value="' . $record['teacher'] . '">';
            echo '<input class="inputfeld sp_input" id="room_' . $day . '_' . $hour . '" value="' . $record['room'] . '">';
        } else {
            echo '<input class="inputfeld sp_input" id="subject_' . $day . '_' . $hour . '">';
            echo '<input class="inputfeld sp_input" id="teacher_' . $day . '_' . $hour . '">';
            echo '<input class="inputfeld sp_input" id="room_' . $day . '_' . $hour . '">';
        }

        echo '	';
    }
    echo '
';
}


text:
Q: is it safe to run yum and install packages when the root file-system isn't that of the running system? Example: I have a centos or debian X.Y installed on physical disks, with a 2.6 kernel.
Now I put a "live distro" ISO (example archlinux) on one DVD and

*

*boot the system from the DVD, so now the running os is a 4.x kernel

*mount the root f.s. of the physical disk and chroot to it

So now the root file system is not the real one of the live os.
Running "yum install ..." seems to work!
Is there any official documentation about yum requirements?
Does yum work using as input only the file-system, so this kind of operations are absolutely safe?

A: You have used chroot so the only thing that yum is using is the kernel from the "live distro". The things that yum is going to want to do are pretty standard, open files, read files, write files, launch programs, allocate memory, and this will work for any kernel from say the last 10 years assuming that it is for the correct architecture.
You might want to mount things like /dev, /dev/pts, /sys, /tmp and /proc into your change-rooted environment. If you have a separate /boot partition you might want to mount that as well.
The only thing which may go wrong is the scripts which are run when you update your kernel and they try and figure out the boot device to update the configuration. Everything else will just work.


text:
Q: BAT File . Delete all files older than X days and keep one file per day I created a BAT files using information from internet.
It deletes all the files older than X days from a specific repertory.
forfiles /p "C:\mypath" /d -30 /c "cmd /c del @path

However it is not exactly doing what I wish it would do.
In my folder I have an excel file that is created every hour with the same name structure XXXX_XX_datestamp. Each new file is an update from the previous file. So, totally each day i have 12 files.
See the example below :
Example
As it is taking a lot of space, I would like only the last file of each day to remain and delete the rest of the files.
I tried to look online but I cannot find anything similar to what I want to do.
Hoping somebody can guide me in the right direction.
Thanks a lot for your help.
Best regards.

A: @Compo, thanks for the idea.
I ended-up using powershell, after finding few tutorials i came up with the following code :
$sourceFolder = 'C:\mypath'
$filePrefix   = 'U_07_'

Get-ChildItem -Path $sourceFolder -Filter "$filePrefix*.csv" -File |
    Where-Object { $_.BaseName -match '_\d{14}$' } |
    Group-Object -Property @{Expression = { $_.LastWriteTime.Date }} |
        ForEach-Object {
            $_.Group |
            Sort-Object -Property LastWriteTime -Descending |
            Select-Object -Skip 1 |
            Remove-Item -Force
        }

Thanks all for the suggestions.


text:
Q: ModSecurity rule to not scan URI I am having difficulty creating a new mod security 2.5 rule.
My deployment:
Apache server, Setup as a reverse proxy.
(so the apache webserver __does not_ host the website. Instead, I proxy the requests to another server that answers the web requests.)
The web server uses authentication tokens to rewrite the website URL to a secure URL.
75.75.75.75 - - [01/May/2015:10:55:14 -0400] "GET /record/example.svc/js HTTP/1.1" 200 1786 "https://example.org/example.aspx?XOW%5eLdz%3c2%2f1%2f42%2527kbmhtbffJfx%3e0%2527qpkf%5ejc%3e2%2527Cfruho%60uhpmXOW%5eLdz%3c2%2f1%2f42%2527RptsbfVQU%60Jfx%3e193%2527qpkf%5ejc%3e2%2527RptsbfVQU%60Ejqts%60Bihmc%60Mblf%3cSdrtfru%1fTbpqjmh"

The Problem:
Modsecurity currently scans the URI. Due to the nature of the random URIs, a lot of false positives have been produced. To prevent this, I want to exempt all URIs from scanning.
Since the rewrite, redirect and authentication token are all being generated on the webserver (And this how we want to keep it), how do I inform mod security that these headers are legitimate and do not scan them?
75.75.75.75 - - [01/May/2015:10:55:52 -0400] "GET /thing.aspx?XOW%5eLdz%3c375%25cddnnd%60ttds%5ebt%60he%3c5%2f58328 HTTP/1.1" 200 15100 "https://example.org/example.aspx?XOW%5eLdz%3c2%2f1%2f42%2527kbmhtbffJfx%3e0%2527qpkf%5ejc%3e2%2527Cfruho%60uhpmXOW%5eLdz%3c2%2f1%2f42%2527RptsbfVQU%60Jfx%3e193%2527qpkf%5ejc%3e2%2527RptsbfVQU%60Ejqts%60Bihmc%60Mblf%3cSdrtfru%1fTbpqjmh"

 75.75.75.75 - - [01/May/2015:10:55:52 -0400] "GET /example/example.svc/js HTTP/1.1" 200 1786 "https://example.org/example.aspx?XOW%5eLdz%3c375%25cddnnd%60ttds%5ebt%60he%3c5%2f58328"

A: Following the response in the comments on the original question;
In short it is not possible to negate the URI from inspection, ModSecurity is like other products rule/signature based.
What you can do however is get the ruleid for your false positives (from the apache error log for the VirtualHost) and perform a SecRemoveRuleById 123456 in your apache configuration, doing so will allow you to remove the false positives from being matched.
I would strongly suggest you do as selectively as possible via a LocationMatch directive or similar
Per chat, Hrvoje's shows an example or rule chaining which may be usefull


text:
Q: Is field mode "REPEATED" not supported for external tables in BigQuery? Are repeated fields secretly not supported for external tables in BigQuery? The UI validator always displays the error message Unsupported field mode: REPEATED no matter what the query is, even if I'm not trying to select any of the columns with that mode. Running the query anyway produces this same error.
Obviously I had to specify my own schema as the autodetect only ever seems to come back with the NULLABLE mode for every field. BQ doesn't have any problems with the tables.inset call with my schema, and creates the table successfully. FWIW I tried including the schema alternately in the root table resource as well as the ExternalDataConfiguration object, and they both worked fine.
I'll go ahead and mention that I also searched this error on google.com and got 0 results. Google went as far as to write an entire section of BigQuery documentation about the limitations of external data sources, and nowhere do they say that REPEATED mode is not supported. So what gives??


text:
Q: Are "most" operators on an infinite-dimensional complex Banach space "diagonalizable"? This is true for finite-dimensional spaces, of course.
To be precise, let $T$ be an operator on a complex Banach space $X$ which is not finite-dimensional. For each $\lambda \in \mathbb{C}$, let $V_\lambda \subseteq X$ be the subspace $\mathrm{ker} (\lambda I - T)$ on which $T$ acts by the scalar $\lambda$. Say that $T$ is diagonalizable if $\sum_\lambda V_\lambda$ is dense in $X$. Or provide a better definition if this one is deficient!
Are "most" operators diagonalizable? For instance, is the set of diagonalizable operators comeagre? Of course, there are lots of operators which are not diagonalizable, but perhaps, as in the finite-dimensional case, they form a "small" set.
I suppose it's natural to consider just bounded operators, although I'd be interested in results about unbounded operators, too. Of course, if the answer depends on the Banach space $X$, I'd be very interested to learn about that. In a Hilbert space, we can consider the additional condition that the $V_\lambda$ be orthogonal and probably a lot more can be said; I'm interested in this, but I think I'm primarily interested in the more general notion of diagonalizability I gave. Also, the question makes perfect sense for any topological vector space; I'm interested in non-Banach spaces, too.
EDIT I've asked this question on mathoverflow; answers may fit better over there.


text:
Q: Excel, Want to Create Dropdown Based on a "yes" Cell The issue is pretty simple, but I can't seem to solve it or find an answer.
I have one cell A2 that activates with a yes/no based on what the user enters elsewhere.
I would like to create a drop-down list in another cell A3 only if A2 has a "yes" inside.  From what I can tell, this can only be done with Data Validation, but it keeps throwing errors.

A: With Data Validation for a drop down list, when you are creating it, you can use "If" statements.  Choose "List" from "allow", then for the Source, something like =if(A2="Yes",B2:B6,C2).  Note, I assumed that your list of data is B2:B6, and in C2 is some string you want to return if A2 is not "Yes".
Note: If A2 is not "Yes", and you want the list in A3 to then say "No list necessary", you can't just use that string in the IF statement for the validation - you need to put that string in, i.e. C2, and use the formula above. Can't put strings in the data validation IF statement for some reason.

A: EDIT: Oh well It appears VBA was completely unnecessary for this use. I'm not deleting the answer because it would work, but I don't reccomend this over the easier method!
I would use VBA for that. If you aren't afraid to get dirty with some code, here's something I believe will work. If you are an absolute zero in VBA I can give more detailed help.
Open up the Visual Basic Editor and copy/paste this:
'this means it activates when there is change in your worksheet:
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
    If Not Intersect(Target, Range("A2")) Is Nothing Then 'Checks that the change occurs in the cell A2

        If Range("A2") = "Yes" Then 'only enters this if it changed to yes
            With Range("A3").Validation 'this little block creates the list. More on this after the code
                .delete
                .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
                xlBetween, Formula1:="=Paramètres!$C$1:$C$5"
            End With
        End If

        If Range("A2") = "No" Then 'only does this if it changed to no
            Range("A3").Validation.delete 'this deletes the list.
        End If

    End if
End sub

So the list, in our case, is created or deleted when a change occurs in cell A2. The list contains the items you will have to write in cells C1 to C5. (example: In c1 write "hello", in c2 write:"goodbye" etc). If you want more or less inputs you can change C1 to C3 or C10, as you like. You can also make put the list elsewhere (column E for example) by changing the C. After writing your list in a column, I suggest hiding that column because it is unnecessary to see it.


text:
Q: Trouble with postgres query in entity framework core So I have a table as such:
[Table("Box", Schema = "dbo")]
    public partial class Box
    {
        [Column("eventId")]
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        [StringLength(200)]
        public int EventId {get;set;}

        [Column("uuid")]
        public int Uuid {get;set;}

        [Column("localIndex")]
        public int LocalIndex {get;set;}

        [Column("rack")]
        public string Rack {get;set;}

        [Column("shelf")]
        public string Shelf{get;set;}

        [Column("fag")]
        public string Fag{get;set;}

        [Column("municipality")]
        public string Municipality {get;set;}

        [Column("organization")]
        public string Organization {get;set;}

        [Column("Entries")]
        public string Entries{get;set;}

    }

The database is event driven so the uuid for a particular box will remain constant however everything else may change, so what I want to get is the newest edition of all unique UUID boxes. Is there some succinct query I can run to accomplish this?
As right now as a temporary solution I just get all the boxes which match a specific where clause and run the result through this function:
let getLatest (list : Box list) =
    list
    |> List.filter(fun x -> list
                            |> List.forall(fun y ->
                                    not (y.uuid = x.uuid && y.eventId > x.eventId)))

Which needless to say is probably not the best way of doing it but it functions. However if anyone has any idea it would be most appreciated.

A: I would solve this problem by grouping your boxes by UUID, then ordering each group by eventId and taking first record from each group.
In code it would look like:
let getLatest2 (list : Box list) =
    list
    |> List.groupBy (fun x-> x.uuid)
    |> List.map (fun (uuid, values) ->
                    values
                    |> List.sortByDescending (fun x->x.eventId)
                    |> List.head)

To be honest, I'm not sure if it will be correctly translated with EF to SQL query or if it has any advantage over your original solution.


text:
Q: Ffmpeg Sync when extracting parts of video This question can be seen as an extension of this question. I am using the ffmpeg 2.0.1 .
The following commands is useful when you want to extract parts of one big video file given time makers.
ffmpeg -i 00402.MTS -s 1280x720 -ss 0:00:05.38608 -vcodec libxvid -qscale:v 2 -acodec ac3 -ar 48000 -ab 256k -t 0:00:06.61391 m001.avi

My problem is that in the ouput file, the start value is 0 and the there is ~50ms of shift between audio and video. What argument should I use to take into account this 'start value' when extracting severals parts of the big video file ('.mts') ? What does this 'start value' mean ?
ffprobe output from big MTS video file
ffprobe m001.MTS
ffprobe version 2.0.1 Copyright (c) 2007-2013 the FFmpeg developers built on Sep 24 2013 05:31:18 with gcc 4.8 (Debian 4.8.1-10)
configuration: --extra-cflags=-I../static/include --extra-ldflags='-L../static/lib -static' --enable-gpl --enable-version3 --enable-static --disable-shared --disable-debug --enable-runtime-cpudetect --enable-libmp3lame --enable-libx264 --enable-libspeex --enable-libvorbis --enable-libvpx --enable-libfreetype --enable-libxvid --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-gray --enable-libopenjpeg --disable-ffserver
libavutil      52. 38.100 / 52. 38.100
libavcodec     55. 18.102 / 55. 18.102
libavformat    55. 12.100 / 55. 12.100
libavdevice    55.  3.100 / 55.  3.100
libavfilter     3. 79.101 /  3. 79.101
libswscale      2.  3.100 /  2.  3.100
libswresample   0. 17.102 /  0. 17.102
libpostproc    52.  3.100 / 52.  3.100
Input #0, mpegts, from 'm001.MTS':
Duration: 00:01:18.25, start: 0.455556, bitrate: 12217 kb/s
Program 1
Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448), yuv420p, 1440x1080 [SAR 4:3       DAR 16:9], 25 fps, 50 tbr, 90k tbn, 50 tbc
Stream #0:1[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 256 kb/s

ffprobe ouput from extract sample
Input #0, avi, from 'm001.avi':
Metadata:
encoder         : Lavf55.12.100
Duration: 00:00:06.64, start: 0.000000, bitrate: 4950 kb/s
Stream #0:0: Video: mpeg4 (Simple Profile) (xvid / 0x64697678), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 25 tbr, 25 tbn, 25 tbc
Stream #0:1: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, mono, fltp, 256 kb/s

A: I've come across this problem before, and the only solution is to use itsoffset and map.
ffmpeg -i 00402.MTS -itsoffset 0.455556 -i 00402.MTS -map 1:0 -map 0:1 -s 1280x720 -ss 0:00:05.38608 -vcodec libxvid -qscale:v 2 -acodec ac3 -ar 48000 -ab 256k -t 0:00:06.61391 m001.avi

This page has a nice explanation why and how it works.
http://www.kkoncepts.net/blog/fixing-out-sync-audio-and-video-ffmpeg
(No longer available at original link; now from web-beta.archive.org)
EDIT
There are two main tools here to be aware of:
1) itsoffset
2) map
itsoffset exists to offset a stream that is out of sync, whereas map informs ffmpeg to use certain streams from specific inputs and apply them to the output.
In this example, we are using the same input twice, mapping the streams thusly:
We use the video stream of first input (which seems to be starting at 00:00:00.00)
We use the second input as the audio stream, but offset the input time 0.455556 seconds.
From the above mentioned site:

Here "-map 1:0" tells ffmpeg to use the second input file (1) and take
  its first stream (0) as the video source. Since that's the input that
  follows the "-itsoffset" switch, that's the stream that will be
  delayed. Then "-map 0.1" tells it to use the second stream from the
  first input as the audio. Since there's no offset applied to the first
  input file, it will be processed normally.


text:
Q: Linearizing a power series by conjugation Let $\mathfrak{I}:=\big\{ \, f:=\sum_{k=0}^\infty f_k z^k \in\mathbb{C}[[z]]\; : \text{s.t. }\;  f_0=0  \;\text{ and }\; f_1=1\big\}$. A most basic result about linearization states that, for any $f\in\mathfrak{I}$ and for any $\lambda\in\mathbb{C}$ not a root of unity, there exists a unique  $h\in\mathfrak{I}$ that linearizes $f(\lambda z)$:
$$h(\lambda z)=f(\lambda h(z)).$$
Existence and uniqueness of this conjugation  in the setting of formal power series is indeed easily established, as the coefficients of $h$ can  be determined inductively from the data $(f_1,f_2,\dots) $ expanding the composition: one finds
$$h_1=1$$
$$h_{n+1}={1\over \lambda^{n}-1 } \sum_{k\ge2,\,j}  f_k \lambda^{k-1} h_{j_1}\dots h_{j_k},$$
the latter sum being extended  over all integers $k\ge2$ and multi-indices $j\in\mathbb{Z}_+^k$ of length  $|j|:=j_1+\dots+j_k=n+1$, thus with all components $j_i\le n$.
The above recursion implies that the coefficients $h_n$ should be rational functions of $\lambda$, with denominators in the form $\prod_{k=1}^{n-1}(\lambda^k-1)^{m_{n,k}}$, where the exponents $m_{k,n}$ may be larger than $1$, at least at a first glance. However, after experiments with various $f$ and up to $n=50$ I observed that the form of $h_n$ always shows the simpler denominator, with all $m_{k,n}=1$:
$$h_n={P_n(\lambda)\over (\lambda-1)(\lambda^2-1)\dots(\lambda^{n-1}-1)},$$
for some polynomials $P_n(\lambda)$ of degree at most ${n\choose 2}$.

Is this really a general phenomenon? If so, why? Is there a simpler formula (maybe still recursive) for $h_n$ than the above recursion?

A: You may find useful information in a recent article by D. Sauzin and al. "Explicit linearization of one-dimensional germs through tree-expansions" here, where they use "mould calculus" (introduced by J. Écalle 40 years ago) to write down the coefficients $h_n$ and explore the combinaotrial structure of their family.

A: I think it is very unusual for the $h_n$s to have a simpler formulation. Even in the case of a quadratic polynomial, the conjugating function $h$ need not be a polynomial. I'm afraid I don't have a general explanation of that for you, other than noticing it by working through some examples.
There is however a simpler construction of $h$ as a limit, rather than as a power series that works when $|\lambda|\neq 1$, namely let
$$h_n=\lambda^{-n}\circ f^n.$$
Then, $h_n\to h$. This formulation is fairly well known so, perhaps, you are already aware of it. It's quite easy to work with programmatically.
Note, however that the case $|\lambda|=1$ is more subtle than you've stated. The existence of the linearization is then equivalent to the the fixed point being in the Fatou set. Indeed, if $\lambda$ is a root of unity, the fixed point is in the Julia set but, even if $\lambda$ is not a root of unity the fixed point might still be in the Julia set.


text:
Q: Converting Html to Word in .Net I need to create a word file from a HTML content (on a ASP.NET server application) but couldn't find a robust way of doing that. So decided to run a discussion here to see what are possible options of doing this.
Aspose has a .NET component for this but the price is so high so can not be a solution (due to budgeting issues).
We expect this conversion to preserve tables, images, hiding invisible elements, links, etc.
There is a similar discussion here but solutions provided are all around Office Interop which is not a recommended solution for server application.
Any idea? Basically how do components like Aspose work?

A: Has the hard work already been done? There seems to be a project on codeplex.
Blog post describing HTML to docx converter
Project on codeplex

A: I would suggest writing code using the OpenXml API, you can navigate the DOM and programmatically add elements to the word document.  Its no simple task through since you are interpretting markup and attempting to convert it.
link for Open XML: http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=5124

A: It's probably worth checking out Microsoft's own XSLT Inference tool which can generate WordML from XML input.
If you are flexible with the source of the document itself being HTML/XHTML/XML this could easily get the job done.
http://msdn.microsoft.com/en-us/library/aa212886%28v=office.11%29.aspx
http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=3412
I've used it in the past to generate Word documents from within an ASP .NET app, which obtained its source XML data from SQL stored procedures.
The tool can be a bit temperamental, but with a little sanitisating of the XSLT that it generates it could just work.

A: If docx is appliable you can create a word document, save it as docx, reverse engineer the xml and create your own xml/docx.  I did it with excel/xslx and it worked perfectly.  To speed things up we created the XML as text and joined the strings (before our data - our data - after our data).
The RTF format is not a standard afaik but it is wide spread.  Create an RTF document and return it as a word document.  Word opens rtf without problem.
Create a HTML document and return it as a word document.
HTH


text:
Q: Can I name an CSV export with a range/cell number from the original worksheet and also save a PDF version? I have been creating a quote & Order spreadsheet.
I have been testing VBA to simplify options for the user, however I am finding it difficult to name the export CSV and PDF Files automatically with the order number and client name. I have got the VBA to work for the PDF option but not the CSV.
The order number is in cell "O14" and the Client Name is in "N14".
The code I have tried is:
Sub CopyCells()

 ' export Macro

 Range("G8:O60").Select
 Selection.Copy
 Workbooks.Add
 ActiveWorkbook.SaveAs Filename:= _
  "C:Users\Desktop\Invoices\Book2.csv" _
  , FileFormat:=xlCSV, CreateBackup:=False
 Application.DisplayAlerts = False
 ActiveWorkbook.Close
 Application.DisplayAlerts = True

'Create and assign variables
Dim saveLocation As String
saveLocation = "C:Users\Desktop\pdf\myPDFFile.pdf" _

'Save Active Sheet(s) as PDF
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, _
     Filename:=Range("N14").Value & "_" & Range("O14").Value

A: Filename := "C:Users\Desktop\pdf\" & _
             Range("N14").Value & "_" & Range("O14").Value & ".pdf"


text:
Q: Unable to start activity ComponentInfo - LocationManager I'm trying to get the latitude and longitude for show my current location in the Google Map, but I'm getting this error:
03-04 18:00:50.785  13625-13625/com.example.thulio.googlemapstest W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x40e0c960)
03-04 18:00:50.785  13625-13625/com.example.thulio.googlemapstest E/AndroidRuntime﹕ FATAL EXCEPTION: main
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.thulio.googlemapstest/com.example.thulio.googlemapstest.MapPane}: java.lang.NullPointerException
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2255)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2309)
            at android.app.ActivityThread.access$700(ActivityThread.java:157)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1289)
            at android.os.Handler.dispatchMessage(Handler.java:99)
            at android.os.Looper.loop(Looper.java:176)
            at android.app.ActivityThread.main(ActivityThread.java:5317)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:511)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
            at dalvik.system.NativeStart.main(Native Method)
     Caused by: java.lang.NullPointerException
            at com.example.thulio.googlemapstest.MapPane.getCurrentLocation(MapPane.java:35)
            at com.example.thulio.googlemapstest.MapPane.onCreate(MapPane.java:28)
            at android.app.Activity.performCreate(Activity.java:5326)
            at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1097)
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2218)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2309)
            at android.app.ActivityThread.access$700(ActivityThread.java:157)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1289)
            at android.os.Handler.dispatchMessage(Handler.java:99)
            at android.os.Looper.loop(Looper.java:176)
            at android.app.ActivityThread.main(ActivityThread.java:5317)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:511)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
            at dalvik.system.NativeStart.main(Native Method)

I'm just trying to get the current location one time and display on the Map.
MainActivity:
public class MapPane extends Activity{
    private GoogleMap map;

    @Override
    public void onCreate(Bundle savedInstanceState){
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_map_pane);

        map = ((MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap();

        getCurrentLocation();
    }

    public void getCurrentLocation(){
        LocationManager lm = (LocationManager)getSystemService(Context.LOCATION_SERVICE);
        Location location = lm.getLastKnownLocation(LocationManager.GPS_PROVIDER);
        double longitude = location.getLongitude();
        double latitude = location.getLatitude();

        LatLng USER_LOCATION = new LatLng(longitude, latitude);

        map.setMapType(GoogleMap.MAP_TYPE_NORMAL);
        CameraUpdate update = CameraUpdateFactory.newLatLngZoom(USER_LOCATION, 13);
        map.animateCamera(update);

        map.addMarker(new MarkerOptions().position(USER_LOCATION).title("USER LOCATION"));
    }
}

In the AndroidManifest:
...
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
...

Thanks for help.

A: Have you referenced the following snippet in your AndroidManifest.xml file as well?
<application ...>
   ...
   <uses-library android:name="com.google.android.maps" />
</application>

It is possible that this will return null if there is no currently known location or the provider is not currently available as noted within the LocationManager.  You should probably not rely on it being retrieve immediately but set it up such that you can check back on it when it is ready in your code.
Here is another example of someone setting up the manager and making an attempt within a try catch block.  Although feel free to do it in which ever means you would like.  But there isn't a guarantee that it will be ready right away.  Other checks need to be done.

A: You can take a look at http://wptrafficanalyzer.in/blog/showing-current-location-in-google-maps-using-api-v2-with-supportmapfragment/. This is a really nice tutorial for the same.


text:
Q: Connection problem when connecting to MSDE2000 with .NET I have a strange problem. I'm trying to connect to a Microsoft SQL server from C# (.Net 4.0). The server is running MSDE2000(8.00.194). When I connect I get the following message:
System.Data.SqlClient.SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - No connection could be made because the target machine actively refused it.)

My connectionstring looks like this,(yes i'm using a blank password):
"User Id=sa;Password=;Data Source=192.168.0.100\?,1433;Trusted_Connection=false;Initial Catalog=DATABASE1;"
I've tried changing pretty much everything in the connection string to get it to work without success. I've even tried doing an OleDBConnection instead of the SqlConnection but without success.
The strange thing is that when I connect through Microsoft Management Studio I'm able to connect and see everything. But I get disconnected between every command I send and have to reconnect.
Does anyone know what the problem might be or where I should start looking to find the problem?
Edit: I might add that I tried to telnet to the machine on port 1433 but got "Connection closed by host". The thing is that I do not have access to the computer so I can't check firewall settings but isn't the Management Studio connecting the same way as .Net do?

A: Are you sure the instance of such MSDE 2000 is up and running? can you connect to that instance remotely with your SQL Management Studio? Who has installed that instance? by default tcp connections are disabled in a default install, this still happened also in SQL Server 2005 Express (not sure about the 2008 version) so unless the guy who installed it has configured it properly or knew how to set it up, you could be missing some protocols to be enabled.
is that instance available locally on that machine?
check here for default connection strings, I also doubt that ? is a valid instance name and if you know the instance name you should specify it,
http://connectionstrings.com/sql-server#p1


text:
Q: How do I refer to data class property names for Firestore queries? I'm using a simple data class Track, then saving it as an object so that fields and values are automatically saved. This is working as intended. However later when I want to query on 1 of those property/field names, I need to provide the String value.
How do I refer to the name of that property in the data class, so that I maintain the "single source of truth" for that value, without hard coding it a second time in the query? Example uses "spotifyId":
data class Track(
    val spotifyId: String,
    val name: String,
    val artist: List<String>,
    val duration: String
)

Save a track:
set(trackDocRef, track)

Query for a track:
db.collection("tracks").whereEqualTo("spotifyId", "sdfgsdfswer4543w5yer345").get()

Thank you!

A: I figured out one way of doing it, not sure how "correct" it is. I used reflection in the TracksContract object to refer to the Track model:
data class Track(
    val spotifyId: String,
    val name: String,
    val artist: List<String>,
    val duration: String
)

Single reference to Track model via TracksContract:
object TracksContract {

    internal const val COLLECTION_NAME = "Tracks"

    object Fields {
        val SPOTIFY_ID = Track::spotifyId.name
        val NAME = Track::name.name
        val ARTIST = Track::artist.name
        val DURATION = Track::duration.name
    }
}

now if I need to run the query based on that spotifyId, I refer to through the TracksContract:
db.collection(TracksContract.COLLECTION_NAME)
    .whereEqualTo(TracksContract.Fields.SPOTIFY_ID, "ID_VALUE")
    .get()

Finally if I decide to change the property names in the Track model then the TracksContract will show a compiler error, and I can change the name and refactor references from there if I want to.


text:
Q: Is there something analogous to a Kalman filter for estimating continuous variables that are supported over bounded intervals? Suppose that I have a robot which is somewhere in a $100 \times 100$ arena.  A Kalman filter could be used to estimate its position from noisy measurements.  The estimate produced from the Kalman filter, however, applies some probability to the robot being outside the arena, which is impossible.
Is there some filter that is analogous to the Kalman filter, but that is more appropriate for continuous variables with support over bounded intervals?

A: The Kalman filter solves an unconstrained optimization problem.  The natural extension to that would be to impose constraints on that problem.
I have no experience with the algorithms, but this paper [1] suggests solving the problem while constraining the system state $x_k$ to:
$$
A x_k = b\\
Cx_k < d
$$
The paper takes two approaches: projecting the unconstrained estimate onto the constrained space and modifying the Kalman gain calculation to ensure that the state update satisfies the constraint.
[1] Nachi Gupta & Raphael Hauser, "Kalman Filtering with Equality and Inequality State Constraints," Report no. 07/18.


text:
Q: Where to get a climate database for all places of the world? I want to show some climate graphs and historical weather data for specific places around the world.
My current database has city names, countries, longitude, latitude possible to query a search in a climate database. There are a lot of weather api's but I search for static climate information, can't find anything on the internet. Database doesn't have to be updated, I don't expect the climate too change so fast.
XML, json even api is fine. Hope anyone can help me with this.
Format with max / min temperature per month, maybe average rainfall and sun hours would be great.

A: NOAA keeps global climate data, Did you look at:
http://www.ncdc.noaa.gov/oa/ncdc.html

There seems to be an API:
http://www.ncdc.noaa.gov/cdo-web/webservices

A: For very detailed climate Canada data I have only had luck w/ a
"URL based procedure to automatically download data in bulk from Climate Website".
You must then find the "station" you are interested in first here is the station list.
https://drive.google.com/uc?authuser=0&id=1egfzGgzUb0RFu_EE5AYFZtsyXPfZ11y2&export=download
One you have that you can request the data:
format:
https://climate.weather.gc.ca/climate_data/bulk_data_e.html?format=csv&stationID={STATION}&Year={YEAR}&Month={MONTH}&Day={DAY}&timeframe=1
Here is an example:
https://climate.weather.gc.ca/climate_data/bulk_data_e.html?format=csv&stationID=10183&Year=2018&Month=3&Day=31&timeframe=1
You can find information on the columns here:
https://climate.weather.gc.ca/glossary_e.html#weather
And some general data information here:
https://climate.weather.gc.ca/about_the_data_index_e.html
https://drive.google.com/drive/folders/1WJCDEU34c60IfOnG4rv5EPZ4IhhW9vZH


text:
Q: Apple Watch how to trigger a notification or glance from the main app I would like to trigger the Apple Watch notification and or the glance views from the main app.
I know how to run them in XCode and selecting those directly, but I need to make them popup from inside the main app programmatically.
In my main app I have a timer that today creates a popup to tell the user something. I would like that same trigger to show the notification view on the apple watch along with dynamic text. To keep it simple for now, suppose I have a button (IBAction). when the button is pressed in the main app I would like to show a glance or show the notification views on the watch.  I am guessing this is fairly simple to do but havent been able to make it work, yet.
If you have some sample code that would be great!
Thank you for any help!

A: While iOS automatically shows notification controller when app receives remote or local notification.
But during development, you can trigger a notification or glance by changing Watch Interface in WatchKit App Schema. (Edit Schema -> (Under Info) Change Watch Interface to Glance/Static Notification / Dynamic Notification ).
However, Selecting Notification requires Notification Payload (create .apns file and set it to Notification Payload while editing schema) as well.
Hope it helps !


text:
Q: Returning a list of a computations from a method with that uses a sequence of Futures I want to return the list of the computations from a method that uses a list of Futures:
def foo: List[Long] = {
  val res = List(1, 2, 3) map {
    x => Future { someCalculation(x) }
  }

  Future.sequence(res)
  // what to do next?
}

def someCalculation(a: Int): Long = //....

How can I do this?

A: There is a key point to understand when it comes to futures: if you wanna go from Future[T] to T  you need to await the result of the operation, but this is something you would like to avoid not to affect the performance of your program. The correct approach is to keep working with asynchronous abstractions as much as you can, and move blocking up to your calling stack.
The Future class has a number of methods you can use to enchain other async operations, such as map, onComplete, onSuccess, etc etc.
If you really need to wait the result, then there is Await.result
val listOfFutures:List[Future[Long]] =   val res = List(1, 2, 3) map {
    x => Future { someCalculation(x) }
  }

// now we have a Future[List[Long]]
val futureList:Future[List[Long]] = Future.sequence(listOfFutures)

// Keep being async here, compute the results asynchronously. Remember the map function on future allows you to pass a f: A=>B on Future[A] and obtain a Future[B]. Here we call the sum method on the list
val yourOperationAsync:Future[Long] = futureList.map{_.sum}

// Do this only when you need to get the result
val result:Long = Await.result(yourOperationAsync, 1 second)

A: Well the whole point of using Future is to make it asynchronous. i.e
def foo: Future[List[Long]] = {
  val res = List(1, 2, 3) map {
    x => Future { someCalculation(x) }
  }
  Future.sequence(res)
}

This would be the ideal solution. But In case if you wish to wait, then you could wait for the result and then return:
val ans = Future.sequence(res)
Await.ready(ans, Duration.inf)


text:
Q: ArcGIS 10.5.1 "Name of an entry in the codedvaluedomain is empty" error I am trying to create a model in model builder that will convert a CSV file to a dbf and then import that as a domain into a specified geodatabase.
I was able to do this in another model by exporting the domains of one geodatabase (using Domain to Table) into another (using Table to Domain).
This time, however, the model crashes stating:
"Error 999999: Error Executing function. The name of an entry in the CodedValueDomain is empty. (domain name: Py Test)
Failed to execute (Table to Domain)."
I am typing in the names of the fields for code and description ("code" and "description", respectively.)
In my other model, I have to type the fields in by hand, but it still works. This time I don't seem to have as much luck.
I thought it was because of the specific model parameters that are defined up to that point, but it still follows the logical order.
I am not able to post a screenshot.
Has anyone encountered this?

A: I found that the description field cannot be empty. The description field is a required field and cannot be made optional.
I went back into my CSV and wrote "null" for each line of the description field. Using the description field as a way to number the code field also helps. It works now.