Get nearest match through multiple line using JavaScript

I have following output from Protractor test and I'm trying to parse and find name of failed spec:  Specs: /var/lib/jenkins-slave/workspace//tests/js/e2e/ui_e2e/tests/test_one.js Selenium URL: http://10.20.40.54:4444/wd/hub  ..... number of different strings here....  Executed 25 of 25 specs SUCCESS in 1 min 23 secs. ----- Specs: /var/lib/jenkins-slave/workspace//tests/js/e2e/ui_e2e/tests/test_two.js  ..... number of different strings here....  UnknownError: Due to a previous error, this job has already finished. You can learn more at   I'm using following regex:  (?:Specs:)(?:[\s\S])*(?=UnknownError(.*?))   However, it matches too wide section from first string, swallowing string with test_two.js.  How can I avoid swallowing and narrow match to have it like:  Specs: /var/lib/jenkins-slave/workspace//tests/js/e2e/ui_e2e/tests/test_two.js  ..... number of different strings here....  UnknownError: Due to a previous error, this job has already finished. You can learn more at


Subsequent Windows 10 install, what to consider?

I have a dual boot Ubuntu on my Lenovo X230. Linux One is unencrypted on sda2 (family, guests, tinkering), Linux Two (work) is encrypted within sda5:  NAME                    TYPE  FSTYPE      MOUNTPOINT sda                     disk ├─sda1                  part  ext2        /boot ├─sda2                  part  ==> my Linux One (Elementary OS) └─sda5                  part  crypto_LUKS ==> my Linux Two (Ubuntu-Mate)     └─sda5_crypt          crypt LVM2_member     ├─ubuntu--vg-root   lvm   ext4        /     └─ubuntu--vg-swap_1 lvm   swap        [SWAP]   Question: If I boot from my Windows 10 boot media, install Windows to sda2 (overwriting my Linux One), what bad things will happen, that I need to look into before/after windows 10 install?   What about the boot partion? What about restoring the bootsector afterwards? (I believe, I am on UEFI, on this 4-year-old machine…) Can the Win10 install harm the other partitions? (within the W10 setup, of course I will go for „expert mode“ and picking the partition to install to...) I'd assume, I better boot with a linux stick before and backup /boot/grub before?   What will I have to do after windows install?


Why are the fundamental and anti-fundamental representation in $SL(2,\mathbb{C})$ not equivalent?

I am currently learning symmetries/group theory and I learnt that the fundamental representation and the anti-fundamental representation of $SL(2,\mathbb{C})$ are not equivalent. This means that no similarity transformation can map one of them to the other.  My professor gave an explanation (on the 2nd last paragraph on page 75 of the following document ) but I don't see how the difference in the signs in the exponent imply that the representations are inequivalent.  Can anyone please explain the explanation of my professor, or perhaps give another explanation?


If I volunteer to give back to my community, is there a monetary amount assigned to my time, to act as an Income Tax Deduction?

Is there a value that can be assigned to my time, i.e. an hourly rate, so that I can be given a receipt to remit to CRA come Income Tax Filing time?  I live in Canada.


Need help installing Google Chrome and other applications

I currently need to use my computer for my online college courses. However, I am not able to install the programs I need, such as my bookstore app and Google Chrome.   How can I install these applications? I've had no luck searching for the answers online.  I am also trying to update Google. Ubuntu is directing me to an update page but does not perform any actions after that.


Adding a new key value pair in the JSON array

Hi I have a requirement in which i need to add a new key value pair in the JSON response, with the help of the for loop, kindly help me out for this below is my JSON: [       {          "asdf":"",          "fdrtf":"869966",          "hdhfhfh":"utytut",          "Cat":"A",          "hghg":"jguyhj",          "hfj":"Resolved",          "hghgjg":"",          "hgfjf":"",          "jghjf":"",          "hgjfhfj":"",          "contraName":""       },       {          "hjhj":"",          "hfhfhf":"h",          "hhfh":"hfjfhdj",          "cat":"B",          "jghgj":"jhgjgk",          "hgjfjf":"jghjg",          "hgjgugj":"",          "jghfj":"",          "jghgj":"",          "gjghfj":"",          "hgjgh":""       }     ]   i am trying to add a new key value pair like : -- "ASD":"1" in the first row and "ASD":"2" in the second row by the help of for loop in my jS file ,, kindly help me out for this. below is the method i tried: addvalue(data) {         for (let i = 0; i < data.length; i++) {            data[i].ASD = `[i]`;         }              }


What are the best practices in writing a sql stored procedure

I found that SQL stored procedures are very interesting and useful. I have written stored procedures but i want to write well crafted, good performance tuned and concise SPs for any sort of requirement and also would love to learn about any tricks or good practices for stored procedures. How do i move from the beginner to the advanced stage in writing stored procedures?  Update: Found from comments that my question should be more specific. Everyone has some tricks upon their sleeves and I was expecting such tricks and practices for SPs which they use in their code which differentiates them from others and more importantly spruce up the productivity in writing and working with stored procedures.


What cassette remover tool I should order for Shimano CS-HG50?

There is duplicate question   but I need a non-park tool tool. Something I can order from AliExpress.   The cassete looks like this  I don't have enough reputation on bicycles to add comment to the duplicate question  (so my only option is to post it as question)


Why is my ajax form thinking it's not submitted?

I have a form that is being submitted through ajax. It's not reloading the page, it just shows a success message, which is what I want. On my page I can have several forms with different ids but same class. I'm targetting the class for submit. But I have two different types of forms, new ones and existing ones (add or update basically). The update ones are working fine, but the add ones are giving me a browser alert when I try to exit the page. They think they are not already submitted.  Here's my code:      $("#simulation-table").on('submit', '.simulation_form', function(event){         event.preventDefault(); //prevent default action          var post_url = $(this).attr("action"); //get form action url         var request_method = $(this).attr("method"); //get form GET/POST method         var form_data = $(this).serialize(); //Encode form elements for submission         var form_id =$(this).attr("id");          $.ajax({             url : post_url,             type: request_method,             data : form_data         }).done(function(response){             response = JSON.parse(response);             if ((response.success === true || response.success == 'true') && (response.new === false || response.new == 'false')) {                 alert_float('success', response.message);                 $formSub = $('body').find('#' + form_id);                 $formSub.find('.edit-field input').each(function () {                     $(this).attr('readonly', true);                 });                 $formSub.find('.save_button button').prop('disabled', true);             } else {                 alert_float('success', response.message);                 $formSub = $('body').find('#' + form_id);                 $formSub.find('.edit-field input').each(function () {                     $(this).attr('readonly', true);                 });                 $formSub.find('.save_button button').prop('disabled', true);                 $formSub.removeAttr('id');                 $formSub.attr('id', 'simulation_form_' + response.insert_id);                 $formSub.find('input[name="id"]').val(response.insert_id);                 $formSub.attr('action', admin_url + 'leads/simulation/' + response.insert_id);             }         });     });   I have to change the form ids for the add function after receiving the success response, that's why I have that last piece of code. Why am I receiving this browser alert for changes not submitted?   My problem is not with the submit event, as it is triggering and completing successfully. The browser (Firefox in this case) is alerting me if I'm sure that I want to exit the page since some data might not be saved, but the form was submitted correctly.  EDIT: Updated code after marked as duplicate. Did not solve


What would happen when you load a package more than once, say via \usepackage{<package>} or \RequirePackage{<package>}.  For example:  \documentclass{book}  \usepackage{geometry} \usepackage{geometry}  \begin{document} test \end{document}   Will LaTeX ignore the double loading of geometry, or are there some problems and repercussions?


I know about the "hosts" file that can map ips to static names.  But I want to do the same thing inside the router, so I can access this "hosts" file by any computer on that LAN. I have D LINL router. how can I achive my target?


How did they find the location of Panda village?

In , How did Tigress And Kai find the location of panda village?


How can I avoid being prompted for a password in this script?

I’m using Amazon Linux. If I login as my “otheruser” user, and create a script, test.sh, with this text  sleep 5 ; sudo reboot now   I can login and run the script like so …  [davea@mydevbox ~]$ sudo su - otheruser [sudo] password for davea:  Last login: Wed Apr 20 21:18:48 UTC 2016 on pts/0 [otheruser@mydevbox ~]$ sh test.sh  [otheruser@mydevbox ~]$  Broadcast message from davea@mydevbox.springboardonline.org     (/dev/pts/0) at 21:19 ...  The system is going down for reboot NOW!   However if I change the contents of the script to be  sudo service jboss restart   and then I run the script, I’m prompted for a password …  [davea@mydevbox ~]$ sudo su - otheruser [sudo] password for davea:  Last login: Wed Apr 20 21:09:03 UTC 2016 on pts/0 [otheruser@mydevbox ~]$ sh test.sh  [sudo] password for otheruser:    I would like the second sequence to be like the first in that I’m not prompted for a password the second time. How can I do this?


I have an older iPod touch which which supports up to iOS 6.1.6 and nothing newer.  This device is equipped with a Linea Pro barcode scanner and previously had an application called "" installed.  Recently I was attempting to do some work on a web application I wrote and realized that I needed to update to a newer version of Web Barcode - but unfortunately the Apple ID saved on my device was deactivated a few years ago.  So I went to settings and updated it with my current Apple ID.  Then again tried to update the App from the Apple store.  Still no dice - it was asking me for the password on the old account.  So then I figured I'd just remove it and reinstall from scratch.  Deleted the app and went to the store but now I am met with a message that the new version requires at least iOS 8.0.  I feel I followed a very logical series of steps to update this application and while I can understand that I won't be able to install the newest version, how can I get the old version back?  The device is completely useless without the barcode scanning application and the Apple store is now refusing to install any version at all on my device.  What can I do to get the original version of this application reinstalled?


Trying to test AuraHandledException, but my test code isn't covering the apex class's code

@AuraEnabled public static String getCurrentShares(final Id recordId) {     if (!hasEdit(recordId)){         throw new AuraHandledException('Only the record owner or administrators can access permissions');     }      List<SObject> results = Database.query(buildQuery(recordId));     List<ShareWrapper> output = new List<ShareWrapper>();      Set<Id> groupAndUserIDs = new Set<Id>();      for (SObject so : results) {         ShareWrapper sh = new ShareWrapper();         sh.RowCause = String.valueOf(so.get('RowCause'));         sh.AccessLevel = String.valueOf(so.get(getAccessLevelField(objectTypeFromId(recordId))));         sh.UserOrGroupId = (Id)so.get('UserOrGroupId');         groupAndUserIDs.add(sh.UserOrGroupId);         output.add(sh);     }      Map<Id, User> userMap = new Map<Id, User>([SELECT Name FROM User WHERE Id IN :groupAndUserIDs]);     Map<Id, Group> groupMap = new Map<Id, group>([SELECT Name FROM Group WHERE Id IN :groupAndUserIDs]);      for (ShareWrapper sh : output) {         if (userMap.get(sh.UserOrGroupId) != null) {             sh.UserOrGroupType = 'User';             sh.UserOrGroupName = userMap.get(sh.UserOrGroupId).Name;         } else if (groupMap.get(sh.UserOrGroupID) != null){             sh.UserOrGroupType = 'Group';             sh.UserOrGroupName = groupMap.get(sh.UserOrGroupId).Name;         }     }       return JSON.serialize(output); }     //Test Class for SharingComponentController Test  @isTest  public class SharingComponentControllerTest{   try{            SharingComponentController.getCurrentShares(acc.id);          }catch(AuraHandledException e) {              System.debug(e.getMessage());              System.assert(e.getMessage().contains('My Error Message'));           }          }


What is the difference inbetween $\leftrightarrow$, $\iff$, and $\equiv$?

What is the difference inbetween $\leftrightarrow$, $\iff$, and $\equiv$ ? Especially when used in the same text. My thought about that was that it has something to do with object language and meta language, but I'm not sure. I've heard that $\leftrightarrow$ is a connective on a proposition level, whereas $\iff$ is a statement about propositions. But where does $\equiv$ come in? I've seen texts that use either ($\leftrightarrow$ and $\iff$) or ($\iff$ and $\equiv$). But how do those three relate if they are all used at the same time? Whould that imply that there can be a meta language of a meta language? If not, which pairing makes more sense to use?


Electric lamp and City electricity frequency

As far as I know the Public Power Supply frequency is 50hz.  Does it mean that lamps get on and off constantly? Or they just remain on?  When you have some thing rotating it seems that light is not continuous as in certain speeds of rotation it looks backward or stopped.  If they do actually turn on and off. Why do we see only bright time not the dark (maybe i should ask biology part)


I'm Nigerian, passing through JFK on EgyptAir on my way to Guyana. I do not plan to leave the airport, and the connecting is with another airline (BW). I want to know if it is possible without a transit visa.


I'm trying to prove that: $1^2 + 2^2 + 3^2 + ...+ n^2 = \frac{n(n+1)(2n+1)}{6}$  Defining the upper left side of the equation as $a_n$ I get:  $a_n - a_{n-1} = n^2$  Then, from the homogeneous eguation:  $a_n = C$  but while predicting the nonhomogeneous part as:  $a_n = xn^2 + yn + z$  and putting in into $a_n - a_{n-1} = n^2$ I get:  $2xn + y - 1 = n^2$  but it is not even close to giving me a right answer. What am I doing wrong?


How do I change $PATH and set it to the default directory?

For some reason when I run echo $PATHI get the following directory: /Users/<home>/Library/Applications/.  How do I set it back to its default location so that I don't have to run this command, export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin each time I want to run commands in Terminal?   Thanks for the consideration


Let $G$ be a group and let $a \in G$ be a fixed element. Let $$H= \{\text{$g \in G$ | $g^{-1}ag=a$}\}.$$  Prove that $H$ is a subgroup of $G$.    So I know I need to show:  (i) $H$ is closed under the operation on $G$.  (ii) $H$ is closed under inversion.  (iii) $H\neq \emptyset$    For closure:  Suppose $x,y \in H.$ Then $x^{-1}ax=a$ and $y^{-1}ay=a.$ So  $$\begin{align} (xy)^{-1}a(xy)& = y^{-1}x^{-1}axy \\  & = y^{-1}(x^{-1}ax)y \\  & = y^{-1}ay \\   & = a \\ \end{align}$$ Thus $xy \in H$.    Now how do I show it's closed under inversion? I'm not sure what the inverse is...   And to show $H \neq \emptyset$ all I need to do is show that the identity is in the set. And I'm not sure how to do that either.  Help!


How to copy an Ubuntu install from one laptop to another

I am going to change my machine: from a laptop with Ubuntu to another laptop where I am going to install Ubuntu...  I am quite happy with the current system, what I am afraid of is having to rebuild everything from 0.  So what do people often do to clone an Ubuntu system? That may include the data, packages, shortcut settings, etc...


how to multiply a variable with every value of an array in javascript?

var numbers = [1, 5, 10, 15]; var doubles = numbers.map(function(x) {   return x * 2;   //doubles is now [2, 10, 20, 30]   I am following this above example, This is working for a constant 2, how can I mulitply the elements with variable this.price,  var numbers = [1, 5, 10, 15]; var doubles = numbers.map(function(x) {    return x * this.price;   How can I make this works? this.price is a public variable.


Enable automatic plugin update for certain plugins

It seems there's only  where users can enable it. Is there a way to bypass this for only a certain plugin?  So I can move this to either to my plugin options or enable it by default (only for my plugin of course)


I would like to know what is the order of $\mathbb{Z}_3^*/(\mathbb{Z}_3^*)^3$ as a group, where $\mathbb{Z}_3$ represents the 3-adic integers.  I know how to find the units of $\mathbb{Z}_3$, but I do not know how to compute its cube. Please help me with this.


How to wrap text around a figure in LaTeX like this?  Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean quis mi ut elit interdum imperdiet quis non ante. Sed imperdiet, sapien quis    +------------------------+ viverra rhoncus, tellus dui   |                        | dictum nisl, at porta purus   |                        | ipsum ac turpis. Fusce auctor |         FIGURE         | ullamcorper adipiscing. Nunc  |          HERE          | non quam ac orci egestas con- |                        | sequat ut eget quam. Cras     |                        | blandit condimentum ornare.   +------------------------+ Curabitur aliquam, nulla sit amet iaculis tristique, mi nulla auctor magna, sit amet imperdiet ante arcu a libero.


My English is pretty basic, please don't mind. Wondering how to make the liquify wave and distort color effect in Photoshop? I'd tried using distort>shear/wave/zigzag, but still can't make it similar like the photo below.


Sci-fi novel: humans travel to war at the speed of light while kept in tanks of fluid

I’m trying to find the name of a book in which humans are at war with an alien race. While traveling to the galaxy where the fighting is, humans travel at the speed of light while being kept in tanks of fluid to prevent being injured by the sudden speeding up and deceleration. Whilst they are in transit they do not age but for everyone back on Earth time still goes by and when the travelers arrive at their destination everybody they knew back on Earth had long since passed away.  I do not remember much else about the story but I do remember enjoying the book, can anyone can help by supplying me with the novels name and author?


Just installed ubuntu 13.10  I did apt-update in terminal and sow this   Err http://ppa.launchpad.net /ubuntu/saucy amd64 Packages                          404  Not Found Err http://ppa.launchpad.net /ubuntu/main amd64 Packages                           404  Not Found Err http://ppa.launchpad.net /ubuntu/saucy i386 Packages     404  Not Found Err http://ppa.laun   W: Failed to fetch http://ppa.launchpad.net/ubuntu-wine/ppa/dists//ubuntu/saucy/binary-amd64/Packages  404  Not Found  W: Failed to fetch http://ppa.launchpad.net/ubuntu-wine/ppa/dists//ubuntu/main/binary-amd64/Packages  404  Not Found   W: Failed to fetch http://ppa.launchpad.net/ubuntu-wine/ppa/dists//ubuntu/saucy/binary-i386/Packages  404  Not Found   W: Failed to fetch http://ppa.launchpad.net/ubuntu-wine/ppa/dists//ubuntu/main/binary-i386/Packages  404  Not Found   E: Some index files failed to download. They have been ignored, or old ones used instead.   I do not understand why am I getting this errors wine's ppa shows that 13.10 is available and the above I even do not know what is it ?? any help how to fix this  grep -rn "ubuntu-wine" /etc/apt/sources*  /etc/apt/sources.list.d/ubuntu-wine-ppa_-saucy.list:1:deb http://ppa.launchpad.net/ubuntu-wine/ppa /ubuntu saucy main /etc/apt/sources.list.d/ubuntu-wine-ppa_-saucy.list:2:# deb-src http://ppa.launchpad.net/ubuntu-wine/ppa /ubuntu saucy main


how to tell GRUB to show the user preferred names of OS'es. Ubuntu 18.04

I am new to Ubuntu. I am Using Ubuntu 18.04 along with Windows10. I have gone through the below Q&A and could able to change the name of Ubuntu,      But   if i edit the Ubuntu OS name to my choice, it is then adding "GNU/Linux" at the end. for ex. if i want "Ubuntu 18.04" it is then showing as "Ubuntu 18.04 GNU/Linux". how to avoid this text "GNU/Linux" how to edit the name to my choice which is shown as "Windows Boot Manager (on /dev/sda1)"        Update: I Confirm about the text "GNU/Linux" is solved by @Terrance comments. I still need to try about windows entry.      Final Update: Solved.    I thank @Terrance, @Oldfred, @WinEunuuchs2Unix. All the three methods are working great. i felt the small script is awesome and very very easy to use. which is written by WinEuuuchs2Unix.


Finding element in LinkedList with lambda

I do have a simple Object which can be identified by a String. These identifiers are unique.  public class SomeObject  {      private String identifier;      public String getIdentifier() {         return this.identifier;     } }   I now have another class which holds a List of these simple Objects and has a method to return the object that matches the identifier provided if it exists in the list.   public class SomeBiggerClass {      LinkedList<SomeObject> allObjects;      public SomeObject getObject(String identifier)     {         if (this.allObjects.stream().anyMatch(object -> object.getIdentifier() == identifier)) {             return this.allObjects.stream().filter(object -> object.getIdentifier() == identifier).findAny().get();         }         else {             return null;         }     } }   However even if the Strings exactly match it will return false for the anyMatch() part and will throw an exception for the second lambda. I would be alble to do this in c# and linq, however I'm kinda lost with these java lambdas. Any ideas on how to do this would be apreciated.


"This property is local on" : properties of morphisms of $S$-schemes

I am learning schemes theory at school and I have for now only lectures notes that I am taking during the course. The professor is quite often using following expressions, without having defined them : if $S$ is a scheme and if $f : X \rightarrow Y$ is a morphism of $S$-schemes he often says that some property P of $f$ is   (1) local on $X$  (2) local on $Y$  (3) local on $X$ and $Y$  (4) local on $X, Y$ and $S$  and I have several question on this, and related to this.  I went to the library to look at all Grothendieck's EGA's and found the same frequent use of the expression la question est locale sur in the same four cases - at least, maybe there are other than these four ? But I found in them no definition of the meaning of la question est locale sur, which means the question is local on in english.  I guess that (1) means that $f$ has the property P if and only if for every open cover $(U_i)_{i\in I}$ of $X$, all restrictions $f_{|U_i} : U_i \rightarrow Y$ have the property P, and that (2) means that $f$ has the property P if and only if for every open cover $(V_i)_{i\in I}$ of $Y$, all corestrictions $f^{-1} (V_i) \rightarrow V_i$ have the property P. For (3) obviously it is equivalent to check (1) and (2), but I cannot state a more synthetic formulation.  Does (3) means that $f$ has property P if and only if for every open cover $(U_i)_{i\in I}$ of $X$ and for every open cover $(V_j)_{j\in J}$ of $Y$ all morphisms $U_i \cap f^{-1} (V_j) \rightarrow V_j$ have the property P ? For (4) it is sufficient to define what means P is local on S. Does this means that $f$ has the property P if and only if for every open cover $(W_i)_{i\in I}$ of $S$, every morphism $p^{-1}(W_i) \cap f^{-1}(q^{-1} (W_i)) \rightarrow q^{-1} (W_i)$ has the property P ? Or is there something more clever than this. Combining this with (3) is equivalent to (4), but here again, is there a more synthetic formulation for this ?  In (1), (2), (3), (4) I used "local morphisms" (restrictions in (1), corestrictions in (2) etc). Is it possible to express these morphisms thanks to fiber products, and if so, how ?  In (1), (2), (3), (4) I used the word every cover but sometimes in the course it suffice to have the fact for only one cover to have it for all. How does this work ? (I call Q this question.)  Sometimes its not only open covers that are used, but open affine covers. For $i\in\{1,2,3,4\}$, is (i) equivalent to the assertion (i) with "open" replaced by "open affine", or even by "affine" ?  Is answering to question Q easier with "open" replaced by "open affine", or only "affine" ? Of this note, what does the following sentence mean : the property P of the morphism of $A$-algebras $\varphi : B' \rightarrow B$ is local on $\textrm{Spec}(A)$ (resp. on $\textrm{Spec}(B')$, resp. on $\textrm{Spec}(B)$, resp. on "combinations of the previous") ?   I have a last question : all the previous questions are local for the topology of the schemes involved, which is a topology in the "classic" sense. Is all of this translatable to Grothendieck topologies ? If so, how ? And then, intuitively, in the case of the Zariski site, is the same ?  I know that this was a lot of question, but all are intimately related to this "local on" stuff, so I preferred to ask all of them in one shot.


Visa for connecting flight in Dubai? Need to recheck luggage

I have a Philippine passport and valid residence permit in Iceland. I'm flying from the Philippines to Iceland, via Dubai and Sweden. My layover at Dubai is 4.5 hours and the travel agent says I'll need to collect and recheck my luggage.  Do I need to pass through immigration in Dubai to get my luggage? Will I need a transit visa?


I'm planing a trip between many countries in Asia. I'm not sure if it is safe carry two passports of different countries. Of course both are valid and legal.   I'm scared to travel in poor countries with a high level of corruption and have a problem with stupid things.  If a have to choose between a Brazilian or a Portuguese which one is better?


How do I prove that the limit of the sequence exists: $a_n = \frac1n +\frac 1{n+1} + \frac1{n+2} + \dots + \frac1{2n}$?

How do I prove that the limit of the sequence exists: $$a_n = \frac1n +\frac 1{n+1} + \frac1{n+2} + \dots + \frac1{2n}$$  I can find the limit as n goes to infinity, $\frac1{2n}$ goes to $0$, so the limit is $0$ right? But how do I prove that the limit exists? Do I have to use the $\varepsilon$ $\delta$ definition of a limit?    For part b) I have to show that the limit is less then $1$ but not less then $\frac12$, I thought the limit was $0$?


The question is about ship stability calculations. We need to solve moment = force × distance, but in stability they put mass × distance. How, and why? Deadweight is the total weight of cargo, stores, etc. which a ship carries or can carry. -"this will produce a maximum dead weight of 72,350 tons". If it is in tonnes how can it be weight? It should be mass. If the cargo of 200 kg is loaded 2 meters from center line it will create momentum of ? Moment = 200 × 2 = 400 kg m, or 0,4 tm.  How can we put mass in equation for moment, is should be force, and force is in Newtons. Weight is force, mass is not. In water ship has weight or mass? Why do they use word weight in stability when the measure is in kg or tonnes. It should be mass?!  I know that in physics mass and weight are two different things. Mass is not a force, weight is force, but ship in water has force, but we express it in tonnes, not newtons. Is it because mass × gravity = volume × density × gravity so if we remove gravity we get mass = volume  × density, so if the ship, water it floats in and cargo that is going to be loaded are in the same gravity force field we can use amount of mass as weight?


Reduce the vertical spacing just before the chapter start

Please help me out to reduce the vertical space at chapter start.  The link for the .tex, .cls file along with the problem snapshot -  ing


How are these Chinese spam iCloud Calendar/Reminders invitations sent to me?

Recently, I’ve received a couple of spam event invitations in Calendar on my Mac. The most recent had only Chinese text, and recurred at 5:46am every day.  I am able to decline these by clicking on the invitations button in the toolbar (that only appears when an invitation comes in). However, ideally I’d like to not receive these spam invitations at all.  As I’ve never received a genuine invitation through Calendar, I thought I might be able to turn off the invitation feature. However, I can’t see any controls for this in Calendar preferences or the Internet Account system preferences.  Through what mechanism do these invitation arrive? If I understood what mechanism it was, I might be able to turn it off. I have two Calendar accounts enabled: iCloud, and Facebook. I can’t see anything in my e-mail, so I presume they’re not regular e-mail spam.  Since first writing this question, I’ve had a similar invitation come through in Reminders:


To enter code in StackOverflow, I indent each line with 4 spaces.  Is there an easier way?


Unwanted patterns in texture from repeated, seamless image

I added an Image Texture to a plane using a seamless image.  In the Texture context of Properties window, I set Scale to be X:10, Y:10.  Unsurprisingly, a pattern forms when you zoom out from plane:    How can I get rid of this pattern?  (this is supposed to be grass, so it should look very random)    EDIT: For example, is there any way to add distortion to how the image is tiled onto the plane?  So if I were to represent the surface of the plane with a grid, the pattern on it would become distorted, like this


Prove that $\det (E + h A) = 1 + h \operatorname{tr} A + O(h^2)$ for $h \to 0$

Prove that for any square real matrix, the equality $\det (E + h A) = 1 + h \operatorname{tr} A + O(h^2)$ is true for $h \to 0$. What is the geometric meaning (in terms of oriented volumes) of this formula? What will change if we take a complex matrix instead of a real one?


refresh a DIV without refresah a full page with jquery

I try to resfresh a div without refresh a full page. the code :    $(document).ready(function() {   $(".ext").on('click',function(event) {     var url = $(this).prop('href');     $("#change").load(url);     event.preventDefault();   }); });  page 1 page 2
   page 3   page 4
     for resfresh page1 and page2 no problem. But when I want to resfresh page3 and page 4 all page is resfreshing. I don't find the solution. Can' you help me?  ps : sorry, I'am french and my language is bad.


Displaying two plots side by side not displaying titles correctly


Combinatorial Proof that $\binom{n\vphantom{d}}{c}\binom{n-d}{b-c}=\binom{n\vphantom{d}}{d}\binom{d}{c}$

So I have that $\binom{n}{  c}\times \binom{n-d}{b-c} = \binom{n }{ d}\times  \binom{d}{c}$.  I am trying to prove it by using number of players to prove this. What should be the best way to prove this? I can't seem to figure out what should go in n-d b-c.


I would like to add a plot to a pgfplots figure, but such that it doesn't change the automatically computed limits. for example:  \documentclass{article} \usepackage{tikz,pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}%[ymin=-6,ymax=6] \addplot+ {x}; \addplot+ {x^2}; \end{axis} \end{tikzpicture} \end{document}   As written, the secont plot alters the limits. I could manually specify the limits (by removing the comment), but that's precisely what I want to avoid. Is there an option for this? I've found the forget plot option, but that's not quite what I need.


How can I replace Wordpress standard process of editing posts with making Wordpress use a custom page?

I have the following problem: When I want to edit the content of posts, Wordpress simply opens its standard page editor where I can add and arrange blocks, control the general page design and what not. That page editor comes with tons of controls and in my case also all kinds of additional parameter areas for various plugins (like Yoast SEO and Content Egg etc), so it looks kind of cluttered or freightened with many elements not needed when you simply want to edit a post's content. Only among others can I edit the post content (text) there. What I would like Wordpress to do is to open a custom page where I can just edit the post content (text) and submit the changed text back to the underlying database. So how would I go about directing Wordpress to opening some custom page I have created where I can simply edit the post content, without all the editing facilities of Wordpress around? The custom post editing page would probably a form with a message field where I can edit and submit the post content. How exactly would I need to build that form so that the (edited) post content is stored back into the database when I click on the form's submit button?


i have the following button with id "openWindow"  <button id="openWindow">Open Window on Click</button>   and I have this jquery code, which send an alert "Open" and change the button id to "closeWindow"  $( "#openWindow" ).click(function() {    alert("Open");    $( "#openWindow" ).attr("id", "closeWindow"); })   $( "#closeWindow" ).click(function() {         alert("Close"); });   On first click:   Alert "open" appears and the id changed to "closeWindow"   On second click   the alert "Close" will not appear.   Can anybody tells me why?


Context  I have purchased a new  laptop which has Windows 7 Home 64-bit which has this Wi-Fi Option: Intel ® Centrino ® Advanced-N 6230 (2x2 agn + Bluetooth)  And I have 4 Mbps Internet connection with a  Wireless router.  Problem  When I use internet on my laptop by wired LAN it works very good very fast. But when I use internet on Wi-fi it works very slow, and most of the time it doesn't work properly.  Any solution for this?  Screenshot 1  This is screenshot of Wireless Router setting:    Screenshot 2  Of Device Manager:    Screenshot 3  Network setting folder:    Please tell me if you need any information to solve this issue.


I created following service in /etc/systemd/system/conkyAutostart.service  [unit] Description=Conky Autostart  [Service] Type=simple ExecStart=/AutostartScripts/conkyAutostart.sh  [Install] WantedBy=multi-user.target   and the shell script mentioned in ExecStart looks like this:  #!/bin/sh conky &   afterwards I type in   systemctl enable conkyAutostart.service  systemctl start conkyAutostart.service   no error messages show up, now I type in systemctl and see that 'conkyAutostart.service' has the status:  LOAD: loaded  ACTIVE: failed  SUB: failed   What am I doing wrong?


I'm using rhel7 and trying to print my output from shadow for example to be like this : test1 !! test2 !! test3 *  I am running this command: i=`cat /home/mydir/shadow1 |awk -F ':' '{print $1,$2}' `  When I do echo $i, it will print the output in 1 line: test !! test2 !! test3 *  Can anyone advice how should I modify my '{print $1,$2}' so that it will print a new line?


Set Theory : $4$ Sets problem : Maxima and Minima in $4$ sets

There are $200$ students in a class. Each student is a member of at least one of the clubs Eagles, Falcons, Tigers and Pythons.   If each club has $100$ students, then the number of students who are members of all the four clubs is at the most ? If each club has $120$ students, then the number of students who are members of at the most two clubs is at the least ? If each club has $140$ students, then the number of students who are members of at least three clubs is at least?  Need help with this problem as I am unable to find out a way to solve this problem with literally no other information given. This could have been solved if some information can be given about some of the individual clubs but here nothing has been given. How to solve this and these types of questions? What should be the approach? Thanks in advance!


compare two files ignoring 1st column and print line number

how can I print difference line number ignoring 1st column for tab separeated files?  example- compare File 1 vs File2 by ignoring 1st column and print line no. for differnce record present in file 2.  In file1:  user1   fistname    Lastnamename user2   Johnny            Depp user3   Tom               Cruise user4   Leonardo          DiCaprio user5   Sylvester         Stallone   and  In file2:  user10   fistname    Lastnamename user2   Johnny            Depp user30  Tom'               Cruise user4   Nicolas           Cage user50  Sylvester         Stallone   expected result:-     difference in file2 is for line number 3,4  Note file size to be compare is in GB and File is tab separated


A set $A \subset l_1$ is compact if and only if closed, bounded, and one other condition

A set $A \subset \ell_1$ is compact if and only if $A$ is closed and bounded and given any $\epsilon >0$, there exists $n_0$ such that $\sum_{k=n}^{\infty} |x_k| < \epsilon$ for all $n> n_0$ and $x \in A$.   It's easy to prove the part assuming that $A \subset l_1$ is compact, but I am finding difficulty to prove the other part.


jQuery Validate plugin custom method not working

<script>      $("#form").validate();     $(document).ready(function ()       {         var merror = '';             jQuery.validator.addMethod('mvalid', function(value, element) {           if($("#mobile").hasClass("required") == true && ($("#mobile").val().substr(0,1) != '7' ||$("#mobile").val().substr(0,1) != '8' ||         $("#mobile").val().substr(0,1) != '9'))  {                                                     merror = 'Enter correct Mobile No.';             return false;                                                              }             return true;                 }, merror);      });  </script>


Got an assignment stuck don't know why it is not working?

Hi there I am new to java, studying in my bs course from a couple of weeks. So please don't mind if I ask something stupid. btw coming to the point. Assignment was that you have to write a program in which I have to break the email address into parts using StringBuffer e.g: if the given email is hassanaqve@gmail.com so I have to break it like username: hassanaqve domain name : gmail extension : .com  I tried myself but it is not working there are no errors but also not giving output      import java.lang.*; public class Lab5 {     public static void main(String[] args) {         StringBuffer email = new StringBuffer ("Hassanaqve@gmail.com");          for ( int i=0; i<= email.length(); i++){              if ( email.substring (i).equals ("@")){                  System.out.println( "Username : " + email.substring(0,i));                  int j=i;                  for ( int p=0; j<= email.length(); p++ ){                    if ( email.substring (p) == (".")){                        System.out.println( "doamin : " + email.substring(j,p));                        System.out.println( "extention : " + email.substring(p+1,p+4));                    }                    }               }          }     }


Different surnames on passports of dual citizen

I am a 17-year-old and am traveling to Germany later this year from South Africa. My German passport and my South African passport have different surnames. Will there be any problems in my travels and, if so, how do I overcome this issue?


what is the need of ufw if i have iptables in ubuntu?

Is iptables a service running with ufw or can i run it as standalone without ufw.In the result of sudo iptables -L there are chains of ufw also,so what is the difference between the input,output and forward chains of iptables and chains of ufw .Is there any good material online for this .Please help..


Why does Loki stagger when he's leaving the Tessaract research facility with Barton?

He staggers, and the security guard helps him stay on his feet. What makes Loki stagger?


How can I use Chrome WebDriver in another language

I want to be able to test with different languages. How can I do that with chromedriver ?


Explicit formula for Bernoulli numbers by using only the recurrence relation

It is not hard to show, by induction on $m\in\mathbb N$, that there exist a sequence $(B_n)_{n\geq0}$ of rational numbers such that  $$\sum_{k=1}^nk^m=\frac1{m+1}\sum_{k=0}^m\binom{m+1}kB_k\,n^{m+1-k},\ \style{font-family:inherit;}{\text{for all}}\ n\geq1\,.$$  These are the Bernoulli numbers of the second kind, that is, $B_1=+1/2$. A corollary of the proof (by induction) of the fact above is a recurrence formula for such numbers $B_n$, which are known as Bernoulli numbers:  $$\sum_{k=0}^{n-1}\binom nkB_k=0\,.\tag{$\ast$}$$  On the other hand, there are a number of explicit formulae for $B_n$, which are obtained using the equality $\frac x{e^x-1}=\sum_{n=0}^\infty B_n\,\frac{x^n}{n!}$; see  and . For example:  $$B_n=\sum_{k=0}^n\frac1{k+1}\sum_{r=0}^k(-1)^r\binom krr^n\,.\tag{$\ast\ast$}$$  Is there some clever way to manipulate the recurrence $(\ast)$ in order to obtain $(\ast\ast)$?


Removing Singularity of real bounded harmonic in punctured disk.

If $u(z)$ is real harmonic and bounded in the punctured disk $0<|z-z_0|<R.$ Show that $\lim_{z\to z_0} u(z)$ exists.   I already know Complex analytic function $f$ which has singularity $z_0$ and bounded on some deleted neighborhood of $z_0$, Then $\lim_{z\to z_0} f(z)$ exists and $f$ can be defined at $z_0$ so that it is analytic at $z_0$.


I am strugling with given error in servlet

I want to check whether the authorized user/not in SERVLET. Login.html  <!DOCTYPE html>   <meta charset="ISO-8859-1"> <title>Login page</title>

 <form action="Check.java" > USERNAME:<input type="text" value="name">

 PASSWORD:<input type="password" value="password">

     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp<button style="color: #ff3399">SUBMIT</button> </form>     Check.java  import java.io.*;   import javax.servlet.*;   import javax.servlet.http.*;     public class Check extends HttpServlet {    public void doPost(HttpServletRequest request, HttpServletResponse response)           throws ServletException, IOException {        response.setContentType("text/html");       PrintWriter out = response.getWriter();        String n=request.getParameter("name");       String p=request.getParameter("password");        if(p.equals("servlet")){           RequestDispatcher rd=request.getRequestDispatcher("servlet2");           rd.forward(request, response);       }       else{           out.print("Sorry UserName or Password Error!");           RequestDispatcher rd=request.getRequestDispatcher("/Login.html");           rd.include(request, response);       }         }   }     WelcomeServlet.java  import java.io.*;   import javax.servlet.*;   import javax.servlet.http.*;    public class WelcomeServlet extends HttpServlet {        public void doPost(HttpServletRequest request, HttpServletResponse response)           throws ServletException, IOException {        response.setContentType("text/html");       PrintWriter out = response.getWriter();        String n=request.getParameter("name");       out.print("Welcome "+n);       }    }   Web.xml  <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">  <display-name>REALPROJECT</display-name>  <servlet>       <servlet-name>Check</servlet-name>       <servlet-class>Check</servlet-class>     </servlet>     <servlet>       <servlet-name>WelcomeServlet</servlet-name>       <servlet-class>WelcomeServlet</servlet-class>     </servlet>       <servlet-mapping>       <servlet-name>Check</servlet-name>       <url-pattern>/servlet1</url-pattern>     </servlet-mapping>     <servlet-mapping>       <servlet-name>WelcomeServlet</servlet-name>       <url-pattern>/servlet2</url-pattern>     </servlet-mapping>      <welcome-file-list>      <welcome-file>Login.html</welcome-file>     </welcome-file-list>   </web-app>    MY ERROR ARE:  HTTP Status 500 -   type Exception report  message   description The server encountered an internal error that prevented it from fulfilling this request.  exception   java.lang.NullPointerException     Check.doPost(Check.java:17)     javax.servlet.http.HttpServlet.service(HttpServlet.java:650)     javax.servlet.http.HttpServlet.service(HttpServlet.java:731)     org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)   note The full stack trace of the root cause is available in the Apache Tomcat/7.0.70 logs.


Minecraft-Command to remove all dropped sandstone

As the title says. I am getting a lot of dropped sandstone that I would like to get killed, but I also have bamboo and minecarts that I don't want getting deleted. Is there any way to do this using command blocks? The /fill command will not work for me, as I need dropped items killed, not placed items.


How to move mutliple files from multiple directories to one directory

I have a lot of .iso files in different directories on my computer and I want to move them all at once to some folder. What I would use for searching those file is find and mv to move it. The obvious way of doing this would be  find / -name "*.iso" | mv --target-directory=/home/ISO/   but it doesn't work. Any ideas?


One word for the thing that other things depend on?

If a have a sentence: "A depends on B", then I can describe A as a "dependent" (adj.). How can I describe B with one adjective?


Which tense is appropriate? Simple or Perfect?

Consider the following two sentences:   Many buildings were destroyed in the Great Fire of 1666. Many buildings had been destroyed in the Great Fire of 1666.    Which is appropriate, and why? I think both the sentences are right.  Could someone please clarify?


Single word that means "to look down on others"?

What is a single word in English which means to look down on others (due to their younger age, lower socio-economic position, lesser experience, etc)    Not look down upon everyone else in general, but look down upon some particular person due to a feeling of superiority of oneself over them ( this superiority may come from the fact that one feels has more money, talent, etc)?    By "look down upon" I don't mean just the feeling of having superiority over another, but acting to them in a manner that reflects this pride as well (for example, perhaps he acts very rudely to them, since he feels superior to them and feels he can get away with it, or he feels it doesn't matter at all due to his superiority)


How to save a web page as MHT in chrome?

How do you save a web page as .mht in Chrome?  I have Chromium 18. It's supposed to be  but I can't figure out how...


Which polynomial functions can satisfy $f(x)\cdot f({1\over x}) = f(x) + f({1\over x})$?

I read in my class notes that there are only two polynomials functions which can satisfy the relation $$  f(x) \cdot f(\frac{1}{x}) =  f(x) + f(\frac{1}{x}) $$  , which are  $1 \pm x^n$ . I am not able to understand why only these 2 polynomial functions are able to satisfy the given relation , can't there be any other polynomial function which will satisfy the given relation ? Please help me to solve this query .


C: differences between char pointer and array

Consider:  char amessage[] = "now is the time"; char *pmessage = "now is the time";   I read from , 2nd Edition that the above two statements don't do the same thing.  I always thought that an array is an convenient way to manipulate pointers to store some data, but this is clearly not the case... What are the "non-trivial" differences between arrays and pointers in C?


New User - Installing .jar File Difficulty

New Ubuntu User - trying to download and install a file... in this case a .jar file... and having difficulty knowing where to install it.  I have used Software Center to install .exe files, and it is so easy and nice. But the .jar is not handled the same way for some reason... maybe because it requires Java?  What is the easiest/most direct way to download and install a file in Ubuntu when Software Center is not handling it for you?


I'm trying to align the tops of two images using the subfigure environment from the subcaption package. Unless I'm misinterpreting the other questions, I believe I have read multiple questions asking the same,  and  are two examples. The problem is, those answers don't seem to work as I expected, and I still can't get the tops of the images to be aligned.   example:  \documentclass{article} \usepackage{subcaption} \usepackage{graphicx} \usepackage{mwe} \begin{document}     \begin{figure}         \centering         \begin{subfigure}[t]{0.45\textwidth}             \includegraphics[width=\linewidth, height=20em]{example-image-a}             \caption{taller image}         \end{subfigure}         \begin{subfigure}[t]{0.45\textwidth}             \includegraphics[width=\linewidth, height=15em]{example-image-b}             \caption{shorter image}         \end{subfigure}         \caption{two images}     \end{figure} \end{document}   For me this generates the following:   I would have expected it to align the tops of the images. How do I do this?


Disk utility free space doesn't match Apple > About this Mac > Storage

There's a difference of almost 6.14GB regarding how much free space both methods report.  What's going on here? How much free space I actually have?  (The mounted image is very small, non worries about that)


What should be done with questions that typing it up helps me to solve the question?

If I start writing up a question, and the very process of organizing my thoughts into a form appropriate for StackOverflow causes me to figure out the answer on my own, what is the appropriate thing? (Assuming the answer is more complicated than a syntax error or "I wrote > when it should have been >= etc.)   Delete whatever I have of the question draft Convert the question into "answer your own question, Q&A style" It depends on whether me figuring it out was because I got better organized or because I saw a suggested question that answered my question (and thus I would be posting a duplicate)? It depends on my confidence level in the solution I figured out on my own Other


I want to accelerate an object from resting state to a velocity $v_1$ then from a linear movement at speed $v_1$ to linear movement at speed $v_2$.  By conservation of energy law, the energy spent will be the difference between kinetic energy at the end and kinetic energy ar the beginning state. So for the first experiment I spend $\frac{1}{2}mv_1^2$ and for the second experiment $\frac{1}{2}m(v_2^2-v_1^2)$.  Now If I accelerate a resting object of mass 1Kg to a speed of $10ms^{-1}$ and then accelerate it to a speed of  $20ms^{-1}$, the energy spent will be respectively 50J and 150J. Why does it take more energy to add $10ms^{-1}$ of velocity to a resting object than to an already moving object?


Theoretical Possibility of "Opposite" Gravitational Mass?

This is an unusual idea that I have been entertaining for some time, and I can't find anything about it online. However, it is so simple that someone must have conceived it before.  First, I will elaborate my idea, then I will ask if it possible within the framework of General Relativity.  There are two types of electric charge, positive and negative. Like charges repel, unlike charges attract.  Could there be two types of gravitational mass? Let's call them Д - mass and Ξ - mass. They could a follow a similar but opposite rule to electric charges: like masses attract, and unlike masses repel.  We assume that both Д and Ξ masses have the same inertial masses.  Д - mass is the type of mass that we're all made out of, our bodies, our planets, our solar system. Ξ - mass would be the"opposite" type of mass.  Like masses attract, so we see that every bit of Д - mass gravitationally attracts every other bit of Д - mass. Using Newton's laws, we can obtain Galileo's Law of Falling Bodies, which is the basis of Einstein's equivalence principle.  Inertial masses remain the same. Falling objects on a planet made out of Ξ - mass would be kinematically indistinguishable from one made out of Д - mass.  Let's say one day a meteorite crashes onto Earth. It is a relatively ordinary meteorite, except that embedded within it are chunks of very pure Ξ - mass. When such a chunk is pried out, it falls up! It would fall towards the sky and keep going.  If we measure the acceleration of the up-falling chunks, we would see that it is also 9.81 ms-2.  If we combine two equal Д and Ξ masses, we can produce a gravitationally "neutral" mass, one that can float weightlessly. However, it will still have inertial mass.  We have not observed any neutral or Ξ masses. This is similar to the issue of baryon asymmetry. Due to like masses attracting and unlike masses repelling, this could result in increasing separation between the two types, and any Ξ masses in our universe might be really, really, really far away.  My final question is whether the existence of this "opposite" Ξ - mass is possible within the framework of General Relativity. Does the resulting repulsion and "falling up" violate the equivalence principle?


how to loop through arguments in a bash script

I would like to write a bash script with unknown amount of arguments.  How can I walk through these arguments and do something with them?  A wrong attempt would look like this:  #!/bin/bash for i in $args; do      echo $i done


I have 8 gb of ram and use my machine for web browsing streaming and some light gaming. Do I need a swap partition?


Is there a rhetorical term for remarks like "you're exactly what I've come to expect from..."?

Is there a specific term for a statement that uses words such that their precise meaning conveys a subtext contrary to the colloquial meaning?  For example, the joke in Men in Black:     Gentlemen, congratulations. You're everything we've come to expect   from years of government training.   where the precise use of the words conveys a sarcastic meaning (ie that the candidates are inept because that's what he's come to expect from government training).  I was going to use "irony" to describe this but then realized this is basically the opposite of irony - the use of words to convey their literal intention, when a nonliteral intention was expected.


Microsoft.ACE.OLEDB.12.0 provider is not registered

I have a Visual Studio 2008 solution with two projects (a Word-Template project and a VB.Net console application for testing).  Both projects reference a database project which opens a connection to an MS-Access 2007 database file and have references to System.Data.OleDb.  In the database project I have a function which retrieves a data table as follows   private class AdminDatabase    ' stores the connection string which is set in the New() method    dim strAdminConnection as string     public sub New()    ...    adminName = dlgopen.FileName    conAdminDB = New OleDbConnection    conAdminDB.ConnectionString = "Data Source='" + adminName + "';" + _        "Provider=Microsoft.ACE.OLEDB.12.0"     ' store the connection string in strAdminConnection    strAdminConnection = conAdminDB.ConnectionString.ToString()    My.Settings.SetUserOverride("AdminConnectionString", strAdminConnection)    ...    End Sub     ' retrieves data from the database    Public Function getDataTable(ByVal sqlStatement As String) As DataTable         Dim ds As New DataSet         Dim dt As New DataTable         Dim da As New OleDbDataAdapter         Dim localCon As New OleDbConnection           localCon.ConnectionString = strAdminConnection          Using localCon             Dim command As OleDbCommand = localCon.CreateCommand()             command.CommandText = sqlStatement             localCon.Open()             da.SelectCommand = command             da.Fill(dt)             getDataTable = dt         End Using      End Function End Class   When I call this function from my Word 2007 Template project everything works fine; no errors. But when I run it from the console application it throws the following exception     ex = {"The 'Microsoft.ACE.OLEDB.12.0'   provider is not registered on the   local machine."}   Both projects have the same reference and the console application did work when I first wrote it (a while ago) but now it has stopped work.  I must be missing something but I don't know what.  Any ideas?


I am a Nigerian citizen on vacation in the US and would like to visit Jamaica for two weeks do I need a Jamaica visa?


How to fix /var/lib/sudo writable by non-owner?

Good afternoon.  My question is: When I update the Linux repositories with the command sudo apt-get update and sudo apt-get upgrade, some error occurs:  sudo: /var/lib/sudo writable by non-owner (040777), should be mode 0700   What do I need to do to avoid this error?


I was asked to find limit of $f(x,y)= \frac{\sin^2 (x-y)}{|x|+|y|}$ as $(x,y)$ approaches $(0,0)$. I have an idea that it tends to $0$, but can't find a suitable way to proceed.Please help with any suggestions to proceed.  as per suggestions I tried by converting the given function to polar co-ordinates.  so $\frac {(x-y)^2}{|x|+|y|}$. which gives  $r\cdot \frac{(\cos(t)-\sin(t))^2}{(\cos(t)+\sin(t))}$. On using the limit as r goes to zero, we get answer as zero. Is there anything else to be taken care in this case?


Make a div fill the height of the remaining screen space

I am working on a web application where I want the content to fill the height of the entire screen.  The page has a header, which contains a logo, and account information. This could be an arbitrary height. I want the content div to fill the rest of the page to the bottom.  I have a header div and a content div. At the moment I am using a table for the layout like so:  CSS and HTML    #page {     height: 100%; width: 100% }  #tdcontent {     height: 100%; }  #content {     overflow: auto; /* or overflow: hidden; */ }

...

...

     The entire height of the page is filled, and no scrolling is required.  For anything inside the content div, setting top: 0; will put it right underneath the header. Sometimes the content will be a real table, with its height set to 100%. Putting header inside content will not allow this to work.  Is there a way to achieve the same effect without using the table?  Update:  Elements inside the content div will have heights set to percentages as well. So something at 100% inside the div will fill it to the bottom. As will two elements at 50%.  Update 2:  For instance, if the header takes up 20% of the screen's height, a table specified at 50% inside #content would take up 40% of the screen space. So far, wrapping the entire thing in a table is the only thing that works.


How to break all the nested loops? (Python)

Many times happened to me that I was coding 3 or 4 nested loops, the problem is that with the break statement, I could only skip one of the loops and the rest of those would continue to proceed...  Is there anyway to break all of the nested loops?  ex:  a = 3 b = 4 c = 5 while a <= 333:     b = a + 1     while  b <= 500:         c = 1000 - a - b         while c < 500:             if c**2 == (a**2) + (b**2) and a + b + c = 1000:                 print("this is the first number : ", a)                 print("this is the second number : " ,b)                 print("and this is the third number : " ,c)                 break             else :                 c +=1         b +=1       a +=1     print(a)   It's the code I have written for Project Euler #9!        when the condition of if statement is met... how can I stop those while loops from running?


Installing graphics drivers for GeForce 8500 GT

Using the latest Ubuntu 13.10 and trying to get the proprietary drivers for my  GeForce 8500 GT. But it doesn't show in the Additional settings. It's blank. Am I doing something wrong or should I download it from the Nvidia homepage? How do I install it? Step by step would be awesome for me as a non-geek.


My computer is already connected to a 100Mbps LAN.  I can use wvdial to connect to internet using a modem when I have my LAN disconnected.   Now, I want to share this modem internet to one of the IP addresses available on LAN. Say 10.100.99.56 for example.  First of all, can it be done? How do I go about doing that?


How do I do a DELETE in MySQL with NOT IN?

I'm getting this error when running the code:     Error Code: 1093. You can't specify target table 'details' for update   in FROM clause   DELETE FROM details WHERE detail NOT IN  (     SELECT detail      FROM user_details     JOIN data ON user_details.data_iddata = data.iddata     JOIN details ON details.iddetails = data.details_iddetails )   What am I doing wrong here?


On a Mac, is there a way to switch spaces only using the keyboard?

I want to be able to do this only with the keyboard.


Given an invertible matrix $A$ such that all elements in $A$ and in $𝐴^{−1}$ are integers, find $|𝐴^4|$

I find this question very interesting, but I am having trouble figuring out how to approach the problem.   I know that the $\det(A^{-1}) = 1/\det(A)$, but I'm unsure of where to go from here. If someone can send me in the right direction, it would be very much appreciated.   Thanks in advance,  Tommy.


How to write conditional expression in LaTeX with text and math

Being new in LaTeX I don't know where to look for the proper resources. I know this is probably documented for easily somewhere out there, but I'm struggling with knowing where to look - any help isappreciated. How would you reproduce in LaTeX this conditional expression with one curly brace on the left side?


Lack of disclosure where disclosure is required vs. voluntary disclosure where none is strictly required

Problem  (The question will be found at the end, Question.)  As a user of any Stack Exchange's community, you most likely stumbled through a post where for you that would be considered spam, but you're not quite sure how to proceed, because different communities / users have different expectations to what spam really is.  Let's take as example / inspiration two situations I've encountered recently (this doesn't mean the answer to this question is solely based in them).    Situation 1  On , when reading a user's answer, I found another answer that has a "See Also"  section at the end, including many links to other answers from the same user inside of the community, without disclosing the affiliation.  I created a , explained the situation and still don't know how to proceed. From 's comment, I've noticed a specific approach to spam (which I didn't read anywhere in the documentation):     Links within the same site are IMHO unproblematic. Trying to drive   traffic to an external site is what the disclosure requirement is   supposed to discourage.     Situation 2  On Stack Overflow, when reading about converting  to SQL, I found a post from a user mentioning a specific tool and linking to an external site. There was no doubt the user was the creator of the tool.  After analyzing the Q&As where the tool was mentioned, noticed five (out of 25) was from the same user (creator of the tool) and at least two from team member(s). From all the seven answers, only one of the team member(s)'s posts disclosed the affiliation.  I flagged as spam (all but one), explaining in the comments why I've done that. The flag was accepted for the user creator of the tool, which then edited the answers to include     (Disclaimer: I help run the tool)   (I am not sure how acceptable such edits are though, but this would be a different question.)  The other still .    Question  I would like to understand when we should flag a post as spam and when not, considering what was mentioned by :     lack of disclosure where disclosure is required VS voluntary   disclosure where none is strictly required.   Note: I know of two good questions including similar information, namely:


Serving wp-includes (front-end) javascript from a different domain?

The WordPress Codex points to an extremely simple way to change the URL of the wp-content directory, which is, adding this in wp-config.php:  define( 'WP_CONTENT_URL', 'http://example.com/wp-content');   And that does the job of serving most of the JavaScript and CSS files on my website from the different domain, except two.  http://mywebsite.com/wp-includes/js/comment-reply.js http://mywebsite.com/wp-includes/js/quicktags.js   The reason is very clear — these JavaScript files are served from within the wp-includes directory, which is not affected by the aforementioned rule.  So, is there a similar or simple method to have them served from example.com i.e. the domain of my choice? or is unregistering and enqueuing the scripts from a custom URL (done in functions.php) the only way?


Which Visa or pass required for attending software workshop in Singapore?

I am joining an entrepreneurship program in SG and traveling on 10th July. I applied for EntrePass Visa on 12 june but i think it'll still take some time to get IPA letter so i can't enter in SG as of now. What is my best bet to enter in Singapore till I get EntrePass Visa? A work pass/tourist visa?    I'm from India.


Can Java be used for developing games for Android in Unity3D

I only know Java Programming Language and no other. Can I develop games for Android in Unity3D using Java?


Unity, Files/Nautilus doesn't appear on alt+tab switcher

When I press alt+tab to change between windows, the  "Files" window doesn't appear. It's really annoying because when I try to access the previously opened "Files" window, I have to minimize everything or open another "Files" process so I end the day with a lot of opened "Files" instances.


How can I execute Drush commands programmatically?

I'm working on a Drupal 8 site, and part of the requirement is giving the client a page where they can click a button to do a particular task. I am able to do this using a Drush command from the command line, but I want to do it from a module.  I had seen code using either php_exec() or drush_invoke_process(). How can I use this function?


Create a rounded inflated square in illustrator / photoshop

I am wondering how to create a path for this inflated square shape in illustrator or photoshop... btw how is is the shape called?


Find Taylor series for function and use it to calculate sum of a series.

So i need in finding the correct Taylor series(expansion) for the following function and use it in calculating the sum of series:  $$f(x)=\ln(\frac{1-4x^2}{1+4x^2})$$  $$\sum_{n=1}^{\infty}\frac{1}{(2n-1)4^{2n-1}}$$  so i did this:  $$f(x)=\ln(\frac{1-4x^2}{1+4x^2})=\ln(\frac{1+4x^2-4x^2-4x^2}{1+4x^2})$$ $$\ln(1+\frac{-8x^2}{1+4x^2})$$  and then i used this :  $$\ln(1+x)=\sum_{n=1}^{\infty}\frac{(-1)^n x^{n+1}}{n+1}$$ for $$x\in(-1,1]$$  and then i got that:  $$\sum_{n=1}^{\infty}\frac{(-1)^n (\frac{-8x^2}{1+4x^2})^{n+1}}{n+1}$$  and i modified the bounds for x.  Firstly, i don't really know if foudn the correct taylor series, and secondly it does not really help with caculating sum. Help ragarding both taylor series and caculating sum would be appreciated. Thank you in advance.


Differences between "abc" + "de" and "abc" + de (de = "de") in Java?

I run the following code and get the results shown in the comments. I know the differences between == and .equals(). What I don't understand is why my code in the second line has different results from the code in the third line.       String de = "de"; //  String abcde = "abc" + "de"; // abcde == "abcde" reture true     String abcde = "abc" + de;   // abcde == "abcde" reture false;     System.out.println();     System.out.println(abcde=="abcde");     System.out.println(de=="de");   In trying to debug this I used the javap -c command and got the following output 'code' for the first string concatenation:           Code:  0:   ldc     #9; //String de  2:   astore_1  3:   new     #10; //class java/lang/StringBuilder  6:   dup  7:   invokespecial   #11; //Method java/lang/StringBuilder."<init>":()V  10:  ldc     #4; //String abc  12:  invokevirtual   #12; //Method java/lang/StringBuilder.append:(Ljava/lang  String;)Ljava/lang/StringBuilder;  15:  aload_1  16:  invokevirtual   #12; //Method java/lang/StringBuilder.append:(Ljava/lang  String;)Ljava/lang/StringBuilder;    19:  invokevirtual   #13; //Method java/lang/StringBuilder.toString:()Ljava/l  ng/String;    22:  astore_2    23:  getstatic       #14; //Field java/lang/System.out:Ljava/io/PrintStream;    26:  invokevirtual   #15; //Method java/io/PrintStream.println:()V    29:  getstatic       #14; //Field java/lang/System.out:Ljava/io/PrintStream;    32:  aload_2    33:  ldc     #16; //String abcde    35:  if_acmpne       42    38:  iconst_1    39:  goto    43    42:  iconst_0    43:  invokevirtual   #17; //Method java/io/PrintStream.println:(Z)V    46:  getstatic       #14; //Field java/lang/System.out:Ljava/io/PrintStream;    49:  aload_1    50:  ldc     #9; //String de    52:  if_acmpne       59    55:  iconst_1    56:  goto    60    59:  iconst_0    60:  invokevirtual   #17; //Method java/io/PrintStream.println:(Z)V    63:  return   And the output for the second string concatenation:    I am not so familiar with this 'code' and can't see any reason why these differences exists. So could anyone explain why those differences happen?  Related


I want to use ubuntu for my small office with 15 Computers. Which version will be the best as i want monitor all the computers from my computer so that i can see there working progress as will as i can monitor there screen and history of there work for the day and is it possible to kill some process of there computers through my computer and monitor there browsing history or restrict to open few websites.


How to find creation and annihilation operators?

I get confused when trying to find this. Please describe it as simply as possible, but keep in mind I have no budget whatsoever to pay for textbooks, so here goes:  How do you find the creation and annihilation operators of a scalar field given the Lagrangian density?


If I'm not mistaken, a total of 14 Valar, not including Melkor, are named in The Silmarillion.  Are these the only Valar, or are there others who are not named/mentioned?    Bonus question:  As I understand it, all the Ainur were either Valar or Maiar, and any Ainur who isn't a Vala is a Maia, and vice versa (the special case of Melkor notwithstanding).  Is this correct?


I have just upgraded to 18.04 and am trying to install upgrades and or new programd via the terminal. I get the following message    digikam-private-libs : Depends: libkf5sane5 (>= 4.3.4) but it is not going to be installed                         Depends: libqtav1 but it is not going to be installed                         Depends: libqtavwidgets1 but it is not going to be installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution). i have tried  sudo apt --fix broken install and get this message.dpkg-deb: error: paste subprocess was killed by signal (Broken pipe) Preparing to unpack .../libqtav1_1.12.0+ds-4build3_amd64.deb ... Unpacking libqtav1:amd64 (1.12.0+ds-4build3) ... dpkg: error processing archive /var/cache/apt/archives/libqtav1_1.12.0+ds-4build3_amd64.deb (--unpack):  trying to overwrite '/usr/lib/x86_64-linux-gnu/libQtAV.so.1', which is also in package libqtav:amd64 1.11.0~git170314-xenial~ppa1 Preparing to unpack .../libqtavwidgets1_1.12.0+ds-4build3_amd64.deb ... Unpacking libqtavwidgets1:amd64 (1.12.0+ds-4build3) ... dpkg: error processing archive /var/cache/apt/archives/libqtavwidgets1_1.12.0+ds-4build3_amd64.deb (--unpack):  trying to overwrite '/usr/lib/x86_64-linux-gnu/libQtAVWidgets.so.1', which is also in package libqtavwidgets:amd64 1.11.0~git170314-xenial~ppa1 Errors were encountered while processing:  /var/cache/apt/archives/libkf5sane5_17.12.3-0ubuntu1_amd64.deb  /var/cache/apt/archives/libqtav1_1.12.0+ds-4build3_amd64.deb  /var/cache/apt/archives/libqtavwidgets1_1.12.0+ds-4build3_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)   I have tried to apt remove digikam and apt purge digikam and recieved this message   Reading package lists... Done Building dependency tree        Reading state information... Done You might want to run 'apt --fix-broken install' to correct these. The following packages have unmet dependencies:  digikam-private-libs : Depends: libkf5sane5 (>= 4.3.4) but it is not going to be installed                         Depends: libqtav1 but it is not going to be installed                         Depends: libqtavwidgets1 but it is not going to be installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).   I have tried to install aptitude and get the same message. Digikam appears as not installed in the Software center and when I press install I get an error message.Everything seem to work fine other than that.           Thanks a bunch,,,,,Jacques


Why was helium hydride ion HeH$^+$, not hydrogen H$_2$, the first molecule formed in the early universe?

Why was helium hydride ion HeH$^+$, and not hydrogen H$_2$, the first molecule formed in the early universe?  How did NASA scientists confirm it?


How to make a game object rotate around its Axis in Unity?

Ok So i making this simple platformer with a ball. So basically i have A pickup / Collectible that is a Coin. I want the coin till it gets collected by the ball to keep rotating around it axis . Also I know I could do this by adding a Animation but I would prefer doing it Via A C# Script. So please if anybody knows how then Tell me. Thanks


In quantum mechanics, is $|\psi\rangle$ equal to $\psi(x)$?

So I'm going through my notes and I think I've confused myself. We often imply  $$ |\psi\rangle \to \psi(x)\\ \langle\psi| \to \psi(x)^* $$ for instance when we talk about eigenvalue equations we interpret  $$ \hat{H}|\psi\rangle =E|\psi\rangle $$ as simply  $$ \hat{H}\psi(x)=E\psi(x) $$ but I don't understand why we say $|\psi\rangle \to \psi(x)$ because if that was the case then  $$ \langle\psi|\psi\rangle=|\psi|^2 $$ when clearly $$ \langle\psi|\psi\rangle=\int_{-\infty}^\infty |\psi|^2 dx = 1 $$ I'm obviously missing something simple, could anyone point out where I'm going wrong?


I made a code for Binary Search Tree. It has only Insert function. I am getting an error at insert() function's while condition.   Exception in thread "main" java.lang.NullPointerException     at tree.LinkNode.insert(BST.java)     at tree.BST.main(BST.java)   I have initialised the Dynamic variable stub in the insert() function using keyword new.  Where did I go wrong?  The code has three class:   BST (contain the main() class) LinkNode (contains LinkNode references and the insert() function) MyLinkNode (A class to initialise  the root node)   Code:  public class BST {      public static void main(String[] args){     MyLinkNode start = new MyLinkNode(42);     LinkNode node = new LinkNode();     node.insert(start.root, 36);     } }  class LinkNode{      LinkNode leftnode;     LinkNode rightnode;     LinkNode parentnode;     int value;       public LinkNode() {}       public String insert(LinkNode root, int val){         LinkNode stub = new LinkNode();         stub = root;         while(stub.leftnode == null || stub.rightnode == null){             if(stub.value < val){                 stub = stub.leftnode ;             }             else if(stub.value > val){                 stub = stub.rightnode;             }             else{                 System.out.println("You Cannot insert a value that already exist in the tree.\nPlease insert a different value");                 return "";             }         }         stub.value = val;         stub.leftnode = null;         stub.rightnode = null;         this.parentnode = stub;         return "Insertion Succesful";     } }  class MyLinkNode{      LinkNode root;      public MyLinkNode(int val){         root = new LinkNode();         root.value = val;         root.parentnode = null;         root.leftnode = null;         root.rightnode = null;     } }


I have a little issue this morning when I rebooted my MBP 2012. In reality, I got rid of OSX to Ubuntu, and when I rebooted my MBP, the following image appears. Could anyone be able to tell me what do I have to do to retrieve my OS without losing anything? I know I could use cmd + R, but I will lose everything.


A photon is pure energy, zero mass. Different photons have different wave length and carry a different amount of energy.   Now, it seems logical that a high energy photon can be split into 2 low energy photons. I don't know if this could happen via some natural decay or under an external influence or not at all.  Please explain, thank you.  P.s. this is not a duplicate of the previous similar question about splitting a photon. The other question presents a photon as a particle, where as this one considers a photon as energy. I think this leads to different lines of thought.


Linear Regression with Non-numeric Variables

I am trying to run a regression on non-numeric survey data. The question being, does flour type or mixing type lead to a better cake review? Dummy Data is  and factors are explained below   Flour Type White Flour, Whole Wheat Flour, Gluten-Free Flour  Mixing Type Kitchen-Aid, Hand Mixed, Commercial Mixer  Cake Review Horrible Cake, Bad Cake, Okay Cake, Good Cake, Great Cake  Can you code the factors into numeric data?


Are there any Ubuntu-based equivalents of Corel Draw, PageMaker, PhotoShop and Quark Express

Are there any Ubuntu based application for the below listed softwares.   Corel Draw - latest version PageMaker - Latest version Photoshop - Latest version Quark Express - latest version


Is there SEO conflict if making identical posts on Medium and on a standalone website?

I’m writing a series of blog posts and I’m finding a little bit of a conundrum. I want the audience that can be manufactured on Medium but I also want the SEO that comes from long form text on my website.  Is there any type of SEO conflict that would arise from putting the exact same posts on both?


Did Future Zen-Oh destroy only Future Universe 7 or all 12 Future universes?

If he destroyed only Future Universe 7 then other 11 Universes do not have a ruler God now because he went to the past, isn't that very bad?  If he destroyed all 12 Universes then why did he do that if only Universe 7 was polluted by Zamasu?


How to make a certain bash script execute when I enter a certain directory?

I have multiple projects, say, in Python. In each project I have "scripts/main_script.sh". Is there any way to make  "scripts/main_script.sh" execute automatically when I go to the base directory of a project?   Namely, when I do cd /home/my_name/python_project123, the script /home/my_name/python_project123/scripts/main_script.sh should execute automatically.


Function on $[a,b]$ that satisfies a Hölder condition of order $\alpha > 1 $ is constant

I want to show that if a function $f:[a,b]\rightarrow \mathbb R$ satisfies a Hölder condition of order $\alpha > 1 $ then it is constant.  The way I think of it is as follows:  $$|f(x) - f(y)| < K|x-y|^\alpha$$  $$\frac{|f(x) - f(y)|} {|x-y]}  < K|x-y|^{\alpha -1}$$  $$\lim_{y\rightarrow x} \frac{|f(x) - f(y)|} {|x-y]} \le \lim_{y\rightarrow x}  K|x-y|^{\alpha -1} =0 $$ As the limit is $0$, we can remove the modulus, so we get:  $$\lim_{y\rightarrow x} \frac{f(x) - f(y)} {x-y} = 0$$ So $f$ is derivable and $f'(x) = 0$ for all $x$ in $[a,b]$. Note that the reason we can add the limit $y\rightarrow x$ is because $[a,b]$ is closed in $\mathbb R$.  However, the question gives as a hint using the mean value theorem. I am not sure why one should do that. You would first have to prove that $f$ is derivable in a similar manner to what I did, and then prove that $f$ is constant. Or is there a simpler way to do it and I am missing it?  Also please inform me of any mistakes I did in the proof (if any)/ Thank you!


How to delete a full stop on reference ending

According to APA rules, after each reference there must the digital object identification (doi). I use JabRef as a reference manager and for some reason, if I put an article doi on its "doi" field, it won't show up after the build on my editor, but if I put the doi on its "note" field it shows up. However, it's adding a period after the note field. I need a way to have the reference without an ending period.  Here's the LaTex document. I use TexPad as my editor.  \documentclass[12pt,a4paper,oneside]{report} \usepackage[utf8]{inputenc} \usepackage[portuguese, english]{babel} \usepackage[T1]{fontenc} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage[sort, longnamesfirst]{natbib} \usepackage[strings]{underscore} \bibliographystyle{newapa}  \usepackage{sectsty} \chapterfont{\fontsize{14}{15}\selectfont} \sectionfont{\fontsize{12}{15}\selectfont} \subsectionfont{\fontsize{12}{15}\selectfont} \renewcommand\bibsection{\section*{Referências}} \bibpunct[:\ ]{(}{)}{;}{a}{,}{,}  \title{} \date{} \makeindex  \begin{document}  \cite{aldous-newviewsgrandparents-1995}  \bibliography{/Users/Ricardo/Documents/Ricardo/library2.bib}  \end{document}   It produces this:     Aldous, J. (1995). New views of grandparents in intergenera- tional   context. Journal of Family Issues, 16(1), 104–122. doi:   10.1177/019251395016001006.   I need that last period out.  Thanks.


Install php-fpm 5.6 on Ubuntu Xenial (16.04)

I can see various solutions available for php5.6, but is it possible to get php-fpm 5.6 for Xenial?  Or do I have to manually download and build the package?


Where $x_n$ is the solution of $\tan(x)=x$ in the interval $(n\pi ,n\pi +\frac\pi2)$ , $n\ge0$.  Any hints on how to approach this problem with elementary methods in the first place? The answer should be $\frac1\pi$. $$\lim_{n\to\infty}n\biggl(n\pi+\frac\pi2-x_n\biggr)$$


I passed the ball to the forward, who was then one on one with the goalkeeper.  The forward shoots on first touch and hits the post.  The ball rebounds, and with no one else touching the ball, the forward scored.   Does this count as an assist for me?


Time Machine stopped this morning, stating it has too little disk space left. It wants to back up 200 gigs, but my local hard drive has 240 gig used and 150 gig are excluded in the Time Machine options, so this leaves 90 gigs of data at most that can be backed up, and I am pretty sure only very few files have changed (no big update or similar). So I would estimate a backup of, at most, 1 gig.  How can this happen? Any idea?


I'm new to Ubuntu/Linux. When I try to open Ubuntu Software it shows it's loading, but after a few seconds it stops and nothing happens. When I run snap-store in the terminal it says: /snap/snap-store/518/usr/bin/snap-store: symbol lookup error: /snap/snap-store/518/gnome-platform/usr/lib/x86_64-linux-gnu/libgtk-3.so.0: undefined symbol: atk_plug_set_child"


What would be a good use for a memristor?

I am an electronics hobbyist and I found something that I hadn't heard of before, named Memristor. I found  on this site and I want to know that how it can be used. In which type of application are these components used?


How to prove that $\lim\limits_{n\rightarrow \infty} \frac{1}{n^2}\sum\limits_{k=1}^{n}(n \bmod k)=1-\frac{\pi^2}{12}$?

I learnt that      $$\lim_{n\rightarrow \infty} \frac{1}{n^2}\sum_{k=1}^{n}(n \bmod k)=1-\frac{\pi^2}{12}$$   where $ (n{\bmod {k}})$ is the remainder upon division of $n$ by $k$. However, I am not sure how to arrive at this equation.   I understand that   $$\infty \bmod 1 = 0$$ But I don't see how infinity can mod anything else. For example,  $$\infty \bmod 2 = ~?$$ $$\infty \bmod 3 = ~?$$ I am thinking about either converting the limit into an integral, but I haven't figured out how. Any hints on how to evaluate the limit?  I also found a more general form of the limit (not sure if this will help with the original question): For $a>0,~b\geq1$, $$\lim_{n\rightarrow \infty} \frac{1}{n^2}\sum_{k=1}^{an}(an \bmod bk)=a^2\left(1-\frac{\pi^2}{12b}\right)$$


Are estimates of regression coefficients uncorrelated?

Consider a simple regression (normality not assumed): $$Y_i = a + b X_i + e_i,$$ where $e_i$ is with mean $0$ and standard deviation $\sigma$. Are the Least Square Estimates of $a$ and $b$ uncorrelated?


QGIS: Jump to next feature (like in Atlas)

I would like to jump to next feature in my attribute table. I know this is possible with the "print composer" using "atlas".   Is there any possibility to jump to the next feature in my attribute table using the standard QGIS canvas?


Is `/usr/lib/binfmt-support/run-detectors` supposed to choose mono or wine to run a windows or .net executable?

On Lubuntu 18.04, Is /usr/lib/binfmt-support/run-detectors   supposed to choose mono or wine to run a windows or .net executable?  $ cat /proc/sys/fs/binfmt_misc/cli  enabled interpreter /usr/lib/binfmt-support/run-detectors flags:  offset 0 magic 4d5a  $ file /usr/lib/binfmt-support/run-detectors /usr/lib/binfmt-support/run-detectors: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=06509e829163c8e50781b5335883bf9a8ed47321, stripped   Why can't I run a Windows executable? How can I make run-detectors work?  $ ./PDFXCview.exe  run-detectors: unable to find an interpreter for ./PDFXCview.exe $ file ./PDFXCview.exe  ./PDFXCview.exe: PE32 executable (GUI) Intel 80386, for MS Windows  $ type wine wine is /usr/bin/wine   Thanks.


How to place random widgets in the Wordpress sidebar?

My pages have a sidebar with too many widgets, and it looks bad when the content is short and the sidebar is too long.  I want to randomize the widgets I'm showing in the sidebar. Meaning I will add all the potential widgets to the sidebar, and it will randomly only display a few.  I would also like some control over this, for example to have a few widgets always appear, and only the rest randomized.  I tried finding relevant plugins, but the only ones I found just randomized images or posts.. never different types of widgets.


How to remove encryption from all objects in SQL server?

I have more than a hundred encrypted procedures and functions that I want to decrypt. I tried using  decryption wizard for in place alter but I get the error "Definition is invalid. Can't find CREATE keyword". When I try to see the DDL script of a stored procedure, I get the error "A definition for the object dbo.pt_blocks cannot be shown because it is enrypted by a third party tool" I can not find a resolution to this. Are there any solutions or other tools available for this? Edit: I found  which mentions "take the source code and issue an ALTER command without the encryption option. Just take the source code and remove the WITH ENCRYPTION" How could I achieve this?


What are the advantages to booking a hotel via an online travel agent, rather than directly?

What are the advantages to booking a hotel via an online travel agent, rather than booking it directly with the hotel?  Is it price, trust, convenience or something else?


What can I use to repair a crack in the plastic layer of a bathtub?

I have a bathtub with a plastic (I think) surface layer which has a small crack in it. The crack is at the bottom, on the inside. Some sort of rusty liquid has now started to ooze out from the crack, which feels less than hygienic.  Before I replace the whole bathtub, I'd like to try to repair the crack. What approach would be the best here? What sealant would be recommended? It obviously needs to be both water-resistant and non-toxic.  I'm thankful for any advice!


Updated statistics about where our users are from

This  contains a breakdown of SO users by country, but it's quite old. It is possible to make another one with updated data? Thanks. EDIT: this was just posted on  :)


Brightness fn key shortcut doesn't work on ASUS laptop

The brightness shortcuts via fn key don't work.  I tried each solution from . After editing /etc/default/grub file I rebooted.  GRUB_CMDLINE_LINUX="acpi_osi=Linux" GRUB_CMDLINE_LINUX="acpi_backlight=vendor" GRUB_CMDLINE_LINUX="acpi_osi=linux acpi_backlight=vendor" GRUB_CMDLINE_LINUX="acpi_osi_Linux"   What other workarounds/solutions are there?  Relevant output:  $ sudo lshw -C display   *-display UNCLAIMED             description: 3D controller        product: GK107M [GeForce GT 750M]        vendor: NVIDIA Corporation        physical id: 0        bus info: pci@0000:01:00.0        version: a1        width: 64 bits        clock: 33MHz        capabilities: pm msi pciexpress bus_master cap_list        configuration: latency=0        resources: memory:f6000000-f6ffffff memory:e0000000-efffffff memory:f0000000-f1ffffff ioport:e000(size=128) memory:f7000000-f707ffff   *-display        description: VGA compatible controller        product: 4th Gen Core Processor Integrated Graphics Controller        vendor: Intel Corporation        physical id: 2        bus info: pci@0000:00:02.0        version: 06        width: 64 bits        clock: 33MHz        capabilities: msi pm vga_controller bus_master cap_list rom        configuration: driver=i915 latency=0        resources: irq:50 memory:f7400000-f77fffff memory:d0000000-dfffffff ioport:f000(size=64)


How to install ubuntu on hundreds or thousands of servers?

This is just a question out of curiosity, but I would like to know how can you install ubuntu on hundreds/thousands of machines at the same time?  Say I have 100 computer that come with no OS how can I install Ubuntu on them? Shall I proceed with the installation manually on each of them? If not what are the technologies and tools one should know?


Find command to list the directory names which consists only of "numbers" (0-9)

In a particular path, I have a few directories (date as filename), for example:   if the directory name is like 20180423 it should be listed if the directory name is like 20180423-backup or 20180423backup it should not be listed.


In this , suddenly I can't notify Ben Bitdiddle, typing "@B" won't show the autocomplete box. I have tried write "@Ben Bitdiddle" manual but after I enter, this notify words disappear (you can see yourself in this . Notify other people in other comment boxes on that same question still function. Refresh the page won't solve the problem. I use the latest Firefox version in Windoes 8.1.


I have a MacBook Pro and use an Apple Magic Mouse. I want to pair a wireless headset but have not been able, I cannot even see where to start.


If $f: \Bbb{N} \to \Bbb{N}$ is strictly increasing and $f(f(n))=3n$, find $f(2001)$.

I have this question which seems a little harder than I thought. It has been about an hour for me hitting aimless thoughts on this one. I can really use a hint here if some one knows how to tackle it.     Let $f: \Bbb{N} \to \Bbb{N}$ such that $f$ is strictly increasing and $f(f(n))=3n$ for all $n \in \Bbb{N}$. Find $f(2001)$.


Problem let $\mathrm P$ be the set of prime numbers ; $\forall(p,p+2)\in\mathrm P^2: p\times(p+2)=A_1 ,\quad A\in\mathrm N$ where $A_1$is written on the figure : $A_1=a_1^1a_2^1a_3^1....a_{n_0}^1$ where $(a_i^1)_{1\leq i\leq n_0}\subset\mathrm N $ So we put : $$g(n_0)=\displaystyle\sum_{i=1}^{i=n_0}a_i^1=a_1^1..a_{n_0}^1=A_2\quad ,A_2\in\mathrm N$$ Where $A_2$ is written on the figure : $A_2=a_1^2a_2^2a_3^2...a_{n_1}^2,\quad (a_i^2)_{1\leq i\leq n_1} \subset \mathrm N \quad \quad \text{and}\quad  n_1\leq n_0$ So we find : $$g(n_1)=\displaystyle\sum_{i=1}^{i=n_1}a_i^2$$ we reput the step until we finally get : $$g(1)=A_k=a_1^k=8 $$ for any $(p,p+2)\in \mathrm P^2$ Exemples: $$5\times7=35,\quad g(1)=3+5=8$$ $$11\times13=143,\quad g(1)=1+4+3=8$$ $$29\times31=899,\quad g(2)=8+9+9=26\implies g(1)=2+6=8$$ $$2027\times2029=4204088,\quad g(2)=6+8+5+5+8+3=35\implies g(1)=3+5=8$$ $$7877\times7879=62062883,\quad g(2)=6+2+6+2+8+8+3=35\implies g(1)=3+5=8$$  I applied these steps to almost all pairs of less than $3000$ and other pairs greater than $5000$ and i did not find any pair of primes refuting this property I found this problem whill studying one of this articles to prove thet prime dont'end using the topologies in this  I wanted to ask if this problem existes before or not because i searched and found nothing about it So this problem did not exist, how then can I prove or disprove this problem ,even though I did not find any in these results I await  your suggestions and information about this ,thank you


I needed to use the ulem package to underline sections and subsections, and it works great. The problem is now that the bibliography of my document got messed up.  This is how I have configured it:  \usepackage[natbib, backend=biber, sorting=none, doi=false, eprint=false, maxnames=99, firstinits=true, style=numeric-comp, url=false, isbn=false, defernumbers=true]{biblatex} \usepackage{setspace} % reduce space of bibliographic entries  % suppress In: in bibliographic entries \renewbibmacro{in:}{}   But since I started using the ulem package I get this type of bibliography:    How can I solve this? I guess the issue is that biber is using \emph to set the journal names in italic. Is there a way to change that formatting?


python showing too many digits after decimal separator

I tried : x = 3.4  print(x - math.floor(x)) In both in console and Jupyter Notebook, the result shows 0.3999999999999999 but why not just 0.4 as the result. Thanks.


All solutions of a Pell's equation $x^2-2y^2=-1$

I want to prove the algorithm below produces all solutions of $x^2-2y^2=-1$. Although this algorithms have been already posted to another posts on mathstack exchange, they don't explain why it find all solution. This is the most important (and difficult) part to prove.  I want to get all integer solutions of  $$x^2-2y^2=-1$$ for $x,y>0$. This equation is known as Pell's equation. The minimum solution is $(x,y)=(1,1)$. If we consider the norm of the element of $\mathbb{Q}[\sqrt{2}]$, any $(1+\sqrt2)^k=x_k+\sqrt2y_k$ satisfies $N(x_k+\sqrt2y_k)=N(1+\sqrt{2})^k=(-1)^k$. Thus, we get $$x_k^2-2y_k^2=(-1)^k.$$ So, $(x_{2k-1},y_{2k-1})$ is the solution of $x^2-2y^2=-1.$ I want to know if there is any other solution or to prove this is the only solution.


How to sort a file by a column which is a mix of numeric, alphabet and punctuation characters?

I have a text file which is of the form -   b   SN:2 d   SN:5 f   SN:10 g   SN:11 h   SN:15 i   SA:3 j   SN:1 k   SN:4   And I want to sort by the second column, actually the numerical value in the second column.  I've tried -   $ sort -n -k2,2 file $ sort -k2.4,2.5n file   but nothing seems to work.


Safety railings in the Star Wars universe

Is there anything in the Star Wars canon that explains the alarming lack of safety railings on various structures in the Republic?  An example from The Empire Strikes Back, a landing pad on Bespin:    The ankle level curb might be considered a weak nod toward safety but I would not want to be on that platform if winds were high.  Given that Bespin is a city in the clouds, winds would be high a lot of the time.  There are other examples, such as the open catwalks over an abyss in the first Death Star, the balconies on Coruscant, open staircases everywhere, and the catwalks on which Qui-Gon, Obi-Wan and Darth Maul fought on Naboo.  There are some exceptions, too.  The Ewoks believed in safety apparently and used railings on the catwalks between their tree dwellings.  On Bespin in the lower level where Vader and Luke fought there is a railing on the gantry stretching over the abyss.    No note is made note of this situation in the movies, but there is much more Star Wars related material than I will ever see or read.  Does any of it address the railings issue?


How can I find out the encoding method that gedit uses to open a text file?

Gedit successfully guessed the correct encoding charset of a text file. I would like to find out what the charset is, but couldn't find a way in its menu. How can I do that? Thanks.


C# "internal" access modifier when doing unit testing

I'm new to unit testing and I'm trying to figure out if I should start using more of internal access modifier. I know that if we use internal and set the assembly variable InternalsVisibleTo, we can test functions that we don't want to declare public from the testing project. This makes me think that I should just always use internal because at least each project (should?) have its own testing project. Can you guys tell me why I shouldn't do this? When should I use private?


set of zeros on brownian motion is unbounded

Let $W_t$ be a brownian motion.  Show that the set $S=\{t: W_t=0 \}$ is unbounded with probability one. My attempt:  Suppose that there is a set $A$ with positive measure such that $S$ is bounded.  We know that brownian motion is a strong markov process so I'd assume we try to make some sort of stopping time to help us.  For example, $\sup\{t: W_t=0\}$.


So I am trying to make this circle work and make it viewable but like it not showing up right. I mean I can see it but it looks as if it is stuck in wire frame mode. I'm New to blender so I don't really know my way around in it but I would like it if you could help


Why is not the ring $\mathbb{Z}[2\sqrt{2}]$ a unique factorization domain?

Why is not the polynomial ring $R[x]$ a unique factorization domain, where $R$ is the quadratic integer ring $\mathbb{Z}[2\sqrt{2}]$?    I'm trying to find a irreducible nonprime element or something but I don't know where to start.


The union of a strictly increasing sequence of $\sigma$-algebras is not a $\sigma$-algebra

The union of a sequence of $\sigma$-algebras need not be a $\sigma$-algebra, but how do I prove the stronger statement below?     Let $\mathcal{F}_n$ be a sequence of   $\sigma$-algebras. If the inclusion   $\mathcal{F}_n \subsetneqq \mathcal{F}_{n+1} $ is strict, then   the union   $\bigcup_{n=1}^{\infty}\mathcal{F}_n$   is not a $\sigma$-algebra.