## How to know exact file encoding? when its file mimetype is “application/octel-stream”

I have a file and i want to know it’s encoding? I have tried linux file commands

# file —mime-type

application/octel-stream

## Is it possible to spoof an IP address to an exact number?

The title says it all really. Say my IP address was 1.2.3.4 and I wanted to change or ‘spoof’ it so that its exactly 2.3.4.5, would this be possible or are there too many varying factors that need to be taken into account before getting a definitive answer?

Well I was in a store the other day and they had iPads around the room setup so that they were showing the store’s online website. I went over and looked at one and noticed that what was showing on their in-store iPads was different to what I would see by simply connecting to their site via my phone (and yes, they were both the exact same link using the same exact browser, Safari).

This lead me to think that the only way they’re able to do this is by either having the site detect the device’s IP address and show specific (or exclusive) content on their homepage based on that, or by having the site detect that the device is using the stores WiFi (although I doubt this is possible, hence why I thought the IP route was more plausible).

So I was curious whether it’d be possible to spoof my device’s IP to that of the stores’ exact IP so that my device showed exactly what theirs did in regards to their website.

Feel free to discuss this, I know this is very very specific and with minimal details known, so I doubt there’s a definitive solution…

## Is the sum or subtraction of two positive machine numbers exact?

If you have two positive numbers that can be represented exactly by the finite arithmetic of your computer, that is, two machine numbers, if you perform their sum or subtraction with perfect arithmetic, is the result a machine number aswell?

I suppose that in the case of multiplication the answer is not necessarily, but I’m not sure with sums or subtractions.

## Examples of exact computation of Kolmogorov complexity?

First question: It is known that Kolmogorov Complexity (KC) is not computable (systematically). I would like to know if there are any “real-world” examples-applications where the KC has been computed exactly and not approximately through practical compression algorithms.

Second question and I quote from the “Elements of Information Theory” textbook: “one can say “Print out the first 1,239,875,981,825,931 bits of the square root of e.” Allowing 8 bits per character (ASCII), we see that the above unambiguous 73 symbol program demonstrates that the Kolmogorov complexity of this huge number is no greater than (8)( 73) = 584 bits. The fact that there is a simple algorithm to calculate the square root of e provides the saving in descriptive complexity.” Why take the 584 bits as an upper bound for the KC and not include the size of the actual “simple algorithm” that calculates the square root of e?? It is like cheating…

## Should I use BMM & Exact match for the same campaign?

Not in the same adgroup. But, for example, should I use +running +shoes in 1 AdGroup, then add it as an exact match in a different campaign. I fail to see the advantage of this, beyond possibly improving QS.

ThoughtS?

## Do comodules form an exact category?

Let $$R$$ be a commutative ring, $$C$$ a coalgebra over $$R$$. I am asking about the category of $$C$$-comodules $$C$$-Comod.

It is clear that if $$C$$ is a flat $$R$$-module, then $$C$$-Comod is abelian. Hence, is my first question.

Minor Question: Is the flatness a necessary condition for $$C$$-Comod to be abelian?

The flatness is useful because it ensures that a kernel of a map is a subcomodule. Hence, it is suggestive to declare all injections admissible monomorphisms and all surjections, whose kernel is a subcomodule, admissible epimorphisms.

Main Question: Does this define a structure of an exact category on C-comod?

PS I hope the answer is yes but I am afraid it is no. I do not see how to ensure existence of the pull-back $$X\times_YZ$$ where $$X\rightarrow Y$$ is an admissible epimorphism. Doesn’t it need a kernel?

## How can I post exact same post but with a few things changed? (with some sort of Automation)

I wanna duplicate some of my posts but want to change a few variables. For example, I would just like to make some variable in my posts that will be changed every time I give inputs. These can be links or one word changes in post title or somewhere in post. How can I do it? (see an example below where XXXX and Y are variables)

Post Title: Hello this is a sample Post with XXXX – Read now!

Body of my post:

Hey this is my post welcome, this is post with XXXX. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras dui mi, facilisis quis consequat id, blandit et enim. Nulla viverra tellus elementum ligula vulputate, vel venenatis nisi facilisis. Vivamus in mi eu ipsum molestie bibendum a sed purus. Read more here Y(link).

## Duplicate sheet but keep protected range with exact same user as only editor?

The following code duplicates a sheet based on a template, and copies over the protected range permissions from the template sheet to the new sheet.

However, the permission range is now there in the new sheet, but not with the same user.

The template sheet has only one user that can edit, but for the new sheet, while the same range is restricted, all users from the entire spreadsheet can edit the new sheet.

Does anyone happen to know if I can make it be just the exact same user as the template? And not like the user that initiates the script but only the same user as the template. Here’s the code:

function newSheet() {   var ss = SpreadsheetApp.getActiveSpreadsheet();   var sheet = ss.getSheetByName("New Sheet Template");   var protections = sheet.getProtections(SpreadsheetApp.ProtectionType.RANGE);   var dateI = Browser.inputBox('Enter Date: ','(DD/MM/YYYY)', Browser.Buttons.OK_CANCEL);   var nameSheet= "Sheet - "+dateI    if (dateI == "cancel" ) {     }     else {       ss.insertSheet(nameSheet, {template: sheet});       ss.getRange('B4').setValue(dateI);           for (var i = 0; i < protections.length; i++) {         var sheet2 = ss.getSheetByName("Sheet - "+dateI);         var p = protections[i];         var rangeNotation = p.getRange().getA1Notation();         var p2 = sheet2.getRange(rangeNotation).protect();         p2.setDescription(p.getDescription());         p2.setWarningOnly(p.isWarningOnly());     }     } } 

## How to invert Fisher’s exact test to construct 95% confidence interval

I would appreciate any help to invert Fisher’s exact test to construct 95% confidence interval for difference in means.

# sample data

data<-structure(list(X1 = c(17L, 33L, 49L, 65L, 81L, 97L), pupid = 1080001:1080006,      visit = c("Visit 1, 1998", "Visit 1, 1998", "Visit 1, 1998",      "Visit 1, 1998", "Visit 1, 1998", "Visit 1, 1998"), schid = c(108L,      108L, 108L, 108L, 108L, 108L), totpar98 = c(0.666666686534882,      0.666666686534882, 0.333333343267441, 0, 0, 0), wgrp = c(3L,      3L, 3L, 3L, 3L, 3L), attendance.count = c(16L, 16L, 16L,      16L, 16L, 16L), missing.totpar98 = c(0, 0, 0, 0, 0, 0), attendance.rate = c(0,      0, 0, 0, 0, 0), treatment.indicator = c(0, 0, 0, 0, 0, 0)), row.names = c(NA,  -6L), groups = structure(list(pupid = 1080001:1080006, .rows = list(     1L, 2L, 3L, 4L, 5L, 6L)), row.names = c(NA, -6L), class = c("tbl_df",  "tbl", "data.frame"), .drop = FALSE), class = c("grouped_df",  "tbl_df", "tbl", "data.frame")) 

# my attempt

fisher_CI<-function(Y, treat, n_sim, taus){   pval<-rep(NA, length(taus))   for (i in 1:length(taus)){     #create a potential outcome table     Y01<-cbind(Y, Y)     Y01[treat==1,1]<-Y[treat==1] - taus[i]     Y01[treat==0,2]<-Y[treat==0] + taus[i]     #conduct a test as before     t_obs<-abs(mean(Y01[treat==1,2]) - mean(Y01[treat==0,1]))     t_sim<-rep(NA, n_sim)     for (b in 1:n_sim){       treat_sim<-sample(treat, size = length(treat))       t_sim[b]<-abs(mean(Y01[treat_sim==1,2]) - mean(Y01[treat_sim==0,2]))     }      #obtain p-value     pval[i]<-mean(t_sim>t_obs)   }   return(pval)}  #pick a candidate range: tau =[-1, 20] #run over the grid taus<-seq(-1, 20, by =0.5) fr_ci<-fisher_CI(DT$totpar98, DT$  treatment.indicator, 500, taus) #select the region alpha<-0.05; accept<-fr_ci>=alpha/2 & fr_ci<=(1 -alpha/2) CI<-taus[accept] cat("lb =", min(CI), "ub =", max(CI))  #plot plot(xlab = "tau", ylab = "pval(tau)", fr_ci, pch = 21, bg = ifelse(accept==1, 'black', 'gray')) abline(h=1-alpha/2, col = 'red') abline(h=alpha/2, col = 'red') 

Thanks in advance. Please, let me know if something is not clear in my code.