Below is the code invoked onItemSelected in a spinner. At times I am getting a null pointer exception even when the app is closed. The image of the bug is attached in this post.          /**          * Store the selected product          * @param parent          * @param view          * @param position          * @param id          */         @Override         public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {              QuickListItem selectedSpinnerProduct = productAdapter.getItem(position);              if (selectedSpinnerProduct != null) {                 mgrApp.storeSharedPrefLong(ConstantsQuickList.SHARED_PREF_PRODUCT_ID,                         selectedSpinnerProduct.getId());             }              SpannableStringBuilder builder = getPendingCallCount(products,                     selectedSpinnerProduct);              ((TextView) view).setText(builder, TextView.BufferType.SPANNABLE);              //Hide the performance tracker as product will change             ViewProspects.crdvPerformanceTracker.setVisibility(View.GONE);             populateSalesTracker(typeOfOperation,ConstantsProspects.INVALID_STRING);          }

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


Can somebody walk me through the exact steps of getting ubuntu installed on the XPS 7390 2-in-1? I got the installer to boot but it goes straight to a black screen. SATA set to AHCI, Safeboot tried both on and off. Thanks!

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents:


When setting up virtual machines on the various host systems I've used, be they Hyper-V, VMware or KVM, I have always allocated RAM in amounts that match physical memory configurations - e.g. to add 1GB of RAM I would add 1024MB, for 6GB of RAM I would add 6 x 1024 = 6144MB.  I realised that I've never thought about why I do this, it was just The Way Things Were Done at a previous workplace that I never questioned.  So, my question is, aside from the fact that it means virtualised operating systems can neatly round the allocated RAM to the nearest GB, are there any disadvantages to allocating RAM in quantities that are not powers of two, or multiples thereof? e.g. would there be any downside to adding 500MB of RAM, 750MB of RAM, or 1001MB of RAM?  Alternately, are there any advantages that would make this the recommended way of doing things?  I've left the question open-ended as far as host OS as I'd be interested to see if there are different considerations for the different hosts.

This is going to seem like a silly question, but many many years ago I somehow got it into my head, perhaps from reading an article or speaking to people 'in the know' that a computer should not be run with 'odd' amounts of ram, such as 3,  5, 7 etc...    Is there any truth in this whatsoever?  I have a vmware environment with many servers in it.  I want to go through and alter the amounts of ram to reduce the overall ram usage and in many cases I want to give a server 3gb of ram as opposed to 4 or 2.


Could anyone help me solve the below problem?     Use the axiom of choice and the generalized principle of recursive definition to show that each infinite set $X$ contains a countably infinite sebest? (H.L Royden, Real Anaysis, 3rd edition, 1988)   Also, can one prove it without using the axiom of choice or the principle of recursive definition?  Thank you!

Prove that a set $A$ is infinite if and only if $A$ contains a countable subset $C$. I know I have to build a sequence and then I'll get a countable subset, but I don't know how to build that sequence from a infinite set.


We have just interviewed an applicant who the committee believes is best qualified for the position.      We have just interviewed an applicant whom the committee believes is best qualified for the position.   Which is grammatically correct and what is difference between them?  When and how to use who and whom in this type of sentences? Please explain to me.

Many times, I've been asked the difference between "who" and "whom". I myself know the difference, but it is hard to explain to others. What is the easiest way to explain it to those with a basic understanding of English? A mnemonic (if possible) would help.


Linklist have static class named as ENTRY  private static class Entry<E> { E element; Entry<E> next; Entry<E> previous;  Entry(E paramE, Entry<E> paramEntry1, Entry<E> paramEntry2){   this.element = paramE;   this.next = paramEntry1;   this.previous = paramEntry2; } }   And an object has created inside LinkList  private transient Entry<E> header = new Entry(null, null, null);   Following are my questions?   Why it is static ? If we define more than two LinkList will it share the same static class 'Entry'?

What is the main difference between an inner class and a static nested class in Java? Does design / implementation play a role in choosing one of these?


Theres a dependency error when i try to install mailspring it was like this: usr@user-HP-EliteBook-8470p:~$ sudo dpkg -i ~/Downloads/mailspring-1.8.0-amd64.deb Selecting previously unselected package mailspring. (Reading database ... 221480 files and directories currently installed.) Preparing to unpack .../mailspring-1.8.0-amd64.deb ... Unpacking mailspring (1.8.0) ... dpkg: dependency problems prevent configuration of mailspring:  mailspring depends on libsecret-1-dev; however:   Package libsecret-1-dev is not installed.  mailspring depends on gconf2; however:   Package gconf2 is not installed.  dpkg: error processing package mailspring (--install):  dependency problems - leaving unconfigured Processing triggers for hicolor-icon-theme (0.17-2) ... Processing triggers for gnome-menus (3.36.0-1ubuntu1) ... Processing triggers for desktop-file-utils (0.24-1ubuntu3) ... Processing triggers for mime-support (3.64ubuntu1) ... Errors were encountered while processing:  mailspring

There are now errors when updating and I cannot install most software due to a corrupted  /etc/apt/sources.list   file. Is there a copy I can download to replace it?  The file would be for Ubuntu 12.04 (Final Beta) in the United States.


On my Macbook Air A1466 the shift key seems to be constantly pressed, even during boot so it only boots into safe mode because of this.  The issue exists both before and after replacing the keyboard with a brand new one!  This is what I've tried:   Reinstalled MacOS Replaced the whole keyboard (painful process) Reset NVRAM (alt + cmd + p + r) during startup Hooked up an external keyboard (this one works fine, but shift is still held down) Tried Keyremapper:  which helps WITHIN the OS, but not during boot    Any ideas?  PS: This is not a duplicate of . There it's simply a keyboard hardware issue, which is not the case here since the keyboard has been replaced.

I recently spilled water on my computers keyboard, and as a result the left shift key seems to be stuck in the on position. This means that the system always boots into safe boot unless I hold down the option key. I have managed to change my password to one which is all caps and once I login I use keyremap4mac but it is still very annoying. Is there anyway which I can remap the keyboard during boot? Possibly with a startup bash script or something similiar? If that is not possible is there any way to use a script to bypass safe boot? I was planning on installing a new bootloader anyway in order to dual-boot linux, I don't know if this will help. Advice is appreciated.


I don't think this can be the case, since the derivative is defined as a limit $$f'(x) = \lim_{a\to x} \frac{f(x)-f(a)}{x-a}$$ And a function that equals its limit is by definition continuous but this feels like a non-rigorous proof so I do not want to depend on it. If a function does exist such that $\forall \, x \in A \,\, \exists \,y : f'(x) = y $, a good answer would give an example of such a function, or if such a function does not exist, a good answer would give pointers as to how I could prove its non existence

Could someone give an example of a ‘very’ discontinuous derivative? I myself can only come up with examples where the derivative is discontinuous at only one point. I am assuming the function is real-valued and defined on a bounded interval.


In plenty of countries you can only enter if you can show a flight within your visa time out of the country. There is the service flyonward.com. But it takes some days to get your ticket and it cost 10$.   Do you have any better proposals?

I've been in Mexico for a month and a half and I'm currently heading to Mexico City to apply for a Chinese visa since I already have a flight back to China but my previous visa expired.  China requires a minimum of three bookings to issue a visa: One flight to China, One flight out of China, and one accommodation booking. Even if you intend to enter and/or leave via a land border and even if you're applying for a double-entry visa you only need show these reservations for the first entry.  Previously I have done this in Laos and Australia. In Vientiane one travel agent understood exactly what I needed and made the bookings, printed them out, then cancelled them for just a few dollars. In Australia a friend who worked as a travel agent at the time booked my flights and sent me the bookings before cancelling them.  In Mexico City I don't have such a friend and where you can walk around every travel agency in Vientiane in less than an hour, Mexico City is one of the biggest cities in the world.  I know I can book some kind of flight with no or low cancellation fee myself but don't know how to find such flights. There might be other ways I never thought of.


I had an interesting thought in one of my classes, when we were talking about photons... I thought that if the speed of light is the fastest speed, and light goes in a straight line, then how come the motion of a photon is a sin wave which would be a greater velocity by a ratio of a length of a sin wave between 0 and 2 pi and 2 pi.   Of course I realise that the motion of a photon is not a sin wave. The position of a photon is random within a certain area, but has probabilities of being in particular places (quantum mechanics).  The sin wave represents some kind of field, but I am not sure what, and how it relates to a photon.

Electromagnetic waves have a physical crest and trough as observed in microwaves and radio waves. I understand that is electromagnetic field vectors that wave, not the photon. But how do they wave? What does causes them to change direction?


Saw .  The new close reasons do not include "no research effort shown or attempt at solution made", so I just downvoted and left.  Is this by design?

...not literally, of course.  But what happened to the previous menu of close-vote options?  I find the current set unsatisfactory. Take  for example.  Obviously, the question is worthless, because it's an exception that even a n00b programmer should be able to debug on his own. There is nothing special about this bug, and it will help no one in the future.  What could I possibly select as a close reason?   duplicate of... - Maybe. There's the classic  which has been linked to . While the debugging techniques are the same, that's for .NET.  Besides, there are any number of other common exceptions / simple development bugs that wouldn't apply. off-topic because...   ... This question was caused by a problem that can't be reproduced or a simple typographical error. While similar questions may be on-topic here, this one was resolved in a manner unlikely to help future readers. This can often be avoided by identifying and closely inspecting  before posting.Notes below....  unclear what you're asking - No, it's clear that the programmer just needs to debug his code. too broad - No, it's quite specific. primarily opinion-based - Nope.   When it was introduced, I was happy to see a "typo" reason, to rid out all the stupid indentation or bracket questions. But... we no longer have a "lacks minimal understanding" reason, which I think is incredibly important. After all, Stack Overflow is here to solve problems that  encounter... not teach users how to code or debug.  So.... what do I pick?  Can we have another revision on the close vote reasons?  I did a cursory search, but couldn't find a Meta post to the intent behind this latest set of reasons. Edit: I believe this is it:     Edit 1/20  Ah, how could I forget about the classic copy & paste homework assignment?      Right or wrong, my close vote was cast with      off-topic because it shows zero desire to actually understand the problem.      we see a moderator closing a question about an incorrect number of function parameters as lacks sufficient information to diagnose the problem. Of course, there probably is sufficient information, and the wording should really be changed to You're too lazy to RTFM.


I used to lock my MacBook Air by Shitt-Control-Eject shortcut key. After replacing the Air with a Touch Bar MacBook Pro, there is no Eject key anymore.   How can I lock it with a shortcut key?

This was working on older Mac using CtrlShiftPower. But this doesn't work on the new Macbook Pro 2016 with touch bar. Can someone please help. I want to lock my Mac without putting it to sleep.


Let $K \subset \mathbb{R}$ be a compact set, and $f:K \rightarrow \mathbb{R}$ a continuous and strictly monotonic function. Is it true that its inverse function, $f^{-1}: f(K) \rightarrow K$, is also continuous? I know that this result is true if $K$ is an interval, so if $K=[a,b]$ this result holds, but does it still hold if $K$ is an arbitrary compact set?

Let $A,B\subset\mathbb R$ and $f:A\to B$ be an invertible function (so 1-1 and onto). Prove that if $A$ is compact and $f$ is continuous, then the inverse $f^{-1}:B\to A$ is continuous. And give a counterexample when $A$ is not compact (no transcendentals).  If $f$ is continuous, then for every sequence $\{x_n\}$ in $A$ that converges to $L$, $\lim_{n\to\infty}f(x_n)=f(L)$. We need to prove that for every sequence $\{y_n\}$ in $B$ that converges to $K$, $\lim_{n\to\infty}f^{-1}(y_n)=f^{-1}(K)$ (Is this sufficient to prove that $f^{-1}$ is continuous?), I'm not sure how to proceed from there, and I'm having trouble coming up with a counterexample as well.


I'm currently experimenting with list.js and lodash to produce a dynamic filter functionality on a set of search results. The base of the code is forked from here:    List.Js uses the elements on the page to create a dataset that can then be filtered or sorted. However, as these are search results I want to make the filters dynamic so that only criteria that is present on the page is displayed.  The example above uses a multi-select list however in my example I have converted these to checkboxes. The main problem I have is now that I am creating my checkboxes dynamically they are no longer firing the updateList() method on change.  I have tried simply using the .change() method in JQuery and also .on("change",updateList()) but neither of these seem to work. Any ideas?  Code and Codepen below.  HTML
   <input class="search" placeholder="Search" />
   Filter Name:   <input type="checkbox" name="names" value="Jonny Wayne">Johnny Wayne   <input type="checkbox" name="names" value="Jonas">Jonas   <input type="checkbox" name="names" value="Martina">Martina   <input type="checkbox" name="names" value="Gustaf">Gustaf

Jonny Wayne

1986

Jonas

1985

Jonas

1985

Jonas

1985

Martina

1986

Gustaf

1983

       Javascript  var options = { valueNames: [ 'name', 'born' ] }; var userList = new List('users', options);  var updateList = function(){   var names = new Array();   var dates = new Array();    $("input:checkbox[name=names]:checked").each(function() {        names.push($(this).val());   });    $("input:checkbox[name=dates]:checked").each(function() {        dates.push($(this).val());   });    var values_date = dates.length > 0 ? dates : null;   var values_name = names.length > 0 ? names : null;    userList.filter(function(item) {     return (_(values_date).contains(item.values().born) || !values_date)             && (_(values_name).contains(item.values().name) || !values_name)   }); }  $(function(){   updateList();   $("input:checkbox[name=dates]").change(updateList);   $("input:checkbox[name=names]").change(updateList);    var all_born = [];   var all_name = [];    _(userList.items).each(function(item){     all_born.push(item.values().born)     all_name.push(item.values().name)     });    _(all_born).uniq().each(function(item){     $(".dateContainer").append('<input type="checkbox" name="dates" value="'+item+'">'+ item +'')   });   });   Codepen    Thanks in advance.

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


I tried editing a sample text with the example in this thread: . However it's still doesn't work, also I gave execution permissions for everyone, just in case (chmod 777 desktop_entry.desktop)     nano desktop_entry.desktop  GNU nano 4.8                 desktop_entry.desktop                                [Desktop Entry]  Encoding=UTF-8  Name=Link to Ask Ubuntu  Type=Link  URL=https://open.spotify.com/  Icon=text-html

In Ubuntu 20.04, on the desktop, there is a number of actions I wish I could do, such as, by order of importance :  use keyboard shortcuts such as select all, copy / paste. use drag & drop with icons deactivate the "mouse over" highlight, and restrict the clicking area to only the icon, not the surrounding square  To put it simply, I'd like to have the exact same features as offered by the desktop of Ubuntu 18.04 (probably related to a specific version of GNOME, and not Ubuntu itself). Am I missing something obvious here? I actually see no reason why those actions are removed or deactivated on the desktop, since they all work in any Nautilus window.


I have a JSP page and I managed to multiply each cena with kolicina.  <c:forEach items="${proizvodKorpa}" var="proizvod">
         ${proizvod.proizvod}	         ${proizvod.cena}	         ${proizvod.kolicina}	         ${proizvod.cena * proizvod.kolicina}
 </c:forEach>
     	     	     Ukupno	     SUM GOES HERE
   Now the problem is how  to sum total of each dynamically generated value and display it outside the foreach loop? Here's what I want to get :

I have a Java bean like this:  class Person {   int age;   String name; }   I'd like to iterate over a collection of these beans in a JSP, showing each person in a HTML table row, and in the last row of the table I'd like to show the total of all the ages.  The code to generate the table rows will look something like this:  <c:forEach var="person" items="${personList}">
${person.name}${person.age}
 </c:forEach>   However, I'm struggling to find a way to calculate the age total that will be shown in the final row without resorting to scriptlet code, any suggestions?


When I looked my photos in my computer, two images appeared. One is a JPG image and another one is a NEF image. I'd already formatted my memory card but there's no change at all. What should I do? The another file is eating spaces on the memory card.

I'm new to the DSLR world and I can't seem to figure out why I have two copies of all of my pictures when I go to load them on my computer. Is there a way to turn this off so I don't have to go through and delete one copy of everything all the time.


Is there any function $f(x)$ for which $f(a^b) = f(a)^{f(b)}$, other than the constant or identity function?

Consider the functional equation problem $$ f : \mathbb R \to \mathbb R \text , $$ $$ f \left( a ^ b \right) = f ( a) ^ { f ( b ) } \text , $$ when $ a , b \in \mathbb R $, $ a , b \ge 0 $. So far the only solution I have is the trivial $$ f ( x ) = x \text . $$ Does there exist any other possible solution? Even if the $ f $ doesn't have a closed form in terms of elementary functions, is there some way I could derive a series or an alternative expression for it? I tried to get a little more creative: $$ f ( w ) = f \left( w ^ { \frac 1 w } \right) ^ { f ( w ) } \text , $$ which nests deep into $$ f ( w ) = f \left( w ^ { \frac 1 w } \right) ^ { f \left( w ^ { \frac 1 w } \right) ^ { f \left( w ^ { \frac 1 w } \right) ^ \vdots } } \text , $$ which is equivalent to $$ \ln \big( f ( w ) \big) = \ln \bigg( f \left( w ^ { \frac 1 w } \right) \bigg) f ( w ) \text . $$ I was hoping to generate some sort of series using this.


When my sandbox was updated from Winter 17 to Spring 17 all external js and css which are stored in static resource are not getting loaded in lightning component. Below is the error that we are getting in google chrome developer console -   Failed to load resource: the server responded with a status of 404 (Not Found)    After looking the url from which system try to load external JS/CSS is not correct. In the above url "JS" and "assets" are folder name inside static resource zip file(App_Resource). It doesnt contain static resource name. Ideally it should contain resource name. Ideally it should be "intouch--dmkts2.lightning.force.com/App_Resource/JS/jquery-2.2.4.min.js"

Since last update (7th of January), I am not able to load correctly those scripts:       <ltng:require    scripts="{! join(',', $Resource.lodash, $Resource.trix, $Resource.quill )}"   styles="{! join(',', $Resource.trixcss, $Resource.quillcss )}"   afterScriptsLoaded="{! c.scriptLoaded }" />   The action callback from ltng:require is never fired and there are no error messages appearing. Is there a way to be prompt about the failure on the script loading process ?


On a recent review audit on SU, I clicked "Edit" and was greeted with the plain text "This post was deleted and cannot be edited". It wasn't in a popup box or anything; the actual page consisted of just that text, with no formatting (as though it were the only content of the HTML page). This makes it really obvious I'm dealing with an audit.

I just got a question in the review queue that, though poor, I thought was potentially salvageable via editing.  However when I clicked the Edit button I got the deleted post error.  Since the post was gone, I clicked I'm Done (what is there do do with a deleted post?) only to get the review audit failed message instead.  The current behavior is also problematic in that, now that I know about it, it's a risk-free way to check if a question is an audit and not an actual review. That allows me or anyone else who knows about it to detect audits without having to recognize that the question is bad.


I tried to install mysql-workbench but getting above error on all sudo apt-get install commands execution. Even tried to install libgssapi-krb5-2 but getting below error.  sudo apt-get -f install libgssapi-krb5-2  Reading package lists... Done Building dependency tree        Reading state information... Done E: The package libgssapi-krb5-2 needs to be reinstalled, but I can't find an archive for it.

Running Synaptic I get the following error message:  E: The package hl1440lpr needs to be reinstalled, but I can't find an archive for it. E: Internal error opening cache (1). Please report.   Upon accepting the message, Synaptic quits.


I have taken the R.H.S and used the combination formula $$\binom{n}{k} = \frac{n!}{k!(n-k)!}$$ then I don't know other steps to solve it.

I'm trying to prove that ${n \choose r}$ is equal to ${{n-1} \choose {r-1}}+{{n-1} \choose r}$ when $1\leq r\leq n$.  I suppose I could use the counting rules in probability, perhaps combination= ${{n} \choose {r}}=\frac{n!}{r!(n-r!)}$.  I want to see an actual proof behind this equation.  Does anyone have any ideas?


Let $K \subset L$ be a finite field extension and $f(x) \in K[x]$ a monic and irreducible polynomial. Also, $\gcd(\deg f(x),[L:K])=1$. How to prove that $f(x)$ is irreducible in $L[x]$?  My idea was to show that $L \subset \overline{K}$. Then I want to consider $K \subset L \subset L(a)$ and $K \subset K(a) \subset L(a)$ to find a root $a \in \overline{K}$ of $f(x)$ to show that $f(x)$ is the minimal polynomial of $a$ over $L$. But I have some trouble to show it. I tried this: Since $K \subset L$ is finite, it implies that $[L:K] < \infty$. So $L \subset \overline{K}=\lbrace a \in L | a$ is algebraic over $K \rbrace$, as all polynomials of $L$ have roots in $K$. I'm not sure if this is right. And how to continue?

I have this problem      Let $L/K$ be a finite field extension and $|L:K|=m$. Let $f(x)$ be an irreducible polynomial of degree $n$ in $K[x]$ and $\gcd(m,n)=1$. Prove that $f$ is irreducible over $L$.   I'm just a beginner so I'm really confused with the $\gcd(m,n)=1$, I don't know how to use it. So help me with this problem. Thank you


I've stumbled across what I consider to be some very bizarre behaviour by Windows 7 (it may apply to later versions of Windows too but I'm testing on Win7) for files in certain locations and I can't seem to find any information about it on Google, so I was wondering whether someone who knows about Windows internals could explain this to me.  So basically, this behaviour exhibits itself for files in certain directories.  I'm not sure which ones exactly but it seems to include some directories in Program Files (x86); for the purposes of my testing I used the install directory for Europa Universalis 3, which is Program Files (x86)\Paradox Interactive\Europa Universalis III.  This behaviour applies to files already in the directory, but to produce a clean reproducible demonstration I started by creating a file text.txt on the desktop.  The file contained the text:  Hello world!   I like to use EditPad Lite 5.4.0 for my main text editor (yeah I know it's old but I've gotten used to it) but I also have Vim for Windows 8.0.586 installed.  When I open the file in either, I see the same text, and when I edit the text in either, both programs see the same edited text.  So far, so good.  I copy the file into Program Files (x86)\Paradox Interactive\Europa Universalis III, and get a prompt for admin access to be able to copy the file, which I allow.  This is where the weirdness begins.  I open that copied file in EditPad Lite, add some text, and save (file does not appear as read-only):  Hello world! Edited with EditPad Lite.   I then open the file with Vim and Vim shows the OLD version of the file:  Hello world!   I try to edit and save but Vim sees this file as read-only!  So I open with Vim as Administrator, and edit the file and save:  Hello world! Edited with Vim.   When I open the file with EditPad Lite again, I see the EditPad version of the file!  So now we have 2 versions of the file which I will term the "EditPad version" and the "Vim version".  "EditPad" version (IS NOT read-only):  Hello world! Edited with EditPad Lite.   "Vim" version (IS read-only):  Hello world! Edited with Vim.   Even a reboot doesn't change things, so it doesn't seem to be some sort of Windows memory caching; it's actually persisting these 2 different versions of the file to disk!  Upon further experimentation, I determined that different programs seem to access different versions of the file:  "Vim" version of the file:   Vim 8.0.586 Vim 8.0.586 as administrator 7-Zip 16.04 (64-bit) Windows Explorer Windows 7 Notepad   "EditPad" version of the file:   EditPad Lite 5.4.0 Europa Universalis 3 Windows XP Notepad   What on Earth is Windows 7 doing here?  Why does it present 2 different versions of the file, one being read-only and the other not?  My best guess is that there are two different system calls being used and Windows 7 presents a different version of the file to the different calls, or perhaps 64-bit programs see one version of the file and 32-bit ones see a different version?  Can anyone explain this and is this behaviour documented anywhere?

I'm having trouble editing this file on Windows 7:  C:\Program Files (x86)\CMake 2.8.7\share\cmake-2.8\Modules\FindJNI.cmake   If I edit it in Cygwin (vi) or TextPad, those two programs see the changes, so it's getting written to disk somewhere.  But if I "type" the file in a DOS cmd shell, it looks like the file hasn't been changed at all.  One thing I noticed is that in the cmd shell, the owner is Administrators, but in Cygwin's bash shell, the owner is Dan:  C:\Program Files (x86)\CMake 2.8.7\share\cmake-2.8\Modules>dir /Q FindJ*  Volume in drive C is Windows7_OS  Volume Serial Number is 92CA-8707   Directory of C:\Program Files (x86)\CMake 2.8.7\share\cmake-2.8\Modules  12/30/2011  09:45 AM             1,480 BUILTIN\Administrators FindJasper.cmake 12/30/2011  09:45 AM             7,951 BUILTIN\Administrators FindJava.cmake 12/30/2011  09:45 AM            10,632 BUILTIN\Administrators FindJNI.cmake 12/30/2011  09:45 AM             1,669 BUILTIN\Administrators FindJPEG.cmake                4 File(s)         21,732 bytes                0 Dir(s)  132,524,654,592 bytes free   Dan@home /c/Program Files (x86)/CMake 2.8.7/share/cmake-2.8/Modules $ ls -al FindJ* -rwx------+ 1 Dan            None 10636 Jan 30 13:57 FindJNI.cmake -rwx------+ 1 Administrators None  1669 Dec 30 09:45 FindJPEG.cmake -rwx------+ 1 Administrators None  1480 Dec 30 09:45 FindJasper.cmake -rwx------+ 1 Administrators None  7951 Dec 30 09:45 FindJava.cmake   How can this be?  It's like there are two different files with the same name in the same directory.


How we can determine how much time a job takes to execute in sql server, I have a job which runs every hour, I also having some performance issue so I wanted to check if the performance issue is because the job is running or something else and that is why I have to check how much time job is taking to finish.  Job is basically to update the table.   Any help or tips will be very helpful!!!!!

When setting up a new SQL Server, I use the following code to determine a good starting point for the MAXDOP setting:  /*     This will recommend a MAXDOP setting appropriate for your machine's NUMA memory    configuration.  You will need to evaluate this setting in a non-production     environment before moving it to production.     MAXDOP can be configured using:      EXEC sp_configure 'max degree of parallelism',X;    RECONFIGURE     If this instance is hosting a Sharepoint database, you MUST specify MAXDOP=1     (URL wrapped for readability)    http://blogs.msdn.com/b/rcormier/archive/2012/10/25/    you-shall-configure-your-maxdop-when-using-sharepoint-2013.aspx     Biztalk (all versions, including 2010):     MAXDOP = 1 is only required on the BizTalk Message Box    database server(s), and must not be changed; all other servers hosting other     BizTalk Server databases may return this value to 0 if set.    http://support.microsoft.com/kb/899000 */   DECLARE @CoreCount int; DECLARE @NumaNodes int;  SET @CoreCount = (SELECT i.cpu_count from sys.dm_os_sys_info i); SET @NumaNodes = (     SELECT MAX(c.memory_node_id) + 1      FROM sys.dm_os_memory_clerks c      WHERE memory_node_id < 64     );  IF @CoreCount > 4 /* If less than 5 cores, don't bother. */ BEGIN     DECLARE @MaxDOP int;      /* 3/4 of Total Cores in Machine */     SET @MaxDOP = @CoreCount * 0.75;       /* if @MaxDOP is greater than the per NUMA node        Core Count, set @MaxDOP = per NUMA node core count     */     IF @MaxDOP > (@CoreCount / @NumaNodes)          SET @MaxDOP = (@CoreCount / @NumaNodes) * 0.75;      /*         Reduce @MaxDOP to an even number      */     SET @MaxDOP = @MaxDOP - (@MaxDOP % 2);      /* Cap MAXDOP at 8, according to Microsoft */     IF @MaxDOP > 8 SET @MaxDOP = 8;      PRINT 'Suggested MAXDOP = ' + CAST(@MaxDOP as varchar(max)); END ELSE BEGIN     PRINT 'Suggested MAXDOP = 0 since you have less than 4 cores total.';     PRINT 'This is the default setting, you likely do not need to do';     PRINT 'anything.'; END   I realize this is a bit subjective, and can vary based on many things; however I'm attempting to create a tight catch-all piece of code to use as a starting point for a new server.  Does anyone have any input on this code?


There are several minecarts around town that are "out of order" including near the blacksmith, the mines, and the bus stop. At what point do you get the chance to fix them if ever?

The minecarts are all broken. Seems like they are pretty useful for fast traveling between some places around the city, farm and mines.  How do I make these work?


I am wondering why a method of a class doesn't look into its enclosing scope, if a name is not defined.  def test_scope_function():     var = 5     def print_var():         print(var) # finds var from __test_scope_function__     print_var()   globalvar = 5 class TestScopeGlobal:     var = globalvar # finds globalvar from __main__      @staticmethod     def print_var():         print(TestScopeGlobal.var)   class TestScopeClass():     var = 5      @staticmethod     def print_var():         print(var) # Not finding var, raises NameError  test_scope_function() TestScopeGlobal.print_var() TestScopeClass.print_var()   I would expect TestScopeClass.print_var() to print 5 since it can read classvar in the TestScopeClass body.  Why this behavior? And what should i read in the  to get to know about it.

What exactly are the Python scoping rules?  If I have some code:  code1 class Foo:    code2    def spam.....       code3       for code4..:        code5        x()   Where is x found?  Some possible choices include the list below:   In the enclosing source file In the class namespace In the function definition In the for loop index variable Inside the for loop   Also there is the context during execution, when the function spam is passed somewhere else. And maybe  pass a bit differently?  There must be a simple reference or algorithm somewhere.  It's a confusing world for intermediate Python programmers.


I have MacBook Pro (Retina, 13-inch, Mid 2014) and OS: 10.13.6.  My current pmset -g:  $ pmset -g System-wide power settings: Currently in use:  standbydelay         10800  standby              1  womp                 1  halfdim              1  hibernatefile        /var/vm/sleepimage  powernap             0  gpuswitch            2  networkoversleep     0  disksleep            10  sleep                1  autopoweroffdelay    28800  hibernatemode        3  autopoweroff         1  ttyskeepawake        1  displaysleep         10  acwake               0  lidwake              0   I was testing what the best practice is to make sure my macbook is asleep before putting it to my backbag. So I wrote a simple script like this:  $ cat sleep-detector.sh  while true; do     echo `date` " -------- not sleep yet"     tput bel     sleep 1s done   I ran this script for all my following tests from terminal.app.    When I close the lid directly, the bell sound will be off immediately (even if the script will continue to run for about 20s). This is expected. I thought it was much safer to put the system to sleep manually by  → Sleep , but I was wrong.  If I use  → Sleep, and wait for 20 seconds and then close the lid, everything is expected as before.  But If I use  → Sleep and close the lid immediately, the weird thing happened. At the beginning, when I click  → Sleep, the bell is off immediately, but when I close the lid very quickly, the bell is on. And it's on for a long time. (I don't bother wait for a long time. my test is actually 3 minutes).   This surprises me a lot. How come closing a lid cause the system back online and awake?! Is this a bug?

I have MacBook Pro (Retina, 13-inch, Mid 2014) and OS: 10.13.6  My pmset outputs:  $ pmset -g System-wide power settings: Currently in use:  standbydelay         10800  standby              1  womp                 1  halfdim              1  hibernatefile        /var/vm/sleepimage  powernap             1  gpuswitch            2  networkoversleep     0  disksleep            0  sleep                0 (sleep prevented by coreaudiod, Google Chrome)  autopoweroffdelay    28800  hibernatemode        3  autopoweroff         1  ttyskeepawake        1  displaysleep         20  acwake               0  lidwake              0   You can see that I have set lidwake to 0. But, I did two tests:  1, Close the lid, and then open the lid. The display and system just turned on.  2, TopLeft Apple logo --> Sleep --> Close the lid. Then open the lid. The display and system turned on again.   Why does this happen? I just want to prevent my macbook awake when I open the lid.   When it works, I think it will be awake only when I press any keys on the keyboard, is this right? If this is right, how to wake the system and display only when I press the power button? This is kinda second question. You can ignore the second question.  PS:   I found     having the same issue. And all the discussions end up no solution... What a pity!


I want to list (and save) Md5 check sum of all the files in a directory and  save that list in a text file called md5sum.txt  it would be also nice if I could    Integrate it within tree command (which creates a tree structure of folders and files) Make it work on Folders and Sub folders (this is sort of important)

I would like to create a md5 checksum list for all files in a directory.  I want to cat filename | md5sum > ouptput.txt. I want to do this in 1 step for all files in my directory.   Any assistance would be great.


One thing that I will be very happy if added in Stack Overflow is a Private Message system like in forums, because there's some things that you want to be in private with your internet friends.

There has been quite a few times that I wished I could send a message to another user on SO - not ask a question for everyone to see, but just a short message informing them of something or requesting them to do something.  Are there any plans to allow this to happen in the future?  Related:


Is it possible to change the date of a commit in Git?  If yes does this modification leave any track?  Basically I want to change the date of a commit but it should not be visible to anyone that the date has changed by me.  As I have researched it is possible to change the date by using git filter-branch but I do not know whether this leaves any history.

The answers to  describe a way to amend previous commit messages that haven't yet been pushed upstream.  The new messages inherit the timestamps of the original commits.  This seems logical, but is there a way to also re-set the times?


Having issues with my ISP monitoring my activity and blocking my internet access when they see something they don't like. Can I utilize TOR to prevent this monitoring with out tipping off my ISP to my security?

Does using  prevent my Internet Service Provider or system administrator from seeing what websites I visit?


Prove that there exists a unique function  $f:R^{+}\rightarrow R^{+}$ $$f(f(x))=6x-f(x)$$  My Try Define $a_{k+1}=f(a_k)$ then we have  the recursive relation $$a_{k+2}+a_{k+1}-6a_k=0$$ whose  characteristic equation is $$x^{k+2}+x^{k+1}-6x^k=0$$ $$x^2+x-6=0 \Rightarrow x=-3 ,x=2$$ ie $$a_k=c_1 {(-3)}^k+c_2{(2)}^k$$ .As $x>0 \Rightarrow a_0>0\Rightarrow 2c_2>3c_1$ i am  stuck now as i have not been able to find $c_1,c_2$

If $f: [0,\infty) \rightarrow [0,\infty)$ and   $f(f(x))=6x-f(x)$ $f(x)>0$ $  \forall x \in (0,\infty) $   Find f(x)


I came across the term "logo schmogo" and went researching its meaning and usage, and have a vague working-theory, but am still confused. Would be great to learn the exact meaning and primary usage of the term. Thanks.  I get that this is a form of reduplication (repeating a word or adding a second word that sounds similar to the first word) (e.g. easy-peasy, hurly-burly, super-duper) The dictionary gives definitions for some of them, but not this one. Could be that this one is fairly new or still a bit niche.  My working theory. I think it's one or a combination of the following, but I am having a hard time summing it up in a clear sentence.    It is used to criticize or mock the "logo is the be-all-and-end-all of branding", or "logo=brand identity" attitude. It means "You think your new logo will solve all your problems? You are wrong" "Your logo is missing substance, it's just a layer on top."   It's harder to take a guess because this term is mostly used in titles (for chapters, blog posts), or as an exclamation (e.g. Logo schmogo indeed!) or opening of a social media post (e.g. Logo schmogo, blablabla)  Here are some use-cases I was able to collect:    An article titled"School District Logo Schmogo:Board Not Happy with the New Emblem and Its Price Tag", an interview in the article says “The idea of a communication plan is much more than an image, a logo,” A twitter conversation Political party X posts: We will put Y first. That is what our new logo will symbolize for everyone. Voter Z posts: Logo schmogo. I'll still never vote for X. A blog post with a quote that says: "Stuart Elliot of the NY Times summed up the prevailing opinion of design when he once said to me, Logo schmogo Can a logo drive business results?  Absolutely. There is one brand that saw a 20% change in their business within 7 weeks of changing their logo and packaging design. Yes, that’s right, CHANGE IN LOGO RESULTS IN 20% CHANGE IN SALES IN 7 WEEKS. Logo schmogo indeed!" Then the post goes on explaining that the change in logo resulted in 20% PLUNGE of sales in 7 weeks. A blog post titled "Logo schmogo", and the first sentence is "A corporate brand is many things to many people. But it isn’t a logo."   Related links   reduplicative:  use-case:  use-case:   Thanks for taking the time to look into this.

I recently watched A Series Of Unfortunate Events, and I was puzzled by the expression "Josephine, Schmosephine". The narrator explains that when you don't care about something or someone, you repeat their name, changing the first syllable by "schm-".  Is this a real thing? I haven't been able to find anything about that on the Internet (and it's not the easiest thing to Google).


I was in a hospital, and I forgot my apple iPhone 5 username and password and also my iCloud username and password. Can someone help me wipe the phone and get a new iCloud username and password?

I bought a used iPhone 4.  The previous owner re-set the phone, but did not remove the device from their iCloud.  It is asking me for their iCloud information when I try to set-up the phone.  I don't have contact with the previous owner anymore.  Is there a way to remove the device from their iCloud so I can use a new one?


I've been trying for hours on end for the last 2 days, I have an asus G20AJ but I upgraded it with a 500gb Samsung ssd and a GTX 1060, I can't install Ubuntu!   I have my USB and everything, disabled fast boot on Windows and bios and disabled secure boot. All I want is Linux dual booted with Windows. I have tried Ubuntu 16.04.5m 17.04, Linux Mint 18 Sarah, GameDrift Linux, Linux Mint 18.1, Elementary OS. Attempted each one at least 4 times. All were installed using my 64GB USB, I made partitions etc... did everything FAT32 using Rufus, followed YT tutorials, I even did the hold shift while pressing restart and boot from USB, still no luck.   I have 2 monitors, one is plugged into integrated graphics and one is a DVI-D to plug in my gtx 1060. Either I get a freeze, a crash or for Linux mint 18 it asked me for a password or something which I couldn't get. Ubuntu ALWAYS just gives me a black screen once I press Ubuntu, I can't do nomodeset it's just a grub menu which is all black. With Elementary and Linux mint 18.1 it just freezes on the logo at a random time.   I did all I could with the settings, if someone could help it would mean so much. So basically with everything but Ubuntu, I have the same menu every time. I always have two options for USB disks and always do both, but either way I have the menu. I press install, (I have tried try OS as well) and then it switches monitor and starts installing which I Getty. The main graphics card (NVIDIA) isn't installed yet so it switches to the monitor with integrated motherboard graphics.   I have UEFI on my PC settings etc... I am starting to think it's because my USB although 64GB can only handle 64 kilobytes 'Cluster Size' and by default which I usually leave it as it's 32, does that matter? Once again my PC is an ASUS G20AJ.   I have tried so many things, what is the issue? I have waited ages and ages, there must be a way to fix this. Currently running Windows 10 no problem, playing games etc... anyone ever had this error? Is there a way to fix it?

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents:


My man command seems to have disappeared.  Typing man <something> returns  The program 'man' is currently not installed. You can install it by typing: sudo apt-get install man-db   however man-db is already installed and reinstalling it does nothing. Typing which man doesn't find anything.  xman works, so the actual man pages are there: it seems the front-end driver has gone missing. How can I download the front-end driver or recreate a copy of it (I seem to recall it's a small shell script).  Running Ubuntu 14.04.5 LTS on a Dell laptop with x86 processor  /usr/bin/man doesn't exist - that's essentially the problem.  I did try uninstalling man-db (as root) in order to reinstall it, but it won't let me. It gets a permission failure. I thought root could do anything, but apparently not....

I am having a problem that doesn't seem to be common based on searching various forums.  I cannot run the Make command.  Message:   The program 'make' is currently not installed. You can install it by typing: sudo apt-get install make   So do this:  sudo apt-get install make Reading package lists... Done Building dependency tree        Reading state information... Done make is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.   But then when I try to run Make I get the same message.  What's up?  Edit: Ubuntu 12.04 64bit Desktop fresh install.


Find the rectangle with the maximum area inside the ellipse $\frac{x^2}{a^2} + \frac{y^2}{b^2} = 1$, whose edges are parallel to the axises. Hint: Find the function we need to maximize.   Well in the answers it says that the function we need to maximize is $4xy$ and the area is $2ab$. How do we solve this?

The actual problem reads:      Find the area of the largest rectangle that can be inscribed in the ellipse    $$\frac{x^2}{a^2} + \frac{y^2}{b^2} = 1.$$   I got as far as coming up with the equation for the area to be $A=4xy$ but then when trying to find the derivative I don't think I'm doing it right.


When I start up the computer, enter the password, a window show up says:"system program problem detected." I can see the desktop image and the cursor and I can move it, but no respond including trying to type ctrl+alt+t to invoke the terminal.   So I need to press the power button and force the computer to shut down. Restart it again, the same message show up again but the computer is well functional. I want to figure out how to fix the problem. I don't want to start computer twice every time. Thanks a lot.  I've search the web, the "solution" is to delete the message under /var/crash/ and to turn off the report by /etc/default/apport, which doesn't fix my problem at all, still need to start twice.  Here is the message abstracted from /var/crash/, it says some kernel problem and the system is not stable. I do not fully understand it.  ProblemType: KernelOops Annotation: Your system might become unstable now and might need to be restarted. Date: Fri Oct  9 21:25:22 2015 Failure: oops OopsText:  BUG: unable to handle kernel paging request at fffffffffffffff8  IP: [<ffffffff81207176>] eventpoll_release_file+0x46/0xa0  PGD 1c11067 PUD 1c13067 PMD 0   Oops: 0000 [#1] SMP   Modules linked in: ctr ccm bnep rfcomm bluetooth binfmt_misc snd_hda_codec_hdmi snd_hda_codec_realtek uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_core videodev arc4 snd_hda_intel intel_rapl x86_pkg_temp_thermal snd_hda_codec intel_powerclamp coretemp snd_hwdep kvm snd_pcm crct10dif_pclmul crc32_pclmul ghash_clmulni_intel cryptd snd_page_alloc thinkpad_acpi nvram snd_seq_midi snd_seq_midi_event snd_rawmidi joydev serio_raw rtl8192ce snd_seq nouveau rtl_pci rtlwifi mxm_wmi rtl8192c_common ttm snd_seq_device snd_timer i915 rtsx_pci_ms drm_kms_helper mac80211 lpc_ich snd memstick cfg80211 mei_me drm mei i2c_algo_bit wmi shpchp soundcore mac_hid video parport_pc ppdev lp parport hid_generic usbhid hid rtsx_pci_sdmmc psmouse ahci libahci r8169 mii rtsx_pci  CPU: 1 PID: 1441 Comm: pulseaudio Not tainted 3.13.0-66-generic #107-Ubuntu  Hardware name: LENOVO 20178  /20178  , BIOS H2ET68WW(1.68) 05/17/2013  task: ffff88008ed84800 ti: ffff88008ee08000 task.ti: ffff88008ee08000  RIP: 0010:[<ffffffff81207176>]  [<ffffffff81207176>] eventpoll_release_file+0x46/0xa0  RSP: 0018:ffff88008ee09e78  EFLAGS: 00010282  RAX: 0000000000000000 RBX: ffffffffffffffb7 RCX: 000000000000000f  RDX: 0000000001000000 RSI: 0000000000000000 RDI: ffffffff81c72e80  RBP: ffff88008ee09ea0 R08: 0000000000000000 R09: 0000000000040000  R10: ffff88008efceaa1 R11: 0000000000000206 R12: ffffffffffffffa8  R13: ffff88008efceaa1 R14: ffff880092393cc0 R15: ffff88008ee5a9b0  FS:  00007f5bfc697740(0000) GS:ffff88013f240000(0000) knlGS:0000000000000000  CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033  CR2: fffffffffffffff8 CR3: 000000008ee04000 CR4: 00000000001407e0  Stack:   ffff88008ee5a900 0000000000000010 ffff88008efceaa1 ffff880092393cc0   ffff88008ee05300 ffff88008ee09ee8 ffffffff811c00aa 0000000000000000   ffff88008ed84800 0000000000000000 ffffffff81ebb680 ffff88008ed84e20  Call Trace:   [<ffffffff811c00aa>] __fput+0x24a/0x260   [<ffffffff811c010e>] ____fput+0xe/0x10   [<ffffffff81088557>] task_work_run+0xa7/0xe0   [<ffffffff81013ed7>] do_notify_resume+0x97/0xb0   [<ffffffff81734f5a>] int_signal+0x12/0x17  Code: 00 41 56 41 55 41 54 53 e8 68 37 52 00 49 8b 07 48 8b 08 49 39 c7 4c 8d 60 a8 48 8d 59 a8 75 0b eb 3e 0f 1f 00 49 89 dc 48 89 d3 <4d> 8b 74 24 50 4d 8d 6e 08 4c 89 ef e8 39 37 52 00 4c 89 e6 4c   RIP  [<ffffffff81207176>] eventpoll_release_file+0x46/0xa0   RSP <ffff88008ee09e78>  CR2: fffffffffffffff8  ---[ end trace 5b41d5dd63eaa023 ]--- Package: linux-image-3.13.0-66-generic 3.13.0-66.107 SourcePackage: linux Tags: kernel-oops Uname: Linux 3.13.0-66-generic x86_64   If you need more information, ask me and I'll post it.

Dell LAtitude E6430 with CPU Intel® Core™ i5-3210M, 64 bits, no longer boots after updating 14.04 LTS system to kernel 3.13.0-66. It hangs off after completion of the password. Back to the 3.13.0-64 kernel works, but still with a system error, pending since about the beginning of the year (beginning approximately for the kernel 3.13.0-40) and never corrected by subsequent upgrades. It seems that the system 14.04 LTS is going worse and worse on this computer. Is there a solution ?


I am using this  for d in ./*/ ; do (cd "$d" && cp -R ../lib . ); done  in a shell script to copy lib folder in all subfolder inside my parent directory . But the lib folder also getting copied inside lib . How to avoid that ?

I have several files with the same base filename. I'd like to remove all but one  foo.org #keep foo.tex #delete foo.fls #delete foo.bib #delete etc   If I didn't need to keep one, I know I could use rm foo.*.    demonstrates ^ to negate a match. Through trial and error, I was able to find that  rm foo.*[^org]   does what I need, but I don't really understand the syntax.   Also, while not a limitation in my use case, I think this pattern also ignores foo.o and foo.or. How does this pattern work, and what would a glob that ignores only foo.org look like?


Currently, I use  egrep --color 'error|$'   to highlight every word in a line containing the word error:    I would like to highlight the entire line though so that the entire string appears in red.  How can I achieve that?

I was able to do a tail -f output with colors using the awk command. But I'm unsure how to output the rest of the log as it seems to be filtering only those 2 lines. I also want to see the other lines as the log is written.  What do I need to put in the awk command to show the rest of the output?  Image of my issue. The red text above is without using awk and displays the entire tail -f log. And below that is the same command with the awk color filtering.


I'm working with a big framework, which is entity component based. So I can't change the code of the element sending the event at all, I can only work with the receiving element.  this.id does not work, because the component ( so the event handler) is attached to a parent element of the element sending the event.  I'm working with javascript, no jquery.  I wondered if there was a way to find out inside the event handler of the receiving element: which element originally sent the event?  I tried browsing other solutions like   function doWithThisElement(event) { event = event || window.event; // IE var target = event.target || event.srcElement; // IE  var id = target.id; //...   }  but it doesn't work for me.

Is there any way to get the ID of the element that fires an event?  I'm thinking something like:    $(document).ready(function() {   $("a").click(function() {     var test = caller.id;     alert(test.val());   }); }); <script type="text/javascript" src="starterkit/jquery.js"></script>  <form class="item" id="aaa">   <input class="title"></input> </form> <form class="item" id="bbb">   <input class="title"></input> </form>     Except of course that the var test should contain the id "aaa", if the event is fired from the first form, and "bbb", if the event is fired from the second form.


Facebook, youtube, reddit, quora, etc... all are signed out.  I have another PC which hasn't synced using Internet (still not connected), can I use that to get logins again?  I can manage with some websites, but I'm afraid I would need logins for websites which I have forgot the password of.

I recently migrated from Windows7 to Kubuntu 10.0.4. In many ways, I'm loving the change. (I never knew it could be such a seemless process to write/test scripts!)  One of the few things that is causing me any hangup is that none of the passwords that were saved in my browser are available (obviously, since it's a completely separate installation). Is it possible to export my passwords from the Windows instance of Chrome and then import them into the Linux version?


Note the following image:   I am trying to align the object on the left and the one on the right, so that they are EXACTLY flush to each other and there is not flickering overlap.  What is the best way to do this? I tried zooming way in orthographically and moving the left one slowly, but it still overlapped slightly.  Is there an easy way to do this? Alternatively, is there a way to make the right object impassable, so that the left object simply stops at the edge of the mess?  Thanks!

How do you snap an object on top of the surface of another object? I tried using the shrinkwrap modifier but that produced weird results.  If I have a cone, and a cube - I want to move the cone around so that it snaps perfectly along the faces of the cube


Is it possible to control, and get feedback for robots in Blender using the python API?   I'd like to have proxy objects in Blender, that I can control, that will control my reallife robot, but also will mirror the actions of the real life robots. I would like to use wifi to send the information, and the robot would use either an Arduino or Raspberry Pi.  Is it possible to do this in Blender using Python, and if so, how would I go about doing it?

Is it possible for Blender to interface with other software and hardware?  I would like to create a robot and have it display feedback on motor positions, etc, in Blender.


How do I incorporate non-integer numbers into tikz?  e.g. Drawing a line segment from (0,0) to (1/(sqrt2),1/(sqrt2))  My method:  \documentclass{article} \usepackage{amsmath} \usepackage{tikz}  \begin{document}  \begin{tikzpicture}   % Line Segment   \draw (0,0) -- ($\frac{1}{\sqrt{2}},\frac{1}{\sqrt{2}}$);  \end{tikzpicture} \end{document}   gives an error. I know that a possibility is to write it as (0.707,0.707), and if all else fails I can fall back to using that, but I'd prefer a more exact way.

I am trying to locate the vertices of a rectangle and to color the rectangular region.  I specify the y-coordinate as a function value, like \sqrt{3}/2 or \sin(60).  I am getting an error.  \documentclass{amsart} \usepackage{tikz} \usetikzlibrary{calc}   \begin{document} \begin{tikzpicture}  \coordinate (A) at (-1,{-\sqrt{3}/2}); \coordinate (B) at (-1,{\sin(60)}); \coordinate (C) at (2,{\sin(60)); \coordinate (D) at (2,{-\sqrt{3}/2});  \path[fill=yellow] (A) -- (B) -- (C) -- (D) -- cycle;  \node[outer sep=0pt,circle, fill,inner sep=1.5pt,label={[fill=white]below left:$A$}] at (A) {}; \node[outer sep=0pt,circle, fill,inner sep=1.5pt,label={[fill=white]above left:$B$}] at (B) {}; \node[outer sep=0pt,circle, fill,inner sep=1.5pt,label={[fill=white]above right:$C$}] at (C) {}; \node[outer sep=0pt,circle, fill,inner sep=1.5pt,label={[fill=white]below right:$D$}] at (D) {}; \end{tikzpicture}


$s = "Update member_date" [snip] $p = $pdo->prepare($s, array(PDO::ATTR_CURSOR => PDO::CURSOR_FWDONLY)); $p->execute();   Is that considered a "prepared" statement to justify being secure from SQL injection-type attacks?  UPDATE:  $member_id= htmlspecialchars($_GET['member_id']); s1 = " update member_date set member_date= now() where member_id= $member_id";   OVERALL QUESTION: "Is this how I should format all my new SQL-related code? I'm just finally making the switch from old mysql statements after reading my (new) error logs. Do I need to add in the question mark placeholders for strings and such or is the format how I have it at the first line of code ok for security purposes? I know the SQL I need to get the tasks accomplished just not the PDO security parts."

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


In a mutual fund's prospectus, there is usually an annual "", representing annual expenses of that fund as a percentage of the net asset. When/how does this get deducted? I'm curious how it works, and do they make sure there is no particular time of year when it is disadvantageous or advantageous to buy? (I'm guessing they do)

Regarding the overhead or expense fees associated with holding shares in a mutual fund, how do the fees affect what I'm holding?   Is it taken out of the share price? Is it taken out of the (fractional) number of total shares? Is the expense continuously reflected in either price or number of shares? or does the expense accrue (and adjust) periodically?


Why are the planet's orbits in the form of an ellipse and what is the proof that earth moves in an elliptical path with the sun at its foci? Initially it was thought that earth moved in a circular orbit. Then,how was it discovered that it moves in an ellipse?

Almost all of the orbits of planets and other celestial bodies are elliptical, not circular.   Is this due to  by other nearby massive bodies?  If this was the case a two body system should always have a circular orbit.  Is that true?


How much primes p exist so that $p^3-4p+9$ is a perfect square? Of course we have p = 2, which is basically 9. I have no idea what to do now. I am trying to write it as a product a long time, but i am concluding that it is impossible if we just want integers in the product. Anyway, i don't know another method to seek the others primes.

Find all primes $p$ such that  $ p^3-4p+9 $ is a perfect square.   I tried a few different values for $p$, namely $2,3,5,7,$ and $11$. The prime $p =2,7,11$ all worked but $p =13$ didn't so it makes me wonder. How can I find all primes such that it is a perfect square?  EDIT: it turns out this is problem P25 in post number #63 at


I have an entity class(Buyer) built automatically from database table, it has all the setter and getter. I also added a JSF managed Bean(BuyerBean) and an entitymanager in it.  @ManagedBean @RequestScoped public class BuyerBean {      private EntityManager entitymanager;      public BuyerBean() {     }     public void init(){         entitymanager=Persistence.createEntityManagerFactory("WebApplication3").createEntityManager();     }     public void newrec(){          entitymanager.getTransaction().begin();             Buyer b =new Buyer();              b.setBuyerId(66);              entitymanager.persist(b);             entitymanager.getTransaction().commit();      } }   And my JFS is like this, very simple just for testing:  <html xmlns="http://www.w3.org/1999/xhtml"   xmlns:h="http://xmlns.jcp.org/jsf/html"> <h:head>     <title>Facelet Title</title> </h:head> <h:body>    <h:form>        <h:commandButton value="click 1" action="#{buyerBean.newrec()}"/> </h:form>     </h:body> </html>   I just get this error every time n my browser:  java.lang.NullPointerException  is something wrong with my initiator? if there is, please write the piece of code

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


I wonder what was the intent of the suspicious man from 2016 movie Lion who met little Sheru at the lady's apartment, fluently estimated his physical qualities and wanted to take the boy with him.

In the movie Lion, what was the duo of Noor and Ram planning to do with Saroo? Or is it left ambiguous? (in this case what are the most likely candidates?)


How would I do this question.  Determine the value(s) of $h$ such that the matrix is augmented of a consistent linear system.  My matrix \begin{bmatrix} 1&h&4\\ 3&6&8 \end{bmatrix}  I am not sure how to format it very well in latex. But I do not get this question I am not sure what they are asking. I just know how to find x and y.

Determine the value of h such that the matrix is the augmented matrix of a consistent linear system.   $$ \begin{bmatrix} 1 && h && 4 \\ 3 && 6 && 8 \end{bmatrix} $$   I'm entirely unsure how to go about solving this.  This how far I got:  $$ \sim\begin{bmatrix} 1 && h && 4 \\ 0 && (6-3h) && -4 \end{bmatrix} R_2' = R_2-3R_1 $$  $$ 6-3h=-4 \\ 6+4=3h \\ 10=3h \\ h=3/10 \text{ ?} $$     New progress   $$ \sim\begin{bmatrix} 3 && 6 && 8 \\ 1 && h && 4 \end{bmatrix} R_1 \leftarrow\rightarrow R_2 $$  $$ \sim\begin{bmatrix} 3 && 6 && 8 \\ 0 && (h-2) && 4/3 \end{bmatrix} R_2' = - \frac13 R_1 $$  $$ \sim\begin{bmatrix} 3 && 6 && 8 \\ 0 && 3(h-2) && 4 \end{bmatrix} R_2' = 3R_2 $$  $$ \sim\begin{bmatrix} 3 && 6 && 8 \\ \\ 0 && 1 && \frac{4}{3(h-2)} \end{bmatrix} R_2' = R_2 \div 3(h-2) $$  $$ \sim\begin{bmatrix} -3 && 0 && z \\ \\ 0 && 1 && \frac{4}{3(h-2)} \end{bmatrix} R_1' = 6R_2 - R_1 \\ z = -8 + \frac{24}{3(h-2)} = \frac{-32(h-2) + 24}{3(h-2)} $$  $$ \sim\begin{bmatrix} 1 && 0 && z \\ \\ 0 && 1 && \frac{4}{3(h-2)} \end{bmatrix} R_1' = -\frac13 R_1 \\ z = - \frac{-32(h-2) + 24}{(h-2)} $$


I'm studying networking at the moment, and it just occurred to me that one can easily forge DNS requests with fake IP addresses (since they use UDP). Since DNS relies on UDP for communication, couldn't a malicious user send millions of forged requests to a DNS server (perhaps even root servers?) and easily bring it down? I can't think of a good way to prevent this either (other than switching to another protocol).

This is a  about DoS and DDoS mitigation.   I found a massive traffic spike on a website that I host today; I am getting thousands of connections a second and I see I'm using all 100Mbps of my available bandwidth.  Nobody can access my site because all the requests time out, and I can't even log into the server because SSH times out too!  This has happened a couple times before, and each time it's lasted a couple hours and gone away on its own.  Occasionally, my website has another distinct but related problem: my server's load average (which is usually around .25) rockets up to 20 or more and nobody can access my site just the same as the other case.  It also goes away after a few hours.  Restarting my server doesn't help; what can I do to make my site accessible again, and what is happening?  Relatedly, I found once that for a day or two, every time I started my service, it got a connection from a particular IP address and then crashed.  As soon as I started it up again, this happened again and it crashed again.  How is that similar, and what can I do about it?


i install ubuntu and followed a guide to put 20gb in '/' and the rest (150gb) in '/home'. Now i just found out that a lot of the things installed in ubuntu usually goes to '/' instead of '/home'. I have a lot more things to install.  So what is the point of '/home' ? How do I fix this ? Should I transfer 150gb from '/home' to / ?  Filesystem      Size  Used Avail Use% Mounted on udev            7.8G     0  7.8G   0% /dev tmpfs           1.6G  9.5M  1.6G   1% /run /dev/sda6        19G   16G  1.8G  91% / tmpfs           7.8G  676K  7.8G   1% /dev/shm tmpfs           5.0M  4.0K  5.0M   1% /run/lock tmpfs           7.8G     0  7.8G   0% /sys/fs/cgroup /dev/sda2        96M   29M   68M  31% /boot/efi /dev/sda8       159G  1.1G  150G   1% /home tmpfs           1.6G   56K  1.6G   1% /run/user/1000   what is /boot ? Its not '/' or '/home'

My /boot partition is nearly full and I get a warning every time I reboot my system. I already deleted old kernel packages (linux-headers...), actually I did that to install a newer kernel version that came with the automatic updates.  After installing that new version, the partition is nearly full again. So what else can I delete? Are there some other files associated to the old kernel images?  Here is a list of files that are on my /boot partition:  :~$ ls /boot/ abi-2.6.31-21-generic         lost+found abi-2.6.32-25-generic         memtest86+.bin abi-2.6.38-10-generic         memtest86+_multiboot.bin abi-2.6.38-11-generic         System.map-2.6.31-21-generic abi-2.6.38-12-generic         System.map-2.6.32-25-generic abi-2.6.38-8-generic          System.map-2.6.38-10-generic abi-3.0.0-12-generic          System.map-2.6.38-11-generic abi-3.0.0-13-generic          System.map-2.6.38-12-generic abi-3.0.0-14-generic          System.map-2.6.38-8-generic boot                          System.map-3.0.0-12-generic config-2.6.31-21-generic      System.map-3.0.0-13-generic config-2.6.32-25-generic      System.map-3.0.0-14-generic config-2.6.38-10-generic      vmcoreinfo-2.6.31-21-generic config-2.6.38-11-generic      vmcoreinfo-2.6.32-25-generic config-2.6.38-12-generic      vmcoreinfo-2.6.38-10-generic config-2.6.38-8-generic       vmcoreinfo-2.6.38-11-generic config-3.0.0-12-generic       vmcoreinfo-2.6.38-12-generic config-3.0.0-13-generic       vmcoreinfo-2.6.38-8-generic config-3.0.0-14-generic       vmcoreinfo-3.0.0-12-generic extlinux                      vmcoreinfo-3.0.0-13-generic grub                          vmcoreinfo-3.0.0-14-generic initrd.img-2.6.31-21-generic  vmlinuz-2.6.31-21-generic initrd.img-2.6.32-25-generic  vmlinuz-2.6.32-25-generic initrd.img-2.6.38-10-generic  vmlinuz-2.6.38-10-generic initrd.img-2.6.38-11-generic  vmlinuz-2.6.38-11-generic initrd.img-2.6.38-12-generic  vmlinuz-2.6.38-12-generic initrd.img-2.6.38-8-generic   vmlinuz-2.6.38-8-generic initrd.img-3.0.0-12-generic   vmlinuz-3.0.0-12-generic initrd.img-3.0.0-13-generic   vmlinuz-3.0.0-13-generic initrd.img-3.0.0-14-generic   vmlinuz-3.0.0-14-generic   Currently, I'm using the 3.0.0-14-generic kernel.


Functions with composition form a monoid, and injective functions with composition form a group. Is there in some sense a natural or useful definition for "addition" that would enable formation of a ring? If not, is there a sensible subset of functions where this is possible?

Consider the set $\mathcal{F}=\lbrace f\mid \mathcal{f}:\Bbb{R}\to\Bbb{R}\rbrace$, in which an additive group is defined by addition of functions and a second operation defined as composition of functions. The question asks to verify that the resulting structure does not satisfy the ring properties.     This is the question 24.10 from Modern Algebra, by Durbin, 4th edition.  So what I have so far is that all of the properties for the additive group (with addition of functions as the operation here) hold, associativity of the composition of functions hold, and that the failure must come from the distributive laws.  My proof of my claim, so far;  $$1\,\,\,\,\,[(\mathcal{f}\circ\mathcal{g})+\mathcal{h}](\mathcal{x})=\cdots=\mathcal{f}(\mathcal{g}(\mathcal{x}))+\mathcal{f}(\mathcal{h}(\mathcal{x})).$$ ...but,  $$2\,\,[(\mathcal{f}\circ\mathcal{g})+\mathcal{h}](\mathcal{x})=$$ $$3\,\,(\mathcal{f}\circ\mathcal{g})(\mathcal{x})+\mathcal{h}(\mathcal{x})=$$ $$4\,\,\,\mathcal{f}(\mathcal{g}(\mathcal{x}))+\mathcal{h}(\mathcal{x}).$$ ...which brings me to my contradiction of the properties of rings that;  $$5\,\,\,[\mathcal{f}\circ(\mathcal{g}+\mathcal{h})](\mathcal{x})\neq[(\mathcal{f}\circ\mathcal{g})+\mathcal{h}](\mathcal{x}).$$  So my question is, is this the correct path to showing the distributive laws are not obeyed when composition is taken as an operation on $\mathcal{F}$? particularly my proceeding from 2 to 3 to 4 is what i feel uncomfortable about, like i may be missing a step in there.  thanks


are interesting and all, but are there and scenarios in physics (either confirmed or hypothetical) where fractional calculus is part of a model?

I was curious if anyone could give me an example of the use of  in physics and explain what they offer that "conventional" mathematics does not (in terms of new physics and not just another method to work the problem)?   If you look at the conservation of mass example on the wikipedia page they cite the paper  they derive a general equation for conservation of mass in equation 13. It seems like the fractional derivative is then used as a method to approach their problem, but I dont think it includes new physics (correct me if I'm wrong on this). Is there anything gained by stating that fractional conservation of mass holds in this case (apart from gaining another way to approach the problem)?    Any thoughts on this example or others would be appreciated!


I proved that the determinant of a rotational matrix(which represents a rotation in 3D) must be $+1$ or $-1$, but I am not sure why it can't be $-1$.  I proved it using the fact that the Matrix must be orthogonal, therefore the determinant squared must be $1$.

Why is the determinant of a rotation matrix equal to 1? I would like a geometric interpretation of this. Just curious.


This may be a naive question, but I did not find the answer after searching online and on stackoverflow. I did not know the right keyword for finding the answer. Thanks in advance for giving out a pointer!   My question is on the '{}' in the following command:  find . -name "*.pyc" -exec rm -rf {} \;   Why we need {} and \; here?

The find command seems to differ from other Unix commands.  Why is there the empty curly brackets and a backward flash at the end of the following command?  find * -perm 777 -exec chmod 770 {} \;   I found one reason for the curly brackets but not for the backward flash.   The curly brackets are apparently for the path     Same as -exec, except that ``{}'' is   replaced with as many pathnames as   possible for each invocation of   utility


In special relativity we get a time dilation for high velocities near by c and in general relativity we get also a time dilation near by strong gravity fields.   But what about a combination of these two effects? So if a object has a high velocity and is in a strong gravity field, would the effect of time dilation higher or will the effects cancle each other?

We know that for a GPS we need to make a correction for both general and special relativity: general relativity predicts that clocks go slower in a higher gravitational field (the clock aboard a GPS satellite moves faster than a clock down on Earth), while special Relativity predicts that a moving clock is slower than the stationary one (slow the clock compared to the one down on Earth).  My question is this: is it possible, in theory, to set up an orbit so that these two effects cancel each other out, allowing a clock on board a GPS satellite to tick as if it were on Earth? Is there a distance at which the special and general effects cancel?  Sorry if this is a stupid question - I'm still not entirely confident with the theory of general relativity.


When i run the program, i keep getting the following error:    I read data from a file and add it to a LinkedList but I keep getting this error when I run the program. It also skips every other line from the file which is annoying. Every other line gets added as an "Worker" object to the list fine but I don't know how to get over this problem, any ideas? Here is the code:  BufferedReader sbr = new BufferedReader(new FileReader("src/stafflist.csv"));             LinkedList<Worker> workerList = new LinkedList<Worker>();             while (sbr.readLine()!=null){               String[] lines = sbr.readLine().split(",");                 Worker worker = new `enter code here`Worker(lines[0],Integer.parseInt(lines[1]),null);                 workerList.add(worker);                 System.out.println(worker.toString());             }

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


I need not only to import the data from a cell, but also the cell background color. I've found ways to import color, but it's usually on a 1:1 basis (for example A1 color from the source gets copied to A1 on the destination). My particular need won’t be 1:1.  The destination sheet is a pared down version of the master sheet. I will be setting the IMPORTRANGE function on individual cells.  For example, I set the IMPORTRANGE on B154 to import AG5 on the source. I need the data to be imported and also the cell background color.  My "source" spreadsheet is fairly complex and manages the flow of my entire business. We are a small hotel and the source spreadsheet contains data about reservations and financials. I created a second spreadsheet (“destination”) which is very simple and contains only one sheet and five columns (one is the date and the remaining four represent each of our guest rooms) and 366 rows — representing each day of the year (leap year).  The basic purpose of the destination sheet is so the service staff can check it on an ongoing basis and know the reservation schedule and know when a room needs to be reset. IMPORTRANGE is the perfect solution for this and I’ve already set it up. BUT in addition to the data being imported, I also need the cell color. As you will see in the images below, the color represents the duration of the guest stay.   Source:     Destination:

Is it possible to reference a cell in Google Sheets so that cell where it gets displayed also displays it using the same text and cell colour formatting?  =A1   Will only reference cell's value. But if that particular cell has red background and white text I'd like that to be copied as well.  I'm leaning toward existing formula solutions rather than scripts. If applicable of course.


I am getting errors while installing Pop Os from Ubuntu. Error while adding repository: sudo add-apt-repository ppa:system76/pop Err:22 http://ppa.launchpad.net/docky-core/ppa/ubuntu focal Release  404  Not Found [IP: 91.189.95.83 80] Err:23 http://ppa.launchpad.net/enso-os/panther-launcher/ubuntu focal Release   404  Not Found [IP: 91.189.95.83 80] Reading package lists... Done N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'http://apt.postgresql.org/pub/repos/apt focal-pgdg InRelease' doesn't support architecture 'i386'  Error while updating sudo apt update Err:22 http://ppa.launchpad.net/docky-core/ppa/ubuntu focal Release   404  Not Found [IP: 91.189.95.83 80] Err:23 http://ppa.launchpad.net/enso-os/panther-launcher/ubuntu focal Release   404  Not Found [IP: 91.189.95.83 80] Reading package lists... Done                       N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'http://apt.postgresql.org/pub/repos/apt focal-pgdg InRelease' doesn't support architecture 'i386' E: The repository 'http://ppa.launchpad.net/docky-core/ppa/ubuntu focal Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://ppa.launchpad.net/enso-os/panther-launcher/ubuntu focal Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.  Error while installing sudo apt install pop-desktop.  trying to overwrite '/usr/lib/gnome-initial-setup/vendor.conf', which is also i n package gnome-initial-setup 3.36.2-0ubuntu1 dpkg-deb: error: paste subprocess was killed by signal (Broken pipe) Errors were encountered while processing:  /var/cache/apt/archives/pop-gnome-initial-setup_3.36.1~1593716052~20.04~e07a263 _amd64.deb  What's the solution???

For example:  $ sudo apt-get install curl Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: bsh : Depends: libjline-java but it is not going to be installed groovy : Depends: libjline-java but it is not going to be installed rhino : Depends: libjline-java but it is not going to be installed E: Unmet dependencies.   Try 'apt-get -f install' with no packages (or specify a solution).   I get the same or similar errors when I attempt to install clojure1.3, leiningen, and several other packages.   When I try the suggestion made in the error message, this is what happens:  $ sudo apt-get -f install  Reading package lists... Done Building dependency tree        Reading state information... Done Correcting dependencies... Done The following packages were automatically installed and are no longer required:   diffstat linux-headers-3.2.0-26-generic linux-headers-3.2.0-26 dh-apparmor dkms html2text libmail-sendmail-perl libsys-hostname-long-perl Use 'apt-get autoremove' to remove them. The following extra packages will be installed:   libjline-java Suggested packages:   libjline-java-doc The following NEW packages will be installed:   libjline-java 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. 23 not fully installed or removed. Need to get 0 B/72.0 kB of archives. After this operation, 129 kB of additional disk space will be used. Do you want to continue [Y/n]? Y (Reading database ... 226243 files and directories currently installed.) Unpacking libjline-java (from .../libjline-java_1.0-1_all.deb) ... dpkg: error processing /var/cache/apt/archives/libjline-java_1.0-1_all.deb (--unpack):  trying to overwrite '/usr/share/java/jline.jar', which is also in package scala 2.9.2-400 Errors were encountered while processing:  /var/cache/apt/archives/libjline-java_1.0-1_all.deb E: Sub-process /usr/bin/dpkg returned an error code (1)  $ sudo apt-get upgrade Reading package lists... Done Building dependency tree        Reading state information... Done You might want to run 'apt-get -f install' to correct these. The following packages have unmet dependencies:  bsh : Depends: libjline-java but it is not installed  groovy : Depends: libjline-java but it is not installed  rhino : Depends: libjline-java but it is not installed E: Unmet dependencies. Try using -f.


Let G be a group and $(xy)^2=(yx)^2$ for all $x, y ∈ G$. Show that $xy^2=y^2x$ for all $x, y ∈ G$.   I understand the solution for this question but I have seen some people solve it in this way:  Choose $y = x^{-1}y$ and substitute in for $y$  $$xx^{−1}yxx^{−1}y=x^{−1}yxx^{−1}yx⟹y^2=x^{−1}y^2x⟹xy^2=y^2x$$  My issue with this solution is that we're assuming under multiplication closure for any arbitrary element $y ∈ G$, we have $y = x^{-1}y$ for all $x ∈ G$. This seems incorrect. Can anyone explain why I may be wrong about this?

I'm not quite sure if I did this right but I had another solution that made no sense to me:   This is the solution I do not understand. I did not solve it this way.  $=>(xy)^{-1}(xy)^2(yx)^{-1} = (xy)^{-1}(yx)^2(yx)^{-1}$  $=>(xy)(yx)^{-1} = (xy)^{-1}(yx)$  then somehow we have   $=> xy^2 = x((x^{-1}y)x)^2$  $=> xy^2 = x(x(yx^{-1}))^2$  $=> xy^2 = (xyx)^{-1}(xyx^{-1})x$  $=> xy^2 = y^2x$  I'm positive that the solution above is wrong I just need confirmation.   This is my solution:  Since G is a group then for all x,y ∈ G there exists $x^{-1}$ , $y^{-1}$ ∈ G.  $(xy)^2 = (yx)^2$  $y^{-1}x^{-1}xyxy = y^{-1}x^{-1}yxyx$  $xy = y^{-1}x^{-1}yxyx$  $y = x^{-1}y^{-1}x^{-1}yxyx$  Take the left hand side of $xy^2 = y^2x$ and substitute $y = x^{-1}y^{-1}x^{-1}yxyx$  $xy^2 = x(x^{-1}y^{-1}x^{-1}yxyx)^2$  $xy^2 = x(x^{-1}y^{-1}x^{-1}yxyx)(x^{-1}y^{-1}x^{-1}yxyx)$  $xy^2 = xx^{-1}y^{-1}x^{-1}yxyxx^{-1}y^{-1}x^{-1}yxyx$  $xy^2 = y^{-1}x^{-1}yyxyx$  $xy^2 = y^{-1}x^{-1}y^2xyx$  $xyxy^2 = y^2xyx$  $y^{-1}x^{-1}xyxy^2 = y^2xyxx^{-1}y^{-1}$  $xy^2 = y^2x$.


I was working on some SFTP via filezilla to allow download and reupload of some file I took owner ship via ROOT and chown -R 'myusername' /etc and chmod 777 my user account for -R /etc  Now I got timed out and tried to login to root again and it gives me error   sudo: /etc/sudoers is owned by uid 1000, should be 0   sudo: no valid sudoers sources found, quitting   sudo: unable to initialize policy plugin I have access to the /etc and 777 on all the files and also can access them via FTP so please suggest how to restore access to the root account Also the root as no password at this time so i cant run the general pkexec or visudo commands.   Please suggest a solution and also if there is a way to manually reset the /etc/shadow or passwd files.  I think it is slightly different than the indicated duplicate Becuse i changed the permissions on the files too. Also if i run  chown root:root /etc/ it will give me   chown root:root /etc chown: changing ownership of '/etc': Operation not permitted  Thank You!

I needed to edit a .config file (which I know for a fact is not creating these problems, just to clear that up) and it wouldn't let me save it, so I took ownership of /etc and all contents with the command chown -hR username /etc and that let me edit the .config file but now whenever I try to install any packages or use any sudo commands, it doesn't work  (I've checked for errors in the sudo file in sudoers.d and there was nothing wrong with that).   So how do I return it to the previous owner?


I came across this line of coding of previous developer's script and do not understand.  Could anyone please tell me what it means?  fgrep -f ${OLD_LOG} ${NEW_LOG} > ${SAME_FILE} 2>&1

I would like to learn how to use it so I can start to use the terminal more.


There are a lot of questions about the time turners in Harry Potter.  There's a fan theory that Ron could have used one and become Dumbledore at some point in the past (but that's been debunked).  I also asked .  It seems that Rowling had them all destroyed to stop time travel issues (such as paradoxes or the idea that one could be used to just undo all the bad with Voldemort before it started).  The time turners are magic machines, so they had to be created at some point.  But are they the only way to time travel and why couldn't one use the same type of magic a time turner uses to move back in time more than just an hour?

I'm curious whether any canonical explanation has ever been given. It seems that Time Turners must be extremely difficult to create, seeing that it's mentioned in the books that their use is tightly controlled by the Ministry of Magic (so obviously a wizard can't just wave their wand over an hourglass and turn it into a Time Turner); also because they mess with the very fabric of reality (so it's hard to imagine there being some naturally occurring magical material that just happens to be able to enable time travel.)


I want to say the answer is "no", because Voldemort probably killed way more people than the amount of horcruxes he has and not every evil murderer wants to make horcruxes.  Also it seems to be a complex process, given that Tom Riddle asks Slughorn about it. It requires an evil act (like murder), but it seems to be more to it.  But, Harry was a horcrux Voldemort never wanted and not really knew about.   Can one accidentally make a horcrux?

Killing is said to fracture one's soul and Voldemort uses this to create horcruxes.  I always assumed that it was because of the evil intention and the act of killing someone was what caused the soul to split.  Does killing by accident also cause one's soul to splinter?


$\sum_{i=1}^n i2^i$   How can we derive a function out of this summation. I saw similar type  of  before but the $\lvert r\rvert$ in $ir^i$ is < 1. How can we create a function when $\lvert r\rvert > 1$ (in this case $2$)

I want to know the general formula for $\sum_{n=0}^{m}nr^n$ for some constant r and how it is derived.  For example, when r = 2, the formula is given by: $\sum_{n=0}^{m}n2^n = 2(m2^m - 2^m +1)$ according to   Thanks!


This isn't really a question but more like my frustration and criticism -     After spending countless hours, searching web for answer, there seems to be a lot of confusion about the Virtual Box versions i.e. OSE - PUELand I still don't know which version I am using, I mean i know it is 4.3.6r91406 but which one  here is one post  describing steps to install which is exactly what I followed PUEL and 2nd post  saying it is only possible with OSE and 3rd post suggesting different solution altogether   I still managed to use USB support with VM, without deleting or installing - I used USB as it is now.  So, what is criteria for maintaining these forums and who does it ? or may be I did not use it the way it is meant to be ?!

I'm using Ubuntu Maverick and Virtual Box 3+. I have Windows 7 Ultimate. The problem is that it doesn't detect USB drives in Windows 7, but USB peripherals (mouse + keybord) are working.  I followed , but I can't find the user group vboxusers. How can I continue? I would also like to upgrade to the latest version without any risk (without losing my virtual hard disk drive).


After studying a bit of theoretical mechanics, I was a bit puzzled by why discrete symmetries do not allow for the existence of conserved quantities in general. What would be a fundamental explanation of why this happens? More accurately, what impedes the existence of analogues to Noether's theorems for the discrete case?

states that, for every continuous symmetry of an action, there exists a conserved quantity, e.g. energy conservation for time invariance, charge conservation for $U(1)$. Is there any similar statement for discrete symmetries?


I made a typo while offering a bounty on the question  Is there a way to fix spelling on bounty notice? Can site moderators do this?

I start  and when I add a bounty remark I often get it right the first time. Once when a mistake in my message was problematic a moderator was kind enough to take the time to help me by cancelling/refunding it manually, followed by me starting a new one.  in 2012:  How about this:  a (say 5 minute?) short time frame to edit the text, much like comments perhaps during that period a small warning for viewers, explaining the bounty text may still be tweaked  That would allow honest folks to catch perhaps up to 95% of all minor (often formatting) mistakes, without a (big) risk of people investing wasted time to score a bounty while finding out later the bounty requirements changed a lot.  And in 2013, to the question , this  suggests (in part)  I suggest, given that  after it's started, it would be helpful:  If there would be a preview of your bounty text, before posting it; and/or If there would be a link to view the available markdown that's allowed, much like the help for comments.   Question: In 2019, with all the improvements to the site in the intervening years, is it possible to reconsider some way to edit bounty remark within 5 minutes as comments have, or to have some way to correctly preview them? I'm not sure if posting the draft message in an answer post window to preview will display everything correctly. There could potentially be typos or inadvertent formatting characters that display differently between the two, I don't know. I also don't know if there are any bounty-scamming schemes that could be implemented by changing a bounty remark within the first five minutes, the danger seems low but unlike me, some people are clever...  Example of a non-critical formatting problem ; an extra space at the end of the [title ] results in a failed hyperlink display. Everyone can copy/paste it, but a functioning hyperlink would have been better.


It says in my profile that I do not have a Careers account, but I do.

Update:  Thanks for all the feedback and bug reports! I am locking this thread so people don't keep answering it when we no longer monitor it.  If you see a bug or want to raise a feature request, please do so in the usual manner, as a new question.    Some of you may have noticed that  the  and  pages that we have been talking about for a while now on .  Most? Well, yes, the new design is dependent on a SE network-wide update (a new base css framework) that the design team have been working on. This is an ongoing effort and we will be launching the new pages as sites are moved to the new design.  You've all been hugely helpful already - much of what we love most in here came from  and  you gave us on Meta.     But it's possible that it's not quite perfect yet. If you find any bugs and have any feedback to give, please post these as answers to this post.  Just post one issue per answer - that would help us focus on specific items one at a time.


This is the first time I am writing a Factory class. Below is my Factory class, I am not sure whether this is the correct way of making thread safe Singleton Factory class or not. I will be returning instance of my Client using this factory?  public class ClientFactory {      private static ClientFactory instance = null;         private ClientFactory() {      }      public static ClientFactory getInstance() {          if (instance == null)         {             instance =  new ClientFactory();         }          return instance;     }      public IClient getClient() {          return new TestClient();     } }   And here is my TestClient class -   public class TestClient implements IClient {   }   And this is how I am going to use my factory -   IClient client = ClientFactory.getInstance().getClient();

What is an efficient way to implement a singleton pattern in Java?


I'm trying to target the first letter of each word in a string. I'm working in JavaScript. I've found discussions for Python and PHP that don't address my problem specific to JavaScript.   str = "i'm a little tea pot"  regEx = /^.|\b[a-z]/g   I have a function that uppercases each letter the regEx finds. My result is the m after the apostrophe is capitalized. How do I avoid this?  After uppercase function: I'M A Little Tea Pot"

Is there a simple way to convert a string to Title Case? E.g. john smith becomes John Smith. I'm not looking for something complicated like , just (hopefully) some kind of one- or two-liner.


I am having trouble when I create a library that links to an external library (linear algebra, MUMPS). If I simply write a program composed of a Main.cpp , and a module SOLVER.h and SOLVER.cpp, and I link the library MUMPS everything runs fine.  But, if I first create the SOLVER library, and then compile the same Main.cpp an try to link against the SOLVER and MUMPS library, I get an error. Below, the example: Main.cpp file  #include "SOLVER.h" int main(void) {            Eigen::VectorXd  A; Eigen::VectorXd b;     A.resize(2);  b.resize(2);     b << 1,2 ;   A << 3.0 , 4.0 ;      SOLVER Solver;     Solver.SolveLinSyst(A, b);         return 0; }   Here the sought library header  #include <Eigen/Dense> #include "dmumps_c.h"  #include <vector>   class SOLVER {    public:              std::vector<int> ROW_ , COL_ ;      DMUMPS_STRUC_C mumps_par;     // mumps structure       void SolveLinSyst(Eigen::VectorXd &a, Eigen::VectorXd &inout);    protected:              void AllocateInitializeVectors();      void NewtonStep();                        };   Inside the SOLVER.cpp I have an instantiation of a MUMPS structure dmumps_c(&mumps_par).   When I compile directly the Main and SOLVER module, all works fine.  However, when I first compile SOLVER as a library, and then, separately, I try to compile the Main linking it against the generated libSolver.a library I get an error message. This is the makefile that I used to create the library, or to compile directly the Main and the SOLVER.cpp .   CFLAGS=-c  -std=c++14  -Wfatal-errors   -lm -O0 -g -Wall -Wunused-parameter -fwhole-file   -pedantic  -Wextra  LIBS = -ldmumps -lmumps_common -lmpiseq -lopenblas -lgfortran -lquadmath -lpthread all:    Main_  library:    SOLVER.o     ar  r  libSolver.a SOLVER.o     ranlib libSolver.a  Main_: SOLVER.o Main.o     g++ -static $(INCLUDES) SOLVER.o Main.o -o Main.exe $(LIBS_PATH) $(LIBS)  -Wl,-rpath=$(LIBS_PATH)     Main_.o: Main_.cpp     g++ $(CFLAGS)  $(INCLUDES) Main_.cpp   SOLVER.o: SOLVER.cpp     g++ $(CFLAGS)  $(INCLUDES) $(LIBS_PATH) $(LIBS) SOLVER.cpp    If I create the library separately, I copy the Main_.cpp into Main_testlib.cpp in a subfolder, I add the include path of SOLVER.h, the path of the above generated libSolver.a library   INCLUDES2 = $(INCLUDES) -I../ LIBS2 =  $(LIBS) -lSolver LIBS_PATH2 = $(LIBS_PATH) -L../  all:    Main_testlib  Main_testlib: Main_testlib.o     g++  Main_testlib.o -o  Main_testlib.exe $(LIBS_PATH2) $(LIBS2)  -Wl,-rpath=$(LIBS_PATH2)  Main_testlib.o:  Main_testlib.cpp     g++ $(CFLAGS) $(INCLUDES) Main_testlib.cpp   I ge the error at linking stage:  >     ..//libSolver.a(SOLVER.o): In function `SOLVER::SolveLinSyst(Eigen::Matrix<double, -1, 1, 0, -1, 1>&, > Eigen::Matrix<double, -1, 1, 0, -1, 1>&)': >     C:\test/SOLVER.cpp:18: undefined reference to `dmumps_c' >     ..//libSolver.a(SOLVER.o): In function `SOLVER::AllocateInitializeVectors()': >     C:\test/SOLVER.cpp:34: undefined reference to `dmumps_c' >     collect2.exe: error: ld returned 1 exit status

Why does the order in which libraries are linked sometimes cause errors in GCC?


Trying to remember the name of a book. It was about a male slacker/loser who is captured by an alien because he won't be missed. The alien has a machine on his ship that input information directly into his brain. Things like card tricks, basic wound treatment, karate, and so on. He is taught all human knowledge and take to an alien world where he is supposed to be a counterbalance to an (protohuman/Neanderthal?) other human who was captured in the far distant past. But the aliens where manipulated by the other human to capture the slacker in the first place (can't remember why). I read this book in the 80's or 90's.  Please help my faulty memory.   Thanks

I am trying to remember a novel I half read as a teen (1984-1986), I borrowed it from the library but had to take it back before finishing.  I believe it was in an omnibus/ compilation edition book with two or three SciFi stories by different authors.  The plot was an alien studying the mental capacity and ESP of the human race.  The alien abducts a low level criminal/ wise guy from America and takes him to a base in the Arctic (perhaps) for study.  He is subjected to a number of physical and mental tests to find out how dangerous or powerful the human race could become.  I got as far as the criminal overpowering the alien and escaping in his spaceship to explore the galaxy.  Unique things I remember;   The human is put in an exo-skeleton to test and improve his flexibility. The human manages to fool the alien ESP testing/ training equipment.   Escapes his cell at night to use it unsupervised to increase his ESP powers in order to gain the upperhand.  In his travel through the galaxy he meets a insectoid race, (butterfly like? or maybe bat)   The insectoid is amazed humans still dream, when he gets telepathically pulled into a dream the main character is having.  ESP powers the main character gains includes matter translation, like turning wood into a steak or hamburger. The main character doesn't understand the risks of overuse of ESP powers.


show that the product space $\mathbb{R}^I$, where $I$ denote $[0,1]$, has a countable dense subset.

I'm doing this exercise in Munkres book and got no clue about the solution. Hope some one can help me solve this.          Show that the product space $R^{I}$, where $I = [0,1]$, has a countable dense subset. If $J$ has cardinality greater than $\mathscr{P}(Z_{+})$, then the product space $R^{J}$ does not have a countable dense subset      With this problem, I even can't imagine the space $R^{I}$. So if some one can talk something about this space, I really appreciate it (as I know, this space is rather important, right?)  Thanks so much