The cutoff frequency is defined as the frequency where the amplitude of \$H(j\omega)\$ is \$\frac{1}{\sqrt{2}}\$ times the DC amplitude (approximately -3dB, half power point).  I wish to understand why it is \$\frac{1}{\sqrt{2}}\$, and not \$\frac{1}{\sqrt{3}}\$ or some other value. Can we derive the cutoff frequency in any other way?

Historically when speaking about lets say an analog low-pass filter, the cut-off frequency of that filter is defined as -3dB.   So this is the frequency where the output sinusoid signal's amplitude attenuates to 0.7 of the input(Voltage-ratio). When squared this ratio we obtain %50 which is the Power-ratio.  It is very obvious that once upon a time it was decided the cut off-frequency should be the frequency which causes a %50 power loss of a particular frequency sinusoidal signal input.  My question is: what could be practical reason defining it %50? Isn't %50 still big amount and how could it be associated with being filter. I could make sense if it were chosen %95 for example.


Prove $$\sum _{k=2}^{n} k(k-1) {n \choose k}=n(n-1)2^{n-2}$$  Proof by induction: true for $n=2$. Assume true for $n$ and see if $n+1$ is true.  $$\sum _{k=2}^{n} k(k-1) {n \choose k}=n(n-1)2^{n-2}$$  Then   $$\sum _{k=2}^{n+1} k(k-1) {n+1 \choose k}=\sum _{k=2}^{n+1} k(k-1) ({n \choose k-1}+{n\choose k})$$  From here I can separate the summ into 2:  $$\sum _{k=2}^{n+1} k(k-1) {n \choose k-1}+\sum _{k=2}^{n+1} k(k-1) {n \choose k}$$, where the latter is simply $n(n-1)2^{n-2}$ by the induction hypothesis. I assumed ${n\choose n+1}=0$.  However, I'm not sure what to do with $$\sum _{k=2}^{n+1} k(k-1){n \choose k-1}$$

Prove the identity:  $$n(n-1)2^{n-2}=\sum_{k=1}^n {k(k-1) {n \choose k}}$$  I tried using the binomial coefficients identity $2^n = \sum_{k=1}^n {n \choose k}$  but got stuck along the way.


I am trying to run a spline interpolation on some terrestrial LiDAR data, but it keeps failing (I'm getting error 010235 - returned error from spline process and error 010067 - error executing grid expression).  I think it's due to the fact that there may be coincident points (ie. points with the same xy but different z values).   Can anyone suggest a way to delete the duplicate points with z values greater than the minimum? I can't do it manually because I think there may be a lot of duplicates (I tried the collect events tool, and there were many coincident points).

I recently performed  on a merged point feature class in ArcGIS 10.1.  I specified "1 meter" XY tolerance for the Integrate command.  The resulting point feature appears to be what I want except points that were integrated are now stacked on top of each other, which will be problematic in future processing steps.  The attributes for my dataset consist of an OID, Shape, x, y, z.  Where x and y = UTM coordinates and z = buffer distance.  The command  does not appear to work for my dataset (i.e based on Fields: OID, Shape, x, y, z and XY tolerance = 1m) as the output still has stacked points.  I am also working with big data--the integrate output has 37 million points.    There is a related thread, titled , although I would like to open the question up to python solutions too.  What is the best way to find and delete (spatially) duplicate points?  Is there a better solution to integrating such that the output does not contain overlapping points?


We can show that $\operatorname{Aut}(\mathbb{Z}_{2}\times\mathbb{Z}_2)\cong\mathbb{S}_3$ in two ways:   (a). One way is to show that any automorphism is determined by an invertible 2-by-2 matrix with entries in $\mathbb{Z}_2$, that there are six such matrices, and that they form a group isomorphic to $S_3$.      I don't quite understand how to show that any automorphism is determined by such 2-by-2 matrix, e.g. what matrix are we looking for and how do they determine the automorphism. Can someone please enlighten me with, maybe, some concrete examples? Thanks!  Edit: This is not a duplicate as I'm not looking for a proof but rather seeking examples of this particular way of looking at the problem.

I know that $\mathrm{Aut}(\mathbb{Z}/2\mathbb{Z} \times \mathbb{Z}/2\mathbb{Z} ) \cong S_3$, where $S_3$ is the symmetric group. I do not know how to prove that they are isomorphic, however.  What I tried was finding a specific $\phi:\mathrm{Aut}(\mathbb{Z}/2\mathbb{Z} \times \mathbb{Z}/2\mathbb{Z})\rightarrow S_3$, but the part that confuses me is that the automorphism group is a group of isomorphisms itself, so I don't know how to send an isomorphism to $S_3$.


I'm writing a test class where i have to create a user first and after run test as that user. My code is:  @isTest static void test() {         //create a USer to run the test         Account a = new Account(Name='Test Account Name');         insert a;         Contact cont = new Contact(LastName = 'Contact Last Name', AccountId = a.id);         insert cont;         //UserRole ruolo=[select id from UserRole where Name='CEO'];         User user = new User();         user.ProfileID = [Select Id From Profile Where Name='System Administrator'].id;         user.UserRoleid=[select Id from UserRole where Name='CEO'].Id;         user.EmailEncodingKey = 'ISO-8859-1';         user.LanguageLocaleKey = 'en_US';         user.TimeZoneSidKey = 'America/New_York';         user.LocaleSidKey = 'en_US';         user.FirstName = 'username';         user.LastName = 'lastname';         user.Username = 'test@appirio.com';            user.CommunityNickname = 'testUser123';         user.Alias = 't1';         user.Email = 'no@email.com';         user.IsActive = true;         user.ContactId = cont.Id;         insert user;         System.RunAs(user) {                         Test.StartTest();             myfunction();             Test.StopTest();         }     }            @future         static void  myfunction(){                //ADDRESS             .......             }   but the System gives the error "Mixed DML Operation", i don't know how to handle it. Please help me

In my test class i have the creation of a dummy custom setting and a dummy lead:  Group g1 = new Group(Name='group name', type='Queue');              insert g1;             QueuesObject q1 = new QueueSObject(QueueID = g1.id, SobjectType = 'Lead');              insert q1;       SetOwner__c mycs = SetOwner__c.getValues('standardset');               if(mycs == null) {                               mycs = new SetOwner__c(Name= 'CustomValues');                  mycs.OwnerId__c ='00520000000z3PrAAI';                  mycs.RecordtypeID__c='012L00000004QsrIAE';                  insert mycs;      Lead lead = createNewLead(u2.id);                           insert lead;   ERROR:  MIXED_DML_OPERATION, DML operation on setup object is not permitted after you have updated a non-setup object (or vice versa): SetOwner__c, original object: QueueSobject: []   I get this error because i am trying to perform DML on setup and non-setup objects in the same transaction.  Any solution for this problem?


Example:    var hello = (function(text) {       return "hello " + text   }("world"))   And   var hello = (function(text) {      return "hello " + text })("world")   are they the same?

Possible Duplicate:          This is something I haven't quite figured out yet, but I have been using function(){}() just because my VIM syntax highlight screws up if I add the parenthesis, although I've seen (function(){})() around many times, maybe its an IE thing?  edit:  var singleton = function() {     // code }();  var singleton = (function() {     // code })();


$S^g$ is a closed surface with genus $g$, we know that the fundamental group $\pi_1(S^g)=\{a_1,a_2,\dots ,a_g,b_1,\dots,b_g|a_1b_1a_1^{-1}b_1^{-1}\dots a_gb_ga_g^{-1}b_g^{-1}=1\}$, how to calculate the center of $\pi_1(S^g)$? I think the center of $\pi_1(S^g)$ is trivial, if $g\ge 2$, but I cannot prove it.

I know that the fundamental group of the double torus is $\pi_1(M)=\langle a,b,c,d;a^{-1}b^{-1}abc^{-1}d^{-1}cd\rangle$.  How can I calculate its center subgroup $C$? Is $C$ trivial?  Let $p$ be the quotient map from $\pi_1(M)$ to $H_1(M)$, maybe it's easy to prove that $p(C)$ is $0$ in $H_1(M).$ That will also solve my problem.  Thanks, Yan


sudo apt install fg Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package fg

fg, bg and jobs are used for job management. And for some reason (maybe it's just me), I'm not able to find where their binaries are nor their manpages (whereis prints no information). which gives no output. The commands themselves work just fine, though.  I ran commands like find /bin bg, but with no hits. I also ran find / bg to cast a wide net.


I have several cameras, some retired and/or broken, some working, some not. Their pictures are scattered across several computers, possibly with duplicates, and the original SD cards. The naming format is not consistent, dates possibly broken, and maybe not all the pictures are on the computers.  So what I need is a tool/way to:   Collect images (can do manually) Deduplicate them based on image data or hash Store all of them in day-based or month-based folders so I can back them up on a external HDD   Note to duplication: The options in the dupe tag don't have any way of moving pictures based on date, preferably extracted from the EXIF data. And Picasa is more of a Google-syncer and centralized photo manager that operates on photos from many sources, and I couldn't find the option for actually reorganizing the photos on disk.

Over the years, I've accumulated a lot of pictures, across a bunch of different machines.  I think I've mostly kept them in a yyyy/mm/ directory structure, but especially with some of the older pictures, there seem to be a lot of duplicates.  What's the best way to identify the duplicates?  Are there good tools to do this, or am I going to have to write something on my own?


I've been playing , and have noticed that the game auto-saves. While this is great, it means I can't play my save on another device, presumably because it saves to my cookies or IP. I've gotten as far as The Dusty Path, but cannot seem to navigate it on my tablet. If I go to my laptop to continue, will my progress be lost? If so, is there any way to preserve it?

In  is it possible to start the game on one PC/browser and then continue it on another? Are there perhaps files I can copy from one machine to another to continue elsewhere?  Edit I'm using Firefox as my browser


My Lenovo y570 was victim to a virus while browsing without any antivirus software. After a few minutes i saw a blue screen, then when trying to boot i see:  no bootable device found -- insert boot disk and press any key   So i got a USB, installed an .iso with Unebootin, then put it into the lenovo. Unfortunately you need to go into BIOS to boot from the USB.   I for the life of me have no clue what the BIOS password is or how i can get around this. Any suggestions? I read something about jumpers somewhere, i don't mind opening the computer, but will i be able to bypass BIOS? i don't mind wiping the computer, its a brick at this point anyways.  Thanks.

I have a laptop but forgot the BIOS password. I cannot go beyond the BIOS password screen and need to continue.  Is there any way I can reset or even remove the BIOS password on my laptop?


First of all, I know it's a very bad idea to invent your own encryption algorithm. It's better to use existing known, trusted, extensively tested and studied algorithms with a proven track record. The idea below is purely theoretical, from a studying point of view. I thought of a rather simplistic encryption method, and wondering what you people think of how (in)secure this is, compared to AES.  I propose the following symmetric encryption method:  Given any input data, and a password (each of arbitrary length), we encrypt the data as follows:                   ____                 |    | Password - |+|--| H1 |----k---- Salt -------^   |____|         |     ___                                |    |   |                               (+)---| H |---- i------------------------------^    |___|    |                                               |  Data[i]-------------------------------------(+)-- Output_i   H1 and H are hashing functions (e.g. SHA256 or SHA3-512). H1 and H may be the same.  n1 and n are the number of bits of H1's and H's output (e.g. if H1=SHA3-512 then n1=512, and if H=SHA256 then n=256). Preferably n1≥n.  S = a randomly generated salt of 128 bits, which is written at the start of the output.  K = H1(S+password) where + means binary concatenation.  The data is processed in blocks of n bits (the last block may be smaller).  Block i is XOR'ed with B(i) = H(K XOR i) where i is the block index (starting at zero), represented as a simple binary integer, extended to n1 bits (to match K's size).  If the last block is m<n bits, only those m bits are procesed (the remaining n-m bits of the last B(i) are not used).  The decryption procedure is basically the same, except S is taken from the encrypted data instead of generated.  I would suggest H1 = scrypt, bcrypt, or PBKDF2 with moderate work parameters, and H = SHA256 or SHA3-256.  Properties/advantages:   It's a stream cipher. Every block of n bits can be encrypted and decrypted completely independent of other blocks. This makes the algorithm suitable for streaming, parallelization, and if part of the data is damaged or missing, the rest can still be decrypted (except if the salt at the beginning is corrupted). Additional data can be appended later, and parts of the existing data can be replaced in-place. Because of the random salt S, similar data encrypted with the same password will result in completely different outputs. Even if you happen to know part of the input data, nothing is revealed about the rest of the data or the password. It's fast, provided that H is fast. Encryption and decryption are the same (only difference is generating a random salt vs reading it). Other than the 128-bit salt, the encrypted data stays the same size (unlike certain other encryption algorithms, especially asymmetric). No padding involved that can be abused to tamper with the data or partial decrypting by trial and error (some other encryption schemes have padding vulnerabilities).

Generate a 256-bit random nonce. XOR it with a 256-bit reusable symmetric key. This is x.  We represent numbers in simple binary instead of a counting function. 0 in dec = [256 zeros] in binary, 1 = [255 zeros]1, 23092348 = [241 zeros]1011000000101110001111100, etc.  For each nth block needed for the length of the plaintext, XOR x with n and hash it with SHA-256 to form b[n].  Let p[n] be the nth 256-bit block in the plaintext and c[n] be the nth block in the ciphertext. Then c[n] := b[n] XOR p[n].  Send the unencrypted nonce along with the ciphertext.  To decrypt c[n], XOR it with b[n] to retrieve p[n].  Is this secure? If so, then why do we need AES-256?  If this is not secure, then is there any mode of operation for which SHA-256 is secure as a block cipher? Specifically, it would need to be used in cipher feedback, output feedback, or any other mode that only uses the cipher in the encryption direction.


So I am using Mac OS X 10.6.8, I'm trying to download VMWare Player, there was no OS X specific bundle, only linux. I tried to unbundle the 32 bit linux with:  jdd:VMWare Me$ git clone VMware-Player-6.0.1-1379776.i386.bundle -b master ./VMWare Cloning into ./VMWare... error: '/Users/Me/VMWare/VMware-Player-6.0.1-1379776.i386.bundle' does not look like a v2 bundle file fatal: Could not read bundle '/Users/Me/VMWare/VMware-Player-6.0.1-1379776.i386.bundle'. jdd:VMWare Me$    and git version:  jdd:VMWare Me$ git --version git version 1.7.5.4 jdd:VMWare Me$   I was trying to google, unsuccessfully, what a v2 bundle file is, what the expected type on OS X and linux are, to see the difference, and to see if there was a conversion tool. Any Ideas?

I went to their site, and downloaded a .bundle which automagically turned into a .txt file after downloading.   Long story short, I can't run the txt file because I guess Mountain Lion Mac os X isn't a strict Linux box and is missing some core components to do that type of installation.  Does anyone know how to install VMware?


What is the difference between :   double x = 10.3; int y; y = (int) x;    // c-like cast notation   And :  double x = 10.3; int y; y = reinterpret_cast<int>(x)

What are the proper uses of:   static_cast dynamic_cast const_cast reinterpret_cast C-style cast (type)value Function-style cast type(value)   How does one decide which to use in which specific cases?


Prove the following \begin{equation}\int_0^\infty\frac{\sin^2x}{x^2(1+x^2)}\,dx=\frac{\pi}{4}+\frac{\pi}{4e^2}\end{equation}  I would love to see how Mathematics SE users prove the integral preferably with the Feynman way (other methods are welcome). Thank you. (>‿◠)✌  Original question:  And of course, for the sadist with a background in differential equations, I invite you to try your luck with the last integral of the group. \begin{equation}\int_0^\infty\frac{\sin^2x}{x^2(1+x^2)}\,dx\end{equation}  Source:

Use differentiation with respect to parameter obtaining a differential equation to solve  $$ \int_0^\infty \frac{\sin^2(x)}{x^2(x^2+1)}dx $$ No complex variables, only this approach.  Interesting integral and it should have a nice ODE.  I have not found the right way yet.  we have singularities at $x=\pm i$.


I recently stumbled into a spoofed version of StackOverflow and reported it to Google, SO and posted this question on .  Almost two weeks later that offending site is still up and serving awful pop-up adds linked to page events.  For example if you scroll down the page a  casino is advertised.  You can read in SOmeta there is a phishing attack too, so be careful if you navigate there.  (It seems SO, in personal email to me, and SO users are content in classifying  with this as a copyright issue)  But if my commercial sites were spoofed especially to this detail, I would want them shut down immediately!  Particularly if malicious content is being served like those fake virus reports asking for personal contact ... these are blatent attempts in fraud on my users!  It's a really broad question, but as a Webmaster what can be done to shut down such sites?   Can the domain name register be involved or forced to pull the plug?  or their web server service if they have one or if they are serving from a physical server their internet service provider?  The question is similar to , but with criminal intent!  Does any Webmaster have experience with this, if this happens to me, what evidence has to be collected and who should I go to?  This question is similar to the question above, but not a duplicate.  I expect there should be additional actions to take to stop illegal phishing attempts (fraud) that the site is being used for.  Additionally the two answers are superficial and don't provide further information to answer my question of how to shut down illicit activity.

We have been working on a gaming website. Recently while making note of the major traffic sources, I noticed a website that I found to be a carbon-copy of our website. It uses our logo, and everything else the same as ours, but with a different domain name.   Their domain name is not however pointing to our site because at several places the links are like: carbonccopy-website/our-links. This website even has links to some images as: carbonccopy-website/our-images.   How could they have done that, and what can I do to stop it?


I'l try to make this short and sweet. New Dell XPS, did what I always do is re-partition for Ubuntu. It screws-up Win 10 so a re-install. Created two partitions for / and /home. 250Gb root and 20Gb /home.   I had a hell of a time getting this thing to boot. Initially it was Windows only and after the highly touted command prompt registry fix it worked but, no grub and no windows. I had a hell of time getting windows back but still cannot find a fix for grub. I think most all the issues are related to secure boot but, I can't put my finger on the issue. I have reinstalled both OS's more than I would like to admit.  Only two partitions for Ubuntu: / & /home. 16GB RAM so I thought there is little need for a swap drive. Both Ubuntu partitions are defined as logical.  Any help would be greatly appreciated. Keep in mind I know Linux and can navigate and install but, not an expert by any stretch.

How to install Ubuntu 18.04 alongside Windows 10?  I have tried different process to install Ubuntu 18.04 in my PC in dual boot mode alongside Windows 10. But it turned out that most of the process didn't worked for my PC. My PC's configuration is 500 HDD, 3.5GHz Intel processor, 4GB RAM, 1GB Intel graphics & supports both BIOS & UEFI.


I have on website on wordpress and a external web app. I try to make an AJAX call from this external web app to get some info from my wordpress site/ database but i got an error message 400.  Here is my ajax call code :            jQuery.ajax({          type:"POST",         url: "https://www.groupio.fr/wp-admin/admin-ajax.php",         contentType: 'json',         dataType: "JSON",         responseType:'json',          data: {             action : "itempricingfunction",             ean : "EANTEST0101010"         },          success:function(data){              alert(data);          },          error: function(errorThrown){             console.log(errorThrown);         }         });    and here is my functions.php file inside my wordpress website :  function itempricingfunction(){   $product_ean = (isset($_POST['ean'])) ? htmlentities($_POST['ean']) : NULL; echo json_encode(array('product_ean' =>$product_ean));       exit; }  add_action("wp_ajax_nopriv_itempricingfunction", "itempricingfunction"); add_action("wp_ajax_itempricingfunction", "itempricingfunction");   The response from wordpress is error 404.   Can you help me to communicate and set/get some data from my worpdress website please ?  Thank you in advance.

I developed a chrome extension which extract some data from the user visiting page and I want to transmit them to my database by an AJAX call (my website is a basic wordpress website).  The point is that the ajax response is error 400 and I do not understand where is the problem as I tried to modify my ajax request the best I could.  Here is my AJAX request from content.js  /* Popup clicked */  $('#myOwnCustomToolBar_TT91 #message_to_click form.groupio_form #subscribe').on('click', function(){      chrome.runtime.sendMessage(product_infos);   });    Here is the new background.js file :    chrome.runtime.onMessage.addListener(function(response, sender, sendResponse){          jQuery.ajax({          type:"POST",         url: "https://www.groupio.fr/wp-admin/admin-ajax.php",         contentType: 'json',         dataType: "JSON",         responseType:'json',          data: {             action : "itempricingfunction",             ean : "EANTEST0101010"         },          success:function(data){              alert(data);          },          error: function(errorThrown){             console.log(errorThrown);         }         });  });    Here is my function called itempricingfunction inside the functions.php file of my wordpress theme file  function itempricingfunction(){   $product_ean = (isset($_POST['ean'])) ? htmlentities($_POST['ean']) : NULL; echo json_encode(array('product_ean' =>$product_ean));       exit; }  add_action("wp_ajax_nopriv_itempricingfunction", "itempricingfunction"); add_action("wp_ajax_itempricingfunction", "itempricingfunction");    And finally, when I go to the product page and click on the chrome extension, the response of the ajax call is Error 400.  Thank you very much for your help !


when I create List - program executed for 2.5 ms, if I changed List to ArrayList - program executed for 1.1ms.... who knows why?  class StockSpanner {      ArrayList<Integer> list; //1.1 ms     //List<Integer> list; 2.5 ms      public StockSpanner(){        list = new ArrayList<>();     }      public int next(int price) {         int less = 0;         int counter = 0;                  list.add(price);         counter = list.size() - 1;          while(counter >= 0){             if(list.get(counter) <= price) {                 less++;                 counter--;             } else {break;}         }         return less;     } }

How do you write (and run) a correct micro-benchmark in Java?  I'm looking for some code samples and comments illustrating various things to think about.  Example: Should the benchmark measure time/iteration or iterations/time, and why?  Related:


public class Main {  public static void main(String[] args) {     System.out.println(endOther("Hiabc","abc"));  }  public static boolean endOther(String a , String b) {      System.out.println(a.substring(a.length() - b.length()));     return a.substring(a.length() - b.length()) == b; } }   basically it prints "abc" but then returns false and I don't know why

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


I have a simple validation date which doesn't seem to work. I wanted to ensure that the start date is not greater than the end date.     function validateDate() {   var d1 = new Date.parse(document.getElementsByName("dt1").value);   var d2 = new Date.parse(document.getElementsByName("dt2").value);    if (d1.getTime() > d2.getTime())     alert("Start date cannot be greater than End date");  } <label for="dt1">Start Date : </label><input type="date" id="dt1"> <label for="dt2">End Date : </label><input type="date" id="dt2" onfocusout="validateDate()">     I attached a fiddle to demostrate this better :    I am a complete novice in doing javascript and would appreciate any advice and comments.

When using Google Chrome, I want to debug some JavaScript code. How can I do that?


I have a dynamic page in php.I want to extract all the string follwed by # in the URL.The page is a bit like ajax and it doent loads fully just the URL changes.So i need a mechanism as and when the url changes I can capture the string followed by # and do appropriate actions.  eg:  index.php#FJDrfjg67  I need   FJDrfjg67   Please Help

I have some jQuery/JavaScript code that I want to run only when there is a hash (#) anchor link in a URL. How can you check for this character using JavaScript? I need a simple catch-all test that would detect URLs like these:   example.com/page.html#anchor example.com/page.html#anotheranchor   Basically something along the lines of:  if (thereIsAHashInTheUrl) {             do this; } else {     do this; }   If anyone could point me in the right direction, that would be much appreciated.


Prove there is no homomorphism from $Z_{16} \oplus Z_2 $ onto $Z_4 \oplus Z_4$   I have no idea at all how to attempt such question. I have read some solutions in which we find the cardinality of $kerm\phi$ for some $\phi mapping $ that is onto using the first theorem of homomorphism.  After that I don't understand anything  Is there a general approach to these questions ?

For some reasons, homomorphism is a very hard area for me to make improvements. I've been hitting the brick wall for almost 2 hours.   Prove that no homomorphism exists from $Z_{16}\oplus Z_2$ onto $Z_4\oplus Z_4$.  Assume a homomorphism $\phi$ exists from $Z_{16}\oplus Z_2$ onto $Z_4\oplus Z_4$. Then $\phi$ is an isomorphism.  Note that the $\left | \ker \phi \right |=2$ The $\ker \phi$ is also a normal subgroup for $Z_{16}\oplus Z_{2}$. We want possible normal subgroup of order 2. I.e., 2 elements in each normal subgroups.  By Lagrange's theorem, the order of each element in a group divides the order of a group so the possible order of the elements are 1 or 2. If the elements has order 1, then the Ker \phi cannot have 2 elements.  Hence, $\ker\phi$ = $\left \{ (0,0),(8,0) \right \}$ ,$\left \{ (0,0),(0,8) \right \}$,$\left \{ (0,0),(8,1) \right \}$, possibly.  By the First isomorphism theorem:  $\phi: Z_{16}\oplus Z_2 \rightarrow Z_2\oplus Z_2$  $\Psi: G/\ker \phi \rightarrow \phi\left ( Z_16\oplus Z_2 \right )=Z_2\oplus Z_2$  $g\ker \phi  \mapsto \phi(g)=\Psi(g\ker \phi)$  Any help is appreciated.  Edit: I know that $(2,0)$ has order $8$ in $Z_{16}\oplus Z_{2}$ but any elements in $Z_{4}\oplus Z_{4}$ does not have order $8$ which would have solved the question at the outset. But I would like a different route.


I am asked to do a program in which I have check if the names entered by the user is in the file I have created on my computer. I wrote the code and it does not show any compilation error but when it runs the boolean expression is always false. Please do help me out with this. The sample names on the boy names file is Martin and on the girl names is Emily.   import java.util.*; import java.io.*; public class nameSearch1 {     public boolean readingGirlNames () throws IOException     {         String[] girlNames = new String [200];         int i = 0;         File file = new File ("GirlNames.txt");         Scanner inputFile = new Scanner(file);          while(inputFile.hasNext() && i < girlNames.length )         {             girlNames [i] = inputFile.nextLine();             i++;         }         inputFile.close();          Scanner keyboard=new Scanner(System.in);         boolean girlName = false ;         nameSearch object4 = new nameSearch();         System.out.println(" Enter the Girl Name you wish to see : ");          String nameCheckGirl = keyboard.nextLine();          for ( int index = 0 ; index < 200 ; index ++ )         {             if( nameCheckGirl == girlNames[index])             {                  girlName = true;             }          }         return girlName;     }      public boolean readingBoyNames () throws IOException     {         String[] boyNames = new String [200];         int i = 0;         File file = new File ("BoyNames.txt");         Scanner inputFile = new Scanner(file);          while(inputFile.hasNext() && i < boyNames.length )         {             boyNames [i] = inputFile.nextLine();             i++;          }         inputFile.close();             nameSearch object2 = new nameSearch ();         Scanner keyboard=new Scanner(System.in);         boolean boyName = false ;          System.out.println(" Enter the Boy Name you wish to see : ");          String nameCheckBoy = keyboard.nextLine();          for ( int index = 0 ; index < 200 ; index ++ )         {             if( nameCheckBoy == boyNames[index])             {                  boyName = true;             }          }         return boyName;     }      public static void main(String[]Args)     {         Scanner keyboard = new Scanner(System.in);          nameSearch1 object1 = new nameSearch1 ();          try         {             System.out.println(" The search result for the Girl's name is : " + object1.readingGirlNames ());         }         catch (IOException ioe)         {             System.out.println(" Exception!!! ");              ioe.printStackTrace();         }          try         {             System.out.println(" The search result for the Boy's name is : " + object1.readingBoyNames ());         }         catch (IOException ioe)         {             System.out.println(" Exception!!! ");              ioe.printStackTrace();         }      } }


The title says it. I want to find an element $\alpha$ such that  $\mathbb Q(\alpha)=\mathbb Q(\sqrt{2},\sqrt{3})$.  I tried something like $\sqrt{2}+\sqrt{3}$ but that didn't help...

Is $\mathbf{Q}(\sqrt{2}, \sqrt{3}) = \mathbf{Q}(\sqrt{2}+\sqrt{3})$ ?    $$\mathbf{Q}(\sqrt{2},\sqrt{3})=\{a+b\sqrt{2}+c\sqrt{3}+d\sqrt{6} \mid a,b,c,d\in\mathbf{Q}\}$$   $$\mathbf{Q}(\sqrt{2}+\sqrt{3}) = \lbrace a+b(\sqrt{2}+\sqrt{3}) \mid a,b \in \mathbf{Q} \rbrace  $$  So if an element is in $\mathbf Q(\sqrt{2},\sqrt{3})$, then it is in $\mathbf{Q}(\sqrt{2}+\sqrt{3})$, because $\sqrt{6} = \sqrt{2}\sqrt{3}$.  How to conclude from there?


I've been having some troubles interpreting my residual plot to check the assumptions for multiple linear regression. I've checked for independence by calculating Durbin Watson and I've checked for collinearity, both okay. However, my residual plot looks very strange to me, and I think it's because my dependent variable (and independent variables as well) is job satisfaction, measured with only 1 question where the respondents had to indicate their satisfaction with 1, 2, 3, 4 or 5, ranging from very satisfied to not satisfied. So there are only 5 different values for my dependent variable. I think that is why my residual plot has these strange parallel lines.   However, I have no idea how to check for a linear curve and normal distribution. I think homoscedasticity is okay, right? But I think it's not a good sign that the parallel lines aren't all distributed around zero.   Can anyone help?

I am fitting a linear model to a problem, and a little confused by what is going on. Without the details here are the two plots confusing me:  Residuals vs Fitted    Residuals vs Y    Now the residuals vs fitted looks good to me. Fairly evenly dispersed, no clear pattern. However, the $y$ vs fitted do not look good. I would have expected there to also not be a clear trend in this relationship.   This seems basic, but I'm rather lost. I don't want to fit a model that allows large positive errors at high values of $Y$ to make up for large negative errors at low values of $Y$.  Is this just an indication of a poorly fitting model? Or is something else going on here?  EDIT: Asked for fitted vs y (changed to have labels)    EDIT2: Just want to point out that this question has already been asked and answered (albeit in a more abstract sense)  .


Let {G,∗} be a group with identity e and let a∈G be a fixed element in G with a≠e.  Define H={x|x∈G and x∗a=a∗x}  (1)prove that the order of H is greater than 1 (it implies that H≠{e})

We have a group $G$ where $a$ is an element of $G$. Then we have a set $Z(a) = \{g\in G : ga = ag\}$ called the centralizer of $a$. If I have an $x\in Z(a)$, how do I go about proving that the inverse of $x$, $x^{-1}$, is also an element of $Z(a)$? I have already proved step 1, the subgroup test: I just need step 2, described above, and I have no idea how to start.


In Harry Potter and the Prisoner of Azkaban, Hermione mentions:     Awful things happen to wizards who meddle with time.   Now, I can imagine what could go wrong logically, for example, their past self could harm their future self perceiving some danger owing to the confusion and chaos, et cetera, et cetera.  But what I was wondering is, if there is a mention, in the book, of any such incidents that might have happened actually in the past to some other wizards?

I'm not sure how much documentation there is on time in the HP universe, but time would obviously be an incredibly strong weapon to Voldemort, so I'm wondering why he didn't just rewind time and fix any errors he made in order to conquer the world. Harry and friends used it responsibly, I thought because there would be some punishment from the Ministry of Magic if they messed up time too badly (so Harry didn't go after Pettigrew when they went back in time).


Some of my folders are highlighted in green   What does the green highlighting means? How can I remove the highlight and make them look similar to others?  terminal : gnome-terminal.  system : Ubuntu 16.04

On my console the color for directories is such a blue, that it is hard to read on a dark background.  How can I change the color definitions for ls?


To switch between users sometimes  sudo su newuser is used.  What is meaning of sudo su together?  Can anyone tell exactly how they both command together work?

I already read it from manual but I can't see difference..  su - change user ID or become superuser  sudo -s [command]   The -s (shell) option runs the shell specified by the SHELL environment variable if it is set or the shell as specified in passwd(5).  If a                    command is specified, it is passed to the shell for execution.  Otherwise, an interactive shell is executed.  sudo -i disappear description in manual


I have designed a VERY basic lighting gadget -- it's basically a flashlight. It turns on and off with a switch and is powered by a rechargeable Lithium Ion Battery via USB cable. It consists of LED's on a PCB and has a switch to stop charging in order to keep the battery from overheating.   I know I don't need FCC as there is no radio transmission. I know I will need CE for Europe, but am uncertain about what I need for the USA and Canada? I have spoken with UL and gotten a quote, but they won't tell me what exactly I need until I pay and it's extremely expensive.

Other than FCC and RoHS statement, what other certifications do you need to have in order to sell your product to US Market?  My device is a remote control using Bluetooth Module. Operate using 4 x AA battery .  The Bluetooth module is already certified with CE and FCC.  I was told I may need a Safety test. ETL if I'm not mistaken.


Inform  uname -r   Kali Rolling 64-bits  4.9.0-kali3-amd64   I have troubles at the make step while installing the driver  make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.9.0-kali3-amd64/build M=/root/rtl8192eu-linux-driver  modules make[1]: *** /lib/modules/4.9.0-kali3-amd64/build: No such file or directory.  Stop. make: *** [modules] Error 2   On the official website of TP-LINK, they said this device don't support in kernel v4.9.0. So I need your helps to fix this problem. Thank you.

I'm trying to install the drivers to my wireless adapter ():   I have already tried the following:  sudo add-apt-repository ppa:hanipouspilot/rtlwifi sudo apt update sudo apt install rtl8192eu-dkms   But I'm getting the following error:  E: Unable to locate package rtl8192eu-dkms   I have also tried manually downloading and installing it, but I'm getting this:  make make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.6.0-kali1-amd64/build M=/root/Desktop/20140812_rtl8192EU_linux_v4.3.1.1_11320  modules make[1]: *** /lib/modules/4.6.0-kali1-amd64/build: No such file or directory.  Stop. Makefile:1323: recipe for target 'modules' failed make: *** [modules] Error 2   edit: lsusb output  root@kali:~# lsusb Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 004: ID 8087:07da Intel Corp.  Bus 001 Device 003: ID 1bcf:2c0e Sunplus Innovation Technology Inc.  Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub **Bus 003 Device 002: ID 2357:0107**   Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


Situation: Appartment in a panel building. Very hard concrete walls -- all, thick or thin. No plastic hooks (like  that usually work for people around do not work for me, the little nails band when hammered in, and so does the larger nail.  So far, I have been hammer-drilling everything, even a hook/nail/screw for the clock, drilling 5mm hole and using wall plugs.  However, this is very inconvenient (dusty, I have to borrow the hammer drill from my family every time and it's not a cheap thing, I get big holes in the wall if I remove any picture or alike).  Is there any other option? I thought that maybe a small hole could be created at an angle and then a small nail inserted. If the hole had 2mm in diameter and the nail had 2.2mm in diameter, it could work. However, I have no idea how to create such a small hole. Or something like that... Any suggestions are welcome.

I have a framed picture about two feet by three feet in size that weighs about one pound (not a sheet of paper). I want to hang it onto a wall that is of full-blown hard concrete and covered with paper wallpaper (not vinyl - just paper).  The default way would be to drill the concrete and insert an anchor but that would damage the wall surface.  Is there a way to hang such picture onto such wall without damaging the wall?


I'm an Indian citizen and I'm currently studying in France. Unfortunately, my school is pretty bad and I'd like to terminate my studies and return back to India, If I leave France just over three months after my arrival, will I be refused exit from the country?   Will the French police not allow me to return to my country? I actually came to France on October 2nd but I think it's very hard for me to leave within three months of my arrival since air tickets during the holiday seasons are expensive. If I leave on the 5th or 6th of January, can the French border guards detain me for not having an OFII stamp and actually "deport" me instead of granting me exit?   Also, can my school tell the border agency of France to stop me from leaving the country or to start deportation proceedings against me?   They don't like me that much - that's the reason why I'm asking this question. I'm sorry if I sound naive, but I'm not very well aware of French laws and regulations.

US passport. I have a long stay visitor visa in France for one year. I never got the OFII stamp/vingette. I know other people who have left France having never gotten OFII and had no problem. The customs people didn't even check their passport, simply opened it and stamped.  Can I avoid any potential problems by traveling by train or car for a short trip to another Schengen country (eg Spain, Netherlands), where I can enter as US citizen, and flying home from there?


I have the following code:  curtains = 0  def bedroom_curtains_open():     print ("You open your curtains to reveal that it is very dark out.")     print ("It looks to be about 2am, what woke you?")     curtains = 1     bedroom_up()   This, however doesn't change the variable curtains to 1, why is this?

How can I create or use a global variable in a function?  If I create a global variable in one function, how can I use that global variable in another function? Do I need to store the global variable in a local variable of the function which needs its access?


You didn't tell me that you have a girlfriend.(Does it mean that he still has a girlfriend)                       or   You didn't tell me that you had a girlfriend.(Does it mean that he no longer has a girlfriend) I knew that you have a girlfriend.                    or   I knew that you had a girlfriend.   which of them is grammatically correct and why not the other one? Please explain every detail about such sentences which give confusion of tenses to the non English speakers.  P.S  The person does  have a girlfriend at present, as he never broke up with her.  thanks in advance :)

I know the past tense carries the past tense in every dependent clause, but referring specifically to places or to things that are eternal, like the Earth, seems a bit weird and therefore we sometimes (I believe incorrectly) say     He didn't know that New Jersey was actually on the East Coast.   Because it still is. Or     He thought the Earth was round.   So is it square now?  Logically speaking, would you consider the use of past tense here a bit confusing in a day-to-day speech in these examples? Would you instinctively opt for using the present tense?


I've obviously seen that $E=mc^2$. But I've also seen that the equation $E^2=(mc^2)^2+(pc)^2$ (where $p$ = momentum) is true.  If you square $E=mc^2$, and subtract the result from the other equation, you get $0=(pc)^2$. In other words, momentum doesn't exist!  I assume combining these equations is a mistake. Is $E=mc^2$ only something that holds in certain circumstances? Is $E^2=(mc^2)^2+(pc)^2$ the more complete, correct version of $E=mc^2$?  I know I'm wrong -- where, exactly, is my mistake?

I have been having trouble distinguishing these two equations and figuring out which one is correct.  I have watched a video that says that $E^2=(mc^2)^2+(pc)^2$ is correct, but I do not know why.  It says that $E=mc^2$ is the equation for objects that are not moving and that$ E^2=(mc^2)^2+(pc)^2$is for objects that are moving.  Here is the link to the video:


I think I understand the definition of Turing-recognizable and Turing-decidable, but still there's few subtle details I did not catch so far. Can you explain in details why all decidable languages are also Turing-acceptable languages? Why in details the he reverse is not true? EDIT For a language decidable, if $x \in T^c$, does it have to terminate in a finite number of step? Is that the major difference between a Turing-recognizable and Turing-decidable? In other word, the language is decidable iff there a Turing-Machine which accepts a word of $L$ in finite number of steps and reject a word of $L^c$ in a finite number of steps.

What is difference between "recognizable" and "decidable" in context of Turing machines?


So, my brother is watching on tv a vote a in the American Congress.  He says that the members are asked to vote with yea/nay (I have heard that from the Chamber of Commons in the UK as well).  Now we are trying to figure our whether there might be an actual difference between yea/nay and yes/no, that might have gone lost with time. In particular, a person on  gave an interesting explanation: "English used to use what’s called a “four-form” system. “Yea” and “nay” were only used to answer positive questions, while “yes” and “no” were only used to answer negative questions." However, I cannot find confirmation of what is said.  On a side note, an aspect of this answer that is intriguing me is that I have never heard of a "four-form" system. As I have studied French and German, I am know of the existence of three-form systems (in German, ja/doch and nein, and in French, oui/si and non), but four??  Can anybody confirm/refute the theory of the "four-form system"?  If you are going to confirm it, could you please provide the source of your information?  (I have looked on stackexchange for answers, but, to the best of my knowledge, questions on yay/nay never wonder about the comparison with yes/no)

I am curious as to why "nay" replaces the simple unequivocal "no" in the context of voting.  My research in Merriam-Webster tells me that "nay" means "no" (not the other way around) and the first known use of "nay" appeared in 1400s. Since the use of "no" existed before 1400 and the word remains to be used afterward, why would "nay" become the preferred choice of word when it comes to voting. Any idea?


I wrote an object, in Game Maker. My problem is that the camera appears to be nonexistent. It does not follow the player, and from the perspective it displays on the screen,  I believe I simply do not have a camera.    This is my Step event:  right = keyboard_check(vk_right); left = keyboard_check(vk_left); forward = keyboard_check(vk_up); back = keyboard_check(vk_down);  if (jump==0 && keyboard_check(vk_space)) {     sound_play(snd_jump);     x += 3 * unitZ_x;     y += 3 * unitZ_y;     z += 3 * unitZ_z;     jump = 1;     canjump = 4; }  canjump -= 0.5; x += unitZ_x * canjump; y += unitZ_y * canjump; z += unitZ_z * canjump;  if (canjump < -8) {     canjump = -8;     falling = 1; }  currentRadius = sqrt((x - centerX) * (x - centerX)          + (y - centerY) * (y - centerY) + (z - centerZ) * (z - centerZ));  if (currentRadius < radius) {     x -= (currentRadius - radius) * unitZ_x;     y -= (currentRadius - radius) * unitZ_y;     z -= (currentRadius - radius) * unitZ_z;     currentRadius = sqrt((x - centerX) * (x - centerX)             + (y - centerY) * (y - centerY) + (z - centerZ) * (z - centerZ));     jump = 0;     falling = 0;     canjump = 0; }  if ((right==1) || (left==1)) {     x += (right - left) * 4 * unitX_x;     y += (right - left) * 4 * unitX_y;     z += (right - left) * 4 * unitX_z;      distance = sqrt((x - centerX) * (x - centerX)              + (y - centerY) * (y - centerY) + (z - centerZ) * (z - centerZ));      unitZ_x = (x-centerX) / distance;     unitZ_y = (y-centerY) / distance;     unitZ_z = (z-centerZ) / distance;      x -= (distance - currentRadius) * unitZ_x;     y -= (distance - currentRadius) * unitZ_y;     z -= (distance - currentRadius) * unitZ_z;      unitX_x = unitY_y * unitZ_z - unitY_z * unitZ_y;     unitX_y = unitY_z * unitZ_x - unitY_x * unitZ_z;     unitX_z = unitY_x * unitZ_y - unitY_y * unitZ_x; }  currentRadius = sqrt((x - centerX) * (x - centerX)          + (y - centerY) * (y - centerY) + (z - centerZ) * (z - centerZ));  if ((forward==1) || (back==1)) {     x += (forward - back)*4*unitY_x;     y += (forward - back)*4*unitY_y;     z += (forward - back)*4*unitY_z;      distance = sqrt((x - centerX) * (x - centerX)              + (y - centerY) * (y - centerY) + (z - centerZ) * (z - centerZ));      unitZ_x = (x - centerX) / distance;     unitZ_y = (y - centerY) / distance;     unitZ_z = (z - centerZ) / distance;       x -= (distance - currentRadius) * unitZ_x;     y -= (distance - currentRadius) * unitZ_y;     z -= (distance - currentRadius) * unitZ_z;      unitY_x = unitZ_y * unitX_z - unitZ_z * unitX_y;     unitY_y = unitZ_z * unitX_x - unitZ_x * unitX_z;     unitY_z = unitZ_x * unitX_y - unitZ_y * unitX_x; }     This is my Draw event:    d3d_draw_ellipsoid(x - 1, y - 1, z - 1, x + 1, y + 1, z + 1, 0, 1, 1, 60);   d3d_set_projection_perspective(0, 0, 640, 480, 0);   d3d_set_projection(x - 4 * unitY_x, y - 4 * unitY_y, z - 4 * unitY_z, unitY_x,           unitY_y, unitY_z, unitZ_x, unitZ_y, unitZ_z);     Does anyone know what I have done wrong? I think it is a simple 3D camera glitch, but I have never made a camera before (in anything for that matter) so chances are it is something really basic.

I have a pretty difficult problem on my hands. My 3D character moves through space and rotates. I do not know the angle of rotation at any given time, but I do have three X, Y, Z unit vectors serving as basis vectors for the character's coordinate system.  I see that in the  there are three formula for extrinsic rotation. My problem is that they do not seem to work in any manner whatsoever. Either my reading of that page misled me, or game maker does not use extrinsic rotation.  Do Game Maker's rotation transformations always rotate globally in 3D space, or does it use the current set of transformations and rotate around the current X, Y, or Z axis?


I am trying to find out how inflammatory markers change in response to a mechanical device change. I have daily readings for the 5 days before the event and for the 5 days after the event. I am expecting a rise in inflammatory markers in the pre readings followed by a fall after the device change. I also need to find out how the change differs in two subgroups (sample sizes of the subgroups are n=21 and n=88). The aim is to find out if the change is significant, to consider these markers as predictors of the device failing and hence needing to be changed.    I would like to know what test would be appropriate to analyse this. I need to keep things simple as I and the people reading the results are non-statisticians.


My V brake makes grinding sounds when pulled. I've checked, and it keeps collecting metal fragments, presumably from the rim. The pads are weeks old, the rim was replaced a year ago. What can cause this? Can I solve this with anything else than replacing the rim and the pads again?

I have several brake pads on my cantilever brakes that have several small metal shavings embedded in the pad.  Is this normal?  What should I do about it?


I have a static class named GlobalNet meant to make a variable(Specifically an instance of another class named Network) global throughout my entire program as I need to use the variable across multiple classes by solely including the header file GlobalNetwork.hpp. I need to use a pointer so I can easily change the instance of the Network class held by the GlobalNet class. Currently, the code looks like this: GlobalNetwork.hpp:  #ifndef GlobalNetwork_hpp #define GlobalNetwork_hpp  #include <stdio.h> #include "Network.hpp"  class GlobalNet{ private:     static Network * net;     GlobalNet();  public:      static void setNetwork(Network newNetwork);      static Network getNetwork(void);  };   #endif /* GlobalNetwork_hpp */   GlobalNetwork.cpp:  #include "GlobalNetwork.hpp"  GlobalNet::GlobalNet(){  }  void GlobalNet::setNetwork(Network newNetwork){     *(GlobalNet::net) = newNetwork; }  Network GlobalNet::getNetwork(void){     return *net; }   This code gives me /clang:-1: linker command failed with exit code 1 (use -v to see invocation). I'm pretty sure it's because I'm assigning a pointer to a function parameter but I'm not entirely sure. If it is required to known I am using macOS Mojave and am compiling the code with Xcode 10.1 and I am new to C++.

Can anyone explain why following code won't compile? At least on g++ 4.2.4.  And more interesting, why it will compile when I cast MEMBER to int?  #include <vector>  class Foo {   public:       static const int MEMBER = 1;   };  int main(){       vector<int> v;       v.push_back( Foo::MEMBER );       // undefined reference to `Foo::MEMBER'     v.push_back( (int) Foo::MEMBER ); // OK       return 0; }


currently I am using ubuntu 14.04 LTS. Whenever I am trying to install any package form ubuntu software center I am getting the following message "Package dependencies cannot be resolved". And also from the update center it is not showing any update information. Is there any permanent solution? For information I have tried the commands like "sudo apt-get clean" and "sudo apt-get update". But the its not working as I am getting the message repeatedly. what can I do? Please Help!

Occasionally, when I'm installing stuff, I get an error like the following:  Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  package1 : Depends: package2 (>= 1.8) but 1.7.5-1ubuntu1 is to be installed E: Unable to correct problems, you have held broken packages.   How can I resolve this?


In the question , it is said that Snape could fly. However, I don't remember reading it anywhere in the book.  Was it explicitly mentioned in the books (if so, where?) or is it not in the canon?

In the movies, the Death Eaters leave a smoky trail behind them as they fly. As the Order arrive in the Ministry of Magic in Order of the Phoenix, they leave a silvery trail behind them. In the books, there’s no mention of how they’re doing this. And J.K. Rowling said in the books that only Voldemort and Snape could fly like this; first seen in the Battle of the Seven Potters.  Please can somebody explain how the Death Eaters are able to fly like this?


We assume that to have drawn a vector.... \documentclass[a4paper,12pt]{article} \usepackage{tikz} \begin{document} \tikz\draw[->,line width=1pt] (0,0) -- (1,1); \end{document}   Is there a pencil effect with TikZ as the picture below?

How can one simulate chalkboard lines in Tikz?    Perhaps something  could work, but a) would it then be necessary to specify lines as regions? and b) I cannot compile the code in the previous link, which makes pdflatex -shell-escape wondering:  [. . .] Package pgfplots notification 'compat/show suggested version=true': document ha s been generated with the most recent feature set (\pgfplotsset{compat=1.12}).  Runaway definition? -> ! TeX capacity exceeded, sorry [main memory size=5000000]. \pgfplotsapplistXXpushback@smallbufoverfl ...toka                                                   \the \t@pgfplots@tokb \the... l.16   \addplot3[surf,shader=interp] {rand};  !  ==> Fatal error occurred, no output PDF file produced! Transcript written on papyrus.log.   Edit: It seems that chalk-like filling can be produced using gaussian noise. I have no idea of how to do implement that with tikz/pgf though.


Is there an idiomatic way to say that it took a lot of time and effort for someone to do something?  Example: you ask someone a question to which they are reluctant to give an answer, but eventually, and especially after a lot of struggle, they do. And now you want to say something like "oh my god he went through hell to answer that (which isn't befitting of course)". What should we say?

Is there an idiom available, that is exactly opposite to "Cake walk" or "Child's play"? I am looking for something exactly synonymous with "Very difficult" or "strenuous".   Example Sentence:      This task is really _______(difficult).


I've read that rsync cannot detect moved folders, and simply delete and recopy them into the new folder structure.  Since the only change I did to my master copy is the simple introduction of a top folder to contain my original files, i.e.:  folder1 folder2 folder3   into  top\folder1 top\folder2 top\folder3   I was wondering if I could just do the same manually in my backup copy, fix the modification times of both top folders somehow, so that succeeding calls to rsync would run normally.  Will this work? If so, how? If not, what is the recommended way to solve this problem? Or should I be running rsync with different parameters in the first place? (instead of rsync -a --delete /mnt/SRC /mnt/DEST which I'm currently using)  The directories are pretty large and so I'd like to avoid unnecessary recopying as much as possible.

I have two drives with the same files, but the directory structure is totally different.  Is there any way to 'move' all the files on the destination side so that they match the structure of the source side? With a script perhaps?    For example, drive A has:    /foo/bar/123.txt /foo/bar/234.txt /foo/bar/dir/567.txt   Whereas drive B has:  /some/other/path/123.txt /bar/doo2/wow/234.txt /bar/doo/567.txt   The files in question are huge (800GB), so I don't want to re-copy them; I just want to sync the structure by creating the necessary directories and moving the files.  I was thinking of a recursive script that would find each source file on the destination, then move it to a matching directory, creating it if necessary. But -- that's beyond my abilities!  Another elegant solution was given here:


I am trying to relay email thru my provider that has a mail server for my domain (xxxx.com). My postfix is configured as follows:  relayhost = [smtp.xxxx.com]:25   the server requires authorization, but it is working correctly.  > smtp.xxxx.com[79.96.129.xxx]:25: AUTH PLAIN AewfewfewfcewfewfewfbwBLYnNKazY1UVUjZnc= < smtp.xxxx.com[79.96.129.xxx]:25: 235 2.7.0 User mailing+xxxx_com logged in.   The problem is: the relay server REQUIRES "MAIL FROM:" to be set to the same user I use for authenticaton. But the user is by default different.  > smtp.xxxx.com[79.96.129.xxx]:25: MAIL FROM:<user@server.xxxx.com> SIZE=296 < smtp.xxxx.com[79.96.129.xxx]:25: 550 5.1.8 Sender address rejected   The question is: how to make my local postfix to user "MAIL FROM:" as a user from relaying server regardless the local user that sends the mail?   Thanks!

I'm trying to get email reports from our AWS EC2 instances.  We're using Exchange Online (part of Microsoft Online Services).  I've setup a user account specifically for , and I've setup Postfix to meet all the requirements to relay messages through this server.  However, Exchange Online's SMTP server will reject messages unless the From address exactly matches the authentication address (the error message is 550 5.7.1 Client does not have permissions to send as this sender).  With careful configuration, I can setup my services to send as this user.  But I'm not a huge fan of being careful - I'd rather have postfix force the issue.  Is there a way to do this?


Question related to         #include <iostream>     int main()     {         double x = 4.10;         double j = x * 100;          int k = (int) j;          std::cout << k;      }       Output: 409    BUT with 10 instead of 100 :        #include <iostream>     int main()     {         double x = 4.10;         double j = x * 10;          int k = (int) j;          std::cout << k;      }       Output: 41    Since the value actually stored is something like 4.099999... I would expect to get 40 because of truncate and not 41 which is the exact value.  What happened ?

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


I have a specific question about ESTA.  In April of 2017, I traveled from Argentina to Japan, but I made a stopover in Atlanta. So I had to get the ESTA. The thing is that at the time in the travel information, I put that traveled in "transit", but now, in a few months I will visit New York  The question is... do I have to make a new application? or update it? or I can use the one I have (it is valid until the end of December)  Thank you very much in advance.

I go to México in some time, and my fly tickets first I go from Peru to the US, because of that I require a visa to enter US.  In my country I can apply for VWP, but I'm a little scared of getting denied, while I'm in México it is possible that I would make a short tourism travel to US but in the ESTA form there is the following question.     Indicate whether your travel to the US is occurring in transit to   another country by selecting yes or no. Answering this question is   required to complete your application.   If I choose yes, definitely I can not enter US?  What scare me a little is, if I select no and then my request is denied, getting the visa would be a little complicated.


Find Familiar PHB p.240:  (...) In combat, it rolls its own initiative and acts on its own turn. A familiar can't attack, but it can take other actions as normal. (...) (...) Finally, when you cast a spell with a range of touch, your familiar can deliver the spell as if it had cast the spell. Your familiar must be within 100 feet of you, and it must use its reaction to deliver the spell when you cast it. (...)  I highlighted (what I interpret as) the prerequisites for casting spells through a familiar. Example My wizard has a familiar and the cantrip Shocking Grasp, which has a melee spell attack. In our first game, my DM ruled that on the familiar's turn my wizard could cast Shocking Grasp through the familiar, using its reaction. Allowing it to move in swiftly when needed and (possibly) deliver a "shocking bite". After reading  I realise that the casting of the spell needs to happen in the wizard's turn, not the familiar's. This makes me wonder whether the familiar could hold its reaction when the wizard casts the spell, so that on the familiar's turn it can move into melee before releasing the spell. Could "entering melee range with target X" be a trigger for a familiar's reaction? Or does the familiar already need to be in melee range before its spellcaster commands it to cast a melee spell?

The last paragraph of the Find Familiar spell contains the following:     ...when you cast a spell with a range of touch, your familiar can   deliver the spell as if it had cast the spell. Your familiar must be   within 100 feet of you, and it must use its reaction to deliver the   spell when you cast it.   Since the attack functions as a reaction for the familiar, it must already be within touch range of the target to deliver the spell, correct?  If a target is 30ft away, could a wizard ready a Shocking Grasp spell for "when my familiar is within touch range of that bugbear", allowing his owl to fly over, deliver the spell attack, and then fly away on its turn?   I assume his owl could not ready an action to fly to a goblin and back triggered upon "the wizard casts shocking grasp" since both would require a reaction, correct?


Let $A\neq\emptyset$ and bounded above. Let $-A=\{-x\ | \ x\in A\}.$ Prove that $\sup A=-\inf -A.$  We need to show that $-\inf -A$ is the least upper bound of $A.$ Suppose $x \in A.$ Then $-x \in -A,$ and, hence $-x\ge \inf -A. $  This implies that $x \le -\inf -A.$  Thus $-\inf -A$ is an upper bound of $A.$  Let $\beta$ be any upper bound of $A.$  Thus $\beta \ge x$ for every $ x \in A.$  This implies that $-\beta \le -x$ for every $x \in A$ which tells us that $y \ge -\beta$ for all $y \in -A.$  Hence $-\beta$ is a lower bound of $-A.$  Hence $-\beta \le \inf -A,$ $\beta \ge -\inf -A,$ and so $-\inf -A$ is the least upper bound of $A.$

I need to prove that $\sup \{-x \mid x \in A\} = -\inf\{x \mid x \in A\}$ and am having trouble moving the $-x$ out of the $\sup$ to $\inf$. Another thing is that I don't quite know how to prove $b = \inf$ (see below). Any help would be appreciated! Here my attempt:  Let $a = \sup\{-x \mid x \in A\}$  Then by definition $a \geq -x$ for $x \in A \implies -a\leq x$ for $x \in A$  Thus $-a$ is a lower bound of $A$. Assume $b$ is a lower bound of $A$  Then $b \leq -a \implies  a \geq -b$ and $a = \sup \{−x \mid x\in A\} = -\inf(A)$


In Ubuntu 18.04, I'm not able to dock TeamViewer. Even if I right click on the TeamViewer icon when opened, I can't see an option to make it favorite. How can I dock the teamviewer here permanently?

I have a custom .desktop file: [Desktop Entry] Type=Application Terminal=false Icon[en_US]=/home/alex/bin/idea-IC-173.4127.27/bin/idea.png Name[en_US]=IntelliJ Exec=/home/alex/bin/idea-IC-173.4127.27/bin/idea.sh Name=IntelliJ Icon=/home/alex/bin/idea-IC-173.4127.27/bin/idea.png  Output of ls -lha .local/share/applications/intellij.desktop: -rwx--x--x 1 alex alex 248 Dez 30 10:54 .local/share/applications/intellij.desktop  Answers posted to a previous question () don't work for me. I can find this launcher in Activities and I can double click on that file and IntelliJ will start. Nevertheless, I cannot add this launcher as a favorite to the dock. The option does not show up.


I think the right sequence is $f_n(t)=|t-\frac{1}{2}|^{(n+1)/n}$ but I can't manage to prove it's Cauchy... (when I look at graph of $f_n$s it seems obvious, but I need it formal way.

The space $ C^1[0,1] $- the space of all continuously differentiable functions on $ [0,1]$ is not a Banach space with respect to the sup norm,$ \|.\|_{\infty} $ since the uniform limit of a continuously differentiable function need not be differentiable.  How can I illustate this statement using a counter example? Can I use $ f_{n}=\frac1 n \sin nx $ as a counter example?  Also, is $ C^1[0,1] $ is same as the space given by $ X=\{f\in C^1[0,1]:f(0)=0 \}$. Can I use the same example to show that this is not a Banach space?  More help is appreciated! Thanks!


I am working on a project and in this project i am asked to make a webservice that returns a pure json   i made this code but it always returns mixed xml and json  namespace DotMeTast {     [WebService(Namespace = "http://tempuri.org/")]     [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]     [ScriptService]     public class NewsWebService : System.Web.Services.WebService     {         NewsDataContext _db = new NewsDataContext();           [WebMethod]         [ScriptMethod(ResponseFormat = ResponseFormat.Json, UseHttpGet = false, XmlSerializeString = false)]         public string getAllNews()         {              var news = (from p in _db.NewsTBs                         where p.nType == "Real"                         select p).ToList();             var jsonSerialiser = new JavaScriptSerializer();             Context.Response.Clear();             Context.Response.ContentType = "application/json";             var json = jsonSerialiser.Serialize(news);             return json;         }     } }   Any Clue on how to make it pure json

I am using .Net framework 2.0 / jQuery to make an Ajax call to a 2.0 web service. No matter what I set the contentType to in the ajax call, the service always returns XML. I want it to return Json!  Here is the call:        $(document).ready(function() {          $.ajax({             type: "POST",             url: "DonationsService.asmx/GetDate",             data: "{}",             contentType: "application/json; charset=utf-8",             dataType: "json",             success: function(msg) {               // Hide the fake progress indicator graphic.               $('#RSSContent').removeClass('loading');                // Insert the returned HTML into the <div>.               $('#RSSContent').html(msg.d);             }           });         });       Here is what the request header looks like in Fiddler:  POST /DonationsService.asmx/GetDate HTTP/1.1 x-requested-with: XMLHttpRequest Accept-Language: en-us Referer: http://localhost:1238/text.htm Accept: application/json, text/javascript, */* Content-Type: application/json; charset=utf-8 Accept-Encoding: gzip, deflate User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; eMusic DLM/4; .NET CLR 2.0.50727) Host: localhost:1238 Content-Length: 2 Connection: Keep-Alive Pragma: no-cache   I have tried setting the contentType to 'text/json' and get the same results.  Here is the web service method:  <WebMethod()> _ Public Function GetDate() As String      'just playing around with Newtonsoft.Json     Dim sb As New StringBuilder     Dim sw As New IO.StringWriter(sb)     Dim strOut As String = String.Empty      Using jw As New JsonTextWriter(sw)         With jw             .WriteStartObject()             .WritePropertyName("DateTime")             .WriteValue(DateTime.Now.ToString)             .WriteEndObject()         End With         strOut = sw.ToString     End Using      Return strOut  End Function   and here is what it returns:  <?xml version="1.0" encoding="utf-8"?> <string xmlns="http://DMS.Webservices.org/">{"DateTime":"11/13/2008 6:04:22 PM"}</string>   Does anyone know how to force the web service to return Json when I ask for Json?  Please don't tell me to upgrade to .Net Framework 3.5 or anything like that (I'm not that stupid). I need a 2.0 solution.


If you've been using ArcGIS for a while, you will have most likely come across this error:    The issue is linked to some sort of ActiveX plugin security setting in the 32 bit version of Internet Explorer. A quick fix is to go into the Security settings of IE and change it from Medium high to Medium, and the problem will be resolved. This is all fine and dandy, I've made the change on my home laptop and there are no more script errors there.  However, my main issue is that on my work computer, the administrators have set the machines up so that any changes done during the session are reverted after a logoff or reboot. It's tiring to open the Internet security settings every day - Is there a way to write a batch or python script that will do this automatically?

I am just learning ArcGIS 10.2 and it was working well until I tried to use the Export to a Geodatabase (single) option for a dbs table I made. Since then, it seems I now get the same Script Error for import/export functions. However, I just tried to export to Geodatabase (multiple) and error did not pop up. I spoke with tech support and they could not help me so far. I really do not know much about GIS so it is hard for me to fix this problem and cannot proceed with some things.


I'm trying to identify a short story I read some time in the nineties, and ideally the anthology it was in too. I was reading a lot of Asimov at the time, and it has a typically Asimovian twist at the end, but may not actually be by him.   A man in a small (?) craft is being chased by a bigger spaceship. The two are on opposite sides in a war. I think the man has stolen secrets of some kind. His craft is overpowered and he (crash?) lands on an asteroid. He expects to be captured but notes that the chasing ship is very unwieldy and overshoots.  As it returns he is able to evade capture by walking round the asteroid so as continually be on the opposite side as the ship. Eventually an even bigger ship from his own side chases off the one he is avoiding and he is rescued.  The story is framed as being told by one old space-hand in a bar to two others. One of them (relatively young/junior, I think) dismisses it as a tall tale.      However the other listener recognised something about the storyteller and suspects he may be the disgraced spaceship captain who failed to catch a man in a spacesuit.

I'm trying to track down a collection of older short stories I read as a kid. I can recall only one of the stories quite clearly.  It involves a spy, telling a story years later, attempting to escape detection by hiding on either Phobos or Deimos. He is being chased by a spaceship, but because of the short horizon and rocky surface, he is able to move about much faster than the spaceship can scan the surface.  I came here because I had just remembered a second story from the same collection, but by the time I wrote the section above it was gone...


Please consider:   \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{matrix}  \begin{document}  \begin{tikzpicture}[     ]     \matrix (m) [nodes in empty cells,              matrix of nodes,             execute at begin cell=\strut,             execute at empty cell=\strut,         nodes = {             red,              draw,              align=right,              minimum height=1cm,              minimum width=2cm,              inner sep=0pt,         },         ]     {          A  & B    & y  \\          1  &      &    \\          2  &      &    \\          3  &      &    \\      };  \end{tikzpicture}  \end{document}   which gives:     Why the empty cells are misaligned? How can I solve this? (The \strut is necessary to avoid the same problem with descendant in "filled" cells, but why it is not working in the empty ones?)

I wanted to draw an almost empty matrix of nodes with TikZ similar to the left most one below. All nodes would have same size (through minimum width and minimum height) and no separation between columns and rows. But when I include a text which needs two lines I obtain the central matrix and, if the text just needs one line the right most one. I don't know what's wrong. Do you? I'm using CVS version of TikZ.  \documentclass[tikz,border=2mm]{standalone} \usetikzlibrary{matrix}  \tikzset{ proces/.style={draw, minimum height=15mm, minimum width=2cm, outer sep=0pt, text width=1.5cm, align=center} }  \begin{document} \begin{tikzpicture}  \matrix (A) [matrix of nodes,nodes=proces,nodes in empty cells] {  & \\  & \\ };  \begin{scope}[xshift=4.5cm] \matrix (A) [matrix of nodes,nodes=proces,nodes in empty cells] {  & OOO OOO \\  & \\ }; \end{scope}  \begin{scope}[xshift=9cm] \matrix (B) [matrix of nodes,nodes=proces,nodes in empty cells] {  & A \\  & \\ }; \end{scope}  \end{tikzpicture} \end{document}


I have the code below to execute SQL in a java method, im getting a null: java.lang.NullPointerException when running the code.           public void addPrevious(TodaysDate Date){                 String paymentDate = ("SELECT PAYMENTDATE FROM table1  where DATE IN (SELECT ID FROM _DATE WHERE ID = ( SELECT MAX(ID) FROM _DATE WHERE ID < ( SELECT MAX(ID) FROM _DATE ) ))");                 String reportingUnit = ("SELECT REPORTING_UNIT FROM table1  where DATE IN (SELECT ID FROM _DATE WHERE ID = ( SELECT MAX(ID) FROM _DATE WHERE ID < ( SELECT MAX(ID) FROM _DATE ) ))");                 String insertLastDate =  ("INSERT INTO table1(PAYMENTDATE, REPORTING_UNIT, Date) VALUES  ("+paymentDate+", "+reportingunit+", "+asOfDate+")");                  getSession().createQuery(paymentDate);                 getSession().createQuery(reportingunit);              }   I'm calling the code using the code below. I cant figure out where the null value is coming from, I tried debugging but the program crashes before getting anything useful   AdjustmentHibernate AdjustmentHibernate = new AdjustmentHibernate(); AdjustmentHibernate.addPrevious(asOfDate);

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


I have a regular saving account with some amount in it, now I am an NRI so I want to either switch my saving account to NRE account or I want to transfer money from savings account to an NRE or NRO account.   How do I do this? Will money transferred to an NRO account be taxable? Do I need to pay tax on transferred money to an NRO account? How much would that tax be for transferred money to an NRO Account?  What's the best way to get that money to an NRE account?

I have a regular savings account in India and a NRE/NRO account as well with a different bank. I just haven't gotten around converting my regular savings to NRE/NRO. Can I move my funds from regular savings to NRO?


i have a structure declared like th following :  struct myStruct {     char c;     int i;     float f[2]; };   the sizeof gives 16, where the sizes of types are 4, 4, 1. my question is why the sizeof does not give 13?.. should I modify somthing to have the right size?

Why does the sizeof operator return a size larger for a structure than the total sizes of the structure's members?


My sister is from India and is currently in the UK on a visitor visa expiring in February. We will be moving homes next year and so far have not found any good childcare at our new location. We need a family member to support us.  Is it possible to re-apply for a UK visitor visa soon after reaching India or is there a cooling period before a visitor visa can be re-applied for?

I am a United States citizen with a 6-month Tourist visa to the UK (a stamp in my passport). Additionally, in 2013 I spent about two months in the UK on tourist visas, split between two separate occasions (one month in April-May, and one in August-September). My passport was stamped in December of 2013, and I have two other stamps from those previous visits (so three total, now)  My original intended departure date from the UK was March 1, but that is no longer the case, as I plan to stay out the duration of my visa.  My question is, can I leave the UK (to travel in Europe for a week, for example) and come back in with this visa? Will they re-stamp me, or see that my existing stamp is still valid? Will it be a problem that I've been coming-and-going in the UK relatively frequently? Are there any other concerns I should be aware of?


I have a set of numbers between 0 and 1, for instance, {0.4, 0.1, 0.0, 0.8}. What are the minimum and maximum values of population variance on such set?

Suppose that a random variable has a lower and an upper bound [0,1]. How to compute the variance of such a variable?


Can you please provide a step by step solution for next integral. I don't have any idea of how this can be solved $\displaystyle\int e^{x^2}\,dx$.

I know that $\int{\frac{1}{x}}dx$ is simply $\ln{(x)}+c$ (-which is clearly unrelated to the problem but I just thought I would share anyway) but I am not sure how to approach $e^{x{^2}}$. Perhaps a substitution?


If I run ls I get colored output which I find pretty handy for quickly getting a glance of the kind of file. When I try to pipe it to less even with the -r and -R flags the coloring always get lost. I am using zsh version 5.0.7. Any ideas? Thanks.  edit: I am on OS X.

Can I get less not to monochrome its output?  E.g., the output from git diff is colored, but git diff | less is not.


I know that when you square something you can visualize it as a 2d square.  When you cube it you can visualize it as a 3d cube.    For example:  2^2 -- a 2 by 2 square  2^3 -- a 2 by 2 by 2 cube  I've been puzzling over how something would look when you make it to the power of a fraction.  Is it some shape with 2D and 3D aspects? Or is it just a non-regular 3d shape.  2^(3/2)  It would be nice to have an explanation and maybe some pics :)  P.S.  I didn't really know what tags this should have so feel free to edit.

Is there an intuitive definition of exponentiation?  In elementary school, we learned that  $$ a^b = a \cdot a \cdot a \cdot a \cdots (b\ \textrm{ times}) $$ where $b$ is an integer.  Then later on this was expanded to include rational exponents, so that  $$ a^{\frac{b}{c}} = \sqrt[c]{a^b} $$  From there we could evaluate decimal exponents like $4^{3.24}$ by first converting to a fraction.  However, even after learning Euler's Identity, I feel as though there is no discussion on what exponentiation really means. The definitions I found are either overly simplistic or unhelpfully complex. Once we stray from the land of rational powers into real powers in general, is there an intuitive definition or explanation of exponentiation?  I am thinking along the lines of, for example, $2^\pi$ or $3^{\sqrt2}$ (or any other irrational power, really). What does this mean? Or, is there no real-world relationship?  To draw a parallel to multiplication:  If we consider the expression $e\cdot \sqrt5$, I could tell you that this represents the area of a rectangle with side lengths $e$ cm and $\sqrt5$ cm. Or maybe $e \cdot \pi$ is the cost of $\pi$ kg of material that costs $e$ dollars per kg. Of course these quantities would not be exact, but the underlying intuition does not break down. The idea of repeated addition still holds, just that fractional parts of terms, rather than the entire number, are being added.  So does such an intuition for exponentiation exist? Or is this one of the many things we must accept with proof but not understanding?  This question stems from trying to understand complex exponents including Euler's identity and $2^i$, but I realized that we must first understand reals before moving on the complex numbers.


What is the recommended maximum amount of lines a JS document can have before it starts to lose performance?, i mean, At what number is it better to create a new document instead of keep coding in the same file and  making it bigger and bigger?

My web application uses jQuery and some jQuery plugins (e.g. validation, autocomplete).  I was wondering if I should stick them into one .js file so that it could be cached more easily, or break them out into separate files and only include the ones I need for a given page.  I should also mention that my concern is not only the time it takes to download the .js files but also how much the page slows down based on the contents of the .js file loaded.  For example, adding the autocomplete plugin tends to slow down the response time by 100ms or so from my basic testing even when cached.  My guess is that it has to scan through the elements in the DOM which causes this delay.


It's common practice in C to use:  #define FOO() do { /* body */ } while (0)   While this is fine, it's also possible to do:  #define FOO() { /* body */ }((void)0)     {...}((void)0) has many of the same benefits: you can't accidentally merge logic, and a ; is required at the end of the line, so odd expressions like this don't go by un-noticed: FOO() else {...}.  The only difference I've noticed is it means you need to use braces in if-statements.  if (a)     FOO(); else     BAR();   Must be written as:  if (a) {     FOO(); } else {     BAR(); }   Other then this quirk, it seems to work well, preventing the same kinds of problems do/while method is typically used for.  Are there any significant differences between the 2 methods?  Said differently, if you see a code-base using {...}((void)0), are practical reasons to switch to using do{..}while(0), besides the one difference already noted?

In many C/C++ macros I'm seeing the code of the macro wrapped in what seems like a meaningless do while loop.  Here are examples.  #define FOO(X) do { f(X); g(X); } while (0) #define FOO(X) if (1) { f(X); g(X); } else   I can't see what the do while is doing.  Why not just write this without it?  #define FOO(X) f(X); g(X)


When I attempt to install pipelight, an error message displays on the terminal:   Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  pipelight-multi : Depends: ttf-mscorefonts-installer but it is not installable E: Unable to correct problems, you have held broken packages.  I follow these directions:   sudo add-apt-repository ppa:pipelight/stable sudo apt-get update sudo apt-get install --install-recommends pipelight-multi sudo pipelight-plugin --update   When I attempt to enter the third command, it then displays that error above. I've been using Ubuntu for a few days now so, I'm still getting acclimated with everything. Any suggestions or tips would be very helpful.   Thank you.

Is there a way to stream Netflix content to my Ubuntu machine?


I have this progress changed event:  private void videosInsertRequest_ProgressChanged(IUploadProgress obj)         {                  toolStripStatusLabel1.Text = obj.Status.ToString();         }   And also this event:  private void videosInsertRequest_ResponseReceived(Video obj)         {             toolStripStatusLabel1.Text = obj.Status.UploadStatus;         }   And sometimes i'm getting the exception:  Cross-thread operation not valid: Control '' accessed from a thread other than the thread it was created on  Should i use a BeginInvoke over this control or to handle it in another place out of the event ?  This is where i register the event:  static Video video = null;         static ulong process = 0;         private void UploadVideo(string FileName, string VideoTitle, string VideoDescription)         {             UserCredential credential;             using (FileStream stream = new FileStream(@"D:\C-Sharp\Youtube-Manager\Youtube-Manager\Youtube-Manager\bin\Debug\client_secrets.json", FileMode.Open, FileAccess.Read))             {                 credential = GoogleWebAuthorizationBroker.AuthorizeAsync(                     GoogleClientSecrets.Load(stream).Secrets,                     new[] { YouTubeService.Scope.Youtube, YouTubeService.Scope.YoutubeUpload },                     "user",                     CancellationToken.None,                     new FileDataStore("YouTube.Auth.Store")).Result;             }             var youtubeService = new YouTubeService(new BaseClientService.Initializer()             {                 HttpClientInitializer = credential,                 ApplicationName = Assembly.GetExecutingAssembly().GetName().Name             });             video = new Video();             video.Snippet = new VideoSnippet();             video.Snippet.Title = VideoTitle;             video.Snippet.Description = VideoDescription;             video.Snippet.Tags = new string[] { "tag1", "tag2" };             comboBox1.BeginInvoke((Action)(() =>             {                 video.Snippet.CategoryId = (comboBox1.SelectedItem as ComboboxItem).Value.ToString();             }));             video.Status = new VideoStatus();             video.Status.PrivacyStatus = "public";              using (var fileStream = new FileStream(FileName, FileMode.Open))             {                  const int KB = 0x400;                 var minimumChunkSize = 256 * KB;                  var videosInsertRequest = youtubeService.Videos.Insert(video,                     "snippet,status", fileStream, "video/*");                 videosInsertRequest.ProgressChanged +=                     videosInsertRequest_ProgressChanged;                 videosInsertRequest.ResponseReceived +=                     videosInsertRequest_ResponseReceived;                 videosInsertRequest.ChunkSize = minimumChunkSize * 4;                                 videosInsertRequest.Upload();             }         }   And then i have a button click event where i start a backgroundworker runasync. And then in the DoWork event i'm doing:  private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)         {             UploadVideo(FileNameToUpload, uploadVideoTitleTxtBox.Text, uploadVideoDescriptionTxtBox.Text);         }   And now the backgroundworker progresschanged event is empty but somehow i should report to the backgroundworker form inside the two events in my top of my question.  Or maybe using BeginInvoke in this two events ?  I want to report to the toolStripStatusLabel1 and 2 from this events.

I have a scenario. (Windows Forms, C#, .NET)   There is a main form which hosts some user control. The user control does some heavy data operation, such that if I directly call the UserControl_Load method the UI become nonresponsive for the duration for load method execution. To overcome this I load data on different thread (trying to change existing code as little as I can)   I used a background worker thread which will be loading the data and when done will notify the application that it has done its work.   Now came a real problem. All the UI (main form and its child usercontrols) was created on the primary main thread. In the LOAD method of the usercontrol I'm fetching data based on the values of some control (like textbox) on userControl.    The pseudocode would look like this:  CODE 1  UserContrl1_LoadDataMethod() {     if (textbox1.text == "MyName") // This gives exception     {         //Load data corresponding to "MyName".         //Populate a globale variable List<string> which will be binded to grid at some later stage.     } }   The Exception it gave was     Cross-thread operation not valid: Control accessed from a thread other than the thread it was created on.   To know more about this I did some googling and a suggestion came up like using the following code  CODE 2  UserContrl1_LoadDataMethod() {     if (InvokeRequired) // Line #1     {         this.Invoke(new MethodInvoker(UserContrl1_LoadDataMethod));         return;     }      if (textbox1.text == "MyName") // Now it wont give an exception     {     //Load data correspondin to "MyName"         //Populate a globale variable List<string> which will be binded to grid at some later stage     } }   BUT BUT BUT... it seems I'm back to square one. The Application again  become nonresponsive. It seems to be due to the execution of line #1 if condition. The loading task is again done by the parent thread and not the third that I spawned.  I don't know whether I perceived this right or wrong. I'm new to threading.  How do I resolve this and also what is the effect of execution of Line#1 if block?  The situation is this: I want to load data into a global variable based on the value of a control. I don't want to change the value of a control from the child thread. I'm not going to do it ever from a child thread.   So only accessing the value so that the corresponding data can be fetched from the database.


$$ \sum_{k=0}^{i+1} \binom {i+1} k$$   I can't find an identity for this summation :(  To clarify I'm trying to prove using induction that this sum  is equal to $2^{i+1}$, I have my basis and inductive hypothesis done, this is just my inductive step

I'm well aware of the combinatorial variant of the proof, i.e. noting that each formula is a different representation for the number of subsets of a set of $n$ elements. I'm curious if there's a series of algebraic manipulations that can lead from $\sum\limits_{i=0}^n \binom{n}{i}$ to $2^n$.


If my mom Grandmother was Spaniard, does that make my mom 25 percent Spaniard? What percent does that make me?

My sister, cousins, and other relatives speculate that my mom's grandmother was Jewish (for various reasons). I've heard people say at times things like, for example, "I'm 50% German" or "I'm 25% Swedish." This has to do with their ancestry. But, how exactly is this calculated? Say for example that my mother's paternal grandmother was indeed 100% Jewish, what would that make me and my siblings, and how is it calculated?


I need to prove that if $\alpha\lt\beta$ are ordinals, then there exists t $\gamma\le\beta$ that $\alpha + \gamma = \beta$

Let $\alpha ,\beta ,\delta$ be ordinals such that $\alpha < \beta$, prove that there is $\delta \leq \beta$ such that $\alpha+\delta = \beta$ ? I know that if $\beta$ is cardinal then we can take $\delta=\beta$.


Whenever I plug in my inputs it gives me the error:   Exception in thread "main" java.lang.NullPointerException  at Calculate.calculatePay(Calculate.java:13)  at Hours.main(Hours.java:30)  Why is this error coming up and what does it mean?  This is Hours.java:  import java.util.Scanner;  public class Hours {      public static void main(String[] args) {          Scanner input = new Scanner(System.in);         Calculate hours = new Calculate();         Bills hours1 = new Bills();          System.out.println("Enter your hours for this week: ");         int Weekhours = input.nextInt();          System.out.println("Enter the number of days you work this week: ");         int Days = input.nextInt();         int new_days = (Days - 1);          System.out.println("Enter your hourly wage: ");         double Wage = input.nextDouble();          System.out.println("Did you work Sunday? <yes/no> ");         String Didworksun = input.nextLine();          System.out.println("How much money do you have saved already? ");         int Money = input.nextInt();          System.out.println("How much is your bills this month? ");         int Monthpayment = input.nextInt();          hours.calculatePay(Weekhours, Wage, Days, new_days);         hours1.bills( Monthpayment, Money);         hours.displayHours();          System.out.println();  }   }  And This is Calculate.java:   import java.util.Scanner;  public class Calculate { public int Weekhours, Days, new_days; public double pay, Wage, payment, weekpay, Sundaypay, premium; public String Didworksun, Night;  Scanner input = new Scanner(System.in);  public double calculatePay( int Weekhours, double Wage, int Days, int new_days) {       if (Didworksun.equals("y") || Didworksun.equals("Y") || Didworksun.equals("yes") || Didworksun.equals("Yes") || Didworksun.equals("YworkES") || Didworksun.equals("YeS") || Didworksun.equals("yEs") || Didworksun.equals("yeS") || Didworksun.equals("YEs")  || Didworksun.equals("yES")) {          System.out.println("How many hours did you work on sunday? ");         double Sundayhours = input.nextDouble();          System.out.println("You worked " + (Sundayhours) + (" hours on Sunday."));          double Sundaywage = (Wage * 1.5);         double Sundaypay = (Sundayhours * Sundaywage);         double new_hours = (Weekhours - Sundayhours);         double weekpay = (new_hours * Wage);         int Worksunday1 = 1;          System.out.println("How much is night premium? ");         double Premcash = input.nextDouble();          double premium = (Premcash * (Days + Worksunday1));          pay = Sundaypay + weekpay + premium;          double taxes = .21;         double tax_payment = pay * taxes;          payment = (pay - tax_payment);   }else if (Didworksun.equals("n") || Didworksun.equals("N") || Didworksun.equals("no") || Didworksun.equals("No") || Didworksun.equals("NO") || Didworksun.equals("nO")) {     System.out.println("You did not work Sunday.");      int new_hours = Weekhours;     double weekpay = (new_hours * Wage);       System.out.println("How much is night premium? ");     double Premcash = input.nextDouble();      double premium = (Premcash * Days);      double taxes = .21;     double tax_payment = pay * taxes;     pay = weekpay + premium;     payment = (pay - tax_payment);  } else {     System.out.println("Error: Invalid response. Try again");         return calculatePay(Weekhours, Wage, Days, new_days);  }     return payment;   }public void displayHours() {     System.out.printf(" /nYour paycheck will be: %f", payment); }  }   There is also Bills.java  import java.util.Scanner; public class Bills extends Calculate {  private int Money; private int Monthpayment; public void bills(int Monthpayment, int Money) {  Scanner input = new Scanner(System.in);  double until = (Monthpayment - (Money + payment) );  if (until <= 0) {      System.out.println("You're able to make your payment");  } else {      System.out.println("You need to save " + until + ( " more dollars to make your payment"));    }      }   }

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


I have a file called fold.txt. It has two values in each lines separated by a space. If I say that first value represent column A and second value after space is column B then how can I add all the values of column A and all the values of column B and show the summation of each column individually? I am expecting something like this: $ cat fold.txt 100 500 200 300 700 100  Output: Total count Column A = 1000 Total count column B = 900

I have a file with a table of numbers; the first line is a header line. I want to sum each column and print out sum and column name for each column using awk.  How can I do it?


I'm trying to center a text inside a  Relative>Absolute>Relative>'text to be centered'. I've tried most of the solutions that I could find, but I can only get it to center horizontally. Here is a  of what I've got so far.  HTML:

       text

   CSS:   .outer{   position: relative;   width: 500px;   height: 250px;   background-color: red; }  .inner{   position: absolute;   width: 100px;   height: 100px;   background-color: blue;   top:20px;   left: 50px; }  .inner1{   position: relative; }  .inner1 p{   text-align: center;   margin: 0; }

I want to center a div vertically with CSS. I don't want tables or JavaScript, but only pure CSS. I found some solutions, but all of them are missing Internet Explorer 6 support.
Div to be aligned vertically
   How can I center a div vertically in all major browsers, including Internet Explorer 6?


Note: I am using jupyter notebook (MathJax) rather than tex.   use italics typeface to denote Scalars, pointed out by red arrow in the following figure    bold typeface to denote Vectors, pointed out by blue arrow in the following figure    how to write these 2 types of linear algebra notations in latex?  I searched "bold" on the author's  and got this    which is not helpful.  I tried this command  $x$ $\boldsymbol x$   which is even worse.  this command does better  $x \mathbf{x}$   although this is obviously using different font in the Deep Learning Book

I am trying to display vectors as bold and italic. The command \mathbf sets the letters non-italic. I also googled a bit and stumbled upon \mathbf{\em y} or \mathbfit{y}, which all didn't work.  I hope someone can help me on this.