Can I determine this RAM slot is damaged?

While playing around with some old parts, I ended up with the following hardware setup:   Mobo: ASROCK 775Dual-VSTA (2x DDRII slots) RAM: 2x Kingston DDRII 533 1GB (KVR533D2N4/1G)   I noticed stability problems (BSOD), so the first though was the posibility of memmory troubles. I performed the following tests with memtest86:   Module "A" on slot 0 + Module "B" on slot 1. Errors were reported. Module "A" on slot 0. No errors reported. Module "B" on slot 0. No errors reported. Module "B" on slot 1. Errors were reported. Module "A" on slot 1. Errors were reported.   Can I assume this motherboard has the DDRII slot 1 damaged?    Why is this question diferent from :   This question asks one concise thing: Advice on identifying a damaged RAM slot. The other question asks: "how could i see if the RAM Slot is broken" and "in case it is how could i fix it" This question refers to a completely different research procedure prior to asking the question itself.


What is the difference between the *.ubuntu.com wikis?

I realised I'm a bit confused about something. I have found three separate wikis hosted at ubuntu.com, and I'd like to know their respective purposes and relationships. I have some guesses (see below) but I'd prefer some clear/official/de facto descriptions or links.  Official Documentation () My guess: the official wiki page for running X on Ubuntu, where X is an officially supported package.  Community Help Wiki () My guess: the public wiki page for running X on Ubuntu, where X is any old thing.  Ubuntu Wiki () My guess: contributor-supported documentation for how to make contributions to the Ubuntu platform itself (not development  Ubuntu).    My primary interest here is in understand what they are so I can a) use them for my own reference, b) contribute to them if possible and c) link to them from AU (where relevant)


iOS 13 public release is not showing in my iPhone Software Update

I have been using Beta versions of iOS 13.  Now even after iOS 13 public release is made, My device is still showing iOS 13.1 public beta 4 in the Software update.  What do I need to get the public release ?  Note* You may wonder why I need the public release, I just want to make sure how it behaves in the public version, since some of my apps is facing few UI issues in iOS 13 beta versions.


Is it possible to put more than one Pokemon in a gym?

Is it possible to deploy more than one Pokemon in a gym? And how many gyms can you be in?


How to re-organize my desktop environments?

I wanted to try out some different desktop environment other than Unity so I installed kubuntu-desktop using  sudo apt-get install kubuntu-desktop   then I didn't like it so much, so I removed it according to an answer to one of the questions here by executing  sudo apt-get purge kubuntu-desktop sudo apt-get autoremove   but apparently this did not completely remove it as I still noticed that I could still choose KDE Plasma from my login screen, some programs that were installed with this desktop environment are still installed, I still have my start up and shutdown screens in black and say kubuntu, etc.  I tried to re-install ubuntu-desktop using   sudo apt-get install --reinstall ubuntu-desktop   in a try to get my start up/shutdown screens back to be consistent with the currently installed desktop environment at the time (i.e., ubuntu-desktop), but this wasn't successful.  I then installed xubuntu-desktop using  sudo apt-get install xubuntu-desktop   and now I'm still having my start up/shutdown kubuntu black screens in addition to xubuntu login screen and I didn't see an option in the xubuntu login screen to get back to Unity if I wanted to though.  My questions now is,  in this situation, how to completely remove kubuntu-desktop and everything that is related and keep ubuntu-desktop and xubuntu-desktop installed?  Thank you!


Why can't I connect to Pokemon Go via mobile data?

It connects to Pokemon Go via wi-fi perfectly fine, but when I try and connect to Pokemon Go via 3G it just gets stuck at the first bar on the loading screen with the eventual pop up saying "Failed to get player information from the server." My 3G connection works perfectly fine with every other app I have, and has been easily able to stream HD videos so I can't see connectivity with 3G being an issue.   It makes even less sense as once connected via wi-fi, the game easily continues to operate via mobile data once I leave the house. However once the app crashes (which it usually does after 15-30 minutes) I try to reload it on mobile data and it gets stuck on the loading screen. If I can find a local free wi-fi spot nearby I can re-connect easily, and then move back onto mobile data.  I've tried removing and reinstalling Pokemon Go and that didn't work. I also reset all my app preferences on my phone and that didn't work.  Not sure if this helps, my phone is a Huawei P8, Android version 5.0.1.  I signed up to Pokemon Go using my Google account.


//index.php                                outside the dom         <form   name='frm_details' class='frm_details' id='frm_details0' action=''>         <input type='text' name='fname'>         <input type='text' name='lname'>         <input type='submit' value='Outside dome'>         </form>

   //domcontent.php  inside the dom <form   name='frm_details' class='frm_details' id='frm_details1' action=''> <input type='text' name='fname'> <input type='text' name='lname'> <input type='submit' value='inside dom'> </form>   im running into an issue with the 2 pages above index.php and domcontent.php my end goal is to be able to submit forms from index.php and domcontent.php using the same piece of ajax code bare in mind these are both the same form one is new and the other is update  the issue is when submitting the form  frm_details0 from index.php it sees the ajax and submits the form to functions2.php i can see this works via the chrome network developers tool but the form frm_details1 inside the dom loaded via ajax onto index.php doesn't submit or even access functions2.php how can i make the form loaded inside the dom on index.php submit using the ajax located on index.php  im new to ajax so where possible please show edits to my code   thanks in advance


How Much Gig Needed For Installing Ubuntu

Newbie here.  How much space does Ubuntu need to install.  I thought it was 50 Gig.  But, it requested half my drive 449 Gig (half a terabyte).  Installing 16.0.4  How many Gig for Ubuntu itself?


How to create user with sudo privileges from shell script?

I am writing a shell script that will create a user that I will use for deployments. I want to add that user to be able to use sudo without a password. How can I create this user from a shell script or from the command line?  This is what I have so far (this script is run as the root user):  # create user useradd deploy -m -s /bin/bash  # copy authorized keys mkdir -p /home/deploy/.ssh cat ~/.ssh/authorized_keys > /home/deploy/.ssh/authorized_keys chown -R deploy:deploy /home/deploy/.ssh


I apologize if this question it too basic, but I have had this doubt for as long as I can remember. Consider the following sentence:  "The first thing that needs to be done is to set the trajectory."  Is it correct to use the "to" before "set the trajectory"? Or could I remove it, leaving me with:  "The first thing that needs to be done is set the trajectory."  I have tried searching for examples online, but I have not been successful.


Combinatorial Argument for the following binomial identify

Prove the following identify using a combinatorial argument for all positive integers $n$: $${n \choose 0}-{n \choose 1}+{n \choose 2}…(-1)^n{n \choose n}$$ For odd $n$, it's simple enough, we can just use the combinatorial argument for the well known symmetry identity ${n \choose r}={n \choose n-r}$ But I can't think of what to do when $n$ is even, the alternating $±$ makes things weird. Source of problem: Paul Zeitz's The Art and Craft of Problem Solving, $6.1.24$


CD interest rate US vs abroad, is there a catch?

I was in Ukraine and ran into a few banks that offer anywhere from 5% to 10% interest rate on investment per annum. For example, Erste Bank is willing to pay . I have few accounts with Chase, and those guys are offering 0.25% APY for 12 months. This made me thinking because the difference is huge.  I have looked at  and answers there highlight the risk of investment associated with exchange rates and non-FDIC insured banks. On top of it, I still have few questions.   If I make an investment in USD, in foreign bank, does that imply currency conversion or no? I have heard that all financial operations must be performed in national currency. Does it mean that to deposit or withdraw money to/from bank account in foreign country, even though in US dollars, money must be converted to and from national currency? Is FDIC insurance really that expensive to drop the interest from, say, 5% to 1.25%? Or otherwise why foreign banks offer that much higher rate of return? I am thinking about splitting some money across many foreign banks. Is there anything else I should take into account?


Don't show Cleanup badge until you can earn it

I read this:   and this:   If this badge is only available for users with 2000 rep and above, why do I see it? It should be invisible until I have 2000 rep.  I think it's better to not show it until user has 2000 rep. Expose the badges only when someone can get them.


Graph Theory- show maximum number of edges in a simple graph

Show that the maximum number of edges in a simple graph with n vertices is $\frac{n(n-1)}{2}$ ?


Should "the" be capatalised in this situation?

My friend is starting a blog, and the name she is planning to use for it is based in this structure:  "Becky" the "Foodie".  Should "the" in the name/title be capitalised? Becky The Foodie? Or Becky the Foodie?  Thanks so much!


WP_QUERY with alternating post types and pagination

I want to show both regular posts and a custom post type (event) on the homepage in a single loop. The event post type needs to be ordered by a custom field for the event date and show future events. I can easily do this using a meta_query. Since setting using a meta_query on a query with my events and regular posts won't return the regular posts (since they have no event date) I have used the solution in  to apply the meta query only to the events.  The problem is - since the events are sorted by a future date and the posts are sorted by a past date, the result is all the events followed by all the posts. What I would like to do is alternate the order with a post from each post type - so the result should be: Event1 - Post1 - Event2 - Post2 - Event3...  I also need pagination to work as expected.   One solution I can think of is to run 2 separate queries and then alternate displaying a post from each, but I'm not sure how I could reliably get pagination working with that. I could feed the resulting post IDs from 2 separate queries in to a third query but 3 queries doesn't sound like an ideal solution!  I'm assuming this could be done with the SQL from my current code but SQL gives me a headache and I don't know where to start!


Test class for trigger on Opportunity Object

@istest public class Test_TriggerOpportunity {      private static testmethod void TestOnOpp(){          List<Opportunity> OppList=new LIst<Opportunity>();         Opportunity Opp=new Opportunity();         Opp.id=Opp.AccountId;         Opp.Name='TestOpp';         Opp.CloseDate= Date.newInstance(2016, 12, 9) ;         Opp.StageName='ClosedWon';         OppList.add(opp);         insert OppList;              list<Account> AccList=[select id,Name,Rating from Account Where id = :Opp.AccountId];         Account Acc=new Account();         Acc.Name='testName';         Acc.Rating='Hot';         AccList.add(Acc);              Update Opplist;              }  }  My code is covering only 65% how should i cover line #7,8 & #15,16


What are the transition costs for a proficient LaTeX user to LuaTex?

I have dedicated a lot of time learning LaTeX, but periodically hear about LuaTex and its virtues. What I don't hear are the costs of switching over, other than the need to have new programs.  There are two costs that I expect in any transition:   The difficulty in learning new commands for old functionality. If there is a new function in LuaTex that I couldn't use in LaTeX, of course I need to learn that, and that isn't a transfer cost, per se, but the cost of expanding my technical repetoire. However, if I need to relearn commands I once new, then that is a cost. The cost in changing existing texts to use LuaTex. Since I have ongoing projects, changing over would entail changing current projects to match the new format.   In each case, the question is how hard is it to keep doing what I can currently do in LaTeX but in LuaTex. If there is perfect compatibility in LuaTex with LaTeX commands, there is no additional cost just to change over. If the commands are utterly different, then it is like someone starting from scratch at either language.  I am not looking for recommendations, as that falls outside the scope of SE, just general descriptions of the major differences, and educated estimates of the difficulty of making those changes.


Paradox - minus one equals one using square roots

I was looking on Howard Eves's book "An Introduction to the History of Mathematics" and I stumbled upon a demonstration on how $-1 = 1$. The demonstration follows:  $$ \sqrt{-1} = \sqrt{-1} $$  $$ \sqrt{-1\over1} = \sqrt{1\over-1}$$  $$ {\sqrt{-1}\over\sqrt{1}} = {\sqrt{1}\over\sqrt{-1}}$$  $$ \sqrt{-1}\cdot\sqrt{-1} = \sqrt{1}\cdot\sqrt{1} $$  Thus:  $$  -1 = 1  $$  My question is simple: how can it be? Where is the error? Is that a paradox?  Thanks in Advance!


I want to exclude certain local folders with Google Drive but I *keep* them on the computer

Using Google Drive on Windows (although I think the same question applies to OS/X) I want to exclude certain local folders but keep them on the computer.  When I go to Drive preferences and deselect specific folders, it wants to remove them from the local PC and keep them only in the cloud.  This doesn't work for me.  I feel like I could do this in earlier versions of the Google Drive client but I cannot recall for sure.  Is this possible?


Does it makes sense to use const qualifier on input parameters for C++ functions?

Does it makes sense to use the const qualifier for input parameters in C++ when the parameter is passed by value ?  For example if I pass a primitive type like integer:  void function( const int aValue );   does it gain any benefit over the same function without using the const:  void function( int aValue );   Is there any difference if I pass my own data type ?  void function( Data aData ); void function( const Data aData );


Are we discouraged from fixing typos and misspellings on Stack Exchange sites?

I just attempted to fix a typo on a question on cooking.stackexchange.com and saw this     Oops! Your edit couldn't be submitted because:         Your edit summary must be at least 10 characters   This edit is less than 6 characters; surely more can be improved with your edit?      So, misspelled words have to just be left misspelled?  That could prevent the post from being found in a search.


Append same timestamp to multiple filenames

I have several files that I ftp each hour.  The receiving system needs to have some sort of identifier that they came from the same batch, so I would like to append a timestamp to the filename.  That alone is fairly easy, but since I want each file to have the same timestamp (so it can serve as the batch identifier), I cannot figure out how to do this.  So, I have:  file1.txt file2.txt file3.txt   And I want to have:  file1_20141110184303.txt file2_20141110184303.txt file3_20141110184303.txt   Any use of the date +%Y%m%d%H%M%S after the first use will obviously result in a different values in seconds, so I would like to have the first timestamp appended to the remaining files.


I am running Ubuntu 20.04 an  with an NVIDIA GeForce GTX 1660TI GPU. According to , the driver version for this GPU is 430. When I first installed Ubuntu, I installed 440. I'm now trying to correct that and install 430. I ran sudo apt-get install nvidia-driver-430, and then did a reboot. When I examined nvidia-smi, though, it still showed the 440: +-----------------------------------------------------------------------------+ | NVIDIA-SMI 440.100      Driver Version: 440.100      CUDA Version: 10.2     | |-------------------------------+----------------------+----------------------+ | GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC | | Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. | |===============================+======================+======================| |   0  GeForce GTX 166...  Off  | 00000000:01:00.0 Off |                  N/A | | N/A   55C    P0     9W /  N/A |      0MiB /  5944MiB |      0%      Default | +-------------------------------+----------------------+----------------------+  What is the appropriate way of updating this driver?


I am trying to build an iterator with python but i should use a true iterator for example using yields. I am only a beginner in python so I would appreciate every help.  class Graph(object):         def __init__(self):             #structure for edges and vertices             self.__vertex_edge_map = {}          def add_vertex(self,vertex):             #add new vertex             if vertex not in self.__vertex_edge_map:                 self.__vertex_edge_map[vertex] = []          def add_edge(self,source,destination):             #add edge              self.add_vertex(source)             self.add_vertex(destination)             if destination not in self.__vertex_edge_map[source]:                 self.__vertex_edge_map[source].append(destination)   !!!Edit: Therefore this program shows an directed graph. The Iterator should enumerate all edges of the graph. The order of iteration is up to you.


Minimum frequency of an electromagnetic wave

Is it possible to create an electromagnetic wave of near zero frequency?   An electromagnetic wave carries energy. If we can make the frequency of an EM wave vanishingly small and make it practicality DC, will it also carry energy? I don't think it is possible. Hence there should be some fundamental limit on the minimum frequency of an EM wave.   Is there any such thing?


After updates pushed on 23 Aug 2016, Ubuntu 14.04 LTS freezes while running videos on Chrome

I am running Ubuntu 14.04 on a laptop  with following COnfiguration:  RAM: 4GB  Proccessor: Intel® Pentium(R) CPU N3540 @ 2.16GHz × 4  Graphics: Intel Bay Trail  OS: 64 Bit  There were few packages pushed on 23 August 2016 from Ubuntu update center. The packages are mostly related to  XServer.  After this, my laptop freezes completely while running Google  Chrome. It freezes with Mozilla also, but that happens after a very long run time. But with Chrome, it freezes in 20-30 minutes or so. More faster when I am running Videos on chrome.  Can any one help me on this? It's really irritating to restart my computer using Power button every now and then.  Chrome Version: 52.0.2743.116 (64-bit)


How to pass single parameter and get multiple values using ajax?

In my java project i'm using jsp page. Here I just passing a single parameter and i want to retrieve multiple(3) values from the database. I know how to pass and get single parameter only. But i don't know how to get multiple values by passing single parameter. My ajax code is below:  var request; function sendInfo1() {     var v = document.Example.wayid.value;     // var url = 'Showroutelink.jsp?val='+v+'&start='+v1+'&end='+v2;     var url = 'Showroutelink.jsp?val='+v;      if (window.XMLHttpRequest) {          request = new XMLHttpRequest();     } else if (window.ActiveXObject) {         request = new ActiveXObject("Microsoft.XMLHTTP");     }      try {          request.onreadystatechange = getInfo1;         request.open("GET", url, true);         request.send();      } catch (e) {         alert("Unable to connect to server");     } }  function getInfo1() {      if (request.readyState == 4) {           var val = request.responseText.split('|');            document.getElementById("start").innerHTML = val[0];         document.getElementById("end").innerHTML = val[1];         document.getElementById("waypoints").innerHTML = val[2];     } }     This is My Setver side Java code  <%     String R_Name=request.getParameter("val");     int w_id=0;               String wplist = "";             // String R_Name = request.getParameter("way");              try {                  String buffer = "<select name='state'>";                 Class.forName("com.mysql.jdbc.Driver");                 java.sql.Connection con = DriverManager.getConnection("jdbc:mysql://localhost/googlemap", "root",                         "root");                 Statement st = con.createStatement();                  ResultSet rs = st.executeQuery("select start from route where Route_Name='" + R_Name + "'");                  while (rs.next()) {                     String Startval = rs.getString("start");                      buffer = buffer + "<option value='" + Startval + "'>" + Startval + "</option>";                   }                 buffer = buffer + "</select>";                 response.getWriter().println(buffer);              } catch (Exception e) {              }                  try {                  String buffer1 = "<select name='state'>";                 Class.forName("com.mysql.jdbc.Driver");                 java.sql.Connection con = DriverManager.getConnection("jdbc:mysql://localhost/googlemap", "root",                         "root");                 Statement st = con.createStatement();                  ResultSet rs = st.executeQuery("select end from route where Route_Name='" + R_Name + "'");                  while (rs.next()) {                      String Endval = rs.getString("end");                      buffer1 = buffer1 + "<option value='" + Endval + "'>" + Endval + "</option>";                  }                 buffer1 = buffer1 + "</select>";                 response.getWriter().println(buffer1);             } catch (Exception e) {              }                 try {                  String buffer2 = "<select name='state'>";                 Class.forName("com.mysql.jdbc.Driver");                 java.sql.Connection con1 = DriverManager.getConnection("jdbc:mysql://localhost/googlemap", "root",                         "root");                 Statement st1 = con1.createStatement();                  ResultSet rs1 = st1.executeQuery("select wplist from route where Route_Name='" + R_Name + "'");                 while (rs1.next()) {                     wplist = rs1.getString("wplist");                      String wplist1[] = wplist.split("/");                     buffer2 = buffer2 + "<option value='" + wplist1 + "'>" + wplist1 + "</option>";                  }                 buffer2 = buffer2 + "</select>";                 response.getWriter().println(buffer2);             } catch (Exception e) {              }        %>


Prevent Adobe Reader from switching to "Fit Page" zoom when bookmark is clicked

If I open a PDF document in Adobe Reader, it usually opens with Fit Width page zoom by default.     But if I click on a bookmark, the zoom changes to Fit Page.   How do I stop this from happening and have Adobe Reader maintain the default zoom?


Help with completing the proof: Any unbounded sequence is either infinitely large or has a convergent subsequential limit

Given $\{x_n\}$ is an unbounded sequence, prove:   $$ \lim_{n\to\infty}x_n = \infty\ \  \text{or}\ \ \lim_{n_k \to \infty} = A $$   In other words any unbounded sequence either infinitely large or has a convergent subsequence.     Everything before udpate section is wrong.  Part 1. Proving $|x_n| > M \implies \lim_{n\to\infty} x_n = \infty$  $\Box$ Start with the definition of an unbounded sequence: $$ \forall M > 0 \in \Bbb R \ \exists N \in \Bbb N: \forall n > N\implies |x_n| > M $$  Suppose that: $$ \lim_{n\to\infty}x_n \ne \infty $$ That means: $$ \forall n\in\Bbb N\ \exists C >0 \in\Bbb R : |x_n| < C $$  Now taking $M^\prime = \max\{M, C\}$ we have that: $$ \begin{cases} \begin{align} \exists N \in \Bbb N : &\forall n>N \implies &|x_n| > M^\prime \\ &\forall n \in \Bbb N: &|x_n| < M^\prime \end{align} \end{cases} $$  So we have arrived to a contradiction which means the assumption is wrong and: $$ \lim_{n\to\infty}x_n = \infty $$ $\Box$     Part 2. It's not clear to me how to prove that if unboundedness does not imply infinity limit then it must imply the existence of a convergent subsequence.   Two questions is my mind:   Is part 1 correct?  How do I proceed with the second part?     I'm using the following definition. $$ \lim_{n\to\infty}x_n = +\infty \stackrel{\text{def}}{\iff} \forall \epsilon > 0 \exists N \in \Bbb N :\forall n > N \implies x_n > \epsilon \\ \lim_{n\to\infty}x_n = -\infty \stackrel{\text{def}}{\iff} \forall \epsilon > 0 \exists N \in \Bbb N :\forall n > N \implies x_n < -\epsilon \\ $$ A sequence is considered infinitely large when: $$ \lim_{n\to\infty}x_n = \infty\ \ \text{when}\ \ \lim_{n\to\infty}x_n = + \infty \ \ \text{or} \ \ \lim_{n\to\infty}x_n = - \infty $$    Update.   Looks like i've messed up a lot of things. I will try once again. As shown in comments and answers the statement holds only in case: $$ \lim_{n\to\infty} |x_n| = \infty \iff \forall \epsilon > 0 \exists N \in \Bbb N: \forall n > N \implies |x_n| > \epsilon $$  Consider the following: $$ \lnot P = \lnot\left(\lim_{n\to\infty}|x_n| = \infty \right) \iff \exists \epsilon > 0\ \forall N_1 \in \Bbb N : \exists n > N_1 \land |x_n| < \epsilon $$  But on the other hand it is given that $x_n$ is unbounded: $$ Q = \forall M > 0\ \exists N_2 \in \Bbb N : |x_{N_2}| > M $$  Construct a negative expression for boundedness: $$ \lnot P = \exists M > 0\ \forall N_2 \in \Bbb N : |x_{N_2}| < M $$  If $S = \lnot P \implies \lnot Q$ then $S = P \lor \lnot Q$  Let $\epsilon = M$, choose $N = \max\{N_1, N_2\}$ then both statements are true and: $$ \exists \epsilon > 0\ \forall N = \max\{N_1, N_2\}: \exists n > N \land |x_n| < \epsilon $$  Now either $P$ is true, which would mean $\lim |x_n| = \infty$, or $\lnot Q$ is true which would mean the sequence is bounded and hence contains a convergent subsequence.


Remove many many many files from a folder

I have a folder with 137795 files in it.  I need to delete all of them.  When I run rm * I get -bash: /bin/rm: Argument list too long.  How do I get past this error?


The method of solving for a factor of $90!$

If $90! = (90)(89)(88)...(2)(1)$,  then what is the exponent of the highest power of $2$ which will divide $90!$ ?   How would I apply one of the easiest method from ?  I need help on applying the link to this question.   I do not understand which one explains my case, and how I can solve using the method.  I would appreciate if someone showed how it is applied to this


Can anyone explain what is virtual memory?

In my system I am getting an error like "virtual memory is full".  Can anyone explain to me what "virtual memory" is and how to fix that issue?


given A and B are mxn and nxm matrices. What can we say about their eigenvalues

I know that the sum of the eigenvalues will be the same. But can we say something about them individually?  When A is transpose(B) I'm getting something interesting  A = (1  2  0)     (0 -1  2)  B =  (1  0)      (2 -1)      (0  2)  AB has 7,3 as eigenvalues BA has 3,7,0 as eigenvalues


Deleting undefined indexes in array Javascript

I can't delete all the undefined indexes in this array.I do console.log and it shows me [undefined, 2].  var array = []; array[1] = 2; array[3] = 4;  for(var i = 0; i < array.length; i ++) {   if(array[i]) {    } else {     array.splice(array.indexOf(array[i]), 1);   } }  console.log(array)


Moving Images from Photoshop to Illustrator

I downloaded this very awesome set of iOS7 GUI components to use for building mockups for apps, found here: .  I'm working in Illustrator but the file is a PSD.  I'm running both Ps and Ai simultaneously, and when I drag a component from the PSD into my Ai file, the transparency becomes white.  To be clear, I am literally dragging and dropping from Ps into Ai using the Move Tool which generally works.  What am I doing wrong here? Thank you!


how do you calculate the private exponent in asymmetric key encryption

Here is an excellent paper on the math of asymmetric key encryption:     See the example on Page 6.    The public key = $55$ Primes used to calculate public key are $5$ and $11$.  $e = 3$  Now see the appendix: $L = \mathrm{LCM}(p-1, q-1) = 20$  The paper states $de = 1 \mod L$  I can't figure out how he gets the value of $d = 7$


Shutting down the system using a virtual console

My computer is freezing from time to time. It's because I make few mistakes and I ruined my system. I don't have any time to reinstall the system now.  While my PC is frozen, it still works when I press Ctrl+Alt+F1. Is there any way to reboot system using it?


If $a$ ($a\ne 1$) has order $t\mod p$, show that $a^{t-1}+a^{t-2}+\cdots+1\equiv 0\pmod{p}$. Since $a$ has order $t$ we have that $a^t\equiv1\pmod{p}$ or $a^t-1 \equiv 0\pmod{p}$. We also know that $a^t-1=(a-1)(a^{t-1}+a^{t-2}+\cdots+1)$. So $0=a^t-1=(a-1)(a^{t-1}+a^{t-2}+\cdots+1)\pmod{p}$. How do I get rid of the $(a-1)$ term on the left ? Can I simply say that since $(a-1)\ne0$ and divide both sides by it and get the desired result ? Any solutions/hints are greatly appreciated.


I have limited the download speed on my nginx site with this option:  limit_rate 350k;   Is it possible to do this only if the file size is larger then 10Mb? Thank you.


Select all checkboxes does not work on next page in JQuery datatables

I am using JQuery datatables. I want to add select all column with checkboxes so that when I click on 'select all' check box all the checkboxes on that page should get selected.  I am using the following code:

              Name	              Type	              Details	             Select <input type="checkbox" name="select_all" value="1" id="select-all">

         <?php foreach ($test as $data) { ?>
             <?php echo $data->name; ?>	             <?php echo $data->type; ?>	             view details	             <input type="checkbox" name="manuf[]" class="sub_chk" data-id="<?php echo $data->id; ?>">
         <?php } ?>

    The above code works for the first page of the datatable but if I select the second page and if I select 'Select all' checkbox, it takes me to the first page instead of selecting the checkboxes in the second page.  Is there a solution to this?


How to create a hard link to an inode (ext4)?

If I know the index node (inode) of a file, but I don't know its path (or any of its paths), is it possible to create a hard link to that inode directly?  I could find the file using sudo find / -inum 123546 and then create a hardlink, but that would be way too slow for my application.  N.B. I'm using an ext4 filesystem.


Replacing entire tag with shortcode - JavaScript

I'm trying to replace a whole tag with a shortcode, if the tag text equals a value. I'm placing this script into the footer of the page. Here's what I'm trying:  var stockcounter = document.getElementsByClassName("stock in-stock");  if(stockcounter[0].innerHTML=='0 in stock') {     //Displays timer     stockcounter[0].outerHTML = do_shortcode('[fergcorp_cdt_single date="Feb 25 2019 18:45:00"]'); }   This doesn't change the target tag at all. Does anyone know what I'm doing wrong?


Did Malfoy's parents go to Azkaban after the final book?

What we know from the movies and the books is that Malfoy's parents had assisted Lord Voldemort, we also know that Malfoy's father was a Death Eater but we do not know whether his mother was though.  My question is, after the final book and the war was over did Malfoy's parents go to Azkaban for assisting Lord Voldemort?


Is there a way in JavaScript to get element's visible part? E.g. I have elements that are being scrolled and I need to know whether the element is fully visible or partially and understand what part is visible.


How to compute $3^{2003}\pmod {99}$ by hand?

Compute $3^{2003}\pmod {99}$ by hand?    It can be computed easily by evaluating $3^{2003}$, but it sounds stupid. Is there a way to compute it by hand?


Why does $\int_a^b fg\, dx = 0$ imply that $f = 0$?

Assume that f is a continuous function on $[a,b]$ such that for any continuous function g on $[a,b]$ $\int_a^b f(x)g(x)dx = 0$, then how can I show that f(x) = 0 for all $x\in [a,b]$?


Is there a tikz library for Communications Block?

Is there any tikz library with built in shapes like antennas (simple Y shaped), wireless channel (a cloud essentially), filters etc? In particular I'm looking to draw similar diagrams to:  (the first figure). I guess most of the blocks can be rendered using rectangles but would be nice to have some built in shapes as well.


Issues with tar, "remove leading /" and the --file option

When I specify root-folders in my tar command-line I deliberately prefix with "/" to tell tar it is root-folders and not sub-folders of current folder.  E.g.   tar --create --file="/tmp/test.tar" "/tmp/Folder 1/" tar: Removing leading `/' from member names   Why is the leading "/" removed?  In regards to the -f / --file= option: If you want to output to stdout you use -f - but it seems you cannot use --file= -. I thought -f and --file were aliases to each other?  Beside I cannot find the -f - option in the manual (man tar)...shouldn't it be there? or have I just overlooked it.


How do I get my phone to ring on a calendar notification?

I'm always missing appointments because the event notifications in Calendar app are so pathetic.  I when its time to leave for an appointment, I want my phone to ring as loud as possible as if I'm getting a phone call, and to continue ringing until I turn it off.  Is there any app/SaaS for this?


Write to an offset using DataOutputStream

In my project, we are writing a file using DataOutputStream. We are writing different data types like short, byte, int and long and we are using respective methods in DataOutputStream like writeShort(), writeByte() etc.  Now, I want to edit one record in this file at a particular offset. I know the offset from which that record starts but I am not sure what is the right approach of writing to the file because only method in DataOutputStream supporting offset is the one which takes byte[].  I want to write the whole record which is a combination of different data types as mentioned above.  Can someone please tell me what is the correct approach for this?


How to Connect Bezier Curves in Inkscape?

You can see there two bezier curves that I want to connect together. How can I do that? My current area with the peak consists of many small bezier curves which is totally intolerable because it makes the processing of the picture much harder later.


Allow an edit to notify downvoters: "I think I've fixed the issue now - please check"

To me, a downvote usually indicates a problem with an answer. When I downvote it's to mark the answer as having a problem, not the person. If the answer is fixed, I want to remove that downvote - but it's tricky to keep track of all the questions I've looked at over the last few hours.  I don't actually downvote very much, but it's very easy to forget what's going on.  It would be nice to have some way of indicating in an edit that you (the editor/answerer) believe the reason for the downvote has now been resolved, so that the downvoters could come and undo their downvotes or explain why it's still not fixed.  (Note: this isn't about rep-recovery, but quality control. I would feel a lot better about downvoting on "iffy" answers if I felt it was likely that the answer would be fixed and I could undo the vote. Whether or not I'd get back the cost of the downvote is somewhat immaterial.)


Adobe Illustrator CC Transparent inside vector

So i have trace a logo using pen tool the problem is the logo has a hole inside that I need it to be transparent. Here is the look of the image   now I need to make the white inside the logo transparent but when I change the fill to none the look will be   what should I do about this? I just started with Illustrator.


Find and replace text within multiple files

I want to know how I can find and replace a specific text in multiple files like in Notepad++ in the linked tutorial.  e.g.:


New ACM Latex compilation error: ! pdfTeX error (font expansion): auto expansion is only possible with scalable fonts

I'm trying to compile the new ACM latex template for my camera ready paper provided in   This template doesn't compile for me and shows following error:  ! pdfTeX error (font expansion): auto expansion is only possible with scalable fonts. \@EveryShipout@Output ...@Org@Shipout \box \@cclv   How can I fix it? It is the template! No changes.  ! pdfTeX error (font expansion): auto expansion is only possible with scalable fonts. \@EveryShipout@Output ...@Org@Shipout \box \@cclv l.121 \end{enumerate} Here is how much of TeX's memory you used: 18161 strings out of 493698 267992 string characters out of 3144404 402755 words of memory out of 3000000 20985 multiletter control sequences out of 15000+200000 54348 words of font info for 144 fonts, out of 3000000 for 9000 1186 hyphenation exceptions out of 8191 60i,11n,94p,1105b,468s stack positions out of 5000i,500n,10000p,200000b,50000s ! ==> Fatal error occurred, no output PDF file produced!   P.S. Interestingly when I use an online compiler such as Sharelatex, it looks fine.  P.S. 2: Thanks to everybody, especially Boris: I re-installed the liberty font on miktex package manager, but that changes made my miktex not work for unknown reasons! I re-installed the whole miktex packages from scratch using ProText and now I can compile :)


Prove: If f is a bijective meromorphic function from the Riemann sphere to itself, then f is a Mobius transformation.

Knowing that a meromorphic function f requires f to be either analytic or has a pole at every point in its domain, what does bijective meromorphic mean?


Postmodification using participle: Is it grammatical?

I am a Japanese teacher of English who is making a teaching material for my students. I would like to know whether the following usage would be totally accepted in school grammar. To put my question in other words, would a very grammar-sensitive person allow the following usage (in bold font)?  A: What is your favorite movie? B: It is Titanic created in 1997 by James Cameron.  So, the point here is whether you can grammatically modify a proper noun with a participle. I know it's totally okay to write something like "a movie created in 1997 by James Cameron," where participle modifies a common noun, but I'm not sure if the same is allowed for proper nouns.  Thank you, Tom


WordPress and Ubuntu, www-data and ubuntu for FTP

I posted this in stackoverflow but no one can give me an answer.  ...  I'm using Amazon EC2. I'm on Ubuntu 16.04. I'm also using Apache 2. I have WordPress installed on my server.  I do:  chown -R ubuntu /var/www/html   so I can edit my files as ubuntu via FTP. But the problem is now WordPress cannot edit files, update, or upload any files via WordPress. But if I do:  chown -R www-data /var/www/html   then it works.  Any way I can make it work for both ubuntu and www-data at the same time, without always switching it?  Thanks!


Proving that the fundamental groups of two spaces with same homotopy type are isomorphic

I'm new at algebraic topology and I'm working on proving the following theorem  Theorem. Let $(X, x_0)$ and $(Y, y_0)$ two pointed topological spaces such that there exist two continuous pointed maps $f : (X, x_0) \to (Y, y_0)$ and $g : (Y, y_0) \to (X, x_0)$ such that $g \circ f$ and the identity $id_X$ are homotopic, and $f \circ g$ and the identity $id_Y$ are homotopic. So, the maps $$     \begin{array}{ccccc}         f_{\ast} & : & \pi_1(X, x_0) & \longrightarrow & \pi_1(Y, y_0) \\         & & [\gamma] & \longmapsto & [f \circ \gamma]     \end{array} $$ and $$     \begin{array}{ccccc}         g_{\ast} & : & \pi_1(Y, y_0) & \longrightarrow & \pi_1(X, x_0) \\         & & [\sigma] & \longmapsto & [g \circ \sigma]     \end{array} $$ are isomorphisms.  To this end, we need the following proposition (which I managed to demonstrate)  Proposition. Let $X$ and $Y$ two topological spaces and $x_0 \in X$. Let $f_1 : X \to Y$ and $f_2 : X \to Y$ be two continuous homotopic maps via the map $h : X \times [0, 1] \to Y$. Let $\gamma : I \to Y$; $t \mapsto h(x_0, t)$. Then, for all loop $\delta : [0, 1] \to X$ based at $x_0$, we have $$     [\overline{\gamma} \ast (f_1 \circ \delta) \ast \gamma] = [f_2 \circ \delta] \in \pi_1(Y, f_2(x_0)) $$ where $\ast$ is the composition of paths, and $\overline{\gamma}$ is the inverse path of $\gamma$.  So here is the demonstration (and where I Will mention the step where I'm stuck)  Proof of the theorem. Let $h : X \times [0, 1] \to X$ the homotopy such that $h(x, 0) = x$ and $h(x, 1) = g \circ f (x)$, for all $x \in X$. Let $\gamma : [0, 1] \to X$, $t \mapsto h(x_0, t)$.  From the proposition above, we have  $$     [\overline{\gamma} \ast \delta \ast \gamma] = [g \circ f \circ \delta] \in \pi_1(X, x_0) $$ for all loop $\delta : [0,1] \to X$ based at $x_0$.  Note that $\gamma$ is a loop based on $x_0$: $\gamma(0) = h(x_0, 0) = x_0$ and $\gamma(1) = h(x_0, 1) = g(f(x_0)) = g(y_0) = x_0$. So we can write $$     [\overline{\gamma}] \ast [\delta] \ast [\gamma] = (g \circ f)_{\ast}([\delta]) \in \pi_1(X, x_0) $$ This proves that $(g \circ f)_{\ast} = id_{\pi_1(X, x_0)}$ but I don't know why since composition of homotopy classes is not commutative.  (The end of the proof is pretty obvious by using the fact that $(g \circ f)_{\ast} = g_{\ast} \circ f_{\ast}$.)  Remark. I'm not actually searching for another proof of the isomorphism of $f_*$ and $g_*$, I'm just wondering why we deduced that $(g \circ f)_* = id_{\pi_1(X, x_0)}$ and any help or hint would be great.  Thanks in advance.  Best regards.  K. Y.


Package listing errors due to Anbox while installing Katoolin

I recently tried to install Anbox, but couldn't figure it out. I abandoned the idea. Now when I tried to install katoolin, I ran these commands- git clone https://github.com/s-h-3-l-l/katoolin3  cd katoolin3/  chmod +x ./install.sh  sudo ./install.sh  sudo katoolin3  But when I run the above command, it give me an error like-   ██╗  ██╗ █████╗ ████████╗ ██████╗  ██████╗ ██╗     ██╗███╗   ██╗██████╗  ██║ ██╔╝██╔══██╗╚══██╔══╝██╔═══██╗██╔═══██╗██║     ██║████╗  ██║╚════██╗  █████╔╝ ███████║   ██║   ██║   ██║██║   ██║██║     ██║██╔██╗ ██║ █████╔╝  ██╔═██╗ ██╔══██║   ██║   ██║   ██║██║   ██║██║     ██║██║╚██╗██║ ╚═══██╗  ██║  ██╗██║  ██║   ██║   ╚██████╔╝╚██████╔╝███████╗██║██║ ╚████║██████╔╝  ╚═╝  ╚═╝╚═╝  ╚═╝   ╚═╝    ╚═════╝  ╚═════╝ ╚══════╝╚═╝╚═╝  ╚═══╝╚═════╝  ~~~~~{ Author: s-h-3-l-l | Homepage: https://github.com/s-h-3-l-l }~~~~~   Hit:1 http://in.archive.ubuntu.com/ubuntu focal InRelease Hit:2 http://in.archive.ubuntu.com/ubuntu focal-updates InRelease Hit:3 http://in.archive.ubuntu.com/ubuntu focal-backports InRelease Hit:4 https://deb.opera.com/opera-stable stable InRelease Hit:5 http://ppa.launchpad.net/linuxuprising/java/ubuntu focal InRelease Hit:6 http://dl.google.com/linux/chrome/deb stable InRelease Get:7 http://security.ubuntu.com/ubuntu focal-security InRelease [109 kB] Ign:8 http://ppa.launchpad.net/morphis/anbox-support/ubuntu focal InRelease Err:9 http://ppa.launchpad.net/morphis/anbox-support/ubuntu focal Release   404  Not Found [IP: 91.189.95.83 80] Hit:10 http://ftp.harukasan.org/kali kali-rolling InRelease Reading package lists... E: The repository 'http://ppa.launchpad.net/morphis/anbox-support/ubuntu focal Release' does not have a Release file. Apt update failed   So apparantely the program runs- sudo apt update  because thats the exact same error I get when I try to run it. But Katoolin won't start because I can't get Anbox update, which is really weird. Does anyone have an Idea whats happening? I think I may have uninstalled anbox incorrectly, but there is no Anbox icon in GUI and also when I run anbox command, it clearly says its not installed. PS: I am new to Linux (and therefore Ubuntu). I'm using Ubuntu 20.04 LTS  What I tried (nothing worked, of course): sudo apt autoclean sudo apt autoremove  Clean Up Using Stacer


Can ubuntu run all types of files, .rar, .zip, etc

I'm new to ubuntu, and I'm just now installing it, i've backed up some files and I'm going to completely system restore and I'm saving some files onto .rar's. from my website database.  I was wondering if I can use .rar on ubuntu?


I was playing with the concept of Interpolation in Python and ended up with this plot:  import numpy as np from scipy.interpolate import interp1d import matplotlib.pyplot as plt  x = np.linspace(0, 10, num=11, endpoint=True) cosx = np.cos(-x**2/9.0) linearInterpolateFunction = interp1d(x, cosx) cubicInterpoloateFunction = interp1d(x, cosx, kind='cubic')  xnew = np.linspace(0, 10, num=41, endpoint=True) plt.plot(x, cosx, 'o', xnew, linearInterpolateFunction(xnew), '-', xnew, cubicInterpoloateFunction(xnew), '--') plt.legend(['Original Data', 'Linear Interpolate', 'Cubic Interpolate'], loc='best')     The way Cubic Interpolation models the function made me think of nonlinear modeling approaches and nonlinear Regression.  Could you please explain to me what are the differences between the two (nonLinear Regression and Cubic Interpolation) and  and if I could use Cubic Interpolation for modeling my data? what are the pros and cons to this? If you could provide me with applicable examples, that'd be great.  by the way, I've seen  to my question before but does its example on why you better use Regression still count even when using Cubic Interpolation instead of Linear Interpolation ?  Thanks...


Will Windows 10's reset delete my Linux partitions?

I want to use the "reset my PC" feature of Windows 10 to wipe the data on my Windows partition. But I have also a Linux system installed, which I want to keep.  Will Windows 10's full reset wipe all my disk, or just Windows's partitions ?


Google custom search code does not return the result of google.com

I have generated a code from  .  I want to fetch the results for a keyword exactly same as the results on www.google.com So I put www.google.com in sites to search textfield and english is the language and then create the code.  But when I am using this code and fetching results on my websites these results are different from google.com.


A slight modification in Chinese Remainder Theorem

Suppose $m_1, m_2, m_3,\ldots, m_k > 1$ and not necessarily pairwise relatively prime. Also $a_1, a_2,\ldots, a_k\in\Bbb Z$. What can we say about the solutions of the following congruence equations: $\begin{align*} x&=a_1\mod m_1\\ x&=a_2\mod m_2\\  &\phantom{1}\vdots\\ x&=a_k\mod m_k \end{align*}$


I lost 2 reputation points because a question was removed. I didn't asked that question. So these are my guesses:  1.-I gave an answer to that question. 2.-I edited that question. 3.-I upvoted that question.    But I can't remember. Its not the only one. I have got this like 3 times total. The reputation help page doesn't say anything about it   What is the reason? and someone should totally add that to that help page :)


Solar panel, estimate power in various illuminating conditions

I'm trying to estimate available power from a solar cell like this one PRT-13781    Includes:  1x Solar Panel - 2W 1x Barrel Plug Adapter - 3.5mm to 5.5mm   Features:  Monocrystalline cells - 19% efficient Open Circuit Voltage: 7.0V Peak Voltage: 6.0V Peak Current: 378mA Peak Power: 2.27 Watts Four screws on back corners of panel allow multiple mounting options Waterproof Urethane Coating UV Resistant   Obviously, the 2W will be obtained in ideal conditions, clear sky, sunny, etc and at MPPT point.  How can I estimate available power for cloudy days, (variation with temperature will be also nice to know) etc. I cannot find relevant documents to start with, however, I will do at some point some measurements.   Until then, I am looking to best effort estimate just to have a start point in choosing the DC/DC MPPT charger, discharging the battery in my actual load conditions, etc.  For example this post question almost the same    but no relevant calculation based on illumination (lux) or percent of rated illumination vs. generated power.  EDITED We can close this question, I finally found a very well documented answer here    Thanks user @Russell McMahon


Today, I was talking to my friend. She is very good at English. During this conversation, she said, "I am on THE bus". I think, she has misused the definite article. In my opinion, it should have been, "I am on A bus". Because this is the first time she said anything about this bus. On the other hand, I know that she generally travel by bus.


How to get a list of Field Set names in Apex

I need to create combobox with Field Set names. I know how to get fields for any Field Set, but how to get a list of all Field Set names. Map<String, Schema.FieldSet> canMap = Schema.SObjectType.Candidate__c.fieldSets.getMap(); Maybe there are methods like getValue or getNames, or something like that?


Previous research   A friend of mine shared a link of some beautiful fungi: . I was intrigued by the curious critter below -- it seems to have honed the power of buckyball geometry, presumably much before we Humans ever did (search: Buckminsterfullerene to learn about a feat of chemical engineering). Google reverse-image search almost got me the answer I needed, but no species name. I've asked friends on Facebook with no answers yet.      Question  What is the name of this species of fungus?      Related Questions on Stack Biology   Here's a related Species Identification question of a fungus:  (by )     EDIT: I'm an idiot... the Imgur had species names, thus answering my question, post-mortem. Thanks  for pointing that out.


I have one variable which I store my full name and I want to break my name.  let fullname ="Praveen Tripathi";   I want to this type :-  let firstname ="Praveen"; let lastname = "Tripathi";


How to create a delay/timer and fire an action once it expires in C# Monogame?

First off I'm somewhat new to C# but I'm working on a game in C# Monogame and I'm trying to get timers working. There was a similar question answered around here a while back but I found that the solution doesn't work for me, perhaps an older version or I'm missing something, so I wrote similar timer and timer manager classes myself.   I ended up with a wait(time) function (that seems to work from looking through the debugger but not sure) now I'm wondering how can I get an action to be executed when the timer created by that expires.  Ideally I'd like something like   timerManager.Wait(10) {     //do stuff once done waiting }   Here's my timer classes -  and   TimerManager gets instantiated in my player class and wait is called in the update function by keyboard input.  if(keyState.IsKeyDown(Keys.Space)) {     if(canJump)     {         vAccel = jumpSpeed * -1;         stripManager.setCurrentAction(PlayerActions.jump);         timerManager.Wait(1);     } }       So my question is how can I get an action to trigger, ideally with a set of {} as shown above. I'm aiming to having a class I can reuse for any sort of delay I need in my game.


Checking Seat Capacity on Previous Flights

Does anyone know of ways to check the seat capacity or number of tickets sold or number of passengers onboard for past flights? I'm actually just trying to figure out how many passengers were on a specific flight, not the names of the passengers, just the number of passengers.


Find the indefinite integral $\int_{} \frac{t^3 dt}{\sqrt{1+t^2}}$     1) Choose a u    I decide to let $$u = 1 + t^2, du = 2t$$    2) Substitute u value into integral $$\int_{} \frac{t^3}{\sqrt u} du$$   3) Integrate $$\int_{} \frac{t^3}{\sqrt u} du = \frac{t^4}{4} \frac{u^{1/2}}{1/2} \frac{2t^2}{2} + C$$    4) Put substitutes into anti-derivative $$= \frac{t^4}{4} 2(1+t^2)^{1/2} + C = \frac{1}{2}t^4(1+t^2)^{1/2} + C$$  $~$ $~$  However, the answer for this problem is $$\frac{1}{3}(1+t^2)^{3/2} - (1 + t^2)^{1/2} + C$$  Where did I go wrong? My answer doesn't even look close, except for the fact that I chose the right $u$ It looks like I didn't fully evaluate for the anti-derivative or I incorrectly set the problem up before evaluating for the anti-derivative (I think this it is the latter)


So I want to install Lubuntu to a 16GB USB Flash Drive and I have a question about the install process: how should I partition the device? I have an Asus X550LB notebook and the specs are: 4GB RAM, I7 4500U and Nvidia 740M GPU. The MOBO uses legacy bios.


Let $X \sim exp(\lambda)$ be independent of $Y \sim exp(\lambda)$ compute $E[X|X+Y]$  I have tried to do this in a couple different ways and all of them have either led to an indefinite integral or a bad answer (illogically $-\lambda$).   Let $Z := X+Y$  The first way I tried to do it was,   $ \begin{align} E[X|Z] &= \int_0^{\infty} x p_{x|z}dx\\ \end{align}$  Then I found $p_{x|z}$ to be   $ \begin{align} p_{x|z} &= \frac{P(X=x, X+Y=z)}{P(Z=z)}\\ &= \frac{P(X=x)P(Y=z-x)}{P(Z=z)}\\ &= \frac{\lambda^2 e^{-\lambda x} e^{-\lambda (z-x)}}{\lambda e^{-\lambda z}}\\ &= \lambda  \end{align}$  So,  $ \begin{align} E[X|Z] &= \int_0^{\infty} x p_{x|z}dx\\ &= \int_0^{\infty} x \lambda dx \end{align}$  Which doesn't coverage, can anyone help?


How to generate a random string of 20 characters

Possible Duplicate:          I am wanting to generate a random string of 20 characters without using apache classes. I don't really care about whether is alphanumeric or not. Also, I am going to convert it to an array of bytes later FYI.  Thanks,


How to find out if an Object is a collection or single value?

I have some dynamic SOQL code in which I'd like to identify whether a method argument is a collection or a single value:  SObject[] query(SObjectType sobType, String field, Object data) {     // Want to know if data is a collection e.g. set or list     // that requires an "in" or a single value that requires     // an "=" in the query. (May also need to use separate bind variables.) }   I note that the sort of check shown immediately below seems to require an exact match for the type of the collection (Id in this case to return true) which is not what I want:  Object o = new Set<Id>(); System.debug(o instanceof Set<Id>);   Is there a simple way to make this determination?  (Yes there are various other ways to code this; checking first to see if there is a direct solution.)  PS  Looks like great caution is needed when using .


The amsmath packages helpfully define a macro \DeclareMathOperator which does what it says on the tin: it declares a mathematical operator such as \sin or \Null or whatever and typesets it all nice and dandy.  If I want to do a one-shot operator, it seems a bit of a fuss to \DeclareMathOperator it if I'm only going to use it once. So:  Is there a command that typesets its contents in the same way that \DeclareMathOperator does?  (And I'd like it to be exactly how \DeclareMathOperator does since I sometimes mess with fonts and colours and would like them consistent.)


Why is the voltage in this digitizer reduced

I am looking at  and coming from little EE knowledge, it left me confused. First of all, it defines bandwidth as the following     Bandwidth is defined as the measure of a circuit or transmission channel to pass a signal without significant attenuation over a range of frequencies. Bandwidth is measured between the lower and upper frequency points where the signal amplitude falls to -3 dB below the pass-band frequency. The -3 dB points are referred to as the half-power points.   Can someone explain that more simply? Also why is -3 dB considered half-power points. This definition kinda sounds like those coaxial cable splitters you can get for your home that have a frequency range printed on them. Is that what this definition is applying to?    Then I have a question about this part:     If you input a 1 V, 100 MHz sine wave into high-speed digitizer with a bandwidth of 100 MHz, the signal will be attenuated by the digitizer’s analog input path and the sampled waveform will have amplitude of approximately 0.7 V. The value of ~0.7 V can be calculated by using the following equation:   -3 dB = 20 LOG (Vppout / Vppin)   Why would inputting 1 volt peak to peak 100mhz sine wave into a digitizer output 0.7 volts peak to peak. I have heard Nyquist–Shannon sampling theorem said, but don't really understand it from a working standpoint (I assume it is applying here). If a signal is coming up at 100mhz and you are taking 100mhz samples, wouldn't that be enough to duplicate the 1 volt peak to peak signal? Also, how is the -3 dB applying to that formula? I don't see how it is involved.


What is the analog between charges and mass with regards to vector fields?

A way to think about gravitational fields is that they spawn as a consequence of mass literally bending time and space.  Is there an analog of this concerning charges and the electric field intensity?


Find a bijection $^\mathbb{N}\{0,1\} \to \mathbb{R}$

Let $^\mathbb{N}\{0,1\}$ be defined as $\{f~|~ f:\mathbb{N}\to\{0,1\}\}$, i.e., all the functions that map $\mathbb{N}$ to the set $\{0,1\}$. We want to show that this set is in bijection with $\mathbb{R}$.   I've been having trouble figuring this out. If we can show there is an injection from $^\mathbb{N}\{0,1\}\to\mathbb{R}$ and an injection $\mathbb{R}\to ~^\mathbb{N}\{0,1\}$, then we can invoke the Schroder-Bernstein theorem to complete the argument that the two sets are in bijection with one another.   We can represent each $f\in~^\mathbb{N}\{0,1\}$ as the dyadic expansion of a real number  $r_j\in[0,2]$, i.e.,  $$ r_j = \sum_{k=0}^\infty \frac{f(k)}{2^k}$$ But $r_j$ may be mapped to by more than one function, so I am unsure as to how to proceed. Any help is appreciated.


Is the trajectory of the Moon around the Earth stable?

I understand how mathematically is possible to have one object with elliptical or circular orbit around another object in space.  so can I think of it as a limit cycle? If yes, then is it stable or unstable? and why?  The intuition behind my question is to know if due to friction we will have a Moon-Earth collision or not.


char * , strcat interaction .why doesnt it print anything

It prints nothing.I think the problem is at the type char * but i dont know if and why.  int main() {     char *a = "0123456789" ;     char *b = "abcdefghij" ;     strcat (a,b) ;     printf( "%s", a ) ; }


Prove by induction that $\sum_{i=1}^{n} 2i=(n+1)n$, for every positive integer n.

Can anyone explain the concept behind this? I just don't get how I should proceed with it? Like each step, why and how is it done?   Prove by induction that $\displaystyle\sum_{i=1}^{n} 2i=(n+1)n$, for every positive integer $n$.


How to Do Trigonometric Range of Floats in Python?

Matlab  x = 0:pi/100:2*pi; y = sin(x); plot(y)   I think range() cannot work here because it only accepts end arguments as integers but I need floats (0.0; 2*pi).  Pseudocode in Python 2.7.11+  import math x = pseudoRange(0.0, 2*math.pi, math.pi/100);   Taking ceil() is not practical for integers.     How can you have the trigonometric range of floats in Python?


How do I calculate tables size in Oracle

Being used to (and potentially spoiled by) MSSQL, I'm wondering how I can get at tables size in Oracle 10g. I have googled it so I'm now aware that I may not have as easy an option as sp_spaceused. Still the potential answers I got are most of the time outdated or don't work. Probably because I'm no DBA on the schema I'm working with.  Would anyone have solutions and or recommendations?


java.lang.IllegalArgumentException: Invalid  in servlet mapping

<servlet>     <servlet-name>myservlet</servlet-name>     <servlet-class>workflow.WDispatcher</servlet-class>     <load-on-startup>2</load-on-startup> </servlet>  <servlet-mapping>     <servlet-name>myservlet</servlet-name>     <url-pattern>*NEXTEVENT*</url-pattern> </servlet-mapping>   Above is the snippet from Tomcat's web.xml. The URL pattern *NEXTEVENT* on start up throws     java.lang.IllegalArgumentException: Invalid <url-pattern> in servlet mapping   It will be greatly appreciated if someone can hint at the error.


Should I install graphics card drivers from Windows Update?

Today I see that there's an update to my graphics card driver (NVidia GT 220) available on Windows Update. Should I install that, or stick to the drivers provided by the manufacturer?  (Re-asked here after asking on gaming.stackexchange).


How to run a command (using /execute) based on a player having 7 or more xp points in Minecraft?

I'm trying to build a datapack that lets you craft xp bottles from glass bottles at the expense of 7 xp per bottle (because they drop 3 to 11 xp so the average is 7). I have almost everything working except for a check for if they have too little xp. If they have 7 or less xp, I would like to remove one bottle of enchanting from their inventory and give them one glass bottle, because the function for removing xp is called after they've crafted one and a scoreboard has counted it. My remove function currently looks like this:  #create dummy scoreboard to multiply bottles crafted by seven to get xp to be removed scoreboard objectives add 7xp dummy scoreboard players set @s 7xp -7 scoreboard players operation @s xpCrafted *= @s 7xp  #how do I get the value in xpCrafted into the command to remove xp? xp add @s -7 points  #cleanup scoreboard players reset xpCrafted scoreboard players reset 7xp scoreboard players set @e xpCrafted 0 scoreboard objectives remove 7xp   And my tick function like this:  execute as @e[scores={xpCrafted=1..}] at @s run function craft_xp:removexp   As the inline comment says, how do I get that value in xpCrafted into my xp removing command, and also how should I check to make sure the player has enough xp for the operation in the tick command (or elsewhere)? Presumably I would run a different command to remove the extra bottle if they didn't have enough xp, but I don't know how because there doesn't seem to be any type of if/else structure in commands. Finally, should a question like this be in two different questions or is one ok on this forum?


Why are some genes dominant over others? What is the mechanism behind it?

If I have a brown eye gene which encodes the protein that is responsible for the brown color and have a blue eye gene as well, what is the reason that my eye color is brown? How does one gene maintain dominance over the other?


It's naive of you to believe that. vs It's naive for you to believe that

It's naive of you to believe that.   Why do we use 'of' and what's the meaning of 'of' and why can't we use 'for'? There are some cases that we use only 'of' such as "kin of you, nice of you, etc.   It's naive for you to believe that.   This one is wrong as per my knowledge. If I use 'for', what does ist sound to natives?


How to disable right-click context-menu in JavaScript

Not that I'm trying to prevent 'View Source' or anything silly like that, but I'm making some custom context menus for certain elements.  EDIT: response to answers: I've tried this:  <a id="moo" href=''> </a>  <script type="text/javascript">     var moo = document.getElementById('moo');      function handler(event) {         event = event || window.event;          if (event.stopPropagation)             event.stopPropagation();          event.cancelBubble = true;         return false;     }      moo.innerHTML = 'right-click here';      moo.onclick = handler;     moo.onmousedown = handler;     moo.onmouseup = handler; </script>


system mounts /dev/loop0 on /snap/core/3604 and it's 100% full, where is it coming from?

looking at df -h, I realized I have this /dev/loop0 mounted on /snap/core/3604 and it's always 100% full :   root@maxipc:~# df -h Filesystem      Size  Used Avail Use% Mounted on udev            7.8G     0  7.8G   0% /dev tmpfs           1.6G  9.9M  1.6G   1% /run /dev/sda3       116G   38G   73G  35% / tmpfs           7.8G   20M  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/loop0       84M   84M     0 100% /snap/core/3604 /dev/sda1       239M  111M  111M  50% /boot cgmfs           100K     0  100K   0% /run/cgmanager/fs tmpfs           1.6G   44K  1.6G   1% /run/user/1000   When I do a umount /snap/core/3604orumount /dev/loop0 it will unmount so it's apparently not busy at all(also when i try to remount /dev/loop0 again, it doesnt remount because, of course, it's not in fstab. in it, it looks like there is a whole little, cute and tiny root filesystem squashed in that 84M:   root@maxipc:~# ls -la /snap/core/3604 total 4 drwxr-xr-x 24 root root  333 Nov 30 12:39 . drwxr-xr-x  3 root root 4096 Dec 26 20:29 .. drwxr-xr-x  2 root root 1937 Nov 30 12:38 bin drwxr-xr-x  6 root root  129 Nov 30 12:38 boot drwxr-xr-x  4 root root 1160 Nov 30 12:38 dev drwxr-xr-x 80 root root 2399 Nov 30 12:38 etc drwxr-xr-x  2 root root    3 Apr 12  2016 home drwxr-xr-x 20 root root  406 Nov 30 12:38 lib drwxr-xr-x  2 root root   43 Nov 30 12:38 lib64 drwxr-xr-x  2 root root    3 Nov 30 12:35 media drwxr-xr-x  3 root root   45 Nov 30 12:39 meta drwxr-xr-x  2 root root    3 Nov 30 12:35 mnt drwxr-xr-x  2 root root    3 Nov 30 12:35 opt drwxr-xr-x  2 root root    3 Apr 12  2016 proc drwx------  2 root root   46 Nov 30 12:38 root drwxr-xr-x  8 root root  115 Nov 30 12:38 run drwxr-xr-x  2 root root 2349 Nov 30 12:38 sbin drwxr-xr-x  2 root root   58 Nov 30 12:39 snap drwxr-xr-x  2 root root    3 Nov 30 12:35 srv drwxr-xr-x  2 root root    3 Feb  5  2016 sys drwxrwxrwt  2 root root    3 Nov 30 12:37 tmp drwxr-xr-x 11 root root  151 Nov 30 12:38 usr drwxr-xr-x 12 root root  172 Nov 30 12:38 var drwxr-xr-x  2 root root    3 Nov 30 12:36 writable   and when I try to do a fuser -m /snap/core/3604 to see who uses the mount, nothing shows up. it reappears every single boot, and I don't know how the heck it's coming up, oh also, there is no sign of it in /etc/fstab. it's also squashfs file system. it looks like it's harmless but I just wanna know why it does what it does. what is it? any help/reply would be appreciated.  Thank you in advance,   MG  ps: I thought this question is different because the loop device is mounted as if it is an primary and working filesystem eventhough it's not busy at all. it gets umounted everytime if you want to, but it shows up again after boot. usually loop devices come up by df -H but for me this loop device comes up even among things that gnome graphical tools show, just like how a hardrive shows in your nautilus.


I have a table of 150 records which I was able to geocode except for 21 points. I'm able to manually geocode the rest of these 21 points. Every time I add the point, it creates a new row (which I know is normal). Is it possible, however, to add the point to an existing row? I have 62 fields in my attribute table, so I'd like to avoid copy and pasting.  Here is what my table looks like (This is is a copy of my attribute table exported into excel):   So far, I've created a shapefile with all the the unmatched points plotted with an ID number as the only attribute. I was thinking that I could add the ID number to the my already geocoded data and join the two sets together.


Is this a thing? Kinda goes with my first question on here. Again i am not an electrician nor will i be doing the work. I am the builder and owner. In the designing stages of a tiny house on wheels and im trying to figure out if we will be able to have two feeds coming in. one 20amp and one 30. on separate circuits but in the same box?  So are split sub panels with dual feeds a thing? thats my question  Running solely off a 30 amp service would be really really tight given what we need to run. Mostly propane for the larger pulls but no need for a 50amp 240 nor do we have that set up like we already do with an existing 30amp rv hookup on site. So it got me thinking the 30 amp taking some of the load off of that and putting it on a separate 20 amp feed and having both the 20 and 30 in the house at the same time yet separately...? if this makes any sense.


How is floating point stored? When does it matter?

In follow up to , it appears that some numbers cannot be represented by floating point at all, and instead are approximated.  How are floating point numbers stored?  Is there a common standard for the different sizes?  What kind of gotchas do I need to watch out for if I use floating point?  Are they cross-language compatible (ie, what conversions do I need to deal with to send a floating point number from a python program to a C program over TCP/IP)?


We have a website dedicated to our ActiveX and .NET components that has been working for more than 12 years. The site consists of 2 parts: the static part (product descriptions and articles) and the dynamic part (forum dedicated to our tools).  Google indexes the static part without any problems - all the pages are found due to a good textual hyperlink menu system. These pages also have good positions in SERPs.  However, many SEO pro's insist that we need to have a sitemap.xml file to enhance the positions of our website in the "eyes" of Google or other search engines like Bing. My 2 questions related to this are the followings:  1) Do we really need sitemap.xml for our website?  2) If so, how to code the dynamic forum pages in it?


Inconsistency of one statement implies every statement is true?

Ok so I was reading Hungerford's book on Abstract algebra and it uses the Bernays-Gödel set theory. In it he presents Russel's Paradox and says that if a statement is both true and false then that can be manipulated to make any statement true. How?


I am relatively new to the Linux environment and also have no experience in using python before.   I am trying to install Spyder3 on Xbuntu 16.04. I installed using pip3.  pip3 install spyder3   But when I try to open it on terminal, it gives me Segmentation fault.  Any tip what I can do?   XUbuntu - 16.04 (64bit) Python 3.5.2


Is there a reliable way to differentiate between a Vulcan and a Romulan?

In the universe of Star Trek, Vulcans and Romulans were one species as late as the , about two thousand years prior to the TNG era.  Is there a reliable or standard way to tell the difference between a Vulcan and a Romulan in the absence of any other context (such as genealogies, cultural leanings, etc.)? E.g. will a standard life energy scan correctly differentiate the two? Is there a medical exam that will do this? Is a genetic test required? Will a genetic test reliably differentiate the two, or are there frequent "outliers" that don't match the expected racial genotype?  I recall that there was one episode of TNG where a member of Starfleet was caught lying on their induction paperwork (they were actually 1/4 Romulan rather than 1/4 Vulcan as claimed), but this was only after some time had passed and they had been serving for some time, so presumably nobody noticed anything peculiarly "Romulanesque" about the person during the standard Starfleet medical exams.  As to why there might or might not be a way - consider that real-world humans have been evolving for a lot longer than 2000 years. We don't have a reliable test that will, say, out someone as specifically Slavic, say, as opposed to Greek, or Etruscan. We rely on trends for which there are always major exceptions and complications.


"Install Ubuntu alongside Windows 10" option not present

I am currently using an ASUS X552CL which came pre-installed with windows 8. I had installed windows 7 pro, and then upgraded to windows 10.  I am trying to dual-boot my PC with Ubuntu 14.04.3 LTS (64-bit), but during installation, it says, "This computer doesn't have any OS. What do you want to do?". Also, if I try the "something else" option, it does not detect my partitions (I had partitioned 30 GB to install Ubuntu using the windows disk management tool). All I see is my hard disk in it's entirety.  Honestly, I am new to this, and have been trying to find solutions for a few days now. Thus far, I have disabled hibernate.  I have used   sudo apt-get install gdisk   within the Ubuntu Live desktop, and it finds a valid MBR and a corrupt GPT.  Also, I have found that a BootInfo summary would be useful for people who may assist, so I have generated one using the Boot-Repair tool. Mine can be found here:   Any help will be greatly appreciated. Thanks.


Black screen after hdmi monitor unplugged

I really need help. I have Kubuntu 16.10 on my laptop a everything worked. With external hdmi monitor too. But once I unplugged the monitor, then plugged it in again. And now it doesn't work without the external monitor. After login I have only black screen. Any ideas?


How do I test for a relationship between two ordinal variables?

I have two likert scale questions:  1: not well at all, a little likely, somewhat likely, likely, very likely  2: not well at all, a little, somewhat, quite well, very well    I am trying to see if there is a relationship/correlation between the responses to the two questions. How can I test this?


What is the word for a person who does the opposite of what he speaks?

I am looking for a word to let others understand that somebody is a person who does exactly the opposite of what he speaks. Is there any word for this?


Attempt to invoke virtual method 'java.lang.String com.dantools.OurChat.Model.User.getUsername()' on a null object reference

My data structure:    My code:  @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_main);      Toolbar toolbar = findViewById(R.id.toolbar);     setSupportActionBar(toolbar);     getSupportActionBar().setTitle("");      profile_image = findViewById(R.id.profile_image);      firebaseUser = FirebaseAuth.getInstance().getCurrentUser();     username = findViewById(R.id.username);      reference = FirebaseDatabase.getInstance().getReference("databasename").child("Users");      reference.addValueEventListener(new ValueEventListener() {         @Override         public void onDataChange(@NonNull DataSnapshot dataSnapshot) {             User user = dataSnapshot.getValue(User.class);             username.setText(user.getUsername());              if (user.getImageURL().equals("default")) {                     profile_image.setImageResource(R.mipmap.ic_launcher);             } else {                 Glide.with(MainActivity.this).load(user.getImageURL()).into(profile_image);             }         }          @Override         public void onCancelled(@NonNull DatabaseError databaseError) {          }     }); }  @Override public boolean onCreateOptionsMenu (Menu menu) {         getMenuInflater().inflate(R.menu.menu, menu);         return true; }  @Override     public boolean onOptionsItemSelected(MenuItem item) {         switch (item.getItemId()) {              case R.id.logout:                 FirebaseAuth.getInstance().signOut();                 startActivity(new Intent(MainActivity.this, StartActivity.class));                 finish();                 return true;         }          return false; } @Override protected void onStart(){     super.onStart();     if(firebaseUser == null) {         Intent homeIntent = new Intent(MainActivity.this, StartActivity.class);         homeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);         homeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);         startActivity(homeIntent);         finish();      }  }   }  I am always getting the Attempt to invoke virtual method java.lang.String com.dantools.OurChat.Model.User.getUsername() on a null object reference error when I login.  I tried to change some things but it doesn't work no matter what. I also tried to change the HashMap in the registerActivity but it still doesn't work.


Is there a way to change camera settings (Nikon D40x) to a higher dpi?

I know increasing the size of the photo (S,M,L) does not affect the dpi, but refers only to the pixels.  My camera shoots at 300 by default, but sometimes I want a crisper look when I get larger prints.  I can print a 4x6, then scan it and save at the higher resolution, but that is SO time consuming.  Does anyone have a solution to changing the camera setting?  It might not even be possible, or maybe I need a newer, updated camera.  (I use a Nikon D40x, with a AF-S 70-300mm lens for most pictures.)


"Set of techniques"; singular or plural?

I have an English course book that contains this question:  Fill in the blank "The book is a set of techniques that systematically __ the learner for interaction with target language speakers". (A) prepare (B) preparing  (C) prepares (D) prepared."  The answer given in the book is A, but isn't C correct? I used Google and found this example "DNA technology is a powerful set of techniques that ALLOWS scientists to examine, change, and create new genetic material"


Get one of the two random variables's distribution function from limitation

This is a very fundamental problem. In the Stochastic Processes textbook, it says that:     The Continuity Theorem of Probability allows us to conclude that   $$F_X(x)=\lim_{y \to \infty}F_{XY}(x,y)$$   I know it's right but don't know why, I'm confused, so..can someone gives me a proof mathematically?   The problem posing here is that, actually the $(\{X\leq x\},\{Y\leq y\})$ stands for  the Cartesian product of $\{X\leq x\}\times\{Y\leq y\}$ on $R^2$. We have no information about $P_{xy}$ even though we know everything about $X$ and $Y$. Hence we cannot simply say $P(X\leq x,S) = P(X\leq x)$, then how can we get the above equation?


Resume interupted upgrade (14.04 to 16.04) and

My computer crashed while I was upgrading from Ubuntu 14.04 to 16.04. In order to resume the upgrade, I followed the steps in the tutorial , which seems quite useful. Everything worked fine when I ran the command: dpkg --configure -a  But when I ran the command sudo apt-get update && sudo apt-get upgrade  , I get the following error message (I could only take a picture of it as in that computer only the terminal is working)  Basically it is saying that it failed to resolve a few packages (e.g. temporary failure to resolve 'gb.archive.ubuntu.com') I have then found something at , which I believe is pretty much what I have been experiencing (failure DURING dist upgrade). However, I noticed that ALL the entries from my sources.list have the name "xenial" after it, therefore I'm afraid closing all the entries from my source.list is not the best option. A picture of my sources.list file can be found below:  Or do anyone of you believe it can be a temporary DNS issue? Or any other thoughts (I have a feeling it has something to do with my sources.list)?


Compute the following sum in terms of an expression having only one binomial coefficient: For $m,n \in\mathbb{N}$  $$\sum_{k\leq m}(-1)^k {n\choose k}$$  I have started with   $$\sum_{k\leq m}(-1)^k {n\choose k} = \sum_{k\leq m}(-1)^k  \frac {n!}{k!(n-k)!}$$   But I am having trouble proceeding from there! I feel as if I am doing something wrong and am not able to find any results that could help. If I could get any hints that would be ideal! Thank you!


How can I record my screen on Ubuntu?   The app I'm looking for has ideally all of these features:   Can record in a format that can be played back easily on any platform and/or accepted by YouTube or another popular video site Can record just a window (instead of the whole screen), possibly selecting it with a mouse click Can start recording after a configurable delay (e.g., I launch the app and have time to do arrangements to my desktop/window before actual recording starts)


C: pointer to struct in the struct definition

How can I have a pointer to the next struct in the definition of this struct:  typedef struct A {   int a;   int b;   A*  next; } A;   this is how I first wrote it but it does not work.


How can users convince SE that the 6 character minimum edit requirement is counterproductive?

SE sites do not allow edits of less than 6 characters.  This is counterproductive, and results in the exact problem it is trying to solve: trivial edits.  Because of SE's 6 character minimum edit requirement, when one or two characters really DO need to be changed, the editor must make an additional  meaningless edit in order to satisfy SE's arbitrary restriction.  For example, in , there was an important mistake in the command that the answerer recommended entering.  I tried fix the error by removing a character, but SE would not allow it due to the 6 character requirement.  I then had to make another meaningless change (changing the original author's words) in order to satisfy the arbitrary 6 character requirement.  This type of edit is often necessary.  So how do we convince SE to remove the 6 character minimum edit requirement?  Update: This is different from the other questions posted on SE Meta.  In those questions, it is discussed at length if the limit should be removed, with most people agreeing.  But SE chose not to remove the limit, despite their users' pleas.  This question is about how to get SE to pay attention to their users and make a beneficial change.


I have used com.sun.org.apache.xerces.internal.impl.dv.util.Base64 package for the purpose of  encoding decoding of strings. But I want to use java.* package for encoding and decoding instead of com.sun.apache.* package.   Can you please suggest an appropriate java.* package?


How to randomly generate an integer in between 1 and 50 (java)

here is the whole code how do I in this create random number so that numberneedingtobeguessed is generated randomly.  public class Guessing {      public static void main(String[] args) {         // TODO Auto-generated method stub          @SuppressWarnings("resource")         Scanner input = new Scanner(System.in);         int number;         int numberneedingtobeguessed = 26;         int done = 1;          System.out.println("I am thinking of a number in between 1 and 50 what is it?");         while (done < 2) {             number = input.nextInt();              if (number < numberneedingtobeguessed) {                 System.out.println("Too low");             }             else if (number > numberneedingtobeguessed) {                 System.out.println("Too high");             }             else if (number == numberneedingtobeguessed) {                 System.out.println("You guessed correctly");                 done = done + 1;             }         }     } }


Why were these two edits within 5 minutes not combined?

According to :     Edits made by the same editor in a short period of time are collapsed: no matter how many times a post is edited within a 5-minute window, only one revision is stored ...   In this , revisions 2 and 3 (by me) for the question are less than 2 minutes apart, and yet they weren't rolled into one revision.  I posted an answer between the edits, but it's not the first time I've done that. Shouldn't the timer be post-specific?


-Edit- Someone decided to nuke the comments (which were nonsense and none were mine). They nuked the 'duplicates' which had nothing to do with my question too but didn't reopen (why?). I had to ask it again and now I actually have an answer  It's ridiculous the function works this way. Am I stuck with mmap? How would I solve this for windows? Problem happens under clang and g++ on linux (64 bit) #include<cstdlib> #include<cstdio> #define ALIGNSIZE 64 int main() {     for(int i = 0; i<10; i++)     {         void *p = aligned_alloc(ALIGNSIZE, 4096);         void *p2 = realloc(p, 4096+2048);         //void *p3 = aligned_alloc(ALIGNSIZE, 4096/24); //Doesn't need this line to make it unaligned.           if (((long)p & (ALIGNSIZE-1)) != 0 || ((long)p2 & (ALIGNSIZE-1)) != 0)             printf("%d %d %d\n", i, ((long)p & (ALIGNSIZE-1)) != 0, ((long)p2 & (ALIGNSIZE-1)) != 0);     } }


Is there any way I can separate a List<SomeObject> into several separate lists of SomeObject, using the item index as the delimiter of each split?  Let me exemplify:  I have a List<SomeObject> and I need a List<List<SomeObject>> or List<SomeObject>[], so that each of these resulting lists will contain a group of 3 items of the original list (sequentially).  eg.:   Original List: [a, g, e, w, p, s, q, f, x, y, i, m, c] Resulting lists: [a, g, e], [w, p, s], [q, f, x], [y, i, m], [c]   I'd also need the resulting lists size to be a parameter of this function.


Why Ubuntu.com doesn't suggest getting Ubuntu 19.04?

I currently have Ubuntu 18.04 installed and recently discovered Ubuntu 19.04 already released. But when I get to  it suggests downloading Ubuntu 18.04. Why not 19.04?


What is ubuntu 14.04 doing while showing "stopping early crypto disks"?

I created a virtual machine to install ubuntu 14.04 on VirtualBox 4.2.12.*. I created virtual CD to install it with fixed-size virtual disk of 200GB. After successful installation, it restarted as usual. But after showing message of below, it hangs. Actually, I created virtual machines to install ubuntu at Virtual Box successfully several times. It's very easy. The installed ubuntu versions ranged from 9.10, 13.04 and even 14.04 before. I don't know why this time it hangs at restarting after successful installation. The only difference between this failure restart and previous successful ones is that the virtual disk is much larger, 200GB. It failed three times.  * Deactivating swap... [OK] * Stopping remaining crypto disks... [OK] * Stopping early drypto disks... [OK]


In Extended Events what is the difference between rpc_completed and sql_batch_completed?

I understand that rpc_completed is defined as the completion of a remote procedure call and sql_batch_completed is the completion of a t-sql batch.  However can anyone explain in concrete terms what the difference is?  When should I use one and when should I use the other?  Will most/all SQL commands trigger both events?


Look at this . The title and question body are the same. I think this is not a good practice. Is it possible to create a mechanism to force a user to give a brief description which is different from the title?


Where can I find the status of the released versions of Ubuntu?

I want to know where I can find updated information about all the stable and in-development versions of Ubuntu, where I can find this information?     This question is meant to be a canonical question. It expects to answer the following questions:         Is X version stable yet?   Is X version in beta?   Is X version still supported?   What versions are still supported?   What are the versions in Beta/Alpha?   Until where X version will be supported?   Have X version ceased support?   When will be X version released?   Where I can download any release?   When will the next LTS version of Ubuntu be released?         The list is not exhaustive.


sed command to deleted everything and leave only words between patterns?

sed command to delete everything and leave only words between pattern?  I tried:  $ sudo sed -i '/from/,/until/!d'   But it left some words under first line and it left whole lines not only words between patterns.  I have a file full of text but I only want to leave text between "from" text "until" and delete everything else.  I try  for file in `ls` do     echo "`awk '/from/,/until/' $file`" > $file done   and i have left two lines one is text from pattern above one is empty new line


How to find the largest rectangle inside an ellipse

I have an ellipse that is defined by center, width and height. The axes of the ellipse parallel to the x and y. I want to find the largest rectangle that completely fits inside this ellipse. Is there an easy way to do this?  And sorry if my terminology is a bit off... it's been a long time since I last tackled with geometry


What to call someone who, apart from very inappropriate acts, doesn't care about what others think about him?

So, for instance, someone who doesn't occupy himself with the opinions of others and what they think of him, however who wouldn't go naked on the streets, because he completely doesn't care about what people think.


I came across this issue while troubleshooting a problem that I described in , but I thought this deserves a post of its own.  I'm trying to reclaim some unused space in a table. This is the current disk usage report for the table:    This is the current disk usage report for the database:   I'm aware that shrinking a database is generally considered bad practice, but I wanted to see what kind of effect it would have in this situation.  I executed this command:  DBCC SHRINKFILE("MyDbFile", 0)   Here is the result of the command:    Now here are the disk usage reports after the shrink:      Why does it seem like the shrink operation had virtually no effect? I have read that this operation can't shrink a database below it's initial size, but the mimimum database size seems to be set to 640 KB.


Abstract algebra field polynomial division

let F be a field, let ${h(x)=a_{n}x^{n}+a_{n-1}x^{n-1}+...+a_{1}x+a_{0}}$ belongs to F[x], and let $g(x)=x-1$. show that $g(x)$ divides $h(x)$ iff ${a_{n}+a_{n-1}+...+a_{1}+a_{0}=0}$. Can someone help me proving this, please!!


Denoising missing from Cycles scene panel

I can't find the denoising options on Blender 2.79, even though I'm using Cycles Render. Does anyone have any idea of why this occurs, and how to bring it back?


I wrote a simple equation like this  \begin{equation}   Compress Ratio = \frac{n-u} {n} \times 100 \end{equation}   However in the output there is no "space" between Compress and Ratio and they are concatenated.  How can I fix that?


Defining a new command for making functional lines / package

As you have probably guessed from the title my mother tounge is not English.  Therefore I have no idea if "Functional lines" is the correct term for what I am looking for.   Basically I am looking to make a command similar to the one below  \functionalines{3x}{x-4}{F_x = (3x)(x-4)}   Then the output should be similar to the tikz code below.   \documentclass{article} \usepackage{tikz} \usetikzlibrary{positioning}  \begin{document} \begin{tikzpicture}[% negativ/.style={blue,dashed}, positiv/.style={red}, vertlinje/.style={dotted,opacity=.7}, node distance=1.5ex, nullpunkt/.style={fill=white,inner sep= 1pt}]   \draw [->,>=stealth] (-5,0) node (linestart) {} -- (5,0) node (lineend) {};   \node (null1) at (-2,0) [label=above:-2] {};   \node (null2) at (1,0) [label=above:1] {};   \node [matrix] (produktledd) [below left=of linestart]{     \node [left] (f1) {$x+2$}; \\     \node [left] (f2) {$x-1$}; \\     \node [left] (f)  {$f(x)= x^2+ x - 2$}; \\    };   \draw [vertlinje] (null1)       -- (null1 |- f);   \draw [vertlinje] (null2)       -- (null2 |- f);   \draw [positiv]   (null1 |- f1) -- (lineend |- f1);   \draw [negativ]   (f1)          -- (null1 |- f1) node[nullpunkt] {$0$};   \draw [negativ]   (null1 |- f)  -- (null2 |- f);   \draw [positiv]   (null2 |- f2) -- (lineend |- f2);   \draw [negativ]   (f2)          -- (null2 |- f2) node[nullpunkt] {$0$};   \draw [positiv]   (f)           -- (null1 |- f)  node[nullpunkt] {$0$}                 (null2 |- f) node[nullpunkt] {$0$} -- (lineend |- f); \end{tikzpicture} \end{document}   A very good friend showed me this code =) Although there are a few small edits that would have been nice.  The top vectorline should be lowered a tad, and go over the equations. Above the equations and the vector there should be an x, indicating we are looking at the x-axis.  Preferably there should be a line below the equations, same length as the line above. Images below.  Is this possible to accomplish?  How the code looks    If I could get the output any way I want, I would want it to be like the one below.     So yeah, any idea, how to make a command which gives the desired output?


I have the following string:     EN=sdfsdf, CN=User Name, CN=Users, DC=domain, DC=co, DC=il   I need to return the first string that starts with "CN=" and ends with an ",". In this case I need to return "User Name".  'CN=.*,'  returns  "CN=User Name, CN=Users, DC=domain, DC=co,"  How can I get the just the first occurrence?


If $m, n$ be positive integers, prove that $\phi(mn)=\phi((m,n))\phi([m,n])$, where $(m,n)=$ gcd of $m, n$ and $[m, n]=$ lcm of $m, n$.   I have no idea to solve this question. Please help me to solve the problem.


Is possible to add an unnoticeable "signature" to a PDF in order to track its copies?

Suppose I want to generate 100 apparently identical PDF files, where I hide some kind of key, in order to distribute them among 100 different people. Now I detect an online shared copy of the document and I need to track who of that 100 people uploaded it.  My first approach would be to compile them in some way (maybe ) to, for example, include among its hyperref PDF keywords some "UserNr001", "UserNr002", ... tags.  What I'm asking for is a more subtle way to mark a PDF from the .tex file.  Maybe related:  and .


Experiment with two groups, pre- and post- treatment assessments

I am conducting an experiment with a control group and a treatment group. Both groups will take a pre and post treatment depression inventory. What statistical procedure do I use to determine if the treatment reduced depressive symptoms significantly?  T-test or ANOVA, which kind and why?


How to define a figure size so that it consumes the rest of a page?

Sometimes I don't need to have a specific picture size, but for layout reasons I would like to scale the image so that the rest of the page is filled. How can I achieve that?


Linux, C++ - libraries in libraries, gcc, code::blocks linking error

code::blocks version 17.12 Ubuntu MATE 19.10 1.22.2 gcc - 4:9.2.1-3.1ubuntu1 libavahi-client3 - 0.7-4ubuntu5 (although probably not relevant)   I have C++ app which uses avahi to communicate across the network. This compiles fine and links with:  g++  -o bin/Debug/Zeroconf obj/Debug/AVAHi.o {...} -lavahi-common -lavahi-core -lavahi-common -lavahi-client     So far, so good. I want to put the AvaHi functionality into a static library to make it easier for other developers. Ideally, I would like to include the Avahi library (among others) in my static library to make linking easier but it looks like the libraries it contains have to be linked by the executable - okay, fair enough.  Building the library works fine and goes off without a hitch and generates libHomeLib.a. Running nm on this shows the calls to AvaHi similar to:           U avahi_address_snprint          U avahi_alternative_service_name   so, not munged into C++ format.  Now, creating a simple C++ executable and adding the library to the linker options along with the Avahi libraries compiles fine and links with:  g++  -o bin/Debug/HomeConsole obj/Debug/main.o  -lglib-2.0 -lavahi-common -lavahi-client  /home/mike/Projects/HomeLib/bin/Debug/libHomeLib.a   (no -l for the library I added?). main () simply referenced a static object declared in the factory:  CHomeFactory *pFactory = CHomeFactory::get_factory ();   However, the link fails with:  /home/mike/Projects/HomeLib/AVAHi.cpp:27: undefined reference to `avahi_client_new' /usr/bin/ld: /home/mike/Projects/HomeLib/AVAHi.cpp:29: undefined reference to `avahi_service_browser_new' ...   and so on, naming all of the functions directly or indirectly called in the library which is odd since I could call any function from the current code without difficulty - I did by by adding a call in main:  avahi_client_new (NULL, (AvahiClientFlags)0, NULL, NULL, NULL);  This time, the compiler only complained:  /usr/bin/ld: /home/mike/Projects/HomeLib/bin/Debug/libHomeLib.a(AVAHi.o): undefined reference to symbol 'avahi_string_list_get_service_cookie' /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/libavahi-common.so: error adding symbols: DSO missing from command line   So I added a call to "avahi_string_list_get_service_cookie(NULL);" to main and got a clean link.  At the risk of being specific in my details but vague in my question, does anyone know what the hell is going on? Why does the link fail to connect the library calls unless they are referenced in the main executable?  It looks almost as if the first stage of the linker sees that the library isn't called in the code and so doesn't bother to include it which leads the final fixup stage to be unable to find the functions.


Why can't we declare a local variable inside of function parentheses, in JavaScript?

I don't understand this because java is my first programming language.  In java, variables inside of parentheses should be declared   For example  public int checkUserName(int minLength){     //some codes  }   but in javascript  function checkUsername(var minLength){ //some codes }   shows an unexpected token var error   I know Java and JavaScript are two different languages but I just want to know why isn't it allowed in JavaScript. I know it is not allowed I just want to know why.  I asked this because my JavaScript book does not explain me why JavaScript does not allow that. It just says you should write so but not WHY.


Every now and then, various programs create conhost.exe processes on my (Windows 7 x64) computer. I know they are console windows, except the windows themselves are hidden.  I don't suspect any malware, but being a curious person, I'd still like to know what they are doing.  Specifically, I'd like some way to view or dump STDIN and STDOUT of [conhost processes that I didn't create myself]. Does anyone know how to do that?  Edit: This got marked as a duplicate of another question. Perhaps I was unclear. I know exactly what conhost.exe is. What I'm asking for is different.  I know how to capture stdin, stdout and stderr of child processes. However, here I'd like to capture those streams of processes I did not create myself. Given the lack of information I can find, I'm beginning to suspect it is impossible, but perhaps someone knows some arcane magic that would be of use.


GM,  is log(e) another way of writing ln ? as  $$  log_{(e)}  = ln $$  and consequently when  x=1 $$  log_{(e)}(1+1/2x)  = ln(1+1/2x)  = ln(3/2) =0.405  $$  Please let me know.   Thank you.


Short Question:  Why can we manipulate a read-only file in Vim using : + w + q + ! even without being an administrator?  Long Question:  I have a text file (myFile.txt) which is read-only for everyone:  navid@navid-ThinkPad-T530:~/ubuntuTest$ ls -l myFile.txt  -r--r--r-- 1 navid navid 26 Aug 22 21:21 myFile.txt   I can open it with Vim without having admin privileges:  navid@navid-ThinkPad-T530:~/ubuntuTest$ vi myFile.txt    I modify it and press: Esc + : + w + q + Enter and I see this error message:  E45: 'readonly' option is set (add ! to override)   So far, everything makes sense.  But when I press: Esc + : + w + q + ! + Enter, Vim saves the changes.  I'm using Ubuntu 16.04 and VIM 7.4.