I'm thinking of asking a question along the lines of:     Why does Mono for Android cost money if the mono project is opensource and therefore everything based on it must be opensource?   Where would be the best site to post this? I found it inappropriate for the main Stack Overflow.  See

Is it appropriate to ask questions about software licenses/licensing on ? Or is the appropriate place  ? Or is there no appropriate site currently and we should suggest such a site on ?


So in latvian language there are a lot of special letters like - ē ā š ņ č and much more. I have a problem where when i am putting info from textarea in to a database letter "š" and in database its writing "&S caron;" instead of letter what i need. But most interesting is when i try to output files in blade. In blade where im putting out all the posts, text is showing this "&S caron;" instead of "š" but when i open single post page it displays text correct. I have set charset uft-8 in my header and for DB i allready tried utf8mb4_latvian_ci utf8mb4_unicode_ci   and utf8_unicode_ci  here is some screens        If there is need for some code fragments please ask because i dont even know where to dig...  There is situation where in one table in different fields encoding is same and inputting letter "š" in field  "post title" it shows correct but in field "post body" its showing "&S caron;". And it is same showing in browser in all posts page - title correct and post text going with "&S caron;" and in single post page all is correct. kinda confused....  So i tried to put correct text in DB manual via phpmyadmin and now that post body is showing correct and in blade that post shows correct but others not. so i guess there is problem with inputing info

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


Commander or edh is a format that, amongst other things places restrictions on the colours of the cards you play in the deck. See this .     A card's color identity is its colour plus the color of any mana symbols in the card's rules text. A card's color identity is established before the game begins, and cannot be changed by game effects.   Cards in a deck may not have any colors in their color identity which are not shared with the Commander of the deck. (The identity of each card in the deck must be a subset of the Commander's)   But if I have a card like  which has a rider on which colour of mana was used, can I put that into a deck that doesn't have that colour identity, and can I pay for it with something like a treasure token or some other effect that can make any colour mana?

I recently tried /, and found it to be a ton of fun.  I've started customizing one of the pre-cons I got, but I'm a little confused by some of the deck-building requirements.  According to the deck-building rules:   A card's color identity is its color plus the color of any mana symbols in the card's rules text. A card's color identity is established before the game begins, and cannot be changed by game effects. Cards in a deck may not have any colors in their identity which are not shared with the commander of the deck. (The identity of each card in the deck must be a subset of the General's)    If I'm using  as my general, my deck's identity is Red, Blue and Green.  I couldn't use  in my deck, because it has a black mana symbol in the rules text.  My question is:  can I add a card to my deck that has the phrase "Add one mana of any color to your mana pool" (such as  or )?  Even though those cards could conceivably add black mana to my mana pool, they don't have a black or white (or any for that matter) mana symbol in their rules text, so they would be valid for inclusion in any deck?


My 8GB pen drive is now showing 700MB after I formatted it. I've created Ubuntu Desktop bootable USB drive using Power ISO.   After I formatted it. Now it's showing 700MB. Why is that? I'm using Windows 7 Ultimate.

My USB drive used to be originally 8GB when I bought it.  I'm trying to reformatted in Windows 7 by right clicking on the drive and selecting Format.... But the capacity only shows 250MB.  Is there something I can do to get the original size back? Maybe it got partitioned in a weird way?   The  flash drive is a SanDisk Cruzer Micro 8GB. I got it from Wal-Mart but this is the same drive.


At first I had an SSD with windows 10 in it and a HDD for data. Then I partitioned the HDD for data for windows and 150 GB with Linux mint. I was booting through grub by choosing either windows or Linux mint. Then I bought another HDD so I transferred windows data on the  new HDD and I proceeded to install ubuntu on the old HDD. During the Ubuntu installation I formatted the whole HDD and I installed Ubuntu no problem. However now I can't boot in windows as there is no windows entry in GRUB menu. I searched solutions in stackoverflow but nothing worked. Any idea? Edit1: From what I understand I have to make a boot partition in the HDD in order to see windows from GRUB again. Anyone has directions for this?

I installed Windows on my computer, followed by an installation of Ubuntu. However, now I'm unable to boot into my Windows install.  What can I do to fix this?


Some months ago, I ran across a peer-reviewed open access encyclopedia  and became rather excited about the idea and the implementation. So far I haven't had a chance to publish any materials there or, even, initiate that process (obviously, I'm talking about rather small and focused articles due to my limited research experience). However, I am curious about people's perceptions about the site (from both perspectives of an independent publishing outlet and an addition to traditional journal publishing) as well as your experiences, if any, with the publication process there and interactions with the site's editorial team. Also, what do you think about the feasibility and career value of publishing on Scholarpedia for a beginner researcher and scholar?

The topic of Wikipedia contribution has come up before, but I am interested in the community's opinion on peer-reviewed wiki publishing (e.g., Scholarpedia). I would like to know if there is any advantage for a PhD student to publish in such an online venue versus the traditional journal publication for review content. The advantages I see to the wiki approach is free of charge publication, open access for all, not necessarily being limited by character limits. However, the disadvantages I see could be the citation being completely ignored by the intended audience and therefore missing out on the benefits of scientific communication and the possible loss of accompanying reputation for the publication. I would also worry these publications would be ignored or minimized by future supervisors and review committees.


From Casella and Berger:  Let $W$ be an unbiased estimator of $\tau(\theta)$ and let $T$ be a sufficient statistics for $\theta$. Define $\phi(T) = E[W|T]$. Then $E_{\theta}[ \phi(T)] = \tau(\theta)$ and $Var_{\theta} ( \phi(T)) \leq Var_{\theta} (W)$, for all $\theta$; that is $\phi(T)$ is a uniformly better unbiased estimator of $\tau(\theta)$.   I am trying to understand the statement of this theorem. I am a little uncomfortable with "sufficient statistics" so I think the statement of the theorem is not parsing.   Let me try to state it informally. If I have an unbiased estimator $W$ and I condition this estimator on a sufficient statistics, then I will end up with an estimator with that has the minimum variance for the class of estimators $W$. I am not totally sure what it means to condition an estimator on a sufficient statistic, but it seems like if I can do this for a given unbiased estimator, then I have the best estimator in that class. On the other hand, suppose I have an estimator and I want to check if it has the minimum variance in its class of estimators.   Then I would just have to show that it is 1) Unbiased and 2) Conditioned on some sufficient statistic. Is that right? Are there any examples?  Edit: It is not clear to me what it means to condition on a sufficient statistic, and the links given so far do not try to answer this. Moreover, if we are just handed an unbiased estimator, how would we go about showing that the estimator is actually conditioned on a sufficient statistic?

I've tried looking online and I can't seem to grasp the Rao-Blackwell theorem.  Could someone please give an intuitive explanation backed up by formulae.


I'm trying to remove some elements from an ArrayList while iterating it like this:  for (String str : myArrayList) {     if (someCondition) {         myArrayList.remove(str);     } }   Of course, I get a ConcurrentModificationException when trying to remove items from the list at the same time when iterating myArrayList. Is there some simple solution to solve this problem?

We all know you can't do the following because of ConcurrentModificationException:  for (Object i : l) {     if (condition(i)) {         l.remove(i);     } }   But this apparently works sometimes, but not always. Here's some specific code:  public static void main(String[] args) {     Collection<Integer> l = new ArrayList<>();      for (int i = 0; i < 10; ++i) {         l.add(4);         l.add(5);         l.add(6);     }      for (int i : l) {         if (i == 5) {             l.remove(i);         }     }      System.out.println(l); }   This, of course, results in:  Exception in thread "main" java.util.ConcurrentModificationException   Even though multiple threads aren't doing it. Anyway.  What's the best solution to this problem? How can I remove an item from the collection in a loop without throwing this exception?  I'm also using an arbitrary Collection here, not necessarily an ArrayList, so you can't rely on get.


Proposition:Let X be a given vector space and Γ be the set of linear functional on X.Let X endowed with a weak topology with respect to Γ.Then X is a topological vector space.  What I need to show is (x,y)∈X×X→x+y is continuous and (α,x)∈C×X→αx is continuous.However,generally a weak topology assure only the continuity of each linear functions on X.So I don’t know how to show the proposition.Please give me a hint or answer.

Consider a topological vector space $X$ (not necessarily normed or metrisable or anything). Its topological dual is a well defined set of linear maps. With this in place, the weak topology is defined as the coarsest topology on $X$ such that all of the dual still consists only of continuous linear forms. It it possible that the weak topology be so coarse that $X$ equipped with its weak topology is no longer a topological vector space ?


I've been playing with frequencies of colors lately, and just out of curiosity, was wondering if we have technology to generate a spectral color from an arbitrary frequency (to some degree of accuracy), or do we have to stumble on the right gas to heat up?

Does there exist a laser that is tunable over the whole visible spectrum? If so does there exist one that is solid state? This is to settle a score with my dumb workmates.


When I am reading a book about minimal surface, there is a question show up.  Let $(M, g)$ be a Riemann surface, and $f$ be a positive smooth function on $M$, then the curvature of $(M, f^2 g)$ is given by $$K_g=\Delta_g\ln f+f^2K_{f^2g}\,.$$  I think it maybe a trivial question that just need to calculate carefully, but I have failed to get the answer. Is there any other way to obtain this result?

Let $M$ be a $2$-manifold (the setting I am wanted to apply this is $M=S^2$) and $g,h$ be conformally related metrics (ie $h=e^{2w}g$ for some $w\in C^\infty$). I would like to show that  $$ K_h=e^{-2w}(K_g-\Delta_g w) $$ where $K$ is the Gauss curvature. I have tried using the definition of Gauss curvature $$ K_g=\frac{\langle (\nabla_2 \nabla_1-\nabla_1 \nabla_2)e_1, e_2\rangle}{\text{det} g} $$ which introduces the factor $e^{-2w}$ (a factor of $e^{-4w}$ from the determinate and a factor of $e^{2w}$ from the inner product) but I do not see how the $-\Delta_g w$ term will appear. I also tried using normal coordinates but I still could not see how to get the $-\Delta_g w$ term. I was also reading  similar post but there was no answer to the question and I did not really understand what the comments were hinting at. I would really appreciate just a hint to get me started in the right direction.


Recently, lots of images became SVG, for example the Inbox and the Achievements icons.  However, the Super Collider site favicons are their usual blurry selves:    Note that the SE logo in the top bar is fine:    Could the favicons be vectorised?

Would it be possible to update the StackExchange button drop-down to include scalable vector graphics (SVG) favicons for each site?    I didn't notice any mention of this during the  and  phases.


I do not understand as I wrote in a previous question:    solution:    I see that we can scale:   $u_k$ but I do not understand why it is legal to say $a_k + b_k = 1$ what is $a_1 = 20$ and $b_1 = 1$ then $a_1 + b_1 \ne 1$?

From Putnam and Beyond:    The Solution is:    The only part I do NOT understand is how: $a_k + b_k = 1$ for every $k$? The problem just specifies nonnegative numbers?


I'm having issues passing a function as an argument in C++. I've recreated a minimal working example here:  #include <iostream> using namespace std;  void print(const double &func(double)) {   cout << func(1) << endl; }  class Obj {   public:   double MyFunction(double x);   void PrintFunction(); };  void Obj::PrintFunction(){   print(MyFunction); }  double Obj::MyFunction(double x) {   return x + 1; }  int main() {   Obj object;   object.PrintFunction(); }   The overall structure seems weird in this context, but it makes more sense in the full code (specifically, I'm ideally looking for a solution that doesn't involve restructuring the function ownership). This compiles with the error error: invalid use of non-static member function double Obj::MyFunction(double), which suggests that there's something wrong with how I'm calling print(MyFunction). I have a rough understanding that MyFunction cannot be called by itself, but no amount of inclusions of pointers, references, etc., have successfully gotten the code to compile. How should I properly call MyFunction?

I'm using an API that requires me to pass a function pointer as a callback. I'm trying to use this API from my class but I'm getting compilation errors.   Here is what I did from my constructor:  m_cRedundencyManager->Init(this->RedundencyManagerCallBack);   This doesn't compile - I get the following error:      Error  8 error C3867: 'CLoggersInfra::RedundencyManagerCallBack': function call missing argument list; use '&CLoggersInfra::RedundencyManagerCallBack' to create a pointer to member   I tried the suggestion to use &CLoggersInfra::RedundencyManagerCallBack - didn't work for me.   Any suggestions/explanation for this??  I'm using VS2008.  Thanks!!


I came across a  yesterday that consisted of a single sentence (with poor grammar to boot), followed by a load of poorly formatted code. I flagged it as low quality and it has since received two down votes. Was I wrong to flag this as a low quality question?  It seemed to fit the description of low quality ("This question has severe formatting or content problems. This question is unlikely to be salvageable through editing, and might need to be removed.") perfectly. I could spend a few minutes reformatting the messy code, but the tags are wrong and the actual question shows no effort at all. Simply cleaning up the code wouldn't have made the question any more understandable.   I'm just curious if I was wrong to flag it as such and what fits the description more appropriately?

When flagging an answer as "low quality" you see some explanatory text that reads:     This answer has serious formatting or content issues and might not be salvageable.   An effort should be made to improve answers before they're flagged for removal.  I don't mean to discourage any "low quality" flagging at all, so if an answer is old and the user hasn't been back for a while, go ahead and flag it.  But if an answer is only a few hours old and has no downvotes or comments (meaning no one made an effort to communicate that improvement was needed) then I'm hesitant to just delete it.  Moderators just don't have time to look at every low-quality answer on the site.  We need everyone in the community to use the tools at their disposal (downvotes, comments, edits) to deal with these.  Please use flagging for deletion as a last resort.  Naturally this is open for discussion, so feel free to voice your opinion if you disagree with me.


A bit of background:  My wife and I have a combined income of over $100k (before taxes, retirement, etc). We both put 15% of our paycheck into a 401(k), and we have no debts of any kind. We pay off our credit cards in full every month.  Currently, we are saving for a down deposit on a house, and as a result we have $35,000 that is just sitting in my bank account. We live modestly and save around $3000 a month so our savings are growing quickly.  My question is: what should I be doing with this money while we save for a down deposit? I know it is bad to simply keep money in a bank account due to inflation, missed investment opportunities, etc, but we want the money to be easily accessible when it comes time to purchase a house. Is there a wise, safe investment strategy I can make that will allow me to easily and quickly withdraw the money when the time comes?  Some of our friends advise us to purchase a house now, but we are trying very hard to get to a 20% down deposit, which would be around $50k for the kinds of houses we have in mind.

We currently have two rewards checking accounts.  We are nearing the maximums permitted on each account, after which we receive .5% and .25% APY.  It's within our means to perhaps open another one, but at that point we are looking at using our debit cards 50 to 55 times a month.  I feel that running that number of debit transactions is getting out of hands as it's just the two of us.  I realize there are easy ways to game the system, but I want these things to stay around and another person doing just such that could lead to the ends of these accounts.  We are saving towards a new house down payment.  As such we don't require these funds to be fully liquid, but would still like to remain free of as much risk as possible -- however I realize we are unlikely to find anything near our rewards checking accounts (4% APY interest for meeting various rules: direct deposit, a certain number of debit card transactions, and not receiving a paper statement), but would hope we can get at least half of that.  We aren't fully sure when we will be buying, but we are probably a couple of years out.  For that reason I don't think CDs would work.  Even if we ladder them, when we need the money we will need it pretty much instantly.  Do I bite the bullet and just find the best available money market account?  What other options do I have that let me deposit monthly, and not have a timebomb associated to accessing that money that isn't in the initial lump sum?


In 3D view i often find myself getting the perfect spot for the camera ,but Crtl alt 0 always ruins it,it always changes the view a lot,and trying to get the same angle by moving camera is also impossible and incredibly time conssuming.  How do i convert PERFECTLY any current view into an active camera?It's no big deal if it changes resolution(once again,align camera to current view is not what i am looking for since it do not replicate exactly the current view)

I know there is a ton of questions and answers about this topic, but none answers my question sufficiently.  Let's say I have a viewport view that I want to render in Cycles. Pressing ALT CTRL Numpad 0 aligns the camera to this view, but it does not solve the whole problem. The thing is, I want PRECISELY this view on the render, preferably in one click, without manually moving the camera back-and-forth, changing sensor sizes etc. fiddling that will remove the unwanted border that appears and blocks the viewport partially. This whole activity wastes a lot of precious time especially if you do this 10 times a day.  What this dream action should do:   match the render resolution (proportions) to the resolution of the current view (can the resolution of current view be read by a Python script?) make the entire view the camera view, without any borders, passe-partout etc. by automatically maneuvering sensor sizes etc. whatever is necessary to make it exactly the same view, the same camera lens angle.   Is it possible to write such a script that would do it all in one click?


Can anyone confirm if the hyphen or dash is longer? Which one is longer than the other and which one is the shorter?

I generally know how to use a hyphen, but when should I use an en-dash (–) instead of an em-dash, or when should I use a hyphen (-) instead of an em-dash (—)?


I recently downloaded 'Blood Bowl' on Steam to my Mac, not realizing that it was not Mac-compatible. Is there any software or any way that will allow me to play it, as obviously I've already paid for it? Cheers.

I love my MacBook (2008, aluminum, Intel processor with the low-end nVidia chipset). I don't like running Windows. I don't want a Windows Bootcamp partition, because I found I never used it. (I really only used it for Oblivion, and even then stopped eventually because I enjoyed it more on the XBox, and hated the reboot-into-Windows process.)  I'm using WINE to run Fallout and Fallout 2, with great success. I also have the Steam client, which I've used to get Portal and a second copy of Civ IV (+ addons, mostly so I didn't need the DVD with me).  What I want to know is, can I buy a Windows game from the Steam client for the Mac, and then run it via WINE? If so, do I need to take any special precautions? (For instance, my current winecfg emulates a 640x480 desktop to enable Fallout and Fallout 2.)


What is the difference between running a script file like this:  sh myfile.sh   Or this:  ./myfile.sh   I thought they are the same thing, but noticed sometimes they are not, as seen below example:  root@kali:~/Documents# sh sweep-ips.sh ips range: ping: 10.11.1.{0..24}: Name or service not known  root@kali:~/Documents# ./sweep-ips.sh  ips range: 64 bytes from 10.11.1.5: icmp_seq=1 ttl=128 time=242 ms 64 bytes from 10.11.1.8: icmp_seq=1 ttl=64 time=249 ms 64 bytes from 10.11.1.22: icmp_seq=1 ttl=255 time=249 ms 64 bytes from 10.11.1.24: icmp_seq=1 ttl=64 time=241 ms   script:  #!/bin/bash echo "ips range"  for ip in 10.11.1.{0..24}  do    ping -c 1 ${ip} | grep "time="   done

This may be a silly question, but I ask it still. If I have declared a shebang  #!/bin/bash    in the beginning of my_shell_script.sh, so do I always have to invoke this script using bash  [my@comp]$bash my_shell_script.sh   or can I use e.g.  [my@comp]$sh my_shell_script.sh   and my script determines the running shell using the shebang? Is it the same happening with ksh shell? I'm using AIX.


I used to be able to select either the Windows Boot Manager or Ubuntu when booting my ASUS laptop.  Since Windows 10 has updated, it now automatically chooses the windows boot manager. Ubuntu is the first in the boot priority list, and even if I press escape during startup to manually choose a boot device, and then choose ubuntu, it still loads up the windows boot manager.  I have disabled secure boot, fast boot, and hibernation. This all used to work until the latest Windows 10 update. Any ideas?

After I ran Windows 10 update this afternoon my partition table broke... I had dual boot with Windows 10 and Ubuntu 14 with Grub as the boot loader. The error that came up was "Error no such partition, Entering rescue mode... grub rescue>". I googled it,  about the boot-repair ISO, installed it on a USB, ran the repair, got this report, but still no luck:    Now the boot skips Grub entirely and goes to Windows boot manager which fails with "The boot configuration data for your PC is missing or contains errors". So now instead of dual boot I have zero boot. Thanks Microsoft.  Anyway can you guys help me interpret the disk info in the pastebin link? I don't remember my partition configuration but I believe Ubunut had slightlty less disk space than Windows. Questions I have:   Is the Ubuntu partition still there? Could it be the one named "Extended"? (sda4) Where would GRUB be? Gone? Can it be reinstalled? how?   I don't really care about the Windows partition anymore, but it would be nice to rescue Ubuntu.


I've read  Follow the ways suggested in some answers, I'll have the following issue.  var tasks = new List<Task>();  for (int i = 0; i < 10; i++)     tasks.Add(Task.Run(() => Console.WriteLine(i))); Task.WaitAll(tasks.ToArray());   Normally I would expected it passes the values of i from 0 to 9 to the lambda in the Task.Run() each time. Turned out the actual values passed in really depend, but most likely it just creates all the 10 tasks and then runs them, so what prints out is just all 10s like: 10, 10, 10, 10, 10, 10, 10, 10, 10, 10. Or sometimes it's: 3, 3, 3, 10, 10, 10, 10, 10, 10, 10.  So how can I solve this nicely? Or in this situation, have to use Task.Factory.StartNew()?

I met an interesting issue about C#. I have code like below.  List<Func<int>> actions = new List<Func<int>>();  int variable = 0; while (variable < 5) {     actions.Add(() => variable * 2);     ++ variable; }  foreach (var act in actions) {     Console.WriteLine(act.Invoke()); }   I expect it to output 0, 2, 4, 6, 8. However, it actually outputs five 10s.  It seems that it is due to all actions referring to one captured variable. As a result, when they get invoked, they all have same output.  Is there a way to work round this limit to have each action instance have its own captured variable?


My book (Calculus by Howard Anton) says that $\sqrt{x}$ is continuous at $x=0$. But $\lim_{h\to 0} \sqrt{h}$ is defined easily whereas  but $\lim_{x\to 0^{-}} \sqrt{-h}$ cannot be defined. So if limits of both sides isn't equal then how can we say it's continous at $x=0$?

If I remember right, $f(x)$ is continuous at $x=a$ if   $\lim_{x \to a} f(x)$ exists $f(a)$ exists $f(a) = \lim_{x \to a} f(x)$   So $\lim_{x \to 0^{-}} \sqrt{x}$ exists? Thus $\lim_{x \to 0^{-}} \sin(\sqrt{x})$ ?


I noticed that the process of earning some badges could be automated (and others with an army of bots), so I am thinking of writing an app called Badger to automate this. Is this good etiquette?

It seems to me that badges like “fanatic” can be automated, i.e. someone could put a script together to “earn” that badge.  Is there any safeguard against such practice?  Or is it regarded as fair-play (as in “if you even managed to put such a script together, dude, you deserve it”?!


I flagged a question as off-topic because it was a "how to get started" question. After flagging the question, I then clicked flag again, and noticed that it had shown that I had not only flagged it as off-topic, but it also had shown that I flagged it as duplicate:    I am wondering if this is a bug, or if it is intentionally marked so because this type of question is frequently asked and likely has an answer already. If you look at my remaining flags, you will notice that it didn't consume an extra flag for the second reason, so this isn't a major issue.

I recently flagged a post on SO as "Unclear what you're asking". Afterwards, for whatever reason, I clicked flag again and found this:    Is there any reason it says I've raised a duplicate flag too when I'm positive I have not? Is this a bug? The question, as of 2:56 PM UTC, 11 September, 2013, has only existed for 26 minutes and the flag doesn't exist in my flag history:    Note: There are several similar questions:       The first was never answered and the second is unrelated as it appears the person asking did, in fact, raise the flag they assumed they hadn't raised.


Let $f \in H(\mathbb{C})$ and $g(x, y) := |f(x+iy)|$, and assume $g$ is integrable on $\mathbb{R}^{2}$. Show then that $f \equiv 0$.  Things I Know: $f$ is bounded on each $D(0, R)$ for $R > 0$, but the bounds must increase as $R \rightarrow \infty$. Intuitively, this should mean $\int_{\partial D(0, R)} |f(z)| dz \rightarrow \infty$ as $R \rightarrow \infty$ (assuming $f \not\equiv 0$), which could say something about $g$. But here I'm talking about upper bounds, which don't help. I could consider the infimum $f$ takes on $\partial D(0, r)$ to bound below, but these inf's don't necessarily grow larger as $R$ does.   My intuition tells me Liouville will come into play, but I'm not sure... Any ideas? Thank you!  Edit: Though this is the same as  essentially, I want to include proofs that use any complex analytic tools, while the linked question wants a solution based only in elementary calculus.

Suppose $f$ has a power series at $0$ that converges in all of $\mathbb{C}$ and $$\int_{\mathbb{C}} |f(x+iy)|dxdy$$  Converges. Prove $f$ is identically zero. I don’t know Liouville’s theorem or any integral formulas yet, so I’m a bit stuck on this one.   A hint is given: “Use polar coordinates to show $f(0)=0$”  Edit: I am open to any suggestions, even those which use Liouville or Cauchy etc


I have a Sony Xperia Z1 with 4.4.2 Kitkat  Is possible disable the sound of the notifications when I listen music or doing something?  I'm watching a video of youtube, listen music with headphones ( device is silent), etc. but when telegram or whatsapp receive a notification it sounds. If i disable the media volume i can't listen the video or the music  I know that other devices have the option to disable notifications.

I don't like the notification sounds overlaying my music playback, but I can't find any setting to disable notification sounds while playing music.  I also don't like the way the sound overlay works. The IPhone handles this much better.  Is there any way to set this up to behave more like the Iphone or turn off the notifications while playing music at all?


please can someone show me the new syntax for sending videos to webcam using ffmpeg and v4l2loopback?  It used to work perfectly until I updated and upgraded recently  the previous syntax i use is:  sudo modprobe v4l2loopback  ffmpeg -an -re -i inputvideo.mp4 -f v4l2 -vcodec rawvideo /dev/video0   and the error I get is:  [v4l2 @ 0x55a452b3a400] ioctl(VIDIOC_G_FMT): Invalid argument Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument Error initializing output stream 0:0 --  Conversion failed!   I attached a screenshot of the error message   The full code with the error is:  ffmpeg -an -re -i virtualcam.mp4 -f v4l2 -vcodec rawvideo /dev/video0 ffmpeg version 3.4.2-2+b2 Copyright (c) 2000-2018 the FFmpeg developers   built with gcc 7 (Debian 7.3.0-21)   configuration: --prefix=/usr --extra-version=2+b2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared   libavutil      55. 78.100 / 55. 78.100   libavcodec     57.107.100 / 57.107.100   libavformat    57. 83.100 / 57. 83.100   libavdevice    57. 10.100 / 57. 10.100   libavfilter     6.107.100 /  6.107.100   libavresample   3.  7.  0 /  3.  7.  0   libswscale      4.  8.100 /  4.  8.100   libswresample   2.  9.100 /  2.  9.100   libpostproc    54.  7.100 / 54.  7.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'virtualcam.mp4':   Metadata:     major_brand     : isom     minor_version   : 512     compatible_brands: isomiso2avc1mp41     encoder         : Lavf58.16.100   Duration: 00:08:08.36, start: 0.000000, bitrate: 377 kb/s     Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 480x360 [SAR 1:1 DAR 4:3], 376 kb/s, 22.77 fps, 22.77 tbr, 11384 tbn, 45.54 tbc (default)     Metadata:       handler_name    : VideoHandler Stream mapping:   Stream #0:0 -> #0:0 (h264 (native) -> rawvideo (native)) Press [q] to stop, [?] for help [v4l2 @ 0x55a452b3a400] ioctl(VIDIOC_G_FMT): Invalid argument Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument Error initializing output stream 0:0 --  Conversion failed!

Following the guide in  I did:  $ sudo modprobe v4l2loopback $ ffmpeg -f x11grab -r 15 -s 1280x720 -i :0.0+0,0 -vcodec rawvideo -pix_fmt yuv420p -threads 0 -f v4l2 /dev/video0   The device /dev/video0 shows up as expected but the ffmpeg command fails with following output:  $ ffmpeg -f x11grab -r 15 -s 1280x720 -i :0.0+0,0 -vcodec rawvideo -pix_fmt yuv420p -threads 0 -f v4l2 /dev/video0 ffmpeg version 4.0 Copyright (c) 2000-2018 the FFmpeg developers ... [x11grab @ 0x559767794cc0] Stream #0: not enough frames to estimate rate; consider increasing probesize .... [v4l2 @ 0x55976779e6c0] ioctl(VIDIOC_G_FMT): Invalid argument Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument Error initializing output stream 0:0 --  Conversion failed!   I already tried to follow the suggestions below the answer to no avail. I noticed that v4l2 is listed as demux only in ffmpeg -formats. Does that mean I can't use it for output to /dev/video0? If so, what should I use instead? I tried h264 but that crashes after ~1000 frames with following error message:  $ ffmpeg -f x11grab -r 15 -s 1280x720 -i :0.0+0,0 -vcodec rawvideo -pix_fmt yuv420p -threads 0 -f h264 /dev/video0 ffmpeg version 4.0 Copyright (c) 2000-2018 the FFmpeg developers ... [x11grab @ 0x55da61e29cc0] Stream #0: not enough frames to estimate rate; consider increasing probesize ... File '/dev/video0' already exists. Overwrite ? [y/N] y .... Error writing trailer of /dev/video0: Invalid argument .... Conversion failed!


I wrote a simple program in Cpp but I have no idea what is the best approach to test this? Is there a certain format for unit testing like in Java?   #include <iostream> #include <sstream> #include <string> #include <algorithm> #include <vector>  using namespace std; static vector<int> getAllFlipLocations(         vector<int> & pancakesRepresentedByDiameter);  /**  * Problem statement can be viewed at:  * http://www.programming-challenges.com/pg.php?page=downloadproblem&probid=110402&format=html  *  * The following is a solution for the above problem.  *  * @author Quinn Liu (quinnliu@vt.edu)  */ int main(void) {     string stackOfPancakes;      while (getline(cin, stackOfPancakes)) {         istringstream is(stackOfPancakes);          vector<int> pancakesRepresentedByDiameter;          int diameterOfPancake;         while (is >> diameterOfPancake) {             pancakesRepresentedByDiameter.push_back(diameterOfPancake);         }         reverse(pancakesRepresentedByDiameter.begin(),                 pancakesRepresentedByDiameter.end());          vector<int> orderOfFlipLocations = getAllFlipLocations(                 pancakesRepresentedByDiameter);          // first print original stack of pancakes         cout << stackOfPancakes << endl;          // now print location within stack to flip pancakes to get a stack         // of pancakes where the pancake diameters decrease as they move         // from the bottom to the top         for (int i = 0; i < orderOfFlipLocations.size(); i++) {             if (i != 0) {                 cout << ' ';             }             cout << orderOfFlipLocations[i];         }         cout << endl;     } }  /**  * Return the order of the locations to flip pancakes in the pancake stack.  */ vector<int> getAllFlipLocations(vector<int> &pancakesRepresentedByDiameter) {     vector<int> orderOfFlipLocations;      vector<int>::iterator beginIndex = pancakesRepresentedByDiameter.begin();     vector<int>::iterator endIndex = pancakesRepresentedByDiameter.end();      for (int i = 0; i < pancakesRepresentedByDiameter.size(); i++) {         vector<int>::iterator currentIndex = beginIndex + i;         vector<int>::iterator maximumIndex = max_element(currentIndex,                 endIndex);          // iterate through the stack of pancakes         if (currentIndex != maximumIndex) {              if (maximumIndex + 1 != endIndex) {                 // adds value of (maximumIndex - beginIndex + 1) to the end of the vector                 orderOfFlipLocations.push_back(maximumIndex - beginIndex + 1);                 reverse(maximumIndex, endIndex);             }             orderOfFlipLocations.push_back(i + 1);             reverse(currentIndex, endIndex);         }     }     orderOfFlipLocations.push_back(0);     return orderOfFlipLocations; }

I'm working on a large c++ system that is has been in development for a few years now. As part of an effort to improve the quality of the existing code we engaged on a large long-term refactoring project.  Do you know a good tool that can help me write unit tests in C++? Maybe something similar to Junit or Nunit?  Can anyone give some good advice on the methodology of writing unit tests for modules that were written without unit testing in mind?


Find all quadruples of real numbers $(a,b,c,d)$ satisfying the system of equations  $(b+c+d)^{2010}=3a$  $(a+c+d)^{2010}=3b$  $(a+b+d)^{2010}=3c$  $(a+b+c)^{2010}=3d$  I tried to find the solutions using hit and trial and by using some logic also I find two solutions which are $(0,0,0,0)$ and $(\frac{1}{3},\frac{1}{3},\frac{1}{3},\frac{1}{3})$  I think these are the only solutions that exist.


For example, are there infinitely many primes with the properties: P mod 3 = 2 P mod 5 = 2 P mod 7 = 3 P mod 11 = 10 If so, does this remain true for any possible combination of non-zero prime modular residues?

I believe that for every prime $p\geq 5$ there exists at least one prime $q$ that is both congruent to 1 mod $p$ and congruent to 5 mod 6. It's well known that there are an infinite number of primes congruent to 1 mod $p$ and there are an infinite number of primes congruent to 5 mod 6, but the conjunction of the two conditions is baffling me. Any ideas? (The conjecture is true for $p < 437,077$ because programming).


Pass by value and by reference - I do this all the time in C++. But I'm wondering the behavior of java.  I'm writing a BST and conjured the following method:  private Node<T> get_node(T data) {     Node<T> tmp = null;     if (isEmpty())     {         return null;     }     tmp = root;     while (tmp != null)     {         //System.out.println("tmp is " + tmp.getData());         if (compare(tmp.getData(), data) < 0) //data is greater         {             System.out.println("get right");             tmp = tmp.getRight();         }         else if (compare(tmp.getData(), data) < 0) //tmp is greater         {             System.out.println("get left");             tmp = tmp.getLeft();         }         else if (compare(tmp.getData(), data) == 0) //we found it         {             System.out.println("get left");             return tmp;         }     }     return null; }    This is in the BST class itself - I am using this helper function to construct a new BST in "this".  The problem is, I don't think this method is actually returning the ACTUAL Node in this. I think it is returning a copy or something likewise useless to me. I really want this to return the ACTUAL Node in this.  How is this done? Is this done at all?

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


I run a regression where I created a set of dummies to represent different intervals. I had set of 4 dummies, only included 3 in the regression so the one with the highest interval (experience) acts as a benchmark.  How do I interpret those if my dependent variable is in ln form? I have no clue how to interpret this also in relation to the benchmark variable when I have multiple sets of dummy variables.   For example, if the benchmark is 'bigger AS size' and the AS 5000m is negative -,764 does that mean that having only 'AS 5000m' decreases the output but by how much? 76,4% ? or only 0,764? I am not sure how to interpret the constant since it is in log and it also represents the benchmark for other dummies in the regression...   I have shortened the model, but there are in essence two 'sets' of dummies (locations and the size intervals) and two normal dummies.  variable              B coeff.  (Constant)           6,281 Car                  ,389 Inclination (dummy)  -,125 Fallow Land (dummy)  -,072 ln Input (USD/ha)    ,180 No_Agroforestry      -,210 **AS_5000m2          -,764** ln Land (ha)         -,337 P2: Sacaba          -,042 P3:Tiquipaya       -,130 P7:Tapacari       -,846

I'm wondering if it makes a difference in interpretation whether only the dependent, both the dependent and independent, or only the independent variables are log transformed.  Consider the case of  log(DV) = Intercept + B1*IV + Error    I can interpret the IV as the percent increase but how does this change when I have   log(DV) = Intercept + B1*log(IV) + Error   or when I have   DV = Intercept + B1*log(IV) + Error   ?


I am using Lubuntu 14.04.2  I recently updated the xserver-xorg-video-intel-lts-utopic driver from:  2:2.99.914~1~exp1ubuntu4.3~trusty1  To  2:2.99.914~1~exp1ubuntu4.5~trusty1  Now I have randomly missing letters in the desktop icon text and other text in the GUI. I tried reloading the driver from Synaptic but it comes back periodically. The only solution I have found (albeit temporary) is to logout and log back in.  This was part of an update package that has gone awry.  I don't have the proprietary intel drivers installed, nor do I want to.   How do I revert back to the previous driver (2:2.99.914~1~exp1ubuntu4.5~trusty1) where I didn't have this issue?  The command line solution that mchid gave me below should work but I get an error message as seen below.  The solution provided does not have anything to do with my current issue as far as I can tell.  Thx  Nick

Recently Intel released their opensource driver tool () which auto-selects the right drivers for your intel chipset (in my case, I was using the i915 driver).  Because I started using Steam on Linux to play some older games I thought I would use the Intel 'official' drivers to ensure I get the best performance. Unfortunately, since installing the drivers, the computer fan is very loud and the battery doesn't last that long (it's cut battery life in half). On top of that, there's no noticeable difference when playing games on Steam.   My question is, how do I revert back to the original drivers?   If I run the Intel graphic driver installer I get the following output in the terminal (not in the GUI) so I assume I will somehow need to run apt-get with some type of downgrade flag (I'm not sure how to do that) against these packages.  install: [i915-3.4-3.2-dkms libdrm-nouveau2] upgrade: [libcairo2 libcairo-gobject2 libcairo-script-interpreter2 libdrm2 libdrm-intel1 libkms1 libva1 libva-x11-1 libva-glx1 libva-tpi1 libva-egl1 vainfo libxatracker1 libgbm1 libegl1-mesa libegl1-mesa-drivers libopenvg1-mesa libgles1-mesa libgles2-mesa libglapi-mesa libgl1-mesa-glx libgl1-mesa-dri libgl1-mesa-dri-experimental libosmesa6 libglu1-mesa i965-va-driver libva-intel-vaapi-driver xserver-xorg-video-intel libwayland0]   When I look at the install logs though, it seems there's much more than that.   Any assistance on this would be most appreciated.


I have installed Ubuntu and thought I dual-booted it... But I didn't, so now I wanna go back to Windows (I have a Windows 8 CD) but when I insert the disk into CD/DVD drive and change my boot menu it still boots in to Ubuntu.   I installed Ubuntu over Win7 Home Premium using a LiveCD, it's said that no filesystem was recognized on my laptop, so I thought it was automatically placed on the unallocated partition that I've created. But it didn't, so it just deleted my Windows partition and installed Ubuntu on it.  What is the problem and how can I solve it? Thanks!  EDIT: I don't know much about computers but i just got this hp pavvilion dm1 whit windows 8 isntalled on it and updated it to 8.1  i installed ubuntu the this way: making a new partition, and making the swap and boot or something my self by clicking ''something else"  ps: i don't have a dvd drive

I have absolutely no experience with Linux, and I desperately need to get my computer back up and running again with Windows.  How do I remove Ubuntu and reinstall Windows?    Editor's note: many of the answers are about removing Ubuntu from dual-boot but keeping Windows (which is a bit complicated), while other answers are about removing Ubuntu from single-boot (which is easy: basically just format the disk while installing Windows). The question as written is ambiguous between dual-boot or single-boot.


The motive of the imposter Moody was to transport Harry to the graveyard and he achieves it with nothing more subtle than a portkey. Then why did he have to help Harry win the whole thing just to make him touch the trophy? Couldn't he just have transformed a book into a portkey and ask Harry to pick it up or anything of that sort?

If Mad-eye Moody's only purpose was to get Harry to Lord Voldemort then why did he have to wait until the very end of the Tri-wizard tournament? Being a teacher he had Harry at his mercy anytime so should he take the pain of getting Harry into the tournament, risk helping him with the tasks, and so on? He could have easily done it any time during the entire year with any other object as the port key.  Why was the Triwizard cup chosen?  Is there anything that I'm missing?


I´ve upgraded to 13.04, and installed classic gnome via gnome-session-fallback.  I can't edit the panels. Right-clicking does nothing, with or without alt, win, or ctrl.  How can I add/remove widgets and bars?

I just installed Ubuntu 12.04. I switched to Gnome classic from unity as I'm more comfortable with the former. However, I couldn't find where the panel setting are. Usually a drop down menu appears on right-clicking the top and bottom panels. But it doesn't happen now.  I need the panel settings so as to auto hide the panels (as my netbook screen is quite small!) as well as to add the "system monitor" applet to the panel which is really useful.  Where can I find the panel settings?


I have a class that has the responsibility of importing contracts from a CSV to database.  The class itself has only one public method that starts the import and the other methods are all private (because only the class itself will use, and they hold the logic).  I'm starting to make tests for this class using Spock and there are many private methods, how should I test it?  Should I turn them into public to test? Test only the main method, the public one?  Whats the best?

How do I unit test (using xUnit) a class that has internal private methods, fields or nested classes? Or a function that is made private by having  (static in C/C++) or is in a private () namespace?  It seems bad to change the access modifier for a method or function just to be able to run a test.


I am new to Blender and I am using Blender 2.8. I want the texture paint that I created to apply only to the character's jacket but it's applying to the entire body. How do I fix that?

How do you add more than one material to a mesh?   I have tried adding two materials to the object, and then assigning one of the materials to a vertex-group, but I could not find a place to assign it.  I am making a striped bouncy ball that I want to deform, so adding a different material by separating the mesh into different objects would not be ideal.


\begin{landscape} \begin{table}[htbp] \caption{Units for Magnetic Properties} \label{tablsssss} \centering %\bfseries \begin{tabular}{|p{4pt}|p{40pt}|p{80pt}|p{100pt}|p{200pt}|p{10pt}|} \hline \rotatebox[origin=c]{90}{\raisebox{-5pt}{year}} &  Ref &  Alg & Goal & Appr  &   Test  \\ \hline \rotatebox[origin=c]{90}{\raisebox{-5pt}{2019}}& 33&  39.66&  39.66&  39.5&65 \\ \cline{2-6}  &Moy Pages cibles & 25.66&  62&  100&  33 \\  \cline{2-6}  &Moy Pages cibles & 25.66&  62&  100&  33 \\  \cline{2-6}  &Moy Pages cibles & 25.66&  62&  100&  33 \\ \hline \end{tabular}\hspace*{-2cm} \end{table} \end{landscape}

I want to make the rotated "chapter 1" to be at the center but \rotatebox[origin=r] won't make a difference.      Here is MWE:  \documentclass[11pt]{article} \usepackage[margin=1in]{geometry} \usepackage[pdftex]{graphicx} \usepackage{enumitem} \usepackage{pifont} \usepackage{longtable, tabularx, makecell} \usepackage{array,multirow,amssymb} \usepackage{setspace} \pagestyle{plain} \setlength\parindent{0pt} \makeatletter \newcommand*{\compress}{\@minipagetrue} \makeatother  \newcolumntype{L}{>{\arraybackslash\compress}X} \renewcommand{\tabularxcolumn}[1]{>{\arraybackslash\compress}m{#1}}  \begin{document}  %  \setlist[itemize]{label=\ding{254}, wide=0pt, leftmargin=*, itemsep=0pt, before=\vspace*{\topsep}, after =\vspace*{-\topsep}} \setlength{\extrarowheight}{3pt} \small \begin{longtable}{|p{0.1\textwidth}|p{0.84\textwidth}|}\hline  \multicolumn{1}{|c|}{Chapter } & \multicolumn{1}{l|}{\textbf{Content}} \\ \hline \rotatebox[origin=r]{90}{\makecell{Chapter 1\\Center \\ and Core Center}}  & \begin{itemize}     \item Part 1      \vspace{-12pt}      \begin{itemize}[label=\ding{229}]     \item First      \item Second     \item Third     \item Fourth     \end{itemize}     \item Part 2      \vspace{-12pt}      \begin{itemize}[label=\ding{229}]     \item I     \item II     \item III     \end{itemize} \end{itemize} \\ \hline  \end{longtable}  \end{document}


My question is: It is easy to balance a bicycle when it is moving at a fairly high velocity, say 7 m/s or 25 km/hr. But when a bicycle slows down, it is hard to keep it upright, and the person riding it may thus fall down! Why?

Why does a bike/bicycle fall when its speed is very low or close to zero and is balanced when going with a high speed?


A ring of a planet has an inner radius of approximately 51,400 km (measured from the center of the planet) and a radial width of 17 km. Use differentials to estimate the area of the ring. (Round your answer to the nearest thousand.)

A ring of a planet has an inner radius of approximately 52,000 km (measured from the center of the planet) and a radial width of 19 km. Use differentials to estimate the area of the ring. (Round your answer to the nearest thousand.)   I hate asking questions where I have nothing to contribute but I have absolutely no Idea on how to approach this question. A step by step solution to this problem which I could apply to similar problems would be greatly appreciated, thanks in advance.


Suppose the following     The horse is big, white and heavy.   Does the meaning of the noun change when the order of the atributes of an object change (in this case a horse)? Are there any exceptions? And if posible and more generally, does this hold for every language?

I remember being taught that the correct order of adjectives in English was something along the lines of "Opinion-Size-Age-Color-Material-Purpose."  However, it's been a long time and I'm pretty sure I've forgotten a few categories (I think there were eight or nine). Can anyone fill them in?


Let $p$ and $q$ be the positive integers such that $1 - \frac{1}{2} + \frac{1}{3} - ... - \frac{1}{54} + \frac{1}{55} = \frac{p}{q}$ . Prove that $83$ divides $p$ .  What I Tried :- To me it does not actually seem like an easy problem for me. (I guess I couldn't figure out the idea) This expression I found is same as $$\displaystyle\sum_{n=1}^{55} \frac{(-1)^{n+1}}{n}$$ And calculating this in Wolfram Alpha gives the answer to be this in the simplest form :- $$\displaystyle\sum_{n=1}^{55} \frac{(-1)^{n+1}}{n}=\frac{115328583812490186710549}{164249358725037825439200}$$ Surprisingly, I found that $83$ really divides the numerator of the fraction. Now I got puzzled, how will you show this without using Wolfram Alpha or a Calculator? Can Anyone Help?


I am trying to create an object of a class with dynamic naming    Object1 Object2 Object3   So, I am trying to create a dynamic name for an object of the class Adder.  Adder addar[];   and I am trying to store that object in the ArrayList.  ArrayList<Adder> list= new ArrayList<Adder>();   Inside a printer method I have used below code.  addar[count] = new Adder(); addar[count].addName(theName); addar[count].addAge(theAge); list.add(addar[count]);   When I try to run the program i get this exception  Exception in thread "main" java.lang.NullPointerException<br/>   at Moving.printer(Moving.java:65)   at OrPGan.main(OrPGan.java:7)   at line   addar[count] = new Adder();   What is causing this? How can I deal with this?  Your response would be greatly appreciated.

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


I am again at the point where I believe my uni wants to freak me out. My uni just threw this eclipse project at me and I am supposed to run it as a java application. My uni says this is trivial but for me it is not!  So here it goes: They gave me a zip archive and I imported it by Import Existing Projects into Workspace and then selecting the zip archive. It all went well, however, I am not able to run it as a Java application. Also, I noted that the folder JRE System Library was missing.   Can someone explain me what this all means and how I can solve this problem? My uni did feel like explaining a lot...

I checked out a project from SVN and did not specify the project type, so it checked out as a "default" project.  What is the easiest way to quickly convert this into a "Java" project?  I'm using Eclipse version 3.3.2.


When I operate on two, I think equivalent multidimensional lists, I have different outcomes. The only difference between the lists is how they are created. I'm using Python 3.4.3  >>> b = [[1,2],[1,2]] >>> b[0][0] += 1 >>> b [[2, 2], [1, 2]] >>> b = [[1,2]] * 2 >>> b [[1, 2], [1, 2]] >>> b[0][0] += 1 >>> b [[2, 2], [2, 2]]   As you can see, both b's and the operations on them are the same, but the outcome is not. I'm guessing that it has something to do with the way they are created since that is the only difference, but I don't see how.  Its the same with Python 2.7.6  >>> b = [[1,2],[1,2]] >>> b [[1, 2], [1, 2]] >>> c = [[1,2]] * 2 >>> c [[1, 2], [1, 2]] >>> c == b True >>> b[0][0] += 1 >>> b [[2, 2], [1, 2]] >>> c[0][0] += 1 >>> c [[2, 2], [2, 2]] >>> c == b False >>>

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


can I install ubuntu on my PC currently running on windows 7 ultimate with 4gb ddr2 RAM intel pentium dual core e5300 2.6ghz no graphics card motherboard intel DG31PR ? strong text

For a given hardware configuration, how do I find out if Ubuntu will run on it? What considerations should I take into account when choosing an Ubuntu version and  such as:    with a lighter desktop than the usual Gnome and Unity  with the even lighter LXDE desktop   Obviously Ubuntu does not run on some processor architectures. So how do I go about choosing the right version and derivate. How can I find out the minmal system requirements?


I would like to know if there is a formula that could tell me the future balance of a loan. For example, if I have a loan of 10,000 at 6% for 5 years and I do the amortization it brings that the payment should be 193.33. After 3 monthly payments the balance would be 9,568. My question is, if there a formula where I can plug in the 10,000 and it would tell me how much the principal would change after 3 payments, which result should be 9568.

Specifically, I notice that on a mortgage statement, my payment is "amortized" so that at the beginning of the loan, I am paying almost entirely interest and very little principal.  However, on a credit card balance, it seems interest is only charged on the balance.  Why do amortization schedules work the way they do, and are they typically used for most loans, and why?


Give me please a hint, how to find   $$\underset{x\rightarrow\infty}{\lim}x-x^{2}\ln\left(1+\frac{1}{x}\right)$$  I tried to use substitution $h = \frac{1}{x}$ and, then, apply L'Hopital's rule, but it went worse.

How do I determine this limit ?:  $$ \lim_{x \to \infty}\left[x - x^{2}\log\left(1 + {1 \over x}\right)\right] $$  I have tried to decompose the $\log$ function but I don't know how to proceed from there.


I was thinking about the matrix ring $M_n(\mathbb{F})$ (set of all $n\times n$ matrices over the field $\mathbb{F}$) and I determined the fact that every matrix in this ring is either a unit or a zero divisor. However, I think in general this would not imply that the only ideals of $M_n(\mathbb{F})$ are $M_n(\mathbb{F})$  and $\{0\}$. Does knowing that the fact that I proved help determine what the ideals of $M_n(\mathbb{F})$ are?  I of course know other facts which are that the only ideals of the field $\mathbb{F}$ are $0$ and $\mathbb{F}$ and that if $I$ is an ideal in $\mathbb{F}$ then $M_n(I)$ is an ideal of $M_n(\mathbb{F})$.  Any help is appreciated, thank you.

Denote by $M_{n \times n}(k)$ the ring of $n$ by $n$ matrices with coefficients in the field $k$.  Then why does this ring not contain any two-sided ideal?    Thanks for any clarification, and this is an exercise from the notes of Commutative Algebra by Pete L Clark, of which I thought as simple but I cannot figure it out now.


I'm just starting learning quantum mechanics by myself (2 "lectures" so far) and I was wondering    why we need to define quantum states in a complex vector space rater than a real one?  Also I was wondering why this vector space has to be a Hilbert space (rather than a pre-Hilbert space)? when do we need the property that the vector space is complete (i.e. every Cauchy sequence converge)?

What does the word "complete" means from the physical point of view? I do not understand what it physically means to say that a  is a .


Let $f,g:[a,b] \rightarrow \mathbb{R}$ be continuous in $[a,b]$ and differentiable in $(a,b)$. Prove that there is a point $c \in (a,b)$ such that:   $$[f(b)-f(a)]g'(c) = [g(b)-g(a)]f'(c).$$   I think this is a straightforward application of the mean value theorem to a clever function. Am I right? If so, which function? Thanks :)

I know and understand the mean value theorem. But at the moment I don't have the intuition to understand the generalized mean value theorem     If $f$ and $g$ are continuous on the closed interval $[a,b]$ and differentiable on the open interval $(a,b)$, then there exists a point $c\in(a,b)$ where$$[f(b)-f(a)]g'(c)=[g(b)-g(a)]f'(c).$$If $g'$ is never zero on $(a,b)$, then the conclusion can be stated as$$\frac{f'(c)}{g'(c)}=\frac{f(b)-f(a)}{g(b)-g(a)}.$$   What is the intuition? And how can you prove this (generally) ?


I was trying to view what rep I earned in my early days starting with Meta.SE. There was this section (in red box) where Google Chrome said I could click to open but I couldn't. I had to click the arrow sign (in red circle) to be able to open the tab:  It is weird that I can't click in a place where I could supposedly can click. Why can't I open the tab when pressing the red box area and have to click the small arrow to open? It can be annoying to have to put your mouse just right over that small arrow while Google Chrome says that you can click somewhere else.

This is a bug report originating from   In the reputation tab, When a user hovers over a row of his rep:    the cursor changes to a pointer. The problem around the pointer is that The table-row  has the class expandable-row which actually sets the cursor to pointer. But only the post body is actually expandable. Therefore, clicking on the row does not work. You need to click on the post body (or the arrow to the left of it).  Either the row should be made expandable by clicking anywhere on it, or the cursor should not change to pointer on hovering over the row, instead it should do so only on hovering over the rep-body cell.


Prove that for all $x$, $x \ne P(x)$, where $P(x)$ is the power set of $x$   My idea to solve this:  Let's suppose that there exists a set which is in the same time its own power set. Then, by the axiom of extentionality: $x \in P(x) \iff x \in x $.  We know from definition of the power set that $x \in P(x) $, which entails that $x \in x$, which is a contradiction (Russel).  Is it a correct way to solve this problem? If so, is it possible to solve this without using the axiom of regularity?

Using naive set theory and not using the cardinal number of a power set, how can you prove a set cannot contain its own power set? Is this connected to Russell's Paradox?


anyone can help me to understand this limit: Number of synchronous concurrent requests for long-running requests that last longer than 5 seconds for each organization  For Example, If the Apex Class - is invoked from the lighting component. below is the sequence of code execution in the Apex Class.  Public class MyClass{     @AuraEnabled     public static void myMethod(id recId){         SOQL Query          Sycnhronous Callout to External System (Taking more than 4.5 Sec)         DML (Taking 30 secs to perform DML).     } }   Scenario:  SOQL Query took 30 sec to return records  Callout to 4.8 Secs to respond. DML operation 20 sec.  Questions: Will the total transaction time for the callout is the sum of SOQL time + Callout Time + DML time (or) Callout time shouldn't be considered in the transaction time?  please do share some best practices must be considered to avoid the long-running transaction limits?

The title is one of the limits of salesforce.   Link :   but I'm not understanding in a full way the meaning of this limit and I'm not finding enougth use-cases explanation on the web...  anyone can give me some examples to understand this limit:    For example what mean exactly "concurrent requests",  mean any server operation type ? In the 5 seconds what is considered ? Apex code after the request, Trigger operations? Query time execution, Callout transaction time? How Salesforce understand that one transaction is going to take more than 5 seconds? What time of best practises must be considered to avoid this limit?   Thnks,  Klodjan


I'm trying to understand a bit about nuisance-tripping, and I'm wondering if anyone here has some insight.  I know (or think I know) that a Class A GFCI breaker should trip when there is a 6mA ground current (fault). I've also read that an AFCI breaker will generally trip when there is a 30mA ground current.  So my question is: are nuisance trips more likely on a GFCI due to that lower threshold (6mA), compared to AFCI (30mA)?   I apologize if my terminology isn't correct. I think I know what I'm asking, but... maybe not.   People seem to indicate that you should never use GFCI protection on your refrigerator due to the possibility of nuisance trips. But AFCI protection is required. I'm assuming the AFCI is less likely to nuisance-trip, and maybe this 6mA-to-30mA comparison explains why? The 30mA is low enough to mitigate fire risk, but high enough that most nuisance trips are avoided? (Whereas with a GFCI, the 6mA threshold is low enough to mitigate most risk of shock injury, but makes it more susceptible to nuisance trips?)

In household circuit breaker panels, you'll find two different types of breakers: Arc Fault and Ground Fault Circuit Interrupters.  Ground Fault (GFCI) breakers are typically used in places where water might come in contact with an outlet/wire, such as bathrooms and garages. They have circuitry to sense when the current out is different from the current in, which usually means the circuit is shorted to ground. This is to prevent electrical shock to humans.  Arc Fault (AFCI) breakers sensors to check for arcing, in order to prevent electrical fires.  (And then there's just regular circuit breakers, which trip if the current drawn through them is over their limit, such as 20 amps.)  Why are these two not combined into a single breaker which trips if it detects either condition? Or, alternately, why not have one of each breaker in series for each circuit, for the same result?  EDIT - Looks like AFCI and GFCI are sometimes combined by using an AFCI breaker combined with a GFCI outlet (the kind with the Test and Reset buttons, often seen in bathrooms). But that still leaves most outlets with only current-limiting protection, why?


I have a rather slow Samsung netbook and I would like to know someone's opinion as to whether it is good enough for Kubuntu, or I should use Xubuntu or Lubuntu instead.  Here are the numbers: processor: AMD quad-core up to 1.4 GHz Ram: 3.3 Gb  So what do you think: should I use Kubuntu or the lighter versions?

I'm thinking about installing Ubuntu Desktop, but I don't know what flavor is the best for my system. What are the minimum and recommended hardware requirements? What kind of CPU? How much memory? Should I have Hardware Acceleration? What flavor should I use?  This is an attempt of a canonical answer. My answers have the "official  requirements", the recommended are a mix of official sources and opinion based (along with the answer it's told the source). You can comment or edit if you feel that the information is obsolete or incomplete. It is a good rule of thumb that any system capable of running Windows Vista, 7, 8, x86 (Intel) OS X will almost always be a lot faster with any Ubuntu flavor even if they are lower-spec than described below.


A variant of the $100$ prisoners problem.  $100$ prisoners are given each either a white hat or a black hat. They can see each other's hat but not their own and they cannot communicate.   Each prisoner must write(not yell like in the classic one) on a piece of paper his guess for the color of his hat, which can be "black", "white" or "pass" ($3$ options instead of $2$ in the classic one).  If not all prisoners choose "pass" and all those who didn't pass guess correctly, then all prisoners are sent free.  Invent a strategy for the prisoners that will maximize their chance of getting free, assuming the hats are chosen randomly.  My current thoughts: It is possible to find a strategy in which the chances increase with the number of prisoners. For $3$ prisoners a strategy might be to choose "pass" if the colors of the two hats are different, otherwise to choose the opposite of the same color. This gives a $75$% chance of getting free.

This is a riddle I heard recently, and my question is if someone happens to know the solution. I'm asking this out of curiosity more than anything else.  So here it is. The riddle is one of the countless variations of the "prisoners have to guess their hat colour" puzzle. $n$ prisoners are put a hat on top of their head, which can be red or blue. The colours are chosen at random by $n$ independent fair coin tosses. Then each prisoner can guess their own hat colour (red or blue) or pass. The prisoners can see each other, but not hear each other's calls and of course they have no other means of communication. This means that each call can only depend on the other prisoners' hat colours. However, before the distributing of hats begins, the prisoners are told the rules and can agree on a strategy. The prisoners win iff no prisoner guesses wrong and at least one prisoner guesses right. Which strategy should the prisoners use so that the winning probability becomes maximal?  Some remarks:   A simple strategy is that one player just guesses and all other players pass, so that the maximal probabilty is at least 1/2. For $n=2$ this strategy is optimal. For $n=3$, there is a strategy that wins in 6 out of 8 cases: When a player sees (red,red) he guesses blue, for (blue,blue) he guesses red, and otherwise he passes. More generally this shows that the maximal probability is at least 3/4 for $n\ge 3$. It's possible to show that any strategy fails for at least 2 hat colour configurations (unless $n=1$), which shows that the above strategy is optimal for $n=3$. For $n=4$ there are more than $10^{15}$ strategies, and for $n=5$ it's about $10^{38}$ strategies, making it quite infeasible to just use a brute-force computer program (maybe for $n=4$ it's possible when exploiting the obvious symmetries). When changing the rules slightly by forbidding players to pass, then the maximal winning probability is always 1/2. This is a nice little exercise.   Actually I heard the riddle only for $n=3$ and then thought about the general $n$. So it's entirely possible that there is no nice solution.


I'm kinda stuck with this task. Let $G$ be a group and $ S $ the set of all isomorphisms $ f: G \to G$. I first want to show that $ (S, \circ) $ is also a group. I believe I've shown that all the properties of a group is fulfilled with $ (S, \circ) $: i) Assume that $ x \in $ and $ f_1,f_2 \in S$. Then $f_2(x) = y \in G$, since $ f_1 $ is an ismorphism. $ f_2(y) = z \in G $ since $ f_2 $ is an ismorphism. Then $ f_1(f_2(x)) = f_1(y) = z = f_1 \circ f_2(x),$ hence $f_1, f_2 \in S \longrightarrow f_1 \circ f_2 \in S.$ ii) $id$ is an isomorphism $ \longrightarrow id \in S$. iii) $ f $ is an isomorphism $ \longrightarrow \exists f^{-1}$, one can show that $ f^{-1} $ is also an isomorphism, $ \longrightarrow f^{-1} \in S$. Now, assume that $ | S | = 1$, then I want to show that $ G $ is abelian and each element has an order of 1 or 2. Im kinda lost with that $ | S | = 1 $. If $ f \in S $ then $f^{-1} \in S $ due to previous result, should not $ | S | = 1 $ imply that $ f = f^{-1} = id$? And how do I move forward from this? Any hints is muy appreciated!

Let $G$ be a group and let $\mathrm{Aut}(G)$ be the set of all automorphisms of $G$. Prove that $\mathrm{Aut}(G)$ is a group under the operation of composition for functions.    I am not too sure if I am proving $\mathrm{Aut}(G)$ itself is a group. Would this mean then that I would have to make sure it fulfills all the group requirements? If so I am not too sure how to go about it. And to prove closure, I would think I need to pick say $f,g \in \mathrm{Aut}(G)$ then use the fact that these are automorphisms. From here, I am not too sure how to proceed.


Updated; see examples at the bottom of this question  I've seen many examples of questions that were closed with the reason "Unclear what you're asking" that had received multiple answers.  This feels like a "he said/she said" situation: the close voters say the question is too unclear to answer, while the answer-ers say (by answering) that it was clear enough to answer.  At the moment the close voters win by fiat. It seems that there are better ways to handle this situation.  I have two suggestions, the first and most radical is suggested in the title of this question (burninate the "Unclear what you're asking" close reason), while the second is more moderate (restrict the use of the "Unclear what you're asking" close reason to questions that have remained unanswered for a while).  What do you guys think?    Here's a little more of my reasoning:   Not getting answers is the best signal of an unclear question.  If a question receives no answers, this is the ultimate way for the entire community rather than just a few close voters to indicate that a question is unclear.  Other users can then helpfully add comments suggesting edits or even make edits themselves to help.  But ultimately this approach--letting the community show that they find a question unclear by not answering it--is the most democratic approach and best fits within the StackExchange culture. Answers implies the question is clear enough.  If a question does receive answers, this implies that someone finds the question clear enough to answer, and is the opposite of the community implicitly saying it is unclear by not answering it.  Allowing it to be closed because a small number of users think it is unclear doesn't really make sense and feels undemocratic (see the bullet point above).  As with the first bullet, any user can always comment with suggestions if they personally feel the question is unclear, or make edits themselves. Maybe the close reason in question can become a house-keeping function? if burninating this close option seems a step too far (I can see why we might want to keep it), can we at least restrict its use to questions that go a long time (say at least couple weeks) without being answered?  That way it serves as a house-cleaning function rather than as a judicial process.   Edit: Per comments, here are some examples, found thanks to the excellent SEDE script provided by rene:   Sometimes the question is hard to understand but valid (not everyone has the same level of expertise, and I know this site is trying to become more friendly):      Sometimes the question is inscrutable at least to me, but someone figured out what OP meant, and then it made sense as a package; questions like this should ideally be back-edited after this happens rather than being closed (and I humbly submit that this approach rather than closing would make SE more friendly to a wider audience):     Sometimes the question was simply posted in the wrong stack; this one should have been in Code Review (to be fair, it also needed some editing):      Some questions aren't unclear, they're just asking the reader to do too much work:       Some could use a good edit cycle; this one is clearly asking about code structuring best practices:      Some are 100% crystal clear; no idea why they were closed (and they received many upvotes):       And some questions perhaps ask too many questions in one but are very popular indicating a conflict between upvoting and closing due to lack of clarity:

By now I use the filter to be more effective in reviewing close votes. So I get questions now that are months old without any activity on them. I am not sure if we really need to review questions like them. May be put them in a different queue call "Do when you are bored to death".  Even though I don't necessary see the point in answering them. There is an even worse subgroup. Questions that have an accepted answer.  Do we really need to close questions as "unclear what you are asking" if someone obviously figured it out already?


I set my calculator to radian mode. I enter any random number $x$. Then I repeatedly apply cosine to that number, getting the sequence $$\cos x, \cos(\cos x), \cos(\cos(\cos x)) \ldots$$ and so on. No matter what $x$ I start with, it always converges around $x^* = 0.7390851$. Obviously, $x^*$ is the solution of $\cos x=x$. But why does repeated application of $\cos$ converge around this number?

I have a sequence defined as follow:  $a_0 = 1, a_n=\cos\left(a_{n-1}\right)$.  I want to count $\lim_{n\rightarrow\infty} a_n$ - it definitely does have limit by looking at the graph, the first few numbers of the limit are 0.7390851, but I have no idea, if that number is related to some other real number ($\pi$ or something like that).  The sequence is from , but they don't provide actual result for their own sequence.


num1 and num2 both are 3.5 and num1 == num2 gives True, but for is operator it is False.  Look at the below code,  Input:  num1 = 3.5 num2 = float(input('num2:'))  # num2 stands for 2nd number print(num1 == num2) print(num1 is num2)   Output:  num2:3.5 True False      num1 and num2 both are 3.5 and num1 == num2 gives True, but   for is operator it is False.   Why is id(num1) != id(num2) ?

My  has failed me.  In Python, are the following two tests for equality equivalent?  n = 5 # Test one. if n == 5:     print 'Yay!'  # Test two. if n is 5:     print 'Yay!'   Does this hold true for objects where you would be comparing instances (a list say)?  Okay, so this kind of answers my question:  L = [] L.append(1) if L == [1]:     print 'Yay!' # Holds true, but...  if L is [1]:     print 'Yay!' # Doesn't.   So == tests value where is tests to see if they are the same object?


Is there a way to stop my Windows Explorer from launching the browser when typing an unknown name into the address bar?   It seems that the default behaviour is to prepend "http://" to any name not a valid path or an (indexed) file or folder name.

How can i prevent Windows explorer from opening my internet browser when I mistype something in the address bar?  For example, I often type Alt+d, cmd to quickly select the address bar and open cmd.exe in the current directory.  However, I often mistype, and hit cdm instead of cmd.  This will open my default browser and search for cdm, and I deeply hate this.  Sure, it only takes a couple seconds to go back, but that doesn't keep me from hating it.  I'm not interested in making links of my commonly mis-typed programs (which I have actually done already), e.g. create a link of cdm.exe that points to cmd.exe.  I just want to turn this feature off, if possible.


Ok so I've searched for this but I can't seem to find Anything related to this.   What I do know is that if the number is bigger than 255 the computer uses a new memory block of 8 bits(1 byte) to store the big number..    So let's say I want the computer to add 255 + 7. That would give me 262 in base 10 but in binary it would have to be:     00 00 <--before   01 06 <--after   (this is in hexadecimal form btw)   How would the computer decode these 2 bytes back to base 10 form/decimal form if the computer can't add 6 and 256 because 255 is the highest number it can add to. How would the computer make this 2 byte answer/result appear as 262 on the screen?

32-bit computers can only store signed integers up to 231 - 1. This is why we have run out of IPv4 addresses and have entered the 64-bit era.    However, the number 231 - 1 (2,147,483,647) is not as large as the number 1 trillion (1,000,000,000,000) which I seem to be able to display fine without my machine crashing.  Can someone explain why this is?


I'm working with Linked Lists and this is how my code is looking atm. And now I'm trying to do a JUnit test to see if it works as intended.   private Node header; int size;  public ItemList() {     header = new Node(null);     size = 0; }   public void add(Item newItem) {      Node previous = null;      for(Node current = header; current != null; current = current.next) {         previous = current;     }      Node newNode = new Node(newItem);     if(previous == null) {         header = newNode;     } else {         previous.next = newNode;     }      size++; }   This is how the test is looking. I'm adding 10 Nodes to the list and then checking wether or not the size is the way it should be. But when running, I get a nullpointerexception and I can't figure out how to fix it. Is there something wrong with the add method?   class ItemListTest {      ItemList list_1;      @Before     public void setUp() {          list_1 = new ItemList();      }      @Test     public void addTest() {          list_1.add(new Item("It1", "1"));         list_1.add(new Item("It2", "2"));         list_1.add(new Item("It3", "3"));         list_1.add(new Item("It4", "4"));         list_1.add(new Item("It5", "5"));         list_1.add(new Item("It6", "6"));         list_1.add(new Item("It7", "7"));         list_1.add(new Item("It8", "8"));         list_1.add(new Item("It9", "9"));         list_1.add(new Item("It10", "10"));          assertEquals("Add 10 items test with size()", 10, list_1.size());     } }   I think this is all information that is necessary to fix the issue.  Thanks in advance!

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


$ \sum_{n=1}^{\infty} \frac{n^2}{ n!} $ equals  I'm not able to convert in any standard series? Any hints?

I have to calculate sum of series $\sum \frac{n^2}{n!}$. I know that $\sum \frac{1}{n!}=e$ but I dont know how can I use that fact here..


Is it possible to carry the modulus sign $| . |$ in two lines. I just put a mwe for a hypothetical example. Thank you for any suggestions.  \documentclass{article} \usepackage{amsmath} \usepackage[utf8]{inputenc} \begin{document} \begin{equation*} \begin{split} \left| \sum_{n=1}^{\infty} (-1)^n (2x+1)^{n} \sin \left( \frac{\pi}{2} x^n \right) \right|&=\left| -(2x+1) \sin \left( \frac{\pi}{2} x \right) + (2x+1)^2 \sin \left( \frac{\pi}{2} x^2 \right) - (2x+1)^3 \sin \left( \frac{\pi}{2} x^3 \right) + (2x+1)^4 \sin \left( \frac{\pi}{2} x^4 \right) \\ &\dots +(-1)^{n-1} (2x+1)^{n-1} \sin \left( \frac{\pi}{2} x^{n-1} \right) +(-1)^n (2x+1)^n \sin \left( \frac{\pi}{2} x^n \right)  \right|   \end{split} \end{equation*} \end{document}

I have a very long equation that must be separated into two lines, and it has several pairs of nesting \left \right delimiters. Unfortunately, it seems that they need to be on the same line in order for them to work.  Also I'm using the align environment because I need the aligning functionality. Is there a way to have the size of delimiters automatically adjusted over multiple lines?


Looking for a short story where a group of humans are stuck in a game like simulation, they break out of the simulation only to find that they were in hibernation and playing the game to pass time. However the plot twist is that they're actually astronauts who were kidnapped by aliens, and the reason why their simulation is so game like is because the aliens made it based on the video games the astronauts played. Thanks in advance

This was a short story in an anthology, it involved a group of people trapped in a perpetual videogame/virtual reality. There were levels, and you had to beat each one. The first was like a water-world, and the fifth was the simulation of a posh spaceship party.   The shocker near the end is where the characters realize they were astronauts on the moon who had their souls/consciousnesses stolen by passing aliens to use as jewels. The game was just to keep them all entertained.  I read it many years ago and every time I go back to the library I look for it but I can't seem to find it.


I have a controller which takes care of a user's first time journey at my website (ignore names of below dependencies, they are random)  @RestController class Controller(         private val fooComponent: FooComponent,         private val dataComponent: DataComponent,         private val userComponent: UserComponent,         private val restComponent: RestComponent,         private val calcComponent: CalcComponent,         private val studentComponent: StudentComponent,         private val tampComponent: TampComponent,         private val checkComponent: CheckComponent,         private val trialComponent: TrialComponent,         private val reviewComponent: ReviewComponent,         private val helpComponent: HelpComponent,         private val achievementComponent: AchievementComponent,         private val glassComponent: GlassComponent )    As you can see, it has a lot of dependencies .  It's usually accepted that a lot of dependencies mean the code is violating the Single-responsibility principle. Here, this controller takes care  of one user journey( like registration to my website).   what are the other downsides for this design? Also, Would appreciate suggestions for alternatives.

Let's say you have a class called Customer, which contains the following fields:   UserName Email First Name Last Name   Let's also say that according to your business logic, all Customer objects must have these four properties defined.  Now, we can do this pretty easily by forcing the constructor to specify each of these properties.  But it's pretty easy to see how this can spiral out of control when you are forced to add more required fields to the Customer object.    I've seen classes that take in 20+ arguments into their constructor and it's just a pain to use them.  But, alternatively, if you don't require these fields you run into the risk of having undefined information, or worse, object referencing errors if you rely on the calling code to specify these properties.  Are there any alternatives to this or do you you just have to decide whether X amount of constructor arguments is too many for you to live with?


I have a cron job that I want to run just once a day (executes a rake task), but while I'm testing it I have it set to run every 5 minutes. It was running perfectly fine this morning and sending me e-mails with the output but it has inexplicably stopped sending me mail.   When I checkout /var/log/syslog I can see that the cron job is still running, but the line that normally shows an email being sent has stopped appearing.  When I run service postfix status I get postfix is running.   I haven't changed the cron job itself. I still have this:  MAILTO="myemail@gmail.com" */5 * * * * cd /u/apps/myapp/current && /usr/local/bin/rake my_task RAILS_ENV=staging   No idea what's going on here. Any ideas?

This is a  about using cron & crontab.   You have been directed here because the community is fairly sure that the answer to your question can be found below. If your question is not answered below then the answers will help you gather information that will help the community help you. This information should be edited into your original question.  The answer for 'Why is my crontab not working, and how can I troubleshoot it?' can be seen below.  This addresses the cron system with the crontab highlighted.


I have this string:  '2012-02-10' # (year-month-day)   and I need it to be as date type for me to use the date function isoweekday().  Does anyone know how I can convert this string into a date?

I've got a huge list of date-times like this as strings:  Jun 1 2005  1:33PM Aug 28 1999 12:00AM   I'm going to be shoving these back into proper datetime fields in a database so I need to magic them into real datetime objects.   This is going through Django's ORM so I can't use SQL to do the conversion on insert.


In  I've seen the line containing  onkeyup="JavaScript: TextChange()" onmouseup="JavaScript: TextChange(this)"`   What is it used for? I am seeing this for the first time in my life. I mean label JavaScript:.

AFAIK, you never need to specify the protocol in an onclick:  onclick="javascript:myFunction()" Bad  onclick="myFunction()" Good  Today I noticed in  on Google Anallytics that they are using it:  <a href="http://www.example.com" onClick="javascript: pageTracker._trackPageview('/outgoing/example.com');">   Is this example just plain wrong, or is there ever a reason to specify javascript: in anything other than a href?


Can I use this LCD display:   With this adapter:    *Display Specs: Power Supply(5~12V 2A)  *Adapter Specs: Output: 12V - 1A  Is that safe to use this adapter with this display?

Power supplies are available in a wide range of voltage and current ratings.  If I have a device that has specific voltage and current ratings, how do those relate to the power ratings I need to specify?  What if I don't know the device's specs, but am replacing a previous power supply with particular ratings?  Is it OK to go lower voltage, or should it always be higher?  What about current?  I don't want a 10 A supply to damage my 1 A device.


Years ago, my parents received notice that my savings account was being closed. I was too young to do anything myself, and I guess my parents too lazy. There was only about $130 dollars in the account. Is it possible in the state of Nebraska to reclaim this account? Will their be anything even left in it?  (I've tried asking elsewhere and can't get anything, I don't know this site well or if this is the type of question accepted here. Sorry)

Can anyone answer how to recover cash from (old) closed bank accounts from banks in usa?


I am trying to iterate through a string and save the characters in a character array. It iterates perfectly and prints the characters but when I try to save the characters in the Array or in a List, it gives me NullPointerException. Can anyone point out the mistake I am doing here?     try {                      List<String> result = Files.readAllLines(Paths.get("C:\\Users\\Rehan\\Documents\\NetBeansProjects\\Marks\\build\\classes\\marks\\input.txt"));                     List<Character> marksC = null;                                          for(String line : result ){                       System.out.println(line);                       //Reversing each line of string                                               StringBuilder sb =  new StringBuilder(line);                       sb.reverse();                       String RS = sb.toString();                       System.out.println(RS);                       //To read first sequence of integers in reversed string                                                   StringCharacterIterator si = new StringCharacterIterator(RS, 0);                         for(int i = 0; i <= RS.length() ; i++){                             while (si.current()!=' '){                                 char c = si.current();                                 marksC.add(c); //This line giving NullPointerException                                 System.out.println(c);                                 si.next();                             }                             break;                         }                     }                     JOptionPane.showMessageDialog(null, result);      }

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


There are technically answers to this question both here, , a tweet by Jeremy Crawford, and this question , but they still seem rather vague/non-descriptive enough.  Devil's Sight (PHB Pg. 110) You can see normally in darkness, both magical and nonmagical, to a distance of 120 feet.  But does "see normally" imply you see as though everything is naturally lit up by the sun; lit by a dim torch; still dark, but you can pick out clear images, shapes, and details; or something else entirely?

The Warlock Invocation  Devil's Sight (PHB p108) is described like this:     You can see normally in darkness, both magical and nonmagical, to a distance of 120 feet.   How should this be interpreted, given the undefined use of the word "normally" and the description of a real devil's Devil's Sight ability?  Barbed Devil (MM p.70):     Magical darkness doesn't impede the devil's darkvision


So I have quite a straightforward implementation written in C++ that uses templates to to some operations to a std::vector. The problem is that whenever I try to call the method that does something on a vector, compilation gives me this error:  basavyr@Roberts-MacBook-Pro src % g++ -std=c++17 -I../include/ energyExpressions.cc pr135.cc data.cc main.cc - O3 Undefined symbols for architecture x86_64:   "void EnergyFormula::kevTOmev<double>(std::__1::vector<double, std::__1::allocator<double> >&)", referenced  from:       _main in main-9a2141.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1   Is this really related to my CPU architecture? And why/how can one avoid such situation? Is there another efficient/smart way of solving this?  Here is the code I have written:  in the include file:  #ifndef ENERGYEXPRESSIONS_HH #define ENERGYEXPRESSIONS_HH  #include <vector>  class EnergyFormula { public:     //N=0 wobbling band     double yrastBand(double params);      //N=1 wobbling band     double wobblingBand(double params);      template <typename T>     void kevTOmev(std::vector<T> &); };  #endif // ENERGYEXPRESSIONS_HH   in the expression.cc file:  #include "../include/energyExpressions.hh"  template <typename T> void EnergyFormula::kevTOmev(std::vector<T> &vec) //using reference because I don't want to copy the vector, I just want to modify it directly {     auto mev = 1000;     for (int i = 0; i < vec.size(); ++i)     {         vec.at(i) = static_cast<T>(vec.at(i) / mev);     } }    now in my main.cpp:  #include <iostream> #include <vector> #include <string> #include <ctime>  #include "../include/pr135.hh" //some other stuff #include "../include/data.hh" //some other stuff #include "../include/energyExpressions.hh"  int main() {  EnergyFormula *formulas = new EnergyFormula;  formulas->kevTOmev<double>(test3);     for (auto &&n : test3)     {         std::cout << n << " ";     }      delete nucleu;     v1.clear(); }   macOS Catalina latest update with latest CLANG by the way.

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


Given integers $x_1, x_2, \dotsc, x_n$, prove that the expression   $$   \prod \limits_{1\leq i<j\leq n}\frac{x_i - x_j}{i-j} $$   is always an integer.    I think induction should work, but I couldn't get anywhere with it.

let $a_{i},i=1,2,\cdots,n$ be postive integer ,show that $$1^{n-1}2^{n-2}\cdots (n-2)^2(n-1)|\prod_{1\le i<j\le n}(a_{i}-a_{j})$$  I know this $\prod_{1\le i<j\le n}(a_{i}-a_{j})$ is  Vandermonde  determinants,and I found $$1^{n-1}2^{n-2}\cdots (n-2)^2\cdot (n-1)=1!2!3!\cdots (n-1)!=\prod_{1\le i<j\le n}(j-i)$$ we only prove $$\prod_{1\le i<j\le n}\dfrac{a_{j}-a_{i}}{j-i}$$ is integer  maybe consider Vandermonde determinants ? But I can't prove this


I got a message "21 updates are security updates." when I login to my ubuntu server but I can't find the updates. How can I find it and update the security updates. I want to update only the security updates.  $ ssh MY_SERVER Welcome to Ubuntu 16.04.3 LTS (GNU/Linux 4.4.0-141-generic x86_64)  204 packages can be updated. 21 updates are security updates.  New release '18.04.1 LTS' available. Run 'do-release-upgrade' to upgrade to it.  $ sudo apt-get upgrade -s | grep -i security // result is empty

I keep getting this message when I logged into my server in AWS EC2 via ssh  I think this is called MOTD  43 packages can be updated. 22 updates are security updates.   but I have already done   sudo apt-get update sudo apt-get upgrade sudo apt-get dist-upgrade   I have also restarted my instance.   Please advise.


I want to know how to change the key values of an array using PHP  Input array :  Array ( [2] => one [3] => Array [5] => two [6] => three [8] => four )   I want output like given below,  Array ( [0] => one [1] => Array [2] => two [3] => three [4] => four )   Please anyone help..

I have the following array, which I would like to reindex so the keys are reversed (ideally starting at 1):  Current array (edit: the array actually looks like this):  Array (  [2] => Object     (         [title] => Section         [linked] => 1     )  [1] => Object     (         [title] => Sub-Section         [linked] => 1     )  [0] => Object     (         [title] => Sub-Sub-Section         [linked] =>      )  )   How it should be:  Array (  [1] => Object     (         [title] => Section         [linked] => 1     )  [2] => Object     (         [title] => Sub-Section         [linked] => 1     )  [3] => Object     (         [title] => Sub-Sub-Section         [linked] =>      )  )


A person give me an idea for my physical problem, and I think the answer of this question would be the next step for its answer   I only want to know what they are doing with each other if they meet each other (I know that they will not annihilate each other )  Thanks for all helpful questions.

What are the results of high energy electron electron collisions?  Are other particles created?


I am running a dual-boot with Windows XP and Ubuntu 11.04.  Ubuntu has Open Office as part of the install. Occasionally, when using XP, I need to work on a spreadsheet or other Open Office document but can't seem to access them while using Windows XP. Is there a way that XP can crossover to Ubuntu documents?  Are two different versions of Adobe also needed?

I have two questions on ext4:   Is there currently a way to mount an ext4 partition in Windows (XP/Vista/7) to get basic read support? If not, are there any plans to support this someday?


Everytime I use the command \bigskip or \vspace{5mm} it doesn't show in at the right place in document. It always comes about a line and a half after, in the middle of sentences.  What am i doing wrong?

Consider the following document.  \documentclass[12pt,a4paper]{article} \usepackage{lipsum} \pagestyle{empty} \begin{document} \begin{minipage}[t]{\textwidth}   \lipsum[1] \end{minipage} \medskip {\large\scshape\bfseries\itshape Lorem Ipsum} \medskip \hrule \medskip \lipsum[2] \end{document}   When I compile it with pdflatex it produces the following output.    Why is there no space after my minipage but before my text? I put a \medskip in between them.  \end{minipage} \medskip {\large\scshape\bfseries\itshape Lorem Ipsum} \medskip   It seems that the \medskip before and after the text is being combined into one. How do I fix this?