The workspace and project instance objects are associated with Rally object which hold in List object.  class Rally {     Workspace workspace;      public Workspace getWorkspace() {         return workspace;     }      public void setWorkspace(Workspace workspace) {         this.workspace = workspace;     }      public Project getProject() {         return project;     }      public void setProject(Project project) {         this.project = project;     }      Project project;      Rally(String name, Workspace workspace, Project project) {         this.workspace = workspace;         this.project = project;      } }  class Workspace {      public Workspace(String id) {         this.id = id;     }      private String id;      public String getId() {         return id;     }      public void setId(String id) {         this.id = id;     } }  class Project {     private String id;      public Project(String id) {         super();         this.id = id;     }      public String getId() {         return id;     }      public void setId(String id) {         this.id = id;     }  }   How to get workspace id and project id to another HashMap?  rallyInList.stream().collect(Collectors.toMap(r->r.getWorkspace().getId(),b->b.getProject().getId()));

In Java, are there clear rules on when to use each of access modifiers, namely the default (package private), public, protected and private, while making class and interface and dealing with inheritance?


Hi guys, I'm assuming that I am able to use SVD of X to solve this question. So, X = UΣV where U and V are nxn and pxp orthogonal matrices respectively and Σ is an nxp matrix containing the singular values on the diagonal.  I tried to get the expectation of both sides to show the biases. So RHS of the equation would be (1/λ)E[X'X]+E[β̂]=(1/λ)E[VΣ'ΣV']+E[β̂].  However, I am unable to prove (1/λ)E[VΣ'ΣV'] is not 0. Is this the right way to tackle this question? Any help would be appreciated!

I have understood how ridge regression shrinks coefficients towards zero geometrically. Moreover I know how to prove that in the special "Orthonormal Case," but I am confused how that works in the general case via "Spectral decomposition."


Once I want to show my expression to thank, can we use only one word "Thank" instead of "Thanks"?

While looking at the part of speech of the noun "thanks" in an online dictionary I noticed that it was a plural noun and wondered if it could be used in singular form. Glancing at the origin it appears that the old English word "thanc" was once used as the singular form of this noun. I assume it would be appropriate at that time period to say "I have a thank!" if you felt thankful for a single thing instead of being limited to always say "I have thanks!" as we do in modern English.   Nowadays, I believe we only use the plural form "thanks" as the noun in all cases. We can never have a single "thank". Instead we can only have "thanks"! I find this odd! It would make sense to have kept the singular form of the noun. Often we are grateful for a single action or event and it seems more accurate to have a single "thank" rather than many "thanks".   Is there any known specific background history as to why this is?


I am able to render the entity browser button in custom configuration form. But, after selecting the image it does not get displayed in the  form, has anyone integrated in custom form so far ?  $form['content_link'] = [     '#type' => 'container',     '#parents' => ['content_link_wrapper'],     '#weight' => -3,     'widget' => [       '#title' => t('Content Link'),       '#description' => t('The content to be linked in the menu.'),       '#field_name' => 'content_link',       '#field_parents' => [],       '#required' => TRUE,       '#parents' => ['content_link'],       '#tree' => TRUE,       '#id' => 'edit-content-link',       '#type' => 'details',       '#open' => TRUE,       'target_id' => [         '#type' => 'hidden',         '#id' => 'edit-content-link-target-id',         '#attributes' => [           'id' => 'edit-content-link-target-id',         ],         '#default_value' => "",         '#ajax' => [           'callback' => [             '\Drupal\entity_browser\Plugin\Field\FieldWidget\EntityReferenceBrowserWidget',             'updateWidgetCallback',           ],           'wrapper' => 'edit-content-link',           'event' => 'entity_browser_value_updated',         ],       ],       'entity_browser' => [         '#type' => 'entity_browser',         '#entity_browser' => 'image_browser_dropzonejs',         '#cardinality' => 1,         '#selection_mode' => 'selection_append',         '#default_value' => [],         '#custom_hidden_id' => 'edit-content-link-target-id',         '#process' => [           [             '\Drupal\entity_browser\Element\EntityBrowserElement','processEntityBrowser'           ],         ],       ],       'current' => [         '#theme_wrappers' => ['container'],         '#attributes' => [           'class' => 'entities-list',         ],         'items' => [],       ],       '#attached' => [         'library' => [           'entity_browser/entity_reference',         ],       ],     ],   ];

I am having trouble adding an image picker to a block form defined in a custom module.  If I create a custom block type I can define an image field as entity_reference and in the block's form view tell it to use entity_browser and media_entity_browser.  This provides me with an picker with which I can select my image:    I am trying to recreate this in a block provided by my custom module, without much success  // /src/Plugin/Block/MyCustomBlock.php  function blockForm($form, FormStateInterface $form_state)  {     ...      $form['image'] = [       '#type' => 'entity_browser',       '#entity_browser' => 'media_entity_browser',       '#title' => $this->t('Image'),       '#default_value' => $this->configuration['image'] ?? null,       '#weight' => '0',     ];      ... }   This gives me the following.  Note the lack of the bounding box, title and option to edit remove items:     Exporting the configuration files for the working form view gets me this:  // core.entity_form_display.block_content.lead_block.default.yml      ...  field_image:     weight: 1     settings:       entity_browser: media_entity_browser       field_widget_display: rendered_entity       field_widget_edit: true       field_widget_remove: true       selection_mode: selection_append       field_widget_display_settings:         view_mode: default       open: false     third_party_settings: {  }     type: entity_browser_entity_reference     region: content   ...   But if I try and use 'type' => 'entity_browser_entity_reference' in my blockForm function the field disappears altogether.  Looking into various core files I can see that entity_browser is a @FormElement and entity_browser_entity_reference is a @FieldWidget but I don't really understand the difference.  As you might guess I am fairly new to Drupal and I feel like I am missing something fundamental.  I (think I) understand that custom block types are actually nodes internally and that they are subject to different rules to blocks which I define in my custom modules, but I don't fully grasp what the differences here are.  Is is it possible to use the entity browser in my custom module block form in the same way as it is used in the form which I build through the admin's custom block type builder?  Thank you.


l= float(input("Enter length: ")) w= float(input("Enter width: ")) r= float(input("Enter radius: ")) def perimeter():     return (l+w)*2 def circArea():     return (3.14)*(r**2) def display():     p = perimeter()    print("Perimeter is: ", p)     a = circArea()     print("Area is: ", a) def main():      display() main()   I fixed the code, it works now. I realized what i was doing wrong with the returns.

In python, you can have a function return multiple values.  Here's a contrived example:  def divide(x, y):     quotient = x/y     remainder = x % y     return quotient, remainder    (q, r) = divide(22, 7)   This seems very useful, but it looks like it can also be abused ("Well..function X already computes what we need as an intermediate value.  Let's have X return that value also").  When should you draw the line and define a different method?


This is probably a simple question, and I'm sorry if it's not worded super clearly. If I could word this more clearly... I'd probably be able to find the answer online.  What I want to do, is be able to write down the table name only one time at the top of my SQL, and let the system carry that through the rest of my SQL. I am essentially doing it with individual values like mindate but can't get it to work for the whole table.  This works:  Use DB declare @mindate int select @mindate = min(dateid) from dbo.Mytable print @mindate   This does not work (Obviously)  Use DB set dbo.Mytable = TB declare @mindate int select @mindate = min(dateid) from TB print @mindate     I tried different things, but they're not even worth posting and clumping up this question with. Can't figure this one out on my own.

Assume a table structure of MyTable(KEY, datafield1, datafield2...).  Often I want to either update an existing record, or insert a new record if it doesn't exist.  Essentially:  IF (key exists)   run update command ELSE   run insert command   What's the best performing way to write this?


I'm having difficulty dividing a window into two parts vertically. I know how to divide it horizontally but I cannot do it vertically.  What difference is there between the two?

I would like to close some view windows that I opened accidentally.  See the image below:    Edit: another note: I tried searching for the solution, but only found things like "Join Area", which don't seem to work in this situation.


I have fs = 132 Hz and fc = 770 Hz  I want to design a first order high pass filter that increases gain at a rate of 20dB per decade from 132 Hz until 770 Hz.  Before 132 Hz the filter must stay around -17dB.  How do I select components to design this filter?   I am aware of the equation to select RC values for some cutoff frequency, but am not sure how to account for the stopband frequency.  Edit 1.  Below is a picture of what I have been able to achieve so far.    Next is a picture of what I need the circuit to do.

I have been given a Bode plot of a low pass filter, and tasked with essentially reversing the effects by using a high pass filter. I have solved for the transfer function which is the first equation, and I am assuming the inverse transfer function will give me the information I need to construct the high pass filter. I know the values for \$z\$ and \$p\$. Is there a method given any transfer function to realise the circuit elements required? $$H(s) = 0.17\frac{s-z}{s-p}$$ $$H(s)^{-1} = 5.88\frac{s-p}{s-z}$$


I'm trying to compute the partial sum $\displaystyle\sum_{n=0}^m \frac{n}{n^4+n^2+1}$. Wolfram Alpha says that the answer is $\displaystyle\frac{m^2+m}{2(m^2+m+1)}$. I have no idea how they got this answer. Can someone help me out?

Problem :   How to find the sum of the sequence $\frac{1}{1+1^2+1^4} +\frac{2}{1+2^2+2^4} +\frac{3}{1+3^2+3^4}+.....$  I am unable to find out how to proceed in this problem.. this is a problem of arithmetic progression... Please suggest how to proceed...Thanks..


I have designed an encryption algorithm. The algorithm will probably use CFB mode. The algorithm can encrypt any block size and this does not change the size of the key. There are always about $20$ rounds and the key is always around $128$-bits.  However, the algorithm works much slower when it works on $128$-bits blocks, than on about $32$-bits blocks. What are the block size limitations for a secure cipher? If the key is $128$-bits, can it be encrypted in about $32$-bit blocks? Is it secure?  The only  condition I found is that $n!$ should be greater than $2^{128}$, where $n$ is the block size.

Consider a block cipher with a key of size 128 bits but a small block size, say 32 bits.  Is this kind of block cipher secure?  I would like to know to what extent I can use a small block cipher, like a 32 bit block cipher. What are the constraints so that the use is acceptable in a real life application.  For instance, if we use a one-time key, that is, to encrypt only one message. Besides, the message could be small.  Suppose that when we want so send one file, we perform a key agreement so that we use the key for one message. This scenario is not efficient, but the CPA find-then-guess game is not adequate in this case.


(Updated with content from: )  I have changed memory modules in computers since 1992, but this is a puzzle I have not managed to crack: Why does a NT2GC64B8HCONS-BE work in a Lenovo T410, but these will not:   KVR16S11S8/4 KTL-TP3CS/4G HMT451S6AFR8A-PB   When I boot the machine, it very shortly crashes after boot. The machine is known to support 2x4GB RAM, and all 4 tested modules are known good (they work in other systems flawlessly).  I thought it might be a voltage problem, but:   NT2GC64B8HCONS-BE: 1.5V KVR16S11S8/4: 1.5V KTL-TP3CS/4G: 1.5V HMT451S6AFR8A-PB: 1.35V   So that is not the problem. Also 1.35V should be backwards compatible .   is a pretty good resource, but it does not go into what features are backwards compatible and which features are not. E.g. RAM frequency will be negotiated to be the highest supported by both computer and RAM according to  It also does not cover how to tell what density a given DIMM has and how to tell if this is supported by the computer.  But the answer is decent template for the known features so far of NT2GC64B8HCONS-BE:   Memory technology: DDR3 CAS latency: ? (Isn't this part of timings below?) Voltage: 1.5V (1.35V is backwards compatible) Timings: ? RAM frequency: Backwards compatible (1600 MHz RAM will work with 1066 MHz controllers and vice versa) RAM density: This  shows exactly the same behaviour on exactly the same machine. So this leads me to believe RAM density could be the issue. The HMT451S6AFR8A-PB has 8 chips and says 1Rx8, while NT2GC64B8HCONS-BE has 16 chips and says 2Rx8.   And T410:   RAM controller: Supports 4G DIMMs Chipset technology: ?   What feature does NT2GC64B8HCONS-BE have, that the other three don’t? And how can I tell if other 4G modules will be compatible?

I'm looking at rather short QVL lists from manufacturers, and I'm wondering what is the underlying cause of RAM incompatibility aside from the obvious: Obvious Reasons for Incompatibility  RAM Generation (DDR, DDR2, DDR3, DDR4) Form Factor / pin count RAM Type (ECC vs Non-ECC, Registered vs not, Buffered vs not) Minimum speeds on a board that cannot adjust the memory frequency Non-standard voltage range on a board that cannot adjust the memory voltage Channel count (single vs dual vs quad) Bad or inoperable module Mismatched set  Not Obvious Reasons  Brand SKU Max Capacity Speed too high  As in, why can't motherboard manufacturers just list the specifications of the RAM they will accommodate, and support every memory chip of that category instead of listing specific SKUs from specific brands? What happens electrically/physically that causes boards to fail to POST / operate with RAM that is otherwise 'compatible' with all of the specifications of RAM that is on the QVL?


My recent question on Stack Overflow was made a community wiki and was closed by some people.  Is it possible to delete that question?  I really want to do it. Would appreciate if somebody helps me out.

What circumstances can cause a question or answer to be deleted, and what does that actually mean?    How can a post be deleted? When can't I delete my own post? Can I still see my post even after it's deleted? Can I see a list of my deleted posts? How can I undelete one of my posts? What does deletion mean for a post? How do votes to delete work? What are the criteria for deletion? What else should I know about deleted posts? If I flag my question with a request to delete it, what will happen?       For more information, see the articles about  and  in the .


Here is my code: public static void numberToWords(int number){     int lastDigit;      if(number < 0){         System.out.println("Invalid Value");     }     while(number != 0) {         lastDigit = number % 10; // lastDigit = 3         number = number / 10;         reverse(number);          if (lastDigit == 0) {             System.out.println("ZERO");         }         if (lastDigit == 1) {             System.out.println("ONE");         }         if (lastDigit == 2) {             System.out.println("TWO");         }         if (lastDigit == 3) {             System.out.println("THREE");         }         if (lastDigit == 4) {             System.out.println("FOUR");         }         if (lastDigit == 5) {             System.out.println("FIVE");         }         if (lastDigit == 6) {             System.out.println("SIX");         }         if (lastDigit == 7) {             System.out.println("SEVEN");         }         if (lastDigit == 8) {             System.out.println("EIGHT");         }         if (lastDigit == 9) {             System.out.println("NINE");         }     } }  public static void reverse(int a){     int finalDigit = 0;     int reverse1 = 0;      while(a > 0) {         finalDigit = a % 10;         reverse1 = reverse1 * 10 + finalDigit;         a = a / 10;     } }  My digits are printed as strings as desired, but they come in reverse order. I tried to add the reverse method into the conversion method but the results are always the same, can't figure out how to reverse it.

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


For inserting values into a table, I need to read the last primary key value of that table and start my sequence from there. But I get an error.  My query is as below:      CREATE SEQUENCE serial START(           SELECT cd.id + 1           FROM cd           ORDER BY cd.id DESC           LIMIT 1);      INSERT INTO cd(id, class)       SELECT (nextval('serial'), (                                    SELECT class_name                                     FROM another_table                                    WHERE some_condition                                  )       FROM cr  DROP SEQUENCE IF EXISTS serial;   And the error is as below:   ERROR:  syntax error at or near "(" LINE 1: CREATE SEQUENCE serial START( SELECT cd.id + 1 FROM cd   How can I get the last value of the primary key and start my sequence from there?  I'm not allowed to alter table design, so I can not define a sequence for the primary key of the table.

I ran into the problem that my primary key sequence is not in sync with my table rows.   That is, when I insert a new row I get a duplicate key error because the sequence implied in the serial datatype returns a number that already exists.  It seems to be caused by import/restores not maintaining the sequence properly.


A magnetic field could not be induced unless there is a time varying electric flux associated with the amperial loop under consideration. But a well known field exists around a current carrying conductor. Then how can we say that electric field is absent around the conductor.

Can a magnetic field be induced without an electric field? Because, as far as I know, a time varying electric field induces a magnetic field an vice versa.  But in the case of conductors carrying currennt, it doesn't seem that electric field varies with time, then how is a magnetic field induced?


I learned that if the kernel does not understand a parameter, it saves it and passes it to init when performing the user space start.  While e.g. in  or  you learn that  cat /proc/cmdline shows      Arguments passed to the Linux kernel at boot time   and sysctl --all     shows up all possible kernel parameters   ... they do not tell me which of the parameters are actually not processed by the kernel but passed along to init.  How can I check which parameters the kernel actually accepted and which are passed on? How can I display the parameters that were provided to init?  I guess it depends on the actual implementation of init (systemd, upstart, systemvinit)...

In the grub.conf configuration file I can specify command line parameters that the kernel will use, i.e.:  kernel /boot/kernel-3-2-1-gentoo root=/dev/sda1 vga=791   After booting a given kernel, is there a way to display the command line parameters that were passed to the kernel in the first place? I've found sysctl,  sysctl --all   but sysctl shows up all possible kernel parameters.


I am unable to understand the output of the below code  package beg;  import java.util.*; import java.io.*; public class Hell {     public static void main(String[] args)     {         System.out.println(10+010); //Prints 18         System.out.println(010+010); //Prints 16         System.out.println(010+10); //Prints 18     } }   Can somebody please explain?

This prints 83  System.out.println(0123)   However this prints 123  System.out.println(123)   Why does it work that way?


Can we use hashing function in CTR mode as a cipher? And our key could be a random initialization vector. Are there any practical problems with that idea, that we don't do this?

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.


What is the grammatical term for watering down a phrase so it makes it non-offensive? For example, rather than 'rape' a newspaper may print 'assaulted' they wont use the offensive details but what is this technique called in English?

A euphemism is a word used to replace another worse sounding word. For example, 'pass away' for 'die', 'battle fatigue' for 'shell shock', 'PTSD' for 'battle fatigue', often a word created to replace a taboo word.  A dysphemism is a bit of the opposite, a synonym that sounds -worse- than the original, for example 'boneyard' for 'graveyard'.   But there are other directions to take in creating synonyms. Medicalese tends to euphemize to make things palatable, but often there are medical synonyms where the process seems to be more obfuscation or obscurantism than euphemism. For example, 'urinate' is a perfectly neutral technical term, but it is not uncommon to see or hear the (exact) synonym 'micturate'. Unless I am misreading, there is no euphemizing going on, just hiding through a more obscure word.  What would the process/describing word be for synonyms that are in another register, colloquial vs. formal (though naturally there is a lot of overlap here with euphemisim/dysphemism)?  So what I am looking for are synonyms for euphemism, that go in different directions than just good/bad.


I have just installed Linux in my laptop and it works fine but there is a problem , the installation i have made in the c directory so it has formatted and install but the others partition like E directory, i have my folders but i can't create or delete any folder within it .

I'm not sure what has happened, but I've all of a sudden lost write access to any of my NTFS external drives.   I installed a few games and apps from the software center, and now I can't make new folders or copy and paste files to anything that is NTFS. Everything is now read only, and I've tried so many things to fix it, but it seems hopeless.  Just to check if it wasn't the drives themselves, I made a little ntfs formatted truecrypt volume, and a fat formatted volume. And yes, it seems that Ubuntu is blocking me from writing anything to NTFS.   What happened here?  Whats a way I can simply get write access to my NTFS drives, so I can just backup all my stuff.  I'll probably reinstall Ubuntu. Please help.    UPDATE (and thanks everyone for their quick replies)  The problem has been solved.  Prior to noticing that I had lost NTFS write permission, I had installed GParted from the software center, and there was an extension called ntfsprogs that came with it.  During my search for a solution to the problem, I uninstalled GParted (as that was one of the apps I installed just before the problem). But that did not solve the problem.  I came across an app called 'NTFS Configuration Tool'. When I installed this, it said that the ntfsprogs extension needed to be removed (so I guess uninstalling GPARTED, didn't remove the ntfsprog extension).  I launched the NTFS Configuration Tool and now I have write access to NTFS drives. Unfortunately, I didn't check if I had write permission prior to launching the NTFS Configuration Tool, so I'm not sure whether the NTFS Configuration Tool, or the un-installation of ntfsprog gave me back NTFS write permission.   Hopefully if another newbee encounters this problem, they'll come across this page and know what to do.


Using tikz. I have an isosceles triangle ABC. BC forms the basis with the distances AC = AB. The two base angles are of the same size.  \begin{tikzpicture};     \draw[thick] (0,0) coordinate (B) -- (65:8cm) coordinate (A) -- ++(65+50:-8cm) coordinate (C) -- cycle;  \tkzLabelPoint[above](A){$A$} \tkzLabelPoint[left](B){$B$} \tkzLabelPoint[right](C){$C$}  \draw[thick] (B) -- (20:6.2cm) coordinate (D); \tkzLabelPoint[right](D){$D$};   \tkzMarkAngle[size=0.8cm,color=red](B,D,C);  \tkzLabelAngle[pos = 0.5, font=\scriptsize](B,D,C){$90^{\circ}$};  \end{tikzpicture}   How do I calculate the Perpendicular from AC to B? I want that the 90° label is true and I need the coordinates where the Perpendicular meets AC.

How to draw a perpendicular line from "P" to segment "AB"?    Here is the code:  \documentclass{standalone} \usepackage[utf8]{inputenc} \usepackage{tikz,tkz-euclide,xcolor,graphicx} \usetkzobj{all}  \begin{document} \tikz{ \coordinate(A)at(0,0); \coordinate(B)at(5,0); \coordinate(P)at(3.7896542,3);  \draw[thick](A)--(B);  \tkzDrawPoint[color=red](A)  \tkzLabelPoint[below=2pt](A){$A$} \tkzDrawPoint[color=red](B)  \tkzLabelPoint[below=2pt](B){$B$}   \tkzDrawPoint[fill=yellow](P)  \tkzLabelPoint[above=2pt](P){$P$} }  \end{document}


Is it possible to add Contents, List of Figures into TOC?

Is it possible to create a list of all the figures at the end of a document (this I can do) and make it appear in the table of contents?  So in the the table of content there will be a line saying List of figures ... 19 for example?


Well the question may seem obvious but I can't really find a proper answer to this. Mathematics all seem kind of difficult to understand so please help. I believe it is a quantity. Thanks in advance.i am mainly confused about using numbers and using numbers with units.the second one makes sense but i cant understand the first one

We've just been learning about complex numbers in class, and I don't really see why they're called numbers.  Originally, a number used to be a means of counting (natural numbers).  Then we extend these numbers to instances of owing other people money for instance (integers).  After that, we consider fractions when we need to split things like 2 pizzas between three people.  We then (skipping the algebraic numbers for the purposes of practicality), we use the real numbers to describe any length; e.g. the length of a diagonal of a unit square.  But this is when our original definition of a number fails to make sense- when we consider complex numbers, which brings me to my main question: what is a rigorous definition of 'number'?  Wikipedia claims that "A number is a mathematical object used to count, label, and measure", but this definition fails to make sense after we extend $\mathbb{R}$.     Does anyone know of any definition of number that can be generalised to complex numbers as well (and even higher order number systems like the quaternions)?


I am running ubuntu 14.04 on an Acer aspire netbook all was going well until the latest updates. Now my wireless connection is very unstable and I have just gone to download K3b writing software from the ubuntu software centre and i keep getting an error saying   Failed to download package files  check your internet connection  Failed to fetch http://gb.archive.ubuntu.com/ubuntu/pool/universe/libq/libqapt/libqapt2_2.1.70-0ubuntu4.1_i386.deb 404  Not Found [IP: 91.189.92.200 80] Failed to fetch http://gb.archive.ubuntu.com/ubuntu/pool/universe/libq/libqapt/libqapt2-runtime_2.1.70-0ubuntu4.1_i386.deb 404  Not Found [IP: 91.189.92.200 80] Failed to fetch http://gb.archive.ubuntu.com/ubuntu/pool/universe/libq/libqapt/qapt-batch_2.1.70-0ubuntu4.1_i386.deb 404  Not Found [IP: 91.189.92.200 80]   I clearly have an internet connection  thanks in advance

PPA seems to be constantly offline. Whenever I use sudo apt-get update, this error is shown:  W: Failed to fetch http://ppa.launchpad.net/ 404  Not Found   How do I fix these errors?


Below is part of the code with the array I am talking about. It is a 2D list. My only knowledge of 2D list accessing is to reference each index, such as list[0][0] would give you the first item in the list. This line "img[0: lengthList[i], widthList[i]: widthList[i+1]] = outPut" has a lot of colons in it. what does the "0:" part mean? What does "widthList[i]: widthList[i+1]" mean? When I try looking up more advanced array concepts in python I just get tutorials for things I already know how to do. Here an example where that list is being used. img = np.zeros((length, width), np.float32)  for i in range(len(images)):    output = np.zeros(images[i].shape)    output = normalize(images[i])     img[0: lengthList[i], widthList[i]: widthList[i+1]] = outPut

I need a good explanation (references are a plus) on Python's slice notation.   To me, this notation needs a bit of picking up.   It looks extremely powerful, but I haven't quite got my head around it.


I've got 4 positive integers, a,b,c,d which sum up to 63. The question asks for the maximum value of ab+bc+cd, but I don't get how to do it. I can't find an algebraic method, I can only use trial and improvement. Is there any better method I can use? [This is a clarification of my previous question.]

If $a,b,c,d$ are positive integers with    $$a+b+c+d=63,$$   what is the maximum value of $$ab+bc+cd?$$   I treated this as an optimization problem and tried to solve it but I did not make any progress.


I have a class the returns the set of records based on lastmodified date. So how to write a test class and test the results of that class ..  In a test class, If I instantiate a class and call the method then it covers me 100%. But when I try to verify the results it doesn't  return me any records   public with sharing class UnclaimCases {     public list<case> caseami {get;set;}     public string strhours = Label.DateFilter; // custom label stores values in hours      public integer hours = integer.valueof(strhours);     Datetime currenttime = system.now();     datetime  acttime  = currenttime.addhours(-hours);     public final static Id custid = Schema.SObjectType.case.getRecordTypeInfosByName().get('Support').getRecordTypeId();         public UnclaimCases()     {       caseami = [Select CaseNumber,Priority,Response_Due_Date__c,Response_time_elapsed__c from case where RecordTypeID =:custid AND (Status = 'Unclaimed' OR Status ='Escalated' ) AND Product_Type__c = 'A' AND Owner.Name = 'T Queue' AND LastModifiedDate >: acttime  AND LastModifiedDate < : currenttime  ORDER BY Priority  LIMIT 10000 ];     }      public pagereference inc()      {          Datetime currenttimeami = system.now();          datetime  acttimeami  = currenttime.addhours(-hours);          caseami = [Select CaseNumber,Priority,Response_Due_Date__c,Response_time_elapsed__c from case where RecordTypeID =:custid AND (Status = 'Unclaimed' OR Status ='Escalated' ) AND Product_Type__c = 'A' AND Owner.Name = 'T Queue' AND LastModifiedDate >: acttimeami  AND LastModifiedDate <: currenttimeami ORDER BY Priority LIMIT 10000 ];          system.debug('caseami' + caseami );          system.debug(' current datetime value ' + currenttimeami );          system.debug(' act datetime value ' + acttimeami );         return null;     }   }   #Test class   @isTest public class TestUnclaimCases  {      @isTest static void Unclamethod()         {              Id queueId =[select Id from Group where Name = 'T Queue' and Type = 'Queue'].Id;              Id custid = Schema.SObjectType.case.getRecordTypeInfosByName().get('Support').getRecordTypeId();               case c1 = new case(RecordTypeId = custid, Status = 'Unclaimed', Product_Type__c = 'A',Priority = 'SEV 1' , ownerid=queueId);               insert c1;     datetime delay1 = datetime.now.addhours(-2);           Test.setcreateddate(c1,delay1);             case c2 = new case(RecordTypeId = custid, Status = 'Rep On Site', Product_Type__c = 'A',Priority = 'SEV 2' , ownerid=queueId);            insert c2;   datetime delay2 = datetime.now.addhours(-2);           Test.setcreateddate(c2,delay2);             case c3 = new case(RecordTypeId = custid, Status = 'Escalated', Product_Type__c = 'A',Priority = 'SEV 2' );             insert c3;           datetime delay3 = datetime.now.addhours(-2);           Test.setcreateddate(c3,delay3);              UnclaimCases uc = new UnclaimCases();             uc.inc();             //list<case> fuc.caseami;             system.assertEquals(2,uc.caseami.size());           }     }

An example of the problem would be trying to test a trigger on a case which will fire on update, and look for time differences between when a case was created and now. Ideally in the unit tests I want to create a case with a CreatedDate in the past. The problem here is that CreatedDate is an audit field and not writeable[1]. Is there a standard work around to this problem?  [1] I know you can get audit fields turned on to be writeable temporarily when doing data migration. This is not a viable solution for every time you want to get your code coverage up for deployment.


I have a sample input file called in with the following contents:  m@m-X555LJ:~/wtfdir$ cat in asdf1 jkl1 asdf2 jkl2 asdf3 jkl3   I now execute:  m@m-X555LJ:~/wtfdir$ mapfile < ./in   As expected, the variable MAPFILE is now an array that breaks the file in into lines:  m@m-X555LJ:~/wtfdir$ echo ${MAPFILE[0]} asdf1 jkl1 m@m-X555LJ:~/wtfdir$ echo ${MAPFILE[1]} asdf2 jkl2   So now I want to break the first line into words. AFAIK read -a arrname reads a line from standard input, breaks it into words and stores the result in an array called arrname. So I type:  m@m-X555LJ:~/wtfdir$ echo ${MAPFILE[0]} | read -a words   In my mental model, this is what should happen: echo ${MAPFILE[0]} echoes the first row of MAPFILE (that is, asdf1 jkl1) into standard output, but this is piped into standard input of read -a words, so read should read this line and split it into words and store the result in an array called words.  Yet sadly, this doesn't happen:  m@m-X555LJ:~/wtfdir$ echo ${words[0]}  m@m-X555LJ:~/wtfdir$   Yep. echo ${words[0]} prints nothing, while I was hoping it would print asdf1.  Why does it happen? And where is my mistake? And how to make it work?

Why do I get different values for $x from the snippets below?  #!/bin/bash  x=1 echo fred > junk ; while read var ; do x=55 ; done < junk echo x=$x  #    x=55 .. I'd expect this result  x=1 cat junk | while read var ; do x=55 ; done echo x=$x  #    x=1 .. but why?  x=1 echo fred | while read var ; do x=55 ; done echo x=$x  #    x=1  .. but why?


I was working on a project and then i got stuck on this problem. I want to use 2 HDRI at once. One HDRI to affect the lighting of the scene while other to affect the background. I am using cycles to render.I know its not photoreal to do that but there are no much shiny parts in the scene so it shouldn't affect all that much. Is there any way to do this? Sorry,it says this question is already answered but the answer its suggesting does not help in my case. Any other Answer??

I have my scene perfectly lit without the use of a HDRI, however I would now like to add one just so I can have some world reflections in my glossy objects. I can't seem to get the HDRI reflecting in my objects without it also adding light to the scene, though. Is there any way to use an HDRI solely for reflections, and not have its light also affect the scene? I am using Cycles.  Thanks


I have an Asus laptop running Linux, and I let one of my younger siblings go on it. He went into the settings and turned on the zoom tool, but increased the screen brightness so it's completely white. Now I can't see anything on my screen and have no way to change it. How can I fix this?

I went to settings in my laptop which is running on Ubuntu and went to universal access. Then I clicked in zoom option and my laptop screen went full white.   What can I do now to fix this?


We have "$f'(x)>0$ in interval $I\implies f(x)$ strictly increasing in interval $I$". However, the converse is not true. A frequently cited example is the function $f(x)=x^3$, which is strictly increasing but $f'(0)=0$. Here comes my question:       What is the necessary and sufficient condition of $f'(x)$ to make $f(x)$ strictly increasing?    My guess is:       $f'(x)>0$ almost everywhere.     This is clearly a sufficient condition, as we can use Lebesgue integration and "drop the word 'almost'".    But is this a necessary condition? Is there a weaker condition? A full solution or a little hint will both be appreciated. Thank you in advance.

The following result is well known:     If $f$ is continuous on $[a, b]$, differentiable on $(a, b)$ and $f'$ is non-zero on $(a, b)$ then $f$ is strictly monotone on $[a, b]$.   However if the derivative vanishes at a finite number of points in $(a, b)$ and apart from these derivative maintains a constant sign in $(a, b)$ then also the function is strictly monotone on $[a, b]$ (just split the interval into finite number of intervals using these points where derivative vanishes and $f$ is strictly monotone in same direction in each of these intervals).     Let's suppose now that $f$ is strictly monotone and continuous in $[a, b]$ and differentiable in $(a, b)$. What can we say about set of points $$A = \{x \mid x \in (a, b), f'(x) = 0\}$$ Can it be infinite? Can it be uncountable? How large the set $A$ can be?


Not looking for “The Tunnel Ahead” by Alice Glaser. The 60's short story I’m looking for is about a single man who uses his car, with no steering wheel or pedals, to go on a picnic. On the way home the car takes him through a tunnel. Doors close and the occupants are liquefied.

In this story, the main character enters his autonomous car (no steering wheel or pedals), which takes him out of the city to a picnic ground. After a pleasant afternoon, the car takes him back to the city, but travels through a tunnel. The tunnel entrances close. When the entrances open the cars exit, empty, clean, and slightly damp. This is the means of population control - car occupants have been liquefied and flushed away.


Live site-   This page contains Portugage language, a lot of Character disappear on that page. There are a lot of symbols when it goes to portuguese translation (eg: Ã³s fazemos os serviÃ§os)..  Real word- "Sinalização" but on my website is show "SinalizaÃ§Ã£o".  Any idea how to fix that issue.

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


What is the maximum value of $\prod^n_{r=1 }\cos a_r$ under the restriction $0\le a_1,a_2,\ldots,a_n \le\frac{\pi}{2}$ and $\prod^n_{r=1}\cot a_r = 1$?   This question I could not actually think of any way on how to solve it because I will not think of any function on which I could apply Jensen's Theorem or any AM -GM inequality. Or any function whose derivative I could equate to zero to get the desired result. Please help , how to solve these type of questions.

Maximum value of $\cos \alpha_{1}\cdot \cos \alpha_{2}\cdot \cos \alpha_{3}\cdot \cos \alpha_{4}....\cos \alpha_{n}.$ If it is given that   $\cot \alpha_{1}\cdot \cot \alpha_{2}\cdot \cot \alpha_{3}.......\cot \alpha_{n}  = 1$ and $\displaystyle 0 \leq \alpha_{1},\alpha_{2},\alpha_{3},.......,\alpha_{n}\leq \frac{\pi}{2}.$  $\bf{My\; Try::}$ Using $\bf{A.M\geq G.M}$ $$\displaystyle \frac{\sin^2 \alpha_{1}+\sin^2 \alpha_{2}+\sin^2 \alpha_{3}+........+\sin^2 \alpha_{n}}{n}\geq \sqrt[n]{\sin^2 \alpha_{1}\cdot \sin^2 \alpha_{2}...\sin^2 \alpha_{n}}$$ So we get $$\displaystyle \sin^2 \alpha_{1}+\sin^2 \alpha_{2}+\sin^2 \alpha_{3}+........+\sin^2 \alpha_{n}\geq n\cdot \sqrt[n]{\sin^2 \alpha_{1}\cdot \sin^2 \alpha_{2}...\sin^2 \alpha_{n}}.......(1)$$ Similarly $$\displaystyle \frac{\cos^2 \alpha_{1}+\cos^2 \alpha_{2}+\cos^2 \alpha_{3}+........+\cos^2 \alpha_{n}}{n}\geq \sqrt[n]{\cos^2 \alpha_{1}\cdot \cos^2 \alpha_{2}...\cos^2 \alpha_{n}}$$ So we get $$\displaystyle \cos^2 \alpha_{1}+\cos^2 \alpha_{2}+\cos^2 \alpha_{3}+........+\cos^2 \alpha_{n}\geq n\cdot \sqrt[n]{\cos^2 \alpha_{1}\cdot \cos^2 \alpha_{2}...\cos^2 \alpha_{n}}.......(2)$$ Now Adding $(1)$ and $(2)\;,$ We get $$n\geq 2n\cdot \sqrt[n]{\cos^2 \alpha_{1}\cdot \cos^2 \alpha_{2}...\cos^2 \alpha_{n}}$$ Because above it is given that $$\sin \alpha_{1}\cdot \sin\alpha_{2}\cdot\sin \alpha_{3}.........\sin\alpha_{n}=\cos\alpha_{1} \cdot\cos\alpha_{2}\cdot \sin\alpha_{3}......\cos\alpha_{n}$$ So we get $$\displaystyle \cos \alpha_{1}\cdot \cos \alpha_{2}\cdot \cos \alpha_{3}\cdot \cos \alpha_{4}....\cos \alpha_{n}\leq \frac{1}{2^{\frac{n}{2}}}$$ My question is that can we solve it using any other short method? If yes then please explain it here. Thanks.


Can anyone solve this problem ?   I could not find any relation between terms of sequence.  So what is nth term of bn ? Can we evaluate an without finding bn ? Please help

I've been asked to show that $x_n \rightarrow L$ as $n \rightarrow \infty$ where $x_n = F_{n+1}/F_{n}$ for $n \in \mathbb{Z}^+$, where $F_n$ denotes the $n^{th}$ Fibonacci number. I am supposed to use this and the fact that $1/x_n \rightarrow 1/L$ as $n \rightarrow \infty$ to prove that $L$ is the golden ratio. I'm not sure how to go about computing this. Should I use the standard $|x_n -L| < \epsilon$ proof? That doesn't seem to get me anywhere when I try it.


I have a phone attached to my laptop using an USB so that it shares the internet connection over the wire without using Wi-Fi hotspot (it draws a lot of power). But it draws a lot of power from the laptop battery by an undesired charging.  I'd like to find out a way to let the kernel tell the USB chip to restrict the amperage towards the connected device so that the phone doesn't draw any power at all, but solely communicate the internet connection.  I've read the , but unfortunately found nothing I can use.   Is it even possible? If not, than what is the catch?

...or, how not to charge my phone when I'm using it as a GSM modem in USB tether mode?  I can use it as WiFi tether modem, but it wastes battery both of the netbook it supplies connectivity to, and on the phone side. In USB tether mode I would avoid the power-hungry WiFi connection, but instead the phone wrecks the netbook battery by charging from it. I'd like to be able to maintain the data connection while disabling or restricting the current fed over the power lines; let the phone and the netbook use their own batteries without draining each other.  I'm using Kubuntu 14.10 but any system solution is okay, I'm sure I'd be able to adapt it. Even hardware solutions would be okay - cut the power line in the USB cable or solder a large resistor in maybe? Would that work?


Let $R$ be the set the contains all equivalence relations over $\mathbb{N}$.  Prove that $\left | R \right | = 2^{\aleph_0}$  This question is very counter - intuitive to me. I know that Each $R_i \subseteq \mathbb{N}\times \mathbb{N}$ but that still that doesn't give me any intuition on why $\left | R \right | = 2^{\aleph_0}$, because $\left | \mathbb{N}\times \mathbb{N} \right | = \aleph_0$

I asked a similar question yesterday about well ordered sets, now I am having troubles with equivalence relations.   Could someone suggest an injection from a well known set of cardinality $2^{\aleph_{0}}$ to the set of all equivalence relations of $\mathbb{N}$?  Many thanks in advance!


\documentclass{article} \usepackage{amsmath} \begin{document} \begin{equation*}   X_i =    \begin{cases}     \left[\begin{smallmatrix}       0 \\ 1 \\ 2     \end{smallmatrix}\right]     &     \text{if $i$ is even;}     \\     \left[\begin{smallmatrix}       2 \\ 1 \\ 0     \end{smallmatrix}\right]     &     \text{otherwise.}   \end{cases} \end{equation*} \end{document}   This is the LaTeX code that I wrote based on a cases environment. There's no space between the matrices on the right. What's the best way to add some vertical spaces to separate them?    p.s. This is a simplified form of my original writing, so I cannot just accept suggestions like 'use a matrix transpose to transform the column vector into a row vector.'

I have this case formula which I need to make a little more readable by adding a little more space, vertically, between the two cases.  \begin{cases} f = -\frac {w_1*m + w_2*\frac{-d}{d_M} + w_3*\frac{r}{N} + w_4*s}{w_1+w_2+w_3+w_4} &\hbox{when }m \geq t \\ f = -\frac {w_1*m + 5*w_2*\frac{-d}{d_M} + w_3*\frac{r}{N} + w_4*s}{w_1+w_2+w_3+w_4} & \hbox{when } m< t \end{cases}     How to add an extra space in the latex case above?


$dx=\frac {dx}{dt}dt $. I know that this deduction is obvious from the chain rule, given that we treat our dx and dt as just numbers. But I find it quite unsatisfactory to think of it in that sense. Is there a better / more "calculus-inclined" way of thinking about this equality. Can you please explain both the LHS and RHS individually.

In the book Thomas's Calculus (11th edition) it is mentioned (Section 3.8 pg 225) that the derivative $dy/dx$ is not a ratio. Couldn't it be interpreted as a ratio, because according to the formula $dy = f'(x)dx$ we are able to plug in values for $dx$ and calculate a $dy$ (differential). Then if we rearrange we get $dy/dx$ which could be seen as a ratio.   I wonder if the author says this because $dx$ is an independent variable, and $dy$ is a dependent variable, for $dy/dx$ to be a ratio both variables need to be independent.. maybe?


I don't understand why they are not pronounced the same since they are written the same way?

The word "baked" is pronounced as:      /ˈbeɪkt/   While "naked" is pronounced as:      /ˈneɪkɪd/   Why are these two words not pronounced the same?


I have installed apache2 web server on my PC, after installation I started the server and used it for couple of days. But now when I need to work with it I was not being able to start the server. I didn't add anything on my .conf files. I used this command: sudo /etc/init.d/apache2 start  # or  sudo systemctl start apache2  But nothing works. After executing sudo systemctl status apache2.conf  it shows the following error: Jul 19 12:58:56 nasirul-H81M-D2V systemd[1]: Starting The Apache HTTP Server... Jul 19 12:58:56 nasirul-H81M-D2V apachectl[21219]: (2)No such file or directory: AH02291: Cannot access directory '/var/log/apache2/' for main error log Jul 19 12:58:56 nasirul-H81M-D2V apachectl[21219]: (2)No such file or directory: AH02291: Cannot access directory '/var/log/apache2/' for error log of vhost defined at /> Jul 19 12:58:56 nasirul-H81M-D2V apachectl[21219]: AH00014: Configuration check failed Jul 19 12:58:56 nasirul-H81M-D2V apachectl[21202]: Action 'start' failed. Jul 19 12:58:56 nasirul-H81M-D2V apachectl[21202]: The Apache error log may have more information. Jul 19 12:58:56 nasirul-H81M-D2V systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE Jul 19 12:58:56 nasirul-H81M-D2V systemd[1]: apache2.service: Failed with result 'exit-code'. Jul 19 12:58:56 nasirul-H81M-D2V systemd[1]: Failed to start The Apache HTTP Server.  Mainly it shows that configuration failed But how to do it? I have updated the apache2.conf file on /etc/apache2/apache2.conf directory added ServerName localhost  ServerRoot "/etc/apache2"  Under the Global Configuration, but nothing can prevent the error. After doing the apache2ctl configtest on apache2 directory this shows (2)No such file or directory: AH02291: Cannot access directory '/var/log/apache2/' for main error log (2)No such file or directory: AH02291: Cannot access directory '/var/log/apache2/' for error log of vhost defined at /etc/apache2/sites-enabled/000-default.conf:2 AH00014: Configuration check failed Action 'configtest' failed. The Apache error log may have more information.  How to solve this error?

When I run sudo service apache2 start I get this error:  Job for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details.   And when I run systemctl status apache2.service I get this:  ● apache2.service - The Apache HTTP Server    Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)    Active: failed (Result: exit-code) since Tue 2019-01-15 16:20:26 -03; 7min ago   Process: 8101 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)  ene 15 16:20:26 pc systemd[1]: Starting The Apache HTTP Server... ene 15 16:20:26 pc apachectl[8101]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1.  ene 15 16:20:26 pc apachectl[8101]: (2)No such file or directory: AH02291: Cannot access directory '/var/log/apache2/' for main error log ene 15 16:20:26 pc apachectl[8101]: (2)No such file or directory: AH02291: Cannot access directory '/var/log/apache2/' for error log of vhost  ene 15 16:20:26 pc apachectl[8101]: AH00014: Configuration check failed ene 15 16:20:26 pc apachectl[8101]: Action 'start' failed. ene 15 16:20:26 pc apachectl[8101]: The Apache error log may have more information. ene 15 16:20:26 pc systemd[1]: apache2.service: Control process exited, code=exited status=1 ene 15 16:20:26 pc systemd[1]: apache2.service: Failed with result 'exit-code'. ene 15 16:20:26 pc systemd[1]: Failed to start The Apache HTTP Server.   What can I do about this?


Sorry I haven't figured out how to properly write up questions on this yet. I have to get the limit as $x$ goes to $1$, of the function $- (x-1)/\log(x)$ without using L’Hospital’s rule, any suggestions?

$$\lim_{x\to 0} \frac{\ln(1+x)}x$$  The process I  want to take to solving this is by using the definition of the limit, but I am getting confused. ( without l'hopitals rule)   $$\lim_{h \to 0} \frac{f(x+h) - f(x)}h$$  $$\lim_{h \to 0} \frac{\frac{\ln (1+x+h)}{x+h} - \frac{\ln(1+x)}x}h$$  $$\lim_{h \to 0} \frac{x\ln(1+x+h) - (x+h)\ln (1+x)}{hx(x+h))}$$  At this point I get confused because I know the answer is $1$, but I am not getting this answer through simplification of my formula.


I'm using  online textbook to learn group theory. For one of the exercises, I'm supposed to list all of the elements of $D_5$. I understand that I have to find all the products of $r$ and $s$, where $$ r^n = 1$$ $$ s^2 = 1$$ $$ srs = r^{-1}$$ And I also know that there are $2 \times 5=10$ such elements in total. My guess is that some of these elements are (12345) (13524) (14253) (15432) and (1), stemming from the first rule. But I'm not exactly sure how to get the other elements from the two remaining rules. Any help on this would be highly appreciated!

Since each symmetry can be thought of as a permutation of the vertices, the elements of $D_n$ can be thought of as elements of $S_n$. So I'm wondering if there's a systematic way that we can always write elements of $D_n$ in disjoint cycle notation?


I am not sure is there a setting to make all the font style the same especially for my URL Link in my Bibliograph  I am not sure how can I post my who MWE which is quite a large file.    Below is the code:   \pagestyle{fancy} \pagenumbering{roman} \setcounter{page}{2} \doublespacing   Is there a way to force all font style the same in my Bibliography?

I'm having troubles while using the url command in my bibliography.  I mean:  1) \bibitem{[8]} {\url{http://projects.webappsec.org/w/page/13246989/Web20Application20Security20Statistics\#Tableofcontent}}  2) \bibitem{[5]} Justin~Clarke ``SQL Injection Attacks and Defense'', Syngress Publishing, Inc.2009   Unfortunately font 1) is different from 2).  What should I do in oder to get the same font for both items?   I'd like the font used in 1)  to be identical to the one displayed in 2)


Some screenshots in our help center have been outdated. For example, :    It's still using old site design. Nerds at  may love it, but most other users don't. Please replace them with screenshots taken at current sites.  However, please keep those !

Most of the screenshots on privileges pages are outdated. Shouldn't they be replaced with screenshots of the new design?    Example 1: :  Current Image    Updated Image      Example 2:   Current Image    Updated Image      There are many other screenshots that are also outdated.


when i enter the command:  sudo apt-get install libboost-all-dev libx11-dev libx11-dev:i386 libxtst-dev libconfig++-dev build-essential qt5-default   i get this:  Reading package lists... Done Building dependency tree        Reading state information... Done build-essential is already the newest version (12.4ubuntu1). libx11-dev is already the newest version (2:1.6.4-3). 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:  libboost-all-dev : Depends: libboost-iostreams-dev but it is not going to be installed                     Depends: libboost-mpi-dev but it is not going to be installed                     Depends: libboost-mpi-python-dev but it is not going to be installed                     Depends: libboost-regex-dev but it is not going to be installed  libxtst-dev : Depends: libxext-dev but it is not going to be installed                Depends: libxi-dev but it is not going to be installed  qt5-default : Depends: qtbase5-dev but it is not going to be installed E: Unable to correct problems, you have held broken packages.   how do i fix this?  RESULT OF APT-CACHE:  edit:all of the packages have missing dependencies

After upgrading from 10.04 to 12.04 I am trying to install different packages.  For instance ia32-libs and skype (4.0).  When trying to install these, I am getting the 'Unable to correct problems, you have held broken packages' error message.   Output of commands:  sudo apt-get install -f Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.   After running this:  sudo dpkg --configure -a foo@foo:~$ sudo apt-get install -f Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


I am using ubuntu 20.04 LTS on my hp-notebook ( i5-6th gen, 8GB RAM, 1GB AMD  Radeon graphics card). The snapd.services are causing my pc to boot slow (about 1 min 15 sec in userspace). Also, it takes about 15 sec from login screen to desktop. Is there any way to completely remove all snaps, snappy package manager and snap files and cache without breaking any other packages?

I just discovered that chromium will only be released as a snap package.  How can I continue to get chromium, without snap? Is this possible without building from source?  Notes:   Please let's keep to the question as stated - not "what do you have against snap?" I'm not asking how to remove snap (I realize that would break Ubuntu)... just how to use chromium as it is now, a deb.     Update  No, this is not a duplicate of that linked question. I don't need to know "why it's a snap". I want to know how to use it without snap.  Right now there is building from source, and some random PPA mentioned below. I hope someone can advise us of trustworthy alternatives.


If f is analytic in $|z| \leq1 $ and satisfies $ |f(z)| = 1$ on $|z| = 1$ prove that f is a rational function. I need a clue how to think about this? should i use the fact that f can be written as a power series?

Let $f$ be a meromorphic function on the open unit disk such that $f$ has a continuous extension to the boundary circle.Suppose $f$ has only poles in the open unit disc and suppose $|f(z)|=1$ for all $z$ with $|z|=1$.Prove that $f$ is a rational function.


I read the explanations of for...in and for...of but then faced this situation where in the same case they behave differently.    //case1 function avg(...args) {    var sum = 0;    for (let value of args) {      sum += value;     }     return sum / args.length; } console.log(avg(2,3,4,5));  //case2 const people = function(param1, param2, ...rest) {    console.log(param1);    console.log(param2);    for(let i in rest) {        console.log(rest[i]);    } } people('Foo', 'Bar', 'Catz', 'Dogz');     So, the ...args & ...rest are arrays (object) right? I think the case1 is correct and behave as it explained in many sources (e.g. )  What is their difference, why in case2 for...in works instead of for...of ?

I've been told not to use for...in with arrays in JavaScript. Why not?


Trying to add a NOT NULL constraint to a table with 1 billion rows. I cannot afford a table lock for more than a couple of seconds. Is there a way to prevent a full table scan during the alter table statement? I created an index on the column hoping it would be used but that doesn't seem to work. May be a check constraint? Other options? Thank you!

When adding NOT NULL columns with a DEFAULT value - does PostgreSQL optimize this operation?  In case the table has n rows, a not-optimized alter-table-add-column would yield n writes of the default value - which could be very painful, obviously. With the optimization the DB would instantaneously create the new column, store just one copy of the default value which would be returned when no non-default value is found for that column in a suitable index data structure.  For example  such an .


I am new to the Java programming. And I have the following doubt. See the below code. public class Main {     public static void main(String[] args) {         String s = "jithin";         changeFunction(s);         System.out.println(s);     }      public static void changeFunction(String s){         s = null;     } }  I know in java. Everything is call by value. But when we pass objects. It's reference is being passed to the method. So here we passed a String and dereferenced it to NULL. But in main it is  still printing "jithin". Why it is not printing null?

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


What are the charges of all the planets in our solar system and what are the charges of whole universe, solar system and milky way etc..

Do all planets have an electric charge?   If yes, is positive or negative?  And how much each magnitude?   I have read some articles which really confused me. Some of these articles said that all planets have a negative charge and the sun has a positive charge. Some other articles said the the exact opposite.


This is an excerpt from The Book of Mirdad, Mikhail Naimy  "For I, O monks, is the Creative word. And save you grasp thereof the magic power;  and save you be of that power the masters, you are too apt to groan when you would sing; or be at war, when you would be at peace; or cringe in gaols dark, when you would soar in light.  Your I is but your consciousness of being, silent and incorporeal, made vocal and corporeal. It is the inaudible in you made audible, and the invisible made visible that, seeing, you may see the un-seeable; and hearing, you may hear the unhearable. For eye-and ear-bound yet are you. And save you see with eyes, and save you hear with ears, you see and hear nothing at all. "  I am confused as to how to make sense of the use  "save you" in this context.  Although this is my interpretation, in the first paragraph, looks like "save" can be nearly approximated to "unless" and in the second paragraph "save you" behaves more like "even if".  Please help me resolve this.

Why does save also mean     other than : but or except "We had no hope save one."      except for the fact that :  only —used with that       but, except —used before a word often taken to be the subject of a clause       "Little is known about his early years save that he left home when he was very young."   This question is specifically about the origin/etymology of this particular meaning of the word.  Merriam-Webster just says      Middle English sauf, from Anglo-French salf, sauf, from Latin salvus safe, healthy; akin to Latin solidus solid, Greek holos whole, safe, Sanskrit sarva entire   I am able to connect solid or whole or entire with the common meaning of safe/save, but how is it connected with except/but/unless?  Supplementary question: is this usage of save now archaic? M-W doesn't say so, but I have never heard it used in a live speech.


My code works fine on one computer but the same code generates error code 5 (access denied) on another computer. Essentially ::OpenService() call fails because of the flag SERVICE_START because the user doesn't have privileges to start the service. I know because it does start the service if I start the app as administrator.  I want the same privileges on the 2nd computer so any user can start a service but can't figure out which settings is responsible for that. I looked into group policy >> Computer Configuration >> Windows Settings >> Security Settings >> Local Policies >> User Rights Assingment.  I don't know if I am even looking at the right place. Does anyone know?

I have following scenario:   I'm local admin on my computer with Windows 7 Enterprise and UAC enabled Computer is not in domain and is not under group policy I run some program without running it as administrator This program sometimes needs to control locally installed windows service (with Manual start options) Without running initial program as administrator or without disabling UAC controlling windows service fails.   How can I grant permissions to my account to control this particular service without running with elevated privileges or disabling UAC?


I use the following code to render the image from the template file. This code is used when the image name is known. Multiple images can be displayed by adding the same lines of code with different image names.   global $base_path; print "<img src='" . $base_path . path_to_theme() . "/../../../default/files/styles/thumbnail/public/xyz.jpg' width='100' height='100' />";   Is it possible to render the multiple images from the content type with the field name created but without changing anything in the template file every time we upload the image?

I need to print individual fields from the $content variable in node.tpl.php file in separate div tags. How do I do that and how do I find out what the field's names are?


At the WineHQ site I followed the first step to enable 32-bit architecture by entering this command sudo dpkg --add-architecture i386, but an error appeared. dpkg: error: configuration error: /etc/dpkg/dpkg.cfg.d/multiarch:1: unknown option 'foreign-architecture'

Always when I install something, I get the following error multiple times:     Unknown configuration key 'foreign-architecture' found in your 'dpkg'   configuration files.  This warning will become a hard error at a later   date, so please remove the offending configuration options and replace   them with 'dpkg --add-architecture' invocations at the command line.   When I try dpkg --add-architecture I get:  Unknown configuration key `foreign-architecture' found in your `dpkg' configuration files.  This warning will become a hard error at a later date, so please remove the offending configuration options and replace them with `dpkg --add-architecture' invocations at the command line.  dpkg: error: --add-architecture takes one argument  Type dpkg --help for help about installing and deinstalling packages [*]; Use `dselect' or `aptitude' for user-friendly package management; Type dpkg -Dhelp for a list of dpkg debug flag values; Type dpkg --force-help for a list of forcing options; Type dpkg-deb --help for help about manipulating *.deb files;  Options marked [*] produce a lot of output - pipe it through `less' or `more' !   I've no problems yet, but since it says This warning will become a hard error at a later date I better do something about this. When I search 'foreign-architecture', I find an empty file, containing not a single byte. I somehow can't delete that file.  Please help, it's a kind of creapy...  I use Ubuntu version 12.10  Updated the questions:  cat /etc/dpkg/dpkg.cfg  no-debsig  log /var/log/dpkg.log  ls /etc/dpkg/dpkg.cfg.d/ multiarch


Many a time and oft there is a real need for long sequences of code, especially stack traces or . This also happens in other SE sites, TEX being a . Unfortunately, these long code blocks can reduce the readability of the question, and let important non-code text ignored.  Do you think that adding a show\hide (or collapse\expand) button would be a good idea?  Addendum  My first idea was to have only a collapse\expand button, but reading the comments and  made me think that other functionality could be added:   Expand\Collapse Copy to clipboard Open in a new window Toggle line numbers on and off - simplifies referring to a specific line in an answer.    might be a good example.  UPDATE:  This is really annoying in Server Fault . The question itself virtually undetectable between all the long code snippets.

It would be great to have the option to fold code snippets, entire questions and answer posts on a user basis and allow defining some generic foldable regions within the question/answer editor.  Non generic folding info could be stored in cookies perhaps to move the storage/processing requirement to the client side.  Definable folding can take any free and safe HTML tag or other multi character trick (<>Fold this<>)


There are tons of textures on the web that provide different images for color/albedo, reflectivity, bump, normal maps, displacement maps, etc... Suitable for PBR shaders, for example.  I'd like to be able to paint on a mesh in 3D using stencil or clone such that all of the source layers get transferred to the appropriate destination layers subject to the UV map.  I.e. A single brush stroke transfers correctly transformed texture layers to my object.  Can Blender do this?  If not, are there any plugins for this?  I believe other programs (substance painter?) do this. But I'm hoping to stick with Blender for now?

Is there any way to paint onto a bump map and diffuse map at the same time, so that the strokes match up? Like a multi-layer brush that uses a greyscale texture for the bump layer and a color texture for the diffuse color?  Here's a rough sculpt to demonstrate what I'm imagining:    The GIF above shows how such a brush could be made. The black and white height map would be the displacement brush, transferring its greyscale data to the bump map texture and the green one would transfer its color data to the diffuse map texture.  The resulting brush images:      Making the brush is one thing, but is it possible to use such a brush?


In my country, when someone is sick, they might say they are keeping the bed from running away. That would mean, they feel so sick, they literally stay in the bed most of the day.   Is there an equivalent in English that depicts the humorous nature of this one?

Some conditions require that a person lie in bed all the time until recovered. Is there a name for such conditions or people experiencing them at the moment?   For example,      I am currently <bed sick> and can't help you with your homework.   I tried looking for bed sick but hit a dead end.


Does Ubuntu 15.10 or 15.04 work on a MacBook Pro 9,2, has anyone installed it successfully?

I've never supported Apple in any way, but I like their hardware. As I've just purchased and got working a nice Apple wireless keyboard (bought second-hand!), I'm curious about the possibility of buying a second-hand MacBook and installing Ubuntu on it.   What, of what's important, isn't working? Notably, I do Flash Player development from time to time, so I do at the very least need to get a 32-bit debug player installed. (I usually run 64-bit, so I'm familiar with having to tweak things to get it all working properly) I'd also need to be able to play DVDs with CSS, run Google Chrome, etc. Is it fairly similar in capabilities as a non-Apple computer as far as what I can use? It seems that there's a different architecture used, namely PowerPC, and I don't know what this means to me as an end-user.   Can anyone recommend me for or against installing Ubuntu on MacBookPro?


I want to fill textbox1 with string values     public  void CallToChildThread()     {         string test1 = "this is 1st";         string test2 = "this is 2nd";         string test3 = "this is 3rd";         textBox1.Text = test1;   //Cross-thread operation not valid         int sleepfor = 5000;         Thread.Sleep(sleepfor);        textBox1.Text = "Child Thread 1 Paused for {0} seconds '"+sleepfor/1000+"' ";         textBox1.Text = test3;         textBox1.Text = test4;         Thread.Sleep(sleepfor);         textBox1.Text = "Child Thread 2 Paused for {0} seconds '" + sleepfor / 1000 + "' ";         textBox1.Text = test5;     }     private Thread myThread = null;     private void button1_Click(object sender, EventArgs e)     {         this.myThread =      new Thread(new ThreadStart(this.CallToChildThread));         this.myThread.Start();     }   but at when thread start filling textbox with value it responded with error     Cross-thread operation not valid: Control 'textBox1' accessed from a thread >other than the thread it was created on.

Which is the simplest way to update a Label from another Thread?   I have a Form running on thread1, and from that I'm starting another thread (thread2).  While thread2 is processing some files I would like to update a Label on the Form with the current status of thread2's work.   How could I do that?


The following 12-character input causes TeX to go into a loop.  \def\x{\x}\x   It won't crash, it won't produce an error message, it'll just sit there for ever, trying to compile the document (but not getting anywhere because no matter how many times it expands \x, it just gets \x back again).  Is there a shorter input that confounds TeX in a similar way?

Various constructions can cause TeX (aka the lion) to go into an infinite loop. The simplest example is \def~{~}~, which defines ~ to expand to itself, then expands it. Now, if we exclude macro expansion, getting a loop is more difficult. With pure TeX, the two shortest methods I found (without macros) are  \everypar{\the\everypar}. \toksdef~0~{\the~}\the~.   (including the trailing dots); note that the second is not macro expansion, but the expansion of \the\toks0 in hiding. With eTeX, I got down to  \if\unexpanded\fi   which has the additional "quality" of being expandable. Here, \unexpanded could be replaced by \detokenize or \scantokens.   Why does that trigger an infinite loop? Is there a similarly short TeX constructions which does not use macro expansion (preferably only primitives)?


If you choose an answer to this question at random, then what is the chance you will be correct?  A) 25%  B) 50%  C) 60%  D) 25%  On internet you can find the problem .

I found this math "problem" on the internet, and I'm wondering if it has an answer:     Question: If you choose an answer to this question at random, what is the probability that you will be correct?      a. $25\%$      b. $50\%$      c. $0\%$      d. $25\%$   Does this question have a correct answer?


I have found some bug in the current implementation of Stack Overflow. Since there is no specific thing like "bug bounty" on Stack Exchange, I am framing it as a question on Meta.  Can I contact any of Stack Exchange members here and can get some kind of reward (if bug accepted)?

Does Stack Exchange contain any edit suggestion or bug submission system, or such type of discussion forum to inform SO or its administrators about suggestions and bug reports that relate to SO itself?


I have the following function: $$\frac{1}{2\beta} e^{\frac{-|x-a|}{\beta}} $$ where $\beta >0$ and $-\infty< \alpha < \infty$ and similarly $-\infty<x<\infty$ Here's how far I have reached: $$\int_{-\infty}^{\infty}\frac{1}{2\beta} e^{\frac{-|x-a|}{\beta}}e^{tx}dx$$ so we get: $$\int_{-\infty}^{\alpha}\frac{1}{2\beta} e^{\frac{x-a}{\beta}}e^{tx}dx +\int_{\alpha}^{\infty}\frac{1}{2\beta} e^{\frac{-(x-a)}{\beta}}e^{tx}dx $$ and now I'm stuck here... I tried using an online calculator to figure the integral out, the first term works; however, the second term seems to always diverge. Any suggestions?

Consider a random variable $X$ whose probability density function is given by $$f_{X}(x) = \frac{\lambda}{2}\exp(-\lambda|x-\mu|)\quad\text{for}\quad x\in\textbf{R}, \lambda > 0,\,\,\text{and}\,\,\mu\in\textbf{R}$$  Determine its moment generating function, $\textbf{E}(X)$ and $\textbf{Var}(X)$.  MY SOLUTION  According to the definition of moment generating function, we obtain the following result \begin{align*} M_{X}(t) & = \frac{\lambda}{2}\int_{-\infty}^{+\infty}e^{tx}\exp(-\lambda|x-\mu|)\mathrm{d}x = \frac{\lambda}{2}\int_{-\infty}^{+\infty}\exp(tx-\lambda|x-\mu|)\mathrm{d}x\\\\ & = \frac{\lambda}{2}\int_{-\infty}^{\mu}\exp(tx-\lambda(\mu -x))\mathrm{d}x + \frac{\lambda}{2}\int_{\mu}^{+\infty}\exp(tx-\lambda(x-\mu))\mathrm{d}x\\\\ & = \frac{\lambda}{2}\int_{-\infty}^{\mu}\exp((t+\lambda)x-\lambda\mu))\mathrm{d}x + \frac{\lambda}{2}\int_{\mu}^{+\infty}\exp((t-\lambda)x+\lambda\mu)\mathrm{d}x\\\\ \end{align*}  Then I get stuck. Could someone shed some light on the problem?


Is there a way to make pretty, colorful blockquotes in LateX     like this?   This might be a duplicate of , but I don't like the ugly gray blockquote which that produces.  I know that answer lets you choose different colors other than gray, but is there a way to add fancy borders     like this   or like on the other StackExchange websites (Math comes to mind for me).

How can I create a block quote enviroment with big quotation marks similar to the  of Wikipedia?  Additionally it would be nice to place  both quotation marks and quote in a colored box and to have the author closer to the citation.


Are  (ex. electron waves) real physical objects or just mathematical tools?. Some researchers say that they have proof that they are real objects. Here's [the link] ()  Does this mean that wave functions are real objects, after all?

It seems there is a new theorem that changes the rules of the game in the interpretational debate on QM:    Does this only leave Bohm,Everett and GRW as possible candidates?


I have a question. When navigating in page shorteners of dubious origin where there is too much advertising... And it automatically downloads a strange executable... and I immediately remove it (through the option of "Windows Explorer" that allows you to "Delete file Permanently" without going through the recycle bin) and I never run it. So... My pc got infected just by downloading that strange executable? Or do I need to run the file to get infected? Thanks in advance

I have been reading here (in superuser) some questions about the necessity of antivirus software in Windows and some doubts arise.  As far as i know (and imagine) virus software can only be harmful if I download any type of infected executable file and then I RUN IT. I mean that if i have the infected executable in my desktop but i leave it there for years without clicking it, I won't be in danger...  My question is: How can i be in danger browsing the so called "malware pages or sites"??.  If i am just browsing an "infected site" how could I be affected by a virus. In any moment the browser is asking me for the permission to download "something", so how could it be?? Although i don't give permission to the browser to download 'something' is data being downloaded to my computer?? Its some kind of cookie?   I will ask in another way... What is the level of riskiness if i get infected in a malware site compared with the level of an executable virus??


From  (emphasis mine):     Neutron degeneracy is a stellar application of the Pauli Exclusion Principle, as is electron degeneracy. No two neutrons can occupy identical states, even under the pressure of a collapsing star of several solar masses. For stellar masses less than about 1.44 solar masses (the Chandrasekhar limit), the energy from the gravitational collapse is not sufficient to produce the neutrons of a neutron star, so the collapse is halted by electron degeneracy to form white dwarfs. Above 1.44 solar masses, enough energy is available from the gravitational collapse to force the combination of electrons and protons to form neutrons. As the star contracts further, all the lowest neutron energy levels are filled and the neutrons are forced into higher and higher energy levels, filling the lowest unoccupied energy levels. This creates an effective pressure which prevents further gravitational collapse, forming a neutron star. However, for masses greater than 2 to 3 solar masses, even neutron degeneracy can't prevent further collapse and it continues toward the black hole state.   How then, can they collapse, without violating the Pauli Exclusion Principle? At a certain point does it no longer apply?

A star's collapse can be halted by the  due to the Pauli exclusion principle. In extreme relativistic conditions, a star will continue to collapse regardless of the degeneracy pressure to form a black hole. Does this violate the Pauli exclusion principle? If so, are theorists ok with that? And if it doesn't violate the Pauli exclusion principle, why not?


Let $q=p^k$ be a prime power, let $m\in\mathbb{N}$ and consider the map   $$ \tau:\mathbb{F}_{q^m}\longrightarrow\mathbb{F}_{q^m},\quad a\longmapsto\sum_{i=0}^{m-1} a^{q^i}. $$   Show that $\tau$ is not the zero map.   I was able to show that this map is $\mathbb{F}_{q}$-linear, and that $\text{im }\tau\subset\mathbb{F}_q$. However, I am stuck on showing this map is not the zero map. I suppose I could look at $\tau(1)$ but if $m=p$, then $\tau(1)=0$ since the characteristic of $\mathbb{F}_{q^m}$ is $p$. Do I have to handle this as a special case, or should I do something else? Thanks.

This is part of a problem, 7.22c in "Ireland and Rosen" (self-study).  In the prior problem it is shown that for prime $p$ and $\alpha\in F_{p^n}$, $f(x)=(x-\alpha)(x-\alpha^p)(x-\alpha^{p^{2}})\cdots(x-\alpha^{p^{n-1}})$ is in $\mathbb{Z}/p{\mathbb{Z}}[x]$.          Show there exists an $\alpha\in F_{p^n}$ such that Tr$(\alpha)=\alpha +\alpha^p+\alpha^{p^2}+\cdots+\alpha^{p^{n-1}}\neq 0$ for some $\alpha\in F$.      So far my approach is that with $f(x)\in \mathbb{Z}/p{\mathbb{Z}}[x]$, the coefficients are in $\mathbb{Z}/p{\mathbb{Z}}$. And by the symmetric polynomial functions, the Tr$(\alpha)$ as defined is a coefficient, it follows it is in $\mathbb{Z}/p{\mathbb{Z}}$.   Thus I would think that Tr$(\alpha)\neq 0$ is equivalent to $p\nmid \alpha +\alpha^p+\alpha^{p^2}+\cdots+\alpha^{p^{n-1}}$  If this is correct I would please appreciate help as to how to show it.  Otherwise, I would appreciate further help.  Thanks


I would like to upgrade my Ubuntu release 19.10 to 20.04 LTS. How can I do this? I tried the software update and upgrade, but that would just upgrade my packages.

Recently I have installed an older version of Ubuntu on my old machine. Whenever I try to install any software, I get an error saying it couldn't be found:  $ sudo apt-get install vlc Reading package lists... Done                Building dependency tree        Reading state information... Done     E: Couldn't find package vlc


I would like to have a left brace around equations in the align environment.  How can I do this?  (I would like to use this environment because I would like to number each individual equation to be able to refer to it.)    So my code looks like this, and I want to have a curly brace on the left around the the 3 equations.  How can I do this?  \begin{align} & F= ma \\ & v= at \\ & W= F s \end{align}   EDIT: I didn't want to use the empheq package, because I get the error ''empheq.sty'' not found.

Consider the following MWE.  \documentclass[preview,border=12pt,varwidth]{standalone} \usepackage{amsmath}  \begin{document} \abovedisplayskip=0pt\relax \begin{equation} \begin{cases} ax + by =c \\ px + qy = r \end{cases} \end{equation} \end{document}   produces an output as follows.    What I want to achieve is as follows.    Is there any idea?  My attempt is as follows, but it does not compile.  \documentclass[preview,border=12pt,varwidth]{standalone} \usepackage{amsmath}  \begin{document} \abovedisplayskip=0pt\relax \begin{equation} \begin{cases} ax + by =c \tag{OK}\\ px + qy = r \tag{Yes} \end{cases} \end{equation} \end{document}


I'm experimenting around with Debian and I'm wondering about their permissions concerning systemd and reboot. I made the following obersvations (Debian Buster with lightdm and i3 WM):   The commands poweroff etc. map to /sbin/poweroff which is a link to /bin/systemctl /bin/systemctl has permissions -r-s------ and is inaccessible to the user As a result, systemctl poweroff etc. will not work, not even systemctl --user mycommand will not work (unlike e.g. on Arch Linux).   However when I install KDE, I can poweroff and reboot from the menu without entering a password! I didn't find any useful answers online and I don't understand how this is possible. How do they achieve that?

I am reading the book , in chapter 5 "System Call Implementation" page 77 says      For example, capable(CAP_SYS_NICE) checks whether the caller has the   ability to modify nice values of other processes. By default, the   superuser possesses all capabilities and nonroot possesses none. For   example, here is the reboot() system call. Note how its first step is   ensuring that the calling process has the CAP_SYS_REBOOT . If that one   conditional statement were removed, any process could reboot the   system.   However, in my Debian Sid I can reboot my machine by using gnome or by executing /sbin/reboot without sudo or su. How is this possible?  Maybe with systemctl?   ls -l /sbin/reboot  lrwxrwxrwx 1 root root 14 Jun 28 04:23 /sbin/reboot -> /bin/systemctl   EDIT: My user groups  [damian@xvz:~]$ groups  damian sudo wireshark bumblebee   EDIT 2: systemctl permissions   [damian@xvz:~]$ ls -l /bin/systemctl  -rwxr-xr-x 1 root root 626640 Jun 28 04:23 /bin/systemctl


I'd like to post the same content on different domains, where those domains are regional news sites and thus have different audiences which in times are interested in the same news.   Is Google likely to punish this for duplicate content and if so what is the best way to handle this? Do I use a canoncial tag to flag one domain as the original? Is there a way to tell Google to prefer one domain over another based on a user's location, since I don't have a definitive original source?

This is a general, community wiki question regarding duplicate content.  If your question was closed as a duplicate of this question and you feel that the information provided here does not provide a sufficient answer, please open a discussion on .     What does Google consider to be duplicate content? Will the way I am presenting my content result in a duplicate content penalty? How can I avoid having my site's content treated as duplicate content?


I have a trigger and helper class to populate an account ID on a custom object prior to the record being inserted into the custom object. Can anyone help me with a test class?

I am using a similar format for a trigger and helper class.  Can anyone help me with a test class? Trigger Trigger TestOrders on Order (Before Insert)  {     IF(Trigger.IsBefore)     {         IF(Trigger.IsInsert)         {             OrderTriggerHelper.UpdateAccount(Trigger.New);         }     } }    Trigger Class Public Class OrderTriggerHelper {     Public Static Void UpdateAccount(List<Order> OrderIds)     {         List<Account> AccList = [Select Id,Ship_To_Code__c from Account where Ship_To_Code__c != NULL];          IF(AccList != NULL)         {             FOR(Account A : AccList)             {                 FOR(Order O : OrderIds)                 {                     //To check the Case-sensitivity.                     String S1 = A.Ship_To_Code__c;                     String S2 = O.Ship_to_code_del__c;                     IF(S1.Equals(S2))                     {                         O.SFDC_Account_Name__c = A.Id;                     }                 }             }         }     } }


A bash script I have limited or no ability to modify is using an environment variable like:  "${SERVER_ADDRESS}"   The actual SERVER_ADDRESS value can only be determined dynamically at runtime so I would like to set SERVER_ADDRESS to a curl command that looks up the IP. Something like:  SERVER_ADDRESS='curl -s http://lookup.api.com'   What makes this more complicated is that the actual lookup will only return a part of the necessary address, so what I really need is some kind of concatenation:  SERVER_ADDRESS='$(curl -s http://lookup.api.com).restofaddress.com'   This will mean that the curl command will be run and evaluated when the string is assigned to the environment variable, however, I need that evaluation to take place in the script when it's run.  I have tried every possible way of formatting the text in that environment variable so that the script with just "${SERVER_ADDRESS}" will end up with the correct value, but I'm stumped. Perhaps it's simply not possible without adding a little more sophistication to the receiving script.

I was wanting to initialize some strings at the top of my script with variables that have no yet been set, such as:  str1='I went to ${PLACE} and saw ${EVENT}' str2='If you do ${ACTION} you will ${RESULT}'   and then later on PLACE, EVENT, ACTION, and RESULT will be set. I want to then be able to print my strings out with the variables expanded. Is my only option eval? This seems to work:  eval "echo ${str1}"   is this standard? is there a better way to do this? It would be nice to not run eval considering the variables could be anything.


In the following sentence can the first comma be replaced with a semicolon for smoother reading?     "An hour drifted by, and the lady, whose name was Arcey Pierre, called it a day."

Here's the sentence -      On further statistical analysis, these benefits were found to be both   short term (0-30 days) and long term (31-360 days) and in both STEMI   and UA/NSTEMI patients, irrespective of whether PCI was done or not.   I was tempted to write this sentence in the following way:     On further statistical analysis, these benefits were found to be both   short term (0-30 days) and long term (31-360 days), and in both STEMI   and UA/NSTEMI patients; irrespective of whether PCI was done or not.   Any thoughts on what the right way is?


In page 2  of baby Rudin,  Rudin wants to prove that $ \forall p  \in   \mathbb{Q} $ such that $ p>0 $ and $p^2 < 2$ there exists a $q \in \mathbb{Q}$ such that $q>p$ and $q^2<2$  In his proof, he starts with let $q=p-(p^2-2)/(p+2)$  and then says $q^2-2 = 2(p^2-2)/(p+2)^2$  and he goes on to finish the proof.  His proof makes sense, my question is how am I supposed to think in order to solve such problems?  I mean how do you know what to set q equal to? How did he think about this problem to get the expressions?  For example, right now I am trying to find $X$ such that $ q=p-X $ different than the one Rudin set. But I can't think of anything.  Thank you!!  Edit: Yes, I apologize I did make a mistake, it's been fixed now

First, my apologies if this has already been asked/answered.  I wasn't able to find this question via search.  My question comes from Rudin's "Principles of Mathematical Analysis," or "Baby Rudin," Ch 1, Example 1.1 on p. 2.  In the second version of the proof, showing that sets A and B do not have greatest or lowest elements respectively, he presents a seemingly arbitrary assignment of a number $q$ that satisfies equations (3) and (4), plus other conditions needed to show that $q$ is the right number for the proof.  As an exercise, I tried to derive his choice of $q$ so that I may learn more about the problem.  If we write equations (3) as $q = p - (p^2 - 2)x$, we can write (4) as   $$ q^2 - 2 = (p^2 - 2)[1 - 2px + (p^2 - 2)x^2]. $$  Here, we need a rational $x > 0$, chosen such that the expression in $[...]$ is positive.  Using the quadratic formula and the sign of $(p^2 - 2)$, it can be shown that we need   $$ x \in \left(0, \frac{1}{p + \sqrt{2}}\right) \mbox{ for } p \in A, $$  or, for $p \in B$, $x < 1/\left(p + \sqrt{2}\right)$ or $x > 1/\left(p - \sqrt{2}\right)$.  Notice that there are MANY solutions to these equations! The easiest to see, perhaps, is letting $x = 1/(p + n)$ for $n \geq 2$.  Notice that Rudin chooses $n = 2$ for his answer, but it checks out easily for other $n$.  The Question:  Why does Rudin choose $x = 1/(p + 2)$ specifically?  Is it just to make the expressions work out clearly algebraically?  Why doesn't he comment on his particular choice or the nature of the set of solutions that will work for the proof?  Is there a simpler derivation for the number $q$ that I am missing?


Is iTunes configured to sync voice memos from my iPhone? If so, where can I find them?

There are no options for Voice Memos application to specify path to save.  Searching for the recording name also did not reveal any file in Finder.  I wish to edit the audio file in Audacity but I need to find the saved file first.


Even if it is just a friend or family,   what are tips to help make a person comfortable being photographed. Of course, not everyone is up for being photographed, but when they agree for a photo or you are asking them, how do you make a person comfortable with being shot?  Thanks!

I recently saw a photographer's project on-line, where he takes 1 portrait each day of a total stranger. The project along with countless hours of looking at Steve McCurry's work sparked some interest in me to take on a little bit of portraiture.  One Question though. What approach should one employ, to ask a complete stranger to have their portrait taken?.


Every infinite subset of a compact space has an accumulation point. I understand the reciprocal does not hold for every topological space, but I cannot manage to find a counterexample. Any ideas?

I think that I understand why compactness implies limit point compactness:  Suppose $A \subseteq X$  has no limit points. Then $A^{\prime} \subseteq A$. Thus, $A$ is closed. Then for all $a \in A$, there exists some neighborhood $U_a$ of $A$ s.t. $U_a \cap A= \{a\}$. But then since $X$ is compact and $A \cup (X-A)=X$, it is an open covering. [$X-A$ has to be open, since $A$ is closed].  Then by compactness, there is a finite open covering and since $(X-A) \cap A = \emptyset$, It is clear that $A$ is finite. The result follows  However, the converse of the statement is supposedly incorrect. This definitely seems weird, particularly in $R$ (equipped with usual topology.)  Can somebody provide me with a counter-example?


Hi I am making a logo quiz game and my if statement does not react to my input I made a textview and I pirnted out the input and it was yahoo (i entered yahoo in edit text and i declered if statement to check if it is yahoo)...  package com.example.logogame;  imports....  public class Yahoo extends Activity implements OnClickListener{  EditText et; Button check; TextView test;  @Override protected void onCreate(Bundle savedInstanceState) {     // TODO Auto-generated method stub     super.onCreate(savedInstanceState);     setContentView(R.layout.yahoo);      et = (EditText) findViewById(R.id.editTextAnswer);     check = (Button) findViewById(R.id.buttonCheck);     test = (TextView) findViewById(R.id.test);      check.setOnClickListener(this); }  @Override public void onClick(View v) {     // TODO Auto-generated method stub     switch(v.getId()){     case R.id.buttonCheck:          String content = et.getText().toString();          //its always wrong here...         if(content == "yahoo"){             Toast toast = Toast.makeText(this, "Correct! Good work", Toast.LENGTH_SHORT);             toast.setGravity(Gravity.CENTER, 0, 0);             toast.show();         }else{             test.setText(content);             Toast toast = Toast.makeText(this, "Wrong...", Toast.LENGTH_SHORT);             toast.setGravity(Gravity.CENTER, 0, 0);             toast.show();         }          break;      } }

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 set up a POSTFIX server on my VPS and mail sent trough it is going to Spam in gmail. Here is my message:  Delivered-To: sgenov@gmail.com Received: by 10.140.43.75 with SMTP id d69csp350632qga;         Mon, 19 Jan 2015 15:29:29 -0800 (PST) X-Received: by 10.194.89.39 with SMTP id bl7mr6149887wjb.76.1421710169272;         Mon, 19 Jan 2015 15:29:29 -0800 (PST) Return-Path: <kalina@hotelfors-bg.com> Received: from mail.sgenov.com (mail.sgenov.com. [192.81.221.174])         by mx.google.com with ESMTP id j9si29338582wjy.109.2015.01.19.15.29.28         for <sgenov@gmail.com>;         Mon, 19 Jan 2015 15:29:29 -0800 (PST) Received-SPF: pass (google.com: domain of kalina@hotelfors-bg.com designates 192.81.221.174 as permitted sender) client-ip=192.81.221.174; Authentication-Results: mx.google.com;        spf=pass (google.com: domain of kalina@hotelfors-bg.com designates 192.81.221.174 as permitted sender) smtp.mail=kalina@hotelfors-bg.com;        dkim=pass header.i=@hotelfors-bg.com Received: by mail.sgenov.com (Postfix, from userid 33)     id 665FB44097; Tue, 20 Jan 2015 01:29:28 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=hotelfors-bg.com;     s=default; t=1421710168;     bh=ZOL1SsCcV0ncUnB8HJhFqzY/7ZocyZVCh5HCRSTXejY=;     h=To:Subject:Date:From;     b=TjCDSt9mOFyoXVGu4CI7xqPxR7iHMtzeL1Nykd+t0cZBlWEH15OQQVdkDR07G4xJH      WvKPQAFBHPVynQNYbnsRnwf4A57elvUImo77MDLZGhNGrS70fYdIjEjKAWe8BLX61G      1GuaBLPfJYYUz6SdVjYsBPNm/io2wrWc63Sdvb1M= To: <sgenov@gmail.com> Subject: Hello, Stanimir X-PHP-Originating-Script: 0:main.inc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8;  format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 20 Jan 2015 01:29:28 +0200 From: kalina@hotelfors-bg.com Message-ID: <f5944a29798c926bf52fda46c4197c76@hotelfors-bg.com> X-Sender: kalina@hotelfors-bg.com User-Agent: Roundcube Webmail/0.7.2  This is my new email. Please add it to contacts and reach me if you  need anything.  Best Regards   As you can see, my mail server is set up with the following:   The server has DKIM The server has a verified signed certificate SPF(TXT) is set correctly The server's PTR (reverse DNS) points correctly to my mail server All possible checking tools give a maximum result for the server (it should be trusted by everyone)   Yet, gmail sends all messages from all domains to spam. Does anyone know what the reason could be or what steps I should take? Can I contact someone?  Thanks in advance.

This is a  about avoiding outgoing mail being classified as spam.   Also related:                    I'm wondering how to prevent my emails from my site being marked as spam? I'm using sendmail.  I'm trying to send emails through my ruby-on-rails application. The mails are all written in swedish (if that does make a difference?). I don't know why they keep getting marked as spam.  Are there any things that I can do to minimize the risk?


Does it make a difference if you do count(*) vs count(column-name) as in these two examples?  I have a tendency to always write count(*) because it seems to fit better in my mind with the notion of it being an aggregate function, if that makes sense.   But I'm not sure if it's technically best as I tend to see example code written without the * more often than not.  count(*):  select customerid, count(*), sum(price)  from items_ordered group by customerid having count(*) > 1;   vs. count(column-name):  SELECT customerid, count(customerid), sum(price) FROM items_ordered GROUP BY customerid HAVING count(customerid) > 1;

I have the following query:  select column_name, count(column_name) from table group by column_name having count(column_name) > 1;   What would be the difference if I replaced all calls to count(column_name) to count(*)?  This question was inspired by .    To clarify the accepted answer (and maybe my question), replacing count(column_name) with count(*) would return an extra row in the result that contains a null and the count of null values in the column.