I got a situation where i need to invoke future method from batch class. And i know that it is not possible to do. But there might be some workarounds to achieve it, right? And i dont want to invoke future method using shedule apex as my requirement will hit governor limits of "Total number of schedule jobs exceed". So i tried in below ways, but still fighting with same issue.  My design is  Scenario 1 :   Schedule Apex ===> 2. BatchClass (Runs every hour) (Generates a map with "N" records for every batch context, and passes it to Future method in an apex class)  ===> 3. Future method ( then it will login to a salesforce account and generates an attachment and sends an email to a corresponding email address) .   Scenario 2 :  Since, It is not possible to invoke future method from batch, i tried implementing an apex class with a normal static method  invoking future method and in a batch class, for every context i.e., execute() method, it will invoke a normal method which in turn invokes future method, but still got the same error      FATAL ERROR: Future method cant be called from future or Batch   ie.,   global class BatchClass implements Database.batachable<Sobject> {    global Iterable<ScheduledReport__c> start(Database.BatchableContext BC)  {         query=[];        return query;  }  global void execute(Database.BatchableContext BC, List<ScheduledReport__c> scope) {      FutureClass.normalMethod(mapRecords);   }    global void finish(Database.BatchableContext BC){   }  }   Future Class:   global class FutureClass {  global static void normalMethod(Map<> mapR) {      futureMethod(mapR);  }  @future(callout=true)  global static void futureMethod(Map<> m) {      //some code;   }  }   Scenario 3 :  Instead of invoking future class method from batch i tried updating list of records and done checkbox value to true and i've implemented after update event trigger to get the all the records in which checkbox values are true and from trigger i tried invoking future method , still didnt work , i got an error      FATAL ERROR: Future method cant be called from future or Batch   Please help me out.   Thanks !


Irreducibly of $x^5-x-1$ over $\mathbb{F}_3$

Using the affine linearized polynomial $f(x)=x^p-x-b$ is irreducible over $\mathbb{F}_q$ if and only if $\operatorname{Tr}_{\mathbb{F}_q/\mathbb{F}_p} \neq 0$. But here $\mathbb{F}_3$ is not a field extension of $\mathbb{F}_5$.  Also we have that: Let $a \in \mathbb{F}_q$ and let $p$ be the characteristic of $\mathbb{F}_q$. Then the trinomial $x^P - x - a$ is irreducible in $\mathbb{F}_q[x]$ if and only if it has no root in $\mathbb{F}_q$.


I'm trying to solve this integral in terms of elementary functions but my result does not seem to match up with Sage's or WolframAlpha's.   $\int \frac{1}{x^4+1} = \frac{x}{1+x^4}+\int \frac{4x^4}{(1+x^4)^2}$   Where:  $4\int \frac{x^4}{(1+x^4)^2} = 4\int \frac{u-1}{u^2} = 4\log u + \frac{4}{u}$  So the original integral is  $\int \frac{1}{x^4+1} = \frac{x}{1+x^4} + 4\log (1+x^4) + \frac{4}{1+x^4}$  Where did I go wrong here? Thanks.


Table coming before appendix despite being placed in appendix section

I am looking to have a table as the first item in my appendix but when the file is built the table is coming above the appendix.  So it builds as:  Table  Appendix Title  Appendix A  Where I want:  Appendix Title  Appendix A  Table  My code:  \section*{Appendix} \appendix \section{Dissemination Opportunities} \begin{table} \caption{Conferences} \begin{tabular}{|p{17cm}|}   \hline   AMBIENT - The Fourth International Conference on Ambient Computing, Applications, Services and Technologies. \\   \hline   BHI - International Conference on Biomedical and Health Informatics. \\   \hline   CBMS - International Symposium on Computer Based Medical Systems. \\   \hline   Pervasive Health - International Conference on Pervasive Computing Technologies for Healthcare. \\   \hline \end{tabular} \end{table}


Is it possible to make a Python regular expression capture group non matching if it matches a subsequent capture group?

I have this regex in Python  import re regex = '(?P<name>[\w\-+\.&\s]+)[\s\-]+(?P<form>GmbH & Co\. KG|KG)' print(re.match(regex, "Test GmbH & Co. KG").groupdict())   This will return      {'name': 'Test GmbH & Co.', 'form': 'KG'}   But I'd like      {'name': 'Test', 'form': ' GmbH & Co. KG'}   I am thinking about making the first capture group non-matching if there is a match in the second group. Another idea was to somehow instruct the regex engine to start at the end. Also fiddled around with greedy and lazy modifiers. But I am a noob with regexes and could really need a hint.


Is it true that Manchester airport had no arrivals or departures the morning of Sept 2nd 2017?

For Tuesday 2nd September 2017, between 05.45 am - 12.45 pm at Manchester, the airline says no flights were made either incoming or outgoing due to weather conditions. Is this true?


How do I identify Ubuntu VM is running in which cloud (VMware, AWS, Google) from Ubuntu CLI?

I need identify Ubuntu VM is running in which cloud (VMware, AWS, Google) from Ubuntu CLI?


What I have learnt that we use "among" when we are talking about more than two, and "between" for two.   But  1 Between the students in the class which is the best?  2 The U.N.O. insists on better understanding between the countries of the world.   3 There is a treaty between the five great power.  But in these sentences "between" is used. There are many more examples like this. When we use "between" for more than two things or people. Can you explain the reason behind this?  Thank you


Deployment to Production org through VS code

I am trying to deploy the components to production org through VS code. I am getting the below error "sf:INVALID_OPERATION: INVALID_OPERATION: testLevel of NoTestRun cannot be used in production organizations" Where can I edit the setting testLevel ? And I am not trying to deploy any apex class either.


Where can I go to get good reference images for modelling characters?

Im still kind of new to blender, but I am struggling to find any good reference images / characters online to help me practice retopo and sculpting. Any suggestions?


This might be a dupe but I couldn't find it, so I am posting it, taking a dreadful risk.  Alright, someone posts a comment on my post. It goes to my inbox. He then edits his comment, the inbox message doesn't reflect this change. It stays like that.  Noticed this here:    Original message is "yes, completely! :D"    After edit, it is this...  So, is this  or ?


My audio output is broken, but I also have an audio input which I don't need.  Is there any chance that I could change them so the input will be the output?


How to use Boolean input in Arcgis with arpy? (Desktop edition)

So, my code goes something like this:  haveopenvel = arcpy.GetParameterAsText(10) arcpy.AddMessage(haveopenvel) if (haveopenvel == True):#error     openvelftsec = Raster(openvelftsec)     arcpy.MakeRasterLayer_management(openvelftsec,"openvelftsec","#",ext,"#") else:     ##Optional Model that can be    However, the loop always goes into the else loop even when I check mark the input in the tool. COuld anyone tell me what is going wrong here?


I want to install Skype in Ubuntu 14.10. How do I do this?


$y_i=\beta_0+\beta_1x_i+\varepsilon $ is a simple linear model.   We know $R^2=1-\frac{SSE/(n-k-1)}{SST/(n-1)} $ where   $SSE=Y'(I-H)Y=\sum(y_i-\hat{y})^2$   and $SST=Y'(I-P_1)Y=\sum(y_i-\bar{y})^2$   (for $H=X(X'X)^{-1}X'$ and $P_1=\frac{1}{n}\mathbf{11'}$ and $\mathbf{1}=(1,\cdots,1)_{1\times n}'$, $Y=(y_1,y_2,\cdots,y_n)'$,$X=\begin{bmatrix} 1 & x_{11}\\   1& x_{21}\\   \vdots&\vdots \\   1&x_{n1 }  \end{bmatrix}$)   Define $r=\frac{\sum (y_i-\bar{y})(x_i-\bar{x})}{\sqrt{\sum (y_i-\bar{y})^2\sum (x_i-\bar{x} )^2}}$.  Show $R^2=r^2$  Thanks in advance.


Expected value and standard deviation of $X^2$ in terms of moments of $X$

If $X$ is a discrete random variable with expected value $\mu$ and standard deviation $\sigma$, and $Y = X^2$, how can we describe the expected value and standard deviation of $Y$? Would expected value of $Y = \mu^2$?


When opening a folder, by default it always shows hidden files. I can uncheck the view option and they disappear but reappear on the next opening with the hidden files option re-checked. Have I inadvertently changed an option or is this a bug? No-one else seems to have encountered this.


Dual Boot - Transfer space from one partition (Ubuntu) to the other (Windows)

I have Dual Boot. I am currently running out of space on my Windows partition (/dev/nvme0n1p3). However, there is plenty of space on my Ubuntu partition  (/dev/nvme0n1p6). Therefore, I would like to move 70 GB from Ubuntu to Windows.  How can I do this, in order to safely transfer free space to Windows? I already have Ubuntu on my USB, and I know that I should use GParted from it. But I do not know how to deal with GParted, moving to right/left the spaces and so on. I don't want to mesh it up. Thanks!


Linear Regression: P-values of t-test of significance of regression coeficients are same as p-values of F-test about submodel

Suppose we have regression problem:  $$Y = \beta_{0}+\beta_{1}X_{1} + \beta_{2}X_{2} + \epsilon \text{, } \epsilon \sim \mathcal{N}(0,1),$$  where $X_1 \sim U(0,1)$,$X_{2} \sim U(1,2)$, and we suppose our model with regression function  $$m:=E[Y|X_1,X_2] = \beta_{0}+\beta_{1}X_{1} + \beta_{2}X_{2}. $$  We apply OLS estimation of coefficient and receive estimate of regression coeficeint. Let's do this in $\verb|R|$:  X1 <- runif(1000,0,1) X2 <- runif(1000,1,2) Y <- X1 + X2 + rnorm(1000,0,1) model <- lm(Y ~ X1 + X2) summary(model)  Coefficients:              Estimate Std. Error t value Pr(>|t|)     (Intercept)     0.1401     0.1828   0.766    0.444     X1              1.0250     0.1150   8.909  < 2e-16 *** X2              0.9247     0.1139   8.119 1.37e-15 *** ---  Signif. codes:   0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1  Residual standard error: 1.026 on 997 degrees of freedom Multiple R-squared:  0.1276,    Adjusted R-squared:  0.1259  F-statistic: 72.94 on 2 and 997 DF,  p-value: < 2.2e-16   Next, we want to test, if the regression coeficient $\beta_2$ is significant or not, so here is T-test for this:  $$H_{0}: \beta_{2} = 0$$ $$H_{1}: \beta_{2} \neq 0$$  Aproppiate test statistic is:  $$T_n = \frac{\hat{\beta_{2}}}{S.E(\hat{\beta_{2}})} \sim t_{n-r},$$  and p-value:$2min\{CDF_{t}(t_{0}), 1 - CDF_{t}(t_0)\}$, where $CDF_t$ is cummulative distribution function o $t$-distribution with $n-r$, in ou case $1000-3$ degrees of freedom. Let's suppose, that we also made test about submodel:  $$H_{0} Y \sim X_{1} \text{ holds} (M^{0})$$ $$H_{1} Y \sim X_{1} + X_{2} \text{ holds} (M).$$  Test statistics is $F = \frac{\frac{SSe^0 - SSe}{r - r_{0}}}{MSe} \sim F_{r-r_0,n-r}$ and p-value:$1-CDF_f(f_0)$, where $CDF_f$ is cummulative distribution function of F-distribution with $r-r_0$ and $n-r$ degrees of freedom. In $\verb|R|$ let's make an test about submodel:  m0 <- lm(Y ~ X1) anova(m0,model)  Analysis of Variance Table  Model 1: Y ~ X1  Model 2: Y ~ X1 + X2     Res.Df    RSS Df Sum of Sq      F    Pr(>F)      1    998 1118.2                                    2    997 1048.8  1    69.352 65.926 1.373e-15 ***  --- Signif. codes:   0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1   Now there is a question, i know that if $X \sim t_{n-r}$, then $X^2 \sim F_{1,n-r}$. So if we squared t-value in our summary table, in line where regression coeficient $\hat{\beta}_2$ is, we geta f-value in output in test of submodel, so that's okay, but we have also same p-values, but p-value in summary table is computed from t-distribution, not squared distribution, and this numbers implies that $2min\{CDF_{t}(t_{0}), 1 - CDF_{t}(t_0)\} = 1-CDF_f(f_0)$, but i think this is not really true. What am i missing, how it is possible, that p-value which are computed from two different distributions are same ? (and this is not only for this case, but for every liner regression problems). Why p-values are same ? Please help.  In all cases i asuume normal linear model, that's why i assume those distribution of test statistics under $H_0$ hypothesis.


How to detect Intervals of Frozen Videos

I'm trying to detect intervals where a given video is frozen. Looking at a related post , apparently FFmpeg has a filter named freezedetect which exactly does this. But the post had no accepted answer, neither any examples.  How can we use FFmpeg for frozen video detection? Any other tool and libraries, as long as free, is also welcome.


So I did player.forceav speedmult 10000000 as a joke and now I can't play. The character is stuck in a infinite running loop. How do I undo this so I can continue my game?


I can't uninstall Ubuntu and I have a single boot

I'm new to the PC-building world and I built my first PC. I didn't want to pay for Windows so I found Linux was free and Ubuntu was the best one. Well now I have Windows 8 on a USB drive and I can't uninstall Ubuntu.


Cannot install Apache. Missing Dependencies that will not install

I am trying to install LAMP on my new server. The problem is that I keep getting a error. Here is what it is:  root@178658:~# apt-get install lamp-server^ Reading package lists... Done Building dependency tree        Reading state information... Done Note, selecting 'mysql-server-core-5.5' for task 'lamp-server' Note, selecting 'mysql-server-5.5' for task 'lamp-server' Note, selecting 'mysql-client-core-5.5' for task 'lamp-server' Note, selecting 'apache2-mpm-prefork' for task 'lamp-server' Note, selecting 'libapache2-mod-php5' for task 'lamp-server' Note, selecting 'php5-mysql' for task 'lamp-server' Note, selecting 'php5-common' for task 'lamp-server' Note, selecting 'php5-readline' for task 'lamp-server' Note, selecting 'mysql-client-5.5' for task 'lamp-server' Note, selecting 'mysql-common' for task 'lamp-server' Note, selecting 'php5-cli' for task 'lamp-server' Note, selecting 'libmysqlclient18' for task 'lamp-server' Note, selecting 'apache2-data' for task 'lamp-server' Note, selecting 'apache2' for task 'lamp-server' Note, selecting 'mysql-server' for task 'lamp-server' Note, selecting 'apache2-bin' for task 'lamp-server' Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  apache2-bin : Depends: libapr1 (>= 1.5.0) but it is not installable                Depends: libaprutil1 (>= 1.5.0) but it is not installable                Depends: libaprutil1-dbd-sqlite3 but it is not installable or                         libaprutil1-dbd-mysql but it is not installable or                         libaprutil1-dbd-odbc but it is not installable or                         libaprutil1-dbd-pgsql but it is not installable or                         libaprutil1-dbd-freetds but it is not installable                Depends: libaprutil1-ldap but it is not installable  mysql-client-5.5 : Depends: libdbd-mysql-perl (>= 1.2202) but it is not installable                     Depends: libdbi-perl but it is not installable                     Depends: libterm-readkey-perl but it is not installable  mysql-server-5.5 : Depends: libdbi-perl but it is not installable                     Recommends: libhtml-template-perl but it is not installable  mysql-server-core-5.5 : Depends: libaio1 (>= 0.3.93) but it is not installable  php5-common : Depends: php5-json but it is not installable E: Unable to correct problems, you have held broken packages.'   Does anyone have any idea how to fix this. I already attempted to grep to find broken packages, however, it does not show anything. This is a completely stock install.  Thanks.


How do I know if I changed a setting in winetricks

Right now with the Wine 1.3.35 I do not know if I have a setting activated or not, for example:  Here you see an image of the "Change Settings" option in winetricks but they do not appeared marked or at least stay marked after I have checked them. How do I know which settings are activated and which are not. In the past I could do this in the sound tab for example when I wanted to emulate sound, full sound, alsa, oss or pulseaudio. Since the options are now gone and only found in winetricks I check them but they do not stay activated or shown after closing winetricks. I may be closing winetricks wrong or maybe there is another option somewhere to "save changes" but what I normally do is:  Open winetricks Select default wineprefix Select change settings Activate the settings I want and press the OK button  If I go back to the change settings option they do not appear marked. Looks like nothing was done.


Space used by /home does not match df -h

I am seeing a big constant increase in the space amount taken in the /home directory  df -h says:  Filesystem      Size  Used Avail Use% Mounted on /dev/md2        127G   52G   70G  43% /home  However, once I am in the /home directory,  du -hs * | sort -h indicates the sum of the directories is about 20G  Therefore there is 30G of data I can't identify the origin of.  What should I look for to identify such a discrepancy between what df -h says and the actual content of the /home directory?  Edit: restarting nginx fixed the problem after using lsof | grep "/home" | grep deleted to identify what process was still using deleted files in memory


“Three eggs is plenty” Vs. “a number of boys were absent”?

I found these two sentences and I want an explanation for them to illustrate why they go like:         A number of boys were absent.      Although the subject is singular, but the sentence is considered as plural?         three eggs is plenty       And in this example, the writer used is instead of are.


Do I get a finished slot if I start QProcess using startDetached

Do I get a finished signal if I start a QProcess using startDetached()? I'm trying to start a process, but I need to be able to get an event when the process has terminated.


Making the mindset transition - projection in OLS regression

For example, the space spanned by the columns in  $$\mathbf{X} = \begin{bmatrix} 0 & 0 \\ 1 & 0 \\ 0 & 1 \end{bmatrix}$$  is the y-z plane. Further,  $$\mathbf{X'X} = \begin{bmatrix} 1 & 0  \\ 0 & 1 \\ \end{bmatrix}$$  $$\mathbf{P = X(X'X)^{-1}X'} = \begin{bmatrix} 0 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}$$  $$\mathbf{y} = \begin{bmatrix} 1 \\ 2 \\ 1 \end{bmatrix}$$  Then to project y onto the column space of X,  $$\mathbf{Py} = \begin{bmatrix} 0 \\ 2 \\ 1 \end{bmatrix}$$  I understand why this works. What I don't understand is how this works for linear regression - in the above example, each row represents a dimension in space I think (row 1 - x, row 2 - y, etc). In linear regression, the columns act as the dimensions. How does this transition work?  Thank you for any help!


Let $n \geq 1$ be an odd integer. Show that $D_{2n}\cong \mathbb{Z}_2 \times D_n$. I define a map $$\phi:D_{2n} \rightarrow \mathbb{Z}_2 \times D_n$$ by $R \mapsto (0,r^{\frac{n+1}{2}})$ and $M \mapsto(1,m)$. Then I am stuck at showing the map is bijective. By the way, do we need to show that $(0,r^{\frac{n+1}{2}})(1,m)(0,r^{\frac{n+1}{2}})^{-1}=(1,m)$ ? If we can prove this, then what can we conclude?


Set the line separation in a tabu table equal to the line separation in the document

As is known, the tabu environment does not automatically adjust the vertical distance between a cell with multiple lines and another cell, cf.  and .  This can be adjusted with tabu's \tabulinesep command, but instead of setting this separator to some arbitrary value, I would like it to be the same as the vertical distance between lines in the document as such. How do I do that?  \documentclass{article} \usepackage{tabu,setspace}     \singlespacing \parindent=0pt  \begin{document} %   \tabulinesep = <whatever the distance between lines in the document is>     \begin{tabu} to\linewidth{lX}         Lipsum & Fgyjgh Fgyjgh Fgyjgh Fgyjgh Fgyjgh Fgyjgh Fgyjgh Fgyjgh Fgyjgh Fgyjgh Fgyjgh\\         Lipsum & FkRtfh\\     \end{tabu} \end{document}


Argue that the impromper integral $\int_1^\infty \frac{1-e^{-2x^2}}{x^2}$ for $x \neq 0$ is convergent

Consider the function $$ g(x) = \frac{1-e^{-2x^2}}{x^2} $$ for $x \neq 0$. Then I have to show that the improper integral $$ \int_0^\infty g(t) $$ is convergent.   My attempt  As $e^{-2x^2} \leq 1$ for all $x \in \mathbb{R}$ we have that $$ \frac{1-e^{-2x^2}}{x^2} \leq \frac{1}{x^2} $$ Thus as the limit  $$ \lim_{b \rightarrow \infty} \int_1^b \frac{1}{x^2}dx = 1 $$ exists it follows from the comparison criteria that the improper integral is convergent. Is this approach alright? I think it is. Thanks for your help.


Can I use "Crannies and nooks" instead of " nooks and crannies"

I have only found the usage of "nooks and crannies", but no references to the "crannies and nooks" anywhere. Can I reverse them and use it ? Thanks


wifi connectivity problem in ubuntu 16.04

I have a problem activating my wifi on ubuntu 16.04, I used a debug script and the result is on this link:  .. any help with this?


I want to schedule Airplane Mode during the night (10PM–6AM) on my iPhone.  How can I do that?  I used to turn off my previous phone (a non-smartphone). I do that especially to save some battery life.


Did I just purchase too much camera for me?

Just purchased Nikon D3300 SLR camera 18-55mm G VR DX II AF-S Zoom Lens w/32CB card.  I am going from a P&S to this SLR.  Wondering if it is too much for a beginner.


I'm working on a project that refers to optics. the question says when a laser beam is aimed to a wire ( perpendicular to the surface ), a circle of light then will be seen on a the surface. I somehow know its explanation, but there's something I need to know. Dose Diffraction happen in this phenomenon?  Thanks in advance!


What is the meaning of 'N-PLURAL' in the Collins COBUILD dictionary?

N-PLURAL represents plural noun according to the explanation in the Collins COBUILD dictionary. Can I interpret it as a noun that is countable but unable to be used in singular form and only able to be used in plural form?


Why is $y{(\log_a(x))} = \log_a{(x^y)}$?   I feel like I'm missing something here. Sorry if I put the title wrong..


An Olympiad problem in prime numbers :can we proof that "n" is prime in this case "

Let x,n ∈ $\mathbb{N}$  such that :  1+$x^1$+$x^2$+$x^3$+....+$x^{n-1}$ is prime .  Proof that n is prime .  I actually suppose that n isn't prime absurdly so n=p×k such as p is prime ,I also use the $a^n$-$b^n$ formula  and find that $x^k$-1/$x^1$-1 so that means that k=1 and then  n=p which is absurd. Does Anyone has another answer ?


Looking for a data structure which provides both random and "sequential" access

This is a programming problem I come across very often and was wondering whether there is a data structure, either in the C++ STL or one I can implement myself which provides both random and sequential access.  An example of why I might need this:   Say there are n types of items, (n = 1000000, for example), and there's a fixed number of each type of item (for example, 0 or 10) I store these items into an array, where the array index represents the type of the item, and the value represents how many items of that given type are there Now, I have an algorithm which iterates over all EXISTING items. To obtain these items, it is very wasteful to iterate over the entire array when all the entries are 0, except for i.e. Array[99999] and Array[999999].   Normally, I solve this by using a linked list which saves the indices of all the nonzero array entries. I implement the standard operations in this way:  Insert(int t):   1) If Array[t] == 0, LinkedList.push_back(t);  2) Array[t]++;  Delete(int t):  1) If Array[t] == 1, find and remove t from LinkedList;  2) Array[t]--;  If I want O(1) complexity for the deletion operation, I make the array store containers instead of integers. Each container contains an integer and a pointer to the respective element of the LinkedList, so I don't have to search through the list.  I would love to know whether there is a data structure which formalizes/improves this approach, or whether there's a better way to do this altogether.


What are the rules for factorial manipulation?

I know that   $$(k+1)! - 1 + (k+1)(k+1)! = (k+2)! - 1$$  thanks to wolframalpha, but I don't understand the steps for simplification, and I can't seem to find any rules about factorial manipulations on google.  Can someone explain this please?


How can I change xfce bottom panel to the top?

I am using Xubuntu 12.10 and would like to change the panel which is currently on the bootm to the top.  This is the opposite of what most people using Unity want to do.    I have done this in the past but have forgotten how and could not find the info easily this time. Cheers,


Sneak Damage multiplier: Does it apply to magical damage too?

Example:   Dagger 1 = 18 Damage, 25 Shock  Dagger 2 = 33 Damage, no magic  Using the above, when I sneak attack and have the 15x multiple then is the damage caused by Dagger 1 is (18+25)*15 or (18*15)+25 ?  Same question with bows and arrows, does the multiplier apply to potion damage or/and the magical(enchanted)?  In other words, do the multipliers apply to the base damage only or to the final damage being caused by the weapon (base+magical+skill+potion+perks etc)?  I am confused. :-?


What countries have the most Stack Overflow users per capita?

This is a follow-up to   As , I've calculated the number of Stack Overflow users per capita.  I'm making this a separate post since there were already so many charts and tables on the other one.  But, lest anyone accuse me of rep-whoring, I'm making this post CW.  I have once again provided the full data in a Google Docs spreadsheet, and it is also available in Excel format.  Edit (2010.01.06): My previous post had incorrect per-capita data for the states in the US. I think I pasted the population data into my spreadsheet sorted by state name, when I had sorted the data by number of users. The result was that states had the incorrect populations. I have updated the chart and the Google spreadsheet to reflect the accurate numbers. And I apologize to all the Wasingtonians (state and DC) and Delewarians I offended. :)    Overview in charts  Worldwide    Europe    United States    Users per capita by country (top 20)   Country         Users per 1,000,000 residents --------------------------------------------- Bermuda         15.3846 Isle of Man     12.5000 New Zealand     11.0939 Norway           9.5049 Iceland          9.3971 Sweden           8.9092 United Kingdom   8.7289 Australia        8.6148 Ireland          7.4003 Malta            7.2529 Canada           7.1874 Denmark          7.0659 Israel           6.7025 United States    5.8728 Netherlands      5.7398 Finland          5.0493 Switzerland      4.5185 Slovenia         4.3967 Belgium          3.8123 Estonia          3.7302   Users per capita by state/province  United States (top 20)   St/Prov                   Users per 1,000,000 residents ------------------------------------------------------------- DC  District of Columbia  27.0347 DE  Delaware              19.4710 WA  Washington            16.3378 VT  Vermont                9.6576 MA  Massachusetts          8.1564 CO  Colorado               8.0981 OR  Oregon                 7.9154 UT  Utah                   6.5779 NY  New York               6.0543 CA  California             5.6860 MN  Minnesota              5.5551 ME  Maine                  5.3173 ID  Idaho                  5.2500 VA  Virginia               5.1486 PA  Pennsylvania           5.1413 NE  Nebraska               5.0464 AR  Arkansas               4.9030 WI  Wisconsin              4.7975 RI  Rhode Island           4.7583 MD  Maryland               4.4377   Canada   St/Prov                   Users per 1,000,000 residents ------------------------------------------------------- YT  Yukon                 29.9025 PE  Prince Edward Island  21.3672 BC  British Columbia       9.5023 AB  Alberta                6.0565 ON  Ontario                5.7751 NB  New Brunswick          4.0090 SK  Saskatchewan           3.9070 NS  Nova Scotia            3.1931 QC  Quebec                 2.9553 MB  Manitoba               0.8238   United Kingdom   St/Prov           Users per 1,000,000 residents ----------------------------------------------- Scotland          6.1914 England           5.3065 Wales             1.9969 Northern Ireland  1.1268   Australia   St/Prov                            Users per 1,000,000 residents ---------------------------------------------------------------- WA   Western Australia             7.1232 VIC  Victoria                      6.5319 NSW  New South Wales               6.0966 QLD  Queensland                    5.4996 SA   South Australia               4.4178 ACT  Australian Capital Territory  2.9420   Stack Overflow data retrieved from StatOverflow sandbox on 2009-10-05 (September 2009 data dump) for users with rep >= 1000.  Population data retrieved from Wikipedia on 2009-10-13.  Just for TXI


Assign a ScriptableObject to MonoScript through code

Sample code:  public class Item : MonoBehavior {     public ItemObject item; //the scriptable object      void Start(){ // do stuff}  }   Normally I would drag and drop the asset of the ScriptableObject in the inspector.   How can I find and assign the asset (from Project View) through the script during runtime and possibly add it to a List<> or Array[]?


Python convert int to string preserving zeros

i'd like to convert a decimal to a string, where zeros at the end are preserved. Using str method erases the last zeros.  Example:  number=0.20   Goal: "0.20"  e.g. using: str(number)="0.2" doesn't seem to work.


Methods to ban bots, force attacks on my server

I've been getting some bots trying to get hold of my database by mass attacking /sertup/scripts.php of various database program. I wanna ban such activities.  The closest I found was this:   What is the best way, or is there any scripts to ban bots from attacking?  Thanks.


Does a Ghana passport holder transiting through Lisbon Portugal en route to Morocco require an airport transit visa ?


How can I create this specific executable in Ubuntu 14.04?

So I'd like to run World of Warcraft's .exe (wow.exe) with the following command from the terminal:   __GL_THREADED_OPTIMIZATIONS=1 WINEDEBUG=-all wine wow.exe -opengl   The reason for this is because when I launch the game with this, it literally doubles my fps.  Before I could do this so, I need to type the cd /..path/ in the terminal and then the command above.   Is there any way to make a script for this, so I could launch this with one click or two?  Thanks forward.


Battery percentage on iPod touch 5G iOS 8

How do I get the battery percentage on the top right of my screen please help I tried many other things but didn't work


If A is nonempty and has an upper bound proof that inf(-A)=-sup(A). And if A has a lower bound sup(-A)=-inf(A). I've already shown that -A has lower bound for first case and has an upper bound for second.


Python: How to get the updated dictionary in 1 line?

In python, I have a dictionary named dict_a :   dict_a = {'a':1}   and I want to get a new dictionary dict_b as the update of dict_a,at the same time I don't want to change the dict_a, so I used this:  dict_b = copy.deepcopy(dict_a).update({'b':2})   However,  the return value of dict.update is None, so the above code doesn't work. And I have to use this：  temp = copy.deepcopy(dict_a) temp.update({'b':2}) dict_b = temp   The question is, how to get my goal in one line? Or some


Given reals $a_1, a_2, \cdots, a_{n - 1}, a_n$ such that $\sum_{i = 1}^na_1^2 = 1$. Calculate the maximum value of $\sum_{cyc}|a_1 - a_2|$.

Given reals $a_1, a_2, \cdots, a_{n - 1}, a_n$ such that $a_1^2 + a_2^2 + \cdots + a_{n - 1}^2 + a_n^2 = 1$ $(n \in \mathbb N, n \ge 3)$. Calculate the maximum value of $$\large |a_1 - a_2| + |a_2 - a_3| + \cdots + |a_{n - 1} - a_n| + |a_n - a_1|$$   There must exist $1 < k < n$ such that $a_{k - 1} \le a_k \le a_{k + 1}$  $ \implies |a_{k + 1} - a_k| + |a_k - a_{k + 1}| = |a_{k + 1} - a_{k + 1}|$.  Repeat the above process for about $n - 1$ times and we have that $$|a_1 - a_2| + |a_2 - a_3| + \cdots + |a_{n - 1} - a_n| + |a_n - a_1| \le 2 \cdot \min(|a_i - a_j|, 1 \le i < j \le n)$$  Now we just have to find the maximum value of $\min(|a_i - a_j|, 1 \le i < j \le n)$ for $$a_1^2 + a_2^2 + \cdots + a_{n - 1}^2 + a_n^2 = 1$$, which I don't know how.


Redirect to another page after submitting form

I have a sharepoint 2013 list. When the user clicks on edit this list to open it in  a datasheet view...after making changes when clicked on stop ,the data should be saved and redirect to another page. Is this possible?   Thanks in advance


Script Tag Error - Aura Lightning Component

I am able to include a JS file as static resource in my lightning component. But when I add "<<'script'>>" tag in the JS file it gives an error.  I want script tag as i need to use src attribute in the JS file and then call it through static resource in my lightning component      JS Code


Show that $a^2$ cannot be congruent to 2 or 3 mod 5 for any integer

a)  Show that $a^2$ cannot be congruent to $2$ or $3  \bmod 5$ for any integer.  $a^2≡2,3 \pmod5$   $a≡0,±1,±2\pmod5 )⟹a^2≡0,1,4$. But $2,3$ are not congruent to $0,1,4\pmod5$.  I am not sure if I did it right, please check it for me  (b)  Show that if $5\mid x^2+y^2+z^2$ then either exactly one of, or each of  $x, y, z$ are a multiple of $5$.  I really can not figure it out :(


I've only been using Linux for a few weeks (I'm a recent convert) and in my system, I have several drives, an SSD with Windows 10 on, and an HDD I use for mass storage. Both of these drives have padlock symbols on every folder and file and I can't move files around. I believe that the permissions for both are set to read/write. Any help would be very gratefully appreciated.


I want to extract the last occurrence of a string from a long string where this string occurs one or more times. I've tried a few different look ahead expressions but haven't been able to figure this out.  The string is something like:     AAA|BBB|Teststring:21|ZZZ|Teststring:23|Test 50   I tried using something an expression like:     (?:Teststring:\d+.(Teststring:\d+).$)   This works for those cases where there are more than one occurrences of Teststring, but fails when there is only one. So it works in the above test example but will fail for the below string:     AAA|BBB|Teststring:21|ZZZ 10


Find the best font for rendering a codepoint

How to find the appropriate font for rendering unicode codepoints ?  gnome-terminal find that characters like «🉃⼼😻🕲🝤» can be rendered with fonts like Symbola rather than my terminal font or the codepoint-in-square fallback (). How ?


i have a phone and its run android 4.1 (jelly bean) I just bought it on 02/19/2013   i interested to try ubuntu touch in this device  so my question is, if ubuntu touch just can be run in android google nexus are the ubuntu can be run at my android sony experia l?  please answer


How many functions exist where their derivative is equal to the original function. For example:  $y = 0$ and $\frac{dy}{dx} = 0$  $y = e^x$ and $\frac{dy}{dx} = e^x$  Are there any other examples of these?


How to solve " java.lang.NullPointerException: ' on Equals function in Java?

@Override     protected void onStart() {         super.onStart();          databaseVaccine.addValueEventListener(new ValueEventListener() {             @Override             public void onDataChange(@NonNull DataSnapshot dataSnapshot) {                 String k;                   vaccineList.clear();                  for(                         DataSnapshot vaccineSnapshot :dataSnapshot.getChildren())                  {                     //getting farm                     Vaccine vaccine = vaccineSnapshot.getValue(Vaccine.class);                     k= getSfuff();                     if (vaccine.CattleVaccineID.equals(k)) {                          vaccineList.add(vaccine);                      }                     //adding farm to the list                  }                  VaccineList adapters = new VaccineList(ViewVaccination.this, vaccineList);                 ListViewVaccine.setAdapter(adapters);             }              @Override             public void onCancelled(@NonNull DatabaseError databaseError) {              }         });     }     public  String getSfuff() {         Bundle bundle = getIntent().getExtras();           String stuff = bundle.getString("cattleID");         return stuff;       }   It's showing following error on the line   "if (vaccine.CattleVaccineID.equals(k)) "  java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference  Can someone find a solution to solve this error? I have tried many options and those didn't work properly.


Question about Eulers formula $v - e + f = 2$

Generally the theorem by Euler is stated:  If $G$ is connected and planar then $v - e + f = 2$ (where $v$ is the number of vertices, $e$ is the number of edges and $f$ is the number of faces of the graph $G$).  My question is:   Is this theorem an equivalence? I.e. is it true that if the equation $v - e + f = 2$ holds for a graph $G$ then $G$ is connected and planar.  Really thankful for any help with this. I couldn't find a counter-example myself, (i.e. a graph for which $v - e + f = 2$ holds but is either not connected or not planar) but I guess the theorem would be stated as an equivalence if it were an equivalence...


I live a couple of states away from a good offer on my car. I've already seen , but the distance makes our meeting at a bank to transact not practical.   Any thoughts on my offering a promissory note to deliver car, title, and keys in exchange for a cleared personal check ($10k) + money order ($50) to cover any potential bounced check?  I'd be fine with waiting for the check to clear and am just looking for a means to accept better offers outside the immediate area.


Starting from Ubuntu 12.04 (Precise Pangolin), Unity stopped supporting the Intellihide reveal mode for the Unity launcher. However, Ubuntu Tweak can still change the settings so that it does Intellihide, and it works well (at least in Unity 2D) unless you open Appearance Preferences. This is what I have been using to set the mode to Intellihide.  I want to know, what are the commands (like using gsettings, etc.) that I can use to set Intellihide this way because then I won't need to install Ubuntu Tweak just to change the launcher settings.


Radius of convergence and uniformly convergence

I think the radius of convergence for  $\displaystyle\sum_{n=1}^{\infty}\left(\frac{1}{n}-\sin\left(\frac{1}{n}\right)\right)x^n$, $x\in \mathbb R$ is:   $r^{-1}$=$\lim_{n\to \infty}$$|\frac{a_{n+1}}{a_n}$|=1   so we get that $r$=1.  But how can I show it formally?  After that, I have to show that $\displaystyle\sum_{n=1}^{\infty}\left(\frac{1}{n}-\sin\left(\frac{1}{n}\right)\right)x^n$ is uniformly convergent in the interval $[-r,r]$. Can I maybe use Weierstrass majoranttest? What can I use as majorant serie?


Why does java not work in chrome in ubuntu?

I know it doesn't work, and I just want to know why.


Power of a non upper triangular matrix be upper triangular

Can the $n-$th power of a non-upper triangular matrix be an upper triangular matrix?


I'm a native Vietnamese speaker. In Vietnamese we used the word "phim" (which is taken from French or English "film") to refer to just about any type of recorded cinematic video. I've tried to look in Cambridge and Oxford dictionaries but haven't got the satisfying definition. For example, :      "a series of moving pictures, often telling a story, usually shown in a theater or on television; film" (Cambridge Dict.)   So my question is: What does "movie/film" actually mean? Can shows like Charmed, CSI, The Walking Dead or Game of Thrones ever ever be referred to as "movies/films"? Can "movie/film" ever ever be a cover term for everything that is filmed and released in theaters or on TV, such as drama TV shows, documentaries, etc.?


C++ Object Instantiation - Which constructor is called when an object is instantiated using empty parenthesis

I am confused about the different syntax used for instantiating an object.   This is my class:  class Object {  private:      int field = 0;  public:      Object() = default; // Just for testing.     ~Object() = default; // Just for testing.      Object( const Object& obj ) = default; // Just for testing.  };   This is main method:  int main() {     Object b(); // ???     Object c{}; // default     Object d = Object(); // default     Object e = Object{}; // default     Object f ( Object() ); // ???     Object g { Object() }; // default     Object a; // default but avoid     Object h ( Object() ); // ???     Object i { Object{} }; // default     Object j = i; // copy     Object k( j ); // copy     Object l{ k }; // copy     Object m = { l }; // copy     Object n = ( m ); // copy     auto o = Object(); // default     auto p = Object{}; // default     return 0; }   I have no problem with the one's marked default or copy. I just want to know, which constructor is called for the one's with ??? as the default one is not called. Has it something to do with () initialization, as it can be seen.  I know this may not be important, but I am suspicious about it.  Can anyone help!


I would like to write the formula (in OpenOffice, but I imagine it won't be any different than Excel) to perform the following calculation:  -> Go through the values in column B from B1 to B30 and add them together. -> Only include the individual number Bn in the sum if An == "value".  So, I want to create a sum of column B but only include the numbers in the sum if their corresponding A column value is some "value".


Will an expired visa be a problem on departure?

I am a US citizen and I came to Spain for 90 days’ vacation but it will be the 91st day when I arrive at the airport to leave the country. Will I have any issues getting out of Spain or entering USA?   I don’t know what type of visa I have. When I bought the tickets, there were 91 days between arrival and departure.


How to differentiate $g(X)=\operatorname{tr}\left(X^{-1}\right)$?

Let $X$ be a square invertible $n \times n$ matrix. Calculate the derivative of the following function with respect to X. $$ g(X)=\operatorname{tr}\left(X^{-1}\right) $$ I'm stumped with this. As when I work through it I use  these two identities.  $$\frac{\partial}{\partial \boldsymbol{X}} \boldsymbol{f}(\boldsymbol{X})^{-1}=-\boldsymbol{f}(\boldsymbol{X})^{-1} \frac{\partial \boldsymbol{f}(\boldsymbol{X})}{\partial \boldsymbol{X}} \boldsymbol{f}(\boldsymbol{X})^{-1}$$  and 2. $$ \frac{\partial}{\partial \boldsymbol{X}} \operatorname{tr}(\boldsymbol{f}(\boldsymbol{X}))=\operatorname{tr}\left(\frac{\partial \boldsymbol{f}(\boldsymbol{X})}{\partial \boldsymbol{X}}\right) $$ I should arrive at the solution. using 1. I get $$d/dX(X^{-1}) = -X^{-1}\otimes X^{-1}$$. So the answer should be the trace of that right? which = $$tr(-X^{-1})tr(X^{-1}).$$ but the solution seems to be $$-X^{-2T}$$? which I can't see


Is there a built-in method for computing an SHA-1 or MD5 hash in Windows 7?


How to merge two array object element in jquery

input :  var b= [{     "cat_id": "1",     "cat_name": "teaching"   }];    var a= [  {     "username": "r",     "password": "r"   }];   I want output like this  [{"username":"r","password":"r","cat_id":"1","cat_name":"teaching"}]


JAVA: "Generic Array creation" Error while creating array

When I create array of LinkedList (of Integers) like this,  new LinkedList<Integer>[V];   it gives me error saying "Generic Array creation"  but when I create array like this  new LinkedList[V];   it works fine.  What is this error and what's going wrong here ?


Don't add whitespace as part of the values length in Javascript?

I have an if statement to check whether there is at least 15 characters before the textarea is considered valid in my form. I don't mind users adding whitespace but, I don't want it to count as part of the length for the value.  if(userApplying.value.length <= 14){      document.getElementById("applying_error").innerHTML =       "* please enter at least 15 characters in your message."      error = true; }//end of if   Answer in Javascript please.


Identical query & instance but other execution plans & performance

I have 2 identical queries . One is executed with parameters, the other is executed with hardcoded values. Somehow sql server is creating 2 different execution plans for the 2 queries. The first one is almost instantaniously completed. The other one takes +- 2 seconds to complete. The application is creating the second query(which takes the longest) .  How do i make the parameterized query take the same execution plan as the other one? I already tried rebuilding the statistics & indexes but with no success.  The execution plans in the screenshot are scrolled to the right top position, showing a clear difference in approach.


I started working on a new project, and I tried to render the scene, and I haven't changed any thing that I normally would, yet this time, instead of the rendering and the little orange squares rendering the image, there's nothing, its just a standard blank image that appears as soon as clicking render??? this really confused me, any help would be awesome.  Thanks


Is there anyway to pass an array as multiple arguments?

Let's say I have an array [2, 3], and I want to pass that into a function. Not as function([2, 3]), as function(2, 3). Is there anyway to do that, like function(pass(array))?


Download SSL certificate from aws certificate manager

I am using aws certificate manager for managing SSL. Recently I purchased a wildcard ssl *.example-private.com Now I need that SSL certificate to deploy on enterprise git instance on aws.   How can i download ssl from aws?


Java: why do I receive the error message "Type mismatch: cannot convert int to byte"

If you declare variables of type byte or short and attempt to perform arithmetic operations on these, you receive the error "Type mismatch: cannot convert int to short" (or correspondingly "Type mismatch: cannot convert int to byte").   byte a = 23; byte b = 34; byte c = a + b;   In this example, the compile error is on the third line.


Ridge Regression: When should the intercept be included ? What is the purpose of the intercept term?

I am trying to determine what is the purpose of including the intercept term in ridge regression.   In what situations should I include the intercept term ?  And in what situations should I not include the intercept term in ridge regression ?


Tool to convert Java source to C++ source

Before someone shoots me down, I am aware of the Java to binary compilers and I'm not after one of those.  I also know there will be no perfect tool that converts everything without any problems. I am aware that missing Java libraries are a major problem; however my source doesn't make use of many Java libraries except for stuff like String and prints. I only want to the tool to create the classes that the Java source references. In the case of the String stuff I am happy to fill in the gaps or fix at a later stage. I just want the tool to do the boring bits so I don't have to do the translation manually.  In the case of required classes etc, I will manually fix those at a later stage but would appreciate a pointer to something that at the very least gets enough of the boring stuff done.  Once again I want the source translated and not a compiler to produce a binary. Basically I want to take some Java stuff and convert it to C++ for later use in other projects.  EDIT ADDITIONAL NOTES  Sorry if I was not clear in my previous parts of this question. I know that Java is very much different from C++. I have some Java code which is mostly filled with processing arrays and bits and has almost no object creation. In a sense it is very self-contained and has few calls to other classes. These classes seem to be prime candidates for conversion; the other stuff will have to be rewritten but at the least some parts are leveraged.


Is there a shop like Cydia on iOS for Android?

Most apps in the Google Play store have a free version and a paid version. On iOS there is a shop called Cydia, where you can try out most apps for free before you buy them in the App Store.  Is there such a store for rooted Androids as well?  I know of the store  for free software     F-Droid is an installable catalogue of FOSS (Free and Open Source Software)


Proving by induction that $(5^{2n})-1$ is divisible by $8$ and $3$

Prove by induction that for all integers n that $5^{2n}-1$ is divisible by $8$ and $3$. Explain


Dropdown Not Showing Selected With Loaded Data

If I hardcode the data for a dropdown then I am able to get the dropdown selection showing using my code below:  HTML
     <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">         Make      </button>

Oldsmobile

Ford

Volkswagen

Chrysler

Pontiac

   JS  $('.dropdown-menu a').click(function(){     $('#make-selected').text($(this).text()); });   My issue is if I am loading my data from another source then it no longer shows the selection as shown below.  // the input for this is just a JSON file. function populateDropdown(jsonData) {     for (var m in jsonData) {         $('#make-dropdown').append('
' + jsonData[m] + '
')     } }  $('.dropdown-menu a').click(function(){     $('#make-selected').text($(this).text());     console.log("CLICKED" + this); });   The dropdown list gets populated but once I click the selection nothing happens.


How to formally prove that if $\lim \limits_{n \to \infty}a_n=\infty$, then  $\lim \limits_{n \to \infty}\frac{1}{a_n}=0$.  I got confused for how to mix between convergence to infinity and having finite limit. how do I write a proof to link between two things? ( by using $\epsilon $) and not just giving an example.  my proof:   let $M= \frac{1}{\epsilon}$. there exists such a $N\in\mathbb N$ s.t for every $n>N$, it is true that: $$a_n>\frac{1}{\epsilon}$$  we should prove that for every $\epsilon>0$ there exists such a  $N\in\mathbb N$, s.t for every $n>N$ $$\left|\frac1{a_n}\right|<\epsilon$$  so we take the N that satisfies the first conclusion, and that will mean for every $n>N$$$\left|\frac1{a_n}\right|<\epsilon$$


Calculating sequential numbers into sorted table using ArcGIS Desktop?

Is there a way to calculate a sorted field with sequential numbers?  I have seen  that outlines how to calculate sequential numbers, but this is always calculated on FID order, not on sorted order.  #Pre-logic Script Code: rec=0 def autoIncrement():      global rec      pStart = 1       pInterval = 1      if (rec == 0):           rec = pStart       else:           rec += pInterval       return rec  #Expression: autoIncrement()   An example of what I'm trying to do.  I've used an advanced sort to sort by year, month, day, and now want to have sequential numbers in the Seq field.  You'll see that my OBJECTID field is not in order, so the above code won't work.    Can this be done either in the Field Calculator or using an Update Cursor in arcpy?


I'm setting up my mysql installation (that still contains data). The problem is: I setted utf8 in several settings, but still doesn't work fine.  MySql is xampp-managed, and these are settings  +--------------------------+--------------------------------+ | Variable_name            | Value                          | +--------------------------+--------------------------------+ | character_set_client     | utf8                           | | character_set_connection | utf8                           | | character_set_database   | utf8                           | | character_set_filesystem | binary                         | | character_set_results    | utf8                           | | character_set_server     | utf8                           | | character_set_system     | utf8                           | | character_sets_dir       | C:\xampp\mysql\share\charsets\ | +--------------------------+--------------------------------+   I also edited my.ini:  ## UTF 8 Settings init-connect=\'SET NAMES utf8\' collation_server=utf8_unicode_ci character_set_server=utf8 #skip-character-set-client-handshake #character_sets-dir="C:/xampp/mysql/share/charsets"   My problem is accented words matches. Actually, if I select a field, the accent is "?".


Best battery configuration: 1s1p vs 3s1p vs 1s3p?

I’m designing a product prototype using a single board computer (like a Raspberry Pi) that requires an 8-18V DC supply. It has to become battery powered, so I’m looking into the best possible configuration. Besides the SBC, another component in the device requires a 9V supply. The SBC currently consumes about 200mA when powered from 12.6V and we expect about 1000mA peaks from the 9V device.  The simplest battery configuration seems 3 LiPo’s in series. I’d need an additional buck converter for the 9V rail. What worries me more is balanced gauging and charging of the cells. Compared to single cell LiPo charging it seems rather complicated and I’m having a hard time finding a simple yet effective (pair of) ICs that do the job without having to spend too much time setting things up. For reference, I was quite overwhelmed by TI’s bq40z60 all in one solution. Very nice but too complicated for the time and budget I have.  I could also use a single cell pack with high C rating and boost it up to 9V. Add a simple charge IC and single cell gauge like I used before in other designs and done with it. Of course the run time would be significantly lower than with 3s1p but so much quicker to build!  And I guess 1s3p would increase the runtime again but also complicate the charging and gauging, so I don’t think that is really a good option.  What would you do in a case like this?


How to fix null pointer exception in my code?

I'm trying to read a file and set each line from the file as the parameters to the object OS_Process that I made, then place those processes in a linklist queue. However, I keep getting a nullpointerexception. The data file looks as follows. Every new process data is on a new line.  3 //counter 1 3 6 //process 1 data 3 2 6 //process 2 data 4 3 7 //process 3 data   And this is my code      import java.io.*;     import java.util.*;      public class OS_Scheduler     {     public static void main(String[] args)     {         Queue<OS_Process> jobs = new LinkedList<OS_Process>();          try         {             System.out.print("Enter the file name: ");             Scanner file = new Scanner(System.in);             File filename = new File(file.nextLine());              OS_Process proc = null;             String s = null;             int a = 0, p = 0, b = 0;             BufferedReader input = new BufferedReader(new FileReader(filename));             StringTokenizer st = new StringTokenizer(s);             int count = Integer.parseInt(st.nextToken());             while ((s = input.readLine()) != null)             {                 st = new StringTokenizer(s);                 a = Integer.parseInt(st.nextToken());                 p = Integer.parseInt(st.nextToken());                 b = Integer.parseInt(st.nextToken());                 proc = new OS_Process(a, p, b, 0);                 jobs.add(proc);             }             input.close();         }         catch (Exception ex)         {             ex.printStackTrace();         }      } }


There should be a link to the review entry in the header after suggesting a tag wiki edit

When you suggest an edit to a post and view the post while it's pending, . But as noted in the , this linking hasn't been implemented for tag wikis/excerpts yet, partly because there are potentially two links to include and the wording is not entirely obvious, and partly because they're orders of magnitude less common.  Here's my suggested wording for the three cases.   Tag wiki excerpt only     Thanks for your edit!   This edit will be visible only to you until it is .  Tag wiki only     Thanks for your edit!   This edit will be visible only to you until it is .  Both     Thanks for your edit!   These edits will be visible only to you until they are peer reviewed (, ).        I can't directly address the prioritization of tag wiki edits, but I'd appreciate the corresponding  or  mark, at least.


Am I protected over the internet with ubuntu, do I need an antivirus?

I know that Ubuntu is secure, but I'm worried about my passwords when I login to my yahoo email, or my facebook. Do I need an antivirus on Ubuntu to be password protected when navigating over the internet?


Prove that the system $x\equiv a \pmod m$, $x\equiv b \pmod n$ has a solution iff $\gcd(m,n) \mid (a-b)$

My assignment is the following:  Prove that the system  $$x\equiv a \pmod m$$ $$x\equiv b \pmod n$$ has a solution if and only if $\gcd(m,n) \mid (a-b)$  My approach is the following:  [$\longleftarrow$] Let $x=a +r_1m = b + r_2n$, where $r_1$ y $r_2$ are whole numbers. So, $a-b=r_2n-r_1m\ (*)$. If we find  $d=$ GCD$(n,m)$, then $$n=N\cdot d$$ $$m=M\cdot d$$ Replacing in $(*)$ $$a-b=d(r_2N-r_1M)$$  [$\longrightarrow$] If $d=\gcd(n,m)$ and $d \mid a-b$, so $$d=\dfrac{n}{N}$$ $$d=\dfrac{m}{M}$$ and $\dfrac{n}{N}\Big |a-b$ y $\dfrac{m}{M}\Big |a-b$  How can I finish both sides of this proof?


I'd like to prove the following theorem :     Let $G$, $H$, $G'$, $H'$ four groups. If they are finite then   $$ \left\lbrace \begin{array}{ll} G\times H \simeq G'\times H' \\ G\simeq G' \end{array}\right. \quad \Rightarrow\quad H\simeq H'.$$   This not stands with infinite groups. Consider for example $G=\mathbb{Z}[X]$, $G'=\bigoplus_{n\geq 0}\mathbb{Z}$ and $H=\mathbb{Z}$, $H'=\lbrace \mathrm{Id} \rbrace$.  Our teacher proved the theorem using the following method : we first show that for all finite groupe $L$ the number of morphism beetwen $L$ and $H$ is the same that beetween $L$ and $H'$. Then we proved that the number of one to one morphism beetwen $H$ and $H$ is the same that beetwen $H$ and $H'$. We concluded by cardinality.  I'm okay with this proof but I find it a bit artificial. I've tried to find this theorem in books but after hours of rechearch I wasn't able to find any book which prove this theorem.  If you see another proof, or if you know where I can find it, please let me know. Thank you for your help.


How to merge two directories in Ubuntu 16.04?

I have two folders /var/first/app and /var/second/app. I have different files within both folders and few are same. I want to merge /var/second/app to /var/first/app. How can I do that?


How to query Sharepoint 2010 lists with sql?

I think it has to be a common task. We have some applications on sharepoint and we need to prepare reports with data from these applications. It would be great if we could use Reporting Services. We need to query this data with sql because we need to join with some other sources. How can I do this? Are there any 3rd party tools or any built-it mechanisms in sharepoint to use Sharepoint lists data like ms sql tables?


How to pass Username and password of Named Credentials in HTTP Get

I am trying to send an send a request using get method of HTTP Request and I need to pass the username and password of Named credentials in the URL as username as clientID and password as the client secret  Below is the code   @future (callout=true)     webservice static void requestCall(String first, String second, String third) {          HttpRequest req = new HttpRequest();         HttpResponse res = new HttpResponse();         Http http = new Http();        String url ='?first=' + first+ '&second=' + second+'&third=' + third+'&client_id=' + '{!HTMLENCODE($Credential.Username)}' + '&client_secret=' + '{!HTMLENCODE($Credential.Password)}';          req.setEndpoint('callout:Named_Credentials'+url);         req.setMethod('GET');         req.setCompressed(true);         req.setTimeout(120000);         try {             res = http.send(req);             System.debug(req);         } catch(System.CalloutException e) {             System.debug('Callout error: '+ e);             System.debug(res.toString());         } }   I am getting a response following response in the debug  {   "message": "Bad Request" }   Also, when I store the client Id and client secret in custom setting and use them, it is working fine and getting a proper response.  Any suggestions or help that how can I fetch the username and password from Named credentials


Switching back to last *used* tab on Chrome

How do I toggle back to the last tab used in Chrome on Mac? Ctrl-Tab and Ctrl-Shift-Tab navigates the tabs in order.  But I want to switch back and forth between two tabs similar to how how Cmd-Tab switches between the last two apps.  There's  but is there a solution for Chrome?


The SE Android app has not been working for half a year

The Stack Exchange Android app hasn't been working for me for half a year. I only still have it for the notifications.  Even after reinstalling, notifications are the only feature that works. When I start the app, it only loads for some time and then shows a loading error. No home page, no notification drawer.  I also see that it's last been updated in 2017. Have they been working on a PWA the last two years or what?  I'm using an HTC one M9 with Android 7.1.


How can I find a specific block (preferably in a large area) in my minecraft world?

I have lost a very valuable shulker block in an ocean, in my minecraft world. It had 56 diamonds, 64 iron bars, few gold ores, a trident, a nautilus shell, a heart of the sea, and a few stacks of ice. It is very valuable, and I really want it back, but I don't know where I left it. The sea is way too large to explore it by myself, so are there any ways to get it? P.S. My world is in 1.16, so mcedit doesn't work. It also has cheats and commands disabled, but I can make a copy of my world and work on that one.


What is the difference between the Mann-Whitney and Wilcoxon rank-sumtest?

First of all, what is the difference between the Mann-Whitney and Wilcoxon rank-sum test? How do I choose between the two? I know the latter is implemented in R, is there a way to do the Mann-Whitney test? Is there a way I can include my (very large) datasets in this post so you can get an idea of what I'm trying to do?


What's going on with the Announcer badge?

The Announcer badge was recently awarded to a lot of users simultaneously, on several sites, e.g.:    at 2019-12-12 23:05:01Z  at 2019-12-12 23:55:12Z  at 2019-12-13 00:25:01Z


Why was this "not an answer" flag declined when the answer is obviously a comment?

I recently asked this question:    The question asked (tl;dr version):     Is it possible to instruct Chrome to listen to more than two simultaneous touch points with JavaScript (or some other means)? How?   Which only merited one answer, very quickly after the question was asked.  The answer:     Try to use HammerJS, it supports multitouch:         This answer does not attempt to answer the question at all. It should have been a comment of something I might look into to try and resolve the issue. However, it does not answer the question of "Can Chrome does this? And how?" Additionally, it was a low-quality, link-only answer with no explanation or examples. It fails two pieces of criteria for a decent answer.  I flagged the question as "Not an answer" and it was declined. I believe strongly that the flag should have been accepted and the answer removed. Please advise.


how to print "[" character in latex after \item[]

This is a very simple question, I am trying to print [ in latex it is giving me an error I tried [ but it didn't work. May someone help me see how to do so in latex?


Please help to switch to Ubuntu Full-Time!

My Window positions and sizes are never saved. When I open programs like:  Chromium, Code Blocks, XChat, Thunderbird, Skype and others. Set them in a correct location on one of my screens (I have 2x24' monitors), but when I close and open any of the apps again, apps will appear in a default location, with default size. Program that I use the most: Code Blocks. I set up window locations inside of it, set it up as I like, but when I re-run it - everything is reset to default:  Image:   Image:   And this happens to all of the apps.  Please advise how this can be dealt with.


Why is so much "Other" space occupied on an iPhone 4?

I have the problem in iTunes where the "Other" data on the iPhone is excessively large. It's taking up over 5 GB of space. I've searched this topic over and over, tried just about every option I've seen, and my problem is getting bigger.  I have my daughter's iPhone 4 with 8 GB storage.    She only has about 11 apps on it taking up a total of 407 MB.  Her photos are taking up 83 MB. Music is only using 6 MB     What I've tried so far:   Restored the iPhone to factory, and the problem grew by 1 GB Downloaded  trial as , but I could not see what the problem was from there. I've Deleted Safari browsing history and cache, but that didn't move the needle much. probably gained 3 MB. Deleted some of the larger apps, but nothing was more than 600 MB.   Does anyone have any other suggestions?   iPhone is NOT Jailbroken by the way.  Update  Well, I'm just going to do a factory reset and set the phone up as if it were new. I'm too tired to keep trying to figure this out.


In this code as :     \begin{enumerate}[label=\bfseries Exercise \arabic*:]    \item 5 + 7 = 12    \item 9 + 1 = 10    \item 2 * 2 = 4 \end{enumerate}   I want the text Exercise (with its number) to be center-align and the content after that to be below and left-align. Anybody can help. Thanks.


Primary User missing after macOS Sierra Update

Clarification: There were two accounts on this macbook air (plus guest): Account A (Admin) Account B (standard)  1) After restarting after the latest macOS update, Account A was missing from the startup screen (Account B and Guest are the only options).  2) After a successful login to Account B, instead of starting macOS as usual, another startup screen appears, now with the option to log in as either Account A or Guest.  3) After logging in to Account A, macOS appears to run normally. Checking in Users & Groups, shows that Account A is still Admin. Account B is not listed.  4) Logging out of Account A returns to a screen with the option to log in again as either Account A or Guest.  5) A restart brings us back to #1, where we have to sign in first as Account B, then Account A.  Attempting to reinstall macOS from recovery mode prompts for the password from Account B (not the admin account) to unlock the HD.  What is going on, and how can it be fixed?    Original post:  The first time I restarted my macbook air after the latest macOS update, the primary user account had disappeared from the startup screen. My wife's account (a standard account which she never uses) and the guest account (which is apparently now a special browser only mode) are now the only options.  All attempts to login through my wife's account have failed. I figure she doesn't remember her password. I decided that I'm just going to try reinstalling the OS. So I restarted while pressing cmd-r to get into the recovery mode with macOS utilities and click to reinstall macOS.  Then it gets weird... My password didn't work to unlock the HD, and based on the hint, the hard drive is now encrypted under my wife's password instead of the one from my (now disappeared) admin account.  How/why would the primary account seem to disappear? And how did it end up treating a non-admin account as admin (and encrypting the HD under that password)? Did it just default to whatever other account it could find when the primary one went away?  And how can I get back in again? I imagine that all of the files are still there if I could access them.  Edit: My wife managed to remember her password and typed it in from the login screen, but instead of logging her in, it started another startup screen, now with options to log in as the primary account (the one that was missing before) or guest account, but now her account is missing. If I log out, her account is still missing.  But when I restart, it goes back to only having her account and guest as options... Then when I attempt to log in as her, it again takes me to a start up screen where the option are my account and guest.  What is going on here? Should I try to reinstall the OS?


Why JAVA is giving unexpected and slightly wrong output for simple calculations?

I am calculating some simple multiplication with double data type.But I don't know why I am getting some unexpected and slightly wrong output.  I am using IntelliJ IDE  public class Main {      public static void main(String[] args) {     // write your code here          double a = 1;         double b = 2;         double c = 3;         double d = 4;         double e = 5;         double f = 6;         double g = 7;         double h = 8;         double i = 9;         double num = 33;           System.out.println(a * 1.1);         System.out.println(b * 1.1);         System.out.println(c * 1.1);         System.out.println(d * 1.1);         System.out.println(e * 1.1);         System.out.println(f * 1.1);         System.out.println(g * 1.1);         System.out.println(h * 1.1);         System.out.println(i * 1.1);         System.out.println(num * 1.1);       } }   Expected Output:   1.1 2.2 3.3 4.4 5.5 6.6 7.7 8.8 9.9 36.3   Output I am getting:   1.1  2.2  3.3000000000000003  4.4  5.5  6.6000000000000005  7.700000000000001  8.8  9.9  36.300000000000004


Euler totient function - $|(Z/nZ)^*|=\phi(n)$

Prove that $|(Z/nZ)^*|=\phi(n)$  Can someone please direct me to that proof?  I couldn’t find it on the internet.  Thanks.


How do I get $~x,y +$ degrees new coordinates?

I have   center of circle's $x_1, y_1$ (called the eye in my code) degrees current $x_2, y_2$ (coordinates on the circle)   I want to add degrees to the $x_2, y_2$ and get the new "$x_3, y_3$"  Side Note: I dropped out of school and never learned TRIG. So a simple explanation would do wonders.


conversion using parse vs convert what is the difference between them

Why do I have to use .ToString() for this code to work: confirmedAcceptance = int.Parse(dr["confirmedAcceptance"].ToString());    This creates error: confirmedAcceptance = int.Parse(dr["confirmedAcceptance"]);


How can I send stdout to multiple commands?

There are some commands which filter or act on input, and then pass it along as output, I think usually to stdout - but some commands will just take the stdin and do whatever they do with it, and output nothing.  I'm most familiar with OS X and so there are two that come to mind immediately are pbcopy and pbpaste- which are means of accessing the system clipboard.  Anyhow, I know that if I want to take stdout and spit the output to go to both stdout and a file then I can use the tee command. And I know a little about xargs, but I don't think that's what I'm looking for.  I want to know how I can split stdout to go between two (or more) commands. For example:  cat file.txt | stdout-split -c1 pbcopy -c2 grep -i errors   There is probably a better example than that one, but I really am interested in knowing how I can send stdout to a command that does not relay it and while keeping stdout from being "muted" - I'm not asking about how to cat a file and grep part of it and copy it to the clipboard - the specific commands are not that important.  Also - I'm not asking how to send this to a file and stdout - this may be a "duplicate" question (sorry) but I did some looking and could only find similar ones that were asking about how to split between stdout and a file - and the answers to those questions seemed to be tee, which I don't think will work for me.  Finally, you may ask "why not just make pbcopy the last thing in the pipe chain?" and my response is 1) what if I want to use it and still see the output in the console? 2) what if I want to use two commands which do not output stdout after they process the input?  Oh, and one more thing - I realize I could use tee and a named pipe (mkfifo) but I was hoping for a way this could be done inline, concisely, without a prior setup :)


Why don't the White Walkers take the sea route to Westeros

After watching 6 seasons of Game of Thrones, we know that the only roadblock for White Walkers is "The Wall" to stop them from attacking Westeros. However, we see that King Stannis attacked wildlings through a ship route without crossing the Wall.  What is stopping the White Walkers from doing the same? They can ask wights to make Ships or rowboats. They have a lot of forests to get wood for making ships. They can simply land at the coast of the North and attack Winterfell or whatever they want.


Hey I am having issues with my code, the user.title does not seem to be working right, the code is not passing my log in. Here is my code:  public function isGroupMember($id) {     global $conn;     $sql = "SELECT user.title, Groups.* FROM user INNER JOIN Groups ON user.title = Groups.Group_ID             WHERE              user_id='" . fixstr($this->user_id) . "'             AND             user.title='" . fixstr($db->mysql_escape($id)) . "'             LIMIT 1             ";     if(getnum($sql) > 0) {         return true;     } else {         return false;     } }   The way that the code was previously written:  user.title = '".$db->sql_escape($db->sql_escape($id))."'   Where it says user.title the code in parenthesis is set incorrectly the is no mysql_escape used in this code:  fixster code:  function fixstr($str){     $str = trim($str);     $str = str_replace("'", "''", $str);     return $str; }   getnum:  function getnum($sql) {     global $conn;      $result1 = mysql_query($sql);      if($result1){         $row1 = mysql_fetch_array($result1);          $num = $row1["num"];          return $num;     } }   What would be the fix to my code?


Use mean value theorem to prove $ \lim_{x \to \infty}\left( f(x+1)-f(x) \right)=a ~$ as $ ~\lim_{ x \to \infty}f'(x)=a $

$$ f(x) :=\text{continuous and 1st order differentiable function} $$ $$ \lim_{ x \to \infty}f'(x)=a $$ What I want to prove is the below statement. $$ \lim_{ x \to \infty}\left( f(x+1)-f(x) \right) =a  $$ I guess that using mean value theorem is the key to deduce it however I've been stuck from here. Can anyone give me some hint(s)? so that I can deduce it in my own.


I'm doing a school project and I need to create a graph like this one. I created the graph but dont know how the add the vertical dashed red lines...        \begin{tikzpicture}[>=latex]     \begin{axis}[             axis lines = middle,             xlabel = $t$,             ylabel = {$x(t)$},             xtick={-50,-40,...,50},             ytick={-2,-1,...,2},             xmin=-50.5,             xmax=50.5,             ymin=-2.5,             ymax=2.5,             width=155mm,             height=70mm,         ]         \addplot[             scatter,             domain=-50:50,             samples=120,             color=blue,         ]         {sin(180*x/12)+cos(180*x/8)};         \addplot[             only marks,             domain=-50:50,             samples=120,             color=red         ]         {sin(180*x/12)+cos(180*x/8)};     \end{axis} \end{tikzpicture}   This is the code that I have created and the graph.


Is there a way to simplify this expression including summation, powers of 2 and binomial coefficients

I have an expression as: $$\sum_{k=0}^{m}{(-1)^k}\binom{m}{k}{(2)^{n(m-k)}}$$ Constraints: $1\le n, m \le 10^{6}$ It is a programming question and I am required to find the answer $\pmod {10^{9} + 7}$. I can do it in O(m) time complexity using preprocessing. I didn't post this on stack overflow because it involves more math and little programming. I have to calculate the above expression for different pairs $(m, n)$ , so is there a way to find it faster or some closed form.


It would be really nice to be able to use MathJaX (math formulas) in chat.  Not specially for formulae, but for things like $V_{CC}$ in electronics chat would be very useful.


GCC gives an "undefined reference" error to static data members in templated classes that rely on default constructors

I have a similar problem as this one:    but the workaround they use won't work for me.  I have a CRTP class with static data members, one of which is a std::mutex.  Unfortunately, GCC's (4.8.2) linker is giving me an "undefined reference" error for this mutex.  Clang (3.4) does not.  Is there a workaround?  The original question (linked above) invoked the copy constructor on the static data member that forced GCC to emit a symbol, but since my data member is a std::mutex, that's not an option -- the copy constructor is deleted, and there are no argument constructors.  Am I just hosed?  I don't believe the problem is with std::mutex, I think the problem is with how GCC handles static data members in template classes that rely on default constructors.  Thanks for any help!  Here's a slim version of my problem: test.hh  #include <mutex>  template < class T > class CRTP_class { public:   T * ptr_;   static std::mutex mutex_; // linker error here   static int clearly_a_problem_with_mutex_; // no linker error here };  class Foo : public CRTP_class< Foo > { public:   void set_bar( int setting );   int bar_; };   test.cc  #include <test.hh>  template<> std::mutex CRTP_class< Foo >::mutex_; template<> int CRTP_class< Foo >::clearly_a_problem_with_mutex_( 0 );  void Foo::set_bar( int setting ) {   std::lock_guard< std::mutex > locker( mutex_ );   ++clearly_a_problem_with_mutex_;   bar_ = setting; }   main.cc  #include <test.hh>  int main() {   Foo foo;   foo.set_bar( 5 ); }   And then I compile with this command:  g++ -std=c++0x main.cc test.cc -I.   to get the error  /tmp/cclyxUfC.o: In function `Foo::set_bar(int)': test.cc:(.text+0x86): undefined reference to `CRTP_class<Foo>::mutex_' collect2: error: ld returned 1 exit status   (Edit 1: In response to the commenter who suggested that this is a duplicate bug with "why do templates have to be in header files" -- There is nothing odd about putting the separate template specializations into the .cc files instead of into the .hh files -- which is really what you need in the case where you've got a mutex and you want, for obvious reasons, only a single copy of that mutex.  If you declare a static data member in a header file, then each translation unit that #includes the header will end up with their own copy of the mutex in which case it's not serving its job of ensuring mutual exclusion)  (Edit 2: Ooops! I linked to the wrong prior bug.)


Where do I get the mana from for cards that give me mana?

If I have a card like  or  that says if I tap this card, I add one green mana to your mana pool, from where I can get this card green mana?


Installed base them NineSixty - where is it?

I've installed the base theme NineSixty using the URL method without any errors. When I then look for the files I can't find them anywhere. I've looked in the themes directory as well as the sites/all/themes directories. In fact i've looked everywhere.  Where do the base theme's files end up?


Why are laser-based weaponry not more widely used in Star Wars?

In a nutshell, my question is about why laser-based weapons aren't more widely used in Capital ship combat. I recognize the use of point-defense systems in space conflicts like Capital ship battles, which can be used to defend against incoming missiles or smaller starfighters, but after reviewing a few Wookieepedia articles and reading up more on point-defense systems in Star Wars, they all seem to suffer from the same dilemma of most "laser" weapons in the universe - They simply aren't /true/ lasers. I'm looking for any reason, or lore (Both legends and otherwise) about why Star Wars wouldn't incorporate true Laser weapons more; With most combat taking place in the vacuum of space, wouldn't lasers be much more effective and practical since they wouldn't suffer from environmental detriments like thermal blooming, atmospheric barriers like rain, fog, and smoke, and many more ablative effects which would make true-lasers less viable options?


At my school we are starting to implement Office 365 for our students. We are working on basis of a bring-your-own-device strategy and will meet all kinds of devices and OS's. Office 365 comes with a built-in cloud feature, which can be synced to a newer Windows machine. Is there a possibility to sync to Ubuntu or Lubuntu machine, as it is possible with fx Dropbox? Thanks for helping. Armin


Recommended ways to add mouse control of minimise windows Ubuntu 14.04

I've recently switched from Windows XP to Ubuntu 14.04 and I'm happy using Ubuntu, with one small exception.   I've been unable to work out how to minimise windows using the mouse and the launch pad, and after coming from Win XP I really miss the task-bar icon to show or hide the desk top.  Looking on the internet I've found CompizConfig, but I've also found dire warnings that it can seriously damage your system.  So what is the best way to add the option of minimising a window and show desktop using the mouse?


Is there any free vector editing software?

Is a free vector editing software similar to Illustrator?


So yesterday I dropped my iPhone into the toilet, it was literally submerged for less than 15 seconds and after taking it out I left it in my airing cupboard overnight to dry. Today the phone seems to be completely functional other than a very dark screen (changing brightness won't help).   Was wondering what the best course of action would be and if this is fixable.


Remove lines not containing a word in Vim

In Vim I often find I'm only interested in lines containing a certain string of text and want to delete all other lines.  It's easy to match lines containing a string:  :s/^.*foo.*\n//   What I normally end up doing is two passes, one to "flag" all the lines I want with a special first character:  :s/^\(.*foo.*\)$/X\1/   And in the second pass it's easy to do a negative match for one character in a fixed position, so I delete all the lines without my string thus:  :s/^[^X].*\n//   But isn't there a much more straightforward way to do this with just a single pass? What am I missing?


Newby question / Blender 2.75a  Suppose I add some ivy to the cube of the default scene. A panel dedicated to the "ivygen" addon appears on the left. If I modify the material of the ivy, this pannel suddendly disappears, being replaced by a "New material" pannel.  How may I go back to the "IvyGen" pannel ?


Mixed models in ecology: when to use a random effect

My understanding of a random effect is based on , specifically this definition:  Random effects: factors whose levels are sampled from a larger population, or whose interest lies in the variation among them rather than the specific effects of each level. (Bolker et al., 2009)  In ecology random effects seem to be mostly used to avoid (psuedo-)replication from repeated measures, for example sampling from the same location repeatedly, or to account for phylogeny i.e. that closely related species are more likely to be similar due to shared evolutionary history. This seems to me to be only a restricted application of a random effect, based on the above definition. The Bolker definition says to me that treating a sampling unit as a random effect will control for unmeasured differences between sampling units that may affect the variables I’m interested in. Is this correct? Say I have a study where I’m interested in measuring X. My sampling design involves paired sampling at a number of different locations (not repeated), on different dates. Pairs would be random effects, to avoid repeated measures as discussed above. What about location and date? I’m not interested in the differences between locations or date, only X. In fact, I’d like to control for the differences between location and date to get a better understanding of the effect of X on my response. Would treating location and date as random effects accomplish this? I.e.: Response ~ X + (1|location/pair) + (1|date)  But why not treat location and date as fixed variables? Response ~ X + location + date + (1|pair)   This will still seperate the effect of location and date from the effect of X, so why have them as random variables? If I have them as fixed effects I'll be able to measure the effect they're having on X, so why use random effects?  While the answers from @Royce Yang and @Guille were helpful to get me thinking along the right lines, the best explanation I've found (and should have found before posting this question, not sure how I missed it) is  (thanks @mkt for the link) and leading on from that, the post . I think my question was the problem - I should have phrased it more broadly.


How to split punctuation from words in python?

I am attempting to create a spell checking function that reads in a text file containing a passage that contains several misspelt words. For example: "My favorite subjects are: Physcs, Maths, Chemistree and Biology - I find it necesary to use my iPad to make comprensive notes after class." I have three issues that I am trying to resolve:   Currently, the program considers Maths to be an incorrect word due to the comma that is present immediately after the word. I believe that in order to solve this issue, it would be best to split the string in the text file like so: ['My', 'favorite', 'subjects', 'are', ':', ' ', 'Physcs', ' ', 'Maths', ','...etc]. How do I split the string into words and punctuation without using any imported python functions (e.g. string or regex (re) functions)? I am currently comparing each word with a dictionary of accepted English words by iterating over each word in the text file. Is there a better method to preprocess a list to quickly identify whether a word contains a given element to improve the runtime of the program? There are several words such as 'eBook' and 'iPad' that are exceptions to the rules used in the function is_valid_word below (i.e. the word must start with a capital with all the other letters being lowercase or all characters in the word must be uppercase). Is there a way that I can check whether the string is a valid word?   Any help would be greatly appreciated!  def get_words():     with open( "english.txt" ) as a:          words = a.readlines()     words = [word.strip() for word in words]     return words  isWord = get_words()  def is_valid_word(st):     if isinstance(st, str):         st_lower = st.lower()         if st_lower in isWord:             if (st[0:len(st)].isupper() or st[0:len(st)].islower()) or (st[0].isupper() and st[1:len(st)].islower()) or st[0:len(st)].isupper():                 return (True)             else:                  return(False)         else:             return (False)     else:         return (False)  def spell_check_file( file ):     incorrectWords = []  # Will contain all incorrectly spelled words.     num = 0  # Used for line counter.     with open(file, 'r') as f:         for line_no, line in enumerate(f):             for word in line.split():                 if is_valid_word(word) == False:                     incorrectWords.append(line_no)                     incorrectWords.append(word)         for f in incorrectWords:             return incorrectWords             print (incorrectWords)  spell_check_file("passage.txt")


How can we find the Laurent series of the function $$f(z)=\frac{1}{\tan z }$$ around 0.  Thank you very much.


Why does coke fizz more when you add ice to it?


I am trying to prove this statement in the characteristic $p>0$ case.     Every algebraic extension of a perfect field is separable and perfect.   This is stated as a corollary of Proposition V.6.11 in Lang.     Let $k$ be a field and let $K$ be a normal extension of $k$. Let $G$ be the group of automorphisms of $K$ that fix $k$. Let $K^G$ be the fixed field of $G$ acting on $K$, and $K_0$ the maximal separable subextension of $K$. Then $K^G$ is purely inseparable over $k$, $K$ is separable over $K^G$, $K_0\cap K^G =k$  and $K_0K^G=K$.   Lang doesn't write many details in the proof except that every finite extension is contained in a normal extension.   This is what I have so far. Suppose, $k=k^p$. Let $E$ be an algebraic extension of $k$. Let $\alpha \in E$. Now, $\alpha$ is contained in the field, say $K$ generated by the roots of the minimal polynomial of $\alpha$ over $k$ (and is hence normal as it's the splitting field of the minimal polynomial of $\alpha$). At this point, I don't know how to proceed. I am tempted to use the Frobenius map, but it does not fix every element of $k$ although it does stabilize it in this perfect case. Any hints will be appreciated. Thanks.


Flair not showing the image all over the stack exchange sites. Do I need to update the code ?  Note: I'm using the flair in About you section.


Proving the uniqueness of a solution to $f(x-f(y)) = f(f(y)) + xf(y) + f(x) - 1$

Determine all functions $f: \mathbb{R} \rightarrow \mathbb{R} $ satisfying $f(x-f(y)) = f(f(y)) + xf(y) + f(x) - 1$  I have solved this by doing the  substitution $x \rightarrow 2f(y)$ and then replacing $x$ back. I get $f(x) = 1 -  \frac{x^2}{2}$  Now, I want to find all the other functions satisfying the equation or prove that this is the only solution. This is just like the  I have already asked, with the difference being that this functional equation has two variables alongwith some nested functions.   From the approach in the answer to that question, I tried assuming another function $g$ satisfying the equation and then try to prove that $h = f - g$ is a constant function with value $0$. But, I am unable to do that in this case.   Also, there aren't many constraints on the function except it being from $\mathbb{R} \rightarrow \mathbb{R} $. How can I even approach the problem in this case? Are there any methods involving calculus?


Linux -Can I rsync to dropbox or another free cloud storage service?

We host a small community, not for profit site and mailing list, is it possible to rsync to dropbox or a similar (free) service to maintain backup?  Edit: For context, we host on a shared VM and don't want to install anything unless we have to. I'm currently looking at  which is just a bash script  Thanks


How long can I keep Panna Cotta out of the fridge?

I made Panna Cotta for a party. I don't have a fridge where I'll keep them, so most likely they'll be on a buffet table. I'm afraid of them going bad or becoming liquid (Or something like that) after sitting out of the fridge more than 4 hours I guess? I also know you shouldn't keep cooked food more than 4 hours out of the fridge but yes. Does anyone know?


What Is A kernel and how do I remove unused Kernels?

I have ubuntu 12.04 lts. I am new to ubuntu and i get this warning that 0 bytes are remaining on the volume /boot. i asked a question :  So I Got replies saying i should remove unused kernels. Can anyone explain to me in simple language what is a kernel and how do i remove unused kernels.  Thank you :)


sstatic.net is getting cookies even though it says cookieless

says it is a cookieless domain, but according to muMatrix sstatic.net is requesting 2 cookies


The repository jessie-backports Release does no longer have a Release file

I get the following output (and error at the end) when I run apt update on my system:  $ sudo apt update Ign:1 http://deb.debian.org/debian stretch InRelease                                                                                Hit:2 http://packages.microsoft.com/repos/vscode stable InRelease                                                                                Ign:3 http://dl.google.com/linux/chrome/deb stable InRelease                                                                                Hit:4 http://security.debian.org/debian-security stable/updates InRelease Hit:6 http://ftp.us.debian.org/debian stable-updates InRelease                                                                                Hit:7 http://fai-project.org/download stretch InRelease                                                               Hit:8 http://repository.spotify.com stable InRelease                                                                  Hit:9 http://deb.debian.org/debian-security stretch/updates InRelease                           Hit:10 http://dl.google.com/linux/chrome/deb stable Release               Hit:12 http://deb.debian.org/debian stretch-backports InRelease           Hit:13 https://download.docker.com/linux/debian stretch InRelease Hit:14 https://deb.nodesource.com/node_10.x stretch InRelease Ign:15 http://deb.debian.org/debian stable InRelease Ign:17 http://deb.debian.org/debian jessie-backports InRelease Ign:18 http://deb.debian.org/debian jessie InRelease Hit:19 http://deb.debian.org/debian testing InRelease Hit:5 https://release.memsql.com/production/debian memsql InRelease Hit:20 http://deb.debian.org/debian unstable InRelease Hit:21 http://deb.debian.org/debian stretch Release Hit:11 https://packagecloud.io/slacktechnologies/slack/debian jessie InRelease Hit:23 http://deb.debian.org/debian stable Release   Err:25 http://deb.debian.org/debian jessie-backports Release   404  Not Found [IP: 151.101.248.204 80] Hit:26 http://deb.debian.org/debian jessie Release Reading package lists... Done E: The repository 'http://deb.debian.org/debian jessie-backports Release' does no longer have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.   I don't understand why I'm getting this error.  $ cat /etc/apt/sources.list # These lines should work for many sites  deb http://deb.debian.org/debian stretch main contrib non-free deb http://deb.debian.org/debian-security stretch/updates main contrib non-free deb http://deb.debian.org/debian stretch-backports main contrib non-free  # repository that may contain newer fai packages for stretch deb [trusted=yes] http://fai-project.org/download stretch koeln  $ grep jessie-backports /etc/apt/sources.list.d/* /etc/apt/sources.list.d/jessie-backports.list:deb http://deb.debian.org/debian/ jessie-backports main contrib non-free /etc/apt/sources.list.d/jessie-backports.list:# deb-src http://deb.debian.org/debian/ jessie-backports main contrib non-free /etc/apt/sources.list.d/jessie-backports.list.save:deb http://deb.debian.org/debian/ jessie-backports main contrib non-free /etc/apt/sources.list.d/jessie-backports.list.save:# deb-src http://deb.debian.org/debian/ jessie-backports main contrib non-free   Some system information:  $ lsb_release -a No LSB modules are available. Distributor ID: Debian Description:    Debian GNU/Linux 9.8 (stretch) Release:        9.8 Codename:       stretch


How to create an alias that takes an argument in KornShell

I am trying to create an alias which when given some argument will look for the folder with contains the argument as pattern. Let the alias name be gohf.  Now, I will be using this alias like gohf <some-pattern>, for eg. gohf testing. Now this should look for a folder that contains “testing” in its name and take me to that folder in the last step.  Following is what I could think of.  alias gohf='cd `find . -type d | grep testing`';   The above alias works when the pattern is always “testing”. How can I modify so that if the alias is used as say gohf game, then the alias should take me to the folder that contains game in its name.  Note:  Shell: ksh  I am assuming that there is only one folder for each pattern I input.


How can I iterate through a string in Java?  I'm trying to use a foreach style for loop  for (char x : examplestring) {     //action }


Do I need companions to follow me for the companion perks to work?

Will the companion perks still work if they are not following me or if I'm with different companions?


How to add Geoserver WFS to Leaflet JS Application

I have a PostGIS database and have successfully consumed a table into GeoServer and published a WFS.  Are there REST endpoints available for these WFS' akin to ESRI's feature services?  How are parameters to be constructed?


Pizza price calculating using 'if' statements in java

I've tried to make Java code to communicate with the user.  The code is about calculating a pizza price assuming the pizza price is a final int and doesn't change. The only thing that affects the price is the add-on that the customer wants on the pizza (tomato, mushrooms, cheddar cheese). I've tried to create code that covers every option the customer picks using  'if' statements, but I think there is easier way to do it. (I want the program to calculate the price given only the add-on name.)  For example, the customer picks Mushroom and Tomato so the pizza price will be the pizza price + tomato price + mushroom price.  Is there any easier way to solve it? Or should I cover every option the customer picks with if/else statements?  public static void main(String[] args){     Scanner s= new Scanner(System.in);     final int pizzaPrice= 12;     int Mushrooms = 2;     int Tomato= 2;     int Corn = 2;     int Olives = 2;     int CheddarCheese=3;     int bulgaritCheese=3;     int yellowCheese= 3;      String cheapAddOns ="Mushrooms , Tomato, Corn, Olives";     String expensiveAddOns = "Cheddar cheese , Bulgarit cheese , Yellow cheese";      System.out.println("Please enter first AddOns(Mushrooms , Tomato , Corn, Olives): ");     cheapAddOns=s.next();     System.out.println("Please enter second AddOns (Cheddar cheese , Bulgarit cheese ,Yellow cheese)");     expensiveAddOns=s.next();      if( cheapAddOns== "Mushrooms" || expensiveAddOns=="Cheddar cheese"  ) {         System.out.println("Your Pizza price is: $" + pizzaPrice + Mushrooms + CheddarCheese );     }     else if (cheapAddOns=="Tomato" || expensiveAddOns=="Bulgarit cheese") {         System.out.println("Your Pizza price is: $" +pizzaPrice+ Tomato + bulgaritCheese);     } }


I tried to install Java on Ubuntu but it not get installed. please help me. I download java jre-8u73-linux-x64.tar.zip.


When I highlight a bit of text using \colorbox, it prevents line breaking.  How does one give tex permission to break lines?  Example:  \documentclass{article} \usepackage{color} \begin{document} Lorem ipsum dolor sit amet, consectetur adipisicing elit, \colorbox{yellow}{Stop playing with latex and start writing your article!} tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. \end{document}     I'm sure the gut reaction will be to tell me to use such-and-such other method which already permits line-breaking.  By all means!  But resist the urge to do so while not answering my question :)