I found this question for Python programming:    It was marked as a duplicate of this question:    My issue is that I feel the second question does not have any answers to the one marked as a duplicate, even if they are very closely related.  Now that I've explained the situation, I want to know if there is a way to change the duplicate status of questions like this.

To reopen a closed question,  must agree that the question is suitable for the site and cast votes to reopen the question. But:  How does one actually vote to reopen? Is there a reputation level that you must have before you can see this function? Or do I just leave a comment along the lines of, "I vote to reopen"? What happens if someone with less than 3000 reputation leaves a comment that they wish to vote to reopen? How can one draw attention to their closed questions? Is it done via a posting new question? Or do you edit the closed question?   Related:  For more information, see "" in the .


I was in Sweden for 59 days, then left to Cyprus (non-Schengen) for 90 days. I would like to go back to Sweden, and as I understand it, I would only have one month left since It has only been 5 months out of 6 of my whole stay. Is this correct? Or could the clock reset since I have been out of the Schengen area 3 months?

I have searched the web a lot and could not find an answer that fits my situation. Here are two links that are quite contradictory:       My situation:  I've visited Portugal in December 2012 for 29 days on a Schengen visa valid from December 1st, 2012 to February 1st, 2013 for research purposes (I am a Ph.D. student). I want to visit Sweden from February 10th, 2013 to May 10th, 2013 (89 days). I have applied for a Schengen visa again (for research). How will the 90/180 rule work in my situation?


When I am flagging questions, I have tried to use the site migration flag(This post belongs on another Stack Exchange site), but I never have any options.  Every time I click on that option, it only gives me one or sometimes 2 options and it's never one that would actually work.  Is there a reason for this?  I always thought it was only going to give me options for sites that I'm registered at, but it doesn't even give me all of those options.  Is there a way to fix this or is this just how it is?

Possible Duplicate:             It occurs to me, more often than not, that I want to flag a Stack Overflow question to move it to math.stackexchange, or other forums, but this option is not available.  If there were at least a comment or reason textbox in the flag form.


How to simplify $$\sum_{n \geq0 } \binom{2n}{n}\frac{1}{2^n}t^n$$ to show it equals $(1-2t)^{-1/2}$?  Here is a proof I came up with, but I use the fact that I know what the answer should be, so I am a bit dissatisfied with it. By the binomial theorem, the coefficient of $t^n$ in the  $(1-2t)^{-1/2}$  is $\binom{-1/2}{n}(-2)^n$, and we want to show this equals $\binom{2n}{n}\frac{1}{2^n}$. This can be done via induction; it amounts to showing  $$ 1 \cdot 3 \cdot 5 \cdots (2n-1)\cdot 2^n = (2n)(2n-1)\cdots (n+1)$$ which can be easily proved via induction.  I tried using $\binom{2n}{n}=\sum_{i}\binom{n}{i}\binom{n}{n-i}$

I'd like to determine the function corresponding to the following power series: $$x + \sum_{n=1}^\infty (-1)^n\frac{1\cdot3\cdot5\cdots(2n-1)}{2\cdot4\cdot6\cdots2n} \frac{x^{2n+1}}{2n+1}, $$ where $|x|<1$.


I am trying to find the last digit of $8^{5^4}$ (or $8^{(5^4)}$, if you will) using modular exponentiation. What I know is that the value I want is:  $8^{5^4} \mod 10$.  Normally I would find a pattern that $8^{n} \mod 10$ depends upon and use that information to know how to approach the $5^{4}$ term, but $8^{n} \mod 10$ doesn't seem to have a useful pattern.  I know that the answer is $8$ (via WolframAlpha) but I don't know how to connect the dots here. Any help would be appreciated.  Thanks!

I am trying to find the last digit of $3^{5^7}$ (or $3^{(5^7)}$, if you will) using modular exponentiation. Here's what I've figured out:  The value I want is $3^{5^7} \mod 10$.  $5^n \mod 10 = 5$ (if $n$ is a positive natural number).  The residues of $3^n \mod 10$ repeat themselves every time $n$ increases by $4$. The pattern is $1, 3, 9, 7, 1, 3, 9, 7, \ldots$ for $n = 0, 1, 2, 3, 4, 5, 6, 7, \ldots$  Now, I don't know how to use these facts to get what I need. I know that the answer $3$ (via WolframAlpha) but I don't know how to connect the dots here. Any help would be appreciated.  Thanks!


I have a custom parent object A and a child object B.  When I create a new record from the child object B via the related list, only the parent lookup field is defaulted and filled in.  When I hit create new in the related list, I need to add more fields to be auto filled in.  Is there an appropriate solution to such issue?  Please advise if there is a way by using the process builder or some other means of automation processes?

I'm new in custom URL hacking.  I am trying to write a custom URL in a custom button. It is suppose to clone the User record, and while doing so, I want some user fields to be cleared. However, I need help identifying those fields IDs (e.g. Email, Name, etc).  How can i refer these fields when writing the custom URL code?


While reading slides to one of my courses I came across the following: $\sum_{i=0}^\infty {2i \choose i} a^i$. The original series was a little more complicated but is essentially equivalent to this one. In the slides, the professor had written that the series is equal to $\frac{1}{\sqrt{1 - 4a}}$.  Could you please provide me a hint on how to approach this problem? When I used Stirling's approximation I was able to obtain $1 + \sum_{i=1}^\infty \frac{1}{\sqrt{\pi i}} a^i$, is this the right way? My guess is not, since in the slides there is an equal sign, not an approximation.

I need to find the values of $a$ and $n$ in the following  $$ (1 + ax)^n  = \sum_{i=0}^\infty \binom{2i}{i}x^i$$  How can I compare things and show that $a=-4$ and $n = -{1 \over 2}$. It's easy to expand $1 \over \sqrt{1 -4x}$ see that it's valid but I'm looking other way around.


Somehow I learnt that the limit of $ne^{-an}$ (for $a > 0$) is $0$ as $n$ goes to infinity. I was trying to convert the expression to the form $\frac{e^{-an}}{\frac{1}{n}}$ and then use the L'Hôpital's rule but then I am getting the symbol $0\cdot \infty$ over and over again. How can prove it?

Intuitively it's easy, but hard to prove by the epsilon-delta method:  $$ \lim_{n \to \infty} n x^{n} = 0$$


I have an integer that may have the most significant bits different or equal.  I want to chekc for that.  Actually I do:   struct obj{   public:    Token t;   bool isNumber(){return t<<1>>1==t;}    Instead I would like to do something like:  struct obj{   public:   Token t;   bool isNumber(){t+t;return ProcessorOverflowFlag;}   Is there any way to do it in g++ or clang

I was writing a program in C++ to find all solutions of ab = c, where a, b and c together use all the digits 0-9 exactly once. The program looped over values of a and b, and it ran a digit-counting routine each time on a, b and ab to check if the digits condition was satisfied.  However, spurious solutions can be generated when ab overflows the integer limit. I ended up checking for this using code like:  unsigned long b, c, c_test; ... c_test=c*b;         // Possible overflow if (c_test/b != c) {/* There has been an overflow*/} else c=c_test;      // No overflow   Is there a better way of testing for overflow? I know that some chips have an internal flag that is set when overflow occurs, but I've never seen it accessed through C or C++.    Beware that signed int overflow is undefined behaviour in C and C++, and thus you have to detect it without actually causing it. For signed int overflow before addition, see .


I use Ubuntu Studio 20.04.1 LTS inside more than one computer, all of them are 64 bits system installations. One of them is a laptop, the others are desktop machines. All the computers share the same Internet modem unit, which has Wi-Fi signal. The desktop units are cable connected, the laptop is Wi-Fi connected. Can I use that Wi-Fi signal to share files between the desktop computers and the laptop unit? How?

I have a desktop (Ubuntu 13.04 & Win 7 Home Premium) and a Laptop (Ubuntu 12.04), both having WiFi adapters. I also have a WiFi router connected to internet which both my computers can access.  I want to share files between my desktop and my laptop using WiFi (similar to Homegroup on Windows 7 but without using Ethernet cables).  How do I set-up that?  I want to share files using both OSs, if anyone have have information about sharing files with any of the OS please answer!


Looking for Land Cover (aka Land Use) vector data for Saskatchewan / Manitoba Canada. Using  I can see the data but not download it as seen  Another source is  but they also seem to only have it in viewer format.

I'm very familiar with the Ontario Base Mapping Data, and am looking for similar data for other Canadian Provinces. Perhaps we can start a list of resources here? I'm looking for something at a larger scale than the standard NTS data.  Ontario Base Mapping - 1:10,000/1:20,000 (depending on latitude) - available from Land Information Ontario (via an ) or from


I have created a template class as following. I am new to this template concept.  template<class T> class tem_class {  private:     T obj; public:     tem_class();     void set_values(T x);     T disp_fun();  };   Then I tried to invoke this class in Widget class.  void Widget::on_pushButton_clicked()     {        int a,b;         a=5;         tem_class<int> obj2 ;         obj2.set_values(a);         b = obj2.disp_fun();     }   But I am getting following errors.  error: undefined reference to tem_class<int>::tem_class()  error: undefined reference totem_class::set_values(int) error: undefined reference to `tem_class::disp_fun()  error: collect2: ld returned 1 exit status

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


I am looking for shapefiles with ward boundaries for the following Indian cities: Mumbai (electoral wards), Hyderabad, Ahmedabad, Surat and Kolkata.  Does anyone has them or know where I can get them from?

Does anyone know how to find a shapefile with boundaries of Indian municipalities?   I have tehsil boundaries as for year 2001, but I would like boundaries of municipalities and, ideally, also historic ones.    I believe Census of India has the information but I couldn't find any maps or shapefiles...


Many scientists have now come to the conclusion that a big bang might not explain the 'start' of the universe and are coming up with alternatives. Could it be that gravity is dependent on the expansion of the universe? Could it not increase as the expansion of the universe continues?   This would of course be true in reverse, as the the universe contracts to a near point, gravity becomes repulsive and causes 'a big bang'?  Is any of this plausible? I've been contemplating the universe for too long. Since our frames do not allow for measuring on a universe scale, perhaps we can't determine differences in the constant?

Is the  $G$ a fundamental  like Planck constant $h$ and the speed of light $c$?


It's a very simple question actually, but someone asked this to me suddenly and I got confused       He lent me a book.      In this sentence, is the object book (the thing being lent) or me (the one who is being lent the book)?    How can we determine the object in this sentence?

Given the sentence:     I gave Tom a cup.   I can say, that  I is the subject.   But what is object here:  "Tom" or "a cup"   ?


i have some folders/files in Recent items of windows.what i want to do is i want to know real path of all the files/folders of .lnk shortcuts present in Recent Items.I want result like this. Local path      : C:\Program Files (x86)\Windows Live\Mail\wlmail.exe  My code is given  /*  * To change this license header, choose License Headers in Project Properties.  * To change this template file, choose Tools | Templates  * and open the template in the editor.  */ package sir.aimal;  import java.io.File; import java.io.IOException; import java.nio.file.Files; import java.nio.file.LinkOption; import java.nio.file.Path; import java.nio.file.Paths; import java.nio.file.attribute.BasicFileAttributeView; import java.nio.file.attribute.BasicFileAttributes; import java.nio.file.attribute.FileTime; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date;  /**  *  * @author zeeshan  */ public class SirAimal  {       public static void main(String[] args) throws IOException     {         String user=System.getProperty("user.name");         String path="C:\\Users\\"+user+"\\AppData\\Roaming\\Microsoft\\Windows\\Recent\\";          File directory = new File(path);         File[] fList = directory.listFiles();          for (int i=0;i<fList.length;i++)         {             String filename=fList[i].getName();             String actualfilename=filename.replace(".lnk", "");              Path p = Paths.get(path+filename);               BasicFileAttributes view= Files.getFileAttributeView(p, BasicFileAttributeView.class).readAttributes();             FileTime fileTime=view.creationTime();             System.out.println(actualfilename+"\t\t"+new SimpleDateFormat("dd/MM/yyyy HH:mm:ss").format((fileTime.toMillis())));           }      }   }

I'm currently using Win32ShellFolderManager2 and ShellFolder.getLinkLocation to resolve windows shortcuts in Java. Unfortunately, if the Java program is running as a service under Vista, getLinkLocation, this does not work. Specifically, I get an exception stating "Could not get shell folder ID list".  Searching the web does turn up mentions of this error message, but always in connection with JFileChooser. I'm not using JFileChooser, I just need to resolve a .lnk file to its destination.  Does anyone know of a 3rd-party parser for .lnk files written in Java I could use?  I've since found unofficial documentation for the .lnk format , but I'd rather not have to do the work if anyone has done it before, since the format is rather scary.


I have a laptop running Ubuntu 14.04, but I'm having WiFi connectivity issues. When I switch on the laptop, it can connect to WiFi with no problems, but after some time that the WiFi was on (connected or disconnected), the WiFi stops working. It shows that it is connected, but the internet connection doesn't work. If I disconnect and try to reconnect, it won't connect again to any WiFi (but Ethernet always works). I've tried to put it on airplane mode, disabling WiFi, killing wifi-manager, using a USB wireless adapter, but nothing short of rebooting works to get the WiFi back up.  I presume that the reason it works is because rebooting causes a specific service or program that is causing the issue to restart.  My question is, does anyone know how I can restart that WiFi connectivity service that is causing the issue without having to restart the whole computer?  EDIT:  The outputs of lspci -knn | grep Net -A3 are:  02:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8723BE PCIe Wireless Network Adapter [10ec:b723]     Subsystem: Lenovo Device [17aa:b736]     Kernel driver in use: rtl8723be

I have installed Ubuntu 15.04 on my laptop with RTL8723BE Wi-fi card. But it is always disconnecting from network. I have tried echo "options rtl8723be fwlps=N ips=N" | sudo tee /etc/modprobe.d/rtl8723be.conf but that didn't helped. What can I do to prevent the wifi from disconnecting? If I upgrade to kernel 4.X, will it help?  ~$ lspci -knn | grep Net -A2  09:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8723BE PCIe Wireless Network Adapter [10ec:b723]     Subsystem: Hewlett-Packard Company Device [103c:2231]     Kernel driver in use: rtl8723be   ~$ rfkill list 0: hci0: Bluetooth     Soft blocked: yes     Hard blocked: no 1: phy0: Wireless LAN     Soft blocked: no     Hard blocked: no   ~$ ifconfig && iwconfig && route -n && ping -c 1 google.com eth0      Link encap:Ethernet  HWaddr 38:63:bb:cd:4a:7e             UP BROADCAST MULTICAST  MTU:1500  Metric:1           RX packets:3 errors:0 dropped:0 overruns:0 frame:0           TX packets:53 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000            RX bytes:752 (752.0 B)  TX bytes:8445 (8.4 KB)  lo        Link encap:Local Loopback             inet addr:127.0.0.1  Mask:255.0.0.0           inet6 addr: ::1/128 Scope:Host           UP LOOPBACK RUNNING  MTU:65536  Metric:1           RX packets:3870 errors:0 dropped:0 overruns:0 frame:0           TX packets:3870 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:0            RX bytes:314613 (314.6 KB)  TX bytes:314613 (314.6 KB)  wlan0     Link encap:Ethernet  HWaddr c0:38:96:6d:c4:83             inet addr:192.168.1.205  Bcast:192.168.1.255  Mask:255.255.255.0           inet6 addr: fe80::c238:96ff:fe6d:c483/64 Scope:Link           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1           RX packets:15240 errors:0 dropped:0 overruns:0 frame:0           TX packets:14627 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000            RX bytes:14410285 (14.4 MB)  TX bytes:2192744 (2.1 MB)  eth0      no wireless extensions.  wlan0     IEEE 802.11bgn  ESSID:"DIR-615"             Mode:Managed  Frequency:2.437 GHz  Access Point: 00:90:4C:08:00:0D              Bit Rate=150 Mb/s   Tx-Power=20 dBm              Retry short limit:7   RTS thr=2347 B   Fragment thr:off           Power Management:off           Link Quality=70/70  Signal level=-22 dBm             Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0           Tx excessive retries:0  Invalid misc:186   Missed beacon:0  lo        no wireless extensions.  Kernel IP routing table Destination     Gateway         Genmask         Flags Metric Ref    Use Iface 0.0.0.0         192.168.1.1     0.0.0.0         UG    400    0        0 wlan0 169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 wlan0 192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 wlan0 PING google.com.Dlink (172.26.136.19) 56(84) bytes of data. 64 bytes from 19.136.26.172.in-addr.arpa (172.26.136.19): icmp_seq=1 ttl=249 time=102 ms  --- google.com.Dlink ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 102.547/102.547/102.547/0.000 ms


I've seen some questions with score 5+ on the verge of getting closed and sometimes I thought "Mmmh that's a shame".  I know I can vote to re-open but perhaps we don't have to go through that. Surely a high score is indicative of a "question of interest" and should perhaps be taken into account in the vote-to-close system.  Allow me to nuance that though: closing a high-score question as a duplicate is perfectly fine to me (and is the right thing to do) but apart from that, is it ok for me to close a question I think is off-topic and ignore everybody who think otherwise?  Couple of suggestions:   Increase VTC threshold Has to be VTCed by a relevant bronze tag badge holder   Something similar to  but the other way round ;)

I see a lot of good, well-writen and constructive questions (that are probably not only good for me) closed, by various reasons which I fail to digest, so I propose the idea that questions with n upvotes should not be closable.  This would be in my opinion very much in the spirit of "", and unless I'm wrong, it would be beneficial for the users to choose by themselves whether the site should have or not x question. The ones which are low quality never get many upvotes anyway.  The only cons I can think of are... DB space? And at a minimum there's the pro of more popular pages with more ads (for the admins), and questions people like (for the users).  I'm also counting for , in the lines of Google's "", but questions  are more like what I'm aiming at (probably that question has not many upvotes for this though).


Is there any uncountable subset of Real numbers whose intersection with its limit points is empty set.

Given any uncountable subset $S$ of the unit interval. Then $S$ clearly has an accumulation point and indeed uncountably many (which might also be a nice exercise). So my question is: Is there an accumulation point, that again lies in $S$?


First time asking so be gentle.  I am having a problem with a returning a custom type for a function. To be more specific, I have a linked list, and I am writing a function that traverses to the end of the list and returns a pointer to that node. Unfortunately, I am getting a pesky error:  "Return type out-of-line definition of mySpace::CDAL::tailNode differs from that in the declaration"  The header file contains within the "mySpace" namespace and the template class CDAL  private:  struct Node {....};   the function header   Node* tailNode();   and in the .cpp  template <typename T> struct Node* mySpace::CDAL<T>::tailNode() {...}   I tried using struct because someone had mentioned for non-typedef declarations you sometimes would need it, and I no longer received the unknown type error, but received this instead.  Thanks in advance for any help.


So I am trying to argue that the set of points in $[0,1]$ which will not have $4$ in their decimal expansion has measure $0$. So I am thinking to construct a step function such that this set is a null set hence it will have measure $0$. But I am kind stuck in constructing such step functions, any hints?

I just came across an exercise that asks to show that set of numbers in $[0,1]$ which possess decimal expansion not containing the digit $5$ has measure zero. How do I approach this? I tried thinking of relating this to Cantor set but, I see that numbers whose decimal expansion contains the digit $5$ are both contained in the Cantor set as well in its complement too, I thought if it was in the Cantor set and since measure of Cantor set is zero, so it's measure will be zero but this does not happen. In fact how is this set measurable? Any idea?


Hi guys can someone help me with this ?(Without using Modular arithmetic)  Show that if $p$ is a prime number $>3$ then $24$ $\mid$ $p^2-1$

Let $p>3$ be a prime. Prove that $24 \mid p^2-1$.   I know this is very basic and old hat to many, but I love this question and I am interested in seeing whether there are any proofs beyond the two I already know.


The earrings were screwed in. "How do I look?" We said, "Beautiful."   This sentence is from"Dreams do come true" by Jim Bishop.  In this sentence,I want to know the sentence "how do I look?"  is the same in meaning "what do I look like?.

I have heard "What does she look like" said a lot and sometimes "How does she look like?". Is there any difference between them, if yes What is the difference between them?


Let's say I get a Popular Question badge on one of my questions. If I remove that question, will I lose that badge?

What are badges? How do users get badges? How can users get tag badges? Can badges be lost/revoked/taken away after they are awarded? If so, how and when? How can I suggest a new badge?   For more information, see "" and the  in the .


I'm doing a linear regression with cluster robust SE and I have the following conceptual problem: I have five regressors, of which four are statistically significant, while the remaining regressor is not.  When I put $K$ dummy variables in the model in order to control for effects not captured by the $5$ initial explanatory variables, I saw that:   Some dummy variables were statistically significant The regressor that initially was not significant becomes significant.   What is the reason for the second result? What does it mean?

I have what is probably a simple question, but it is baffling me right now, so I am hoping you can help me out.  I have a least squares regression model, with one independent variable and one dependent variable. The relationship is not significant. Now I add a second independent variable. Now the relationship between the first independent variable and the dependent variable becomes significant.  How does this work? This is probably demonstrating some issue with my understanding, but to me, but I do not see how adding this second independent variable can make the first significant.


For the continuous function $f : [a,b] \to \Bbb R$  Let $g(x) = \max\{f(y) : a \le y \le x \}. x\in[a,b]$ Show $g(x)$ is continuous  I tried to use $\epsilon\text{-}\delta$ first, but I failed. I thought that this function is continuous because of pasting lemma. Can you give me a few hints to show this.. ?

Suppose $f(x)$ is continuous on the closed interval $[a,b]$. Define $m(x)=\max_{a\leq s\leq x}\, f(s)$, $a\leq x\leq b$. Is $m(x)$ continuous necessarily? Thank you.


In the following snippet I have a input and a delete button next to it. They can be cloned and each delete button has a function that tells me which input is trying to be deleted.  The weird thing is that it works perfectly when I run the snippet.  In my browser the cloned buttons are not calling the function, only the original one does. Also, the title "Remove" appears only on the first button, even when I hover the mouse on any other button.  What could be causing this issue?  I am using the same versions of everything in the snippet.    $("#clone").click(function() {   var currentCount = $("#tablePhones tbody tr").length;   var newCount = currentCount + 1;    $('#tablePhones tbody>tr:last').clone(true).insertAfter('#tablePhones tbody>tr:last');   $('#tablePhones tbody>tr:last').find("input, a").each(function() {     var newId = $(this).attr("id").replace("_" + currentCount, "_" + newCount);     var newName = $(this).attr("name").replace("_" + currentCount, "_" + newCount);     $(this).attr("id", newId).attr("name", newName);     if ($(this).is("input")) {       $(this).val("");     }   }); });  $(".btn.remove").click(function() {   name = $(this).attr("name");   console.log(name); }); td .btn.aligned {   position: absolute;   margin-top: 7px;   float: right;   margin-left: 5px; }  td input {   float: left;   margin-bottom: 10px; }    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">       Clone

     Phone numbers

           <input type="text" name="phone_1" id="telefono1_1" class="form-control" />

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


I have an SQL 2008 R2 Server that is hosting multiple databases.  Is it possible to create a new database and create the tables based on the schema of an existing one?  For example database_1 contains approx 200 tables and full of data. I would like to create a new database called, say, tenant_1 that is based entirely on database_1 but without any data at all.  Both databases are on the same server and in the same SQL instance.  I also need to do all that via an SQL query without any interaction of the SQL Management Studio GUI.  Is that possible?

I've spent a good amount of time coming up with solution to this problem, so in the spirit of , I'm posting it here, since I think it might be useful to others.   If anyone has a better script, or anything to add, please post it.  Edit: Yes guys, I know how to do it in Management Studio - but I needed to be able to do it from within another application.


Looking libunwind.h docs(),  All functions(ex.libunwind-ia64(3), unw_get_proc_name(3)) have fnc name + (3). What means (3)?

For example: man(1), find(3), updatedb(2)?   What do the numbers in parentheses (Brit. "brackets") mean?


I am training a 4-class neural network classifier.  The details of my data are:  featurelength = 280                training      testing --------------------------------------------- no. samples      438           250 samples class1   203           135 samples class2   19            10 samples class3   16             5 samples class4   200           100         After I train the neural network.  The confusion matrices are as follows:  203 0 0 0  19  0 0 0 16  0 0 0 200 0 0 0   Similarly for test data too. All the data is predicted to be of class 1.  How can I debug this issue? What is the reason behind such performance? In addition to this, no. of samples for class 2 and class 3 are very less. How can I make sure that they are not dominated?

I'm training a neural network but the training loss doesn't decrease. How can I fix this?  I'm not asking about overfitting or regularization. I'm asking about how to solve the problem where my network's performance doesn't improve on the training set.    This question is intentionally general so that other questions about how to train a neural network can be closed as a duplicate of this one, with the attitude that "if you give a man a fish you feed him for a day, but if you teach a man to fish, you can feed him for the rest of his life." See this Meta thread for a discussion:   If your neural network does not generalize well, see:


This is my code for print: "url = ("https://etherscan.io/address/%s"address)" and i got SyntaxError: invalid syntax  My Python version is 3.7 and i'm new to python I think %s is the problem, i'm not what replacement of that in Python 3.7

I want to do something like String.Format("[{0}, {1}, {2}]", 1, 2, 3) which returns:  [1, 2, 3]   How do I do this in Python?


Given $n\in\mathbb N$, there exists a non-negative integer $a$ and an odd integer $b$ such that $n=2^a\cdot b$  Base Case: $n=1 =2^0\cdot1$  I.H: Assume its true for $n=1,2,\ldots,k$  How would i prove this?

Can someone guide me in the right direction on this question?  Prove that every $n$ in $\mathbb{N}$ can be written as a product of an odd integer and a non-negative integer power of $2$.  For instance: $36 = 2^2(9)$ , $80 = 2^4(5)$ , $17 = 2^0(17)$ , $64 = 2^6(1)$ , etc...  Any hints in the right direction is appreciated (please explain for a beginner). Thanks.


$$\int^1_{0}\frac{\ln (x+1)}{x^2+1}dx$$  I'm having trouble solving this one.   I tried trigonometric subst. but that doesn't get me far:$$\int^1_{0}\frac{\ ln (tan\theta+1)}{\sec^2\theta}\sec^2\theta dx$$  After this if I u-subst. using integration by parts, I just end up undoing the trig subst.  And I've tried multiplying by $\frac{2}{2}$ to get it to the form:  $$\int^1_{0} \frac{1}{2} \frac{\ln (x+1)^2}{x^2+1}dx$$  and I couldn't think of anything after that.  Did I miss something? And does anyone have any other ideas? Thanks.


I'd like to know if it's correct to use ING + ING together in that sentence (i.e. seeing & dancing). I've seen people use both of these options, but I don't know if they are both correct.

"Heard me [infinitive]" vs. "heard me [present participle]"             At that time, you wouldn't have heard me talk about it.   At that time, you wouldn't have heard me talking about it.         At that time, you wouldn't have heard me condemn it.   At that time, you wouldn't have heard me condemning it.         Which one of the above sentences are incorrect and why?


I have problems doing this exercise:     Let $G$ be a group and $Z(G)$ the center of $G$.      Prove: If $G/Z(G)$ is cyclic, then $G$ is an abelian group.   My attempt:  I think that I have to show $G/Z(G) = \{G\}$, since from this it follows $Z(G) = G$, and so $G$ is abelian. Maybe one way of proving that $G/Z(G) = \{G\}$ is by showing $|G/Z(G)|=1$.   $G/Z(G) \neq \emptyset$ should be clear. Now let's take $g_1Z(G), g_2Z(G) \in G/Z(G)$ aribtrary, and show that they are equal.   Since $G/Z(G)$ is cyclic, I know that there is a $k \in \mathbb{N}$ so that $g_1Z(G) = (g_2Z(G))^k = g_2^kZ(G)$. Since $Z(G)$ is the center, I think I should use that the elements of $Z(G)$ commutate with the elements of $G$. But I have no idea, how I can continue now.  Tank you for your help.  Regards,  S. M. Roch

Possible Duplicate:             If $G$ is a group and $Z(G)$ the center of $G$, show that if $G/Z(G)$ is cyclic, then $G$ is abelian.  This is what I have so far:  We know that all cyclic groups are abelian. This means $G/Z(G)$ is abelian.  $Z(G)= \{z \in G \mid zx=xz \text{ for all } x \in G \}$.  So $Z(G)$ is abelian.    Is it sufficient to say that since $G/Z(G)$ and $Z(G)$ are both abelian, $G$ must be abelian?


Which will run faster: four 1GB sticks of DDR2 RAM, or two 2GB sticks? Will they run at the same speed? I'm just curious since they are sold in both sizes, and I have four slots, but only two sticks currently. I would imagine the 2GB sticks would be faster, but I can see how the 1GB sticks could as well.

I'm building a Core  system which supports dual-channel memory (up to 16 GB in four DIMMs), my target is 8 GB. From the performance perspective, is it better to have two times 4 GB or four times 2 GB?


I was thinking about some physics (relativity in particular), when it suddenly occurred to me that all my life I had been balancing chemical equations assuming conservation of mass, but I was disregarding energy!  For example, consider combustion: $$\rm CH_4 + 2O_2 \to 2H_2O + CO_2 + {Energy}$$  However, since energy was released, some mass should have been converted to energy right? Why is the equation reflecting a balance in mass?

Is mass converted into energy in exothermic chemical/nuclear reactions?  My (A Level) knowledge of chemistry suggests that this isn't the case. In a simple burning reaction, e.g.   $$\mathrm{C + O_2 \to CO_2}$$  energy is released by the $\mathrm{C-O}$ bonds forming; the atoms lose potential energy when they pull themselves towards each other, in the same way that a falling object converts GPE to KE. There are the same number of protons, electrons etc. in both the reactants and products. I would have assumed that this reasoning extends to nuclear fission/fusion as well, but one physics textbook repeatedly references very small amounts of mass being converted into energy in nuclear reactions.  So I just wanted to know if I was wrong about either of these types of reactions, and if so, what mass is lost exactly?


When Eva was first diagnosed with diabetes she was twenty.  When Eva was firstly diagnosed with diabetes she was twenty.  Which one is grammatically correct to say and as I know both first and firstly we can use as an adverb.

Take it for granted that enumerations have secondly, …; thirdly, …; finally, … Is there any reason, except tradition, to prefer the traditional first to firstly?


I lost a point on my test because I put after all my math work, "converges at $0$" not "converges to $0$". Should I argue with my teacher about this or is there a reason why I am wrong?

Some students write, e.g., "$\sum(1/n^2)$ converges at $\pi^2/6$", where I would write "converges to".  Are there regions of the English-speaking world where it is standard to say "converges at"? Or should this be considered a mistake made by non-native speakers of English?


I have tried to solve the below problem, and think I went very close to getting the answer but have been unsuccessful so far. Below is the problem and my proof.  Suppose that $f:[a,b] \to \mathbb{R}$ is differentiable. Show that if $f(a)=f(b)=0$, then   $$|f'(c)|\ge \frac{4}{(b-a)^2}\int_a^b f(x)dx$$ for some $c\in (a,b)$.  Proof: Let $M=sup\{|f'(x)|:x\in (a,b)\}$. THen if $M=\infty$, the inequality clearly holds for some $c\in (a,b)$. So assume $M$ is finite.  Then for any $x\in [a,\frac{a+b}{2}]$, by the Mean Value Theorem, there is some $c_x\in (a,x)$ such that   $$f(x)=f(x)-f(a)=f'(c_x)(x-a)\le M(x-a)$$.  Also for any $x\in [\frac{a+b}{2},b]$ by the Mean Value Theorem, there is some $d_x\in (x,b)$ such that   $$f(x)=f(x)-f(b)=f'(d_x)(x-b)=-f'(d_x)(b-x)\le M(b-x)$$.  So we have $\int_a^b f(x)dx=\int_a^{(a+b)/2}f(x)dx+\int_{(a+b)/2}^b f(x)dx\le M\int_a^{(a+b)/2}(x-a)dx+M\int_{(a+b)/2}^b(b-x)dx=\frac{M}{2}(\frac{b-a}{2})^2+\frac{M}{2}(\frac{b-a}{2})^2=M(\frac{b-a}{2})^2.$  Hence, we have $M\ge \frac{4}{(b-a)^2}\int_a^b f(x)dx$.  However, since $M$ is only the supremum of the set $\{|f'(x)|:x\in (a,b)\}$, this does not guarantee that there is some $c\in (a,b)$ which satisfies the inequality.  How can I solve this problem? I would greatly appreciate any suggestions or solutions.

Let ${\rm f}:\left[a, b\right]\to\mathbb{R}$ be twice differentiable, and suppose   $$\lim_{x\to a^{+}} \frac{{\rm f}\left(x\right) - {\rm f}\left(a\right)}{x - a} = \lim_{x\to b^{-}}\frac{{\rm f}\left(x\right) - {\rm f}\left(b\right)}{x - b} =0 $$  Show that there exists $\xi \in \left(a, b\right)$ such that $\displaystyle{% \left\vert\vphantom{\Large A}\,{\rm f}''\left(\xi\right)\right\vert \geq \frac{4\left\vert\vphantom{\Large A}% \,{\rm f}\left(a\right) - {\rm f}\left(b\right)\right\vert} {\left(b - a\right)^{2}}}$.  I don't know how to start. Any hints ?.


Can I install Ubuntu on a partition formatted as NTFS, instead of EXT4?  After installing Ubuntu 11.10 using ext4, I keep on getting disk errors at boot up.  But on this same harddrive, I have Windows 7, and I don't get these errors.  So I wanted to try NTFS, instead of EXT4, and see if it makes any difference.  The harddrive is about 5 years old.  So if it is failing, I would think it would be giving trouble in Windows just as well.

The Ubuntu installer does not allow me to install on NTFS partitions, but certain circumstances requires me to do so. Is it possible?


Assuming following case:  Logger logger = new ConsoleLogger();    Shouldn't that be  ConsoleLogger logger = new ConsoleLogger()   Why is the name on the left side different to the name on the right side?

I have seen this mentioned a few times and I am not clear on what it means. When and why would you do this?   I know what interfaces do, but the fact I am not clear on this makes me think I am missing out on using them correctly.   Is it just so if you were to do:  IInterface classRef = new ObjectWhatever()   You could use any class that implements IInterface? When would you need to do that? The only thing I can think of is if you have a method and you are unsure of what object will be passed except for it implementing IInterface. I cannot think how often you would need to do that.   Also, how could you write a method that takes in an object that implements an interface? Is that possible?


The end of life of PHP 7.0 is planned for December 3, 2018 but Ubuntu's support for version 16.04 LTS ends in 2021.  The question is, what happens to PHP 7.0 from December? Does Canonical assume updates until 2021? If a security bug is discovered, for example in 2019, does it remain unpatched?  Thank you very much.

I'm using PHP 5.3 and need to remain on PHP 5.3 for the foreseeable future. Please don't suggest upgrading -- for my setup, it's simply not possible at this stage.  I'm currently evaluating which OS to choose for my new server. I'd prefer to use Debian Wheezy (on which I'd leverage apt's pinning system to pull PHP 5.3 packages from Squeeze), but the latest Ubuntu LTS includes PHP 5.3 and is supported until 2017.  Here's what I'm wondering: PHP 5.3 goes EOL in less than a year. When it's abandoned, will Canonical abandon it as well, or will they backport security fixes from PHP 5.4+ (where applicable) until 2017?


I'm trying to find a way to grep how many messages in a file are older than 14 days and have a value of number of results return  Example going with today's date of 20160616. $grep 'Put Date' filename:  Put Date     :'20160425' Put Date     :'20160501' Put Date     :'20160514' Put Date     :'20160609' Put Date     :'20160610' Put Date     :'20160616'   The results should see the following are older than 14 days and would return 3 :  Put Date     :'20160226' Put Date     :'20160501' Put Date     :'20160514'

I'm stuck on how I can go about deleting lines that are newer than given date. Here is a snippet of contents of a file.  buildsave.txt  647919 2013/11/30 647946 2013/11/30 647955 2013/12/01 648266 2013/12/03 648267 2013/12/03 648674 2013/12/04   I would like to remove the lines that are newer than 2013/12/03 leaving only  647919 2013/11/30 647946 2013/11/30 647955 2013/12/01   How can this be done through bash?


I am currently dual booted with Windows 10 and Ubuntu 16.04 LTS, I had provided ubuntu with a petty 70 gbs and alloted the remaining storage of my 500 gb(i.e around 420 gbs in three partitions) HDD to windows 10, but recently I have been using ubuntu alot, now I think 70 gb is quite small for the usage I have.  So I want to reinstall ubuntu by taking 1 partitions from windows and merging it existing ubuntu partition and then reinstalling. In that way I won't be losing my windows data.  Is there anything I need to take care of before proceeding to this, as I recall I might encounter a problem which will disable my access to windows  into boot/grub menu or vice versa.  How do I avoid such instances?

I want to install a new Ubuntu on a drive where a previous Ubuntu system is already installed beside Windows7.  The first option says that only Ubuntu will be replaced.   The second says that all will be erased.  I only want Ubuntu replaced with the  new one while keeping Windows7 untouched.  Is the first option (“Erase Ubuntu16.10 and reinstall”) the good one in this case?


How many arrangements of GRACEFUL have no pair of consecutive vowels?   Soln:  Breaking up the question into pieces:   First I found the total amount of arrangememts possible with GRACEFUL:  $$8!$$  Next I went about finding all the possible arrangements with consecutive vowels:  Letting V'= double vowel and V = single vowel I am left with the string:                     "VV'GRCFL"   This could be arramged in $$(7!)(3)(2)$$ types of ways.   Therefore to find arrangements with no consecutive vowels: $$8! - (7!)(3)(2)$$ Where 3 was for the ways the single vowel could be chosen and 2 was for the possible arrangements of the double vowel  Initially I had split the consecutive vowels into a set of 3 and the sets of doubles,  but I realized I could count all arramgements together.  I feel there may be an easier way using the method I applied which was with some assistance from the text.    Did I approach correctly?  Ways to improve?   Edit: The solution by N.F Taussig is a very well written explanation that really provides a visual of what I did wrong and would serve as a guide for others

The total letter arrangements for the word GRACEFUL is 8!.   The question is: What fraction of all arrangements of GRACEFUL have no pair of consecutive vowels?  Now the three vowels in this word are A, E, and U. They can appear consecutively in 3P3 ways so this can be handled in 8! / 3P3 ways. But it is also possible that any two can appear consecutively.  So would the answer be: 8! / (3P3) * 2! * 3?


I run the following code in the anonymous apex window. As you can see the accounts variable was declared inside an IF block. I output a debug outside of the IF block and the heap size was still showing the same number as it was inside the IF block. My questions are:  Why was the heap size not 'cleared' even though the accounts variable was not accessible anymore beyond the IF block? Why is the "Maximum heap size" limit shown as 0? Is setting the variable as null (to reduce the heap size?) a best practise?  System.debug(Limits.getHeapSize()); if (true) {     List<Account> accounts = [SELECT Name FROM Account];     System.debug(Limits.getHeapSize()); } // System.debug(accounts);  Variable does not exist: accounts System.debug(Limits.getHeapSize());   This is the output: |USER_DEBUG|[1]|DEBUG|1047 |USER_DEBUG|[4]|DEBUG|4346177 |USER_DEBUG|[7]|DEBUG|4346177 |LIMIT_USAGE_FOR_NS|(default)|   Maximum heap size: 0 out of 6000000  Notice that the heap size is still the same as previous (inside the IF block). If I set the accounts variable to null, the heap size is going back to close to the original size: System.debug(Limits.getHeapSize()); if (true) {     List<Account> accounts = [SELECT Name FROM Account];     System.debug(Limits.getHeapSize());     accounts = null; } System.debug(Limits.getHeapSize());   Output: |USER_DEBUG|[1]|DEBUG|1049 |USER_DEBUG|[4]|DEBUG|4346177 |USER_DEBUG|[7]|DEBUG|1061 Maximum heap size: 0 out of 6000000  Thanks.

I have been investigating a potential heap size problem in our production code, and I wanted to recreate some simple elements through the developer console.  To cause a heap size exception, I would select every standard field from account for 50,000 accounts into a list.  System.debug('Heap size before query = ' + Limits.getHeapSize() + ', out of maximum ' + Limits.getLimitHeapSize()); List<Account> accs = [select AccountNumber, AccountSource, AnnualRevenue, BillingCity, BillingCountry, BillingPostalCode, BillingState, BillingStreet,                              CreatedById, CreatedDate, CurrencyIsoCode, Description, Fax, FirstName, Id, Industry, IsCustomerPortal,                              IsDeleted, IsPersonAccount, Jigsaw, JigsawCompanyId, LastActivityDate, LastModifiedById, LastModifiedDate, LastName,                              MasterRecordId, Name, NumberOfEmployees, OwnerId, Ownership, ParentId, PersonBirthdate, PersonContactId, PersonEmail,                              PersonEmailBouncedDate, PersonEmailBouncedReason, PersonHomePhone, PersonLastCURequestDate, PersonLastCUUpdateDate, PersonLeadSource,                              PersonMailingCity, PersonMailingCountry, PersonMailingPostalCode, PersonMailingState, PersonMailingStreet, PersonMobilePhone, PersonOtherCity,                              PersonOtherCountry, PersonOtherPostalCode, PersonOtherState, PersonOtherStreet, PersonTitle, Phone, Rating, RecordTypeId, Salutation, ShippingCity,                              ShippingCountry, ShippingPostalCode, ShippingState, ShippingStreet, Sic, SicDesc, Site, SystemModstamp, TickerSymbol, Type, Website                       from account                       limit 50000]; System.debug('Heap size after query = ' + Limits.getHeapSize() + ', out of maximum ' + Limits.getLimitHeapSize());   This is a full copy sandbox and there are over 50,000 accounts. My expectation was that this would fail with a heap size limit exception.  Instead I get the output:  USER_DEBUG [1]|DEBUG|Heap size before query = 1069, out of maximum 6000000 USER_DEBUG [12]|DEBUG|Heap size after query = 33931975, out of maximum 6000000   Notice the heap size used is 34MB and the limit 6MB but no exception occurs. I have done some more experiments and I can iterate over the list and carry on executing code with the heap size above this level.  Here are the limit usage stats which seem to show 0 heap usage.    I can't find anywhere that this is expected behaviour for the developer console. My understanding was that the limits apply in all contexts.  Can anyone shed any light on this?


I have the following map: Map<InputTypeEnum, List<Object>> objectsMap;  objectsMap.put(InputTypeEnum.Text, textList); objectsMap.put(InputTypeEnum.Number, NumbersList); objectsMap.put(InputTypeEnum.Symbols, SymbolsList);  I want to iterate through the Map and print to console the number of objects in list per InputTypeEnum. for example:  "the text list has 4 elements" "the numbers list has 2 elements" "the symbols list has 5 elements"  I couldn't find any example here, or in google. thanks for the help!

If I have an object implementing the Map interface in Java and I wish to iterate over every pair contained within it,  what is the most efficient way of going through the map?  Will the ordering of elements depend on the specific map implementation that I have for the interface?


Can anyone help? I keep hearing a 3 second high pitched beep but can't quite tell where it is coming from n our lounge where our home theatre system is, i.e. LED TV, receiver, speakers, blu ray player, modulator, router, Foxtel box and modem. There are a couple of cable connector boxes behind the system also. I thought it was our fire detectors but I took out the batteries and I could still hear this beep lasting about 3 seconds every 15 minutes. I unplugged the power for the TV and waited 15 minutes - I could still hear the beep. I unplugged the router - still could hear the beep. I unplugged the Foxtel box - still could hear the beep. I unplugged the receiver - still heard this annoying beep.  Any ideas? Thanks John in Canberra, Australia

I know this sounds like a silly question and it may be closed before it may get a single answer but there is something strange in my house which beeps infrequently. I tried to troubleshoot the sound but no luck. I thought may be its coming from the living room but there is nothing special in the living room which may make a beep sound.  Can someone point me what should i look for to figure out what is making this sound?


Sentence 1: A is friend of B who is eating an apple.  Sentence 2: A is friend of B , who is eating an apple.  In which Sentence it can be said that A is eating apple? Does the usage of comma change the context of who is eating apple?

Maya is sister of dhara who is doctor. Maya is sister of dhara, who is doctor.   In both statements who is used for which person???


I am making a rock paper scissors program. I want the user of the program to enter either rock, paper, or scissors (hence the imported scanner) and I want the computer to choose a random number (I will import a java.util.Random) that corresponds to another rock, paper, or scissor.  So I am trying to make the program RECOGNIZE a word as something significant. That is to say, if the user inputs "rock" in the scanner, the computer will do some output. In the below code, I tried to get the computer to output "yes" if the user inputs "rock". To do this, I set a variable called "player" to be the inputted text, and a String rock to be the phrase "rock". I then said that if player=rock(="rock"), then we will get "yes".  There were no errors in the program. But when I inputted "rock" into the scanner, the program did nothing. What did I do wrong and how can I correct it?  import java.util.Scanner;  public class Refined {      public static void main(String[] args){         Scanner abc = new Scanner(System.in);         String rock = "rock";          String player;         System.out.println("Rock, Paper, or Scissors?");         player = abc.next();         if(player == rock){             System.out.println("yes");          }     }

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?


Let $a,b\in\mathbb{R}$ and $C^1([a,b])$ the space of the function that are continuously differentiable on the interval $[a,b]$. For $f,g\in C^1([a,b])$, let $$ d_{\infty}(f,g):=\lVert f-g\rVert_{\infty}:=\sup_{x\in [a,b]}\lvert f(x)-g(x)\rvert. $$          Show that $C^1([a,b]),d_{\infty})$ is not complete.      My idea is to use  $$ C^1([a,b])\subset C([a,b]),  $$ i.e. to find a sequence $(f_n)$ in $C^1([a,b])$ that converges to some $f\in C([a,b])$ with respect to the supremums norm $\lVert\cdot\rVert_{\infty}$ but which is not continously differentiable.   Then, $(f_n)$ should be a Cauchy sequence in $C^1([a,b])$ that does not converge in $C^1([a,b])$ (otherwise $f$ would be continously differentiable).  Now, I do have to find such a sequence... and did not have an idea yet.  EDIT  Maybe on $[-1,1]$ consider $$ f_n(x)=\sqrt{x^2+\frac{1}{n}},~~f(x)=\sqrt{x^2}. $$  $f(x)$ is not differentiable in $x=0$, hence not continuously differentiable on $[-1,1]$. The functions $f_n$ are continously differentiable on $[-1,1]$ and uniformly converge to $f$.

The space $ C^1[0,1] $- the space of all continuously differentiable functions on $ [0,1]$ is not a Banach space with respect to the sup norm,$ \|.\|_{\infty} $ since the uniform limit of a continuously differentiable function need not be differentiable.  How can I illustate this statement using a counter example? Can I use $ f_{n}=\frac1 n \sin nx $ as a counter example?  Also, is $ C^1[0,1] $ is same as the space given by $ X=\{f\in C^1[0,1]:f(0)=0 \}$. Can I use the same example to show that this is not a Banach space?  More help is appreciated! Thanks!


Prove that if $X$ is Hausdorff, $\Delta=\{(x, x)\mid x\in X\}$ is closed in $X\times X$ (with the product topology).  My attempt:  Let $x_1, x_2\in X$ s.t. $x_1\ne x_2$.  There exist neighborhoods $U_1$ and $U_2$ of $x_1$ and $x_2$ that are disjoint.  $U_1\times U_2$ is a basis element in the product topology on $X\times X$. So, $U_1\times U_2$ is open in $X\times X$.  Let $x\in X$.   $(x, x)\in U_1\times U_2\implies x\in U_1$ and $x\in U_2\implies x\in U_1\cap U_2$, which contradicts the fact that $U_1$ and $U_2$ are disjoint.  So, $(x, x)\notin U_1\times U_2$.  I feel that I'm on the right track but don't know how to proceed. Could someone please help me out?

Let $X$ be a topological space. The diagonal of $X \times X$ is the subset $$D = \{(x,x)\in X\times X\mid x \in X\}.$$   Show that $X$ is Hausdorff if and only if $D$ is closed in $X \times X$.   First, I tried to show that $X \times X \setminus D$ is open using the fact that $X \times X$ is Hausdorff (because $X$ is Hausdorff), but I couldn't find an open set that contains a point outside $D$ and is disjoint to it...


Stack trying to migrate a configuration from Linux to Windows Apache 2.2 (via WAMP)  We are trying to set an ENV Apache variable to be used as DocumentRoot and rest of directives thereafter so we can use the same set of confs on server and local working copies of developers.  In Debian Linux Apache we have an envvars file that is loaded with "EXPORT" directives. This does not work on Windows but   Setenv ROOT_TO_FILES "C:/wamp/www/test"   Seems to work as displayed by a phpinfo()  But when we use it inside a DocumentRoot directive of an vhost:  DocumentRoot ${ROOT_TO_FILES}    Apache looks for that literal text under its own root.  This is the way we use it in Linux but we've also tried the syntax of env=ROOT_TO_FILES  The apache doc seems clear about how to "define" but not how to use. Also I see Apache 2.4 includes a new "Define" directive that seems to do exactly this which makes me think that it might not possible in previous versions.  Any samples of use under Windows Apache would be appreciated.

This is a  about  the use of a *AMPP's stack.    I recently had a talk with some experienced people and they suggested to me not to use a WAMP stack, and instead install apache, mysql and php separately.  I don't understand why they have suggested this, though, so can anyone tell me?  Is there a particular disadvantage of WAMP, or a particular advantage to installing all of them separately?  Since a WAMP stack itself is composed of apache, mysql and php, then what's the difference between using the WAMP stack and installing them all separately?


I was bored with my bootloader, .. Can I change the theme of the bootloader, .. I was looking on google, and I found the burg,. but I could not use it because my pc is UEFI, .. I dual boot windows8.1 and ubuntu14.10

Grub is well Grub. How do I pimp it a bit with some nice themes?


I have the following tree, which I drew using the package forest:  \documentclass[border=2ex]{standalone} \usepackage{forest} \begin{document} \begin{forest} for tree={grow'=north, math content}     [u       [v_1]       [\cdots, no edge]       [f         [w_1]         [\cdots, no edge]         [w_m]       ]       [\cdots, no edge]% not centered :(       [g         [w_1']         [\cdots, no edge]         [w_n']       ]       [\cdots, no edge]       [v_k]     ] \end{forest} \end{document}    I hope my tree syntax is clear enough (it was originally a one-liner...). As you can see, the \cdots in the middle is not centered, which is what I would like. I'm not too certain how to approach this, as I'm sure there's something in forest that I do not know about which solves this problem for me. Could anyone point me towards a solution?  As a bonus, I would also be interested in understanding why this behavior occurs :)

I'm new to the forest package and created a tree with a node between two nodes, that is not centered. In the picture, it's the ZS(A; C) below root. This is the code:  \documentclass{standalone} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc}  \usepackage{forest}  \begin{document} \tikzset{>=latex}  \begin{forest} for tree={align=center} [TH(3; A; B; C), for children={l+=2ex}     [TH(2; A; C; B)          [TH(1; A; B; C)             [ZS(A; C)]         ]         [ZS(A; B)]         [TH(1; C; A; B)             [ZS(C; B)]         ]     ]      [ZS(A; C)]     [TH(2; B; A; C)         [TH(1; B; C; A)             [ZS(B; A)]         ]         [ZS(B; C)]         [TH(1; A; B; C             [ZS(A; C)]         ]     ] ] \end{forest}  \end{document}   What am I doing wrong?


I want to power a small device, that normally uses 4 AA/R6 batteries arranged in 2 pairs (so the device requires about 3V DC and drains probably 100mA or less).   Is it possible to cut an old USB cable, keeping the type-A connector to plug into an adapter or a computer, and solder the +5V and GND wires to a couple of components (to divide the voltage) then to the + and - of the battery compartment of the device?  The  suggests to avoid resistors to divide voltage. Is is still the case in the above example ? Is there another simple solution?

How would one go about using a 12 V DC power source to power something which needs 4.5 V DC using resistors? Is there a way to determine how much adding a resistor would drop the voltage?


Before I even try to experiment with MariaDB, could anyone tell me if MariaDB supports Materialized views? I can't seem to find it in their documentation.  This is one of my major issues with MySQL (the fact that it does not have materialized views out of the box). This is a major feature for me in a database, and I would like to know if MariaDB supports it.

I am using MySQL 5.6. I am not being able to a create materialized view like I can in Oracle. I have seen one or two solutions like Flexview.  Can anybody tell me best way to create a materialized view in MySQL (auto refresh like in Oracle ) with the minimum of complexity?


There is this famous probability problem called . The problem is: If a stick of length x is broken into three pieces, what is the probability that the three pieces can be used to construct a triangle? In order to construct a triangle, the longest side should be less than $\dfrac{x}{2}$. Here's my approach: Let $E$ = Event that the stick can be broken into three pieces that can create a valid triangle $A$ = Event stick 1 is longer than $\dfrac{x}{2}$ $B$ = Event stick 2 is longer than $\dfrac{x}{2}$ $C$ = Event stick 3 is longer than $\dfrac{x}{2}$ If any of the sticks is longer than $\dfrac{x}{2}$, a triangle can't be constructed. Thus: $E^c$ = $A \cup B \cup C$ $A$, $B$, and $C$ are disjoint, since only one of the sticks can be longer than $\dfrac{x}{2}$ $P(A) = \dfrac{1}{2}$ which is derived by simple continuous uniform probability, which is also equal to $P(B)$ and $P(C)$ $P(E) = 1 - P(E^c) = 1 - P(A \cup B \cup C)$ Because $A$, $B$, $C$ disjoint: $P(E) = 1 - (P(A) + P(B) + P(C))$ $P(E) = 1 - 3 \space \times \space \dfrac{1}{2} = -\dfrac{1}{2}$, which violates the non-negativity rule of probability. Therefore, this approach is not correct. Can anyone help point out where I made a mistake? How would you solve the broken stick problem?

We have all heard the old problem about forming a triangle from breaking a stick into three pieces, with the breaks randomly distributed. Some variations make the second break contingent on the first in some way. I present a new variation (not original to me).   Problem: Take a stick and break it at a location selected with uniform density along its length. Throw away the left-hand piece and break the right-hand one at a location selected with uniform density along its length. Continue forever. What is the probability that one of the discarded left-hand pieces is more than half as long as the original stick?  I do not have a particularly elegant to solution to this one, and was wondering if one exists. Of course, any answers that solve the problem are welcome.


I've been working on a bunch of layers of differing co-ordinates projections within a single dataframe.  Because I haven't really got my head around this, and because its all been working just fine, I didn't want to touch it.  However, one of the functions I was trying to perform wouldn't work (extract multi values to points) and I suspected this was because of coordinate conflicts.    My data frame properties show that I have layers with the following coordinates in it:     GCS_WGS_1984 NZGD_2000_New_Zealand_Transverse_Mercator NZGD_2000_Transvers_Mercator  NZTM   I guess they should all be on the same.    I have just tried to change the projection of 3 layers (why didn't I check after the first one???) from GCS_WGS_1984 to NZGD_2000_New_Zealand_Transverse_mercator using "Define projection tool".  They've gone missing, even zooming to layer wont find it.    The properties of the missing layers show the extent in lat/long.  The properties of the layers I can see (haven't changed the projections of) show the extent in meters.  I'm wondering if this could be the issue, and if it is how to change it.  If its not this, what could it be? Whats the best way forward?    I have re projected (as per advice) and can now see my layers on the same page - but they still don't overlap.  I suspect this is because of extents.  The attached images will show where the layers of extent type A and B respectively are showing.  Projecting has not changed this... is there a way to change it?  Maybe try another co-ordinate system?      ]

I put 4 different layers into my ArcMap document, but only one of them will show up on the map! I should be seeing the other 3 layers as well. When I do a Zoom to layer, I can see one layer, but I cannot figure out how to make the other 3 show up at once on top of each other.  Before I opened ArcMap, I used ArcCatalog where I right-clicked 3/4 of the shapefiles and  clicked Properties → Coordinate system → Import and then clicked on my Trees layer, which has the coordinate system I want the other 3 to have. But when I opened ArcMap the 4 layers did not overlap, nor could I move them above or below each other.


I am looking at the usual proof that differentiability implies continuity (see e.g. ), which uses only the Difference and Product Rules for Limits (and in particular, doesn't use any results or ideas about sequential limits or epsilons and deltas).  This "usual proof" seems to assume that $\lim_{x\rightarrow a}f(x)$ exists. But is this obvious? Don't we need to also do a little work to show that:     If $f$ is differentiable at $a$, then $\lim_{x\rightarrow a}f(x)$ exists.   Is the above claim somehow obvious and I'm missing something? Or is there a gap in the "usual proof"?

If $f'(c)$ exists then $\lim_{x\to c} f(x)=f(c)$   My attempt is below. Did I do wrong? Since I don't really understand it. I thought $f'(x) = f'(c)$ so $f'(x)-f'(c)=0$. Am I on the right track? Many thanks!  \begin{align} f(x)-f(c)&=\frac{f(x)-f(c)}{x-c}\cdot(x-c) \\ \lim_{x\to c}[f(x)-f(c)]&=\lim_{x\to c}\left[\frac{f(x)-f(c)}{x-c}\cdot(x-c)\right] \\ \lim_{x\to c}[f(x)-f(c)]&=0 \\ \lim_{x\to c} f(x)&=f(c) \end{align}


Let $$(1+\sin\theta)(1+\cos\theta) = \frac 54$$  Then what will be the value of $(1-\sin\theta)(1-\cos\theta)$.  I tried Squaring and Expanding the terms and Tried to replace the value with the expanded value from first equation but it got complicated further more.

If $\displaystyle \left(1+\sin \phi\right)\cdot \left(1+\cos \phi\right) = \frac{5}{4}\;,$ Then $\left(1-\sin \phi\right)\cdot \left(1-\cos \phi\right) = $  $\bf{My\; Try::}$ Given $\displaystyle \left(1+\sin \phi\right)\cdot \left(1+\cos \phi\right) = \frac{5}{4}\Rightarrow 1+\sin \phi\cdot \cos \phi+\sin \phi+\cos \phi = \frac{5}{4}.$  So $\displaystyle \sin \phi+\cos \phi+\sin \phi \cdot \cos \phi = \frac{1}{4}\Rightarrow \left(\sin \phi+\cos \phi\right) = \frac{1}{4}-\sin \phi \cdot \cos \phi.$  Now $\displaystyle \left(1-\sin \phi\right)\cdot \left(1-\cos \phi\right) = 1-\left(\sin \phi+\cos \phi\right)+\sin \phi \cdot \cos \phi =\frac{3}{4}+\sin 2\phi$  Now How can I calculate $\sin 2\phi.$  Help me, Thanks


I will be having 18 Students in my class this year. I'd like to have them learn in pairs rotating every day with a different student in the class. What are all the possible pairings.  for example on Day 1: Student 1 learns with 2/ 3 with 4/5 with 6 etc etc  I need an 18 day rotation for this please  Thanks

Here's an interesting problem that I came up with the other night.  With straight speed dating, (assuming the number of men and women are equal) the number of iterations that need to be made before every man has chatted with every woman is N/2, where N is the total number of people.  Gay speed dating is much more complex. The traditional model obviously won't work. Assuming in straight speed dating, the men stay at their tables, the "sitting" men in gay speed dating won't meet one another (nor will the "standing" men).  Counting combinations in gay speed dating manually, I see the following numbers:  f(2) = 1 f(3) = 3 f(4) = 3 f(5) = 5 f(6) = 5   These numbers suggest that gay speed dating can be done with N or N-1 iterations (albeit in a much more chaotic pattern).  Anyone have any ideas? Also, if it is N iterations, would there be a pattern that could be followed? I.e.: could the gentlemen circle a rectangular table in a clockwise fashion, then rearrange themselves and continue in another fashion such that given any number of men, every man would be paired with every other man in the smallest number of iterations and without pairing two men together twice.


If someone "wins" the game and then all players count points and a different player realizes that if they had played their victory point, they would have won, who wins? The person who declared the win or the person who had enough points but didn't realize it, but figures it out when or after another person has declared victory. In other words, do you have to declare victory 'on your turn' to win? If your turn has ended, can you declare victory on someone else's turn?

If player A reaches 10 victory points on his turn but forgets to count, and immediately after his turn, the following player, player B, also reaches 10 victory points and claims victory, does player A have any grounds to be considered a winner?   It recently happened when a player reached 10 victory points but forgot to count and claim victory. The player whose turn is immediately after also reached 10 victory on her turn and claimed victory. Only after player B counted her victory points it was also determined that player A had already reached 10 victory points.  Who is the rightful winner in that situation? Can the true winner be objectively determined based on anything in the rules?


I changed the settings on ubuntu 14.04 so that I could log in without password. Surprize, surprize, when I restarted I couldn't log in anymore. It shows me a window with my username and a button "log in" ( misses the text area for password ), but when I push de button it doesn't succeed to start... It's a kind of login loop and I have no idea how to escape from that, I'm helpless even in recovery mode. Please, help! The originality of my question: the fact that Ubuntu blocked imediately after I changed the access settings, eliminating the password step. ;)

My Ubuntu is stuck in a login loop when trying to enter my desktop. When I login, the screen gets black and soon after that the login screen comes back.   I've read that the problem might be caused by an error depending on the graphics, here's my graphics card: ATI Radeon 7670M


Good day everyone,  I am very much interested in math, biology, and programming; ideally I would like to study bioinformatics and, as such, was wondering what languages are typically used by bioinformaticians? Particularly for fields of bioinformatics relevant to biochemistry, virology, and immunology, what are the most useful programming languages to know, as well as their strengths and limitations? (i.e. in what setting would it be better to program in C++ than Python, is R good to know and if so why, etc.)  Thank you in advance.

As a molecular biology graduate student I have decided to learn some basic programming and bioinformatics since everybody says that it is crucial. For example, what would you learn if you need to work with RNA-Seq data, compare and interpret them?   Thanks!


Question: Show that $(5, 15, 25, 35)$ is a group under multiplication modulo 40.   So I first decided to make a Cayley Table that looks like this:     I apologize that I do not know how to make a Cayley Table in MathJax.   So I know it is closed, and associative because of multiplication inheritance.  I am just confused about the identity element. I could use some descriptive advice about how you find it. I know once you find that, you can use the table to find inverses of each.

Show that the set $\{5,15,25,35\}$ is a group under multiplication modulo $40$. What is the identity element of this group. Can you see any relationship between this group and $\mathbb U(8)$?   I am very stuck on this question and I think my knowledge of abstract algebra is my liability at the moment. Right now I'm most confused by the fact that I learned: An element of a group of this nature must be relatively prime with the working mod.  Obviously here this is not the case, so I don't really know where to begin.  Do I need a Cayley Table?  Thanks.


My study is about the correlation of the person's gender and his or her score in a questionnaire about gender stereotyping. The higher the score in the questionnaire means he or she gender stereotypes more. What kind of correlation statistic should I use? Can I find it in Excel?

I have a dataframe with many observations and many variables. Some of them are categorical (unordered) and the others are numerical.  I'm looking for associations between these variables. I've been able to compute correlation for numerical variables (Spearman's correlation) but :   I don't know how to measure correlation between unordered categorical variables. I don't know how to measure correlation between unordered categorical variables and numerical variables.   Does anyone know how this could be done? If so, are there R functions implementing these methods?


I've created a shell script but I don't know how to do a loop that prints the number of lines in every file you pass to the script as argument. So that the output would be something like this:  2 lines in hello.sh 33 lines in /var/log/syslog

I would like to write a bash script with unknown amount of arguments.  How can I walk through these arguments and do something with them?  A wrong attempt would look like this:  #!/bin/bash for i in $args; do      echo $i done


I am storing sum of all pairs of an array element to pairSum[] array. For this I have created PairSum class which store two elements and their sum.   But I am getting null Pointer Exception on line pairSum[k].sum = v     I have created array as   PairSum[] pairSum = new PairSum[val];   What am I doing wrong?       public class test {             class PairSum{                 int first;                 int second;                 int sum;             }             public static void findElements(int arr[], int n){                 int val = (n*(n-1))/2;                 PairSum[] pairSum = new PairSum[val];                 int k=0;                 for(int i=0;i<n-1;i++){                     for (int j=i+1;j<n;j++){                         int v = arr[i] + arr[j];                         System.out.println("sum..." + v);                         pairSum[k].sum = v;//NullPointerException here                         System.out.println("valll.." + pairSum[k]);                         pairSum[k].first = arr[i];                         pairSum[k++].second = arr[j];                      }                 }            }            public static void main(String[] args) {                 int arr[] = {10, 20, 30, 40, 1, 2};                 int n = arr.length;                 findElements (arr, n);             }             }

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 would like to use something like this in my LaTeX document: P29_Ampl_1. After this I have got an error because I use _. I can solve it by insertign $ between the P29_Ampl_1 -> $P29_Ampl_1$. It cause that text doesn't look good. How can I solve it. I would like to use P29_Ampl_1 as a normal plain text? Thanks

How can I produce the text Word_one_two in LaTeX?  I tried:  Samp\_Dist\_Corr   But, it doesn't quite look right. Also, I want it in the typewriter font, so actually, I'm doing:  \texttt{Samp\_Dist\_Corr}   I find it looks a bit like the underscore is merging in to the bottom of the "D", but maybe it's just because of the typewriter D?


I am declaring an array myArray in main method and passed the same array in doIt(myArray) method.  When I took another array variable in doIt() method and assign myArray to it. And then I printed the myArray in main method.  But I am doing same thing with integer and String, the changes made in respective method do not affect the output.  My Code is   public class ChangeIt {      public static void main(String[] args) {         int[] myArray = {1,2,3,4,5};          new ChangeIt().doIt(myArray);         for (int i = 0; i < myArray.length; i++) {             System.out.print(myArray[i] + " ");         }          String str= "Gaurav";         new ChangeIt().printString(str);         System.out.println("\n"+ str);          int num = 5;         new ChangeIt().printNum(num);         System.out.println(num);     }      private void doIt(int[] z) {         int[] A = z;         A[0] = 99;      }     private void printString(String s){         String s2 = s + "Kukade";     }      private void printNum(int x) {         int y = x+1;     }  }   The output is  99 2 3 4 5 Gaurav 5   So, what is happening? Why it is printing 99 instead of 1?

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


I'm diving into C++ coming from the worlds of Objective-C and Java. Java gave me all the OOP knowledge I have and Objective-C taught me about manual memory management. While adapting to C++ is easy (the language definitely does not deserve the reputation it has) I am confused about one thing:  I can declare a property as string my_string or string *my_string. I know I need to delete the second, but what's the advantage in declaring it as a pointer?

I know this is a really basic question, but I've just started with some basic C++ programming after coding a few projects with high-level languages.   Basically I have three questions:   Why use pointers over normal variables? When and where should I use pointers? How do you use pointers with arrays?


Hiho everyone, I wanted to install the opera browser via their .deb package. I downloaded it from  and tried to install it with $ sudo dpkg -i opera-stable_45.0.2552.898_i386.deb but it said I need the apt-transport-https package.  I then tried to install opera using gdebi package installer, successfully.  I guess it somehow messed up my package manager, because executing $ sudo apt -f install now wants to remove all my :amd64 packages ... Here is the output:  Reading package lists... Building dependency tree... Reading state information... Correcting dependencies... Done The following packages were automatically installed and are no longer required:   apt-transport-https bbswitch-dkms:amd64 evolution-data-server:amd64  [...]    rtmpdump:amd64 seahorse-daemon:amd64 wmctrl:amd64 xsel:amd64 xserver-xorg-legacy:amd64   zlib1g-dev:amd64 Use 'sudo apt autoremove' to remove them. The following additional packages will be installed:   acl alsa-utils anacron aspell at-spi2-core avahi-daemon base-files   base-passwd bash bc bind9-host binfmt-support binutils  [...]    yelp zeitgeist-core zenity zip zlib1g-dev Suggested packages:   default-mta | mail-transport-agent aspell-doc spellutils avahi-autoipd   bash-doc binutils-doc  [...]    cairo-5c xfonts-cyrillic gnome-user-guide zeitgeist-datahub Recommended packages:   gir1.2-appindicator3-0.1 The following packages will be REMOVED:   accountsservice:amd64 acl:amd64 alsa-utils:amd64 anacron:amd64   apparmor:amd64 apport apport-gtk aptdaemon apturl:amd64  [...]     yelp:amd64 zeitgeist-core:amd64 zenity:amd64 zip:amd64 The following NEW packages will be installed:   acl alsa-utils anacron aspell at-spi2-core  [...]    yelp zeitgeist-core zenity zip zlib1g-dev WARNING: The following essential packages will be removed. This should NOT be done unless you know exactly what you are doing!   base-files:amd64 gawk:amd64 (due to base-files:amd64) base-passwd:amd64   bash:amd64 dash:amd64 (due to bash:amd64)   debianutils:amd64 (due to bash:amd64) bsdutils:amd64 coreutils:amd64   dpkg:amd64 (due to dash:amd64) tar:amd64 (due to dpkg:amd64) libc-bin:amd64   mount:amd64 ncurses-bin:amd64 perl-base:amd64 sed:amd64 util-linux:amd64 0 upgraded, 683 newly installed, 480 to remove and 0 not upgraded. Need to get 441 MB of archives. After this operation, 469 MB disk space will be freed. You are about to do something potentially harmful. To continue type in the phrase 'Yes, do as I say!'  ?]    And the output of apt autoremove:  Reading package lists... Building dependency tree... Reading state information... You might want to run 'apt --fix-broken install' to correct these. The following packages have unmet dependencies:  adduser : Depends: perl-base (>= 5.6.0) but it is not installed            Depends: passwd (>= 1:4.1.5.1-1.1ubuntu6) but it is not installed  adwaita-icon-theme : Depends: gtk-update-icon-cache but it is not installed                       Depends: librsvg2-common but it is not installed  alsa-base : Depends: kmod (>= 17-1) but it is not installed              Depends: udev but it is not installed              Recommends: alsa-utils but it is not installed  apparmor:amd64 : Depends: python3:any  [...]    xserver-common : Depends: x11-xkb-utils but it is not installed               Recommends: xauth but it is not installed yelp:amd64 : Depends: yelp-xsl:amd64 (>= 3.12.0) but it is not installable zenity:amd64 : Depends: zenity-common:amd64 (= 3.24.0-0ubuntu1) but it is not installable   Now what exactly did I do with installing apt-transport-https and how can I correct this error?

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


I have a volume just for logs and another volume just for log backups.  The log volume kept  growing until it to run out of space even with log backups taken every 1 minute.   Isn't the backups suppose to free up the space within the log file to be written over again?  It seems like this isn't happening.

This one seems to be a common question in most forums and all over the web, it is asked here in many formats that typically sound like this:  In SQL Server -  What are some reasons the transaction log grows so large? Why is my log file so big? What are some ways to prevent this problem from occurring? What do I do when I get myself on track with the underlying cause and want to put my transaction log file to a healthy size?


So we are running ubuntu 13.10 in production and they have OpenSSL 1.0.1e 11 Feb 2013, which obviously needs to be patched.   What's the best way to do it without any downtime? What will happen to the existing connections during the upgrade? Will    they be disconnected?  Will I need to reboot my server after the    upgrade?

This is a  about understanding and remediating the Heartbleed security issue.   What exactly is CVE-2014-0160 AKA "Heartbleed"? What is the cause, what OSs and versions of OpenSSL are vulnerable, what are the symptoms, are there any methods to detect a successful exploit?   How can I check to see if my system is affected? How can this vulnerability be mitigated? Should I be concerned that my keys or other private data have been compromised? What other side effects should I be concerned about?


How can I create a curve by providing the coordinates of points 1-4.

Look at this image:   This is what I get from this:     \begin{tikzpicture}     \draw[style=help lines] (-5,-5) grid (5,5);     \draw (-4,0)--(4,0);     \draw (0,-4)--(0,4);     \foreach \y in {-4,-3,...,4} {         \draw (0 - 0.1,\y) -- (0+0.1,\y);         \draw (\y,0 - 0.1) -- (\y,0+0.1);     }      %Nodes:     \node (a0) at (-4,-4) {};     \draw[fill] (a0) circle [radius=1.5pt];     \node (a1) at (-2,4) {};     \draw[fill] (a1) circle [radius=1.5pt];     \node (a2) at (2,-2) {};     \draw[fill] (a2) circle [radius=1.5pt];     \node (a3) at (4,2) {};     \draw[fill] (a3) circle [radius=1.5pt];               \draw (-4,-4) to (-2,4) to (2,-2) to (4,2); % to (a2) to (a3);  \end{tikzpicture}   I'm trying to to get a line between them (the dots) that will be like a function (not a straight line - a curve like a polynomial).  Is this possible?  Thank you!


I'm getting the error could not open port /dev/ttyACM0 : [Error 13] Permission denied : '/dev/ttyACM0 '  To solve this error I write the coomand  sudo chmod a+rw /dev/ttyACM0 which solves the problem for that active session only. Once I turn off my NUC or restart the same error is thrown again and again.

I've installed Arduino but as the title says, I can only upload with sudo. And yes my user is part of the dialout group so that's the weird thing.   Arduino did function before on my system. What could be wrong?  Output ls -l:  ls -l /dev/ttyUSB* crw-rw-rw- 1 root dialout 188, 0 apr  2 09:23 /dev/ttyUSB0


I am looking for an alternative program on macOS, like Notepad++ with two abilities:   To write and edit program code,   and   Search specific string in a folder full of text files.

I really love Notepad++ and I haven't found an alternative for it yet. TextMate and TextWrangler aren't quite there yet. Specifically,  two things that I want that are not in TextMate:   variable highlighting bracket highlighting   Can you suggest an alternative editor for OS X?


Hi is there any way to download a DLL for XML so that i can use it in my project and how to read the XML file ? Say for example i want to read the first name's and last name's.  <?xml version="1.0"?> <configuration>   <appSettings>      <add key="firstname" value="David"/>      <add key="Lastname" value="Alan"/>      <add key="Age" value="35"/>      <add key="gender" value="male"/>       </appSettings>   </configuration>

Is there a simple method of parsing XML files in C#? If so, what?


I have an application where I have audio files. I need to store them in a mysql table since we already have a mysql database available.  I saw that some people don't advise to do so. What are the advantages and inconvenients of storing the audio files in the table?  Does it affect the operations performed on the database?

What is the best place for storing binary files that are related to data in your database? Should you:   Store in the database with a blob Store on the filesystem with a link in the database Store in the filesystem but rename to a hash of the contents and store the hash on the database Something I've not thought of   The advantages of (1) are (among others) that atomicity of transactions is preserved. The cost is that you might dramatically increase storage (and associated streaming/backup) requirements  The goal of (3) is to preserve atomicity to some degree - if you can enforce that the filesystem you are writing to does not allow files to be changed or deleted, and always has the correct hash as filename. The idea would be to write the file to the filesystem before permitting the insert/update referencing the hash - if this transaction fails after the filesystem write but before the database DML, that is fine because the filesystem is 'faking' being the repository of all possible files and hashes - it doesn't matter if there are some files in there that are not being pointed to (and you could clean them up periodically if you are careful)  EDIT:  It looks like some RDBMSs have this covered in their individual ways - I'd be interested to know how others do it - and particularly in a solution for postgres


Firefox doesn't display the "Stack Exchange Sites", "Recent Inbox Messages" and "Recent Achievements" popup buttons located in the menu bar at the top. The buttons are there - just invisible, though. Hovering over with the mouse will display the tool tips, and they work as expected.  This is Firefox 28 on Windows 7 SP1 (usually, I'm on Safari, and there is no issue).  How do I solve this issue?

Chrome and IE 11 are fine, I'm only able to reproduce this in Firefox. Using version 27.0.1 on Windows 7. Meta as well as all the other sites are affected.        I can still see the hover effect, but the image is gone. I see this in Firebug:        The image doesn't show up in the Network tab. I am able to see the image by visiting  which goes to   I've done Ctrl-F5, I've cleared the cache and I've tried Private Browsing. Possibly related to  ?


WiFi on my MacBook Pro (13-inch, Mid 2010) has stopped working.  When I click the WiFi button I see the message "Wi-Fi: no hardware installed"   I have attempted many things, including other questions in this StackExchange site ( was the first answer I found and I followed but didn't solve my issue. Ultimately it suggests replacing my Airport card, but I'd rather eliminate all software/logic possibilities before getting to replacing the Airport adapter or buying a USB wifi adapter).   The detailed steps I've taken:  - MOVING/DELETING SystemConfiguration  I've followed  to check whether my en1 (airport adapter) exist and was working:  ifconfig -a - it showed up  ifconfig en1 inet up or ifconfig en1 up - both resulted in the same error: interface en1 does not exist'  Then I moved/deleted the files located at /Library/Preferences/SystemConfigurations as instructed.   Removed the preferences.plist and restarted. Since it didn't resolve I continued. Removed NetworkInterfaces.plist & com.apple.airport.preferences.plist and restarted. Lastly, I attempted to remove the whole SystemConfiguration folder, but Mac didn't allow it. So I removed as many files as possible and restarted. Didn't resolve the problem, but en1 disappeared for good from System Preferences -> Network.   - NVRAM & SMC reset  Followed several guides, but ultimately this one and it didn't work. I have reset NVRAM & SMC countless times.  - AHT  Some guides suggest running Apple Hardware Test. I've tried, but it doesn't work, returns the error -3403D: as I've researched, it means AHT can't be run in my system.  QUESTIONS  Backing up and reformatting has any chance to resolve the problem? Is it worthy of trying? Any other suggestions? I'm considering to buy an USB wifi adapter.  As a last resort and hoping that my airport adapter is still working and not faulty, I'm asking here.  SYSTEM INFO  MacBook Pro (13-inch Mid 2010)  macOS High Sierra 10.13.6  NETWORK WINDOW

I have a MacBook Pro 2009 running MacOS El Capitan. Recently the Wi-Fi has stopped working.   When I click on the Wi-Fi icon it displays the message "No hardware installed", but Ethernet still works.   Is there any way of fixing this by using a Wi-Fi dongle or something of the sort, if so do I need a specific dongle and how do I install it?


If eating starts at 7:00 AM and finishes at 7:30 AM, and the time is now 7:40 AM.  What should I say：   Now I have eaten for 40 minutes.  10 minutes ago I have eaten for 30 minutes.

If I ate from 7:00 until 7:30am,   At 7:10, could I say      I am eating for 10 minutes?  At 7:40, could I say      I ate for 30 minutes, 10 minutes ago?


I'm a professional soccer player, living in Turkey currently. I want to visit my girlfriend in Great Britain; she's a British citizen.  Can I get married to her while in the UK on a visit visa?  Of course, I don't plan to live in the UK. I just want marry and then leave immediately. Financially, I'm strong and I'm not dependent. I earn $65,000 yearly.

I am planning to go to the UK with a standard visitor visa.  I will meet my girlfriend there. If we all of a sudden decide to marry, can we?   My girlfriend is Lithuanian who just works and lives there; she doesn't have a residence permit. I am a Palestinian who lives in Lebanon


I am struggling to understand the behavior of the following lines of code:  // I'd like to keep this value constant let allObjects = [{value: null}, {value: 'Hello World'}] // Here is a shorter list of objects matching some criteria let someObjects = allObjects.filter(object => object.value) // Here we work with the the values for some of the objects someObjects[0].value = {hmm: 'test'} // Kind of expecting allObjects[1].value to be 'Hello World' at this point // Display all the objects console.log(allObjects)   And the output:  [   {     "value": null   },   {     "value": {       "hmm": "test"     }   } ]   Here is a .  What I do not understand is when the value of someObjects is modified it affects the value of allObjects and expect that allObjects[1].value will return Hello World.  Could someone explain to me why this is actually happening and how we are supposed create a sorter version of the array that does not mutate the original array when it is modified?

The primitive types (number, string, etc.) are passed by value, but objects are unknown, because they can be both passed-by-value (in case we consider that a variable holding an object is in fact a reference to the object) and passed-by-reference (when we consider that the variable to the object holds the object itself).  Although it doesn't really matter at the end, I want to know what is the correct way to present the arguments passing conventions. Is there an excerpt from JavaScript specification, which defines what should be the semantics regarding this?


I've been writing a HashTable for an assignment and I've been given tests to run and pass. As of now I'm passing all the tests apart from 3. But as far as I can tell from my own tests all the methods work fine. Apart from my Exception on the remove() method.  public void remove(String key) throws MapException{     int i = this.linearProbing(key);     if(hashTable[i].getKey() == key){    //line 76         numberOfEntries--;         numberOfRemovals++;         hashTable[i] = this.DEFUNCT;     }     else{                String e = "No entry of this key found";         throw new MapException(e);     } }   When I run this test I get an error and I'm not sure what it is.  //Remove a non-existent entry. Should throw an Exception     private static boolean test4() throws MapException {     StringHashCode sHC = new StringHashCode();     float maxLF = (float) 0.5;     HashTableMap h = new HashTableMap(sHC,maxLF);     try {         h.insert("R3C1");     } catch (MapException e1) {         return false;     }     try {         h.remove("R6C8");              //line 117         return false;     } catch (MapException e) {         return true;        } }   I'll also link my MapException Class here:  import java.lang.Exception;  public class MapException extends Exception {      public MapException(){      }      public MapException(String exception){         super(exception);     }      public MapException(String exception, Throwable throwable) {         super(exception, throwable);     }      public MapException(Throwable throwable) {         super(throwable);      }  }   The error is:     Exception in thread "main" ***Test 1 failed Test 2 succeeded Test 3 succeeded java.lang.NullPointerException at HashTableMap.remove(HashTableMap.java:73) at TestHashTableMap.test4(TestHashTableMap.java:117) at TestHashTableMap.main(TestHashTableMap.java:24)

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?


Hi Im new working with apexcode and I Crate a Class in sanbox, but when I try to upload to production it says that my coverage code is 73% this is my code public with sharing class New_Session_Extension {  public Talleres__c taller {get; private set;} public String entregables {get; private set;} public String tipodetaller {get; private set;} public Gastos__c gasto {get; private set;}  public New_Session_Extension (Apexpages.StandardController sc) {     this.gasto  = (Gastos__c)sc.getRecord();      this.entregables = '';     this.tipodetaller = '';          if(this.gasto.Entregable__c == null) {         this.taller =  [SELECT Id,Entregables_E1__c,Taller__c FROM Talleres__c WHERE Id = :this.gasto.Taller__c];         this.entregables = this.taller.Entregables_E1__c;          this.tipodetaller = this.taller.Taller__c;      } else {         this.taller = new Talleres__c();         this.entregables = this.gasto.Entregable__c;     }   } }  any suggestions Thanks

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.  This canonical question is intended to address several classes of common questions by providing a quick summary and links to comprehensive resources:   How do I start writing my first unit test?  How do I unit test this code?  I need help writing this unit test.   Salesforce Stack Exchange looks for detailed, specific questions that the community can help you with, and can't write tests on your behalf. We feel that working with the resources below can help you get started, and we encourage you to make an attempt to write your test and return to SFSE with your specific questions when you encounter challenges you can't resolve.


accidently flashed my rasbian os over my hard drive. When I tried to recover the partition, I realised I couldn't do it, the partition wasn't visible in testdisk. I recovered everything with photorec, but sorting all the pictures would take weeks. I'm no expert how partitions work but I think that rasbian wrote right over the 'declaration' of the ntfs partition. Is it possible to search for where rasbian is written and overwrite that back with a 'declaration' of a ntfs partition so that I can recover the whole file structure? thanks in advance

What steps can I take to try to recover lost or inaccessible data from any storage device?  Answers:   This applies to any computer storage device, e.g. internal/external hard drives, USB sticks, flash memory. The most important thing is to STOP using it, any type of I/O can ruin your chances of a recovery.     We have separate questions covering common problems with USB flash drives in greater detail:


Padmé Amidala was known to be against the creation of the Republic's Army, stating that raising an army would inevitably lead to war:     Padmé : I warn you, if you vote to create this army, war will follow. I have experienced the misery of war first-hand; I do not wish   to do it again.   But, later on, Jar Jar, acting as a Representative for Naboo moves a vote to grant the Chancellor Emergency Powers including the power to create a Grand Army of the Republic.  Since Padmé was so vocally opposed to this idea, why would Jar Jar vote differently than she would have wanted? Why didn't the opposition group Senators stop him?

I have heard some claim that Jar-Jar Binks was responsible for the creation of the Empire. If so, how, and was he the sole reason, or were there other elements?


Every time I run sudo apt-get update, I get this error:  W: GPG error: https://download.01.org Ubuntu Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A902DDA375E52366   What should I do? I'm using Ubuntu 12.04 LTS.

I added some extra repositories with the Software Sources program. But when I reload the package database, I get an error like the following:     W: GPG error:  trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8BAF9A6F   I know I can fix it using apt-key in a terminal, according to the official Ubuntu documentation. But I would have liked to do it graphically. Is there a way to do this without using a terminal?


my current installation has lots of nice daemons installed/configured, Plugins for Firefox, nice packages installed. I guess sooner or later I will trash my installation somehow. I want to back up my system in a way, that after the reinstallation I have a fresh ubuntu with all the packages I need, and all the config files I set up for them (for example privoxy). Ideally I would like to have my fully configured Firefox in that new installation as well with my set of Plugins. Is there an easy way to backup the list of installed packages with their config files? Thank you so much!  Edit: I dont want to backup my whole filesystem, because over the years I probably acquired lots of junk laying around and slowing it down. What I want after the backup is a fresh system PLUS a list of packages with their config files

How would I use tar for full backup and restore with system on SSD and home on HDD?  The existing backup and restore answers don't seem to cover the case where root and home are on separate devices


I was in the middle of creating a project that involved Java's math package.  import java.math.BigDecimal; import java.math.BigInteger;   And just as I was about to delete the second line and insert the * character in the first line:  import java.math.*;   I began to question if this method really is the better option. I imagine it makes very little difference in the overall scheme of the project, and it's very possible the compile would treat both versions of this import as being the same. If this isn't the case, however, then which is faster/more efficient?

It is much more convenient and cleaner to use a single statement like  import java.awt.*;   than to import a bunch of individual classes  import java.awt.Panel; import java.awt.Graphics; import java.awt.Canvas; ...   What is wrong with using a wildcard in the import statement?