I want to create a class that can be made without any parameters, and has a method that takes a list of any object and behaves like this:  List&lt;String&gt; list1 = Arrays.asList(new String [] {"a","b"}); List&lt;String&gt; result1 = myClass.myMethod(list1);  List&lt;Integer&gt; list2 = Arrays.asList(new String [] {1,2}); List&lt;Integer&gt; result1 = myClass.myMethod(list2);   Here's my attempt after reading briefly about Java generics:  public class myClass&lt;T&gt; {  public List&lt;T&gt; myMethod(List&lt;T&gt; input) {   ...    return input; // just an example }   Why doesn't this work?
The very common beginner mistake is when you try to use a class property "statically" without making an instance of that class. It leaves you with the mentioned error message:     You can either make the non static method static or make an instance of that class to use its properties.   Why? I am not asking for solutions. I would be grateful to know what is the reason behind it. The very core reason!  private java.util.List&lt;String&gt; someMethod(){     /* Some Code */     return someList;             }  public static void main(String[] strArgs){                // The following statement causes the error. You know why..     java.util.List&lt;String&gt; someList = someMethod();          }
Skipping acquire of configured file 'contrib/binary-i386/Packages' as repository ... doesn't support architecture 'i386' I installed Ubuntu 18.04 and then while installing Virtualbox i get the 'i386' error message after I did:  $ sudo apt-get update Get:1 http://nl.archive.ubuntu.com/ubuntu bionic InRelease [242 kB] Hit:2 http://security.ubuntu.com/ubuntu bionic-security InRelease                                                                 Hit:3 http://ppa.launchpad.net/danielrichter2007/grub-customizer/ubuntu bionic InRelease                                          Hit:4 http://nl.archive.ubuntu.com/ubuntu bionic-updates InRelease Hit:5 http://nl.archive.ubuntu.com/ubuntu bionic-backports InRelease Get:6 http://download.virtualbox.org/virtualbox/debian bionic InRelease [4429 B] Get:7 http://download.virtualbox.org/virtualbox/debian bionic/contrib amd64 Packages [1426 B] Fetched 248 kB in 1s (209 kB/s)      Reading package lists... Done N: Skipping acquire of configured file 'contrib/binary-i386/Packages' as repository 'http://download.virtualbox.org/virtualbox/debian bionic InRelease' doesn't support architecture 'i386'   I found several answers on Askubuntu for the 'i386' message but I don't know how to apply this to my situation How to reduce Eclipse's memory usage? Is it a good practice to refer to countries, ships etc using the feminine form? While talking about ships and countries, is it a good practice to use the feminine form?  For example:  "Her economy" - while referring to a country's economy "Her flag (or deck etc)" - while referring to a ship  Is this practice common? Is it used today? Handling large numbers in C++? How can I quickly create a large file on a Linux () system?   will do the job, but reading from /dev/zero and writing to the drive can take a long time when you need a file several hundreds of GBs in size for testing... If you need to do that repeatedly, the time really adds up.  I don't care about the contents of the file, I just want it to be created quickly. How can this be done?  Using a sparse file won't work for this. I need the file to be allocated disk space. How do I format my code blocks? Why is vim frozen? Okay, maybe I'm missing something obvious but consider $h_n(x) = x^{ 1+ \frac{1}{2n-1}}$ on the set $[-1,1]$. Now consider a fixed $x \in [-1,1]$, we have:  $$\lim_{n\rightarrow \infty} h_n(x) = x \lim_{n \rightarrow \infty} x^\frac{1}{2n-1} = x$$  But my book says it's $|x|$? Why? How many ways can you divide $9$ students into three unlabeled teams where one team contains $4$ people, one contains $3$ people and the last contains $2$ people? Unlabeled, meaning that groups with abc = bca = cba, etc  I understand how to do this if the teams are labeled:  $$\frac{9!}{4!3!2!}$$  But there is a term missing in the denominator when the teams are unlabeled and I'm having difficulty understanding how to calculate how many ways the teams can be organized.  There are $3!$ ways to organize the same first group of $3$, $4!$ ways to organize the same second group of $4$ and $2!$ ways to organize the last group of $2$. Why wouldn't you multiply $3!4!2!$ in the denominator?   For instance:  (ABC, DEFG) = (ABC, DEGF)  = (ABC, DFEG) = (ACB, DFGE), etc Deleting an element from an array in PHP How do I make a redirect in PHP? diagram software for Ubuntu? Breadboard Confusion I just received the following breadboard in a electronics starter pack I purchased.    I am a little confused in how I would go about prototyping on this board, all the tutorials I have read state that the breadboard should have a positive and negative  input on it. But it appears this one doesn't.  Could anyone help clear my confusion? Is my Geoserver "Direct WMS Integration" working? Prove that $g$ is tangent to the graph of $f$ So I had these two functions and the following exercise:  $f(x)=x^3-2x^2$ $g_p(x)=px$ Prove that $g_{-1}$ is a tangent line to the graph of $f$. How many points do $g_{-1}$ and $f(x)$ have in common?  So yeah, the points in common are fairly simple to figure out:  Points in common: $x=1$ and $x=0$  So to see if it's actually tangent to the graph, I took the derivative of both functions at the points where they meet. The result:  $f'(x)=3x^2-4x$ $g'_{-1}(x)=-1$  So $f'(1)=-1$ and $f'(0)=0$ So I'm not sure why I get this answer? By the question, we are supposed to prove that its tangent to the graph of $f$ but by my calculation, it seems like only $f(1)$ is tangent with $g_{-1}(1)$. Help is appreciated! (Please avoid hint answers). How to pivot rows into columns MySQL Been looking to pivot rows (progress_check) into columns check 1, check 2 etc... No sum or totals required, just to display the results hopefully... Can anyone help, Thanks Ad dpkg -V , What does the output mean? I ran DPKG Verify on all packges and got this output and I don't know what it means :  ??5?????? c /etc/lightdm/lightdm-gtk-greeter.conf ??5?????? c /etc/default/chromium-browser ??5??????   /usr/local/etc/no-ip2.conf ??5??????   /var/lib/dokuwiki/data/cache/_dummy ??5?????? c /etc/xdg/menus/mate-settings.menu ??5?????? c /etc/apache2/apache2.conf ??5?????? c /etc/apt/apt.conf.d/10periodic ??5?????? c /etc/sysctl.conf ??5??????   /var/lib/xine/xine.desktop ??5??????   /boot/vmlinuz-4.4.0-21-generic ??5??????   /usr/lib/python3/dist-packages/cupshelpers/__pycache__/cupshelpers.cpython-35.pyc ??5??????   /usr/lib/python3/dist-packages/cupshelpers/__pycache__/xmldriverprefs.cpython-35.pyc ??5??????   /usr/lib/python3/dist-packages/cupshelpers/__pycache__/config.cpython-35.pyc ??5??????   /usr/lib/python3/dist-packages/cupshelpers/__pycache__/openprinting.cpython-35.pyc ??5??????   /usr/lib/python3/dist-packages/cupshelpers/__pycache__/__init__.cpython-35.pyc ??5??????   /usr/lib/python3/dist-packages/cupshelpers/__pycache__/ppds.cpython-35.pyc ??5??????   /usr/lib/python3/dist-packages/cupshelpers/__pycache__/installdriver.cpython-35.pyc ??5?????? c /etc/xdg/autostart/mate-volume-control-applet.desktop ??5?????? c /etc/libvirt/qemu/networks/default.xml Why is empty set an open set? I thought about it for a long time, but I can't come up some good ideas. I think that empty set has no elements,how to use the definition of an open set to prove the proposition. The definition of an open set: a set S in n-dimensional space is called open if all its points are interior points. Finding a formula to sum natural numbers up to $n$ Possible Duplicate:          I got this question in homework:  Find an expression for the sum ‫‪     $\sum k = 1 +\cdots + n‬‬$.    and prove it using an induction.   I'm not even near finding the expression. What I did notice is that if $n$ is (for example) 5 then the sum would be   $5^2 - 4^2 + 3^2 - 2^2 + 1^2$  So the first number is always positive and from there on the sign changes.  Any tips on how do I contintue from this point on, assuming I'm in the right direction?  Thanks! In Oracle, I can re-create a view with a single statement, as shown here:  CREATE OR REPLACE VIEW MY_VIEW AS SELECT SOME_FIELD FROM SOME_TABLE WHERE SOME_CONDITIONS   As the syntax implies, this will drop the old view and re-create it with whatever definition I've given.  Is there an equivalent in MSSQL (SQL Server 2005 or later) that will do the same thing?