How generate a JWT token for Metabase using Apex

I have to embed a Metabase Iframe into Salesforce via an lwc.  The metabase itself gives me the code below in Node.js as an example.  var jwt = require("jsonwebtoken"); var METABASE_SITE_URL = "METABASE_SITE_URL"; var METABASE_SECRET_KEY = "15480e3f631b3ff5a1dcfa9d2efdbfc94395e66ecdcc238f2"; var payload = {   resource: { question: 1209 },   params: {},   exp: Math.round(Date.now() / 1000) + (10 * 60) // 10 minute expiration }; var token = jwt.sign(payload, METABASE_SECRET_KEY); var iframeUrl = METABASE_SITE_URL + "/embed/question/" + token + "#bordered=false&titled=false";   Now I am trying to adapt this code to Apex and it has been a really painful journey.  I've tried using JWT class, JWS and Crypto, but so far without success.  There is extensive documentation of people using JWS to connect to Salesforce, but so far I haven't found an example implementation where Token is generated in Salesforce without hitting third party endpoints.  UPDATE  The point is how can I generate a JWT token in apex using only the header, the payload and the key?  UPDATE 2  I finally made it!  String header = '{"alg":"HS256","typ":"JWT"}'; String payload = '{"resource":{"question":1209},"params":{},"exp":1571678680,"iat":1569518680}'; String key = '19bce9bf8c9dc1255480e3f631b3ff5a1dcfa9d2efdbfc94395e66ecdcc238f2';  String header64 = EncodingUtil.base64Encode(Blob.valueOf(header));  header64 = header64.replaceAll('=',''); header64 = header64.replaceAll('-',''); header64 = header64.replaceAll('/','');  String payload64 = EncodingUtil.base64Encode(Blob.valueOf(payload));  payload64 = payload64.replaceAll('=',''); payload64 = payload64.replaceAll('-',''); payload64 = payload64.replaceAll('/','');  Blob hmacData = Crypto.generateMac('hmacSHA256', Blob.valueOf(header64 + '.' + payload64), Blob.valueOf(key));  String signature = EncodingUtil.base64Encode(hmacData);  String token = header64 + '.' + payload64 + '.' + signature; token = token.replaceAll('=',''); token = token.replaceAll('-',''); token = token.replaceAll('/','');


"My brothers, my cousins, and I" "My brothers, my cousins and I" Which one is correct?


Can I use both GPU and CPU together when I render with Cycles to decrease render time?

Is it possible to use both GPU and CPU on a single render? I guess that the GPU and CPU should render the whole frame so it doesn't have different pieces rendered by CPU and a few other by GPU so the image looks weird because of the differences in the two render methods. I don't want to run two independent instances of blender that might crash the other with 100%lode problems, or just end a half hour before the other. The other is how do I make the GPU and CPU render the same style, I know i have seen very different result between CPU and CUDA render.  if you are working on a animation you shulde reed this also, the method disused ther is runing two independent rendering on the same time.


Very high speed counter (around 1.5 GHz to 2 GHz)

I am thinking of a device that can measure the distance of an object from a sensor using a radio transmitter and receiver pair.  I'm thinking of using a counter at the sensor side, with a fixed-frequency transmitter and receiver on the sensor.   There will also be a transmitter and receiver on the object whose distance with respect to the sensor I want to measure.   When the transmitter on the sensor transmits a pulse at the previously agreed radio frequency, the counter on the sensor will start counting.  When this pulse is detected by the receiver on the object, the transmitter on the object will transmit a pulse to be received by the receiver on the sensor at which moment the counter will stop and the distance will be measured according to the time lag.  The problem is that I can not find a counter and a clock source compatible with each other in the 1.5 GHz to 2 GHz range. Any suggestions as to what I can use?  The measurement error that is calculated is 33 cm/s at 1.4 GHz and 13 cm/s at 2.2 GHz. So basically, the faster the counter is, the less error.  Can anyone tell me what counter to use together with the clock source for the counter?  I looked at MC100EP016A counter IC but can not find a clock source for this IC.  I require a clock signal with the following characteristics:   Input high voltage = 2075 to 2420 mV Input low voltage = 1355 to 1675 mV


A duck is in the center of a square pond and cannot fly.  A fox is in the corner of the pond and cannot swim.  If the duck can swim with speed 1, and both play optimally, what is the minimal fox movement speed $v$ such that the fox can prevent the duck from escaping the pond?  I expect there is a closed form solution, and here is my thinking about how to solve it. The combined positions of the duck and the fox form a point in three dimensional space.  At the critical speed $v$, there should be a critical set of positions such that the duck can approach arbitrarily close to the set, but if the duck reaches just beyond it, the duck can escape.  Analysis of the puzzle, or perhaps numerical simulation of the perfect play, should reveal the geometry of this set, after which the problem may become straightforward.  For the circular pond (of radius $r$), the solution is well-known:  Near the critical speed, the duck stays opposite of the fox until the duck gets to distance $r/v$ from the center, and then the duck continues on the straight path (tangent to the radius $r/v$ circle) to the edge of the pond, just barely escaping at $v=4.603...$.  For the square pond problem, the lack of rotational symmetry makes the game state three-dimensional and thus harder.  Update:  See  for the generalization to a regular polygon and some good but (at least as of this writing) suboptimal strategies.  I am looking either for an exact solution, or an accurate numerical simulation of the perfect play, including a graph showing the perfect play at the critical speed (minus epsilon, thus allowing the duck to escape). Despite the simplicity of the problem, the continuous nature of the play makes efficient accurate simulation tricky.


What could cause a relay not to release immediately?

I have got a relay that doesn't release immediately after power is cut off. What could be the possible causes of this?


Why are principal components in PCA (eigenvectors of the covariance matrix) mutually orthogonal?

Why are principal components in PCA mutually orthogonal? I know that PCA can be calculated by eig(cov(X)), where X is centered. But I do not see why the eigenvectors should be orthogonal.


Which is the suitable Ram Card to add memory for my laptop?

I have a sony e series model sve1513acnb with 2 Gb ram & i3 Processor I want to add 2 Gb Ram Memory but I am confused. Which is the best Memory Card is suitable for my laptop?"


initialize a const array in a class initializer in C++

I have the following class in C++:  class a {     const int b[2];     // other stuff follows      // and here's the constructor     a(void); }   The question is, how do I initialize b in the initialization list, given that I can't initialize it inside the body of the function of the constructor, because b is const?  This doesn't work:  a::a(void) :      b([2,3]) {      // other initialization stuff }   Edit:  The case in point is when I can have different values for b for different instances, but the values are known to be constant for the lifetime of the instance.


Does TeXLive2013 need any special install instructions?

When I installed TeXLive2012 on Linux some time ago, I had to follow .  For the new release, as of yesterday, will I need to mimic the procedure from 2012 or can it be done in an easier fashion this time?  Or does it have to be installed in an entirely different way?  Edit 2:  After uninstalling:  Setting up tex-common (3.15) ... Directory /etc/texmf/ not writeable. Exiting. dpkg: error processing tex-common (--configure):  subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing:  tex-common E: Sub-process /usr/bin/dpkg returned an error code (1)   Edit 3:  Now, whenever I run commands in the terminal, I receive this:  Need to get 0 B of archives. After unpacking 0 B will be used. Setting up tex-common (3.15) ... Directory /etc/texmf/ not writeable. Exiting. dpkg: error processing tex-common (--configure):  subprocess installed post-installation script returned error exit status 1 No apport report written because MaxReports is reached already                                                               Errors were encountered while processing:  tex-common  E: Sub-process /usr/bin/dpkg returned an error code (1) A package failed to install.  Trying to recover: Setting up tex-common (3.15) ... Directory /etc/texmf/ not writeable. Exiting. dpkg: error processing tex-common (--configure):  subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing:  tex-common   This occurred when I ran sudo aptitude update and then running upgrade.  I followed everything from cmhughes link on removing TeXLive.


Comparing String elements in an ArrayList alphabetically

In this method I am comparing String elements alphabetically. In other words, if an element in a ArrayList is alphabetically bigger than the minimum String (parameter in the method) and is smaller than the maximum String (also parameter) then this String element should be removed from the ArrayList.   However, after running the method there are no Strings returned, not even those which should stay after the method call. In addition, when the IF condition is not satisfied, it printed out "Error" without returning the list.   import java.util.ArrayList;  public class Main {      public static ArrayList<String> removeInRange(ArrayList<String> list, String beginning, String ending)     {          for (int i = 0; i<list.size(); i++)         {             if (list.get(i).compareTo(beginning)> 0 && list.get(i).compareTo(ending)< 0)             {                 list.remove(list.get(i));             }              else {                  System.out.println("Error");             }         } return list;     }      public static void main(String[] args) {          ArrayList<String> list = new ArrayList<>();         list.add("h");         list.add("e");         list.add("x");          removeInRange(list, "a", "k");      } }


Constructing an example s.t. $\operatorname{Hom}_R(M,N)$ is not finitely generated

Let $R$ be a commutative ring and $M$ and $N$ be two finitely generated $R$-modules. I wanna construct an example s.t. $\operatorname{Hom}_R(M,N)$ is not finitely generated.   It's well-known that if $R$ be a Noetherian ring and $M$ and $N$ be two finitely generated $R$-modules then $\operatorname{Hom}_R(M,N)$ is finitely generated. So in this example $R$ must be a Non-Noetherian ring.


How to give different permissions to multiple groups of users?

I installed Ubuntu 12.04 server and want to give full folder access say example: "Folder01" to group "Group01' and Limit "Group02" for read access only. How I can do this.


Creation timestamp and last update timestamp with Hibernate and MySQL

For a certain Hibernate entity we have a requirement to store its creation time and the last time it was updated.  How would you design this?   What data types would you use in the database (assuming MySQL, possibly in a different timezone that the JVM)?  Will the data types be timezone-aware? What data types would you use in Java (Date, Calendar, long, ...)? Whom would you make responsible for setting the timestamps—the database, the ORM framework (Hibernate), or the application programmer? What annotations would you use for the mapping (e.g. @Temporal)?   I'm not only looking for a working solution, but for a safe and well-designed solution.


What does [Ctrl] + [Shift] + [e] do, while typing text?

I already knew that Ctrl+Shift+u would allow to type a character by giving its Unicode hexadecimal representation: an underlined u appears, you type the code and hit Enter.   For example, Ctrl+Shift+u; e; 9; Enter gives the character é.  Now I've just noticed that Ctrl+Shift+e lets an underline e appear, in a very similar manner, but I can't figure out what it does.  Does someone know? Thank you in advance.


Once in Israel, are tourists allowed to exit to the areas outside of the Israeli responsibility (Palestinian areas)?

My understanding is hazy, but I've been told that to get from certain parts to others, like Jerusalem to Bethlehem, you may need to cross non-Israeli-controlled areas.  Does this mean you'd need your passport and a different visa, or can you just cross through these zones if you're not from the area (ie just a random tourist from far away)?


Computing matrices of linear transformation under different basis

Came across a problem in my textbook and I am having trouble with it, the book provides an answer but no workings. Looking to get an explanation of what is going on  help I prepare for an exam. If we let $T : \mathbb R^2 \to \mathbb R^2$ be a linear transformation. Consdider two bases $V$ and $W$ of the vector space $\mathbb R^2$, where $V=\{v_1,v_2\}$ with $ v_1 =  \begin{bmatrix} -2 \\1   \end{bmatrix}$ and  $ v_2 =  \begin{bmatrix} 1 \\1   \end{bmatrix}$ and where $W = \{w_1,w_2\}$ with  $ w_1 =  \begin{bmatrix} -1 \\4   \end{bmatrix}$ and  $ w_2 =  \begin{bmatrix} 0 \\1   \end{bmatrix}$. Suppose that  $ A =  \begin{bmatrix} 1&2   \\-1 &4    \end{bmatrix}$ is the matrix of $T$ under basis $W$. I need to find the matrix $B$ the matrix of $T$ under basis $V$.  The solution is:   $ B = P^{-1}AP$ = $   \begin{bmatrix} -30&22   \\-48 & 35    \end{bmatrix} $  But I don't know why.


Some applications on Ubuntu 19.10 very slow to start

My relatively fresh Ubuntu 19.10 on a top notebook is running flawlessly, but some applications are really slow to start. For now it's keepassX, filezilla, deadbeef. Both takes about 30 seconds to show it's window, but after that both are blazing fast as others. May be someone can help me to find a solution?


What will happen if motor requirement due to more load is high(lets say 5A) and we limit current with current limiting circuit to lets say 2A. what will happen.. will it work without anything getting damaged?If not what should i do? Thanks..


Directory permissions vs file permssions

If I have two users called john and sally. Both are part of the users group. john creates a directory with permissions 775. sally then puts a file there with 644 permissions.  Even though the file obviously has no group write privileges. Can john then modify/delete that file in the directory he owns but the file he does not own?


Does blinking a Planeswalker restore its loyalty?

If I were to use a blink effect on a Planeswalker say after an ultimate (largest cost) Loyalty ability (and providing it still had Loyalty remaining), would its loyalty restore to the noted amount on the card?  From what I remember, if a card is exiled, unless stated otherwise, all counters are removed.  If this is so, when the planeswalker returns to the battlefield, would it then add the loyalty counters to match its noted amount back on the card?


Give an example of a ring in which an ideal of an ideal is not an ideal


Is there a bijective function $f: \mathbb{R}\to\mathbb{R}$ that is discontinuous?

Is there a bijective function that is discontinuous?


Find isomorphism between $F_2[x]/(x^3+x+1)$ and $F_2[x]/(x^3+x^2+1)$.    It is easy to construct an injection $f$ satisfying $f(a+b)=f(a)+f(b)$ and $f(ab)=f(a)f(b)$. However, I am stuck how to construct such a mapping that is bijective.  Thank you for help!


Ubuntu is 'Waiting up to 60 more seconds for network configuration...' on boot

On boot, after I enter my full disk encryption password, I see Ubuntu display the following message (I believe that's a package called Plymouth):     Waiting for network configuration...   then     Waiting up to 60 more seconds for network configuration...   then the boot proceeds as normal.  Indeed, this happens when the computer doesn't have network connectivity, but why would it need network before booting to desktop? I don't want my computer to send or receive any information yet.  I am roughly following the guide  for GNOME <3, but try to do it with a MATE desktop and Awesome.  I have installed Ubuntu 14.04 LTS from netinst mini.iso image, chose 'Install a command-line system' and proceeded installing with mostly default options, but chose encrypted LVM partitioning. Then I have installed MATE desktop environment with  sudo apt-get install software-properties-common # need them for 'apt-add-repository' sudo apt-add-repository ppa:ubuntu-mate-dev/ppa sudo apt-add-repository ppa:ubuntu-mate-dev/trusty-mate sudo apt-get update sudo apt-get install xorg mate-core   I am starting desktop environment manually, with startx command; the delay appears before that and before I get the chance to log in with my user account. I have a wired network which works, when the cable is connected; otherwise, this strange notification appears.


Story ID: Book where human discovers wolf-like aliens

I never read far into this book, but I remember the beginning being about an AI, and then a Human family crash-landing on a planet that had wolf-like aliens; these aliens had long necks and formed a consciousness by linking several seperate bodies together into a hive-mind-like pack, which could share and process information together and think as one.


How could Ernest Littlefield have reintegrated on Heliopolis?

We know that Stargates only reintegrate matter at the destination once the entire object has gone through the gate on the departing side.  This behavior is made explicit in the Atlantis episode 38 minutes (Season 1, Episode 4).  The episode makes clear that a whole person is not a discrete object to be reintegrated, but rather the entire system that person is a part of.  (In 38 minutes half of a puddle jumper enters the gate, but then gets stuck so two crew members and half the jumper have dematerialized, while the several other Atlantis members and the back half of the jumper remain outside the gate.  The crux of the episode is that if the back half of the jumper does not enter the gate, then the front half + 2 crew members will never rematerialize.)  However, this behavior does not seem to apply to gates in the Milky Way.  A few notable times this behavior did not apply and partial objects got rematerialized:   Ernest Little field in the episode Torment of Tantalus from Season 1.  We can clearly see in the archive footage that Ernest is attached to a breathing apparatus on the Earth side of the gate (as he is in some sort of diving suit) and that the breathing tube and apparatus remain on the earth side (there is close up footage of the severed breathing tubes in the archive Daniel is watching).  So, how could he have reintegrated at Heliopolis?  Should not the gate have been waiting for the rest of the breathing apparatus to come through? In episode two (“The Enemy Within”), when Kawalsky is taken over by a Goa'uld symbiote, O'Neill kills him holding his head half-way in the gate and calling for it to be closed, thus cutting off half of Kawalsky’s head. Teal'c, in his efforts to recover O'Neill from Edora in "A Hundred Days," shoots a projectile attached to a rope through the gate.  The gate on Edora is buried, and the projectile lodges itself in the rock on the other side, allowing Teal'c to climb up the rope on the Earth side, through the gate, and be suspended above the event horizon on the Edora side.  How can the projectile and rope rematerialize on the Edora side while some part of the rope is still on the Earth side (so that Teal'c may climb it)? In 200 the puppets manage to rematerialize without their puppet strings going through the gate!   Is this a difference in behavior between Milky Way gates and Pegasus gates or is something else going on here?  Does the gate technology make some sort of distinction between ropes and non-ropes?  (It is not between animate and inanimate objects as a partial puddle jumper is unable to rematerialize.)


How much money does Stack Exchange make?

I get  it makes money.  I'm curious about the financial data, how much profit, etc. it makes.  I've tried searching  to no avail.


Make Copy of Object Without Reference To Original

I have a function that takes an object from a list as a parameter. I create a new instance of this object and make it equal to the object passed into the function. I change some of the properties of the new object, but these changes also get applied to the original object in the list. Example:  public void myFunction(Object original) {     var copyOfObject = original;      copyOfObject.SomeProperty = 'a'; }   From reading, I guess I am creating a shallow copy of my original object, so when I update the properties on my new object this causes the properties on the original to change to? I've seen some examples of copying the entire list of objects to create a deep copy, but I only want to create a deep copy of this single object and not the entire list. Can I do this without having to do:    copyOfObject = new Object();   copyOfObject.someProperty = original.someProperty;   before making my changes?


Dedicated board | place for Microsoft exam discussion

I know that according to the NDA which you accept before taking the exam it is prohibited to discuss, reveal, share etc but the question is very hot - let's suppose I've faced a bunch of questions which are ...ambiguous or strange or do not have the correct answer IMO and I want to discuss it (in fact ask a question(s) and discuss possible answers using hivemind).     Posting each question as a separate thread on different board (e.g. SO\SU\ShP\DBA etc) is a bad idea (as for me) that's why this question has risen.    To not mess with the NDA and Microsoft rights, let's say I can "wrap an exam question in a "veiled form" of a SO-type question" for example.    Maybe the other (better?) way exists of course.    The main idea is that there is no "dedicated" site to discuss exam questions all around the Internet - and of course, I wouldn't say that dumps-selling sites are the perfect place to discuss the Q&A.    Anyway, I'll be very appreciated for pointing me in the right direction - I really hope that this idea has visited not only me and not only today:)    PS Do not offer the born-to-learn community, please.


How can you prove $\frac{n(n+1)(2n+1)}{6}+(n+1)^2= \frac{(n+1)(n+2)(2n+3)}{6}$ without much effort?

I will keep it short and take only an extract (most important part) of   the old task.      $$\frac{n(n+1)(2n+1)}{6}+(n+1)^2= \frac{(n+1)(n+2)(2n+3)}{6}$$   What I have done is a lot work and time consuming, I have "simply" solved it. But I think with a lot less work, there would be an easier and faster way. It's just I cannot see it : /  If anyone wants see, here is my long solution which I'm not happy with:  $$\frac{n(n+1)(2n+1)+6(n+1)^2}{6}=\frac{(n^2+2n+n+2)(2n+3)}{6} \Leftrightarrow$$  $$\Leftrightarrow \frac{(2n^3+n^2+2n^2+n)+6n^2+12n+6}{6} = \frac{(n^2+3n+2)(2n+3)}{6} \Leftrightarrow$$  $$\Leftrightarrow \frac{2n^3+3n^2+n+6n^2+12n+6}{6}=\frac{2n^3+3n^2+6n^2+9n+4n+6}{6} \Leftrightarrow$$  $$\Leftrightarrow \frac{2n^3+9n^2+13n+6}{6}=\frac{2n^3+9n^2+13n+6}{6}$$


On September 29th, I created the  tag for  Today, while checking the tag description, I saw that the  seems to be .  Why is that? Why has the Community user "stolen" the spot as author of the tag?


It seems that pst-optexp is not drawing the graphics associated with a drawing, only the text in it. Here is an example:  \documentclass{article} \usepackage{filecontents} \usepackage{pstricks} \usepackage{pst-optexp} \usepackage{physics} \usepackage{amssymb} \usepackage{bm} \usepackage{tikz}  \begin{document}  \begin{pspicture}(-0.3,0)(2,3.7) \psset{labeloffset=1, optboxwidth=1, arrowscale=1.5, arrowinset=0} \optbox[position=end, labelangle=90](1,1)(1,2){Box} \beamsplitter[labelangle=-90](1,2)(1,1)(2,1){BS} \drawbeam[arrows=->]{1}{2}(2,1) \end{pspicture}  \end{document}   And here is what is displayed:   I am using MikTex on Windows in TexWorks, and compiling with XeLatex+MakeIndex+BibText.


What is that component from the ADP5091 Schematic?

I am looking for an explanation what that component does inside of that circuit.  It can be found on page 3 of the Datasheet of ADP5091:   It would help me out a lot. Thank you in advance!


How do I delete folders from the Windows 7 DriverStore?

I am having a problem getting a specific device to work, and I am trying to start from square one by making sure there are absolutely no leftover files from driver installs on my system. Specifically I'm trying to get rid of the UC-Logic drivers for a Monoprice 10x6 tablet.   However, I have found copies of the driver files in the windows DriverStore\FileRepository. But windows will not let me delete any folders from that location.  The best info I have found so far is to use pnputil.exe, however, since the drivers are not currently installed, it is not listed as an inf file that I can remove.   I could, as a scorched earth policy, jump into OS X and just delete them from there, but I'm worried that this may cause me issues. I would much rather find the 'proper' way of doing it.


What I need  I need the boot image file for Windows so I can create my own Windows 10 custom ISO file and/or burn it to a DVD and make it bootable. For example, in WinISO there is a menu option called "Set Boot Image" where it expects a boot image file to be specified, with the file name extension bifx or bif, or img.  What I have tried   Downloading the boot image from the web  At first, I thought I could easily download one of the millions of boot images from the web. But after two hours of searching the web, I have not found anything I could use. Well, I found only one site that had it and my anti-virus program warned me not to go to that site. Why is the boot image so hard to find? Is it copyrighted material?  Extracting the boot image from an ISO file  I then tried to extract the boot image from an existing ISO file using WinISO. However, WinISO can only extract it from a physical CD/DVD. What I have here is the Windows 10 ISO file (64 bit, version 1909) which is more than 5 GB (5,294,394 Kb) and cannot fit on a single layer DVD-5 (4.7 GB). Therefore, I cannot burn the ISO file to a DVD in order for WinISO to extract the boot image (unless I have a double layer blank DVD-9 (8.5 GB) disc). I guess the programmers of WinISO didn't expect people to extract boot image from existing ISO files. Is there any place where I can download a boot image file (bifx, bif or img) or any way to extract the boot image from an existing ISO file? Clarification  I am looking for a boot image FOR Windows, not the bootable image OF Windows.


I have to plot a full-hd video (1920-1080) made with a nikon d750 with full frame sensor for a CG and live action compositing.  1 - how can i calculate the physical size of the sensor? 2 - Is there any math formula to solve this problem? 3 - If so, does the calculation also apply to rooms with smaller sensors - crop factor (APS-C - APS-H, etc.)  So is there a standard rule to do this calculation?  The three calculations below are standard only for RED EPIC, or can they be done for other camera as well?   In a RED EPIC, the pixel pitch is 5.4 µm (0.0054mm) At "4K 16: 9", the number of pixels that actively captures light is 4096 px for 2304 px (4096 pixels wide).   So: Pixel pitch * Horizontal pixel count = Camera sensor width 0.0054 (px / mm) * 4096 (px) = 22.12 (mm) 0.0054 (px / mm) * 2304 (px) = 12.45 (mm)   Sensor width = 2 * (FocalLength * TAN (0.5 * HorzFieldOfView) / 57,296)) sensor width = 2 * focal * tan(angle / 2)   How do you calculate the size? I'm really confused


I had my brownie batter in the pan to bake, put it in the oven for 5 minutes, then had to take it out due to an emergency. I left it out for about 2 hours before I got back. I then put it in the fridge for an hour or so before I baked it. Are they safe to eat?


How does $E(|X|)=\int_0^{\infty}P[|X|\ge x]dx$?

As the title states, how does $E(|X|)=\int_0^{\infty}P[|X|\ge x]dx$ ? The only assumption being that $E(|X|)\le \infty$  Mybe I can use the identity function in some way, since $E[1_{X\ge x}]=P[X\ge x]$?  Thanks in advance!


In what ways does matter behave like a wave?

thanks in advance for the help.  Mainly, what characteristic of matter is wavelike? Does is physically move up and down like a wave, does it phase in and out of existence with a wavelike gradient, or something else entirely?  Also, how does this relate to superposition and interference of waves in terms of matter?  Finally, how does this describe the atomic orbital? I understand that an orbital is a region with a high probability of electron location but I don't understand how this is a wave.  I have been scouring the internet for this. Very frustrating. In multiple disciplines they drill into your head:  "Matter demonstrates wavelike properties!" "Matter demonstrates wavelike properties!"  Yeah! Sweet! What a cool and important discovery! Explain it to me! ....nothing.


I just learning Parse but I have a problem. So I am trying to get information from AWS, the username and the score,unfortunatly I can't do it,the app crashes every time and return null. This is the username and their id's:  Crash errors(Errors lines marked in my code):  My code: package com.example.parseserverstarterproject;  import androidx.appcompat.app.AppCompatActivity;  import android.os.Bundle; import android.util.Log;  import com.parse.GetCallback; import com.parse.Parse; import com.parse.ParseAnalytics; import com.parse.ParseException; import com.parse.ParseObject; import com.parse.ParseQuery; import com.parse.SaveCallback;  public class MainActivity extends AppCompatActivity {       @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_main);          ParseQuery<ParseObject> parseQuery = ParseQuery.getQuery("Score");          parseQuery.getInBackground("AQ1BdZT7vV", new GetCallback<ParseObject>() { // LINE 47             @Override             public void done(ParseObject object, ParseException e) {                 if (e == null && object != null){                Log.e("username",object.getString("username")); //LINE 52                Log.e("score", String.valueOf(object.getInt("score")));              }             }         });          ParseAnalytics.trackAppOpenedInBackground(getIntent());      } }


Deleting Windows after Installing Ubuntu

I installed Ubuntu 12.04 on my laptop using the Windows Interface installer and it works just fine but now I want to get rid of Windows 7 permanently because it is simply a burden and uses up 50GB of disk space and is virtually usless to me now.  Since this type of installation uses Windows as the "host" OS  if there is any problem with windows in the future I'm afraid that may compromise the functioning of Ubuntu. Is it possible to do this while Ubuntu is still on my primary drive?  I have all my data backed up on Drive D:\ So can I format only that part of C:\ that has Windows on it leaving Ubuntu intact or do I have to format the entire C:\ drive?


How can I display my Android on my PC monitor?

I have scoured the Internet and come here as my last hope.  I currently have the Galaxy S4, M919v. I own two 24 inch Samsung monitors.  Is there any method for me to display my Android screen onto one of my monitors?  I want to basically play my Android games, using my Android phone, but have them displayed on my monitors. My 24 inch monitor has the same resolution as my phone, so I figure the graphics should be great.  I am trying to find a WIFI/micro-usb cable solution to this problem without buying any types of additional connectors.


What tools and how to approach Data Migration testing?

What free automation tools exist for Data Migrations between Old and New Systems?  What approaches should I use to ensure data was migrated correctly ?  I'm a beginner Tester in web applications, E-Learning System.


How to choose number of neurons and hidden layers?

I followed this guy's  on YouTube. Following is the code that was used for classifying 0 to 9 handwritten digits from MNIST dataset. The dataset contains 70,000 images of 28 x 28. Here, 60,000 are used for training and 10,000 are used for testing.  # Create the model. model = tf.keras.models.Sequential()  # Flatten layer i.e. instead of 28 x 28 to 784 pixels model.add(tf.keras.layers.Flatten())  # These are two hidden layers with '128' neurons each and 'ReLU' is the activation fuction choosen for them. model.add(tf.keras.layers.Dense(128, activation=tf.nn.relu)) model.add(tf.keras.layers.Dense(128, activation=tf.nn.relu))  # This one is output layer for 10 classifications model.add(tf.keras.layers.Dense(10, activation=tf.nn.softmax))  # optimizer and loss functions model.compile(optimizer='adam', loss='sparse_categorical_crossentropy',metrics=['accuracy'])  # Now, lets train the model. model.fit(x_train, y_train, epochs=3)   I don't understand a couple of things from this code:   Where is the input layer? How are '128' neurons are chosen? And why use two hidden layers?


When I compute the five-number summary on my sample, I obtain quantiles that differ from the quantiles I got from the empirical cdf, since they are not normally distributed data.  Can you help me in the interpretation of this difference?   For instance, with a randomly-generated Poisson dataset x  x=rpois(50, 2) summary(x) Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 0.00    1.00    1.50    1.82    2.75    6.00  y=ecdf(x) summary(y) Empirical CDF:    7 unique values with summary Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 0.0     1.5     3.0     3.0     4.5     6.0   What does it mean that the 3rd quantile of the sample is 2.75 while it is 4.5 for the ecdf?


Easy way to convert one row of data into multiple in Excel

I have a worksheet that looks like this:    Right now each Number contains a varying amount of Companies and Company Numbers.  I would like to set up the spreadsheet so each Company has their own row for each Number.  See below for visual representation.  I would like to convert the spreadsheet for each existing row like this:    So row 2 would be converted into row 2 and row 3 to look like this:    There are thousands of rows already so doing this manually would be quite the pain.  Is there a way to use Excel functionality to convert the spreadsheet to fit this?


So I accidently clicked on an Adzerk link on  to be redirected to careers.stackoverflow.com, which is a Stack Exchange site. I'm just wondering, are these Adzerk links on the site safe to click? They're not cheap malicious ads?


updating listbox from separate thread c#

So I am trying to update a listbox from some data I'm receiving over my local network.  I know there is something fundamental I'm missing. Could anyone explain what I might be doing wrong here? I realize that you cannot update UI from any thread other than the UI thread. I guess my issue is that I do not know how to specify that I want the UI thread to update the values.  You can see in the monitor thread what I am trying to accomplish.  namespace FrontEnd {     public partial class Form1 : Form     {         TcpClient clientSocket = new TcpClient();         //CommandQueue commandqueue;         private List<String> COMMANDS = new List<String>();         private object m_lock = new object();         delegate void AddListItemDelegate(string text);          public void enqueue(string command)         {             lock (m_lock)             {                 Debug.WriteLine("Enqueue");                 COMMANDS.Add(command);             }         }          public string dequeue()         {             lock (m_lock)             {                 string tmp = COMMANDS.First();                 COMMANDS.RemoveAt(0);                 return tmp;             }         }           public void monitor()         { // need a better mechanism              while (true)             { // bad algorithm                 lock (m_lock)                 {                     if (COMMANDS.ToArray().Length > 0)                     { // if queue is not empty                         do                         { // this is okay                             string dequeued = dequeue();                             string command = dequeued.Split(':')[0];                             string data = dequeued.Split(':')[1];                             if (command.Equals("add"))                             { // add student                                 Debug.WriteLine("adding item to listbox");                                  //lbStudents.Items.Add(data);                                 //lbStudents.Update();                             }                         } while (COMMANDS.ToArray().Length > 0);                     }                 }             }         }          public Form1()         {             InitializeComponent();         }         public void launchThread()         {              Form1 f1 = new Form1();                         Thread oThread = new Thread(monitor);             oThread.Start(f1);             while (!oThread.IsAlive) ;             Debug.WriteLine("THREAD LAUNCHED");         }          private void cleanResponse(string response)         {             string[] responses = response.Split(':');             string command = responses[0];             string[] data = responses.ToList().GetRange(1, responses.Length - 2).ToArray();             for (int i=0;i<data.Length;i++)             {                 Debug.WriteLine("thing in here debug");                 try                 {                     enqueue(command + ':' + data[i]);                 }                 catch (Exception e)                 {                     Debug.WriteLine("EXCEPTION: " + e);                 }             }         }          private void Form1_Load(object sender, EventArgs e)         {             launchThread();             lblStatus.Text = "Connecting...";             clientSocket.Connect("10.108.45.120", 9001);             Stream stm = clientSocket.GetStream();             byte[] ba = new ASCIIEncoding().GetBytes("start");             stm.Write(ba, 0, ba.Length);             byte[] bb = new byte[100];             lblStatus.Text = "Connected!";             stm.Read(bb, 0, bb.Length);             string response = System.Text.ASCIIEncoding.UTF8.GetString(bb);             cleanResponse(response);             clientSocket.Close();             grpbxSparseMatrix.ForeColor = Color.White;         }     } }


I am learning various control techniques for 3-Phase ACIMs. So far I have understood about the SPWM implementation.. in which we save Sin values in a LUT and then modulate the duty-cycle of PWM wave using scaled values from the Sin LUT.  But regarding the SVPWM so I could not understand what are its implementation steps? Does it also require a Sin LUT or not?  And if I am implementing a scalar V/F control loop for the 3-Phase ACIM then is it possible to use SVPWM technique to drive the motor?


Show that if $Y$ is compact, then the projection $\pi_{X} : X \times Y \rightarrow X$ is a closed function.   I can't to solve the question above. Indeed, I think that projection is a closed (and opened) function even without Y compact. I'm right?


Why one user with 200+ on questions has still low reputation?

I'm suprised that this guy, , who asked a question about HTML/CSS yesterday, get 152 +1 on his question and still have only 11 of reputation on StackOverflow:    According to , each vote up on a question rewards the author with 5 of reputation. Why does this user doesn't have at least 200 of reputation (with the fact that you can't gain more than 200 of rep per day)?    Did I missed something, a specificity that blocks the reward?   Thanks,


after updating this morning I ended up with the message on the screen that the osinstall.mpkg was missing, using Time Machine I managed to get everything back to normal without too much struggle, but what do I do now ? If I update is going to show the same mistake again ? How do I proceed ? Thanks


Select month, year and quantity and show months with zero entries

I have the following mysql query:  SELECT  LEFT(MONTHNAME(date), 3) AS month, YEAR(date) AS year, COUNT(id) AS quantity FROM budgets GROUP BY MONTH(date)   which returns me this:  |month|year|quantity| --------------------- |  Jan|2018|      10| |  Mar|2018|       2| |  May|2018|       5|   I need to show months even if COUNT(id) not exist like this:   |month|year|quantity| --------------------- |  Jan|2018|      10| |  Feb|2018|       0| |  Mar|2018|       2| |  Apr|2018|       0| |  May|2018|       5|   Anyone knows a way to do that?  UPDATE  According to D-Shih answer code, query returns this:  |month|year|quantity| --------------------- |  Jan|2018|      10| |  Feb|null|       0| |  Mar|2018|       2| |  Apr|null|       0| |  May|2018|       5|   And if I add a register with different year it will show only one row with name 2017 like:  |month|year|quantity| --------------------- |  Jan|2018|      10| |  Feb|null|       0| |  Mar|2018|       2| |  Apr|null|       0| |  May|2018|       5| |  May|2017|       2|   it must show   |month|year|quantity| --------------------- |  Jan|2018|      10| |  Feb|2018|       0| |  Mar|2018|       2| |  Apr|2018|       0| |  May|2018|       5| |  Jan|2017|       0| |  Feb|2017|       0| |  Mar|2017|       0| |  Apr|2017|       0| |  May|2017|       2|


The plane scene leading up to the inception of Fischer proceeds as follows:  Eames swipes Fischer's passport Cobb returns the passport to Fischer and chats him up about his father The flight attendant brings Cobb and Fischer drinks Cobb slips a sedative into Fischer's drink and hands it to him  It seems that they have taken a few unnecessary risks in pick-pocketing Fischer, and then spiking his drink where he could potentially see it. At face value, the passport is stolen to give Cobb an opportunity to drug Fischer. (In my mind, a stupid, risky mechanism). An alternate explanation is that returning the "dropped" passport builds trust between Fischer and Cobb, so that Fischer will go along with the Mr. Charles character in the dream. Plausible, and more importantly, necessary. However, the flight attendant is already working with them, and she could easily administer the sedative completely unnoticed. Plus, any conversation that happened, should it be necessary for the inception, could still occur without Cobb touching Fischer's drink. So why have Cobb do it? Is it simply that spiking the drink needs to be shown on screen, and it makes more sense to have use that time with a lead character rather than a minor one, or is there a more important, plot-based reason?


How to implementation hashcode method for my class with a string method

I have an abstract class and I wanted to force all the implementations of the class to implement there own equals and hashCode method. The class has just one method which returns a String.  The abstract class is defined like this  public abstract class Type {    public abstract String getType();    public abstract boolean equals(Object other);    public abstract int hashCode(); }   I have implemented the equals method. Now I am implementing the hashCode method for this class. I have a couple of questions:  1) Is this the right approach to override the == behavior in all implementations of the class.  2) What would be the best way to implement the hashCode method for this class which only has one function that returns a string?  Is this is a duplicate, please point me to the right answer.


PCA on train and test datasets: do I need to merge them?

I have train and test data set to work on. I would like to apply PCA to reduce dimension.   Do I need to merge train and test data sets together before applying PCA? Or I should apply PCA on train data set, select reduced dimension, and work on reduced data set for both train and test data set?


Avoid repeating [hbt] and \centering for every table

In a document I'm writing, I'm using the familiar  option for my floating tables, and I  them. I'd like to avoid repeating that every time I'm creating a table. I assume it's easy to add something in my preamble that makes sure that these two options are used every time I begin a new table environment?  \documentclass{article} \begin{document} \begin{table}[hbt] \centering \begin{tabular}{*3{l}} 1 & 2 & 3\\ a & b & c\\ \end{tabular} \end{table} \end{document}


How do I deactivate F1 and F10 keybindings in gnome-terminal?

How can I turn off the F1 (help) and F10 (notifications menu) key bindings?  First one I need for screen utility and second to exit mc in console.  There are no such key bindings in the Keyboard Shortcuts system settings.


What tier are the Pathfinder classes at 1-10 levels?

i seen a lot of tiers list that say 9th level spellcasters are absolutely best.. but most of the games PFS i seen are going at levels 1-10, so i think this theoretical tiers are just not working at this levels, but what classes would you say are strongest at 1-10 and why?


Install Windows 10 alongside Ubuntu 14.04

I'm having a lot of issues dual booting Windows 10 and Ubuntu 14.04. I'd like to not do anything too crazy if possible.  I need to install Windows 10, when I already have Ubuntu 14.04 installed. My Laptop is a Dell.  OK, here's what I need help with:   Downloading everything I need Making my live USB's Split partitions Installing Windows 10 Repairing Grub Fixing the UEFI to boot Grub


Absolutness, need for some clarifications and examples.

I have some trouble in understanding the definition of absoluteness.Let $M$ be a (transitive) model of $ZFC$. A formula $\phi(x)$ is said to be absolute if $\forall x \in M (\phi(x)^M\leftrightarrow \phi(x)^V)$, where $V$ is the Von Neumann universe. I know that it is in general possible to have $\phi(x)^M$ true but $\phi(x)^V$ false. For example $card(x)^M$ can be true (i.e. $x$ is a cardinal number inside the model $M$ but since when we are inside $V$ we add bijections because we are in a bigger class, so maybe x will be in bijection with something smaller than him so he will not be a cardinal number anymore. But is it possible that we have that $\phi(x)^V$ holds but $\phi(x)^M$ doesn't hold? Second, I was told that "being an uncountable ordinal" is not absolute. So what would be a model where that would be an example for this?


How to automatically import field value of polygon to point field based on spatial query?

I have two layers, points and polygons. Point layer is empty. When I add new point feature I want to update it's field by values of polygon field if new point is within polygon. I need solution in QGIS.  How can I do this?


I am writing my Ph.D. Thesis in US English and have two questions on hyphenating.  Would it be re-entry or reentry? Would it be (re)training or (re-)training? Or would it be retraining at all times? In my study, people might get retraining but not always. Therefore, I sometimes use parentheses.  Is there a general rule (in US English) for using these hyphenations? Thank you all in advance. Cheers, Roy


I have the .afm and .pfb files for the Garamond Light Condensed fonts, I follow the instructions available  for installation.  When I try to use them in my document they are not found by pdflatex; my log file contains  LaTeX Font Info:    Try loading font information for T1+pgm on input line 60. LaTeX Font Info:    No file T1pgm.fd. on input line 60.   and  LaTeX Font Warning: Font shape `T1/pgm/m/n' undefined   I am using TeX Live 2013 on Ubuntu, installed with TeX tools rather than apt-get.  This worked fine in TeX Live 2012. Why doesn't it work in TeX Live 2013?


Best way to store currency values in C++

I know that a float isn't appropriate to store currency values because of rounding errors. Is there a standard way to represent money in C++?   I've looked in the boost library and found nothing about it. In java, it seems that BigInteger is the way but I couldn't find an equivalent in C++. I could write my own money class, but prefer not to do so if there is something tested.


ImportError: No named '_tkinter', please install the python3-tk package

I am new to Ubuntu and Linux in general.  I created a dual boot OS on my laptop (Windows 10 and Ubuntu).    Typing: sudo apt-get install python3-tk (or even python-tk) didn't work. Trying to install the python3-dev or python-devel (no luck). Downloading Tcl and Tk to manually install.   In Windows 10 Bash Subsystem the Tk and Tcl are already included, so I thought Ubuntu already had it.  But, I want to use my Ubuntu desktop to develop Python GUI apps.   So, how can I install the Tcl/Tk to be use in Python 3.5 for GUI development?   I loaded Python 3.5.2 fine but need the GUI modules enabled.  The code to test that Tk is working is:      Type python3    Type:     import tkinter    tkinter._test()  Result: a GUI pop-up displaying This is a Tcl/Tk version..


How to typeset the house of an algebraic number?

I would like to reproduce the following text    but I couldn't find the house symbol neither through Detexify nor by looking through the . I also tried combining vertical bars and overline like  \left\lvert\overline{ \alpha }\rvert\right \overline{\left\lvert \alpha \rvert\right}   to less than desirable results.


Upgrading Ubuntu 14.04 to 16.04 is not working

This command sudo apt-get install update-manager-core is not working to upgrade Ubuntu 14.04 to 16.04.  I get this output:  Reading package lists... Done  Building dependency tree Reading state information... Done update-manager-core is already the newest version. The following packages were automatically installed and are no longer required:  apache2.2-bin gdebi-core packagekit-backend-aptcc packagekit-tools python3-packagekit zlib1g-dev Use 'apt-get autoremove' to remove them. 0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade. W: Duplicate sources.list entry http://ppa.launchpad.net/ondrej/php/ubuntu/trusty/main i386 Packages (/var/lib/apt/lists/ppa.launchpad.net_ondrej_php_ubuntu_dists_trusty_main_binary-i386_Packages) W: You may want to run apt-get update to correct these problems   The previous command was  sudo apt-get update && sudo apt-get dist-upgrade


What is the reason behind the direction of field lines of positive and negative charge

I had a doubt in my mind that why the direction of field lines of a positive charge is toward outwards and of a negative charge toward inward direction


How to connect Nokia Lumia 730 to Ubuntu 15.04?

My Nokia Lumia 730 (WP8.1) is not getting detected on Ubuntu 15.04.  Can anybody tell me how to fix this?


I need help to answer the folowing problem:  Let $F$ be a field, $n\ge 1$ and $G=F^n\bigoplus F^n\bigoplus Mat(n,F).$ That is an element of $G$ has the form $(v,w,X)$ where $v$ and $w$ are n-by-1 vectors and $X$ is $n$-by$-n$ matrix, all with entires in $F$. Define an operator on $G$ by: $$(v_1,w_1,X_1)(v_2,w_2,X_2)=(v_1+v_2,w_1+w_2,X_1+X_2+v_1w_2^t)$$ Show that $G'=\left\{(0,0,X), X\in Mat(n,F)\right\}$. Where $G'$ is the derived group of $G$ i.e $G′=\left\{[a,b],a,b∈G\right\}$


Problem with creating an ext3 partition on SD card

I'm trying to partition my SD card with a ~31gb FAT32 partition and a 1024mb ext3 partition for A2SD. I've tried making the partitions with CMW-Alpharev Recovery v2.5.1.8 and with gParted (on a bootable live USB stick) and neither works. Basically, whenever I try to create a second partition on the card, the second (or later) partition doesn't work anywhere. It's not recognized by my phone, Windows or gParted (even right after parttitioning). The first partition does work, though. So if the ext3 is first, the FAT32 doesn't work and vice versa.  I have no clue as to what could be causing this or how to fix it, any suggestions?


Why is the Earth's or other planets orbit elliptical instead of being circular such as of moon?

Since bodies like planets moving around sun perform uniform circular motion where gravitation provides the necessary centripetal force,  so the orbits should be circular   for the gravitational force to be central but as we know the paths are not perfectly circular but elliptical. Why this is so?


Why do Epson R360 and HP5020 USB printers randomly disconnect on various Ubuntu versions (currently 17.10)?

This has been a constant problem over several years that I just assumed was a sign of my ageing printer slowly giving up or possibly not getting on with linux.  When I try to print a document in a low resolution mode, ie plain paper, mixed text and graphics and standard quality I usually get a print, but not always. My success rate is less with a photo paper, photo, best quality print. The job will start spooling out to the printer then at a random point the printer will stop. The default printer behaviour is to retry the job, causing it to start again where the previous job finished as paper is already in the printer. If the printer behaviour is set to stop I have to switch the printer off in order to eject the sheet as it's cancel button does nothing and it has no other way of performing a form feed.  I generally don't have any system sounds on but the other day I had and noticed a regular alarm notifying me of a USB connect / disconnect. I checked the logs application with searching hardware for USB logs and noticed that the printer was randomly connecting and disconnecting. I swapped in an old HP printer that I sometimes use as a scanner and this showed the same behaviour.  This led me to some articles suggesting laptop power management programmes such as tlp can be a problem or at least a way of solving this as it can be down to autosuspend settings but I don't have it installed.


Prove or disprove: If $a_0, a_1,\ldots,a_n \in R$ satisfy $\frac{a_0}{1}+\frac{a_1}{2}+\cdots+\frac{a_n}{n+1}=0$, then exists $x\in(0,1)$ such that $a_0+a_1x+\cdots+a_nx^n=0$   Let's define f(x)= $a_0+a_1x+a_2x^2+\cdots+a_nx^n$  If I check the limit of f(x) as $x\rightarrow 0$ I get $a_0$.  The limit of f(x) as $x\rightarrow 1$ is $a_0+a_1+a_2+\cdots+a_n$  I'm not sure if I can use the IVT to claim there exists a solution since I'm not sure if $a_0\gt0$ or $a_0+a_1+a_2+\cdots+a_n \gt 0$  Assuming I do need to use the IVT, can I split it up into different cases? i.e. four cases, one when $a_0\gt0$ and $a_0+a_1+a_2+\cdots+a_n \gt 0$, one with $a_0\lt 0$ etc.  Is there another concrete way to prove this?


How to remove .jsp extension and replace with forward Slash in htaccess?

I want to remove the .jsp extension from my URL and replace it with a forward slash eg. example.com/xyz.jsp to example.com/xyz/ and example.com/xyz.jsp?ab=12 to example.com/xyz/?ab=12.  I used:  RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^/]+)/$ $1.php RewriteRule ^([^/]+)/([^/]+)/$ /$1/$2.php RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$ RewriteRule (.*)$ /$1/ [R=301,L]   And  RewriteEngine On RewriteBase /  # external redirect from /example.html to /example RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s/+([^.]+)\.html [NC] RewriteRule ^ /%1/ [R=301,L]  # internal forward from /example/ to //example.html RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-l RewriteCond %{DOCUMENT_ROOT}/$1.html -f RewriteRule ^(.+?)/?$ /$1.html [L]   In my .htaccess but neither are not working correctly.


How to allow remote connections to mysql from specific IPs only?

I have a fresh install of mysql server 5.2.6 on a 64 bit Ubuntu running on a remote server with static IP. Is there anyway to allow Mysql remote connections to be made from pre-approved IPs only?  I am looking for simple and elegant way to do this without doing too much OS related admin and just handle it with mysql.


How do I disable the window resizing when accidentally touching one of the screen edges in GNOME 3?

In Ubuntu 18.04, when moving the windows there is a resize effect that occurs when accidentally touching one of the screen edges.  This control was available in CCSM and Ubuntu Tweak in previous versions with Unity.  I'm not finding it in GNOME Tweaks.  I also searched the repository with:  apt search ubuntu.*tweak


Story ID, 30+ years old, (Cannibal?) aliens viewed through portal having a picnic

All I can remember is that there were some (human) scientists(?) who had a portal through which they could observe a family(?) who seemed to be on a pic-nic(?) Somehow, they realised the aliens (?) were cannibals - but only when the latter noticed them watching and rushed towards the portal!  I don't remember whether the aliens got out - or anything else much really - but I'd really love to find this story again in the hope that re-reading it would stop it haunting the edges of my imagination/memory!  Anyone ...?


How can I prevent McAfee Security Scan from being installed, bundled with other apps?

Much like  (and other applications), I've encountered several instances of applications bundling, and luring the user into installing, McAfee Security Scan. Adobe, I'm looking in your direction!  I'll try my best not to install McAfee Security Scan when prompted, or use  (which doesn't install bundled software) when installing applications, but when providing support for my family and friends, it's obvious they don't.  How can I prevent McAfee Security Scan from being installed, e.g. bundled with other applications, in the first place?


prove that $f(x,y)= \frac{x^3y}{x^4+y^2}$ for $(x,y) \neq (0,0)$ and $f(0,0) = 0$ is continous at $(0,0)$

How to prove that $f: \mathbb R^2 \to \mathbb R$ $f(x,y)= \frac{x^3y}{x^4+y^2}$ for $(x,y) \neq (0,0)$ and $f(0,0) = 0$ is continous at $(0,0)$?  By definition: Let $\epsilon>0$ I need to prove that $\exists \delta>0$ so that $\forall \vec x\in B_\delta(0,0)$ then $|f(x,y)-0|<\epsilon$  $|f(x,y)|=|{x^3y\over x^4+y^2}|$=${|x^3y|\over x^4+y^2}$ I know that $|x|,|y|\le ||\vec x||$ so $|x^3y|\le ||\vec x||^4$ then ${|x^3y|\over x^4+y^2}\le {||\vec x||^4\over x^4+y^2}$ but I don´t know how to proceed from here  Any ideas?


In Unity3D, how do I create an efficient scratch card effect?

I want to create a scratch-card-like effect in new Unity UI's new Image tag.  I know it's possible with setPixels, but that's prohibitively expensive on mobile devices.  Something like this:    I'd like the user to be able to drag on any part of the image to "scratch off" the top layer and reveal the content underneath it.  How can I do this?


Proof $\mathbb{Z}[i]/(2- i) \cong \mathbb{Z_5}$

My worked example sheet states     Prove $\mathbb{Z}[i]/(2- i) \cong \mathbb{Z_5}$ using the following steps:      Let $G = \mathbb{Z}[i]/(2- i)$         $G = \{ \bar{x} + \bar{y}\bar{i} \mid x,y \in \mathbb{Z} \}$   $G = \{ \bar{x} \mid x \in \mathbb{Z} \}$, because $\bar{2} = \bar{i}$   Show that $G = \{ \bar{0},\ldots,\bar{4}\}$   Finally, prove $G \cong \mathbb{Z_5}$      The proof is clear to me but I do not know how to rigorously show $G = \{ \bar{x} + \bar{y}\bar{i} \mid x,y \in \mathbb{Z} \}$ and $G = \{ \bar{0},\ldots,\bar{4}\}$.  For the first one, I think this is just the definition of a quotient ring but is that enough for rigour? While for the second one, we have the relation $\bar{5} = \bar{0}$ in $R$ but how can I show ( rather write ) $G$ has the mentioned elements.   I guess, I am asking for a formal way of writing this.   PS: The proof for similar problem is available on the forum, but my problem is how much detail is enough. ( For me the context is an examination. ) Pardon my elementary question.


What is the best way to unwrap a sphere?

After reading  It seems that there is no perfect solution for getting rid of the stretch at the poles of UV spheres.  According to , icospheres can be used for stretch-less UV mapping:     All faces have the same area, which may be useful for certain types of UV mapping containing non-organic textures. An example that comes to mind is an isocahedral die or billiard balls where stretch must be minimized near the point where the number is printed onto the ball.   Incidentally, a lowish-poly billiard ball is exactly what I'm attempting to create.  However, my attempts at neatly unwrapping an icosphere have mostly failed (smart UV unwrap works perfectly for using baked textures, however I was hoping for something more like the example in the 6th post of , with a nice clean rectangular map).  How can an icosphere (I assumed the term "geosphere" in the thread was referring to a (geodesic) sphere made of triangles, like an icosphere) be cleanly unwrapped? Or if it's not possible, is there another way to do this which I'm missing?    I'm planning on using the resulting sphere in the BGE.


I saw this on Dribbble and I thought I'd have a go at reproducing it -   But i'm struggling to do so. I've had a play around with shear and rotating but I can't seem to get it to look quite right.   Here's my attempt. I feel like I lose all the readability in the text. The angle matches the top of the paper, but the angle of the text doesn't match the sides. Is there a set way to get this angle/effect or is it just done by eye?


I want my text to appear right after the call to \subsection{Name} but  I can't find how to do it. I'm using the article class.  An example of command:  \subsection{a)} Blah blah bla...   produces:     a)      Blah blah bla...   instead of what I want:     a) Blah blah bla...   Anything I could do?


File recovery of windows after installing ubuntu

In one of my computers I  installed ubuntu 14.04. Actually , I tried to dual-boot in along with windows 7 and I tried to do the partition during the ubuntu installation procedure.   Now all of my 500 GB hard disk has been occupied by ubuntu and I cannot access windows. Since, I have all my documents in windows and I want to recover it. Will I be able to recovery my files of windows ? If yes, can you please help me with the solution ?


Creating graphical marker/point on Geotools map in Java?

I'm writing a program that tracks the International Space Station, and plots its current position on a geotools map.  I currently have a geotools map that pops up, and I have the current location of the ISS that updates every second in another class:  public void doIt() throws IOException, URISyntaxException {      URL url = this.getClass().getResource("/coastlines_z8.shp");     System.out.println(url);     File file;     file = new File(url.toURI());      FileDataStore store = FileDataStoreFinder.getDataStore(file);     SimpleFeatureSource featureSource = store.getFeatureSource();      MapContent map = new MapContent();     map.setTitle("map");      Style style = SLD.createSimpleStyle(featureSource.getSchema());     Layer layer = new FeatureLayer(featureSource, style);     map.addLayer(layer);      createPoint();     JMapFrame.showMap(map); }   This seems like it should be simple, but I've been scouring the internet for the past day and I can't find a definitive answer as to how to go about doing this. I've looked into SimpleFeatureTypeBuilder, but I'm unsure how to implement it.  Additionally, once I get the point drawn, how do I ensure that it is updated every second?


Finding all functions $ f : \mathbb N^*\to\mathbb N^*$ such that for every $ x , y \in \mathbb N ^ * $, $ f ( x ) + f ( y ) \mid x ^ n + y ^ n $

Let $\mathbb N^*$ be the set of positive integers and $n$ be a fixed positive integer. How many functions $ f : \mathbb N^*\to\mathbb N^*$ are there such that for all positive integers $x$ and $y$, $f(x) + f(y)$ divides $x^n + y^n$?


Show that $\int_0^a f(x)dx=\int_0^a f(a-x)dx$

I don't really know where to start with this one. Can you just ignore the $f(..)$ and deal exclusively with what's inside the brackets?


DisplayMemberBinding for list of objects in wpf

I'm have listView which show Name of book and first Author:  <ListView.View>         <GridView>             <GridViewColumn Header="Name" Width="Auto" DisplayMemberBinding="{Binding Name}" />             <GridViewColumn Header="Author" Width="Auto" DisplayMemberBinding="{Binding Authors[0].Name}" />         </GridView>     </ListView.View>   But i need to show not only name first author, but all author in collection separated by commas. This is my Model:  public class Book : IModel     {         public Book()         {             Authors = new List<Author>();             Tags = new List<string>();         }         public string Name { get; set; }         public List<Author> Authors { get; set; }         public string ISBN { get; set; }         public int Pages { get; set; }         public List<string> Tags { get; set; }         public int PublicationYear { get; set; }         public PublicationHouse PublicationHouse { get; set; }     }   And code behind XAML:  public partial class BooksView : ListView     {         public BooksView()         {             InitializeComponent();             ItemsSource = FilesManager.books.Values;         }     }


Is red-shift a violation of the conservation of energy?

Light loosing frequency equals to a loss of energy as far as I understood. So where does this energy go, given that the law of conservation of energy is correct?


Suppose a, b and n are positive integers. Prove that (a^n) | (b^n) if and only if a | b.

Suppose $a, b$ and $n$ are positive integers. Prove that $a^n\mid b^n$ if and only if $a \mid b$.  I have:  $$a^n\mid b^n$$  $$\implies b^n = a^n \cdot k$$  $$\implies \sqrt[n]{b^n}=\sqrt[n]{a^n}\cdot k$$  $$\implies a=b\cdot k$$  $$\implies a\mid b$$  Is it really this simple?


Travelling to Romania by train from Austria - COVID-19 quarantine risk at the border?

I will be traveling from Austria to Romania by train this weekend (exact date still to be confirmed).  Have there been any people that recently took the train and can tell me what happens at the Romanian border (Curtici), is there any risk of being put into quarantine or home isolation?  (General info: Romania keeps a list of red and yellow zones and all travelers from there are put either into quarantine or house isolation. Unfortunately, there is no general website that indicates which countries are classified as red/yellow/none, since there are only press releases, where this is mentioned. Since the coronavirus situation is changing rapidly, I'm not sure whether Austria is already in the yellow zone or not.)


Fermat primality test $\gcd$ condition and carmichael numbers

Consider the following  (I read similar thing in a couple of sources but this one illustrates the issue I'm having):     By Fermat's Theorem if $n$ is prime, then for any $a$ we have $a^{n-1} = 1 \pmod{n}$. This suggests the Fermat test for a prime: pick a random $a \in \{1,...,n-1\}$ and see if $a^{n-1} = 1 \pmod{n}$. If not, then $n$ must be composite.      However we may still get equality even when $n$ is not prime. For example, take $n = 561 = 3\times 11\times 17$. By the Chinese Remainder Theorem ... (Some explanation)      Thus no matter what $a$ we pick, $561$ always passes the Fermat test despite being composite so long as $a$ is coprime to $n$. Such numbers are called Carmichael numbers, and it turns out there are infinitely many of them.   So according to the author, no matter what $a \in \{1,...,n-1\}$ we choose, 561 will pass the test. But this is not true e.g:  $$ \begin{align} 3^{560} &\not\equiv 1 \pmod{561} \\ 6^{560} &\not\equiv 1 \pmod{561} \\ 9^{560} &\not\equiv 1 \pmod{561} \\ &... \end{align} $$  and there are many $a \in \{1,...,n-1\}$ such that $a^{560} \not\equiv 1 \pmod{561}$.  Why would we exclude $a$ such that $\gcd(a, n) = 1$ when the test works well without such condition? If we know that $\gcd(a, n) \not= 1$, we already know that $n$ is not prime, thus the test is pointless.  The best source I read so far, sadly forget it, states that if $n$ is composite, then 50% of $a \in \{1,...,n-1\}$ will not satisfy $a^{n-1} \equiv 1 \pmod{n}$. Unless it's Carmichael numbers, i.e. there are less than 50%. Which seams true in my experiences (and this is properly the reason why the probability of not being prime gets lower by $1/2$ on each iteration).


In inmargin innertheme, how to customize the block title width in the sidebar?

The space indicated by the rectangle below is empty and could be used for the text itself. I realize that I can reduce it by setting lesser sidebar width left, but I would like the titles of block to be long.    For this reason, I tried to create a custom box \blockbox that will be by default equal to the width of sidebar width left less 3mm. However, the output above shows that the box is indeed has nearly the same width of the but is misaligned. Thus, one possible solution is to simply shift this box in the environment definition, but I do not know how to do this.  A more optimal solution is to redefine the width available for block title which is approximately 3.5cm  \documentclass[aspectratio=169, xcolor={x11names}]{beamer}   \usecolortheme{crane}  \usefonttheme{structurebold}  \useinnertheme{inmargin}  \useoutertheme[]{split}      \setbeamersize{text margin left=2mm, text margin right=2mm}      \newlength{\sidebarWidth}     \setlength{\sidebarWidth}{5cm}       \setbeamersize{sidebar width left=\sidebarWidth, sidebar width right=0cm}      \newlength{\blockboxwidth}     \setlength{\blockboxwidth}{\sidebarWidth}     \addtolength{\blockboxwidth}{-3mm}     \newcommand{\blockbox}[2][\blockboxwidth]{         \frame{\parbox{#1}{\raggedleft #2}}                                              }  \begin{document}  \begin{frame}{Showing Contents Gradually}      \begin{block}{Why is induction motor very common}         Induction motors are very practical for the following reasons          \begin{description}[<+->]             \item[Rigid] Rigid             \item[Cheap] Cheap             \item[Low Maintenance] Low Maintenance             \item[Self-Starting] Self-starting             \item[No Excitation Needed] No Excitation Needed         \end{description}      \end{block}      \begin{block}{\blockbox{Why is induction motor very common} Why is induction motor very common}          Induction motors are very practical for the following reasons          \begin{description}[<+->]             \item[Rigid] Rigid             \item[Cheap] Cheap             \item[Low Maintenance] Low Maintenance             \item[Self-Starting] Self-starting             \item[No Excitation Needed] No Excitation Needed         \end{description}      \end{block}  \end{frame}  \end{document}


Mistakenly filed as Exempt from income tax witholdings for entire year 2019

I am a basic 30 year old filing Single, W2, healthy working individual. No dependents, no additional schedules, capital gains or losses other than Student Loan interest expense.   I started a new job in January 2019 and somehow during my new hire enrollment, "I or someone" marked in my file as Exempt... I am pretty familiar with filing my own 1040 (as its pretty basic)and I know for a fact that I would never for under any reason think that I am Exempt from absolutely anything tax related. Nobody in my new job's HR department reached out to confirm whether this Exemption was correct or not with me personally. My CPA said that anytime they receive an Exempt W-4 form, that they automatically return the form to the employer to confirm.   I unknowingly went 11 full months in 2019 without any taxes being withheld. Of course my paycheck was more than before, but I also got a better/higher salary job, so I never thought about the difference being from not paying taxes. And, no I do not print out my paystubs. It’s all through Paycom and it clearly shows you your gross pay & a "$XXX" amount in deductions/withholdings - kicker is, you have to click the drop down menu to actually see the entire breakdown. At which point, I never saw the big $0 in taxes being withheld... I know the taxes have to be paid one way or another, but I don't feel like I should be entirely responsible for a $5k-$6k tax liability for a HR clerical error. Even if I did actually input it incorrectly the first time.   Is there a way to check with the IRS to see if they indeed receive my file as Exempt and if they did actually return it to my Employer? I’m just wondering if either HR forgot to follow up with me or even IF the IRS does actually cull these exempt requests in the first place? I don't have the liquidity to simply pay the IRS all at once.   What would be my best option going forward?


1990's series - British children develop ESP, discover alien spaceship, refuse to use weapons, strong anti-violence message

I saw this TV series in English in the USA in the early 1990's, but many of the characters had British accents and I suspect the series was likely British in origin. I remember racing home as a child so I could see the next episode. The story starts with some tweens in the UK testing each other for ESP using a deck of playing cards. The boys would look at a card and dare another to guess which one it was. One of the boys, when giving the test to another, glances down at an auto racing magazine instead of concentrating on the card, and the other boy announces "Three...of car?...You're confusing me!" The first boy takes this as strong evidence that they have actually discovered ESP. The boys figure out (possibly through tabloid media, there was no Internet) that there are other children who may have the same powers living in the USA, so they make plans to travel there. It turns out that the boy with ESP doesn't have a passport, so he has to borrow the passport of the other boy's sister. There is a comedy scene in which the girl-passport carrying boy successfully makes it through US immigration in a dress and a Little House on the Prairie-style bonnet (to conceal his short hair). There is then an argument over which restroom the boy should use to switch back to his regular clothes. The two boys successfully meet up with at least one American tween with psychic powers, but the meeting is short-lived as it turns out that both US and British authorities have discovered their powers and want to take them back to a lab for experimentation. One of the children manages to disarm one of the agents but appears to go catatonic when he tries to point the gun at someone - apparently having psychic powers makes it difficult for you to harm another. The children escape from the government agents, growing in power, eventually discovering an ancient, crashed alien spaceship that seems to be calling out to them. They then form a pact to become a nonviolent team of enhanced humans for general peacekeeping and humanitarian purposes, using the crashed spaceship as their home base. In retrospect, the series had a lot of Stargate-esque tropes - ancient aliens, government conspiracies, etc., but this definitely was not Stargate.


What is the difference between data mining, statistics, machine learning and AI?  Would it be accurate to say that they are 4 fields attempting to solve very similar problems but with different approaches? What exactly do they have in common and where do they differ? If there is some kind of hierarchy between them, what would it be?  Similar questions have been asked previously but I still don't get it:


MongoDb $regex not matching special chars

I have email saved in the database like this: {     "_id" : 1,     "first_name" : "aman",     "last_name" : "kaur",     "company_name" : "",     "email_id" : "amaniron+1234@gmail.com", }   when I try to fetch it using following queries: db.getCollection('users').find({email_id: {$regex: "^amaniron+1234@gmail.com$"}}) db.getCollection('users').find({email_id: {$regex: "\^amaniron+1234@gmail.com$"}}) db.getCollection('users').find({email_id: {$regex: "\^amaniron+1234@gmail.com\$"}}) It gives me nothing. Please tell me what am I doing wrong here ?


Display Legends on esri map using javascript

I have different module like distance calculator,radius search and more. Each pages I need to show Legends div so that user can identify places by images on map(or identify the layers).


Interpreting coefficient in GLM with categorical explanatory variables

I'm performing a GLM, the response variable is number of individuals, and response variables are    habitat (4 levels) and  season (4 levels).    I need some help since I know the summary() shows p-values but not for the first (alphabetical) level of factor. I mean, I don't know how to interpret that the Intercept has a significant p-value. I can't reach a biological explanation for this model. Hope you can help me ...  Call: glm(formula = individuals ~ habitat + season, family = poisson(link = "log"),  data = data)  Deviance Residuals:   Min        1Q    Median        3Q       Max   -2.85859  -0.51541  -0.08508   0.36497   2.29058    Coefficients:                  Estimate Std. Error z value Pr(>|z|)     (Intercept)            1.6774     0.1624  10.331  < 2e-16 *** habitatDeciduous       0.1340     0.1696   0.790  0.42950     habitatSemiDeciduous   0.2102     0.1675   1.255  0.20933     habitatWetland        -0.1861     0.2039  -0.912  0.36151     seasondry2018         -0.1138     0.1510  -0.753  0.45123     seasonwet2016         -0.2699     0.1576  -1.713  0.08677 .   seasonwet2017         -0.4383     0.1656  -2.647  0.00813 **   Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1  (Dispersion parameter for poisson family taken to be 1)  Null deviance: 78.487  on 63  degrees of freedom Residual deviance: 64.556  on 57  degrees of freedom AIC: 287.77


I can't get roman page numbering to work for pages before main writing section (e.g. TOC,LOF, abstract etc..)

I would like to make all pages before my introduction (TOC,LOF,LOT,abstract), excluding first 3/4 pages (title page, blank page) to be roman numerals with the first page of my introduction =page 1. How can I do this?  I have tried methods posted on here but with no luck.  here is my code:     \documentclass[11pt]{report} \usepackage{graphicx} \usepackage{geometry} \usepackage{fixltx2e} \usepackage{grffile} \usepackage[font=small,labelfont=bf]{caption} %\usepackage{floatrow} \usepackage{amsmath} \usepackage{longtable} \usepackage[notlof,notlot]{tocbibind} \usepackage{fancyhdr} \usepackage{titlesec} \usepackage{epstopdf} \usepackage{booktabs} \usepackage{multirow} \usepackage{tabularx} \usepackage{tabu} \usepackage{ragged2e} %\usepackage[justification=centering]{caption} \usepackage[titles]{tocloft} \usepackage{rotating} \usepackage{adjustbox}    \newcolumntype{L}{>{\RaggedRight\arraybackslash}X}  \titleformat{\section}   {\normalfont\fontsize{14}{12}\bfseries}{\thesection}{1em}{} \makeatletter \renewcommand{\paragraph}{%   \@startsection{paragraph}{4}%   {\z@}{1.2ex \@plus 1ex \@minus .2ex}{-1em}%   {\normalfont\normalsize\bfseries}% } \renewcommand{\baselinestretch}{1.5} \makeatother \setcounter{secnumdepth}{3}   \begin{document} \sloppy \begin{titlepage} \begin{center}   \textsc{\Large title}\\[1.5cm]   \newpage\  \thispagestyle{empty}\textsc{\large text}\\[0.5cm]  \vspace{15cm}   \textsc{\large text}\\[0.5cm] \textsc{\large even more text}\\[0.5cm]  \end{center} \end{titlepage}   \newpage\null\thispagestyle{empty}\newpage \newpage\null\thispagestyle{empty}\newpage  \thispagestyle{empty}\abstract  \newpage\null\thispagestyle{empty}\newpage  {\newgeometry{left=0.98in,right=0.98in,top=0.98in,bottom=1.5in} %\addtocontents{toc}{~\hfill\textbf{Page}\par} \setcounter{tocdepth}{2} \tableofcontents\thispagestyle{empty}\setlength{\cftbeforechapskip}{2ex}\setlength{\cftbeforesecskip}{0.5ex}    \listoffigures\thispagestyle{empty}\setlength{\cftbeforechapskip}{2ex}\setlength{\cftbeforesecskip}{0.5ex}  \listoftables\thispagestyle{empty}\setlength{\cftbeforechapskip}{2ex}\setlength{\cftbeforesecskip}{0.5ex}  \setcounter{page}{1} %\renewcommand{\thesection}{\arabic{section}}  \renewcommand{\thesection}{\arabic{chapter}.\arabic{section}} \pagestyle{fancy}\fancyhead[R]{Introduction}\fancyhead[L]{Chapter 1}  \newpage\null\thispagestyle{empty}\newpage   \chapter{Introduction}   thanks, Michael


Best free advertising for Facebook strategy game

I have written a game for Facebook. I think the game is fun to play, although the graphic presentation is primitive since I am not a graphic artist/web designer  I am the only Facebook user playing the game at this time. It does not appear to appeal to FB's demographic audience who seem to prefer less complex and less challenging games. Does anyone have any ideas on how I could get the word out about my game to the proper audience while spending very little or no money?


Is it possible to use adjectives as adverbs?

I came across these two sentences:  He was standing there proud." "He is growing up rich."  I think I can understand what each sentence means, but grammatically they don't make sense to me. My understanding about adjectives are that they can only be before the noun or with "be".  I see these kinds of sentences sometimes and have always wondered why. My first question is that in the first sentence, if I say, "He was standing there, being proud." is the meaning the same?  And in the second one, can I say, "He is growing up to be rich."? My second question is whether these ways of using adjectives are common or not.


I am making a word list from all the words typed into a program that will be working with the text entered into it.  I want to use a stream editor like sed or awk to search the first word of every line in a document and return the line number when a pattern -stored in a variable- is found. I have this much working correctly so far:  awk $1 '{print $1 " " NR""}' dictionary.txt | awk '/^**myWord** /' | cut -d" " -f2   However, I cannot figure out how to use a variable in place of "myWord". For example, I get only errors when I use:  read=searchWord  awk $1 '{print $1 " " NR""}' words.txt | awk '/^**$searchWord** /' | cut -d" " -f2


Ubuntu 14.04 Unable to find expected entry 'main/binary-1386/Packages'

After searching and trying some of the solutions which are already there on Stack. I am still getting following errors after updating by command  sudo apt-get update  W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/trusty-security/InRelease  Unable to find expected entry 'main/binary-1386/Packages' in Release file (Wrong sources.list entry or malformed file)  W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/trusty-updates/InRelease  Unable to find expected entry 'main/binary-1386/Packages' in Release file (Wrong sources.list entry or malformed file)  W: Failed to fetch http://ppa.launchpad.net/webupd8team/y-ppa-manager/ubuntu/dists/trusty/InRelease  Unable to find expected entry 'main/binary-1386/Packages' in Release file (Wrong sources.list entry or malformed file)  W: Failed to fetch http://dl.google.com/linux/chrome/deb/dists/stable/Release  Unable to find expected entry 'main/binary-1386/Packages' in Release file (Wrong sources.list entry or malformed file)  W: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/trusty/Release  Unable to find expected entry 'main/binary-1386/Packages' in Release file (Wrong sources.list entry or malformed file)  E: Some index files failed to download. They have been ignored, or old ones used instead.   I have tried to change the source.list in /etc/apt/source.list to    using Ubuntu Sources List Generator in    This answer didnt solved my answer since its just for chrome  [duplicate] 1   I have been trying to understand where I am going wrong but still I couldn't make it out.  Thanks in advance.


Can removing predictors increase predictive power in large sample cases?

I am observing an increase in the predictive power of my logistic regression when I remove certain predictors. It might be a bug in my code, so I'm wondering: is this statistically possible? If so, what are the possible explanations?  Note: - there is strong multicollinearity in my predictors - I am not interested in interpreting my parameter values, I just want high predictive power - I have 15 regressors and a dataset size of 100k (10k for validation to avoid overfitting, 10k for testing) - I am using a multi-layer perceptron (neural network) - I measure predictive power by % of test cases correctly classified


Accessing Italian World War I records online?

Is there a way to access Italian war records pertaining to individual soldiers (I'm looking specifically for World War I) online?   For example, I know Australia does but my somewhat limited knowledge of Italian didn't get me far with my searches.


Getting always extra button on display .. 1 button dont have any ID

I am having problem while looping.  I am always getting an extra button. Please help.   {this.state.items.map(myitems1 => {     return (
            {myitems1.Item_x0020_Name}            <button onClick={e => this.dosometing(myitems1.Id)}>Offline</button>
     ); })}   I can see the collection has only three (3) values, But I am getting 4 buttons on screen.   Getting always extra


When I get an idea for something I'd like to make in Blender, I hit up Google for specifics, then blender SE when I get stuck.   I'm very overwhelmed by the immensity of Blender and I'm a little afraid that this self-directed approach is going to lead me to develop bad habits. Is there a "best practice" way of learning to use Blender?


I'm trying to generate a random number 0 - 59, and am not satisfied with the rand() function in C. Here is the code I'm playing around with:  #include <stdlib.h> #include <time.h>  main() {  int num; srand(time(NULL)); num = rand(); num = num % 59; printf("%d\n", num); }   I've repeated the run on this code and noticed that the random numbers being generated don't really seem that random. The generated numbers produced are definitely following a pattern, as each time I run the program the number gets progressively larger until it wraps back around to the beginning (i.e. 2, 17, 21, 29, 38, 47, 54, 59, 4, 11....etc).  Is there a way I can seed the function so that every time I re-run the function I get a true random number with a 1/60 chance of being generated? Or are there any alternative methods I can implement myself rather than using the rand() function in C?


When I write this to give permission to www directory:  zeb@zeb-Lenovo-B570:/var$ chmod 251 www/ zeb@zeb-Lenovo-B570:/var/www$ ls   Its gives error:  ls: cannot open directory .: Permission denied   I want to give permission to www folder so that I put my .php file here.  Help ?


Matrix determinant lemma with adjugate matrix

I would like a proof of the following result, given on .  For all square matrices $\mathbf{A}$ and column vectors $\mathbf{u}$ and $\mathbf{v}$ over some field $\mathbb{F}$, $$ \det(\mathbf{A}+\mathbf{uv}^\mathrm{T}) = \det(\mathbf{A}) + \mathbf{v}^\mathrm{T}\mathrm{adj}(\mathbf{A})\mathbf{u}, $$ where $\mathrm{adj}(\mathbf{A})$ is the adjugate matrix of $\mathbf{A}$.  Note that $\mathbf{A}$ may be singular. However, the proof given on wikipedia requires that $\mathbf{A}$ is nonsingular.


How to hide all desktop icons in 12.04 and later?

In 11.10 Using Configuration editor, one used to be able to edit a boolean parameter named : Desktop_Show  This allowed to hide/show all desktop icons. This latter was removed in 12.04.   Someone, knows how to hide desktop icons automatically?  Thanks


Can the 20.04 dock hide apps not on the current worksapce?

I have just done a clean install of 20.04. I make heavy use of workspaces, but the behavior of the dock in relation to workspaces has changed, and I'd like the old behavior back. How I'd like it to work: When on a workspace, the dock only shows app icons for apps with windows in that workspace. If I click on an app icon, it only offers me windows that are in that workspace. How it works now: The dock shows me all apps and all windows for that app. So if I have 2 Firefox windows in each of 4 workspaces (and I often have more), then when I click on Firefox I have to look through 8 windows to find the one I want, not just 2. How close can I get to my desired experience with 20.04?


How do I install a different Python version using apt-get?

How can I install a different version of Python using apt-get?  Obviously I realise I can install using the source tar ball, however I would prefer not to install from source and instead use the package manager, as that's what it's there for. Surely somewhere reputable builds .deb files for the latest Python releases (why python.org don't is beyond me) that I can reference.   What do I need to do to reference them and what issues might it create when upgrading to the next version?  If there is no way except for building from source, is there a (pseudo) package that I can can install that will provide all of the dependencies needed without having to find and install each individually? So that I don't get:  The necessary bits to build these optional modules were not found: _bz2                  _curses               _curses_panel       _dbm                  _gdbm                 _lzma               _sqlite3              _ssl                  _tkinter            readline              zlib


Academically dismissed from grad school but want to reapply

Back in the Fall of 2013, I attended a masters program straight out of college. Turned out to be extremely overwhelming relocating to NYC, living on my own and starting grad school. I knew I was in the right field but my anxiety got the best of me and I struggled speaking up in class which of course negatively impacted my grades. By the second semester I already knew I needed to leave and recuperate before I could return just to work on my anxiety problem. The problem was that it was too late for me to withdraw and I ended up trying my best to complete the semester even though a huge part of me did not want to be there anymore, especially since my teachers felt I was not ready for the program given my lack of contribution in the class discussions. By the end of the semester I decided that I did not want to return to the school (was not thrilled with the program there or the faculty) but later on found out I had been academically dismissed since my GPA fell below 3.0 to 2.96.  Since last Fall (2014), I have been just focusing on work and working on my anxiety with a therapist but have been thinking about applying to the same field (mental health counseling) at another school for the fall of 2016. Would I have a fair shot at being admitted into another school in the same field given that I was dismissed from my previous program? Just wondering if anyone else has been in a similar situation.  Thank you in advance for your feedback.


Expression is not evaluated in aura iteration block

<aura:iteration items="{!v.overDueTasks}" var="task">     <tr>         <td>             <ui:inputCheckbox aura:id="{!task.Id}" label=" " change="{!c.addTaskToList}"/>         </td>         <td>             <c:DFActivityCardCmp taskId="{!task.Id}" subject="{!task.Subject}" owner="{!task.Owner.Name}"/>         </td>     </tr> </aura:iteration>    Controller method  addTaskToList:function(component, event, helper) {       var sourceCheckbox = event.getSource();       console.log(sourceCheckbox.getLocalId()); }   sourceCheckbox.getLocalId() prints {!task.Id} in console. What is the problem with my code?


What are the good java Frameworks/Libraries for REST API Automation Testing?

My primary focus will be to make API Calls and to verify Status Code and Json response.If you know any library which makes this task easier please answer. As of now I am using    Postman-Newman Apache HTTPClient  Jackson & Gson Parser RestAssured


Why would my website language be incorrectly detected, and how do I set it to the right language?

When I visit my personal website on my phone (chrome app), the page language is detected as 'Portuguese' and asks me if I want to translate it. However the page is in English and I have set the language to English using the tag: <html lang="en">  Why is my page being registered as Portuguese and how can I prevent the translate button from triggering?


sci-fi book earlier than 1987 dealing with space flight and a short curved sword

Started reading this book on a military transport plane from Germany to Fort Hood, I got halfway through but left on plane while being rushed off. Has space travel but the main group of people use short curved swords which they are trained on from childhood.If I remember correctly the cover has a man dressed like the character on assassin's creed kneeling down on the edge of a cliff looking down on a barren world. Sorry I don'the have much more information.


Can one use Stouffer's method to integrate t-values?

I would like to integrate T-statistics values from multiple, independent tests.   How can this be done?   Since my degrees of freedom are many ($n>1000$) I was thinking to use the Stouffer's method, which is really for Z-statistics score. However, with a high $df$ value, the T distribution and the Gaussian distribution should be identical.  Can I use Stouffer's method to integrate T values at $df>1000$?


Why do we need multivariate regression (as opposed to a bunch of univariate regressions)?

I just browsed through this wonderful book: . The irony is, I am still not able to understand the motivation for using multivariate (regression) models instead of separate univariate (regression) models. I went through stats.statexchange posts  and  that explain (a) difference between multiple and multivariate regression and (b) interpretation of multivariate regression results, but I am not able to tweak out the use of multivariate statistical models from all the information I get online about them.   My questions are:   Why do we need multivariate regression? What is the advantage of considering outcomes simultaneously rather than individually, in order to draw inferences. When to use multivariate models and when to use multiple univariate models (for multiple outcomes).  Take an example given in the  with three outcomes: locus of control, self-concept, and motivation. With respect to 1. and 2., can we compare the analysis when we do three univariate multiple regression versus one multivariate multiple regression? How to justify one over another? I haven't come across many scholarly papers that utilize multivariate statistical models. Is this because of the multivariate normality assumption, the complexity of model fitting/interpretation or any other specific reason?


Hats are coming off from profile picture

I am seeing a post and someone suddenly edited it and his hat come off and after some time entire picture is gone.  Link to the question:


iOS iPhone/iPad Mail - rapid mass delete/delete all

How do you mass-delete emails in iOS Mail? I don't know if this is documented anywhere, but just to bring it to current attention…


Is it possible to add an item the Post Publish panel?

In the Admin area when you edit a post, I'd like to add a custom item to the Publish panel in the top right corner.  Is it possible to access this through the Wordpress API? If so, what functions do I need to look at? Any examples would be much appreciated.


I'm having a issue with apps turning up that use data in the background. I have no idea what the are or where they came from. I have factory reset my phone several times. The phone is a ZTE from straight talk. The link above shows what the apps look like only my numbers are 12437, 12984, 19154. Before I reset my phone there where a lot more of them. About 15. Is there anyway to get rid of them? Are they harmful to my phone? The phone is not rooted. And since the last reset u have uninstalled nothing. Can anyone help? Edit They also seem to be heating up and slowing down my phone due to the fact that so many are running in the back round  Edit the numbers continue to grow. Edit in now have about 15 is there anything I can do can anyone help or am I just screwed?


Prove that any finite simple group $G$ has an irreducible faithful representation over $\mathbb C.$   Since 1-dimensional representations don't cover non-abelian groups, I (want to) believe that 2 is the lowest working dimension.  So, let $\rho:G\to\operatorname{GL}_2(\mathbb C)$ be a nontrivial representation. Since $G$ is simple, $\ker\rho=\{1\}$ and thus faithful. But what about irreducibility?


when i open the pokemon go app for my ios 9.3 iphone, the app takes me to a page where it only gives me the option to SIGN UP with google and not SIGN IN to my already existing account, furthermore when i click sign up it wont load the next page for me, ive already tried re-downloading the app, hard restart of the phone and simply closing and re-opening the app. nothing has worked so far


I need to change the values of a tif file. Values less than 1.5 must be changed to zero. How can I do?


How do you activate an iPhone with broken home button iOS 10

My iPhone 5s had recently been cleaned of all files and data, including iCloud so I need to activate it. It prompts me to press the home button to activate but the home button on my iPhone doesn't work. Is there a way I can activate this phone without pressing the home button?


What is the effect of having a synchronized using a static variable?  public class Something {      public static final String LOCK = "lala";      public void doSomething(){         synchronized(LOCK){         ...         }     } }


How can I prove through mathematical induction that $(n!)^{(1/n)}\le(n+1)/2$?

$$(n!)^{(\frac1n)}\le\frac{(n+1)}2$$   I am unable to prove this proposition through mathematical induction. Can someone help me with it?


I am checking for string inside of a div element using jquery but it allways returns the if never the else even when the dom doesn't contain then $ what stupid mistake am i making?   $('.bw-switcher').on('click', function() {     $(this).toggleClass('toggledrate', 1000);     $('.toggledrate > .bwswitch-button:before').toggle('fast');     $('.toggle_rates').toggle('fast');     if ($(".deatils.dailyPrice:contains($)")) {         $('.deatils.dailyPrice').toggle('fast');         console.log('I am the if');     } else {         console.log('I am the else');         $('.deatils.dailyPrice').toggle('fast').prepend('$');     }     $('.toggledrate > .bwswitch-button:after').toggle('fast'); });


Good morning, please, has anyone used logins audit without using the Profile?  My client needs an audit that displays the logins that connected to the bank and after they disconnected.  In the case the profiler believe it is too heavy to keep active all the time collecting.  Do you have anything that might help us in this case?  thank you Carol Lavecchia


What are kernels in support vector machine?

What are kernels in support vector machines? I have tried many contents but i am not familiar with Lagrange and Laplace concept in mathematics. So anyone can please elaborate concepts of kernels in easy way?   Thanks in advance :)