robustness

Check if NFS share is up in PHP

爷,独闯天下 提交于 2020-02-06 05:30:14
问题 I am working on a system that will store uploaded files. The metadata will go into a locally-accessible database, but the files themselves are going to be stored on a remote box via NFS so that PHP can interact with the server as if it was a directory. I identified an issue that may occur if somebody attempts to upload a file when the NFS server is down or otherwise unavailable, which could cause the script to error out or hang. Obviously we want to avoid this scenario and handle it in a

Reproducible splitting of data into training and testing in R

本小妞迷上赌 提交于 2020-01-01 22:15:12
问题 A common way for sampling/splitting data in R is using sample , e.g., on row numbers. For example: require(data.table) set.seed(1) population <- as.character(1e5:(1e6-1)) # some made up ID names N <- 1e4 # sample size sample1 <- data.table(id = sort(sample(population, N))) # randomly sample N ids test <- sample(N-1, N/2, replace = F) test1 <- sample1[test, .(id)] The problem is that this isn't very robust to changes in the data. For example if we drop just one observation: sample2 <- sample1[

Measuring reliability of tree/dendrogram (Traminer)

寵の児 提交于 2019-12-24 03:12:47
问题 I did an analysis using TraMineR in order to measure the similarity among sequences of spatial use (for example Rural(R) vs Urban (U): sequence example -> RRRRRUUURRUUU) A requirement in my analysis is that states are compared at the same moment in time and therefore I used the hamming sequence similarity. Based on the similarity matrix I created a dendrogram, giving the distances among individual sequences, helping to identify "behavioral similarities" in sequential spatial use. Now I am

How to measure robustness?

二次信任 提交于 2019-12-22 05:27:18
问题 I am working on a thesis about meassuring quality of a product. The product in this case is a website. I have identified several quality attributes and meassurement techniques. One quality attribute is "Robustness". I want to meassure that somehow, but I can't find any useful information how to do this in an objective manner. Is there any static or dynamic metric that could meassure robustness? Ie, like unit test coverage, is there a way to meassure robustness like that? If so, is there any

How to reconnect to a socket gracefully

半世苍凉 提交于 2019-12-18 11:27:16
问题 I have a following method that connects to an end point when my program starts ChannelSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); var remoteIpAddress = IPAddress.Parse(ChannelIp); ChannelEndPoint = new IPEndPoint(remoteIpAddress, ChannelPort); ChannelSocket.Connect(ChannelEndPoint); I also have a timer that is set to trigger every 60 seconds to call CheckConnectivity , that attempts to send an arbitrary byte array to the end point to make sure that

What is the most robust way to get the width/height of the browser window using JavaScript?

陌路散爱 提交于 2019-12-11 13:38:17
问题 I am curently using the follownig conditions, but they aren't working across browsers or at all: if (typeof (window.innerHeight) == 'number') { //Non-IE: //Perform operation using window.innerWidth/Height } else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) { //IE 6+ in 'standards compliant mode' //Perform operation using document.documentElement.clientWidth/Height } else if (document.body && (document.body.clientWidth ||

Node.Js in Erlang style?

邮差的信 提交于 2019-12-10 04:28:44
问题 I am a complete noob when it comes to both Node.Js and Erlang. But wouldn't it be possible to build a Node.js app that emulates Erlang behavior? e.g. you pass json messages across an distributed node.js server park and even pass new code to those servers w/o going offline, just like erlang. If you have a message handler callback that is activated when a message is received, then this message handler could check if the message is a code update message and thus replace itself(the current

Python, writing an integer to a '.txt' file

北慕城南 提交于 2019-12-09 16:19:46
问题 Would using the pickle function be the fastest and most robust way to write an integer to a text file? Here is the syntax I have so far: import pickle pickle.dump(obj, file) If there is a more robust alternative, please feel free to tell me. My use case is writing an user input: n=int(input("Enter a number: ")) Yes, A human will need to read it and maybe edit it There will be 10 numbers in the file Python may need to read it back later. 回答1: I think it's simpler doing: number = 1337 with open

CLI shell script code generation from compiled executable? [closed]

一笑奈何 提交于 2019-12-09 15:59:01
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . Question, topic of discussion I am very interested in generation of command line shell scripting source code from code written in a

How to measure robustness?

和自甴很熟 提交于 2019-12-05 09:05:48
I am working on a thesis about meassuring quality of a product. The product in this case is a website. I have identified several quality attributes and meassurement techniques. One quality attribute is "Robustness". I want to meassure that somehow, but I can't find any useful information how to do this in an objective manner. Is there any static or dynamic metric that could meassure robustness? Ie, like unit test coverage, is there a way to meassure robustness like that? If so, is there any (free) tool that can do such a thing? Does anyone have any experience with such tooling? Last but not