body1
stringlengths 20
4.1k
| body2
stringlengths 23
4.09k
|
---|---|
For processes with a lot of output or error, trying to redirect standard output and error with a simple string output = process.StandardOutput.ReadToEnd(); string err = process.StandardError.ReadToEnd(); process.WaitForExit(); will cause the program to hang, and never actually finish. | I have the following code: info = new System.Diagnostics.ProcessStartInfo("TheProgram.exe", String.Join(" ", args)); info.CreateNoWindow = true; info.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; info.RedirectStandardOutput = true; info.UseShellExecute = false; System.Diagnostics.Process p = System.Diagnostics.Process.Start(info); p.WaitForExit(); Console.WriteLine(p.StandardOutput.ReadToEnd()); //need the StandardOutput contents I know that the output from the process I am starting is around 7MB long. Running it in the Windows console works fine. Unfortunately programmatically this hangs indefinitely at WaitForExit. Note also this code does NOT hang for smaller outputs (like 3KB). Is it possible that the internal StandardOutput in ProcessStartInfo can't buffer 7MB? If so, what should I do instead? If not, what am I doing wrong? |
When I update, after some file downloads it shows the below errors. What should I do now? W:Failed to fetch cdrom://Ubuntu 14.04.3 LTS _Trusty Tahr_ - Beta amd64 (20150805)/dists/trusty/main/binary-amd64/Packages Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs , W:Failed to fetch cdrom://Ubuntu 14.04.3 LTS _Trusty Tahr_ - Beta amd64 (20150805)/dists/trusty/restricted/binary-amd64/Packages Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs , W:Failed to fetch cdrom://Ubuntu 14.04.3 LTS _Trusty Tahr_ - Beta amd64 (20150805)/dists/trusty/main/binary-i386/Packages Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs , W:Failed to fetch cdrom://Ubuntu 14.04.3 LTS _Trusty Tahr_ - Beta amd64 (20150805)/dists/trusty/restricted/binary-i386/Packages Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs , E:Some index files failed to download. They have been ignored, or old ones used instead. | When updating I got this error message: W:Failed to fetch cdrom://Ubuntu 11.10 _Oneiric Ocelot_ - Release amd64 (20111012)/dists/oneiric/main/binary-i386/Packages Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs W:Failed to fetch http://ppa.launchpad.net/synce/ubuntu/dists/your_ubuntu_version/main/source/Sources 404 Not Found What to do? |
Not sure if this has been asked before, did some digging. I'm trying to prepare for a few interviews, and I was just curious to see if how Java implements its data structures (arraylist, map), etc is public. | I want to have a look at how Java implements LinkedList. Where should I go to look at the source code? |
Is there any case in which volatile is useful in the context of single-threaded programming? I know it's used to make sure the value of the variable is always actually checked in memory so is there any case in which that value may change (in a ST app) in a way that the app/compiler won't notice? | Can anyone provide a good explanation of the volatile keyword in C#? Which problems does it solve and which it doesn't? In which cases will it save me the use of locking? |
package temperatureconversion; import java.util.Scanner; public static void main(String[] args) { Scanner keyboard = new Scanner(System.in); System.out.println("Please enter Conversion type: Press C for Celsius to Fahrenheit or press F For Fahrenheit to Celsius."); String Vctype = keyboard.next(); if (Vctype == "f" || Vctype == "F"){ System.out.println("Please enter fahrenheit"); double Vfahrenheit = keyboard.nextInt(); Vfahrenheit = (Vfahrenheit)*(9/5)+(32); System.out.println(Vfahrenheit); } if (Vctype == "c" || Vctype == "C"){ System.out.println("Please enter celcius"); double Vcelcius = keyboard.nextInt(); Vcelcius = (Vcelcius - 32)*(5/9); System.out.println(Vcelcius) ; } } } Hello guys I was wondering if anyone could help me with the above code. Basically in the output console in netbeans the program just seems to end after I hit C or F, but instead it should ask for a number then allow a number input, then calculate and finally display the calculation. It doesn't seem to be executing the if statements Where am I going wrong? | 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? |
IMO 1988 question No. 6 I have a confusion in the question.The question is as follows: $a$ and $b$ are positive integers and $ab+1$ is a factor of $a^2+b^2$. Prove that $\displaystyle\frac{a^2+b^2}{ab+1}$ is a perfect square. My confusion: According to me, $a$ and $b$ have only one value ie $a=b=1$. What are the other possible values of $a$ and $b$? | Let $a,b$ be positive integers. When $$k = \frac{a^2 + b^2}{ab+1}$$ is an integer, it is a square. Proof 1: (Ngô Bảo Châu): Rearrange to get $a^2-akb+b^2-k=0$, as a quadratic in $a$ this has two values: $a$ and $kb - a = (b^2-k)/a$. (The second root is determined in two different ways from the expansion $(x-r_1)(x-r_2) = x^2 - (r_1 + r_2)x + r_1 r_2$.) Now suppose we have $a,b$ such that $k$ is an integer but not a square, by the investigation about roots we have that the second root is a nonzero integer since $k,b,a$ are integers and $k \not = b^2$, futhermore it is positive which is easily seen from its defining equation. WLOG assume $a \ge b$ so that the second root is strictly smaller than $a$. This leads to a decent, replacing $a$ with the second root. Proof 2 (Don Zagier): Apply reduction theory (specifically, Sätze 1 and 2 of Section 13 of my book on quadratic fields) to the quadratic form $x^2 + kxy + y^2$, which is the unique reduced quadratic form in its equivalence class. Note that Proof 2 is pretty much the same as Proof 1 when written out in explicit detail, but I could not read Zagier's book because I cannot read German. I would like to know more approaches to this and other alternative proofs of this result if possible! Thanks in advance. I would also be interested in related problems (especially easier ones of a similar nature) and texts which cover the reduction theory in English. |
For this sequence: $a_1 = 2~~~a_2 =7$ and $a_{n+1} = \frac{1}{2}\cdot(a_{n} + a_{n-1})$ The questions asks to find the exact formula for the $n$th term of the sequence and hence find the limit as $n \to \infty$ They also gave us this formulae: , I am not particularly sure how to use them though. Anyways I tried listing out more terms and I found that $a_3 = \frac{9}{2} ~~~ a_4 = \frac{23}{4}$ And I found out the difference between these terms is $5,\frac{5}{2},\frac{5}{4}$ thus we can write $a_{n+1}=a_{n} + \frac{5}{2^{n-1}}$ I am not sure how to continue though. | The problem is the following: suppose $s_1>s_2>0$ and let $s_{n+1}=\frac{1}{2} (s_n+s_{n-1})$ for $n\geq 2$. Show that ($s_n$) converges. Now, here is what I figured out: $s_2<s_4$: Base Case for induction that $s_{2n}$ is an increasing sequence. Assume $s_{2n-2}<s_{2n}$. Induction step: $s_{2n}<s_{2n+2}$ $s_1>s_3$: Base Case for induction that $s_{2n-1}$ is a decreasing sequence. Assume $s_{2n-1}<s_{2n-3}$. Induction step: $s_{2n+1}<s_{2n-1}$. I have proved those two. However arguing in favor of convergence has me going around in circles. Since $s_1>s_2$ and (as discovered during the formulation of Base Cases) $s_3>s_4$, I figured it might be a good idea ot assume that if every odd member of the original sequence ($s_n$) is greater than the following even member, then the limit would be somewhere in between, the two (odd and even) sequences won't cross. Hence the upper and lower bounds would be $s_1$ and $s_2$ respectively. Here is how I approach this: Assume $s_{2n-1}>s_{2n}$ Show that $s_{2n+1}>s_{2n+2}$ The proof as I mentioned has me running in circles. Any assistance? |
In Microsoft DNS, I'm trying to setup a simple DNS Alias (CNAME) pointing from domain.com to www.domain.com. I also want to forward www.domain.com to a specific IP. In other words, I want to do something like this: www.example.com. IN A 192.168.3.44 example.com. IN CNAME www.example.com. When adding the CNAME I get the following Error: "A new Record cannot be created. An alias (CNAME) record cannot be added to this DNS name. The DNS name conatins records that are incompatible with the CNAME record." Why doesn't this work and how can I fix it? | I need to create an NS record for a domain that is a CNAME, for the purpose of having two domains pointed at one IP, and not having to maintain the current IP address in two different places. The DNS provider for this domain is DynDNS, but they block this operation: CNAME cannot be created with label that is equal to zone name I can do this with another domain whose DNS is served by 1and1: root@srv-ubuntu:~# dig myseconddomain.co.uk ; <<>> DiG 9.4.2-P1 <<>> myseconddomain.co.uk ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 61795 ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;myseconddomain.co.uk. IN A ;; ANSWER SECTION: myseconddomain.co.uk. 71605 IN CNAME myfirstdomain.co.uk. myfirstdomain.co.uk. 59 IN A www.xxx.yyy.zzz ;; Query time: 298 msec ;; SERVER: 10.0.0.10#53(10.0.0.10) ;; WHEN: Tue Aug 18 14:17:26 2009 ;; MSG SIZE rcvd: 78 Is this a breach of the RFCs or does DynDNS have a legitimate reason for blocking this action? Followup Thanks to the two answers already posted I now know that 1and1 IS breaching RFCs to do this. However it does work and they seem to support it. For a company that hosts so many domains it seems very odd that they get away with doing this on such a massive scale without objection. More followup The output of "dig myseconddomain.co.uk ns" as requested. root@srv-ubuntu:~# dig myseconddomain.co.uk ns ; <<>> DiG 9.4.2-P1 <<>> myseconddomain.co.uk ns ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 18085 ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 2 ;; QUESTION SECTION: ; myseconddomain.co.uk. IN NS ;; ANSWER SECTION: myseconddomain.co.uk. 4798 IN NS ns67.1and1.co.uk. myseconddomain.co.uk. 4798 IN NS ns68.1and1.co.uk. ;; ADDITIONAL SECTION: ns67.1and1.co.uk. 78798 IN A 195.20.224.201 ns68.1and1.co.uk. 86400 IN A 212.227.123.89 ;; Query time: 59 msec ;; SERVER: 10.0.0.10#53(10.0.0.10) ;; WHEN: Wed Aug 19 12:54:58 2009 ;; MSG SIZE rcvd: 111 |
I was trying to write a "MAXIFS" formula on my excel 2019, but when I opened the file on a computer with excel 2016 it didnt work. And i read that for 2016's version, i should use the "MAX" instead of "MAXIFS" So what should i write if originally the formula was : =MAXIFS(Reference!C:C;Reference!B:B;Sale!B8;Reference!E:E;"<="&Sale!A8;Reference!F:F;">="&Sale!A8)*F8 | I am in need of an alternative of MAXIFS/MINIFS function in Excel. It is needed because I am not a Office 365 subscriber. As you know MAXIFS/MINIFS functions let you calculate under certain criteria, even the criteria that includes another cell/s. I can do a least amount of calculation using MAX/MIN and IF function, but the criteria/condition must be on the same cell/s. So it's my misfortune that can't come up on a solution to this case. I want to use 2 conditions/criteria, so I couldn't use the ARRAY formula. Result: |
I'm trying to find a proper way to do this instead of simple string concatenation. I have a (simplified) SQL statement as follows: SELECT * FROM Zones WHERE id in (@zoneIDs); I plan to insert an @zoneIDs value like such: 100000,100001,100002 I'm using VB in this particular instance, but it should apply to any .Net language using the MySQL connector. What I'm trying is this: Private GetZones As String = "SELECT * FROM Zones WHERE id in (@zoneIDs)" Dim Param As MySqlParameter = New MySqlParameter("@zoneIDs", MySqlDbType.String) Param.Value = "100000,100001,100002" Dim adapter As MySqlDataAdapter = New MySqlDataAdapter(GetZones) Dim dt as DataTable = New DataTable() adapter.Fill(dt) But what's getting filled in dt is just the row for ID 100000, as if none of the others were in the query. My guess is that it's running a command like this: SELECT * FROM Zones WHERE id in ("100000,100001,100002"); Instead of SELECT * FROM Zones WHERE id in (100000,100001,100002); I personally prefer to use Stored Procedures instead of strings like this, but I believe I would hit a similar wall there. What is the proper way to fill an IN clause using parameters like this? | How do I parameterize a query containing an IN clause with a variable number of arguments, like this one? SELECT * FROM Tags WHERE Name IN ('ruby','rails','scruffy','rubyonrails') ORDER BY Count DESC In this query, the number of arguments could be anywhere from 1 to 5. I would prefer not to use a dedicated stored procedure for this (or XML), but if there is some elegant way specific to , I am open to that. |
could you help me with the following please: Show that if $U\subset \mathbb{C}$ is a domain and the function $f:U\rightarrow \mathbb{C}$ is holormorphic and bijective, then $f^{-1}$ is also holomorphic. I have carefully read the definition of a biholormorphic function and it seems to me that it is the same, so I don't know how it can be proved. The inverse exists because it is bijective ... but any hint on how to prove that the inverse is holomorphic? I tried to attack it with the inverse function theorem, but they tell me that the result to be proved does not hold for real functions. | I'm confused about the following proposition Proposition. Let $U,V$ are open sets in $\mathbf{C}$. If $f:U\to V$ is holomorphic and bijective, then the inverse $f^{-1}:V\to U$ is also holomorphic. The proof of the proposition think that the continuity of $f^{-1}$ is obvious, but I find it is really difficult to prove using $\epsilon-\delta$ definition. Can anyone give some hints? |
I am working with a shapefile which has several hundred rows and 10 or so columns. Usually, the cells contain data, but at the moment they are just showing nonsense symbols (attached). I have tried using the same shapefile on a colleague's computer, and it worked fine. I have also reinstalled QGIS. What is wrong? | I'm running QGIS 2.1.4 and Windows 7. For each layer, under properties there is a drop down box called 'data source encoding'. Mine is set to 'system'. I am wondering what this means, there seems to be a lot of options one can choose from. |
I am trying to define a note environment, currently it is just a wrapper of \marginpar function like this: \newenvironment{note}{\marginpar}{} but \begin{note} Important Notes \end{note} will only put I in the margin and the rest (mportant Notes) as normal paragraph. I also tried \newenvironment{note}{\marginpar\\{}{\\}} which doesn't work. What is the right way to do this? | I'm working on an exam document class where the user enters in questions something like this: \multiplechoice{Question} {Answer #1} {Answer #2} {Answer #3} {Answer #4} {Correct answer} {Explanation} I'd like to process this information in various ways in one LaTeX run (to create an answer sheet, key, and the test itself), so the questions need to be stored in a macro. The awkwardness comes when one defines: \newcommand{\sectionA}[1]{\newcommand{\putsectionA}{#1}} and then asks the user to put 15 questions as an argument to \sectionA. I'd much rather have those questions be the contents of an environment, like so: \begin{sectionA} lots of questions \end{sectionA} Mostly because I find it much easier to keep track of environment declarations than curly brackets. Is it possible to have the contents of an environment get packaged up into a macro? Edit: The solution would seem to be to us the environ package, but it doesn't seem to be working. Here's what I'm trying: \documentclass{article} \usepackage{environ} \NewEnviron{foo}{\edef\foot{\BODY}} \begin{document} \begin{foo} Store This \end{foo} \foot \end{document} However when running this code \foot remains undefined. It actually seems impossible to define any macro using environ. Even when not using \BODY. For example, replacing the definition above with \NewEnviron{foo}{\newcommand{\foot}{Print me}} still fails. I've also tried \Collect@Body from the environ package with similar results. Does \NewEnvrion somehow prohibit defining new commands? |
What should we use before a word that started with 'H'? 'A' or 'An'? and why? Sometime using 'a' seems right, sometimes using 'an' seems right, I am confused | A basic grammar rule is to use an instead of a before a vowel sound. Given that historic is not pronounced with a silent h, I use “a historic”. Is this correct? What about heroic? Should be “It was a heroic act” or “It was an heroic act”? I remember reading somewhere that the h is sometimes silent, in which case it’s an, and when the h is pronounced, it’s a. But then I also remember reading that it depends on which syllable is stressed. And I also think I read somewhere that it might differ between British and American English. Personally, I pronounce the h, and believe that a is correct. I find that it sounds incorrect to use an and pronounce heroic without the h. So how do I know when to use a and when to use an with a word beginning with the letter h? Are both acceptable or is there one that is correct? |
$$\lim_{n\rightarrow\infty}\left(\frac{a^{1/n}+b^{1/n}}{2}\right)^n$$ No idea how to do it please help step by step | Let $a$ and $b$ be positive reals. Show that $$\lim\limits_{n\to\infty} \left(\frac{a^{\frac{1}{n}}+b^{\frac{1}{n}}}{2}\right)^n =\sqrt{ab}$$ |
I have a dataset of project sizes (in $) which is sometimes bimodal, sometimes not (it varies across time and I am using annual data sets). These projects are distributed across two types of project owners, A and B, with about 90% of projects being led by type A people, the rest by type B's. I am running (hand-coded in R) a permutation test based on the ratio of the medians of the project values in each group, to determine whether the medians differ significantly. This involves randomizing the assignment of type (A or B) to the projects, calculating the median project size in each (now randomly assigned) group and then finding the ratio of these two values - this being repeated many times (10,000) to get the sampling distribution for the ratio of the medians in the two groups under the null hypothesis that project type (A, B) is not associated with project size. Naively I expected that the sampling distribution generated would be centered on 1, and indeed most of the time it is, when the distribution of project sizes is unimodal. But in some cases instead I find that actually the ratio tends to become < 1 as the distribution becomes more bimodal. This seems surprising as I am in effect randomly sampling from the distribution. I have searched around and found suggestions that it may be a result of the imbalance in sample sizes, or that it may be something to do with the (lack of) meaning of the median when applied to a bimodal distribution. It could also be that the project sizes, which are power-law distributed, are an issue. But I cannot quite see why the sample size should systematically affect the ratio. It also happens when using the mean, but the effect is less pronounced. Any ideas? (I have no formal statistical training and approaching this as a practitioner.) | If I calculate the median of a sufficiently large number of observations drawn from the same distribution, does the central limit theorem state that the distribution of medians will approximate a normal distribution? My understanding is that this is true with the means of a large number of samples, but is it also true with medians? If not, what is the underlying distribution of sample medians? |
Is there a known formula to the sum $$1+\sqrt{2}+\sqrt{3}+\cdots+\sqrt{N}$$ where $N$ is some natural number? Thanks | I was wondering what the estimate for the value $$ S= \sum_{j=1}^N \sqrt{j} $$ is? Is there a way (or a formula) to estimate it well? I am sure it is close to $\int_1^N \sqrt{t} dt$, but I guess I was interested in estimating it better. Thanks! |
After school, I was doing research on Canadian Blood Service. I went into pages and than it got stuck. I wait for 3 minutes nothing happened so I hold the lock button and try to shut my iPad down but nothing works, I was listening to music at the same time and the music is still playing. I has to do a hard reset by holding home button and lock button. After the reset I found out that every single app has gone missing except for the Stock apps which comes with the phone, and my jailbreaking app suck as Cydia ifile, IAP Free and etc. I reboot many times but nothing happened. The apps are still taking up the storage but I can't see them in usage not search. Does anyone have any idea? I urgently needs help. Thanks. and here's my iPad's info: iPad 4 White Wi-Fi 32 GB, jailbroken with Evasion 7 IOS 7.0.4 system. | Basically I have my iPhone w/ iOS 7.0.4 jailbroken using the latest evasion software. I recently ran out of battery, and when I had managed to recharge and get my handset back on, all of my apps (apart from the stock apps that come with the phone) are all gone. No other data is missing, e.g , music, pictures and videos. When I go to, settings, general, and usage. I can clearly see that my memory is still being taken up by all the apps I "had" on my phone (2.1gb free) yet the apps still aren't there. I'm usually good with tech, especially Apple. But this one has me stumped. |
Let $(M,d)$ be a metric space. Let $M \times M$ be the product space, where $d$ is defined (earlier in the book as ) $d((x_1,x_2),(y_1,y_2))=d_1(x_1,y_1)+d_2(x_2,y_2)$ where $d_1$ and $d_2$ are metrics on $M_1$ and $M_2$, respectively. I must prove that $d$ is a continuous real valued function. I am very confused about the notation, an I supposed to show that $M \times M$ is the set or $M_1 \times M_2$ is the set in supposed to use? I guess it doesn't really matter but it would really help me. Can someone help me out on starting the proof? I know I must choose my delta to be $\varepsilon/2$ since I have two points, but my question is how will some of the notation look like? | Let $X$ be a metric space with metric $d$. Define $d: X \times X \to \mathbb{R}$, show that $d$ is continuous. I would like to show that the function is continuous the topology way (since it is a course on topology). Let $(a,b)$ be a basic open set in $\mathbb{R}$, then $d^{-1}(a,b) = \{(x,y): a<d(x,y)<b\}$. Define $A= \bigcup_{x \in X} B_{b} (x)$, where $B_b (x) = \{y \in X| d(x,y)<b$}. Clearly $A$ is open. Now define $C = \{(x,y):d(x,y)>a \}.$ Essentially I hope that $A \cap C$ is open. But I am stuck in showing that $C$ is open. Any help please? :) |
I have the following regex to capture translation strings in a laravel project: (trans|trans_choice|Lang::get|Lang::choice|Lang::trans|Lang::transChoice|@lang|@choice)\(([\'"]([\/a-zA-Z0-9_-]+([.][^)\'"]+?)+)[\'"])(\s?.*,\s?.*)*?[\)\]];? The regex will happily capture: @lang('validation.invalid') @lang('validation.invalid', ['field' => $field]) However, the moment I introduce a line break @lang('validation.invalid', [ 'field' => $field ]) or a couple in between: @lang('validation.invalid', [ 'field' => $field, 'message' => $error->getMessage() ]) It no longer targets the string | For example, this regex (.*)<FooBar> will match: abcde<FooBar> But how do I get it to match across multiple lines? abcde fghij<FooBar> |
I'm working on derived subgroups because I'm studying for an exam and I want to show that in the case of the dihedral group $D_{2n}=\langle\sigma ,\tau|\sigma^n=\tau^2,\sigma^{\tau}=\sigma^{-1}\rangle$ that the derived series is $1 \unlhd\langle\sigma\rangle\unlhd D_{2n}$ if n is odd and $1 \unlhd\langle\sigma^2\rangle\unlhd D_{2n}$ if n is even. I know that the commutator will give $[\sigma,\tau]=\sigma^{-1}\tau^{-1}\sigma\tau=\sigma^{-2}$ which implies that the commutator can always be generated by just sigma , but I am confused as to show the difference between the even and odd cases . any suggestions anyone ? | Let $G=D_{2n}=⟨x,y|x^2=y^n=e, $ $yx=xy^{n-1}⟩$ I need to find $G'$ [ the commutator of G] now I understand that $G'$ is the subgroup generated from $ U=xyx^{-1}y^{-1} , $ $ \ \forall x,y \in G$ So, $U=<y^2>$ whats the strategy here ? |
I deleted a 5gb video using rm video.mp4, but the space hasn't freed. This was the situation: while encoding a video with FCP X, I ran out of space, I only had 50 MB free. Since in the trash I had some stuff that I wasn't sure that I could delete it yet, I took the terminal and I manually deleted a big video file with rm video.mp4. The file is gone, but the main problem is that the disk is still full. What I can do to reclaim this space back? It's normal that manually deleting a file will not free up space? | I had approximately 50Gb of Windows VMs on my MacBook Pro internal SSD (128Gb) (OS X 10.7.3). I copied them to an external drive, then deleted them from the internal drive, then emptied the Trash. When I look at disk usage in Activity Monitor it shows the same level of usage as it did prior to deleting 50Gb of files. Any ideas why the space hasn't been freed up? |
I have an alwayson environment (AlwaysOn AG). Database [UsersDb] in the slave server, His log file is very big . How can I reduce his size(shrink)? | 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? |
This is my code. \documentclass{article} \usepackage{amssymb,amsmath,amsthm,enumitem} \begin{document} How can I decrease vertical space between text above and below \$\$ \ldots \$\$ ? $$x^{2}+y^{2} = 1$$ How can I decrease vertical space between text above and below \$\$ \ldots \$\$ ? And how can I decrease vertical space between text above and below align command ? \begin{align*} abdefg &= 1\\ &\leq 2. \end{align*} How can I decrease vertical space between text above and below align command ? \end{document} And it shows as this picture Everyone know how to fix it? Please help. | How could I go about setting the 'above' and 'below' vspaces around the equation environment? If the same could be done for the subequations or gather environments, this would be a bonus. |
I wanted to book a direct flight from Heathrow to JFK with BA. Over night they put the price up by over £500. Now I can see the exact same flight but you have to go indirect via Newcastle to Heathrow to JFK, it works out way cheaper this way. Is there anyway I can skip the Newcastle flight if I contact BA before and go direct to Heathrow or if I miss the Newcastle flight will the whole flight be cancelled? | I've a friend that booked a round-trip journey. He booked A-to-B and B-to-A. Somehow he needed to be earlier at location B, so he took a train and did not take the flight from A to B. When he went to the airport to take the "back home" flight (B-to-A), he was informed that his ticket was canceled because he did not take the A-to-B flight. They canceled the ticket and sold it to someone else. Is this normal? The company said it was their right to do so, and he could not get the flight back. The company was Iberia. |
Prove that if $a>1$ then $(a^n-1,a^m-1)= a^{(m,n)}-1$ where $(a,b) = \gcd(a,b)$ I've seen one proof using the Euclidean algorithm, but I didn't fully understand it because it wasn't very well written. I was thinking something along the lines of have $d= a^{(m,n)} - 1$ and then showing $d|a^m-1$ and $d|a^n-1$ and then if $c|a^m-1$ and $c|a^n-1$, then $c\le d$. I don't really know how to show this though... I can't seem to be able to get $d* \mathbb{K} = a^m-1$. Any help would be beautiful! | For all $a, m, n \in \mathbb{Z}^+$, $$\gcd(a^n - 1, a^m - 1) = a^{\gcd(n, m)} - 1$$ |
Although I can see many routes to get an education in testing, programming, etc. how can I address the requirement that nearly all jobs seem to require some actual software testing experience as well ? What should one do to gain experience in software testing ? Any tips for what should be on your resume for a candidate who is applying for jobs in QA automation ? Apart from the ISTQB Foundation Certification. | I have a BA degree in Biochemistry. I worked at a research lab for 5 yrs before I quit my job to be a stay at home. Now I want to change my career and get into the field of QA. I don't have much knowledge as to what the best way is to get into this field. I cant afford to take online courses, so I want to self teach it to me. Any suggestions and help would be greatly appreciated. |
I am building an RPM (SLES12) package that installs a service with some software. The package dumps a new file into /etc/rsyslog.d to handle logging. I would like to have the rpm basically run a "systemctl restart rsyslog" from the install... I guess from %post Is there any specific way this should get run (like a macro) or should I just literally put that line in the scriptlet? | I want to log my app so that it writes its log into its own log file. I create the log file and save it under /etc/rsyslog.dbut my app doesn't create/write to the designated file. However, once I reload rsyslog, there are log entries the next time my app runs. I package my app into an RPM so I can write post-install scripts if necessary. Is this the proper way to handle this via post-install scripts? /etc/rsyslog.d/serf.conf if $programname == 'serf' then /var/log/serf.log & ~ Sending pkill -HUP rsyslog works but I wasn't sure if that would cause any issues to other programs while they're in the middle of logging. |
We all know how important the team when making an idea and a great product. In my opinion, Stack Overflow is revolutionizing the idea of forums. In other words, Stack Overflow is revolutionizing the web. I was looking over the , and I'm curious about how the team members found each other and started working on the same product. Stack Overflow team members have different ages and different locations. Maybe one or two were friends before, but what about the rest? What is the history of, or story behind, Stack Overflow? | I'd like to know how Stack Overflow and other sites started - which was first, who initiated it (OK, that's on the link below) and why, how the different sites evolved, how the rules evolved, etc. Where can I find such information? Of course, I know I can look at for a brief overview but I'm wondering if there is info on this site, particularly more detailed.. |
This question duplicated with . I asked for answer this question. Because I cannot answer the original question because I don't have 10 reputations. After hard reset I've encountered with: BusyBox v1.18.5 (Ubuntu 1:1.18.5-1ubuntu4) built-in shell (ash) Enter 'help' for a list of built-in commands. (initramfs) | I am running an HP pavilion dv6000 dual boot win7 and Ubuntu 12.04. (well, up until today). After a reboot, the boot process drops to the BusyBox shell and I end up at the prompt: BusyBox v1.18.5 (Ubuntu 1:1.18.5-1ubuntu4) built-in shell (ash) Enter 'help' for a list of built-in commands. (initramfs) I've been researching others who have had this same problem, but haven't been able to find any of those solutions to work for me. I tried the method described , and after the final command mount -t ntfs-3g /dev/sda1 /root -o force it does nothing and gives me another (initramfs) prompt. I can boot to a live CD (USB) and get to a terminal, but it doesn't seem to do much good, as I can see the /dev/sda1 in the ls command, but it doesn't recognize it when I try to cd to it. One more question: using the command fdisk -l how can I tell which mount point (sda1/sda2) is my windows partition and which one is Ubuntu? |
I am using Ubuntu 20.04 LTS the nano I have is v4.8 The global version is 4.9.3 Why it is not updated | Why are packages in the official Ubuntu repositories older than the latest (upstream) versions from Debian Sid, PPAs, the authors, etc.? |
Interview, asking for offer etc. I wonder if Stack Exchange has a sote for this kind of question? Sample question: Do company usually do not reveal their benefit package until you sign the accepting offer letter? | Is there a Stack Exchange site for both technical and behavioural interview questions? Where I could ask questions about, for example: Sample questions and solutions, experiences, or seeking advice for interviews A place where I could ask interview questions and what the best way to answer it (not just a correct way or the most efficient). What to do in a certain situation such as negotiation, unfair interviews, etc. Experiences interviewing at so-and-so company. |
Would you say: There is no fire or hot ashes in the fireplace. or There are no fire or hot ashes in the fireplace. And where does that question mark go? | It seems I put a Bounty assigned by outside party, two lengthy, reference-citing answers, one "-1" (awarded the bounty), one "-2", two others scored "0" and "-2" respectively, the answers suggesting one or the other is correct, 73 comments and no consensus so far - and me, as the asker, lost without a clue what to think of the answers anymore - this is no longer "Learners' Level" question, so I thought I'd bring it here and hear what the experts have to say. Original question: Plurality of verb depending on plurality of list elements An edit was suggested to my sentence. There was were an orange, some grapes, two apples and a small pile of cherries on the plate. In my native language plurality of the verb always follows plurality of the first element on the list. There were an orange,... sounds awkward to me, no matter what follows up. My simple solution was reordering: There were some grapes, an orange, two apples and a small pile of cherries on the plate. But that's not the first time I faced this situation and I'd like to know what the rules of grammar say about that - was my editor overzealous or am I trying to copy rules of my language that don't apply in English? Someone linked a for negatives, where the situation is more clear-cut ("There is no..."). Same applies to connection with "or" apparently, per accepted answer there. Still, nothing for "and". It seems there is a consensus that in that if the verb goes after the list, it will be plural. an orange, some grapes, two apples and a small pile of cherries were on the plate. There doesn't seem to be clear consensus for: On the plate { was | were } an orange, some grapes, two apples and a small pile of cherries Adding more to the confusion is the abbreviated form: "There's" One last note. In North America, at least, there is a widespread use of using a singular form like "there is" and "there was", without regard for the subject item or items, and this "there is" is often shortened to "there's": There's three apples on the table! Could you please clarify this mess? |
public interface Game{ public abstract boolean isValid(int coup); } public Machin implements Game{ //Do I need to write @Override here ? public boolean isValid(int coup){ //exemple if (coup==0){ return false } return true } } I don't understand Overriding with abstract method could you help me ? Do I need to put @Override ? | What are the best practices for using Java's @Override annotation and why? It seems like it would be overkill to mark every single overridden method with the @Override annotation. Are there certain programming situations that call for using the @Override and others that should never use the @Override? |
$X=\{(s,t)\in \mathbb{R}^{2}: 0\neq t\in \Bbb{Z}\}$ and $Y=\{(s,t)\in \mathbb{R}^{2}: 1/t\in \Bbb{Z}\}$ with the subspace topology induced by standard topology of $\Bbb{R}^2$. (i.e. horizontal lines) Define an equivalence relation on both X and Y by: $(s_1,t_1)\sim(s_2,t_2)$ iff $(s_1,t_1) = (s_2,t_2)$ or $s_1 = s_2 = 0$. i.e identifying all points on y-axis to one point. The question is, is $X/\sim$ homeomorphic to $Y/\sim$ ? I think they are not homeomorphic, since if the homeomorphism is the 'natural' n$\to$1/n, then consider a sequence $(x_n,\frac{1}{n})$ in Y s.t $(x_n)$ converges to $0$, the image doesn't converge in X. But there may exists other homeomorphisms, so I don't am I right or not, so please give me some hints. | We have two spaces $X=\{(x,1/n):n\neq 0, n\in\mathbb{Z}, x\in\mathbb{R}\}$ and $Y=\{(x,n):n\neq 0, n\in\mathbb{Z}, x\in\mathbb{R}\}$. On both spaces we introduce the equivalent relation $(x,y)\sim (x',y')$ if $x=x'$ and $y=y'$ or $x=x'=0$. That is, all points on the $y$ axis are collapsed to the same point. We are asked whether $X/\sim$ and $Y/\sim$ are homeomorphic in quotient topologies. It is easy to show that the original spaces are homeomorphic. However, I don't know how to answer the question about the quotient spaces. My guess is that they might not be homeomorphic and some problem might occur at the $origin$ but I am not sure. Any hint would be helpful! Thanks! |
I've noticed this discoloration on or near the bottom of my saucepan, which stays even after cleaning. When dry, parts of the pan will appear slightly pinkish or greenish. Furthermore, there is often some white staining. Is this a cleaning issue (given that I haven't entirely been good with cleaning the pan out promptly)? Or is this perhaps related to something lile my water supply? The saucepan appears to be made of stainless steel. | I know this question has been asked before in some form or another, but I can't seem to find a definitive answer. I've looked on SA, chowhound, martha stewart, about.com, etc., and answers seem to vary. Answers that I've seen vary from using vinegar to washing using special stainless steel soaps (which I'm not very keen on using) to only using soft sponges and hot water. The one thing I always do is wash my stainless steel with warm soapy water and a soft sponge. If there's burned food stuck on the cookware, I scrape it off with a wood pot scraper (lightly, of course). And I always dry with a soft cloth immediately after washing. Yet I still get stains! I'd like to get a general consensus on how to prevent those white and rainbow colored stains as well as minimizing corrosion. |
Let A be a set.Define the binary operation $\bigtriangleup$ on $P(A)$ by $X \bigtriangleup Y = (X-Y) \cup (Y-X)$ for all $X,Y \in P(A)$.Prove that $\langle P(A), \bigtriangleup\rangle$ is an abelian group. In this question I stuck in showing that the binary operator $\bigtriangleup$ is associative. I wrote what are $X \bigtriangleup (Y \bigtriangleup Z)$ and $(X \bigtriangleup Y) \bigtriangleup Z$, and then by drawing Venn diagrams, I concluded that these two operations gives different results.I checked my calculations, but couldn't find anything. I can write here my calculations, but the way that I have tried to solve is pretty tedious way to prove such kind of thing, so I am asking that how can I prove that this binary operator is, in fact, associative ? | By $A\oplus B$ we denote the symmectric difference of two sets. The definition is $A\oplus B =(A\setminus B) \cup (B\setminus A)$. Now I hope to show that $A\oplus (B\oplus C) = (A\oplus B)\oplus C$. I remember that there's an elegant proof, but I forget its detail. (The first step is to show $A\oplus (A\oplus B) = B$, and maybe applying this formula, we can obtain associativity.) |
Why is $\mathbb{R}/\mathbb{Z}$ a Hausdorff space, if we assume that $\mathbb{R}$ has the canonical topology, and $\mathbb{Z}$ the induced subspacetopology? More generally, which requirements for a topologal space $S$ ans it's subspace $U$ allow to conclude that $S/U$ is hausdorff? | $X$ is a Hausdorff space and $\sim$ is an equivalence relation. If the quotient map is open, then $X/{\sim}$ is a Hausdorff space if and only if $\sim$ is a closed subset of the product space $X \times X$. Necessity is obvious, but I don't know how to prove the other side. That is, $\sim$ is a closed subset of the product space $X \times X$ $\Rightarrow$ $X/{\sim}$ is a Hausdorff space. Any advices and comments will be appreciated. |
Sometimes OpenID providers end their services, like and did. How do I add or remove login methods so I don't get locked out of my Stack Exchange account? For more information, see in the Help Center. | I no longer use the service that I originally used to register, and would like to change the service I use to log in, or at least add a second account. Is this possible? How do I change my login provider or associate a backup method to log in? For more information, see "" in the . |
In the book of Mathematical Analysis II, by Zorich at page 128, it is given that Let $E$ be a Jordan-measurable set of nonzero measure, $f : E → \mathbb{R}^n$ a continuous nonnegative integrable function on $E$, and $M = \sup_{x\in E} f (x)$. Prove that $$\lim_{n\to \infty} [\int_E f^n (x) dx)]^{1/n} = M$$ I have already proved that $$\lim_{n\to \infty} [\int_E f^n (x) dx)]^{1/n} \leq M$$ since $E$ is Jordan measurable and has nonzero measure, but I'm having trouble proving the reverse of that statement, so any help is appreciated. Edit: I'm new to this topic, and I even do not understand the premise of the asked question, so I would appreciate if you could post an answer that is formulated in terms of the statement that I have given in the question. | Could someone help me prove that given a finite measure space $(X, \mathcal{M}, \sigma)$ and a measurable function $f:X\to\mathbb{R}$ in $L^\infty$ and some $L^q$, $\displaystyle\lim_{p\to\infty}\|f\|_p=\|f\|_\infty$? I don't know where to start. |
Can anybody recognize the font or symbol for this . It is used as font for alphabetic letter S, in my text. I did check almost all fonts and symbols but couldn't succeed in finding a good match. I need this symbol in Latex math mode. Or a way, to design this symbol by myself to be use in Latex. thanks | I know what my symbol or character looks like, but I don't know what the command is or which math alphabet it came from. How do I go about finding this out? |
I have searched on the airline websites, but however have not found a concrete answer to my question which is: if I were to take my 55" TV along with me from Germany to India, will the airlines allow this as a checked luggage? If yes, how much would the cost for such a transport be. Hope someone can throw some light on this. | I'm going to northern Cyprus with Turkish airlines and want to take a 40 inch smart TV that I bought here in the UK with me. Can't find out if this is possible or how much it would cost as it weighs 14kg and as it is fragile how it should be packed if going in the hold. This would be in addition to my 23 kg luggage. Reason is TVs in northern Cyprus are very expensive compared to UK |
These wheels are both parented to the leg of a robot u see in the picture below. I want to make the wheels spin while they move with the legs but they rotate around the wrong axis. I already searched for solutions but they all talk about an empty, the thing is, I can't parent them to an empty because they're already parented to the leg. When I put the transformation of the wheel on local, it uses the same axis as the parent object (I think? correct me if wrong), but this object (the leg) has a different angle so that's why it spins weird. Is there another way to fix the axis? Without parenting to an empty because I can't parent to 2 objects. | So I have these two wheels parented to the leg of a robot. I wanna make them spin a few times but they're spinning around the wrong axis. With other objects I could just press R, Y, Y to make them spin right when they're already at an angle, but for some reason it doesn't work with these. Would be amazing if someone helped me fixing this! |
My USB was working 100% fine before I went to college yesterday. I added some new files to it, took it to school, plugged it into my teacher's computer, and nothing shows up. It says it's empty. I tried it with a different computer to see if it was just the teacher's PC. I plugged it in and I got the same thing. How do I get my files back? Most of my stuff is on there and I would like them back as soon as possible. | I have a flash drive that was used primarily on a Mac, and it was ejected improperly. Now when I put it back in, the computer (I tried 2 different Macs and 3 PCs) does not even register the flash drive- it does not show up in Finder or in My Computer. Any ideas how to get the lost files back? |
Let's use "Coda 2.app" as an example. If to rename it to "Coda.app": Will it affect the functionality of the app? Is the app still be able to access the sites data saved in Keychain previously? Is there any problem for the in-app auto update? Thanks. | For example, I have Xcode 4.4.1, and now Xcode 4.5 Golden Master (GM) version is available, but it is also called Xcode (when the .dmg is mounted as an disc image, it shows only one app (or folder), called Xcode) I think the way is just to double click on the .dmg file, and then drag and drop that app into our Applications folder. But since the current Xcode and Xcode 4.5GM have the same name, can the new one just be renamed and so we can have both versions on our machine? I was worried that what if the app writes back data to the /Applications/Xcode folder, then the GM version can write unexpected data for the 4.4.1 version. And will it work with other software, such as Xcode 3.2, Xcode 3.3, or even different versions of Microsoft Office and Adobe Photoshop? |
I created a file in Ubuntu command prompt like this $ gedit first_file.txt After editing and saving the file when do ls on command prompt I can see an additional file created first_file.txt~ My Question What is this file and why it is created? Will it ok to tell Ubuntu not to created these files and how? | I have observed that in gedit if I edit a file, another file is created in the same directory (the one with the same filename and a tilde '~' suffix). The extra file remains even if I close gedit. I understand the need for a temp file (eg. in case of a crash), but vim for example deletes the extra file it creates, when I close it. Is there a way to do the same with gedit? Some configuration perhaps? |
Would moon fall to Earth if Earth wasnt rotating ? And if rotating at what height moon would have to be to ignor orbiting and fall ? | Why doesn't the Moon fall onto the Earth? For that matter, why doesn't anything rotating a larger body ever fall onto the larger body? |
Is it possible to set off an ecm jammer and kill all the guards and cuff all the civilians so the alarm is never set off in a bank heist? | In the Bank Heist levels for Bain, you're tasked with robbing a bank. This level is also re-used during Hector's Firestarter mission, where you're tasked with burning all of the Mendoza's money which is currently being stored in the vault. The Firestarter mission specifically states you should stealth it, but it's seems like common sense that if you're hitting a bank that you don't want the police involved. How can I pull off a Bank Heist without the cops getting involved? |
Suppose we have two electric charges $q_1$ and $q_2$ a distance $r$ apart in euclidean three-space. Coulomb's force law states that there's a force $$\mathbf{F}_{12} = \dfrac{1}{4\pi\epsilon_0} \dfrac{q_1q_2}{r^2}\hat{\mathbf{r}}$$ between them. Now, what I'm wondering is how the two charges know about each other? How can one charge know that there's another charge there exerting a force over it? One way I believe could explain this was: "charge $q_i$ generates an electric field $\mathbf{E}_i$ which is felt by charge $q_j$" but this ends up bringing two other questions: The electric field is introduced more as a mathematical object than a physical object. We introduce the field $\mathbf{E}$ so that the force exerted on a charge $q$ is $q\mathbf{E}$. The field itself can then be considered the force per unit charge with this charge made small enough so that it won't change the original configuration. In that case, what it would really mean to generate a field and percept a field? Even if we explain with the field, the second question naturally is: how the other charge knows that a field is there and how this field interacts with it really? I didn't study quantum field theory yet, however, I imagine the more fundamental explanation would have to do with photons intermediating the process by which one charge feels the other. Is it really the case? How can we really understand how two charges know each other and by which mechanism they interact? | Is the word "vacuum" equal to "nothing"? Imagine two charges of opposite sign, far from one another in vacuum, and moving with constant velocity - s.t. none radiates energy, none emits photons. At some time though, the course of their movement brings them closer. They begin to accelerate toward one another. How do they feel the presence of one another? During their constant movement no photons are emitted, no "information" spreads in the universe about their presence. |
If you look at , it shows that it solves for the gaussian case: But why does it divide the value of $\parallel \beta \parallel_2^2$ by 2? | I have a question about the elastic net penalty as implemented in glmnet in R compared to the original paper by Zou and Hastie (2005). In glmnet the penalty is listed as $$ (1-\alpha)/2||\beta||_2^2+α||\beta||_1. $$ but in the paper it is $$(1-\alpha)||\beta||_1 + \alpha||\beta||_2^2. $$ Does anyone know where the factor $\frac12$ some from? (Never mind the fact that the $\alpha$'s were swapped between the two parameterisations.) In both cases the penalties are multiplied by $\lambda$, but what are the mathematical/technical arguments for not using a simple convex combination of the lasso and ridge penalties? |
I noticed there are many sites where I saw a question being closed by Off Topic instead of, say, Unclear what you are asking. Others which would benefited from This question was closed due to a typographical error were closed by Questions seeking for debugging help .... I'm not discussing whether those questions should be closed, because they were rightly closed but when I asked about the reasons, I was told that it was due to the limited amount of close options (edit: wait, i'm not talking about the close options inside of Off-Topic reason, but aout the limited number of 1st-level close options) Stack Exchange provided for the sites. But for many questions I read, the close reason was not quite understandable wrt the actual close reason (which I had to ask in the corresponding meta about). Is there a way to make those close slots variable? Ultimately, only moderators would have access to them as they have today (Edit: or could they ask the staff for more 1st-level close options). My reason: Closing should be useful for the users at first glance of why. Specially if the user is not well used to the site politics and is a slow-learner about how the site works. I understand there is the subtext for reasons as off-topic, but this is about communication: it is not about how do you think you send it, but how does the user (in this case the OP and in second place interested users) perceives it. Edit E.g.: If the user read Closed as Off-Topic at first glance in big bold letters when asking about an on-topic question (but somehow unfitting in other ways), or another main closure title which he perceives inappropriate wrt the involved question (even after shallowly reading the rules) they will feel at first glance the site owners or community does not understand their own rules (which is not the case; instead just a poor way of communicating). Disclaimer: No. I always understood why MY questions were closed. In this case, I am the... second place interested user, trying to understand how a specific site worked, and what and how was a question permitted in such site. | Custom close reasons are a great boon to Stack Exchange sites, allowing the community to provide more tailored advice to site-specific situations. Their big problem (aside from being limited to three by default) is that they are all lumped under "off-topic". This is often confusing. I suggest that all close categories but "exact duplicate" should support customized close reasons — not just the "off-topic" category. For example, the recommendation close reason Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. This would make more sense as a child of primarily opinion-based. Similarly, the "why doesn't this work" close reason Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: . This would make more sense as a child of unclear what you're asking. Similar examples can be given for pretty much any of the Stack Exchange sites. |
Let $A$ be a square matrix such that $a_{i,j}=|j-i|$, show that the determinant is $D_n=(-1)^{n-1}(n-1)2^{n-2}$ I have been struggling with this problem for a while now and I was hoping to get the slightest of nudges towards the solution. I would appreciate it if you phrase your hints in forms of questions so I can work through the idea. Please don't post a complete solution unless I asked, and thank you for your time. I wanted to obtain a recurrence relation between $D_n$ and $D_{n-1}$ but I failed. So far, I attempted to use Gaussian elimination on the first and last row and I obtained $(-1,1,\ldots,1)$ and $(1,1,\ldots,-1)$ for the first and last row respectively but I didn't know how to proceed from then on. | Question states: "Let $D_n$ denote the determinant of the $n$-by-$n$ matrix whose $(i,j)$th element (the element in the $i$th row and $j$th column) is the absolute value of the difference between $i$ and $j$. Show that $D_n = (-1)^{n-1}(n-1)2^{n-2}$." It seems like that I can get a recurrence relation (especially the question was from a book chapter dealing with recursion). In trying to get a recurrence relation, here is what I have done so far: (Let $R_k$ denote the $k$th row and let $(i,j)$ denote the element/spot of $i$th row and $j$th spot) 1) replace $R_1$ with $R_1-(R_2+R_{n-1})$ to get $R_1^*$ 2) replace $R_1^*$ with $R_1^*+R_{n-2}$ 3) If I am not mistaken, I should have $-2$ on $(1,1)$, $2$ on both $(1,n-1)$ and $(1,n)$, and all other element in the first row as $0$. 4) take out $2$ from the first row, and expand the determinant about the first row 5) I should have $D_n=2(-D_{n-1}+(-1)^n B_{n-1})$, where $B_{n-1}$ is the determinant of a not-easily-reducible mayrix whose last column consists of $n-1$ ones followed by one $-1$. How should I go about from now on? Once I get a recurrence relation, it would be pretty easy to get the explicit formula for $D_n$ using induction. P.S. This question apparently is a question taken from 1969 Putnam Competition |
Any idea on how to solve the following definite integral? $$\int_0^1\frac{\ln{(x^2+1)}}{x+1}dx$$ I have tried to parameterize the integral like $\ln{(a^2x^2+1)}$ or $\ln{(x^2+a^2)}$, which don't seem to work. | I have an interest in contour integration. I am not that good at it, but I enjoy learning what I can about it. Here is a version of a rational log integral rarely encountered. $\displaystyle \int_{0}^{1}\frac{\ln(x^{2}+1)}{x+1}dx=\frac{3}{4}\ln^{2}(2)-\frac{{\pi}^{2}}{48}$ I can do this using real methods (via double integral and substitution). I can post my workings if anyone would be interested. My question is, can this be evaluated using contour integration due to the limits being $[0,1]$ instead of $[0,\infty)$?. Contours may not be the most efficient way to go about it, but what is the course of action when the limits are 0 to 1 instead of 0 to infinity?. |
As the title asks, does the shiny side of foil really insulate or keep food warm when facing inwards? I've heard that the shiny reflective surface of the foil reflects the infrared energy. Is this true or is it just a marketing gimmick that everyone has come to believe? | Aluminum foil is said to be not absorbing light at all. It reflects light. So, does it mean that a more shiny aluminum foil will reflect more light and thus make the room more cooler as compared to less shiny foil? If yes, then where does unreflected light go in case of less shiny aluminum foil? Does less shiny and more shiny actually make a difference? Why? In order to keep whole room cool will it help if I stick the foil to the outside of wooden door (exposed to the sunlight) too? |
I am getting output for 13195L, 24L, and 23L. But I am not getting output for 600851475143L. The system is going into infinite loop. Please help me identify what is wrong with my code. package problem3; public class problem3_version1 { public static void main(String[] args) { long dividend = 600851475143L; // long dividend=13195L; // long dividend=24L; // long dividend=23L; int num_of_divisors = 0; for (long i = dividend - 1; i >= 2; i--) { System.out.println("i =" + i); int count = 2; for (long j = 2; j < i; j++) { if (i % j == 0) count++; if (count == 3) break; } if (count == 2) { if (dividend % i == 0) { num_of_divisors++; System.out.println("Highest factor is " + i); break; } } } if (num_of_divisors == 0) System.out.println("The number is prime"); } } | What is the best approach to calculating the largest prime factor of a number? I'm thinking the most efficient would be the following: Find lowest prime number that divides cleanly Check if result of division is prime If not, find next lowest Go to 2. I'm basing this assumption on it being easier to calculate the small prime factors. Is this about right? What other approaches should I look into? Edit: I've now realised that my approach is futile if there are more than 2 prime factors in play, since step 2 fails when the result is a product of two other primes, therefore a recursive algorithm is needed. Edit again: And now I've realised that this does still work, because the last found prime number has to be the highest one, therefore any further testing of the non-prime result from step 2 would result in a smaller prime. |
I just boot up my laptop then run the sudo apt-get update command, but there's an error says: [username] is not in the sudoers file. This incident will be reported. so I search the google for solution and it told me to go to the recovery mode on boot menu. After I got there,the recovery mode option didn't exist. I searched again for another way, then I found some source says change the kernel option with single on linux line on boot menu. Well, I got problem while deleting the kernel option, which one is it? If the code is: Linux /vmlinuz-3.13.0-44-generic root=/dev/mapper/ubuntu--vg-root ro quiet splash $vt_handoff which part should I delete? Anyway, I'm using the ubuntu 14.04; the grub version is 2.2 beta I believe. | I want to boot Ubuntu into recovery mode but there is no grub menu entry allowing me to do so. I pressed e and now I am able to edit boot options. It looks like that: setparams 'Ubuntu , with Linux 3.6.0-26-generic' recordfail gfxmode $linux_gfx_mode insmod gzio insmod part_msdos insmod ext2 set root='(hd0,msdos5)' search --no-floppy --fs-uuid --set=root <uuid> linux /boot/vmlinuz-3.5.0-26-generic root=<uuid> ro ipv6.disable=1 quirt splash $vt_handoff initrd /boot/initrd.img-3.5.0-26-generic The documentation says: Boot to the recovery mode even if it is not listed on the menu: Remove existing kernel options from the linux line and add single But this sentence doesn't make any sense, maybe the wiki page is broken somehow. How to modify the boot menu to boot directly into recovery mode? Note: I don't have access to grub config or anything else, only the boot menu edit page is available. |
I'm really embarrassed to ask but what is the nilradical of the Lie algebra $\mathfrak{gl}_n(\mathbb{C})$, i.e. the set of ad-nilpotent elements of $\mathfrak{gl}_n(\mathbb{C}) = \mathrm{Mat}_n(\mathbb{C})$$? This must be standard knowledge but I couldn't find a reference. Clearly, all nilpotent matrices and all diagonal matrices are in the nilradical. What else? | I find it intuitive enough that the radical of $\mathfrak{gl}_n\mathbb F$ is the scalar matrices, but I have trouble finding an easy, but complete proof: Proof. Let $\mathfrak s$ denote the scalar matrices. Clearly $\mathfrak s\subset\mathrm{rad}(\mathfrak{gl}_n\mathbb F)$. Suppose that $\mathrm{rad}(\mathfrak{gl}_n\mathbb F)$ is generated by more than one element, so that $X\in\mathrm{rad}(\mathfrak{gl}_n\mathbb F)$, but $X\notin\mathfrak s$. We can change basis such that $\mathrm{rad}(\mathfrak{gl}_n\mathbb F)$ is upper-triangular. (The change of basis leaves the scalar matrices invariant.) Then $X$ is upper-triangular. I want to conclude that there exists a $Y\in\mathfrak{gl}_n\mathbb F$ s.t. $[X,Y]$ is not upper-triangular. How can I see that $Y$ always exists, except by waving hands? |
how do I get flight tickets for my schengen visa application without paying? I have spoken to a travel agent and he said he can only 'reserve' it for 24 hours and after that its cancelled. Will that still count as 'confirmed booking'? I do not want to pay yet in case my application gets rejected. | I have a visa appointment this Friday 19 at the Italian Consulate in Philadelphia and I have a question about the flight reservation requirement: According to the Visa requirements "Confirmed flight reservation for a round trip showing complete itinerary." Does this mean I have to reserve the tickets, pay and print the itinerary? In this case if my visa gets denied then I will lose the money I paid or can I just show the planned itinerary (written not booked)? in this case the travel agency would not give me the Travel Insurance coverage until I book and pay for the reservation. I am a US green card holder and applying from North Carolina. |
So I have a website that runs through wamp however if you type a path in the address bar, you get an index of the directory, which I don't want I have already tried to add a .htaccess file in the directory to stop it indexing (saying IgnoreIndex *) and went into the apache httpd.conf file and changing Include conf/extra/httpd-autoindex.conf to: # Include conf/extra/httpd-autoindex.conf however none have worked... I have tried restarting my server, restarting services, but nothing... Help? | 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've been seeing words with umlauts in prominent publications - for example The New Yorker re-election like this: reëlection What's going on? | There are lots of informal references to the traditional / "New Yorker" style of using diereses to disambiguate runs of vowels, however I have yet to find a definitive guide. See, for example: My major question is: Is there a definitive reference that one can consult for proper traditional use of the dieresis in English? The accepted answer in last link above outlines some cases (e.g., no dieresis in "coalesce" or "react") but notably does not provide a reference to an authoritative source. My minor questions are: Is it appropriate to use a dieresis in "prosaïc?" How does one most correctly differentiate the two words spelled "unionized" ("union-ized" about the formation of a group or "un-ionized" about how many free electrons a material has)? Assume for a moment that you have to write both within the same document. |
, the author makes 4 French baguettes. That is probably 2 more baguettes than I can eat before they get stale. Recipe (transcribed from the video): Ingredients: Bread flour, 700 g Instant dried yeast, 0.5 tsp Kosher salt, 1.5 tsp Cool tap water, 520 g Steps: Whisk 1st 3 ingredients together. Add water and mix with the handle of a wooden spoon. Cover the bowl with clear wrap and rest for 45 minutes at room temperature. Repeat 4 times: Turn onto a flat surface, wet your hands, and fold from each side to center, then use a dough scraper to put the dough back into the bowl (2:30 in the video). Cover the bowl with clear wrap and rest for 45 minutes at room temperature. Sprinkle the work surface with bench flour and turn out the dough. Divide the dough into 4 equal pieces (each about 310 g). Shape the baguettes (6:30). Leaving the baguettes on the work surface, cover them with lightly oiled clear wrap. Let them rest for 15 minutes. Prepare a well floured bakers couche (7:20). Form the baguettes (7:50), dust lightly, and transfer to the couche. Cover with a tea towel and let them rise for 20 minutes, then a further 12 minutes while the oven preheats to 200°C/400°F. Place a pan of boiling water in the bottom of the oven. Transfer each baguette to a lightly oiled baking sheet using a peel or cardboard covered in aluminum foil (10:45). Spray the baguettes lightly with water Score the baguettes with a razor blade or very sharp knife (11:20). Place the baking sheet(s) in the oven and spray a little water over them to moisten the crust. Bake for 8 minutes, then turn the baking sheet(s) 180° for more even baking, releasing the steam from the oven carefully. Transfer the baguettes to a cooling rack. Note that I have not tried this recipe yet, but plan to very soon. How late in the process can I freeze the dough? I assume that when I want to eat it later, I can just thaw the dough and continue the process from that point. | I prefer my bread freshly baked (who doesn't?), but my mixer prefers kneading two loaves at a time to just kneading one. I have tried to freeze the second loaf before baking it, but when I thaw it, it does not rise well before baking. I've tried thawing it entirely in the refrigerator and then letting it rise on the counter, but that did not seem to work. Does anyone have a good technique or suggestion for this? |
We'd recommend you to book your flight early. Students are recommended to make an appointment with a counselor. are correct, while I recommend her to speak to a lawyer. is wrong. Why is the third sentence wrong? | I'd like to ask about the use of the verb "recommend" in the following sentences: We'd recommend you to book your flight early. The plumber recommended me to buy a new water heater. The first sentence is taken from the entry for the verb "recommend" in the online Oxford Advanced Learner's Dictionary and the other is from a grammar site. I'm still unsure if the usage "recommend someone" instead of "recommend to someone" is widely acceptable. While the first sentence seems have only one possible interpretation: "recommended to you", the other one, although less likely, could also be interpreted like: "The plumber recommended me, not someone else, to buy a new water heater". My question is whether it is possible to reinterpret the given examples as: We'd recommend that you book your flight early. The plumber recommended that I buy a new water heater. meaning that the interpretation is not that "you" or "me" are the objects of "recommend" but the whole proposition following it: "you to book your flight early" and "me to buy a new water heater", same as "that" clauses are in the rephrased examples? Edit: Thanks to all the contributors for the help! The meaning of the rephrases of the examples with "that" clause that I gave do tell essentially the same, but I was looking for the nuance in the interpretation of: We'd recommend you to book your flight early by comparing it with "that" clause rephrase: We recommend that you book your flight early. The salient reading of the first sentence for me would be : We'd recommend to you..and here is what we recommend.., meaning that there's a prosodic pause between "We'd recommend to you.." and the content of the recommendation which is "to book your flight early", while the second sentence I'd read as "We recommend..and here is what we recommend", which is "that you book your flight early", meaning that now the person who is recommended something is part of the content of the recommendation. In other words, this person doesn't stand prominently as the explicit object of the recommendation as it does in the former sentence. In brief, I was thinking that sentence 1 above may be interpreted as 2 too, not only as "recommend to you". When I use "for" in between the verb "recommend" and the person recommended this is more clearly shown: I'd recommend for you to book your flight early. Here again I'd read the sentence as "I'd recommend..and here is what I recommend". The person recommended is part of the whole proposition recommended — "for you to book your flight early", same as with "that-clause" phrasing, and it is not a clear object of the verb "recommend" as it is in "recommend to you" interpretation . By the way,I'd like to know how acceptable "recommend for someone to do something" construction is to you, as I haven't found it noted in Oxford ALD. To clarify my question, I'd like to add that in the original sentences "recommend" takes "to-infinitival" complement, not a bare verb which would be understood as a "that"-clause with "that" elided: "recommend you book your flight early", would stand for "recommend that you book your flight early". Again, my question is if "that-clause" complement, (nevermind if "that" is elided or not) is comparable with "you to book your flight early" or "for you to book your flight early" in the given sentence. Finally, as native speakers you're entitled to question any dictionary or book as it is up to you to decide what works and what not, there's no single ultimate authority for the language people speak, so you can argue even with Oxford guys. "Grammatical" is what is acceptable to the majority of the speakers. |
I can't tell where I went wrong, am still a beginner. Let N be a nilpotent in a commutive ring , let X be any element. I'll will be showing X + N is a unit . Assume Y(X+N) =1 Then YX(N^n-1) = N^n-1 Multiplying both side by X+N We get X(N^n-1) = X(N^n-1) Thus nilpotent summed with any element gives unit. | If $ua = au$, where $u$ is a unit and $a$ is a nilpotent, show that $u+a$ is a unit. I've been working on this problem for an hour that I tried to construct an element $x \in R$ such that $x(u+a) = 1 = (u+a)x$. After tried several elements and manipulated $ua = au$, I still couldn't find any clue. Can anybody give me a hint? |
Could you help me, please? What is the right option for the following question: "Why is Google unique?" "Why Google is unique?" Thank you very much and wish you a good day! | We always change subject and verb positions in whenever we want to ask a question such as "What is your name?". But when it comes to statements like the following, which form is correct? I don't understand what are you talking about. I don't understand what you are talking about. Another example Do you know what time is it? Do you know what time it is? Another example Do you care how do I feel about this? Do you care how I feel about this? |
How can I add my signature to Preview on a Mac without a built-in camera? I've got a mid 2012 Mac mini, running macOS 10.11 using a 3rd party mouse and Apple keyboard, connected to 2x 3rd party HDMI displays. I want to add my signature to the Preview app, so that I can sign documents digitally in Preview without having to print, sign, scan. In the past I have used a built-in webcam to get my signatures saved into Preview, but I can't do that on this Mac mini. I have access to another mac with a camera and an iPhone if required. | I have a Mac Mini with no attached camera. I would like to use the feature of Preview that allows you to insert a signature. This relies on taking an image of your signature using an isight/facetime/webcam. I do not have on. I do have a MacBook pro on which I use the signature function. Is there a way to copy a file from the the MacBook Pro to the Mac Mini to enable this function on the Mini? |
Every now and again I have been noticing the following in Haskell documentation: (for example in ): Subject to fusion What is fusion and how do I use it? | What is Haskell's Stream Fusion and how do I use it? |
I have a CUBOT P7 phone with very little internal memory, so I installed an 8GB external SD card. However, my apps will not download directly to there, and I have no more space on my internal memory. How do I modify my phone so that apps download directly to my SD card? with out having to root my phone | If you're running out of memory which happens a lot on low-end android devices like Samsung galaxy Y, Samsung galaxy Y-DUOS etc. and want more free space for your apps, then this post is for you.. |
Under Settings > Reading, there is a field called Blog pages show at most __ posts. Since all of my queries are based off of the main query, I need to find out what's stored in that field. How would I do that, especially outside of the loop? | I want to retrieve the default value of Post per page (the value that is set in settings->reading. I've looked around and so far I've only found ways to query it. problem is i dont want to change what was set i just want to retrieve it for pagination purposes. i thought of using $something->post_count.(i might be wrong but as i understand it returns the amount of posts displayed currently) but this could be wrong in some cases. Also how can i get the total number of posts ? |
I used following tags to create equations in my document. But when I tried to add conditional equation within this tag, it didn't work properly. Is there any way to add conditional statement within equation tags? \begin{equation} \begin{cases} xxxxx, & \text{xxx}\\ xxxxx, & \text{xxx} \end{cases} \end{equation} | I want to write a conditional expression such as the following. What is the best way to express such conditional expressions in Latex? |
Whenever we register a new domain name from a Registrar, we need to tell them what is the nameserver by providing them the dns server IP address. But in the same time in the zone file of our dns server (I will use bind9 in this case), we also add the RR like the following: abc.net. IN NS ns1.abc.net. abc.net. IN NS ns2.abc.net. which is the authoritative record. 1)So what is the purpose of having the authoritative record of NS in the zone file of abc.net, since when one trying to resolve let say www.abc.net, the TLD .net already tell us they are in ns1.abc.net and ns2.abc.net ? 2)Since from the delegation concept point of view, NS record only need to be stored in the parent of the zone, meaning root server NS tell us NS of .net, .net server NS tell us the NS of .abc.net and .abc.net NS resolve the dns query. so in order to resolve www.abc.net, there are only 3 set of NS IP address we need to know: root server NS that tell us where is .net, .org, .uk, .it...etc. root server NS IP is store in bind9 named.ca .net NS that tell us where is .abc.net, .xyz.net, ...etc. .net NS IP is stored in root server NS record. .abc.net NS that tell us where is www.abc.net, mail.abc.net,...etc. .abc.net NS IP is stored in .net NS record. so since we don't have any www.subdomain.abc.net, we shouldn't need to store any NS record for .subdomain.abc.net, isn't it ? 3)What will happen if I don't put the NS record of abc.net in my abc.net zone file ? 4)What if I have NS record in my zone file but not in the Registrar? which one will be the resolver take ? There are a detail , but I still don't understand the meaning behind it. | $ORIGIN example.com. ; not necessary, using this to self-document $TTL 3600 @ IN SOA ns1.example.com. admin.example.com. ( 1970010100 7200 1800 1209600 300) @ IN NS ns1.example.com. @ IN NS ns2.example.com. @ IN A 198.51.100.1 ns1 IN A 198.51.100.2 ns2 IN A 198.51.100.3 sub1 IN NS ns1.example.edu. sub2 IN NS ns1.sub2 ns1.sub2 IN A 203.0.113.1 ; inline glue record The role of a NS record beneath the apex of a domain is well-understood; they exist to delegate authority for a subdomain to another nameserver. Examples of this above would include the NS records for sub1 and sub2. These allow the nameserver to hand out referrals for portions of the domain that it does not consider itself authoritative for. The purpose of the NS records at the apex of a domain, ns1 and ns2 in this case, seem to be less understood by the internet at large. My understanding (which may not be holistic) is as follows: They are not used by caching DNS servers in order to determine the authoritative servers for the domain. This is handled by , which is defined at the registrar level. The registrar never uses this information to generate the glue records. They used to delegate authority for the entire domain to other nameservers. Trying to do so with software such as ISC BIND will not result in the "expected" referral behavior at all, as the nameserver will continue to consider itself authoritative for the zone. They are not used by the nameserver to determine whether it should return authoritative responses (AA flag set) or not; that behavior is defined by whether the software is told to be a master or a slave for the zone. Most nameserver software will quite happily serve apex NS records that disagree with the information contained by the upstream glue records, which will in turn cause well-known DNS validation websites to generate warnings for the domain. With this being the case, what are we left with? Why are we defining this information if it doesn't appear to be consumed by caching DNS servers on the internet at large? |
I am about to begin my PhD in the applications of duality and holographic techniques to open problems in condensed matter physics. An area often called AdS/CMT. Having seen some relevant reviews, I realize that it is easy to find some nice descriptions and discussions concerning how holography is used to tackle such issues, i.e. holographic superconductors etc. However, in most such reviews the origin of the correspondence is only at best motivated, lacking any detailed discussion. I would like to ask your opinion about which two or three seminal papers regarding AdS/CFT should I focus on, in order to gain a deeper understanding on how the original correspondence was formulated on the first place. Brief remarks together with your suggestions are more than welcome. | seems like a really hot topic and I'd like to start reading about. I am looking for the best introduction at my level, i.e. I have a background in QFT, CFT and general relativity at the level of a master student in theoretical physics. What would you recommend me to start tackling the subject? I have been looking for resources and so far I have noticed: -this synthetic introductory lectures by Horatiu Nastase: -the videos of lectures done by P. Vieira at Perimeter for Perimeter Scholar International students: -the subject starts entering the most recent textbooks on string theory. We have the Schwartz and Becker ( ) and also the Kiritsis ( ) I probably missed a lot of resources, as the literature on the subject is already quite huge. I would really appreciate some advice on that, as I already had the frustration of losing my time on not-so-good books when started to learn something new, so if I could (to the best) avoid that this time... |
So, how can I recover password of root account using only terminal? I have only terminal (not sudo), and no GUI acces | On my mac I have 2 accounts and the both are normal account. So in this moment I don't have a Administrator account, only one that was in the past a administrator, but now is not. How I can have again a Administrator account? |
It is known that X is a random variable which follows Poisson distribution Po(λ), Y is a random variable which follows Binomial distribution Binomial(X,p). The problem I encountered is: Proof that Y~Po(pλ). I tried two approaches but none of them is satisfying. Method 1: Since the mean and variance of X are both λ, each trial of X has the same success rate p, so the mean and variance of Y are both λp. Hence, Y~Po(λp). But I have made an assumption here is that a distribution of which the mean and the variance are the same is a Poisson distribution, but this clearly not a fact. Method 2: I used the Poisson limit theorem to proof, i.e. Po(λ) = lim(n->inf) Binomial(n,λ/n) But the maths becomes complicated uncontrollably. So, are there any rigorous proofs for this problem? | I have been stuck with a problem for a couple of days regarding the distribution of outcomes from a two-stage process. Specifically, what is the distribution of the number of successes in a poisson process followed by a series of bernoulli trials, where the number of trials is determined by the result of the poisson process. If this is not clear, I’ll explain by way of example. Suppose we have a hunter who is setting out to catch rabbits. To do this he sets up a trap. Rabbits pass over the trap at a rate of $r$ times per day (poisson distributed). However, the trap is not very good. If a rabbit walks over the trap, there is only a $p$ (probability) chance that it activates. If the trap has no limit on the amount of rabbits it can catch, what does the distribution of rabbits caught per day look like? My intuition is that it should follow a poisson distribution with mean $r.p$. However, I have been unable to prove this analytically. I figure that the probability of a given number of ‘successes’ should be calculable through the poisson distribution and the binomial distribution. Something like: $ P(X=x) = \sum_{i=x}^{Inf} poisson_{pmf}(i | r) . binomial_{pmf}(x | i, p) $ We can then substitute in the respective mass functions into the above equation. However, beyond that I am getting stuck. Any help or a point in the right direction would be great appreciated. |
Starting from the upcoming semester besides my research for the PhD, I will also have to work on a loosely related project (w.r.t. my research), and do teaching as well. I am overwhelmed from this. It seems that I will never have enough time for the actual research while the project work (50%) and teaching will eat up all my time. Besides these duties there are also students to supervise, lab to maintain etc. How do the more experienced ones in AcademiaSE deal / have dealt with such situations? | I am a first year PhD student, and it's the fourth week of school. I am taking two classes, doing one grad class TA and doing a lab rotation. I am in Electrical Engineering (Controls and DSP). I start my day thinking- "I'll go to class from 10 am to 12 pm, solve 5 homework problems from 1 pm- 3 pm, do some TA work from 4 pm to 6 pm, and read a bunch of papers from 7 pm to 9 pm, then cook and sleep. How optimistic. In reality, when I start the homework problems at 1 pm, I end up having to read a bunch of textbooks to understand stuff in it (I'm doing Convex Analysis), and by the time 3 pm rolls around, I have finished only one problem. Feeling discouraged, I keep at this homework, vowing to stop only when I'm done with my quota of 5. My efficiency starts to drop severely after a few hours, but since I'm in school with my laptop and stuff, I can't go anywhere to 'relax', so I just keep sitting and start redditing or something. And then my concentration further drops when I try to resume real work. This goes on, I miss dinner, I sleep late, and the efficiency just plummets through the week. My past couple of weeks have been so inefficient, I want to do something about it before it's too late. In short, my question is, when your work is way too difficult to achieve your goal of the day in your allotted time, do you switch work, or do you keep going? I have always believed that output is more important than input, that is, putting in two hours for each task without achieving much in anything is not as good as putting in, say, eight hours for just one and finishing something in it nicely. However, this strategy of mine is failing me for the first time in my life, because even if I put in eight hours, I am not able to finish anything. The work is so difficult. I'm not complaining, just really need guidance. |
I have a method here that is supposed to check if a user has entered a "y", pertaining to the answer yes; or an "n" pertaining to the answer no. It reads in the letters entered by the user correctly, however it keeps saying that the user has not entered a "y" or an "n". If someone could let me know what I'm doing wrong that would be great. Here is the code I'm using : String answer = ""; do { while (answer.equals("")) { answer = sc.nextLine(); } if (!answer.equals("y") || !answer.equals("n")) { System.out.println("Please enter a y, meaning yes; or an n, meaning no."); answer = ""; } } while (!answer.equals("y") || !answer.equals("n")); | I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug. Is == bad? When should it and should it not be used? What's the difference? |
I just have a question in mind that's stuck in my head, and it's why particle accelerators cannot accelerate any particle to the speed of light. I'm assuming it involves Einstien's theory of relativity. | I'm in a freshmen level physics class now, so I don't know much, but something I heard today intrigued me. My TA was talking about how at the research facility he worked at, they were able to accelerate some certain particle to "99.99% the speed of light". I said why not 100%, and I didn't quite understand his explanation, but he said it wasn't possible. This confused me. Since the speed of light is a finite number, why can we go so close to its speed but not quite? Edit: I read all the answers, and I think I'm sort of understanding it. Another silly question though: If we are getting this particle to 99.99% the speed of light by giving it some sort of finite acceleration, and increasing it more and more, why cant we increase it just a little more? Sorry I know this is a silly question. I totally accept the fact we cant reach 100%, but I'm just trying to break it down. If we've gotten so close by giving it larger and larger acceleration every time, why cant we just supply it with more acceleration? And how much of a difference is there between 99.99% the speed of light, and the speed of light? (I'm not really sure if "difference" is a good word to use, but hopefully you get what I'm asking). |
How do you find the derivative of $x^{2/5}$ using the definition of the derivative? | I have a question that is highly similar to this one: However, I'm not sure how to do this when fractional powers are involved. I understand that the answer involving the binomial theorem shows this for fractions too, but I'm not sure how to go through the mechanics of it all. For example, when trying to differentiate $\sqrt{ax+b}$, I get to $$ \lim_{h \rightarrow 0} \frac{\sqrt{a(x+h)+b} - \sqrt{ax+b}}{h} $$ then can't get the $h$ to cancel out. I think this involves algebraic manipulation of some sort, but can't figure it out. Thanks |
In a hurry.. \begin{tabular}{p{.5in}|p{1in}|p{1in}|p{1in}} \hline \multicolumn{1}{|c|}{S. No.} & {|c|Book Name} & Author & \multicolumn{1}{|l|}{Publisher}\\ \hline a & b & c & d\\ \end{tabular} | I have this MWE: \documentclass{article} \usepackage{multirow} \begin{document} \begin{table}[here] \begin{center} \begin{tabular}{|l|l|c|} \hline \multicolumn{2}{|c|}{\textbf{SED}} & \multirow{2}{*}{\textbf{\% compressione}} \\ \cline{1-2} \textbf{MC} & \textbf{DP} & \\ \hline \hline 0.00016032 & 0.0001750267 & 10\%\\ \hline \end{tabular} \end{center} \end{table} \end{document} It realizes this image: The first two columns are correctly formatted to the left, but I want it so that just MC and DP will be centered, how can I do that? |
My path to get my MA was delayed following a family tragedy, and I'm finally in a position where I can get back on track, so I would like to reach out to a professor I previously did lab work for a couple years ago. I have some general questions for him, but I also would like to see if maybe he has a Research Assistant position available, or maybe knows other professors that might, to try to build up my experience again. I was wondering if anyone might know the best way to approach an email like this? I was thinking maybe starting by formally asking if he remembered me and maybe giving some details about the work I did for him, but then I don't know where to go from there. I'd prefer to meet in person, but is that okay to ask after such a long time? Thanks in advance. | When needing to ask a professor about something important and potentially delicate, what is an appropriate way to phrase the question or write the email? Examples include: Requesting a recommendation letter Asking for exceptions to policy (e.g., ignoring a course prerequisite, rescheduling an exam) Asking if you can do research with them, join a group, get into a program Scheduling a meeting, exam, or defense Letting them know about a change of plans Letting them know about a life event affecting your work or studies (e.g., wedding, funeral, sickness, vacation) |
In a liquid, the pressure is exerted by the weight of the liquid. As the force due to it's weight acts downwards, why is there an upward force at any point in a liquid? | I'd like answers both in the more intuitive side an on the more precise side. Thinking of water as "cubes" of water, for example, would allow pressure in the z axis to be independent of the y or x axis. Choosing other "shapes", like a triangular prism, yield different results. Will this fact, then, be dependent on the format of the molecules of the liquid ? I've heard of the rotational symmetry of liquids. What is its precise statement ? Why is it true ? |
after reading this class manual i found two main commands to be used, the first one being \addbibresource{ref.bib} to add the separate bib file to the document and the secon one being \printbibliography to print the references in the end of the document but regardless of how i try it just simply won't work this is how my Test code looks like \documentclass[rascunho]{fei} \usepackage[utf8]{inputenc} \usepackage{gensymb} \usepackage{cancel} \addbibresource{ref.bib} \begin{document} \begin{center} \begin{vplace} \begin{HUGE}{\textbf{\MakeUppercase{Fisica Moderna}}} \end{HUGE} \\ \vspace{0.2cm} Material-Base: \\ \vspace{0.2cm} R. Eisberg and R. Resnick, Quantum Physics of Atoms, Molecules, Solids, Nuclei, and Particles 2nd Edition, Wiley, 1985 \cite{eisberg1974quantum}. \\ \vspace{0.2cm} H. Moysés Nussenzveig, Curso de Fisica Basica, 4a. edicao, Vol. 4, Blucher, 2002. \cite{nussenzveig2002curso} \end{vplace} \end{center} \printbibliography \end{document} Every time i try to use the F11 command to call bibtex i get the following error message This is BibTeX, Version 0.99d (MiKTeX 2.9.6500 64-bit) The top-level auxiliary file: teste.aux I found no \citation commands---while reading file teste.aux I found no \bibdata command---while reading file teste.aux I found no \bibstyle command---while reading file teste.aux (There were 3 error messages) Process exited with error(s) and i just dont know what else to try to do to fix this, this is how it looks after compiled: my ref.bib file is the following: @book{nussenzveig2002curso, title={Curso de f{\'\i}sica b{\'a}sica}, author={Nussenzveig, Herch Moys{\'e}s}, year={2002}, publisher={E. Blucher} } @book{eisberg1974quantum, title={Quantum physics}, author={Eisberg, Robert and Resnick, Robert}, year={1974}, publisher={John Wiley New York} } | Running the minimal example \documentclass{article} \usepackage{filecontents} \begin{filecontents*}{\jobname.bib} @ARTICLE{example, author = {Other, Anthony Norman}, title = {Some things I did}, year = {2014}, journal = {J.~Irrep. Res.}, volume = {1}, number = {1}, pages = {1-10} } \end{filecontents*} \usepackage[backend=biber]{biblatex} \addbibresource{\jobname.bib} \begin{document} Hello\cite{example}. \printbibliography \end{document} I get the warning There were undefined references. I have read and know that I need to run: LaTeX Biber LaTeX However, my editor is only set up to run BibTeX. How do I go about setting up my editor/IDE to be able to run Biber, and how do I run the LaTeX/Biber/LaTeX cycle? Answers (sorted alphabetically by editor name) Answer guidelines Each answer should be for one editor. If the editor is cross-platform, if possible give a single answer with notes covering the minor platform variations. Please edit the question to include new answers in the 'link list' Each answer should be 'stand alone', i.e. don't say 'It's almost the same as editor Y but ...' for the editor part Instructions for 'build tools' such as arara or latexmk are welcome but should explain how to set up the editor in question as not all editors allow simple addition of arbitrary tools |
What is $e^A$, where$$A = \begin{pmatrix} 0 & 1 \\ 4 & 0 \end{pmatrix}?$$ | How to calculate $\exp\left(t\begin{bmatrix}0 & z\\z^* & 0\end{bmatrix}\right)$, or $\exp\left(\begin{bmatrix}0 & v\\w & 0\end{bmatrix}\right)$ (where: $v, w \in \mathbb{C}$) in general? |
I'm writing a c# console program that reads a configuration file and a google map example found . I copied the html content into a local template file and put placeholders for string.format (notice the {1}, {2} in code snipped below. I then read the template from the local file system and use the code below to populate the placeholders. The problem is that the string.format keeps throwing error saying Input string was not in a correct format. If I replace the template with a blank file, the Input string was not in a correct format. is not thrown. There are no exceptions. Thus, the problem is with the html template below and not the code. Can someone spot the issue with the template that make so that it doesn't work with string.format? I'm guessing that it has to do with { and } so I moved around any double (i.e. {{) but that didn't help. Code var res = string.Format(template, ConfigurationManager.AppSettings["PageTitle"], ConfigurationManager.AppSettings["zoom"], ConfigurationManager.AppSettings["CenterLat"], ConfigurationManager.AppSettings["CenterLongi"], ConfigurationManager.AppSettings["mapTypeId"], sb.ToString(), ConfigurationManager.AppSettings["strokeColor"], ConfigurationManager.AppSettings["strokeOpacity"], ConfigurationManager.AppSettings["strokeWeight"], ConfigurationManager.AppSettings["fillColor"], ConfigurationManager.AppSettings["fillOpacity"], ConfigurationManager.AppSettings["GoogleMapBaseUrl"].Replace("_KEY_", ConfigurationManager.AppSettings["APIKey"]) ); HTML Template <!DOCTYPE html> <html> <head> <meta name="viewport" content="initial-scale=1.0, user-scalable=no"> <meta charset="utf-8"> <title>{0}</title> <style> html, body { height: 100%; margin: 0; padding: 0; } #map { height: 100%; } </style> </head> <body> <div id="map"></div> <script> function initMap() { var map = new google.maps.Map(document.getElementById('map'), { zoom: {1}, center: { lat: {2}, lng: {3} }, mapTypeId: {4} }); // Define the LatLng coordinates for the polygon's path. var triangleCoords = [ {5} ]; // Construct the polygon. var bermudaTriangle = new google.maps.Polygon( { paths: triangleCoords, strokeColor: '{6}', strokeOpacity: {7}, strokeWeight: {8}, fillColor: '{9}', fillOpacity: {10} }); bermudaTriangle.setMap(map); } </script> <script async defer src="{11}"></script> </body> </html> | How can brackets be escaped in using string.Format? For example: String val = "1,2,3" String.Format(" foo {{0}}", val); This example doesn't throw an exception, but it outputs the string foo {0}. Is there a way to escape the brackets? |
I'd like to install libjbig-dev on Ubuntu 14.04 LTS. So I run sudo apt-get install libjbig-dev which returns Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: libjbig-dev : Depends: libjbig0 (= 2.0-2ubuntu4) but 2.0-2ubuntu4.1 is to be installed E: Unable to correct problems, you have held broken packages. So I do sudo apt-get install libjbig0 which returns Reading package lists... Done Building dependency tree Reading state information... Done libjbig0 is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Now what? How can I install libjbig-dev? Thanks. | After upgrading from 10.04 to 12.04 I am trying to install different packages. For instance ia32-libs and skype (4.0). When trying to install these, I am getting the 'Unable to correct problems, you have held broken packages' error message. Output of commands: sudo apt-get install -f Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. After running this: sudo dpkg --configure -a foo@foo:~$ sudo apt-get install -f Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. |
I have read that product of 4 consecutive integers is less than 1from a perfect square, but this question is quite different. | I need to prove the following, but I am not able to do it. This is not homework, nor something related to research, but rather something that came up in preparation for an exam. If $n = 1 + m$, where $m$ is the product of four consecutive positive integers, prove that $n$ is a perfect square. Now since $m = p(p+1)(p+2)(p+3)$; $p = 0, n = 1$ - Perfect Square $p = 1, n = 25$ - Perfect Square $p = 2, n = 121$ - Perfect Square Is there any way to prove the above without induction? My approach was to expand $m = p(p+1)(p+2)(p+3)$ into a 4th degree equation, and then try proving that $n = m + 1$ is a perfect square, but I wasn't able to do it. Any idea if it is possible? |
Some days ago I downloaded a .deb file that does not have a descriptive name and I want to know which version it is before executing dpkg -i. I do not know if the same package also comes in a repository, so I am looking to extract this information from the actual file, rather than querying the repository's database. | I want to see the version of a package before I install it. How can I do this? |
I really need to access the administrator password but I forgot it. BUT I really don't want to reset or change it. I just need to know the current password. | I am not a administrator and I would like to find the administrator password. I would not like to reset it however. Is there anyway to find and not reset the administrator password? |
When you are writing about the seasons, should you capitalize their names? For example, would you say: I love the colors of the leaves in Autumn. Or should you say: I love the colors of the leaves in autumn. | Which sentence uses the correct capitalization for the name of the season? I will travel in the summer of 2013. or I will travel in the Summer of 2013. |
I have MediaTek (Ralink) MT7601U USB, and with their source, but I am user anyone can help how to run this USB Wifi? | I am trying to install a Ralink wifi adapter in Ubuntu Desktop 14.04. The system is not detecting the wifi. lsusb lists the device as: Bus 002 Device 004: ID 148f:7601 Ralink Technology, Corp. I have the rt2800 USB driver listed in "/etc/modules"; Following some instructions on the web, I tried this command: echo 148F 7601 | sudo tee /sys/bus/usb/drivers/rt2800usb/new_i lsmod | grep rt2800 returns the following: rt2800usb 26581 0 rt2x00usb 20041 1 rt2800usb rt2800lib 83150 1 rt2800usb rt2x00lib 48886 3 rt2x00usb,rt2800lib,rt2800usb mac80211 545990 3 rt2x00lib,rt2x00usb,rt2800lib crc_ccitt 12627 1 rt2800lib |
I've tried this That didn't work. I've tried deleting "diskspaced" from the disk using sudo, it didn't allow me to delete it. What's a fool-proof way to silence these bloody notifications? | After upgrading to macOS Sierra, I'm getting the notification that "Your disk is almost full. Save space by optimizing storage.": The options appear to be to store my files in iCloud, automatically delete files, or manually delete files: My problem/irritation is that I have 80GB free of my 440GB volume. The question: is there a way to silence this notification in a (semi-)permanent fashion, or to change the threshold it uses for the notification? |
I'm seeking the man page info for a switch for a given command. I tried for example man sort | grep -A2 "-n,". I expected something like: -n, --numeric-sort compare according to string numerical value as output and instead I got Usage: grep [OPTION]... PATTERN [FILE]... Try 'grep --help' for more information. | I often want to search through a man page, however I am forced to either do: man <package> | grep <search> Or: man <package> > file.txt But there must be an easier way than this to do this, so how can I search through a man page while in it instead of having to send its contents to a file, or use grep to print the necessary matching contents to standard output? |
What's the difference between en0 and eth0? In my CentOS 6 VM, there is list of network-scripts: [root@localhost /]# ls /etc/sysconfig/network-scripts/ ifcfg-en0 ifdown-ipv6 ifup ifup-plip ifup-wireless ifcfg-eth0 ifdown-isdn ifup-aliases ifup-plusb init.ipv6-global ifcfg-lo ifdown-post ifup-bnep ifup-post net.hotplug ifdown ifdown-ppp ifup-eth ifup-ppp network-functions ifdown-bnep ifdown-routes ifup-ippp ifup-routes network-functions-ipv6 ifdown-eth ifdown-sit ifup-ipv6 ifup-sit ifdown-ippp ifdown-tunnel ifup-isdn ifup-tunnel you see there are ifcfg-en0 and ifcfg-eth0, does it have any difference between them? the ifcfg-eth0 I have used(configured data in it), now I want to add a more IP address, which file I can configured? EDIT-01 The is not related to my post, mine is enX. | When I run ifconfig -a, I only get lo and enp0s10 interfaces, not the classical eth0 What does enp0s10 mean? Why is there no eth0? |
And how to set it up as ALT+F4? (With the intended effect of closing windows) PS: the "another question" asks for the purpose of it and doesn't address the need to make it to be ALT+F4. | I used to close a running application by pressing ALT+F4. But, I realised that the application is still running and the correct way to close (quit) it is the combination of Ctrl+Q keys. So, what is the purpose of ALT+F4 and how is it different from Ctrl+Q? |
My freewheel stopped working. I can still pedal forward, but not backward. What's wrong with it? | I've taken the rear wheel off my bike but the rear gears are stuck and do not spin freely anticlockwise. It had been out of use for about 4 days, kept in a dry garage. I took the wheel off because it was bent, then found this problem. Any idea what's happened or if i can fix it? |
import java.util.Scanner; public class LoginPage{ public static void main (String[]args){ System.out.println("______________"); System.out.println("| Login Page |"); System.out.println("______________"); System.out.println(); //Declare Strings String Log; String Pass; String TestU = "Corey"; String TestP = "Chicken"; int i = 0; //Declare Scanner Scanner scan = new Scanner (System.in); while(i<=6){ System.out.print("Username: "); Log = scan.nextLine(); System.out.print("Password: "); Pass = scan.nextLine(); i++; if((Log==TestU)&&(Pass==TestP)) {break;} } } } This is the current code for a login page i'm trying to create. The 'TestU' and 'TestP' are just there instead of usernames/password that i will read from a data file. But when i enter in 'Corey' and 'Chicken' it doesn't exit the while loop. I might just be doing something very simple wrong but i cannot find it and i cannot find it on google or anything(Maybe i'm searching the wrong problem.) But any help would be greatly appreciated. | 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? |
So I have tried to make a solution for a predicate logic proof, and would like if someone could give a hint to come to the correct proof. I already know that Line 11 is incorrect since it only holds in the assumption. And the same for line 9, since its in two different assumptions. Any help to how I should proceed, would help me a lot | I'm currently trying to prove the following: And this is what I've come up with so far: And now I'm stuck. Perhaps the next step might be to eliminate for all x? I'm sorry for using links, but it seems like I'm not allowed to do it otherwise due to needed reputation point. Help would be appreciated. |
One of the more active on one of my sites has an issue with his user-picture. Namely, it keeps changing on us, and it's really annoying. I've , and , and his was @Shokhet I have no idea! I thought i noticed something funny going on with the pics. You didn't believe me when I told you technology and i don't get along, did you? Now you believe me? Can we please get this fixed? It's really annoying, as I use those profile pictures to help me quickly identify who posted what, and 6591 is one of the really good guys. | I am using a generic avatar, and it changes daily. Is this a feature or a bug? |
I have just created a new Rackspace cloud server and I need to set it up. I created a new user with the adduser command and currently the user is only in a group with the same name. For the sudo privileges what should I do: use visudo to edit /etc/sudoers file add the user to the sudo group create a new admin group, add it to sudoers, and then add the user to this group I can not decide what's the right way to do this. Why should I choose one over other? | After I add a user using adduser, I can't see it via System > Administration > Users and Groups unless I log out and then log in again. Is that normal? Also, can I set a newly added user as a sudoer or do I have to change that only after adding it? How can I do that via the shell? Finally, can I delete the original user that was created upon initial installation of Ubuntu, or is this user somehow 'special'? |
I need to prove $$\sum_{k=1}^n(2k)^2 = \frac{2n(n+1)(2n+1)}{3}$$ using mathematical induction. I tried solving this but I got stuck when proving that this is true for n=k+1. I would be very thankful if someone could help me. | I encountered the following induction proof on a practice exam for calculus: $$\sum_{k=1}^nk^2 = \frac{n(n+1)(2n+1)}{6}$$ I have to prove this statement with induction. Can anyone please help me with this proof? |
I know lot of questions stackoverflow on this topic one but I did't find answer to this one. struct message { int myint; }; int main(void) { switch(1) { case 0: break; case 1: int i; // this is fine, but int i = 10; is compile error break; default: break; } return 0; } Logically speaking why is defining variable and initializing it with some value is different than just defining variable for 'case labels'? | I've always wondered this - why can't you declare variables after a case label in a switch statement? In C++ you can declare variables pretty much anywhere (and declaring them close to first use is obviously a good thing) but the following still won't work: switch (val) { case VAL: // This won't work int newVal = 42; break; case ANOTHER_VAL: ... break; } The above gives me the following error (MSC): initialization of 'newVal' is skipped by 'case' label This seems to be a limitation in other languages too. Why is this such a problem? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.