The original charger for my laptop model can output 87W. Sometimes I forget it at work and I use my Nintendo Switch Charger (Output: 15V, 2.6A = 39W) for emergencies.  I was wondering if using a charger that may not be able to input the amount of power needed (for example maybe the laptop needs 45W so it will take the rest from the battery) could damage the laptops battery?   Extra: If there is no problem, would that also hold for this power bank:

I forgot my macbook pro charger at a friends place and I won't have it for a week. I saw that there are 3rd party chargers being sold for half the price of official chargers. Can 3rd party chargers damage my macbook pro? After I get my normal charger back in a week I will be mostly using that one and keep the new one as an extra, so I won't be using it fulltime.


let $ \sum_{n=1}^{\infty}a_{n}=1+\frac{1}{2}-2\cdot\frac{1}{3}+\frac{1}{4}+\frac{1}{5}-2\cdot\frac{1}{6}+\frac{1}{7}+\frac{1}{8}-2\cdot\frac{1}{9}+... $ Meaning, $ \sum_{n=1}^{\infty}a_{n} $ is the seires which we multiplyed each third element of the harmonic series by $ -2 $. I have to tell if this series converge/diverge. Here's what I tried: First, I defined $ S_{p}=\sum_{n=1}^{p}a_{n} $ and then I defined $ b_{k}=\frac{1}{3k-2}+\frac{1}{3k-1}-\frac{2}{3k} $ ( I summed each 3 elements of the original series and named it $ b_k $ ). Thus,   $ T_{P}=\sum_{k=1}^{p}b_{k}=\sum_{n=1}^{3p-2}a_{n}=S_{3p-2} $ So basiclly $ T_p $ is a subsequence of $ S_p $, therefore its enough to show that $ \sum_{k=1}^{\infty}b_{k} $ diverges, and it will imply that also $ \sum_{n=1}^{\infty}a_{n} $ diverges, because otherwise $ S_p $ is a convergent sequence and eny subsequence of $ S_p $ should converge to the same limit. Thats my idea, it required a bit of work and eventually I managed to show that  $ \sum_{k=1}^{\infty}b_{k}=\sum_{k=1}^{\infty}\frac{9k^{3}+9k^{2}-4k}{3k\left(3k-1\right)\left(3k-2\right)} $ diverges. I wander if there's simplest way to prove that this series converges (if it is a convergent series at all). Thanks in advance.

Was given the following infinite sum in class as a question, while we were talking about Taylor series expansions of $\ln(1+x)$ and $\arctan(x)$: $$1+\frac12-\frac23+\frac14+\frac15-\frac26+\cdots$$  The question isn't homework or anything, just a thought tease. I tried for a long while but couldn't find anything remotely close. Thanks in advance for the help.


This is my question in StackOverflow, I normally am able to find the answers to my questions online but this particular one I can't make work. So, I'm making a text-based game in c++ and I'm using inheritance and polymorphism in it. I want to store Equipment (derived) in an inventory of Items(base) and them use dynamic_cast to get the properties of the derived class. I made a small example that represents what I'm trying to do. #include <iostream>  using namespace std;  class Equipment {     public:     int i = 20;     string s = "nothing here";     Equipment(){};     virtual ~Equipment(){}; };  class Weapon: public Equipment {     public:     int V = 900;     Weapon(){}; };  int main2(Equipment* e) {     Weapon& weapon3 = dynamic_cast<Weapon&>(*e);     cout << weapon3.V << endl;     return 0; }  int setEquipment(Equipment* e) {     Equipment &equipment = *e;  Weapon& weapon2 = dynamic_cast<Weapon&>(*e);  Equipment* inventory; inventory = new Equipment[3]; inventory[0] = *e;  Equipment &equipment2 = inventory[0];  Equipment inventory2[3]; inventory2[0] = equipment;  Equipment *inventory3[3]; inventory3[0] = &equipment; inventory3[1] = e;  cout << weapon2.V << endl; cout << "METHOD A: "; // WORKS FINE main2(&equipment); // cout << "METHOD B: "; // DOESN'T WORK // main2(&equipment2); // cout << "METHOD C: "; // DOESN'T WORK // main2(&inventory[0]); // cout << "METHOD D: "; // DOESN'T WORK // main2(&inventory2[0]); cout << "METHOD E: "; // IT ALSO WORKS!!!!!! main2(inventory3[1]);  }  int main() {     Weapon weapon1;     setEquipment(&weapon1); }  I wanted to implement something like METHOD C in my code. I tried to implement METHOD E in my actual code but I'm getting a lot of bad_alloc errors. (All the methods that don't work on the example gives me a std::bad_cast error).

Someone mentioned it in the IRC as the slicing problem.


I've read in many places that it's to do with illuminating both double slits by diffraction, even though the interference pattern on the screen would be an overlap of different interference patterns.   However, would the light that emerges from this wide single slit still be coherent? That is, has a constant phase difference, assuming that it's light from a filament lamp that has just passed a filter.  I thought that it wouldn't be coherent, since light can pass through it coming in all different directions, whereas a narrow single slit confines the waves into an almost perfect narrow path to provide a constant phase difference. Is this right?

I read that this causes contrast to become lost between dark and light fringes, but why?


I am working on an image on the adobe photoshop. The opacity and fill value of it on the photoshop are 100%(opacity) and 57%(fill). I am wondering how can we convert these values in CSS ?

I have a content box in photoshop with the background color #bc0018 with a 65% opacity and 50% fill.  I am able to translate the backgroundcolor and opacity part to this, but without the 50% fill the backgroundcolor looks different.  .content-box {     background-color: rgba(188, 0, 24, 0.65); }   Any suggestions on also getting the proper "fill" in CSS?  EDIT  I did just divide the opacity by half and it appears to achieve the same effect as a 50% fill. Still, I would love to hear how other people do this? I definitely don't want to create an image just for this.  .content-box {     background-color: rgba(188, 0, 24, 0.325); }   Thanks!


I'm doing a little project on the $\zeta$ function, and I am at a complete loss of what it is actually doing.  I understand it is way over my head, but when I am plugging say $\zeta(1 + i)$ into WolframAlpha, what is it even calculating? Wikipedia and .edu sites don't seem to have an answer, which is making me think there is no single answer.  Thanks, smart people of MathStack!  EDIT:  Why is everyone voting to close this? I understand it's similar to a different question, but this question might provide someone with some different intuition.  Either way - this helped me a ton! Thanks @Mixed_Math.

In laymen's terms, as much as possible: What is the Riemann-Zeta function, and why does it come up so often with relation to prime numbers?


I observed that the timing of a comment was shown as 9 sec ago and that of my reply to that comment was 26 sec ago. How is this possible? Here is the screenshot:        I felt this was because the comment has been edited after I replied to it but there is no change in timestamp if a comment is edited. There needs to be different timing for posting and editing.

I posted a comment on an answer, and refreshed the page.  I then noticed that someone else had also posted a comment.  His comment had an earlier timestamp, but was below mine.    What happened?  (I'm using the Android app, if that matters.)


I have the following code in 1 servlet:  dispatcher = request.getRequestDispatcher("LoginModel"); dispatcher.include(request, response); if ((boolean) request.getAttribute("Successful")) {}   and this in the 2nd servlet:  request.setAttribute("Successful", true);   However, I keep getting a NullPointerException on the request.getAttribute("Successful")

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?


java.util.List<java.util.List<String>> statuses = new java.util.ArrayList<>(); java.util.List<String> temp = new java.util.ArrayList<>();  System.out.println("yoi :" + temp.size()); statuses.add(temp); System.out.println("warui :" + statuses.get(0).size()); temp.clear(); System.out.println("kirai :" + statuses.get(0).size());   Console output:  yoi :31 warui :31 kirai :0   Why on earth list inside other list becames empty when I clear temporary list that I used to insert it?

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?


Prove that the points $a_1,a_2,a_3$ are vertices of an equilateral triangle if and only if $a_1^2+a_2^2+a_3^2=a_1a_2+a_2a_3+a_3a_1$.   I rewrite the equation as $2a_1^2+2a_2^2+2a_3^2-2a_1a_2-2a_2a_3-2a_3a_1=0$, which is $(a_1-a_2)^2+(a_2-a_3)^2+(a_3-a_1)^2=0$. This looks quite nice, but I'm not sure how to relate it to the equilateral triangle.

I've read that if the complex numbers $a_1$, $a_2$ and $a_3$ are the vertices of a triangle in the complex plane such that $$ a_1^2+a_2^2+a_3^2=a_1a_2+a_2a_3+a_1a_3 $$ then the vertices are actually those of an equilateral triangle.  I tried to see why this by first shifting the vertex $a_1$ to the origin, and considering the triangle with vertices $0$, $a_2-a_1$ and $a_3-a_1$. The given equation holds if and only if $$ (a_2-a_1)^2+(a_3-a_1)^2=(a_2-a_1)(a_3-a_1) $$ which is equivalent to saying $$ \frac{a_2-a_1}{a_3-a_1}+\frac{a_3-a_1}{a_2-a_1}=1. $$ Letting $\frac{a_2-a_1}{a_3-a_1}=x$, this gives the quadratic $x+\frac{1}{x}=1$, and so I solve for $x$ to be  $$ \frac{a_2-a_1}{a_3-a_1}=x=\frac{1\pm\sqrt{-3}}{2}=e^{\pm i\pi/3}.$$  I'm not sure where I'm going now. How can I conclude that such a relation implies the vertices form an equilateral triangle? Thank you.


How do you boot from windows usb stick without it trying to install distro. The only way I could get the stick to boot was use wubi icon then it tries to install and ends up saying I don't have enough space.   I'm running  Windows Xp and ubuntu 10.10

I created a live USB using Unetbootin (distribution: ubuntu 12.04 ) from the alternate installation ISO, but while booting "try ubuntu" option is not displayed in Unetbootin menu. Is there any way to try this ubuntu distribution without installing ?


I am new in Overclocking stuff. I am using an old gen. PC with 32-bit Pentium 4 with 3.0 GHz speed with Ubuntu 14.04 installed on it. I want to improve my CPU performance because it is really really slow.  Can anyone help me out?

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?


Explanation There’s two kind of address space virtual and physical. On the physical model (typically used by the kernel) the memory is bounded and each address correspond to physical ones. The virtual one is used by processes. There’s no limit (except the one due to pointer size). To get more memory the program simply request it (ignoring what amount can be requested). Each address is mapped to different physical ones. That’s how process are restricted in what they can read from ram. The problem The reasoning is system calls uses ring0, but at the same time (at least on linux) the process state is update to interruptible, suggesting system calls uses the virtual address space. As far I understand, CPU rings are about privileged instructions, not about address space (as it is MMU related). So if an out of bound read (due to a vulnerability) occurs during the execution of a system call in kernel code. Can it return memory from other processes ?

I was wondering if I could keep program A from reading my entire ram, as it does not need to monitor what program B is doing.  Also I am on windows 8.1 64 bit.


Here is my method....     void getMerchandise(String category){          for(int i=0; i<merchandise.size(); i++){              if(merchandise.get(i).getCategory()== category)                  System.out.println("\n"+merchandise.get(i).toString()+ "\n");          }   Okay, now if I call the method using...    park1.getMerchandise("Hats");   It works just fine and prints all the items with Hats as the category.  However if I do....       String z= input.next();      park1.getMerchandise(z);   and then I type in the word Hats, it gives me nothing.  I have another method in which I do the exact same thing, and it works fine.  I have the scanner imported, and the scanner is static and is called input.  So there are no errors there.

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


I'm wonder if it is possible to have saved globally accessible dictionary variable without creating a property.

I have a list declared like this -  m_list = own.get("m_list")   Now the problem is I can't access this list from another object. How do I declare the list so that I can access it from another object. I have to check whether or not an element exists.


I'm some code in my project but I came across one problem which I solved but I'm not getting how it works. When I change the type of Brackets used in code,value in year is different.  when I use square brackets in line 2 at start and end of statement after =  import datetime years=[x for x in range(2015,datetime.datetime.now().year)]   when I print(years) it gives output [2015,2016,2017,2018]  but when I use round brackets in line 2 like this   years=(x for x in range(1940,datetime.datetime.now().year))  when I print it ,it gives output <generator object <genexpr> at 0x041DB630>  I don't understand why this happens ,can anyone please explain. Thanks

When should you use generator expressions and when should you use list comprehensions in Python?  # Generator expression (x*2 for x in range(256))  # List comprehension [x*2 for x in range(256)]


When a user logout, I want to display a window. In this window should be a text (Please save your data...). After the user has pressed OK. The process logout continue. Is this possible?   onLogout() (     # that works:     if [ "$USER" != "admin" ] && [ "$USER" != "Administrator" ]; then         rm -Rf ~/Downloads/*         rm -Rf ~/Movies/*         rm -Rf ~/Music/*         rm -Rf ~/Pictures/*         rm -Rf ~/Public/*         rm -Rf ~/Desktop/*     fi     # it doesn`t work:     res=$(osascript -e 'tell app "System Events" to display dialog "Please save yout Data!" buttons {"Cancel", "OK"} default button 1 with icon caution with title "Important Information!"' 2>/dev/null)          if [[ $res == *OK* ]]; then              # continue logout?         else             # break logout?         fi     exit ) trap 'onLogout' SIGINT SIGHUP SIGTERM while true; do     sleep 86400 &     wait $! done

I am more used to the Javascript style event handlers,  but is there a similar thing in applescript that listens to system events like logout or shutdown to execute code  or is there a way to have an applescript run on shutdown or logout?  I know about  but I would rather have something free.  All my script does is mute the volume for the next startup.


Could I take environment variables across the files.  Could I set env. variable in one file, and get it in another?  For example.  first.py  import  os os.environ["FOO"] = "1"   second.py  import os  print os.environ['FOO']

In Linux When I invoke python from the shell it replicates its environment, and starts the python process. Therefore if I do something like the following:  import os os.environ["FOO"] = "A_Value"   When the python process returns, FOO, assuming it was undefined originally, will still be undefined. Is there a way for the python process (or any child process) to modify the environment of its parent process?  I know you typically solve this problem using something like  source script_name.sh   But this conflicts with other requirements I have.


After using Boot Camp to install Windows on my Mac, is there any way to transfer files between the two partitions as each is only read only to the other.  This is mainly because I have run out of space on one partition and was wondering if I was able to download files to my main Mac partition which will be used on my windows side, or is the formatting incorrect for this process.

I am using Snow Leopard and Windows 7 with bootcamp. I would like to be able to save some files to my OSX partition from Windows. I would also like to have files (say, photos, source code, etc) that I can manage with both partitions. Is it possible to get the two partitions to "play nice"?


I keep getting the next message when I try to update or install a package:  E: Syntax error /etc/apt/apt.conf:229: Extra junk at end of file   I can't use synaptic or the download manager or the terminal. I'm using Ubuntu 10.04.

I'm trying to configure some proxies for a guest virtual machine and now I'm getting:  sudo apt-get update E: Syntax error /etc/apt/apt.conf.d/95proxy:4: Extra junk at end of file   The content of the file is:  cat /etc/apt/apt.conf.d/95proxy   Acquire::http::proxy  "http://10.0.0.60:3128/" Acquire::ftp::proxy "http://10.0.0.60:3128/" Acquire::https::proxy "http://10.0.0.60:3128/"


I am a graduate student. Some part of my master thesis requires me to contact a professor from another university. In the first email I addressed him as "Dear Professor Smith". He started his reply with, let's say, "Dear Emily".  Does it mean that he also asked me to call him by his first name? He didn't do it explicitly. How should I address him in my next email?  We are going to meet face to face in the foreseeable future. He doesn't teach me.  My question isn't about addressing a professor in the US.  All I want to know is how to be polite if we communicate in Enlish (although this is a mother tongue neither for him nor for me), so my inquiry refers to the English language, not the (English or American) culture.  In other words: did the professor suggest that I we should be on first name basis by addressing me as "Dear Emily" in his email?   The email was sent to me and other members of my group. It started with "Dear Emily and all" and ended with "Cheers, John". The professor is on first name basis with the rest of the group.  Edit: My question is about this particular situation, the email I received (not a general rule), so I don't think this is a duplicate.

I have worked with my adviser for a few months as a graduate student. Everyone, including her other graduate students, seems to call her by her first name. She never expressed a preference to me, so I've been calling her "Dr. Smith". She signs her emails with her first name.  I am worried that I am being awkward. I don't mind calling her "Dr. Smith", but during meetings where other students are present, it would be jarring to call her "Dr. Smith" while other students use her first name in the same conversation. So far, I have managed to avoid this issue by choosing my words very strategically to avoid directly addressing my adviser at all.  I don't wish my adviser to think that I am making some sort of statement by being unnecessarily formal. On the other hand, I don't wish to appear too informal either. Apart from that, once you've addressed someone by their title for several months, unceremoniously switching to their first name out of the blue seems like it would be very strange.  Is there any tactful way of resolving this predicament, besides waiting and hoping for the adviser to express a preference? I am in the US.


Quicken allows me to cast a sorcery "any time I could cast an instant", but I don't want my opponents to know I am planning to do that, is the following legal?:   The player before me pass the turn I respond casting quicken in the end step No one respondes so Quicken resolve I now cast my sorcery, still in his end step   Is the fourth step valid? Do I get the priority again after Quicken resolves but before my turn starts to cast my sorcery at instant speed?

Within the same phase, once a stack of spells has resolved in its entirety, is priority once again given to a player so that more spells may be cast?  For example:  I attack with a creature. Opponent opts not to block. Now, I want to buff (e.g. +3/+3) my creature multiple times, but I'm afraid of my opponent responding with a burn (e.g. Deal 3 damage) spell at the top of the stack. Can I buff once, ask if opponent wants to respond, then allow the stack to resolve. Then, in the same phase, cast more buff?


How can I view all jobs available on the Careers site?  A few days back I got a job link in my Stack Exchange application feed, and it seems it is available in the application, but I am not able to figure out how to open that.

I get "suggested jobs" in the iOS app, but I don't see an easy way to fully access StackOverflow Jobs with full search, etc. There's not an option in the other sites' entries either, at least not under careers.


How would I punctuate Sunday, November 19 6:30 to 7:30 PM when giving the date and start/end time of an event?

What format of date is appropriate for different contexts (business, personal) in written English, nowadays?   1st of April, 2010 April the 1st, 2010 April 1, 2010 April 01, 2010 another one


I wonder, why do not need to specify the structure of the variance covariance matrix and the lmer function library lme4, since using the lm function library nlme this is possible. Thank you.

I know that one of the advantages of mixed models is that they allow to specify variance-covariance matrix for the data (compound symmetry, autoregressive, unstructured, etc.) However, lmer function in R does not allow for easy specification of this matrix. Does anyone know what structure lmer uses by default and why there is no way to easily specify it?


I have firefox 56, but it keeps updating to firefox 57. Firefox 57 has severe performance related issues, and breaks my add-ons, and therefore I do not want it. Firefox 56 however seems to update against my will, and I want that to stop. How can I tell Firefox 56 to not update, not update without asking, or never look for updates.   I have not run sudo apt-get update, or sudo apt-get upgrade, but the NEW firefox keeps showing up.   Perhaps as a separate question, how can I tell apt-get to ignore new packages for firefox?  I have removed firefox and installed FF56 from source several times now, and it's getting obnoxious.   why is this thread different from the listed duplicates? well, firefox has an integrated updater, in the software that pushes new versions, independently of the Ubuntu OS package management system.   as an update, I figured out that by changing the "updater" executable in the source folder's name to "_updater", functionally prevents the unwanted update from occurring, although unwanted messages regarding an available update still occur.

Since when going after the road-map, firefox 57 will be released on 14.11.207.   Now my problem is that I use a whole lot of legacy add-ons I want to keep working with.   So how can I prevent firefox from updating via the repositories?


I have a parcels layer and related table of water meters. I did labeling of water meters IDs and I pulled it from the related table through the script.  Can I symbolize polygons based on related table records?  So far I was able to do that through joining tables, but it is not ideal for the end user they do not want those tables together.   I read it is possible in ArcGIS Online, but I am working in ArcMap 10.5.

I am making maps for Collector app with features and related tables.   Is there a simple way to assign different symbol to features based on whether it has related records or not?


I was reading Robinson's book "A Course in the Theory of Groups". In section 9.1 (Hall $\pi$-subgroups) it is commented that, in an insoluble group, the Hall $\pi$-subgroups may not be conjugate. As an example, the author says that the simple group $PSL(2, 11)$ has subgroups isomorphic with $D_{12}$ and $A_{4}$, which are non isomorphic Hall {2, 3}-subgroups and therefore not conjugates.   I would like to know why $PSL(2, 11)$ has subgroups isomorphic with $D_{12}$ and $A_{4}$.   I never heard before of the subgroup $PSL$, so I tried reading about it a bit. I found the following link: , which points to "Section II.8 of Huppert's Endliche Gruppen I" book. Unfortunately, I don't know German, so it did not help me.   EDIT: by following the link suggested as an answer (), I found Suzuki's Group Theory(I) book. In the section 3.6 the author find all the subgroups of $PSL(2, q)$. Problem solved, thanks.

This material is covered in detail in Dickson's "Linear Groups with an exposition of the Galois Field Theory", chapter XXII and Huppert's "Endliche Gruppen", chapter II, paragraph 8. Since I don't speak german and Dickson's treatment often requires deciphering, I was wondering if there is a "modern" account of this somewhere.


According to the equivalence principle, a freely falling observer constitutes an inertial frame. Thus, locally, Maxwell's equations apply in their usual form. According to these equations, an accelerated charge should radiate electromagnetic energy. But in this frame, a stationary charge on the earth does indeed accelerate, meaning that it should radiate. So why don't we observe that stationary charges in gravitational fields, like that of the earth, radiate electromagnetic radiation? And do we observe that charges in free fall radiate (which they shouldn't according to the equivalence principle)?

A charged particle undergoing an acceleration radiates photons.  Let's consider a charge in a freely falling frame of reference.  In such a frame, the local gravitational field is necessarily zero, and the particle does not accelerate or experience any force. Thus, this charge is free in such a frame. But, a free charge does not emit any photons. There seems to be a paradox. Does a freely falling charge in a gravitational field radiate?


At first i installed Linux mint on my hard drive. This disk is splitted up into two partitions. After i installed linux i formatted the 2nd partition and deleted and created it new. It's the /dev/sda3. If i try to install windows from an usb stick on it, i cant because it presents me the following error message:  "windows cannot be installed to this disk. the selected disk has an mbr partition table".  My partitions look like:  /dev/sda1            2048   976562175   488280064   83  Linux /dev/sda2       976564222   982421503     2928641    5  Erweiterte Partition 2 beginnt nicht an einer physikalischen Sektorgrenze. /dev/sda3       982421504  2000408575   508993536    7  HPFS/NTFS/exFAT /dev/sda5       976564224   982421503     2928640   82  Linux Swap / Solaris   So i tried to convert my partition scheme to gpt i did this: sudo gdisk /dev/sda3  Then i get the following message:  Partition table scan:   MBR: MBR only   BSD: not present   APM: not present   GPT: not present   *************************************************************** Found invalid GPT and valid MBR; converting MBR to GPT format in memory. THIS OPERATION IS POTENTIALLY DESTRUCTIVE! Exit by typing 'q' if you don't want to convert your MBR partitions to GPT format! ***************************************************************  Exact type match not found for type code 7000; assigning type code for 'Linux filesystem' Exact type match not found for type code 4300; assigning type code for 'Linux filesystem' Exact type match not found for type code 7200; assigning type code for 'Linux filesystem'  Warning! Secondary partition table overlaps the last partition by 2753840503 blocks! You will need to delete this partition or resize it in another utility   Do i really need to resize my /dev/sda2? But to what should i resize it then? Just make it smaller or what?

I recently bought a desktop computer with Windows 7 Home Premium x64 preloaded (OEM). I tried to install Windows 7 Ultimate x64 on this computer but I was presented with the following error message:     Windows cannot be installed to this disk. The selected disk has an MBR   partition table. On EFI systems, Windows can only be installed to GPT   disks.   The 1TB HDD on this computer has three partitions:   SYSTEM 100 NTFS - Healthy (System, Active Primary Partition)  OS (C:) 9148.04 GB NTFS - Healthy (Boot, Page File, Crash Dump, Primary Partition)  HP_RECOVERY (D:) 13.37 GB NTFS - Healthy (PrimarynPartition)   I'm trying to install a clean copy of Windows.


I was reading about Ramsey numbers lately, and found a lower bound in a book. It stated that: $ R(k,k) > \binom{k-1}{3} $ However it did not say the proof and I could not come up with a construction. I found that $R(k,k) \geq (k-1)^2 $, but that is not sharp enough, only for large k. Any ideas how one could prove the firstly mentioned inequality?

The Ramsey's theorem states that  Given $s, t\in \mathbb{N}$, there is $n\in \mathbb{N}$ such that for every graph with $n$ vertices, it contains a $s$-clique or its complement contains a $t$-clique.  The smallest $n$ satisfying the statement is denoted by $R(s, t)$. I found in the article "The Probabilistic Method in Combinatorics, Lectures by Niranjan Balachandran" the following statement:  A constructive lower bound on R(s, s), discovered by Nagy, is the following: $$R(s, s)\ge \binom{s}{3}$$ (Explicitly, his construction goes as follows: take any set $S$, and turn the collection of all $3$-element subsets of $S$ into a graph by connecting subsets iff their intersection is odd.)  I was not able to prove that this graph and its complement does not contain $s$-cliques. Any help in this matter would be greatly appreciated.


Other operating systems can boot from external USB or  drives, but Windows has, to my knowledge, never had this ability, at least not officially out of the box.  How is it with Windows 7? Can it be installed to and booted from an external drive?

I wanted to take a sneak peek at Windows 7 so I thought of installing it. I have Windows Vista on my laptop which came pre-installed with it. I didn't want to mess with it.  So I created a partition (20 GB) in my USB external hard disk and tried to install Windows 7 on that partition. But when I booted from a Windows 7 DVD and selected the target partition on USB hard disk, it said it cannot be installed.  Is there any way to install Windows on an external USB hard disk?


I love cheese and I am always buying and trying new types. Because of this, my cheese stash starts to grow faster than I can eat all of it. Sometimes mold starts to grow around the outside before I get to it, particularly the cheddar.    I practice good storage techniques to no avail, still the mold eventually shows up.  So when this happens, I just trim the mold off and move on, but some of my friends think this is "so gross" and I should just throw it away.    What do you think?

Whenever my cheese gets too old and has a bit of blue/white mold on the side, I'm not sure whether I should throw it completely out or not. Is it safe to eat if I cut off the edge? Should I cut a bit off of all the sides just to be safe?  I'm particularly interested in the answer for cheddar cheese, but answers about other cheese are welcome.


shutdown -s -t 300 can easily be cancelled later by shutdown -a   Is there a way to schedule a shutdown such that it cannot (easily) be cancelled?

From Windows 7 admin account I've set up a scheduled task with max privileges that executes a .cmd file which executes  shutdown -s -f -t 120   if the user happens to be logged in and its past their allowed hours.  The user has only user rights but he still can cancel my Admin enforced shutdown by typing in Run box  shutdown -a.    How do I prevent user from canceling and Admin issued shutdown? UAC is enabled. Thanks.  My final .cmd is this:  @echo off for /f "delims=" %%? in ('tasklist /v^| findstr /B /C:"explorer.exe"') do call :USERis %%? :USERis echo/%*|find "username">nul 2>&1&&(set "liet=username") echo/%*|find "Administrator">nul 2>&1&&(set "liet=Administrator") echo/%liet% if %liet%==username ( msg /server:localhost * /time:120 "Computer is shutting down in 2 minutes!" timeout /T 120 shutdown -s -f -t 0 -c "Computer is shutting down!" ) else ( echo Admin logged in! echo Do nothing exit ) exit  It is scheduled to run repeatedly every 3 minutes during 8 hour period when the PC should be off limits for user. So even if the PC is restarted it still gets a shutdown if User is logged in. Bios has setup password, time & date cannot be changed from user profile. Didn't check if BIOS boot menu works (to boot Linux and change time). Users are Linux dumb though.


I had 320GB hard disk which had 5 partitions C:95GB,D:60GB,E:60GB,F:24GB,G:48GB. I was installing ubuntu 8.0 before 3yrs it would show correct path to install or separate partition to install.Now in Ubuntu 14.0 i tried of installing it took all the partitions and made as single C:298GB disk.All my Partitions are lost.All data are also lost. What can i do now to recover partition please help.

I have a Toshiba satellite A-200 laptop with a Vista OS on it with 4 NTFS partitions  (C:) Vista  (D:) Entertainment  (E:) Work  (F:) Sources   and I wanted to start using Ubuntu instead. So I tried it first from the live CD and everything was OK and all the partitions were shown and working and so I decided to install Ubuntu to replace Vista on the (C:) drive. After I did that I can no longer find my folders and files on the (D:), (E:), (F:) partitions and the only file system that is shown is one 198 GB although my HDD is 320 GB.  I can't access the lost data on the remaining 120 GB which I hope is still there and not totally lost  I am now working from the live CD but I am unable to install testdisk. Can I recover the Vista partitions by the product recovery CD to get my laptop back to the factory settings? Can I recover the NTFS partitions using a recovery program for Windows or will that make the problem worse?   I need these data badly as I don't have a backup for them.


I have looked in the default software installer but it's not there. I saved it to my downloads from the website and go to 'open the folder' but it doesn't work.  It says "the MIME type of this file is 'application/x-debian-package' and can not be installed on this system. Any help?

How do you install Google Chrome on Ubuntu?


I am citizen of Pakistan and hold a regular passport. I have a B-1/B-2 visa for USA and I want to fly from San Francisco to Sofia, Bulgaria (I'll get a Schengen visa soon). Almost all flights that I have found have a stopover at London Heathrow. Do I need a transit visa?       P.S. I have read other threads here and I have also checked the . However, I am still not sure if I need a visa, as I am not sure if I'll pass through UK Border Control. After I went through both possibilities, it said that I do need a visa, but it also listed a number of conditions that, if satisfied, allow one to transit without a visa. I am not sure if I satisfy all.    Also, this  (for South African passport holders) says that "passengers transiting to any of the 25 Schengen countries and who hold a category C Schengen visa must still obtain a UK visa", so I am wondering that I might still need a transit visa.

Is there a website or some other way to find out if I need a transit visa for a short stop in the UK on my way somewhere else? Ideally this should give me the answer for all nationalities, and take into account any other visas I may have.


How do I create a single vertex (not connected to another vertex) on the cursor position?

In Edit mode I can insert Vertices with Ctrl-Click. The new Vertex will be linked to the previously selected one by an Edge. Great.  But how do I insert the FIRST one ? I cannot enter Edit mode with an empty scene, and Ctrl-Click doesn't work in Object mode. What's the trick to have my first Vertex on scene in Edit mode ?


I installed SQL Server Express on my machine and I can only connect to in in SSMS using .\SqlExpress. How do I change it so it becomes .?  I want to do this for SQLExpress which is different that the answers that are found here ""

I need to convert a named instance of SQL server 2005, to a default instance.  Is there a way to do this without a reinstall?    The problem is, 2 out of 6 of the developers, installed with a named instance. So its becoming a pain changing connection strings for the other 4 of us. I am looking for the path of least resistance to getting these 2 back on to our teams standard setup.    Each has expressed that this is going to be, too much trouble and that it will take away from their development time. I assumed that it would take some time to resolve, in the best interest of all involved, I tried combing through configuration apps installed and didn't see anything, so I figured someone with more knowledge of the inner workings would be here.


Why does libappstream3 break apt update on Ubuntu 16.04 (Dell Precision 7520)?  Even if it's is already solved, I want to inform Dell and Ubuntu users about this problem.  I've got a Dell Precision 7520.  The laptop is cool and robust, but it turns out that the Ubuntu 16.04 LTS version provided by Dell has a bug during apt update.  Steps to reproduce:   Start the computer for the 1st time, See that you have a modified Ubuntu 16.04 LTS provided by Dell, Finish the post installation (select timezone, create a user, ...), Open a terminal Run sudo apt update The command fails because of libappstream3

I cannot install any package. It seems the command apt-get update must be run but it throws some errors:  $ sudo apt-get update Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]      Hit:2 http://ve.archive.ubuntu.com/ubuntu xenial InRelease                      Hit:3 http://ve.archive.ubuntu.com/ubuntu xenial-updates InRelease              Hit:4 http://ve.archive.ubuntu.com/ubuntu xenial-backports InRelease            Fetched 102 kB in 23s (4337 B/s)                                                *** Error in `appstreamcli': double free or corruption (fasttop): 0x000000000210f4b0 *** ======= Backtrace: ========= /lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7fac8d8317e5] [...] Aborted (core dumped) Reading package lists... Done E: Problem executing scripts APT::Update::Post-Invoke-Success   'if /usr/bin/test -w /var/cache/app-info -a -e /usr/bin/appstreamcli;   then appstreamcli refresh > /dev/null; fi' E: Sub-process returned an error code


Let $G$ be a group. For $c \in G$ a fixed element let us define a new operation in $G$ defined by $a*b=a\cdot c \cdot b$ Prove that the funtion $f: (G, \cdot)\longrightarrow  (G, *) $ given by $f(x)=c^{-1} \cdot x$ is an isomorphism my attempt: $f(x)=c^{-1}x $ $f(y)=c^{-1}y $ $f(x)= f(y): c^{-1}x = c^{-1}y  \Longrightarrow{x=y} $ How do I test for surjectivity and morphism? Thanks

Let $G$ be a group and let $c$ be a fixed elements of $G$.    Now, I'm going to define a new operation "*" on $G$ by $a*b=ac^{-1}b$    How do I prove that the set $G$ is a group under *.  Thanks for the help!


When it comes to completely anonymous appreciation of videos. What is better to use: 'Likes' vs 'Upvotes'?  I've read elsewhere that likes seem more personal and there is a network involved. But what if it's completely anonymous and it's just a statistic? With a user base ranging between 10 to 50 years old.

I'm wondering what is the best voting system for site that have ranking like top 10 / top 100.  Like/dislike     stars rating (from 1 to 5)    single thumb up    thumb up/thumb down    What you think?


Let $A$ be a finite ring and $N$ the non-units of $A$. If $\vert N \vert \geq 2$, why $\vert N \vert \geq \sqrt{\vert A\vert }$ ?  I think that I must look for something to get a quotient that let's me the inequality, but I don't know which ideal must be the one I need. Can anyone help me?  EDIT: The ring is commutative with unit.

Show that a ring $ R $ with exactly $ n $ zero divisors (different from $0$) has cardinality atmost $ (n+1)^2 $.    I have shown that annihilator of any element among the zero divisor is a subset of the zero divisor which proves it is finite. now i think i have to show that it's coset space is finite.please help me.


I am trying to add a script in a JS. Below is my code, document.body.innerHTML += '<script async data-cfasync="false" src=""></script>';  I am getting below error when this JS code runs, Uncaught SyntaxError: Invalid or unexpected token

Any idea why the piece of code below does not add the script element to the DOM?  var code = "<script></script>"; $("#someElement").append(code);


Does there exist a short exact sequence of the form $$0\to \mathbf Z\to \mathbf Z\oplus (\mathbf Z/n\mathbf Z) \to \mathbf Z/n\mathbf Z\to 0$$   which does not split?   (Note: Don Alejo provided a link which answered part of my earlier question, which merely asked for the existence of a non-split exact sequence of the form $0\to A\to A\oplus C\to C\to 0$.)

A homework problem asked to find a short exact sequence of abelian groups $$0 \rightarrow A \longrightarrow B \longrightarrow C \rightarrow 0$$ such that $B \cong A \oplus C$ although the sequence does not split. My solution to this is the sequence  $$0 \rightarrow \mathbb{Z} \overset{i}{\longrightarrow} \mathbb{Z} \oplus (\mathbb{Z}/2\mathbb{Z})^{\mathbb{N}} \overset{p}{\longrightarrow} (\mathbb{Z}/2\mathbb{Z})^{\mathbb{N}} \rightarrow 0$$ with $i(x)=(2x,0,0,\dotsc)$ and $p(x,y_1,y_2,\dotsc)=(x+2\mathbb{Z},y_1,y_2,\dotsc)$.  My new questions:   Is there an example with finite/finitely generated abelian groups? If the answer to (1) is negative, will it help to pass to general $R$-modules for some ring $R$?


I just spent half an hour writing up a detailed response to , only to have the author delete it seconds later. I posted a followup and a moderator re-opened the original, only to have the poster close it again. Questions and answers are for community benefit, I don't see why he should be able to wipe his question when it has a good response. This is very demotivating and I'm sure anyone else who has had this happen is much less likely to spend their time and thought into answering a question. This is a contributing factor to the "" problem, and promotes two-line answers that don't really answer anything.

I answered  and just after commenting "Yep that seems to be working! Thank you so much!" the question author deleted the question (and, thus, my answer).  Is this behavior considered appropriate on SO?  Shouldn't it be discouraged?


I have got 3 games that I really want to play on ubuntu, but I don't know how to get them working.  So I recently found three games on CDs that I wanna play, when I put the disc in the cd-rom a cd mark appears in the launcher tab, I click on it and then the home folder appears with all the folders and items that are in the cd. When I right click on setup.exe   (I'm aware that I can open games by going into permissions in properties and allowing executing file as a program, but it says "Sorry, could not change the permissions of "Setup.exe": Error setting permissions: Read-only file system")  and open it with Wine Windows Program Loader, nothing happens.   If it helps the games that I'm trying to install are "Command & Conquer Red alert 2", "City Life" and "Theme Hospital".  I'm aware of terminal as well but I don't know how to use it very well...  Please help.

Can .exe and .msi files (Windows software) be installed in Ubuntu?


I would like to find dots/punctuations not surrounded by any numerics or alphanumerics (in other words surrounded by nothing) and replace these with nothing using Notepad++ and regex.  I tried using  (?<![a-zA-Z0-9]).(?![a-zA-Z0-9])   but it replaces all the numbers surrounding each dot with nothing.  How can this expression be adjusted appropiately for use in Notepad++ ?

I am tired of always trying to guess, if I should escape special characters like '()[]{}|' etc. when using many implementations of regexps.  It is different with, for example, Python, sed, grep, awk, Perl, rename, Apache, find and so on. Is there any rule set which tells when I should, and when I should not, escape special characters? Does it depend on the regexp type, like PCRE, POSIX or extended regexps?


In my book (Herstein) this is a statement:      An integral domain $D$ is said to be of finite characteristic if there exists a positive integer $m$ such that $ma=0$ for all $a$ in $D$.   But by definition an integral domain can't have zero-divisors right? So how can an integral domain have finite characteristic because isn't the characteristic a zero-divisor for every a in D? Is it that m can't be in D? I'm confused, if anyone could clarify this for me I'd really appreciate it.

Proposition: Characteristic of an integral domain must be either $0$ or prime number.   I'm confused by this proposition.  I think the characteristic of an integral domain should be always $0$. Suppose it has characteristic $n$. Then $n * a = 0$ for all a of the integral domain.  since n is not $0$ and, if $c * d = 0$ in integral domain, it means $c=0$ or $d=0$, a should be $0$. Hence $n * a$ is not $0$ when $a$ is nonzero. Therefore, characteristic should be always $0$.  What's wrong with my thought?


How draw coterminal rotation as a show in figure.

When teaching trigonometry, sometimes it is useful to represent angles greater than 360º with some kind of "spiral arc". For example:    the angle of -440º in the figure.  My question is:     How can I do this in nicely TikZ?   I can do it by using several consecutive arcs, but I wish to know if is there a more elegant solution to this.


Show that a Direct product of groups, $G \times H$, contains subgroups isomorphic to both $G$ and $H$.  This seems like a simple questions but I can't wrap my head around it. I've already proved that $G \times H$ is a group

I want to prove that the direct product $G\times H$ of two groups has a subgroup isomorphic to $G$ and a subgroup isomorphic to $H$.  How I thought to prove is that taking a pair $(g,h)$ from $G\times H$ and then to show that for some $g$ in $G$ there is an isomorphism with the pair $(g,h)$ of $G\times H$. and the same for $h$ in $H$ also.  Is this method correct? Or should I try to show that there is a bijection between the groups and there exists an equivalence relation between the groups?  Please explain how should I proceed.


I'm an Indian citizen. Traveling between New Delhi and Toronto via London. Do I require a transit visa for UK although I'll not be leaving the airport.

Is there a website or some other way to find out if I need a transit visa for a short stop in the UK on my way somewhere else? Ideally this should give me the answer for all nationalities, and take into account any other visas I may have.


Which came first, muggles or magical beings, squibs or Muggle-borns. and why are there so few  magical beings? This is just a matter of curiosity.

What is a wizard that makes them non-Muggle? Or, more directly, what ancestry does the witch/wizard gene follow? Is there a patriarchal wizard (or matriarchal witch) that Muggles have no part in? Elves perhaps? Stop reading here.  Purpose of the Question/History/Don't Read There seem to be solid consequences associated with being Muggle, or Muggle-related. A dominant theme in the novels is discrimination against the non-gifted race, but, when read into, the wizard bloodline doesn't appear all that well defined. JKR indicates that wizard-ness is genetic, or inherited:  "Muggle-borns will have a witch or wizard somewhere on their family tree, in some cases many, many generations back. The gene resurfaces in some unexpected places."  By the above, it stands that a family that produces a squib (non-magical born of magical parents) must be a half-blooded family in some way, since half-blooded only requires one non-magical ancestor. Of course, we are dealing in magic genetics. Any other form of genetics would make this inherited, seemingly recessive trait (or squibs couldn't exist), never appear at all. Unless they were XMen. If it is so important, what does the wizard-bloodline follow? Other Mythos In other literature a wizard can be nearly anything, but magical powers are typically inherited as well as learned. Merlin of the Arthurian Legend (also mentioned in HP) is Cambian, meaning he is born of demonic intervention; this explains his source of enchantment. Gandalf of Middle Earth is a Maiar, as are all Wizards of Middle Earth. Wizards in Harry Potter seem to follow a bloodline, and it has been mentioned (in the question Gabe linked) that genetics have a heavy play in it, meaning that squibs and parents of Muggle-born wizards should have identical genetics. This bloodline must come from somewhere. Magical Creatures In Harry Potter it is common for magical creatures to "mingle" with humans, these beings are typically somewhat magical. Elves have been described to have very strong magic, but are for some unreasonable reason subservient to humans. I may be mistaken, but believe it was hinted that elves and the wizarding lineage had intersected at one time. Maybe I'm imagining this. Genocidal Allusions Voldemort hates muggles, and half-bloods, and whatever else is non-wizard. The presence of this theme, suggests that this wizardly bloodline must be at least defined if the main antagonist is so obsessed with keeping that mysterious bloodline pure. Since Slytherin himself was said to be a supremacist (circa a really long time ago) it suggests that this bloodline should have existed long before he was around, especially if he founded a school with people he was not related to, but were also magical.


My teachers said this will be on the ap test and I have no idea what it means. Please help!

Consider:  List<String> someList = new ArrayList<String>(); // add "monkey", "donkey", "skeleton key" to someList     for (String item : someList) {     System.out.println(item); }   What would the equivalent for loop look like without using the for each syntax?


So when a capacitor is being charged, it is connected to a voltage source and a current flows through it (for a time).  Now, high-school physics says that when a capacitor made of 2 large parallel plates charges, one plate collects an excess of electrons, which makes it more negative. But... the electrons (in this model) are also circulating in the circuit, so they also "pass" through the capacitor, until "something happens" and they cannot pass anymore (i.e. a charged capacitor blocks DC). What is this thing which happens?  As far as I understand it, the high-school model is actually too simplistic, but where does it break down? I have a vague idea that the electrons are too slow to carry current (especially if it changes with high frequency such as in RF circuits) and electrical current is actually an EM field which is propagating, similar to how light (and the entirety of the RF spectrum) behaves, only localised to the wire (a conductor, like glass is for light). So, how does that model explain capacitors?  Can anyone point to a good explanation of the physics involved here?

Sorry, i am novice in electronics, trying to understand basic fundamental of electronics.  1. How does capacitor conduct current when two plates aren't physically connected.


Something bugged me about that icon every time I saw it and I know why now.  The falling stack (excluding the one piece neatly placed in the box) is off to the left by 1 px.  Seems to be stretched slightly too.  Compared to the meta stackoverflow icon, you can clearly see the misalignment.  Observe the gif below.

Am I the only one who feels like the logo is slightly misaligned? I think the first angled bar should be moved a little bit to the right, so that both corners are aligned. (pink)  I also found out that the padding between the container and the first bar is uneven as well. (blue)    Don't get me wrong, I love the concept of the logo, but I feel that it's a little bit off. Did anyone else notice this?


I was wondering if there are any tools to keep track of the access history of a file. I know of , but as far as I understand, it only returns information about the last time the file was accessed.

Is there any way in unix to find out who accessed certain file in last 1 week? It may be user or some script ftp it to some other place. Can I get a list of user name who accessed certain file? How can I find out who is accessing particular file??


If $X_n$ is a martingales with $sup E|X_n|^p<\infty$ where $p>1$, How can show that $$E^p|X_n|\leq E |X_n|^p$$

For a nonnegative random variable $X$, how to prove that $E(X^n)^{\frac1n}$ is nondecreasing  in $n$?


We are creating a simple struct with a constructor accepting one argument.  public struct test {     public int val;      public test (int a)     {         val = a;     } }   Yet I notice that the struct can be initialized using the default constructor.  Can this be prevented?  test t1 = new test();   //why does this work?

Is it possible to hide the parameterless constructor from a user in C#? I want to force them to always use the constructor with parameters e.g. this Position struct public struct Position {     private readonly int _xposn;     private readonly int _yposn;          public int Xposn     {         get { return _xposn; }     }      public int Yposn     {         get { return _yposn; }     }      public Position(int xposn, int yposn)     {         _xposn = xposn;         _yposn = yposn;     }         }  I only want users to be able to new up a Position by specifying the x and y coordinates. However, the parameterless constructor is ALWAYS available. I cannot make it private. Or even define it as public. I have read this:  but it doesn't really help. If this is not possible - what is the best way to detect if the Position I am being passed has values? Explicitly checking each property field? Is there a slicker way?


I don't  know much about electricity.    In my kitchen there are 3 GFCI receptacles. There was a kettle plugged into one and the microwave. The fridge was on the other.  Both outlets quit last night when I opened the fridge, but the breaker didn't trip.   The reset buttons won't do anything, the green light at the bottom of the receptacle is off (on these GFCIs the light is on when they have power).   Every other outlet on this circuit is working, including the other GFCIs.    Any ideas what happened here?   Should I replace the GFCI outlets?

I have a GFI receptacle in my kitchen that feeds four other receptacles.  It tripped the other day and I cannot get it to reset.  All of the other receptables on the circuit are not functioning which is to be expected.  I first thought it was a bad GFI receptacle so I replaced it to no avail.  I then checked power at the electrical panel and all of the breakers for the house appear to be providing power.  The breakers for the GFI receptacles in the bathrooms have test buttons on them and trip when it is pressed, however the kitchen GFI breakers are standard non GFI breakers.  The confusing part is that when I go to the GFI receptacle I am not seeing the 120V power on my meter that I am seeing in the other working receptacles in the house and at the electrical panel.  I checked both sets of wires coming into the receptacle and various combinations of hot and neutral just to be sure I was testing the correct wires.  One pair gives me 3.9V and the other 0.04V.  I have gone through and verified that all of the other GFI receptacles in the house are functioning correctly so I don't think it is a separate GFI feeding this one that is causing the problem.  What would the next steps for testing this problem be?  It was functioning correctly before it tripped so I am assuming that it is not a wiring issue that would require an electrician at this point.  I have a meter and all of the necessary tools to do any of the work I am just not sure where to begin troubleshooting.


I've been trying to solve this given equality involving an improper integral and an infinite sum without any substantial progress: $$\int_0^\infty \frac{x}{1+e^x}dx=\sum_{n=1}^\infty \frac{(-1)^{n+1}}{n^2}$$  I tried various integration techniques such as change of variable ($1+e^x=t$ ; $e^x=t$), integration by parts and used Taylor expansion at every integral I arrived. However, I did not find any way of expressing the integrand as an infinite sums of functions that I could integrate term by term.   Any suggestions?

How to find  $$ \int_0^\infty \dfrac x{1+e^x}\ dx=\ ...? $$  I don't know where should I start with. The correct answer from my textbook is $\frac{\pi^2}{12}$. This is my homework with 10 questions but I can only answer 9 questions, this one I'm stuck. Can anyone help me? Thanks.


I'm a beginner to C++ and I am getting extremely confused trying to understand the benefits of the recommended practices regarding headers and implementation files.   Say I have two implementation files for two separate parts of my program and they both require iostream and sstream. Is this a bad thing and should it, or can it be avoided? I know that I'm supposed to avoid redundant includes, is this considered redundant?

Why does C++ have header files and .cpp files?


I am using Python to import a specific mesh in Blender, mesh that I want to modify after import using some sliders I have defined. So I have the defined the following function for the import:  import bpy, math, bmesh  def addGlasses(context, r):     # import glasses object     bpy.ops.import_scene.obj(filepath="myMesh.obj", axis_forward='-Z', axis_up='Y', filter_glob="*.obj;*.mtl")      # select the imported object so it has a location     ob = bpy.context.selected_objects[0]      return ob   and then I have defined the user interface for the imported object:  # #    User interface #  from bpy.props import *  class MESH_OT_glasses_add(bpy.types.Operator):    bl_idname = "mesh.glasses_add"    bl_label = "Add glasses"    bl_options = {'REGISTER', 'UNDO'}     radius = FloatProperty(name="First parameter", default=1.0, min=0.01, max=100.0)     location = FloatVectorProperty(name="Location")    rotation = FloatVectorProperty(name="Rotation")    # Note: rotation in radians!     def execute(self, context):       ob = addGlasses(context, self.radius)       ob.location = self.location       ob.rotation_euler = self.rotation      return {'FINISHED'}   So I can move and rotate the object as I wish with the sliders "Location" and "Rotation" but I want also to modify some specific parts of my mesh. Practically, radius is a slider for my mesh that appears when the mesh is imported and I would like to use it's value to stretch some specific vertices for the mesh (I know which ones they are). Is there a way to do that? Because I can't even select a single vertex after import.

I am trying to modify an object after importing it. This post is related to   import bpy full_path_to_file = "C:\\Users\\xyz\\Documents\\test.obj" bpy.ops.import_scene.obj(filepath=full_path_to_file) # create the material mat = bpy.data.materials.new('MaterialName') mat.diffuse_color = (1.0,0.0,1.0) mat.diffuse_shader = 'LAMBERT' mat.diffuse_intensity = 1.0  # get the object obj = bpy.data.objects['Cube']  # get the material mat = bpy.data.materials['MaterialName']  # assign material to object obj.data.materials.append(mat)   I wanted to add a material to the imported object but that is not happening. So I tried to scale it even that is not happening.  I realized that no operation is being performed on the imported objects. But the same operations are executing on the objects that are created (i.e. not imported).  Any help would be appreciated.


How do I configure /etc/hosts so that if I go to google.com it's actually routed to my localhost:3000?  I'm aware of .  Here is what my hosts file looks like right now:  ## # Host Database # # localhost is used to configure the loopback interface # when the system is booting.  Do not change this entry. ## #127.0.0.1      localhost 255.255.255.255 broadcasthost ::1             localhost 127.0.0.1       myapp.herokuapp.com   You wouldn't believe how many similar questions I've looked up and how many combinations of localhost, 127.0.0.1 and myapp I've tried.

I have set up a local site under IIS 7.5 under port 900. to access it I should type localhost:900 in the address bar. I'm a little bit familiar with the System32\Drivers\etc\hosts file and I know I can define my custom name with IP adderss there. For example I can add: 127.0.0.1 MyLocalSite and whenever I type in http://MyLocalSite in the browser, The DNS resolves its IP as 127.0.0.1. Is there anyway that I can specify port number in that file as well? (e.g. 127.0.0.1:900 MySecondSite and the DNS resolves it correctly) I tried 127.0.0.1:900 and 127.0.0.1::900 with no luck.


class LNode { LNode next; int value; } public class asasasa {     public static void main(String ar[]) {          LNode list = new LNode(), list2=list;          list.value = 9;          list = list.next;          list.value = 6;          list.next = null;         while (list2.next != null) {              System.out.println(list2.value);              list2 = list2.next;         }    }   }  * Exception in thread "main" java.lang.NullPointerException   at asasasa.main(asasasa.java:10)* Kindly help with the concept and give a simpler code for such linked list

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 wrote the following code in java that compares the n-th suffix of two words w1 and w2. However if I run the program with the words "Heeelloo" and "Helloo" and n = 4 it returns the following:  lloo lloo false   Here is the code:  private static boolean sufficesEqual(String w1, String w2, int n) {     String str1 = "";     String str2 = "";     for (int i = w1.length()-n; i < w1.length(); i++)          str1 = str1 + w1.charAt(i);     for (int j = w2.length()-n; j < w2.length(); j++)          str2 = str2 + w2.charAt(j);     System.out.println(str1);     System.out.println(str2);     return (str1 == str2); }   with those both words it should howevr be true. thanks for your help edit: I am only allowed to use .chatAt() and .length

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


I need your assistant and help in getting the count of the values which are available in the resultset. The resultset is having 22 records and in the below code, it is printing the count starting from 1 to 23. Is there any way to get the total no. of records as 22 (one value only) or by subtracting the last value from the first value?   My code is below:  while (rs.next())         {          count=0;         name1=rs.getString("name");                       out.println(rs.getRow());                   }   I tried to use rs.first() and rs.last() and it produced the below error:     java.sql.SQLException: Invalid operation for forward only resultset :   first   I tried to add the arguments to the createstatement, but the same exception is there:   conn.createStatement(rs.TYPE_SCROLL_INSENSITIVE, rs.CONCUR_READ_ONLY);      java.sql.SQLException: Invalid operation for forward only resultset :   last   Please help me in the above issue.

Shouldn't this be a pretty straightforward operation? However, I see there's neither a size() nor length() method.


I am using ArcView 10.1 and am using this code to no avail in the Labeling Properties  [Company_Ne] &VBNEWLINE& [Exp_Date_O]   I know there is a way but am not familiar with the scripting for it.  I am trying to label each parcel but there are multiple tracts that have different expiration and company net acres.    One tract may have only one Lessee,just one exp date and company net acre.  another tract have multiple (ranges 2-9+) shared interests, so they will have different exp dates and different company net acres.  Is there a way to include all those in there without them stacking up on top of each other, but layered underneath one another?  There are 2 columns I am using for the labeling.  I am trying to make them look like the top Left (centered left side).

I work in Oil and Gas and trying to label leases is a huge pain.  In most cases there are multiple polygons of the exact same size and shape stacked on each other with records that represent different lessees.    The number of lessees per section is unlimited.  How can i label these polys so that they look like the annotation in the picture below. Optimally the labels would be sorted on the date field as well. This label is also an expression containing the Net Acres and the Expiration Date.


This way I get colored output:  grep class testdata.py    Since this gets set in my .bashrc:  alias grep='grep -n --color'   But if I search like this, I see no colored output:  find -name '*.py'  | xargs grep "class"   Has someone an idea how to enable colored output of grep if called via find ...| xargs grep?

Bash 4.2 on CentOS 6.5:  In my ~/.bash_profile I have a bunch of aliases, including:  alias grep='grep -n --color=always'   so that I can get color highlighting and print line numbers automatically when running grep. If I run the following, highlighting works as expected:  $ grep -Re 'regex_here' *.py   However, when I ran this recently:  $ find . -name '*.py' | xargs grep -E 'regex_here'   the results were not highlighted and line numbers weren't printed, forcing me to go back and explicitly add -n --color=always to the grep command.   Does xargs not read aliases in the environment? If not, is there a way to make it do that?


I want to install windows7 with my current system ubuntu,and the first step I should do is to allocate a partition for win7.So I decided to narrow my /home patition.Therefore,I execute the following command line  umount /home e2fsck -f /dev/sda3 resize2fs -p /dev/sda3 150G mount /dev/sda3 /home   It worked. And then I viewed the information by df -lh  Filesystem      Size  Used Avail Use% Mounted on udev            1.9G  8.0K  1.9G   1% /dev tmpfs           384M  1.3M  383M   1% /run /dev/sda1        23G   12G   11G  53% / none            4.0K     0  4.0K   0% /sys/fs/cgroup none            5.0M     0  5.0M   0% /run/lock none            1.9G  164K  1.9G   1% /run/shm none            100M   52K  100M   1% /run/user /dev/sda3       148G   87G   54G  62% /home   But I don't know how to do next.How can I make use of the free space?

Previously, I have installed Windows 7 on my 320 GB laptop with three partitions 173, 84 and 63 GB each. The 63 GB partition was where the Windows was installed. The rest were for file containers.  Now I changed my OS to Ubuntu 12.04 LTS. I installed Ubuntu by replacing the entire Windows 7 on the 63 GB partition. The rest of the partitions remain as an NTFS Windows partition and I can still access them both (the 173 and 84 GB partitions).  Now I want to change the two partitions of Windows into an Ubuntu format partitions plus most importantly, I want to extend the 63 GB partition to more than a 100 GB because at the moment I am running out of disk space. Whenever I try to install any application, especially using wine, it always complains for a shortage of disk space.  How do I do the extending activity before I entirely format my laptop again and lose all the important files on my partitions?


Running Kubuntu 18.04.  I created a bootable USB using KDE Partition Manager and a Ubuntu Gnome ISO file.   It contains boot, casper, etc. folders.  But when I reboot with this USB drive attached, it is not shown as a boot option.   How do I boot using this drive?

This is the third time I've tried to install Ubuntu Server 14.04.03 64-bit on the same laptop, and each time it caused different problems.  Each time I wrote the same iso image to a USB flash drive by using a different application and OS.   Universal USB Installer (pendrivelinux.com) from Windows WinImage writer from Windows built-in image writer from Linux Mint 17.2    The iso image is the same in all three cases, the USB flash drive is the same, and the laptop is the same. However each time the installation of Ubuntu gave me different installation options. For example, the last time I installed Ubuntu, it didn't show all the packages to choose while installing (Basic Ubuntu server, etc.).


Perhaps this applies to more than just bash, but I am confused about the role of brackets in if-statements. Most  seem to have the following format  if [ expression ]; then     #do stuff fi   But this doesn't always work for me. For example I have the following script test.sh:  #!/bin/bash  flag=False if ! $flag; then     echo "No brackets: Flag is $flag" fi if [ ! $flag ]; then     echo "With brackets: Flag is $flag" fi echo "The end."   Which prints  $ ./test.sh No brackets: Flag is False The end.   So the statement using brackets is either ignored or it evaluates to False. Why does this happen? What do the brackets do?  I've also seen double brackets. How are those used?   --  Edit: the questions claimed as duplicates ( and ) answer only a small part of this question. I'm still unclear why the syntax with brackets would fail (it seems to me that test ! false should evaluate to true) and why the syntax without brackets succeeds (although, as @ilkkachu mentions in the comment, it seems like it should actually fail as well?).

Examining man test, I see that under synopsis for test are the possibilities test EXPRESSION and test.   What does [ EXPRESSION ], [ ] and [OPTION mean below ?  Why are the brackets empty and why does [OPTION miss a bracket ? Can someone interpret this for me ?  NAME        test - check file types and compare values  SYNOPSIS        test EXPRESSION        test         [ EXPRESSION ]        [ ]        [ OPTION


Let $f$ be a bounded measurable function on a set $E$ of finite measure. For a measurable subset $A$ of $E$, show that $\int_A f=\int_E f\cdot\chi_A$, where $\chi_A$ is a characteristic function on $A$ and $\int_A f$ is the Lebesgue integral of $f$ on $A$.   How am I going to establish this? Help please. Thanks

I have been struggling with the following for quite some time now. If anyone can give me some help, it will be much appreciated:  Let $f$ bounded, measurable and $E$ be a set of finite measure. Let $A \subset E$ be measurable. Prove that:  $\displaystyle \int_{A} f = \int_{E} f \chi_A $


I have a dell inspiron notebook with ubuntu on it, absolutly love it and use it as a work laptop. Everytime my harddrive fails i just grab an old 30gig xbox hdd. Well a few days ago i ended up with the black screen after boot logo, something to do with intel graphics drivers updatinf and crashing the boot kernal. I spent a good 5 hours going through all the walkthroughs and gave up. I have only one thing of value on that hdd, and thats my google chrome passwords.   Is there a way i can import those onto my fresh install? Or am i sol?

I back up chrome in Windows with , That it saves a file with *.gcb format. Now, How could I restore it in ubuntu 11.10 ?  in other word: How could I back up and restore chrome in ubuntu?


Correct me if I'm wrong- I've seen the movies and read the book but it has been a while. Smaug not only hoarded the treasure that was already under the mountain but he also collected the treasure of Erabor and Dale. How did he physically (being a young and tender dragon) get all those gold and jewels into one location??

Smaug first appeared in TA 2770 as a mature Fire-drake. I'm not sure if there are canonical sources which say his age or maturity, but he must have been quite large and quite old at the time in order to destroy the city of Dale and capture Erebor.  Since it is safe to assume that Smaug would have been attacking towns and stealing all of the gold and jewels he could get his claws on for most of his life, then he must have amassed a huge fortune prior to taking residence at Erebor. How did he transport his existing horde to Erebor? It seems unlikely that he would have simply abandoned all of his treasure that he had previously accumulated.  EDIT: It has been established that Smaug was not a mature drake at the time of his appearance. However, he may have already had a small horde (compared to Erebor).


I've been trying to prove Cramer's rule, which states that for an $n \times n$ invertible matrix $A$, the value of $\vec{x}$ in the equation $A\vec{x} = \vec{b}$, where $\vec{x}$ and $\vec{b}$ are vectors in $\mathbb{R}^{n\times1}$, is given by a vector that consists of $\frac{\displaystyle{detB_{n}}}{\displaystyle{detA}}$ where  $B_{n}$ represents a matrix where the $n^{th}$ column of $A$ is replaced by the vector $\vec{b}$. I started by proving this for $2 \times 2$  matrices. I defined a $2\times2$ matrix with the arbitrary constants $a_1$, $a_2$, $a_3$, and $a_4$, which I then multiplied with a vector $\vec{x}$, and set the product equal to the vector $\vec{b}$, which consisted of arbitrary constants $b_1$, and $b_2$. Solving this system using elimination did end up yielding Cramer's rule. However, I'm not sure where to go from here. Obviously the larger the matrices get, the harder it will be to compute $\vec{x}$ by elimination, and I think there must be a better way to approach this. I've thought about using induction somehow, but I don't know how that would work in this situation.

I know  works for 3 linear equations. I know all steps to get solutions. But I don't know why (how) Cramer's rule gives us solutions?   Why do we get $x=\frac{\Delta_1}\Delta$ and $y$ and $z$ in the same way?  I want to know how these steps give us solutions?


For the linear regression model,    y_i = beta_0 + summation(x_i,j * beta_j )+ e_j        from the above equation, How I will find the value of beta(beta_0,beta_1...beta_j)?

I'd like to know what technique or techniques are used by regression packages, (in particular the lm function of R) to minimize the sum of squares.   Does it use gradient descent?  Thanking in anticipation.


My "queryService.query()" make take a time that exceeds a limit specified by the requirement. I want to be able to skip the execution of the current function all after 1 second and then continue to process of the next "inputInfo". If a task takes too long, I want to skip it. What's the best way to do this?    public Response getResponse(InputInfo inputInfo) {          Preconditions.checkNotNull(inputInfo);         LOGGER.info("inputInfo: " + inputInfo);          Response response = queryService.query(inputInfo);          return response;     }

I have a method that I would like to call.  However, I'm looking for a clean, simple way to kill it or force it to return if it is taking too long to execute.  I'm using Java.  to illustrate:  logger.info("sequentially executing all batches..."); for (TestExecutor executor : builder.getExecutors()) { logger.info("executing batch..."); executor.execute(); }   I figure the TestExecutor class should implement Callable and continue in that direction.  But all i want to be able to do is stop executor.execute() if it's taking too long.  Suggestions...?  EDIT  Many of the suggestions received assume that the method being executed that takes a long time contains some kind of loop and that a variable could periodically be checked. However, this is not the case.  So something that won't necessarily be clean and that will just stop the execution whereever it is is acceptable.


Why does  exec >somefile   return immediately, while  exec 2>somefile   doesn't and hang on indefinitely? Thanks.

Studying  I am unable to reconstruct the following shell output in bash 4.4.12 in debian 9, both from tty and pts:  bash$ lsof -a -p $$ -d0,1,2 COMMAND PID     USER   FD   TYPE DEVICE SIZE NODE NAME  bash    363 bozo        0u   CHR  136,1         3 /dev/pts/1  bash    363 bozo        1u   CHR  136,1         3 /dev/pts/1  bash    363 bozo        2u   CHR  136,1         3 /dev/pts/1   bash$ exec 2> /dev/null bash$ lsof -a -p $$ -d0,1,2 COMMAND PID     USER   FD   TYPE DEVICE SIZE NODE NAME  bash    371 bozo        0u   CHR  136,1         3 /dev/pts/1  bash    371 bozo        1u   CHR  136,1         3 /dev/pts/1  bash    371 bozo        2w   CHR    1,3       120 /dev/null   Whenever I run the second command the shell prompt disappears and all keyboard input stops being displayed, though I can still run commands and see their output. Why is that?


Note: I am NOT asking if moonlight can be used to start a fire. I am asking whether these particular arguments in support of the claim that it cannot are correct. i.e. I'm looking for an answer that addresses the physics of these arguments specifically.  On , the following claims are made:  You can't start a fire with moonlight no matter how big your magnifying glass is.  General rule of thumb: You can't use lenses and mirrors to make something hotter than the surface of the light source itself. In other words, you can't use sunlight to make something hotter than the surface of the Sun.  Lenses and mirrors work for free; they don't take any energy to operate. If you could use lenses and mirrors to make heat flow from the Sun to a spot on the ground that's hotter than the Sun, you'd be making heat flow from a colder place to a hotter place without expending energy. The second law of thermodynamics says you can't do that. If you could, you could make a perpetual motion machine.  (more claims which I'll omit here)   I neither believe the claim nor follow any of the reasoning. First, I don't get the thing about the perpetual motion machine:  If this is regarding the first law of thermodynamics (conservation of energy), then it's perfectly possible to lose energy while still heating up an object, which would avoid perpetual motion, so I don't get the argument.  If this is regarding the second law of thermodynamics (increasing of entropy), then it's also invalid because the disorder in the system is still increasing.  If this is about something else, then I don't know what that is.   Second,  is a video of a guy using a mirror he can hold in his hand to light paper on fire. Clearly the mirror itself isn't getting as hot as he's making the newspaper, and clearly the mirror is the one reflecting the sunlight. So how can one claim that the paper fundamentally can't get hotter than the reflecting surface? Why can't the moon's surface fundamentally behave similarly (albeit with poorer reflectivity)? Can someone explain? Is Randall confusing heat with temperature? Or maybe conduction with radiation? Or am I missing something subtle (or perhaps not so subtle)?

You can start fire by focusing the sunlight using the magnifying glass.   I searched the web whether you can do the same using moonlight. And found  and  - the first two in Google search results.  What I found is the thermodynamics argument: you cannot heat anything to a higher temperature using black body radiation than the black body itself, and Moon isn't hot enough.  It may be true, but my gut feelings protest... The larger your aperture is, the more light you collect, also you have better focus because the airy disk is smaller. So if you have a really huge lens with a really short focus (to keep Moon's picture small), or in the extreme case you build a Dyson-sphere around the Moon (letting a small hole to the let the sunlight enter), and focusing all reflected light into a point it should be more than enough to ingnite a piece of paper isn't it?   I'm confused. So can you start fires using the Moon?


Barcelona managed to beat PSG 6-1 in the second leg of 2017 round of 16 to win 6-5 on aggregate, having lost 4-0 in the first leg. Inspired by Barcelona' win, what are the biggest comebacks in champions league history after a loss in the 1st leg of knockout stage match?

In sports (particularly football), the knockout stage has a contest between two teams which comprises two matches or "legs", with each team as the home team in one leg. The winning team is usually determined by aggregate score, the sum of the scores of the two legs.   Which is the greatest comeback made by a team after losing its first leg with a great margin? I'm mainly interested in UEFA competitions and cup tournaments of top European associations.


My Script  log=$HOME/Deleted/$(date) find $HOME/OldLogFiles/ -type f -mtime -7 -exec ls -latr {} \; -exec echo was deleted on `date` \; -exec rm -f "{}" \;|paste - - >> $log   My goal for the script is to delete files older than x amount of days and then log them to a file and display the filename, date deleted, and how old it was. I keep getting these errors however...  ./test.sh: line 3: $log: ambiguous redirect find: ‘ls’ terminated by signal 13 find: ‘ls’ terminated by signal 13   Anybody have any suggestions?

I have a script that deletes files 7 days or older and then logs them to a folder. It logs and deletes everything correctly but when I open up the log file for viewing, its very sloppy.  log=$HOME/Deleted/$(date)  find $HOME/OldLogFiles/ -type f -mtime +7 -delete -print > "$log"   The log file is difficult to read  Example File Output: (when opened in notepad)  /home/u0146121/OldLogFiles/file1.txt/home/u0146121/OldLogFiles/file2.txt/home/u0146121/OldLogFiles/file3.txt   Is there anyway to log the file nicer and cleaner? Maybe with the Filename, date deleted, and how old it was?  Any suggestions help!


I made a sandwich two days ago that consists of white bread and canned tuna. I put it in my freezer immediately after making it and it stayed there until today. This morning I took it to work, planning to eat it for lunch, but am now going out for lunch instead. I'd rather not waste the sandwich, so is it safe to refreeze it until tomorrow? It has been out of the freezer for 5 hours and sitting in my desk drawer.

I've often been told by people that I shouldn't refreeze meat (particularly hamburger meat) once it has been thawed.  However, this seems a little silly to me.  I can't imagine how meat that hasn't been bought fresh and local could find its way to my kitchen with out thawing and being refrozen a couple of times.  How much damage can one more thawing and refreezing really do?  Can it really be that dangerous disease wise? Or is this just one of those urban myths?


Palpatine tossed around Senate "pods" with no problem, Yoda picked up X-wings and such, and there are many other examples of pretty impressive levitation feats. So why couldn't Sidious/Palpatine stop himself from falling to his death? Why couldn't Maul levitate himself away instead of falling to his (assumed for a while until The Clone Wars) death?  Is it a Sith thing?

In The Empire Strikes Back Yoda uses the Force to lift Luke's X-Wing out of the water and put it on land.  In Attack of the Clones and in many instances in the second series of The Clone Wars, Anakin (and others) use the Force to jump higher than they could otherwise, or to jump from very high locations, but I don't think I've ever seen the Force used for outright self-levitation.  But if Yoda could lift the X-Wing, shouldn't a strong Jedi be able to lift himself and, essentially, fly with the help of the Force?


We often read here and there, that we must place our js code either on the page head section or before (sorry) the end body tag. Discussions about this aside, I'm just looking to know what are the reading order for such things by the browsers (taking that they do act as equals here):  Can we place:  $(document).ready(function(){   No matter where on the page structure, because we are using $(document).ready or should we still place it on the head section ?  Can anyone please clarify this.  If my question isn't clear, I can rephrase.

I have a web app that has a universal HTML header include, so I'd like to put page-specific scripts in each page instead of having it load for everything. I tried putting document.ready() near the end of the <body> of a page and it seems to be working fine. Are there any potential hazards to putting it there instead of inside the <head>?


Kindly Provide me a feasible solution to write the test class for this below code`  public class ActiveCampaign { @future (callout=true) public static void createUser(String Email, String FirstName, String LastName, String contact){     string key = '1234';     String authUrl = 'https://navsoft12350.api-us1.com/admin/api.php?api_action=contact_add&api_key='+key;     Http http = new Http();     HttpRequest request = new HttpRequest();     request.setEndpoint(authUrl);     request.setMethod('POST');     request.setHeader('Content-Type', 'application/x-www-form-urlencoded');     String payload = 'email='+encodingutil.urlencode('Email','utf-8')+'&firstname='+encodingutil.urlencode('FirstName','utf-8')+'&last_name='+encodingutil.urlencode('LastName','utf-8')+'&customer_acct_name='+encodingutil.urlencode('Navsoft, Inc.','UTF-8');     System.debug(payload);     HttpResponse response = http.send(request);      if (response.getStatusCode() != 200) {         System.debug('The status code returned was not expected: ' + response.getStatusCode() + ' ' + response.getStatus());     } else {         System.debug(response.getBody());     }     } }

This is a canonical question and answer developed by the community to help address common questions. If you've been directed here, or your question has been closed as a duplicate, please look through the resources here and use them to shape more specific questions. To browse all canonical questions and answers, including more unit test resources, navigate to the  tag.  How do I unit test code that includes a SOAP or REST-based callout, or indirectly calls code that makes a callout? I'm getting an error saying that callouts are not supported.


can i get the list of items between two date like ?   var startDate. var EndDate.   var queryGetDiscussion = "?$Date between(startDate, EndDate) ";   Or using LT and GT.

I'm new to filtering dates with REST in SP but am trying to do something like below but am not sure how to get today's date in as a variable into the request. I don't think I'm too far off so any help is greatly appreciated.       var today = new Date();     $.ajax({         url: "/_api/web/lists/GetByTitle('DateItems')/items?$orderby=SortOrder asc&$filter=StartDate le datetime'" + today + "' and EndDate ge datetime'" + today + "'",         ...     });


Basically what I have to do is run the following command,  ./home/pooldaemon/monero-stratum/build/bin/monero-stratum /home/pooldaemon/monero-stratum/config.json   the only disadvantage that this brings with it is that I can't do anything else. So I would like to make it run in the background so that I can do other things on my linux server in the mean time.  For the record I am running Linux Ubuntu 16.04 LTS Server.  I have ran true different solutions but quiet honestly most off them are to far out of my knowledge and understanding off linux.

How do I run a program in the background of a shell, with the ability to close the shell while leaving the program running? Lets say my UI is having problems or for some reason, I need to boot up a program from the terminal window, say, nm-applet:  nm-applet   When it's started, it occupies the foreground of the terminal window.  Is there any simple way to run the program in the background without needing to leave the terminal open or have it occupy the whole terminal?  On that note, I did find a way to run programs from the terminal and have it allow for other inputs, by appending an ampersand (&) to the command as such:  nm-applet &   But this isn't much use as any processes started in the terminal are killed once the terminal is closed.


am coming back from Sudan to Canada and I have a 6 hours layover in Amsterdam  and I have a Canadian travel document do I need a visa there

I found many related questions on this site but I am still not sure about the rules. How can I decide if I need a visa to transit? Schengen members as of May 2021 are as follows:  Austria Belgium Czech Republic Denmark (excluding Greenland and the Faroe Islands - but an open border with the Schengen Area is maintained) Estonia Finland France (excluding overseas departments and collectivities) Germany Greece Hungary Iceland Italy Latvia Liechtenstein Lithuania Luxembourg Malta Netherlands (excluding Aruba, Curaçao, Sint Maarten and the Caribbean Netherlands) Norway (excluding Svalbard) Poland Portugal Slovakia Slovenia Spain (except Ceuta and Melilla) Sweden Switzerland


In The Hunger Games, is the Hunger Games society only  in America or is it happening worldwide?

We know that Panem exists in a post-apocalyptic North America but are there other established governments on other continents?


I have a problem in phpmyadmin when i write in a foreign language in my case Turkish I write the text in phpmyadmin and on my website does not show the foreign characters. In phpmyadmin i changed collation to turkish utf8 but stil does not work. here is an example how it looks on my website

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.


The group of Euclidean motions of $\mathbb R^n$ is the semi-direct product $G=\mathbb R^n\rtimes K$  with $K=SO(n, \mathbb R^n)$. Elements of G are written as pairs $g=(x,k)$.  I would like to know what is the dimension of $G$ ? Thank you in advance

Given an $n$-dimensional geodesically complete connected Riemannian manifold $M$, we want to prove that the dimension of its isometry group is $$\dim {\rm ISO}(M) \leq \frac{n(n+1)}2.$$  Does it suffice to say that, since Euclidean space $\mathbb{R}^n$ is expected to be maximally symmetric, and the number above is the dimension of its isometry group, namely translations plus rotations, then the bound must be true for any other manifold? Do you know a more rigorous proof?


So I had a full /boot and I've really messed things up now. What I'd really like to do is run sudo apt-get purge linux-image-3.2.0-{35,36,37,38} but I need to fix these other problems first. So when I run sudo apt-get -f install this is what I get (I also get similar output for any other apt-get commands)  $ sudo apt-get -f install Reading package lists... Done Building dependency tree        Reading state information... Done Correcting dependencies... Done The following extra packages will be installed:   linux-generic-pae The following packages will be upgraded:   linux-generic-pae 1 upgraded, 0 newly installed, 0 to remove and 192 not upgraded. 1 not fully installed or removed. Need to get 0 B/1,726 B of archives. After this operation, 0 B of additional disk space will be used. Do you want to continue [Y/n]?  dpkg: dependency problems prevent configuration of linux-generic-pae:  linux-generic-pae depends on linux-image-generic-pae (= 3.2.0.41.49); however:   Version of linux-image-generic-pae on system is 3.2.0.53.63.  linux-generic-pae depends on linux-headers-generic-pae (= 3.2.0.41.49); however:   Version of linux-headers-generic-pae on system is 3.2.0.53.63. dpkg: error processing linux-generic-pae (--configure):  dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup error from a previous failure.                        Errors were encountered while processing:  linux-generic-pae E: Sub-process /usr/bin/dpkg returned an error code (1)   But this doesn't tell me enough what the other error was. I think it started when I ran sudo apt-get -f install with only about 20MB of free space in /boot. Grrr, /boot partition is super annoying.

I'm new to Ubuntu, it looks like it is better than Windows. Last day I tried to install Kget (the download manager) but during the process my computer suddenly stopped working. So I had to switch it off. After I logged into Ubuntu again I can't install any program. The Ubuntu Software Center says:  Items cannot be installed or removed until package catalog is repaired. Do you want to repair it now?   After I clicked repair it says (after few seconds):  Package operation fails - The installation or removal of a software package failed   I've tried several times, but the same problem occurred. Can anyone tell me a solution for this problem?


Hello StackOverFlow comunity,  I have collect hour and date for a Java/JavaFX application project, i can take abd show them in the output with:  DateTimeFormatter dtf = DateTimeFormatter.ofPattern("dd/MM/yyyy\n  HH:mm"); LocalDateTime now = LocalDateTime.now(); System.out.println(dtf.format(now));   but when i want to use     "name_of_my_text".setText(dtf.format(now)); to put it in my scene this doesn't work and show in the output too much JavaFX error.  Thanks for SOF comunity

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'm trying to have user input where user types a letter and then depends on letter 'IF' statement chooses which fields to display.  What I have now if I type 'p' and 'P' or 'F' or 'f' my 'for' statement still don't understand my input and throws me to 'else' statement.  But why not?          Scanner scanner = new Scanner(System.in);          System.out.print("Employee's Last Name: ");         inputName = scanner.next();         System.out.print("Employment Status (F or P): ");         inputStatus = scanner.next();          if (inputStatus == "F" || inputStatus == "f")         {             // some code         }         else if(inputStatus == "P" || inputStatus == "p")         {             // some code         }         else         {             System.out.println("I don't understand...");         }

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


Please Help, this is driving me crazy!   I guess I still don't understand the difference between attributes like:     height   max-height   line-height     or how they affect properties like the vertical alignment of text and images.    What I WANT:  A single line of text, centered vertically with inline images of varying unknown sizes, in a block stuck to the bottom of the screen, basically like this:    The text will always be less than a single "screen width" line, but the images height could vary (larger and/or smaller than text height).    What I HAVE:          Note that the borders and background are only for demo purposes.   I only need the text & images in a transparent block, stuck to the bottom of the screen.        Below is my code that's producing "what I have" (above). I've experimented with countless frustrating variations and only seem to get farther away from what I want.  How is it possible that so many attributes seem to affect nothing?!  (I assume my mistake is something silly and/or obvious!)    .page-container {   position: absolute;   /* does nothing?! */   height: 100%; }  .txt-img-container {   background-color: lightgreen;   border: dotted 5px green;   width: 100%;   position: sticky;   /* does nothing?! */   bottom: 0px;   /* does nothing?! */   vertical-align: middle;   /* does nothing?! */   min-height: 300px;   /* does nothing?! */   line-height: 300px;   /* does nothing?! */   height: 300px;   /* does nothing?! */ }  .img-container {   border: dashed 5px red;   vertical-align: middle;   /* does nothing?! */   min-height: 300px;   /* does nothing?! */   line-height: 300px;   /* does nothing?! */   height: 300px;   /* does nothing?! */ }

     This text && various imgs . . .                        . . . should all be centered vertically . . .                        . . . within the green 300px div.

I have a div with two images and an h1. All of them need to be vertically aligned within the div, next to each other. One of the images needs to be absolute positioned within the div. What is the CSS needed for this to work on all common browsers?

testing...


I don't know if I'm missing something out but is this just not proved by saying ${\rm Im} (AB)$ subspace of ${\rm Im}(A)$ so ${\rm rank}(AB) \leq {\rm rank}(A)$?

Let $A$ and $B$ be two matrices which can be multiplied. Then $$\operatorname{rank}(AB) \leq \operatorname{min}(\operatorname{rank}(A), \operatorname{rank}(B)).$$   I proved $\operatorname{rank}(AB) \leq \operatorname{rank}(B)$ by interpreting $AB$ as a composition of linear maps, observing that $\operatorname{ker}(B) \subseteq \operatorname{ker}(AB)$ and using the kernel-image dimension formula. This also provides, in my opinion, a nice interpretation: if non-stable, under subsequent compositions the kernel can only get bigger, and the image can only get smaller, in a sort of loss of information.  How do you manage $\operatorname{rank}(AB) \leq \operatorname{rank}(A)$? Is there a nice interpretation like the previous one?


I created simple android form in which I get username and password and in that If I Enter username and password is deepak then also it goes to else condition. But my if condition is always false in any situation and I don't know why.  package com.example.dac.simple_intent_form;  import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.Toast;  public class MainActivity extends AppCompatActivity implements View.OnClickListener {  Button button; EditText email, password;  @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_main);      button = (Button) findViewById(R.id.button);     email = (EditText) findViewById(R.id.eemail);     password = (EditText) findViewById(R.id.epassword);      button.setOnClickListener(this); }  @Override public void onClick(View v) {     String ema = email.getText().toString();     String pass = password.getText().toString();      if (ema == "deepak" && pass == "deepak")     {         Bundle b = new Bundle();         b.putString("email", ema);         b.putString("password", pass);         Intent i = new Intent(getApplicationContext(),Activity2.class);         i.putExtras(b);         startActivity(i);     }     else     {         Toast.makeText(getApplicationContext(),"Plase Enter Right Username and Password",Toast.LENGTH_SHORT).show();     } } }