Do I have to cast if I malloc for an array in c?

Just a quick question I couldn't find a question on:  double* array = (double*) malloc(ARRAY_SIZE * sizeof(double));   or can I simply   double* array = malloc(ARRAY_SIZE * sizeof(double));   is there any difference?


I am trying to create a new user in sandbox.  I have admin access to the production org.  When I click on Log In link from the list of Sandboxes, it takes me to the new login page, but I do not have user id for the sandbox. How do I access it?


I need to resize root as there is not enough space left in the partition. At present I am not able to install new package nor update ubuntu. I tried sudo apt-get clean and emptying trash but it does not make significant space.  I have dual boot system (windows-7 and Ubuntu 14.04 LTS) with two Internal hard drive. Where Windows is installed in /dev/sda and Ubuntu is installed in  /dev/sdb. I tried to resize root using Gparted but it does not allow. Please let me know the steps of using Gparted for resizing root. I want to transfer space from "/home" to "/".   df -h Filesystem      Size  Used Avail Use% Mounted on /dev/sdb5        14G   13G  271M  98% / none            4.0K     0  4.0K   0% /sys/fs/cgroup udev            3.8G  8.0K  3.8G   1% /dev tmpfs           779M  1.3M  777M   1% /run none            5.0M     0  5.0M   0% /run/lock none            3.8G  160K  3.8G   1% /run/shm none            100M   56K  100M   1% /run/user /dev/sdb1       3.7G  555M  2.9G  16% /boot /dev/sdb7       896G   75G  776G   9% /home   --  sudo fdisk -l Disk /dev/sda: 500.1 GB, 500107862016 bytes 255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk identifier: 0x38696756 Device Boot      Start         End      Blocks   Id  System /dev/sda1   *        2048      206847      102400    7  HPFS/NTFS/exFAT /dev/sda2          206848   976771071   488282112    7  HPFS/NTFS/exFAT Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes 255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk identifier: 0x000a1848 Device Boot      Start         End      Blocks   Id  System /dev/sdb1   *        2048     7852031     3924992   83  Linux /dev/sdb2         7854078  1953523711   972834817    5  Extended Partition 2 does not start on physical sector boundary. /dev/sdb5         7854080    37148671    14647296   83  Linux /dev/sdb6        37150720    45043711     3946496   82  Linux swap / Solaris /dev/sdb7        45045760  1953523711   954238976   83  Linux   Thank you


I'm trying to add a custom CSS class to the <body> tag, How can I modify or pre-process the <body> tag to add the class body, Is it right to style the <body> tag with css file?


If $a^2=a\enspace\forall~a\in R$, then the ring $R$ is commutative

I think of the following proof:     Let $a, b\in R$. Then    $(ab)^2=ab$ or, $(ab)(ab)=a^2b^2$ or, $a(ba)b=a(ab)b$ or, $ba=ab$ (by left and right cancellation laws). Hence $R$ is  commutative.   Is this proof correct? Justify.


Is there a way to make Mobs behave like in survival the same as they do in creative?

I'm playing minecraft with a younger player who is used to creative mode and he wants to play survival mode.   I'd like if we could attack mobs like creepers and zombies and have them not attack us.  Is there any way that would enable us to do this or something similar?


Show all child nodes of a taxonomy term D7

Ok, so I've been ripping my hair off for the past 2 days now. I'm developing a web-site with a car catalog which contains the following hierarchy (taxonomy hierarchy):  -brand1 --model1 --model2 --model3 -brand2 --model1 --model2 --model3   ...and so on.  What I'm trying to achieve is when a user selects a parent term (brand), they'll see all the nodes from all the children terms. Currently a parent term doesn't display anything.   I already Googled my problem but none of the solutions seem to work for me (or it's possible I'm doing something wrong).  My configuration is as follows: Drupal 7.2x Views 3.7 Taxonomy Menu 1.4 module - used for generating menu trees from vocabularies. Pathauto 1.2    I use views to display the whole vocabulary - and it works as intended.  Can some one please give me a step-by-step guide on how to achieve this? Especially if it involves Views, as I'm still a noob with Views.  Is it possible the Taxonomy Menu module is causing trouble?


How to trigger a  to expand (like it does after a mouse click)

I'm trying to open up the <select> list that a browser renders upon a regular click from a <button>. I tried const select = document.querySelector('select'); select.click();  Nothing happens. With .focus() I get the result I would expect from iOS, but not on Chrome or Android. Edit I specifically want to trigger the platform native <select> picker, not a custom built thing.


I've been working with proofs involving $\limsup$ and $\liminf$, and I'm a bit confused regarding their general methodology. More specifically, I'm unsure about whether my approach to the following problem makes sense.  Problem. Let $(s_n)$ and $(t_n$) be sequences and suppose that there exists $N_0$ such that $s_n \leq t_n$ for all $n > N_0$. Show that $\liminf s_n \leq \liminf t_n$ and that $\limsup s_n \leq \limsup t_n$.   The way I approached it was as follows:   Let $N > N_0$. Then $\limsup_{N \rightarrow \infty} \{ s_n : n > N \} \leq t_n$ as $s_n \leq t_n$, and $\limsup s_n $ is the largest possible limit of a subsequence of $s_n$. As $t_n : n > N$ is (by definition) less than $\limsup_{N \rightarrow \infty} \{ t_n : n > N \}$, the proof is complete.  I'm pretty sure this is incorrect, however, and I'm generally unclear about the method behind such a proof. Any help is appreciated!


Im using Ubuntu 13.0.4 and have tried getting updates via the command line ..no joy Latest issue is trying to install Root  sudo apt-get install root-system-bin Getting message Reading package lists ... Error! E: Could not open file /var/lib/dpkg/status-open (2: No such file or directory) E:The package lists or status file could not be parsed or opened.   I have tried  sudo rm /var/lib/apt/lists/* -vf sudo apt-get clean sudo apt-get update sudo apt-get upgrade   From   But when I get to second line I get:-  E: Could not open lock file /var/cache/apt/archives/lock-open (2: No such file or directory) E: Unable to lock the download directory


Fermat's little theorem with the exponent smaller than the prime number

I encountered this problem that I do not fully understand. Find the multiplicative inverse of $[45]$ in $Z_{101}$ . Then determine the integer x between 1 and 100 such that $45^{99} \equiv x$ (mod 101) Using the Euclidean algorithm the multiplicative inverse of $[45]$ can be found as [9]. However finding $x$ is where my effort halts. Lets denote $a=45$, $e = 99$ and $p = 101$. Since $p$ is a prime and $a \nmid p$ Fermat's little theorem gives $a^{p-1} \equiv 1$ (mod p) = $45^{101-1} \equiv 1$ (mod 101) in a case where $e > (p-1)$ we could simply evaluate $a^e$ as follows $a^e = a^{k \cdot (p-1) + r} \equiv a^r$ (mod p) where $k$ and $r$ are integers. Finally $a^r$ could be envaulted in mod p and x would be found. However, in this problem, $e < (p-1)$ = $(99 < 100)$ and the evaluation described above is not possible. I.e. we can not evalute $45^{99}$ as $45^{k \cdot 100 + r}$. In summary, how can $x$ be found in the equation $a^e \equiv x$ (mod p) when $e < (p-1)$?


Is it correct to write: "An agreement is imperative to tackling the problem"?  Or should it be: "An agreement is imperative to tackle the problem"?  Thanks


It is rated to 20A @ 28VDC, but I was wondering with a reduced current (16A), it can withstand a higher voltage

Goal:  I am looking to buy a switch that handles 16A @ 85VDC.  This switch needs to be a SP3T switch so I am not sure a relay can do this.  The switch will move between a PU/PD/and load and is a LS switch.  I am looking at a switch such as this:   It is rated to 20A @ 28VDC, but I was wondering if due to the reduced current, it can withstand a higher voltage.  I was trying to view the specification to determine if this is possible, but I am having a hard time understanding the spec to figure this out.    My feeling is at 16A it can go up, but probably not by a factor of 3, can someone help me determine this?


Importing a daily changing variable name in python

I want to import a file name which changes daily in python 3 File name >>> filename_{day}.py from filename_{day} import variable


How to make a node tree the context? (MTree implementation)

I'am trying to use the Python API to make a lot of different and randomized trees with the MTree add-on. But I'am struggling with an error telling me that the context is incorrect. RuntimeError: Operator bpy.ops.node.add_node.poll() failed, context is incorrect I've tried to use the bpy.context.active_node but that doesn't seem to exist even though it's in the . For now my code looks like this: import bpy bpy.ops.node.new_node_tree(type="mtree_node_tree", name="Tree1") bpy.context.area.add_node(type="MtreeParameters", use_transform=True)  But it gives out an error which I listed before at the 3rd line. The code should just put a node into the node tree, but it probably doesn't know where to. So does anyone know how to make the node tree the context?


The Earth is billions of years old, yet its core has not yet cooled down and become solid. Will this happen in the foreseeable future?


What is the math font in this equation? (similar to mathcal)

Anyone knows the font used for M in the attached equation? Thanks. Looks similar to mathcal.  Reference: Rouder, J. N., Morey, R. D., Speckman, P. L., & Province, J. M. (2012). Default Bayes factors for ANOVA designs. Journal of Mathematical Psychology, 56(5), 356-374.


In the code below  var x = 1;  (function () {   console.log(x);   var x = 2; }());   Why is it that when console.log(x), x is undefined?


How to divide irregular polygon into equal areas

I am seeking to divide this 200 acre polygon into 5 polygons of 40 acres.  I have yet to find a concrete solution to this task by searching this forum.  Is there a pragmatic tool in existence that can help accomplish this task?  I am using ArcGIS 10.5.  I have attempted the fishnet tool but all that accomplished was create a grid.  Another suggestion I found (The Parcel Editor toolbar) is unavailable with my current license.


Keras: validation loss decreases but accuracy does not increase

I am working on the development of a deep learning model for prediction of a disease from medical images. It is a binary classification algorithm. I am currently using a model built from scratch with a quite traditional architecture of several convolutional, pooling and batch normalization layers, followed by a fully connected network.   The model fits the training data well (with obvious overfitting). The loss of both the training and validation decrease over the epochs at a similar rate. The accuracy for training is close to 1 after 200 epochs, however the accuracy for validation stabilizes to approximately 0.6 after ~20 epochs. See the image below.   Any idea how to optimize? I have tried to fine-tune a lot of different hyperparameters (drop out rates, loss functions, activation functions, regularization, learning rate, et cetera) but can't seem to optimize it any further at this point.  Your input would be highly appreciated!


What is the purpose of the three part circuit?

I'm studying for my final on introduction to circuits and came across a question about this circuit:  The question is:  Identify and describe the three parts of the circuit used for a measurement system for signal conditioning. Describe the signal conditioning one intends to use the circuit for.  From what I can tell the R1 and R2 resistors are the first part of the circuit used to use a fraction of the incoming voltage. The second part is the voltage follower used to move all of the incoming voltage to another circuit. Lastly there is a low pass filter used to filter off the high frequency voltage. The second question I'm not sure of the answer.


Let's say you're odds of winning a game are 48%, and you have 100 coins. Every time you win, you double your bet. For example if you bet 10 coins and win, you would have 20 coins. If you stick with a certain strategy, I am thinking you win 1 coin every round. Here's how it works:   Whenever you lose, you double the amount you bet previously Whenever you win, you restart your bet to 1 coin.   So if you start with 1, and lose on a 1, 2, 4, but win on an 8, you just made 1 coin. Could you restart the cycle and keep winning 1 coin?   There has to be a flaw in my logic, could someone find it?


What triggers the "possible rollback war" flag?

Just saw this one for the first time:     1 × rollback war   (for 's )  Its obvious what this flag means (multiple rollbacks have occurred, possibly by different users), but what exactly are the conditions under which this flag appears?  Additionally, what action could/should be taken on this flag?  I see  and  (heck, there's a whole  tag), but there isn't any indication as to how the feature was actually implemented.


I am trying to query Products in my controller where the Product Name involves min2 to max4 's(apostrophe s) i.e Product Name = Joy's x & Joy's Y & Joy's Z. I am unable to query this product as apostrophe s is hit, it neglects other characters and throws an error like unexpected token s in query.  As per an article to escape quoted string in query   I tried my SOQL query as   lstproduct = selectstmt + wherecondition;  In wherecondition = ' Product_Name__r.BrandName__c= \'' + brandstring + '\'';  brandstring holds the product name     brandstring = ' Joy's x & Joy's Y & Joy's Z ' -----> Here is the   issue, on hitting the first apostrophe query ends and nothing is   returned in query result.   Please help me resolve this issue. How to change the query to get expected results.


Difference between functions that act alone and those with the "dot" operator

I am a little confused about functions in Python, and how they are classified. For one, we have functions like print(), that simply encode some instructions and act on input. But also, we have functions like 'str'.capitalize(), that can only act when they have an "executor" attached to them. This might not be a well-informed question, but what are the differences between these forms, and how are they classified?


Where is my question? (After marked as too broad)

In 13th of December 2016 I signed up for Cognitive Sciences Beta and asked a question about empathy of humans for animals and the reasons for it. The question was quite broad and marked as such. I got good feedback how to rework my question to be able to be answered. Now I find the time to rework my question but can't find the question in my profile anymore.  So where has my question gone to?


I've updated my Google email address, now when I log in to stack overflow, I'm a new user?

So I changed my Google email address, and now when I log in with Google, I'm a new user - how do I get my old account back ?


With a bib.bib file:  @article{mycite,   title = {title},   author = {author name},   pages = {45-50},   year = {2020},   url = {https://example.com} }   and an index.rmd file like this:  --- title: title author: author bibliography: bib.bib output:   pdf_document:     latex_engine: xelatex ---  lorem \autocite[48]{mycite}   I get an error when compiling (using Rscript -e "rmarkdown::render('index.rmd')"):  ! Undefined control sequence. l.70 lorem \autocite                     [48]{mycite}  Error: LaTeX failed to compile index.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See index.log for more info. Execution halted   (Lorem @mycite, on the other hand, works.)  How to make citing with LaTeX aware of the bib.bib file?  Same question when using a  file to change citation style:  --- csl: chicago-fullnote-bibliography-with-ibid.csl ---   Are csl files and LaTeX compatible?  EDIT: A possible solution:  --- title: title author: author bibliography: bib.bib output:   pdf_document:     latex_engine: xelatex     pandoc_args: ["--biblatex"] header-includes:   - \usepackage[]{biblatex} # \userpackage[]{biblatex-chicago} instead of csl file ---  lorem \autocite[48]{mycite}   Compiles with these warnings:  Warning message: LaTeX Warning: There were undefined references. Package biblatex Warning: Please rerun LaTeX. (biblatex)                Page breaks have changed.       Note: this question is different from  as the errors in that question stem from loading the same package twice. But a possible answer has been found from the question itself. Furthermore, the question uses  which requires familiarity with it.


Keeping over-shoulder camera view consistent at different screen resolutions

I have a player GameObject. There is a character attached to it and a camera (both are children of the player GameObject).  The over-shoulder camera is positioned nicely.  The player should appear on the left edge of the screen.  Now when I change the viewport / screen size and make it larger, the camera doesn't keep it's view. I can see in the Inspector that the camera's view changes.   I don't understand in which way it does that.   What would I need to do to keep the player always on the left edge, no matter what the screen resolution is?   Thank you.   The upper image shows how I have planned / developed the camera view. This is what the camera view should look like. The lower image shows how the camera changes at larger viewport.


Tangent bundle and manifold are homotopy equivalent

In a proof I need the following fact:   Let $M$ be a manifold and $TM$ its tangent bundle. Then $M$ and $TM$ are homotopy equivalent and therefore have the same homotopy groups (and explicitly for the sphere $S^n$ we have that $\forall 0 \leq k < n:$ $\pi_k(TS^n) = \pi_k(S^n) = 0$).   I don't necessarily need an exact proof of this claim, more of a sketch. Thank you a lot in advance!  I found the answer to the question I duplicated not enlightening for my purposes so I would like to keep the question...


Call ajax when value is inserted on database

I'm using this method to refresh content of users uploads but i've seen twitter facebook does not actually follow this type of process..they auto refresh the content or auto update the only content as soon as data is inserted to their database.  How its possible because I've seen in twitter's process by inspect element there are no background script running or any ajax pending request !!  what is this type of scripting known as ??     $(document).ready(function(){     display();   }                    );   function display(){     $.ajax({       type:"GET",       url:"display.php",       async:true,       cache:true,       timeout:1000,       success:       function(data){         $('#display_content').html(data);         setTimeout(display,100000);       }     }           );   }   ;


How can I store local variables into class variables in java?

I'm writing a interactive application in Java and one of my local variables isn't adding itself into the class variable which is screwing up my final output.  Here is the class variable public static double deduction;  Here is what I'm trying to store into it   System.out.println("Do you want medical insurance?"); String choice = kb.nextLine();        if (choice == "yes") {     medIns =  32.50; } else {     medIns = 0; } System.out.println("Do you want dental insurance?"); choice = kb.nextLine(); if (choice == "yes") {     dentIns = 20.00; } else {     dentIns = 0; } System.out.println("Do you want long-term disability insurance?"); choice = kb.nextLine(); if (choice == "yes") {     lifeIns = 10.00; } else {     lifeIns = 0; } deduction = medIns + dentIns + lifeIns; return deduction;`   Here is what it's finally going into totalpay = gross + (gross * retire) - deduction;  When I put in all the other input it's not storing the local deduction into the class deduction so it can be processed into my totalpay calculation.


Can I make use of my Global Entry card to get Pre-Check if my airline doesn't participate?

I will be flying on All Nippon Airways (ANA) out of Houston IAH soon, but ANA does not participate in the Trusted Traveler program so I have no way to provide the KTN that I received through Global Entry. Is there any way that I can access the Pre-Check lane in IAH using my Global Entry card (my ticket will not say Pre-check) or am I out of luck?  Edit: I believe this question is distinct from 'can I use pre-check on non-pre airlines. There is no way to prove that you have pre-check, but I have a physical Global Entry card which I can use as legal identification to board an airplane, so in my mind it is more objective proof of my pre-cleared status.


Show that if $\lim_{x\to a}f'(x) = A$ then $f'(a)$ exists and equals A

I ran across this problem in my Analysis class and can't seem to come up with a good solution. Here's the question: Show that if $\lim_{x\to a}f'(x) = A$ then $f'(a)$ exists and equals $A$. $f$ is continuous on $[a,b]$ and differentiable on $(a,b)$.  I tried applying the Mean Value theorem like this: There exists a $c \in (a, x)$ st $f(x)-f(a)=f'(c)(x-a) \implies \frac{f(x)-f(a)}{x-a}=f'(c) \implies f'(a)=\lim_{x\to a}\frac{f(x)-f(a)}{x-a}=\lim_{c\to a}f'(c)=A$  However, I think this is wrong. I am pretty sure the Mean Value theorem is needed, but my application of it seems to be incorrect. Would somebody be able to point me in the right direction?


Is there some way to get the title of a citation shown in the normal text instead of the key? I need the titles of some papers I cite in the normal text, so typing them by hand seems to be superfluous if I already have them in my bibtex file.  Is there any way to do this?


How extern is working in C, inside function

#include <stdio.h>  int a = 33;  int main() {     int a = 40;     {         extern int a;         printf("%d\n",a);        } }   Output : 33  Can anyone please let me know how Extern is working here ?  Why after declaring variable "a" with extern keyword, access to local variable "a" in main is lost ?


A graph with n points satisfies some conditions.

(APMO 1990) Let $G$ is a graph that satisfies the following conditions. (1) No point has edges to all other points, (2) there are no triangles, (3) given any two points $A,B$ s.t. there is no edge AB, there is exactly one point $C$ that there are edges AC and BC. Prove every point has the same degree.  I found a proof online, but it uses common complement, which doesn't make sense to me. I've tried considering the $N_a,N_b$ of two points A, B, where there isn't an edge $AB$ and proving them having no edges between $N_a,N_b$ without, and their common point $C$, but then I'm stuck.


Mirror-Modifier applied, but still mirroring

I made my first sculpt model and I used a mirror modifier. But then I applied the mirror modifier, because I got a strange edge on the mirror line in sculpt mode. Now I modeled it, but it still mirrors the model, what in the beginning was good, but sometime I want to do asymmetrical things.  What did I wrong? Many thanks for your help!! Happy modeling :D


I've apparently told my follower to stay put somewhere or they have died or something along those lines,I have slept and waited for days and days,I've used the dog companion fix,and ive done a mission that's fast traveled me somewhere on its on,but if I ever go to get a follower it tells me that I have a current follower and can have only one at a time


Why is renormalization necessary in finite theories?

Michael Brown made the following comment :     The modern understanding of renormalization (due to Kadanoff, Wilson and others) is hardly controversial and has nothing really to do with infinities. It is necessary even in completely finite theories, but the fact that it fixes infinities in QFT is a bonus.   Can anyone explain what this means?


Making grid with certain spacing between lines along X and Y axis using ArcGIS Desktop?

We are doing the research about applying remote sensed data on hydro logical model . After delineating, the river basin from DEM data using Argis9.3, We have to map the remote sensed data derived from products like PERSIANN. Our task now is to create the grid with the same resolution with the available remote sensed data( for example 0.25degree x 0.25 degree). and have a certain corner that matches with the obtained data.   Does anyone know how to deal with our problem?


Null pointer exception on a counter variable

I do not understand why I keep getting this null pointer exception, I do not know a lot about references and pointers and such and just started learning classes and objects. Help is much appreciated! Here is the code with the issue:  public class Library {      public static MediaItem[] item = new MediaItem[100];      public static void main(String[] args) {          Scanner input = new Scanner(System.in);         int choice = 0;         int numberOfItems = 0;          System.out.println("Personal Lending Library!");          while (choice !=6) {              choice = menu(input);              switch(choice) {             case 1: addNewItem(numberOfItems, input);                 break;             case 2:                 break;             case 3: listItems(numberOfItems);                 break;             case 4:                 break;             }          }      }  public static void addNewItem(int numberOfItems, Scanner input) {           numberOfItems++;          System.out.print("Enter the title: ");          item[numberOfItems].title = input.nextLine();          System.out.print("Enter the format: ");          item[numberOfItems].format = input.nextLine();


Is it possible to upgrade Ipad4 from IOS 7.0 to IOS 10 with the possibility to downgrade later?

I have non jailbroken ipad 4th generation with ios 7.0 installed. I want to run some applications that do not support that old version and therefore I need to upgrade.   The device itself has version 9 downloaded but my understanding is that this will not work as IOS 9 can no longer be installed after 10 is out.  I did not find a reliable information about peformance of IOS 10 on ipad 4th and I'm afraid I can turn it to unusable device. Everything that I can find is about some initial versions of IOS 10 and I think it is a known issue that early versions of major releases have some performance bugs.   So don't want to risk and if possible I want to be able to downgrade to IOS 7 if performance is unacceptable. My understanding is that I need to save SHSH for my device which I don't have and I'm not sure if this can be done now.  The first question is if it is possible in principle to save SHSH for old version of IOS given that that version is no longer supported by Apple?  I think there are several ways to do that but I'm not sure if they work or not.  Option 1: Use iFaith  AFAIK iFaith can save SHSH for non jailbroken device.   Question I was not able to find answer to is:   does the latest iFaith support saving of SHSH for IOS 7? According to  the latest version is 1.5.9 and it supports IOS 5.3 but I'm not sure this information is accurate.   Option 2: jailbreak + RedSn0w/TinyUmbrella  I can jailbreak first so that I can use tools other than iFaith to save SHSH.  Questions:   Can jailbreak for unsupported version of IOS be done at all?   May be there is some other option to save SHSH I was not able to found. Or may be there is another way to have a backup plan for downgrade.  Any help is appreciated.  Update:  According to       Apple only issues signatures for the currently-available iOS version,   which disallows installing older iOS versions. But if you have saved   signatures for an older iOS version, you may be able to use a replay   attack to restore that version. Therefore it is recommended to save   the signature for your device as long as Apple issues it.   But there is another note there     Users often misunderstand this system and think that the SHSH firmware   version they back up depends on the firmware version they have   installed on their device. This is the case for iFaith, but not for   TinyUmbrella. iFaith dumps the SHSHs from your device's storage   (whatever's installed on your device, e.g. 4.3.3), while TinyUmbrella   gets SHSHs from Apple's servers (whatever firmwares Apple is currently   signing).   If this is true then option 2 cannot work and the remaining open question is if there exists a method to extract SHSH for IOS 7?


Proving a set of automorphisms of a group is a group under composition

Let $G$ be a group and let $\mathrm{Aut}(G)$ be the set of all automorphisms of $G$. Prove that $\mathrm{Aut}(G)$ is a group under the operation of composition for functions.    I am not too sure if I am proving $\mathrm{Aut}(G)$ itself is a group. Would this mean then that I would have to make sure it fulfills all the group requirements? If so I am not too sure how to go about it. And to prove closure, I would think I need to pick say $f,g \in \mathrm{Aut}(G)$ then use the fact that these are automorphisms. From here, I am not too sure how to proceed.


PostGIS: how to split a polyline into straight segments?

I'm working with PostGIS 2.1.8. I need to split a polyline into as many straight segments this polyline contains. Here is an illustration to make it clear enough:    The initial feature is only one row and the query should produce a 4 rows result with attributes values being maintained and geometry column changed (I don't want to update length column):  # Initial table:  id   | name    | length   | the_geom -----+---------+----------+----------------- 1    | Line 1  | 12.2     | 01000111100000   # Result table:  id   | name    | length   | the_geom -----+---------+----------+----------------- 1    | Line 1  | 12.2     | 01000111100000 2    | Line 1  | 12.2     | 01001111000011 3    | Line 1  | 12.2     | 01000110010000 4    | Line 1  | 12.2     | 00000111100000   I have found the function st_subdivide() () but it is available from PostGIS version 2.2... I can't upgrade my PostGIS version because I'm at work and not allowed to do it.  Any idea on how to achieve that with an older than 2.2 PostGIS version?


I am using the following program for sending email through Java. When I use this program, I am not getting any error. At that same time I am not getting out it, means the mail is being not sent. I am trying to send message to Gmail. Are these smtp correct or not?  props.put("mail.smtp.host", "smtp.gmail.com");   props.put("mail.smtp.port", "465");  package mail;  import java.util.Properties;  import javax.mail.Message; import javax.mail.MessagingException; import javax.mail.Session; import javax.mail.Transport; import javax.mail.Message.RecipientType; import javax.mail.internet.AddressException; import javax.mail.internet.InternetAddress; import javax.mail.internet.MimeMessage;  public class mail4 {      private String from;     private String to;     private String subject;     private String text;      public mail4(String from, String to, String subject, String text){          this.from = from;         this.to = to;         this.subject = subject;         this.text = text;     }      public void send(){          Properties props = new Properties();         props.put("mail.smtp.host", "smtp.gmail.com");         props.put("mail.smtp.port", "465");          Session mailSession = Session.getDefaultInstance(props);         Message simpleMessage = new MimeMessage(mailSession);          InternetAddress fromAddress = null;         InternetAddress toAddress = null;         try {              fromAddress = new InternetAddress(from);             toAddress = new InternetAddress(to);         } catch (AddressException e) {             // TODO Auto-generated catch block             e.printStackTrace();         }          try {              simpleMessage.setFrom(fromAddress);             simpleMessage.setRecipient(RecipientType.TO, toAddress);             simpleMessage.setSubject(subject);             simpleMessage.setText(text);                         Transport.send(simpleMessage);           } catch (MessagingException e) {             // TODO Auto-generated catch block             e.printStackTrace();         }     } }     main class ***********  package mail; public class mail5 { public static void main(String[] args) {          String from = "xxx@gmail.com";         String to = "yyy@gmail.com";         String subject = "Test";         String message = "A test message";         mail4 sendMail = new mail4(from, to, subject, message);         sendMail.send();     } }


Javascript function that gets a string with URLs

I have a Javascript function that receives a string. that string may have URLs in it, with, or without http:// or http/s:  example string:     This is an example string with www.cnn.com and http://microsoft.com"   my purpose is to take that string and inject anchor tags for the URLs such that they are clickable when injected as HTML to an html document.  Is there anything I can use that does this? some Jquery function?


Due to injuries, I have been unable to use my computer since early 2015.  As a result, I have 14.10 on my system.  I'm getting "Failed to download Repository Information".  I've tried the solutions listed in 141512 with no joy.  How can I bring my installation current without dump / restore?


How important is the choice of dissertation committee?

I am currently a PhD student and I need to choose a dissertation committee as I will be graduating soon. (I already have a postdoc lined up.) It seems the only function of this committee is to read my thesis, attend my defense, and decide whether to grant me a PhD.   Assuming my dissertation committee serves its purpose and grants me a PhD, what further relevance do they have? How should I choose my committee? In particular, is my committee still important after I graduate?  The reason I'm asking is because I don't really know who to choose. It seems like I should just ask whoever in my department is available. Should I be considering other factors? For example, it is good to have "famous" researchers on my committee?  I asked my advisor and she didn't voice an opinion and said it was essentially up to me who to choose.


How to find the keywords that Google searchers are using to find my site

I have been using Google Analytics for some time and unfortunately it hides the searches that have led users to click into my site.  Is there any reliable source where I could check the daily searches where my site has been printed and, if possible, clicked by users?


Why do some downloading files not know their own size?

Occasionally, when downloading a file in a web browser, the download progress doesn't "know" the total size of the file, or how far along in the download it is -- it just shows the speed at which it's downloading, with a total as "Unknown".  Why wouldn't the browser know the final size of some files? Where does it get this information in the first place?


Problem with Swedish hyphenation using apa6 with \usepackage[swedish]{babel}

I can't seem to get Swedish hyphenation to work within the document when using the apa6 document class, though I am using the Swedish babel package.  The problem is not citation related, but concerns the actual paper content. I have not yet inserted any citations and I am having trouble already in the document preamble (see example below).  I have tried to use UTF-8 encoding, but that gives me error.   So far I have not seen anyone mentioning the same problem.  My question is simply: How can I get Swedish hyphenation to work within the document?  This is my best try of a minimal working example (edit: updated to contain a figure, that seems to be what is causing error):  \documentclass[man]{apa6}  \usepackage[swedish]{babel} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc}  \title{Små söta röda rävar är överblivna från året} \shorttitle{Små söta rävar}  \author{Malin Bergqvist} \affiliation{Linköpings universitet}  \begin{document} \maketitle  \begin{figure}[H] \centering \includegraphics[width=0.5\textwidth]{Old-Woman-Young-Woman.jpg} \caption{En välkänd optisk illusion.} \end{figure}  \end{document}   Update: The error I am getting:  ./main.fff:6: Package inputenc Error: Unicode char \u8:�lk not set up for use with LaTeX. See the inputenc package documentation for explanation. Type  H <return>  for immediate help.  ...                                                l.6 \caption{En v�lk�nd optisk illusion.}  Your command was ignored. Type  I <command> <return>  to replace it with another command, or  <return>  to continue without it.   The attached image shows the results of the MWE.  All help is much appreciated, I am rather new to using LaTeX. Thank you!


jQuery: Hide element on click anywhere else apart of the element

I'm trying to achieve that a div hides if user clicks anywhere except on the element. I've got following code doing toggle() if user clicks on a button. I want the button click to stay plus if the Details element is visible, reacts to other parts of the screen. $('.nav-toggle').click(function() {   //get collapse content selector   var collapse_content_selector = $(this).attr('href');    //make the collapse content to be shown or hide   var toggle_switch = $(this);   $(collapse_content_selector).toggle(function() {     if ($(this).css('display') == 'none') {       //change the button label to be 'Show'       toggle_switch.html('Show Details');     } else {       //change the button label to be 'Hide'       toggle_switch.html('Hide Details');     }   }); });


Undefined control sequence and \chapter error

I’m getting an “undefined control sequence” error with the following code, using TeXstudio:  \documentclass[11pt]{article} \begin{document} \begin{center} \chapter{CHAPTER 6} \end{center} \end{document}


Does there exist a function such that $\lim_{x \to a} f(x) = L$ for all $a \in \mathbb R$ but $f(x)$ is never $L$?

Does there exist a function $f:\mathbb R \to \mathbb R$ such that $\lim_{x \to a} f(x) = L$ for   all $a \in \mathbb R$ but $f(x) \neq L$ for all $x$?   I found such a function in $\mathbb Q \to \mathbb Q$, where $f(\frac{p}{q})= \text{first p+q digits of }\pi$ satisfies the above condition. However, I have not been able to extend it to reals. So, is such a function possible, and if it is, is there any explicit example preferably related to the above function in rationals?


How to format a 3-digit integer to a 4-digit string?

I would like to format a 3-digit integer to a 4-digit string value. Example:  int a = 800; String b = "0800";   Of course the formatting will be done at String b statement. Thanks guys!


Leave newlines intact in bounty messages

Bounties allow us to provide a message along with bounties we place, should we deem it useful to include one. I use this myself regularly, and sometimes a decent explanation is warranted so that readers understand what's going on.  However, bounty messages get their newlines stripped out. This can impede our attempts to make our bounty messages readable and useful. Just now I wrote  a bounty with 3 paragraphs + a footnote on its own line to maximise its legibility (and could type newlines in the bounty message text input), but after submission the message was compacted into the following:    It's especially strange that bounty messages can be a whole three thousand characters long (enough for a junior essay), while not providing us with paragraphs, a basic building block of legibility:    Not that I think I could ever use the whole 3,000 — the message above was just 850.  Could bounty descriptions please leave the newlines I write in them intact?  (Should someone decide to write super-tall bounty messages to abuse this ability, bear in mind moderators can refund bounties; a user making a nuisance is not beyond being acted on.)


What words are commonly mispronounced by literate people who read them before they heard them?

Quite a few words are mispronounced by under-educated people, or people learning English as a second language. Some words are often mispronounced by quite educated people who read, and began reading high-level literature before they heard the vocabulary spoken.  This can lead to a vocabulary dissonance, occasionally leading to the belief that there are two words (the known spelling of one, and the verbal hearing of the same) where only one exists. Epitome is a common example that springs to mind.  Answer with a word and its proper pronunciation (and potentially, the commonly mistaken punctuation).


Change Language in \usepackage[]{babel}?

I've been trying to change the language of my LaTeX document by replacing \usepackage[swedish]{babel} with \usepackage[english]{babel} but I only get this message:  ! Package babel Error: You haven't loaded the option swedish yet.   I've read in an other question at this forum that compiling enough would solve the problem, but that doesn't work for me. Does anyone know what I should do?


proving that a graph is hamiltonian (Ore's theorem)

given the simple graph $G=(V,E)$ thats has $|V|=n≥3$ vertices. we need to prove that if $|E|>$ ${n-1 \choose 2}+1$ then $G=(V,E)$ is hamiltonian (tip Ore's theorem) the first part of the question was to prove that if $u,v∈V$ and they are not adjacent nodes and given H = (V/{u,v},F) the graph that we will get from G after removing u,v and all the edges adjacent to them would be $|F|$=$|E|$$-$$(deg_G$(u)+(deg_G$(v)$$)$. this is what i tried (after proving the first part) - the number of edges on a complete graph of n-2 nodes  is - $|E_kn-2|$ = $\frac{(n^2-5n+6)}{2}$ = $|F|$ $|E|>$ ${n-1 \choose 2}+1$ $=$ $|E|>$ $\frac{(n-1)(n-2)(n-3)!}{2!*(n-3)!}$+1 $=$ $|E|>$$\frac{(n^2-3n+4)}{2}$ and from the first part of the question we will use |F|=|E|−(degG(u)+($deg_G$(v)). and get that |F|-|E|=degG(u)+($deg_G$(v). lastly we will do $\frac{(n^2-3n+4)}{2}$ $-$  $\frac{(n^2-5n+6)}{2}$ and get a wrong answer of $n-1>n$ according to ores theorem .. i cannot figure where i went wrong or if everything is wrong and how to fix it thanks to any help , sorry for english mistakes if there are mistakes i will edit


how to disable system apps without root?

How to disable system apps without root?  My phone model is vivo x5 max+ and android 4.4.4  I have tried Debloater but it failed to connect (I am sure I've allowed USB debugging).


How to evaluate $\int{\sqrt{\tan(x)}\,dx}$

This might be a simple question, but how do you evaluate $\int{\sqrt{\tan(x)}\,dx}$ ? I've tried substitution with $u=\tan(x)$, that introduced a $\sec^2(x)$, I've also tried integration by parts, still stuck...


Auto fill find bar with highlighted text?

When searching on the page it would be great if you could auto fill the find bar with highlighted text as was proposed here:   Is there already an extension that does this?


Join multiple rows to a single feature in QGIS

I have this kind of csv attribute table:            ID INVENT_KPV KASVUKOHA_KOOD RINDE_KOOD PUULIIGI_KOOD VANUS 297945203711 2009.08.31             MO          1            KS    60 297945203711 2009.08.31             MO          2            KU    50 297945303711 2009.08.31             SS          1            MA    60 297945303711 2009.08.31             SS          1            KS    60 297945403711 2009.08.31             JO          1            HB    NA   As you can see, there are 3 different ID codes. I have also a map in QGIS and I want to join this attribute table and the map together but the problem is that when I use the button "info" in QGIS and click on the map then it shows me only information about one row not all of them (which have the same IDs).  For example, if I click somewhere in the map where's a patch with ID 297945303711 then it only shows me: 2009.08.31, SS, 1, MA, 60 and not 2009.08.31, SS, 1, KS, 60.


Finding the number of irreducible quadratics in $\Bbb Z_p[x]$, where $p$ is a prime

The problem is to find the number of irreducible quadratics in $\Bbb Z_p[x]$, where $p$ is a prime number.  To solve this, I wish to find first the number of reducible quadratics of the form $x^2+ax+b$, then the number of reducible quadratics, and subtract this from the total number of quadtratics.  I know that each reducible quadratic that is of the form $x^2 +ax+b$ is a product $(x+c)(x+d)$ for $c,d\in \Bbb Z_p$.  So, I don't know what to do next. Please help me solve this problem.  Thanks for the help!


i'm trying to install the package postgresql-server-dev-all but i'm getting this output from apt install:     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:    postgresql-server-dev-all : Depends: postgresql-server-dev-11 but it   is not going to be installed E: Unable to correct problems, you have   held broken packages.   by apt install postgresql-server-dev-11 I get the following:     The following packages have unmet dependencies:    postgresql-server-dev-11 : Depends: clang-7 but it is not going to be   installed                               Depends: libpq-dev (>= 11~~) but it is not going to be installed E: Unable to correct problems, you have held   broken packages.   And by apt install libpq-dev the following:     The following packages have unmet dependencies:  libpq-dev : Depends:   libpq5 (= 11.2-1) but 11.5-0ubuntu0.19.04.1 is to be installed E:   Unable to correct problems, you have held broken packages.   Of course I did already apt update and apt upgrade before that, and my Ubuntu version is the latest 19.04.  Are there inconsistencies in the repository that are responsibility of the Ubuntu team or can I still fix this manually?


Including TikZ file: the key '/tikz/cap' requires a value

I'm trying to include a file with a specific shape (cup) into another TikZ image, in order to use the cup as a "stamp" to draw more complex figure. The file is located in /usr/share/tikzit/shapes/cap.tikz  \documentclass{article} \usepackage[svgnames]{xcolor} \usepackage{tikz} \usetikzlibrary{decorations.markings} \usetikzlibrary{shapes.geometric} \pagestyle{empty}  \pgfdeclarelayer{edgelayer} \pgfdeclarelayer{nodelayer} \pgfsetlayers{edgelayer,nodelayer,main}  \tikzstyle{none}=[inner sep=0pt] \tikzstyle{node1}=[cap,fill=White,draw=Black]  \tikzstyle{simple}=[-,draw=Black,line width=2.000] \tikzstyle{arrow}=[-,draw=Black,postaction={decorate},decoration={markings,mark=at position .5 with {\arrow{>}}},line width=2.000] \tikzstyle{tick}=[-,draw=Black,postaction={decorate},decoration={markings,mark=at position .5 with {\draw (0,-0.1) -- (0,0.1);}},line width=2.000]  \usepackage[graphics,tightpage,active]{preview} \PreviewEnvironment{tikzpicture} \newlength{\imagewidth} \newlength{\imagescale}  \begin{document} \begin{tikzpicture}     \begin{pgfonlayer}{nodelayer}         \node [style=node1] (0) at (-2.5, 1.5) {};     \end{pgfonlayer} \end{tikzpicture}  \end{document}   The code i want to include is the following:  \begin{tikzpicture}         \path [use as bounding box] (-2,-2) rectangle (2,2);         \begin{pgfonlayer}{nodelayer}                 \node [style=none] (0) at (0, 0.75) {};                 \node [style=none] (1) at (-0.5, 0) {};                 \node [style=none] (2) at (0.5, 0) {};         \end{pgfonlayer}         \begin{pgfonlayer}{edgelayer}                 \draw [in=0, out=90] (2.center) to (0.center);                 \draw [in=270, out=-90, looseness=0.75] (1.center) to (2.center);                 \draw [in=90, out=180] (0.center) to (1.center);         \end{pgfonlayer} \end{tikzpicture}   But it seems I miss how to specify the directory of cup. I get this error:     Package pgfkeys Error: The key '/tikz/cap' requires a value. I am   going to ignore this key.   It seems like I have to deal with tikzstyle or pgfkey, but I don't know how to specify an external file.


Is there a way to create Tex Live or LaTeX virtual environment?

I am looking for a Python-style virtualenv or venv to create a virtual environment where I can install LaTeX packages such that the packages are available to my current LaTeX project only (but not available system-wide).  I am expecting something like the following:   Create a virtual-environment path, say, ./venv. Set some environment variables or modify tlmgr install commands such that new packages are installed into ./venv with the proper directory structure. Set some environment variables or modify pdflatex commands such that the new documents I compile use packages from the ./venv directory along with the packages in the system-wide paths that came with Tex Live distribution. I do not however want to hardcode any ./venv paths in the LaTeX documents (the .tex files). The source code in the .tex file should be agnostic of whether it is being compiled with a virtual environment or not.


In a regression model, why does adding variables increase $R^2$ and decrease the SSE?

According to the Rob Hyndman's , "section 5.3 - Selecting predictors", when selecting predictors in a regression model:      Adjusted $R^2$       Computer output for regression will always give the $R^2$    value, discussed in Section 5/1. However, it is not a good measure of the predictive ability of a model. Imagine a model which produces forecasts that are exactly 20% of the actual values. In that case, the $R^2$ value would be 1 (indicating perfect correlation), but the forecasts are not very close to the actual values.      In addition, $R^2$ does not allow for "degrees of freedom''. Adding any variable tends to increase the value of $R^2$ even if that variable is irrelevant. For these reasons, forecasters should not use $R^2$ to determine whether a model will give good predictions.      An equivalent idea is to select the model which gives the minimum sum of squared errors (SSE), given by      $SSE = \sum e_i^2$  , (with $e_i = y_i - \hat{y_i}$ )       Minimizing the SSE is equivalent to maximizing $R^2$ and will always choose the model with the most variables, and so is not a valid way of selecting predictors.   Now based on :   $R^2 = 1 - \frac{SSE}{SST}$ , with $SST= \sum (y_i - \bar{y})^2$   My questions:    I can't understand, based on the the definitions of $R^2$ and $SSE$, why $R^2$ would always increase when the number of variables in the model increases? and why does the $SSE$ would also decrease? Especially if this happens as he says even when the variable is irrelevant?  Does this relation between SSE and number of variables hold only for linear models?  We use the $SSE$ for training ML models in general all the time, but from the above quoted reasons, that would be a bad idea. Is this conclusion (maximizing $R^2$/minimizing $SSE$ is not a good measure of the predictive ability of a model) specific to forecasting problems (i.e. when using regression models specifically for forecasting purposes) or does it apply to any type of regression model? And if so, why is the use of $SSE$ so relevant if it is such a bad idea?


i have a ps4 and want to play gta with someone who has a ps3. i know you can’t crossplay those, but what if i bought gta for ps3 and played it on my ps4? could we play together then? or is it still different servers?


Star Wars canon, small ships and hyperdrive

I distinctly remember in Star Wars, A New Hope, in the scene when the Millennium Falcon arrives at the remains of what was once Alderaan, a TIE fighter passes close by and Han Solo gives chase. Obi-Wan says "A fighter that size couldn't get this deep into space on its own." Is he implying that TIE fighters don't have Hyperdrives or that they are too far from Imperial space? I ask this because I distinctly remember that, at least by "ROTJ" X-Wings are very capable of hyperdrive as in the scene at the beginning of the Battle of Endor when the entire rebel fleet makes the jump into hyperspace including a squadron of X-Wings. X-Wings are not much bigger than TIE fighters. Thank you


Comic Book Identification - Sci-fi/Fantasy - Lost Soul Earthworm

When I was a kid(early 1990s), I read a graphic novel from the local library that I have been unable to find or identify.  Here are the clues:   It's from the 1970s or 1980s, from what I remember of the art style. It felt like one of those strange sci-fi / fantasy mixes that were common in the 70s. It was black and white. The main character's soul becomes detached from his body and takes the form of a giant(human-sized) earthworm. The earthworm goes off and does its own thing. Our hero sometimes sees the earthworm in the distance, and at some point goes hunting for the thing, through forests and wastelands. The earthworm-soul thing was only ONE part of the comic's storyline. There was other stuff, but for the life of me, I can't remember what.


Is the sequence defined by the recurrence $a_{n+2}=\frac{1}{a_{n+1}}+\frac{1}{a_n}$ convergent?

Let $a_0=1$, $a_1=1$ and $a_{n+2}=\frac1{a_{n+1}}+\frac1{a_n}$ for every natural number $n$. How can I prove that this sequence is convergent?    I know that if it's convergent, it converges to $\sqrt2$ since if $\lim\limits_{n\to\infty}a_n=a$ then: $$\lim_{n\to\infty}\left(a_{n+2}-\frac1{a_{n+1}}-\frac1{a_n}\right)=a-\frac2a=0$$ $$\therefore\quad a^2=2$$ Now it's easy to see that every $a_n$ is positive, so $a\ge0$ and thus $a=\sqrt2$.  Assuming the sequence is convergent, I can calculate an estimation of the rate of convergence too. Let $\epsilon_n:=a_n-\sqrt2$. We have: $$\epsilon_{n+2}=\frac1{a_{n+1}}-\frac1{\sqrt2}+\frac1{a_n}-\frac1{\sqrt2}=-\frac{a_{n+1}-\sqrt2}{\sqrt2a_{n+1}}-\frac{a_n-\sqrt2}{\sqrt2a_n}=-\frac{\epsilon_{n+1}}{\sqrt2a_{n+1}}-\frac{\epsilon_n}{\sqrt2a_n}$$ Now because $a_n\sim\sqrt2+\epsilon_n$ and $\lim\limits_{n\to\infty}\epsilon_n=0$, therefore from the above equation: $$\epsilon_{n+2}\lesssim-\frac{\epsilon_{n+1}+\epsilon_n}2$$ which yields $\epsilon_n\lesssim\alpha\left(\frac{-1-\sqrt7i}4\right)^n+\beta\left(\frac{-1+\sqrt7i}4\right)^n$ for some constants $\alpha$ and $\beta$, using induction on $n$. Hence $\frac1{\sqrt2}$ is a good estimation for the rate of convergence since $\left|\frac{-1\pm\sqrt7i}4\right|=\frac1{\sqrt2}$. (Edit: Thanks to @AlexRavsky for his confirming graphs.)  Edit (some more of my thoughts):  Let $b_n:=\min\left\{a_n,a_{n+1},\frac2{a_n},\frac2{a_{n+1}}\right\}$. It's easy to see that $b_n\le a_n\le\frac2{b_n}$ and $b_n\le a_{n+1}\le\frac2{b_n}$. Now using induction we can prove that $b_n\le a_{n+m}\le\frac2{b_n}$. Especially, $a_{n+2}\ge b_n$ and $\frac2{a_{n+2}}\ge b_n$ which yields $b_{n+1}\ge b_n$. The problem can be solved if I show that the sequence $\left(b_n\right)_{n=0}^\infty$ increases to $\sqrt2$.


How to determine roots to the equation $y^3 - ky^2 - k=0$

What are the roots of $y^3 - ky^2 - k=0$ for an arbitrary constant $k$?   I haven't been able to find a root, so synthetic division couldn't be used. I have tried factorization as well.


I'm having some difficulty when using a Logical OR in a WFS query to get multiple postcodes. This code works fine when it's only 1 PropertyIsEqualTo filter, but when I wrap the OR around more than one PropertyIsEqualTo filter I get an exception.   POST http://intranet.nottscc.gov.uk/maps/wfs HTTP/1.1 User-Agent: Fiddler Content-Type: text/xml Host: intranet.nottscc.gov.uk Content-Length: 1875 Expect: 100-continue  <wfs:GetFeature service="WFS" version="1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wfs="http://www.opengis.net/wfs" xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml" xmlns:ncc="http://nottinghamshire.gov.uk" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"> <wfs:Query typeName="ncc:OSCodepoint_15KM"> <wfs:PropertyName>ncc:FORMAT1</wfs:PropertyName> <wfs:PropertyName>ncc:EASTING</wfs:PropertyName> <wfs:PropertyName>ncc:NORTHING</wfs:PropertyName> <ogc:Filter>   <ogc:OR>     <ogc:PropertyIsEqualTo>       <ogc:PropertyName>ncc:FORMAT3</ogc:PropertyName>       <ogc:Literal>NG156LR</ogc:Literal>     </ogc:PropertyIsEqualTo>     <ogc:PropertyIsEqualTo>       <ogc:PropertyName>ncc:FORMAT3</ogc:PropertyName>       <ogc:Literal>NG163GP</ogc:Literal>     </ogc:PropertyIsEqualTo>     <ogc:PropertyIsEqualTo>       <ogc:PropertyName>ncc:FORMAT3</ogc:PropertyName>       <ogc:Literal>NG158AY</ogc:Literal>     </ogc:PropertyIsEqualTo>     <ogc:PropertyIsEqualTo>       <ogc:PropertyName>ncc:FORMAT3</ogc:PropertyName>       <ogc:Literal>NG171ER</ogc:Literal>     </ogc:PropertyIsEqualTo>       </ogc:OR>     </ogc:Filter>   </wfs:Query> </wfs:GetFeature>   This is the Error message I get.  <?xml version="1.0" encoding="UTF-8"?> <ows:ExceptionReport version="1.0.0" xsi:schemaLocation="http://www.opengis.net/ows http://intranet.nottscc.gov.uk/maps/schemas/ows/1.0.0/owsExceptionReport.xsd"  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ows="http://www.opengis.net/ows">   <ows:Exception exceptionCode="NoApplicableCode">     <ows:ExceptionText>Error occurred getting features Invalid fid filter provides, has no fids inside Invalid fid filter provides, has no fids inside</ows:ExceptionText>   </ows:Exception> </ows:ExceptionReport>   I'm using GeoServer to process the query.   Any help is much appreciated.


.htaccess Solution to Referral Spam not working

Getting hit up with a new referral spam site (site valuation dot org) this morning and I've put my usual .htaccess fix in place:  RewriteEngine On RewriteCond %{HTTP_REFERER} ^https?://([^.]+\.)*sitevaluation\.org\ [NC,OR] RewriteCond %{HTTP_REFERER} ^https?://([^.]+\.)*best-seo-offer\.com\ [NC,OR] RewriteCond %{HTTP_REFERER} ^https?://([^.]+\.)*buttons-for-your-website\.com\ [NC,OR] RewriteCond %{HTTP_REFERER} ^https?://([^.]+\.)*4webmasters\.org\ [NC] RewriteRule .* - [F]   However, it doesn't seem to be working as I still see the URL sitting there stubbornly in my GA real time overview.  Am I doing something wrong or is this site doing something to get around this?


I just installed Ubuntu on my computer as a beginner and found out there is no LAMP server available in the software center. I'm somehow stuck on how am going to install LAMP server on my Ubuntu since there is no particular website for doing that.  Please , where are the sources where I can install LAMP server into my computer and the processes I will follow to make it work.  Thanks.


installing Ubuntu within Windows 7 -- where do I get the Wubi file?

I'm using Windows 7 and trying to install Ubuntu.  The instructions  tell me   "Download Wubi from the , this will download the latest version by default."  When I follow the given link, I see the big download button that downloads an iso file.  However, I don't see where to download Wubi.  This prevents me from following the next instruction:  "Within Microsoft Windows, place your downloaded ISO in the same directory as the Wubi, and run the installer."  I'm sure I'm missing something obvious.  Where do I download Wubi?  Update 2: The issue mentioned in the update below is addressed .  Update: After reading , I downloaded wubi.exe from releases.ubuntu.com.  (Specifically I downloaded wubi.exe from the  at releases.ubuntu.com.)  With wubi.exe now in the same directory as the ISO file ubuntu-14.04-desktop-amd64.iso, I went ahead and ran wubi.exe.  Everything seemed to be going well, however, once I rebooted the computer and selected Ubuntu (rather than Windows 7), I received this error message:    I chose "I" for "ignore", then received this error message:    I selected "S" for "skip mounting".  Ubuntu did eventually boot up, but I had access only to a terminal and not a typical Ubuntu desktop environment.  At the terminal I did sudo reboot, which restarted my computer and allowed me to select Windows as my operating system, which still works fine.  Does anyone have any advice on how I should proceed from here?  If I restart my computer now, I'll have a choice between using Windows (which works like normal) and Ubuntu (which is currently broken).


Where do you go for the 'nearest railroad' in Monopoly?

In the American edition of Monopoly, there is a Chance card that says:  Advance token to nearest railroad Pay owner twice the rental to which he/she is entitled. If railroad is unowned, you may buy it from the bank.   However, is this the closest railroad, or the next one? If you are standing on the Chance spot in the light blues, do you go all around the board to Reading, which is the closest to you, or do you go to Pennsylvania, which is the first one you land on?


Let $a , b, c, d$ be real numbers such that $$ a+b+c+d=6 \\ a^2+b^2+c^2+d^2=12$$  How do we prove that $$ 36 \space \leq\space 4(a^3+b^3+c^3+d^3)-(a^4+b^4+c^4+d^4) \space\leq48\space$$ ?


Battery percentages per app nowhere near total

when I look at my Nexus 5 with android 5.1. battery screen, I can see something like this:    Screenshots (click images for larger variants)  Sum of all per-app percentages in list is 10. However as you can see, there is 60% battery consumed (40% remaining). So, what is the deal here? Who consumed 50% battery? Or what do the percentages next to apps mean?  As you can see, screen was on just for few short times, the same for awake, and yet battery life about 18 hours? I dont get it.  Also, I found this issue reported on AOSP, but noone from google seems to care:


In the closing scene of RoS Rey has a black lightsaber, where'd she get it, and if its not important why was there a close up on it?


I usually see this one when it comes to probability.  What notation is this and how can I do it on latex?


Can I reappear on the other side of a wall if I Blink and then pass through it?

Scenario:  I have cast  on a previous turn and I am facing a solid wall with at least 5 feet of empty space on both sides. During my turn I ready an action with the following trigger: "When I enter the ethereal plane, I move 10 feet forward."  When my turn ends, I enter the ethereal plane and use my reaction to execute my readied move which lets me pass through the wall so that I end up on the other side.  I can now no longer see the space I vanished from, but I can see a space on the other side of the wall I passed through which is within 10 feet of the space I vanished from.   Assumptions:    I roll 11 or higher on the end of turn D20 roll for Blink I can execute a readied move while in the ethereal plane. (as per ) I can move through walls while I am moving in the ethereal plane. (as per )   Reference material:  Blink says the following on returning to the material plane:     you return to an unoccupied space of your choice that you can see within 10 feet of the space you vanished from.   Questions to answer:  When my next turn starts can I reappear on my original side of the wall even though I can't see it anymore?  Conversely, can I reappear on the other side of the wall since I can see it and it is within 10 feet of my starting location?


I am not a beginner to calculus. Till know I have learned about: 1. Functions - Domain,range,odd/even,periodic,compositemapping, etc. 2. Graphical transformations. 3. Evalution of limits, checking continuity differentiability and their theorems. 4. Derivative of functions, their theorems and application like monotonicity etc. 5. Definite and Indefinite Integration. 6. Differential Equations.  I need a textbook for much more advanced calculus according to my level, as I look forward to maths as career choice. Right now I need a book that have little bit of what I have already learned, so that I can practise it + more advanced and challenging calculus for deeper understanding.


Extra Shottky Flyback Diodes on FET-based BLDC Motor Driver?

TL;DR: I have a FET-based BLDC motor driver design, and I need to decide whether to add discrete Shottky diodes in parallel with each FET for reliable and long-lived operation in an automotive-like application. Yes? No? What do I need to consider?  Longer version:  I'm going through the details of a 3-phase BLDC (brushless DC) motor driver, and I'm debating whether to include discrete flyback diodes. The circuit looks like this one:    A few other parameters:   It's a 48V, 40A continuous (60A intermittent) driver. Reliability and toughness are a factor. This will see service as a traction motor driver in an automotive-like environment, for a small vehicle. The system will see operation in all .   Since the FETs already have body diodes, there are technically flyback diodes in place already, which means that even if the active components fail, there will still be a path for currents to flow. The question is whether these are enough to handle all of the scenarios that come up during normal (read: abusive) operation in the field.  I've considered adding a discrete Shottky diode in parallel with the FET body diode. In principle, since it has a lower forward voltage curve as well as a faster response time, any flyback currents should shunt through the Shottky instead of the FETs. If the current ever comes along, this is a good thing. But the question is, will there ever be a scenario where the body diodes aren't big enough to handle the heat?  Does anyone have any experience as to whether adding discrete Shottkys in a FET-based motor driver bridge provides any benefit? If so, what do they protect against?


Light travels in the form of a wave.It has masless photons travelling at the speed of light.Does it mean that tha photons travels in the trajectory same as that of a wave.


"You have already raised this flag" Well, not really

After I  and flagged some spam on the , for a poorly-understood reason, I went back to one of the questions I'd flagged and opened the flag dialog. There, I saw something of little importance, but of less than perfect... perfection:        I had flagged  as spam. I had not flagged the question as "not welcome in our community". And, for what it's worth, I had not added a custom flag, so... that part's right.


How is experience gained from gym battles calculated?

When people talk about experience gains in Pokemon go, they usually talk about catch bonuses, evolution bonuses, hatching bonuses, etc. I haven't found anything that discusses experience gains from gym battles.  Unlike the bonuses mentioned above, gym battles seem to not reward experience in numbers ending in 0 (or 5 in the case of a Pokemon escaping).   I would assume that the higher the CP of the Pokemon defeated, the more experience would be given, but it looked like I was receiving different amounts for defeating the same Pokemon each time (training a gym). Does anyone know if the experience reward for battling includes other factors like time remaining or HP remaining?


Update from Mac OS X 10.6.8 to the newest version

I want to update from Mac OS X 10.6.8 to the newest version which is macOS Sierra. My Mac should be able to run this version of macOS. If I try to download the update on the App Store it fails because I need Mac OS X 10.7 at least.  What can I do to upgrade my Mac?


Why am I seeing loop and squashfs in "blkid" output?

executing $blkid on 20.4 I am seeing a output as below. I don't understand what loop and squashfs are here? Could someone explain? Does this have anything to do with snap installed applications? /dev/loop0: TYPE="squashfs" /dev/loop1: TYPE="squashfs" /dev/loop2: TYPE="squashfs" /dev/loop3: TYPE="squashfs" /dev/loop4: TYPE="squashfs" /dev/loop5: TYPE="squashfs"


C# displaying documentation on method when dot operator is invoked on a class

Is there a way programmatically to document methods in a class and have the documentation display just like when a user invokes the dot operator (for example, String.[method]) and can look at what a specific method within a class does?  See screen shot. I want to create custom methods for a class in C# and then document that. Then when the user uses that class and then initiates the dot operator (.), they will be presented with the method and the documentation that describes that method


Let $f(x)=7x^{32}+5x^{22}+3x^{12}+x^2$. Find the remainder when $x^2+1$ divides $f(x)$ and $xf(x)$.  I tried this problem two ways, substituting $x=1,-1$ in $f(x)$ to find the remainder, and by long division, but, that's not getting me to the answer. I think there is a shorter and elegant technique for solving this question. Please help. Thank you.r


Virtualbox: Loading of unsigned modules is restricted

I followed the 'Debian-based Linux distributions' guide on the VirtualBox website.  After sudo apt install virtualbox-5.2 I got the error:  vboxdrv.sh: failed: modprobe vboxdrv failed. Please use 'dmesg' to find out why.  There were problems setting up VirtualBox.  To re-start the set-up process, run   /sbin/vboxconfig as root.   dmesg: Loading of unsigned modules is restricted; see man kernel_lockdown.7.  How can I fix this?  I read something about secureboot but I don't want to disable it.  Do I have to sign the VirtualBox module (how? add custom sign key?) or is there another way?  I'm running Kubuntu 18.04 Kernel 4.15.0-23-generic.  EDIT  After following this guide   and executing sudo modprobe vboxdrv I got the error modprobe: ERROR: could not insert 'vboxdrv': Required key not available. With modinfo vboxdrv I see:  filename:       /lib/modules/4.15.0-23-generic/misc/vboxdrv.ko version:        5.2.12 r122591 (0x00290001) license:        GPL description:    Oracle VM VirtualBox Support Driver author:         Oracle Corporation srcversion:     63368184ED096B3022FD087 depends:         retpoline:      Y name:           vboxdrv vermagic:       4.15.0-23-generic SMP mod_unload  signat:         PKCS#7 signer:          sig_key:         sig_hashalgo:   md4   So it looks like it's not signed right? Whats wrong with this? I tried to sign it manually with /usr/src/linux-headers-4.15.0-23-generic/scripts/sign-file sha256 ./MOK.priv ./MOK.der /lib/modules/4.15.0-23-generic/misc/vboxdrv.ko with the same result.


How do I partition a hard drive when Ubuntu is already installed?

I installed Ubuntu on my laptop, and now I want to partition my hard drive, but I'm not sure how to partition after Ubuntu is already installed.  How can I partition my hard drive?


How can speed of a gaseous molecule be approximately equal to infinity?

It is a postulate of Kinetic theory that the speed of molecules ranging from 0 to infinity. But we know that no object can exceed the speed of light. Then how can this be possible?


Python3 - Getting quoted text with spaces as single item

If I have a input line such as  userInput = input("Enter stuff: ").split()   which returns a list split by spaces.  How would I go about getting this to keep quoted text as a single item in the list?  eg. If I input hello "where are you?"  I want to get a list with ['hello', 'where are you?'] instead of ['hello', '"where', 'are', 'you?"']  Currently I am using a for loop to add the quoted text back together but I was hoping for a sleeker way.  userInputString = "" for x in userInput[1:]:     userInputString = userInputString + x + " " userInputString = userInputString[1:-2] #remove the quotes and the last space


Recently I get to touch with partial trust application. Could you explain in some common words? Or give me an example? When should I think about this issue? I am trying to find some documents in the web, but I found very little. So I come to think maybe this is not used often in today's .net programming. Is this true?


(Arithmetic–Geometric Mean).   (a) Explain why $\sqrt{xy}≤ (x+y)/2$ for any two positive real numbers x and y. (The geometric mean is always less than the arithmetic mean.)   (b) Now let $0≤x_1 ≤y_1$ and define $x_{n+1} = \sqrt{x_{n}y_{n}}$ and $y_{n+1} = (x_{n} + y_{n})/2$ . Show $\lim x_n$ and $\lim y_n$ both exist and are equal.  My attempt:  (a) I know that I can show this by using $(\sqrt{x} -\sqrt{y})^2 \geq0$ but I dont know how to illustrate, let alone explain it.  (b) I know that $x_{n+1} \leq y_{n+1}$ for all $n \in \mathbb{N}$. But now I need to know how to show that they are equal.


I was following this instruction   duke@ostrov:~$ sudo apt install mysql-server-5.6 [sudo] password for duke:  Reading package lists... Done Building dependency tree        Reading state information... Done 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:  mysql-server-5.6 : Depends: initscripts but it is not installable                     Depends: sysv-rc (>= 2.88dsf-24) but it is not installable or                              file-rc (>= 0.8.16) but it is not installable                     Recommends: libhtml-template-perl but it is not going to be installed E: Unable to correct problems, you have held broken packages. duke@ostrov:~$ sudo rm /var/lib/mysql/debian-5.7.flag rm: cannot remove '/var/lib/mysql/debian-5.7.flag': No such file or directory


Using Residue Theorem find $\displaystyle \int_0^{2\pi} \frac{1}{a^2\cos^2 t+b^2 \sin^2 t} dt \;; a,b>0$.   My Try:  So, I am going to use the ellipse $\Gamma = \{a\cos t+i b \sin t: 0\leq t\leq 2\pi\}$.   On $\Gamma$, $z=a\cos t+i b \sin t$, so $|z|^2=z\bar{z}=a^2\cos^2 t+b^2 \sin^2 t$.   Now, $dz=-a\sin t+i b \cos t dt$.   Hence, the integral becomes $\displaystyle \int_\Gamma \frac{dz}{z(iab+(\sin t \cos t)(b^2-a^2))}$. I know that $\displaystyle \int_\Gamma \frac{dz}{z}=2\pi i$. Now, how do I get rid of $\sin t \cos t$ part? I am stuck here. Can somebody please explain how?


Roots of polynomials in field of prime characteristic p

Let $F$ be a field of characteristic $p$, and let $\alpha \in F$. Let $f \in \mathbb{Z}_p[x]$ be such that $f(\alpha) = 0$. Apparently, we have $f(\alpha^p) = 0$. This was mentioned but not proved in my lectures. Can someone explain why please?  Thanks.


I'm trying to compute the shadow of 3D objects on the ground. To do this I'm assuming parallel rays from Sun origin.   Let's assume the Sun direction is given by azimuth $\varphi$ and elevation $\theta$ angles. So the direction unit vector is retrieved as:  $$ \hat{\mathbf{s}} = \mathbf{R}_y\left(\theta\right)\mathbf{R}_z\left(\varphi\right)\hat{\boldsymbol{\imath}}$$  where $\mathbf{R}_{x/y/z}$ are the rotation matrices along the $x, y, z$ axes given by, for example, Euler-Rodrigues equation, and $\hat{\boldsymbol{\imath}}$ is the unit vector along $x$-axis.  A point on a ray-line has the equation:  \begin{equation} \mathbf{r} = \mathbf{r}_p + \lambda\hat{\mathbf{s}}  \tag{1} \end{equation}  being $\mathbf{r}_p$ a point on that line.  A point on a general plane is given by the equation:  \begin{equation} \left(\mathbf{r} - \mathbf{r_0}\right)\cdot \hat{\mathbf{n}} = 0 \tag{2} \end{equation}  being $\mathbf{r}_0$ a point on the plane and $\hat{\mathbf{n}}$ the unit vector normal to that plane.   Ensuring the validity of both equations (1) and (2) allows to compute the $\lambda$ multiplier and retrieve the position vector of the projected point (writing $\tilde{\mathbf{r}} = \mathbf{r_p} - \mathbf{r_o}$)  \begin{gather} \lambda = - \left(\frac{\tilde{\mathbf{r}}\cdot \hat{\mathbf{n}}} {\hat{\mathbf{s}}\cdot\hat{\mathbf{n}}}\right) \\ \mathbf{r}_\text{proj} = \mathbf{r}_p - \left(\frac{\tilde{\mathbf{r}}\cdot \hat{\mathbf{n}}} {\hat{\mathbf{s}}\cdot\hat{\mathbf{n}}}\right)\hat{\mathbf{s}} \tag{3} \end{gather}  Applying eq. (3) to all the vertices of a mesh $\left\{\mathbf{r}_{p_i}\right\}$ .   A problem can be noted: $\hat{\mathbf{s}}\cdot \hat{\mathbf{n}}$ can be zero (e.g. Sun is horizontal, i.e. the ray is ortogonal to the normal of plane).   Are there some conceptual mistakes in my reasoning? Is there a way to rewrite the operation as a linear operator applied to the set of vertices position vectors?   $$ \left[\mathbf{A}\right]\left\{\mathbf{r}_{p_i}\right\} = \mathbf{r}_\text{proj}$$


AES128 decryption. Invalid private key. Must be 16 bytes

I get an encrypted data from external service (AWS Cognito). With the following code, I get the 'Invalid private key. Must be 16 bytes' error.      String data = 'qgBYrFjDvnS5yb1ZWtP2yfbO6CU7ezVNXq6MlXRLAZmgiCNBUfXfSq+2yBvfHdv9a3HV+mGsT8SMIpeWQ/yuzibMwI7xTgObjMU8vfz8AMXI1p/RRdTPPSNmz0kMy/MHdRoKVBG0Tl+OthYXP+dxDlCQEe1cJyLnoMd43OJ3m22Mf3EMboSEeH2Pzq6T0M92T2tNKyBT7CvsV5w2p4/4ZDWAs6vj3nHAWyKNoai5w/O7sGAbI1iOr3EqkAfgwaSjFyTZ7bgznd9II6vM0L0xCS76tZ/WcJrVcl2vtQKVOSfmw6/T+52ZePYWLnsB94y0eLEWNdASgz13P36m9jzaBvzA/HB3gxfligCEHjSXjeqwmHjvE3NKSsMH0aDY6c4Rj6ecPOvqGymbkfjY9kxfV7RHFYl/fwXoIRGxNZnDlNpNqDZ9UZ3lJHLDDUcHX8xc4W2IQPHyKb0SW09fXNhHxYgb7j0eS83P/BFy6GfWU+1K7Xk8lRnLtHhdPbAjiOWlWRG+S37nEX9gJBHlgYi/dVaCOFyq1hkVDuoIJiZ6rJvVYIIbhxsF1SJN8TTU723ynSIq40lzVEuz1QZp9qtV/aa3Sh5dMBZlyGDAS4hy6VL9APFlCbwL4XhyKetvUtdzI/Z+nmJi/SlyA9HIxS5L7LQYMGtamJvkeB1T+EM+Sn+6holTXUvS/ehliDYggcSVFqhVAWUb4pKyujsvTyg2Ej3GPAdwu30hI6dZA3gjConOOWfOHOuBkOc+bbcT6J7whoDma1nvwA837E9uAvfuP7cquiB2G1q/VCW0Whuy8D1PEIbIdrB4iXNZuDIIvEiNKufQ2SCyau2mpIVuoPhLgsf4OKiPNv4mYuyJf6E6Ui3FgH6i/T7xfRH8W0nzu2vmBkYkBy5cPAx5+lp3Dm1lYwDuXYyls0/aBPXOjo968Z3dop5ZFlB/ZfaTgL8TKkj9wnVvbfasNm6fowFR1bqsSi5msK23VRA79/gNPOBtJZViynUaZzkPsQtxB893W8iDZnhrF54FPi7NrKkpFHmZCCd8mkbtOXJAyntVExlY5F9zCJlWtQdzGvfDew8PEYlo3LIubFeDGP7S6nCoOlG8zRyMDdKrmM6mOJaCFceJlFJ/yqnSd197+dqqY+MyQ+WWge70y+2jmYxZm9fJSuODskKkz9cas/TuxDvTaE2bKm1Q4udLwUDjB8yDxZvkGVm0e91hEMosgdqZ626zBk3GvD1wYMDT995AVx3XQbGGpUmwBwoFvdWRdf0hKMr3yEaCsDmAnftSzzKYRc33SbNkWEkSA7KCCG0u6KUIisfn1v487rEy+ozTp6eX8gluHpxVBLAD21DJXPrDmQGDc9vbSg==';     String key = '75ac5e7677e7218a7f059f0bda073a6b';      Blob dataB = EncodingUtil.base64Decode(data);     Blob keyB = Blob.valueOf(key);      Blob decryptedData = Crypto.decryptWithManagedIV('AES128', keyB, dataB);     String decryptedDataString = decryptedData.toString();   I also have an example of implementation of decryption with Javascript, but cannot decrypt it with Apex.  function decryptEncryptedResponse(data, key) {          if (typeof data === 'string') {             var byteCharacters = atob(data);             var iv = new Array(16);             var crypttext = new Array(byteCharacters.length - 16);              for (var i = 0; i < byteCharacters.length; i++) {                 if (i < 16) {                     iv[i] = byteCharacters.charCodeAt(i);                 } else {                     crypttext[i - 16] = byteCharacters.charCodeAt(i);                 }             }              var cipherParams = CryptoJS.lib.CipherParams.create({                 ciphertext: byteArrayToWordArray(crypttext)             });              var plaintextArray = CryptoJS.AES.decrypt(                     cipherParams,                     CryptoJS.enc.Hex.parse(key),                     {iv: byteArrayToWordArray(iv), mode: CryptoJS.mode.CBC, keySize: 128}             );              return JSON.parse(CryptoJS.enc.Latin1.stringify(plaintextArray));         } else {             return data;         }     }   How can I do the same with Apex? Thank you in advance!  UPDATE Thank you for help! The final alternative method below:  public String decryptEncryptedResponse(String data, String key) {     Blob dataB = EncodingUtil.base64Decode(data);     Blob keyB = EncodingUtil.ConvertFromHex(key);      Blob decryptedData = Crypto.decryptWithManagedIV('AES128', keyB, dataB);      return decryptedData.toString(); }


Where should I ask this type of question?

I have a question about algorithms that need to be computationally efficient (optimal would be better). In particular the tone of the question would be: "I have well-known mathematical problem X, I know generic solution such-and-such (computationally intensive in my case), does a computationally optimal solution/algorithm exists?" Should I ask on Stack Overflow, Computer Science, Software Engineering, or Math? Please note that I am not asking for recommendations or suggestions. If a computationally optimal algorithm exists its optimality should have been proved in a paper, and is not a matter of opinion.


How do I check and inform user had javascript enabled in browser

My desktop application creates a html report at the end showing results and opens it in users default webbrowser. The report is in html5 and utilises a frameset, clicking items on the left hand frame changes the display on the right handside.  But one for one user it didn't work because they had NoScript add on installed which I think by default disables Javascript.  What is the accepted way to inform users they need Javascript enabled, can the report itself proactively identify whether Javascript has been disabled (for the report).


Including "Chapter" before each section number in the ToC? (Updated Question)

I was given a solution to include "Chapter" before my section entries in the ToC, however the number of the section does not get transferred to the ToC! For instance, in the MWE below, the sections are called "Chapter 1 \break Section One" and "Chapter One \break Section Two", however in the ToC, the sections are listed as "Chapter Section One" and "Chapter Section Two", and thus omitting the section numbers. I'd like to include these section numbers in the ToC.  Thanks!  \documentclass[12pt]{article} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \usepackage[showframe]{geometry} \usepackage{titlesec} \usepackage{titletoc}  \addto\captionsenglish{ \renewcommand*\contentsname{\centerline{TABLE OF CONTENTS}}}  \titleformat{\section}[display]% {\null\vskip1em\sffamily\bfseries\filcenter}{Chapter \thesection}{0em}{}[] \titleformat{name = \section, numberless}[block]% {\null\vskip1em\sffamily\bfseries\filcenter}{}{0em}{} \titlespacing*{\section}{0em}{1em}{1em}  \titlecontents{section} [7em] % ie, width of contentslabel + 0.5em {\medskip} {\contentslabel[\MakeUppercase\chaptername~]{6.5em}}%\thecontentslabel {\hspace*{-6.5em}} {\titlerule*[0.5pc]{.}\contentspage}  \begin{document}  \tableofcontents \newpage  \section*{An Unnumbered Section} \addcontentsline{toc}{section}{An Unnumbered Section} \section{Section One} \subsection{A first subsection} \section{Section Two} Content  \end{document}


What is the appropriate location for custom systemd service files?

I have many custom service files that I control with systemctl and up until today I have been putting these .service files in /usr/lib/systemd/system/, however today I obtained a new program and it automatically created the .service file in a location I didn't think of - /etc/systemd/system/.  Is this where I should have been putting the service files I have created myself? Both directories appear to work, so ultimately I know it doesn't make a difference, but what does convention dictate? Is there a more correct location to have these custom service files?


Why does the linear regression of "x on y" intersect with the linear regression of "y on x" at (x̄, ȳ)?

Problem: The following table below shows the marks scored by seven students on two different mathematics tests. $$\begin{array}{c|c|c|}  \text{Test 1 (x)} & 15 & 23 & 25 & 30 & 34 & 34 & 40 \\ \hline \text{Test 2 (y)} & 20 & 26 & 27 & 32 & 35 & 37 & 35 \\ \hline \end{array}$$ Let $L_{1}$ be the regression line of x on y. The equation of the line $L_{1}$ can be written in the form $x = ay + b$. (a)  Find the value of $a$ and the value of $b$. Let $L_{2}$ be the regression line of $y$ on $x$. The lines $L_{1}$ and $L_{2}$ pass through the same point with coordinates $(p,q)$. (b) Find the value of $p$ and the value of $q$. My solution: I inputted both sets of data into the calculator (TI-84) and got a line of best fit for both. $x$ on $y$: $y=1.2908291457286x-10.379396984925$ $y$ on $x$: $y=0.69993188010899x+10.187670299727$ These two lines intersect at $(34.81,34.55)$ The actual solution: The lines should meet at $(x̄, ȳ) = (28.7,30.3)$ Can anyone point me in the correct direction? I just don't see how these two lines could intersect at the mean x,y values when those values are obviously flipped in the two lines. Edit: This problem is from the IB Math AA HL curriculum, exam code SPEC/5/MATAA/SP2/ENG/TZ0/XX/M . This is a practice test provided by IB.


Can I upgrade to a newer version of Ubuntu without problems using Software Updater?

I'm new to Ubuntu. Can I use this window for upgrading but without any problems?   Does the update process delete or change other applications I'm using?


Error in compilation in a foreach loop in TikZ Euclide

Why the following document does not compile correctly? I would like an output drawing n consecutive semicircles. For n=4 an output like this:    Is there a way to fix my code?  \documentclass{article} \usepackage{tikz} \usepackage{tkz-euclide}  \begin{document}  \begin{tikzpicture} \def \n{4} \foreach \i in {0,...,\n}   {   \tkzDefPoint(2*\i/\n,0){t_\i}   \tkzDrawPoint(t_\i)   }  \foreach \i in {0,...,\n/2} { \tkzDrawArc(t_(2*\i+1),t_(2*\i+2))(t_(2*\i)) } \end{tikzpicture}  \end{document}   Here is a manual solution without foreach:  \begin{tikzpicture} \tkzDefPoint(0,0){A0} \tkzDefPoint(.25,0){B0} \tkzDefPoint(.5,0){A1}   \tkzDefPoint(.75,0){B1}   \tkzDefPoint(1,0){A2}   \tkzDefPoint(1.25,0){B2}   \tkzDefPoint(1.5,0){A3}   \tkzDefPoint(1.75,0){B3}   \tkzDefPoint(2,0){A4}   \tkzDrawSegments(A0,A4) \tkzDrawArc(B0,A1)(A0) \tkzDrawArc(B1,A2)(A1) \tkzDrawArc(B2,A3)(A2) \tkzDrawArc(B3,A4)(A3) \end{tikzpicture}


The vertices of an equilateral triangle are shrinking towards each other

For an equilateral triangle ABC of side $a$  vertex A is always moving in the direction of vertex B, which is always moving the direction of vertex C, which is always moving in the direction of vertex A. The modulus of their "velocity" is a constant. When and where do they converge.   Attempt. Found the "when" using a physics style approach by "fixing the frame" on one of the vertices. (From this frame, other two vertex are moving towards origin in a straight line and components of their speed along this line can be used to find when the three meet at origin) For the "where" it is difficult using above approach as this is some kind of rotating and shrinking triangle which is difficult to translate.     @all Apologies for bumping this question. I wished to give an answer the bounty but it wont let me until the next 23 hours. For the record: I am not seeking new answers.  Update: A cool example of  package of $\LaTeX$, for anyone who finds this question later.      to code (a .tex file)  And using Pgf/TikZ


Proving authorship when name in publications does not match name in passport

My full name on passport is Amir Hisham Ahmed Al-Attraqchi (first three names + surname). In my publication, I only used the first and the surname (i.e. Amir Al-Attraqchi). Is it going to be a problem proving the publications to be mine?  I'm worried about proving this when applying for new universities, promotions or fellowships


How to switch the screen illumination off and continue typing?

I can switch the screen illumination manually off by pressing Fn+F6 on my laptop keyboard. This is the same as automatically switching it off on idle as it can be set in the power management.   The screen illumination will turn on again if I press any key. I want to keep on typing with a dark screen, i.e. I want to be able to switch it on again only by pressing one specific key combination. (In fact, external illumination e.g. from the sun behind my back can be sufficient to make the screen readable. This is also more eye friendly to me.)  How can I find which software mechanism turns the illumination on again on any key pressed so that I can restrict this mechanism to a particular combination?  This question seems not to be related to screen brighness as it is treated in . I can already adjust the brightness to be quite dark with another keyboard combination, but in the darkest setting /sys/class/backlight/acpi_video0/actual_brightness contains already 0 whereas the screen illumination is still brighter than off. So the switch I think about might be adressed by the Fn+F6 mechanism somewhere else than in the /sys/class/backlight/acpi_video0 tree. The files therein do not change when the screen illumination is turned off completely, only when the brightness is changed but still on.  I'm using MATE/Gnome on an old acer laptop, but hints for other system configurations might be helpful as well.


I am having a problem with Low disk space in Ubuntu 18.04. Using on terminal:   df -h:    sudo du -hs /*:    I want to take the partition on /dev/sdb4 and move to /dev/sdb5.    Actually I want to solve the problem of low space, I think this is how I can do it.


For how long can a human sustain a temperature of 180 degrees Fahrenheit (82oC) without damage in a confined place?  For instance, suppose a person is sitting in a steam-filled room, without external air flow (but with enough oxygen) - how long could one resist the heat before permanent physical damage would occur?


I want to import shapefile into PostGIS. There is one database postgres in it but no table added yet.   I am using this command:   shp2pgsql -I -s 4326 districts.shp districts | psql -d postgres -U postgres    and it's giving me some error:      Unable to convert data value to UTF-8 (iconv reports "Invalid or incomplete multibyte or wide character"). Current encoding is "UTF-8". Try "LATIN1" (Western European), or one of the values described at postgresql.org/docs/current/static/multibyte.html   Is my command wrong ??


Unable to load jQuery in Salesforce Lightning Application after Salesforce Locker Service enable in Summer '16 Release

We have a couple of applications built in Salesforce's Lightning Components.  Recently Salesforce released their Summer '16 Major Release this past weekend, on June 4th 2016. Something wrong happened and now I'm getting a error every time I try to load any of my component.  Error     "Uncaught TypeError: Cannot read property 'expando' of undefined   throws at /resource/jQuery/jquery/js/jquery-1.10.2.min.js:3:30190"   Here's the code I have in the new Component    <aura:component >     Test With Locker     <ltng:require scripts="/resource/jQuery/jquery/js/jquery-1.10.2.min.js"/>  </aura:component>


Can we ask any question on any topic by tagging “Community Wiki” post?

If yes, then here is my question:     What is the global lock down's impact on the software industry for the long term? What will be the impact on technology trends?


I try to import numpy in Blender 2.77a. My Blender uses python that came pre-packaged. It has numpy module "2.77/python/lib/python3.5/site-packages/numpy". But running import numpy I get this error:   found bundled python: /home/user/blender-2.77a-linux-glibc211-x86_64/2.77/python Traceback (most recent call last):   File "/Text", line 1, in <module>   File "/home/user/blender-2.77a-linux-glibc211-x86_64/2.77/scripts/modules/numpy/__init__.py", line 137, in <module>     from . import add_newdocs   File "/home/user/blender-2.77a-linux-glibc211-x86_64/2.77/scripts/modules/numpy/add_newdocs.py", line 9, in <module>     from numpy.lib import add_newdoc   File "/home/user/blender-2.77a-linux-glibc211-x86_64/2.77/scripts/modules/numpy/lib/__init__.py", line 4, in <module>     from .type_check import *   File "/home/user/blender-2.77a-linux-glibc211-x86_64/2.77/scripts/modules/numpy/lib/type_check.py", line 8, in <module>     import numpy.core.numeric as _nx   File "/home/user/blender-2.77a-linux-glibc211-x86_64/2.77/scripts/modules/numpy/core/__init__.py", line 5, in <module>     from . import multiarray ImportError: cannot import name 'multiarray' Error: Python script fail, look in the console for now...   Is there something else I should do?  EDIT:  I tried a different machine, same download, and it works without problems. How could I identify what is wrong with my machine? Some missing paths, settings, libraries?


Directly editing or leaving a comment instead?

I tried to find a  about that, but couldn't find one.  When should one directly edit a post and when should one just suggest improvement in comments instead?  So far, I have been using my "gut feelings" but, for people on the autism spectrum (like me), clearly stated rules are much less stressful.  I'm asking this because we had an "incident" today when someone took real offense of an edit while the all issue was only due to miscommunication.    Edit:   The faq post about  is interesting but doesn't talk about when one should be commenting instead of editing.  The faq about  don't really talk about when one should edit or not.


Book: Mechsuit on a crystal planet is destroyed by native vegetation

Can someone help ID a book please. I probably read it in the 80s, but can't be sure it wasn't early 90s. It was the story of a lone human in a mech suit who explores an alien planet where much of the life is crystal based. They smash through everything, overpowering the vegetation in the mechsuit until something unexpected, a laser defence from a plant, immobilises and destroys the suit. They jump out and have to live by their wits. They make friends with an alien community, I can't remember if they're fully sentient. I don't recall how it ends.


How do I check the results of a chkdsk that ran at start up?

I already looked in Event Viewer. It was nowhere to be found. Maybe I'm not looking hard enough, lol.


The behavior of dash (and also bash) looks non-intuitive in this case. It seems that new_file is created before ls is executed. Is it specified in POSIX?


I want to add more than 20 digits in an Excel cell.  The current format of the cell is general, it converts the number to an exponential format. I tried with a number format and accounting, but when I enter more than 15 digits it gets converted to 0's.  What are the recommended steps for stopping Excel from converting data to exponential Format for 20 digits when in the general format?     Example: 12345678901234567890   Excel converts it to 1.23457E+19 in general format.  Without using ' before the value, is there any other way to keep value same?


What can I do about my Schengen visa refusal?

My Schengen visa got refused and one of the reasons are "Your intention to leave the member states before your visa expiration is not justified".   What should I do to solve it and where did I go wrong? the another question is also my another reason and I have solved that but I am confused about this problem


A car hire firm has three cars, which it hires out on a daily basis. Number of cars demanded per day follows a poisson distribution with mean 2.1  a) Find the probability that all cars are in use on any one day.   b) Find the probability that all cars are in use on exactly three days of a five day week.  What I tried:  For the a) part: normal poisson formula with mean = 2.1 and x = 3   $$\frac{(e-2.1)(2.1^3)}{6}$$  Got the answer as 0.1890. The book's answer is 0.350   For the b) part: did poisson to binomial. Found out p = 0.7. Then used 5C3. But I think my method here is wrong.


Design patterns are usually related to object oriented design. Are there  for creating and programming ? Many problems surely must have reusable solutions.  Examples would include patterns for table design, stored procedures, triggers, etc...  Is there an online repository of such patterns, similar to ?    Examples of problems that patterns could solve:   Storing hierarchical data (e.g. single table with type vs multiple tables with 1:1 key and differences...) Storing data with variable structure (e.g. generic columns vs xml vs delimited column...) Denormalize data (how to do it with minimal impact, etc...)


How to change the language for the front-end only?

I have installed a wordpress theme, i can see the .mo and .po /public_html/wp-content/themes/themename/lang, the language I want to use is available.  Could you please advise on how to use a specific language? I don't want to change the admin language just the theme language.


My cat sat on my laptop, now the right side of my keyboard types the wrong characters

My cat sat on my laptop and now if I type either L or P, it inputs 3 or * instead. The rest of my keyboard still works correctly. The problem is bad enough that I had to use the touch screen of my computer to type this in.  How can I restore the correct working behaviour of my keyboard?


I have had my Nikon D40 for a while, and some of the pictures are coming out distorted. Two examples are below:   So my questions are:    How do I fix them after the fact? - i.e. after they have been imported from the camera - if possible How do I prevent future pictures from being distorted like this?   Thanks   and


Direct Access support for IoT Enterprise

The company where I work has a set of kiosk devices which we install at remote sites. For the new version of these devices, we are looking at running Windows IoT Enterprise as the OS.  With this change, our existing MDM solution is not supported. When exploring alternative options, we came across Microsoft's Direct Access solution, which satisfies all of our requirements as far as management and cost effectiveness.  While Direct Access seems to be the solution we're looking for, there is one make-or-break question that I have not been able to find an answer to: Is the Direct Access client supported on Windows IoT Enterprise?  For the sake of clarity, by "supported" I mean "if it breaks, can we call Microsoft Support?" If it runs on the IoT client but is not a supported solution, we will need to look elsewhere.  Thank you


Is there any way to call a variadic function from another one? I know that if I want to forward a variadic call, I can use a function that accepts va_list parameters. For example, If I declare my_printf I can call vfprintf inside. Another way would be to use macros: #define my_printf(a, ...) fprintf(a, __VA_ARGS__)  but is there a way to "create" a variadic call without being forced to use va_list parameters? In other words: is there any way (standard or not, using gcc extensions, etc.) that my_printf can call fprintf directly and not vfprintf?


Variance of a sum of a random number of iid random variables

I tried to get an expression for the variance of a sum of a random number of iid random variables. My question is whether it is correct and, if not, what is wrong or what additional assumptions might be missing.  Specifically, let:  $$S=\sum_1^N{X_i},$$ where $N$ is a non-negative integer-valued random variable.  Suppose that the distributions of both $N$ and $X$ are known (and $X_i$ are iid), I want to know the value of the variance of $S$.  Is the following solution correct?  $$V(S)=V(X)E(N)+E(X)^2V(N)$$


Does a continuous and 1-1 function map Borel sets to Borel sets?

Suppose $f: \mathbb{R} \to \mathbb{R}$ is a continuous function which is 1-1, then does $f$ map Borel sets onto Borel sets?


Simple scheme to sample from the Bernoulli distribution

I was implementing a simple scheme of Bernoulli distribution sampler. $ X \sim B(p) $. I have a function that generates a uniform random number $r \in (0,1)$. Then, I set $ X = 1 $  if $p > r $, and $X =0$ otherwise. Is this correct?